From 881b9c83e6e1bf99e024fea8e6f899bc9306b488 Mon Sep 17 00:00:00 2001 From: Virgil Clyne Date: Mon, 4 Nov 2024 14:08:44 +0800 Subject: [PATCH] refactor: js Update arguments-builder.config.ts Update CHANGELOG.md --- .gitmodules | 3 + CHANGELOG.md | 5 +- arguments-builder.config.ts | 16 +- package-lock.json | 2033 ++++++++++++++++++++++++++++++---- package.json | 8 +- src/function/database.mjs | 6 - src/protobuf | 1 + src/request.dev.js | 343 +++--- src/request.js | 343 +++--- src/response.dev.js | 707 +++++------- src/types.d.ts | 8 - template/boxjs.settings.json | 2 +- template/egern.handlebars | 51 - 13 files changed, 2450 insertions(+), 1076 deletions(-) create mode 100644 .gitmodules create mode 160000 src/protobuf delete mode 100644 template/egern.handlebars diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..4f00f40 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/protobuf"] + path = src/protobuf + url = https://github.com/BiliUniverse/protobuf.git diff --git a/CHANGELOG.md b/CHANGELOG.md index c82c807..6bb331f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,2 @@ -### 🔄 Other Changes - * 打包器由 `rollup` 更改为 `rspack` - * util 由 `submodule` 更改为 `package` +### 🛠️ Bug Fixes + * 修复 MCDN 视频重定向后无法缓存的问题 diff --git a/arguments-builder.config.ts b/arguments-builder.config.ts index 68188d3..bb418c8 100644 --- a/arguments-builder.config.ts +++ b/arguments-builder.config.ts @@ -4,6 +4,10 @@ export default defineConfig({ output: { surge: { path: "./dist/BiliBili.Redirect.sgmodule", + transformEgern: { + enable: true, + path: "./dist/BiliBili.Redirect.yaml", + }, }, loon: { path: "./dist/BiliBili.Redirect.plugin", @@ -13,10 +17,6 @@ export default defineConfig({ path: "./dist/BiliBili.Redirect.stoverride", template: "./template/stash.handlebars", }, - { - path: "./dist/BiliBili.Redirect.yaml", - template: "./template/egern.handlebars", - }, ], dts: { isExported: true, @@ -28,14 +28,6 @@ export default defineConfig({ }, }, args: [ - { - key: "Switch", - name: "总功能开关", - defaultValue: true, - type: "boolean", - description: "是否启用此APP修改", - exclude: ["surge", "loon"], - }, { key: "Host.Akamaized", name: "[主机名] 重定向 Akamaized CDN (港澳台)", diff --git a/package-lock.json b/package-lock.json index 5d61b00..c0561eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,22 +1,47 @@ { "name": "@biliuniverse/redirect", - "version": "0.2.4", + "version": "0.2.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@biliuniverse/redirect", - "version": "0.2.4", + "version": "0.2.5", "license": "Apache-2.0", "devDependencies": { - "@iringo/arguments-builder": "^1.7.8", - "@nsnanocat/util": "^1.3.2", - "@protobuf-ts/runtime": "^2.9.3", + "@iringo/arguments-builder": "^1.8.1", + "@nsnanocat/util": "^1.3.6", + "@protobuf-ts/runtime": "^2.9.4", "@rspack/cli": "^1.0.14", "@rspack/core": "^1.0.14", "node-polyfill-webpack-plugin": "^4.0.0" } }, + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -28,11 +53,12 @@ } }, "node_modules/@iringo/arguments-builder": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/@iringo/arguments-builder/-/arguments-builder-1.7.8.tgz", - "integrity": "sha512-KpekH1CLXZFF/OZ7u965Se4RTkNHdhbn2BaT5Wr90atwGtO6UkhxWFOutNv++Pemm9oyNql+Ridu1i8P3+e/OA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@iringo/arguments-builder/-/arguments-builder-1.8.1.tgz", + "integrity": "sha512-QEISc/nO4kFm8SgH66o0JzWGX9qWtVoWWjiOOh1PGwzdoMLIL7h37gL9z27aULknhUQHn1UDovdDGNu2fYgWEw==", "dev": true, "dependencies": { + "@iringo/surge2egern": "^1.0.1", "@iringo/utils": "^1.0.1", "commander": "^12.1.0", "date-fns": "^4.1.0", @@ -45,14 +71,15 @@ "arguments-builder": "dist/lib/bin.js" } }, - "node_modules/@iringo/arguments-builder/node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "node_modules/@iringo/surge2egern": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@iringo/surge2egern/-/surge2egern-1.0.1.tgz", + "integrity": "sha512-ekNft/xm4SW4zZ8+AijYUoanxKUcM70lLk3mbDgI9yFJL7zhsagRjCHhbciEzX2aOEW7v7tywA/opWeS7u9Wbw==", "dev": true, "license": "MIT", - "engines": { - "node": ">=18" + "dependencies": { + "ora": "^5.4.1", + "puppeteer": "^23.6.1" } }, "node_modules/@iringo/utils": { @@ -68,16 +95,6 @@ "rslog": "^1.2.3" } }, - "node_modules/@iringo/utils/node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -109,44 +126,6 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -163,29 +142,12 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "@jridgewell/set-array": "^1.2.1", @@ -201,6 +163,7 @@ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=6.0.0" @@ -211,6 +174,7 @@ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=6.0.0" @@ -221,6 +185,7 @@ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", @@ -228,10 +193,11 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/@jridgewell/trace-mapping": { @@ -239,6 +205,7 @@ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -387,9 +354,9 @@ } }, "node_modules/@nsnanocat/util": { - "version": "1.3.2", - "resolved": "https://npm.pkg.github.com/download/@nsnanocat/util/1.3.2/57b2c8a122e1ae3c749ade9cd2b6f9810f621a2c", - "integrity": "sha512-QV1nm0FJNH5BP8jja3rzrmbq7hB3mt4OOkzEsDnHrXCeOu2lTqxTeVZdL09jAfA8YvxTfHa5lb15n8YaqxqLtw==", + "version": "1.3.6", + "resolved": "https://npm.pkg.github.com/download/@nsnanocat/util/1.3.6/4ca67fe38ccdf9eed2b80685e50dc0e2358eebb4", + "integrity": "sha512-q1guCF8OfBZSgcfSVsd6m0REWI2EN9nNeToJpV48vhrIQgERGXlIBo4vIoXAYuy1Eo4BQ0FAex6m72YE1AJexg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -418,7 +385,97 @@ "version": "2.9.4", "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.9.4.tgz", "integrity": "sha512-vHRFWtJJB/SiogWDF0ypoKfRIZ41Kq+G9cEFj6Qm1eQaAhJ1LDFvgZ7Ja4tb3iLOQhz0PaoPnnOijF1qmEqTxg==", - "dev": true + "dev": true, + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "node_modules/@puppeteer/browsers": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.4.0.tgz", + "integrity": "sha512-x8J1csfIygOwf6D6qUAZ0ASk3z63zPb7wkNeHRerCMh82qWKUrOgkuP005AJC8lDL6/evtXETGEJVcwykKT4/g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.3.6", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.4.0", + "semver": "^7.6.3", + "tar-fs": "^3.0.6", + "unbzip2-stream": "^1.4.3", + "yargs": "^17.7.2" + }, + "bin": { + "browsers": "lib/cjs/main-cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@puppeteer/browsers/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@puppeteer/browsers/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@puppeteer/browsers/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@puppeteer/browsers/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@puppeteer/browsers/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } }, "node_modules/@rspack/binding": { "version": "1.0.14", @@ -643,6 +700,13 @@ "node": ">=16.0.0" } }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "dev": true, + "license": "MIT" + }, "node_modules/@ts-morph/common": { "version": "0.24.0", "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.24.0.tgz", @@ -656,22 +720,6 @@ "path-browserify": "^1.0.1" } }, - "node_modules/@ts-morph/common/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@types/body-parser": { "version": "1.19.5", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", @@ -714,6 +762,38 @@ "@types/node": "*" } }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/@types/express": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", @@ -785,9 +865,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.8.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.6.tgz", - "integrity": "sha512-tosuJYKrIqjQIlVCM4PEGxOmyg3FCPa/fViuJChnGeEIhjA46oy8FMVoF9su1/v8PNs2a8Q0iFNyOx0uOF91nw==", + "version": "22.8.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.7.tgz", + "integrity": "sha512-LidcG+2UeYIWcMuMUpBKOnryBWG/rnmOHQR5apjn8myTQcx3rinFRn7DcIFhMnS0PPFSC6OafdIKEad0lj6U0Q==", "dev": true, "license": "MIT", "dependencies": { @@ -869,11 +949,22 @@ } }, "node_modules/@types/ws": { - "version": "8.5.12", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", - "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", + "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { "@types/node": "*" } @@ -1133,6 +1224,44 @@ "node": ">= 16.0.0" } }, + "node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/agent-base/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/agent-base/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1257,6 +1386,13 @@ "node": ">= 8" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -1297,6 +1433,19 @@ "util": "^0.12.5" } }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -1313,19 +1462,78 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/b4a": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", + "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "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==", + "node_modules/bare-events": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.0.tgz", + "integrity": "sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==", "dev": true, - "funding": [ - { + "license": "Apache-2.0", + "optional": true + }, + "node_modules/bare-fs": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.5.tgz", + "integrity": "sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-events": "^2.0.0", + "bare-path": "^2.0.0", + "bare-stream": "^2.0.0" + } + }, + "node_modules/bare-os": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.4.tgz", + "integrity": "sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==", + "dev": true, + "license": "Apache-2.0", + "optional": true + }, + "node_modules/bare-path": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.3.tgz", + "integrity": "sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-os": "^2.1.0" + } + }, + "node_modules/bare-stream": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.2.tgz", + "integrity": "sha512-EFZHSIBkDgSHIwj2l2QZfP4U5OcD4xFAOwhSb/vlr9PIqyGJGvB/nfClJbcnh3EY4jtPE4zsb5ztae96bVF79A==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "streamx": "^2.20.0" + } + }, + "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==", + "dev": true, + "funding": [ + { "type": "github", "url": "https://github.com/sponsors/feross" }, @@ -1340,6 +1548,16 @@ ], "license": "MIT" }, + "node_modules/basic-ftp": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -1360,6 +1578,58 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/bn.js": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", @@ -1408,6 +1678,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -1625,11 +1896,22 @@ "ieee754": "^1.2.1" } }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/buffer-xor": { @@ -1692,10 +1974,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/caniuse-lite": { - "version": "1.0.30001676", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001676.tgz", - "integrity": "sha512-Qz6zwGCiPghQXGJvgQAem79esjitvJ+CxSbSQkW9H/UX5hg8XM88d4lp2W+MEQ81j+Hip58Il+jGVdazk1z9cw==", + "version": "1.0.30001677", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001677.tgz", + "integrity": "sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog==", "dev": true, "funding": [ { @@ -1730,19 +2022,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -1779,6 +2058,21 @@ "node": ">=6.0" } }, + "node_modules/chromium-bidi": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.8.0.tgz", + "integrity": "sha512-uJydbGdTw0DEUjhoogGveneJVWX/9YuqkWePzMmkBYwtdAqo5d3J/ovNKFr+/2hWXYmYCr6it8mSSTIj6SS6Ug==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "mitt": "3.0.1", + "urlpattern-polyfill": "10.0.0", + "zod": "3.23.8" + }, + "peerDependencies": { + "devtools-protocol": "*" + } + }, "node_modules/cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", @@ -1790,6 +2084,32 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -1805,6 +2125,56 @@ "node": ">=12" } }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "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, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, "node_modules/code-block-writer": { "version": "13.0.3", "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz", @@ -1840,11 +2210,14 @@ "license": "MIT" }, "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true, - "peer": true + "license": "MIT", + "engines": { + "node": ">=18" + } }, "node_modules/compressible": { "version": "2.0.18", @@ -1958,6 +2331,33 @@ "dev": true, "license": "MIT" }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/create-ecdh": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", @@ -2047,6 +2447,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, "node_modules/date-fns": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", @@ -2111,6 +2521,19 @@ "node": ">= 10" } }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -2160,6 +2583,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -2199,6 +2637,13 @@ "dev": true, "license": "MIT" }, + "node_modules/devtools-protocol": { + "version": "0.0.1354347", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1354347.tgz", + "integrity": "sha512-BlmkSqV0V84E2WnEnoPnwyix57rQxAM5SKJjf4TbYOCGLAWtz8CDH8RIaGOjPgPCXo2Mce3kxSY497OySidY3Q==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", @@ -2297,9 +2742,9 @@ "license": "MIT" }, "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, "license": "MIT" }, @@ -2313,6 +2758,16 @@ "node": ">= 0.8" } }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/enhanced-resolve": { "version": "5.17.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", @@ -2328,6 +2783,26 @@ "node": ">=10.13.0" } }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -2376,10 +2851,32 @@ "dev": true, "license": "MIT" }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "license": "BSD-2-Clause", "peer": true, @@ -2391,6 +2888,31 @@ "node": ">=8.0.0" } }, + "node_modules/eslint-scope/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -2405,26 +2927,24 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "engines": { "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "engines": { - "node": ">=4.0" + "node": ">=0.10.0" } }, "node_modules/etag": { @@ -2499,6 +3019,19 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/execa/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/exit-hook": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-3.2.0.tgz", @@ -2555,6 +3088,52 @@ "node": ">= 0.10.0" } }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/extract-zip/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/extract-zip/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2562,6 +3141,13 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", @@ -2617,6 +3203,16 @@ "node": ">=0.8.0" } }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -2730,12 +3326,28 @@ "node": ">= 0.6" } }, + "node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2785,18 +3397,83 @@ } }, "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "license": "MIT", + "dependencies": { + "pump": "^3.0.0" + }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-uri": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", + "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", + "dev": true, + "license": "MIT", + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4", + "fs-extra": "^11.2.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/get-uri/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/get-uri/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -3107,6 +3784,45 @@ "node": ">=8.0.0" } }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/http-proxy-middleware": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz", @@ -3139,6 +3855,45 @@ "dev": true, "license": "MIT" }, + "node_modules/https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -3193,11 +3948,29 @@ ], "license": "BSD-3-Clause" }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/interpret": { "version": "3.1.1", @@ -3209,6 +3982,20 @@ "node": ">=10.13.0" } }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -3236,6 +4023,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -3362,7 +4156,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-nan": { + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-nan": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", @@ -3444,6 +4248,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-wsl": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", @@ -3506,23 +4323,66 @@ "node": ">= 10.13.0" } }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/jiti": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.3.3.tgz", - "integrity": "sha512-EX4oNDwcXSivPrw2qKH2LB5PoFxEvgtv2JgwW0bU858HoLQ+kutSvjLMUqBd0PeJYEinLWhoI9Ol0eYMqj/wNQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.0.tgz", + "integrity": "sha512-H5UpaUI+aHOqZXlYOaFP/8AzKsg+guWu+Pr3Y8i7+Y3zr1aXAvCvTAQ1RxSc6oVD8R8c7brgNtTVP91E7upH/g==", "dev": true, "license": "MIT", "bin": { "jiti": "lib/jiti-cli.mjs" } }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true, + "license": "MIT" + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -3532,6 +4392,19 @@ "license": "MIT", "peer": true }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/launch-editor": { "version": "2.9.1", "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.9.1.tgz", @@ -3543,6 +4416,13 @@ "shell-quote": "^1.8.1" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", @@ -3561,12 +4441,32 @@ "dev": true, "license": "MIT" }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, - "license": "ISC" + "license": "ISC", + "engines": { + "node": ">=12" + } }, "node_modules/md5.js": { "version": "1.3.5", @@ -3742,6 +4642,22 @@ "dev": true, "license": "MIT" }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", @@ -3762,6 +4678,13 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true, + "license": "MIT" + }, "node_modules/mkdirp": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", @@ -3826,6 +4749,16 @@ "dev": true, "license": "MIT" }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -3995,6 +4928,16 @@ "node": ">= 0.8" } }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -4040,6 +4983,30 @@ "opener": "bin/opener-bin.js" } }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -4061,6 +5028,65 @@ "node": ">=8" } }, + "node_modules/pac-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz", + "integrity": "sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.5", + "pac-resolver": "^7.0.1", + "socks-proxy-agent": "^8.0.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-proxy-agent/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/pac-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dev": true, + "license": "MIT", + "dependencies": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/package-json-from-dist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", @@ -4072,7 +5098,21 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", - "dev": true + "dev": true, + "license": "(MIT AND Zlib)" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } }, "node_modules/parse-asn1": { "version": "5.1.7", @@ -4092,6 +5132,25 @@ "node": ">= 0.10" } }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -4143,6 +5202,13 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/path-to-regexp": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", @@ -4167,6 +5233,13 @@ "node": ">=0.12" } }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -4179,6 +5252,7 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -4213,6 +5287,16 @@ "dev": true, "license": "MIT" }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -4227,6 +5311,58 @@ "node": ">= 0.10" } }, + "node_modules/proxy-agent": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/proxy-agent/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true, + "license": "MIT" + }, "node_modules/public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", @@ -4249,6 +5385,17 @@ "dev": true, "license": "MIT" }, + "node_modules/pump": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -4259,6 +5406,71 @@ "node": ">=6" } }, + "node_modules/puppeteer": { + "version": "23.6.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.6.1.tgz", + "integrity": "sha512-8+ALGQgwXd3P/tGcuSsxTPGDaOQIjcDIm04I5hpWZv/PiN5q8bQNHRUyfYrifT+flnM9aTWCP7tLEzuB6SlIgA==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "2.4.0", + "chromium-bidi": "0.8.0", + "cosmiconfig": "^9.0.0", + "devtools-protocol": "0.0.1354347", + "puppeteer-core": "23.6.1", + "typed-query-selector": "^2.12.0" + }, + "bin": { + "puppeteer": "lib/cjs/puppeteer/node/cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/puppeteer-core": { + "version": "23.6.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.6.1.tgz", + "integrity": "sha512-DoNLAzQfGklPauEn33N4h9cM9GubJSINEn+AUMwAXwW159Y9JLk5y34Jsbv4c7kG8P0puOYWV9leu2siMZ/QpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "2.4.0", + "chromium-bidi": "0.8.0", + "debug": "^4.3.7", + "devtools-protocol": "0.0.1354347", + "typed-query-selector": "^2.12.0", + "ws": "^8.18.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/puppeteer-core/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/puppeteer-core/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -4305,11 +5517,19 @@ ], "license": "MIT" }, + "node_modules/queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", + "dev": true, + "license": "MIT" + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } @@ -4439,6 +5659,30 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/retry": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -4476,43 +5720,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rimraf/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/ripemd160": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", @@ -4588,7 +5795,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", @@ -4698,6 +5906,7 @@ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, + "license": "BSD-3-Clause", "peer": true, "dependencies": { "randombytes": "^2.1.0" @@ -4908,6 +6117,17 @@ "node": ">= 10" } }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, "node_modules/sockjs": { "version": "0.3.24", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", @@ -4920,11 +6140,67 @@ "websocket-driver": "^0.7.4" } }, + "node_modules/socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -4934,6 +6210,7 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "buffer-from": "^1.0.0", @@ -5037,6 +6314,13 @@ "dev": true, "license": "MIT" }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -5101,6 +6385,21 @@ "node": ">= 6" } }, + "node_modules/streamx": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.1.tgz", + "integrity": "sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-fifo": "^1.3.2", + "queue-tick": "^1.0.1", + "text-decoder": "^1.1.0" + }, + "optionalDependencies": { + "bare-events": "^2.2.0" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -5112,18 +6411,21 @@ } }, "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/string-width-cjs": { @@ -5142,6 +6444,42 @@ "node": ">=8" } }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -5180,20 +6518,16 @@ } }, "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -5220,11 +6554,39 @@ "node": ">=6" } }, + "node_modules/tar-fs": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^2.1.1", + "bare-path": "^2.1.0" + } + }, + "node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, "node_modules/terser": { - "version": "5.30.3", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.3.tgz", - "integrity": "sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA==", + "version": "5.36.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", + "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", "dev": true, + "license": "BSD-2-Clause", "peer": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -5275,6 +6637,21 @@ } } }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/text-decoder": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.1.tgz", + "integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/thingies": { "version": "1.21.0", "resolved": "https://registry.npmjs.org/thingies/-/thingies-1.21.0.tgz", @@ -5288,6 +6665,13 @@ "tslib": "^2" } }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, "node_modules/thunky": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", @@ -5410,6 +6794,13 @@ "node": ">= 0.6" } }, + "node_modules/typed-query-selector": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", + "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", + "dev": true, + "license": "MIT" + }, "node_modules/uglify-js": { "version": "3.19.3", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", @@ -5424,6 +6815,42 @@ "node": ">=0.8.0" } }, + "node_modules/unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "node_modules/unbzip2-stream/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/undici-types": { "version": "6.19.8", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", @@ -5431,6 +6858,16 @@ "dev": true, "license": "MIT" }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -5505,6 +6942,13 @@ "dev": true, "license": "MIT" }, + "node_modules/urlpattern-polyfill": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", + "dev": true, + "license": "MIT" + }, "node_modules/util": { "version": "0.12.5", "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", @@ -5588,14 +7032,25 @@ "minimalistic-assert": "^1.0.0" } }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, "node_modules/webpack": { - "version": "5.96.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.0.tgz", - "integrity": "sha512-gvn84AfQ4f6vUeNWmFuRp3vGERyxK4epADKTaAo60K0EQbY/YBNQbXH3Ji/ZRK5M25O/XneAOuChF4xQZjQ4xA==", + "version": "5.96.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", + "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { + "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", @@ -5941,14 +7396,6 @@ "node": ">=10.13.0" } }, - "node_modules/webpack/node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", @@ -6018,18 +7465,18 @@ "license": "MIT" }, "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" @@ -6054,6 +7501,77 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, "node_modules/ws": { "version": "8.18.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", @@ -6125,6 +7643,39 @@ "node": ">=12" } }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, "node_modules/zod": { "version": "3.23.8", "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", diff --git a/package.json b/package.json index 729d22b..71a7ba8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@biliuniverse/redirect", - "version": "0.2.4", + "version": "0.2.5", "organizationName": "🪐 BiliUniverse", "displayName": "📺 BiliBili: 🔀 Redirect", "description": "哔哩哔哩:重定向\n中国站CDN自定义", @@ -38,9 +38,9 @@ "iOS >= 15" ], "devDependencies": { - "@iringo/arguments-builder": "^1.7.8", - "@nsnanocat/util": "^1.3.2", - "@protobuf-ts/runtime": "^2.9.3", + "@iringo/arguments-builder": "^1.8.1", + "@nsnanocat/util": "^1.3.6", + "@protobuf-ts/runtime": "^2.9.4", "@rspack/cli": "^1.0.14", "@rspack/core": "^1.0.14", "node-polyfill-webpack-plugin": "^4.0.0" diff --git a/src/function/database.mjs b/src/function/database.mjs index 779ba07..de0299e 100644 --- a/src/function/database.mjs +++ b/src/function/database.mjs @@ -1,12 +1,6 @@ export default { - Default: { - Settings: { - Switch: true, - }, - }, Redirect: { Settings: { - Switch: true, Host: { Akamaized: "upos-sz-mirrorali.bilivideo.com", BStar: "upos-sz-mirrorali.bilivideo.com", diff --git a/src/protobuf b/src/protobuf new file mode 160000 index 0000000..52ccf84 --- /dev/null +++ b/src/protobuf @@ -0,0 +1 @@ +Subproject commit 52ccf843547339028604c773f7b9cf038162f272 diff --git a/src/request.dev.js b/src/request.dev.js index 247ef40..1ba13fc 100644 --- a/src/request.dev.js +++ b/src/request.dev.js @@ -1,5 +1,4 @@ -import { $platform, URL, Lodash as _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "@nsnanocat/util"; -import { gRPC } from "@nsnanocat/util"; +import { $platform, Lodash as _, Storage, fetch, notification, log, logError, wait, done, gRPC } from "@nsnanocat/util"; import database from "./function/database.mjs"; import setENV from "./function/setENV.mjs"; // 构造回复数据 @@ -9,8 +8,8 @@ let $response = undefined; const url = new URL($request.url); log(`⚠ url: ${url.toJSON()}`, ""); // 获取连接参数 -const METHOD = $request.method, HOST = url.hostname, PATH = url.pathname, PATHs = url.pathname.split("/").filter(Boolean); -log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}` , ""); +const PATHs = url.pathname.split("/").filter(Boolean); +log(`⚠ PATHs: ${PATHs}`, ""); // 解析格式 const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["content-type"])?.split(";")?.[0]; log(`⚠ FORMAT: ${FORMAT}`, ""); @@ -20,190 +19,186 @@ log(`⚠ FORMAT: ${FORMAT}`, ""); * @type {{Settings: import('./types').Settings}} */ const { Settings, Caches, Configs } = setENV("BiliBili", "Redirect", database); - log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); - switch (Settings.Switch) { - case true: - default: { - // 创建空数据 - const body = {}; - // 方法判断 - switch (METHOD) { - case "POST": - case "PUT": - case "PATCH": - // biome-ignore lint/suspicious/noFallthroughSwitchClause: - case "DELETE": - // 格式判断 + // 创建空数据 + const body = {}; + // 方法判断 + switch ($request.method) { + case "POST": + case "PUT": + case "PATCH": + // biome-ignore lint/suspicious/noFallthroughSwitchClause: + case "DELETE": + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + //body = M3U8.parse($request.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = M3U8.stringify(body); + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + //body = XML.parse($request.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = XML.stringify(body); + break; + case "text/vtt": + case "application/vtt": + //body = VTT.parse($request.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = VTT.stringify(body); + break; + case "text/json": + case "application/json": + //body = JSON.parse($request.body ?? "{}"); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/vnd.apple.flatbuffer": + case "application/octet-stream": { + //log(`🚧 $request.body: ${JSON.stringify($request.body)}`, ""); + let rawBody = $platform === "Quantumult X" ? new Uint8Array($request.bodyBytes ?? []) : ($request.body ?? new Uint8Array()); + //log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, ""); switch (FORMAT) { - case undefined: // 视为无body - break; - case "application/x-www-form-urlencoded": - case "text/plain": - default: - break; - case "application/x-mpegURL": - case "application/x-mpegurl": - case "application/vnd.apple.mpegurl": - case "audio/mpegurl": - //body = M3U8.parse($request.body); - //log(`🚧 body: ${JSON.stringify(body)}`, ""); - //$request.body = M3U8.stringify(body); - break; - case "text/xml": - case "text/html": - case "text/plist": - case "application/xml": - case "application/plist": - case "application/x-plist": - //body = XML.parse($request.body); - //log(`🚧 body: ${JSON.stringify(body)}`, ""); - //$request.body = XML.stringify(body); - break; - case "text/vtt": - case "application/vtt": - //body = VTT.parse($request.body); - //log(`🚧 body: ${JSON.stringify(body)}`, ""); - //$request.body = VTT.stringify(body); - break; - case "text/json": - case "application/json": - //body = JSON.parse($request.body ?? "{}"); - //log(`🚧 body: ${JSON.stringify(body)}`, ""); - //$request.body = JSON.stringify(body); - break; case "application/protobuf": case "application/x-protobuf": case "application/vnd.google.protobuf": + break; case "application/grpc": case "application/grpc+proto": - case "application/octet-stream": { - //log(`🚧 $request.body: ${JSON.stringify($request.body)}`, ""); - let rawBody = ($platform === "Quantumult X") ? new Uint8Array($request.bodyBytes ?? []) : $request.body ?? new Uint8Array(); - //log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, ""); - switch (FORMAT) { - case "application/protobuf": - case "application/x-protobuf": - case "application/vnd.google.protobuf": - break; - case "application/grpc": - case "application/grpc+proto": - rawBody = gRPC.decode(rawBody); - rawBody = gRPC.encode(rawBody); - break; - }; - // 写入二进制数据 - $request.body = rawBody; + rawBody = gRPC.decode(rawBody); + rawBody = gRPC.encode(rawBody); break; - } - }; - //break; // 不中断,继续处理URL - case "GET": - case "HEAD": - case "OPTIONS": - case undefined: // QX牛逼,script-echo-response不返回method + } + // 写入二进制数据 + $request.body = rawBody; + break; + } + } + //break; // 不中断,继续处理URL + case "GET": + case "HEAD": + case "OPTIONS": + default: + // 主机判断 + switch (url.hostname) { + case "upos-sz-mirrorali.bilivideo.com": // 阿里云 CDN + case "upos-sz-mirroralib.bilivideo.com": // 阿里云 CDN + case "upos-sz-mirroralio1.bilivideo.com": // 阿里云 CDN + case "upos-sz-mirrorcos.bilivideo.com": // 腾讯云 CDN + case "upos-sz-mirrorcosb.bilivideo.com": // 腾讯云 CDN,VOD 加速类型 + case "upos-sz-mirrorcoso1.bilivideo.com": // 腾讯云 CDN + case "upos-sz-mirrorhw.bilivideo.com": // 华为云 CDN,融合 CDN + case "upos-sz-mirrorhwb.bilivideo.com": // 华为云 CDN,融合 CDN + case "upos-sz-mirrorhwo1.bilivideo.com": // 华为云 CDN,融合 CDN + case "upos-sz-mirror08c.bilivideo.com": // 华为云 CDN,融合 CDN + case "upos-sz-mirror08h.bilivideo.com": // 华为云 CDN,融合 CDN + case "upos-sz-mirror08ct.bilivideo.com": // 华为云 CDN,融合 CDN + case "upos-sz-mirroraliov.bilivideo.com": // 阿里云 CDN,海外 + case "upos-sz-mirrorcosov.bilivideo.com": // 腾讯云 CDN,海外 + case "upos-sz-mirrorhwov.bilivideo.com": // 华为云 CDN,海外 + break; + case "upos-hz-mirrorakam.akamaized.net": // Akamai CDN,海外,有参数校验,其他类型的 CDN 不能直接替换为此 Host。但反过来可以。 + url.hostname = Settings.Host.Akamaized; + break; + case "upos-sz-mirroralibstar1.bilivideo.com": // 阿里云 CDN,海外(东南亚),其他类型的 CDN 应该不能替换为此 Host,但反过来可以。 + case "upos-sz-mirrorcosbstar1.bilivideo.com": // 腾讯云 CDN,海外(东南亚),其他类型的 CDN 应该不能替换为此 Host,但反过来可以。 + case "upos-sz-mirrorhwbstar1.bilivideo.com": // 华为云 CDN,海外(东南亚),其他类型的 CDN 应该不能替换为此 Host,但反过来可以。 + case "upos-bstar1-mirrorakam.akamaized.net": // Akamai CDN,海外(东南亚),有参数校验,其他类型的 CDN 不能直接替换为此 Host。但反过来可以。 + url.hostname = Settings.Host.BStar; + break; default: - // 主机判断 - switch (HOST) { - case "upos-sz-mirrorali.bilivideo.com": // 阿里云 CDN - case "upos-sz-mirroralib.bilivideo.com": // 阿里云 CDN - case "upos-sz-mirroralio1.bilivideo.com": // 阿里云 CDN - case "upos-sz-mirrorcos.bilivideo.com": // 腾讯云 CDN - case "upos-sz-mirrorcosb.bilivideo.com": // 腾讯云 CDN,VOD 加速类型 - case "upos-sz-mirrorcoso1.bilivideo.com": // 腾讯云 CDN - case "upos-sz-mirrorhw.bilivideo.com": // 华为云 CDN,融合 CDN - case "upos-sz-mirrorhwb.bilivideo.com": // 华为云 CDN,融合 CDN - case "upos-sz-mirrorhwo1.bilivideo.com": // 华为云 CDN,融合 CDN - case "upos-sz-mirror08c.bilivideo.com": // 华为云 CDN,融合 CDN - case "upos-sz-mirror08h.bilivideo.com": // 华为云 CDN,融合 CDN - case "upos-sz-mirror08ct.bilivideo.com": // 华为云 CDN,融合 CDN - case "upos-sz-mirroraliov.bilivideo.com": // 阿里云 CDN,海外 - case "upos-sz-mirrorcosov.bilivideo.com": // 腾讯云 CDN,海外 - case "upos-sz-mirrorhwov.bilivideo.com": // 华为云 CDN,海外 + switch (url.port) { + case "486": { + // MCDN + const cdn = url.searchParams.get("cdn"); + const sid = url.searchParams.get("sid"); + if (cdn) { + url.hostname = `d1--${cdn}.bilivideo.com`; + url.port = ""; + } else if (sid) { + url.hostname = `${sid}.bilivideo.com`; + url.port = ""; + } break; - case "upos-hz-mirrorakam.akamaized.net": // Akamai CDN,海外,有参数校验,其他类型的 CDN 不能直接替换为此 Host。但反过来可以。 - url.hostname = Settings.Host.Akamaized; + } + case "4480": // PCDN + url.protocol = "http"; + url.hostname = url.searchParams.get("xy_usource") || Settings.Host.PCDN; + url.port = ""; break; - case "upos-sz-mirroralibstar1.bilivideo.com": // 阿里云 CDN,海外(东南亚),其他类型的 CDN 应该不能替换为此 Host,但反过来可以。 - case "upos-sz-mirrorcosbstar1.bilivideo.com": // 腾讯云 CDN,海外(东南亚),其他类型的 CDN 应该不能替换为此 Host,但反过来可以。 - case "upos-sz-mirrorhwbstar1.bilivideo.com": // 华为云 CDN,海外(东南亚),其他类型的 CDN 应该不能替换为此 Host,但反过来可以。 - case "upos-bstar1-mirrorakam.akamaized.net": // Akamai CDN,海外(东南亚),有参数校验,其他类型的 CDN 不能直接替换为此 Host。但反过来可以。 - url.hostname = Settings.Host.BStar; + case "4483": // MCDN + case "8000": // MCDN + case "8082": // MCDN + case "9102": // MCDN + url.protocol = "https"; + url.hostname = Settings.Host.MCDN; + url.port = ""; + url.pathname = ""; + for (const key of url.searchParams.keys()) url.searchParams.delete(key); + url.searchParams.set("url", $request.url); break; - default: - switch (url.port) { - case "486": { // MCDN - const cdn = url.searchParams.get("cdn"); - const sid = url.searchParams.get("sid"); - if (cdn) { - url.hostname = `d1--${cdn}.bilivideo.com`; - url.port = ""; - } else if (sid) { - url.hostname = `${sid}.bilivideo.com`; - url.port = ""; - }; - break; - } - case "4480": // PCDN - url.protocol = "http"; - url.hostname = url.searchParams.get("xy_usource") || Settings.Host.PCDN; - url.port = ""; - break; - case "4483": // MCDN - case "8000": // MCDN - case "8082": // MCDN - case "9102": // MCDN - url.protocol = "https"; - url.hostname = Settings.Host.MCDN; - url.port = ""; - url.pathname = ""; - url.searchParams.set("url", $request.url); - break; - case "9305": // PCDN - url.protocol = "http"; - url.hostname = url.PATHs.shift(); - url.port = ""; - url.pathname = url.PATHs.join("/"); - break; - }; + case "9305": // PCDN + url.protocol = "http"; + url.hostname = url.PATHs.shift(); + url.port = ""; + url.pathname = url.PATHs.join("/"); break; - }; - break; - case "CONNECT": - case "TRACE": - break; - }; - if ($request.headers?.Host) $request.headers.Host = url.hostname; - $request.url = url.toString(); - log("🚧 调试信息", `$request.url: ${$request.url}`, ""); - break; - } - case false: - break; - }; -})() -.catch(e => logError(e)) -.finally(() => { - switch ($response) { - default: // 有构造回复数据,返回构造的回复数据 - //log(`🚧 finally`, `echo $response: ${JSON.stringify($response, null, 2)}`, ""); - if ($response.headers?.["Content-Encoding"]) $response.headers["Content-Encoding"] = "identity"; - if ($response.headers?.["content-encoding"]) $response.headers["content-encoding"] = "identity"; - switch ($platform) { - default: - done({ response: $response }); - break; - case "Quantumult X": - if (!$response.status) $response.status = "HTTP/1.1 200 OK"; - delete $response.headers?.["Content-Length"]; - delete $response.headers?.["content-length"]; - delete $response.headers?.["Transfer-Encoding"]; - done($response); + } break; } break; - case undefined: // 无构造回复数据,发送修改的请求数据 - //log(`🚧 finally`, `$request: ${JSON.stringify($request, null, 2)}`, ""); - done($request); + case "CONNECT": + case "TRACE": break; } -}); + if ($request.headers?.Host) $request.headers.Host = url.hostname; + $request.url = url.toString(); + log("🚧 调试信息", `$request.url: ${$request.url}`, ""); +})() + .catch(e => logError(e)) + .finally(() => { + switch (typeof $response) { + case "object": // 有构造回复数据,返回构造的回复数据 + //log("🚧 finally", `echo $response: ${JSON.stringify($response, null, 2)}`, ""); + if ($response.headers?.["Content-Encoding"]) $response.headers["Content-Encoding"] = "identity"; + if ($response.headers?.["content-encoding"]) $response.headers["content-encoding"] = "identity"; + switch ($platform) { + default: + done({ response: $response }); + break; + case "Quantumult X": + if (!$response.status) $response.status = "HTTP/1.1 200 OK"; + delete $response.headers?.["Content-Length"]; + delete $response.headers?.["content-length"]; + delete $response.headers?.["Transfer-Encoding"]; + done($response); + break; + } + break; + case "undefined": // 无构造回复数据,发送修改的请求数据 + //log("🚧 finally", `$request: ${JSON.stringify($request, null, 2)}`, ""); + done($request); + break; + default: + logError(`不合法的 $response 类型: ${typeof $response}`, ""); + break; + } + }); diff --git a/src/request.js b/src/request.js index f46a12f..0651f64 100644 --- a/src/request.js +++ b/src/request.js @@ -1,5 +1,4 @@ -import { $platform, URL, Lodash as _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "@nsnanocat/util"; -import { gRPC } from "@nsnanocat/util"; +import { $platform, Lodash as _, Storage, fetch, notification, log, logError, wait, done, gRPC } from "@nsnanocat/util"; import database from "./function/database.mjs"; import setENV from "./function/setENV.mjs"; // 构造回复数据 @@ -9,8 +8,8 @@ let $response = undefined; const url = new URL($request.url); //log(`⚠ url: ${url.toJSON()}`, ""); // 获取连接参数 -const METHOD = $request.method, HOST = url.hostname, PATH = url.pathname, PATHs = url.pathname.split("/").filter(Boolean); -log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}` , ""); +const PATHs = url.pathname.split("/").filter(Boolean); +log(`⚠ PATHs: ${PATHs}`, ""); // 解析格式 const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["content-type"])?.split(";")?.[0]; //log(`⚠ FORMAT: ${FORMAT}`, ""); @@ -20,190 +19,186 @@ const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["conten * @type {{Settings: import('./types').Settings}} */ const { Settings, Caches, Configs } = setENV("BiliBili", "Redirect", database); - //log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); - switch (Settings.Switch) { - case true: - default: { - // 创建空数据 - const body = {}; - // 方法判断 - switch (METHOD) { - case "POST": - case "PUT": - case "PATCH": - // biome-ignore lint/suspicious/noFallthroughSwitchClause: - case "DELETE": - // 格式判断 + // 创建空数据 + const body = {}; + // 方法判断 + switch ($request.method) { + case "POST": + case "PUT": + case "PATCH": + // biome-ignore lint/suspicious/noFallthroughSwitchClause: + case "DELETE": + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + //body = M3U8.parse($request.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = M3U8.stringify(body); + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + //body = XML.parse($request.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = XML.stringify(body); + break; + case "text/vtt": + case "application/vtt": + //body = VTT.parse($request.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = VTT.stringify(body); + break; + case "text/json": + case "application/json": + //body = JSON.parse($request.body ?? "{}"); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/vnd.apple.flatbuffer": + case "application/octet-stream": { + //log(`🚧 $request.body: ${JSON.stringify($request.body)}`, ""); + let rawBody = $platform === "Quantumult X" ? new Uint8Array($request.bodyBytes ?? []) : ($request.body ?? new Uint8Array()); + //log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, ""); switch (FORMAT) { - case undefined: // 视为无body - break; - case "application/x-www-form-urlencoded": - case "text/plain": - default: - break; - case "application/x-mpegURL": - case "application/x-mpegurl": - case "application/vnd.apple.mpegurl": - case "audio/mpegurl": - //body = M3U8.parse($request.body); - //log(`🚧 body: ${JSON.stringify(body)}`, ""); - //$request.body = M3U8.stringify(body); - break; - case "text/xml": - case "text/html": - case "text/plist": - case "application/xml": - case "application/plist": - case "application/x-plist": - //body = XML.parse($request.body); - //log(`🚧 body: ${JSON.stringify(body)}`, ""); - //$request.body = XML.stringify(body); - break; - case "text/vtt": - case "application/vtt": - //body = VTT.parse($request.body); - //log(`🚧 body: ${JSON.stringify(body)}`, ""); - //$request.body = VTT.stringify(body); - break; - case "text/json": - case "application/json": - //body = JSON.parse($request.body ?? "{}"); - //log(`🚧 body: ${JSON.stringify(body)}`, ""); - //$request.body = JSON.stringify(body); - break; case "application/protobuf": case "application/x-protobuf": case "application/vnd.google.protobuf": + break; case "application/grpc": case "application/grpc+proto": - case "application/octet-stream": { - //log(`🚧 $request.body: ${JSON.stringify($request.body)}`, ""); - let rawBody = ($platform === "Quantumult X") ? new Uint8Array($request.bodyBytes ?? []) : $request.body ?? new Uint8Array(); - //log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, ""); - switch (FORMAT) { - case "application/protobuf": - case "application/x-protobuf": - case "application/vnd.google.protobuf": - break; - case "application/grpc": - case "application/grpc+proto": - rawBody = gRPC.decode(rawBody); - rawBody = gRPC.encode(rawBody); - break; - }; - // 写入二进制数据 - $request.body = rawBody; + rawBody = gRPC.decode(rawBody); + rawBody = gRPC.encode(rawBody); break; - } - }; - //break; // 不中断,继续处理URL - case "GET": - case "HEAD": - case "OPTIONS": - case undefined: // QX牛逼,script-echo-response不返回method + } + // 写入二进制数据 + $request.body = rawBody; + break; + } + } + //break; // 不中断,继续处理URL + case "GET": + case "HEAD": + case "OPTIONS": + default: + // 主机判断 + switch (url.hostname) { + case "upos-sz-mirrorali.bilivideo.com": // 阿里云 CDN + case "upos-sz-mirroralib.bilivideo.com": // 阿里云 CDN + case "upos-sz-mirroralio1.bilivideo.com": // 阿里云 CDN + case "upos-sz-mirrorcos.bilivideo.com": // 腾讯云 CDN + case "upos-sz-mirrorcosb.bilivideo.com": // 腾讯云 CDN,VOD 加速类型 + case "upos-sz-mirrorcoso1.bilivideo.com": // 腾讯云 CDN + case "upos-sz-mirrorhw.bilivideo.com": // 华为云 CDN,融合 CDN + case "upos-sz-mirrorhwb.bilivideo.com": // 华为云 CDN,融合 CDN + case "upos-sz-mirrorhwo1.bilivideo.com": // 华为云 CDN,融合 CDN + case "upos-sz-mirror08c.bilivideo.com": // 华为云 CDN,融合 CDN + case "upos-sz-mirror08h.bilivideo.com": // 华为云 CDN,融合 CDN + case "upos-sz-mirror08ct.bilivideo.com": // 华为云 CDN,融合 CDN + case "upos-sz-mirroraliov.bilivideo.com": // 阿里云 CDN,海外 + case "upos-sz-mirrorcosov.bilivideo.com": // 腾讯云 CDN,海外 + case "upos-sz-mirrorhwov.bilivideo.com": // 华为云 CDN,海外 + break; + case "upos-hz-mirrorakam.akamaized.net": // Akamai CDN,海外,有参数校验,其他类型的 CDN 不能直接替换为此 Host。但反过来可以。 + url.hostname = Settings.Host.Akamaized; + break; + case "upos-sz-mirroralibstar1.bilivideo.com": // 阿里云 CDN,海外(东南亚),其他类型的 CDN 应该不能替换为此 Host,但反过来可以。 + case "upos-sz-mirrorcosbstar1.bilivideo.com": // 腾讯云 CDN,海外(东南亚),其他类型的 CDN 应该不能替换为此 Host,但反过来可以。 + case "upos-sz-mirrorhwbstar1.bilivideo.com": // 华为云 CDN,海外(东南亚),其他类型的 CDN 应该不能替换为此 Host,但反过来可以。 + case "upos-bstar1-mirrorakam.akamaized.net": // Akamai CDN,海外(东南亚),有参数校验,其他类型的 CDN 不能直接替换为此 Host。但反过来可以。 + url.hostname = Settings.Host.BStar; + break; default: - // 主机判断 - switch (HOST) { - case "upos-sz-mirrorali.bilivideo.com": // 阿里云 CDN - case "upos-sz-mirroralib.bilivideo.com": // 阿里云 CDN - case "upos-sz-mirroralio1.bilivideo.com": // 阿里云 CDN - case "upos-sz-mirrorcos.bilivideo.com": // 腾讯云 CDN - case "upos-sz-mirrorcosb.bilivideo.com": // 腾讯云 CDN,VOD 加速类型 - case "upos-sz-mirrorcoso1.bilivideo.com": // 腾讯云 CDN - case "upos-sz-mirrorhw.bilivideo.com": // 华为云 CDN,融合 CDN - case "upos-sz-mirrorhwb.bilivideo.com": // 华为云 CDN,融合 CDN - case "upos-sz-mirrorhwo1.bilivideo.com": // 华为云 CDN,融合 CDN - case "upos-sz-mirror08c.bilivideo.com": // 华为云 CDN,融合 CDN - case "upos-sz-mirror08h.bilivideo.com": // 华为云 CDN,融合 CDN - case "upos-sz-mirror08ct.bilivideo.com": // 华为云 CDN,融合 CDN - case "upos-sz-mirroraliov.bilivideo.com": // 阿里云 CDN,海外 - case "upos-sz-mirrorcosov.bilivideo.com": // 腾讯云 CDN,海外 - case "upos-sz-mirrorhwov.bilivideo.com": // 华为云 CDN,海外 + switch (url.port) { + case "486": { + // MCDN + const cdn = url.searchParams.get("cdn"); + const sid = url.searchParams.get("sid"); + if (cdn) { + url.hostname = `d1--${cdn}.bilivideo.com`; + url.port = ""; + } else if (sid) { + url.hostname = `${sid}.bilivideo.com`; + url.port = ""; + } break; - case "upos-hz-mirrorakam.akamaized.net": // Akamai CDN,海外,有参数校验,其他类型的 CDN 不能直接替换为此 Host。但反过来可以。 - url.hostname = Settings.Host.Akamaized; + } + case "4480": // PCDN + url.protocol = "http"; + url.hostname = url.searchParams.get("xy_usource") || Settings.Host.PCDN; + url.port = ""; break; - case "upos-sz-mirroralibstar1.bilivideo.com": // 阿里云 CDN,海外(东南亚),其他类型的 CDN 应该不能替换为此 Host,但反过来可以。 - case "upos-sz-mirrorcosbstar1.bilivideo.com": // 腾讯云 CDN,海外(东南亚),其他类型的 CDN 应该不能替换为此 Host,但反过来可以。 - case "upos-sz-mirrorhwbstar1.bilivideo.com": // 华为云 CDN,海外(东南亚),其他类型的 CDN 应该不能替换为此 Host,但反过来可以。 - case "upos-bstar1-mirrorakam.akamaized.net": // Akamai CDN,海外(东南亚),有参数校验,其他类型的 CDN 不能直接替换为此 Host。但反过来可以。 - url.hostname = Settings.Host.BStar; + case "4483": // MCDN + case "8000": // MCDN + case "8082": // MCDN + case "9102": // MCDN + url.protocol = "https"; + url.hostname = Settings.Host.MCDN; + url.port = ""; + url.pathname = ""; + for (const key of url.searchParams.keys()) url.searchParams.delete(key); + url.searchParams.set("url", $request.url); break; - default: - switch (url.port) { - case "486": { // MCDN - const cdn = url.searchParams.get("cdn"); - const sid = url.searchParams.get("sid"); - if (cdn) { - url.hostname = `d1--${cdn}.bilivideo.com`; - url.port = ""; - } else if (sid) { - url.hostname = `${sid}.bilivideo.com`; - url.port = ""; - }; - break; - } - case "4480": // PCDN - url.protocol = "http"; - url.hostname = url.searchParams.get("xy_usource") || Settings.Host.PCDN; - url.port = ""; - break; - case "4483": // MCDN - case "8000": // MCDN - case "8082": // MCDN - case "9102": // MCDN - url.protocol = "https"; - url.hostname = Settings.Host.MCDN; - url.port = ""; - url.pathname = ""; - url.searchParams.set("url", $request.url); - break; - case "9305": // PCDN - url.protocol = "http"; - url.hostname = url.PATHs.shift(); - url.port = ""; - url.pathname = url.PATHs.join("/"); - break; - }; + case "9305": // PCDN + url.protocol = "http"; + url.hostname = url.PATHs.shift(); + url.port = ""; + url.pathname = url.PATHs.join("/"); break; - }; - break; - case "CONNECT": - case "TRACE": - break; - }; - if ($request.headers?.Host) $request.headers.Host = url.hostname; - $request.url = url.toString(); - //log("🚧 调试信息", `$request.url: ${$request.url}`, ""); - break; - } - case false: - break; - }; -})() -.catch(e => logError(e)) -.finally(() => { - switch ($response) { - default: // 有构造回复数据,返回构造的回复数据 - //log(`🚧 finally`, `echo $response: ${JSON.stringify($response, null, 2)}`, ""); - if ($response.headers?.["Content-Encoding"]) $response.headers["Content-Encoding"] = "identity"; - if ($response.headers?.["content-encoding"]) $response.headers["content-encoding"] = "identity"; - switch ($platform) { - default: - done({ response: $response }); - break; - case "Quantumult X": - if (!$response.status) $response.status = "HTTP/1.1 200 OK"; - delete $response.headers?.["Content-Length"]; - delete $response.headers?.["content-length"]; - delete $response.headers?.["Transfer-Encoding"]; - done($response); + } break; } break; - case undefined: // 无构造回复数据,发送修改的请求数据 - //log(`🚧 finally`, `$request: ${JSON.stringify($request, null, 2)}`, ""); - done($request); + case "CONNECT": + case "TRACE": break; } -}); + if ($request.headers?.Host) $request.headers.Host = url.hostname; + $request.url = url.toString(); + //log("🚧 调试信息", `$request.url: ${$request.url}`, ""); +})() + .catch(e => logError(e)) + .finally(() => { + switch (typeof $response) { + case "object": // 有构造回复数据,返回构造的回复数据 + //log("🚧 finally", `echo $response: ${JSON.stringify($response, null, 2)}`, ""); + if ($response.headers?.["Content-Encoding"]) $response.headers["Content-Encoding"] = "identity"; + if ($response.headers?.["content-encoding"]) $response.headers["content-encoding"] = "identity"; + switch ($platform) { + default: + done({ response: $response }); + break; + case "Quantumult X": + if (!$response.status) $response.status = "HTTP/1.1 200 OK"; + delete $response.headers?.["Content-Length"]; + delete $response.headers?.["content-length"]; + delete $response.headers?.["Transfer-Encoding"]; + done($response); + break; + } + break; + case "undefined": // 无构造回复数据,发送修改的请求数据 + //log("🚧 finally", `$request: ${JSON.stringify($request, null, 2)}`, ""); + done($request); + break; + default: + logError(`不合法的 $response 类型: ${typeof $response}`, ""); + break; + } + }); diff --git a/src/response.dev.js b/src/response.dev.js index 7c2da2c..342425c 100644 --- a/src/response.dev.js +++ b/src/response.dev.js @@ -1,16 +1,17 @@ -import { $platform, URL, Lodash as _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "@nsnanocat/util"; -import { gRPC } from "@nsnanocat/util"; +import { $platform, URL, Lodash as _, Storage, fetch, notification, log, logError, wait, done, gRPC } from "@nsnanocat/util"; import database from "./function/database.mjs"; import setENV from "./function/setENV.mjs"; import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, MessageType, BinaryReader, isJsonObject, typeofJsonValue, jsonWriteOptions } from "@protobuf-ts/runtime/build/es2015/index.js"; -// import { Any } from "./protobuf/google/protobuf/any.js"; +import { Any } from "./protobuf/google/protobuf/any.js"; /***************** Processing *****************/ // 解构URL const url = new URL($request.url); log(`⚠ url: ${url.toJSON()}`, ""); // 获取连接参数 -const METHOD = $request.method, HOST = url.hostname, PATH = url.pathname, PATHs = url.pathname.split("/").filter(Boolean); -log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`, ""); +const HOST = url.hostname, + PATH = url.pathname, + PATHs = url.pathname.split("/").filter(Boolean); +log(`⚠ HOST: ${HOST}, PATH: ${PATH}`, ""); // 解析格式 const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; log(`⚠ FORMAT: ${FORMAT}`, ""); @@ -20,460 +21,362 @@ log(`⚠ FORMAT: ${FORMAT}`, ""); * @type {{Settings: import('./types').Settings}} */ const { Settings, Caches, Configs } = setENV("BiliBili", "Redirect", database); - log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); - switch (Settings.Switch) { - case true: - default: { - // 创建空数据 - let body = { code: 0, message: "0", data: {} }; - // 信息组 - const infoGroup = { - seasonTitle: url.searchParams.get("season_title"), - seasonId: Number.parseInt(url.searchParams.get("season_id"), 10) || undefined, - epId: Number.parseInt(url.searchParams.get("ep_id"), 10) || undefined, - mId: Number.parseInt(url.searchParams.get("mid") || url.searchParams.get("vmid"), 10) || undefined, - evaluate: undefined, - keyword: url.searchParams.get("keyword"), - locale: url.searchParams.get("locale"), - locales: [], - type: "UGC", - }; - // 格式判断 - switch (FORMAT) { - case undefined: // 视为无body - break; - case "application/x-www-form-urlencoded": - case "text/plain": - default: - break; - case "application/x-mpegURL": - case "application/x-mpegurl": - case "application/vnd.apple.mpegurl": - case "audio/mpegurl": - //body = M3U8.parse($response.body); - //log(`🚧 body: ${JSON.stringify(body)}`, ""); - //$response.body = M3U8.stringify(body); - break; - case "text/xml": - case "text/html": - case "text/plist": - case "application/xml": - case "application/plist": - case "application/x-plist": - //body = XML.parse($response.body); - //log(`🚧 body: ${JSON.stringify(body)}`, ""); - //$response.body = XML.stringify(body); + // 创建空数据 + let body = { code: 0, message: "0", data: {} }; + // 信息组 + const infoGroup = { + seasonTitle: url.searchParams.get("season_title"), + seasonId: Number.parseInt(url.searchParams.get("season_id"), 10) || undefined, + epId: Number.parseInt(url.searchParams.get("ep_id"), 10) || undefined, + mId: Number.parseInt(url.searchParams.get("mid") || url.searchParams.get("vmid"), 10) || undefined, + evaluate: undefined, + keyword: url.searchParams.get("keyword"), + locale: url.searchParams.get("locale"), + locales: [], + type: "UGC", + }; + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + //body = M3U8.parse($response.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = M3U8.stringify(body); + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + //body = XML.parse($response.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = XML.stringify(body); + break; + case "text/vtt": + case "application/vtt": + //body = VTT.parse($response.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = VTT.stringify(body); + break; + case "text/json": + case "application/json": + body = JSON.parse($response.body ?? "{}"); + // 解析链接 + switch (url.hostname) { + case "www.bilibili.com": break; - case "text/vtt": - case "application/vtt": - //body = VTT.parse($response.body); - //log(`🚧 body: ${JSON.stringify(body)}`, ""); - //$response.body = VTT.stringify(body); + case "app.bilibili.com": + case "app.biliapi.net": break; - case "text/json": - case "application/json": - body = JSON.parse($response.body ?? "{}"); - // 解析链接 - switch (HOST) { - case "www.bilibili.com": + case "api.bilibili.com": + case "api.biliapi.net": + switch (PATH) { + case "/pgc/player/api/playurl": // 番剧-播放地址-api + case "/pgc/player/web/playurl": // 番剧-播放地址-web + case "/pgc/player/web/playurl/html5": // 番剧-播放地址-web-HTML5 + infoGroup.type = "PGC"; break; - case "app.bilibili.com": - case "app.biliapi.net": + case "/pgc/page/bangumi": // 追番页 + case "/pgc/page/cinema/tab": // 观影页 + infoGroup.type = "PGC"; break; - case "api.bilibili.com": - case "api.biliapi.net": - switch (PATH) { - case "/pgc/player/api/playurl": // 番剧-播放地址-api - case "/pgc/player/web/playurl": // 番剧-播放地址-web - case "/pgc/player/web/playurl/html5": // 番剧-播放地址-web-HTML5 - infoGroup.type = "PGC"; - break; - case "/pgc/page/bangumi": // 追番页 - case "/pgc/page/cinema/tab": // 观影页 - infoGroup.type = "PGC"; - break; - case "/x/player/wbi/playurl": // UGC-用户生产内容-播放地址 - break; - case "/x/space/acc/info": // 用户空间-账号信息-pc - case "/x/space/wbi/acc/info": // 用户空间-账号信息-wbi - switch (infoGroup.mId) { - case 11783021: // 哔哩哔哩番剧出差 - case 1988098633: // b站_戲劇咖 - case 2042149112: // b站_綜藝咖 - break; - default: - break; - } - break; - case "/pgc/view/v2/app/season": // 番剧页面-内容-app + case "/x/player/wbi/playurl": // UGC-用户生产内容-播放地址 + break; + case "/x/space/acc/info": // 用户空间-账号信息-pc + case "/x/space/wbi/acc/info": // 用户空间-账号信息-wbi + switch (infoGroup.mId) { + case 11783021: // 哔哩哔哩番剧出差 + case 1988098633: // b站_戲劇咖 + case 2042149112: // b站_綜藝咖 break; - case "/pgc/view/web/season": // 番剧-内容-web - case "/pgc/view/pc/season": // 番剧-内容-pc + default: break; } break; + case "/pgc/view/v2/app/season": // 番剧页面-内容-app + break; + case "/pgc/view/web/season": // 番剧-内容-web + case "/pgc/view/pc/season": // 番剧-内容-pc + break; } - $response.body = JSON.stringify(body); break; + } + $response.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/vnd.apple.flatbuffer": + case "application/octet-stream": { + //log(`🚧 $response.body: ${JSON.stringify($response.body)}`, ""); + let rawBody = $platform === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array()); + //log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, ""); + switch (FORMAT) { case "application/protobuf": case "application/x-protobuf": case "application/vnd.google.protobuf": + break; case "application/grpc": case "application/grpc+proto": - case "application/octet-stream": { - //log(`🚧 $response.body: ${JSON.stringify($response.body)}`, ""); - let rawBody = $platform === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array()); - //log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, ""); - switch (FORMAT) { - case "application/protobuf": - case "application/x-protobuf": - case "application/vnd.google.protobuf": - break; - case "application/grpc": - case "application/grpc+proto": - rawBody = gRPC.decode(rawBody); - // 解析链接并处理protobuf数据 - // 主机判断 - switch (HOST) { - case "grpc.biliapi.net": // HTTP/2 - case "app.bilibili.com": { - // HTTP/1.1 + rawBody = gRPC.decode(rawBody); + // 解析链接并处理protobuf数据 + // 主机判断 + switch (url.hostname) { + case "grpc.biliapi.net": // HTTP/2 + case "app.biliapi.net": // HTTP/1.1 + case "app.bilibili.com": // HTTP/1.1 + switch (PATHs?.[0]) { + case "bilibili.app.viewunite.v1.View": /****************** initialization start *******************/ - // protobuf/google/protobuf/any.proto - class Any$Type extends MessageType { + /****************** initialization finish *******************/ + switch (PATHs?.[1]) { + case "View": // 播放页 + break; + } + break; + case "bilibili.app.playerunite.v1.Player": { + /****************** initialization start *******************/ + class Stream$Type extends MessageType { constructor() { - super("google.protobuf.Any", [ - { no: 1, name: "type_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + super("bilibili.playershared.Stream", [ + { no: 1, name: "stream_info", kind: "message", T: () => StreamInfo }, + { no: 2, name: "dash_video", kind: "message", oneof: "content", T: () => DashVideo }, + { no: 3, name: "segment_video", kind: "message", oneof: "content", T: () => SegmentVideo }, ]); } - /** - * Pack the message into a new `Any`. - * - * Uses 'type.googleapis.com/full.type.name' as the type URL. - */ - pack(message, type) { - return { - typeUrl: this.typeNameToUrl(type.typeName), - value: type.toBinary(message), - }; + } + const Stream = new Stream$Type(); + class StreamInfo$Type extends MessageType { + constructor() { + super("bilibili.playershared.StreamInfo", [ + { no: 1, name: "quality", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "format", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "err_code", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + //{ no: 5, name: "limit", kind: "message", T: () => StreamLimit }, + { no: 6, name: "need_vip", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 7, name: "need_login", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 8, name: "intact", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 9, name: "no_rexcode", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 10, name: "attribute", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 11, name: "new_description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 12, name: "display_desc", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 13, name: "superscript", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 14, name: "vip_free", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 15, name: "subtitle", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + //{ no: 16, name: "scheme", kind: "message", T: () => Scheme }, + { no: 17, name: "support_drm", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + ]); } - /** - * Unpack the message from the `Any`. - */ - unpack(any, type, options) { - if (!this.contains(any, type)) throw new Error("Cannot unpack google.protobuf.Any with typeUrl '" + any.typeUrl + "' as " + type.typeName + "."); - return type.fromBinary(any.value, options); + } + const StreamInfo = new StreamInfo$Type(); + class DashVideo$Type extends MessageType { + constructor() { + super("bilibili.playershared.DashVideo", [ + { no: 1, name: "base_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "backup_url", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "bandwidth", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "codecid", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "md5", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "size", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 7, name: "audio_id", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 8, name: "no_rexcode", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 9, name: "frame_rate", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 10, name: "width", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 11, name: "height", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 12, name: "widevine_pssh", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + ]); } - /** - * Does the given `Any` contain a packed message of the given type? - */ - contains(any, type) { - if (!any.typeUrl.length) return false; - let wants = typeof type == "string" ? type : type.typeName; - let has = this.typeUrlToName(any.typeUrl); - return wants === has; + } + const DashVideo = new DashVideo$Type(); + class FragmentVideo$Type extends MessageType { + constructor() { + super("bilibili.playershared.FragmentVideo", [{ no: 1, name: "videos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => FragmentVideoInfo }]); } - /** - * Convert the message to canonical JSON value. - * - * You have to provide the `typeRegistry` option so that the - * packed message can be converted to JSON. - * - * The `typeRegistry` option is also required to read - * `google.protobuf.Any` from JSON format. - */ - internalJsonWrite(any, options) { - if (any.typeUrl === "") return {}; - let typeName = this.typeUrlToName(any.typeUrl); - let opt = jsonWriteOptions(options); - let type = opt.typeRegistry?.find(t => t.typeName === typeName); - if (!type) throw new globalThis.Error("Unable to convert google.protobuf.Any with typeUrl '" + any.typeUrl + "' to JSON. The specified type " + typeName + " is not available in the type registry."); - let value = type.fromBinary(any.value, { readUnknownField: false }); - let json = type.internalJsonWrite(value, opt); - if (typeName.startsWith("google.protobuf.") || !isJsonObject(json)) json = { value: json }; - json["@type"] = any.typeUrl; - return json; + } + const FragmentVideo = new FragmentVideo$Type(); + class FragmentVideoInfo$Type extends MessageType { + constructor() { + super("bilibili.playershared.FragmentVideoInfo", [ + //{ no: 1, name: "fragment_info", kind: "message", T: () => FragmentInfo }, + { no: 2, name: "vod_info", kind: "message", T: () => VodInfo }, + //{ no: 3, name: "play_arc_conf", kind: "message", T: () => PlayArcConf }, + //{ no: 4, name: "dimension", kind: "message", T: () => Dimension }, + { no: 5, name: "timelength", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + //{ no: 6, name: "video_type", kind: "enum", T: () => ["bilibili.playershared.BizType", BizType, "BIZ_TYPE_"] }, + { no: 7, name: "playable_status", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + ]); } - internalJsonRead(json, options, target) { - if (!isJsonObject(json)) throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON " + typeofJsonValue(json) + "."); - if (typeof json["@type"] != "string" || json["@type"] == "") return this.create(); - let typeName = this.typeUrlToName(json["@type"]); - let type = options?.typeRegistry?.find(t => t.typeName == typeName); - if (!type) throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON. The specified type " + typeName + " is not available in the type registry."); - let value; - if (typeName.startsWith("google.protobuf.") && json.hasOwnProperty("value")) value = type.fromJson(json["value"], options); - else { - let copy = Object.assign({}, json); - delete copy["@type"]; - value = type.fromJson(copy, options); - } - if (target === undefined) target = this.create(); - target.typeUrl = json["@type"]; - target.value = type.toBinary(value); - return target; + } + const FragmentVideoInfo = new FragmentVideoInfo$Type(); + class ResponseUrl$Type extends MessageType { + constructor() { + super("bilibili.playershared.ResponseUrl", [ + { no: 1, name: "order", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "length", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 3, name: "size", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 4, name: "url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "backup_url", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "md5", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + ]); } - typeNameToUrl(name) { - if (!name.length) throw new Error("invalid type name: " + name); - return "type.googleapis.com/" + name; + } + const ResponseUrl = new ResponseUrl$Type(); + class SegmentVideo$Type extends MessageType { + constructor() { + super("bilibili.playershared.SegmentVideo", [{ no: 1, name: "segment", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ResponseUrl }]); } - typeUrlToName(url) { - if (!url.length) throw new Error("invalid type url: " + url); - let slash = url.lastIndexOf("/"); - let name = slash > 0 ? url.substring(slash + 1) : url; - if (!name.length) throw new Error("invalid type url: " + url); - return name; + } + const SegmentVideo = new SegmentVideo$Type(); + class VodInfo$Type extends MessageType { + constructor() { + super("bilibili.playershared.VodInfo", [ + { no: 1, name: "quality", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "format", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "timelength", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 4, name: "video_codecid", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "stream_list", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Stream }, + //{ no: 6, name: "dash_audio", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DashItem }, + //{ no: 7, name: "dolby", kind: "message", T: () => DolbyItem }, + //{ no: 8, name: "volume", kind: "message", T: () => VolumeInfo }, + //{ no: 9, name: "loss_less_item", kind: "message", T: () => LossLessItem }, + //{ no: 10, name: "support_project", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); } } - const Any = new Any$Type(); + const VodInfo = new VodInfo$Type(); /****************** initialization finish *******************/ - switch (PATHs?.[0]) { - case "bilibili.app.viewunite.v1.View": - /****************** initialization start *******************/ - /****************** initialization finish *******************/ - switch (PATHs?.[1]) { - case "View": // 播放页 - break; - } - break; - case "bilibili.app.playerunite.v1.Player": { + switch (PATHs?.[1]) { + case "PlayViewUnite": { + // 播放页 /****************** initialization start *******************/ - class Stream$Type extends MessageType { - constructor() { - super("bilibili.playershared.Stream", [ - { no: 1, name: "stream_info", kind: "message", T: () => StreamInfo }, - { no: 2, name: "dash_video", kind: "message", oneof: "content", T: () => DashVideo }, - { no: 3, name: "segment_video", kind: "message", oneof: "content", T: () => SegmentVideo }, - ]); - } - } - const Stream = new Stream$Type(); - class StreamInfo$Type extends MessageType { + class PlayViewUniteReply$Type extends MessageType { constructor() { - super("bilibili.playershared.StreamInfo", [ - { no: 1, name: "quality", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, - { no: 2, name: "format", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "err_code", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, - //{ no: 5, name: "limit", kind: "message", T: () => StreamLimit }, - { no: 6, name: "need_vip", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 7, name: "need_login", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 8, name: "intact", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 9, name: "no_rexcode", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 10, name: "attribute", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, - { no: 11, name: "new_description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 12, name: "display_desc", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 13, name: "superscript", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 14, name: "vip_free", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 15, name: "subtitle", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - //{ no: 16, name: "scheme", kind: "message", T: () => Scheme }, - { no: 17, name: "support_drm", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + super("bilibili.app.playerunite.v1.PlayViewUniteReply", [ + { no: 1, name: "vod_info", kind: "message", T: () => VodInfo }, + //{ no: 2, name: "play_arc_conf", kind: "message", T: () => PlayArcConf }, + //{ no: 3, name: "play_device_conf", kind: "message", T: () => PlayDeviceConf }, + //{ no: 4, name: "event", kind: "message", T: () => Event }, + //{ no: 5, name: "supplement", kind: "message", T: () => Any }, + //{ no: 6, name: "play_arc", kind: "message", T: () => PlayArc }, + //{ no: 7, name: "qn_trial_info", kind: "message", T: () => QnTrialInfo }, + //{ no: 8, name: "history", kind: "message", T: () => History }, + //{ no: 9, name: "view_info", kind: "message", T: () => ViewInfo }, + { no: 10, name: "fragment_video", kind: "message", T: () => FragmentVideo }, ]); } } - const StreamInfo = new StreamInfo$Type(); - class DashVideo$Type extends MessageType { - constructor() { - super("bilibili.playershared.DashVideo", [ - { no: 1, name: "base_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "backup_url", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "bandwidth", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, - { no: 4, name: "codecid", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, - { no: 5, name: "md5", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 6, name: "size", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, - { no: 7, name: "audio_id", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, - { no: 8, name: "no_rexcode", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 9, name: "frame_rate", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 10, name: "width", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, - { no: 11, name: "height", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, - { no: 12, name: "widevine_pssh", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - ]); - } - } - const DashVideo = new DashVideo$Type(); - class FragmentVideo$Type extends MessageType { - constructor() { - super("bilibili.playershared.FragmentVideo", [{ no: 1, name: "videos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => FragmentVideoInfo }]); - } - } - const FragmentVideo = new FragmentVideo$Type(); - class FragmentVideoInfo$Type extends MessageType { - constructor() { - super("bilibili.playershared.FragmentVideoInfo", [ - //{ no: 1, name: "fragment_info", kind: "message", T: () => FragmentInfo }, - { no: 2, name: "vod_info", kind: "message", T: () => VodInfo }, - //{ no: 3, name: "play_arc_conf", kind: "message", T: () => PlayArcConf }, - //{ no: 4, name: "dimension", kind: "message", T: () => Dimension }, - { no: 5, name: "timelength", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, - //{ no: 6, name: "video_type", kind: "enum", T: () => ["bilibili.playershared.BizType", BizType, "BIZ_TYPE_"] }, - { no: 7, name: "playable_status", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - ]); - } - } - const FragmentVideoInfo = new FragmentVideoInfo$Type(); - class ResponseUrl$Type extends MessageType { - constructor() { - super("bilibili.playershared.ResponseUrl", [ - { no: 1, name: "order", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, - { no: 2, name: "length", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, - { no: 3, name: "size", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, - { no: 4, name: "url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 5, name: "backup_url", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, - { no: 6, name: "md5", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - ]); - } - } - const ResponseUrl = new ResponseUrl$Type(); - class SegmentVideo$Type extends MessageType { - constructor() { - super("bilibili.playershared.SegmentVideo", [{ no: 1, name: "segment", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ResponseUrl }]); - } - } - const SegmentVideo = new SegmentVideo$Type(); - class VodInfo$Type extends MessageType { - constructor() { - super("bilibili.playershared.VodInfo", [ - { no: 1, name: "quality", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, - { no: 2, name: "format", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "timelength", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, - { no: 4, name: "video_codecid", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, - { no: 5, name: "stream_list", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Stream }, - //{ no: 6, name: "dash_audio", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DashItem }, - //{ no: 7, name: "dolby", kind: "message", T: () => DolbyItem }, - //{ no: 8, name: "volume", kind: "message", T: () => VolumeInfo }, - //{ no: 9, name: "loss_less_item", kind: "message", T: () => LossLessItem }, - //{ no: 10, name: "support_project", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } - ]); - } - } - const VodInfo = new VodInfo$Type(); + const PlayViewUniteReply = new PlayViewUniteReply$Type(); /****************** initialization finish *******************/ - switch (PATHs?.[1]) { - case "PlayViewUnite": { - // 播放页 - /****************** initialization start *******************/ - class PlayViewUniteReply$Type extends MessageType { - constructor() { - super("bilibili.app.playerunite.v1.PlayViewUniteReply", [ - { no: 1, name: "vod_info", kind: "message", T: () => VodInfo }, - //{ no: 2, name: "play_arc_conf", kind: "message", T: () => PlayArcConf }, - //{ no: 3, name: "play_device_conf", kind: "message", T: () => PlayDeviceConf }, - //{ no: 4, name: "event", kind: "message", T: () => Event }, - //{ no: 5, name: "supplement", kind: "message", T: () => Any }, - //{ no: 6, name: "play_arc", kind: "message", T: () => PlayArc }, - //{ no: 7, name: "qn_trial_info", kind: "message", T: () => QnTrialInfo }, - //{ no: 8, name: "history", kind: "message", T: () => History }, - //{ no: 9, name: "view_info", kind: "message", T: () => ViewInfo }, - { no: 10, name: "fragment_video", kind: "message", T: () => FragmentVideo }, - ]); - } - } - const PlayViewUniteReply = new PlayViewUniteReply$Type(); - /****************** initialization finish *******************/ - let data = PlayViewUniteReply.fromBinary(body); - log(`🚧 data: ${JSON.stringify(data)}`, ""); - let UF = UnknownFieldHandler.list(data); - //log(`🚧 UF: ${JSON.stringify(UF)}`, ""); - if (UF) { - UF = UF.map(uf => { - //uf.no; // 22 - //uf.wireType; // WireType.Varint - // use the binary reader to decode the raw data: - let reader = new BinaryReader(uf.data); - let addedNumber = reader.int32(); // 7777 - log(`🚧 no: ${uf.no}, wireType: ${uf.wireType}, addedNumber: ${addedNumber}`, ""); + let data = PlayViewUniteReply.fromBinary(body); + log(`🚧 data: ${JSON.stringify(data)}`, ""); + let UF = UnknownFieldHandler.list(data); + //log(`🚧 UF: ${JSON.stringify(UF)}`, ""); + if (UF) { + UF = UF.map(uf => { + //uf.no; // 22 + //uf.wireType; // WireType.Varint + // use the binary reader to decode the raw data: + let reader = new BinaryReader(uf.data); + let addedNumber = reader.int32(); // 7777 + log(`🚧 no: ${uf.no}, wireType: ${uf.wireType}, addedNumber: ${addedNumber}`, ""); + }); + } + data.vodInfo.streamList = data.vodInfo.streamList.map(stream => { + switch (stream?.content?.oneofKind) { + case "dashVideo": + stream.content.dashVideo.baseUrl = stream.content.dashVideo.backupUrl.at(-1); + break; + case "SegmentVideo": + stream.content.segmentVideo.segment = stream.content.segmentVideo.segment.map(segment => { + segment.url = segment.backupUrl.at(-1); + return segment; }); - } - data.vodInfo.streamList = data.vodInfo.streamList.map(stream => { - switch (stream?.content?.oneofKind) { - case "dashVideo": - stream.content.dashVideo.baseUrl = stream.content.dashVideo.backupUrl.at(-1); - break; - case "SegmentVideo": - stream.content.segmentVideo.segment = stream.content.segmentVideo.segment.map(segment => { - segment.url = segment.backupUrl.at(-1); - return segment; - }); - break; - } - return stream; - }); - log(`🚧 data: ${JSON.stringify(data)}`, ""); - body = PlayViewUniteReply.toBinary(data); - break; + break; } - } + return stream; + }); + log(`🚧 data: ${JSON.stringify(data)}`, ""); + body = PlayViewUniteReply.toBinary(data); break; } - case "bilibili.app.playurl.v1.PlayURL": // 普通视频 - /****************** initialization start *******************/ - /****************** initialization finish *******************/ - switch (PATHs?.[1]) { - case "PlayView": // 播放地址 - break; - case "PlayConf": // 播放配置 - break; - } + } + break; + } + case "bilibili.app.playurl.v1.PlayURL": // 普通视频 + /****************** initialization start *******************/ + /****************** initialization finish *******************/ + switch (PATHs?.[1]) { + case "PlayView": // 播放地址 + break; + case "PlayConf": // 播放配置 break; - case "bilibili.pgc.gateway.player.v2.PlayURL": // 番剧 + } + break; + case "bilibili.pgc.gateway.player.v2.PlayURL": // 番剧 + /****************** initialization start *******************/ + /****************** initialization finish *******************/ + infoGroup.type = "PGC"; + switch (PATHs?.[1]) { + case "PlayView": // 播放地址 /****************** initialization start *******************/ /****************** initialization finish *******************/ - infoGroup.type = "PGC"; - switch (PATHs?.[1]) { - case "PlayView": // 播放地址 - /****************** initialization start *******************/ - /****************** initialization finish *******************/ - break; - case "PlayConf": // 播放配置 - break; - } break; - case "bilibili.app.nativeact.v1.NativeAct": // 活动-节目、动画、韩综(港澳台) - switch (PATHs?.[1]) { - case "Index": // 首页 - break; - } + case "PlayConf": // 播放配置 break; - case "bilibili.app.interface.v1.Search": // 搜索框 - switch (PATHs?.[1]) { - case "Suggest3": // 搜索建议 - break; - } + } + break; + case "bilibili.app.nativeact.v1.NativeAct": // 活动-节目、动画、韩综(港澳台) + switch (PATHs?.[1]) { + case "Index": // 首页 break; - case "bilibili.polymer.app.search.v1.Search": // 搜索结果 + } + break; + case "bilibili.app.interface.v1.Search": // 搜索框 + switch (PATHs?.[1]) { + case "Suggest3": // 搜索建议 + break; + } + break; + case "bilibili.polymer.app.search.v1.Search": // 搜索结果 + /****************** initialization start *******************/ + /****************** initialization finish *******************/ + switch (PATHs?.[1]) { + case "SearchAll": { + // 全部结果(综合) /****************** initialization start *******************/ /****************** initialization finish *******************/ - switch (PATHs?.[1]) { - case "SearchAll": { - // 全部结果(综合) - /****************** initialization start *******************/ - /****************** initialization finish *******************/ - break; - } - case "SearchByType": { - // 分类结果(番剧、用户、影视、专栏) - break; - } - } break; + } + case "SearchByType": { + // 分类结果(番剧、用户、影视、专栏) + break; + } } break; - } } - rawBody = gRPC.encode(rawBody); break; } - // 写入二进制数据 - $response.body = rawBody; + rawBody = gRPC.encode(rawBody); break; - } } - log(`🚧 信息组, infoGroup: ${JSON.stringify(infoGroup)}`, ""); + // 写入二进制数据 + $response.body = rawBody; break; } - case false: - break; } + log(`🚧 信息组, infoGroup: ${JSON.stringify(infoGroup)}`, ""); })() .catch(e => logError(e)) .finally(() => done($response)); diff --git a/src/types.d.ts b/src/types.d.ts index 607eddf..d628163 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -1,12 +1,4 @@ export interface Settings { - /** - * 总功能开关 - * - * 是否启用此APP修改 - * - * @defaultValue true - */ - Switch?: boolean; Host?: { /** * [主机名] 重定向 Akamaized CDN (港澳台) diff --git a/template/boxjs.settings.json b/template/boxjs.settings.json index 8286dc9..ef09dc9 100644 --- a/template/boxjs.settings.json +++ b/template/boxjs.settings.json @@ -1 +1 @@ -[{"id":"@BiliBili.Redirect.Settings.Switch","name":"总功能开关","type":"boolean","val":true,"desc":"是否启用此APP修改"},{"id":"@BiliBili.Redirect.Settings.Host.Akamaized","name":"[主机名] 重定向 Akamaized CDN (港澳台)","type":"selects","val":"upos-sz-mirrorali.bilivideo.com","items":[{"key":"upos-sz-mirrorali.bilivideo.com","label":"阿里云 CDN"},{"key":"upos-sz-mirrorcos.bilivideo.com","label":"腾讯云 CDN"},{"key":"upos-sz-mirrorhw.bilivideo.com","label":"华为云 CDN,融合 CDN"},{"key":"upos-sz-mirroraliov.bilivideo.com","label":"阿里云 CDN,海外"},{"key":"upos-sz-mirrorcosov.bilivideo.com","label":"腾讯云 CDN,海外"},{"key":"upos-sz-mirrorhwov.bilivideo.com","label":"华为云 CDN,海外"}],"desc":"请选择 Akamaized 要重定向的主机名。"},{"id":"@BiliBili.Redirect.Settings.Host.BStar","name":"[主机名] 重定向 BStar CDN (国际版)","type":"selects","val":"upos-sz-mirrorali.bilivideo.com","items":[{"key":"upos-sz-mirrorali.bilivideo.com","label":"阿里云 CDN"},{"key":"upos-sz-mirrorcos.bilivideo.com","label":"腾讯云 CDN"},{"key":"upos-sz-mirrorhw.bilivideo.com","label":"华为云 CDN,融合 CDN"},{"key":"upos-sz-mirroraliov.bilivideo.com","label":"阿里云 CDN,海外"},{"key":"upos-sz-mirrorcosov.bilivideo.com","label":"腾讯云 CDN,海外"},{"key":"upos-sz-mirrorhwov.bilivideo.com","label":"华为云 CDN,海外"}],"desc":"请选择 BStar 要重定向的主机名。"},{"id":"@BiliBili.Redirect.Settings.Host.PCDN","name":"[主机名] 重定向 PCDN 主机名 (中国大陆)","type":"selects","val":"upos-sz-mirrorali.bilivideo.com","items":[{"key":"upos-sz-mirrorali.bilivideo.com","label":"阿里云 CDN"},{"key":"upos-sz-mirrorcos.bilivideo.com","label":"腾讯云 CDN"},{"key":"upos-sz-mirrorhw.bilivideo.com","label":"华为云 CDN,融合 CDN"},{"key":"upos-sz-mirroraliov.bilivideo.com","label":"阿里云 CDN,海外"},{"key":"upos-sz-mirrorcosov.bilivideo.com","label":"腾讯云 CDN,海外"},{"key":"upos-sz-mirrorhwov.bilivideo.com","label":"华为云 CDN,海外"}],"desc":"请选择 PCDN 要重定向的主机名。"},{"id":"@BiliBili.Redirect.Settings.Host.MCDN","name":"[主机名] 重定向 MCDN 主机名 (中国大陆)","type":"selects","val":"proxy-tf-all-ws.bilivideo.com","items":[{"key":"proxy-tf-all-ws.bilivideo.com","label":"proxy-tf-all-ws.bilivideo.com"}],"desc":"请选择 MCDN 要重定向的主机名。"}] \ No newline at end of file +[{"id":"@BiliBili.Redirect.Settings.Host.Akamaized","name":"[主机名] 重定向 Akamaized CDN (港澳台)","type":"selects","val":"upos-sz-mirrorali.bilivideo.com","items":[{"key":"upos-sz-mirrorali.bilivideo.com","label":"阿里云 CDN"},{"key":"upos-sz-mirrorcos.bilivideo.com","label":"腾讯云 CDN"},{"key":"upos-sz-mirrorhw.bilivideo.com","label":"华为云 CDN,融合 CDN"},{"key":"upos-sz-mirroraliov.bilivideo.com","label":"阿里云 CDN,海外"},{"key":"upos-sz-mirrorcosov.bilivideo.com","label":"腾讯云 CDN,海外"},{"key":"upos-sz-mirrorhwov.bilivideo.com","label":"华为云 CDN,海外"}],"desc":"请选择 Akamaized 要重定向的主机名。"},{"id":"@BiliBili.Redirect.Settings.Host.BStar","name":"[主机名] 重定向 BStar CDN (国际版)","type":"selects","val":"upos-sz-mirrorali.bilivideo.com","items":[{"key":"upos-sz-mirrorali.bilivideo.com","label":"阿里云 CDN"},{"key":"upos-sz-mirrorcos.bilivideo.com","label":"腾讯云 CDN"},{"key":"upos-sz-mirrorhw.bilivideo.com","label":"华为云 CDN,融合 CDN"},{"key":"upos-sz-mirroraliov.bilivideo.com","label":"阿里云 CDN,海外"},{"key":"upos-sz-mirrorcosov.bilivideo.com","label":"腾讯云 CDN,海外"},{"key":"upos-sz-mirrorhwov.bilivideo.com","label":"华为云 CDN,海外"}],"desc":"请选择 BStar 要重定向的主机名。"},{"id":"@BiliBili.Redirect.Settings.Host.PCDN","name":"[主机名] 重定向 PCDN 主机名 (中国大陆)","type":"selects","val":"upos-sz-mirrorali.bilivideo.com","items":[{"key":"upos-sz-mirrorali.bilivideo.com","label":"阿里云 CDN"},{"key":"upos-sz-mirrorcos.bilivideo.com","label":"腾讯云 CDN"},{"key":"upos-sz-mirrorhw.bilivideo.com","label":"华为云 CDN,融合 CDN"},{"key":"upos-sz-mirroraliov.bilivideo.com","label":"阿里云 CDN,海外"},{"key":"upos-sz-mirrorcosov.bilivideo.com","label":"腾讯云 CDN,海外"},{"key":"upos-sz-mirrorhwov.bilivideo.com","label":"华为云 CDN,海外"}],"desc":"请选择 PCDN 要重定向的主机名。"},{"id":"@BiliBili.Redirect.Settings.Host.MCDN","name":"[主机名] 重定向 MCDN 主机名 (中国大陆)","type":"selects","val":"proxy-tf-all-ws.bilivideo.com","items":[{"key":"proxy-tf-all-ws.bilivideo.com","label":"proxy-tf-all-ws.bilivideo.com"}],"desc":"请选择 MCDN 要重定向的主机名。"}] \ No newline at end of file diff --git a/template/egern.handlebars b/template/egern.handlebars deleted file mode 100644 index d9b59d9..0000000 --- a/template/egern.handlebars +++ /dev/null @@ -1,51 +0,0 @@ -name: "{{@package 'displayName'}}" -description: |- - {{#each (split (@package 'description') "\n")}} - {{{this}}} - {{/each}} -open_url: "{{@package 'openUrl'}}" -author: |- - {{#each (@package 'contributors')}} - {{this}} - {{/each}} -homepage: "{{@package 'homepage'}}" -icon: "{{@package 'icon'}}" -category: "{{@package 'organizationName'}}" -date: "{{now "yyyy-MM-dd HH:mm:ss"}}" -version: "{{@package 'version'}}" -scriptings: -- http_request: - name: 📺 BiliBili.Redirect.CDN.upgcxcode.m4s - match: ^https?:\/\/.+\.bilivideo\.com\/upgcxcode\/ - script_url: https://github.com/BiliUniverse/Redirect/releases/download/v{{@package 'version'}}/request.bundle.js - arguments: - _compat.$argument: '' -- http_request: - name: 📺 BiliBili.Redirect.MCDN.v1.resource.m4s - match: ^https?:\/\/(.+):(8000|8082)\/v1\/resource\/ - script_url: https://github.com/BiliUniverse/Redirect/releases/download/v{{@package 'version'}}/request.bundle.js - arguments: - _compat.$argument: '' -- http_request: - name: 📺 BiliBili.Redirect.MCDN.upgcxcode.m4s - match: ^https?:\/\/[xy0-9]+\.mcdn\.bilivideo\.(cn|com):(4483|9102)\/upgcxcode\/ - script_url: https://github.com/BiliUniverse/Redirect/releases/download/v{{@package 'version'}}/request.bundle.js - arguments: - _compat.$argument: '' -- http_request: - name: 📺 BiliBili.Redirect.PCDN.upgcxcode.m4s - match: ^https?:\/\/(.+):4480\/upgcxcode\/ - script_url: https://github.com/BiliUniverse/Redirect/releases/download/v{{@package 'version'}}/request.bundle.js - arguments: - _compat.$argument: '' -- http_request: - name: 📺 BiliBili.Redirect.Akamaized.upgcxcode.m4s - match: ^https?:\/\/upos-(hz|bstar1)-mirrorakam\.akamaized\.net/upgcxcode\/ - script_url: https://github.com/BiliUniverse/Redirect/releases/download/v{{@package 'version'}}/request.bundle.js - arguments: - _compat.$argument: '' -mitm: - hostnames: - - '*.mcdn.bilivideo.cn' - - upos-sz-mirror*bstar1.bilivideo.com - - upos-*-mirrorakam.akamaized.net