From 59fc1fa047af832009ba58db71662b142445f29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=84=86=E8=96=AF=E9=A5=BC?= Date: Tue, 10 Dec 2024 15:40:37 +0800 Subject: [PATCH] feat: Console.logLevel Update arguments-builder.config.ts Update boxjs.settings.json Update response.dev.js Update request.dev.js Update database.mjs Update response.js Update request.js Update setENV.mjs Update types.d.ts --- arguments-builder.config.ts | 154 ++---------- package-lock.json | 470 +++++++++++++++++------------------ package.json | 2 +- src/function/database.mjs | 37 +-- src/function/setCache.mjs | 2 +- src/function/setCaptions.mjs | 81 +++--- src/function/setENV.mjs | 8 +- src/request.dev.js | 3 +- src/request.js | 2 +- src/response.dev.js | 3 +- src/response.js | 2 +- src/types.d.ts | 64 +++-- template/boxjs.settings.json | 2 +- 13 files changed, 364 insertions(+), 466 deletions(-) diff --git a/arguments-builder.config.ts b/arguments-builder.config.ts index 0c79ac7..0c0a8f3 100644 --- a/arguments-builder.config.ts +++ b/arguments-builder.config.ts @@ -60,8 +60,7 @@ export default defineConfig({ label: "翻译歌词(翻译器)", }, ], - description: - "请选择要添加的歌词选项,如果为多选,则会自动决定提供的歌词类型。", + description: "请选择要添加的歌词选项,如果为多选,则会自动决定提供的歌词类型。", }, { key: "AutoCC", @@ -87,140 +86,6 @@ export default defineConfig({ ], description: "主语言(源语言)字幕的显示位置。", }, - { - key: "Languages[0]", - name: "[翻译器] 主语言(源语言)", - defaultValue: "AUTO", - type: "string", - boxJsType: "selects", - description: - "仅当源语言识别不准确时更改此选项。", - options: [ - { - "key": "AUTO", - "label": "自动 - Automatic" - }, - { - "key": "ZH", - "label": "中文(自动)" - }, - { - "key": "ZH-HANS", - "label": "中文(简体)" - }, - { - "key": "ZH-HK", - "label": "中文(香港)" - }, - { - "key": "ZH-HANT", - "label": "中文(繁体)" - }, - { - "key": "EN", - "label": "English - 英语(自动)" - }, - { - "key": "ES", - "label": "Español - 西班牙语(自动)" - }, - { - "key": "JA", - "label": "日本語 - 日语" - }, - { - "key": "KO", - "label": "한국어 - 韩语" - }, - { - "key": "DE", - "label": "Deutsch - 德语" - }, - { - "key": "FR", - "label": "Français - 法语" - }, - { - "key": "TR", - "label": "Türkçe - 土耳其语" - }, - { - "key": "KM", - "label": "ភាសាខ្មែរ - 高棉语" - } - ], - }, - { - key: "Languages[1]", - name: "[翻译器] 副语言(目标语言)", - defaultValue: "ZH", - type: "string", - boxJsType: "selects", - description: - "请指定翻译歌词的目标语言。", - options: [ - { - "key": "ZH", - "label": "中文(自动)" - }, - { - "key": "ZH-HANS", - "label": "中文(简体)" - }, - { - "key": "ZH-HK", - "label": "中文(香港)" - }, - { - "key": "ZH-HANT", - "label": "中文(繁体)" - }, - { - "key": "EN", - "label": "English - 英语(自动)" - }, - { - "key": "EN-US", - "label": "英语(美国)" - }, - { - "key": "ES", - "label": "Español - 西班牙语(自动)" - }, - { - "key": "ES-ES", - "label": "Español - 西班牙语" - }, - { - "key": "ES-419", - "label": "西班牙语(拉丁美洲)" - }, - { - "key": "JA", - "label": "日本語 - 日语" - }, - { - "key": "KO", - "label": "한국어 - 韩语" - }, - { - "key": "DE", - "label": "Deutsch - 德语" - }, - { - "key": "FR", - "label": "Français - 法语" - }, - { - "key": "TR", - "label": "Türkçe - 土耳其语" - }, - { - "key": "KM", - "label": "ភាសាខ្មែរ - 高棉语" - } - ], - }, { key: "Vendor", name: "[翻译器] 服务商API", @@ -243,7 +108,22 @@ export default defineConfig({ name: "[翻译器] 只显示“自动翻译”字幕", defaultValue: false, type: "boolean", - description: "是否仅显示“自动翻译”后的字幕,不显示源语言字幕。", + description: "是否仅显示“自动翻译”字幕,不显示源语言字幕。", + }, + { + key: "LogLevel", + name: "[调试] 日志等级", + type: "string", + defaultValue: "WARN", + description: "选择脚本日志的输出等级,低于所选等级的日志将全部输出。", + options: [ + { key: "OFF", label: "关闭" }, + { key: "ERROR", label: "❌ 错误" }, + { key: "WARN", label: "⚠️ 警告" }, + { key: "INFO", label: "ℹ️ 信息" }, + { key: "DEBUG", label: "🅱️ 调试" }, + { key: "ALL", label: "全部" }, + ], }, ], }); diff --git a/package-lock.json b/package-lock.json index 2c216cb..6e11e0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "name": "@dualsubs/youtube", "license": "Apache-2.0", "dependencies": { - "@nsnanocat/util": "^1.7.5", + "@nsnanocat/util": "^1.7.6", "@protobuf-ts/runtime": "^2.9.3" }, "devDependencies": { @@ -144,21 +144,25 @@ } }, "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==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.6.tgz", + "integrity": "sha512-e8fGuQbA+pfsS2fGGRZgciyzstnkNrZCRIuOzgej9WCxPjHW3fn6h9SoJC3MrvfylMegiJPse94+mBJGf/qltQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/sourcemap-codec": "1.4.16-beta.0", "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" } }, + "node_modules/@jridgewell/gen-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.16-beta.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.16-beta.0.tgz", + "integrity": "sha512-qiZJiTfyb00BApxRU7Apz/3jtlp4gKgOmCXlGQRlIQ5zg6U0uYIb8lZBfbiJ+TxAEJ+rczfY07+CExd8sTRo5w==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", @@ -170,17 +174,6 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "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" - } - }, "node_modules/@jridgewell/source-map": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", @@ -231,9 +224,9 @@ } }, "node_modules/@jsonjoy.com/json-pack": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.1.0.tgz", - "integrity": "sha512-zlQONA+msXPPwHWZMKFVS78ewFczIll5lXiVPwFPCZUsrOKdxc2AvxU1HoNBmMRhqDZUR9HkC3UOm+6pME6Xsg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.1.1.tgz", + "integrity": "sha512-osjeBqMJ2lb/j/M8NCPjs1ylqWIcTRTycIhVB5pt6LgzgeRSb0YRZ7j9RfA8wIUrsr/medIuhVyonXRZWLyfdw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -355,9 +348,9 @@ } }, "node_modules/@nsnanocat/util": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@nsnanocat/util/-/util-1.7.5.tgz", - "integrity": "sha512-9PQFQV4iRMx7y+m2oKBTEc7zE7Ci4cevbHYqlW7mHggSTM2eI2srLlJ8952vfwPt8hEcHS7do7Cx+6QAT0fodA==", + "version": "1.7.6", + "resolved": "https://npm.pkg.github.com/download/@nsnanocat/util/1.7.6/4c7a65d6e991a2bfe1dd19651874bd3b3779d740", + "integrity": "sha512-vttYKFHhpl1O5r6jCXwyQ1n8i6RJ0oMUhTjXV2B6HZI2yucPnxK4ZVlAcM1zxee5+Wm7acGxRZXLGVXg7HV9hA==", "license": "Apache-2.0", "dependencies": { "pako": "^2.1.0" @@ -437,16 +430,16 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.5.0.tgz", - "integrity": "sha512-6TQAc/5uRILE6deixJ1CR8rXyTbzXIXNgO1D0Woi9Bqicz2FV5iKP3BHYEg6o4UATCMcbQQ0jbmeaOkn/HQk2w==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.6.0.tgz", + "integrity": "sha512-jESwj3APl78YUWHf28s2EjL0OIxcvl1uLU6Ge68KQ9ZXNsekUcbdr9dCi6vEO8naXS18lWXCV56shVkPStzXSQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "debug": "^4.3.7", + "debug": "^4.4.0", "extract-zip": "^2.0.1", "progress": "^2.0.3", - "proxy-agent": "^6.4.0", + "proxy-agent": "^6.5.0", "semver": "^7.6.3", "tar-fs": "^3.0.6", "unbzip2-stream": "^1.4.3", @@ -460,9 +453,9 @@ } }, "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==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -526,27 +519,27 @@ } }, "node_modules/@rspack/binding": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-1.1.5.tgz", - "integrity": "sha512-RsSkgi56Q5XUXut0qweLSE1C4Ogcm7g/ueKoOgsbHAYVKrCs9/dTFlPHWSIAaI7QWh0GWEePR/MM2O2HIu+1rw==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-1.1.6.tgz", + "integrity": "sha512-vfeBEgGOYVwqj5cQjGyvdfrr/BEihAHlyIsobL98FZjTF0uig+bj2yJUH5Ib5F0BpIUKVG3Pw0IjlUBqcVpZsQ==", "dev": true, "license": "MIT", "optionalDependencies": { - "@rspack/binding-darwin-arm64": "1.1.5", - "@rspack/binding-darwin-x64": "1.1.5", - "@rspack/binding-linux-arm64-gnu": "1.1.5", - "@rspack/binding-linux-arm64-musl": "1.1.5", - "@rspack/binding-linux-x64-gnu": "1.1.5", - "@rspack/binding-linux-x64-musl": "1.1.5", - "@rspack/binding-win32-arm64-msvc": "1.1.5", - "@rspack/binding-win32-ia32-msvc": "1.1.5", - "@rspack/binding-win32-x64-msvc": "1.1.5" + "@rspack/binding-darwin-arm64": "1.1.6", + "@rspack/binding-darwin-x64": "1.1.6", + "@rspack/binding-linux-arm64-gnu": "1.1.6", + "@rspack/binding-linux-arm64-musl": "1.1.6", + "@rspack/binding-linux-x64-gnu": "1.1.6", + "@rspack/binding-linux-x64-musl": "1.1.6", + "@rspack/binding-win32-arm64-msvc": "1.1.6", + "@rspack/binding-win32-ia32-msvc": "1.1.6", + "@rspack/binding-win32-x64-msvc": "1.1.6" } }, "node_modules/@rspack/binding-darwin-arm64": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.1.5.tgz", - "integrity": "sha512-eEynmyPPl+OGYQ9LRFwiQosyRfcca3OQB73akqY4mqDRl39OyiBjq7347DLHJysgbm9z+B1bsiLuh2xc6mdclQ==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.1.6.tgz", + "integrity": "sha512-x9dxm2yyiMuL1FBwvWNNMs2/mEUJmRoSRgYb8pblR7HDaTRORrjBFCqhaYlGyAqtQaeUy7o2VAQlE0BavIiFYA==", "cpu": [ "arm64" ], @@ -558,9 +551,9 @@ ] }, "node_modules/@rspack/binding-darwin-x64": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.1.5.tgz", - "integrity": "sha512-I6HPRgogewU5v1OKe3noEzq2U1FCEYAbW+smy+lPvpTW+3X6PlVMzTT4oelhB0EXDQ+KxjXH9KpOKON1hg/JGg==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.1.6.tgz", + "integrity": "sha512-o0seilveftGiDjy3VPxug20HmAgYyQbNEuagR3i93/t/PT/eWXHnik+C1jjwqcivZL1Zllqvy4tbZw393aROEQ==", "cpu": [ "x64" ], @@ -572,9 +565,9 @@ ] }, "node_modules/@rspack/binding-linux-arm64-gnu": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.5.tgz", - "integrity": "sha512-LQnqucNa6Dr6y3By+/M2ARO4jDR3AM+PuCsHgzlYT0RDRLS+Ow3f50WbNBf7eI/DhrEA0aucYL3sz1ljguB3EA==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.6.tgz", + "integrity": "sha512-4atnoknJx/c3KaQElsMIxHMpPf2jcRRdWsH/SdqJIRSrkWWakMK9Yv4TFwH680I4HDTMf1XLboMVScHzW8e+Mg==", "cpu": [ "arm64" ], @@ -586,9 +579,9 @@ ] }, "node_modules/@rspack/binding-linux-arm64-musl": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.5.tgz", - "integrity": "sha512-b9L/9HJxrWY4cezPWqgj28I9Xe2XxwLHu8x0CMGobwF2XKR0QQVLAst38RW/EusJ8TURdyvNEOuRZlWEIJuYOw==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.6.tgz", + "integrity": "sha512-7QMtwUtgFpt3/Y3/X18fSyN+kk4H8ZnZ8tDzQskVWc/j2AQYShZq56XQYqrhClzwujcCVAHauIQ2eiuJ2ASGag==", "cpu": [ "arm64" ], @@ -600,9 +593,9 @@ ] }, "node_modules/@rspack/binding-linux-x64-gnu": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.5.tgz", - "integrity": "sha512-0az52ZXTg/ErCGC1v/oFLWByKAiXvng4euv+prwMWF6p1pA7lfLRLzdibDFO4KgC16Zlfcg3hqs7YikLng4x+w==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.6.tgz", + "integrity": "sha512-MTjDEfPn4TwHoqs5d5Fck06kmXiTHZctGIcRVfrpg0RK0r1NLEHN+oosavRZ9c9H70f34+NmcHk+/qvV4c8lWg==", "cpu": [ "x64" ], @@ -614,9 +607,9 @@ ] }, "node_modules/@rspack/binding-linux-x64-musl": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.5.tgz", - "integrity": "sha512-EF/LJTtCTkuti2gJnCyvXHC5Q2L5M4+RXm5kj9Bfu/t0Zmmfe6Jd5QUsifgogioeL0ZsH/Pou5QiiVcOFcqFKQ==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.6.tgz", + "integrity": "sha512-LqDw7PTVr/4ZuGA0izgDQfamfr72USFHltR1Qhy2YVC3JmDmhG/pQi13LHcOLVaGH1xoeyCmEPNJpVizzDxSjg==", "cpu": [ "x64" ], @@ -628,9 +621,9 @@ ] }, "node_modules/@rspack/binding-win32-arm64-msvc": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.5.tgz", - "integrity": "sha512-VEqhK6HwIHby6gtOkxIx66SkqYndiaP1ddZ3X39RLE40TY3KlNgfG/SzbN9J5Qb+8jjq3ogV8n50+wLEGkhiWw==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.6.tgz", + "integrity": "sha512-RHApLM93YN0WdHpS35u2cm7VCqZ8Yg3CrNRL16VJtyT9e6MBqeScoe4XIgIWKPm7edFyedYAjLX0wQOApwfjkg==", "cpu": [ "arm64" ], @@ -642,9 +635,9 @@ ] }, "node_modules/@rspack/binding-win32-ia32-msvc": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.1.5.tgz", - "integrity": "sha512-Yi2BwYehc5/sRVgI7zTGYJKjnV8UszAJt/stWdFHaq82chHiuuF/tQd1WcBUq0Iin9ylBMo16mRJAuFkFmJ74Q==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.1.6.tgz", + "integrity": "sha512-Y6lx4q0eJawRfMPBo/AclTJAPTZ325DSPFBQJB3TnWh9Z2X7P7pQcYc8PHDmfDuYRIdg5WRsQRvVxihSvF7v8w==", "cpu": [ "ia32" ], @@ -656,9 +649,9 @@ ] }, "node_modules/@rspack/binding-win32-x64-msvc": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.5.tgz", - "integrity": "sha512-4UArXYqJO1Ni7TmCw1T11JnrwfpoThDdiQ9k1P1voBWK3bDahPEBOptk9ZPu2+ZuRX8hFrvumRKkLY3oy7fTMw==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.6.tgz", + "integrity": "sha512-UuCsfhC/yNuU7xLASOxNXcmsXi2ZvBX14GkxvcdChw6q7IIGNYUKXo1zgR8C1PE/6qDSxmLxbRMS+71d0H3HQg==", "cpu": [ "x64" ], @@ -670,9 +663,9 @@ ] }, "node_modules/@rspack/cli": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rspack/cli/-/cli-1.1.5.tgz", - "integrity": "sha512-R08aM5gEvRV9zSE9fIaTxT77Nu/kRtoghj9TqItFk0xTbFxai9jF1fwRTbnDv23yVGNCwPfwvPOmpqvrf3SGnQ==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@rspack/cli/-/cli-1.1.6.tgz", + "integrity": "sha512-404JTAadncCp81sDa7nGZdsT7r1Ry8fALR8Wkp9VMTUhWEFlbDGQvOTyali24pfyJxJTdsarSabmNhbDO5okJw==", "dev": true, "license": "MIT", "dependencies": { @@ -694,14 +687,14 @@ } }, "node_modules/@rspack/core": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rspack/core/-/core-1.1.5.tgz", - "integrity": "sha512-/FmxDeMuW8fJkhz8fHuCu7OiJHFKW78xclEu7LkEujWl4PqJgdWjUL/6FWIj50spRwj6PRfuc31hFSL4hbNfCA==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@rspack/core/-/core-1.1.6.tgz", + "integrity": "sha512-q0VLphOF5VW2FEG7Vbdq3Ke4I74FbELE/8xmKghSalFtULLZ44SoSz8lyotfMim9GXIRFhDokAaH8WICmPxG+g==", "dev": true, "license": "MIT", "dependencies": { "@module-federation/runtime-tools": "0.5.1", - "@rspack/binding": "1.1.5", + "@rspack/binding": "1.1.6", "@rspack/lite-tapable": "1.0.1", "caniuse-lite": "^1.0.30001616" }, @@ -1260,43 +1253,15 @@ } }, "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==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", "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", @@ -1960,17 +1925,16 @@ } }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "dev": true, "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" }, "engines": { "node": ">= 0.4" @@ -1979,6 +1943,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1990,9 +1968,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001686", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz", - "integrity": "sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA==", + "version": "1.0.30001687", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz", + "integrity": "sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==", "dev": true, "funding": [ { @@ -2078,6 +2056,16 @@ "devtools-protocol": "*" } }, + "node_modules/chromium-bidi/node_modules/zod": { + "version": "3.23.8", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", + "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, "node_modules/cipher-base": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", @@ -2677,6 +2665,21 @@ "url": "https://bevry.me/fund" } }, + "node_modules/dunder-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", + "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", @@ -2699,9 +2702,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.70", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.70.tgz", - "integrity": "sha512-P6FPqAWIZrC3sHDAwBitJBs7N7IF58m39XVny7DFseQXK2eiMn7nNQizFf63mWDDUnFvaqsM8FI0+ZZfLkdUGA==", + "version": "1.5.72", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.72.tgz", + "integrity": "sha512-ZpSAUOZ2Izby7qnZluSrAlGgGQzucmFbN0n64dYzocYxnxV5ufurpj3VgEe4cUp7ir9LmeLxNYo8bVnlM8bQHw==", "dev": true, "license": "ISC", "peer": true @@ -2792,14 +2795,11 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, "engines": { "node": ">= 0.4" } @@ -3024,9 +3024,9 @@ } }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dev": true, "license": "MIT", "dependencies": { @@ -3049,7 +3049,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -3064,6 +3064,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/extract-zip": { @@ -3088,9 +3092,9 @@ } }, "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==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -3357,17 +3361,20 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.5.tgz", + "integrity": "sha512-Y4+pKa7XeRUPWFNvOOYHkRYrfzW07oraURSvjDmRVOJ748OrVmeXtpE4+GCEHncjCjkTxPNRt8kEbxDhsn6VTg==", "dev": true, "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -3408,9 +3415,9 @@ } }, "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==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -3562,22 +3569,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-proto": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.1.0.tgz", - "integrity": "sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", @@ -3781,9 +3772,9 @@ } }, "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==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -3838,13 +3829,13 @@ "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==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "4" }, "engines": { @@ -3852,9 +3843,9 @@ } }, "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==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -4486,9 +4477,9 @@ } }, "node_modules/memfs": { - "version": "4.14.1", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.14.1.tgz", - "integrity": "sha512-Fq5CMEth+2iprLJ5mNizRcWuiwRZYjNkUD0zKk224jZunE9CRacTRDK8QLALbMBlNX2y3nY6lKZbesCwDwacig==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.15.0.tgz", + "integrity": "sha512-q9MmZXd2rRWHS6GU3WEm3HyiXZyyoA1DqdOhEq0lxPBmKb5S7IAOwX0RgUCwJfqjelDCySa5h8ujOy24LqsWcw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -4782,9 +4773,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "dev": true, "license": "MIT", "peer": true @@ -5073,29 +5064,29 @@ } }, "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==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.1.0.tgz", + "integrity": "sha512-Z5FnLVVZSnX7WjBg0mhDtydeRZ1xMcATZThjySQUHqr+0ksP8kqaw23fNKkaaN/Z8gwLUs/W7xdl0I75eP2Xyw==", "dev": true, "license": "MIT", "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.5", + "https-proxy-agent": "^7.0.6", "pac-resolver": "^7.0.1", - "socks-proxy-agent": "^8.0.4" + "socks-proxy-agent": "^8.0.5" }, "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==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -5263,9 +5254,9 @@ "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", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", "dev": true, "license": "MIT" }, @@ -5378,29 +5369,29 @@ } }, "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==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", + "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.1", - "https-proxy-agent": "^7.0.3", + "https-proxy-agent": "^7.0.6", "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.1", + "pac-proxy-agent": "^7.1.0", "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.2" + "socks-proxy-agent": "^8.0.5" }, "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==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -5470,18 +5461,18 @@ "license": "MIT" }, "node_modules/puppeteer": { - "version": "23.10.1", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.10.1.tgz", - "integrity": "sha512-kbcO+vu91fgUyBzEwByPe4q5lEEuBq4cuOZnZeRL42G7r5UrfbUFlxBJayXBLBsD6pREdk/92ZFwFQq3MaN6ww==", + "version": "23.10.2", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.10.2.tgz", + "integrity": "sha512-Iii2ZwdukXzEGeCxs2/GG8G+dbVCylnlBrTxZnMxLW/7w/ftoGq4VB2Bt1vwrbMIn1XwFqxYEWNEkZpIkcVfwg==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.5.0", + "@puppeteer/browsers": "2.6.0", "chromium-bidi": "0.8.0", "cosmiconfig": "^9.0.0", "devtools-protocol": "0.0.1367902", - "puppeteer-core": "23.10.1", + "puppeteer-core": "23.10.2", "typed-query-selector": "^2.12.0" }, "bin": { @@ -5492,15 +5483,15 @@ } }, "node_modules/puppeteer-core": { - "version": "23.10.1", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.10.1.tgz", - "integrity": "sha512-ey6NwixHYEUnhCA/uYi7uQQ4a0CZw4k+MatbHXGl5GEzaiRQziYUxc2HGpdQZ/gnh4KQWAKkocyIg1/dIm5d0g==", + "version": "23.10.2", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.10.2.tgz", + "integrity": "sha512-SEPjEbhPxRlzjGRCs8skwfnzFQj6XrZZmoMz0JIQbanj0fBpQ5HOGgyQTyh4YOW33q+461plJc5GfsQ+ErVBgQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.5.0", + "@puppeteer/browsers": "2.6.0", "chromium-bidi": "0.8.0", - "debug": "^4.3.7", + "debug": "^4.4.0", "devtools-protocol": "0.0.1367902", "typed-query-selector": "^2.12.0", "ws": "^8.18.0" @@ -5510,9 +5501,9 @@ } }, "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==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -6263,13 +6254,13 @@ } }, "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==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "^7.1.1", + "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" }, @@ -6278,9 +6269,9 @@ } }, "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==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -6357,9 +6348,9 @@ } }, "node_modules/spdy-transport/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -6382,9 +6373,9 @@ "license": "MIT" }, "node_modules/spdy/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -6644,9 +6635,9 @@ } }, "node_modules/terser": { - "version": "5.36.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", - "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.37.0.tgz", + "integrity": "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==", "dev": true, "license": "BSD-2-Clause", "peer": true, @@ -6708,11 +6699,14 @@ "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==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.2.tgz", + "integrity": "sha512-/MDslo7ZyWTA2vnk1j7XoDVfXsGk3tp+zFEJHJGm0UjIlQifonVFwlVbQDFh8KJzTBnT8ie115TYqir6bclddA==", "dev": true, - "license": "Apache-2.0" + "license": "Apache-2.0", + "dependencies": { + "b4a": "^1.6.4" + } }, "node_modules/thingies": { "version": "1.21.0", @@ -7088,9 +7082,9 @@ } }, "node_modules/webpack": { - "version": "5.97.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.0.tgz", - "integrity": "sha512-CWT8v7ShSfj7tGs4TLRtaOLmOCPWhoKEvp+eA7FVx8Xrjb3XfT0aXdxDItnRZmE8sHcH+a8ayDrJCOjXKxVFfQ==", + "version": "5.97.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz", + "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", "dev": true, "license": "MIT", "peer": true, @@ -7735,9 +7729,9 @@ } }, "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "version": "3.24.0", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.0.tgz", + "integrity": "sha512-Hz+wiY8yD0VLA2k/+nsg2Abez674dDGTai33SwNvMPuf9uIrBC9eFgIMQxBBbHFxVXi8W+5nX9DcAh9YNSQm/w==", "dev": true, "license": "MIT", "funding": { diff --git a/package.json b/package.json index b708d8f..badfd86 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "node-polyfill-webpack-plugin": "^4.0.0" }, "dependencies": { - "@nsnanocat/util": "^1.7.5", + "@nsnanocat/util": "^1.7.6", "@protobuf-ts/runtime": "^2.9.3" } } diff --git a/src/function/database.mjs b/src/function/database.mjs index a55a66b..778d641 100644 --- a/src/function/database.mjs +++ b/src/function/database.mjs @@ -1,22 +1,4 @@ export default { - Default: { - Settings: { - Type: "Translate", - Types: ["Official", "Translate"], - Languages: ["EN", "ZH"], - CacheSize: 50, - }, - Configs: { - breakLine: { - "text/xml": " ", - "application/xml": " ", - "text/vtt": "\n", - "application/vtt": "\n", - "text/json": "\n", - "application/json": "\n", - }, - }, - }, YouTube: { Settings: { Type: "Official", @@ -1060,4 +1042,23 @@ export default { }, }, }, + Default: { + Settings: { + Type: "Translate", + Types: ["Official", "Translate"], + Languages: ["EN", "ZH"], + CacheSize: 50, + LogLevel: "WARN", + }, + Configs: { + breakLine: { + "text/xml": " ", + "application/xml": " ", + "text/vtt": "\n", + "application/vtt": "\n", + "text/json": "\n", + "application/json": "\n", + }, + }, + }, }; diff --git a/src/function/setCache.mjs b/src/function/setCache.mjs index 0db4888..2c8eba8 100644 --- a/src/function/setCache.mjs +++ b/src/function/setCache.mjs @@ -13,4 +13,4 @@ export default function setCache(cache, cacheSize = 100) { cache = cache.slice(-cacheSize); // 限制缓存大小 Console.log("✅ Set Cache"); return cache; -}; +} diff --git a/src/function/setCaptions.mjs b/src/function/setCaptions.mjs index 06c0aec..5ff63a1 100644 --- a/src/function/setCaptions.mjs +++ b/src/function/setCaptions.mjs @@ -1,43 +1,44 @@ import { Console } from "@nsnanocat/util"; export default function setCaptions(captions, translationLanguages, hostname) { - Console.log("☑️ Set Captions"); - // 有播放器字幕列表渲染器 - if (captions?.playerCaptionsTracklistRenderer) { // 有播放器字幕列表渲染器 - Console.info("Tracklist"); - if (captions?.playerCaptionsTracklistRenderer?.captionTracks) { - // 改字幕可用性 - captions.playerCaptionsTracklistRenderer.captionTracks = captions?.playerCaptionsTracklistRenderer.captionTracks.map(caption => { - caption.isTranslatable = true; - return caption; - }); - }; - if (captions?.playerCaptionsTracklistRenderer?.audioTracks) { - // 改音轨可用性 - captions.playerCaptionsTracklistRenderer.audioTracks = captions?.playerCaptionsTracklistRenderer.audioTracks.map(audio => { - audio.visibility = 2 //"ON"; - audio.hasDefaultTrack = true; - audio.captionsInitialState = 3 //"CAPTIONS_INITIAL_STATE_ON_RECOMMENDED"; - return audio; - }); - }; - // 增加自动翻译可用语言 - switch (hostname) { - case "www.youtube.com": - case "tv.youtube.com": - default: - captions.playerCaptionsTracklistRenderer.translationLanguages = translationLanguages.DESKTOP; - break; - case "m.youtube.com": - case "youtubei.googleapis.com": - captions.playerCaptionsTracklistRenderer.translationLanguages = translationLanguages.MOBILE; - break; - }; - // 改默认字幕索引值,来指定“源语言”,从而启用“自动翻译” - if (!captions?.playerCaptionsTracklistRenderer?.defaultCaptionTrackIndex) { - captions.playerCaptionsTracklistRenderer.defaultCaptionTrackIndex = 0; - }; - }; - Console.log("✅ Set Captions"); - return captions; -}; + Console.log("☑️ Set Captions"); + // 有播放器字幕列表渲染器 + if (captions?.playerCaptionsTracklistRenderer) { + // 有播放器字幕列表渲染器 + Console.info("Tracklist"); + if (captions?.playerCaptionsTracklistRenderer?.captionTracks) { + // 改字幕可用性 + captions.playerCaptionsTracklistRenderer.captionTracks = captions?.playerCaptionsTracklistRenderer.captionTracks.map(caption => { + caption.isTranslatable = true; + return caption; + }); + } + if (captions?.playerCaptionsTracklistRenderer?.audioTracks) { + // 改音轨可用性 + captions.playerCaptionsTracklistRenderer.audioTracks = captions?.playerCaptionsTracklistRenderer.audioTracks.map(audio => { + audio.visibility = 2; //"ON"; + audio.hasDefaultTrack = true; + audio.captionsInitialState = 3; //"CAPTIONS_INITIAL_STATE_ON_RECOMMENDED"; + return audio; + }); + } + // 增加自动翻译可用语言 + switch (hostname) { + case "www.youtube.com": + case "tv.youtube.com": + default: + captions.playerCaptionsTracklistRenderer.translationLanguages = translationLanguages.DESKTOP; + break; + case "m.youtube.com": + case "youtubei.googleapis.com": + captions.playerCaptionsTracklistRenderer.translationLanguages = translationLanguages.MOBILE; + break; + } + // 改默认字幕索引值,来指定“源语言”,从而启用“自动翻译” + if (!captions?.playerCaptionsTracklistRenderer?.defaultCaptionTrackIndex) { + captions.playerCaptionsTracklistRenderer.defaultCaptionTrackIndex = 0; + } + } + Console.log("✅ Set Captions"); + return captions; +} diff --git a/src/function/setENV.mjs b/src/function/setENV.mjs index 0b964d6..3422245 100644 --- a/src/function/setENV.mjs +++ b/src/function/setENV.mjs @@ -13,17 +13,17 @@ export default function setENV(name, platforms, database) { Console.log("☑️ Set Environment Variables"); const { Settings, Caches, Configs } = getStorage(name, platforms, database); /***************** Settings *****************/ - if (!Array.isArray(Settings?.Types)) Settings.Types = (Settings.Types) ? [Settings.Types] : []; // 只有一个选项时,无逗号分隔 - Console.debug(`typeof Settings: ${typeof Settings}`, `Settings: ${JSON.stringify(Settings)}`); + if (!Array.isArray(Settings?.Types)) Settings.Types = Settings.Types ? [Settings.Types] : []; // 只有一个选项时,无逗号分隔 + Console.info(`typeof Settings: ${typeof Settings}`, `Settings: ${JSON.stringify(Settings)}`); /***************** Caches *****************/ - //Console.debug(`typeof Caches: ${typeof Caches}`, `Caches: ${JSON.stringify(Caches)}`); if (typeof Caches?.Playlists !== "object" || Array.isArray(Caches?.Playlists)) Caches.Playlists = {}; // 创建Playlists缓存 Caches.Playlists.Master = new Map(JSON.parse(Caches?.Playlists?.Master || "[]")); // Strings转Array转Map Caches.Playlists.Subtitle = new Map(JSON.parse(Caches?.Playlists?.Subtitle || "[]")); // Strings转Array转Map if (typeof Caches?.Subtitles !== "object") Caches.Subtitles = new Map(JSON.parse(Caches?.Subtitles || "[]")); // Strings转Array转Map if (typeof Caches?.Metadatas !== "object" || Array.isArray(Caches?.Metadatas)) Caches.Metadatas = {}; // 创建Playlists缓存 if (typeof Caches?.Metadatas?.Tracks !== "object") Caches.Metadatas.Tracks = new Map(JSON.parse(Caches?.Metadatas?.Tracks || "[]")); // Strings转Array转Map + //Console.debug(`typeof Caches: ${typeof Caches}`, `Caches: ${JSON.stringify(Caches)}`); /***************** Configs *****************/ Console.log("✅ Set Environment Variables"); return { Settings, Caches, Configs }; -}; +} diff --git a/src/request.dev.js b/src/request.dev.js index 3718c81..67aab9c 100644 --- a/src/request.dev.js +++ b/src/request.dev.js @@ -8,7 +8,6 @@ import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, Me // 构造回复数据 // biome-ignore lint/style/useConst: let $response = undefined; -Console.logLevel = "DEBUG"; /***************** Processing *****************/ // 解构URL const url = new URL($request.url); @@ -19,7 +18,7 @@ Console.info(`PATHs: ${PATHs}`); // 解析格式 const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["content-type"])?.split(";")?.[0]; Console.info(`FORMAT: ${FORMAT}`); -!(async () => { +(async () => { /** * 设置 * @type {{Settings: import('./types').Settings}} diff --git a/src/request.js b/src/request.js index 2e623ac..62348be 100644 --- a/src/request.js +++ b/src/request.js @@ -17,7 +17,7 @@ Console.info(`PATHs: ${PATHs}`); // 解析格式 const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["content-type"])?.split(";")?.[0]; Console.info(`FORMAT: ${FORMAT}`); -!(async () => { +(async () => { /** * 设置 * @type {{Settings: import('./types').Settings}} diff --git a/src/response.dev.js b/src/response.dev.js index d486e66..734faea 100644 --- a/src/response.dev.js +++ b/src/response.dev.js @@ -6,7 +6,6 @@ import setCaptions from "./function/setCaptions.mjs"; import { GetWatchResponse } from "./protobuf/google/protos/youtube/api/innertube/GetWatchResponse.js"; import { PlayerResponse } from "./protobuf/google/protos/youtube/api/innertube/PlayerResponse.js"; import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, MessageType, BinaryReader, isJsonObject, typeofJsonValue, jsonWriteOptions } from "@protobuf-ts/runtime"; -Console.logLevel = "DEBUG"; /***************** Processing *****************/ // 解构URL const url = new URL($request.url); @@ -17,7 +16,7 @@ Console.info(`PATHs: ${PATHs}`); // 解析格式 const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; Console.info(`FORMAT: ${FORMAT}`); -!(async () => { +(async () => { /** * 设置 * @type {{Settings: import('./types').Settings}} diff --git a/src/response.js b/src/response.js index 54233f6..7531b42 100644 --- a/src/response.js +++ b/src/response.js @@ -16,7 +16,7 @@ Console.info(`PATHs: ${PATHs}`); // 解析格式 const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; Console.info(`FORMAT: ${FORMAT}`); -!(async () => { +(async () => { /** * 设置 * @type {{Settings: import('./types').Settings}} diff --git a/src/types.d.ts b/src/types.d.ts index 80aebbc..f13f849 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -1,14 +1,6 @@ export interface Settings { /** - * 总功能开关 - * - * 是否启用此APP修改 - * - * @defaultValue true - */ - Switch?: boolean; - /** - * [字幕]启用类型 + * [字幕] 启用类型 * * 请选择要使用的字幕,双语字幕将使用您选择类型呈现。 * @@ -22,7 +14,7 @@ export interface Settings { */ Type?: 'Official' | 'Translate'; /** - * [歌词]启用类型 + * [歌词] 启用类型 * * 请选择要添加的歌词选项,如果为多选,则会自动决定提供的歌词类型。 * @@ -35,7 +27,7 @@ export interface Settings { */ Types?: ('Translate')[]; /** - * [字幕]自动显示 + * [字幕] 自动显示 * * 是否总是自动开启字幕显示。 * @@ -43,15 +35,7 @@ export interface Settings { */ AutoCC?: boolean; /** - * [字幕]只显示“自动翻译”字幕 - * - * 是否仅显示“自动翻译”后的字幕,不显示源语言字幕。 - * - * @defaultValue false - */ - ShowOnly?: boolean; - /** - * [字幕]主语言(源语言)字幕位置 + * [字幕] 主语言(源语言)字幕位置 * * 主语言(源语言)字幕的显示位置。 * @@ -64,4 +48,44 @@ export interface Settings { * @defaultValue "Forward" */ Position?: 'Forward' | 'Reverse'; + /** + * [翻译器] 服务商API + * + * 请选择翻译器所使用的服务商API,更多翻译选项请使用BoxJs。 + * + * @remarks + * + * Possible values: + * - `'Google'` - Google Translate + * - `'Microsoft'` - Microsoft Translator(需填写API) + * + * @defaultValue "Google" + */ + Vendor?: 'Google' | 'Microsoft'; + /** + * [翻译器] 只显示“自动翻译”字幕 + * + * 是否仅显示“自动翻译”字幕,不显示源语言字幕。 + * + * @defaultValue false + */ + ShowOnly?: boolean; + /** + * [调试] 日志等级 + * + * 选择脚本日志的输出等级,低于所选等级的日志将全部输出。 + * + * @remarks + * + * Possible values: + * - `'OFF'` - 关闭 + * - `'ERROR'` - ❌ 错误 + * - `'WARN'` - ⚠️ 警告 + * - `'INFO'` - ℹ️ 信息 + * - `'DEBUG'` - 🅱️ 调试 + * - `'ALL'` - 全部 + * + * @defaultValue "WARN" + */ + LogLevel?: 'OFF' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG' | 'ALL'; } diff --git a/template/boxjs.settings.json b/template/boxjs.settings.json index fae7baf..08a9d64 100644 --- a/template/boxjs.settings.json +++ b/template/boxjs.settings.json @@ -1 +1 @@ -[{"id":"@DualSubs.YouTube.Settings.Type","name":"[字幕] 启用类型","type":"selects","val":"Official","items":[{"key":"Official","label":"官方字幕(合成器)"},{"key":"Translate","label":"翻译字幕(翻译器)"}],"desc":"请选择要使用的字幕,双语字幕将使用您选择类型呈现。"},{"id":"@DualSubs.YouTube.Settings.Types","name":"[歌词] 启用类型","type":"checkboxes","val":["Translate"],"items":[{"key":"Translate","label":"翻译歌词(翻译器)"}],"desc":"请选择要添加的歌词选项,如果为多选,则会自动决定提供的歌词类型。"},{"id":"@DualSubs.YouTube.Settings.AutoCC","name":"[字幕] 自动显示","type":"boolean","val":true,"desc":"是否总是自动开启字幕显示。"},{"id":"@DualSubs.YouTube.Settings.Position","name":"[字幕] 主语言(源语言)字幕位置","type":"selects","val":"Forward","items":[{"key":"Forward","label":"上面(第一行)"},{"key":"Reverse","label":"下面(第二行)"}],"desc":"主语言(源语言)字幕的显示位置。"},{"id":"@DualSubs.YouTube.Settings.Languages[0]","name":"[翻译器] 主语言(源语言)","type":"selects","val":"AUTO","items":[{"key":"AUTO","label":"自动 - Automatic"},{"key":"ZH","label":"中文(自动)"},{"key":"ZH-HANS","label":"中文(简体)"},{"key":"ZH-HK","label":"中文(香港)"},{"key":"ZH-HANT","label":"中文(繁体)"},{"key":"EN","label":"English - 英语(自动)"},{"key":"ES","label":"Español - 西班牙语(自动)"},{"key":"JA","label":"日本語 - 日语"},{"key":"KO","label":"한국어 - 韩语"},{"key":"DE","label":"Deutsch - 德语"},{"key":"FR","label":"Français - 法语"},{"key":"TR","label":"Türkçe - 土耳其语"},{"key":"KM","label":"ភាសាខ្មែរ - 高棉语"}],"desc":"仅当源语言识别不准确时更改此选项。"},{"id":"@DualSubs.YouTube.Settings.Languages[1]","name":"[翻译器] 副语言(目标语言)","type":"selects","val":"ZH","items":[{"key":"ZH","label":"中文(自动)"},{"key":"ZH-HANS","label":"中文(简体)"},{"key":"ZH-HK","label":"中文(香港)"},{"key":"ZH-HANT","label":"中文(繁体)"},{"key":"EN","label":"English - 英语(自动)"},{"key":"EN-US","label":"英语(美国)"},{"key":"ES","label":"Español - 西班牙语(自动)"},{"key":"ES-ES","label":"Español - 西班牙语"},{"key":"ES-419","label":"西班牙语(拉丁美洲)"},{"key":"JA","label":"日本語 - 日语"},{"key":"KO","label":"한국어 - 韩语"},{"key":"DE","label":"Deutsch - 德语"},{"key":"FR","label":"Français - 法语"},{"key":"TR","label":"Türkçe - 土耳其语"},{"key":"KM","label":"ភាសាខ្មែរ - 高棉语"}],"desc":"请指定翻译歌词的目标语言。"},{"id":"@DualSubs.YouTube.Settings.Vendor","name":"[翻译器] 服务商API","type":"selects","val":"Google","items":[{"key":"Google","label":"Google Translate"},{"key":"Microsoft","label":"Microsoft Translator(需填写API)"}],"desc":"请选择翻译器所使用的服务商API,更多翻译选项请使用BoxJs。"},{"id":"@DualSubs.YouTube.Settings.ShowOnly","name":"[翻译器] 只显示“自动翻译”字幕","type":"boolean","val":false,"desc":"是否仅显示“自动翻译”后的字幕,不显示源语言字幕。"}] \ No newline at end of file +[{"id":"@DualSubs.YouTube.Settings.Type","name":"[字幕] 启用类型","type":"selects","val":"Official","items":[{"key":"Official","label":"官方字幕(合成器)"},{"key":"Translate","label":"翻译字幕(翻译器)"}],"desc":"请选择要使用的字幕,双语字幕将使用您选择类型呈现。"},{"id":"@DualSubs.YouTube.Settings.Types","name":"[歌词] 启用类型","type":"checkboxes","val":["Translate"],"items":[{"key":"Translate","label":"翻译歌词(翻译器)"}],"desc":"请选择要添加的歌词选项,如果为多选,则会自动决定提供的歌词类型。"},{"id":"@DualSubs.YouTube.Settings.AutoCC","name":"[字幕] 自动显示","type":"boolean","val":true,"desc":"是否总是自动开启字幕显示。"},{"id":"@DualSubs.YouTube.Settings.Position","name":"[字幕] 主语言(源语言)字幕位置","type":"selects","val":"Forward","items":[{"key":"Forward","label":"上面(第一行)"},{"key":"Reverse","label":"下面(第二行)"}],"desc":"主语言(源语言)字幕的显示位置。"},{"id":"@DualSubs.YouTube.Settings.Vendor","name":"[翻译器] 服务商API","type":"selects","val":"Google","items":[{"key":"Google","label":"Google Translate"},{"key":"Microsoft","label":"Microsoft Translator(需填写API)"}],"desc":"请选择翻译器所使用的服务商API,更多翻译选项请使用BoxJs。"},{"id":"@DualSubs.YouTube.Settings.ShowOnly","name":"[翻译器] 只显示“自动翻译”字幕","type":"boolean","val":false,"desc":"是否仅显示“自动翻译”字幕,不显示源语言字幕。"},{"id":"@DualSubs.YouTube.Settings.LogLevel","name":"[调试] 日志等级","type":"selects","val":"WARN","items":[{"key":"OFF","label":"关闭"},{"key":"ERROR","label":"❌ 错误"},{"key":"WARN","label":"⚠️ 警告"},{"key":"INFO","label":"ℹ️ 信息"},{"key":"DEBUG","label":"🅱️ 调试"},{"key":"ALL","label":"全部"}],"desc":"选择脚本日志的输出等级,低于所选等级的日志将全部输出。"}] \ No newline at end of file