diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5c94b8..c022cec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,6 +23,8 @@ jobs: cache: 'npm' - name: Install dependencies run: npm install + env: + NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }} - name: Update local package.json version from release tag if: github.ref_type == 'tag' uses: BellCubeDev/update-package-version-by-release-tag@v2 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cfeb03b..c5c9cae 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,7 +21,7 @@ jobs: uses: actions/download-artifact@master with: name: artifact - - name: Deploy + - name: Deploy Response uses: exuanbo/actions-deploy-gist@main with: token: ${{ secrets.GIST_TOKEN }} diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index a75d396..aab5099 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -24,6 +24,8 @@ jobs: cache: 'npm' - name: Install dependencies run: npm install + env: + NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }} - name: Build run: npm run build:dev - name: Upload artifact diff --git a/.gitmodules b/.gitmodules index 70a7f46..ede279a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "src/utils"] - path = src/utils - url = https://github.com/NanoCat-Me/utils.git [submodule "src/proto"] path = src/proto url = https://github.com/NSRingo/proto.git diff --git a/.npmrc b/.npmrc index 5660f81..1b54673 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,3 @@ -registry=https://registry.npmjs.org/ \ No newline at end of file +registry=https://registry.npmjs.org/ +@nsnanocat:registry=https://npm.pkg.github.com/ +//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} diff --git a/CHANGELOG.md b/CHANGELOG.md index 9903b8c..eeefd3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ -### 🛠️ Bug Fixes - * 修复 `Surge` 模块内置`参数面板`默认值为空的问题 - * 修复 `Loon` 插件内置`设置面板`默认值为空的问题 +### 🆕 New Features + * `空气质量`增加`与昨日同时间对比`功能 + * 为实现此功能,现在默认替换来自`和风天气`的`空气质量`数据 + +### 🔄 Other Changes + * `util` 由 `submodule` 更改为 `package` diff --git a/arguments-builder.config.ts b/arguments-builder.config.ts index 6d73dc4..52d5f5f 100644 --- a/arguments-builder.config.ts +++ b/arguments-builder.config.ts @@ -1,142 +1,134 @@ -import { defineConfig } from '@iringo/arguments-builder'; +import { defineConfig } from "@iringo/arguments-builder"; export default defineConfig({ - output: { - surge: { - path: './dist/WeatherKit.sgmodule', - transformEgern: { - enable: true, - path: './dist/WeatherKit.yaml', - } - }, - loon: { - path: './dist/WeatherKit.plugin', - }, - customItems: [ - { - path: './dist/WeatherKit.snippet', - template: './template/quantumultx.handlebars' - }, - { - path: './dist/WeatherKit.stoverride', - template: './template/stash.handlebars' - } - ], - dts: { - isExported: true, - path: './src/settings.ts' - }, - boxjsSettings: { - path: './template/boxjs.settings.json', - scope: '@iRingo.WeatherKit.Settings', - } - }, - args: [ - { - key: 'Switch', - name: '总功能开关', - defaultValue: true, - type: 'boolean', - description: '是否启用此APP修改', - exclude: ['surge', 'loon'], - }, - { - key: 'NextHour.Provider', - name: '[未来一小时降水强度]数据源', - defaultValue: 'ColorfulClouds', - type: 'string', - options: [ - { key: 'WeatherKit', label: 'WeatherKit (不进行替换)' }, - { key: 'ColorfulClouds', label: '彩云天气' }, - { key: 'QWeather', label: '和风天气' }, - ], - description: '始终会使用选定的数据源,填补无降水监测地区的数据。', - }, - { - key: 'AQI.Provider', - name: '[空气质量]数据源', - defaultValue: 'ColorfulClouds', - type: 'string', - options: [ - { key: 'WeatherKit', label: 'WeatherKit (不进行替换)' }, - { key: 'ColorfulClouds', label: '彩云天气' }, - { key: 'QWeather', label: '和风天气' }, - { key: 'WAQI', label: 'The World Air Quality Project' }, - ], - description: '始终会使用选定的数据源,填补无空气质量监测地区的数据。', - }, - { - key: 'AQI.ReplaceProviders', - name: '[空气质量]需要替换的供应商', - defaultValue: [], - type: 'array', - description: '选中的空气质量数据源会被替换。', - options: [ - { key: 'QWeather', label: '和风天气' }, - { key: 'BreezoMeter', label: 'BreezoMeter' }, - { key: 'TWC', label: 'The Weather Channel' }, - ], - }, - { - key: 'AQI.Local.Scale', - type: 'string', - name: '[空气质量]本地替换算法', - description: '本地替换时使用的算法', - defaultValue: 'WAQI_InstantCast', - options: [ - { key: 'NONE', label: 'None (不进行替换)' }, - { key: 'WAQI_InstantCast', label: 'WAQI InstantCast' }, - ], - }, - { - key: 'AQI.Local.ReplaceScales', - type: 'array', - name: '[空气质量]需要修改的标准', - description: '选中的空气质量标准会被替换。请注意各国监测的污染物种类可能有所不同,转换算法或API未必适合当地。', - defaultValue: ['HJ6332012'], - options: [{ key: 'HJ6332012', label: '中国 (HJ 633—2012)' }], - }, - { - key: 'AQI.Local.ConvertUnits', - name: '[空气质量]转换污染物计量单位', - defaultValue: false, - type: 'boolean', - description: '(不推荐。不同单位互转可能会损失精度,导致数值偏大)将污染物数据替换为转换单位后的数据,方便对照转换后的标准。', - }, - { - key: 'API.ColorfulClouds.Token', - name: '[API]彩云天气 API 令牌', - defaultValue: '', - type: 'string', - placeholder: '123456789123456789abcdefghijklmnopqrstuv', - description: '彩云天气 API 令牌', - }, - { - key: 'API.QWeather.Host', - name: '[API]和风天气 API 主机', - defaultValue: 'devapi.qweather.com', - type: 'string', - description: '和风天气 API 使用的主机名', - options: [ - { key: 'devapi.qweather.com', label: '免费订阅 (devapi.qweather.com)' }, - { key: 'api.qweather.com', label: '付费订阅 (api.qweather.com)' }, - ], - }, - { - key: 'API.QWeather.Token', - name: '[API]和风天气 API 令牌', - defaultValue: '', - type: 'string', - placeholder: '123456789123456789abcdefghijklmnopqrstuv', - description: '和风天气 API 令牌', - }, - { - key: 'API.WAQI.Token', - name: '[API]WAQI API 令牌', - defaultValue: '', - type: 'string', - placeholder: '123456789123456789abcdefghijklmnopqrstuv', - description: 'WAQI API 令牌,填写此字段将自动使用WAQI高级API', - }, - ], + output: { + surge: { + path: "./dist/WeatherKit.sgmodule", + transformEgern: { + enable: true, + path: "./dist/WeatherKit.yaml", + }, + }, + loon: { + path: "./dist/WeatherKit.plugin", + }, + customItems: [ + { + path: "./dist/WeatherKit.snippet", + template: "./template/quantumultx.handlebars", + }, + { + path: "./dist/WeatherKit.stoverride", + template: "./template/stash.handlebars", + }, + ], + dts: { + isExported: true, + path: "./src/types.d.ts", + }, + boxjsSettings: { + path: "./template/boxjs.settings.json", + scope: "@iRingo.WeatherKit.Settings", + }, + }, + args: [ + { + key: "NextHour.Provider", + name: "[未来一小时降水强度] 数据源", + defaultValue: "ColorfulClouds", + type: "string", + options: [ + { key: "WeatherKit", label: "WeatherKit (不进行替换)" }, + { key: "ColorfulClouds", label: "彩云天气" }, + { key: "QWeather", label: "和风天气" }, + ], + description: "始终会使用选定的数据源,填补无降水监测地区的数据。", + }, + { + key: "AQI.Provider", + name: "[空气质量] 数据源", + defaultValue: "ColorfulClouds", + type: "string", + options: [ + { key: "WeatherKit", label: "WeatherKit (不进行替换)" }, + { key: "ColorfulClouds", label: "彩云天气" }, + { key: "QWeather", label: "和风天气" }, + { key: "WAQI", label: "The World Air Quality Project" }, + ], + description: "始终会使用选定的数据源,填补无空气质量监测地区的数据。", + }, + { + key: "AQI.ReplaceProviders", + name: "[空气质量] 需要替换的供应商", + defaultValue: ["QWeather"], + type: "array", + description: "选中的空气质量数据源会被替换。", + options: [ + { key: "QWeather", label: "和风天气" }, + { key: "BreezoMeter", label: "BreezoMeter" }, + { key: "TWC", label: "The Weather Channel" }, + ], + }, + { + key: "AQI.Local.Scale", + type: "string", + name: "[空气质量] 本地替换算法", + description: "本地替换时使用的算法", + defaultValue: "WAQI_InstantCast", + options: [ + { key: "NONE", label: "None (不进行替换)" }, + { key: "WAQI_InstantCast", label: "WAQI InstantCast" }, + ], + }, + { + key: "AQI.Local.ReplaceScales", + type: "array", + name: "[空气质量] 需要修改的标准", + description: "选中的空气质量标准会被替换。请注意各国监测的污染物种类可能有所不同,转换算法或API未必适合当地。", + defaultValue: ["HJ6332012"], + options: [{ key: "HJ6332012", label: "中国 (HJ 633—2012)" }], + }, + { + key: "AQI.Local.ConvertUnits", + name: "[空气质量] 转换污染物计量单位", + defaultValue: false, + type: "boolean", + description: "将污染物数据替换为转换单位后的数据,方便对照转换后的标准。(不推荐。不同单位互转可能会损失精度,导致数值偏大)", + }, + { + key: "API.ColorfulClouds.Token", + name: "[API] 彩云天气令牌", + defaultValue: "", + type: "string", + placeholder: "123456789123456789abcdefghijklmnopqrstuv", + description: "彩云天气 API 令牌", + }, + { + key: "API.QWeather.Host", + name: "[API] 和风天气主机", + defaultValue: "devapi.qweather.com", + type: "string", + description: "和风天气 API 使用的主机名", + options: [ + { key: "devapi.qweather.com", label: "免费订阅 (devapi.qweather.com)" }, + { key: "api.qweather.com", label: "付费订阅 (api.qweather.com)" }, + ], + }, + { + key: "API.QWeather.Token", + name: "[API] 和风天气令牌", + defaultValue: "", + type: "string", + placeholder: "123456789123456789abcdefghijklmnopqrstuv", + description: "和风天气 API 令牌", + }, + { + key: "API.WAQI.Token", + name: "[API] WAQI 令牌", + defaultValue: "", + type: "string", + placeholder: "123456789123456789abcdefghijklmnopqrstuv", + description: "WAQI API 令牌,填写此字段将自动使用WAQI高级API", + }, + ], }); diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..37d3d39 --- /dev/null +++ b/biome.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", + "files": { + "ignore": [ + "**/*.bundle.js" + ], + "ignoreUnknown": false + }, + "formatter": { + "enabled": true, + "indentStyle": "tab", + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 320 + }, + "javascript": { + "formatter": { + "arrowParentheses": "asNeeded", + "bracketSameLine": true, + "quoteStyle": "double" + } + }, + "json": { + "parser": { + "allowComments": true, + "allowTrailingCommas": true + } + }, + "linter": { + "enabled": true, + "rules": { + "complexity": { + "noForEach": "off", + "noStaticOnlyClass": "off", + "noUselessSwitchCase": "off", + "useArrowFunction": "info", + "useFlatMap": "off", + "useLiteralKeys": "info" + }, + "correctness": { + "noInnerDeclarations": "info", + "noSelfAssign": "off", + "noSwitchDeclarations": "info", + "noUnsafeOptionalChaining": "info" + }, + "performance": { + "noDelete": "info" + }, + "recommended": true, + "style": { + "noNegationElse": "off", + "noParameterAssign": "off", + "noUselessElse": "off", + "noVar": "info", + "useDefaultParameterLast": "info", + "useForOf": "error", + "useNodejsImportProtocol": "error", + "useNumberNamespace": "error", + "useSingleVarDeclarator": "off" + }, + "suspicious": { + "noAssignInExpressions": "info", + "noDoubleEquals": "info", + "noFallthroughSwitchClause": "info", + "noGlobalIsNan": "off", + "useDefaultSwitchClauseLast": "off" + } + } + }, + "organizeImports": { + "enabled": true + }, + "vcs": { + "clientKind": "git", + "enabled": true, + "useIgnoreFile": true + } +} diff --git a/package-lock.json b/package-lock.json index bf8eece..b625b14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,17 @@ { "name": "weatherkit", - "version": "1.8.17", + "version": "1.8.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "weatherkit", - "version": "1.8.17", + "version": "1.8.18", "license": "Apache-2.0", "devDependencies": { - "@iringo/arguments-builder": "^1.8.1", + "@iringo/arguments-builder": "^1.8.2", "@iringo/sgmoudle-tools": "^1.2.1", + "@nsnanocat/util": "^1.3.6", "@rspack/cli": "^1.0.11", "@rspack/core": "^1.0.11", "flatbuffers": "^24.3.25", @@ -24,6 +25,7 @@ "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", @@ -38,6 +40,7 @@ "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" } @@ -53,12 +56,12 @@ } }, "node_modules/@iringo/arguments-builder": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@iringo/arguments-builder/-/arguments-builder-1.8.1.tgz", - "integrity": "sha512-QEISc/nO4kFm8SgH66o0JzWGX9qWtVoWWjiOOh1PGwzdoMLIL7h37gL9z27aULknhUQHn1UDovdDGNu2fYgWEw==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@iringo/arguments-builder/-/arguments-builder-1.8.2.tgz", + "integrity": "sha512-xpnu+NOeuf9RBcvVfefe04Wu9SDI1RVTovoqLvgFniBIz/0IcpmTcLvepLXPiu5myVdmpiEFo2gwlaLSDieV4g==", "dev": true, "dependencies": { - "@iringo/surge2egern": "^1.0.1", + "@iringo/surge2egern": "^1.1.0", "@iringo/utils": "^1.0.1", "commander": "^12.1.0", "date-fns": "^4.1.0", @@ -72,12 +75,12 @@ } }, "node_modules/@iringo/sgmoudle-tools": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@iringo/sgmoudle-tools/-/sgmoudle-tools-1.2.1.tgz", - "integrity": "sha512-WJCvDejy05pj6MSqvrHjf0bi4Z0kIe9EQ5dsa6Ixf7E2h7kv01qa6YElYHzsbjEgb5ASNG0e1Oq/9i9XDH0Ytg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@iringo/sgmoudle-tools/-/sgmoudle-tools-1.2.2.tgz", + "integrity": "sha512-kQU3+egeyZpozQx+L0gj3eUpixvWS3dW+dbJoQmEh3no1V8vuR6wUcOor5CmOW4rZy5t2ucmLs/Fii6Sq16WDw==", "dev": true, "dependencies": { - "@iringo/utils": "^1.0.0", + "@iringo/utils": "^1.0.1", "@swc/helpers": "^0.5.13", "express": "^4.21.1", "handlebars": "^4.7.8", @@ -90,10 +93,11 @@ } }, "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==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@iringo/surge2egern/-/surge2egern-1.1.0.tgz", + "integrity": "sha512-8DEu6sIeWCTC0B6TOzXaGyI4IBnhuKKXE0sgNjyA/dfcwoT4jQDoDlaTQUHh2MVqB8OfD2R4gStaogw+o9qqng==", "dev": true, + "license": "MIT", "dependencies": { "ora": "^5.4.1", "puppeteer": "^23.6.1" @@ -130,6 +134,35 @@ "node": ">=12" } }, + "node_modules/@isaacs/cliui/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/@isaacs/cliui/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/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", @@ -341,6 +374,16 @@ "node": ">= 8" } }, + "node_modules/@nsnanocat/util": { + "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": { + "pako": "^2.1.0" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -360,12 +403,13 @@ "license": "MIT" }, "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==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.4.1.tgz", + "integrity": "sha512-0kdAbmic3J09I6dT8e9vE2JOCSt13wHCW5x/ly8TSt2bDtuIWe2TgLZZDHdcziw9AVCzflMAXCrVyRIhIs44Ng==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "debug": "^4.3.6", + "debug": "^4.3.7", "extract-zip": "^2.0.1", "progress": "^2.0.3", "proxy-agent": "^6.4.0", @@ -381,20 +425,12 @@ "node": ">=18" } }, - "node_modules/@puppeteer/browsers/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "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" }, @@ -411,19 +447,22 @@ "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 + "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 + "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", @@ -433,23 +472,12 @@ "node": ">=8" } }, - "node_modules/@puppeteer/browsers/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.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", @@ -464,27 +492,27 @@ } }, "node_modules/@rspack/binding": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-1.0.13.tgz", - "integrity": "sha512-mnSCZ3Qb/I3LzsYoo24AG4LgmaSOIc1CS38A9L9nv4MJj8x+1D2BaLErpaaMmhqI3lQBIcBSQkN7+WbpsCP3Uw==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-1.0.14.tgz", + "integrity": "sha512-0wWqFvr9hkF4LgNPgWfkTU0hhkZAMvOytoCs2p+wDX1Up1E/SgJ1U1JAsCxsl1XtUKm7mRvdWHzJmHbza3y89Q==", "dev": true, "license": "MIT", "optionalDependencies": { - "@rspack/binding-darwin-arm64": "1.0.13", - "@rspack/binding-darwin-x64": "1.0.13", - "@rspack/binding-linux-arm64-gnu": "1.0.13", - "@rspack/binding-linux-arm64-musl": "1.0.13", - "@rspack/binding-linux-x64-gnu": "1.0.13", - "@rspack/binding-linux-x64-musl": "1.0.13", - "@rspack/binding-win32-arm64-msvc": "1.0.13", - "@rspack/binding-win32-ia32-msvc": "1.0.13", - "@rspack/binding-win32-x64-msvc": "1.0.13" + "@rspack/binding-darwin-arm64": "1.0.14", + "@rspack/binding-darwin-x64": "1.0.14", + "@rspack/binding-linux-arm64-gnu": "1.0.14", + "@rspack/binding-linux-arm64-musl": "1.0.14", + "@rspack/binding-linux-x64-gnu": "1.0.14", + "@rspack/binding-linux-x64-musl": "1.0.14", + "@rspack/binding-win32-arm64-msvc": "1.0.14", + "@rspack/binding-win32-ia32-msvc": "1.0.14", + "@rspack/binding-win32-x64-msvc": "1.0.14" } }, "node_modules/@rspack/binding-darwin-arm64": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.13.tgz", - "integrity": "sha512-HepE4V5Rj53o+o8AMzlkdeBxZnsyXKrOJ2oumVtqRLXihVlMguYwNTSkjfmjAqq/4PJAhEeaeIFyomZg+zKC0A==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.14.tgz", + "integrity": "sha512-dHvlF6T6ctThGDIdvkSdacroA1xlCxfteuppBj8BX/UxzLPr4xsaEtNilfJmFfd2/J02UQyTQauN/9EBuA+YkA==", "cpu": [ "arm64" ], @@ -496,9 +524,9 @@ ] }, "node_modules/@rspack/binding-darwin-x64": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.13.tgz", - "integrity": "sha512-ucHf0q2V+K19z75BvjU6EbQggNFiz1/xJ5tSgOXUfRu5omZF1jpN/epeMGqh0MkExRwOMYKJR/pVHDw5ITcU8g==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.14.tgz", + "integrity": "sha512-q4Da1Bn/4xTLhhnOkT+fjP2STsSCfp4z03/J/h8tCVG/UYz56Ud3q1UEOK33c5Fxw1C4GlhEh5yYOlSAdxFQLQ==", "cpu": [ "x64" ], @@ -510,9 +538,9 @@ ] }, "node_modules/@rspack/binding-linux-arm64-gnu": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.13.tgz", - "integrity": "sha512-0fqLWDG9Z2VKxy3u6+jLVJgT2E24Xb2umP4Jtx2uNf2+aHLXifgqUdwgCElO+dj+PpOp/q8zmV5U2DXykvPU3w==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.14.tgz", + "integrity": "sha512-JogYtL3VQS9wJ3p3FNhDqinm7avrMsdwz4erP7YCjD7idob93GYAE7dPrHUzSNVnCBYXRaHJYZHDQs7lKVcYZw==", "cpu": [ "arm64" ], @@ -524,9 +552,9 @@ ] }, "node_modules/@rspack/binding-linux-arm64-musl": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.13.tgz", - "integrity": "sha512-eK72/jAofJRcZ23FTteUh1MfTbErWYNwVLuxnliyf1f1PwH0a7exGE6ik0/y/LdAt5PWP1r8r981EEjrpsTfRQ==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.14.tgz", + "integrity": "sha512-qgybhxI/nnoa8CUz7zKTC0Oh37NZt9uRxsSV7+ZYrfxqbrVCoNVuutPpY724uUHy1M6W34kVEm1uT1N4Ka5cZg==", "cpu": [ "arm64" ], @@ -538,9 +566,9 @@ ] }, "node_modules/@rspack/binding-linux-x64-gnu": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.13.tgz", - "integrity": "sha512-C9wGDim1Euc10qRk5ztPvgK4NAi6bi6Ck3+ugaRzYXPFIVegnFyXu2fv42j3Y0LRhBjnKMXZJzME5nQUPuT6Ug==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.14.tgz", + "integrity": "sha512-5vzaDRw3/sGKo3ax/1cU3/cxqNjajwlt2LU288vXNe1/n8oe/pcDfYcTugpOe/A1DqzadanudJszLpFcKsaFtQ==", "cpu": [ "x64" ], @@ -552,9 +580,9 @@ ] }, "node_modules/@rspack/binding-linux-x64-musl": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.13.tgz", - "integrity": "sha512-7bQyGEoMCxXUS+RDo6qej8JjqS8kYd8CvlnfYZVUqWgCxgn19j29lKvWVibey0lnFpoJrqReOdSypbk91tSrzA==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.14.tgz", + "integrity": "sha512-4U6QD9xVS1eGme52DuJr6Fg/KdcUfJ+iKwH49Up460dZ/fLvGylnVGA+V0mzPlKi8gfy7NwFuYXZdu3Pwi1YYg==", "cpu": [ "x64" ], @@ -566,9 +594,9 @@ ] }, "node_modules/@rspack/binding-win32-arm64-msvc": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.13.tgz", - "integrity": "sha512-6QOHiCwaQeCZApWRe1y8ZNZGOj00EFdX1ypOc3R1GrfSjn+UjoKhbBtgVl2w+sPTaCZ4SvknOk9usSgcWO4gOQ==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.14.tgz", + "integrity": "sha512-SjeYw7qqRHYZ5RPClu+ffKZsShQdU3amA1OwC3M0AS6dbfEcji8482St3Y8Z+QSzYRapCEZij9LMM/9ypEhISg==", "cpu": [ "arm64" ], @@ -580,9 +608,9 @@ ] }, "node_modules/@rspack/binding-win32-ia32-msvc": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.13.tgz", - "integrity": "sha512-ucm7emxYDjTsOGNwgYGz30oKcnzXLjg/Fcs0mNMmQgMEFpwBXhczfKJimCyMIlAhQCFPP4WzrXFdf03EPuw6CA==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.14.tgz", + "integrity": "sha512-m1gUiVyz3Z3VYIK/Ayo5CVHBjnEeRk9a+KIpKSsq1yhZItnMgjtr4bKabU9vjxalO4UoaSmVzODJI8lJBlnn5Q==", "cpu": [ "ia32" ], @@ -594,9 +622,9 @@ ] }, "node_modules/@rspack/binding-win32-x64-msvc": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.13.tgz", - "integrity": "sha512-9G/hvr47ECjDEmBCyyQTZFilmEOIQJCQvpx6hUgDWsfUApwF9LZBW/PqBCSwhY+tIErr/AurJnBVAYub0MYpHA==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.14.tgz", + "integrity": "sha512-Gbeg+bayMF9VP9xmlxySL/TC2XrS6/LZM/pqcNOTLHx6LMG/VXCcmKB0rOZo8MzLXEt8D/lQmQ/B6g7pSaAw0g==", "cpu": [ "x64" ], @@ -608,9 +636,9 @@ ] }, "node_modules/@rspack/cli": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@rspack/cli/-/cli-1.0.13.tgz", - "integrity": "sha512-4h6X6GNJmvXnxJtXq7mv7R62gflQ23FC+Ftw6gTpPCAjrIS7qI3oAqRlT2JdcAvkd6neAQYTtiELG0iCV7aEsw==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@rspack/cli/-/cli-1.0.14.tgz", + "integrity": "sha512-cKi8XJW47WkAkCrbWBETvPcTsly4PhB8gWSr1tUX7iFiLyDbSsD6p7mFZxU0gafK+zw+CI8ufzSUiYjW8iwvCQ==", "dev": true, "license": "MIT", "dependencies": { @@ -632,14 +660,14 @@ } }, "node_modules/@rspack/core": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@rspack/core/-/core-1.0.13.tgz", - "integrity": "sha512-lh8toWSWcYjlOuriQ8/h0U8riaaRQfzwU0oUNykFj1xokJMSKIQFH5WQWj2DQ386uHNv52nMbc+Jiuml1vYboA==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@rspack/core/-/core-1.0.14.tgz", + "integrity": "sha512-xHl23lxJZNjItGc5YuE9alz3yjb56y7EgJmAcBMPHMqgjtUt8rBu4xd/cSUjbr9/lLF9N4hdyoJiPJOFs9LEjw==", "dev": true, "license": "MIT", "dependencies": { "@module-federation/runtime-tools": "0.5.1", - "@rspack/binding": "1.0.13", + "@rspack/binding": "1.0.14", "@rspack/lite-tapable": "1.0.1", "caniuse-lite": "^1.0.30001616" }, @@ -700,7 +728,8 @@ "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 + "dev": true, + "license": "MIT" }, "node_modules/@ts-morph/common": { "version": "0.24.0", @@ -783,6 +812,30 @@ "@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", @@ -805,9 +858,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.0.tgz", - "integrity": "sha512-AbXMTZGt40T+KON9/Fdxx0B2WK5hsgxcfXJLr5bFpZ7b4JCex2WyQPTEKdXqfHiY5nKKBScZ7yCoO6Pvgxfvnw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.1.tgz", + "integrity": "sha512-CRICJIl0N5cXDONAdlTv5ShATZ4HEwk6kDDIW2/w9qOWKg+NU/5F8wYRWCrONad0/UKkloNSmmyN/wX4rtpbVA==", "dev": true, "license": "MIT", "dependencies": { @@ -862,13 +915,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.7.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.6.tgz", - "integrity": "sha512-/d7Rnj0/ExXDMcioS78/kf1lMzYk4BZV8MZGTBKzTGZ6/406ukkbYlIsZmMPhcR5KlkunDHQLrtAVmSq7r+mSw==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.19.8" } }, "node_modules/@types/node-forge": { @@ -882,9 +935,9 @@ } }, "node_modules/@types/qs": { - "version": "6.9.16", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.16.tgz", - "integrity": "sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A==", + "version": "6.9.17", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.17.tgz", + "integrity": "sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==", "dev": true, "license": "MIT" }, @@ -946,9 +999,9 @@ } }, "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": { @@ -960,6 +1013,7 @@ "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": "*" @@ -1185,9 +1239,9 @@ } }, "node_modules/acorn": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", - "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "license": "MIT", "bin": { @@ -1197,17 +1251,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, - "license": "MIT", - "peer": true, - "peerDependencies": { - "acorn": "^8" - } - }, "node_modules/acorn-walk": { "version": "8.3.4", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", @@ -1236,6 +1279,7 @@ "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" }, @@ -1248,6 +1292,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" }, @@ -1264,7 +1309,8 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ajv": { "version": "6.12.6", @@ -1351,16 +1397,13 @@ } }, "node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "node": ">=8" } }, "node_modules/ansi-styles": { @@ -1394,7 +1437,8 @@ "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 + "dev": true, + "license": "Python-2.0" }, "node_modules/array-buffer-byte-length": { "version": "1.0.1", @@ -1481,6 +1525,7 @@ "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" }, @@ -1508,7 +1553,8 @@ "version": "1.6.7", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/balanced-match": { "version": "1.0.2", @@ -1522,6 +1568,7 @@ "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.0.tgz", "integrity": "sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==", "dev": true, + "license": "Apache-2.0", "optional": true }, "node_modules/bare-fs": { @@ -1529,6 +1576,7 @@ "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", @@ -1541,6 +1589,7 @@ "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": { @@ -1548,6 +1597,7 @@ "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" @@ -1558,6 +1608,7 @@ "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" @@ -1589,6 +1640,7 @@ "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" } @@ -1618,6 +1670,7 @@ "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", @@ -1643,6 +1696,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -1653,6 +1707,7 @@ "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", @@ -1870,10 +1925,17 @@ "pako": "~1.0.5" } }, + "node_modules/browserify-zlib/node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true, + "license": "(MIT AND Zlib)" + }, "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "dev": true, "funding": [ { @@ -1892,10 +1954,10 @@ "license": "MIT", "peer": true, "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -1934,6 +1996,7 @@ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -2011,14 +2074,15 @@ "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.30001669", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz", - "integrity": "sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==", + "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": [ { @@ -2092,6 +2156,7 @@ "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", @@ -2117,6 +2182,7 @@ "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" }, @@ -2129,6 +2195,7 @@ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" }, @@ -2151,16 +2218,6 @@ "node": ">=12" } }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/cliui/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -2219,19 +2276,6 @@ "node": ">=8" } }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.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", @@ -2255,6 +2299,7 @@ "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" } @@ -2314,41 +2359,34 @@ } }, "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.5.tgz", + "integrity": "sha512-bQJ0YRck5ak3LgtnpKkiabX5pNF7tMUh1BSy2ZBOTh0Dim0BUu6aPPwByIns6/A5Prh8PufSPerMDUklpzes2Q==", "dev": true, "license": "MIT", "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", + "bytes": "3.1.2", + "compressible": "~2.0.18", "debug": "2.6.9", + "negotiator": "~0.6.4", "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", + "safe-buffer": "5.2.1", "vary": "~1.1.2" }, "engines": { "node": ">= 0.8.0" } }, - "node_modules/compression/node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "node_modules/compression/node_modules/negotiator": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.8" + "node": ">= 0.6" } }, - "node_modules/compression/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "license": "MIT" - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2431,6 +2469,7 @@ "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", @@ -2452,24 +2491,6 @@ } } }, - "node_modules/cosmiconfig/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, - "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/create-ecdh": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", @@ -2545,26 +2566,30 @@ } }, "node_modules/crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz", + "integrity": "sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==", "dev": true, "license": "MIT", "dependencies": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" + "browserify-cipher": "^1.0.1", + "browserify-sign": "^4.2.3", + "create-ecdh": "^4.0.4", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "diffie-hellman": "^5.0.3", + "hash-base": "~3.0.4", + "inherits": "^2.0.4", + "pbkdf2": "^3.1.2", + "public-encrypt": "^4.0.3", + "randombytes": "^2.1.0", + "randomfill": "^1.0.4" }, "engines": { - "node": "*" + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/data-uri-to-buffer": { @@ -2572,6 +2597,7 @@ "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" } @@ -2699,6 +2725,7 @@ "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" }, @@ -2760,6 +2787,7 @@ "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", @@ -2812,7 +2840,8 @@ "version": "0.0.1354347", "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1354347.tgz", "integrity": "sha512-BlmkSqV0V84E2WnEnoPnwyix57rQxAM5SKJjf4TbYOCGLAWtz8CDH8RIaGOjPgPCXo2Mce3kxSY497OySidY3Q==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/diffie-hellman": { "version": "5.0.3", @@ -2881,17 +2910,17 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.40", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.40.tgz", - "integrity": "sha512-LYm78o6if4zTasnYclgQzxEcgMoIcybWOhkATWepN95uwVVWV0/IW10v+2sIeHE+bIYWipLneTftVyQm45UY7g==", + "version": "1.5.52", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.52.tgz", + "integrity": "sha512-xtoijJTZ+qeucLBDNztDOuQBE1ksqjvNjvqFoST3nGC7fSpqJ+X6BdTBaY5BHG+IhWWmpc6b/KfpeuEDupEPOQ==", "dev": true, "license": "ISC", "peer": true }, "node_modules/elliptic": { - "version": "6.5.7", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.7.tgz", - "integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.0.tgz", + "integrity": "sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA==", "dev": true, "license": "MIT", "dependencies": { @@ -2933,6 +2962,7 @@ "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" } @@ -2957,6 +2987,7 @@ "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" } @@ -3141,6 +3172,7 @@ "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", @@ -3157,15 +3189,6 @@ "source-map": "~0.6.1" } }, - "node_modules/escodegen/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, - "engines": { - "node": ">=4.0" - } - }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -3181,11 +3204,23 @@ "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" @@ -3208,24 +3243,12 @@ "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==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, "engines": { "node": ">=4.0" } @@ -3235,6 +3258,7 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -3326,6 +3350,19 @@ "node": ">= 8" } }, + "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/execa/node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -3436,6 +3473,7 @@ "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", @@ -3456,6 +3494,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" }, @@ -3468,26 +3507,12 @@ } } }, - "node_modules/extract-zip/node_modules/get-stream": { - "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, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "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 + "dev": true, + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -3500,7 +3525,8 @@ "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 + "dev": true, + "license": "MIT" }, "node_modules/fast-glob": { "version": "3.3.2", @@ -3562,6 +3588,7 @@ "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" } @@ -3755,6 +3782,7 @@ "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", @@ -3849,13 +3877,16 @@ } }, "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" @@ -3884,6 +3915,7 @@ "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", @@ -3899,6 +3931,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" }, @@ -3915,7 +3948,8 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/glob": { "version": "10.4.5", @@ -4320,6 +4354,7 @@ "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" @@ -4333,6 +4368,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" }, @@ -4349,7 +4385,8 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/http-proxy-middleware": { "version": "2.0.7", @@ -4388,6 +4425,7 @@ "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" @@ -4401,6 +4439,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" }, @@ -4417,7 +4456,8 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/human-signals": { "version": "2.1.0", @@ -4478,6 +4518,7 @@ "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" @@ -4526,6 +4567,7 @@ "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" @@ -4778,6 +4820,7 @@ "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" } @@ -4963,6 +5006,7 @@ "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" }, @@ -5074,9 +5118,9 @@ } }, "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": { @@ -5087,13 +5131,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "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" }, @@ -5105,7 +5151,8 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-parse-better-errors": { "version": "1.0.2", @@ -5134,6 +5181,7 @@ "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" }, @@ -5156,7 +5204,8 @@ "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 + "dev": true, + "license": "MIT" }, "node_modules/load-json-file": { "version": "4.0.0", @@ -5174,6 +5223,20 @@ "node": ">=4" } }, + "node_modules/load-json-file/node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", @@ -5197,6 +5260,7 @@ "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" @@ -5213,6 +5277,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -5228,6 +5293,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5244,6 +5310,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -5255,13 +5322,15 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/log-symbols/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5271,20 +5340,24 @@ "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": ">=8" + } + }, + "node_modules/lru-cache": { + "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", + "engines": { + "node": ">=12" } }, - "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/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -5505,7 +5578,8 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/mkdirp": { "version": "3.0.1", @@ -5576,6 +5650,7 @@ "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" } @@ -5820,6 +5895,7 @@ "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" } @@ -5874,6 +5950,7 @@ "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", @@ -5892,20 +5969,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ora/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/ora/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -5921,6 +5990,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5937,6 +6007,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -5948,25 +6019,15 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ora/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ora/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, + "license": "MIT", "engines": { "node": ">=8" } @@ -5976,6 +6037,7 @@ "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" }, @@ -6009,6 +6071,7 @@ "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", @@ -6028,6 +6091,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" }, @@ -6044,13 +6108,15 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "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" @@ -6067,9 +6133,9 @@ "license": "BlueOak-1.0.0" }, "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", "dev": true, "license": "(MIT AND Zlib)" }, @@ -6078,6 +6144,7 @@ "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" }, @@ -6104,17 +6171,22 @@ } }, "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "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-better-errors": "^1.0.1" + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/parseurl": { @@ -6168,6 +6240,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", @@ -6209,7 +6288,8 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/picocolors": { "version": "1.1.1", @@ -6286,6 +6366,7 @@ "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" } @@ -6309,6 +6390,7 @@ "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", @@ -6328,6 +6410,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" }, @@ -6340,26 +6423,19 @@ } } }, - "node_modules/proxy-agent/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "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 + "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 + "dev": true, + "license": "MIT" }, "node_modules/public-encrypt": { "version": "4.0.3", @@ -6388,6 +6464,7 @@ "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" @@ -6404,17 +6481,18 @@ } }, "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==", + "version": "23.7.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.7.0.tgz", + "integrity": "sha512-YTgo0KFe8NtBcI9hCu/xsjPFumEhu8kA7QqLr6Uh79JcEsUcUt+go966NgKYXJ+P3Fuefrzn2SXwV3cyOe/UcQ==", "dev": true, "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.4.0", + "@puppeteer/browsers": "2.4.1", "chromium-bidi": "0.8.0", "cosmiconfig": "^9.0.0", "devtools-protocol": "0.0.1354347", - "puppeteer-core": "23.6.1", + "puppeteer-core": "23.7.0", "typed-query-selector": "^2.12.0" }, "bin": { @@ -6425,12 +6503,13 @@ } }, "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==", + "version": "23.7.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.7.0.tgz", + "integrity": "sha512-0kC81k3K6n6Upg/k04xv+Mi8yy62bNAJiK7LCA71zfq2XKEo9WAzas1t6UQiLgaNHtGNKM0d1KbR56p/+mgEiQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.4.0", + "@puppeteer/browsers": "2.4.1", "chromium-bidi": "0.8.0", "debug": "^4.3.7", "devtools-protocol": "0.0.1354347", @@ -6446,6 +6525,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" }, @@ -6462,7 +6542,8 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/qrcode-terminal": { "version": "0.12.0", @@ -6523,7 +6604,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/randombytes": { "version": "2.1.0", @@ -6699,6 +6781,7 @@ "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" } @@ -6708,6 +6791,7 @@ "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" @@ -7208,6 +7292,7 @@ "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" @@ -7230,6 +7315,7 @@ "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" @@ -7244,6 +7330,7 @@ "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", @@ -7258,6 +7345,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" }, @@ -7274,7 +7362,8 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/source-map": { "version": "0.6.1", @@ -7435,7 +7524,8 @@ "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 + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/statuses": { "version": "2.0.1", @@ -7506,6 +7596,7 @@ "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", @@ -7559,16 +7650,6 @@ "node": ">=8" } }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "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", @@ -7576,17 +7657,33 @@ "dev": true, "license": "MIT" }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "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": "^5.0.1" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/string.prototype.padend": { @@ -7661,19 +7758,16 @@ } }, "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==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=8" } }, "node_modules/strip-ansi-cjs": { @@ -7690,16 +7784,6 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -7762,6 +7846,7 @@ "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" @@ -7776,6 +7861,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", @@ -7850,7 +7936,8 @@ "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 + "dev": true, + "license": "Apache-2.0" }, "node_modules/thingies": { "version": "1.21.0", @@ -7869,7 +7956,8 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/thunky": { "version": "1.1.0", @@ -7953,9 +8041,9 @@ } }, "node_modules/tslib": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true, "license": "0BSD" }, @@ -8074,7 +8162,8 @@ "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 + "dev": true, + "license": "MIT" }, "node_modules/typescript": { "version": "5.6.3", @@ -8125,6 +8214,7 @@ "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" @@ -8149,6 +8239,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -8166,6 +8257,7 @@ "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" } @@ -8248,7 +8340,8 @@ "version": "10.0.0", "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/util": { "version": "0.12.5", @@ -8349,25 +8442,26 @@ "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.95.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", - "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", + "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/estree": "^1.0.5", + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.6", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-attributes": "^1.9.5", - "browserslist": "^4.21.10", + "acorn": "^8.14.0", + "browserslist": "^4.24.0", "chrome-trace-event": "^1.0.2", "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", @@ -8902,16 +8996,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -8970,17 +9054,17 @@ "node": ">=8" } }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "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", - "dependencies": { - "ansi-regex": "^5.0.1" - }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/wrap-ansi/node_modules/ansi-styles": { @@ -8996,11 +9080,28 @@ "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 + "dev": true, + "license": "ISC" }, "node_modules/ws": { "version": "8.18.0", @@ -9073,16 +9174,6 @@ "node": ">=12" } }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/yargs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -9105,24 +9196,12 @@ "node": ">=8" } }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.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" @@ -9133,6 +9212,7 @@ "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" } diff --git a/package.json b/package.json index 7292104..fcd7bec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "weatherkit", - "version": "1.8.17", + "version": "1.9.0", "organizationName": " iRingo", "displayName": " iRingo: 🌤 WeatherKit", "description": "iOS 18 & macOS 15 & watchOS 11\n1.解锁全部天气功能\n2.替换空气质量数据\n3.添加下一小时降水数据", @@ -33,9 +33,8 @@ "dev": "npm-run-all --parallel build:dev sgmoudle:dev", "serve": "webpack serve", "build": "rspack build", - "build:dev": "rspack build -c rspack.debug.config.js --mode=development", + "build:dev": "rspack build -c rspack.dev.config.js --mode=development", "sgmoudle:dev": "sgmoudle dev", - "build:debug": "rollup --config --configDebug", "build:args": "arguments-builder build", "dts": "arguments-builder dts" }, @@ -43,8 +42,9 @@ "iOS >= 15" ], "devDependencies": { - "@iringo/arguments-builder": "^1.8.1", + "@iringo/arguments-builder": "^1.8.2", "@iringo/sgmoudle-tools": "^1.2.1", + "@nsnanocat/util": "^1.3.6", "@rspack/cli": "^1.0.11", "@rspack/core": "^1.0.11", "flatbuffers": "^24.3.25", diff --git a/rollup.config.js b/rollup.config.js deleted file mode 100644 index 849cd3c..0000000 --- a/rollup.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import defaultConfig from './rollup.default.config.js'; -import debugConfig from './rollup.debug.config.js'; - -export default commandLineArgs => { - if (commandLineArgs.configDebug === true) return debugConfig; - return defaultConfig; -}; diff --git a/rollup.debug.config.js b/rollup.debug.config.js deleted file mode 100644 index 2873920..0000000 --- a/rollup.debug.config.js +++ /dev/null @@ -1,16 +0,0 @@ -import pkg from "./package.json" with { type: "json" }; -import json from "@rollup/plugin-json"; -import commonjs from "@rollup/plugin-commonjs"; -import { nodeResolve } from "@rollup/plugin-node-resolve"; - -export default [ - { - input: "src/response.debug.js", - output: { - file: "dist/response.js", - //format: "es", - banner: `/* README: https://github.com/NSRingo */\nconsole.log(' iRingo: 🌤 WeatherKit β Response')\nconsole.log('Version: ${pkg.version}')\nconsole.log('Build Time: ${new Date().toLocaleString('zh-CN', {timeZone: 'PRC'})}')`, - }, - plugins: [json(), commonjs(), nodeResolve()] - } -]; diff --git a/rollup.default.config.js b/rollup.default.config.js deleted file mode 100644 index 205a63f..0000000 --- a/rollup.default.config.js +++ /dev/null @@ -1,17 +0,0 @@ -import pkg from "./package.json" with { type: "json" }; -import json from "@rollup/plugin-json"; -import commonjs from "@rollup/plugin-commonjs"; -import terser from "@rollup/plugin-terser"; -import { nodeResolve } from "@rollup/plugin-node-resolve"; - -export default [ - { - input: "src/response.js", - output: { - file: "dist/response.js", - //format: "es", - banner: `/* README: https://github.com/NSRingo */\nconsole.log(' iRingo: 🌤 WeatherKit Response')\nconsole.log('Version: ${pkg.version}')\nconsole.log('Build Time: ${new Date().toLocaleString('zh-CN', {timeZone: 'PRC'})}')`, - }, - plugins: [json(), commonjs(), nodeResolve(), terser()] - } -]; diff --git a/rspack.config.js b/rspack.config.js index eda465f..61fe4ef 100644 --- a/rspack.config.js +++ b/rspack.config.js @@ -5,6 +5,7 @@ import pkg from "./package.json" with { type: "json" }; export default defineConfig({ entry: { + //"request": "./src/request.js", "response": "./src/response.js", }, output: { @@ -15,7 +16,11 @@ export default defineConfig({ //additionalAliases: ['console'], }), new rspack.BannerPlugin({ - banner: `console.log('version: ${pkg.version}');`, + banner: `console.log('Date: ${new Date().toLocaleString('zh-CN', {timeZone: 'PRC'})}');`, + raw: true, + }), + new rspack.BannerPlugin({ + banner: `console.log('Version: ${pkg.version}');`, raw: true, }), new rspack.BannerPlugin({ @@ -23,12 +28,13 @@ export default defineConfig({ raw: true, }), new rspack.BannerPlugin({ - banner: "console.log(' iRingo: 🌤 WeatherKit');", + banner: `console.log('${pkg.displayName}');`, raw: true, }), new rspack.BannerPlugin({ - banner: "https://NSRingo.github.io", + banner: pkg.homepage, }), ], + devtool: false, performance: false, }); diff --git a/rspack.debug.config.js b/rspack.dev.config.js similarity index 60% rename from rspack.debug.config.js rename to rspack.dev.config.js index ff3a754..35494af 100644 --- a/rspack.debug.config.js +++ b/rspack.dev.config.js @@ -5,17 +5,25 @@ import pkg from "./package.json" with { type: "json" }; export default defineConfig({ entry: { - "response": "./src/response.debug.js", + //"request": "./src/request.dev.js", + "response": "./src/response.dev.js", }, output: { filename: "[name].bundle.js", }, + optimization: { + minimize: false, + }, plugins: [ new NodePolyfillPlugin({ //additionalAliases: ['console'], }), new rspack.BannerPlugin({ - banner: `console.log('version: ${pkg.version}');`, + banner: `console.log('Date: ${new Date().toLocaleString('zh-CN', {timeZone: 'PRC'})}');`, + raw: true, + }), + new rspack.BannerPlugin({ + banner: `console.log('Version: ${pkg.version}');`, raw: true, }), new rspack.BannerPlugin({ @@ -23,12 +31,13 @@ export default defineConfig({ raw: true, }), new rspack.BannerPlugin({ - banner: "console.log(' iRingo: 🌤 WeatherKit');", + banner: `console.log('${pkg.displayName} β');`, raw: true, }), new rspack.BannerPlugin({ - banner: "https://NSRingo.github.io", + banner: pkg.homepage, }), ], + devtool: false, performance: false, }); diff --git a/src/class/AirQuality.mjs b/src/class/AirQuality.mjs index f2568ac..464f2fc 100644 --- a/src/class/AirQuality.mjs +++ b/src/class/AirQuality.mjs @@ -1,4 +1,5 @@ -import { log } from "../utils/utils.mjs"; +import { log } from "@nsnanocat/util"; + export default class AirQuality { static Name = "AirQuality"; static Version = "2.3.4"; diff --git a/src/class/ColorfulClouds.mjs b/src/class/ColorfulClouds.mjs index 360fd5a..14af49f 100644 --- a/src/class/ColorfulClouds.mjs +++ b/src/class/ColorfulClouds.mjs @@ -1,4 +1,4 @@ -import { _, fetch, log, logError } from "../utils/utils.mjs"; +import { Lodash as _, fetch, log, logError } from "@nsnanocat/util"; import AirQuality from "./AirQuality.mjs"; import ForecastNextHour from "./ForecastNextHour.mjs"; import parseWeatherKitURL from "../function/parseWeatherKitURL.mjs"; diff --git a/src/class/ForecastNextHour.mjs b/src/class/ForecastNextHour.mjs index 786127d..1c5ea0d 100644 --- a/src/class/ForecastNextHour.mjs +++ b/src/class/ForecastNextHour.mjs @@ -1,4 +1,4 @@ -import { log } from "../utils/utils.mjs"; +import { log } from "@nsnanocat/util"; export default class ForecastNextHour { Name = "ForecastNextHour"; Version = "v1.3.2"; diff --git a/src/class/QWeather.mjs b/src/class/QWeather.mjs index 170c8f9..026c8f1 100644 --- a/src/class/QWeather.mjs +++ b/src/class/QWeather.mjs @@ -1,4 +1,4 @@ -import { fetch, log, logError, time } from "../utils/utils.mjs"; +import { fetch, log, logError, time } from "@nsnanocat/util"; import AirQuality from "../class/AirQuality.mjs"; import ForecastNextHour from "./ForecastNextHour.mjs"; import parseWeatherKitURL from "../function/parseWeatherKitURL.mjs"; diff --git a/src/class/WAQI.mjs b/src/class/WAQI.mjs index 1aa93fd..bd5d3c2 100644 --- a/src/class/WAQI.mjs +++ b/src/class/WAQI.mjs @@ -1,4 +1,4 @@ -import { fetch, log, logError } from "../utils/utils.mjs"; +import { fetch, log, logError } from "@nsnanocat/util"; import AirQuality from "../class/AirQuality.mjs"; import parseWeatherKitURL from "../function/parseWeatherKitURL.mjs"; import providerNameToLogo from "../function/providerNameToLogo.mjs"; diff --git a/src/class/WeatherKit2.mjs b/src/class/WeatherKit2.mjs index 377cdb6..b41524e 100644 --- a/src/class/WeatherKit2.mjs +++ b/src/class/WeatherKit2.mjs @@ -1,4 +1,4 @@ -import { log } from "../utils/utils.mjs"; +import { log } from "@nsnanocat/util"; import * as WK2 from "../proto/apple/wk2.js"; export default class WeatherKit2 { diff --git a/src/function/database.mjs b/src/function/database.mjs index b200136..53a1e4b 100644 --- a/src/function/database.mjs +++ b/src/function/database.mjs @@ -1,59 +1,220 @@ export default { - "WeatherKit": { - "Settings": { - "Switch": true, - "NextHour": { - "Provider": "ColorfulClouds" + WeatherKit: { + Settings: { + Switch: true, + NextHour: { + Provider: "ColorfulClouds", }, - "AQI": { - "Provider": "ColorfulClouds", - "ReplaceProviders": [], - "Local": { - "Scale": "WAQI_InstantCast", - "ReplaceScales": ["HJ6332012"], - "ConvertUnits": false - } + AQI: { + Provider: "ColorfulClouds", + ReplaceProviders: ["QWeather"], + Local: { + Scale: "WAQI_InstantCast", + ReplaceScales: ["HJ6332012"], + ConvertUnits: false, + }, }, - "API": { - "WAQI": { - "Token": null, - "Header": { "Content-Type": "application/json" } + API: { + WAQI: { + Token: null, + Header: { "Content-Type": "application/json" }, + }, + QWeather: { + Token: null, + Header: { "Content-Type": "application/json" }, + Host: "devapi.qweather.com", }, - "QWeather": { - "Token": null, - "Header": { "Content-Type": "application/json" }, - "Host": "devapi.qweather.com" + ColorfulClouds: { + Token: null, + Header: { "Content-Type": "application/json" }, }, - "ColorfulClouds": { - "Token": null, - "Header": { "Content-Type": "application/json" } - } - } + }, }, - "Configs": { - "Availability": { - "v1": [ - "currentWeather", - "dailyForecast", - "hourlyForecast", - "minuteForecast", - "weatherAlerts" - ], - "v2": [ - "airQuality", - "currentWeather", - "forecastDaily", - "forecastHourly", - "forecastPeriodic", - "historicalComparisons", - "weatherChanges", - "forecastNextHour", - "weatherAlerts", - "weatherAlertNotifications", - "news" - ] + Configs: { + Availability: { + v1: ["currentWeather", "dailyForecast", "hourlyForecast", "minuteForecast", "weatherAlerts"], + v2: ["airQuality", "currentWeather", "forecastDaily", "forecastHourly", "forecastPeriodic", "historicalComparisons", "weatherChanges", "forecastNextHour", "weatherAlerts", "weatherAlertNotifications", "news"], }, - "Storefront": {"AE":"143481","AF":"143610","AG":"143540","AI":"143538","AL":"143575","AM":"143524","AO":"143564","AR":"143505","AT":"143445","AU":"143460","AZ":"143568","BA":"143612","BB":"143541","BD":"143490","BE":"143446","BF":"143578","BG":"143526","BH":"143559","BJ":"143576","BM":"143542","BN":"143560","BO":"143556","BR":"143503","BS":"143539","BT":"143577","BW":"143525","BY":"143565","BZ":"143555","CA":"143455","CD":"143613","CG":"143582","CH":"143459","CI":"143527","CL":"143483","CM":"143574","CN":"143465","CO":"143501","CR":"143495","CV":"143580","CY":"143557","CZ":"143489","DE":"143443","DK":"143458","DM":"143545","DO":"143508","DZ":"143563","EC":"143509","EE":"143518","EG":"143516","ES":"143454","FI":"143447","FJ":"143583","FM":"143591","FR":"143442","GA":"143614","GB":"143444","GD":"143546","GF":"143615","GH":"143573","GM":"143584","GR":"143448","GT":"143504","GW":"143585","GY":"143553","HK":"143463","HN":"143510","HR":"143494","HU":"143482","ID":"143476","IE":"143449","IL":"143491","IN":"143467","IQ":"143617","IS":"143558","IT":"143450","JM":"143511","JO":"143528","JP":"143462","KE":"143529","KG":"143586","KH":"143579","KN":"143548","KP":"143466","KR":"143466","KW":"143493","KY":"143544","KZ":"143517","TC":"143552","TD":"143581","TJ":"143603","TH":"143475","TM":"143604","TN":"143536","TO":"143608","TR":"143480","TT":"143551","TW":"143470","TZ":"143572","LA":"143587","LB":"143497","LC":"143549","LI":"143522","LK":"143486","LR":"143588","LT":"143520","LU":"143451","LV":"143519","LY":"143567","MA":"143620","MD":"143523","ME":"143619","MG":"143531","MK":"143530","ML":"143532","MM":"143570","MN":"143592","MO":"143515","MR":"143590","MS":"143547","MT":"143521","MU":"143533","MV":"143488","MW":"143589","MX":"143468","MY":"143473","MZ":"143593","NA":"143594","NE":"143534","NG":"143561","NI":"143512","NL":"143452","NO":"143457","NP":"143484","NR":"143606","NZ":"143461","OM":"143562","PA":"143485","PE":"143507","PG":"143597","PH":"143474","PK":"143477","PL":"143478","PT":"143453","PW":"143595","PY":"143513","QA":"143498","RO":"143487","RS":"143500","RU":"143469","RW":"143621","SA":"143479","SB":"143601","SC":"143599","SE":"143456","SG":"143464","SI":"143499","SK":"143496","SL":"143600","SN":"143535","SR":"143554","ST":"143598","SV":"143506","SZ":"143602","UA":"143492","UG":"143537","US":"143441","UY":"143514","UZ":"143566","VC":"143550","VE":"143502","VG":"143543","VN":"143471","VU":"143609","XK":"143624","YE":"143571","ZA":"143472","ZM":"143622","ZW":"143605"} - } - } -} + Storefront: { + AE: "143481", + AF: "143610", + AG: "143540", + AI: "143538", + AL: "143575", + AM: "143524", + AO: "143564", + AR: "143505", + AT: "143445", + AU: "143460", + AZ: "143568", + BA: "143612", + BB: "143541", + BD: "143490", + BE: "143446", + BF: "143578", + BG: "143526", + BH: "143559", + BJ: "143576", + BM: "143542", + BN: "143560", + BO: "143556", + BR: "143503", + BS: "143539", + BT: "143577", + BW: "143525", + BY: "143565", + BZ: "143555", + CA: "143455", + CD: "143613", + CG: "143582", + CH: "143459", + CI: "143527", + CL: "143483", + CM: "143574", + CN: "143465", + CO: "143501", + CR: "143495", + CV: "143580", + CY: "143557", + CZ: "143489", + DE: "143443", + DK: "143458", + DM: "143545", + DO: "143508", + DZ: "143563", + EC: "143509", + EE: "143518", + EG: "143516", + ES: "143454", + FI: "143447", + FJ: "143583", + FM: "143591", + FR: "143442", + GA: "143614", + GB: "143444", + GD: "143546", + GF: "143615", + GH: "143573", + GM: "143584", + GR: "143448", + GT: "143504", + GW: "143585", + GY: "143553", + HK: "143463", + HN: "143510", + HR: "143494", + HU: "143482", + ID: "143476", + IE: "143449", + IL: "143491", + IN: "143467", + IQ: "143617", + IS: "143558", + IT: "143450", + JM: "143511", + JO: "143528", + JP: "143462", + KE: "143529", + KG: "143586", + KH: "143579", + KN: "143548", + KP: "143466", + KR: "143466", + KW: "143493", + KY: "143544", + KZ: "143517", + TC: "143552", + TD: "143581", + TJ: "143603", + TH: "143475", + TM: "143604", + TN: "143536", + TO: "143608", + TR: "143480", + TT: "143551", + TW: "143470", + TZ: "143572", + LA: "143587", + LB: "143497", + LC: "143549", + LI: "143522", + LK: "143486", + LR: "143588", + LT: "143520", + LU: "143451", + LV: "143519", + LY: "143567", + MA: "143620", + MD: "143523", + ME: "143619", + MG: "143531", + MK: "143530", + ML: "143532", + MM: "143570", + MN: "143592", + MO: "143515", + MR: "143590", + MS: "143547", + MT: "143521", + MU: "143533", + MV: "143488", + MW: "143589", + MX: "143468", + MY: "143473", + MZ: "143593", + NA: "143594", + NE: "143534", + NG: "143561", + NI: "143512", + NL: "143452", + NO: "143457", + NP: "143484", + NR: "143606", + NZ: "143461", + OM: "143562", + PA: "143485", + PE: "143507", + PG: "143597", + PH: "143474", + PK: "143477", + PL: "143478", + PT: "143453", + PW: "143595", + PY: "143513", + QA: "143498", + RO: "143487", + RS: "143500", + RU: "143469", + RW: "143621", + SA: "143479", + SB: "143601", + SC: "143599", + SE: "143456", + SG: "143464", + SI: "143499", + SK: "143496", + SL: "143600", + SN: "143535", + SR: "143554", + ST: "143598", + SV: "143506", + SZ: "143602", + UA: "143492", + UG: "143537", + US: "143441", + UY: "143514", + UZ: "143566", + VC: "143550", + VE: "143502", + VG: "143543", + VN: "143471", + VU: "143609", + XK: "143624", + YE: "143571", + ZA: "143472", + ZM: "143622", + ZW: "143605", + }, + }, + }, +}; diff --git a/src/function/parseWeatherKitURL.mjs b/src/function/parseWeatherKitURL.mjs index 3692477..ddb7d4d 100644 --- a/src/function/parseWeatherKitURL.mjs +++ b/src/function/parseWeatherKitURL.mjs @@ -1,5 +1,7 @@ +import { log } from "@nsnanocat/util"; + export default function parseWeatherKitURL(url = new URL($request.url)) { - console.log(`☑️ parseWeatherKitURL`, ""); + log(`☑️ parseWeatherKitURL`, ""); const RegExp = /^\/api\/(?v1|v2|v3)\/(availability|weather)\/(?\w+)(?:-\w+)?(-(?[A-Z]{2}))?\/(?-?\d+\.?\d*)\/(?-?\d+\.?\d*)$/i; //const LanguageRegExp = /^(?\w+(-\w+)?)-(?[A-Z]{2})$/i; const Parameters = url?.pathname.match(RegExp)?.groups; @@ -10,10 +12,10 @@ export default function parseWeatherKitURL(url = new URL($request.url)) { "longitude": Parameters?.longitude, "country": Parameters?.country || url?.searchParams?.get("country") }; - //console.log(JSON.stringify(result, null, 2), ""); + //log(JSON.stringify(result, null, 2), ""); //const LanguageParameters = result.language.match(LanguageRegExp)?.groups; //result.language = LanguageParameters.language; //result.country = result.country || LanguageParameters.country - console.log(`✅ parseWeatherKitURL\n🟧version: ${result.version} 🟧language: ${result.language} 🟧country: ${result.country}\n🟧latitude: ${result.latitude} 🟧longitude: ${result.longitude}\n`, "") + log(`✅ parseWeatherKitURL\n🟧version: ${result.version} 🟧language: ${result.language} 🟧country: ${result.country}\n🟧latitude: ${result.latitude} 🟧longitude: ${result.longitude}\n`, "") return result; } diff --git a/src/function/providerNameToLogo.mjs b/src/function/providerNameToLogo.mjs index 563b168..ee30253 100644 --- a/src/function/providerNameToLogo.mjs +++ b/src/function/providerNameToLogo.mjs @@ -1,5 +1,7 @@ +import { log } from "@nsnanocat/util"; + export default function providerNameToLogo(providerName, version) { - console.log(`☑️ providerNameToLogo, providerName: ${providerName}, version: ${version}`, ""); + log(`☑️ providerNameToLogo, providerName: ${providerName}, version: ${version}`, ""); let providerLogo; switch (providerName?.split("\n")?.[0]) { case "WAQI": @@ -34,6 +36,6 @@ export default function providerNameToLogo(providerName, version) { default: break; }; - console.log(`✅ providerNameToLogo`, ""); + log(`✅ providerNameToLogo`, ""); return providerLogo; }; diff --git a/src/function/setENV.mjs b/src/function/setENV.mjs index 1a51041..c2c7946 100644 --- a/src/function/setENV.mjs +++ b/src/function/setENV.mjs @@ -1,5 +1,4 @@ -import getStorage from '../utils/getStorage.mjs' -import { _, log } from "../utils/utils.mjs"; +import { Lodash as _, getStorage, log } from "@nsnanocat/util"; /** * Set Environment Variables @@ -10,8 +9,8 @@ import { _, log } from "../utils/utils.mjs"; * @return {Object} { Settings, Caches, Configs } */ export default function setENV(name, platforms, database) { - log(`☑️ Set Environment Variables`, ""); - let { Settings, Caches, Configs } = getStorage(name, platforms, database); + log("☑️ Set Environment Variables", ""); + const { Settings, Caches, Configs } = getStorage(name, platforms, database); /***************** Settings *****************/ switch (platforms) { case "WeatherKit": diff --git a/src/response.debug.js b/src/response.debug.js deleted file mode 100644 index c0c458e..0000000 --- a/src/response.debug.js +++ /dev/null @@ -1,304 +0,0 @@ -import { $platform, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "./utils/utils.mjs"; -import database from "./function/database.mjs"; -import setENV from "./function/setENV.mjs"; -import providerNameToLogo from "./function/providerNameToLogo.mjs"; -import WeatherKit2 from "./class/WeatherKit2.mjs"; -import WAQI from "./class/WAQI.mjs"; -import ColorfulClouds from "./class/ColorfulClouds.mjs"; -import QWeather from "./class/QWeather.mjs"; -import AirQuality from "./class/AirQuality.mjs"; -import * as flatbuffers from 'flatbuffers'; -/***************** 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}, PATHs: ${PATHs}`, ""); -// 解析格式 -const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; -log(`⚠ FORMAT: ${FORMAT}`, ""); -!(async () => { - /** - * @type {{Settings: import('./interface').Settings}} - */ - const { Settings, Caches, Configs } = setENV("iRingo", "WeatherKit", database); - log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); - switch (Settings.Switch) { - case true: - default: - // 创建空数据 - let body = {}; - // 格式判断 - switch (FORMAT) { - case undefined: // 视为无body - break; - case "application/x-www-form-urlencoded": - case "text/plain": - default: - //log(`🚧 body: ${body}`, ""); - 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 (HOST) { - case "weatherkit.apple.com": - // 路径判断 - if (PATH.startsWith("/api/v1/availability/")) { - log(`🚧 body: ${JSON.stringify(body)}`, ""); - body = Configs?.Availability?.v2; - }; - break; - }; - $response.body = JSON.stringify(body); - break; - case "application/vnd.apple.flatbuffer": - case "application/protobuf": - case "application/x-protobuf": - case "application/vnd.google.protobuf": - case "application/grpc": - case "application/grpc+proto": - case "application/octet-stream": - //log(`🚧 $response: ${JSON.stringify($response, null, 2)}`, ""); - 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/vnd.apple.flatbuffer": - // 解析FlatBuffer - const ByteBuffer = new flatbuffers.ByteBuffer(rawBody); - const Builder = new flatbuffers.Builder(); - // 主机判断 - switch (HOST) { - case "weatherkit.apple.com": - // 路径判断 - if (PATH.startsWith("/api/v2/weather/")) { - body = WeatherKit2.decode(ByteBuffer, "all"); - if (url.searchParams.get("dataSets").includes("airQuality")) { - log(`🚧 body.airQuality: ${JSON.stringify(body?.airQuality, null, 2)}`, ""); - // InjectAirQuality - if (Settings?.AQI?.ReplaceProviders?.includes(body?.airQuality?.metadata?.providerName)) body = await InjectAirQuality(url, body, Settings); - // CompareAirQuality - body = await CompareAirQuality(url, body, Settings); - // PollutantUnitConverter - switch (body?.airQuality?.metadata?.providerName?.split("\n")?.[0]) { - case "和风天气": - case "QWeather": - if (body?.airQuality?.pollutants) body.airQuality.pollutants = body.airQuality.pollutants.map((pollutant) => { - switch (pollutant.pollutantType) { - case "CO": // Fix CO amount units - pollutant.units = "MILLIGRAMS_PER_CUBIC_METER"; - break; - default: - break; - }; - return pollutant; - }); - break; - }; - // ConvertAirQuality - if (Settings?.AQI?.Local?.ReplaceScales.includes(body?.airQuality?.scale.split(".")?.[0])) body = ConvertAirQuality(body, Settings); - // Fix Convert units that does not supported in Apple Weather - if (body?.airQuality?.pollutants) body.airQuality.pollutants = AirQuality.FixUnits(body.airQuality.pollutants); - // ProviderLogo - if (body?.airQuality?.metadata?.providerName && !body?.airQuality?.metadata?.providerLogo) body.airQuality.metadata.providerLogo = providerNameToLogo(body?.airQuality?.metadata?.providerName, "v2"); - }; - if (url.searchParams.get("dataSets").includes("currentWeather")) { - if (body?.currentWeather?.metadata?.providerName && !body?.currentWeather?.metadata?.providerLogo) body.currentWeather.metadata.providerLogo = providerNameToLogo(body?.currentWeather?.metadata?.providerName, "v2"); - //log(`🚧 body.currentWeather: ${JSON.stringify(body?.currentWeather, null, 2)}`, ""); - }; - if (url.searchParams.get("dataSets").includes("forecastNextHour")) { - log(`🚧 body.forecastNextHour: ${JSON.stringify(body?.forecastNextHour, null, 2)}`, ""); - if (!body?.forecastNextHour) body = await InjectForecastNextHour(url, body, Settings); - if (body?.forecastNextHour?.metadata?.providerName && !body?.forecastNextHour?.metadata?.providerLogo) body.forecastNextHour.metadata.providerLogo = providerNameToLogo(body?.forecastNextHour?.metadata?.providerName, "v2"); - }; - if (url.searchParams.get("dataSets").includes("weatherAlerts")) { - if (body?.weatherAlerts?.metadata?.providerName && !body?.weatherAlerts?.metadata?.providerLogo) body.weatherAlerts.metadata.providerLogo = providerNameToLogo(body?.weatherAlerts?.metadata?.providerName, "v2"); - log(`🚧 body.weatherAlerts: ${JSON.stringify(body?.weatherAlerts, null, 2)}`, ""); - }; - if (url.searchParams.get("dataSets").includes("WeatherChange")) { - if (body?.WeatherChanges?.metadata?.providerName && !body?.WeatherChanges?.metadata?.providerLogo) body.WeatherChanges.metadata.providerLogo = providerNameToLogo(body?.WeatherChanges?.metadata?.providerName, "v2"); - log(`🚧 body.WeatherChanges: ${JSON.stringify(body?.WeatherChanges, null, 2)}`, ""); - }; - if (url.searchParams.get("dataSets").includes("trendComparison")) { - if (body?.historicalComparisons?.metadata?.providerName && !body?.historicalComparisons?.metadata?.providerLogo) body.historicalComparisons.metadata.providerLogo = providerNameToLogo(body?.historicalComparisons?.metadata?.providerName, "v2"); - log(`🚧 body.historicalComparisons: ${JSON.stringify(body?.historicalComparisons, null, 2)}`, ""); - }; - if (url.searchParams.get("dataSets").includes("locationInfo")) { - if (body?.locationInfo?.metadata?.providerName && !body?.locationInfo?.metadata?.providerLogo) body.locationInfo.metadata.providerLogo = providerNameToLogo(body?.locationInfo?.metadata?.providerName, "v2"); - log(`🚧 body.locationInfo: ${JSON.stringify(body?.locationInfo, null, 2)}`, ""); - }; - const WeatherData = WeatherKit2.encode(Builder, "all", body); - Builder.finish(WeatherData); - break; - }; - break; - }; - rawBody = Builder.asUint8Array(); // Of type `Uint8Array`. - break; - case "application/protobuf": - case "application/x-protobuf": - case "application/vnd.google.protobuf": - break; - case "application/grpc": - case "application/grpc+proto": - break; - case "application/octet-stream": - break; - }; - // 写入二进制数据 - $response.body = rawBody; - break; - }; - break; - case false: - break; - }; -})() - .catch((e) => logError(e)) - .finally(() => done($response)) - -async function InjectAirQuality(url, body, Settings) { - log(`☑️ InjectAirQuality`, ""); - let airQuality; - switch (Settings?.AQI?.Provider) { - case "WeatherKit": - break; - case "QWeather": - const qWeather = new QWeather({ "url": url, "host": Settings?.API?.QWeather?.Host, "header": Settings?.API?.QWeather?.Header, "token": Settings?.API?.QWeather?.Token }); - airQuality = await qWeather.AirNow(); - //airQuality = await qWeather.AirQualityCurrent(); - break; - case "ColorfulClouds": - default: - const colorfulClouds = new ColorfulClouds({ "url": url, "header": Settings?.API?.ColorfulClouds?.Header, "token": Settings?.API?.ColorfulClouds?.Token || "Y2FpeXVuX25vdGlmeQ==" }); - airQuality = await colorfulClouds.RealTime(); - break; - case "WAQI": - const waqi = new WAQI({ "url": url, "header": Settings?.API?.WAQI?.Header, "token": Settings?.API?.WAQI?.Token }); - if (Settings?.API?.WAQI?.Token) { - airQuality = await waqi.AQI2(); - } else { - const Nearest = await waqi.Nearest(); - const Token = await waqi.Token(Nearest?.metadata?.stationId); - //Caches.WAQI.set(stationId, Token); - airQuality = await waqi.AQI(Nearest?.metadata?.stationId, Token); - airQuality.metadata = { ...Nearest?.metadata, ...airQuality?.metadata }; - airQuality = { ...Nearest, ...airQuality }; - } - break; - }; - if (airQuality?.metadata) { - airQuality.metadata = { ...body?.airQuality?.metadata, ...airQuality.metadata }; - body.airQuality = { ...body?.airQuality, ...airQuality }; - if (!body?.airQuality?.pollutants) body.airQuality.pollutants = []; - log(`🚧 body.airQuality: ${JSON.stringify(body?.airQuality, null, 2)}`, ""); - }; - log(`✅ InjectAirQuality`, ""); - return body; -}; - -async function CompareAirQuality(url, body, Settings) { - log(`☑️ CompareAirQuality`, ""); - switch (body?.airQuality?.metadata?.providerName?.split("\n")?.[0]) { - case null: - case undefined: - case "BreezoMeter": - case "The Weather Channel": - default: - break; - case "和风天气": - case "QWeather": - const qWeather = new QWeather({ "url": url, "host": Settings?.API?.QWeather?.Host, "header": Settings?.API?.QWeather?.Header, "token": Settings?.API?.QWeather?.Token }); - if (!body?.airQuality?.metadata?.locationID) { - const metadata = await qWeather.GeoAPI(); - if (!body?.airQuality?.metadata?.attributionUrl) body.airQuality.metadata.attributionUrl = metadata.attributionUrl; - body.airQuality.metadata.locationID = metadata?.locationID; - }; - const HistoricalAirQuality = await qWeather.HistoricalAir(undefined, body.airQuality?.metadata?.locationID); - body.airQuality.previousDayComparison = AirQuality.ComparisonTrend(body.airQuality?.index, HistoricalAirQuality?.index); - break; - case "彩云天气": - case "ColorfulClouds": - const colorfulClouds = new ColorfulClouds({ "url": url, "header": Settings?.API?.ColorfulClouds?.Header, "token": Settings?.API?.ColorfulClouds?.Token || "Y2FpeXVuX25vdGlmeQ==" }); - const Hourly = await colorfulClouds.Hourly(undefined, 1, Date.now() - 24 * 60 * 60 * 1000); - body.airQuality.previousDayComparison = AirQuality.ComparisonTrend(body.airQuality.index, Hourly.index); - break; - case "WAQI": - case "World Air Quality Index Project": - const waqi = new WAQI({ "url": url, "header": Settings?.API?.WAQI?.Header, "token": Settings?.API?.WAQI?.Token }); - break; - }; - log(`✅ CompareAirQuality`, ""); - return body; -}; - -function ConvertAirQuality(body, Settings) { - log(`☑️ ConvertAirQuality`, ""); - let airQuality; - switch (Settings?.AQI?.Local?.Scale) { - case "NONE": - break; - case 'HJ_633': - case 'EPA_NowCast': - case 'WAQI_InstantCast': - default: - airQuality = AirQuality.ConvertScale(body?.airQuality?.pollutants, Settings?.AQI?.Local?.Scale, Settings?.AQI?.Local?.ConvertUnits); - break; - }; - if (airQuality.index) { - body.airQuality = { ...body.airQuality, ...airQuality }; - body.airQuality.metadata.providerName += `\nConverted using ${Settings?.AQI?.Local?.Scale}`; - log(`🚧 body.airQuality: ${JSON.stringify(body.airQuality, null, 2)}`, ""); - }; - log(`✅ ConvertAirQuality`, ""); - return body; -}; - -async function InjectForecastNextHour(url, body, Settings) { - log(`☑️ InjectForecastNextHour`, ""); - let forecastNextHour; - switch (Settings?.NextHour?.Provider) { - case "WeatherKit": - break; - case "QWeather": - const qWeather = new QWeather({ "url": url, "host": Settings?.API?.QWeather?.Host, "header": Settings?.API?.QWeather?.Header, "token": Settings?.API?.QWeather?.Token }); - forecastNextHour = await qWeather.Minutely(); - break; - case "ColorfulClouds": - default: - const colorfulClouds = new ColorfulClouds({ "url": url, "header": Settings?.API?.ColorfulClouds?.Header, "token": Settings?.API?.ColorfulClouds?.Token || "Y2FpeXVuX25vdGlmeQ==" }); - forecastNextHour = await colorfulClouds.Minutely(); - break; - }; - if (forecastNextHour?.metadata) { - forecastNextHour.metadata = { ...body?.forecastNextHour?.metadata, ...forecastNextHour.metadata }; - body.forecastNextHour = { ...body?.forecastNextHour, ...forecastNextHour }; - log(`🚧 body.forecastNextHour: ${JSON.stringify(body?.forecastNextHour, null, 2)}`, ""); - }; - log(`✅ InjectForecastNextHour`, ""); - return body; -}; diff --git a/src/response.dev.js b/src/response.dev.js new file mode 100644 index 0000000..44af28b --- /dev/null +++ b/src/response.dev.js @@ -0,0 +1,330 @@ +import { $platform, Lodash as _, Storage, fetch, notification, log, logError, wait, done } from "@nsnanocat/util"; +import database from "./function/database.mjs"; +import setENV from "./function/setENV.mjs"; +import providerNameToLogo from "./function/providerNameToLogo.mjs"; +import WeatherKit2 from "./class/WeatherKit2.mjs"; +import WAQI from "./class/WAQI.mjs"; +import ColorfulClouds from "./class/ColorfulClouds.mjs"; +import QWeather from "./class/QWeather.mjs"; +import AirQuality from "./class/AirQuality.mjs"; +import * as flatbuffers from "flatbuffers"; +/***************** 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}, PATHs: ${PATHs}`, ""); +// 解析格式 +const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; +log(`⚠ FORMAT: ${FORMAT}`, ""); +!(async () => { + /** + * 设置 + * @type {{Settings: import('./types').Settings}} + */ + const { Settings, Caches, Configs } = setENV("iRingo", "WeatherKit", database); + // 创建空数据 + let body = {}; + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + //log(`🚧 body: ${body}`, ""); + 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 (HOST) { + case "weatherkit.apple.com": + // 路径判断 + if (PATH.startsWith("/api/v1/availability/")) { + log(`🚧 body: ${JSON.stringify(body)}`, ""); + body = Configs?.Availability?.v2; + } + break; + } + $response.body = JSON.stringify(body); + break; + case "application/vnd.apple.flatbuffer": + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/octet-stream": { + //log(`🚧 $response: ${JSON.stringify($response, null, 2)}`, ""); + 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/vnd.apple.flatbuffer": { + // 解析FlatBuffer + const ByteBuffer = new flatbuffers.ByteBuffer(rawBody); + const Builder = new flatbuffers.Builder(); + // 主机判断 + switch (HOST) { + case "weatherkit.apple.com": + // 路径判断 + if (PATH.startsWith("/api/v2/weather/")) { + body = WeatherKit2.decode(ByteBuffer, "all"); + if (url.searchParams.get("dataSets").includes("airQuality")) { + log(`🚧 body.airQuality: ${JSON.stringify(body?.airQuality, null, 2)}`, ""); + // InjectAirQuality + if (Settings?.AQI?.ReplaceProviders?.includes(body?.airQuality?.metadata?.providerName)) body = await InjectAirQuality(url, body, Settings); + // CompareAirQuality + body = await CompareAirQuality(url, body, Settings); + // PollutantUnitConverter + switch (body?.airQuality?.metadata?.providerName?.split("\n")?.[0]) { + case "和风天气": + case "QWeather": + if (body?.airQuality?.pollutants) + body.airQuality.pollutants = body.airQuality.pollutants.map(pollutant => { + switch (pollutant.pollutantType) { + case "CO": // Fix CO amount units + pollutant.units = "MILLIGRAMS_PER_CUBIC_METER"; + break; + default: + break; + } + return pollutant; + }); + break; + } + // ConvertAirQuality + if (Settings?.AQI?.Local?.ReplaceScales.includes(body?.airQuality?.scale.split(".")?.[0])) body = ConvertAirQuality(body, Settings); + // Fix Convert units that does not supported in Apple Weather + if (body?.airQuality?.pollutants) body.airQuality.pollutants = AirQuality.FixUnits(body.airQuality.pollutants); + // ProviderLogo + if (body?.airQuality?.metadata?.providerName && !body?.airQuality?.metadata?.providerLogo) body.airQuality.metadata.providerLogo = providerNameToLogo(body?.airQuality?.metadata?.providerName, "v2"); + } + if (url.searchParams.get("dataSets").includes("currentWeather")) { + if (body?.currentWeather?.metadata?.providerName && !body?.currentWeather?.metadata?.providerLogo) body.currentWeather.metadata.providerLogo = providerNameToLogo(body?.currentWeather?.metadata?.providerName, "v2"); + //log(`🚧 body.currentWeather: ${JSON.stringify(body?.currentWeather, null, 2)}`, ""); + } + if (url.searchParams.get("dataSets").includes("forecastNextHour")) { + log(`🚧 body.forecastNextHour: ${JSON.stringify(body?.forecastNextHour, null, 2)}`, ""); + if (!body?.forecastNextHour) body = await InjectForecastNextHour(url, body, Settings); + if (body?.forecastNextHour?.metadata?.providerName && !body?.forecastNextHour?.metadata?.providerLogo) body.forecastNextHour.metadata.providerLogo = providerNameToLogo(body?.forecastNextHour?.metadata?.providerName, "v2"); + } + if (url.searchParams.get("dataSets").includes("weatherAlerts")) { + if (body?.weatherAlerts?.metadata?.providerName && !body?.weatherAlerts?.metadata?.providerLogo) body.weatherAlerts.metadata.providerLogo = providerNameToLogo(body?.weatherAlerts?.metadata?.providerName, "v2"); + log(`🚧 body.weatherAlerts: ${JSON.stringify(body?.weatherAlerts, null, 2)}`, ""); + } + if (url.searchParams.get("dataSets").includes("WeatherChange")) { + if (body?.WeatherChanges?.metadata?.providerName && !body?.WeatherChanges?.metadata?.providerLogo) body.WeatherChanges.metadata.providerLogo = providerNameToLogo(body?.WeatherChanges?.metadata?.providerName, "v2"); + log(`🚧 body.WeatherChanges: ${JSON.stringify(body?.WeatherChanges, null, 2)}`, ""); + } + if (url.searchParams.get("dataSets").includes("trendComparison")) { + if (body?.historicalComparisons?.metadata?.providerName && !body?.historicalComparisons?.metadata?.providerLogo) body.historicalComparisons.metadata.providerLogo = providerNameToLogo(body?.historicalComparisons?.metadata?.providerName, "v2"); + log(`🚧 body.historicalComparisons: ${JSON.stringify(body?.historicalComparisons, null, 2)}`, ""); + } + if (url.searchParams.get("dataSets").includes("locationInfo")) { + if (body?.locationInfo?.metadata?.providerName && !body?.locationInfo?.metadata?.providerLogo) body.locationInfo.metadata.providerLogo = providerNameToLogo(body?.locationInfo?.metadata?.providerName, "v2"); + log(`🚧 body.locationInfo: ${JSON.stringify(body?.locationInfo, null, 2)}`, ""); + } + const WeatherData = WeatherKit2.encode(Builder, "all", body); + Builder.finish(WeatherData); + break; + } + break; + } + rawBody = Builder.asUint8Array(); // Of type `Uint8Array`. + break; + } + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + break; + case "application/grpc": + case "application/grpc+proto": + break; + case "application/octet-stream": + break; + } + // 写入二进制数据 + $response.body = rawBody; + break; + } + } +})() + .catch(e => logError(e)) + .finally(() => done($response)); + +/** + * @param {string} url + * @param {any} body + * @param {import('./types').Settings} Settings + */ +async function InjectAirQuality(url, body, Settings) { + log("☑️ InjectAirQuality", ""); + let airQuality; + switch (Settings?.AQI?.Provider) { + case "WeatherKit": + break; + case "QWeather": { + const qWeather = new QWeather({ url: url, host: Settings?.API?.QWeather?.Host, header: Settings?.API?.QWeather?.Header, token: Settings?.API?.QWeather?.Token }); + airQuality = await qWeather.AirNow(); + //airQuality = await qWeather.AirQualityCurrent(); + break; + } + case "ColorfulClouds": + default: { + const colorfulClouds = new ColorfulClouds({ url: url, header: Settings?.API?.ColorfulClouds?.Header, token: Settings?.API?.ColorfulClouds?.Token || "Y2FpeXVuX25vdGlmeQ==" }); + airQuality = await colorfulClouds.RealTime(); + break; + } + case "WAQI": { + const waqi = new WAQI({ url: url, header: Settings?.API?.WAQI?.Header, token: Settings?.API?.WAQI?.Token }); + if (Settings?.API?.WAQI?.Token) { + airQuality = await waqi.AQI2(); + } else { + const Nearest = await waqi.Nearest(); + const Token = await waqi.Token(Nearest?.metadata?.stationId); + //Caches.WAQI.set(stationId, Token); + airQuality = await waqi.AQI(Nearest?.metadata?.stationId, Token); + airQuality.metadata = { ...Nearest?.metadata, ...airQuality?.metadata }; + airQuality = { ...Nearest, ...airQuality }; + } + break; + } + } + if (airQuality?.metadata) { + airQuality.metadata = { ...body?.airQuality?.metadata, ...airQuality.metadata }; + body.airQuality = { ...body?.airQuality, ...airQuality }; + if (!body?.airQuality?.pollutants) body.airQuality.pollutants = []; + log(`🚧 body.airQuality: ${JSON.stringify(body?.airQuality, null, 2)}`, ""); + } + log("✅ InjectAirQuality", ""); + return body; +} + +/** + * @param {string} url + * @param {any} body + * @param {import('./types').Settings} Settings + */ +async function CompareAirQuality(url, body, Settings) { + log("☑️ CompareAirQuality", ""); + switch (body?.airQuality?.metadata?.providerName?.split("\n")?.[0]) { + case null: + case undefined: + case "BreezoMeter": + case "The Weather Channel": + default: + break; + case "和风天气": + case "QWeather": { + const qWeather = new QWeather({ url: url, host: Settings?.API?.QWeather?.Host, header: Settings?.API?.QWeather?.Header, token: Settings?.API?.QWeather?.Token }); + if (!body?.airQuality?.metadata?.locationID) { + const metadata = await qWeather.GeoAPI(); + if (!body?.airQuality?.metadata?.attributionUrl) body.airQuality.metadata.attributionUrl = metadata.attributionUrl; + body.airQuality.metadata.locationID = metadata?.locationID; + } + const HistoricalAirQuality = await qWeather.HistoricalAir(undefined, body.airQuality?.metadata?.locationID); + body.airQuality.previousDayComparison = AirQuality.ComparisonTrend(body.airQuality?.index, HistoricalAirQuality?.index); + break; + } + case "彩云天气": + case "ColorfulClouds": { + const colorfulClouds = new ColorfulClouds({ url: url, header: Settings?.API?.ColorfulClouds?.Header, token: Settings?.API?.ColorfulClouds?.Token || "Y2FpeXVuX25vdGlmeQ==" }); + const Hourly = await colorfulClouds.Hourly(undefined, 1, Date.now() - 24 * 60 * 60 * 1000); + body.airQuality.previousDayComparison = AirQuality.ComparisonTrend(body.airQuality.index, Hourly.index); + break; + } + case "WAQI": + case "World Air Quality Index Project": { + const waqi = new WAQI({ url: url, header: Settings?.API?.WAQI?.Header, token: Settings?.API?.WAQI?.Token }); + break; + } + } + log("✅ CompareAirQuality", ""); + return body; +} + +/** + * @param {any} body + * @param {import('./types').Settings} Settings + */ +function ConvertAirQuality(body, Settings) { + log("☑️ ConvertAirQuality", ""); + let airQuality; + switch (Settings?.AQI?.Local?.Scale) { + case "NONE": + break; + case "HJ_633": + case "EPA_NowCast": + case "WAQI_InstantCast": + default: + airQuality = AirQuality.ConvertScale(body?.airQuality?.pollutants, Settings?.AQI?.Local?.Scale, Settings?.AQI?.Local?.ConvertUnits); + break; + } + if (airQuality.index) { + body.airQuality = { ...body.airQuality, ...airQuality }; + body.airQuality.metadata.providerName += `\nConverted using ${Settings?.AQI?.Local?.Scale}`; + log(`🚧 body.airQuality: ${JSON.stringify(body.airQuality, null, 2)}`, ""); + } + log("✅ ConvertAirQuality", ""); + return body; +} + +/** + * @param {string} url + * @param {any} body + * @param {import('./types').Settings} Settings + */ +async function InjectForecastNextHour(url, body, Settings) { + log("☑️ InjectForecastNextHour", ""); + let forecastNextHour; + switch (Settings?.NextHour?.Provider) { + case "WeatherKit": + break; + case "QWeather": { + const qWeather = new QWeather({ url: url, host: Settings?.API?.QWeather?.Host, header: Settings?.API?.QWeather?.Header, token: Settings?.API?.QWeather?.Token }); + forecastNextHour = await qWeather.Minutely(); + break; + } + case "ColorfulClouds": + default: { + const colorfulClouds = new ColorfulClouds({ url: url, header: Settings?.API?.ColorfulClouds?.Header, token: Settings?.API?.ColorfulClouds?.Token || "Y2FpeXVuX25vdGlmeQ==" }); + forecastNextHour = await colorfulClouds.Minutely(); + break; + } + } + if (forecastNextHour?.metadata) { + forecastNextHour.metadata = { ...body?.forecastNextHour?.metadata, ...forecastNextHour.metadata }; + body.forecastNextHour = { ...body?.forecastNextHour, ...forecastNextHour }; + log(`🚧 body.forecastNextHour: ${JSON.stringify(body?.forecastNextHour, null, 2)}`, ""); + } + log("✅ InjectForecastNextHour", ""); + return body; +} diff --git a/src/response.js b/src/response.js index b57ca78..3ee400d 100644 --- a/src/response.js +++ b/src/response.js @@ -1,4 +1,4 @@ -import { $platform, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "./utils/utils.mjs"; +import { $platform, Lodash as _, Storage, fetch, notification, log, logError, wait, done } from "@nsnanocat/util"; import database from "./function/database.mjs"; import setENV from "./function/setENV.mjs"; import providerNameToLogo from "./function/providerNameToLogo.mjs"; @@ -7,168 +7,169 @@ import WAQI from "./class/WAQI.mjs"; import ColorfulClouds from "./class/ColorfulClouds.mjs"; import QWeather from "./class/QWeather.mjs"; import AirQuality from "./class/AirQuality.mjs"; -import * as flatbuffers from 'flatbuffers'; +import * as flatbuffers from "flatbuffers"; /***************** 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); +const METHOD = $request.method, + HOST = url.hostname, + PATH = url.pathname, + PATHs = url.pathname.split("/").filter(Boolean); log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}, PATHs: ${PATHs}`, ""); // 解析格式 const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; log(`⚠ FORMAT: ${FORMAT}`, ""); !(async () => { /** - * @type {{Settings: import('./interface').Settings}} + * 设置 + * @type {{Settings: import('./types').Settings}} */ const { Settings, Caches, Configs } = setENV("iRingo", "WeatherKit", database); - log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); - switch (Settings.Switch) { - case true: + // 创建空数据 + let body = {}; + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": default: - // 创建空数据 - let body = {}; - // 格式判断 - 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": - break; - case "text/xml": - case "text/html": - case "text/plist": - case "application/xml": - case "application/plist": - case "application/x-plist": - break; - case "text/vtt": - case "application/vtt": + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + break; + case "text/vtt": + case "application/vtt": + break; + case "text/json": + case "application/json": + body = JSON.parse($response.body ?? "{}"); + switch (HOST) { + case "weatherkit.apple.com": + // 路径判断 + if (PATH.startsWith("/api/v1/availability/")) { + log(`🚧 body: ${JSON.stringify(body)}`, ""); + body = Configs?.Availability?.v2; + } break; - case "text/json": - case "application/json": - body = JSON.parse($response.body ?? "{}"); + } + $response.body = JSON.stringify(body); + break; + case "application/vnd.apple.flatbuffer": + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/octet-stream": { + let rawBody = $platform === "Quantumult X" ? new Uint8Array($response.bodyBytes ?? []) : ($response.body ?? new Uint8Array()); + switch (FORMAT) { + case "application/vnd.apple.flatbuffer": { + // 解析FlatBuffer + const ByteBuffer = new flatbuffers.ByteBuffer(rawBody); + const Builder = new flatbuffers.Builder(); + // 主机判断 switch (HOST) { case "weatherkit.apple.com": // 路径判断 - if (PATH.startsWith("/api/v1/availability/")) { - log(`🚧 body: ${JSON.stringify(body)}`, ""); - body = Configs?.Availability?.v2; - }; + if (PATH.startsWith("/api/v2/weather/")) { + body = WeatherKit2.decode(ByteBuffer, "all"); + if (url.searchParams.get("dataSets").includes("airQuality")) { + // InjectAirQuality + if (Settings?.AQI?.ReplaceProviders?.includes(body?.airQuality?.metadata?.providerName)) body = await InjectAirQuality(url, body, Settings); + // CompareAirQuality + body = await CompareAirQuality(url, body, Settings); + // PollutantUnitConverter + switch (body?.airQuality?.metadata?.providerName?.split("\n")?.[0]) { + case "和风天气": + case "QWeather": + if (body?.airQuality?.pollutants) + body.airQuality.pollutants = body.airQuality.pollutants.map(pollutant => { + switch (pollutant.pollutantType) { + case "CO": // Fix CO amount units + pollutant.units = "MILLIGRAMS_PER_CUBIC_METER"; + break; + default: + break; + } + return pollutant; + }); + break; + } + // ConvertAirQuality + if (Settings?.AQI?.Local?.ReplaceScales.includes(body?.airQuality?.scale.split(".")?.[0])) body = ConvertAirQuality(body, Settings); + // Fix Convert units that does not supported in Apple Weather + if (body?.airQuality?.pollutants) body.airQuality.pollutants = AirQuality.FixUnits(body.airQuality.pollutants); + // ProviderLogo + if (body?.airQuality?.metadata?.providerName && !body?.airQuality?.metadata?.providerLogo) body.airQuality.metadata.providerLogo = providerNameToLogo(body?.airQuality?.metadata?.providerName, "v2"); + } + if (url.searchParams.get("dataSets").includes("forecastNextHour")) { + if (!body?.forecastNextHour) body = await InjectForecastNextHour(url, body, Settings); + if (body?.forecastNextHour?.metadata?.providerName && !body?.forecastNextHour?.metadata?.providerLogo) body.forecastNextHour.metadata.providerLogo = providerNameToLogo(body?.forecastNextHour?.metadata?.providerName, "v2"); + } + const WeatherData = WeatherKit2.encode(Builder, "all", body); + Builder.finish(WeatherData); + break; + } break; - }; - $response.body = JSON.stringify(body); + } + rawBody = Builder.asUint8Array(); // Of type `Uint8Array`. break; - case "application/vnd.apple.flatbuffer": + } case "application/protobuf": case "application/x-protobuf": case "application/vnd.google.protobuf": + break; case "application/grpc": case "application/grpc+proto": + break; case "application/octet-stream": - let rawBody = ($platform === "Quantumult X") ? new Uint8Array($response.bodyBytes ?? []) : $response.body ?? new Uint8Array(); - switch (FORMAT) { - case "application/vnd.apple.flatbuffer": - // 解析FlatBuffer - const ByteBuffer = new flatbuffers.ByteBuffer(rawBody); - const Builder = new flatbuffers.Builder(); - // 主机判断 - switch (HOST) { - case "weatherkit.apple.com": - // 路径判断 - if (PATH.startsWith("/api/v2/weather/")) { - body = WeatherKit2.decode(ByteBuffer, "all"); - if (url.searchParams.get("dataSets").includes("airQuality")) { - // InjectAirQuality - if (Settings?.AQI?.ReplaceProviders?.includes(body?.airQuality?.metadata?.providerName)) body = await InjectAirQuality(url, body, Settings); - // CompareAirQuality - body = await CompareAirQuality(url, body, Settings); - // PollutantUnitConverter - switch (body?.airQuality?.metadata?.providerName?.split("\n")?.[0]) { - case "和风天气": - case "QWeather": - if (body?.airQuality?.pollutants) body.airQuality.pollutants = body.airQuality.pollutants.map((pollutant) => { - switch (pollutant.pollutantType) { - case "CO": // Fix CO amount units - pollutant.units = "MILLIGRAMS_PER_CUBIC_METER"; - break; - default: - break; - }; - return pollutant; - }); - break; - }; - // ConvertAirQuality - if (Settings?.AQI?.Local?.ReplaceScales.includes(body?.airQuality?.scale.split(".")?.[0])) body = ConvertAirQuality(body, Settings); - // Fix Convert units that does not supported in Apple Weather - if (body?.airQuality?.pollutants) body.airQuality.pollutants = AirQuality.FixUnits(body.airQuality.pollutants); - // ProviderLogo - if (body?.airQuality?.metadata?.providerName && !body?.airQuality?.metadata?.providerLogo) body.airQuality.metadata.providerLogo = providerNameToLogo(body?.airQuality?.metadata?.providerName, "v2"); - }; - if (url.searchParams.get("dataSets").includes("forecastNextHour")) { - if (!body?.forecastNextHour) body = await InjectForecastNextHour(url, body, Settings); - if (body?.forecastNextHour?.metadata?.providerName && !body?.forecastNextHour?.metadata?.providerLogo) body.forecastNextHour.metadata.providerLogo = providerNameToLogo(body?.forecastNextHour?.metadata?.providerName, "v2"); - }; - const WeatherData = WeatherKit2.encode(Builder, "all", body); - Builder.finish(WeatherData); - break; - }; - break; - }; - rawBody = Builder.asUint8Array(); // Of type `Uint8Array`. - break; - case "application/protobuf": - case "application/x-protobuf": - case "application/vnd.google.protobuf": - break; - case "application/grpc": - case "application/grpc+proto": - break; - case "application/octet-stream": - break; - }; - // 写入二进制数据 - $response.body = rawBody; break; - }; - break; - case false: + } + // 写入二进制数据 + $response.body = rawBody; break; - }; + } + } })() - .catch((e) => logError(e)) - .finally(() => done($response)) + .catch(e => logError(e)) + .finally(() => done($response)); /** - * @param {string} url - * @param {any} body - * @param {import('./interface').Settings} Settings + * @param {string} url + * @param {any} body + * @param {import('./types').Settings} Settings */ async function InjectAirQuality(url, body, Settings) { - log(`☑️ InjectAirQuality`, ""); + log("☑️ InjectAirQuality", ""); let airQuality; switch (Settings?.AQI?.Provider) { case "WeatherKit": break; - case "QWeather": - const qWeather = new QWeather({ "url": url, "host": Settings?.API?.QWeather?.Host, "header": Settings?.API?.QWeather?.Header, "token": Settings?.API?.QWeather?.Token }); + case "QWeather": { + const qWeather = new QWeather({ url: url, host: Settings?.API?.QWeather?.Host, header: Settings?.API?.QWeather?.Header, token: Settings?.API?.QWeather?.Token }); airQuality = await qWeather.AirNow(); break; + } case "ColorfulClouds": - default: - const colorfulClouds = new ColorfulClouds({ "url": url, "header": Settings?.API?.ColorfulClouds?.Header, "token": Settings?.API?.ColorfulClouds?.Token || "Y2FpeXVuX25vdGlmeQ==" }); + default: { + const colorfulClouds = new ColorfulClouds({ url: url, header: Settings?.API?.ColorfulClouds?.Header, token: Settings?.API?.ColorfulClouds?.Token || "Y2FpeXVuX25vdGlmeQ==" }); airQuality = await colorfulClouds.RealTime(); break; - case "WAQI": - const waqi = new WAQI({ "url": url, "header": Settings?.API?.WAQI?.Header, "token": Settings?.API?.WAQI?.Token }); + } + case "WAQI": { + const waqi = new WAQI({ url: url, header: Settings?.API?.WAQI?.Header, token: Settings?.API?.WAQI?.Token }); if (Settings?.API?.WAQI?.Token) { airQuality = await waqi.AQI2(); } else { @@ -180,23 +181,24 @@ async function InjectAirQuality(url, body, Settings) { airQuality = { ...Nearest, ...airQuality }; } break; - }; + } + } if (airQuality?.metadata) { airQuality.metadata = { ...body?.airQuality?.metadata, ...airQuality.metadata }; body.airQuality = { ...body?.airQuality, ...airQuality }; if (!body?.airQuality?.pollutants) body.airQuality.pollutants = []; - }; - log(`✅ InjectAirQuality`, ""); + } + log("✅ InjectAirQuality", ""); return body; -}; +} /** - * @param {string} url - * @param {any} body - * @param {import('./interface').Settings} Settings + * @param {string} url + * @param {any} body + * @param {import('./types').Settings} Settings */ async function CompareAirQuality(url, body, Settings) { - log(`☑️ CompareAirQuality`, ""); + log("☑️ CompareAirQuality", ""); switch (body?.airQuality?.metadata?.providerName?.split("\n")?.[0]) { case null: case undefined: @@ -205,81 +207,86 @@ async function CompareAirQuality(url, body, Settings) { default: break; case "和风天气": - case "QWeather": - const qWeather = new QWeather({ "url": url, "host": Settings?.API?.QWeather?.Host, "header": Settings?.API?.QWeather?.Header, "token": Settings?.API?.QWeather?.Token }); + case "QWeather": { + const qWeather = new QWeather({ url: url, host: Settings?.API?.QWeather?.Host, header: Settings?.API?.QWeather?.Header, token: Settings?.API?.QWeather?.Token }); if (!body?.airQuality?.metadata?.locationID) { const metadata = await qWeather.GeoAPI(); if (!body?.airQuality?.metadata?.attributionUrl) body.airQuality.metadata.attributionUrl = metadata.attributionUrl; body.airQuality.metadata.locationID = metadata?.locationID; - }; + } const HistoricalAirQuality = await qWeather.HistoricalAir(undefined, body.airQuality?.metadata?.locationID); body.airQuality.previousDayComparison = AirQuality.ComparisonTrend(body.airQuality?.index, HistoricalAirQuality?.index); break; + } case "彩云天气": - case "ColorfulClouds": - const colorfulClouds = new ColorfulClouds({ "url": url, "header": Settings?.API?.ColorfulClouds?.Header, "token": Settings?.API?.ColorfulClouds?.Token || "Y2FpeXVuX25vdGlmeQ==" }); + case "ColorfulClouds": { + const colorfulClouds = new ColorfulClouds({ url: url, header: Settings?.API?.ColorfulClouds?.Header, token: Settings?.API?.ColorfulClouds?.Token || "Y2FpeXVuX25vdGlmeQ==" }); const Hourly = await colorfulClouds.Hourly(undefined, 1, Date.now() - 24 * 60 * 60 * 1000); body.airQuality.previousDayComparison = AirQuality.ComparisonTrend(body.airQuality.index, Hourly.index); break; + } case "WAQI": - case "World Air Quality Index Project": - const waqi = new WAQI({ "url": url, "header": Settings?.API?.WAQI?.Header, "token": Settings?.API?.WAQI?.Token }); + case "World Air Quality Index Project": { + const waqi = new WAQI({ url: url, header: Settings?.API?.WAQI?.Header, token: Settings?.API?.WAQI?.Token }); break; - }; - log(`✅ CompareAirQuality`, ""); + } + } + log("✅ CompareAirQuality", ""); return body; -}; +} /** - * @param {any} body - * @param {import('./interface').Settings} Settings + * @param {any} body + * @param {import('./types').Settings} Settings */ function ConvertAirQuality(body, Settings) { - log(`☑️ ConvertAirQuality`, ""); + log("☑️ ConvertAirQuality", ""); let airQuality; switch (Settings?.AQI?.Local?.Scale) { case "NONE": break; - case 'HJ_633': - case 'EPA_NowCast': - case 'WAQI_InstantCast': + case "HJ_633": + case "EPA_NowCast": + case "WAQI_InstantCast": default: airQuality = AirQuality.ConvertScale(body?.airQuality?.pollutants, Settings?.AQI?.Local?.Scale, Settings?.AQI?.Local?.ConvertUnits); break; - }; + } if (airQuality.index) { body.airQuality = { ...body.airQuality, ...airQuality }; body.airQuality.metadata.providerName += `\nConverted using ${Settings?.AQI?.Local?.Scale}`; - }; - log(`✅ ConvertAirQuality`, ""); + } + log("✅ ConvertAirQuality", ""); return body; -}; +} /** - * @param {string} url - * @param {any} body - * @param {import('./interface').Settings} Settings + * @param {string} url + * @param {any} body + * @param {import('./types').Settings} Settings */ async function InjectForecastNextHour(url, body, Settings) { - log(`☑️ InjectForecastNextHour`, ""); + log("☑️ InjectForecastNextHour", ""); let forecastNextHour; switch (Settings?.NextHour?.Provider) { case "WeatherKit": break; - case "QWeather": - const qWeather = new QWeather({ "url": url, "host": Settings?.API?.QWeather?.Host, "header": Settings?.API?.QWeather?.Header, "token": Settings?.API?.QWeather?.Token }); + case "QWeather": { + const qWeather = new QWeather({ url: url, host: Settings?.API?.QWeather?.Host, header: Settings?.API?.QWeather?.Header, token: Settings?.API?.QWeather?.Token }); forecastNextHour = await qWeather.Minutely(); break; + } case "ColorfulClouds": - default: - const colorfulClouds = new ColorfulClouds({ "url": url, "header": Settings?.API?.ColorfulClouds?.Header, "token": Settings?.API?.ColorfulClouds?.Token || "Y2FpeXVuX25vdGlmeQ==" }); + default: { + const colorfulClouds = new ColorfulClouds({ url: url, header: Settings?.API?.ColorfulClouds?.Header, token: Settings?.API?.ColorfulClouds?.Token || "Y2FpeXVuX25vdGlmeQ==" }); forecastNextHour = await colorfulClouds.Minutely(); break; - }; + } + } if (forecastNextHour?.metadata) { forecastNextHour.metadata = { ...body?.forecastNextHour?.metadata, ...forecastNextHour.metadata }; body.forecastNextHour = { ...body?.forecastNextHour, ...forecastNextHour }; - }; - log(`✅ InjectForecastNextHour`, ""); + } + log("✅ InjectForecastNextHour", ""); return body; -}; +} diff --git a/src/interface.ts b/src/types.d.ts similarity index 80% rename from src/interface.ts rename to src/types.d.ts index e15b541..2efe6e4 100644 --- a/src/interface.ts +++ b/src/types.d.ts @@ -1,15 +1,7 @@ export interface Settings { - /** - * 总功能开关 - * - * 是否启用此APP修改 - * - * @defaultValue true - */ - Switch?: boolean; NextHour?: { /** - * [未来一小时降水强度]数据源 + * [未来一小时降水强度] 数据源 * * 始终会使用选定的数据源,填补无降水监测地区的数据。 * @@ -26,7 +18,7 @@ export interface Settings { }; AQI?: { /** - * [空气质量]数据源 + * [空气质量] 数据源 * * 始终会使用选定的数据源,填补无空气质量监测地区的数据。 * @@ -42,7 +34,7 @@ export interface Settings { */ Provider?: 'WeatherKit' | 'ColorfulClouds' | 'QWeather' | 'WAQI'; /** - * [空气质量]需要替换的供应商 + * [空气质量] 需要替换的供应商 * * 选中的空气质量数据源会被替换。 * @@ -53,12 +45,12 @@ export interface Settings { * - `'BreezoMeter'` - BreezoMeter * - `'TWC'` - The Weather Channel * - * @defaultValue [] + * @defaultValue ["QWeather"] */ ReplaceProviders?: ('QWeather' | 'BreezoMeter' | 'TWC')[]; Local?: { /** - * [空气质量]本地替换算法 + * [空气质量] 本地替换算法 * * 本地替换时使用的算法 * @@ -72,7 +64,7 @@ export interface Settings { */ Scale?: 'NONE' | 'WAQI_InstantCast'; /** - * [空气质量]需要修改的标准 + * [空气质量] 需要修改的标准 * * 选中的空气质量标准会被替换。请注意各国监测的污染物种类可能有所不同,转换算法或API未必适合当地。 * @@ -85,9 +77,9 @@ export interface Settings { */ ReplaceScales?: ('HJ6332012')[]; /** - * [空气质量]转换污染物计量单位 + * [空气质量] 转换污染物计量单位 * - * (不推荐。不同单位互转可能会损失精度,导致数值偏大)将污染物数据替换为转换单位后的数据,方便对照转换后的标准。 + * 将污染物数据替换为转换单位后的数据,方便对照转换后的标准。(不推荐。不同单位互转可能会损失精度,导致数值偏大) * * @defaultValue false */ @@ -97,7 +89,7 @@ export interface Settings { API?: { ColorfulClouds?: { /** - * [API]彩云天气 API 令牌 + * [API] 彩云天气令牌 * * 彩云天气 API 令牌 * @@ -107,7 +99,7 @@ export interface Settings { }; QWeather?: { /** - * [API]和风天气 API 主机 + * [API] 和风天气主机 * * 和风天气 API 使用的主机名 * @@ -121,7 +113,7 @@ export interface Settings { */ Host?: 'devapi.qweather.com' | 'api.qweather.com'; /** - * [API]和风天气 API 令牌 + * [API] 和风天气令牌 * * 和风天气 API 令牌 * @@ -131,7 +123,7 @@ export interface Settings { }; WAQI?: { /** - * [API]WAQI API 令牌 + * [API] WAQI 令牌 * * WAQI API 令牌,填写此字段将自动使用WAQI高级API * diff --git a/src/utils b/src/utils deleted file mode 160000 index 40e91e8..0000000 --- a/src/utils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 40e91e80011968370ba7ef400ff768dabf5cf583 diff --git a/template/boxjs.settings.json b/template/boxjs.settings.json index 73e4394..9541610 100644 --- a/template/boxjs.settings.json +++ b/template/boxjs.settings.json @@ -1 +1 @@ -[{"id":"@iRingo.WeatherKit.Settings.Switch","name":"总功能开关","type":"boolean","val":true,"desc":"是否启用此APP修改"},{"id":"@iRingo.WeatherKit.Settings.NextHour.Provider","name":"[未来一小时降水强度]数据源","type":"selects","val":"ColorfulClouds","items":[{"key":"WeatherKit","label":"WeatherKit (不进行替换)"},{"key":"ColorfulClouds","label":"彩云天气"},{"key":"QWeather","label":"和风天气"}],"desc":"始终会使用选定的数据源,填补无降水监测地区的数据。"},{"id":"@iRingo.WeatherKit.Settings.AQI.Provider","name":"[空气质量]数据源","type":"selects","val":"ColorfulClouds","items":[{"key":"WeatherKit","label":"WeatherKit (不进行替换)"},{"key":"ColorfulClouds","label":"彩云天气"},{"key":"QWeather","label":"和风天气"},{"key":"WAQI","label":"The World Air Quality Project"}],"desc":"始终会使用选定的数据源,填补无空气质量监测地区的数据。"},{"id":"@iRingo.WeatherKit.Settings.AQI.ReplaceProviders","name":"[空气质量]需要替换的供应商","type":"checkboxes","val":[],"items":[{"key":"QWeather","label":"和风天气"},{"key":"BreezoMeter","label":"BreezoMeter"},{"key":"TWC","label":"The Weather Channel"}],"desc":"选中的空气质量数据源会被替换。"},{"id":"@iRingo.WeatherKit.Settings.AQI.Local.Scale","name":"[空气质量]本地替换算法","type":"selects","val":"WAQI_InstantCast","items":[{"key":"NONE","label":"None (不进行替换)"},{"key":"WAQI_InstantCast","label":"WAQI InstantCast"}],"desc":"本地替换时使用的算法"},{"id":"@iRingo.WeatherKit.Settings.AQI.Local.ReplaceScales","name":"[空气质量]需要修改的标准","type":"checkboxes","val":["HJ6332012"],"items":[{"key":"HJ6332012","label":"中国 (HJ 633—2012)"}],"desc":"选中的空气质量标准会被替换。请注意各国监测的污染物种类可能有所不同,转换算法或API未必适合当地。"},{"id":"@iRingo.WeatherKit.Settings.AQI.Local.ConvertUnits","name":"[空气质量]转换污染物计量单位","type":"boolean","val":false,"desc":"(不推荐。不同单位互转可能会损失精度,导致数值偏大)将污染物数据替换为转换单位后的数据,方便对照转换后的标准。"},{"id":"@iRingo.WeatherKit.Settings.API.ColorfulClouds.Token","name":"[API]彩云天气 API 令牌","type":"text","val":"","desc":"彩云天气 API 令牌","placeholder":"123456789123456789abcdefghijklmnopqrstuv"},{"id":"@iRingo.WeatherKit.Settings.API.QWeather.Host","name":"[API]和风天气 API 主机","type":"selects","val":"devapi.qweather.com","items":[{"key":"devapi.qweather.com","label":"免费订阅 (devapi.qweather.com)"},{"key":"api.qweather.com","label":"付费订阅 (api.qweather.com)"}],"desc":"和风天气 API 使用的主机名"},{"id":"@iRingo.WeatherKit.Settings.API.QWeather.Token","name":"[API]和风天气 API 令牌","type":"text","val":"","desc":"和风天气 API 令牌","placeholder":"123456789123456789abcdefghijklmnopqrstuv"},{"id":"@iRingo.WeatherKit.Settings.API.WAQI.Token","name":"[API]WAQI API 令牌","type":"text","val":"","desc":"WAQI API 令牌,填写此字段将自动使用WAQI高级API","placeholder":"123456789123456789abcdefghijklmnopqrstuv"}] \ No newline at end of file +[{"id":"@iRingo.WeatherKit.Settings.NextHour.Provider","name":"[未来一小时降水强度] 数据源","type":"selects","val":"ColorfulClouds","items":[{"key":"WeatherKit","label":"WeatherKit (不进行替换)"},{"key":"ColorfulClouds","label":"彩云天气"},{"key":"QWeather","label":"和风天气"}],"desc":"始终会使用选定的数据源,填补无降水监测地区的数据。"},{"id":"@iRingo.WeatherKit.Settings.AQI.Provider","name":"[空气质量] 数据源","type":"selects","val":"ColorfulClouds","items":[{"key":"WeatherKit","label":"WeatherKit (不进行替换)"},{"key":"ColorfulClouds","label":"彩云天气"},{"key":"QWeather","label":"和风天气"},{"key":"WAQI","label":"The World Air Quality Project"}],"desc":"始终会使用选定的数据源,填补无空气质量监测地区的数据。"},{"id":"@iRingo.WeatherKit.Settings.AQI.ReplaceProviders","name":"[空气质量] 需要替换的供应商","type":"checkboxes","val":["QWeather"],"items":[{"key":"QWeather","label":"和风天气"},{"key":"BreezoMeter","label":"BreezoMeter"},{"key":"TWC","label":"The Weather Channel"}],"desc":"选中的空气质量数据源会被替换。"},{"id":"@iRingo.WeatherKit.Settings.AQI.Local.Scale","name":"[空气质量] 本地替换算法","type":"selects","val":"WAQI_InstantCast","items":[{"key":"NONE","label":"None (不进行替换)"},{"key":"WAQI_InstantCast","label":"WAQI InstantCast"}],"desc":"本地替换时使用的算法"},{"id":"@iRingo.WeatherKit.Settings.AQI.Local.ReplaceScales","name":"[空气质量] 需要修改的标准","type":"checkboxes","val":["HJ6332012"],"items":[{"key":"HJ6332012","label":"中国 (HJ 633—2012)"}],"desc":"选中的空气质量标准会被替换。请注意各国监测的污染物种类可能有所不同,转换算法或API未必适合当地。"},{"id":"@iRingo.WeatherKit.Settings.AQI.Local.ConvertUnits","name":"[空气质量] 转换污染物计量单位","type":"boolean","val":false,"desc":"将污染物数据替换为转换单位后的数据,方便对照转换后的标准。(不推荐。不同单位互转可能会损失精度,导致数值偏大)"},{"id":"@iRingo.WeatherKit.Settings.API.ColorfulClouds.Token","name":"[API] 彩云天气令牌","type":"text","val":"","desc":"彩云天气 API 令牌","placeholder":"123456789123456789abcdefghijklmnopqrstuv"},{"id":"@iRingo.WeatherKit.Settings.API.QWeather.Host","name":"[API] 和风天气主机","type":"selects","val":"devapi.qweather.com","items":[{"key":"devapi.qweather.com","label":"免费订阅 (devapi.qweather.com)"},{"key":"api.qweather.com","label":"付费订阅 (api.qweather.com)"}],"desc":"和风天气 API 使用的主机名"},{"id":"@iRingo.WeatherKit.Settings.API.QWeather.Token","name":"[API] 和风天气令牌","type":"text","val":"","desc":"和风天气 API 令牌","placeholder":"123456789123456789abcdefghijklmnopqrstuv"},{"id":"@iRingo.WeatherKit.Settings.API.WAQI.Token","name":"[API] WAQI 令牌","type":"text","val":"","desc":"WAQI API 令牌,填写此字段将自动使用WAQI高级API","placeholder":"123456789123456789abcdefghijklmnopqrstuv"}] \ No newline at end of file