diff --git a/.gitignore b/.gitignore index c3b4df9c3..ab63f4cfa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # Frontend node_modules -/frontend/hpnp* # Junk/cache files. *Thumbs.db diff --git a/Dockerfile b/Dockerfile index 99b8f0305..4463d5982 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,8 @@ RUN go install github.com/jwilder/dockerize@v0.6.1 RUN go install github.com/aptible/supercronic@v0.2.28 +RUN go install github.com/centrifugal/centrifugo/v5@v5.1.2 + # # MariaDB dependencies build step # @@ -35,6 +37,7 @@ ENV TZ="UTC" # Add Go dependencies COPY --from=go-dependencies /go/bin/dockerize /usr/local/bin COPY --from=go-dependencies /go/bin/supercronic /usr/local/bin/supercronic +COPY --from=go-dependencies /go/bin/centrifugo /usr/local/bin/centrifugo # Add MariaDB dependencies COPY --from=mariadb /usr/local/bin/healthcheck.sh /usr/local/bin/db_healthcheck.sh @@ -161,18 +164,6 @@ ENV TZ="UTC" \ ENTRYPOINT ["tini", "--", "/usr/local/bin/my_init"] CMD ["--no-main-command"] -# -# High-Performance Now Playing (HPNP) Build -# -FROM node:20-alpine AS hpnp - -COPY --chown=node:node ./frontend /data -WORKDIR /data -USER node - -RUN npm ci --include=dev \ - && npm run build-hpnp - # # Final build (Just environment vars and squishing the FS) # @@ -180,10 +171,6 @@ FROM ubuntu:jammy AS final COPY --from=pre-final / / -# Add HPNP from previous step -COPY --from=hpnp --chown=azuracast:azuracast /data/hpnp /usr/local/bin/hpnp -RUN chmod a+x /usr/local/bin/hpnp - USER azuracast WORKDIR /var/azuracast/www diff --git a/config/events.php b/config/events.php index fb8f3e3b8..ebd90cb77 100644 --- a/config/events.php +++ b/config/events.php @@ -130,6 +130,7 @@ return static function (CallableEventDispatcherInterface $dispatcher) { App\Sync\Task\RotateLogsTask::class, App\Sync\Task\RunAnalyticsTask::class, App\Sync\Task\RunBackupTask::class, + App\Sync\Task\SendTimeOnSocketTask::class, App\Sync\Task\UpdateGeoLiteTask::class, App\Sync\Task\UpdateStorageLocationSizesTask::class, ]); diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 94d93e18c..1a8681c78 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -17,28 +17,23 @@ "@fullcalendar/timegrid": "^6", "@fullcalendar/vue3": "^6", "@popperjs/core": "^2.11.8", - "@tinyhttp/app": "^2.2.1", "@vuelidate/core": "^2.0.0", "@vuelidate/validators": "^2.0.0", "@vuepic/vue-datepicker": "^7", "@vueuse/core": "^10", "axios": "^1", - "better-sse": "^0.10.0", "bootstrap": "^5.3.0", "chart.js": "^4.2.1", "chartjs-adapter-luxon": "^1.1.0", "chartjs-plugin-zoom": "^2.0.0", "codemirror": "^6", "codemirror-lang-liquidsoap": "^0.2.5", - "esbuild": "^0.19.8", "hls.js": "^1.1.5", "leaflet": "^1.7.1", "leaflet-fullscreen": "^1.0.2", "lodash": "^4.17.21", "luxon": "^3", - "milliparsec": "^2.3.0", "nprogress": "^0.2.0", - "pkg": "^5.8.1", "qrcode": "^1.5.3", "roboto-fontface": "^0.10.0", "sweetalert2": "11.4.8", @@ -64,6 +59,7 @@ "@vitejs/plugin-vue": "^4.2.3", "@vue/eslint-config-typescript": "^12", "del": "^7", + "esbuild": "^0.19.9", "eslint": "^8.45.0", "eslint-plugin-vue": "^9.8.0", "glob": "^10.2.7", @@ -153,27 +149,6 @@ "node": ">=4" } }, - "node_modules/@babel/generator": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", - "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", - "dependencies": { - "@babel/types": "^7.18.2", - "@jridgewell/gen-mapping": "^0.3.0", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-validator-identifier": { "version": "7.22.20", "license": "MIT", @@ -270,19 +245,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/types": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", - "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", - "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@codemirror/autocomplete": { "version": "6.11.1", "license": "MIT", @@ -377,12 +339,13 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.8.tgz", - "integrity": "sha512-31E2lxlGM1KEfivQl8Yf5aYU/mflz9g06H6S15ITUFQueMFtFjESRMoDSkvMo8thYvLBax+VKTPlpnx+sPicOA==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.9.tgz", + "integrity": "sha512-jkYjjq7SdsWuNI6b5quymW0oC83NN5FdRPuCbs9HZ02mfVdAP8B8eeqLSYU3gb6OJEaY5CQabtTFbqBf26H3GA==", "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "android" @@ -392,12 +355,13 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.8.tgz", - "integrity": "sha512-B8JbS61bEunhfx8kasogFENgQfr/dIp+ggYXwTqdbMAgGDhRa3AaPpQMuQU0rNxDLECj6FhDzk1cF9WHMVwrtA==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.9.tgz", + "integrity": "sha512-q4cR+6ZD0938R19MyEW3jEsMzbb/1rulLXiNAJQADD/XYp7pT+rOS5JGxvpRW8dFDEfjW4wLgC/3FXIw4zYglQ==", "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "android" @@ -407,12 +371,13 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.8.tgz", - "integrity": "sha512-rdqqYfRIn4jWOp+lzQttYMa2Xar3OK9Yt2fhOhzFXqg0rVWEfSclJvZq5fZslnz6ypHvVf3CT7qyf0A5pM682A==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.9.tgz", + "integrity": "sha512-KOqoPntWAH6ZxDwx1D6mRntIgZh9KodzgNOy5Ebt9ghzffOk9X2c1sPwtM9P+0eXbefnDhqYfkh5PLP5ULtWFA==", "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "android" @@ -422,12 +387,13 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.8.tgz", - "integrity": "sha512-RQw9DemMbIq35Bprbboyf8SmOr4UXsRVxJ97LgB55VKKeJOOdvsIPy0nFyF2l8U+h4PtBx/1kRf0BelOYCiQcw==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.9.tgz", + "integrity": "sha512-KBJ9S0AFyLVx2E5D8W0vExqRW01WqRtczUZ8NRu+Pi+87opZn5tL4Y0xT0mA4FtHctd0ZgwNoN639fUUGlNIWw==", "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -437,12 +403,13 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.8.tgz", - "integrity": "sha512-3sur80OT9YdeZwIVgERAysAbwncom7b4bCI2XKLjMfPymTud7e/oY4y+ci1XVp5TfQp/bppn7xLw1n/oSQY3/Q==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.9.tgz", + "integrity": "sha512-vE0VotmNTQaTdX0Q9dOHmMTao6ObjyPm58CHZr1UK7qpNleQyxlFlNCaHsHx6Uqv86VgPmR4o2wdNq3dP1qyDQ==", "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -452,12 +419,13 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.8.tgz", - "integrity": "sha512-WAnPJSDattvS/XtPCTj1tPoTxERjcTpH6HsMr6ujTT+X6rylVe8ggxk8pVxzf5U1wh5sPODpawNicF5ta/9Tmw==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.9.tgz", + "integrity": "sha512-uFQyd/o1IjiEk3rUHSwUKkqZwqdvuD8GevWF065eqgYfexcVkxh+IJgwTaGZVu59XczZGcN/YMh9uF1fWD8j1g==", "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "freebsd" @@ -467,12 +435,13 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.8.tgz", - "integrity": "sha512-ICvZyOplIjmmhjd6mxi+zxSdpPTKFfyPPQMQTK/w+8eNK6WV01AjIztJALDtwNNfFhfZLux0tZLC+U9nSyA5Zg==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.9.tgz", + "integrity": "sha512-WMLgWAtkdTbTu1AWacY7uoj/YtHthgqrqhf1OaEWnZb7PQgpt8eaA/F3LkV0E6K/Lc0cUr/uaVP/49iE4M4asA==", "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "freebsd" @@ -482,12 +451,13 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.8.tgz", - "integrity": "sha512-H4vmI5PYqSvosPaTJuEppU9oz1dq2A7Mr2vyg5TF9Ga+3+MGgBdGzcyBP7qK9MrwFQZlvNyJrvz6GuCaj3OukQ==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.9.tgz", + "integrity": "sha512-C/ChPohUYoyUaqn1h17m/6yt6OB14hbXvT8EgM1ZWaiiTYz7nWZR0SYmMnB5BzQA4GXl3BgBO1l8MYqL/He3qw==", "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "linux" @@ -497,12 +467,13 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.8.tgz", - "integrity": "sha512-z1zMZivxDLHWnyGOctT9JP70h0beY54xDDDJt4VpTX+iwA77IFsE1vCXWmprajJGa+ZYSqkSbRQ4eyLCpCmiCQ==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.9.tgz", + "integrity": "sha512-PiPblfe1BjK7WDAKR1Cr9O7VVPqVNpwFcPWgfn4xu0eMemzRp442hXyzF/fSwgrufI66FpHOEJk0yYdPInsmyQ==", "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -512,12 +483,13 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.8.tgz", - "integrity": "sha512-1a8suQiFJmZz1khm/rDglOc8lavtzEMRo0v6WhPgxkrjcU0LkHj+TwBrALwoz/OtMExvsqbbMI0ChyelKabSvQ==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.9.tgz", + "integrity": "sha512-f37i/0zE0MjDxijkPSQw1CO/7C27Eojqb+r3BbHVxMLkj8GCa78TrBZzvPyA/FNLUMzP3eyHCVkAopkKVja+6Q==", "cpu": [ "ia32" ], + "dev": true, "optional": true, "os": [ "linux" @@ -527,12 +499,13 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.8.tgz", - "integrity": "sha512-fHZWS2JJxnXt1uYJsDv9+b60WCc2RlvVAy1F76qOLtXRO+H4mjt3Tr6MJ5l7Q78X8KgCFudnTuiQRBhULUyBKQ==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.9.tgz", + "integrity": "sha512-t6mN147pUIf3t6wUt3FeumoOTPfmv9Cc6DQlsVBpB7eCpLOqQDyWBP1ymXn1lDw4fNUSb/gBcKAmvTP49oIkaA==", "cpu": [ "loong64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -542,12 +515,13 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.8.tgz", - "integrity": "sha512-Wy/z0EL5qZYLX66dVnEg9riiwls5IYnziwuju2oUiuxVc+/edvqXa04qNtbrs0Ukatg5HEzqT94Zs7J207dN5Q==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.9.tgz", + "integrity": "sha512-jg9fujJTNTQBuDXdmAg1eeJUL4Jds7BklOTkkH80ZgQIoCTdQrDaHYgbFZyeTq8zbY+axgptncko3v9p5hLZtw==", "cpu": [ "mips64el" ], + "dev": true, "optional": true, "os": [ "linux" @@ -557,12 +531,13 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.8.tgz", - "integrity": "sha512-ETaW6245wK23YIEufhMQ3HSeHO7NgsLx8gygBVldRHKhOlD1oNeNy/P67mIh1zPn2Hr2HLieQrt6tWrVwuqrxg==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.9.tgz", + "integrity": "sha512-tkV0xUX0pUUgY4ha7z5BbDS85uI7ABw3V1d0RNTii7E9lbmV8Z37Pup2tsLV46SQWzjOeyDi1Q7Wx2+QM8WaCQ==", "cpu": [ "ppc64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -572,12 +547,13 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.8.tgz", - "integrity": "sha512-T2DRQk55SgoleTP+DtPlMrxi/5r9AeFgkhkZ/B0ap99zmxtxdOixOMI570VjdRCs9pE4Wdkz7JYrsPvsl7eESg==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.9.tgz", + "integrity": "sha512-DfLp8dj91cufgPZDXr9p3FoR++m3ZJ6uIXsXrIvJdOjXVREtXuQCjfMfvmc3LScAVmLjcfloyVtpn43D56JFHg==", "cpu": [ "riscv64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -587,12 +563,13 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.8.tgz", - "integrity": "sha512-NPxbdmmo3Bk7mbNeHmcCd7R7fptJaczPYBaELk6NcXxy7HLNyWwCyDJ/Xx+/YcNH7Im5dHdx9gZ5xIwyliQCbg==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.9.tgz", + "integrity": "sha512-zHbglfEdC88KMgCWpOl/zc6dDYJvWGLiUtmPRsr1OgCViu3z5GncvNVdf+6/56O2Ca8jUU+t1BW261V6kp8qdw==", "cpu": [ "s390x" ], + "dev": true, "optional": true, "os": [ "linux" @@ -602,11 +579,13 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.8", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.9.tgz", + "integrity": "sha512-JUjpystGFFmNrEHQnIVG8hKwvA2DN5o7RqiO1CVX8EN/F/gkCjkUMgVn6hzScpwnJtl2mPR6I9XV1oW8k9O+0A==", "cpu": [ "x64" ], - "license": "MIT", + "dev": true, "optional": true, "os": [ "linux" @@ -616,12 +595,13 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.8.tgz", - "integrity": "sha512-hvWVo2VsXz/8NVt1UhLzxwAfo5sioj92uo0bCfLibB0xlOmimU/DeAEsQILlBQvkhrGjamP0/el5HU76HAitGw==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.9.tgz", + "integrity": "sha512-GThgZPAwOBOsheA2RUlW5UeroRfESwMq/guy8uEe3wJlAOjpOXuSevLRd70NZ37ZrpO6RHGHgEHvPg1h3S1Jug==", "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "netbsd" @@ -631,12 +611,13 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.8.tgz", - "integrity": "sha512-/7Y7u77rdvmGTxR83PgaSvSBJCC2L3Kb1M/+dmSIvRvQPXXCuC97QAwMugBNG0yGcbEGfFBH7ojPzAOxfGNkwQ==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.9.tgz", + "integrity": "sha512-Ki6PlzppaFVbLnD8PtlVQfsYw4S9n3eQl87cqgeIw+O3sRr9IghpfSKY62mggdt1yCSZ8QWvTZ9jo9fjDSg9uw==", "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "openbsd" @@ -646,12 +627,13 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.8.tgz", - "integrity": "sha512-9Lc4s7Oi98GqFA4HzA/W2JHIYfnXbUYgekUP/Sm4BG9sfLjyv6GKKHKKVs83SMicBF2JwAX6A1PuOLMqpD001w==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.9.tgz", + "integrity": "sha512-MLHj7k9hWh4y1ddkBpvRj2b9NCBhfgBt3VpWbHQnXRedVun/hC7sIyTGDGTfsGuXo4ebik2+3ShjcPbhtFwWDw==", "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "sunos" @@ -661,12 +643,13 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.8.tgz", - "integrity": "sha512-rq6WzBGjSzihI9deW3fC2Gqiak68+b7qo5/3kmB6Gvbh/NYPA0sJhrnp7wgV4bNwjqM+R2AApXGxMO7ZoGhIJg==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.9.tgz", + "integrity": "sha512-GQoa6OrQ8G08guMFgeXPH7yE/8Dt0IfOGWJSfSH4uafwdC7rWwrfE6P9N8AtPGIjUzdo2+7bN8Xo3qC578olhg==", "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -676,12 +659,13 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.8.tgz", - "integrity": "sha512-AIAbverbg5jMvJznYiGhrd3sumfwWs8572mIJL5NQjJa06P8KfCPWZQ0NwZbPQnbQi9OWSZhFVSUWjjIrn4hSw==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.9.tgz", + "integrity": "sha512-UOozV7Ntykvr5tSOlGCrqU3NBr3d8JqPes0QWN2WOXfvkWVGRajC+Ym0/Wj88fUgecUCLDdJPDF0Nna2UK3Qtg==", "cpu": [ "ia32" ], + "dev": true, "optional": true, "os": [ "win32" @@ -691,12 +675,13 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.8.tgz", - "integrity": "sha512-bfZ0cQ1uZs2PqpulNL5j/3w+GDhP36k1K5c38QdQg+Swy51jFZWWeIkteNsufkQxp986wnqRRsb/bHbY1WQ7TA==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.9.tgz", + "integrity": "sha512-oxoQgglOP7RH6iasDrhY+R/3cHrfwIDvRlT4CGChflq6twk8iENeVvMJjmvBb94Ik1Z+93iGO27err7w6l54GQ==", "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -1018,48 +1003,10 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "license": "MIT" }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, "node_modules/@kurkle/color": { "version": "0.3.2", "license": "MIT" @@ -1100,6 +1047,7 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", @@ -1111,6 +1059,7 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", + "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -1118,6 +1067,7 @@ }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", @@ -1190,243 +1140,6 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, - "node_modules/@tinyhttp/accepts": { - "version": "2.2.0", - "license": "MIT", - "dependencies": { - "mime": "4.0.0-beta.1", - "negotiator": "^0.6.3" - }, - "engines": { - "node": ">=12.20.0" - }, - "funding": { - "type": "individual", - "url": "https://github.com/tinyhttp/tinyhttp?sponsor=1" - } - }, - "node_modules/@tinyhttp/accepts/node_modules/mime": { - "version": "4.0.0-beta.1", - "funding": [ - "https://github.com/sponsors/broofa" - ], - "license": "MIT", - "bin": { - "mime": "bin/cli.js" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@tinyhttp/app": { - "version": "2.2.1", - "license": "MIT", - "dependencies": { - "@tinyhttp/cookie": "2.1.0", - "@tinyhttp/proxy-addr": "2.1.2", - "@tinyhttp/req": "2.2.0", - "@tinyhttp/res": "2.2.0", - "@tinyhttp/router": "2.2.1", - "header-range-parser": "1.1.3", - "regexparam": "^2.0.1" - }, - "engines": { - "node": ">=14.21.3" - }, - "funding": { - "type": "individual", - "url": "https://github.com/tinyhttp/tinyhttp?sponsor=1" - } - }, - "node_modules/@tinyhttp/content-disposition": { - "version": "2.2.0", - "license": "MIT", - "engines": { - "node": ">=12.20.0" - }, - "funding": { - "type": "individual", - "url": "https://github.com/tinyhttp/tinyhttp?sponsor=1" - } - }, - "node_modules/@tinyhttp/content-type": { - "version": "0.1.4", - "license": "MIT", - "engines": { - "node": ">=12.4" - } - }, - "node_modules/@tinyhttp/cookie": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=12.20.0" - }, - "funding": { - "type": "individual", - "url": "https://github.com/tinyhttp/tinyhttp?sponsor=1" - } - }, - "node_modules/@tinyhttp/cookie-signature": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/@tinyhttp/encode-url": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/@tinyhttp/etag": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/@tinyhttp/forwarded": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/@tinyhttp/proxy-addr": { - "version": "2.1.2", - "license": "MIT", - "dependencies": { - "@tinyhttp/forwarded": "2.1.1", - "ipaddr.js": "^2.1.0" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/@tinyhttp/proxy-addr/node_modules/ipaddr.js": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tinyhttp/req": { - "version": "2.2.0", - "license": "MIT", - "dependencies": { - "@tinyhttp/accepts": "2.2.0", - "@tinyhttp/type-is": "2.2.0", - "@tinyhttp/url": "2.1.0", - "header-range-parser": "^1.1.3" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/@tinyhttp/res": { - "version": "2.2.0", - "license": "MIT", - "dependencies": { - "@tinyhttp/content-disposition": "2.2.0", - "@tinyhttp/cookie": "2.1.0", - "@tinyhttp/cookie-signature": "2.1.0", - "@tinyhttp/encode-url": "2.1.0", - "@tinyhttp/req": "2.2.0", - "@tinyhttp/send": "2.2.0", - "@tinyhttp/vary": "^0.1.3", - "es-escape-html": "^0.1.1", - "mime": "4.0.0-beta.1" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/@tinyhttp/res/node_modules/mime": { - "version": "4.0.0-beta.1", - "funding": [ - "https://github.com/sponsors/broofa" - ], - "license": "MIT", - "bin": { - "mime": "bin/cli.js" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@tinyhttp/router": { - "version": "2.2.1", - "license": "MIT", - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/@tinyhttp/send": { - "version": "2.2.0", - "license": "MIT", - "dependencies": { - "@tinyhttp/content-type": "^0.1.3", - "@tinyhttp/etag": "2.1.0", - "mime": "4.0.0-beta.1" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/@tinyhttp/send/node_modules/mime": { - "version": "4.0.0-beta.1", - "funding": [ - "https://github.com/sponsors/broofa" - ], - "license": "MIT", - "bin": { - "mime": "bin/cli.js" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@tinyhttp/type-is": { - "version": "2.2.0", - "license": "MIT", - "dependencies": { - "@tinyhttp/content-type": "^0.1.3", - "mime": "4.0.0-beta.1" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/@tinyhttp/type-is/node_modules/mime": { - "version": "4.0.0-beta.1", - "funding": [ - "https://github.com/sponsors/broofa" - ], - "license": "MIT", - "bin": { - "mime": "bin/cli.js" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@tinyhttp/url": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/@tinyhttp/vary": { - "version": "0.1.3", - "license": "MIT", - "engines": { - "node": ">=12.20" - } - }, "node_modules/@types/bootstrap": { "version": "5.2.10", "dev": true, @@ -2144,6 +1857,7 @@ }, "node_modules/array-union": { "version": "2.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -2153,14 +1867,6 @@ "version": "0.4.0", "license": "MIT" }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/axios": { "version": "1.6.2", "license": "MIT", @@ -2174,33 +1880,6 @@ "version": "1.0.2", "license": "MIT" }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/better-sse": { - "version": "0.10.0", - "license": "MIT", - "engines": { - "node": ">=12", - "pnpm": ">=6" - } - }, "node_modules/binary-extensions": { "version": "2.2.0", "dev": true, @@ -2209,29 +1888,6 @@ "node": ">=8" } }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bl/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/bluebird": { "version": "3.7.2", "license": "MIT" @@ -2268,6 +1924,7 @@ }, "node_modules/braces": { "version": "3.0.2", + "dev": true, "license": "MIT", "dependencies": { "fill-range": "^7.0.1" @@ -2276,29 +1933,6 @@ "node": ">=8" } }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/call-me-maybe": { "version": "1.0.2", "dev": true, @@ -2405,11 +2039,6 @@ "node": ">= 6" } }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, "node_modules/clean-stack": { "version": "4.2.0", "dev": true, @@ -2532,11 +2161,6 @@ "version": "0.0.1", "license": "MIT" }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, "node_modules/crelt": { "version": "1.0.6", "license": "MIT" @@ -2631,6 +2255,7 @@ }, "node_modules/debug": { "version": "4.3.4", + "dev": true, "license": "MIT", "dependencies": { "ms": "2.1.2" @@ -2656,28 +2281,6 @@ "dev": true, "license": "MIT" }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/deep-is": { "version": "0.1.4", "dev": true, @@ -2729,14 +2332,6 @@ "node": ">=0.4.0" } }, - "node_modules/detect-libc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", - "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", - "engines": { - "node": ">=8" - } - }, "node_modules/didyoumean": { "version": "1.2.2", "dev": true, @@ -2748,6 +2343,7 @@ }, "node_modules/dir-glob": { "version": "3.0.1", + "dev": true, "license": "MIT", "dependencies": { "path-type": "^4.0.0" @@ -2785,14 +2381,6 @@ "version": "1.0.3", "license": "MIT" }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/entities": { "version": "4.5.0", "dev": true, @@ -2811,22 +2399,16 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/es-escape-html": { - "version": "0.1.1", - "license": "MIT", - "engines": { - "node": ">=12.x" - } - }, "node_modules/es6-promise": { "version": "3.3.1", "dev": true, "license": "MIT" }, "node_modules/esbuild": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.8.tgz", - "integrity": "sha512-l7iffQpT2OrZfH2rXIp7/FkmaeZM0vxbxN9KfiCwGYuZqzMg/JdvX26R31Zxn/Pxvsrg3Y9N6XTcnknqDyyv4w==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.9.tgz", + "integrity": "sha512-U9CHtKSy+EpPsEBa+/A2gMs/h3ylBC0H0KSqIg7tpztHerLi6nrrcoUJAkNCEPumx8yJ+Byic4BVwHgRbN0TBg==", + "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -2835,32 +2417,33 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.19.8", - "@esbuild/android-arm64": "0.19.8", - "@esbuild/android-x64": "0.19.8", - "@esbuild/darwin-arm64": "0.19.8", - "@esbuild/darwin-x64": "0.19.8", - "@esbuild/freebsd-arm64": "0.19.8", - "@esbuild/freebsd-x64": "0.19.8", - "@esbuild/linux-arm": "0.19.8", - "@esbuild/linux-arm64": "0.19.8", - "@esbuild/linux-ia32": "0.19.8", - "@esbuild/linux-loong64": "0.19.8", - "@esbuild/linux-mips64el": "0.19.8", - "@esbuild/linux-ppc64": "0.19.8", - "@esbuild/linux-riscv64": "0.19.8", - "@esbuild/linux-s390x": "0.19.8", - "@esbuild/linux-x64": "0.19.8", - "@esbuild/netbsd-x64": "0.19.8", - "@esbuild/openbsd-x64": "0.19.8", - "@esbuild/sunos-x64": "0.19.8", - "@esbuild/win32-arm64": "0.19.8", - "@esbuild/win32-ia32": "0.19.8", - "@esbuild/win32-x64": "0.19.8" + "@esbuild/android-arm": "0.19.9", + "@esbuild/android-arm64": "0.19.9", + "@esbuild/android-x64": "0.19.9", + "@esbuild/darwin-arm64": "0.19.9", + "@esbuild/darwin-x64": "0.19.9", + "@esbuild/freebsd-arm64": "0.19.9", + "@esbuild/freebsd-x64": "0.19.9", + "@esbuild/linux-arm": "0.19.9", + "@esbuild/linux-arm64": "0.19.9", + "@esbuild/linux-ia32": "0.19.9", + "@esbuild/linux-loong64": "0.19.9", + "@esbuild/linux-mips64el": "0.19.9", + "@esbuild/linux-ppc64": "0.19.9", + "@esbuild/linux-riscv64": "0.19.9", + "@esbuild/linux-s390x": "0.19.9", + "@esbuild/linux-x64": "0.19.9", + "@esbuild/netbsd-x64": "0.19.9", + "@esbuild/openbsd-x64": "0.19.9", + "@esbuild/sunos-x64": "0.19.9", + "@esbuild/win32-arm64": "0.19.9", + "@esbuild/win32-ia32": "0.19.9", + "@esbuild/win32-x64": "0.19.9" } }, "node_modules/escalade": { "version": "3.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -3054,14 +2637,6 @@ "url": "https://github.com/eta-dev/eta?sponsor=1" } }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "engines": { - "node": ">=6" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "dev": true, @@ -3069,6 +2644,7 @@ }, "node_modules/fast-glob": { "version": "3.3.2", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -3083,6 +2659,7 @@ }, "node_modules/fast-glob/node_modules/glob-parent": { "version": "5.1.2", + "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.1" @@ -3108,6 +2685,7 @@ }, "node_modules/fastq": { "version": "1.15.0", + "dev": true, "license": "ISC", "dependencies": { "reusify": "^1.0.4" @@ -3148,6 +2726,7 @@ }, "node_modules/fill-range": { "version": "7.0.1", + "dev": true, "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" @@ -3254,54 +2833,10 @@ "node": ">=12.20.0" } }, - "node_modules/from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/fs-extra/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "license": "ISC" }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "license": "ISC", @@ -3350,11 +2885,6 @@ "node_modules/gettext-extractor/node_modules/pofile": { "version": "1.0.11" }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" - }, "node_modules/glob": { "version": "10.3.10", "license": "ISC", @@ -3424,6 +2954,7 @@ "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -3443,12 +2974,14 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, "engines": { "node": ">=8" } }, "node_modules/graceful-fs": { "version": "4.2.11", + "dev": true, "license": "ISC" }, "node_modules/graphemer": { @@ -3463,14 +2996,6 @@ "node": ">=0.8.0" } }, - "node_modules/has": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-flag": { "version": "4.0.0", "license": "MIT", @@ -3478,17 +3003,6 @@ "node": ">=8" } }, - "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/he": { "version": "1.2.0", "dev": true, @@ -3497,13 +3011,6 @@ "he": "bin/he" } }, - "node_modules/header-range-parser": { - "version": "1.1.3", - "license": "MIT", - "engines": { - "node": ">=12.22.0" - } - }, "node_modules/hls.js": { "version": "1.4.12", "license": "Apache-2.0" @@ -3559,27 +3066,9 @@ "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/ignore": { "version": "5.3.0", + "dev": true, "license": "MIT", "engines": { "node": ">= 4" @@ -3635,26 +3124,6 @@ "version": "2.0.4", "license": "ISC" }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "node_modules/into-stream": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz", - "integrity": "sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==", - "dependencies": { - "from2": "^2.3.0", - "p-is-promise": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-arrayish": { "version": "0.2.1", "license": "MIT" @@ -3670,19 +3139,9 @@ "node": ">=8" } }, - "node_modules/is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-extglob": { "version": "2.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -3697,6 +3156,7 @@ }, "node_modules/is-glob": { "version": "4.0.3", + "dev": true, "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" @@ -3707,6 +3167,7 @@ }, "node_modules/is-number": { "version": "7.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.12.0" @@ -3739,11 +3200,6 @@ "dev": true, "license": "MIT" }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, "node_modules/isexe": { "version": "2.0.0", "license": "ISC" @@ -3837,17 +3293,6 @@ "node": ">=18" } }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/json-buffer": { "version": "3.0.1", "dev": true, @@ -3867,25 +3312,6 @@ "dev": true, "license": "MIT" }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsonfile/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/keyv": { "version": "4.5.4", "dev": true, @@ -3978,6 +3404,7 @@ }, "node_modules/merge2": { "version": "1.4.1", + "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -3985,6 +3412,7 @@ }, "node_modules/micromatch": { "version": "4.0.5", + "dev": true, "license": "MIT", "dependencies": { "braces": "^3.0.2", @@ -3994,13 +3422,6 @@ "node": ">=8.6" } }, - "node_modules/milliparsec": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=12.4" - } - }, "node_modules/mime-db": { "version": "1.52.0", "license": "MIT", @@ -4018,17 +3439,6 @@ "node": ">= 0.6" } }, - "node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/minimatch": { "version": "3.1.2", "license": "ISC", @@ -4053,13 +3463,9 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" - }, "node_modules/ms": { "version": "2.1.2", + "dev": true, "license": "MIT" }, "node_modules/muggle-string": { @@ -4067,70 +3473,11 @@ "dev": true, "license": "MIT" }, - "node_modules/multistream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/multistream/-/multistream-4.1.0.tgz", - "integrity": "sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "once": "^1.4.0", - "readable-stream": "^3.6.0" - } - }, - "node_modules/multistream/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" - }, "node_modules/natural-compare": { "version": "1.4.0", "dev": true, "license": "MIT" }, - "node_modules/negotiator": { - "version": "0.6.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/node-abi": { - "version": "3.52.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.52.0.tgz", - "integrity": "sha512-JJ98b02z16ILv7859irtXn4oUaFWADtvkzy2c0IAatNVX2Mc9Yoh8z6hZInn3QwvMEYhHuQloYi+TTQy67SIdQ==", - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/node-domexception": { "version": "1.0.0", "dev": true, @@ -4358,14 +3705,6 @@ "node": ">= 0.8.0" } }, - "node_modules/p-is-promise": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-3.0.0.tgz", - "integrity": "sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==", - "engines": { - "node": ">=8" - } - }, "node_modules/p-limit": { "version": "3.1.0", "dev": true, @@ -4478,11 +3817,6 @@ "node": ">=8" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, "node_modules/path-scurry": { "version": "1.10.1", "license": "BlueOak-1.0.0", @@ -4517,6 +3851,7 @@ }, "node_modules/picomatch": { "version": "2.3.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8.6" @@ -4525,171 +3860,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pkg": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/pkg/-/pkg-5.8.1.tgz", - "integrity": "sha512-CjBWtFStCfIiT4Bde9QpJy0KeH19jCfwZRJqHFDFXfhUklCx8JoFmMj3wgnEYIwGmZVNkhsStPHEOnrtrQhEXA==", - "dependencies": { - "@babel/generator": "7.18.2", - "@babel/parser": "7.18.4", - "@babel/types": "7.19.0", - "chalk": "^4.1.2", - "fs-extra": "^9.1.0", - "globby": "^11.1.0", - "into-stream": "^6.0.0", - "is-core-module": "2.9.0", - "minimist": "^1.2.6", - "multistream": "^4.1.0", - "pkg-fetch": "3.4.2", - "prebuild-install": "7.1.1", - "resolve": "^1.22.0", - "stream-meter": "^1.0.4" - }, - "bin": { - "pkg": "lib-es5/bin.js" - }, - "peerDependencies": { - "node-notifier": ">=9.0.1" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/pkg-fetch": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/pkg-fetch/-/pkg-fetch-3.4.2.tgz", - "integrity": "sha512-0+uijmzYcnhC0hStDjm/cl2VYdrmVVBpe7Q8k9YBojxmR5tG8mvR9/nooQq3QSXiQqORDVOTY3XqMEqJVIzkHA==", - "dependencies": { - "chalk": "^4.1.2", - "fs-extra": "^9.1.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.6", - "progress": "^2.0.3", - "semver": "^7.3.5", - "tar-fs": "^2.1.1", - "yargs": "^16.2.0" - }, - "bin": { - "pkg-fetch": "lib-es5/bin.js" - } - }, - "node_modules/pkg-fetch/node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/pkg-fetch/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/pkg-fetch/node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-fetch/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/pkg-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/pkg-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/pkg-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/pkg-fetch/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/pkg-fetch/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/pkg-fetch/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "engines": { - "node": ">=10" - } - }, - "node_modules/pkg/node_modules/@babel/parser": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", - "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/pngjs": { "version": "5.0.0", "license": "MIT", @@ -4763,31 +3933,6 @@ "url": "https://opencollective.com/preact" } }, - "node_modules/prebuild-install": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", - "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "dev": true, @@ -4810,19 +3955,6 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/proxy-from-env": { "version": "1.1.0", "license": "MIT" @@ -4832,15 +3964,6 @@ "dev": true, "license": "MIT" }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "node_modules/punycode": { "version": "2.3.1", "dev": true, @@ -4872,6 +3995,7 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", + "dev": true, "funding": [ { "type": "github", @@ -4888,42 +4012,6 @@ ], "license": "MIT" }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, "node_modules/readdirp": { "version": "3.6.0", "dev": true, @@ -4947,13 +4035,6 @@ "version": "0.14.0", "license": "MIT" }, - "node_modules/regexparam": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/require-directory": { "version": "2.1.1", "license": "MIT", @@ -4970,22 +4051,6 @@ "dev": true, "license": "MIT" }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/resolve-from": { "version": "4.0.0", "license": "MIT", @@ -4993,19 +4058,9 @@ "node": ">=4" } }, - "node_modules/resolve/node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "dependencies": { - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/reusify": { "version": "1.0.4", + "dev": true, "license": "MIT", "engines": { "iojs": ">=1.0.0", @@ -5083,6 +4138,7 @@ }, "node_modules/run-parallel": { "version": "1.2.0", + "dev": true, "funding": [ { "type": "github", @@ -5102,11 +4158,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, "node_modules/safer-buffer": { "version": "2.1.2", "dev": true, @@ -5141,6 +4192,7 @@ }, "node_modules/semver": { "version": "7.5.4", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -5154,6 +4206,7 @@ }, "node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -5241,49 +4294,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, "node_modules/skin-tone": { "version": "2.0.0", "dev": true, @@ -5317,22 +4327,6 @@ "node": ">=0.10.0" } }, - "node_modules/stream-meter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/stream-meter/-/stream-meter-1.0.4.tgz", - "integrity": "sha512-4sOEtrbgFotXwnEuzzsQBYEV1elAeFSO8rSGeTwabuX1RRn/kEq9JVH7I0MRBhKVRR0sJkr0M0QCH7yOLf9fhQ==", - "dependencies": { - "readable-stream": "^2.1.4" - } - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -5381,17 +4375,6 @@ "node": ">=8" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/svg.js": { "version": "2.7.1", "dev": true, @@ -5596,60 +4579,14 @@ "dev": true, "license": "MIT" }, - "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tar-stream/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/text-table": { "version": "0.2.0", "dev": true, "license": "MIT" }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", + "dev": true, "license": "MIT", "dependencies": { "is-number": "^7.0.0" @@ -5698,17 +4635,6 @@ "version": "2.6.2", "license": "0BSD" }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, "node_modules/type-check": { "version": "0.4.0", "dev": true, @@ -5789,6 +4715,7 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", + "dev": true, "license": "MIT" }, "node_modules/vite": { @@ -6177,6 +5104,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -6232,6 +5160,7 @@ }, "node_modules/yallist": { "version": "4.0.0", + "dev": true, "license": "ISC" }, "node_modules/yaml": { diff --git a/frontend/package.json b/frontend/package.json index 0058b54e1..ca094ab4e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -6,8 +6,7 @@ "build": "vite build", "serve": "vite", "generate-locales": "vue-gettext-extract", - "generate-api": "swagger-typescript-api --path http://localhost/api/openapi.yml --output ./src/entities --name ApiInterfaces.ts --no-client", - "build-hpnp": "esbuild --bundle --target=node18 --platform=node ./src/hpnp/index.ts > ./hpnp.cjs && pkg --target=node18-linux --output ./hpnp ./hpnp.cjs" + "generate-api": "swagger-typescript-api --path http://localhost/api/openapi.yml --output ./src/entities --name ApiInterfaces.ts --no-client" }, "dependencies": { "@codemirror/lang-css": "^6.0.1", @@ -20,28 +19,23 @@ "@fullcalendar/timegrid": "^6", "@fullcalendar/vue3": "^6", "@popperjs/core": "^2.11.8", - "@tinyhttp/app": "^2.2.1", "@vuelidate/core": "^2.0.0", "@vuelidate/validators": "^2.0.0", "@vuepic/vue-datepicker": "^7", "@vueuse/core": "^10", "axios": "^1", - "better-sse": "^0.10.0", "bootstrap": "^5.3.0", "chart.js": "^4.2.1", "chartjs-adapter-luxon": "^1.1.0", "chartjs-plugin-zoom": "^2.0.0", "codemirror": "^6", "codemirror-lang-liquidsoap": "^0.2.5", - "esbuild": "^0.19.8", "hls.js": "^1.1.5", "leaflet": "^1.7.1", "leaflet-fullscreen": "^1.0.2", "lodash": "^4.17.21", "luxon": "^3", - "milliparsec": "^2.3.0", "nprogress": "^0.2.0", - "pkg": "^5.8.1", "qrcode": "^1.5.3", "roboto-fontface": "^0.10.0", "sweetalert2": "11.4.8", @@ -67,6 +61,7 @@ "@vitejs/plugin-vue": "^4.2.3", "@vue/eslint-config-typescript": "^12", "del": "^7", + "esbuild": "^0.19.9", "eslint": "^8.45.0", "eslint-plugin-vue": "^9.8.0", "glob": "^10.2.7", diff --git a/frontend/src/functions/useNowPlaying.ts b/frontend/src/functions/useNowPlaying.ts index 437e815e8..1b6b1f1b0 100644 --- a/frontend/src/functions/useNowPlaying.ts +++ b/frontend/src/functions/useNowPlaying.ts @@ -5,6 +5,7 @@ import {ApiNowPlaying} from "~/entities/ApiInterfaces.ts"; import {getApiUrl} from "~/router.ts"; import {useAxios} from "~/vendor/axios.ts"; import formatTime from "~/functions/formatTime.ts"; +import {has} from "lodash"; export const nowPlayingProps = { stationShortName: { @@ -40,7 +41,6 @@ interface SSEResponse { export default function useNowPlaying(props) { const np: ShallowRef = shallowRef(NowPlaying); - const npUpdated: Ref = ref(0); const currentTime: Ref = ref(Math.floor(Date.now() / 1000)); const currentTrackDuration: Ref = ref(0); @@ -48,7 +48,6 @@ export default function useNowPlaying(props) { const setNowPlaying = (np_new: ApiNowPlaying) => { np.value = np_new; - npUpdated.value = currentTime.value; currentTrackDuration.value = np_new.now_playing.duration ?? 0; @@ -68,41 +67,59 @@ export default function useNowPlaying(props) { })); } - if (props.useSse) { - const sseUri = getApiUrl(`/live/nowplaying/${props.stationShortName}`); + const nowPlayingUri = props.useStatic + ? getApiUrl(`/nowplaying_static/${props.stationShortName}.json`) + : getApiUrl(`/nowplaying/${props.stationShortName}`); - const {data} = useEventSource(sseUri.value); + const timeUri = getApiUrl('/time'); + const {axiosSilent} = useAxios(); + + const axiosNoCacheConfig = { + headers: { + 'Cache-Control': 'no-cache', + 'Pragma': 'no-cache', + 'Expires': '0', + } + }; + + if (props.useSse) { + const sseBaseUri = getApiUrl('/live/nowplaying/sse'); + const sseUriParams = new URLSearchParams({ + "cf_connect": JSON.stringify({ + "subs": { + [`station:${props.stationShortName}`]: {}, + "global:time": {}, + } + }), + }); + const sseUri = sseBaseUri.value + '?' + sseUriParams.toString(); + + // Make an initial AJAX request before SSE takes over. + axiosSilent.get(nowPlayingUri.value, axiosNoCacheConfig).then((response) => { + setNowPlaying(response.data); + }); + + axiosSilent.get(timeUri.value, axiosNoCacheConfig).then((response) => { + currentTime.value = response.data.timestamp; + }); + + // Subsequent events come from SSE. + const {data} = useEventSource(sseUri); watch(data, (dataRaw: string) => { const jsonData: SSEResponse = JSON.parse(dataRaw); + const jsonDataNp = jsonData?.pub?.data ?? {}; - if (jsonData.type === 'time') { - currentTime.value = jsonData.payload.timestamp; - } else if (jsonData.type === 'nowplaying') { - if (npUpdated.value === 0) { - setNowPlaying(jsonData.payload.np); - } else { - setTimeout(() => { - setNowPlaying(jsonData.payload.np); - }, 3000); - } + if (has(jsonDataNp, 'np')) { + setTimeout(() => { + setNowPlaying(jsonDataNp.np); + }, 3000); + } else if (has(jsonDataNp, 'time')) { + currentTime.value = jsonDataNp.time; } }); } else { - const nowPlayingUri = props.useStatic - ? getApiUrl(`/nowplaying_static/${props.stationShortName}`) - : getApiUrl(`/nowplaying/${props.stationShortName}`); - - const timeUri = getApiUrl('/time'); - - const {axios} = useAxios(); const checkNowPlaying = () => { - axios.get(nowPlayingUri.value, { - headers: { - 'Cache-Control': 'no-cache', - 'Pragma': 'no-cache', - 'Expires': '0', - } - }).then((response) => { + axiosSilent.get(nowPlayingUri.value, axiosNoCacheConfig).then((response) => { setNowPlaying(response.data); setTimeout(checkNowPlaying, (!document.hidden) ? 15000 : 30000); @@ -112,13 +129,7 @@ export default function useNowPlaying(props) { }; const checkTime = () => { - axios.get(timeUri.value, { - headers: { - 'Cache-Control': 'no-cache', - 'Pragma': 'no-cache', - 'Expires': '0', - } - }).then((response) => { + axiosSilent.get(timeUri.value, axiosNoCacheConfig).then((response) => { currentTime.value = response.data.timestamp; }).finally(() => { setTimeout(checkTime, (!document.hidden) ? 300000 : 600000); diff --git a/frontend/src/hpnp/index.ts b/frontend/src/hpnp/index.ts deleted file mode 100644 index c3a167eed..000000000 --- a/frontend/src/hpnp/index.ts +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env node - -import {ApiNowPlaying} from "~/entities/ApiInterfaces.ts"; -import {Channel, createChannel, createSession, Session} from "better-sse"; -import {App} from '@tinyhttp/app'; -import {json} from "milliparsec"; - -const publicPort: number = 6050; -const internalPort: number = 6055; - -interface NowPlayingSubmission { - station: string, - np: ApiNowPlaying, - triggers: string[] | null -} - -interface StationChannelState extends Record { - timestamp: number, - lastMessage: NowPlayingSubmission -} - -const unixTimestamp = (): number => Math.floor(Date.now() / 1000); - -const timeChannel = createChannel(); -timeChannel.on("session-registered", (session: Session) => { - session.push({ - type: 'time', - payload: { - timestamp: unixTimestamp() - } - }); -}); - -const stationChannels: Map> = new Map(); - -// Routine time ping. -setInterval(() => { - console.debug('Sending time ping...'); - timeChannel.broadcast({ - type: 'time', - payload: { - timestamp: unixTimestamp() - } - }); -}, 15000); - -// If a station hasn't posted NP updates in a specified time, close its channel and garbage-collect its sessions. -setInterval(() => { - const threshold = unixTimestamp() - 120; - - for (const [key, channel] of stationChannels) { - if (channel.state.timestamp < threshold) { - channel.activeSessions.forEach((session) => { - channel.deregister(session); - }); - stationChannels.delete(key); - } - } -}, 60000); - -const publicServer = new App(); - -publicServer.get('/:station', async (req, res) => { - res.set("Access-Control-Allow-Origin", "*"); - res.set("X-Accel-Buffering", "no"); - - const stations: string[] = req.params.station.split(','); - - let anyStationsFound: boolean = false; - for (const stationId of stations) { - if (stationChannels.has(stationId)) { - anyStationsFound = true; - break; - } - } - - if (!anyStationsFound) { - return res.status(404).send('Station(s) Not Found'); - } - - const session = await createSession(req, res, { - retry: 5000, - keepAlive: null, - }); - - timeChannel.register(session); - - for (const stationId of stations) { - const stationChannel = stationChannels.get(stationId); - stationChannel!.register(session); - } -}); - -publicServer.listen(publicPort, () => { - console.debug(`Public server listening on port ${publicPort}...`); -}); - -const privateServer = new App(); - -privateServer.use(json()); - -privateServer.post('/', async (req, res) => { - const body: NowPlayingSubmission = req.body; - - console.debug( - `NP Update received for channel ${body.station}.` - ); - - let channel: Channel; - if (stationChannels.has(body.station)) { - channel = stationChannels.get(body.station)!; - } else { - // Create a new channel if none exists. - channel = createChannel(); - channel.on("session-registered", (session: Session) => { - session.push({ - type: 'nowplaying', - payload: channel.state.lastMessage - }); - }); - stationChannels.set(body.station, channel); - } - - channel.state.timestamp = unixTimestamp(); - channel.state.lastMessage = body; - channel.broadcast({ - type: 'nowplaying', - payload: body - }); - - return res.send('OK'); -}); - -privateServer.listen(internalPort, () => { - console.debug(`Internal server listening on port ${internalPort}...`); -}); diff --git a/src/Service/Centrifugo.php b/src/Service/Centrifugo.php new file mode 100644 index 000000000..645d0f724 --- /dev/null +++ b/src/Service/Centrifugo.php @@ -0,0 +1,68 @@ +environment->isDocker() && !$this->environment->isTesting(); + } + + public function sendTime(): void + { + $this->send([ + 'method' => 'publish', + 'params' => [ + 'channel' => self::GLOBAL_TIME_CHANNEL, + 'data' => [ + 'time' => time(), + ], + ], + ]); + } + + public function publishToStation(Station $station, mixed $message, array $triggers): void + { + $this->send([ + 'method' => 'publish', + 'params' => [ + 'channel' => $this->getChannelName($station), + 'data' => [ + 'np' => $message, + 'triggers' => $triggers, + ], + ], + ]); + } + + private function send(array $body): void + { + $this->client->post( + 'http://localhost:6025/api', + [ + 'json' => $body, + ] + ); + } + + public function getChannelName(Station $station): string + { + return 'station:' . $station->getShortName(); + } +} diff --git a/src/Service/HpNp.php b/src/Service/HpNp.php deleted file mode 100644 index d76124cb7..000000000 --- a/src/Service/HpNp.php +++ /dev/null @@ -1,41 +0,0 @@ -environment->isDocker() && !$this->environment->isTesting(); - } - - public function publishToStation(Station $station, mixed $message, array $triggers = []): void - { - $this->client->post( - 'http://localhost:6055', - [ - 'json' => [ - 'station' => $station->getShortName(), - 'np' => $message, - 'triggers' => $triggers, - ], - ] - ); - } -} diff --git a/src/Service/ServiceControl.php b/src/Service/ServiceControl.php index 56139a1b1..ee1ab3579 100644 --- a/src/Service/ServiceControl.php +++ b/src/Service/ServiceControl.php @@ -20,7 +20,7 @@ final class ServiceControl public function __construct( private readonly SupervisorInterface $supervisor, - private readonly HpNp $hpNp + private readonly Centrifugo $centrifugo ) { } @@ -85,12 +85,12 @@ final class ServiceControl 'php-worker' => __('PHP queue processing worker'), 'redis' => __('Cache'), 'sftpgo' => __('SFTP service'), - 'hpnp' => __('High-Performance Now Playing updates'), + 'centrifugo' => __('Live Now Playing updates'), 'vite' => __('Frontend Assets'), ]; - if (!$this->hpNp->isSupported()) { - unset($services['hpnp']); + if (!$this->centrifugo->isSupported()) { + unset($services['centrifugo']); } if (!$this->environment->useLocalDatabase()) { diff --git a/src/Sync/Task/SendTimeOnSocketTask.php b/src/Sync/Task/SendTimeOnSocketTask.php new file mode 100644 index 000000000..f8e07e936 --- /dev/null +++ b/src/Sync/Task/SendTimeOnSocketTask.php @@ -0,0 +1,29 @@ +centrifugo->isSupported()) { + return; + } + + $this->centrifugo->sendTime(); + } +} diff --git a/src/VueComponent/NowPlayingComponent.php b/src/VueComponent/NowPlayingComponent.php index 8a561b60e..2a431647e 100644 --- a/src/VueComponent/NowPlayingComponent.php +++ b/src/VueComponent/NowPlayingComponent.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace App\VueComponent; use App\Http\ServerRequest; -use App\Service\HpNp; +use App\Service\Centrifugo; final class NowPlayingComponent implements VueComponentInterface { public function __construct( - private readonly HpNp $hpNp + private readonly Centrifugo $centrifugo ) { } @@ -38,7 +38,7 @@ final class NowPlayingComponent implements VueComponentInterface return [ 'stationShortName' => $station->getShortName(), 'useStatic' => $customization->useStaticNowPlaying(), - 'useSse' => $customization->useStaticNowPlaying() && $this->hpNp->isSupported(), + 'useSse' => $customization->useStaticNowPlaying() && $this->centrifugo->isSupported(), ]; } } diff --git a/src/Webhook/LocalWebhookHandler.php b/src/Webhook/LocalWebhookHandler.php index 8d2cdddd4..2ba9e3014 100644 --- a/src/Webhook/LocalWebhookHandler.php +++ b/src/Webhook/LocalWebhookHandler.php @@ -8,7 +8,7 @@ use App\Container\EnvironmentAwareTrait; use App\Container\LoggerAwareTrait; use App\Entity\Api\NowPlaying\NowPlaying; use App\Entity\Station; -use App\Service\HpNp; +use App\Service\Centrifugo; use Symfony\Component\Filesystem\Filesystem; use const JSON_PRETTY_PRINT; @@ -21,7 +21,7 @@ final class LocalWebhookHandler public const NAME = 'local'; public function __construct( - private readonly HpNp $hpNp + private readonly Centrifugo $centrifugo ) { } @@ -69,8 +69,8 @@ final class LocalWebhookHandler ); // Publish to websocket library - if ($this->hpNp->isSupported()) { - $this->hpNp->publishToStation($station, $np, $triggers); + if ($this->centrifugo->isSupported()) { + $this->centrifugo->publishToStation($station, $np, $triggers); } } } diff --git a/util/docker/dev/service.full/hpnp.conf b/util/docker/dev/service.full/hpnp.conf deleted file mode 100644 index 55107ee5f..000000000 --- a/util/docker/dev/service.full/hpnp.conf +++ /dev/null @@ -1,19 +0,0 @@ -[program:hpnp] -directory=/var/azuracast/www/frontend -command=bun --hot ./src/hpnp/index.ts -user=azuracast -priority=700 -numprocs=1 -autostart=true -autorestart=true - -stopasgroup=true -killasgroup=true - -stdout_logfile=/var/azuracast/www_tmp/service_hpnp.log -stdout_logfile_maxbytes=5MB -stdout_logfile_backups=5 -redirect_stderr=true - -stdout_events_enabled = true -stderr_events_enabled = true diff --git a/util/docker/dev/setup/bun.sh b/util/docker/dev/setup/bun.sh deleted file mode 100644 index 1e79e82c2..000000000 --- a/util/docker/dev/setup/bun.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -set -e -set -x - -curl -fsSL https://bun.sh/install | gosu azuracast bash - -ln -s /var/azuracast/.bun/bin/bun /usr/local/bin/bun -ln -s /var/azuracast/.bun/bin/bunx /usr/local/bin/bunx diff --git a/util/docker/web/centrifugo/config.yaml.tmpl b/util/docker/web/centrifugo/config.yaml.tmpl new file mode 100644 index 000000000..3eea0aab0 --- /dev/null +++ b/util/docker/web/centrifugo/config.yaml.tmpl @@ -0,0 +1,34 @@ +allow_anonymous_connect_without_token: true +api_insecure: true +admin: true +admin_insecure: true +port: 6020 +internal_port: 6025 +websocket_disable: true +uni_websocket: true +uni_sse: true +uni_http_stream: true +allowed_origins: + - "*" + +namespaces: + - name: "station" + history_size: 1 + history_ttl: "30s" + allow_subscribe_for_client: true + allow_subscribe_for_anonymous: true + allow_history_for_client: true + allow_history_for_anonymous: true + + - name: "global" + history_size: 0 + allow_subscribe_for_client: true + allow_subscribe_for_anonymous: true + allow_history_for_client: true + allow_history_for_anonymous: true + +{{if isTrue .Env.ENABLE_REDIS }} +engine: "redis" +redis_address: "{{ .Env.REDIS_HOST }}:{{ default .Env.REDIS_PORT "6379" }}" +redis_db: 0 +{{end}} diff --git a/util/docker/web/nginx/azuracast.conf.tmpl b/util/docker/web/nginx/azuracast.conf.tmpl index df4ac407c..73fc98620 100644 --- a/util/docker/web/nginx/azuracast.conf.tmpl +++ b/util/docker/web/nginx/azuracast.conf.tmpl @@ -6,8 +6,8 @@ upstream php-fpm-www { server unix:/var/run/php-fpm-www.sock; } -upstream hpnp { - server 127.0.0.1:6050; +upstream centrifugo { + server 127.0.0.1:6020; } {{if eq .Env.APPLICATION_ENV "development"}} @@ -95,10 +95,10 @@ server { try_files $uri =404; } - # SSE Now Playing Updates - location ~ ^/api/live/nowplaying/(.*)$ { + # Websocket/SSE Now Playing Updates + location ~ ^/api/live/nowplaying/(\w+)$ { include proxy_params; - proxy_pass http://hpnp/$1?$args; + proxy_pass http://centrifugo/connection/uni_$1?$args; } # Default clean URL routing diff --git a/util/docker/web/service.full/hpnp.conf b/util/docker/web/service.full/centrifugo.conf similarity index 57% rename from util/docker/web/service.full/hpnp.conf rename to util/docker/web/service.full/centrifugo.conf index 455fdbb88..7880ce3e7 100644 --- a/util/docker/web/service.full/hpnp.conf +++ b/util/docker/web/service.full/centrifugo.conf @@ -1,6 +1,6 @@ -[program:hpnp] -directory=/var/azuracast -command=hpnp +[program:centrifugo] +directory=/var/azuracast/centrifugo +command=centrifugo -c /var/azuracast/centrifugo/config.yaml user=azuracast priority=700 numprocs=1 @@ -10,7 +10,7 @@ autorestart=true stopasgroup=true killasgroup=true -stdout_logfile=/var/azuracast/www_tmp/service_hpnp.log +stdout_logfile=/var/azuracast/www_tmp/service_centrifugo.log stdout_logfile_maxbytes=5MB stdout_logfile_backups=5 redirect_stderr=true diff --git a/util/docker/web/setup/centrifugo.sh b/util/docker/web/setup/centrifugo.sh new file mode 100644 index 000000000..3e96d9b8e --- /dev/null +++ b/util/docker/web/setup/centrifugo.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +set -x + +mkdir -p /var/azuracast/centrifugo +cp /bd_build/web/centrifugo/config.yaml.tmpl /var/azuracast/centrifugo/config.yaml.tmpl diff --git a/util/docker/web/startup_scripts/05_centrifugo_conf.sh b/util/docker/web/startup_scripts/05_centrifugo_conf.sh new file mode 100644 index 000000000..0bea72941 --- /dev/null +++ b/util/docker/web/startup_scripts/05_centrifugo_conf.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +ENABLE_REDIS=${ENABLE_REDIS:-true} +export ENABLE_REDIS + +dockerize -template "/var/azuracast/centrifugo/config.yaml.tmpl:/var/azuracast/centrifugo/config.yaml"