From ffbd73c3fb3ecf1e3735fb5a2f175350d7937e47 Mon Sep 17 00:00:00 2001 From: so1ve Date: Sun, 25 Feb 2024 17:12:56 +0800 Subject: [PATCH 01/17] init --- .github/pull.yml | 11 + .github/workflows/autofix-ci.yml | 38 + .github/workflows/build.yml | 52 - .github/workflows/ci.yml | 87 + .github/workflows/lock.yml | 27 + .github/workflows/release.yml | 25 + .gitignore | 13 +- .npmrc | 2 + .prettierignore | 1 + .vscode/extensions.json | 3 + .vscode/settings.json | 4 + LICENSE | 186 +- README.md | 52 +- cw.config.js | 22 - doc/docs/.vitepress/config.js | 194 +- doc/docs/example/autoupdate.md | 53 +- doc/docs/example/autowebp.md | 2 +- doc/docs/example/forward.md | 100 +- doc/docs/example/parallelcdn.md | 1 - doc/docs/ext/api.md | 4 +- doc/docs/ext/autoclean.md | 4 +- doc/docs/ext/engine.md | 7 +- doc/docs/ext/hotupdate.md | 8 +- doc/docs/index.md | 1 - doc/docs/rule/fetch.md | 24 +- doc/docs/rule/header.md | 5 +- doc/docs/rule/index.md | 46 +- doc/docs/rule/redirect.md | 10 +- doc/docs/rule/replace.md | 10 +- doc/docs/rule/return.md | 14 +- doc/docs/rule/script.md | 39 +- doc/docs/start.md | 202 +- doc/docs/timefunction.md | 2 +- doc/package.json | 32 +- eslint.config.js | 10 + main/entry.js | 44 - main/handle/cgi.js | 80 - main/handle/main.js | 283 -- main/utils/cons.js | 18 - main/utils/engine.js | 319 -- main/utils/rebuild.js | 46 - package.json | 97 +- pnpm-lock.yaml | 5560 ++++++++++++++++++++++++++++++ prettier.config.cjs | 1 + renovate.json | 3 + src/cache-db.ts | 80 + src/index.ts | 2 + static/404.html | 623 ++-- static/autoupdate.js | 108 +- static/config.schema.json | 525 ++- static/config.yaml | 253 +- test/index.test.ts | 7 + tsconfig.json | 15 + vite.config.ts | 5 + 54 files changed, 7160 insertions(+), 2200 deletions(-) create mode 100644 .github/pull.yml create mode 100644 .github/workflows/autofix-ci.yml delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/lock.yml create mode 100644 .github/workflows/release.yml create mode 100644 .npmrc create mode 100644 .prettierignore create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json delete mode 100644 cw.config.js create mode 100644 eslint.config.js delete mode 100644 main/entry.js delete mode 100644 main/handle/cgi.js delete mode 100644 main/handle/main.js delete mode 100644 main/utils/cons.js delete mode 100644 main/utils/engine.js delete mode 100644 main/utils/rebuild.js create mode 100644 pnpm-lock.yaml create mode 100644 prettier.config.cjs create mode 100644 renovate.json create mode 100644 src/cache-db.ts create mode 100644 src/index.ts create mode 100644 test/index.test.ts create mode 100644 tsconfig.json create mode 100644 vite.config.ts diff --git a/.github/pull.yml b/.github/pull.yml new file mode 100644 index 0000000..9a8df79 --- /dev/null +++ b/.github/pull.yml @@ -0,0 +1,11 @@ +version: "1" +rules: + - base: main + upstream: so1ve:main + mergeMethod: hardreset + assignees: + - so1ve + reviewers: + - so1ve + conflictReviewers: + - so1ve diff --git a/.github/workflows/autofix-ci.yml b/.github/workflows/autofix-ci.yml new file mode 100644 index 0000000..c1eed75 --- /dev/null +++ b/.github/workflows/autofix-ci.yml @@ -0,0 +1,38 @@ +name: autofix.ci +on: + push: + branches: + - main + + pull_request: {} + +permissions: + contents: read + +jobs: + autofix: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup PNPM + run: corepack enable + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 20.x + cache: pnpm + + - name: Setup + run: npm i -g @antfu/ni + + - name: Install + run: ni --no-frozen-lockfile + + - name: Lint and fix + run: nr lint:fix + + - uses: autofix-ci/action@ea32e3a12414e6d3183163c3424a7d7a8631ad84 + with: + commit-message: "chore: apply automatic fixes" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index dec8bba..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: ClientWorker CI -on: - - push -jobs: - buildstatic: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup node - uses: actions/setup-node@v1 - with: - node-version: 16.x - - name: Cache node modules - uses: actions/cache@v1 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - - name: Install & Build - run: > - rm -rf .gitignore - - echo "node_modules" >> .gitignore - - echo "doc/node_modules" >> .gitignore - - npm i -D - - npm install -D webpack-cli webpack - - npm run build - - echo "clientworker.js.org" > ./dist/CNAME - - cd doc - - npm add --dev vitepress vue - - npm run "docs:build" - - - - - name: Deploy to GithubPage - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.TOKEN }} - publish_dir: ./dist - - - name: Publish to NPM - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPM }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9892a18 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,87 @@ +name: CI + +on: + push: + branches: + - main + + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup PNPM + run: corepack enable + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 20.x + cache: pnpm + + - name: Setup + run: npm i -g @antfu/ni + + - name: Install + run: nci + + - name: Lint + run: nr lint + + typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup PNPM + run: corepack enable + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 20.x + cache: pnpm + + - name: Setup + run: npm i -g @antfu/ni + + - name: Install + run: nci + + - name: Typecheck + run: nr typecheck + + test: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + node: [16.x, 18.x, 20.x] + os: [ubuntu-latest, windows-latest, macos-latest] + fail-fast: false + + steps: + - uses: actions/checkout@v4 + + - name: Setup PNPM + run: corepack enable + + - name: Set node version to ${{ matrix.node }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + cache: pnpm + + - name: Setup + run: npm i -g @antfu/ni + + - name: Install + run: nci + + - name: Test + run: nr test diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 0000000..b9a6210 --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,27 @@ +name: Lock Threads + +on: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: {} + +permissions: + issues: write + pull-requests: write + +concurrency: + group: lock + +jobs: + action: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + issue-inactive-days: "14" + issue-comment: | + This issue has been locked since it has been closed for more than 14 days. + + If you have found a concrete bug or regression related to it, please open a new [issue](./new/choose). If you have any other comments you should create a new [discussion](../discussions/new/choose). + process-only: issues diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b5f7f45 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v3 + with: + node-version: 20.x + + - run: npx changelogithub + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 2f43ada..95f9ee9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,11 @@ +.cache +.DS_Store +.idea +*.log +*.tgz +coverage +dist +lib-cov +logs node_modules -package-lock.json -doc/node_modules -dist/ \ No newline at end of file +temp diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..82a2f13 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +ignore-workspace-root-check=true +git-checks=false diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..bd5535a --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +pnpm-lock.yaml diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..7355b16 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a2337a0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib", + "eslint.experimental.useFlatConfig": true +} diff --git a/LICENSE b/LICENSE index 153d416..7d9d7b6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,165 +1,21 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. \ No newline at end of file +MIT License + +Copyright (c) 2022 Ray + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index b499a70..adf81d8 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,23 @@ -# ClientWorker - -文档地址:[ClientWorker](https://clientworker.js.org) - -↑这也是用ClientWorker搭建的! - -## 它能干什么 - -- 绕备,在域名不变动的情况下,其余用户所有请求均可以定向到你的其他服务器或者cdn,而首屏域名无需ICP备案。 -- 降本,你可以用廉价的家宽+公网ipv4/ipv6,即使是80/443被封锁,你也可以在不变动端口的情况下将用户流量引向家宽。 -- 白嫖,可以用免费的公网穿透服务,接近零成本托管你的服务。 -- 加速,将静态资源流量(乃至动态资源)**并发**到全球cdn,实现前端级负载均衡。 -- 绕禁,通过在前端修改标头的方式,修复被故意篡改的`MIME`,正常托管网站,绕过各大托管商对于网站部署的限制,可以毫无负担的使用阿里云、腾讯云等对象存储而不用开启网站模式,乃至GithubRaw无限流量(绕过GithubPage 100GB限制)。 -- 愈合:通过并发方式,辅助JSDelivr、Unpkg、cdnjs等大陆几乎不可达请求重定向至其他cdn,从而实现无修改、全球加速。 -- 不宕,即使首屏服务器离线或不可达,已访问过的用户依旧可以正常命中备用服务器。 -- 缓存,颗粒化控制缓存,多种情况不同选择,智能调度缓存和请求,避免有缓存时无返回、缓存无法及时更新问题,确保缓存在客户端工作的更顺畅。 -- 离线,可以迅速支撑普通离线应用,助力快速构建PWA。 -- 兼容,Webp无缝,可以通过判断标头来判断是否支持Webp,并且自动替换图片请求,为网站加速助力。 -- 审核,通过内置的规则可以屏蔽并替换、拦截敏感词汇,实现网站内容安全。 -- 无刷,你不需要刷新就可以激活ClientWorker -- 热更,即使源站完全宕机,你也可以更新用户手中的ClientWorker与配置,确保网站正常运行。 -- 切片,对于一个请求发起多个切片以提高单文件下载速度 -- 叠速,专门为ClientWorker开发的`KFCThursdayVW50`引擎能在浏览器端切片并同时并发不同的镜像服务器,对于下载大文件可以带宽叠加的效果。 -- 均衡,对多个镜像并发,选择最优的镜像服务器,保证网站的响应速度,同时达到负载均衡的目的。 -- 高度自定义...更多玩法等你挖掘 - -## License - -GPL-3.0-or-later +# pkg-name + +[![NPM version](https://img.shields.io/npm/v/pkg-name?color=a1b858&label=)](https://www.npmjs.com/package/pkg-name) + +## 💎 Features + +## 📦 Installation + +```bash +$ npm install pkg-name +$ yarn add pkg-name +$ pnpm add pkg-name +``` + +## 🚀 Usage + +```ts + +``` + +## 📝 License + +[MIT](./LICENSE). Made with ❤️ by [Ray](https://github.com/so1ve) diff --git a/cw.config.js b/cw.config.js deleted file mode 100644 index 56d2949..0000000 --- a/cw.config.js +++ /dev/null @@ -1,22 +0,0 @@ -import path from 'path' -import { fileURLToPath } from 'url'; -import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; -import TerserPlugin from 'terser-webpack-plugin'; -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const development = 0 -export default { - entry: './main/entry.js', - optimization: { - minimize: !development, - minimizer: [ - new TerserPlugin({ - extractComments: false, - }), - ], - }, - output: { - path: path.resolve(__dirname, './dist'), - filename: 'cw.js', - } -} \ No newline at end of file diff --git a/doc/docs/.vitepress/config.js b/doc/docs/.vitepress/config.js index f96634a..4e37466 100644 --- a/doc/docs/.vitepress/config.js +++ b/doc/docs/.vitepress/config.js @@ -1,87 +1,113 @@ -import cwpkgjson from './../../../package.json'; +import cwpkgjson from "../../../package.json"; + export default { - title: 'ClientWorker', - description: '一个基于规则的前端路由拦截器', - lang: 'zh-CN', + title: "ClientWorker", + description: "一个基于规则的前端路由拦截器", + lang: "zh-CN", - head: [ - //['link', { rel: 'icon', href: '/favicon.png' }], - ['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi' }], - ['link', { href: 'https://npmm/lightgallery@2.3.0/css/lightgallery.css', rel: 'stylesheet' }], - ['script', { src: 'https://npmm/lightgallery@2.3.0/lightgallery.min.js' }], - ['script', { src: `https://npmm/clientworker@${cwpkgjson.version}/dist/autoupdate.js` }] - ], + head: [ + // ['link', { rel: 'icon', href: '/favicon.png' }], + [ + "meta", + { + name: "viewport", + content: + "width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi", + }, + ], + [ + "link", + { + href: "https://npmm/lightgallery@2.3.0/css/lightgallery.css", + rel: "stylesheet", + }, + ], + ["script", { src: "https://npmm/lightgallery@2.3.0/lightgallery.min.js" }], + [ + "script", + { + src: `https://npmm/clientworker@${cwpkgjson.version}/dist/autoupdate.js`, + }, + ], + ], - lastUpdated: true, - themeConfig: { - socialLinks: [ - { icon: 'github', link: 'https://github.com/ChenYFan/ClientWorker' } - ], - nav: [ - // NavbarItem - { - text: '首页', - link: '/', - }, - { - text: '规则', - link: '/rule/', - }, - { - text: '例子', - link: '/example/parallelcdn', - }, - { - text: '拓展', - link: '/ext/engine', - }, - { - text: 'Q群', - link: 'https://jq.qq.com/?_wv=1027&k=rAcnhzqK', - }, - { - text: '优秀配置', - link: 'https://github.com/ChenYFan/ClientWorker/discussions/categories/awesome-example' - } - ], - sidebar: [ - { - text: '上手', - items: [ - { text: '开始', link: '/start' } - ] - }, - { - text: '规则书写', - items: [ - { text: '捕捉与搜索 | Search & Catch', link: '/rule/' }, - { text: 'url重写/并发 | url replace/parallel', link: '/rule/replace' }, - { text: '重定向 | redirect', link: '/rule/redirect' }, - { text: '返回响应 | return', link: '/rule/return' }, - { text: '重写标头 | header', link: '/rule/header' }, - { text: '发起请求 | fetch', link: '/rule/fetch' }, - { text: '跳过处理 | skip', link: '/rule/skip' }, - { text: '自定义脚本 | script', link: '/rule/script' } - ] - }, - { - text: '例子', - items: [ - { text: '如何解决JSDelivr等cdn在境内加载缓慢问题', link: '/example/parallelcdn' }, - { text: 'WEBP兼容计划', link: '/example/autowebp' }, - { text: '如何自动更新配置和ClientWorker', link: '/example/autoupdate' }, - { text: '转发、并发、绕备', link: '/example/forward' } - ] - }, - { - text: '拓展', - items: [ - { text: '自动清理过期缓存', link: '/ext/autoclean' }, - { text: "热更新", link: "/ext/hotupdate" }, - { text: '关于引擎', link: '/ext/engine' }, - { text: "内置API接口", link: "/ext/api" } - ] - } - ] - } -} + lastUpdated: true, + themeConfig: { + socialLinks: [ + { icon: "github", link: "https://github.com/ChenYFan/ClientWorker" }, + ], + nav: [ + // NavbarItem + { + text: "首页", + link: "/", + }, + { + text: "规则", + link: "/rule/", + }, + { + text: "例子", + link: "/example/parallelcdn", + }, + { + text: "拓展", + link: "/ext/engine", + }, + { + text: "Q群", + link: "https://jq.qq.com/?_wv=1027&k=rAcnhzqK", + }, + { + text: "优秀配置", + link: "https://github.com/ChenYFan/ClientWorker/discussions/categories/awesome-example", + }, + ], + sidebar: [ + { + text: "上手", + items: [{ text: "开始", link: "/start" }], + }, + { + text: "规则书写", + items: [ + { text: "捕捉与搜索 | Search & Catch", link: "/rule/" }, + { + text: "url重写/并发 | url replace/parallel", + link: "/rule/replace", + }, + { text: "重定向 | redirect", link: "/rule/redirect" }, + { text: "返回响应 | return", link: "/rule/return" }, + { text: "重写标头 | header", link: "/rule/header" }, + { text: "发起请求 | fetch", link: "/rule/fetch" }, + { text: "跳过处理 | skip", link: "/rule/skip" }, + { text: "自定义脚本 | script", link: "/rule/script" }, + ], + }, + { + text: "例子", + items: [ + { + text: "如何解决JSDelivr等cdn在境内加载缓慢问题", + link: "/example/parallelcdn", + }, + { text: "WEBP兼容计划", link: "/example/autowebp" }, + { + text: "如何自动更新配置和ClientWorker", + link: "/example/autoupdate", + }, + { text: "转发、并发、绕备", link: "/example/forward" }, + ], + }, + { + text: "拓展", + items: [ + { text: "自动清理过期缓存", link: "/ext/autoclean" }, + { text: "热更新", link: "/ext/hotupdate" }, + { text: "关于引擎", link: "/ext/engine" }, + { text: "内置API接口", link: "/ext/api" }, + ], + }, + ], + }, +}; diff --git a/doc/docs/example/autoupdate.md b/doc/docs/example/autoupdate.md index 572fcd1..4dcf18b 100644 --- a/doc/docs/example/autoupdate.md +++ b/doc/docs/example/autoupdate.md @@ -4,14 +4,16 @@ ClientWorker外暴露了一个接口`/cw-cgi/api?type=config`,对其作任何 ```js async function updateConfig() { - await fetch('/cw-cgi/api?type=config').then(res => res.text()).then(res => { - if (res === 'ok') { - console.log(`Config updated`); - } else { - console.log(`Config update failed`); - } - }) - } + await fetch("/cw-cgi/api?type=config") + .then((res) => res.text()) + .then((res) => { + if (res === "ok") { + console.log("Config updated"); + } else { + console.log("Config update failed"); + } + }); +} ``` 你也可以使用ClientWorker的`autoupdate.js`来实现更新。 @@ -22,20 +24,25 @@ async function updateConfig() { ```js async function updateSW() { - if (navigator.serviceWorker) { - navigator.serviceWorker.getRegistrations().then(async registrations => { - for (let registration of registrations) { - await registration.update(); - } - console.log(`Unregistered service workers`); - }).then(() => { - navigator.serviceWorker.register('/cw.js').then(async registration => { - console.log(`Registered service worker`); - await registration.update(); - }) - }) - } - }; + if (navigator.serviceWorker) { + navigator.serviceWorker + .getRegistrations() + .then(async (registrations) => { + for (const registration of registrations) { + await registration.update(); + } + console.log("Unregistered service workers"); + }) + .then(() => { + navigator.serviceWorker + .register("/cw.js") + .then(async (registration) => { + console.log("Registered service worker"); + await registration.update(); + }); + }); + } +} ``` -你也可以使用ClientWorker的`autoupdate.js`来实现更新。 \ No newline at end of file +你也可以使用ClientWorker的`autoupdate.js`来实现更新。 diff --git a/doc/docs/example/autowebp.md b/doc/docs/example/autowebp.md index 7c56adf..51197e7 100644 --- a/doc/docs/example/autowebp.md +++ b/doc/docs/example/autowebp.md @@ -19,4 +19,4 @@ 这是一张jpg图片,当你浏览器支持Webp时,会替换到`webp`并显示`Webp Accept!`;当浏览器不支持Webp时,会显示`Webp Reject!This is a jpg file`。 -![Webp Support](https://npmm/chenyfan-os@0.0.0-r24/WEBPTEST.jpg) \ No newline at end of file +![Webp Support](https://npmm/chenyfan-os@0.0.0-r24/WEBPTEST.jpg) diff --git a/doc/docs/example/forward.md b/doc/docs/example/forward.md index ce1ca72..53f78ff 100644 --- a/doc/docs/example/forward.md +++ b/doc/docs/example/forward.md @@ -4,14 +4,14 @@ ```yaml catch_rules: #转换规则 - - rule: _ #ClientWorker语法糖,匹配当前域,返回一个域名带端口 - transform_rules: #转换规则,最上面的优先最高 - - search: \#.* #在发送请求时匹配#后内容并移除 - replace: '' - - search: \?.* #在发送请求时匹配?后内容并移除,仅限静态请求 - replace: '' - - search: _ - replace: + - rule: _ #ClientWorker语法糖,匹配当前域,返回一个域名带端口 + transform_rules: #转换规则,最上面的优先最高 + - search: \#.* #在发送请求时匹配#后内容并移除 + replace: "" + - search: \?.* #在发送请求时匹配?后内容并移除,仅限静态请求 + replace: "" + - search: _ + replace: - _ #保留原始请求 - xxx.github.io #GithubPage托管 - xxx.gitee.io #GiteePage托管 @@ -21,17 +21,17 @@ catch_rules: #转换规则 - xxx.tencentcs.com #腾讯对象存储托管 - xxx.qbox.me - - search: \.html$ - header: - Content-Type: text/html;charset=UTF-8 #修复标头 + - search: \.html$ + header: + Content-Type: text/html;charset=UTF-8 #修复标头 - - search: _ - action: fetch - fetch: - status: 200 - engine: classic - preflight: false - timeout: 5000 + - search: _ + action: fetch + fetch: + status: 200 + engine: classic + preflight: false + timeout: 5000 ``` **主站和分流站需要HTTPS,ClientWorker在HTTP环境下不工作** @@ -40,42 +40,42 @@ catch_rules: #转换规则 ```yaml catch_rules: #转换规则 - - rule: _ #ClientWorker语法糖,匹配当前域,返回一个域名带端口 - transform_rules: #转换规则,最上面的优先最高 - - search: \#.* #在发送请求时匹配#后内容并移除 - replace: '' + - rule: _ #ClientWorker语法糖,匹配当前域,返回一个域名带端口 + transform_rules: #转换规则,最上面的优先最高 + - search: \#.* #在发送请求时匹配#后内容并移除 + replace: "" - - search: _ - replace: - - _ #保留原始请求 - - 123.45.67.89 #ip镜像,需要ip HTTPS - - 123.45.67.90:12345 #任意端口 - - [2606::1234]:34567 #ipv6 - - 1.2.3.4.nip.io:65121 + - search: _ + replace: + - _ #保留原始请求 + - 123.45.67.89 #ip镜像,需要ip HTTPS + - 123.45.67.90:12345 #任意端口 + - \[2606::1234]:34567 #ipv6 + - 1.2.3.4.nip.io:65121 - - search: \.(js|css) - action: fetch - fetch: - status: 200 - engine: classic - preflight: false - timeout: 5000 - mode: cors - redirect: follow - credentials: include + - search: \.(js|css) + action: fetch + fetch: + status: 200 + engine: classic + preflight: false + timeout: 5000 + mode: cors + redirect: follow + credentials: include - - search: _ - action: fetch - fetch: - status: 200 - engine: parallel - preflight: true - mode: cors - redirect: follow - credentials: include - timeout: 5000 + - search: _ + action: fetch + fetch: + status: 200 + engine: parallel + preflight: true + mode: cors + redirect: follow + credentials: include + timeout: 5000 ``` **主站和分流站需要HTTPS,ClientWorker在HTTP环境下不工作** -**此外,为了正确传递Ccookie等鉴权消息,`preflight`设为开,并且`credentials`为`include`,这意味着你的源站必须要开启`Access-Control-Allow-Origin`(不能为`*`,必须是当前域名)和`Access-Control-Allow-Credentials`为`true`,否则会直接失败** \ No newline at end of file +**此外,为了正确传递Ccookie等鉴权消息,`preflight`设为开,并且`credentials`为`include`,这意味着你的源站必须要开启`Access-Control-Allow-Origin`(不能为`*`,必须是当前域名)和`Access-Control-Allow-Credentials`为`true`,否则会直接失败** diff --git a/doc/docs/example/parallelcdn.md b/doc/docs/example/parallelcdn.md index 4537241..11bf9fc 100644 --- a/doc/docs/example/parallelcdn.md +++ b/doc/docs/example/parallelcdn.md @@ -39,7 +39,6 @@ NPM的镜像相对较少,如果有更多的推荐可以点击右上角Github - https://cdn.staticfile.org - https://mirrors.sustech.edu.cn/cdnjs/ajax/libs # 南大 - https://cdnjs.sourcegcdn.com/ajax/libs # 全同步 https://cdnjs.cloudflare.com - ``` ## `Github` diff --git a/doc/docs/ext/api.md b/doc/docs/ext/api.md index 8920191..362a348 100644 --- a/doc/docs/ext/api.md +++ b/doc/docs/ext/api.md @@ -6,7 +6,7 @@ ClientWorker默认会劫持`/cw-cgi/`作为前端控制台响应,也提供了 这是API类型: -## `config` +## `config` > 任何请求方式均可 @@ -32,4 +32,4 @@ ClientWorker默认会劫持`/cw-cgi/`作为前端控制台响应,也提供了 ## `version` -返回版本号,这也是指示ClientWorker安装成功的表现。 \ No newline at end of file +返回版本号,这也是指示ClientWorker安装成功的表现。 diff --git a/doc/docs/ext/autoclean.md b/doc/docs/ext/autoclean.md index 7ca50f9..d838864 100644 --- a/doc/docs/ext/autoclean.md +++ b/doc/docs/ext/autoclean.md @@ -1,4 +1,4 @@ -# 过期缓存自动清除 +# 过期缓存自动清除 ClientWorker内置了一个定时器,在每次启动时被激活,用于循环定时检测并删除过期缓存。 @@ -9,4 +9,4 @@ name: ClientWorker Docs Config cleaninterval: 1000*20 # 每20秒检测并清理一次 ``` -> ClientWorker在依赖的页面被关闭时会存活大约1分钟。被ClientWorker被杀死后过期的缓存不会被清理。直到下一次激活才会重新清理。 \ No newline at end of file +> ClientWorker在依赖的页面被关闭时会存活大约1分钟。被ClientWorker被杀死后过期的缓存不会被清理。直到下一次激活才会重新清理。 diff --git a/doc/docs/ext/engine.md b/doc/docs/ext/engine.md index 79b779d..dfd5c0e 100644 --- a/doc/docs/ext/engine.md +++ b/doc/docs/ext/engine.md @@ -8,8 +8,7 @@ ClientWorker中拥有五款原理不同的并发引擎,他们分别是`fetch` 在这其中,`fetch`(JS原始请求方式) 与 `Crazy`是单请求输入引擎,`Classic` 、 `Parallel` 与 `KFCThursdayVW50` 是多请求输入引擎。这意味着后面两个引擎可以同时对多个地址发起请求,而前面两个引擎只能对单个地址发起请求。请注意,除了`fetch` 之外,其他引擎都是**多线程的**,非多线程请求将会被降级。 -> **注意:** -> `fetch` `Crazy` 只接受字符串形式的url +> **注意:** > `fetch` `Crazy` 只接受字符串形式的url > `Classic` `Parallel` `KFCThursdayVW50` 只接受数组形式的urls `Promise.any`的兼容性远低于`ServiceWorker`,ClientWorker会自动对其PolyFill,因此ClientWorker兼容性最低要求与ServiceWorker相同。 @@ -72,7 +71,7 @@ ClientWorker中拥有五款原理不同的并发引擎,他们分别是`fetch` 此后`KFCThursdayVW50`将**对每一个源**发起共`线程数`个大小为`总大小÷线程数`的请求,并发下载,在任何一个源响应正确代码后打断当前组的其余请求,最后合并为一个响应主体,并将`PreFetch`中的标头与状态还原。 -> 并发的总请求为线程数*源个数 +> 并发的总请求为线程数\*源个数 这种方式可以叠加不同镜像的带宽,适合下载较大的文件。 @@ -80,4 +79,4 @@ ClientWorker中拥有五款原理不同的并发引擎,他们分别是`fetch` > 对于较小的文件会起到**减速的效果** -> (4线程,4镜像)对于一个存储在Sharepoint的2GB文件,可以显著提速近7倍速度(30MB/s->200MB/s) \ No newline at end of file +> (4线程,4镜像)对于一个存储在Sharepoint的2GB文件,可以显著提速近7倍速度(30MB/s->200MB/s) diff --git a/doc/docs/ext/hotupdate.md b/doc/docs/ext/hotupdate.md index f475efc..e544228 100644 --- a/doc/docs/ext/hotupdate.md +++ b/doc/docs/ext/hotupdate.md @@ -13,8 +13,8 @@ ClientWorker支持从外部加载和更新ClientWorker及其配置,避免在 ```yaml name: ClientWorker hotpatch: - - https://raw.githubusercontent.com/ChenYFan/ClientWorker/gh-pages/cw.js - - https://cdn.jsdelivr.net/gh/ChenYFan/ClientWorker/cw.js + - https://raw.githubusercontent.com/ChenYFan/ClientWorker/gh-pages/cw.js + - https://cdn.jsdelivr.net/gh/ChenYFan/ClientWorker/cw.js ``` api请求请见[热更新 - ClientWorker热补丁](/ext/api.html)。 @@ -30,8 +30,8 @@ api请求请见[热更新 - ClientWorker热补丁](/ext/api.html)。 ```yaml name: ClientWorker hotconfig: - - https://raw.githubusercontent.com/ChenYFan/ClientWorker/gh-pages/config.yaml - - https://cdn.jsdelivr.net/gh/ChenYFan/ClientWorker/config.yaml + - https://raw.githubusercontent.com/ChenYFan/ClientWorker/gh-pages/config.yaml + - https://cdn.jsdelivr.net/gh/ChenYFan/ClientWorker/config.yaml ``` api请求请见[热更新 - Config热更新](/ext/api.html)。 diff --git a/doc/docs/index.md b/doc/docs/index.md index 4fac840..cbdc38f 100644 --- a/doc/docs/index.md +++ b/doc/docs/index.md @@ -28,4 +28,3 @@ features: title: 内置四套先进的请求引擎,满足你的需求 details: 自带Classic、Parallel、Crazy与KFCThursdayVW50四套并发引擎,完美解决前端请求故障,节省流量,负载均衡,加速下载,提高体验。 --- - diff --git a/doc/docs/rule/fetch.md b/doc/docs/rule/fetch.md index 850b7f4..e53c09a 100644 --- a/doc/docs/rule/fetch.md +++ b/doc/docs/rule/fetch.md @@ -1,7 +1,7 @@ # 发起请求 `fetch` ```yaml -- search: _ +- search: _ action: fetch fetch: #fetch参数 @@ -16,8 +16,6 @@ **在3.0.0及之后版本后**,ClientWorker遍历完所有规则后如果发现没有任何`fetch`操作,将会视为[skip](/rule/skip),跳过所有的路由修改。 - - > 动态网站如果对多个服务器并发,需要做好防重放准备 # 参数 @@ -36,10 +34,10 @@ 这是引擎的选择 -|请求/源|单请求|多请求| -|---------|--------|--------| -|单源|`fetch`|`crazy`| -|多源多镜像|`classic`或`parallel`|`KFCThursdayVW50`| +| 请求/源 | 单请求 | 多请求 | +| ---------- | --------------------- | ----------------- | +| 单源 | `fetch` | `crazy` | +| 多源多镜像 | `classic`或`parallel` | `KFCThursdayVW50` | 当你在单源时选择了多镜像引擎,ClientWorker会将其视为错误并降级为单源`fetch`引擎。 @@ -52,7 +50,7 @@ > 这不是指线程。事实上除了`fetch`,ClientWorker的所有引擎都是多线程的。 ```yaml -- search: _ +- search: _ action: fetch fetch: engine: classic @@ -70,7 +68,7 @@ - `parallel` 基于响应状态的引擎,它会并发所有请求,直到任意一个请求返回正确的`status`,核心是`Event`调度,几乎没有流量浪费,支持流式下载。 - `KFCThursdayVW50` 疯狂的暴力多并发下载,可以视为`crazy`和`parallel`的组合。会对所有的镜像进行切片并并发下载,基于状态。 -> **Warning**: +> **Warning**: > 请不要随意使用`KFCThursdayVW50`和`Crazy`,这对用户浏览器的压力会非常大,并且对于较小的文件会起到减速的效果。 这是[完整的两者引擎差异比较](/ext/engine) @@ -80,7 +78,7 @@ 为`fetch`期望得到的响应状态,不满足状态此分响应将被忽略。可以避免任意一引擎以**最快的速度返回错误界面**这一尴尬问题。默认为`200` ```yaml -- search: _ +- search: _ action: fetch fetch: status: 200 @@ -130,8 +128,6 @@ ClientWorker会在获得请求时查找缓存: - 若在最长延迟时间内没有响应,则返回缓存,请求最新版本线程不会被阻断,会在后台更新缓存 - 若无:请求最新版本,填入缓存。 - - ### `expire` 缓存过期时间,可以为表达式。单位为毫秒。默认`0`表示瞬间过期。 @@ -178,7 +174,7 @@ ClientWorker会在获得请求时查找缓存: > 我们强烈建议将此值设为比4更小的数值,过高的同域名并发会被浏览器挂起。 > 对于单请求`Crazy`而言,并发的请求数相当于设置的线程数 -> 对于多请求`KFCThursdayVW50`而言,并发的请求数相当于设置的线程数*源的个数 +> 对于多请求`KFCThursdayVW50`而言,并发的请求数相当于设置的线程数\*源的个数 ## `trylimit` @@ -208,4 +204,4 @@ ClientWorker会在获得请求时查找缓存: redirect: follow ``` -你可以参阅[MDN - fetch() init](https://developer.mozilla.org/en-US/docs/Web/API/fetch#init)来配置`fetch` \ No newline at end of file +你可以参阅[MDN - fetch() init](https://developer.mozilla.org/en-US/docs/Web/API/fetch#init)来配置`fetch` diff --git a/doc/docs/rule/header.md b/doc/docs/rule/header.md index e46288b..9eb4663 100644 --- a/doc/docs/rule/header.md +++ b/doc/docs/rule/header.md @@ -2,11 +2,10 @@ ```yaml - search: _ - header: + header: #修改的标头 ``` - 这是一个例子,用于修正`.html`后缀文件的标头,避免部分服务商故意不提供网页服务: ```yaml @@ -20,4 +19,4 @@ 然而需要注意的是: 1. `header`的修改作用与`fetch`状态有关,如果`fetch`前修改,作用将于`请求 Request tReq`;如果已经`fetch`操作后修改,作用将于`响应 Response tRes`。 -2. 对于`header`在`fetch`前的修改,如果`fetch`参数`preflight`不为`true`, ClientWorker将会直接移除标头。尽管[MDN Simple Request](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests)提到上述头是不受影响的,但是`WebKit`内核有着额外的限制,在正常情况下依旧会意外的发起Preflight,为了方便配置和统一内核,ClientWorker选择全部移除。 \ No newline at end of file +2. 对于`header`在`fetch`前的修改,如果`fetch`参数`preflight`不为`true`, ClientWorker将会直接移除标头。尽管[MDN Simple Request](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests)提到上述头是不受影响的,但是`WebKit`内核有着额外的限制,在正常情况下依旧会意外的发起Preflight,为了方便配置和统一内核,ClientWorker选择全部移除。 diff --git a/doc/docs/rule/index.md b/doc/docs/rule/index.md index f35e432..15e9f02 100644 --- a/doc/docs/rule/index.md +++ b/doc/docs/rule/index.md @@ -8,25 +8,26 @@ 如果[action为skip](/rule/skip),或者没有任何规则执行[fetch action](/rule/fetch),则会跳过对此请求的所有修改,即透传(在用户看来是不经过ClientWorker的)。 -# `catch_rules` +# `catch_rules` + ## `rule` 作为路由匹配入口,`catch_rule`在匹配`rule`成功后才会将整个`Request`移交给`transform_rules`。 ```yaml catch_rules: - - rule: #捕获规则1 - transform_rules: - - search: #转换规则1 - #转换操作1 - - search: #转换规则2 - #转换操作2 - - rule: #捕获规则2 - transform_rules: - - search: #转换规则3 - #转换操作3 - - search: #转换规则4 - #转换操作4 + - rule: #捕获规则1 + transform_rules: + - search: #转换规则1 + #转换操作1 + - search: #转换规则2 + #转换操作2 + - rule: #捕获规则2 + transform_rules: + - search: #转换规则3 + #转换操作3 + - search: #转换规则4 + #转换操作4 ``` `catch_rule`是一个数组,`ClientWorker`会从上到下依次匹配,即越靠前的优先级越高。除非遇到`return`、`redirect`操作,否则不会结束匹配。 @@ -35,7 +36,7 @@ catch_rules: ### 语法糖 -#### _ +#### \_ 在`catch_rule`中 `_` 将会匹配当前网站的主域名(包括端口),例如: @@ -48,17 +49,19 @@ catch_rules: > 如果你要捕获所有请求,请使用`.*`。 # `transform_rules` + ## `search` + 作为转换入口,`transform_rules`在匹配`search`成功后才会进行处理,格式如下: ```yaml - rule: #捕获规则 transform_rules: - - search: #转换规则1 - action: #转换操作1 - {{action option}}: #转换操作1的参数 - - search: #转换规则2 - replace: #转换操作 - 重写路由 + - search: #转换规则1 + action: #转换操作1 + { { action option } }:#转换操作1的参数 + - search: #转换规则2 + replace: #转换操作 - 重写路由 ``` 每一个路由分为`search`和`action`两个部分,`search`是匹配规则,`action`是转换操作。如果`search`匹配成功,`action`就会被执行。当`action`执行完毕后,`transform_rules`会继续匹配下一个规则。 @@ -71,7 +74,7 @@ catch_rules: ### 语法糖 -#### _ +#### \_ 在`transform_rules`中`_`的作用是使用与`catch_rule`相同的规则,而不是匹配当前域名。 @@ -82,6 +85,7 @@ catch_rules: ## `searchin` 指定`search`的搜索内容,可以为: + - `url`:匹配当前请求的url[默认] - `status`:匹配当前请求的状态码 -- `statusText`:匹配当前请求的状态文本 \ No newline at end of file +- `statusText`:匹配当前请求的状态文本 diff --git a/doc/docs/rule/redirect.md b/doc/docs/rule/redirect.md index 022a819..0d33615 100644 --- a/doc/docs/rule/redirect.md +++ b/doc/docs/rule/redirect.md @@ -3,12 +3,12 @@ ```yaml - search: —— action: redirect - redirect: + redirect: #跳转参数 ``` > 你要找的是在外部观察url不跳转的[URL重写](/rule/replace)吗? -`redirect`可以直接返回一个跳转,无视`fetch`状态,对接下来的规则也将不执行。 +> `redirect`可以直接返回一个跳转,无视`fetch`状态,对接下来的规则也将不执行。 ## `to` @@ -19,13 +19,11 @@ ```yaml - search: \/([^\/.]+)$ #匹配/path,跳为/path.html action: redirect - redirect: + redirect: to: /$1.html status: 301 ``` - - ## `url` `url`表示重定向的目标url。 @@ -35,7 +33,7 @@ ```yaml - search: \/google$ action: redirect - redirect: + redirect: url: https://google.com #不替换直接跳转,默认优先级url > to status: 301 ``` diff --git a/doc/docs/rule/replace.md b/doc/docs/rule/replace.md index 69c44b4..c4a7fc1 100644 --- a/doc/docs/rule/replace.md +++ b/doc/docs/rule/replace.md @@ -2,7 +2,7 @@ ```yaml - search: _ #搜索参数 - replace: '' #替换参数 + replace: "" #替换参数 ``` ## 在开始之前 @@ -17,7 +17,7 @@ ```yaml - search: \?.* - replace: '' + replace: "" ``` - `https://example.com` 无匹配 @@ -40,7 +40,7 @@ ```yaml - search: ^https:\/\/(cdn|fastly|test1|gcore)\.jsdelivr\.net\/npm\/ - replace: + replace: - https://npm.elemecdn.com/ - https://unpkg.com/ - https://unpkg.zhimg.com/ @@ -53,8 +53,6 @@ > 需要注意的是,如果你已经将url重写为并发,那么接下来重写功能将失效;如果上述规则已经`fetch`过,那么`tReq`将会转化为`tRes`,之后重写功能也会失效。但是重写依旧会对原url(尽管不在用于请求)造成影响,可能会被接下来的规则捕捉。 - - # 参数 - `search`: 搜索规则,在`searchin`的范围内(默认是`url`)搜索匹配的内容,正则语法。 @@ -68,4 +66,4 @@ > 目前对于body的搜索仅支持文本搜索,请不要用于搜索二进制数据,否则将会导致返回数据异常。 -> 对于header的搜索,`headerkey`是不敏感大小写的 \ No newline at end of file +> 对于header的搜索,`headerkey`是不敏感大小写的 diff --git a/doc/docs/rule/return.md b/doc/docs/rule/return.md index 9692ca3..5078561 100644 --- a/doc/docs/rule/return.md +++ b/doc/docs/rule/return.md @@ -3,22 +3,20 @@ ```yaml - search: _ action: return - redirect: + redirect: #返回参数 ``` - `return`可以直接返回一个响应,无视`fetch`状态,对接下来的规则也将不执行。 ## `body` 返回的响应的body是一个字符串: - ```yaml - search: \/error$ action: return - redirect: + redirect: body: error ``` @@ -29,7 +27,7 @@ ```yaml - search: \/error599$ action: return - redirect: + redirect: body: error599 status: 599 ``` @@ -41,9 +39,9 @@ ```yaml - search: \/error$ action: return - redirect: + redirect: body:

error

- header: + header: Content-Type: text/html X-Custom-Header: custom -``` \ No newline at end of file +``` diff --git a/doc/docs/rule/script.md b/doc/docs/rule/script.md index 63443b2..bc91c31 100644 --- a/doc/docs/rule/script.md +++ b/doc/docs/rule/script.md @@ -9,11 +9,11 @@ ClientWorker在用户指定`name`或`function`后,会将以下参数传递过去: -```json -{ - fetched: , - response: , - request: +```ts +interface Resp { + fetched: boolean; + response: Response; + request: Request; } ``` @@ -21,24 +21,24 @@ ClientWorker在用户指定`name`或`function`后,会将以下参数传递过 - `fetched` 是否已经获取到响应,如果为`true`,则`response`和`request`是有效的。但之后脚本对`request`的操作将不会生效。 - `request` 当前ClientWorker处理的请求 -- `response` 如果`fetched`为`true`,则为当前ClientWorker处理的响应` +- `response` 如果`fetched`为`true`,则为当前ClientWorker处理的响应` ClientWorker要求返回的值格式必须如下: -```json -{ - fetched: , - response: , - request: +```ts +interface Resp { + fetched: boolean; + response: Response | undefined; + request: Request | undefined; } ``` 其中: + - `fetched` 表明此次自定义脚本操作是否已获取响应。如果为`true`,ClientWorker将会标记总请求为已执行,规则中的`fetch`操作将不会执行。 - `request` 如果`fetched`为`false`,ClientWorker会将步骤中的请求替换为脚本返回的值。 - `response` 如果`fetched`为`true`,ClientWorker会将步骤中的响应替换为脚本返回的值。 - ## `name` 当配置中指定name时,ClientWorker会执行名为`name`的函数。 @@ -54,12 +54,10 @@ ClientWorker要求返回的值格式必须如下: 你需要在`cw.js`中指定gettime函数: ```js -const gettime = async (args) =>{ - return { - fetched:true, - response:new Response(new Date().toString()) - } -} +const gettime = async (args) => ({ + fetched: true, + response: new Response(new Date().toString()), +}); ``` ## `function` @@ -69,16 +67,13 @@ const gettime = async (args) =>{ ```yaml - search: \/timefunction$ action: script - script: + script: function: ()=>{return {fetched:true,response:new Response(new Date().toString())}} skip: true ``` 这适合一些简单的函数。你可以查看[部署在文档中的此样例](/timefunction) - ## `skip` 当其值为`true`并且函数返回值中`fetched`也为`true`,ClientWorker将会终止执行接下来的规则,直接返回响应。 - - diff --git a/doc/docs/start.md b/doc/docs/start.md index 37a690a..b88aada 100644 --- a/doc/docs/start.md +++ b/doc/docs/start.md @@ -42,27 +42,33 @@ ClientWorker能干什么? 在你的网站**根目录**下新建一个名为`cw.js`的文件,里面写上: ```js -importScripts('https://lib.baomitu.com/clientworker/latest/dist/cw.js') +importScripts("https://lib.baomitu.com/clientworker/latest/dist/cw.js"); ``` > 我们非常、非常强烈建议在引入脚本时要指定clientworker的版本(而不是latest),最新版本可以到[Release](https://github.com/ChenYFan/ClientWorker/releases)查看,然后引入代码改为: > > ```js -> importScripts('https://lib.baomitu.com/clientworker/2.8.1/dist/cw.js') //请及时替换2.8.1为最新版本号 +> importScripts("https://lib.baomitu.com/clientworker/2.8.1/dist/cw.js"); // 请及时替换2.8.1为最新版本号 > ``` 如果在国外,你可以使用CloudFlare提供的CDNJS镜像接入: ```js -importScripts('https://cdnjs.cloudflare.com/ajax/libs/clientworker/2.8.1/dist/cw.js') //请及时替换2.4.0为最新版本号 +importScripts( + "https://cdnjs.cloudflare.com/ajax/libs/clientworker/2.8.1/dist/cw.js", +); // 请及时替换2.4.0为最新版本号 ``` 你也可以使用其他cdnjs镜像。 > 如果有必要,你也可以用npm镜像或者github镜像接入,比如: +> > ```js -> importScripts('https://cdn.jsdelivr.net/npm/clientworker@latest') //最好指定版本 -> importScripts('https://cdn.jsdelivr.net/gh/chenyfan/clientworker@gh-pages/cw.js') ////最好指定版本 +> importScripts("https://cdn.jsdelivr.net/npm/clientworker@latest"); // 最好指定版本 +> importScripts( +> "https://cdn.jsdelivr.net/gh/chenyfan/clientworker@gh-pages/cw.js", +> ); /// /最好指定版本 +> ``` > ClientWorker将会直接托管`fetch`事件,不过你可以在底下写其他事件监听,比如`message`等。同时你可以书写其他自定义函数,在配置中引入。 @@ -72,35 +78,34 @@ importScripts('https://cdnjs.cloudflare.com/ajax/libs/clientworker/2.8.1/dist/cw 2. 解压,将文件夹中`cw.js`拷出,放在网页服务器**根目录**下 - ## Step 2 写入配置 - 最简单,也是最难的一步 在**根目录**下新建一个`config.yaml`,填入配置。 > # 配置哪儿来 +> > 你可以阅读这篇文档,自己填写配置,也可以在[社区的Awesome Exapmle](https://github.com/ChenYFan/ClientWorker/discussions/categories/awesome-example)寻找你感兴趣的配置。不过如果你是刚来的,请暂时将下面的配置填入其中。 ```yaml -name: ClientWorker +name: ClientWorker catch_rules: - rule: _ transform_rules: - search: \#.+ searchin: url - replace: '' - - search: _ + replace: "" + - search: _ action: fetch fetch: - engine: fetch - - search: (^4|^5) - searchin: status + engine: fetch + - search: (^4|^5) + searchin: status action: return return: body: The GateWay is down!This Page is provided by ClientWorker! status: 503 ``` - ## Step 3 配置安装代码 - 最后一步了,加油! 你有三种方式接入: `三文件全域安装` 、 `自定义无刷新安装` 、 `自定义刷新安装` @@ -134,47 +139,62 @@ catch_rules: ```html ``` - 2. 接下来,修改`config.yaml`配置,你可以阅读这篇文档,自己填写配置,也可以在[社区的Awesome Exapmle](https://github.com/ChenYFan/ClientWorker/discussions/categories/awesome-example)寻找你感兴趣的配置。如果你有好的配置,我们也乐于见到你将你的配置分享到社区。 ### 自定义刷新安装 @@ -189,38 +209,54 @@ if (!!navigator.serviceWorker) { ```html ``` -2. 接下来,修改`config.yaml`配置,你可以阅读这篇文档,自己填写配置,也可以在[社区的Awesome Exapmle](https://github.com/ChenYFan/ClientWorker/discussions/categories/awesome-example)寻找你感兴趣的配置。如果你有好的配置,我们也乐于见到你将你的配置分享到社区。 \ No newline at end of file +2. 接下来,修改`config.yaml`配置,你可以阅读这篇文档,自己填写配置,也可以在[社区的Awesome Exapmle](https://github.com/ChenYFan/ClientWorker/discussions/categories/awesome-example)寻找你感兴趣的配置。如果你有好的配置,我们也乐于见到你将你的配置分享到社区。 diff --git a/doc/docs/timefunction.md b/doc/docs/timefunction.md index 8aff38c..ad6f99e 100644 --- a/doc/docs/timefunction.md +++ b/doc/docs/timefunction.md @@ -1,3 +1,3 @@ # 你不应该来到这里... -这应该被ServiceWorker所劫持,请查看当前CW是否安装。 \ No newline at end of file +这应该被ServiceWorker所劫持,请查看当前CW是否安装。 diff --git a/doc/package.json b/doc/package.json index 870735c..589e392 100644 --- a/doc/package.json +++ b/doc/package.json @@ -1,18 +1,18 @@ { - "name": "clientworker-doc", - "type": "commonjs", - "version": "0.0.0", - "main": "index.js", - "directories": { - "doc": "docs" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "docs:dev": "vitepress dev docs --host 0.0.0.0", - "docs:build": "vitepress build docs", - "docs:serve": "vitepress serve docs" - }, - "author": "", - "license": "ISC", - "description": "" + "name": "clientworker-doc", + "version": "0.0.0", + "author": "", + "type": "commonjs", + "description": "", + "license": "ISC", + "main": "index.js", + "scripts": { + "docs:build": "vitepress build docs", + "docs:dev": "vitepress dev docs --host 0.0.0.0", + "docs:serve": "vitepress serve docs", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "directories": { + "doc": "docs" + } } diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..d49d4b9 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,10 @@ +const { so1ve } = require("@so1ve/eslint-config"); + +module.exports = so1ve({ + yaml: { + overrides: { + "yaml/no-empty-key": "off", + "yaml/no-empty-mapping-value": "off", + }, + }, +}); diff --git a/main/entry.js b/main/entry.js deleted file mode 100644 index be116e5..0000000 --- a/main/entry.js +++ /dev/null @@ -1,44 +0,0 @@ -import { } from './handle/main.js' -import pkgjson from '../package.json' -import cons from './utils/cons.js' -import CacheDB from '@chenyfan/cache-db' - -cons.s(`ClientWorker${pkgjson.version} Started!`) -const db = new CacheDB() -db.read('hotpatch').then(script => { - if (!!script) { - cons.s('Hotpatch Loaded!') - eval(script) - } else { - cons.w('Hotpatch Not Found!') - } -}) -db.read('config').then(config => { - config = JSON.parse(config) || {} - setInterval(() => { - cons.s(`ClientWorker@${pkgjson.version} Start to Clean Expired Cache!`) - caches.open("ClientWorker_ResponseCache").then(cache => { - cache.keys().then(keys => { - keys.forEach(key => { - cache.match(key).then(res => { - if (Number(res.headers.get('ClientWorker_ExpireTime')) <= new Date().getTime()) { - cache.delete(key) - } - }) - }) - }) - }) - }, eval(config.cleaninterval) || 60*1000); -}) -addEventListener('fetch', event => { - event.respondWith(self.clientworkerhandle(event.request)) -}) -addEventListener('install', function () { - cons.s(`ClientWorker@${pkgjson.version} Installed!`) - self.skipWaiting(); -}); -addEventListener('activate', function () { - cons.s(`ClientWorker@${pkgjson.version} Activated!`) - self.clients.claim(); -}) - diff --git a/main/handle/cgi.js b/main/handle/cgi.js deleted file mode 100644 index 426cbc4..0000000 --- a/main/handle/cgi.js +++ /dev/null @@ -1,80 +0,0 @@ -import yaml from 'js-yaml' -import CacheDB from '@chenyfan/cache-db' -import FetchEngine from '../utils/engine.js' -import pkgjson from '../../package.json' -const router_cgi = async (request) => { - const db = new CacheDB() - const urlStr = request.url.toString() - const urlObj = new URL(urlStr) - const pathname = urlObj.pathname - const q = (s) => { return urlObj.searchParams.get(s) } - let config - switch (pathname.split('/')[2]) { - case 'hello': - return new Response('Hello ClientWorker!') - case 'info': - return new Response(JSON.stringify({ - version: pkgjson.version - }),{ - headers:{ - 'Content-Type':'application/json' - } - }) - case 'page': - switch (q('type')) { - case 'install': - return fetch('/404') - default: - return new Response('Error, page type not found') - } - case 'api': - - switch (q('type')) { - case 'config': - return fetch(q('url') || '/config.yaml') - .then(res => res.text()) - .then(text => yaml.load(text)) - .then(async config => { - await db.write('config', JSON.stringify(config), { type: "json" }) - return new Response('ok') - }) - .catch(async err => { - await db.write('config', '') - return new Response(err) - }) - case 'clear': - return caches.open('ClientWorker_ResponseCache').then(async cache => { - return cache.keys().then(async keys => { - await Promise.all(keys.map(key => { - cache.delete(key) - })) - return new Response('ok') - }) - }) - case 'hotpatch': - config =JSON.parse(await db.read('config')) - if(typeof config.hotpatch !== 'object') return new Response('Error, config.hotpatch not found') - const hotpatch = config.hotpatch - await FetchEngine.parallel(hotpatch) - .then(t=>t.text()) - .then(async script=>{ - await db.write('hotpatch', script, { type: "text" }) - eval(script) - }) - return new Response('ok') - case 'hotconfig': - config = JSON.parse(await db.read('config')) - if(typeof config.hotconfig !== 'object') return new Response('Error, config.hotconfig not found') - const hotconfig = config.hotconfig - const nConfig = await FetchEngine.parallel(hotconfig).then(t=>t.text()).then(t=>yaml.load(t)).then(t=>JSON.stringify(t)).catch(t=>{return ''}) - if(nConfig)await db.write('config',nConfig) - return new Response('ok') - - default: - return new Response('Error, api type not found') - } - default: - return new Response('Not Found!, Client Worker!') - } -} -export default router_cgi \ No newline at end of file diff --git a/main/handle/main.js b/main/handle/main.js deleted file mode 100644 index 8879f81..0000000 --- a/main/handle/main.js +++ /dev/null @@ -1,283 +0,0 @@ -import router_cgi from './cgi.js' -import CacheDB from '@chenyfan/cache-db' -import cons from './../utils/cons.js' -import FetchEngine from '../utils/engine.js' -import rebuild from '../utils/rebuild.js' -self.clientworkerhandle = async (request) => { - //当前域 new Request('').url - const domain = new URL(new Request('').url).host - const db = new CacheDB() - - let tReq = request - const urlStr = tReq.url.toString() - const urlObj = new URL(urlStr) - const pathname = urlObj.pathname - if (pathname.split('/')[1] === 'cw-cgi') { - return router_cgi(request) - } - const config = await db.read('config', { type: "json" }) - if (!config) return fetch(request) - - let tFetched = false - let EngineFetch = false - let fetchConfig = {} - let EngineFetchList = [] - let tRes = new Response() - for (let catch_rule of config.catch_rules) { - if (catch_rule.rule === '_') catch_rule.rule = domain - if (!tReq.url.match(new RegExp(catch_rule.rule))) continue; - - for (let transform_rule of catch_rule.transform_rules) { - let tSearched = false - - if (transform_rule.search === '_') transform_rule.search = catch_rule.rule - switch (transform_rule.searchin || "url") { - case 'url': - if (tReq.url.match(new RegExp(transform_rule.search, transform_rule.searchflags))) tSearched = true; - break - case 'header': - if (tReq.headers.get(transform_rule.searchkey).match(new RegExp(transform_rule.search, transform_rule.searchflags))) tSearched = true; - break; - case 'status': - if (!tFetched) { cons.w(`${tReq.url} is not fetched yet,the status rule are ignored`); break } - if (String(tRes.status).match(new RegExp(transform_rule.search, transform_rule.searchflags))) tSearched = true; - break - case 'statusText': - if (!tFetched) { cons.w(`${tReq.url} is not fetched yet,the statusText rule are ignored`); break } - if (tRes.statusText.match(new RegExp(transform_rule.search, transform_rule.searchflags))) tSearched = true; - break - case 'body': - if (!tFetched) { cons.w(`${tReq.url} is not fetched yet,the body rule are ignored`); break } - if ((await tRes.clone().text()).match(new RegExp(transform_rule.search, transform_rule.searchflags))) tSearched = true; - break; - default: - cons.e(`${tReq.url} the ${transform_rule.searchin} search rule are not supported`); - break - - } - - switch (transform_rule.replacein || 'url') { - case 'url': - if (tFetched && tSearched) { cons.w(`${tReq.url} is already fetched,the url transform rule:${transform_rule.search} are ignored`); break } - if (typeof transform_rule.replace !== 'undefined' && tSearched) { - if (typeof transform_rule.replace === 'string') { - if (EngineFetch) cons.w(`EngineFetch Disabled for ${tReq.url},the request will downgrade to normal fetch`) - tReq = rebuild.request(tReq, { url: tReq.url.replace(new RegExp(transform_rule.replacekey || transform_rule.search, transform_rule.replaceflags), transform_rule.replace) }) - EngineFetch = false - } else { - if (EngineFetch) { cons.w(`Replacement cannot be used for ${tReq.url},the request is already powered by fetch-engine `); break } - transform_rule.replace.forEach(replacement => { - if (replacement === '_') { - EngineFetchList.push(tReq) - return; - } - EngineFetchList.push( - rebuild.request(tReq, { url: tReq.url.replace(new RegExp(transform_rule.replacekey || transform_rule.search, transform_rule.replaceflags), replacement) }) - ) - }); - - EngineFetch = true - } - } - break - case 'body': - if (tSearched) { - if (tFetched) { - tRes = rebuild.response(tRes, { body: (await tRes.clone().text()).replace(new RegExp(transform_rule.replacekey || transform_rule.search, transform_rule.replaceflags), transform_rule.replace) }) - - } else { - tReq = rebuild.request(tReq, { body: (await tReq.clone().text()).replace(new RegExp(transform_rule.replacekey || transform_rule.search, transform_rule.replaceflags), transform_rule.replace) }) - } - } - break; - - case 'status': - if (typeof transform_rule.replace === 'string' && tSearched) tRes = rebuild.response(tRes, { status: tRes.status.replace(new RegExp(transform_rule.replacekey || transform_rule.search, transform_rule.replaceflags), transform_rule.replace) }) - break; - case 'statusText': - if (typeof transform_rule.replace === 'string' && tSearched) tRes = rebuild.response(tRes, { statusText: tRes.statusText.replace(new RegExp(transform_rule.replacekey || transform_rule.search, transform_rule.replaceflags), transform_rule.replace) }) - break; - default: - cons.e(`${tReq.url} the ${transform_rule.replacein} replace rule are not supported`); - } - if (!tSearched) continue - if (typeof transform_rule.header === 'object') { - for (var header in transform_rule.header) { - if (tFetched) { - tRes = rebuild.response(tRes, { headers: { [header]: transform_rule.header[header] } }) - } else { - tReq = rebuild.request(tReq, { headers: { [header]: transform_rule.header[header] } }) - } - } - } - - if (typeof transform_rule.action !== 'undefined') { - switch (transform_rule.action) { - case 'skip': - return fetch(request) - case 'fetch': - if (tFetched) { cons.w(`${tReq.url} is already fetched,the fetch action are ignored`); break } - if (typeof transform_rule.fetch === 'undefined') { cons.e(`Fetch Config is not defined for ${tReq.url}`); break } - - fetchConfig = { - status: transform_rule.fetch.status, - mode: transform_rule.fetch.mode, - credentials: transform_rule.fetch.credentials, - redirect: transform_rule.fetch.redirect, - timeout: transform_rule.fetch.timeout, - threads: transform_rule.fetch.threads, - limit: transform_rule.fetch.limit - } - if (!transform_rule.fetch.preflight) { - tReq = new Request(tReq.url, { - method: ((method) => { - if (method === "GET" || method === "HEAD" || method === "POST") return method; - return "GET" - })(tReq.method), - body: ((body) => { - if (tReq.method === "POST") return body; - return null - })(tReq.body) - }) //https://segmentfault.com/a/1190000006095018 - delete fetchConfig.credentials - //fetchConfig.mode = "cors" - for (var eReq in EngineFetchList) { - EngineFetchList[eReq] = new Request(EngineFetchList[eReq].url, tReq) - } - } - - tRes = await new Promise(async (res, rej) => { - const EngineFetcher = async () => { - let cRes - return new Promise(async (resolve, reject) => { - if (!EngineFetch) { - switch (transform_rule.fetch.engine || 'fetch') { - case 'fetch': - cRes = await FetchEngine.fetch(tReq, fetchConfig) - break - case 'crazy': - cRes = await FetchEngine.crazy(tReq, fetchConfig) - break - default: - cons.e(`${tReq.url} the ${transform_rule.fetch.engine} engine are not supported`); - break - } - } else { - switch (transform_rule.fetch.engine || 'parallel') { - case 'classic': - cRes = await FetchEngine.classic(EngineFetchList, fetchConfig) - break; - case 'parallel': - cRes = await FetchEngine.parallel(EngineFetchList, fetchConfig) - break; - case 'KFCThursdayVW50': - if (new Date().getDay() === 4) cons.e(`VW50! The Best Fetch Engine in the World Said!`) - cRes = await FetchEngine.KFCThursdayVW50(EngineFetchList, fetchConfig) - break; - default: - cons.e(`Fetch Engine ${transform_rule.fetch.engine} is not supported`) - break; - } - - } - if (typeof transform_rule.fetch.cache === "object" && cRes.status === (transform_rule.fetch.status || 200)) { - cRes = rebuild.response(cRes, { headers: { "ClientWorker_ExpireTime": new Date().getTime() + Number(eval(transform_rule.fetch.cache.expire || '0')) } }) - caches.open("ClientWorker_ResponseCache").then(cache => { - cache.put(tReq, cRes.clone()) - .then(() => { resolve(cRes) }) - }) - } - else { resolve(cRes) } - }) - } - if (typeof transform_rule.fetch.cache === "object") { - caches.open("ClientWorker_ResponseCache").then(cache => { - cache.match(tReq).then(cRes => { - if (!!cRes) { - if (Number(cRes.headers.get('ClientWorker_ExpireTime')) > new Date().getTime()) { - cons.s(`${tReq.url} is fetched from cache`) - res(cRes) - return - } else { - cons.w(`${tReq.url} is expired.`) - res(Promise.any([ - EngineFetcher(), - new Promise(async (resolve, reject) => { - setTimeout(() => { - cons.e(`${tReq.url} is too late to fetch,even though the cache has expired,so return by cache`) - resolve(cRes) - return; - }, transform_rule.fetch.cache.delay || 3000); - }) - ])) - } - - } else { - cons.w(`${tReq.url} is not cached!And it is too late to fetch!`) - res(EngineFetcher()) - } - }) - }) - } else { res(EngineFetcher()) } - }) - tFetched = true - break - case 'redirect': - if (typeof transform_rule.redirect === 'undefined') { - cons.e(`Redirect Config is not defined for ${tReq.url}`); - break; - } - if (typeof transform_rule.redirect.url === 'string') return Response.redirect(transform_rule.redirect.url, transform_rule.redirect.status || 301) - return Response.redirect( - tReq.url.replace(new RegExp(transform_rule.search), transform_rule.redirect.to), - transform_rule.redirect.status || 301 - ) - case 'return': - if (typeof transform_rule.return === 'undefined') transform_rule.return = {} - return new Response(transform_rule.return.body || "Error!", { - status: transform_rule.return.status || 503, - headers: transform_rule.return.headers || {} - }) - case 'script': - if (typeof transform_rule.script === 'undefined') { - cons.e(`Script Config is not defined for ${tReq.url}`); - break; - } - if (typeof transform_rule.script.function === 'string') { - const ClientWorkerAnonymousFunctionName = `ClientWorker_AnonymousFunction_${new Date().getTime()}` - self[ClientWorkerAnonymousFunctionName] = eval(transform_rule.script.function) - transform_rule.script.name = ClientWorkerAnonymousFunctionName - } - const ScriptAns = await (Function('return (' + transform_rule.script.name + ')')())({ - fetched: tFetched, - request: tReq, - response: tRes - }) - - if (ScriptAns.fetched) { - if (transform_rule.script.skip || false) { - return ScriptAns.response - } - tFetched = true - tRes = ScriptAns.response - } else { - tReq = ScriptAns.request - } - break; - default: - cons.w(`This Action:${transform_rule.action} is not supported yet`) - break - } - } - } - - - } - if (!tFetched) { - //3.0.0 默认改为skip - return fetch(request) - } - - return tRes -} -export default {} \ No newline at end of file diff --git a/main/utils/cons.js b/main/utils/cons.js deleted file mode 100644 index f65f11b..0000000 --- a/main/utils/cons.js +++ /dev/null @@ -1,18 +0,0 @@ -const cons = { - s: (m) => { - console.log(`%c[SUCCESS]%c ${m}`, 'color:white;background:green;', '') - }, - w: (m) => { - console.log(`%c[WARNING]%c ${m}`, 'color:brown;background:yellow;', '') - }, - i: (m) => { - console.log(`%c[INFO]%c ${m}`, 'color:white;background:blue;', '') - }, - e: (m) => { - console.log(`%c[ERROR]%c ${m}`, 'color:white;background:red;', '') - }, - d: (m) => { - console.log(`%c[DEBUG]%c ${m}`, 'color:white;background:black;', '') - } -} -export default cons \ No newline at end of file diff --git a/main/utils/engine.js b/main/utils/engine.js deleted file mode 100644 index 7baa66b..0000000 --- a/main/utils/engine.js +++ /dev/null @@ -1,319 +0,0 @@ -import cons from './cons.js' -import rebuild from './rebuild.js' -if (!Promise.any) { - Promise.any = function (promises) { - return new Promise((resolve, reject) => { - promises = Array.isArray(promises) ? promises : [] - let len = promises.length - let errs = [] - if (len === 0) return reject(new AggregateError('All promises were rejected')) - promises.forEach((promise) => { - promise.then(value => { - resolve(value) - }, err => { - len-- - errs.push(err) - if (len === 0) { - reject(new AggregateError(errs)) - } - }) - }) - }) - } -} -const FetchEngine = { - fetch: async (req, config) => { - config = config || { status: 200 } - return new Promise((resolve, reject) => { - const reqtype = Object.prototype.toString.call(req) - if (reqtype !== '[object String]' && reqtype !== '[object Request]') { - reject(`FetchEngine.fetch: req must be a string or Request object,but got ${reqtype}`) - } - setTimeout(() => { - reject(new Response('504 All GateWays Failed,ClientWorker Show This Page,Engine Fetch', { status: 504, statusText: '504 All Gateways Timeout' })) - }, config.timeout || 5000); - fetch(req, { - mode: config.mode, - credentials: config.credential, - redirect: config.redirect || "follow" - }).then(res => { - resolve(res) - }).catch(err => { reject(err) }) - }) - }, - crazy: async (req, config) => { - config = config || { status: 200 } - config.threads = config.threads || 4 - config.trylimit = config.trylimit || 10 - const reqtype = Object.prototype.toString.call(req) - if (reqtype !== '[object String]' && reqtype !== '[object Request]') { - cons.e(`FetchEngine.fetch: req must be a string or Request object,but got ${reqtype}`) - return; - } - const controller = new AbortController(); - const PreFetch = await fetch(req, { - signal: controller.signal, - mode: config.mode, - credentials: config.credential, - redirect: config.redirect || "follow" - }) - const PreHeaders = PreFetch.headers - const AllSize = PreHeaders.get('Content-Length') - if (PreFetch.status.toString().match(config.status)) { - return (new Response('504 All GateWays Failed,ClientWorker Show This Page,Engine Crazy', { status: 504, statusText: '504 All Gateways Timeout' })) - } - controller.abort(); - if (!AllSize || AllSize < config.threads) { - cons.e(`FetchEngine.crazy: The Origin is not support Crazy Mode,or the size of the file is less than ${config.threads} bytes,downgrade to normal fetch`) - return FetchEngine.fetch(req, config) - } - return new Promise((resolve, reject) => { - const chunkSize = parseInt(AllSize / config.threads); - const chunks = []; - for (let i = 0; i < config.threads; i++) { - chunks.push( - new Promise(async (res, rej) => { - let trycount = 1 - const instance = async () => { - trycount += 1 - const nReq = rebuild.request(req, { - headers: { - Range: `bytes=${i * chunkSize}-${(i + 1) * chunkSize - 1}` - }, - url: req.url - }) - return fetch(nReq, { - mode: config.mode, - credentials: config.credential, - redirect: config.redirect || "follow" - }) - .then(res => res.arrayBuffer()) - .catch(err => { - if (trycount >= config.trylimit) { - reject() - return; - } - return instance() - }) - } - res(instance()); - }) - ) - } - Promise.all(chunks).then(responses => { - const resbodys = [] - for (let i = 0; i < responses.length; i++) { - resbodys.push(responses[i]); - } - resolve(new Response(new Blob(resbodys), { - headers: PreHeaders, - status: 200, - statusText: 'OK' - })); - - }) - setTimeout(() => { - reject(new Response('504 All GateWays Failed,ClientWorker Show This Page,Engine Crazy', { status: 504, statusText: '504 All Gateways Timeout' })) - }, config.timeout || 5000); - }) - }, - KFCThursdayVW50: async (reqs, config) => { - config = config || { status: 200 } - config.threads = config.threads || 4 - config.trylimit = config.trylimit || 10 - const reqtype = Object.prototype.toString.call(reqs) - if (reqtype === '[object String]' || reqtype === '[object Request]') { - cons.w(`FetchEngine.KFCThursdayVW50: reqs is a string or Request object,downgrade to crazy`) - return FetchEngine.crazy(reqs, config) - } else if (reqtype !== '[object Array]') { - cons.e(`FetchEngine.KFCThursdayVW50: reqs must be a string or Request object or an array,but got ${reqtype}`) - return Promise.reject(`FetchEngine.KFCThursdayVW50: reqs must be a string or Request object or an array,but got ${reqtype}`) - } else if (reqtype === '[object Array]') { - if (reqs.length === 0) { - cons.e(`FetchEngine.KFCThursdayVW50: reqs array is empty`) - reject() - } - if (reqs.length === 1) { - cons.w(`FetchEngine.KFCThursdayVW50: reqs array is only one,downgrade to crazy`) - return FetchEngine.crazy(reqs[0], config) - } - } - const controller = new AbortController(); - const PreFetch = await FetchEngine.parallel(reqs, { - signal: controller.signal, - mode: config.mode, - credentials: config.credential, - redirect: config.redirect || "follow", - timeout: config.timeout || 30000 - }) - - const PreHeaders = PreFetch.headers - const AllSize = PreHeaders.get('Content-Length') - if (PreFetch.status.toString().match(config.status)) { - reject(new Response('504 All GateWays Failed,ClientWorker Show This Page,Engine KFCThursdayVW50', { status: 504, statusText: '504 All Gateways Timeout' })) - } - controller.abort(); - if (!AllSize || AllSize < config.threads) { - cons.e(`FetchEngine.KFCThursdayVW50: The Origin is not support KFCThursdayVW50 Mode,or the size of the file is less than ${config.threads} bytes,downgrade to normal fetch`) - return FetchEngine.fetch(reqs, config) - } - return new Promise((resolve, reject) => { - const chunkSize = parseInt(AllSize / config.threads); - const chunks = []; - for (let i = 0; i < config.threads; i++) { - chunks.push( - new Promise(async (res, rej) => { - let trycount = 1 - const instance = async () => { - trycount += 1 - const nReqs = [] - reqs.forEach(req => { - nReqs.push(rebuild.request(req, { - headers: { - Range: `bytes=${i * chunkSize}-${(i + 1) * chunkSize - 1}` - }, - url: req.url - })) - }) - return FetchEngine.parallel(nReqs, { - mode: config.mode, - credentials: config.credential, - redirect: config.redirect || "follow", - timeout: config.timeout || 30000, - status: 206 - }) - .then(res => res.arrayBuffer()) - .catch(async err => { - cons.e(`FetchEngine.KFCThursdayVW50: ${await err.text()}`) - if (trycount >= config.trylimit) { - reject() - return; - } - return instance() - }) - } - res(instance()); - }) - ) - } - Promise.all(chunks).then(responses => { - const resbodys = [] - for (let i = 0; i < responses.length; i++) { - resbodys.push(responses[i]); - } - resolve(new Response(new Blob(resbodys), { - headers: PreHeaders, - status: 200, - statusText: 'OK' - })); - - }) - setTimeout(() => { - reject(new Response('504 All GateWays Failed,ClientWorker Show This Page,Engine KFCThursdayVW50', { status: 504, statusText: '504 All Gateways Timeout' })) - }, config.timeout || 30000); - }) - }, - classic: async (reqs, config) => { - return new Promise((resolve, reject) => { - config = config || { status: 200 } - const reqtype = Object.prototype.toString.call(reqs) - if (reqtype === '[object String]' || reqtype === '[object Request]') { - cons.w(`FetchEngine.classic: reqs should be an array,but got ${reqtype},this request will downgrade to normal fetch`) - resolve(FetchEngine.fetch(reqs, config)) - } else if (reqtype !== '[object Array]') { - cons.e(`FetchEngine.classic: reqs must be a string , Request or Array object,but got ${reqtype}`) - reject() - } else if (reqtype === '[object Array]') { - if (reqtype.length === 0) { - cons.e(`FetchEngine.classic: reqs array is empty`) - reject() - } - if (reqtype.length === 1) { - cons.w(`FetchEngine.classic: reqs array is only one element,this request will downgrade to normal fetch`) - resolve(FetchEngine.fetch(reqs[0], config)) - } - } - const controller = new AbortController(); - const PauseProgress = async (res) => { - return new Response(await (res).arrayBuffer(), { status: res.status, headers: res.headers, statusText: res.statusText }); - }; - - Promise.any(reqs.map(req => { - fetch(req, { - signal: controller.signal, - mode: config.mode, - credentials: config.credential, - redirect: config.redirect || "follow" - }) - .then(PauseProgress) - .then(res => { - if (res.status.toString().match(config.status)) { - controller.abort(); - resolve(res) - } - }).catch(err => { - if (err == 'DOMException: The user aborted a request.') console.log()//To disable the warning:DOMException: The user aborted a request. - }) - })) - - - setTimeout(() => { - reject(new Response('504 All GateWays Failed,ClientWorker Show This Page,Engine Classic', { status: 504, statusText: '504 All Gateways Timeout' })) - }, config.timeout || 5000); - - }) - }, - parallel: async (reqs, config) => { - return new Promise((resolve, reject) => { - config = config || { status: 200 } - const reqtype = Object.prototype.toString.call(reqs) - if (reqtype === '[object String]' || reqtype === '[object Request]') { - cons.w(`FetchEngine.parallel: reqs should be an array,but got ${reqtype},this request will downgrade to normal fetch`) - resolve(FetchEngine.fetch(reqs, config)) - } else if (reqtype !== '[object Array]') { - cons.e(`FetchEngine.parallel: reqs must be a string , Request or Array object,but got ${reqtype}`) - reject() - } else if (reqtype === '[object Array]') { - if (reqtype.length === 0) { - cons.e(`FetchEngine.parallel: reqs array is empty`) - reject() - } - if (reqtype.length === 1) { - cons.w(`FetchEngine.parallel: reqs array is only one element,this request will downgrade to normal fetch`) - resolve(FetchEngine.fetch(reqs[0], config)) - } - } - const abortEvent = new Event("abortOtherInstance") - const eventTarget = new EventTarget(); - Promise.any(reqs.map(async req => { - let controller = new AbortController(), tagged = false; - eventTarget.addEventListener(abortEvent.type, () => { - if (!tagged) controller.abort() - }) - fetch(req, { - signal: controller.signal, - mode: config.mode, - credentials: config.credential, - redirect: config.redirect || "follow" - }).then(res => { - if (res.status.toString().match(config.status)) { - tagged = true; - eventTarget.dispatchEvent(abortEvent) - resolve(rebuild.response(res,{})) - } - }).catch(err => { - if (err == 'DOMException: The user aborted a request.') console.log()//To disable the warning:DOMException: The user aborted a request. - }) - })) - - setTimeout(() => { - reject(new Response('504 All GateWays Failed,ClientWorker Show This Page,Engine Parallel', { status: 504, statusText: '504 All Gateways Timeout' })) - }, config.timeout || 5000); - - - - }) - } -} - -export default FetchEngine \ No newline at end of file diff --git a/main/utils/rebuild.js b/main/utils/rebuild.js deleted file mode 100644 index c44cafd..0000000 --- a/main/utils/rebuild.js +++ /dev/null @@ -1,46 +0,0 @@ -import cons from "./cons.js" -const rebuild = { - request:(req, init) => { - req = req.clone() - if (req.mode === 'navigate') { - cons.w(`You can't rebuild a POST method with body when it is a navigate request.ClientWorker will ignore it's body`) - } - let nReq = new Request(req, { - headers: rebuildheaders(req, init.headers), - method: init.method || req.method, - mode: req.mode === 'navigate' ? "same-origin" : (init.mode || req.mode), - credentials: init.credentials || req.credentials, - redirect: init.redirect || req.redirect - }) - if (!!init.url) nReq = new Request(init.url, nReq) - return nReq - }, - response:(res, init) => { - if(res.type === 'opaque') { - cons.e(`You can't rebuild a opaque response.ClientWorker will ignore this build`) - return res - } - let nRes = new Response(res.body, { - headers: rebuildheaders(res, init.headers), - status: init.status || res.status, - statusText: init.statusText || res.statusText - }) - return nRes - } -} - -const rebuildheaders = (re, headers) => { - if (!!headers) { - const nHeaders = new Headers(re.headers) - for (let key in headers) { - if (headers[key] !== undefined) { - nHeaders.set(key, headers[key]) - } else { - nHeaders.delete(key) - } - } - return nHeaders - } - return new Headers(re.headers) -} -export default rebuild \ No newline at end of file diff --git a/package.json b/package.json index acc6cdc..8efe7a1 100644 --- a/package.json +++ b/package.json @@ -1,34 +1,67 @@ { - "name": "clientworker", - "version": "3.0.0-beta-4", - "description": "A simple, globally hijacked, easily customizable, Service Worker-based front-end worker", - "main": "./dist/cw.js", - "scripts": { - "build": "webpack ./main/entry.js -c ./cw.config.js && cp -r static/* dist " - }, - "type": "module", - "repository": { - "type": "git", - "url": "git+https://github.com/ChenYFan/ClientWorker.git" - }, - "keywords": [ - "ServiceWorker", - "ClientWorker" - ], - "author": "ChenYFan", - "license": "GPL-3.0-or-later", - "bugs": { - "url": "https://github.com/ChenYFan/ClientWorker/issues" - }, - "homepage": "https://github.com/ChenYFan/ClientWorker#readme", - "dependencies": { - "@chenyfan/cache-db": "^0.0.4", - "js-yaml": "^4.1.0", - "vitepress": "^1.0.0-alpha.4", - "vue": "^3.2.37" - }, - "devDependencies": { - "terser-webpack-plugin": "^5.3.3", - "webpack-bundle-analyzer": "^4.5.0" - } + "name": "pkg-name", + "version": "0.0.0", + "packageManager": "pnpm@8.15.4", + "author": "Ray (@so1ve)", + "description": "", + "keywords": [], + "homepage": "https://github.com/so1ve/pkg-name#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/so1ve/pkg-name.git" + }, + "bugs": { + "url": "https://github.com/so1ve/pkg-name/issues" + }, + "license": "MIT", + "sideEffects": false, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "require": "./dist/index.cjs", + "import": "./dist/index.mjs" + } + }, + "main": "./dist/index.cjs", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "./dist/*", + "./dist/index.d.ts" + ] + } + }, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "build": "pkgroll", + "lint": "eslint . && prettier . --check", + "lint:fix": "eslint . --fix && prettier . --write", + "prepublishOnly": "nr build", + "release": "bumpp --commit --push --tag && pnpm publish", + "start": "tsx src/index.ts", + "test": "vitest", + "typecheck": "tsc --noEmit", + "watch": "pkgroll --watch" + }, + "devDependencies": { + "@antfu/ni": "^0.21.8", + "@so1ve/eslint-config": "^1.1.1", + "@so1ve/prettier-config": "^1.1.1", + "@types/node": "^20.8.3", + "bumpp": "^9.2.0", + "eslint": "^8.51.0", + "pkgroll": "^2.0.1", + "prettier": "^3.0.3", + "tsx": "^3.13.0", + "typescript": "^5.2.2", + "vite": "^4.4.11", + "vitest": "^0.34.6" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..9844e26 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,5560 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +devDependencies: + '@antfu/ni': + specifier: ^0.21.8 + version: 0.21.12 + '@so1ve/eslint-config': + specifier: ^1.1.1 + version: 1.2.0(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6) + '@so1ve/prettier-config': + specifier: ^1.1.1 + version: 1.2.0(prettier@3.2.5) + '@types/node': + specifier: ^20.8.3 + version: 20.11.16 + bumpp: + specifier: ^9.2.0 + version: 9.3.0 + eslint: + specifier: ^8.51.0 + version: 8.56.0 + pkgroll: + specifier: ^2.0.1 + version: 2.0.1(typescript@5.3.3) + prettier: + specifier: ^3.0.3 + version: 3.2.5 + tsx: + specifier: ^3.13.0 + version: 3.14.0 + typescript: + specifier: ^5.2.2 + version: 5.3.3 + vite: + specifier: ^4.4.11 + version: 4.5.2(@types/node@20.11.16) + vitest: + specifier: ^0.34.6 + version: 0.34.6 + +packages: + + /@aashutoshrathi/word-wrap@1.2.6: + resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} + engines: {node: '>=0.10.0'} + dev: true + + /@antfu/ni@0.21.12: + resolution: {integrity: sha512-2aDL3WUv8hMJb2L3r/PIQWsTLyq7RQr3v9xD16fiz6O8ys1xEyLhhTOv8gxtZvJiTzjTF5pHoArvRdesGL1DMQ==} + hasBin: true + dev: true + + /@antfu/utils@0.7.7: + resolution: {integrity: sha512-gFPqTG7otEJ8uP6wrhDv6mqwGWYZKNvAcCq6u9hOj0c+IKCEsY4L1oC9trPq2SaWIzAfHvqfBDxF591JkMf+kg==} + dev: true + + /@astrojs/compiler@1.8.2: + resolution: {integrity: sha512-o/ObKgtMzl8SlpIdzaxFnt7SATKPxu4oIP/1NL+HDJRzxfJcAkOTAb/ZKMRyULbz4q+1t2/DAebs2Z1QairkZw==} + dev: true + + /@babel/code-frame@7.23.5: + resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.23.4 + chalk: 2.4.2 + dev: true + + /@babel/helper-validator-identifier@7.22.20: + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/highlight@7.23.4: + resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.20 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@eslint-community/eslint-plugin-eslint-comments@4.1.0(eslint@8.56.0): + resolution: {integrity: sha512-B2mwipifrBS5E00vN8vME68laPMZ0h3sNGOEDj5g9iUN9k5EU99Omq0Nc325eKNoFFDnDtiHp3DqIjO+1bstag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + escape-string-regexp: 4.0.0 + eslint: 8.56.0 + ignore: 5.3.1 + dev: true + + /@eslint-community/eslint-utils@4.4.0(eslint@8.56.0): + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + dependencies: + eslint: 8.56.0 + eslint-visitor-keys: 3.4.3 + dev: true + + /@eslint-community/regexpp@4.10.0: + resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: true + + /@eslint/eslintrc@2.1.4: + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.1 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@eslint/js@8.56.0: + resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@html-eslint/eslint-plugin@0.19.1: + resolution: {integrity: sha512-Tn+/GWLtNM6NiZFLbfM+vTK0d7gKaDgnw4Pp+DsZi09lFimi4bOPOgy8dSVnLeyFIfP6LkeuwVm4pfBZZM2qbA==} + engines: {node: '>=8.10.0'} + dev: true + + /@html-eslint/parser@0.19.1: + resolution: {integrity: sha512-dpAw6UX0ZSVNnsAzl9ULHZX7CvAGKF5uta4iebbhSDvGE1o9NX6BoOofD/6WucTvs/qnoKojc3Y2LG6vy4afiQ==} + engines: {node: '>=8.10.0'} + dependencies: + es-html-parser: 0.0.9 + dev: true + + /@humanwhocodes/config-array@0.11.14: + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + dependencies: + '@humanwhocodes/object-schema': 2.0.2 + debug: 4.3.4 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@humanwhocodes/module-importer@1.0.1: + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + dev: true + + /@humanwhocodes/object-schema@2.0.2: + resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + dev: true + + /@isaacs/cliui@8.0.2: + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + dependencies: + string-width: 5.1.2 + string-width-cjs: /string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: /strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: /wrap-ansi@7.0.0 + dev: true + + /@jest/schemas@29.6.3: + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@sinclair/typebox': 0.27.8 + dev: true + + /@jridgewell/sourcemap-codec@1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true + + /@jsdevtools/ez-spawn@3.0.4: + resolution: {integrity: sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==} + engines: {node: '>=10'} + dependencies: + call-me-maybe: 1.0.2 + cross-spawn: 7.0.3 + string-argv: 0.3.2 + type-detect: 4.0.8 + dev: true + + /@nodelib/fs.scandir@2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat@2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk@1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.0 + dev: true + + /@npmcli/config@6.4.0: + resolution: {integrity: sha512-/fQjIbuNVIT/PbXvw178Tm97bxV0E0nVUFKHivMKtSI2pcs8xKdaWkHJxf9dTI0G/y5hp/KuCvgcUu5HwAtI1w==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + '@npmcli/map-workspaces': 3.0.4 + ci-info: 3.9.0 + ini: 4.1.1 + nopt: 7.2.0 + proc-log: 3.0.0 + read-package-json-fast: 3.0.2 + semver: 7.5.4 + walk-up-path: 3.0.1 + dev: true + + /@npmcli/map-workspaces@3.0.4: + resolution: {integrity: sha512-Z0TbvXkRbacjFFLpVpV0e2mheCh+WzQpcqL+4xp49uNJOxOnIAPZyXtUxZ5Qn3QBTGKA11Exjd9a5411rBrhDg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + '@npmcli/name-from-folder': 2.0.0 + glob: 10.3.10 + minimatch: 9.0.3 + read-package-json-fast: 3.0.2 + dev: true + + /@npmcli/name-from-folder@2.0.0: + resolution: {integrity: sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + + /@phenomnomnominal/tsquery@5.0.1(typescript@5.3.3): + resolution: {integrity: sha512-3nVv+e2FQwsW8Aw6qTU6f+1rfcJ3hrcnvH/mu9i8YhxO+9sqbOfpL8m6PbET5+xKOlz/VSbp0RoYWYCtIsnmuA==} + peerDependencies: + typescript: ^3 || ^4 || ^5 + dependencies: + esquery: 1.5.0 + typescript: 5.3.3 + dev: true + + /@pkgjs/parseargs@0.11.0: + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + requiresBuild: true + dev: true + optional: true + + /@pkgr/core@0.1.1: + resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + dev: true + + /@rollup/plugin-alias@5.1.0(rollup@3.29.4): + resolution: {integrity: sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + rollup: 3.29.4 + slash: 4.0.0 + dev: true + + /@rollup/plugin-commonjs@25.0.7(rollup@3.29.4): + resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.68.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@3.29.4) + commondir: 1.0.1 + estree-walker: 2.0.2 + glob: 8.1.0 + is-reference: 1.2.1 + magic-string: 0.30.6 + rollup: 3.29.4 + dev: true + + /@rollup/plugin-inject@5.0.5(rollup@3.29.4): + resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@3.29.4) + estree-walker: 2.0.2 + magic-string: 0.30.6 + rollup: 3.29.4 + dev: true + + /@rollup/plugin-json@6.1.0(rollup@3.29.4): + resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@3.29.4) + rollup: 3.29.4 + dev: true + + /@rollup/plugin-node-resolve@15.2.3(rollup@3.29.4): + resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@3.29.4) + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-builtin-module: 3.2.1 + is-module: 1.0.0 + resolve: 1.22.8 + rollup: 3.29.4 + dev: true + + /@rollup/plugin-replace@5.0.5(rollup@3.29.4): + resolution: {integrity: sha512-rYO4fOi8lMaTg/z5Jb+hKnrHHVn8j2lwkqwyS4kTRhKyWOLf2wST2sWXr4WzWiTcoHTp2sTjqUbqIj2E39slKQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@3.29.4) + magic-string: 0.30.6 + rollup: 3.29.4 + dev: true + + /@rollup/pluginutils@5.1.0(rollup@3.29.4): + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.5 + estree-walker: 2.0.2 + picomatch: 2.3.1 + rollup: 3.29.4 + dev: true + + /@sinclair/typebox@0.27.8: + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + dev: true + + /@so1ve/eslint-config@1.2.0(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6): + resolution: {integrity: sha512-s05qaA/O1I38Px+FK1vkAavtGh7EHl4LPvZef/jSsdR7/p3KFGO3fYsxONzRFwPeWrsXtIvVKqP+Xd9eOfrPBA==} + peerDependencies: + eslint: '>=8.40.0' + prettier: ^3.0.0 + dependencies: + '@eslint-community/eslint-plugin-eslint-comments': 4.1.0(eslint@8.56.0) + '@html-eslint/eslint-plugin': 0.19.1 + '@html-eslint/parser': 0.19.1 + '@so1ve/eslint-plugin': 1.2.0(eslint@8.56.0)(typescript@5.3.3) + '@so1ve/eslint-plugin-sort-imports': 1.2.0(eslint@8.56.0) + '@typescript-eslint/eslint-plugin': 6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@unocss/eslint-config': 0.55.7(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 + eslint-config-flat-gitignore: 0.1.2 + eslint-define-config: 1.24.1 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.20.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0) + eslint-mdx: 2.3.4(eslint@8.56.0) + eslint-plugin-array-func: 3.1.8(eslint@8.56.0) + eslint-plugin-case-police: 0.6.1(eslint@8.56.0)(typescript@5.3.3) + eslint-plugin-etc: 2.0.3(eslint@8.56.0)(typescript@5.3.3) + eslint-plugin-html: 7.1.0 + eslint-plugin-i: 2.29.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-plugin-jest-formatting: 3.1.0(eslint@8.56.0) + eslint-plugin-json-schema-validator: 4.8.3(eslint@8.56.0) + eslint-plugin-jsonc: 2.13.0(eslint@8.56.0) + eslint-plugin-mdx: 2.3.4(eslint@8.56.0) + eslint-plugin-n: 16.6.2(eslint@8.56.0) + eslint-plugin-no-await-in-promise: 1.1.6(eslint@8.56.0) + eslint-plugin-no-explicit-type-exports: 0.12.1(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(typescript@5.3.3) + eslint-plugin-no-only-tests: 3.1.0 + eslint-plugin-only-error: 1.0.2 + eslint-plugin-promise: 6.1.1(eslint@8.56.0) + eslint-plugin-regexp: 1.15.0(eslint@8.56.0) + eslint-plugin-solid: 0.13.1(eslint@8.56.0)(typescript@5.3.3) + eslint-plugin-toml: 0.5.0(eslint@8.56.0) + eslint-plugin-unicorn: 48.0.1(eslint@8.56.0) + eslint-plugin-unused-imports: 3.0.0(@typescript-eslint/eslint-plugin@6.20.0)(eslint@8.56.0) + eslint-plugin-vitest: 0.3.21(@typescript-eslint/eslint-plugin@6.20.0)(eslint@8.56.0)(typescript@5.3.3)(vitest@0.34.6) + eslint-plugin-vue: 9.21.1(eslint@8.56.0) + eslint-plugin-yml: 1.12.2(eslint@8.56.0) + globals: 13.24.0 + jsonc-eslint-parser: 2.4.0 + local-pkg: 0.5.0 + prettier: 3.2.5 + toml-eslint-parser: 0.6.1 + vue-eslint-parser: 9.4.2(eslint@8.56.0) + yaml-eslint-parser: 1.2.2 + transitivePeerDependencies: + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - eslint-plugin-import + - supports-color + - typescript + - vitest + dev: true + + /@so1ve/eslint-plugin-sort-imports@1.2.0(eslint@8.56.0): + resolution: {integrity: sha512-h4rl+oexTqaoFB32ElZkwX4iC6+AGb7I045C50Fog19Turms6+4L1ybqtyEDPpqIhy1mrnliujtBIx1B1JJkWw==} + peerDependencies: + eslint: '>=8.40.0' + dependencies: + eslint: 8.56.0 + natsort: 2.0.3 + dev: true + + /@so1ve/eslint-plugin@1.2.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-qF3p752gk5OILYxtP5bZrea2cb8bASux06J+7t7rx00eKGOiaKSnRTxiTLdIzl7vDuPJ8W8Zk2p12bwReADGJg==} + dependencies: + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: true + + /@so1ve/prettier-config@1.2.0(prettier@3.2.5): + resolution: {integrity: sha512-weIG4y7Wlg0d1uRAVQAcYbN3IyDsacl8Ht2MKosnSOlEIMMemZfp8pwiVDQcNoSBQUtGAJ+BSPdTpc07SC5DAQ==} + peerDependencies: + prettier: ^3.0.0 + dependencies: + '@so1ve/prettier-plugin-toml': 1.2.0(prettier@3.2.5) + prettier: 3.2.5 + prettier-plugin-astro: 0.12.3 + prettier-plugin-curly-and-jsdoc: 1.2.0(prettier@3.2.5) + prettier-plugin-pkgsort: 0.2.1(prettier@3.2.5) + dev: true + + /@so1ve/prettier-plugin-toml@1.2.0(prettier@3.2.5): + resolution: {integrity: sha512-Qth84kdL/EIiML3PXvp6pW+kpJAkS8rbtLrwSRTfD/t1COalKpVOWgylQuWXXVwEBtRRdt772lXw6gCf30N0eA==} + peerDependencies: + prettier: ^3.0.0 + dependencies: + prettier: 3.2.5 + dev: true + + /@types/acorn@4.0.6: + resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} + dependencies: + '@types/estree': 1.0.5 + dev: true + + /@types/chai-subset@1.3.5: + resolution: {integrity: sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==} + dependencies: + '@types/chai': 4.3.11 + dev: true + + /@types/chai@4.3.11: + resolution: {integrity: sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==} + dev: true + + /@types/concat-stream@2.0.3: + resolution: {integrity: sha512-3qe4oQAPNwVNwK4C9c8u+VJqv9kez+2MR4qJpoPFfXtgxxif1QbFusvXzK0/Wra2VX07smostI2VMmJNSpZjuQ==} + dependencies: + '@types/node': 20.11.16 + dev: true + + /@types/debug@4.1.12: + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + dependencies: + '@types/ms': 0.7.34 + dev: true + + /@types/estree-jsx@1.0.4: + resolution: {integrity: sha512-5idy3hvI9lAMqsyilBM+N+boaCf1MgoefbDxN6KEO5aK17TOHwFAYT9sjxzeKAiIWRUBgLxmZ9mPcnzZXtTcRQ==} + dependencies: + '@types/estree': 1.0.5 + dev: true + + /@types/estree@1.0.5: + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + dev: true + + /@types/hast@2.3.10: + resolution: {integrity: sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==} + dependencies: + '@types/unist': 2.0.10 + dev: true + + /@types/is-empty@1.2.3: + resolution: {integrity: sha512-4J1l5d79hoIvsrKh5VUKVRA1aIdsOb10Hu5j3J2VfP/msDnfTdGPmNp2E1Wg+vs97Bktzo+MZePFFXSGoykYJw==} + dev: true + + /@types/json-schema@7.0.15: + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + dev: true + + /@types/json5@0.0.29: + resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + dev: true + + /@types/mdast@3.0.15: + resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==} + dependencies: + '@types/unist': 2.0.10 + dev: true + + /@types/ms@0.7.34: + resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} + dev: true + + /@types/node@18.19.14: + resolution: {integrity: sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==} + dependencies: + undici-types: 5.26.5 + dev: true + + /@types/node@20.11.16: + resolution: {integrity: sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==} + dependencies: + undici-types: 5.26.5 + dev: true + + /@types/normalize-package-data@2.4.4: + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + dev: true + + /@types/parse-author@2.0.3: + resolution: {integrity: sha512-pgRW2K/GVQoogylrGJXDl7PBLW9A6T4OOc9Hy9MLT5f7vgufK2GQ8FcfAbjFHR5HjcN9ByzuCczAORk49REqoA==} + dev: true + + /@types/parse-json@4.0.2: + resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} + dev: true + + /@types/resolve@1.20.2: + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + dev: true + + /@types/semver@7.5.6: + resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} + dev: true + + /@types/supports-color@8.1.3: + resolution: {integrity: sha512-Hy6UMpxhE3j1tLpl27exp1XqHD7n8chAiNPzWfz16LPZoMMoSc4dzLl6w9qijkEb/r5O1ozdu1CWGA2L83ZeZg==} + dev: true + + /@types/unist@2.0.10: + resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} + dev: true + + /@types/yargs-parser@21.0.3: + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + dev: true + + /@types/yargs@17.0.32: + resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} + dependencies: + '@types/yargs-parser': 21.0.3 + dev: true + + /@typescript-eslint/eslint-plugin@6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.10.0 + '@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 6.20.0 + '@typescript-eslint/type-utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.20.0 + debug: 4.3.4 + eslint: 8.56.0 + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare: 1.4.0 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/experimental-utils@2.34.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==} + engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} + peerDependencies: + eslint: '*' + dependencies: + '@types/json-schema': 7.0.15 + '@typescript-eslint/typescript-estree': 2.34.0(typescript@5.3.3) + eslint: 8.56.0 + eslint-scope: 5.1.1 + eslint-utils: 2.1.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/experimental-utils@5.62.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@typescript-eslint/utils': 5.62.0(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/parser@6.20.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.20.0 + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.20.0 + debug: 4.3.4 + eslint: 8.56.0 + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/scope-manager@5.62.0: + resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + dev: true + + /@typescript-eslint/scope-manager@6.20.0: + resolution: {integrity: sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/visitor-keys': 6.20.0 + dev: true + + /@typescript-eslint/type-utils@6.20.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) + '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + debug: 4.3.4 + eslint: 8.56.0 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/types@5.62.0: + resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@typescript-eslint/types@6.20.0: + resolution: {integrity: sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + + /@typescript-eslint/typescript-estree@2.34.0(typescript@5.3.3): + resolution: {integrity: sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==} + engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + debug: 4.3.4 + eslint-visitor-keys: 1.3.0 + glob: 7.2.3 + is-glob: 4.0.3 + lodash: 4.17.21 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.3.3): + resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/typescript-estree@6.20.0(typescript@5.3.3): + resolution: {integrity: sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/visitor-keys': 6.20.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils@5.62.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.6 + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.3.3) + eslint: 8.56.0 + eslint-scope: 5.1.1 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/utils@6.20.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.6 + '@typescript-eslint/scope-manager': 6.20.0 + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) + eslint: 8.56.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys@5.62.0: + resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.62.0 + eslint-visitor-keys: 3.4.3 + dev: true + + /@typescript-eslint/visitor-keys@6.20.0: + resolution: {integrity: sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.20.0 + eslint-visitor-keys: 3.4.3 + dev: true + + /@ungap/structured-clone@1.2.0: + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + dev: true + + /@unocss/config@0.55.7: + resolution: {integrity: sha512-+X6rPScyFEWbkZyCyM+HfoJhJNN+CEl2n2izWkm0kuDj3w9fY9B3f/0dsk+jmx/gJEI5Y797q9zspNMNDib1AA==} + engines: {node: '>=14'} + dependencies: + '@unocss/core': 0.55.7 + unconfig: 0.3.11 + dev: true + + /@unocss/core@0.55.7: + resolution: {integrity: sha512-c+bWe844Xjlwc1EPwHj0+n3LpntJG7ELPbEOOxNIG+CQdcEX0l1G0rkM8+nKstJ9WJmgpf1HdJQLVMF62HXvhw==} + dev: true + + /@unocss/eslint-config@0.55.7(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-ykRUpPeT5kJSXHAduOJ2PxnEoaYsGOS2jG9iVjbbvER36ZQ+71xdwep/qpBlAr4LWLeoICy7Om+No1r43ZDntw==} + engines: {node: '>=14'} + dependencies: + '@unocss/eslint-plugin': 0.55.7(eslint@8.56.0)(typescript@5.3.3) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: true + + /@unocss/eslint-plugin@0.55.7(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-U+poFU/GJH8NvFBQxLp64zRRfnLWSbY41+Q8Vnlw/nP/tizZumO2lNJ+UBIGFLa1TwyMulFjru6CXt2uSFKtaA==} + engines: {node: '>=14'} + dependencies: + '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@unocss/config': 0.55.7 + '@unocss/core': 0.55.7 + magic-string: 0.30.6 + synckit: 0.8.8 + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: true + + /@vitest/expect@0.34.6: + resolution: {integrity: sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==} + dependencies: + '@vitest/spy': 0.34.6 + '@vitest/utils': 0.34.6 + chai: 4.4.1 + dev: true + + /@vitest/runner@0.34.6: + resolution: {integrity: sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==} + dependencies: + '@vitest/utils': 0.34.6 + p-limit: 4.0.0 + pathe: 1.1.2 + dev: true + + /@vitest/snapshot@0.34.6: + resolution: {integrity: sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==} + dependencies: + magic-string: 0.30.6 + pathe: 1.1.2 + pretty-format: 29.7.0 + dev: true + + /@vitest/spy@0.34.6: + resolution: {integrity: sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==} + dependencies: + tinyspy: 2.2.0 + dev: true + + /@vitest/utils@0.34.6: + resolution: {integrity: sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==} + dependencies: + diff-sequences: 29.6.3 + loupe: 2.3.7 + pretty-format: 29.7.0 + dev: true + + /abbrev@2.0.0: + resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + + /acorn-jsx@5.3.2(acorn@8.11.3): + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + acorn: 8.11.3 + dev: true + + /acorn-walk@8.3.2: + resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} + engines: {node: '>=0.4.0'} + dev: true + + /acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + + /ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + dev: true + + /ajv@8.12.0: + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + dev: true + + /ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: true + + /ansi-regex@6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} + dev: true + + /ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + dependencies: + color-convert: 1.9.3 + dev: true + + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + dev: true + + /ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + dev: true + + /anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + dev: true + + /argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true + + /array-buffer-byte-length@1.0.1: + resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + is-array-buffer: 3.0.4 + dev: true + + /array-includes@3.1.7: + resolution: {integrity: sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + get-intrinsic: 1.2.3 + is-string: 1.0.7 + dev: true + + /array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + dev: true + + /array.prototype.findlastindex@1.2.3: + resolution: {integrity: sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + es-shim-unscopables: 1.0.2 + get-intrinsic: 1.2.3 + dev: true + + /array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + es-shim-unscopables: 1.0.2 + dev: true + + /array.prototype.flatmap@1.3.2: + resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + es-shim-unscopables: 1.0.2 + dev: true + + /arraybuffer.prototype.slice@1.0.2: + resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.1 + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + get-intrinsic: 1.2.3 + is-array-buffer: 3.0.4 + is-shared-array-buffer: 1.0.2 + dev: true + + /assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + dev: true + + /author-regex@1.0.0: + resolution: {integrity: sha512-KbWgR8wOYRAPekEmMXrYYdc7BRyhn2Ftk7KWfMUnQ43hFdojWEFRxhhRUm3/OFEdPa1r0KAvTTg9YQK57xTe0g==} + engines: {node: '>=0.8'} + dev: true + + /available-typed-arrays@1.0.6: + resolution: {integrity: sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==} + engines: {node: '>= 0.4'} + dev: true + + /bail@2.0.2: + resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} + dev: true + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /binary-extensions@2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: true + + /boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + dev: true + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + + /braces@3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + + /builtin-modules@3.3.0: + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} + dev: true + + /builtins@5.0.1: + resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} + dependencies: + semver: 7.5.4 + dev: true + + /bumpp@9.3.0: + resolution: {integrity: sha512-P46VikoEZadYCqx7mbClKlaJnOyvc+JfRJPRf1YwlOjwqeYmutgFe1w9hvfXe819VhpU0N0TNXtxyVAUlAgaNA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + '@jsdevtools/ez-spawn': 3.0.4 + c12: 1.6.1 + cac: 6.7.14 + fast-glob: 3.3.2 + js-yaml: 4.1.0 + prompts: 2.4.2 + semver: 7.5.4 + dev: true + + /c12@1.6.1: + resolution: {integrity: sha512-fAZOi3INDvIbmjuwAVVggusyRTxwNdTAnwLay8IsXwhFzDwPPGzFxzrx6L55CPFGPulUSZI0eyFUvRDXveoE3g==} + dependencies: + chokidar: 3.5.3 + defu: 6.1.4 + dotenv: 16.4.1 + giget: 1.2.1 + jiti: 1.21.0 + mlly: 1.5.0 + ohash: 1.1.3 + pathe: 1.1.2 + perfect-debounce: 1.0.0 + pkg-types: 1.0.3 + rc9: 2.1.1 + dev: true + + /cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + dev: true + + /call-bind@1.0.5: + resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} + dependencies: + function-bind: 1.1.2 + get-intrinsic: 1.2.3 + set-function-length: 1.2.0 + dev: true + + /call-me-maybe@1.0.2: + resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} + dev: true + + /callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + dev: true + + /case-police@0.6.1: + resolution: {integrity: sha512-tOgkG3HhtzNVHU+HVHqbpVJ3CICPDihtlgoM2C4dx0RLeo6qcNVeBgiYJN5Bln+stxKrnKrw89CFgqYQDqwZQg==} + hasBin: true + dev: true + + /ccount@2.0.1: + resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + dev: true + + /chai@4.4.1: + resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} + engines: {node: '>=4'} + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.3 + get-func-name: 2.0.2 + loupe: 2.3.7 + pathval: 1.1.1 + type-detect: 4.0.8 + dev: true + + /chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + dev: true + + /chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /character-entities-html4@2.1.0: + resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} + dev: true + + /character-entities-legacy@1.1.4: + resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} + dev: true + + /character-entities-legacy@3.0.0: + resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} + dev: true + + /character-entities@1.2.4: + resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} + dev: true + + /character-entities@2.0.2: + resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + dev: true + + /character-reference-invalid@1.1.4: + resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} + dev: true + + /character-reference-invalid@2.0.1: + resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} + dev: true + + /check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + dependencies: + get-func-name: 2.0.2 + dev: true + + /chokidar@3.5.3: + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /chownr@2.0.0: + resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} + engines: {node: '>=10'} + dev: true + + /ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + dev: true + + /citty@0.1.5: + resolution: {integrity: sha512-AS7n5NSc0OQVMV9v6wt3ByujNIrne0/cTjiC2MYqhvao57VNfiuVksTSr2p17nVOhEr2KtqiAkGwHcgMC/qUuQ==} + dependencies: + consola: 3.2.3 + dev: true + + /clean-regexp@1.0.0: + resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} + engines: {node: '>=4'} + dependencies: + escape-string-regexp: 1.0.5 + dev: true + + /cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + dev: true + + /color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + dependencies: + color-name: 1.1.3 + dev: true + + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + dev: true + + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + dev: true + + /comment-parser@1.4.1: + resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} + engines: {node: '>= 12.0.0'} + dev: true + + /commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + dev: true + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: true + + /concat-stream@2.0.0: + resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} + engines: {'0': node >= 6.0} + dependencies: + buffer-from: 1.1.2 + inherits: 2.0.4 + readable-stream: 3.6.2 + typedarray: 0.0.6 + dev: true + + /consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} + dev: true + + /cosmiconfig@7.1.0: + resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} + engines: {node: '>=10'} + dependencies: + '@types/parse-json': 4.0.2 + import-fresh: 3.3.0 + parse-json: 5.2.0 + path-type: 4.0.0 + yaml: 1.10.2 + dev: true + + /cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true + + /cssesc@3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + dev: true + + /debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.3 + dev: true + + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + + /decode-named-character-reference@1.0.2: + resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} + dependencies: + character-entities: 2.0.2 + dev: true + + /deep-eql@4.1.3: + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} + dependencies: + type-detect: 4.0.8 + dev: true + + /deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: true + + /deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + dev: true + + /define-data-property@1.1.1: + resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.3 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + dev: true + + /define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.1 + has-property-descriptors: 1.0.1 + object-keys: 1.1.1 + dev: true + + /defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + dev: true + + /dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + dev: true + + /destr@2.0.2: + resolution: {integrity: sha512-65AlobnZMiCET00KaFFjUefxDX0khFA/E4myqZ7a6Sq1yZtR8+FVIvilVX66vF2uobSumxooYZChiRPCKNqhmg==} + dev: true + + /diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dev: true + + /diff@5.1.0: + resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} + engines: {node: '>=0.3.1'} + dev: true + + /dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + dependencies: + path-type: 4.0.0 + dev: true + + /doctrine@2.1.0: + resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} + engines: {node: '>=0.10.0'} + dependencies: + esutils: 2.0.3 + dev: true + + /doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dependencies: + esutils: 2.0.3 + dev: true + + /dom-serializer@2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.5.0 + dev: true + + /domelementtype@2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + dev: true + + /domhandler@5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} + dependencies: + domelementtype: 2.3.0 + dev: true + + /domutils@3.1.0: + resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + dev: true + + /dotenv@16.4.1: + resolution: {integrity: sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==} + engines: {node: '>=12'} + dev: true + + /eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + dev: true + + /emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + dev: true + + /emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + dev: true + + /enhanced-resolve@5.15.0: + resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} + engines: {node: '>=10.13.0'} + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.1 + dev: true + + /entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + dev: true + + /error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + dependencies: + is-arrayish: 0.2.1 + dev: true + + /es-abstract@1.22.3: + resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.1 + arraybuffer.prototype.slice: 1.0.2 + available-typed-arrays: 1.0.6 + call-bind: 1.0.5 + es-set-tostringtag: 2.0.2 + es-to-primitive: 1.2.1 + function.prototype.name: 1.1.6 + get-intrinsic: 1.2.3 + get-symbol-description: 1.0.0 + globalthis: 1.0.3 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + has-proto: 1.0.1 + has-symbols: 1.0.3 + hasown: 2.0.0 + internal-slot: 1.0.6 + is-array-buffer: 3.0.4 + is-callable: 1.2.7 + is-negative-zero: 2.0.2 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.2 + is-string: 1.0.7 + is-typed-array: 1.1.13 + is-weakref: 1.0.2 + object-inspect: 1.13.1 + object-keys: 1.1.1 + object.assign: 4.1.5 + regexp.prototype.flags: 1.5.1 + safe-array-concat: 1.1.0 + safe-regex-test: 1.0.2 + string.prototype.trim: 1.2.8 + string.prototype.trimend: 1.0.7 + string.prototype.trimstart: 1.0.7 + typed-array-buffer: 1.0.0 + typed-array-byte-length: 1.0.0 + typed-array-byte-offset: 1.0.0 + typed-array-length: 1.0.4 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.14 + dev: true + + /es-errors@1.0.0: + resolution: {integrity: sha512-yHV74THqMJUyFKkHyN7hyENcEZM3Dj2a2IrdClY+IT4BFQHkIVwlh8s6uZfjsFydMdNHv0F5mWgAA3ajFbsvVQ==} + engines: {node: '>= 0.4'} + dev: true + + /es-html-parser@0.0.9: + resolution: {integrity: sha512-oniQMi+466VFsDzcdron9Ry/sqUJpDJg1bbDn0jFJKDdxXhwIOYDr4DgBnO5/yPLGj2xv+n5yy4L1Q0vAC5TYQ==} + dev: true + + /es-set-tostringtag@2.0.2: + resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.3 + has-tostringtag: 1.0.2 + hasown: 2.0.0 + dev: true + + /es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + dependencies: + hasown: 2.0.0 + dev: true + + /es-to-primitive@1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + dependencies: + is-callable: 1.2.7 + is-date-object: 1.0.5 + is-symbol: 1.0.4 + dev: true + + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /escalade@3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + engines: {node: '>=6'} + dev: true + + /escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + dev: true + + /escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + dev: true + + /eslint-compat-utils@0.1.2(eslint@8.56.0): + resolution: {integrity: sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==} + engines: {node: '>=12'} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + eslint: 8.56.0 + dev: true + + /eslint-compat-utils@0.4.1(eslint@8.56.0): + resolution: {integrity: sha512-5N7ZaJG5pZxUeNNJfUchurLVrunD1xJvyg5kYOIVF8kg1f3ajTikmAu/5fZ9w100omNPOoMjngRszh/Q/uFGMg==} + engines: {node: '>=12'} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + eslint: 8.56.0 + semver: 7.5.4 + dev: true + + /eslint-config-flat-gitignore@0.1.2: + resolution: {integrity: sha512-PcBsqtd5QHEZH4ROvpnRN4EP0qcHh9voCCHgtyHxnJZHGspJREcZn7oPqRG/GfWt9m3C0fkC2l5CuBtMig2wXQ==} + dependencies: + parse-gitignore: 2.0.0 + dev: true + + /eslint-define-config@1.24.1: + resolution: {integrity: sha512-o36vBhPSWyIQlHoMqGhhcGmOOm2A2ccBVIdLTG/AWdm9YmjpsLpf+5ntf9LlHR6dduLREgxtGwvwPwSt7vnXJg==} + engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>= 8.6.0'} + dev: true + + /eslint-etc@5.2.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-lFJBSiIURdqQKq9xJhvSJFyPA+VeTh5xvk24e8pxVL7bwLBtGF60C/KRkLTMrvCZ6DA3kbPuYhLWY0TZMlqTsg==} + peerDependencies: + eslint: ^8.0.0 + typescript: '>=4.0.0' + dependencies: + '@typescript-eslint/experimental-utils': 5.62.0(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 + tsutils: 3.21.0(typescript@5.3.3) + tsutils-etc: 1.4.2(tsutils@3.21.0)(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + dependencies: + debug: 3.2.7 + is-core-module: 2.13.1 + resolve: 1.22.8 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.20.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0): + resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '*' + eslint-plugin-import: '*' + dependencies: + debug: 4.3.4 + enhanced-resolve: 5.15.0 + eslint: 8.56.0 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.20.0)(eslint@8.56.0) + fast-glob: 3.3.2 + get-tsconfig: 4.7.2 + is-core-module: 2.13.1 + is-glob: 4.0.3 + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - supports-color + dev: true + + /eslint-mdx@2.3.4(eslint@8.56.0): + resolution: {integrity: sha512-u4NszEUyoGtR7Q0A4qs0OymsEQdCO6yqWlTzDa9vGWsK7aMotdnW0hqifHTkf6lEtA2vHk2xlkWHTCrhYLyRbw==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '>=8.0.0' + dependencies: + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) + eslint: 8.56.0 + espree: 9.6.1 + estree-util-visit: 1.2.1 + remark-mdx: 2.3.0 + remark-parse: 10.0.2 + remark-stringify: 10.0.3 + synckit: 0.9.0 + tslib: 2.6.2 + unified: 10.1.2 + unified-engine: 10.1.0 + unist-util-visit: 4.1.2 + uvu: 0.5.6 + vfile: 5.3.7 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): + resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + dependencies: + '@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + debug: 3.2.7 + eslint: 8.56.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.20.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0) + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-array-func@3.1.8(eslint@8.56.0): + resolution: {integrity: sha512-BjnbJvw+knaHgVddIL3q5xYcoqAZoK8wOdT7QF+mkvSAjXdZCdhL0z71Y7oRtgXA8BpN9QLJ2uHgD3I6ymlbOw==} + engines: {node: '>= 6.8.0'} + peerDependencies: + eslint: '>=3.0.0' + dependencies: + eslint: 8.56.0 + dev: true + + /eslint-plugin-case-police@0.6.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-SNyZBjc39CwoNSOl3aiu5EsuHYXOIaPDraMsgLQmcH8CbEhllyOMkmV9kuSNHjjtM8iYRHsiBs1WEFw3/9qkoQ==} + dependencies: + '@typescript-eslint/utils': 5.62.0(eslint@8.56.0)(typescript@5.3.3) + case-police: 0.6.1 + synckit: 0.8.8 + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: true + + /eslint-plugin-es-x@7.5.0(eslint@8.56.0): + resolution: {integrity: sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '>=8' + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@eslint-community/regexpp': 4.10.0 + eslint: 8.56.0 + eslint-compat-utils: 0.1.2(eslint@8.56.0) + dev: true + + /eslint-plugin-etc@2.0.3(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-o5RS/0YwtjlGKWjhKojgmm82gV1b4NQUuwk9zqjy9/EjxNFKKYCaF+0M7DkYBn44mJ6JYFZw3Ft249dkKuR1ew==} + peerDependencies: + eslint: ^8.0.0 + typescript: '>=4.0.0' + dependencies: + '@phenomnomnominal/tsquery': 5.0.1(typescript@5.3.3) + '@typescript-eslint/experimental-utils': 5.62.0(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 + eslint-etc: 5.2.1(eslint@8.56.0)(typescript@5.3.3) + requireindex: 1.2.0 + tslib: 2.6.2 + tsutils: 3.21.0(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-html@7.1.0: + resolution: {integrity: sha512-fNLRraV/e6j8e3XYOC9xgND4j+U7b1Rq+OygMlLcMg+wI/IpVbF+ubQa3R78EjKB9njT6TQOlcK5rFKBVVtdfg==} + dependencies: + htmlparser2: 8.0.2 + dev: true + + /eslint-plugin-i@2.29.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): + resolution: {integrity: sha512-slGeTS3GQzx9267wLJnNYNO8X9EHGsc75AKIAFvnvMYEcTJKotPKL1Ru5PIGVHIVet+2DsugePWp8Oxpx8G22w==} + engines: {node: '>=12'} + peerDependencies: + eslint: ^7.2.0 || ^8 + dependencies: + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.56.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + get-tsconfig: 4.7.2 + is-glob: 4.0.3 + minimatch: 3.1.2 + resolve: 1.22.8 + semver: 7.5.4 + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + dev: true + + /eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.20.0)(eslint@8.56.0): + resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + dependencies: + '@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + array-includes: 3.1.7 + array.prototype.findlastindex: 1.2.3 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.56.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + hasown: 2.0.0 + is-core-module: 2.13.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.7 + object.groupby: 1.0.1 + object.values: 1.1.7 + semver: 6.3.1 + tsconfig-paths: 3.15.0 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + dev: true + + /eslint-plugin-jest-formatting@3.1.0(eslint@8.56.0): + resolution: {integrity: sha512-XyysraZ1JSgGbLSDxjj5HzKKh0glgWf+7CkqxbTqb7zEhW7X2WHo5SBQ8cGhnszKN+2Lj3/oevBlHNbHezoc/A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=0.8.0' + dependencies: + eslint: 8.56.0 + dev: true + + /eslint-plugin-json-schema-validator@4.8.3(eslint@8.56.0): + resolution: {integrity: sha512-F4S6Aw7l/9NzB8E0CAbjiSlXWqDiK3rIiw0I+Jdp+qr/wN1yTg7HkJgeWX4mNnlDMDzydymYy2uuKmNaWUV/hA==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + ajv: 8.12.0 + debug: 4.3.4 + eslint: 8.56.0 + eslint-compat-utils: 0.4.1(eslint@8.56.0) + json-schema-migrate: 2.0.0 + jsonc-eslint-parser: 2.4.0 + minimatch: 8.0.4 + synckit: 0.9.0 + toml-eslint-parser: 0.9.3 + tunnel-agent: 0.6.0 + yaml-eslint-parser: 1.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-jsonc@2.13.0(eslint@8.56.0): + resolution: {integrity: sha512-2wWdJfpO/UbZzPDABuUVvlUQjfMJa2p2iQfYt/oWxOMpXCcjuiMUSaA02gtY/Dbu82vpaSqc+O7Xq6ECHwtIxA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + eslint: 8.56.0 + eslint-compat-utils: 0.4.1(eslint@8.56.0) + espree: 9.6.1 + graphemer: 1.4.0 + jsonc-eslint-parser: 2.4.0 + natural-compare: 1.4.0 + synckit: 0.6.2 + dev: true + + /eslint-plugin-markdown@3.0.1(eslint@8.56.0): + resolution: {integrity: sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.56.0 + mdast-util-from-markdown: 0.8.5 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-mdx@2.3.4(eslint@8.56.0): + resolution: {integrity: sha512-kr6tgaifKL+AVGYMtdYc2VCsIjfYQXuUCKz4rK58d2DpnPFHrmgXIOC7NcMvaEld+VOEpxBSCCnjnsf4IVCQGg==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '>=8.0.0' + dependencies: + eslint: 8.56.0 + eslint-mdx: 2.3.4(eslint@8.56.0) + eslint-plugin-markdown: 3.0.1(eslint@8.56.0) + remark-mdx: 2.3.0 + remark-parse: 10.0.2 + remark-stringify: 10.0.3 + tslib: 2.6.2 + unified: 10.1.2 + vfile: 5.3.7 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-n@16.6.2(eslint@8.56.0): + resolution: {integrity: sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + eslint: '>=7.0.0' + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + builtins: 5.0.1 + eslint: 8.56.0 + eslint-plugin-es-x: 7.5.0(eslint@8.56.0) + get-tsconfig: 4.7.2 + globals: 13.24.0 + ignore: 5.3.1 + is-builtin-module: 3.2.1 + is-core-module: 2.13.1 + minimatch: 3.1.2 + resolve: 1.22.8 + semver: 7.5.4 + dev: true + + /eslint-plugin-no-await-in-promise@1.1.6(eslint@8.56.0): + resolution: {integrity: sha512-4oyWw+P63MdQdHstoELk0Z05xxt/dRxS1QRpM+JPizrFgQFtdJ+DjdhV4db0CsRHoZ/y8pneS2rG3Slio60u2w==} + engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} + peerDependencies: + eslint: '>=7' + dependencies: + eslint: 8.56.0 + dev: true + + /eslint-plugin-no-explicit-type-exports@0.12.1(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-m1v/f+LYVygCY735KfCovkoXYPbZH5zxEj/tuLOnMwX/qbJEJoRb9evul88Ois5HidvKbiMdMg/tXU55Ki++jg==} + engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} + peerDependencies: + '@typescript-eslint/parser': '>= 2.27.0' + eslint: '>= 6.x' + dependencies: + '@typescript-eslint/experimental-utils': 2.34.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + - typescript + dev: true + + /eslint-plugin-no-only-tests@3.1.0: + resolution: {integrity: sha512-Lf4YW/bL6Un1R6A76pRZyE1dl1vr31G/ev8UzIc/geCgFWyrKil8hVjYqWVKGB/UIGmb6Slzs9T0wNezdSVegw==} + engines: {node: '>=5.0.0'} + dev: true + + /eslint-plugin-only-error@1.0.2: + resolution: {integrity: sha512-tdz/EU/LeQLPNMBIQOSl39by+/NGKdhjfba6qDvMWjcbY0GmiMk0bXrIXRGAwW9fksH30Y+KKlK1Jc32bbql9w==} + engines: {node: '>=6'} + dev: true + + /eslint-plugin-promise@6.1.1(eslint@8.56.0): + resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.56.0 + dev: true + + /eslint-plugin-regexp@1.15.0(eslint@8.56.0): + resolution: {integrity: sha512-YEtQPfdudafU7RBIFci81R/Q1yErm0mVh3BkGnXD2Dk8DLwTFdc2ITYH1wCnHKim2gnHfPFgrkh+b2ozyyU7ag==} + engines: {node: ^12 || >=14} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@eslint-community/regexpp': 4.10.0 + comment-parser: 1.4.1 + eslint: 8.56.0 + grapheme-splitter: 1.0.4 + jsdoctypeparser: 9.0.0 + refa: 0.11.0 + regexp-ast-analysis: 0.6.0 + scslre: 0.2.0 + dev: true + + /eslint-plugin-solid@0.13.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-PdNrAylFzeh/SbnLc2pQ432l+bXFGzXj/qNqkh5QNVZCoWIdSs0CJA2D7hqW0DloztwUrzkVZCDWFWc3iRAm/Q==} + engines: {node: '>=12.0.0'} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 + is-html: 2.0.0 + kebab-case: 1.0.2 + known-css-properties: 0.24.0 + style-to-object: 0.3.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /eslint-plugin-toml@0.5.0(eslint@8.56.0): + resolution: {integrity: sha512-EnnC+/PEdaScDmQWrJeQlOFSLdulyVkRAbWX4X97Tju7Y2W/2pT6f1BVqEAjHAMjl9daRh+cS2U3Ik6i5E+C5Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + debug: 4.3.4 + eslint: 8.56.0 + lodash: 4.17.21 + toml-eslint-parser: 0.6.1 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-unicorn@48.0.1(eslint@8.56.0): + resolution: {integrity: sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==} + engines: {node: '>=16'} + peerDependencies: + eslint: '>=8.44.0' + dependencies: + '@babel/helper-validator-identifier': 7.22.20 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + ci-info: 3.9.0 + clean-regexp: 1.0.0 + eslint: 8.56.0 + esquery: 1.5.0 + indent-string: 4.0.0 + is-builtin-module: 3.2.1 + jsesc: 3.0.2 + lodash: 4.17.21 + pluralize: 8.0.0 + read-pkg-up: 7.0.1 + regexp-tree: 0.1.27 + regjsparser: 0.10.0 + semver: 7.5.4 + strip-indent: 3.0.0 + dev: true + + /eslint-plugin-unused-imports@3.0.0(@typescript-eslint/eslint-plugin@6.20.0)(eslint@8.56.0): + resolution: {integrity: sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^6.0.0 + eslint: ^8.0.0 + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + dependencies: + '@typescript-eslint/eslint-plugin': 6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 + eslint-rule-composer: 0.3.0 + dev: true + + /eslint-plugin-vitest@0.3.21(@typescript-eslint/eslint-plugin@6.20.0)(eslint@8.56.0)(typescript@5.3.3)(vitest@0.34.6): + resolution: {integrity: sha512-oYwR1MrwaBw/OG6CKU+SJYleAc442w6CWL1RTQl5WLwy8X3sh0bgHIQk5iEtmTak3Q+XAvZglr0bIoDOjFdkcw==} + engines: {node: ^18.0.0 || >= 20.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': '*' + eslint: '>=8.0.0' + vitest: '*' + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + vitest: + optional: true + dependencies: + '@typescript-eslint/eslint-plugin': 6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 + vitest: 0.34.6 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /eslint-plugin-vue@9.21.1(eslint@8.56.0): + resolution: {integrity: sha512-XVtI7z39yOVBFJyi8Ljbn7kY9yHzznKXL02qQYn+ta63Iy4A9JFBw6o4OSB9hyD2++tVT+su9kQqetUyCCwhjw==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + eslint: 8.56.0 + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 6.0.15 + semver: 7.5.4 + vue-eslint-parser: 9.4.2(eslint@8.56.0) + xml-name-validator: 4.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-yml@1.12.2(eslint@8.56.0): + resolution: {integrity: sha512-hvS9p08FhPT7i/ynwl7/Wt7ke7Rf4P2D6fT8lZlL43peZDTsHtH2A0SIFQ7Kt7+mJ6if6P+FX3iJhMkdnxQwpg==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + debug: 4.3.4 + eslint: 8.56.0 + eslint-compat-utils: 0.4.1(eslint@8.56.0) + lodash: 4.17.21 + natural-compare: 1.4.0 + yaml-eslint-parser: 1.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-rule-composer@0.3.0: + resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==} + engines: {node: '>=4.0.0'} + dev: true + + /eslint-scope@5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + dev: true + + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true + + /eslint-utils@2.1.0: + resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} + engines: {node: '>=6'} + dependencies: + eslint-visitor-keys: 1.3.0 + dev: true + + /eslint-visitor-keys@1.3.0: + resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} + engines: {node: '>=4'} + dev: true + + /eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /eslint@8.56.0: + resolution: {integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@eslint-community/regexpp': 4.10.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.56.0 + '@humanwhocodes/config-array': 0.11.14 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.4 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.5.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.1 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.3 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + dev: true + + /espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) + eslint-visitor-keys: 3.4.3 + dev: true + + /esquery@1.5.0: + resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + engines: {node: '>=0.10'} + dependencies: + estraverse: 5.3.0 + dev: true + + /esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + dependencies: + estraverse: 5.3.0 + dev: true + + /estraverse@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + dev: true + + /estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + dev: true + + /estree-util-is-identifier-name@2.1.0: + resolution: {integrity: sha512-bEN9VHRyXAUOjkKVQVvArFym08BTWB0aJPppZZr0UNyAqWsLaVfAqP7hbaTJjzHifmB5ebnR8Wm7r7yGN/HonQ==} + dev: true + + /estree-util-visit@1.2.1: + resolution: {integrity: sha512-xbgqcrkIVbIG+lI/gzbvd9SGTJL4zqJKBFttUl5pP27KhAjtMKbX/mQXJ7qgyXpMgVy/zvpm0xoQQaGL8OloOw==} + dependencies: + '@types/estree-jsx': 1.0.4 + '@types/unist': 2.0.10 + dev: true + + /estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + + /esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + dev: true + + /execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + dependencies: + cross-spawn: 7.0.3 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.2.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + dev: true + + /extend@3.0.2: + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + dev: true + + /fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: true + + /fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + + /fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + dev: true + + /fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + dev: true + + /fastq@1.17.0: + resolution: {integrity: sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==} + dependencies: + reusify: 1.0.4 + dev: true + + /fault@2.0.1: + resolution: {integrity: sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==} + dependencies: + format: 0.2.2 + dev: true + + /file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flat-cache: 3.2.0 + dev: true + + /fill-range@7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + dev: true + + /find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: true + + /flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flatted: 3.2.9 + keyv: 4.5.4 + rimraf: 3.0.2 + dev: true + + /flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + dev: true + + /flatted@3.2.9: + resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} + dev: true + + /for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + dependencies: + is-callable: 1.2.7 + dev: true + + /foreground-child@3.1.1: + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + dev: true + + /format@0.2.2: + resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} + engines: {node: '>=0.4.x'} + dev: true + + /fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + dev: true + + /fs-minipass@2.1.0: + resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + dev: true + + /fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + dev: true + + /function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + functions-have-names: 1.2.3 + dev: true + + /functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + dev: true + + /get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + dev: true + + /get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + dev: true + + /get-intrinsic@1.2.3: + resolution: {integrity: sha512-JIcZczvcMVE7AUOP+X72bh8HqHBRxFdz5PDHYtNG/lE3yk9b3KZBJlwFcTyPYjg3L4RLLmZJzvjxhaZVapxFrQ==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.0.0 + function-bind: 1.1.2 + has-proto: 1.0.1 + has-symbols: 1.0.3 + hasown: 2.0.0 + dev: true + + /get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + dev: true + + /get-symbol-description@1.0.0: + resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + get-intrinsic: 1.2.3 + dev: true + + /get-tsconfig@4.7.2: + resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true + + /giget@1.2.1: + resolution: {integrity: sha512-4VG22mopWtIeHwogGSy1FViXVo0YT+m6BrqZfz0JJFwbSsePsCdOzdLIIli5BtMp7Xe8f/o2OmBpQX2NBOC24g==} + hasBin: true + dependencies: + citty: 0.1.5 + consola: 3.2.3 + defu: 6.1.4 + node-fetch-native: 1.6.1 + nypm: 0.3.6 + ohash: 1.1.3 + pathe: 1.1.2 + tar: 6.2.0 + dev: true + + /glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob@10.3.10: + resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + foreground-child: 3.1.1 + jackspeak: 2.3.6 + minimatch: 9.0.3 + minipass: 7.0.4 + path-scurry: 1.10.1 + dev: true + + /glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + dev: true + + /globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 + dev: true + + /globalthis@1.0.3: + resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + engines: {node: '>= 0.4'} + dependencies: + define-properties: 1.2.1 + dev: true + + /globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.1 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + + /gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + dependencies: + get-intrinsic: 1.2.3 + dev: true + + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true + + /grapheme-splitter@1.0.4: + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + dev: true + + /graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + dev: true + + /has-bigints@1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + dev: true + + /has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + dev: true + + /has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /has-property-descriptors@1.0.1: + resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} + dependencies: + get-intrinsic: 1.2.3 + dev: true + + /has-proto@1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} + dev: true + + /has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + dev: true + + /has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + + /hasown@2.0.0: + resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 + dev: true + + /hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + dev: true + + /html-tags@3.3.1: + resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==} + engines: {node: '>=8'} + dev: true + + /htmlparser2@8.0.2: + resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.1.0 + entities: 4.5.0 + dev: true + + /human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + dev: true + + /ignore@5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + engines: {node: '>= 4'} + dev: true + + /import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + dev: true + + /import-meta-resolve@2.2.2: + resolution: {integrity: sha512-f8KcQ1D80V7RnqVm+/lirO9zkOxjGxhaTC1IPrBGd3MEfNgmNG67tSUO9gTi2F3Blr2Az6g1vocaxzkVnWl9MA==} + dev: true + + /imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + dev: true + + /indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + dev: true + + /inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true + + /ini@4.1.1: + resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + + /inline-style-parser@0.1.1: + resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==} + dev: true + + /internal-slot@1.0.6: + resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.3 + hasown: 2.0.0 + side-channel: 1.0.4 + dev: true + + /is-alphabetical@1.0.4: + resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} + dev: true + + /is-alphabetical@2.0.1: + resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} + dev: true + + /is-alphanumerical@1.0.4: + resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} + dependencies: + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 + dev: true + + /is-alphanumerical@2.0.1: + resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} + dependencies: + is-alphabetical: 2.0.1 + is-decimal: 2.0.1 + dev: true + + /is-array-buffer@3.0.4: + resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + get-intrinsic: 1.2.3 + dev: true + + /is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + dev: true + + /is-bigint@1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + dependencies: + has-bigints: 1.0.2 + dev: true + + /is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: true + + /is-boolean-object@1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + has-tostringtag: 1.0.2 + dev: true + + /is-buffer@2.0.5: + resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} + engines: {node: '>=4'} + dev: true + + /is-builtin-module@3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + dependencies: + builtin-modules: 3.3.0 + dev: true + + /is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + dev: true + + /is-core-module@2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + dependencies: + hasown: 2.0.0 + dev: true + + /is-date-object@1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.2 + dev: true + + /is-decimal@1.0.4: + resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} + dev: true + + /is-decimal@2.0.1: + resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} + dev: true + + /is-empty@1.2.0: + resolution: {integrity: sha512-F2FnH/otLNJv0J6wc73A5Xo7oHLNnqplYqZhUu01tD54DIPvxIRSTSLkrUB/M0nHO4vo1O9PDfN4KoTxCzLh/w==} + dev: true + + /is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + dev: true + + /is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-hexadecimal@1.0.4: + resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} + dev: true + + /is-hexadecimal@2.0.1: + resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} + dev: true + + /is-html@2.0.0: + resolution: {integrity: sha512-S+OpgB5i7wzIue/YSE5hg0e5ZYfG3hhpNh9KGl6ayJ38p7ED6wxQLd1TV91xHpcTvw90KMJ9EwN3F/iNflHBVg==} + engines: {node: '>=8'} + dependencies: + html-tags: 3.3.1 + dev: true + + /is-module@1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + dev: true + + /is-negative-zero@2.0.2: + resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} + engines: {node: '>= 0.4'} + dev: true + + /is-number-object@1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.2 + dev: true + + /is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + dev: true + + /is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + dev: true + + /is-reference@1.2.1: + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + dependencies: + '@types/estree': 1.0.5 + dev: true + + /is-regex@1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + has-tostringtag: 1.0.2 + dev: true + + /is-shared-array-buffer@1.0.2: + resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} + dependencies: + call-bind: 1.0.5 + dev: true + + /is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + + /is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.2 + dev: true + + /is-symbol@1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + + /is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + dependencies: + which-typed-array: 1.1.14 + dev: true + + /is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + dependencies: + call-bind: 1.0.5 + dev: true + + /isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + dev: true + + /isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /jackspeak@2.3.6: + resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} + engines: {node: '>=14'} + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + dev: true + + /jiti@1.21.0: + resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} + hasBin: true + dev: true + + /js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: true + + /js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: true + + /jsdoctypeparser@9.0.0: + resolution: {integrity: sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==} + engines: {node: '>=10'} + hasBin: true + dev: true + + /jsesc@0.5.0: + resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} + hasBin: true + dev: true + + /jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + dev: true + + /json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: true + + /json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + dev: true + + /json-parse-even-better-errors@3.0.1: + resolution: {integrity: sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + + /json-schema-migrate@2.0.0: + resolution: {integrity: sha512-r38SVTtojDRp4eD6WsCqiE0eNDt4v1WalBXb9cyZYw9ai5cGtBwzRNWjHzJl38w6TxFkXAIA7h+fyX3tnrAFhQ==} + dependencies: + ajv: 8.12.0 + dev: true + + /json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + dev: true + + /json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + dev: true + + /json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + dev: true + + /json5@1.0.2: + resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} + hasBin: true + dependencies: + minimist: 1.2.8 + dev: true + + /jsonc-eslint-parser@2.4.0: + resolution: {integrity: sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.11.3 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + semver: 7.5.4 + dev: true + + /jsonc-parser@3.2.1: + resolution: {integrity: sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==} + dev: true + + /jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + dev: true + + /kebab-case@1.0.2: + resolution: {integrity: sha512-7n6wXq4gNgBELfDCpzKc+mRrZFs7D+wgfF5WRFLNAr4DA/qtr9Js8uOAVAfHhuLMfAcQ0pRKqbpjx+TcJVdE1Q==} + dev: true + + /keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + dependencies: + json-buffer: 3.0.1 + dev: true + + /kleur@3.0.3: + resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} + engines: {node: '>=6'} + dev: true + + /kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + dev: true + + /known-css-properties@0.24.0: + resolution: {integrity: sha512-RTSoaUAfLvpR357vWzAz/50Q/BmHfmE6ETSWfutT0AJiw10e6CmcdYRQJlLRd95B53D0Y2aD1jSxD3V3ySF+PA==} + dev: true + + /levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + + /lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + dev: true + + /lines-and-columns@2.0.4: + resolution: {integrity: sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + + /load-plugin@5.1.0: + resolution: {integrity: sha512-Lg1CZa1CFj2CbNaxijTL6PCbzd4qGTlZov+iH2p5Xwy/ApcZJh+i6jMN2cYePouTfjJfrNu3nXFdEw8LvbjPFQ==} + dependencies: + '@npmcli/config': 6.4.0 + import-meta-resolve: 2.2.2 + dev: true + + /local-pkg@0.4.3: + resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} + engines: {node: '>=14'} + dev: true + + /local-pkg@0.5.0: + resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} + engines: {node: '>=14'} + dependencies: + mlly: 1.5.0 + pkg-types: 1.0.3 + dev: true + + /locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + dependencies: + p-locate: 4.1.0 + dev: true + + /locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + dependencies: + p-locate: 5.0.0 + dev: true + + /lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + dev: true + + /lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true + + /longest-streak@3.1.0: + resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} + dev: true + + /loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + dependencies: + get-func-name: 2.0.2 + dev: true + + /lru-cache@10.2.0: + resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} + engines: {node: 14 || >=16.14} + dev: true + + /lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: true + + /magic-string@0.30.6: + resolution: {integrity: sha512-n62qCLbPjNjyo+owKtveQxZFZTBm+Ms6YoGD23Wew6Vw337PElFNifQpknPruVRQV57kVShPnLGo9vWxVhpPvA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + + /mdast-util-from-markdown@0.8.5: + resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} + dependencies: + '@types/mdast': 3.0.15 + mdast-util-to-string: 2.0.0 + micromark: 2.11.4 + parse-entities: 2.0.0 + unist-util-stringify-position: 2.0.3 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-from-markdown@1.3.1: + resolution: {integrity: sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==} + dependencies: + '@types/mdast': 3.0.15 + '@types/unist': 2.0.10 + decode-named-character-reference: 1.0.2 + mdast-util-to-string: 3.2.0 + micromark: 3.2.0 + micromark-util-decode-numeric-character-reference: 1.1.0 + micromark-util-decode-string: 1.1.0 + micromark-util-normalize-identifier: 1.1.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + unist-util-stringify-position: 3.0.3 + uvu: 0.5.6 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-mdx-expression@1.3.2: + resolution: {integrity: sha512-xIPmR5ReJDu/DHH1OoIT1HkuybIfRGYRywC+gJtI7qHjCJp/M9jrmBEJW22O8lskDWm562BX2W8TiAwRTb0rKA==} + dependencies: + '@types/estree-jsx': 1.0.4 + '@types/hast': 2.3.10 + '@types/mdast': 3.0.15 + mdast-util-from-markdown: 1.3.1 + mdast-util-to-markdown: 1.5.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-mdx-jsx@2.1.4: + resolution: {integrity: sha512-DtMn9CmVhVzZx3f+optVDF8yFgQVt7FghCRNdlIaS3X5Bnym3hZwPbg/XW86vdpKjlc1PVj26SpnLGeJBXD3JA==} + dependencies: + '@types/estree-jsx': 1.0.4 + '@types/hast': 2.3.10 + '@types/mdast': 3.0.15 + '@types/unist': 2.0.10 + ccount: 2.0.1 + mdast-util-from-markdown: 1.3.1 + mdast-util-to-markdown: 1.5.0 + parse-entities: 4.0.1 + stringify-entities: 4.0.3 + unist-util-remove-position: 4.0.2 + unist-util-stringify-position: 3.0.3 + vfile-message: 3.1.4 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-mdx@2.0.1: + resolution: {integrity: sha512-38w5y+r8nyKlGvNjSEqWrhG0w5PmnRA+wnBvm+ulYCct7nsGYhFVb0lljS9bQav4psDAS1eGkP2LMVcZBi/aqw==} + dependencies: + mdast-util-from-markdown: 1.3.1 + mdast-util-mdx-expression: 1.3.2 + mdast-util-mdx-jsx: 2.1.4 + mdast-util-mdxjs-esm: 1.3.1 + mdast-util-to-markdown: 1.5.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-mdxjs-esm@1.3.1: + resolution: {integrity: sha512-SXqglS0HrEvSdUEfoXFtcg7DRl7S2cwOXc7jkuusG472Mmjag34DUDeOJUZtl+BVnyeO1frIgVpHlNRWc2gk/w==} + dependencies: + '@types/estree-jsx': 1.0.4 + '@types/hast': 2.3.10 + '@types/mdast': 3.0.15 + mdast-util-from-markdown: 1.3.1 + mdast-util-to-markdown: 1.5.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-phrasing@3.0.1: + resolution: {integrity: sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==} + dependencies: + '@types/mdast': 3.0.15 + unist-util-is: 5.2.1 + dev: true + + /mdast-util-to-markdown@1.5.0: + resolution: {integrity: sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==} + dependencies: + '@types/mdast': 3.0.15 + '@types/unist': 2.0.10 + longest-streak: 3.1.0 + mdast-util-phrasing: 3.0.1 + mdast-util-to-string: 3.2.0 + micromark-util-decode-string: 1.1.0 + unist-util-visit: 4.1.2 + zwitch: 2.0.4 + dev: true + + /mdast-util-to-string@2.0.0: + resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} + dev: true + + /mdast-util-to-string@3.2.0: + resolution: {integrity: sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==} + dependencies: + '@types/mdast': 3.0.15 + dev: true + + /merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + dev: true + + /merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + + /micromark-core-commonmark@1.1.0: + resolution: {integrity: sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==} + dependencies: + decode-named-character-reference: 1.0.2 + micromark-factory-destination: 1.1.0 + micromark-factory-label: 1.1.0 + micromark-factory-space: 1.1.0 + micromark-factory-title: 1.1.0 + micromark-factory-whitespace: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-chunked: 1.1.0 + micromark-util-classify-character: 1.1.0 + micromark-util-html-tag-name: 1.2.0 + micromark-util-normalize-identifier: 1.1.0 + micromark-util-resolve-all: 1.1.0 + micromark-util-subtokenize: 1.1.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + dev: true + + /micromark-extension-mdx-expression@1.0.8: + resolution: {integrity: sha512-zZpeQtc5wfWKdzDsHRBY003H2Smg+PUi2REhqgIhdzAa5xonhP03FcXxqFSerFiNUr5AWmHpaNPQTBVOS4lrXw==} + dependencies: + '@types/estree': 1.0.5 + micromark-factory-mdx-expression: 1.0.9 + micromark-factory-space: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-events-to-acorn: 1.2.3 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + dev: true + + /micromark-extension-mdx-jsx@1.0.5: + resolution: {integrity: sha512-gPH+9ZdmDflbu19Xkb8+gheqEDqkSpdCEubQyxuz/Hn8DOXiXvrXeikOoBA71+e8Pfi0/UYmU3wW3H58kr7akA==} + dependencies: + '@types/acorn': 4.0.6 + '@types/estree': 1.0.5 + estree-util-is-identifier-name: 2.1.0 + micromark-factory-mdx-expression: 1.0.9 + micromark-factory-space: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + vfile-message: 3.1.4 + dev: true + + /micromark-extension-mdx-md@1.0.1: + resolution: {integrity: sha512-7MSuj2S7xjOQXAjjkbjBsHkMtb+mDGVW6uI2dBL9snOBCbZmoNgDAeZ0nSn9j3T42UE/g2xVNMn18PJxZvkBEA==} + dependencies: + micromark-util-types: 1.1.0 + dev: true + + /micromark-extension-mdxjs-esm@1.0.5: + resolution: {integrity: sha512-xNRBw4aoURcyz/S69B19WnZAkWJMxHMT5hE36GtDAyhoyn/8TuAeqjFJQlwk+MKQsUD7b3l7kFX+vlfVWgcX1w==} + dependencies: + '@types/estree': 1.0.5 + micromark-core-commonmark: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-events-to-acorn: 1.2.3 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + unist-util-position-from-estree: 1.1.2 + uvu: 0.5.6 + vfile-message: 3.1.4 + dev: true + + /micromark-extension-mdxjs@1.0.1: + resolution: {integrity: sha512-7YA7hF6i5eKOfFUzZ+0z6avRG52GpWR8DL+kN47y3f2KhxbBZMhmxe7auOeaTBrW2DenbbZTf1ea9tA2hDpC2Q==} + dependencies: + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) + micromark-extension-mdx-expression: 1.0.8 + micromark-extension-mdx-jsx: 1.0.5 + micromark-extension-mdx-md: 1.0.1 + micromark-extension-mdxjs-esm: 1.0.5 + micromark-util-combine-extensions: 1.1.0 + micromark-util-types: 1.1.0 + dev: true + + /micromark-factory-destination@1.1.0: + resolution: {integrity: sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==} + dependencies: + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + dev: true + + /micromark-factory-label@1.1.0: + resolution: {integrity: sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==} + dependencies: + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + dev: true + + /micromark-factory-mdx-expression@1.0.9: + resolution: {integrity: sha512-jGIWzSmNfdnkJq05c7b0+Wv0Kfz3NJ3N4cBjnbO4zjXIlxJr+f8lk+5ZmwFvqdAbUy2q6B5rCY//g0QAAaXDWA==} + dependencies: + '@types/estree': 1.0.5 + micromark-util-character: 1.2.0 + micromark-util-events-to-acorn: 1.2.3 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + unist-util-position-from-estree: 1.1.2 + uvu: 0.5.6 + vfile-message: 3.1.4 + dev: true + + /micromark-factory-space@1.1.0: + resolution: {integrity: sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==} + dependencies: + micromark-util-character: 1.2.0 + micromark-util-types: 1.1.0 + dev: true + + /micromark-factory-title@1.1.0: + resolution: {integrity: sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==} + dependencies: + micromark-factory-space: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + dev: true + + /micromark-factory-whitespace@1.1.0: + resolution: {integrity: sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==} + dependencies: + micromark-factory-space: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + dev: true + + /micromark-util-character@1.2.0: + resolution: {integrity: sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==} + dependencies: + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + dev: true + + /micromark-util-chunked@1.1.0: + resolution: {integrity: sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==} + dependencies: + micromark-util-symbol: 1.1.0 + dev: true + + /micromark-util-classify-character@1.1.0: + resolution: {integrity: sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==} + dependencies: + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + dev: true + + /micromark-util-combine-extensions@1.1.0: + resolution: {integrity: sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==} + dependencies: + micromark-util-chunked: 1.1.0 + micromark-util-types: 1.1.0 + dev: true + + /micromark-util-decode-numeric-character-reference@1.1.0: + resolution: {integrity: sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==} + dependencies: + micromark-util-symbol: 1.1.0 + dev: true + + /micromark-util-decode-string@1.1.0: + resolution: {integrity: sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==} + dependencies: + decode-named-character-reference: 1.0.2 + micromark-util-character: 1.2.0 + micromark-util-decode-numeric-character-reference: 1.1.0 + micromark-util-symbol: 1.1.0 + dev: true + + /micromark-util-encode@1.1.0: + resolution: {integrity: sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==} + dev: true + + /micromark-util-events-to-acorn@1.2.3: + resolution: {integrity: sha512-ij4X7Wuc4fED6UoLWkmo0xJQhsktfNh1J0m8g4PbIMPlx+ek/4YdW5mvbye8z/aZvAPUoxgXHrwVlXAPKMRp1w==} + dependencies: + '@types/acorn': 4.0.6 + '@types/estree': 1.0.5 + '@types/unist': 2.0.10 + estree-util-visit: 1.2.1 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + vfile-message: 3.1.4 + dev: true + + /micromark-util-html-tag-name@1.2.0: + resolution: {integrity: sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==} + dev: true + + /micromark-util-normalize-identifier@1.1.0: + resolution: {integrity: sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==} + dependencies: + micromark-util-symbol: 1.1.0 + dev: true + + /micromark-util-resolve-all@1.1.0: + resolution: {integrity: sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==} + dependencies: + micromark-util-types: 1.1.0 + dev: true + + /micromark-util-sanitize-uri@1.2.0: + resolution: {integrity: sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==} + dependencies: + micromark-util-character: 1.2.0 + micromark-util-encode: 1.1.0 + micromark-util-symbol: 1.1.0 + dev: true + + /micromark-util-subtokenize@1.1.0: + resolution: {integrity: sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==} + dependencies: + micromark-util-chunked: 1.1.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + dev: true + + /micromark-util-symbol@1.1.0: + resolution: {integrity: sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==} + dev: true + + /micromark-util-types@1.1.0: + resolution: {integrity: sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==} + dev: true + + /micromark@2.11.4: + resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} + dependencies: + debug: 4.3.4 + parse-entities: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /micromark@3.2.0: + resolution: {integrity: sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==} + dependencies: + '@types/debug': 4.1.12 + debug: 4.3.4 + decode-named-character-reference: 1.0.2 + micromark-core-commonmark: 1.1.0 + micromark-factory-space: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-chunked: 1.1.0 + micromark-util-combine-extensions: 1.1.0 + micromark-util-decode-numeric-character-reference: 1.1.0 + micromark-util-encode: 1.1.0 + micromark-util-normalize-identifier: 1.1.0 + micromark-util-resolve-all: 1.1.0 + micromark-util-sanitize-uri: 1.2.0 + micromark-util-subtokenize: 1.1.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + transitivePeerDependencies: + - supports-color + dev: true + + /micromatch@4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + + /mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + dev: true + + /min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + dev: true + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + + /minimatch@8.0.4: + resolution: {integrity: sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: true + + /minipass@3.3.6: + resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} + engines: {node: '>=8'} + dependencies: + yallist: 4.0.0 + dev: true + + /minipass@5.0.0: + resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} + engines: {node: '>=8'} + dev: true + + /minipass@7.0.4: + resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} + engines: {node: '>=16 || 14 >=14.17'} + dev: true + + /minizlib@2.1.2: + resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + yallist: 4.0.0 + dev: true + + /mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + dev: true + + /mlly@1.5.0: + resolution: {integrity: sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==} + dependencies: + acorn: 8.11.3 + pathe: 1.1.2 + pkg-types: 1.0.3 + ufo: 1.3.2 + dev: true + + /mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + dev: true + + /ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true + + /ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + dev: true + + /nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /natsort@2.0.3: + resolution: {integrity: sha512-fuzhAiXcdNAIg2f5kqFOAABvX+uDoJvZs6DvCgioPf7FRAMHsw6G4kH7GFjSZ31yNFkNJuuOIilE8jl0JkavVQ==} + dev: true + + /natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + dev: true + + /node-fetch-native@1.6.1: + resolution: {integrity: sha512-bW9T/uJDPAJB2YNYEpWzE54U5O3MQidXsOyTfnbKYtTtFexRvGzb1waphBN4ZwP6EcIvYYEOwW0b72BpAqydTw==} + dev: true + + /nopt@7.2.0: + resolution: {integrity: sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + hasBin: true + dependencies: + abbrev: 2.0.0 + dev: true + + /normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + dependencies: + hosted-git-info: 2.8.9 + resolve: 1.22.8 + semver: 5.7.2 + validate-npm-package-license: 3.0.4 + dev: true + + /normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + + /npm-normalize-package-bin@3.0.1: + resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + + /npm-run-path@5.2.0: + resolution: {integrity: sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + path-key: 4.0.0 + dev: true + + /nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + dependencies: + boolbase: 1.0.0 + dev: true + + /nypm@0.3.6: + resolution: {integrity: sha512-2CATJh3pd6CyNfU5VZM7qSwFu0ieyabkEdnogE30Obn1czrmOYiZ8DOZLe1yBdLKWoyD3Mcy2maUs+0MR3yVjQ==} + engines: {node: ^14.16.0 || >=16.10.0} + hasBin: true + dependencies: + citty: 0.1.5 + execa: 8.0.1 + pathe: 1.1.2 + ufo: 1.3.2 + dev: true + + /object-inspect@1.13.1: + resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} + dev: true + + /object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + dev: true + + /object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + has-symbols: 1.0.3 + object-keys: 1.1.1 + dev: true + + /object.fromentries@2.0.7: + resolution: {integrity: sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + dev: true + + /object.groupby@1.0.1: + resolution: {integrity: sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + get-intrinsic: 1.2.3 + dev: true + + /object.values@1.1.7: + resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + dev: true + + /ohash@1.1.3: + resolution: {integrity: sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw==} + dev: true + + /once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: true + + /onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + dependencies: + mimic-fn: 4.0.0 + dev: true + + /optionator@0.9.3: + resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + engines: {node: '>= 0.8.0'} + dependencies: + '@aashutoshrathi/word-wrap': 1.2.6 + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + + /p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + dependencies: + p-try: 2.2.0 + dev: true + + /p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + yocto-queue: 1.0.0 + dev: true + + /p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + dependencies: + p-limit: 2.3.0 + dev: true + + /p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: true + + /p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + dev: true + + /parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + dependencies: + callsites: 3.1.0 + dev: true + + /parse-author@2.0.0: + resolution: {integrity: sha512-yx5DfvkN8JsHL2xk2Os9oTia467qnvRgey4ahSm2X8epehBLx/gWLcy5KI+Y36ful5DzGbCS6RazqZGgy1gHNw==} + engines: {node: '>=0.10.0'} + dependencies: + author-regex: 1.0.0 + dev: true + + /parse-entities@2.0.0: + resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} + dependencies: + character-entities: 1.2.4 + character-entities-legacy: 1.1.4 + character-reference-invalid: 1.1.4 + is-alphanumerical: 1.0.4 + is-decimal: 1.0.4 + is-hexadecimal: 1.0.4 + dev: true + + /parse-entities@4.0.1: + resolution: {integrity: sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==} + dependencies: + '@types/unist': 2.0.10 + character-entities: 2.0.2 + character-entities-legacy: 3.0.0 + character-reference-invalid: 2.0.1 + decode-named-character-reference: 1.0.2 + is-alphanumerical: 2.0.1 + is-decimal: 2.0.1 + is-hexadecimal: 2.0.1 + dev: true + + /parse-gitignore@2.0.0: + resolution: {integrity: sha512-RmVuCHWsfu0QPNW+mraxh/xjQVw/lhUCUru8Zni3Ctq3AoMhpDTq0OVdKS6iesd6Kqb7viCV3isAL43dciOSog==} + engines: {node: '>=14'} + dev: true + + /parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + dependencies: + '@babel/code-frame': 7.23.5 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + dev: true + + /parse-json@6.0.2: + resolution: {integrity: sha512-SA5aMiaIjXkAiBrW/yPgLgQAQg42f7K3ACO+2l/zOvtQBwX58DMUsFJXelW2fx3yMBmWOVkR6j1MGsdSbCA4UA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + '@babel/code-frame': 7.23.5 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 2.0.4 + dev: true + + /path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + dev: true + + /path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + dev: true + + /path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + dev: true + + /path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + dev: true + + /path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true + + /path-scurry@1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + lru-cache: 10.2.0 + minipass: 7.0.4 + dev: true + + /path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: true + + /pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + dev: true + + /pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + dev: true + + /perfect-debounce@1.0.0: + resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + dev: true + + /picocolors@1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /pkg-types@1.0.3: + resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + dependencies: + jsonc-parser: 3.2.1 + mlly: 1.5.0 + pathe: 1.1.2 + dev: true + + /pkgroll@2.0.1(typescript@5.3.3): + resolution: {integrity: sha512-sAik3umDeElVxQeRj4GpK21mBSi75TnqaKlP+f2/f5WwKEXXtmrrCs0stYG94JfPEyT9mTD8jHk7CODO1dpWmA==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + typescript: ^4.1 || ^5.0 + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@rollup/plugin-alias': 5.1.0(rollup@3.29.4) + '@rollup/plugin-commonjs': 25.0.7(rollup@3.29.4) + '@rollup/plugin-inject': 5.0.5(rollup@3.29.4) + '@rollup/plugin-json': 6.1.0(rollup@3.29.4) + '@rollup/plugin-node-resolve': 15.2.3(rollup@3.29.4) + '@rollup/plugin-replace': 5.0.5(rollup@3.29.4) + '@rollup/pluginutils': 5.1.0(rollup@3.29.4) + esbuild: 0.18.20 + magic-string: 0.30.6 + rollup: 3.29.4 + typescript: 5.3.3 + dev: true + + /pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + dev: true + + /postcss-selector-parser@6.0.15: + resolution: {integrity: sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==} + engines: {node: '>=4'} + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + dev: true + + /postcss@8.4.33: + resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + dev: true + + /prettier-package-json@2.8.0: + resolution: {integrity: sha512-WxtodH/wWavfw3MR7yK/GrS4pASEQ+iSTkdtSxPJWvqzG55ir5nvbLt9rw5AOiEcqqPCRM92WCtR1rk3TG3JSQ==} + hasBin: true + dependencies: + '@types/parse-author': 2.0.3 + commander: 4.1.1 + cosmiconfig: 7.1.0 + fs-extra: 10.1.0 + glob: 7.2.3 + minimatch: 3.1.2 + parse-author: 2.0.0 + sort-object-keys: 1.1.3 + sort-order: 1.1.2 + dev: true + + /prettier-plugin-astro@0.12.3: + resolution: {integrity: sha512-GthUSu3zCvmtVyqlArosez0xE08vSJ0R1sWurxIWpABaCkNGYFANoUdFkqmIo54EV2uPLGcVJzOucWvCjPBWvg==} + engines: {node: ^14.15.0 || >=16.0.0} + dependencies: + '@astrojs/compiler': 1.8.2 + prettier: 3.2.5 + sass-formatter: 0.7.9 + dev: true + + /prettier-plugin-curly-and-jsdoc@1.2.0(prettier@3.2.5): + resolution: {integrity: sha512-swVClq3BH1jA2BMHCEZXxc4M6aIatE4akRIrSKVBk/nLIQwNizdILizduV5KvR2NcuLE2PPUsAXtTklBjx+WhQ==} + peerDependencies: + prettier: ^3.0.0 + dependencies: + prettier: 3.2.5 + dev: true + + /prettier-plugin-pkgsort@0.2.1(prettier@3.2.5): + resolution: {integrity: sha512-/k5MIw84EhgoH7dmq4+6ozHjJ0VYbxbw17g4C+WPGHODkLivGwJoA6U1YPR/KObyRDMQJHXAfXKu++9smg7Jyw==} + peerDependencies: + prettier: ^3.0.0 + dependencies: + prettier: 3.2.5 + prettier-package-json: 2.8.0 + dev: true + + /prettier@3.2.5: + resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} + engines: {node: '>=14'} + hasBin: true + dev: true + + /pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.2.0 + dev: true + + /proc-log@3.0.0: + resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + + /prompts@2.4.2: + resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} + engines: {node: '>= 6'} + dependencies: + kleur: 3.0.3 + sisteransi: 1.0.5 + dev: true + + /punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + dev: true + + /queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /rc9@2.1.1: + resolution: {integrity: sha512-lNeOl38Ws0eNxpO3+wD1I9rkHGQyj1NU1jlzv4go2CtEnEQEUfqnIvZG7W+bC/aXdJ27n5x/yUjb6RoT9tko+Q==} + dependencies: + defu: 6.1.4 + destr: 2.0.2 + flat: 5.0.2 + dev: true + + /react-is@18.2.0: + resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + dev: true + + /read-package-json-fast@3.0.2: + resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + json-parse-even-better-errors: 3.0.1 + npm-normalize-package-bin: 3.0.1 + dev: true + + /read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + dev: true + + /read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + dependencies: + '@types/normalize-package-data': 2.4.4 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 + dev: true + + /readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + dev: true + + /readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.1 + dev: true + + /refa@0.11.0: + resolution: {integrity: sha512-486O8/pQXwj9jV0mVvUnTsxq0uknpBnNJ0eCUhkZqJRQ8KutrT1PhzmumdCeM1hSBF2eMlFPmwECRER4IbKXlQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dependencies: + '@eslint-community/regexpp': 4.10.0 + dev: true + + /regexp-ast-analysis@0.6.0: + resolution: {integrity: sha512-OLxjyjPkVH+rQlBLb1I/P/VTmamSjGkvN5PTV5BXP432k3uVz727J7H29GA5IFiY0m7e1xBN7049Wn59FY3DEQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dependencies: + '@eslint-community/regexpp': 4.10.0 + refa: 0.11.0 + dev: true + + /regexp-tree@0.1.27: + resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} + hasBin: true + dev: true + + /regexp.prototype.flags@1.5.1: + resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + set-function-name: 2.0.1 + dev: true + + /regjsparser@0.10.0: + resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} + hasBin: true + dependencies: + jsesc: 0.5.0 + dev: true + + /remark-mdx@2.3.0: + resolution: {integrity: sha512-g53hMkpM0I98MU266IzDFMrTD980gNF3BJnkyFcmN+dD873mQeD5rdMO3Y2X+x8umQfbSE0PcoEDl7ledSA+2g==} + dependencies: + mdast-util-mdx: 2.0.1 + micromark-extension-mdxjs: 1.0.1 + transitivePeerDependencies: + - supports-color + dev: true + + /remark-parse@10.0.2: + resolution: {integrity: sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==} + dependencies: + '@types/mdast': 3.0.15 + mdast-util-from-markdown: 1.3.1 + unified: 10.1.2 + transitivePeerDependencies: + - supports-color + dev: true + + /remark-stringify@10.0.3: + resolution: {integrity: sha512-koyOzCMYoUHudypbj4XpnAKFbkddRMYZHwghnxd7ue5210WzGw6kOBwauJTRUMq16jsovXx8dYNvSSWP89kZ3A==} + dependencies: + '@types/mdast': 3.0.15 + mdast-util-to-markdown: 1.5.0 + unified: 10.1.2 + dev: true + + /require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + dev: true + + /require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + dev: true + + /requireindex@1.2.0: + resolution: {integrity: sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==} + engines: {node: '>=0.10.5'} + dev: true + + /resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + dev: true + + /resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true + + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + dependencies: + is-core-module: 2.13.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + + /rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /rollup@3.29.4: + resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /s.color@0.0.15: + resolution: {integrity: sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA==} + dev: true + + /sade@1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + dependencies: + mri: 1.2.0 + dev: true + + /safe-array-concat@1.1.0: + resolution: {integrity: sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==} + engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.5 + get-intrinsic: 1.2.3 + has-symbols: 1.0.3 + isarray: 2.0.5 + dev: true + + /safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + dev: true + + /safe-regex-test@1.0.2: + resolution: {integrity: sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + get-intrinsic: 1.2.3 + is-regex: 1.1.4 + dev: true + + /sass-formatter@0.7.9: + resolution: {integrity: sha512-CWZ8XiSim+fJVG0cFLStwDvft1VI7uvXdCNJYXhDvowiv+DsbD1nXLiQ4zrE5UBvj5DWZJ93cwN0NX5PMsr1Pw==} + dependencies: + suf-log: 2.5.3 + dev: true + + /scslre@0.2.0: + resolution: {integrity: sha512-4hc49fUMmX3jM0XdFUAPBrs1xwEcdHa0KyjEsjFs+Zfc66mpFpq5YmRgDtl+Ffo6AtJIilfei+yKw8fUn3N88w==} + dependencies: + '@eslint-community/regexpp': 4.10.0 + refa: 0.11.0 + regexp-ast-analysis: 0.6.0 + dev: true + + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + dev: true + + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + dev: true + + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + + /set-function-length@1.2.0: + resolution: {integrity: sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.1 + function-bind: 1.1.2 + get-intrinsic: 1.2.3 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + dev: true + + /set-function-name@2.0.1: + resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.1 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.1 + dev: true + + /shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + dependencies: + shebang-regex: 3.0.0 + dev: true + + /shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + dev: true + + /side-channel@1.0.4: + resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + dependencies: + call-bind: 1.0.5 + get-intrinsic: 1.2.3 + object-inspect: 1.13.1 + dev: true + + /siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + dev: true + + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: true + + /sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + dev: true + + /slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + dev: true + + /slash@4.0.0: + resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} + engines: {node: '>=12'} + dev: true + + /sort-object-keys@1.1.3: + resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==} + dev: true + + /sort-order@1.1.2: + resolution: {integrity: sha512-Q8tOrwB1TSv9fNUXym9st3TZJODtmcOIi2JWCkVNQPrRg17KPwlpwweTEb7pMwUIFMTAgx2/JsQQXEPFzYQj3A==} + dev: true + + /source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + + /spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + dependencies: + spdx-expression-parse: 3.0.1 + spdx-license-ids: 3.0.16 + dev: true + + /spdx-exceptions@2.4.0: + resolution: {integrity: sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw==} + dev: true + + /spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + dependencies: + spdx-exceptions: 2.4.0 + spdx-license-ids: 3.0.16 + dev: true + + /spdx-license-ids@3.0.16: + resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==} + dev: true + + /stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + dev: true + + /std-env@3.7.0: + resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} + dev: true + + /string-argv@0.3.2: + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} + dev: true + + /string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + dev: true + + /string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + dev: true + + /string.prototype.trim@1.2.8: + resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + dev: true + + /string.prototype.trimend@1.0.7: + resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + dev: true + + /string.prototype.trimstart@1.0.7: + resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + dev: true + + /string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + dependencies: + safe-buffer: 5.2.1 + dev: true + + /stringify-entities@4.0.3: + resolution: {integrity: sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==} + dependencies: + character-entities-html4: 2.1.0 + character-entities-legacy: 3.0.0 + dev: true + + /strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: true + + /strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + dependencies: + ansi-regex: 6.0.1 + dev: true + + /strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + dev: true + + /strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + dev: true + + /strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + dependencies: + min-indent: 1.0.1 + dev: true + + /strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + dev: true + + /strip-literal@1.3.0: + resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} + dependencies: + acorn: 8.11.3 + dev: true + + /style-to-object@0.3.0: + resolution: {integrity: sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==} + dependencies: + inline-style-parser: 0.1.1 + dev: true + + /suf-log@2.5.3: + resolution: {integrity: sha512-KvC8OPjzdNOe+xQ4XWJV2whQA0aM1kGVczMQ8+dStAO6KfEB140JEVQ9dE76ONZ0/Ylf67ni4tILPJB41U0eow==} + dependencies: + s.color: 0.0.15 + dev: true + + /supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + dependencies: + has-flag: 3.0.0 + dev: true + + /supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /supports-color@9.4.0: + resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} + engines: {node: '>=12'} + dev: true + + /supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + dev: true + + /synckit@0.6.2: + resolution: {integrity: sha512-Vhf+bUa//YSTYKseDiiEuQmhGCoIF3CVBhunm3r/DQnYiGT4JssmnKQc44BIyOZRK2pKjXXAgbhfmbeoC9CJpA==} + engines: {node: '>=12.20'} + dependencies: + tslib: 2.6.2 + dev: true + + /synckit@0.8.8: + resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} + engines: {node: ^14.18.0 || >=16.0.0} + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.6.2 + dev: true + + /synckit@0.9.0: + resolution: {integrity: sha512-7RnqIMq572L8PeEzKeBINYEJDDxpcH8JEgLwUqBd3TkofhFRbkq4QLR0u+36avGAhCRbk2nnmjcW9SE531hPDg==} + engines: {node: ^14.18.0 || >=16.0.0} + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.6.2 + dev: true + + /tapable@2.2.1: + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} + dev: true + + /tar@6.2.0: + resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} + engines: {node: '>=10'} + dependencies: + chownr: 2.0.0 + fs-minipass: 2.1.0 + minipass: 5.0.0 + minizlib: 2.1.2 + mkdirp: 1.0.4 + yallist: 4.0.0 + dev: true + + /text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + dev: true + + /tinybench@2.6.0: + resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==} + dev: true + + /tinypool@0.7.0: + resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} + engines: {node: '>=14.0.0'} + dev: true + + /tinyspy@2.2.0: + resolution: {integrity: sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==} + engines: {node: '>=14.0.0'} + dev: true + + /to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + /to-vfile@7.2.4: + resolution: {integrity: sha512-2eQ+rJ2qGbyw3senPI0qjuM7aut8IYXK6AEoOWb+fJx/mQYzviTckm1wDjq91QYHAPBTYzmdJXxMFA6Mk14mdw==} + dependencies: + is-buffer: 2.0.5 + vfile: 5.3.7 + dev: true + + /toml-eslint-parser@0.6.1: + resolution: {integrity: sha512-7xjjVOdu0c6GpaP2AmA48ZcjesBL7KB2qeMNz93gMG76yV/lHVzQiSlD6HqwAdMJiL9hM44fung0NzhjTfihtw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + eslint-visitor-keys: 3.4.3 + dev: true + + /toml-eslint-parser@0.9.3: + resolution: {integrity: sha512-moYoCvkNUAPCxSW9jmHmRElhm4tVJpHL8ItC/+uYD0EpPSFXbck7yREz9tNdJVTSpHVod8+HoipcpbQ0oE6gsw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + eslint-visitor-keys: 3.4.3 + dev: true + + /trough@2.1.0: + resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} + dev: true + + /ts-api-utils@1.0.3(typescript@5.3.3): + resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} + engines: {node: '>=16.13.0'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.3.3 + dev: true + + /tsconfig-paths@3.15.0: + resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} + dependencies: + '@types/json5': 0.0.29 + json5: 1.0.2 + minimist: 1.2.8 + strip-bom: 3.0.0 + dev: true + + /tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: true + + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: true + + /tsutils-etc@1.4.2(tsutils@3.21.0)(typescript@5.3.3): + resolution: {integrity: sha512-2Dn5SxTDOu6YWDNKcx1xu2YUy6PUeKrWZB/x2cQ8vY2+iz3JRembKn/iZ0JLT1ZudGNwQQvtFX9AwvRHbXuPUg==} + hasBin: true + peerDependencies: + tsutils: ^3.0.0 + typescript: '>=4.0.0' + dependencies: + '@types/yargs': 17.0.32 + tsutils: 3.21.0(typescript@5.3.3) + typescript: 5.3.3 + yargs: 17.7.2 + dev: true + + /tsutils@3.21.0(typescript@5.3.3): + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + typescript: 5.3.3 + dev: true + + /tsx@3.14.0: + resolution: {integrity: sha512-xHtFaKtHxM9LOklMmJdI3BEnQq/D5F73Of2E1GDrITi9sgoVkvIsrQUTY1G8FlmGtA+awCI4EBlTRRYxkL2sRg==} + hasBin: true + dependencies: + esbuild: 0.18.20 + get-tsconfig: 4.7.2 + source-map-support: 0.5.21 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /tunnel-agent@0.6.0: + resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} + dependencies: + safe-buffer: 5.2.1 + dev: true + + /type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + dev: true + + /type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + dev: true + + /type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + dev: true + + /type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + dev: true + + /type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + dev: true + + /typed-array-buffer@1.0.0: + resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + get-intrinsic: 1.2.3 + is-typed-array: 1.1.13 + dev: true + + /typed-array-byte-length@1.0.0: + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.13 + dev: true + + /typed-array-byte-offset@1.0.0: + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.6 + call-bind: 1.0.5 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.13 + dev: true + + /typed-array-length@1.0.4: + resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + dependencies: + call-bind: 1.0.5 + for-each: 0.3.3 + is-typed-array: 1.1.13 + dev: true + + /typedarray@0.0.6: + resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} + dev: true + + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /ufo@1.3.2: + resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==} + dev: true + + /unbox-primitive@1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + dependencies: + call-bind: 1.0.5 + has-bigints: 1.0.2 + has-symbols: 1.0.3 + which-boxed-primitive: 1.0.2 + dev: true + + /unconfig@0.3.11: + resolution: {integrity: sha512-bV/nqePAKv71v3HdVUn6UefbsDKQWRX+bJIkiSm0+twIds6WiD2bJLWWT3i214+J/B4edufZpG2w7Y63Vbwxow==} + dependencies: + '@antfu/utils': 0.7.7 + defu: 6.1.4 + jiti: 1.21.0 + mlly: 1.5.0 + dev: true + + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + dev: true + + /unified-engine@10.1.0: + resolution: {integrity: sha512-5+JDIs4hqKfHnJcVCxTid1yBoI/++FfF/1PFdSMpaftZZZY+qg2JFruRbf7PaIwa9KgLotXQV3gSjtY0IdcFGQ==} + dependencies: + '@types/concat-stream': 2.0.3 + '@types/debug': 4.1.12 + '@types/is-empty': 1.2.3 + '@types/node': 18.19.14 + '@types/unist': 2.0.10 + concat-stream: 2.0.0 + debug: 4.3.4 + fault: 2.0.1 + glob: 8.1.0 + ignore: 5.3.1 + is-buffer: 2.0.5 + is-empty: 1.2.0 + is-plain-obj: 4.1.0 + load-plugin: 5.1.0 + parse-json: 6.0.2 + to-vfile: 7.2.4 + trough: 2.1.0 + unist-util-inspect: 7.0.2 + vfile-message: 3.1.4 + vfile-reporter: 7.0.5 + vfile-statistics: 2.0.1 + yaml: 2.3.4 + transitivePeerDependencies: + - supports-color + dev: true + + /unified@10.1.2: + resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} + dependencies: + '@types/unist': 2.0.10 + bail: 2.0.2 + extend: 3.0.2 + is-buffer: 2.0.5 + is-plain-obj: 4.1.0 + trough: 2.1.0 + vfile: 5.3.7 + dev: true + + /unist-util-inspect@7.0.2: + resolution: {integrity: sha512-Op0XnmHUl6C2zo/yJCwhXQSm/SmW22eDZdWP2qdf4WpGrgO1ZxFodq+5zFyeRGasFjJotAnLgfuD1jkcKqiH1Q==} + dependencies: + '@types/unist': 2.0.10 + dev: true + + /unist-util-is@5.2.1: + resolution: {integrity: sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==} + dependencies: + '@types/unist': 2.0.10 + dev: true + + /unist-util-position-from-estree@1.1.2: + resolution: {integrity: sha512-poZa0eXpS+/XpoQwGwl79UUdea4ol2ZuCYguVaJS4qzIOMDzbqz8a3erUCOmubSZkaOuGamb3tX790iwOIROww==} + dependencies: + '@types/unist': 2.0.10 + dev: true + + /unist-util-remove-position@4.0.2: + resolution: {integrity: sha512-TkBb0HABNmxzAcfLf4qsIbFbaPDvMO6wa3b3j4VcEzFVaw1LBKwnW4/sRJ/atSLSzoIg41JWEdnE7N6DIhGDGQ==} + dependencies: + '@types/unist': 2.0.10 + unist-util-visit: 4.1.2 + dev: true + + /unist-util-stringify-position@2.0.3: + resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} + dependencies: + '@types/unist': 2.0.10 + dev: true + + /unist-util-stringify-position@3.0.3: + resolution: {integrity: sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==} + dependencies: + '@types/unist': 2.0.10 + dev: true + + /unist-util-visit-parents@5.1.3: + resolution: {integrity: sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==} + dependencies: + '@types/unist': 2.0.10 + unist-util-is: 5.2.1 + dev: true + + /unist-util-visit@4.1.2: + resolution: {integrity: sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==} + dependencies: + '@types/unist': 2.0.10 + unist-util-is: 5.2.1 + unist-util-visit-parents: 5.1.3 + dev: true + + /universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + dev: true + + /uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + dependencies: + punycode: 2.3.1 + dev: true + + /util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: true + + /uvu@0.5.6: + resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} + engines: {node: '>=8'} + hasBin: true + dependencies: + dequal: 2.0.3 + diff: 5.1.0 + kleur: 4.1.5 + sade: 1.8.1 + dev: true + + /validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + dependencies: + spdx-correct: 3.2.0 + spdx-expression-parse: 3.0.1 + dev: true + + /vfile-message@3.1.4: + resolution: {integrity: sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==} + dependencies: + '@types/unist': 2.0.10 + unist-util-stringify-position: 3.0.3 + dev: true + + /vfile-reporter@7.0.5: + resolution: {integrity: sha512-NdWWXkv6gcd7AZMvDomlQbK3MqFWL1RlGzMn++/O2TI+68+nqxCPTvLugdOtfSzXmjh+xUyhp07HhlrbJjT+mw==} + dependencies: + '@types/supports-color': 8.1.3 + string-width: 5.1.2 + supports-color: 9.4.0 + unist-util-stringify-position: 3.0.3 + vfile: 5.3.7 + vfile-message: 3.1.4 + vfile-sort: 3.0.1 + vfile-statistics: 2.0.1 + dev: true + + /vfile-sort@3.0.1: + resolution: {integrity: sha512-1os1733XY6y0D5x0ugqSeaVJm9lYgj0j5qdcZQFyxlZOSy1jYarL77lLyb5gK4Wqr1d5OxmuyflSO3zKyFnTFw==} + dependencies: + vfile: 5.3.7 + vfile-message: 3.1.4 + dev: true + + /vfile-statistics@2.0.1: + resolution: {integrity: sha512-W6dkECZmP32EG/l+dp2jCLdYzmnDBIw6jwiLZSER81oR5AHRcVqL+k3Z+pfH1R73le6ayDkJRMk0sutj1bMVeg==} + dependencies: + vfile: 5.3.7 + vfile-message: 3.1.4 + dev: true + + /vfile@5.3.7: + resolution: {integrity: sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==} + dependencies: + '@types/unist': 2.0.10 + is-buffer: 2.0.5 + unist-util-stringify-position: 3.0.3 + vfile-message: 3.1.4 + dev: true + + /vite-node@0.34.6(@types/node@20.11.16): + resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} + engines: {node: '>=v14.18.0'} + hasBin: true + dependencies: + cac: 6.7.14 + debug: 4.3.4 + mlly: 1.5.0 + pathe: 1.1.2 + picocolors: 1.0.0 + vite: 4.5.2(@types/node@20.11.16) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + + /vite@4.5.2(@types/node@20.11.16): + resolution: {integrity: sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 20.11.16 + esbuild: 0.18.20 + postcss: 8.4.33 + rollup: 3.29.4 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /vitest@0.34.6: + resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} + engines: {node: '>=v14.18.0'} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@vitest/browser': '*' + '@vitest/ui': '*' + happy-dom: '*' + jsdom: '*' + playwright: '*' + safaridriver: '*' + webdriverio: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true + dependencies: + '@types/chai': 4.3.11 + '@types/chai-subset': 1.3.5 + '@types/node': 20.11.16 + '@vitest/expect': 0.34.6 + '@vitest/runner': 0.34.6 + '@vitest/snapshot': 0.34.6 + '@vitest/spy': 0.34.6 + '@vitest/utils': 0.34.6 + acorn: 8.11.3 + acorn-walk: 8.3.2 + cac: 6.7.14 + chai: 4.4.1 + debug: 4.3.4 + local-pkg: 0.4.3 + magic-string: 0.30.6 + pathe: 1.1.2 + picocolors: 1.0.0 + std-env: 3.7.0 + strip-literal: 1.3.0 + tinybench: 2.6.0 + tinypool: 0.7.0 + vite: 4.5.2(@types/node@20.11.16) + vite-node: 0.34.6(@types/node@20.11.16) + why-is-node-running: 2.2.2 + transitivePeerDependencies: + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + + /vue-eslint-parser@9.4.2(eslint@8.56.0): + resolution: {integrity: sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + debug: 4.3.4 + eslint: 8.56.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.5.0 + lodash: 4.17.21 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + dev: true + + /walk-up-path@3.0.1: + resolution: {integrity: sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==} + dev: true + + /which-boxed-primitive@1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + dependencies: + is-bigint: 1.0.4 + is-boolean-object: 1.1.2 + is-number-object: 1.0.7 + is-string: 1.0.7 + is-symbol: 1.0.4 + dev: true + + /which-typed-array@1.1.14: + resolution: {integrity: sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.6 + call-bind: 1.0.5 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.2 + dev: true + + /which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /why-is-node-running@2.2.2: + resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + engines: {node: '>=8'} + hasBin: true + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + dev: true + + /wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: true + + /wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + dev: true + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true + + /xml-name-validator@4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + dev: true + + /y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + dev: true + + /yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true + + /yaml-eslint-parser@1.2.2: + resolution: {integrity: sha512-pEwzfsKbTrB8G3xc/sN7aw1v6A6c/pKxLAkjclnAyo5g5qOh6eL9WGu0o3cSDQZKrTNk4KL4lQSwZW+nBkANEg==} + engines: {node: ^14.17.0 || >=16.0.0} + dependencies: + eslint-visitor-keys: 3.4.3 + lodash: 4.17.21 + yaml: 2.3.4 + dev: true + + /yaml@1.10.2: + resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} + engines: {node: '>= 6'} + dev: true + + /yaml@2.3.4: + resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} + engines: {node: '>= 14'} + dev: true + + /yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + dev: true + + /yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + dependencies: + cliui: 8.0.1 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + dev: true + + /yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true + + /yocto-queue@1.0.0: + resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} + engines: {node: '>=12.20'} + dev: true + + /zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + dev: true diff --git a/prettier.config.cjs b/prettier.config.cjs new file mode 100644 index 0000000..ecae84d --- /dev/null +++ b/prettier.config.cjs @@ -0,0 +1 @@ +module.exports = require("@so1ve/prettier-config"); diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..e44ec3d --- /dev/null +++ b/renovate.json @@ -0,0 +1,3 @@ +{ + "extends": ["github>so1ve/renovate-config"] +} diff --git a/src/cache-db.ts b/src/cache-db.ts new file mode 100644 index 0000000..3243f6c --- /dev/null +++ b/src/cache-db.ts @@ -0,0 +1,80 @@ +export class CacheDB { + constructor( + private namespace: string = "CacheDBDefaultNameSpace", + private prefix: string = "CacheDBDefaultPrefix", + ) {} + + private generateUrl(key: string) { + return `https://${this.prefix}/${encodeURIComponent(key)}`; + } + + public async read( + key: string, + config: { type: string } = { + type: "text", + }, + ) { + const cache = await caches.open(this.namespace); + const response = await cache.match(new Request(this.generateUrl(key))); + + if (!response) { + return null; + } + + switch (config.type) { + case "json": { + return response.json(); + } + case "arrayBuffer": { + return response.arrayBuffer(); + } + case "blob": { + return response.blob(); + } + default: { + return response.text(); + } + } + } + + public async write( + key: string, + value: any, + config: { type: string } = { type: "text" }, + ) { + const cache = await caches.open(this.namespace); + + await cache.put( + new Request(this.generateUrl(key)), + new Response(value, { + headers: { + "Content-Type": inferContentType(config.type), + }, + }), + ); + } + + public async delete(key: string): Promise { + const cache = await caches.open(this.namespace); + const response = await cache.delete(new Request(this.generateUrl(key))); + + return response; + } +} + +function inferContentType(type: string) { + switch (type) { + case "json": { + return "application/json"; + } + case "arrayBuffer": { + return "application/octet-stream"; + } + case "blob": { + return "application/octet-stream"; + } + default: { + return "text/plain"; + } + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..05bbf0d --- /dev/null +++ b/src/index.ts @@ -0,0 +1,2 @@ +export const one = 1; +export const two = 2; diff --git a/static/404.html b/static/404.html index 4533096..2a14954 100644 --- a/static/404.html +++ b/static/404.html @@ -1,289 +1,336 @@ + - - - ClientWorker Installation - - - - - - - -
-
-
-
-
- -
-
-
× Error
-
√ Success
-
- - - -
- -
-
- - - - \ No newline at end of file + + ClientWorker Installation + + + + + + + +
+
+
+
+
+ +
+
+
× Error
+
√ Success
+
+ +
+ +
+
+ + + diff --git a/static/autoupdate.js b/static/autoupdate.js index c3810a4..5a73764 100644 --- a/static/autoupdate.js +++ b/static/autoupdate.js @@ -1,53 +1,59 @@ -;(async (updateSWDelay, updateConfigDelay) => { - const LSDB = { - read: (key) => { - return localStorage.getItem(key); - }, - write: (key, value) => { - localStorage.setItem(key, value); - } - } - async function updateSW() { - if (navigator.serviceWorker) { - navigator.serviceWorker.getRegistrations().then(async registrations => { - for (let registration of registrations) { - await registration.unregister(); - } - console.log(`Unregistered service workers`); - }).then(() => { - //register new service worker in /cw.js - navigator.serviceWorker.register('/cw.js').then(async registration => { - console.log(`Registered service worker`); - await registration.update(); - LSDB.write('cw_time_sw', new Date().getTime()); - }) - }) - } - }; - async function updateConfig() { - await fetch('/cw-cgi/api?type=config').then(res => res.text()).then(res => { - if (res === 'ok') { - console.log(`Config updated`); - LSDB.write('cw_time_config', new Date().getTime()); - } else { - console.log(`Config update failed`); - } - }) - } +/* eslint-disable no-console */ +(async (updateSWDelay, updateConfigDelay) => { + const LSDB = { + read: (key) => localStorage.getItem(key), + write: (key, value) => { + localStorage.setItem(key, value); + }, + }; + async function updateSW() { + if (navigator.serviceWorker) { + navigator.serviceWorker + .getRegistrations() + .then(async (registrations) => { + for (const registration of registrations) { + await registration.unregister(); + } + console.log("Unregistered service workers"); + }) + .then(() => { + // register new service worker in /cw.js + navigator.serviceWorker + .register("/cw.js") + .then(async (registration) => { + console.log("Registered service worker"); + await registration.update(); + LSDB.write("cw_time_sw", Date.now()); + }); + }); + } + } + async function updateConfig() { + await fetch("/cw-cgi/api?type=config") + .then((res) => res.text()) + .then((res) => { + if (res === "ok") { + console.log("Config updated"); + LSDB.write("cw_time_config", Date.now()); + } else { + console.log("Config update failed"); + } + }); + } - if (Number(LSDB.read('cw_time_sw')) < new Date().getTime() - updateSWDelay) { - await updateSW(); - await updateConfig(); - } - if (Number(LSDB.read('cw_time_config')) < new Date().getTime() - updateConfigDelay) { - await updateConfig(); - } + if (Number(LSDB.read("cw_time_sw")) < Date.now() - updateSWDelay) { + await updateSW(); + await updateConfig(); + } + if (Number(LSDB.read("cw_time_config")) < Date.now() - updateConfigDelay) { + await updateConfig(); + } - setInterval(async () => { - await updateSW(); - await updateConfig(); - }, updateSWDelay); - setInterval(async () => { - await updateConfig() - }, updateConfigDelay); -})(1000 * 60 * 60 * 12, 1000 * 60); \ No newline at end of file + setInterval(async () => { + await updateSW(); + await updateConfig(); + }, updateSWDelay); + setInterval(async () => { + await updateConfig(); + }, updateConfigDelay); +})(1000 * 60 * 60 * 12, 1000 * 60); diff --git a/static/config.schema.json b/static/config.schema.json index bc9f3c1..e1b359b 100644 --- a/static/config.schema.json +++ b/static/config.schema.json @@ -1,287 +1,242 @@ { - "$schema": "http://json-schema.org/draft-06/schema#", - "$ref": "#/definitions/ClientWorker", - "definitions": { - "ClientWorker": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "hotpatch": { - "type": "array", - "items": { - "type": "string", - "format": "uri", - "qt-uri-protocols": [ - "https" - ], - "qt-uri-extensions": [ - ".js" - ] - } - }, - "hotconfig": { - "type": "array", - "items": { - "type": "string", - "format": "uri", - "qt-uri-protocols": [ - "https" - ], - "qt-uri-extensions": [ - ".yaml" - ] - } - }, - "cleaninterval": { - "type": "string" - }, - "catch_rules": { - "type": "array", - "items": { - "$ref": "#/definitions/CatchRule" - } - } - }, - "required": [ - "catch_rules", - "name" - ], - "title": "Clientworker" - }, - "CatchRule": { - "type": "object", - "additionalProperties": false, - "properties": { - "rule": { - "type": "string" - }, - "transform_rules": { - "type": "array", - "items": { - "$ref": "#/definitions/TransformRule" - } - } - }, - "required": [ - "rule", - "transform_rules" - ], - "title": "CatchRule" - }, - "TransformRule": { - "type": "object", - "additionalProperties": false, - "properties": { - "search": { - "type": "string" - }, - "searchin": { - "type": "string" - }, - "replace": { - "$ref": "#/definitions/Replace" - }, - "action": { - "type": "string", - "enum": [ - "redirect", - "return", - "fetch", - "script" - ] - }, - "redirect": { - "$ref": "#/definitions/Redirect" - }, - "script": { - "$ref": "#/definitions/Script" - }, - "fetch": { - "$ref": "#/definitions/Fetch" - }, - "header": { - "$ref": "#/definitions/Header" - }, - "searchkey": { - "type": "string" - }, - "replacein": { - "type": "string" - }, - "replacekey": { - "type": "string" - }, - "searchflags": { - "type": "string" - }, - "replaceflags": { - "type": "string" - }, - "return": { - "$ref": "#/definitions/Return" - } - }, - "required": [ - "search" - ], - "title": "TransformRule" - }, - "Fetch": { - "type": "object", - "additionalProperties": false, - "properties": { - "status": { - "type": "integer" - }, - "engine": { - "type": "string", - "enum": [ - "fetch", - "Crazy", - "Classic", - "Parallel", - "KFCThursdayVW50" - ] - }, - "preflight": { - "type": "boolean" - }, - "timeout": { - "type": "integer" - }, - "cache": { - "$ref": "#/definitions/Cache" - }, - "threads": { - "type": "integer" - }, - "enable": { - "type": "boolean" - } - }, - "required": [ - "engine", - "preflight" - ], - "title": "Fetch" - }, - "Cache": { - "type": "object", - "additionalProperties": false, - "properties": { - "expire": { - "type": "string" - }, - "delay": { - "type": "integer" - }, - "enable": { - "type": "boolean" - } - }, - "required": [ - "expire" - ], - "title": "Cache" - }, - "Header": { - "type": "object", - "additionalProperties": false, - "properties": { - "content-type": { - "type": "string" - }, - "ServerProvide": { - "type": "string" - } - }, - "required": [ - "ServerProvide", - "content-type" - ], - "title": "Header" - }, - "Redirect": { - "type": "object", - "additionalProperties": false, - "properties": { - "to": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri", - "qt-uri-protocols": [ - "https" - ] - }, - "status": { - "type": "integer" - } - }, - "required": [], - "title": "Redirect" - }, - "Return": { - "type": "object", - "additionalProperties": false, - "properties": { - "body": { - "type": "string" - }, - "header": { - "$ref": "#/definitions/Header" - }, - "status": { - "type": "integer" - } - }, - "required": [ - "body", - "header", - "status" - ], - "title": "Return" - }, - "Script": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "skip": { - "type": "boolean" - }, - "function": { - "type": "string" - } - }, - "required": [ - "skip" - ], - "title": "Script" - }, - "Replace": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uri", - "qt-uri-protocols": [ - "https" - ] - } - }, - { - "type": "string" - } - ], - "title": "Replace" - } - } + "$schema": "http://json-schema.org/draft-06/schema#", + "$ref": "#/definitions/ClientWorker", + "definitions": { + "ClientWorker": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "hotpatch": { + "type": "array", + "items": { + "type": "string", + "format": "uri", + "qt-uri-protocols": ["https"], + "qt-uri-extensions": [".js"] + } + }, + "hotconfig": { + "type": "array", + "items": { + "type": "string", + "format": "uri", + "qt-uri-protocols": ["https"], + "qt-uri-extensions": [".yaml"] + } + }, + "cleaninterval": { + "type": "string" + }, + "catch_rules": { + "type": "array", + "items": { + "$ref": "#/definitions/CatchRule" + } + } + }, + "required": ["catch_rules", "name"], + "title": "Clientworker" + }, + "CatchRule": { + "type": "object", + "additionalProperties": false, + "properties": { + "rule": { + "type": "string" + }, + "transform_rules": { + "type": "array", + "items": { + "$ref": "#/definitions/TransformRule" + } + } + }, + "required": ["rule", "transform_rules"], + "title": "CatchRule" + }, + "TransformRule": { + "type": "object", + "additionalProperties": false, + "properties": { + "search": { + "type": "string" + }, + "searchin": { + "type": "string" + }, + "replace": { + "$ref": "#/definitions/Replace" + }, + "action": { + "type": "string", + "enum": ["redirect", "return", "fetch", "script"] + }, + "redirect": { + "$ref": "#/definitions/Redirect" + }, + "script": { + "$ref": "#/definitions/Script" + }, + "fetch": { + "$ref": "#/definitions/Fetch" + }, + "header": { + "$ref": "#/definitions/Header" + }, + "searchkey": { + "type": "string" + }, + "replacein": { + "type": "string" + }, + "replacekey": { + "type": "string" + }, + "searchflags": { + "type": "string" + }, + "replaceflags": { + "type": "string" + }, + "return": { + "$ref": "#/definitions/Return" + } + }, + "required": ["search"], + "title": "TransformRule" + }, + "Fetch": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "type": "integer" + }, + "engine": { + "type": "string", + "enum": ["fetch", "Crazy", "Classic", "Parallel", "KFCThursdayVW50"] + }, + "preflight": { + "type": "boolean" + }, + "timeout": { + "type": "integer" + }, + "cache": { + "$ref": "#/definitions/Cache" + }, + "threads": { + "type": "integer" + }, + "enable": { + "type": "boolean" + } + }, + "required": ["engine", "preflight"], + "title": "Fetch" + }, + "Cache": { + "type": "object", + "additionalProperties": false, + "properties": { + "expire": { + "type": "string" + }, + "delay": { + "type": "integer" + }, + "enable": { + "type": "boolean" + } + }, + "required": ["expire"], + "title": "Cache" + }, + "Header": { + "type": "object", + "additionalProperties": false, + "properties": { + "content-type": { + "type": "string" + }, + "ServerProvide": { + "type": "string" + } + }, + "required": ["ServerProvide", "content-type"], + "title": "Header" + }, + "Redirect": { + "type": "object", + "additionalProperties": false, + "properties": { + "to": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri", + "qt-uri-protocols": ["https"] + }, + "status": { + "type": "integer" + } + }, + "required": [], + "title": "Redirect" + }, + "Return": { + "type": "object", + "additionalProperties": false, + "properties": { + "body": { + "type": "string" + }, + "header": { + "$ref": "#/definitions/Header" + }, + "status": { + "type": "integer" + } + }, + "required": ["body", "header", "status"], + "title": "Return" + }, + "Script": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "skip": { + "type": "boolean" + }, + "function": { + "type": "string" + } + }, + "required": ["skip"], + "title": "Script" + }, + "Replace": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "format": "uri", + "qt-uri-protocols": ["https"] + } + }, + { + "type": "string" + } + ], + "title": "Replace" + } + } } diff --git a/static/config.yaml b/static/config.yaml index 0b194c4..410f272 100644 --- a/static/config.yaml +++ b/static/config.yaml @@ -1,107 +1,99 @@ name: ClientWorker Docs Config hotpatch: - - https://raw.githubusercontent.com/ChenYFan/ClientWorker/gh-pages/cw.js + - https://raw.githubusercontent.com/ChenYFan/ClientWorker/gh-pages/cw.js hotconfig: - - https://raw.githubusercontent.com/ChenYFan/ClientWorker/gh-pages/config.yaml + - https://raw.githubusercontent.com/ChenYFan/ClientWorker/gh-pages/config.yaml cleaninterval: 1000*20 -catch_rules: - - rule: _ - transform_rules: - - search: \#.* - searchin: url - replace: '' - - search: \?.* - replace: '' - - search: ([^\/.]+)\/index(|\.html)$ - action: redirect - redirect: - to: $1/ - - search: \/google$ - action: redirect - redirect: - url: https://google.com - status: 301 +catch_rules: + - rule: _ + transform_rules: + - search: \#.* + searchin: url + replace: "" + - search: \?.* + replace: "" + - search: ([^\/.]+)\/index(|\.html)$ + action: redirect + redirect: + to: $1/ + - search: \/google$ + action: redirect + redirect: + url: https://google.com + status: 301 - - search: \/time$ - action: script - script: - name: gettime - skip: true - - search: \/timefunction$ - action: script - script: - function: ()=>{return {fetched:true,response:new Response(new Date().toString())}} - skip: true - - - search: \/([^\/.]+)$ - action: redirect - redirect: - to: /$1.html - status: 301 - - - search: ([^\/.]+)\/$ - replace: $1/index.html - - - - - - search: _ - replace: docroot/clientworker@3.0.0-beta-4/doc/docs/.vitepress/dist + - search: \/time$ + action: script + script: + name: gettime + skip: true + - search: \/timefunction$ + action: script + script: + function: ()=>{return {fetched:true,response:new Response(new Date().toString())}} + skip: true + - search: \/([^\/.]+)$ + action: redirect + redirect: + to: /$1.html + status: 301 - - search: ^https\:\/\/docroot - replace: - - https://cdn.jsdelivr.net/npm - - https://cdn1.tianli0.top/npm - - https://jsd.onmicrosoft.cn/npm - - https://unpkg.onmicrosoft.cn - - https://unpkg.com - - https://npm.sourcegcdn.com - action: fetch - fetch: - status: 200 - engine: parallel - preflight: false - timeout: 5000 - cache: - expire: 1000*10 - delay: 3000 - - - search: \.html$ - header: - content-type: text/html;charset=utf-8 - ServerProvide: ClientWorker - - - rule: ^https\:\/\/npmm\/chenyfan\-os\@0\.0\.0\-r24\/(.*)\.jpg$ - transform_rules: - - search: image\/webp - searchin: header - searchkey: Accept - replace: .webp - replacein: url - replacekey: .jpg - - rule: ^https\:\/\/cdn\.jsdelivr\.net\/npm\/chenyfan\-happypic\@0\.0\.33\/1\.jpg$ - transform_rules: - - search: _ - action: fetch - fetch: - status: 200 - engine: crazy - preflight: false - threads: 5 - timeout: 30000 - cache: - enable: true - expire: 1000*60 + - search: ([^\/.]+)\/$ + replace: $1/index.html + - search: _ + replace: docroot/clientworker@3.0.0-beta-4/doc/docs/.vitepress/dist + - search: ^https\:\/\/docroot + replace: + - https://cdn.jsdelivr.net/npm + - https://cdn1.tianli0.top/npm + - https://jsd.onmicrosoft.cn/npm + - https://unpkg.onmicrosoft.cn + - https://unpkg.com + - https://npm.sourcegcdn.com + action: fetch + fetch: + status: 200 + engine: parallel + preflight: false + timeout: 5000 + cache: + expire: 1000*10 + delay: 3000 + - search: \.html$ + header: + content-type: text/html;charset=utf-8 + ServerProvide: ClientWorker + - rule: ^https\:\/\/npmm\/chenyfan\-os\@0\.0\.0\-r24\/(.*)\.jpg$ + transform_rules: + - search: image\/webp + searchin: header + searchkey: Accept + replace: .webp + replacein: url + replacekey: .jpg + - rule: ^https\:\/\/cdn\.jsdelivr\.net\/npm\/chenyfan\-happypic\@0\.0\.33\/1\.jpg$ + transform_rules: + - search: _ + action: fetch + fetch: + status: 200 + engine: crazy + preflight: false + threads: 5 + timeout: 30000 + cache: + enable: true + expire: 1000*60 - - rule: ^https\:\/\/npmm\/ - transform_rules: - - search: _ - replace: + - rule: ^https\:\/\/npmm\/ + transform_rules: + - search: _ + replace: - https://npm.elemecdn.com/ - https://cdn.jsdelivr.net/npm/ - https://unpkg.com/ @@ -109,43 +101,42 @@ catch_rules: - https://jsd.onmicrosoft.cn/npm/ - https://unpkg.onmicrosoft.cn/ - https://npm.sourcegcdn.com/ - - search: _ - action: fetch - fetch: - status: 200 - engine: parallel - preflight: false - timeout: 5000 - cache: - enable: true - expire: 1000*60*60*24*7 - delay: 150 - - - rule: ^https\:\/\/npmm\/jquery\@3\.6\.0\/package\.json$ - transform_rules: - - search: jquery - searchin: body - searchflags: g - replace: fakejquery - replacein: body - replaceflags: g - - - - rule: .* - transform_rules: - - search: .* - action: fetch - fetch: + - search: _ + action: fetch + fetch: + status: 200 + engine: parallel + preflight: false + timeout: 5000 + cache: enable: true - engine: fetch - preflight: false - - - search: (^4|^5) - searchin: status - action: return - return: - body: Error! - header: - content-type: text/plain;charset=utf-8 - ServerProvide: ClientWorker - status: 503 + expire: 1000*60*60*24*7 + delay: 150 + + - rule: ^https\:\/\/npmm\/jquery\@3\.6\.0\/package\.json$ + transform_rules: + - search: jquery + searchin: body + searchflags: g + replace: fakejquery + replacein: body + replaceflags: g + + - rule: .* + transform_rules: + - search: .* + action: fetch + fetch: + enable: true + engine: fetch + preflight: false + + - search: (^4|^5) + searchin: status + action: return + return: + body: Error! + header: + content-type: text/plain;charset=utf-8 + ServerProvide: ClientWorker + status: 503 diff --git a/test/index.test.ts b/test/index.test.ts new file mode 100644 index 0000000..44d9589 --- /dev/null +++ b/test/index.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("should", () => { + it("exported", () => { + expect(1).toBe(1); + }); +}); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..afb913b --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "ES2018", + "lib": ["ESNext", "WebWorker", "WebWorker.ImportScripts"], + "module": "ESNext", + "moduleResolution": "Node", + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "noEmit": true, + "esModuleInterop": true, + "skipDefaultLibCheck": true, + "skipLibCheck": true + } +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..def6022 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,5 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: {}, +}); From b3fa20924cbe2bdc869346a79ab6440d1ddfb85b Mon Sep 17 00:00:00 2001 From: so1ve Date: Sun, 25 Feb 2024 17:18:21 +0800 Subject: [PATCH 02/17] wip --- .prettierignore | 1 - doc/docs/rule/index.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index bd5535a..0000000 --- a/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -pnpm-lock.yaml diff --git a/doc/docs/rule/index.md b/doc/docs/rule/index.md index 15e9f02..c7d9a8a 100644 --- a/doc/docs/rule/index.md +++ b/doc/docs/rule/index.md @@ -59,7 +59,7 @@ catch_rules: transform_rules: - search: #转换规则1 action: #转换操作1 - { { action option } }:#转换操作1的参数 + # {{ action option }}: #转换操作1的参数 - search: #转换规则2 replace: #转换操作 - 重写路由 ``` From 3c3ae57b68689268192622ac86c2cb22bb9608dd Mon Sep 17 00:00:00 2001 From: so1ve Date: Sun, 25 Feb 2024 17:18:46 +0800 Subject: [PATCH 03/17] wip --- doc/docs/rule/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/docs/rule/index.md b/doc/docs/rule/index.md index c7d9a8a..20f2c9d 100644 --- a/doc/docs/rule/index.md +++ b/doc/docs/rule/index.md @@ -36,7 +36,7 @@ catch_rules: ### 语法糖 -#### \_ +#### `_` 在`catch_rule`中 `_` 将会匹配当前网站的主域名(包括端口),例如: @@ -74,7 +74,7 @@ catch_rules: ### 语法糖 -#### \_ +#### `_` 在`transform_rules`中`_`的作用是使用与`catch_rule`相同的规则,而不是匹配当前域名。 From cd8d6af83e190fd7a205cab16138bac702cf05c2 Mon Sep 17 00:00:00 2001 From: so1ve Date: Sun, 25 Feb 2024 17:22:04 +0800 Subject: [PATCH 04/17] update metadata --- LICENSE | 186 +++++++++++++++++++++++++++++++++++++++++++++------ package.json | 20 ++++-- 2 files changed, 178 insertions(+), 28 deletions(-) diff --git a/LICENSE b/LICENSE index 7d9d7b6..0a04128 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,165 @@ -MIT License - -Copyright (c) 2022 Ray - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/package.json b/package.json index 8efe7a1..6c8f00f 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,23 @@ { "name": "pkg-name", - "version": "0.0.0", + "version": "4.0.0", "packageManager": "pnpm@8.15.4", - "author": "Ray (@so1ve)", - "description": "", - "keywords": [], - "homepage": "https://github.com/so1ve/pkg-name#readme", + "author": "ChenYFan", + "contributors": [ + "Ray (@so1ve)" + ], + "description": "A simple, globally hijacked, easily customizable, Service Worker-based front-end worker.", + "keywords": [ + "ClientWorker", + "ServiceWorker" + ], + "homepage": "https://github.com/ChenYFan/ClientWorker#readme", "repository": { "type": "git", - "url": "git+https://github.com/so1ve/pkg-name.git" + "url": "git+https://github.com/ChenYFan/ClientWorker.git" }, "bugs": { - "url": "https://github.com/so1ve/pkg-name/issues" + "url": "https://github.com/ChenYFan/ClientWorker/issues" }, "license": "MIT", "sideEffects": false, From 3cd7d30bac38d2a508e0de94d091e72735dd58f9 Mon Sep 17 00:00:00 2001 From: so1ve Date: Sun, 25 Feb 2024 17:41:56 +0800 Subject: [PATCH 05/17] license --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c8f00f..a553559 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "bugs": { "url": "https://github.com/ChenYFan/ClientWorker/issues" }, - "license": "MIT", + "license": "LGPL-3.0", "sideEffects": false, "exports": { ".": { From c66f8824df0891b574a2846b4f943e027f866338 Mon Sep 17 00:00:00 2001 From: so1ve Date: Sun, 25 Feb 2024 17:42:50 +0800 Subject: [PATCH 06/17] wip --- src/cache-db.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cache-db.ts b/src/cache-db.ts index 3243f6c..27d4227 100644 --- a/src/cache-db.ts +++ b/src/cache-db.ts @@ -67,9 +67,7 @@ function inferContentType(type: string) { case "json": { return "application/json"; } - case "arrayBuffer": { - return "application/octet-stream"; - } + case "arrayBuffer": case "blob": { return "application/octet-stream"; } From 276467a43e4532704ab6d1add9a2eea724d5a552 Mon Sep 17 00:00:00 2001 From: so1ve Date: Mon, 26 Feb 2024 13:09:43 +0800 Subject: [PATCH 07/17] wip --- src/engine.ts | 117 +++++++++++++++++++++++++++++++++++++++++++++++++ src/logger.ts | 16 +++++++ src/rebuild.ts | 66 ++++++++++++++++++++++++++++ src/types.ts | 24 ++++++++++ 4 files changed, 223 insertions(+) create mode 100644 src/engine.ts create mode 100644 src/logger.ts create mode 100644 src/rebuild.ts create mode 100644 src/types.ts diff --git a/src/engine.ts b/src/engine.ts new file mode 100644 index 0000000..ccfa14e --- /dev/null +++ b/src/engine.ts @@ -0,0 +1,117 @@ +import * as logger from "./logger"; +import { rebuildRequest } from "./rebuild"; +import type { FetchEngineFunction } from "./types"; + +const create504Response = (engine: string) => + new Response( + `504 All gateways failed, ClientWorker shows this page. (Engine ${engine})`, + { + status: 504, + statusText: "504 All Gateways Timeout", + }, + ); + +export const engineFetch: FetchEngineFunction = async (request, config) => { + config = { + status: 200, + timeout: 5000, + redirect: "follow", + ...config, + }; + + setTimeout(() => { + // eslint-disable-next-line ts/no-throw-literal + throw create504Response("Fetch"); + }, config.timeout); + + return await fetch(request, { + mode: config.mode, + credentials: config.credentials, + redirect: config.redirect, + }); +}; + +export const engineCrazy: FetchEngineFunction = async (request, config) => { + config = { + threads: 4, + trylimit: 10, + status: 200, + timeout: 5000, + redirect: "follow", + ...config, + }; + + const controller = new AbortController(); + const preFetch = await fetch(request, { + signal: controller.signal, + mode: config.mode, + credentials: config.credentials, + redirect: config.redirect, + }); + const preHeaders = preFetch.headers; + const contentLength = Number.parseInt(preHeaders.get("Content-Length")!); + + if (preFetch.status === config.status) { + return create504Response("Crazy"); + } + + controller.abort(); + + if (!contentLength || contentLength < config.threads!) { + logger.error( + `engineCrazy: The Origin does not support Crazy Mode, or the size of the file is less than ${config.threads} bytes, downgrade to normal fetch.`, + ); + + return engineFetch(request, config); + } + + const chunkSize = contentLength / config.threads!; + const chunks: Promise[] = []; + + for (let i = 0; i < config.threads!; i++) { + chunks.push( + new Promise((resolve, reject) => { + let tryCount = 1; + + async function instance(): Promise { + tryCount += 1; + + const newRequest = rebuildRequest(request, { + headers: { + Range: `bytes=${i * chunkSize}-${(i + 1) * chunkSize - 1}`, + }, + url: request.url, + }); + + return fetch(newRequest, { + mode: config!.mode, + credentials: config!.credentials, + redirect: config!.redirect, + }) + .then((response) => response.arrayBuffer()) + .catch((e) => { + if (tryCount >= config!.trylimit!) { + reject(e); + } + + return instance(); + }); + } + resolve(instance()); + }), + ); + } + + const responses = await Promise.all(chunks); + + setTimeout(() => { + // eslint-disable-next-line ts/no-throw-literal + throw create504Response("Crazy"); + }, config.timeout); + + return new Response(new Blob(responses), { + headers: preHeaders, + status: 200, + statusText: "OK", + }); +}; diff --git a/src/logger.ts b/src/logger.ts new file mode 100644 index 0000000..bc01408 --- /dev/null +++ b/src/logger.ts @@ -0,0 +1,16 @@ +/* eslint-disable no-console */ + +const createLogger = + (prefix: string, color: string, background: string) => (message: string) => { + console.log( + `%c[${prefix}]%c ${message}`, + `color:${color};background:${background};`, + "", + ); + }; + +export const success = createLogger("SUCCESS", "white", "green"); +export const warning = createLogger("WARNING", "brown", "yellow"); +export const info = createLogger("INFO", "white", "blue"); +export const error = createLogger("ERROR", "white", "red"); +export const debug = createLogger("DEBUG", "white", "black"); diff --git a/src/rebuild.ts b/src/rebuild.ts new file mode 100644 index 0000000..910181a --- /dev/null +++ b/src/rebuild.ts @@ -0,0 +1,66 @@ +import * as logger from "./logger"; +import type { CwRequestInit, CwResponseInit } from "./types"; + +export function rebuildRequest(request: Request, init: CwRequestInit) { + request = request.clone(); + + if (request.mode === "navigate") { + logger.warning( + `You can't rebuild a POST method with body when it is a navigate request.ClientWorker will ignore it's body`, + ); + } + + let newRequest = new Request(request, { + headers: rebuildheaders(request, init.headers), + method: init.method ?? request.method, + mode: + request.mode === "navigate" ? "same-origin" : init.mode ?? request.mode, + credentials: init.credentials ?? request.credentials, + redirect: init.redirect ?? request.redirect, + }); + + if (init.url) { + newRequest = new Request(init.url, newRequest); + } + + return newRequest; +} + +export function rebuildResponse(response: Response, init: CwResponseInit) { + if (response.type === "opaque") { + logger.error( + `You can't rebuild a opaque response.ClientWorker will ignore this build`, + ); + + return response; + } + + const newResponse = new Response(response.body, { + headers: rebuildheaders(response, init.headers), + status: init.status ?? response.status, + statusText: init.statusText ?? response.statusText, + }); + + return newResponse; +} + +function rebuildheaders( + requestOrResponse: Request | Response, + headers?: Record, +) { + if (!headers) { + return new Headers(requestOrResponse.headers); + } + + const newHeaders = new Headers(requestOrResponse.headers); + + for (const key in headers) { + if (key in headers) { + newHeaders.set(key, headers[key]); + } else { + newHeaders.delete(key); + } + } + + return newHeaders; +} diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..5cb4339 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,24 @@ +export type CwRequestInit = RequestInit & { + url?: string; + headers?: Record; +}; +export type CwResponseInit = ResponseInit & { + url?: string; + headers?: Record; +}; + +export interface FetchEngineConfig { + mode?: RequestMode; + credentials?: RequestCredentials; + timeout?: number; + redirect?: RequestRedirect; + threads?: number; + trylimit?: number; + status?: number; + signal?: AbortSignal; +} + +export type FetchEngineFunction = ( + request: Request, + config?: FetchEngineConfig, +) => Promise; From 889e281d637c8708bb010f3986018a732417d09e Mon Sep 17 00:00:00 2001 From: so1ve Date: Mon, 26 Feb 2024 16:31:16 +0800 Subject: [PATCH 08/17] await --- package.json | 1 + pnpm-lock.yaml | 13 +++ src/cgi.ts | 21 ++++ src/constants.ts | 1 + src/engine.ts | 254 +++++++++++++++++++++++++++++++++++++++++++++-- src/rebuild.ts | 2 +- src/types.ts | 5 + 7 files changed, 286 insertions(+), 11 deletions(-) create mode 100644 src/cgi.ts create mode 100644 src/constants.ts diff --git a/package.json b/package.json index a553559..3f22274 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "eslint": "^8.51.0", "pkgroll": "^2.0.1", "prettier": "^3.0.3", + "tiny-request-router": "^1.2.2", "tsx": "^3.13.0", "typescript": "^5.2.2", "vite": "^4.4.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9844e26..38e0432 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,6 +29,9 @@ devDependencies: prettier: specifier: ^3.0.3 version: 3.2.5 + tiny-request-router: + specifier: ^1.2.2 + version: 1.2.2 tsx: specifier: ^3.13.0 version: 3.14.0 @@ -4201,6 +4204,10 @@ packages: minipass: 7.0.4 dev: true + /path-to-regexp@6.2.1: + resolution: {integrity: sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==} + dev: true + /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -4907,6 +4914,12 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /tiny-request-router@1.2.2: + resolution: {integrity: sha512-6ZMFU7AP9so+hkqmMM9fJ11V44EAcYuHCmNdsyM8k94oVnNDPQwUAAPoBHqchHSpKG6yZbCasgVeRxaY5v2BCg==} + dependencies: + path-to-regexp: 6.2.1 + dev: true + /tinybench@2.6.0: resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==} dev: true diff --git a/src/cgi.ts b/src/cgi.ts new file mode 100644 index 0000000..341898d --- /dev/null +++ b/src/cgi.ts @@ -0,0 +1,21 @@ +import type { Method, Params } from "tiny-request-router"; +import { Router } from "tiny-request-router"; + +import { CacheDB } from "./cache-db"; +import { CW_CGI_PREFIX } from "./constants"; + +const router = new Router<(params: Params) => Promise>(); + +export async function handleRoutes(request: Request): Promise { + const db = new CacheDB(); + const url = new URL(request.url.slice(CW_CGI_PREFIX.length)); + const match = router.match(request.method as Method, url.pathname); + + if (match) { + const response = await match.handler(Object.fromEntries(url.searchParams)); + + return response; + } else { + return new Response("Not Found!, Client Worker!"); + } +} diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 0000000..98c750f --- /dev/null +++ b/src/constants.ts @@ -0,0 +1 @@ +export const CW_CGI_PREFIX = "/cw-cgi"; diff --git a/src/engine.ts b/src/engine.ts index ccfa14e..1778b3e 100644 --- a/src/engine.ts +++ b/src/engine.ts @@ -1,6 +1,11 @@ +/* eslint-disable ts/no-throw-literal */ import * as logger from "./logger"; -import { rebuildRequest } from "./rebuild"; -import type { FetchEngineFunction } from "./types"; +import { rebuildRequest, rebuildResponse } from "./rebuild"; +import type { + FetchEngineConfig, + FetchEngineFunction, + ListFetchEngineFunction, +} from "./types"; const create504Response = (engine: string) => new Response( @@ -11,6 +16,14 @@ const create504Response = (engine: string) => }, ); +const DEFAULT_CONFIG = Object.freeze({ + threads: 4, + trylimit: 10, + status: 200, + timeout: 5000, + redirect: "follow", +} satisfies FetchEngineConfig); + export const engineFetch: FetchEngineFunction = async (request, config) => { config = { status: 200, @@ -20,7 +33,6 @@ export const engineFetch: FetchEngineFunction = async (request, config) => { }; setTimeout(() => { - // eslint-disable-next-line ts/no-throw-literal throw create504Response("Fetch"); }, config.timeout); @@ -33,11 +45,7 @@ export const engineFetch: FetchEngineFunction = async (request, config) => { export const engineCrazy: FetchEngineFunction = async (request, config) => { config = { - threads: 4, - trylimit: 10, - status: 200, - timeout: 5000, - redirect: "follow", + ...DEFAULT_CONFIG, ...config, }; @@ -59,7 +67,7 @@ export const engineCrazy: FetchEngineFunction = async (request, config) => { if (!contentLength || contentLength < config.threads!) { logger.error( - `engineCrazy: The Origin does not support Crazy Mode, or the size of the file is less than ${config.threads} bytes, downgrade to normal fetch.`, + `Engine Crazy: The Origin does not support Crazy Mode, or the size of the file is less than ${config.threads} bytes, downgrade to normal fetch.`, ); return engineFetch(request, config); @@ -105,7 +113,6 @@ export const engineCrazy: FetchEngineFunction = async (request, config) => { const responses = await Promise.all(chunks); setTimeout(() => { - // eslint-disable-next-line ts/no-throw-literal throw create504Response("Crazy"); }, config.timeout); @@ -115,3 +122,230 @@ export const engineCrazy: FetchEngineFunction = async (request, config) => { statusText: "OK", }); }; + +export const engineClassic: ListFetchEngineFunction = async ( + requests, + config, +) => { + config = { + ...DEFAULT_CONFIG, + ...config, + }; + + if (requests.length === 0) { + throw new Error("Engine Classic: No request to fetch."); + } else if (requests.length === 1) { + logger.warning( + "Engine Classic: only one request, this request will downgrade to normal fetch.", + ); + + return engineFetch(requests[0], config); + } + + const controller = new AbortController(); + + setTimeout(() => { + throw create504Response("Classic"); + }, config.timeout); + + const fetchRequests = requests.map(async (req) => { + try { + const response = await fetch(req, { + signal: controller.signal, + mode: config!.mode, + credentials: config!.credentials, + redirect: config!.redirect, + }); + + const responseData = await response.arrayBuffer(); + + const modifiedResponse = new Response(responseData, { + status: response.status, + headers: response.headers, + statusText: response.statusText, + }); + + if (modifiedResponse.status === config!.status) { + controller.abort(); + + return modifiedResponse; + } + } catch (err) { + if (err === "DOMException: The user aborted a request.") { + // eslint-disable-next-line no-console + console.log(); // To disable the warning:DOMException: The user aborted a request. + } + } + }); + + return (await Promise.any(fetchRequests))!; +}; + +export const engineParallel: ListFetchEngineFunction = async ( + requests, + config, +) => { + config = { + ...DEFAULT_CONFIG, + ...config, + }; + + if (requests.length === 0) { + throw new Error("Engine Parallel: No request to fetch."); + } else if (requests.length === 1) { + logger.warning( + "Engine Parallel: only one request, this request will downgrade to normal fetch.", + ); + + return engineFetch(requests[0], config); + } + + const abortEvent = new Event("abortOtherInstance"); + const eventTarget = new EventTarget(); + + const fetchRequests = requests.map(async (req) => { + const controller = new AbortController(); + let tagged = false; + + eventTarget.addEventListener(abortEvent.type, () => { + if (!tagged) { + controller.abort(); + } + }); + + try { + const res = await fetch(req, { + signal: controller.signal, + mode: config!.mode, + credentials: config!.credentials, + redirect: config!.redirect, + }); + + if (config!.status && res.status === config!.status) { + tagged = true; + eventTarget.dispatchEvent(abortEvent); + + return rebuildResponse(res); + } + } catch (err) { + if (err === "DOMException: The user aborted a request.") { + // eslint-disable-next-line no-console + console.log(); // To disable the warning:DOMException: The user aborted a request. + } + } + }); + + setTimeout(() => { + throw create504Response("Parallel"); + }, config.timeout); + + return (await Promise.any(fetchRequests))!; +}; + +export const engineKFCThursdayVW50: ListFetchEngineFunction = async ( + requests, + config, +) => { + config = { + ...DEFAULT_CONFIG, + timeout: 30_000, + ...config, + }; + + if (requests.length === 0) { + throw new Error("Engine KFCThursdayVW50: No request to fetch."); + } else if (requests.length === 1) { + logger.warning( + "Engine KFCThursdayVW50: only one request, this request will downgrade to engine crazy.", + ); + + return engineCrazy(requests[0], config); + } + + const controller = new AbortController(); + const preFetch = await engineParallel(requests, { + signal: controller.signal, + mode: config.mode, + credentials: config.credentials, + redirect: config.redirect, + timeout: config.timeout, + }); + const preHeaders = preFetch.headers; + const contentLength = Number.parseInt(preHeaders.get("Content-Length")!); + + if (preFetch.status === config.status) { + throw create504Response("KFCThursdayVW50"); + } + + controller.abort(); + + if (!contentLength || contentLength < config.threads!) { + logger.warning( + `Engine KFCThursdayVW50: The Origin does not support KFCThursdayVW50 Mode, or the size of the file is less than ${config.threads} bytes, downgrade to parallel.`, + ); + + return engineParallel(requests, config); + } + + const chunkSize = contentLength / config.threads!; + const chunks: Promise[] = []; + + for (let i = 0; i < config.threads!; i++) { + chunks.push( + new Promise((resolve, reject) => { + let trycount = 1; + + async function instance(): Promise { + trycount += 1; + + const newRequests = []; + + for (const request of requests) { + newRequests.push( + rebuildRequest(request, { + headers: { + Range: `bytes=${i * chunkSize}-${(i + 1) * chunkSize - 1}`, + }, + url: request.url, + }), + ); + } + + return engineParallel(newRequests, { + mode: config!.mode, + credentials: config!.credentials, + redirect: config!.redirect, + timeout: config!.timeout, + status: 206, + }) + .then((response) => response.arrayBuffer()) + .catch(async (err) => { + logger.error(`Engine KFCThursdayVW50: ${await err.text()}`); + if (trycount >= config!.trylimit!) { + reject(err); + } + + return instance(); + }); + } + resolve(instance()); + }), + ); + } + + setTimeout(() => { + throw create504Response("KFCThursdayVW50"); + }, config.timeout); + + try { + const responses = await Promise.all(chunks); + + return new Response(new Blob(responses), { + headers: preHeaders, + status: 200, + statusText: "OK", + }); + } catch { + throw create504Response("KFCThursdayVW50"); + } +}; diff --git a/src/rebuild.ts b/src/rebuild.ts index 910181a..8a4210b 100644 --- a/src/rebuild.ts +++ b/src/rebuild.ts @@ -26,7 +26,7 @@ export function rebuildRequest(request: Request, init: CwRequestInit) { return newRequest; } -export function rebuildResponse(response: Response, init: CwResponseInit) { +export function rebuildResponse(response: Response, init: CwResponseInit = {}) { if (response.type === "opaque") { logger.error( `You can't rebuild a opaque response.ClientWorker will ignore this build`, diff --git a/src/types.ts b/src/types.ts index 5cb4339..bde26b2 100644 --- a/src/types.ts +++ b/src/types.ts @@ -22,3 +22,8 @@ export type FetchEngineFunction = ( request: Request, config?: FetchEngineConfig, ) => Promise; + +export type ListFetchEngineFunction = ( + request: Request[], + config?: FetchEngineConfig, +) => Promise; From b2d77eef8d31b3c4af42e3b40e203c870de4c49e Mon Sep 17 00:00:00 2001 From: so1ve Date: Mon, 26 Feb 2024 16:31:31 +0800 Subject: [PATCH 09/17] update --- src/{cgi.ts => routes.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{cgi.ts => routes.ts} (100%) diff --git a/src/cgi.ts b/src/routes.ts similarity index 100% rename from src/cgi.ts rename to src/routes.ts From 6c8d183fb7275ccd22a96d7f3a15776220e3097b Mon Sep 17 00:00:00 2001 From: so1ve Date: Mon, 26 Feb 2024 17:02:30 +0800 Subject: [PATCH 10/17] wip --- src/routes.ts | 68 ++++++++++++++++++++++++++++++++++++++++++--------- src/types.ts | 2 ++ 2 files changed, 59 insertions(+), 11 deletions(-) diff --git a/src/routes.ts b/src/routes.ts index 341898d..7c02ae7 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -1,21 +1,67 @@ import type { Method, Params } from "tiny-request-router"; import { Router } from "tiny-request-router"; +import { version } from "../package.json"; import { CacheDB } from "./cache-db"; import { CW_CGI_PREFIX } from "./constants"; +import type { ConfigLoader } from "./types"; -const router = new Router<(params: Params) => Promise>(); - -export async function handleRoutes(request: Request): Promise { +function createRouter(loadConfig: ConfigLoader) { + const router = new Router< + (params: Params, queries: Params) => Promise | Response + >(); const db = new CacheDB(); - const url = new URL(request.url.slice(CW_CGI_PREFIX.length)); - const match = router.match(request.method as Method, url.pathname); - if (match) { - const response = await match.handler(Object.fromEntries(url.searchParams)); + router.get("/hello", () => new Response("Hello ClientWorker!")); + router.get( + "/info", + () => + new Response( + JSON.stringify({ + version, + }), + { + headers: { + "Content-Type": "application/json", + }, + }, + ), + ); + router.get("/page/:name", () => new Response("Error, page type not found")); + router.get("/page/install", () => fetch("/404")); + router.get("/api/config", async (_params, queries) => { + const source = await fetch(queries.url || "/config.yaml") + .then((res) => res.text()) + .then((text) => loadConfig(text)) + .then(async (config) => { + await db.write("config", JSON.stringify(config), { type: "json" }); + + return new Response("ok"); + }) + .catch(async (err) => { + await db.write("config", ""); + + return new Response(err); + }); + }); - return response; - } else { - return new Response("Not Found!, Client Worker!"); - } + return router; } + +export const createRouteHandler = (loadConfig: ConfigLoader) => + async function handleRoutes(request: Request): Promise { + const router = createRouter(loadConfig); + const url = new URL(request.url.slice(CW_CGI_PREFIX.length)); + const match = router.match(request.method as Method, url.pathname); + + if (match) { + const response = await match.handler( + match.params, + Object.fromEntries(url.searchParams.entries()), + ); + + return response; + } else { + return new Response("Not Found!, Client Worker!"); + } + }; diff --git a/src/types.ts b/src/types.ts index bde26b2..103e59b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -27,3 +27,5 @@ export type ListFetchEngineFunction = ( request: Request[], config?: FetchEngineConfig, ) => Promise; + +export type ConfigLoader = (source: string) => any; From 4fc2c10427e2008df40d2d3d42eebffe0f6054b8 Mon Sep 17 00:00:00 2001 From: so1ve Date: Tue, 27 Feb 2024 13:50:51 +0800 Subject: [PATCH 11/17] wip --- package.json | 27 +- pnpm-lock.yaml | 1180 ++++++++++++++++++++++++++++++++++++---------- src/cache-db.ts | 59 ++- src/index.ts | 68 ++- src/routes.ts | 77 +-- src/virtual.d.ts | 4 + tsconfig.json | 7 +- tsup.config.ts | 80 ++++ 8 files changed, 1204 insertions(+), 298 deletions(-) create mode 100644 src/virtual.d.ts create mode 100644 tsup.config.ts diff --git a/package.json b/package.json index 3f22274..9659db7 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { - "name": "pkg-name", + "name": "clientworker", "version": "4.0.0", "packageManager": "pnpm@8.15.4", "author": "ChenYFan", "contributors": [ "Ray (@so1ve)" ], + "type": "module", "description": "A simple, globally hijacked, easily customizable, Service Worker-based front-end worker.", "keywords": [ "ClientWorker", @@ -24,12 +25,14 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "require": "./dist/index.cjs", - "import": "./dist/index.mjs" + "import": "./dist/index.js" + }, + "./with-yaml": { + "types": "./dist/with-yaml.d.ts", + "import": "./dist/with-yaml.js" } }, - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", + "main": "./dist/index.js", "types": "./dist/index.d.ts", "typesVersions": { "*": { @@ -46,7 +49,8 @@ "access": "public" }, "scripts": { - "build": "pkgroll", + "build": "rimraf dist && tsup && nr build:minify", + "build:minify": "tsup --minify", "lint": "eslint . && prettier . --check", "lint:fix": "eslint . --fix && prettier . --write", "prepublishOnly": "nr build", @@ -54,19 +58,22 @@ "start": "tsx src/index.ts", "test": "vitest", "typecheck": "tsc --noEmit", - "watch": "pkgroll --watch" + "watch": "nr build --watch" }, "devDependencies": { "@antfu/ni": "^0.21.8", - "@so1ve/eslint-config": "^1.1.1", - "@so1ve/prettier-config": "^1.1.1", + "@so1ve/eslint-config": "^1.4.0", + "@so1ve/prettier-config": "^1.4.0", "@types/node": "^20.8.3", "bumpp": "^9.2.0", "eslint": "^8.51.0", - "pkgroll": "^2.0.1", + "js-yaml": "^4.1.0", "prettier": "^3.0.3", + "rimraf": "^5.0.5", "tiny-request-router": "^1.2.2", + "tsup": "^8.0.2", "tsx": "^3.13.0", + "type-fest": "^4.10.3", "typescript": "^5.2.2", "vite": "^4.4.11", "vitest": "^0.34.6" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 38e0432..6b2f913 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,11 @@ devDependencies: specifier: ^0.21.8 version: 0.21.12 '@so1ve/eslint-config': - specifier: ^1.1.1 - version: 1.2.0(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6) + specifier: ^1.4.0 + version: 1.4.0(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6) '@so1ve/prettier-config': - specifier: ^1.1.1 - version: 1.2.0(prettier@3.2.5) + specifier: ^1.4.0 + version: 1.4.0(prettier@3.2.5) '@types/node': specifier: ^20.8.3 version: 20.11.16 @@ -23,18 +23,27 @@ devDependencies: eslint: specifier: ^8.51.0 version: 8.56.0 - pkgroll: - specifier: ^2.0.1 - version: 2.0.1(typescript@5.3.3) + js-yaml: + specifier: ^4.1.0 + version: 4.1.0 prettier: specifier: ^3.0.3 version: 3.2.5 + rimraf: + specifier: ^5.0.5 + version: 5.0.5 tiny-request-router: specifier: ^1.2.2 version: 1.2.2 + tsup: + specifier: ^8.0.2 + version: 8.0.2(typescript@5.3.3) tsx: specifier: ^3.13.0 version: 3.14.0 + type-fest: + specifier: ^4.10.3 + version: 4.10.3 typescript: specifier: ^5.2.2 version: 5.3.3 @@ -87,6 +96,15 @@ packages: js-tokens: 4.0.0 dev: true + /@esbuild/aix-ppc64@0.19.12: + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm64@0.18.20: resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} @@ -96,6 +114,15 @@ packages: dev: true optional: true + /@esbuild/android-arm64@0.19.12: + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm@0.18.20: resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} engines: {node: '>=12'} @@ -105,6 +132,15 @@ packages: dev: true optional: true + /@esbuild/android-arm@0.19.12: + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-x64@0.18.20: resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} engines: {node: '>=12'} @@ -114,6 +150,15 @@ packages: dev: true optional: true + /@esbuild/android-x64@0.19.12: + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-arm64@0.18.20: resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} engines: {node: '>=12'} @@ -123,6 +168,15 @@ packages: dev: true optional: true + /@esbuild/darwin-arm64@0.19.12: + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-x64@0.18.20: resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} engines: {node: '>=12'} @@ -132,6 +186,15 @@ packages: dev: true optional: true + /@esbuild/darwin-x64@0.19.12: + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-arm64@0.18.20: resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} engines: {node: '>=12'} @@ -141,6 +204,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-arm64@0.19.12: + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-x64@0.18.20: resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} engines: {node: '>=12'} @@ -150,6 +222,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-x64@0.19.12: + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm64@0.18.20: resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} engines: {node: '>=12'} @@ -159,6 +240,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm64@0.19.12: + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm@0.18.20: resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} engines: {node: '>=12'} @@ -168,6 +258,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm@0.19.12: + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ia32@0.18.20: resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} engines: {node: '>=12'} @@ -177,6 +276,15 @@ packages: dev: true optional: true + /@esbuild/linux-ia32@0.19.12: + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-loong64@0.18.20: resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} engines: {node: '>=12'} @@ -186,6 +294,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64@0.19.12: + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-mips64el@0.18.20: resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} engines: {node: '>=12'} @@ -195,6 +312,15 @@ packages: dev: true optional: true + /@esbuild/linux-mips64el@0.19.12: + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ppc64@0.18.20: resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} engines: {node: '>=12'} @@ -204,6 +330,15 @@ packages: dev: true optional: true + /@esbuild/linux-ppc64@0.19.12: + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-riscv64@0.18.20: resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} engines: {node: '>=12'} @@ -213,6 +348,15 @@ packages: dev: true optional: true + /@esbuild/linux-riscv64@0.19.12: + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-s390x@0.18.20: resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} engines: {node: '>=12'} @@ -222,6 +366,15 @@ packages: dev: true optional: true + /@esbuild/linux-s390x@0.19.12: + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-x64@0.18.20: resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} engines: {node: '>=12'} @@ -231,6 +384,15 @@ packages: dev: true optional: true + /@esbuild/linux-x64@0.19.12: + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/netbsd-x64@0.18.20: resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} engines: {node: '>=12'} @@ -240,6 +402,15 @@ packages: dev: true optional: true + /@esbuild/netbsd-x64@0.19.12: + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openbsd-x64@0.18.20: resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} engines: {node: '>=12'} @@ -249,6 +420,15 @@ packages: dev: true optional: true + /@esbuild/openbsd-x64@0.19.12: + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/sunos-x64@0.18.20: resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} engines: {node: '>=12'} @@ -258,6 +438,15 @@ packages: dev: true optional: true + /@esbuild/sunos-x64@0.19.12: + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-arm64@0.18.20: resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} engines: {node: '>=12'} @@ -267,6 +456,15 @@ packages: dev: true optional: true + /@esbuild/win32-arm64@0.19.12: + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-ia32@0.18.20: resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} engines: {node: '>=12'} @@ -276,6 +474,15 @@ packages: dev: true optional: true + /@esbuild/win32-ia32@0.19.12: + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-x64@0.18.20: resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} engines: {node: '>=12'} @@ -285,6 +492,15 @@ packages: dev: true optional: true + /@esbuild/win32-x64@0.19.12: + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint-community/eslint-plugin-eslint-comments@4.1.0(eslint@8.56.0): resolution: {integrity: sha512-B2mwipifrBS5E00vN8vME68laPMZ0h3sNGOEDj5g9iUN9k5EU99Omq0Nc325eKNoFFDnDtiHp3DqIjO+1bstag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -384,10 +600,36 @@ packages: '@sinclair/typebox': 0.27.8 dev: true + /@jridgewell/gen-mapping@0.3.4: + resolution: {integrity: sha512-Oud2QPM5dHviZNn4y/WhhYKSXksv+1xLEIsNrAbGcFzUN3ubqWRFT5gwPchNc5NuzILOU4tPBDTZ4VwhL8Y7cw==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.2 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.23 + dev: true + + /@jridgewell/resolve-uri@3.1.2: + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/set-array@1.1.2: + resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} + engines: {node: '>=6.0.0'} + dev: true + /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true + /@jridgewell/trace-mapping@0.3.23: + resolution: {integrity: sha512-9/4foRoUKp8s96tSkh8DlAAc5A0Ty8vLXld+l9gjKKY6ckwI8G15f0hskGmuLZu78ZlGa1vtsfOa+lnB4vG6Jg==} + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /@jsdevtools/ez-spawn@3.0.4: resolution: {integrity: sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==} engines: {node: '>=10'} @@ -469,118 +711,116 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dev: true - /@rollup/plugin-alias@5.1.0(rollup@3.29.4): - resolution: {integrity: sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - rollup: 3.29.4 - slash: 4.0.0 + /@rollup/rollup-android-arm-eabi@4.12.0: + resolution: {integrity: sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==} + cpu: [arm] + os: [android] + requiresBuild: true dev: true + optional: true - /@rollup/plugin-commonjs@25.0.7(rollup@3.29.4): - resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.68.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.1.0(rollup@3.29.4) - commondir: 1.0.1 - estree-walker: 2.0.2 - glob: 8.1.0 - is-reference: 1.2.1 - magic-string: 0.30.6 - rollup: 3.29.4 + /@rollup/rollup-android-arm64@4.12.0: + resolution: {integrity: sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ==} + cpu: [arm64] + os: [android] + requiresBuild: true dev: true + optional: true - /@rollup/plugin-inject@5.0.5(rollup@3.29.4): - resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.1.0(rollup@3.29.4) - estree-walker: 2.0.2 - magic-string: 0.30.6 - rollup: 3.29.4 + /@rollup/rollup-darwin-arm64@4.12.0: + resolution: {integrity: sha512-X64tZd8dRE/QTrBIEs63kaOBG0b5GVEd3ccoLtyf6IdXtHdh8h+I56C2yC3PtC9Ucnv0CpNFJLqKFVgCYe0lOQ==} + cpu: [arm64] + os: [darwin] + requiresBuild: true dev: true + optional: true - /@rollup/plugin-json@6.1.0(rollup@3.29.4): - resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.1.0(rollup@3.29.4) - rollup: 3.29.4 + /@rollup/rollup-darwin-x64@4.12.0: + resolution: {integrity: sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg==} + cpu: [x64] + os: [darwin] + requiresBuild: true dev: true + optional: true - /@rollup/plugin-node-resolve@15.2.3(rollup@3.29.4): - resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.78.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.1.0(rollup@3.29.4) - '@types/resolve': 1.20.2 - deepmerge: 4.3.1 - is-builtin-module: 3.2.1 - is-module: 1.0.0 - resolve: 1.22.8 - rollup: 3.29.4 + /@rollup/rollup-linux-arm-gnueabihf@4.12.0: + resolution: {integrity: sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA==} + cpu: [arm] + os: [linux] + requiresBuild: true dev: true + optional: true - /@rollup/plugin-replace@5.0.5(rollup@3.29.4): - resolution: {integrity: sha512-rYO4fOi8lMaTg/z5Jb+hKnrHHVn8j2lwkqwyS4kTRhKyWOLf2wST2sWXr4WzWiTcoHTp2sTjqUbqIj2E39slKQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.1.0(rollup@3.29.4) - magic-string: 0.30.6 - rollup: 3.29.4 + /@rollup/rollup-linux-arm64-gnu@4.12.0: + resolution: {integrity: sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA==} + cpu: [arm64] + os: [linux] + requiresBuild: true dev: true + optional: true - /@rollup/pluginutils@5.1.0(rollup@3.29.4): - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': 1.0.5 - estree-walker: 2.0.2 - picomatch: 2.3.1 - rollup: 3.29.4 + /@rollup/rollup-linux-arm64-musl@4.12.0: + resolution: {integrity: sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-riscv64-gnu@4.12.0: + resolution: {integrity: sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw==} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.12.0: + resolution: {integrity: sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-musl@4.12.0: + resolution: {integrity: sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.12.0: + resolution: {integrity: sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.12.0: + resolution: {integrity: sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-x64-msvc@4.12.0: + resolution: {integrity: sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==} + cpu: [x64] + os: [win32] + requiresBuild: true dev: true + optional: true /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@so1ve/eslint-config@1.2.0(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6): - resolution: {integrity: sha512-s05qaA/O1I38Px+FK1vkAavtGh7EHl4LPvZef/jSsdR7/p3KFGO3fYsxONzRFwPeWrsXtIvVKqP+Xd9eOfrPBA==} + /@so1ve/eslint-config@1.4.0(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6): + resolution: {integrity: sha512-HoN0X33i+6pKKo/ATj+WM0jhdqXNFTxfDCALQxvnfV30zEiSln3w8P+C07g/EwZP76I50JY9L0mxDf11lHglsA==} peerDependencies: eslint: '>=8.40.0' prettier: ^3.0.0 @@ -588,28 +828,27 @@ packages: '@eslint-community/eslint-plugin-eslint-comments': 4.1.0(eslint@8.56.0) '@html-eslint/eslint-plugin': 0.19.1 '@html-eslint/parser': 0.19.1 - '@so1ve/eslint-plugin': 1.2.0(eslint@8.56.0)(typescript@5.3.3) - '@so1ve/eslint-plugin-sort-imports': 1.2.0(eslint@8.56.0) - '@typescript-eslint/eslint-plugin': 6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@5.3.3) - '@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@so1ve/eslint-plugin': 1.4.0(eslint@8.56.0)(typescript@5.3.3) + '@so1ve/eslint-plugin-sort-imports': 1.4.0(eslint@8.56.0) + '@stylistic/eslint-plugin': 1.6.2(eslint@8.56.0)(typescript@5.3.3) '@unocss/eslint-config': 0.55.7(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 eslint-config-flat-gitignore: 0.1.2 eslint-define-config: 1.24.1 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.20.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0) eslint-mdx: 2.3.4(eslint@8.56.0) eslint-plugin-array-func: 3.1.8(eslint@8.56.0) eslint-plugin-case-police: 0.6.1(eslint@8.56.0)(typescript@5.3.3) eslint-plugin-etc: 2.0.3(eslint@8.56.0)(typescript@5.3.3) eslint-plugin-html: 7.1.0 - eslint-plugin-i: 2.29.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-plugin-i: 2.29.0(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) eslint-plugin-jest-formatting: 3.1.0(eslint@8.56.0) eslint-plugin-json-schema-validator: 4.8.3(eslint@8.56.0) eslint-plugin-jsonc: 2.13.0(eslint@8.56.0) eslint-plugin-mdx: 2.3.4(eslint@8.56.0) eslint-plugin-n: 16.6.2(eslint@8.56.0) eslint-plugin-no-await-in-promise: 1.1.6(eslint@8.56.0) - eslint-plugin-no-explicit-type-exports: 0.12.1(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(typescript@5.3.3) + eslint-plugin-no-explicit-type-exports: 0.12.1(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(typescript@5.3.3) eslint-plugin-no-only-tests: 3.1.0 eslint-plugin-only-error: 1.0.2 eslint-plugin-promise: 6.1.1(eslint@8.56.0) @@ -617,8 +856,8 @@ packages: eslint-plugin-solid: 0.13.1(eslint@8.56.0)(typescript@5.3.3) eslint-plugin-toml: 0.5.0(eslint@8.56.0) eslint-plugin-unicorn: 48.0.1(eslint@8.56.0) - eslint-plugin-unused-imports: 3.0.0(@typescript-eslint/eslint-plugin@6.20.0)(eslint@8.56.0) - eslint-plugin-vitest: 0.3.21(@typescript-eslint/eslint-plugin@6.20.0)(eslint@8.56.0)(typescript@5.3.3)(vitest@0.34.6) + eslint-plugin-unused-imports: 3.0.0(eslint@8.56.0) + eslint-plugin-vitest: 0.3.21(eslint@8.56.0)(typescript@5.3.3)(vitest@0.34.6) eslint-plugin-vue: 9.21.1(eslint@8.56.0) eslint-plugin-yml: 1.12.2(eslint@8.56.0) globals: 13.24.0 @@ -626,9 +865,12 @@ packages: local-pkg: 0.5.0 prettier: 3.2.5 toml-eslint-parser: 0.6.1 + typescript-eslint: 7.1.0(eslint@8.56.0)(typescript@5.3.3) vue-eslint-parser: 9.4.2(eslint@8.56.0) yaml-eslint-parser: 1.2.2 transitivePeerDependencies: + - '@typescript-eslint/eslint-plugin' + - '@typescript-eslint/parser' - eslint-import-resolver-node - eslint-import-resolver-webpack - eslint-plugin-import @@ -637,8 +879,8 @@ packages: - vitest dev: true - /@so1ve/eslint-plugin-sort-imports@1.2.0(eslint@8.56.0): - resolution: {integrity: sha512-h4rl+oexTqaoFB32ElZkwX4iC6+AGb7I045C50Fog19Turms6+4L1ybqtyEDPpqIhy1mrnliujtBIx1B1JJkWw==} + /@so1ve/eslint-plugin-sort-imports@1.4.0(eslint@8.56.0): + resolution: {integrity: sha512-Qb3ajw32vSnN698CDh8GnlMxKNxWs1mRyvRJ8nJPXAJntF/fe5VDStRSiuGLA85FIP+nJjmcmMxp7EyMoGL/wQ==} peerDependencies: eslint: '>=8.40.0' dependencies: @@ -646,8 +888,8 @@ packages: natsort: 2.0.3 dev: true - /@so1ve/eslint-plugin@1.2.0(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-qF3p752gk5OILYxtP5bZrea2cb8bASux06J+7t7rx00eKGOiaKSnRTxiTLdIzl7vDuPJ8W8Zk2p12bwReADGJg==} + /@so1ve/eslint-plugin@1.4.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-u5SOeQX0XCVimewcdj48Ha3/UHIZRDfn4LbSiesc4+1kqcyc4xktDXL3mNQtaP3i492v74o7d1t2cVWIeU0QkA==} dependencies: '@typescript-eslint/types': 6.20.0 '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) @@ -657,26 +899,98 @@ packages: - typescript dev: true - /@so1ve/prettier-config@1.2.0(prettier@3.2.5): - resolution: {integrity: sha512-weIG4y7Wlg0d1uRAVQAcYbN3IyDsacl8Ht2MKosnSOlEIMMemZfp8pwiVDQcNoSBQUtGAJ+BSPdTpc07SC5DAQ==} + /@so1ve/prettier-config@1.4.0(prettier@3.2.5): + resolution: {integrity: sha512-Hs+m3JhxcBmQhHq2x3iypV6mNsr4ltwO5w2CvCJWGoSxhTTn3Sz5dvxiudEyouOwitf8Uanmowc9NYp0kJOsvA==} peerDependencies: prettier: ^3.0.0 dependencies: - '@so1ve/prettier-plugin-toml': 1.2.0(prettier@3.2.5) + '@so1ve/prettier-plugin-toml': 1.4.0(prettier@3.2.5) prettier: 3.2.5 prettier-plugin-astro: 0.12.3 - prettier-plugin-curly-and-jsdoc: 1.2.0(prettier@3.2.5) + prettier-plugin-curly-and-jsdoc: 1.4.0(prettier@3.2.5) prettier-plugin-pkgsort: 0.2.1(prettier@3.2.5) dev: true - /@so1ve/prettier-plugin-toml@1.2.0(prettier@3.2.5): - resolution: {integrity: sha512-Qth84kdL/EIiML3PXvp6pW+kpJAkS8rbtLrwSRTfD/t1COalKpVOWgylQuWXXVwEBtRRdt772lXw6gCf30N0eA==} + /@so1ve/prettier-plugin-toml@1.4.0(prettier@3.2.5): + resolution: {integrity: sha512-bpjBpJ6XgY7ogayTOnKevQvqOtOTiof58bMhAG8QgU/iJKmMX4gDIfQUvX2KMGOl8yQ2n/kko7Dos5SfE/78Eg==} peerDependencies: prettier: ^3.0.0 dependencies: prettier: 3.2.5 dev: true + /@stylistic/eslint-plugin-js@1.6.2(eslint@8.56.0): + resolution: {integrity: sha512-ndT6X2KgWGxv8101pdMOxL8pihlYIHcOv3ICd70cgaJ9exwkPn8hJj4YQwslxoAlre1TFHnXd/G1/hYXgDrjIA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' + dependencies: + '@types/eslint': 8.56.3 + acorn: 8.11.3 + escape-string-regexp: 4.0.0 + eslint: 8.56.0 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + dev: true + + /@stylistic/eslint-plugin-jsx@1.6.2(eslint@8.56.0): + resolution: {integrity: sha512-hbbouazSJbHD/fshBIOLh9JgtSphKNoTCfHLSNBjAkXLK+GR4i2jhEZZF9P0mtXrNuy2WWInmpq/g0pfWBmSBA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' + dependencies: + '@stylistic/eslint-plugin-js': 1.6.2(eslint@8.56.0) + '@types/eslint': 8.56.3 + eslint: 8.56.0 + estraverse: 5.3.0 + picomatch: 4.0.1 + dev: true + + /@stylistic/eslint-plugin-plus@1.6.2(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-EDMwa6gzKw4bXRqdIAUvZDfIgwotbjJs8o+vYE22chAYtVAnA0Pcq+cPx0Uk35t2gvJWb5OaLDjqA6oy1tD0jg==} + peerDependencies: + eslint: '*' + dependencies: + '@types/eslint': 8.56.3 + '@typescript-eslint/utils': 6.21.0(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@stylistic/eslint-plugin-ts@1.6.2(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-FizV58em0OjO/xFHRIy/LJJVqzxCNmYC/xVtKDf8aGDRgZpLo+lkaBKfBrbMkAGzhBKbYj+iLEFI4WEl6aVZGQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' + dependencies: + '@stylistic/eslint-plugin-js': 1.6.2(eslint@8.56.0) + '@types/eslint': 8.56.3 + '@typescript-eslint/utils': 6.21.0(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@stylistic/eslint-plugin@1.6.2(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-EFnVcKOE5HTiMlVwisL9hHjz8a69yBbJRscWF/z+/vl6M4ew8NVrBlY8ea7KdV8QtyCY4Yapmsbg5ZDfhWlEgg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: '>=8.40.0' + dependencies: + '@stylistic/eslint-plugin-js': 1.6.2(eslint@8.56.0) + '@stylistic/eslint-plugin-jsx': 1.6.2(eslint@8.56.0) + '@stylistic/eslint-plugin-plus': 1.6.2(eslint@8.56.0)(typescript@5.3.3) + '@stylistic/eslint-plugin-ts': 1.6.2(eslint@8.56.0)(typescript@5.3.3) + '@types/eslint': 8.56.3 + eslint: 8.56.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@types/acorn@4.0.6: resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} dependencies: @@ -705,6 +1019,13 @@ packages: '@types/ms': 0.7.34 dev: true + /@types/eslint@8.56.3: + resolution: {integrity: sha512-PvSf1wfv2wJpVIFUMSb+i4PvqNYkB9Rkp9ZDO3oaWzq4SKhsQk4mrMBr3ZH06I0hKrVGLBacmgl8JM4WVjb9dg==} + dependencies: + '@types/estree': 1.0.5 + '@types/json-schema': 7.0.15 + dev: true + /@types/estree-jsx@1.0.4: resolution: {integrity: sha512-5idy3hvI9lAMqsyilBM+N+boaCf1MgoefbDxN6KEO5aK17TOHwFAYT9sjxzeKAiIWRUBgLxmZ9mPcnzZXtTcRQ==} dependencies: @@ -767,10 +1088,6 @@ packages: resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} dev: true - /@types/resolve@1.20.2: - resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} - dev: true - /@types/semver@7.5.6: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} dev: true @@ -793,23 +1110,23 @@ packages: '@types/yargs-parser': 21.0.3 dev: true - /@typescript-eslint/eslint-plugin@6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg==} + /@typescript-eslint/eslint-plugin@7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha - eslint: ^7.0.0 || ^8.0.0 + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3) - '@typescript-eslint/scope-manager': 6.20.0 - '@typescript-eslint/type-utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) - '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) - '@typescript-eslint/visitor-keys': 6.20.0 + '@typescript-eslint/parser': 7.1.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 7.1.0 + '@typescript-eslint/type-utils': 7.1.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 7.1.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 7.1.0 debug: 4.3.4 eslint: 8.56.0 graphemer: 1.4.0 @@ -851,20 +1168,20 @@ packages: - typescript dev: true - /@typescript-eslint/parser@6.20.0(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w==} + /@typescript-eslint/parser@7.1.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.20.0 - '@typescript-eslint/types': 6.20.0 - '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) - '@typescript-eslint/visitor-keys': 6.20.0 + '@typescript-eslint/scope-manager': 7.1.0 + '@typescript-eslint/types': 7.1.0 + '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 7.1.0 debug: 4.3.4 eslint: 8.56.0 typescript: 5.3.3 @@ -888,18 +1205,34 @@ packages: '@typescript-eslint/visitor-keys': 6.20.0 dev: true - /@typescript-eslint/type-utils@6.20.0(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g==} + /@typescript-eslint/scope-manager@6.21.0: + resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + dev: true + + /@typescript-eslint/scope-manager@7.1.0: + resolution: {integrity: sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 7.1.0 + '@typescript-eslint/visitor-keys': 7.1.0 + dev: true + + /@typescript-eslint/type-utils@7.1.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) - '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.3.3) + '@typescript-eslint/utils': 7.1.0(eslint@8.56.0)(typescript@5.3.3) debug: 4.3.4 eslint: 8.56.0 ts-api-utils: 1.0.3(typescript@5.3.3) @@ -913,55 +1246,109 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/types@6.20.0: - resolution: {integrity: sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==} + /@typescript-eslint/types@6.20.0: + resolution: {integrity: sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + + /@typescript-eslint/types@6.21.0: + resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + + /@typescript-eslint/types@7.1.0: + resolution: {integrity: sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + + /@typescript-eslint/typescript-estree@2.34.0(typescript@5.3.3): + resolution: {integrity: sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==} + engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + debug: 4.3.4 + eslint-visitor-keys: 1.3.0 + glob: 7.2.3 + is-glob: 4.0.3 + lodash: 4.17.21 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.3.3): + resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/typescript-estree@6.20.0(typescript@5.3.3): + resolution: {integrity: sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==} engines: {node: ^16.0.0 || >=18.0.0} - dev: true - - /@typescript-eslint/typescript-estree@2.34.0(typescript@5.3.3): - resolution: {integrity: sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==} - engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/visitor-keys': 6.20.0 debug: 4.3.4 - eslint-visitor-keys: 1.3.0 - glob: 7.2.3 + globby: 11.1.0 is-glob: 4.0.3 - lodash: 4.17.21 + minimatch: 9.0.3 semver: 7.5.4 - tsutils: 3.21.0(typescript@5.3.3) + ts-api-utils: 1.0.3(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@5.62.0(typescript@5.3.3): - resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/typescript-estree@6.21.0(typescript@5.3.3): + resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 + minimatch: 9.0.3 semver: 7.5.4 - tsutils: 3.21.0(typescript@5.3.3) + ts-api-utils: 1.0.3(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@6.20.0(typescript@5.3.3): - resolution: {integrity: sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==} + /@typescript-eslint/typescript-estree@7.1.0(typescript@5.3.3): + resolution: {integrity: sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -969,8 +1356,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.20.0 - '@typescript-eslint/visitor-keys': 6.20.0 + '@typescript-eslint/types': 7.1.0 + '@typescript-eslint/visitor-keys': 7.1.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -1021,6 +1408,44 @@ packages: - typescript dev: true + /@typescript-eslint/utils@6.21.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.6 + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.3.3) + eslint: 8.56.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/utils@7.1.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^8.56.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.6 + '@typescript-eslint/scope-manager': 7.1.0 + '@typescript-eslint/types': 7.1.0 + '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.3.3) + eslint: 8.56.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/visitor-keys@5.62.0: resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1037,6 +1462,22 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript-eslint/visitor-keys@6.21.0: + resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.21.0 + eslint-visitor-keys: 3.4.3 + dev: true + + /@typescript-eslint/visitor-keys@7.1.0: + resolution: {integrity: sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 7.1.0 + eslint-visitor-keys: 3.4.3 + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true @@ -1193,6 +1634,10 @@ packages: engines: {node: '>=12'} dev: true + /any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + dev: true + /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -1353,6 +1798,16 @@ packages: semver: 7.5.4 dev: true + /bundle-require@4.0.2(esbuild@0.19.12): + resolution: {integrity: sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + peerDependencies: + esbuild: '>=0.17' + dependencies: + esbuild: 0.19.12 + load-tsconfig: 0.2.5 + dev: true + /c12@1.6.1: resolution: {integrity: sha512-fAZOi3INDvIbmjuwAVVggusyRTxwNdTAnwLay8IsXwhFzDwPPGzFxzrx6L55CPFGPulUSZI0eyFUvRDXveoE3g==} dependencies: @@ -1542,10 +1997,6 @@ packages: engines: {node: '>= 12.0.0'} dev: true - /commondir@1.0.1: - resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - dev: true - /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true @@ -1631,11 +2082,6 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true - /deepmerge@4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} - engines: {node: '>=0.10.0'} - dev: true - /define-data-property@1.1.1: resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} engines: {node: '>= 0.4'} @@ -1869,6 +2315,37 @@ packages: '@esbuild/win32-x64': 0.18.20 dev: true + /esbuild@0.19.12: + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.12 + '@esbuild/android-arm': 0.19.12 + '@esbuild/android-arm64': 0.19.12 + '@esbuild/android-x64': 0.19.12 + '@esbuild/darwin-arm64': 0.19.12 + '@esbuild/darwin-x64': 0.19.12 + '@esbuild/freebsd-arm64': 0.19.12 + '@esbuild/freebsd-x64': 0.19.12 + '@esbuild/linux-arm': 0.19.12 + '@esbuild/linux-arm64': 0.19.12 + '@esbuild/linux-ia32': 0.19.12 + '@esbuild/linux-loong64': 0.19.12 + '@esbuild/linux-mips64el': 0.19.12 + '@esbuild/linux-ppc64': 0.19.12 + '@esbuild/linux-riscv64': 0.19.12 + '@esbuild/linux-s390x': 0.19.12 + '@esbuild/linux-x64': 0.19.12 + '@esbuild/netbsd-x64': 0.19.12 + '@esbuild/openbsd-x64': 0.19.12 + '@esbuild/sunos-x64': 0.19.12 + '@esbuild/win32-arm64': 0.19.12 + '@esbuild/win32-ia32': 0.19.12 + '@esbuild/win32-x64': 0.19.12 + dev: true + /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} @@ -1939,7 +2416,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.20.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0): + /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0): resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -1949,8 +2426,8 @@ packages: debug: 4.3.4 enhanced-resolve: 5.15.0 eslint: 8.56.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.20.0)(eslint@8.56.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.1.0)(eslint@8.56.0) fast-glob: 3.3.2 get-tsconfig: 4.7.2 is-core-module: 2.13.1 @@ -1987,7 +2464,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -2008,11 +2485,11 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/parser': 7.1.0(eslint@8.56.0)(typescript@5.3.3) debug: 3.2.7 eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.20.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0) transitivePeerDependencies: - supports-color dev: true @@ -2074,7 +2551,7 @@ packages: htmlparser2: 8.0.2 dev: true - /eslint-plugin-i@2.29.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): + /eslint-plugin-i@2.29.0(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): resolution: {integrity: sha512-slGeTS3GQzx9267wLJnNYNO8X9EHGsc75AKIAFvnvMYEcTJKotPKL1Ru5PIGVHIVet+2DsugePWp8Oxpx8G22w==} engines: {node: '>=12'} peerDependencies: @@ -2084,7 +2561,7 @@ packages: doctrine: 2.1.0 eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) get-tsconfig: 4.7.2 is-glob: 4.0.3 minimatch: 3.1.2 @@ -2097,7 +2574,7 @@ packages: - supports-color dev: true - /eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.20.0)(eslint@8.56.0): + /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.1.0)(eslint@8.56.0): resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} engines: {node: '>=4'} peerDependencies: @@ -2107,7 +2584,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/parser': 7.1.0(eslint@8.56.0)(typescript@5.3.3) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 @@ -2116,7 +2593,7 @@ packages: doctrine: 2.1.0 eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -2239,7 +2716,7 @@ packages: eslint: 8.56.0 dev: true - /eslint-plugin-no-explicit-type-exports@0.12.1(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(typescript@5.3.3): + /eslint-plugin-no-explicit-type-exports@0.12.1(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-m1v/f+LYVygCY735KfCovkoXYPbZH5zxEj/tuLOnMwX/qbJEJoRb9evul88Ois5HidvKbiMdMg/tXU55Ki++jg==} engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} peerDependencies: @@ -2247,10 +2724,10 @@ packages: eslint: '>= 6.x' dependencies: '@typescript-eslint/experimental-utils': 2.34.0(eslint@8.56.0)(typescript@5.3.3) - '@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/parser': 7.1.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -2349,7 +2826,7 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-unused-imports@3.0.0(@typescript-eslint/eslint-plugin@6.20.0)(eslint@8.56.0): + /eslint-plugin-unused-imports@3.0.0(eslint@8.56.0): resolution: {integrity: sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2359,12 +2836,11 @@ packages: '@typescript-eslint/eslint-plugin': optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 eslint-rule-composer: 0.3.0 dev: true - /eslint-plugin-vitest@0.3.21(@typescript-eslint/eslint-plugin@6.20.0)(eslint@8.56.0)(typescript@5.3.3)(vitest@0.34.6): + /eslint-plugin-vitest@0.3.21(eslint@8.56.0)(typescript@5.3.3)(vitest@0.34.6): resolution: {integrity: sha512-oYwR1MrwaBw/OG6CKU+SJYleAc442w6CWL1RTQl5WLwy8X3sh0bgHIQk5iEtmTak3Q+XAvZglr0bIoDOjFdkcw==} engines: {node: ^18.0.0 || >= 20.0.0} peerDependencies: @@ -2377,7 +2853,6 @@ packages: vitest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 vitest: 0.34.6 @@ -2549,15 +3024,26 @@ packages: '@types/unist': 2.0.10 dev: true - /estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - dev: true - /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} dev: true + /execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + dependencies: + cross-spawn: 7.0.3 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + dev: true + /execa@8.0.1: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} @@ -2745,6 +3231,11 @@ packages: hasown: 2.0.0 dev: true + /get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + dev: true + /get-stream@8.0.1: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} @@ -2932,6 +3423,11 @@ packages: entities: 4.5.0 dev: true + /human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + dev: true + /human-signals@5.0.0: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} @@ -3122,10 +3618,6 @@ packages: html-tags: 3.3.1 dev: true - /is-module@1.0.0: - resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} - dev: true - /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -3153,12 +3645,6 @@ packages: engines: {node: '>=12'} dev: true - /is-reference@1.2.1: - resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} - dependencies: - '@types/estree': 1.0.5 - dev: true - /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -3173,6 +3659,11 @@ packages: call-bind: 1.0.5 dev: true + /is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + dev: true + /is-stream@3.0.0: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -3227,6 +3718,11 @@ packages: hasBin: true dev: true + /joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + dev: true + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true @@ -3347,6 +3843,11 @@ packages: type-check: 0.4.0 dev: true + /lilconfig@3.1.1: + resolution: {integrity: sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==} + engines: {node: '>=14'} + dev: true + /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true @@ -3363,6 +3864,11 @@ packages: import-meta-resolve: 2.2.2 dev: true + /load-tsconfig@0.2.5: + resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /local-pkg@0.4.3: resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} engines: {node: '>=14'} @@ -3394,6 +3900,10 @@ packages: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true + /lodash.sortby@4.7.0: + resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + dev: true + /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: true @@ -3831,6 +4341,11 @@ packages: picomatch: 2.3.1 dev: true + /mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + dev: true + /mimic-fn@4.0.0: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} engines: {node: '>=12'} @@ -3925,6 +4440,14 @@ packages: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true + /mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + dev: true + /nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -3970,6 +4493,13 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true + /npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + dependencies: + path-key: 3.1.1 + dev: true + /npm-run-path@5.2.0: resolution: {integrity: sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -3994,6 +4524,11 @@ packages: ufo: 1.3.2 dev: true + /object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + dev: true + /object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} dev: true @@ -4050,6 +4585,13 @@ packages: wrappy: 1.0.2 dev: true + /onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + dependencies: + mimic-fn: 2.1.0 + dev: true + /onetime@6.0.0: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} @@ -4234,6 +4776,16 @@ packages: engines: {node: '>=8.6'} dev: true + /picomatch@4.0.1: + resolution: {integrity: sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg==} + engines: {node: '>=12'} + dev: true + + /pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + dev: true + /pkg-types@1.0.3: resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} dependencies: @@ -4242,32 +4794,25 @@ packages: pathe: 1.1.2 dev: true - /pkgroll@2.0.1(typescript@5.3.3): - resolution: {integrity: sha512-sAik3umDeElVxQeRj4GpK21mBSi75TnqaKlP+f2/f5WwKEXXtmrrCs0stYG94JfPEyT9mTD8jHk7CODO1dpWmA==} - engines: {node: '>=18'} - hasBin: true + /pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + dev: true + + /postcss-load-config@4.0.2: + resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} + engines: {node: '>= 14'} peerDependencies: - typescript: ^4.1 || ^5.0 + postcss: '>=8.0.9' + ts-node: '>=9.0.0' peerDependenciesMeta: - typescript: + postcss: + optional: true + ts-node: optional: true dependencies: - '@rollup/plugin-alias': 5.1.0(rollup@3.29.4) - '@rollup/plugin-commonjs': 25.0.7(rollup@3.29.4) - '@rollup/plugin-inject': 5.0.5(rollup@3.29.4) - '@rollup/plugin-json': 6.1.0(rollup@3.29.4) - '@rollup/plugin-node-resolve': 15.2.3(rollup@3.29.4) - '@rollup/plugin-replace': 5.0.5(rollup@3.29.4) - '@rollup/pluginutils': 5.1.0(rollup@3.29.4) - esbuild: 0.18.20 - magic-string: 0.30.6 - rollup: 3.29.4 - typescript: 5.3.3 - dev: true - - /pluralize@8.0.0: - resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} - engines: {node: '>=4'} + lilconfig: 3.1.1 + yaml: 2.3.4 dev: true /postcss-selector-parser@6.0.15: @@ -4316,8 +4861,8 @@ packages: sass-formatter: 0.7.9 dev: true - /prettier-plugin-curly-and-jsdoc@1.2.0(prettier@3.2.5): - resolution: {integrity: sha512-swVClq3BH1jA2BMHCEZXxc4M6aIatE4akRIrSKVBk/nLIQwNizdILizduV5KvR2NcuLE2PPUsAXtTklBjx+WhQ==} + /prettier-plugin-curly-and-jsdoc@1.4.0(prettier@3.2.5): + resolution: {integrity: sha512-skXko+6QkeFc8XlkRPY8njoMaG3Qhl1E4oBPqKPwrhNLEhzHaP7yPK9AA/UBdegiqugHtr81oSNSgQ/1CCNt6g==} peerDependencies: prettier: ^3.0.0 dependencies: @@ -4508,6 +5053,11 @@ packages: engines: {node: '>=4'} dev: true + /resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + dev: true + /resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} dev: true @@ -4533,6 +5083,14 @@ packages: glob: 7.2.3 dev: true + /rimraf@5.0.5: + resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==} + engines: {node: '>=14'} + hasBin: true + dependencies: + glob: 10.3.10 + dev: true + /rollup@3.29.4: resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} @@ -4541,6 +5099,29 @@ packages: fsevents: 2.3.3 dev: true + /rollup@4.12.0: + resolution: {integrity: sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.12.0 + '@rollup/rollup-android-arm64': 4.12.0 + '@rollup/rollup-darwin-arm64': 4.12.0 + '@rollup/rollup-darwin-x64': 4.12.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.12.0 + '@rollup/rollup-linux-arm64-gnu': 4.12.0 + '@rollup/rollup-linux-arm64-musl': 4.12.0 + '@rollup/rollup-linux-riscv64-gnu': 4.12.0 + '@rollup/rollup-linux-x64-gnu': 4.12.0 + '@rollup/rollup-linux-x64-musl': 4.12.0 + '@rollup/rollup-win32-arm64-msvc': 4.12.0 + '@rollup/rollup-win32-ia32-msvc': 4.12.0 + '@rollup/rollup-win32-x64-msvc': 4.12.0 + fsevents: 2.3.3 + dev: true + /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -4657,6 +5238,10 @@ packages: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} dev: true + /signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + dev: true + /signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -4671,11 +5256,6 @@ packages: engines: {node: '>=8'} dev: true - /slash@4.0.0: - resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} - engines: {node: '>=12'} - dev: true - /sort-object-keys@1.1.3: resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==} dev: true @@ -4701,6 +5281,13 @@ packages: engines: {node: '>=0.10.0'} dev: true + /source-map@0.8.0-beta.0: + resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} + engines: {node: '>= 8'} + dependencies: + whatwg-url: 7.1.0 + dev: true + /spdx-correct@3.2.0: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} dependencies: @@ -4811,6 +5398,11 @@ packages: engines: {node: '>=4'} dev: true + /strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + dev: true + /strip-final-newline@3.0.0: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} @@ -4840,6 +5432,20 @@ packages: inline-style-parser: 0.1.1 dev: true + /sucrase@3.35.0: + resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + '@jridgewell/gen-mapping': 0.3.4 + commander: 4.1.1 + glob: 10.3.10 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.6 + ts-interface-checker: 0.1.13 + dev: true + /suf-log@2.5.3: resolution: {integrity: sha512-KvC8OPjzdNOe+xQ4XWJV2whQA0aM1kGVczMQ8+dStAO6KfEB140JEVQ9dE76ONZ0/Ylf67ni4tILPJB41U0eow==} dependencies: @@ -4914,6 +5520,19 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + dependencies: + thenify: 3.3.1 + dev: true + + /thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + dependencies: + any-promise: 1.3.0 + dev: true + /tiny-request-router@1.2.2: resolution: {integrity: sha512-6ZMFU7AP9so+hkqmMM9fJ11V44EAcYuHCmNdsyM8k94oVnNDPQwUAAPoBHqchHSpKG6yZbCasgVeRxaY5v2BCg==} dependencies: @@ -4962,6 +5581,17 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /tr46@1.0.1: + resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} + dependencies: + punycode: 2.3.1 + dev: true + + /tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + dev: true + /trough@2.1.0: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} dev: true @@ -4975,6 +5605,10 @@ packages: typescript: 5.3.3 dev: true + /ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + dev: true + /tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} dependencies: @@ -4992,6 +5626,45 @@ packages: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: true + /tsup@8.0.2(typescript@5.3.3): + resolution: {integrity: sha512-NY8xtQXdH7hDUAZwcQdY/Vzlw9johQsaqf7iwZ6g1DOUlFYQ5/AtVAjTvihhEyeRlGo4dLRVHtrRaL35M1daqQ==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + '@microsoft/api-extractor': ^7.36.0 + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: '>=4.5.0' + peerDependenciesMeta: + '@microsoft/api-extractor': + optional: true + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + dependencies: + bundle-require: 4.0.2(esbuild@0.19.12) + cac: 6.7.14 + chokidar: 3.5.3 + debug: 4.3.4 + esbuild: 0.19.12 + execa: 5.1.1 + globby: 11.1.0 + joycon: 3.1.1 + postcss-load-config: 4.0.2 + resolve-from: 5.0.0 + rollup: 4.12.0 + source-map: 0.8.0-beta.0 + sucrase: 3.35.0 + tree-kill: 1.2.2 + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + - ts-node + dev: true + /tsutils-etc@1.4.2(tsutils@3.21.0)(typescript@5.3.3): resolution: {integrity: sha512-2Dn5SxTDOu6YWDNKcx1xu2YUy6PUeKrWZB/x2cQ8vY2+iz3JRembKn/iZ0JLT1ZudGNwQQvtFX9AwvRHbXuPUg==} hasBin: true @@ -5059,6 +5732,11 @@ packages: engines: {node: '>=8'} dev: true + /type-fest@4.10.3: + resolution: {integrity: sha512-JLXyjizi072smKGGcZiAJDCNweT8J+AuRxmPZ1aG7TERg4ijx9REl8CNhbr36RV4qXqL1gO1FF9HL8OkVmmrsA==} + engines: {node: '>=16'} + dev: true + /typed-array-buffer@1.0.0: resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} engines: {node: '>= 0.4'} @@ -5101,6 +5779,24 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true + /typescript-eslint@7.1.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-GfAALH4zoqae5mIfHr7WU3BsULHP73hjwF8vCmyTkH3IXHXjqg3JNWwUcd8CwOTLIr4tjRTZQWpToyESPnpOhg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/eslint-plugin': 7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/parser': 7.1.0(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + /typescript@5.3.3: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} @@ -5447,6 +6143,18 @@ packages: resolution: {integrity: sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==} dev: true + /webidl-conversions@4.0.2: + resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} + dev: true + + /whatwg-url@7.1.0: + resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + dev: true + /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: diff --git a/src/cache-db.ts b/src/cache-db.ts index 27d4227..3e67638 100644 --- a/src/cache-db.ts +++ b/src/cache-db.ts @@ -1,21 +1,40 @@ +type ConfigType = + | "json" + | "arrayBuffer" + | "blob" + | "text" + | (string & Record); // For autocompletion + +interface Config { + type: ConfigType; +} + export class CacheDB { - constructor( - private namespace: string = "CacheDBDefaultNameSpace", - private prefix: string = "CacheDBDefaultPrefix", + private constructor( + private prefix: string, + public cache: Cache, ) {} - private generateUrl(key: string) { - return `https://${this.prefix}/${encodeURIComponent(key)}`; + public static async create( + namespace = "CacheDBDefaultNameSpace", + prefix = "CacheDBDefaultPrefix", + ): Promise { + const cache = await caches.open(namespace); + + return new CacheDB(prefix, cache); + } + + private generateRequestKey(key: string) { + return new Request(`https://${this.prefix}/${encodeURIComponent(key)}`); } public async read( key: string, - config: { type: string } = { + config: Config = { type: "text", }, - ) { - const cache = await caches.open(this.namespace); - const response = await cache.match(new Request(this.generateUrl(key))); + ): Promise { + const response = await this.cache.match(this.generateRequestKey(key)); if (!response) { return null; @@ -39,13 +58,18 @@ export class CacheDB { public async write( key: string, - value: any, - config: { type: string } = { type: "text" }, + value: + | ReadableStream + | Blob + | ArrayBufferView + | ArrayBuffer + | FormData + | URLSearchParams + | string, + config: Config = { type: "text" }, ) { - const cache = await caches.open(this.namespace); - - await cache.put( - new Request(this.generateUrl(key)), + await this.cache.put( + this.generateRequestKey(key), new Response(value, { headers: { "Content-Type": inferContentType(config.type), @@ -55,14 +79,13 @@ export class CacheDB { } public async delete(key: string): Promise { - const cache = await caches.open(this.namespace); - const response = await cache.delete(new Request(this.generateUrl(key))); + const response = await this.cache.delete(this.generateRequestKey(key)); return response; } } -function inferContentType(type: string) { +function inferContentType(type: ConfigType) { switch (type) { case "json": { return "application/json"; diff --git a/src/index.ts b/src/index.ts index 05bbf0d..62c7797 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,66 @@ -export const one = 1; -export const two = 2; +/* eslint-disable no-restricted-globals */ +import { version } from "../package.json"; +import { CacheDB } from "./cache-db"; +import * as logger from "./logger"; +import { handleRoutes } from "./routes"; + +const sw = self as ServiceWorkerGlobalScope & + typeof globalThis & { + handleRoutes: typeof handleRoutes; + }; + +sw.handleRoutes = handleRoutes; + +const db = await CacheDB.create(); +const responseDb = await CacheDB.create("ClientWorker_ResponseCache"); + +logger.success(`ClientWorker${version} started!`); + +// TODO +// db.read("hotpatch").then((script) => { +// if (script) { +// cons.s("Hotpatch Loaded!"); +// eval(script as string); +// } else { +// cons.w("Hotpatch Not Found!"); +// } +// }); + +db.read("config").then((config) => { + const parsedConfig = JSON.parse(config) || {}; + setInterval( + async () => { + logger.success(`ClientWorker@${version} start to clean expired cache!`); + + const keys = await responseDb.cache.keys(); + + for (const key of keys) { + responseDb.cache.match(key).then((res) => { + if ( + Number(res!.headers.get("ClientWorker-ExpireTime")) <= + performance.now() + ) { + responseDb.cache.delete(key); + } + }); + } + }, + parseInt(parsedConfig.cleaninterval) || 60 * 1000, + ); +}); + +addEventListener("fetch", (event) => { + (event as FetchEvent).respondWith( + sw.handleRoutes((event as FetchEvent).request), + ); +}); + +addEventListener("install", () => { + logger.success(`ClientWorker@${version} installed!`); + sw.skipWaiting(); +}); + +addEventListener("activate", () => { + logger.success(`ClientWorker@${version} activated!`); + sw.clients.claim(); +}); diff --git a/src/routes.ts b/src/routes.ts index 7c02ae7..91ab51b 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -1,16 +1,17 @@ import type { Method, Params } from "tiny-request-router"; import { Router } from "tiny-request-router"; +import { configFile, loadConfig } from "virtual:config-loader"; import { version } from "../package.json"; import { CacheDB } from "./cache-db"; import { CW_CGI_PREFIX } from "./constants"; -import type { ConfigLoader } from "./types"; -function createRouter(loadConfig: ConfigLoader) { +async function createRouter() { const router = new Router< - (params: Params, queries: Params) => Promise | Response + (ctx: { params: Params; queries: Params }) => Promise | Response >(); - const db = new CacheDB(); + const db = await CacheDB.create(); + const responseDb = await CacheDB.create("ClientWorker_ResponseCache"); router.get("/hello", () => new Response("Hello ClientWorker!")); router.get( @@ -29,39 +30,53 @@ function createRouter(loadConfig: ConfigLoader) { ); router.get("/page/:name", () => new Response("Error, page type not found")); router.get("/page/install", () => fetch("/404")); - router.get("/api/config", async (_params, queries) => { - const source = await fetch(queries.url || "/config.yaml") - .then((res) => res.text()) - .then((text) => loadConfig(text)) - .then(async (config) => { - await db.write("config", JSON.stringify(config), { type: "json" }); + router.get("/api/config", async ({ queries }) => { + const response = await fetch(queries.url || configFile); + const text = await response.text(); + try { + const config = await loadConfig(text); - return new Response("ok"); - }) - .catch(async (err) => { - await db.write("config", ""); - - return new Response(err); + await db.write("config", JSON.stringify(config), { + type: "json", }); + + return new Response("ok"); + } catch (e: any) { + await db.write("config", ""); + + return new Response(e); + } + }); + router.post("/api/clear", async () => { + const keys = await responseDb.cache.keys(); + + await Promise.all( + keys.map(async (key) => { + responseDb.cache.delete(key); + }), + ); + + return new Response("ok"); }); + // TODO: Hotpatch, Hotconfig + return router; } -export const createRouteHandler = (loadConfig: ConfigLoader) => - async function handleRoutes(request: Request): Promise { - const router = createRouter(loadConfig); - const url = new URL(request.url.slice(CW_CGI_PREFIX.length)); - const match = router.match(request.method as Method, url.pathname); +export async function handleRoutes(request: Request): Promise { + const router = await createRouter(); + const url = new URL(request.url.slice(CW_CGI_PREFIX.length)); + const match = router.match(request.method as Method, url.pathname); - if (match) { - const response = await match.handler( - match.params, - Object.fromEntries(url.searchParams.entries()), - ); + if (match) { + const response = await match.handler({ + params: match.params, + queries: Object.fromEntries(url.searchParams.entries()), + }); - return response; - } else { - return new Response("Not Found!, Client Worker!"); - } - }; + return response; + } else { + return new Response("Not Found! (Client Worker)"); + } +} diff --git a/src/virtual.d.ts b/src/virtual.d.ts new file mode 100644 index 0000000..caeac1e --- /dev/null +++ b/src/virtual.d.ts @@ -0,0 +1,4 @@ +declare module "virtual:config-loader" { + export const configFile: string; + export const loadConfig: import("./types").ConfigLoader; +} diff --git a/tsconfig.json b/tsconfig.json index afb913b..0155741 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,12 @@ { "compilerOptions": { "target": "ES2018", - "lib": ["ESNext", "WebWorker", "WebWorker.ImportScripts"], + "lib": [ + "ESNext", + "WebWorker", + "WebWorker.ImportScripts", + "Webworker.Iterable" + ], "module": "ESNext", "moduleResolution": "Node", "resolveJsonModule": true, diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 0000000..98deb49 --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,80 @@ +import type { Options } from "tsup"; +import { defineConfig } from "tsup"; + +const CONFIG_LOADER_RE = /^virtual:config-loader$/; +const js = String.raw; + +const outExtension: Options["outExtension"] = ({ options }) => { + const formatExtension = options.minify ? ".min" : ""; + + return { + js: `${formatExtension}.js`, + }; +}; + +export default defineConfig([ + { + entry: { + index: "src/index.ts", + }, + target: "esnext", + format: "esm", + dts: true, + outExtension, + esbuildPlugins: [ + { + name: "replace-config-loader", + setup(build) { + build.onResolve({ filter: CONFIG_LOADER_RE }, (args) => ({ + path: args.path, + namespace: "config-loader", + })); + + build.onLoad( + { filter: CONFIG_LOADER_RE, namespace: "config-loader" }, + () => ({ + contents: js` +export const loadConfig = JSON.parse; +export const configFile = "/config.json";`, + loader: "js", + }), + ); + }, + }, + ], + }, + { + entry: { + "with-yaml": "src/index.ts", + }, + target: "esnext", + format: "esm", + dts: true, + outExtension, + esbuildPlugins: [ + { + name: "replace-config-loader", + setup(build) { + build.onResolve({ filter: CONFIG_LOADER_RE }, (args) => ({ + path: args.path, + namespace: "config-loader", + })); + + build.onLoad( + { filter: CONFIG_LOADER_RE, namespace: "config-loader" }, + () => ({ + contents: js` +import { load } from "js-yaml"; + +export const loadConfig = load; +export const configFile = "/config.yaml"; +`, + resolveDir: "node_modules", + loader: "js", + }), + ); + }, + }, + ], + }, +]); From 71bfb881db47805c09ae27260340dfbb53fbd592 Mon Sep 17 00:00:00 2001 From: so1ve Date: Tue, 27 Feb 2024 16:08:18 +0800 Subject: [PATCH 12/17] wip --- .github/pull.yml | 11 ----- package.json | 1 + pnpm-lock.yaml | 18 +++++-- src/engine.ts | 4 +- src/index.ts | 4 +- src/loaders/json.ts | 2 + src/loaders/yaml.ts | 4 ++ src/routes.ts | 2 +- src/{ => utils}/cache-db.ts | 0 src/{ => utils}/logger.ts | 0 src/{ => utils}/rebuild.ts | 2 +- tsup.config.ts | 95 +++++++++++++------------------------ 12 files changed, 60 insertions(+), 83 deletions(-) delete mode 100644 .github/pull.yml create mode 100644 src/loaders/json.ts create mode 100644 src/loaders/yaml.ts rename src/{ => utils}/cache-db.ts (100%) rename src/{ => utils}/logger.ts (100%) rename src/{ => utils}/rebuild.ts (96%) diff --git a/.github/pull.yml b/.github/pull.yml deleted file mode 100644 index 9a8df79..0000000 --- a/.github/pull.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: "1" -rules: - - base: main - upstream: so1ve:main - mergeMethod: hardreset - assignees: - - so1ve - reviewers: - - so1ve - conflictReviewers: - - so1ve diff --git a/package.json b/package.json index 9659db7..4638c13 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "@antfu/ni": "^0.21.8", "@so1ve/eslint-config": "^1.4.0", "@so1ve/prettier-config": "^1.4.0", + "@types/js-yaml": "^4.0.9", "@types/node": "^20.8.3", "bumpp": "^9.2.0", "eslint": "^8.51.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b2f913..b878219 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ devDependencies: '@so1ve/prettier-config': specifier: ^1.4.0 version: 1.4.0(prettier@3.2.5) + '@types/js-yaml': + specifier: ^4.0.9 + version: 4.0.9 '@types/node': specifier: ^20.8.3 version: 20.11.16 @@ -1046,6 +1049,10 @@ packages: resolution: {integrity: sha512-4J1l5d79hoIvsrKh5VUKVRA1aIdsOb10Hu5j3J2VfP/msDnfTdGPmNp2E1Wg+vs97Bktzo+MZePFFXSGoykYJw==} dev: true + /@types/js-yaml@4.0.9: + resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} + dev: true + /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true @@ -4812,7 +4819,7 @@ packages: optional: true dependencies: lilconfig: 3.1.1 - yaml: 2.3.4 + yaml: 2.4.0 dev: true /postcss-selector-parser@6.0.15: @@ -5853,7 +5860,7 @@ packages: vfile-message: 3.1.4 vfile-reporter: 7.0.5 vfile-statistics: 2.0.1 - yaml: 2.3.4 + yaml: 2.4.0 transitivePeerDependencies: - supports-color dev: true @@ -6235,7 +6242,7 @@ packages: dependencies: eslint-visitor-keys: 3.4.3 lodash: 4.17.21 - yaml: 2.3.4 + yaml: 2.4.0 dev: true /yaml@1.10.2: @@ -6243,9 +6250,10 @@ packages: engines: {node: '>= 6'} dev: true - /yaml@2.3.4: - resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} + /yaml@2.4.0: + resolution: {integrity: sha512-j9iR8g+/t0lArF4V6NE/QCfT+CO7iLqrXAHZbJdo+LfjqP1vR8Fg5bSiaq6Q2lOD1AUEVrEVIgABvBFYojJVYQ==} engines: {node: '>= 14'} + hasBin: true dev: true /yargs-parser@21.1.1: diff --git a/src/engine.ts b/src/engine.ts index 1778b3e..d3cfe8e 100644 --- a/src/engine.ts +++ b/src/engine.ts @@ -1,11 +1,11 @@ /* eslint-disable ts/no-throw-literal */ -import * as logger from "./logger"; -import { rebuildRequest, rebuildResponse } from "./rebuild"; import type { FetchEngineConfig, FetchEngineFunction, ListFetchEngineFunction, } from "./types"; +import * as logger from "./utils/logger"; +import { rebuildRequest, rebuildResponse } from "./utils/rebuild"; const create504Response = (engine: string) => new Response( diff --git a/src/index.ts b/src/index.ts index 62c7797..51e8b36 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,8 @@ /* eslint-disable no-restricted-globals */ import { version } from "../package.json"; -import { CacheDB } from "./cache-db"; -import * as logger from "./logger"; import { handleRoutes } from "./routes"; +import { CacheDB } from "./utils/cache-db"; +import * as logger from "./utils/logger"; const sw = self as ServiceWorkerGlobalScope & typeof globalThis & { diff --git a/src/loaders/json.ts b/src/loaders/json.ts new file mode 100644 index 0000000..8c42716 --- /dev/null +++ b/src/loaders/json.ts @@ -0,0 +1,2 @@ +export const loadConfig = JSON.parse; +export const configFile = "/config.json"; diff --git a/src/loaders/yaml.ts b/src/loaders/yaml.ts new file mode 100644 index 0000000..fb1aa2b --- /dev/null +++ b/src/loaders/yaml.ts @@ -0,0 +1,4 @@ +import { load } from "js-yaml"; + +export const loadConfig = load; +export const configFile = "/config.yaml"; diff --git a/src/routes.ts b/src/routes.ts index 91ab51b..7c68106 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -3,8 +3,8 @@ import { Router } from "tiny-request-router"; import { configFile, loadConfig } from "virtual:config-loader"; import { version } from "../package.json"; -import { CacheDB } from "./cache-db"; import { CW_CGI_PREFIX } from "./constants"; +import { CacheDB } from "./utils/cache-db"; async function createRouter() { const router = new Router< diff --git a/src/cache-db.ts b/src/utils/cache-db.ts similarity index 100% rename from src/cache-db.ts rename to src/utils/cache-db.ts diff --git a/src/logger.ts b/src/utils/logger.ts similarity index 100% rename from src/logger.ts rename to src/utils/logger.ts diff --git a/src/rebuild.ts b/src/utils/rebuild.ts similarity index 96% rename from src/rebuild.ts rename to src/utils/rebuild.ts index 8a4210b..bfe4e29 100644 --- a/src/rebuild.ts +++ b/src/utils/rebuild.ts @@ -1,5 +1,5 @@ import * as logger from "./logger"; -import type { CwRequestInit, CwResponseInit } from "./types"; +import type { CwRequestInit, CwResponseInit } from "../types"; export function rebuildRequest(request: Request, init: CwRequestInit) { request = request.clone(); diff --git a/tsup.config.ts b/tsup.config.ts index 98deb49..1834374 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -1,8 +1,9 @@ +import { readFile } from "node:fs/promises"; + import type { Options } from "tsup"; import { defineConfig } from "tsup"; const CONFIG_LOADER_RE = /^virtual:config-loader$/; -const js = String.raw; const outExtension: Options["outExtension"] = ({ options }) => { const formatExtension = options.minify ? ".min" : ""; @@ -12,69 +13,41 @@ const outExtension: Options["outExtension"] = ({ options }) => { }; }; -export default defineConfig([ - { - entry: { - index: "src/index.ts", - }, - target: "esnext", - format: "esm", - dts: true, - outExtension, - esbuildPlugins: [ - { - name: "replace-config-loader", - setup(build) { - build.onResolve({ filter: CONFIG_LOADER_RE }, (args) => ({ - path: args.path, - namespace: "config-loader", - })); - - build.onLoad( - { filter: CONFIG_LOADER_RE, namespace: "config-loader" }, - () => ({ - contents: js` -export const loadConfig = JSON.parse; -export const configFile = "/config.json";`, - loader: "js", - }), - ); - }, - }, - ], +const buildEntry = (name: string, loaderFilePath: string): Options => ({ + entry: { + [name]: "src/index.ts", }, - { - entry: { - "with-yaml": "src/index.ts", - }, - target: "esnext", - format: "esm", - dts: true, - outExtension, - esbuildPlugins: [ - { - name: "replace-config-loader", - setup(build) { - build.onResolve({ filter: CONFIG_LOADER_RE }, (args) => ({ - path: args.path, - namespace: "config-loader", - })); + target: "esnext", + format: "esm", + dts: true, + outExtension, + esbuildPlugins: [ + { + name: "replace-config-loader", + setup(build) { + build.onResolve({ filter: CONFIG_LOADER_RE }, (args) => ({ + path: args.path, + namespace: "config-loader", + })); - build.onLoad( - { filter: CONFIG_LOADER_RE, namespace: "config-loader" }, - () => ({ - contents: js` -import { load } from "js-yaml"; + build.onLoad( + { filter: CONFIG_LOADER_RE, namespace: "config-loader" }, + async () => { + const contents = await readFile(loaderFilePath); -export const loadConfig = load; -export const configFile = "/config.yaml"; -`, - resolveDir: "node_modules", + return { + contents, loader: "js", - }), - ); - }, + resolveDir: "node_modules", + }; + }, + ); }, - ], - }, + }, + ], +}); + +export default defineConfig([ + buildEntry("index", "./src/loaders/json.ts"), + buildEntry("with-yaml", "./src/loaders/yaml.ts"), ]); From 408cc6f29945e668d7cb9f7040bcbbf3698685f1 Mon Sep 17 00:00:00 2001 From: so1ve Date: Tue, 27 Feb 2024 16:09:10 +0800 Subject: [PATCH 13/17] refactor --- tsup.config.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tsup.config.ts b/tsup.config.ts index 1834374..2367350 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -5,14 +5,6 @@ import { defineConfig } from "tsup"; const CONFIG_LOADER_RE = /^virtual:config-loader$/; -const outExtension: Options["outExtension"] = ({ options }) => { - const formatExtension = options.minify ? ".min" : ""; - - return { - js: `${formatExtension}.js`, - }; -}; - const buildEntry = (name: string, loaderFilePath: string): Options => ({ entry: { [name]: "src/index.ts", @@ -20,7 +12,13 @@ const buildEntry = (name: string, loaderFilePath: string): Options => ({ target: "esnext", format: "esm", dts: true, - outExtension, + outExtension: ({ options }) => { + const formatExtension = options.minify ? ".min" : ""; + + return { + js: `${formatExtension}.js`, + }; + }, esbuildPlugins: [ { name: "replace-config-loader", From ca91c47b410d1918f8544c8fb04607f3e5eab616 Mon Sep 17 00:00:00 2001 From: so1ve Date: Tue, 27 Feb 2024 17:41:20 +0800 Subject: [PATCH 14/17] schema wip --- package.json | 3 +- pnpm-lock.yaml | 33 ++ schema/config.schema.json | 259 ++++++++++++++++ scripts/build-schema.ts | 19 ++ src/handler.ts | 506 +++++++++++++++++++++++++++++++ src/types/config.ts | 59 ++++ src/{types.ts => types/index.ts} | 0 7 files changed, 878 insertions(+), 1 deletion(-) create mode 100644 schema/config.schema.json create mode 100644 scripts/build-schema.ts create mode 100644 src/handler.ts create mode 100644 src/types/config.ts rename src/{types.ts => types/index.ts} (100%) diff --git a/package.json b/package.json index 4638c13..7bc468e 100644 --- a/package.json +++ b/package.json @@ -51,11 +51,11 @@ "scripts": { "build": "rimraf dist && tsup && nr build:minify", "build:minify": "tsup --minify", + "build:schema": "tsx scripts/build-schema.ts", "lint": "eslint . && prettier . --check", "lint:fix": "eslint . --fix && prettier . --write", "prepublishOnly": "nr build", "release": "bumpp --commit --push --tag && pnpm publish", - "start": "tsx src/index.ts", "test": "vitest", "typecheck": "tsc --noEmit", "watch": "nr build --watch" @@ -72,6 +72,7 @@ "prettier": "^3.0.3", "rimraf": "^5.0.5", "tiny-request-router": "^1.2.2", + "ts-json-schema-generator": "^1.5.0", "tsup": "^8.0.2", "tsx": "^3.13.0", "type-fest": "^4.10.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b878219..70eeb49 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,9 @@ devDependencies: tiny-request-router: specifier: ^1.2.2 version: 1.2.2 + ts-json-schema-generator: + specifier: ^1.5.0 + version: 1.5.0 tsup: specifier: ^8.0.2 version: 8.0.2(typescript@5.3.3) @@ -1994,6 +1997,11 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true + /commander@11.1.0: + resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} + engines: {node: '>=16'} + dev: true + /commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} @@ -3796,6 +3804,12 @@ packages: minimist: 1.2.8 dev: true + /json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + dev: true + /jsonc-eslint-parser@2.4.0: resolution: {integrity: sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5169,6 +5183,11 @@ packages: is-regex: 1.1.4 dev: true + /safe-stable-stringify@2.4.3: + resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} + engines: {node: '>=10'} + dev: true + /sass-formatter@0.7.9: resolution: {integrity: sha512-CWZ8XiSim+fJVG0cFLStwDvft1VI7uvXdCNJYXhDvowiv+DsbD1nXLiQ4zrE5UBvj5DWZJ93cwN0NX5PMsr1Pw==} dependencies: @@ -5616,6 +5635,20 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true + /ts-json-schema-generator@1.5.0: + resolution: {integrity: sha512-RkiaJ6YxGc5EWVPfyHxszTmpGxX8HC2XBvcFlAl1zcvpOG4tjjh+eXioStXJQYTvr9MoK8zCOWzAUlko3K0DiA==} + engines: {node: '>=10.0.0'} + hasBin: true + dependencies: + '@types/json-schema': 7.0.15 + commander: 11.1.0 + glob: 8.1.0 + json5: 2.2.3 + normalize-path: 3.0.0 + safe-stable-stringify: 2.4.3 + typescript: 5.3.3 + dev: true + /tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} dependencies: diff --git a/schema/config.schema.json b/schema/config.schema.json new file mode 100644 index 0000000..1f9e165 --- /dev/null +++ b/schema/config.schema.json @@ -0,0 +1,259 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$ref": "#/definitions/RuntimeConfig", + "definitions": { + "RuntimeConfig": { + "type": "object", + "properties": { + "hotpatch": { + "type": "array", + "items": { + "type": "string" + } + }, + "hotconfig": { + "type": "array", + "items": { + "type": "string" + } + }, + "cleaninterval": { + "type": "string" + }, + "catch_rules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "rule": { + "type": "string" + }, + "transform_rules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "redirect": { + "type": "object", + "properties": { + "status": { + "type": "number" + }, + "to": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "return": { + "type": "object", + "properties": { + "body": { + "type": "string" + }, + "header": { + "type": "object", + "properties": { + "ServerProvide": { + "type": "string" + }, + "content-type": { + "type": "string" + } + }, + "required": [ + "ServerProvide", + "content-type" + ] + }, + "status": { + "type": "number" + } + }, + "required": [ + "body", + "header", + "status" + ] + }, + "fetch": { + "type": "object", + "properties": { + "redirect": { + "type": "string", + "enum": [ + "error", + "follow", + "manual" + ] + }, + "status": { + "type": "number" + }, + "credentials": { + "type": "string", + "enum": [ + "same-origin", + "include", + "omit" + ] + }, + "trylimit": { + "type": "number" + }, + "mode": { + "type": "string", + "enum": [ + "same-origin", + "cors", + "navigate", + "no-cors" + ] + }, + "timeout": { + "type": "number" + }, + "cache": { + "type": "object", + "properties": { + "enable": { + "type": "boolean" + }, + "delay": { + "type": "number" + }, + "expire": { + "type": "string" + } + }, + "required": [ + "expire" + ] + }, + "threads": { + "type": "number" + }, + "enable": { + "type": "boolean" + }, + "engine": { + "type": "string", + "enum": [ + "fetch", + "crazy", + "classic", + "parallel", + "KFCThursdayVW50" + ] + }, + "preflight": { + "type": "boolean" + } + }, + "required": [ + "engine", + "preflight" + ] + }, + "script": { + "type": "object", + "properties": { + "function": { + "type": "string" + }, + "name": { + "type": "string" + }, + "skip": { + "type": "boolean" + } + }, + "required": [ + "skip" + ] + }, + "header": { + "type": "object", + "properties": { + "ServerProvide": { + "type": "string" + }, + "content-type": { + "type": "string" + } + }, + "required": [ + "ServerProvide", + "content-type" + ] + }, + "searchin": { + "type": "string" + }, + "replace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "type": "string", + "enum": [ + "fetch", + "redirect", + "return", + "script", + "skip" + ] + }, + "searchkey": { + "type": "string" + }, + "replacein": { + "type": "string" + }, + "replacekey": { + "type": "string" + }, + "searchflags": { + "type": "string" + }, + "replaceflags": { + "type": "string" + }, + "search": { + "type": "string" + } + }, + "required": [ + "search" + ] + } + } + }, + "required": [ + "rule", + "transform_rules" + ] + } + }, + "name": { + "type": "string" + } + }, + "required": [ + "catch_rules", + "name" + ] + } + } +} \ No newline at end of file diff --git a/scripts/build-schema.ts b/scripts/build-schema.ts new file mode 100644 index 0000000..c5877ea --- /dev/null +++ b/scripts/build-schema.ts @@ -0,0 +1,19 @@ +import fs from "node:fs/promises"; + +import type { Config } from "ts-json-schema-generator"; +import { createGenerator } from "ts-json-schema-generator"; + +const config: Config = { + path: "./src/types/config.ts", + tsconfig: "./tsconfig.json", + type: "*", + additionalProperties: true, +}; + +const outPath = "./schemas/config.schema.json"; + +const schema = createGenerator(config).createSchema(config.type); + +const schemaString = JSON.stringify(schema, null, "\t"); + +await fs.writeFile(outPath, schemaString); diff --git a/src/handler.ts b/src/handler.ts new file mode 100644 index 0000000..7ab00b4 --- /dev/null +++ b/src/handler.ts @@ -0,0 +1,506 @@ +import { CacheDB } from "./utils/cache-db"; +import { RuntimeConfig } from "./types/config"; +import * as logger from "./utils/logger"; +import { rebuildRequest, rebuildResponse } from "./utils/rebuild"; +import { handleRoutes } from "./routes"; +import { + engineCrazy, + engineFetch, + engineKFCThursdayVW50, + engineParallel, +} from "./engine"; + +const clientworkerhandle = async (request: Request) => { + //当前域 new Request('').url + const domain = new URL(new Request("").url).host; + const db = new CacheDB(); + + let tReq = request; + const urlStr = tReq.url.toString(); + const urlObj = new URL(urlStr); + const pathname = urlObj.pathname; + if (pathname.split("/")[1] === "cw-cgi") { + return router_cgi(request); + } + const config = await db.read("config", { + type: "json", + }); + if (!config) { + return fetch(request); + } + + let tFetched = false; + let EngineFetch = false; + let fetchConfig: + | RuntimeConfig["catch_rules"][number]["transform_rules"][number]["fetch"] + | undefined = undefined; + let EngineFetchList: Request[] = []; + let tRes = new Response(); + for (let catch_rule of config.catch_rules) { + if (catch_rule.rule === "_") { + catch_rule.rule = domain; + } + if (!tReq.url.match(new RegExp(catch_rule.rule))) { + continue; + } + + for (let transform_rule of catch_rule.transform_rules) { + let tSearched = false; + + if (transform_rule.search === "_") { + transform_rule.search = catch_rule.rule; + } + switch (transform_rule.searchin || "url") { + case "url": + if ( + tReq.url.match( + new RegExp(transform_rule.search, transform_rule.searchflags), + ) + ) { + tSearched = true; + } + break; + case "header": + if ( + tReq.headers + .get(transform_rule.searchkey!)! + .match( + new RegExp(transform_rule.search, transform_rule.searchflags), + ) + ) { + tSearched = true; + } + break; + case "status": + if (!tFetched) { + logger.warning( + `${tReq.url} is not fetched yet,the status rule are ignored`, + ); + break; + } + if ( + String(tRes.status).match( + new RegExp(transform_rule.search, transform_rule.searchflags), + ) + ) { + tSearched = true; + } + break; + case "statusText": + if (!tFetched) { + logger.warning( + `${tReq.url} is not fetched yet,the statusText rule are ignored`, + ); + break; + } + if ( + tRes.statusText.match( + new RegExp(transform_rule.search, transform_rule.searchflags), + ) + ) { + tSearched = true; + } + break; + case "body": + if (!tFetched) { + logger.warning( + `${tReq.url} is not fetched yet,the body rule are ignored`, + ); + break; + } + if ( + (await tRes.clone().text()).match( + new RegExp(transform_rule.search, transform_rule.searchflags), + ) + ) { + tSearched = true; + } + break; + default: + logger.error( + `${tReq.url} the ${transform_rule.searchin} search rule are not supported`, + ); + break; + } + + switch (transform_rule.replacein || "url") { + case "url": + if (tFetched && tSearched) { + logger.warning( + `${tReq.url} is already fetched,the url transform rule:${transform_rule.search} are ignored`, + ); + break; + } + if (typeof transform_rule.replace !== "undefined" && tSearched) { + if (typeof transform_rule.replace === "string") { + if (EngineFetch) { + logger.warning( + `EngineFetch Disabled for ${tReq.url},the request will downgrade to normal fetch`, + ); + } + tReq = rebuildRequest(tReq, { + url: tReq.url.replace( + new RegExp( + transform_rule.replacekey || transform_rule.search, + transform_rule.replaceflags, + ), + transform_rule.replace, + ), + }); + EngineFetch = false; + } else { + if (EngineFetch) { + logger.warning( + `Replacement cannot be used for ${tReq.url},the request is already powered by fetch-engine `, + ); + break; + } + transform_rule.replace.forEach((replacement) => { + if (replacement === "_") { + EngineFetchList.push(tReq); + return; + } + EngineFetchList.push( + rebuildRequest(tReq, { + url: tReq.url.replace( + new RegExp( + transform_rule.replacekey || transform_rule.search, + transform_rule.replaceflags, + ), + replacement, + ), + }), + ); + }); + + EngineFetch = true; + } + } + break; + case "body": + if (tSearched) { + if (tFetched) { + tRes = rebuildResponse(tRes, { + body: (await tRes.clone().text()).replace( + new RegExp( + transform_rule.replacekey || transform_rule.search, + transform_rule.replaceflags, + ), + transform_rule.replace as string, + ), + }); + } else { + tReq = rebuildRequest(tReq, { + body: (await tReq.clone().text()).replace( + new RegExp( + transform_rule.replacekey || transform_rule.search, + transform_rule.replaceflags, + ), + transform_rule.replace as string, + ), + }); + } + } + break; + + case "status": + if (typeof transform_rule.replace === "string" && tSearched) { + tRes = rebuildResponse(tRes, { + status: Number( + tRes.status + .toString() + .replace( + new RegExp( + transform_rule.replacekey || transform_rule.search, + transform_rule.replaceflags, + ), + transform_rule.replace, + ), + ), + }); + } + break; + case "statusText": + if (typeof transform_rule.replace === "string" && tSearched) { + tRes = rebuildResponse(tRes, { + statusText: tRes.statusText.replace( + new RegExp( + transform_rule.replacekey || transform_rule.search, + transform_rule.replaceflags, + ), + transform_rule.replace, + ), + }); + } + break; + default: + logger.error( + `${tReq.url} the ${transform_rule.replacein} replace rule are not supported`, + ); + } + if (!tSearched) { + continue; + } + if (typeof transform_rule.header === "object") { + Object.entries(transform_rule.header).forEach(([header, val]) => { + if (tFetched) { + tRes = rebuildResponse(tRes, { + headers: { [header]: val }, + }); + } else { + tReq = rebuildRequest(tReq, { + headers: { [header]: val }, + }); + } + }); + } + + if (typeof transform_rule.action !== "undefined") { + switch (transform_rule.action) { + case "skip": + return fetch(request); + case "fetch": + if (tFetched) { + logger.warning( + `${tReq.url} is already fetched,the fetch action are ignored`, + ); + break; + } + if (typeof transform_rule.fetch === "undefined") { + logger.error(`Fetch Config is not defined for ${tReq.url}`); + break; + } + + fetchConfig = { + status: transform_rule.fetch.status, + mode: transform_rule.fetch.mode as RequestMode | undefined, + credentials: transform_rule.fetch.credentials as + | RequestCredentials + | undefined, + redirect: transform_rule.fetch.redirect as + | RequestRedirect + | undefined, + timeout: transform_rule.fetch.timeout, + threads: transform_rule.fetch.threads, + trylimit: transform_rule.fetch.trylimit, + engine: transform_rule.fetch.engine, + preflight: transform_rule.fetch.preflight, + }; + if (!transform_rule.fetch.preflight) { + tReq = new Request(tReq.url, { + method: ((method) => { + if ( + method === "GET" || + method === "HEAD" || + method === "POST" + ) { + return method; + } + return "GET"; + })(tReq.method), + body: ((body) => { + if (tReq.method === "POST") { + return body; + } + return null; + })(tReq.body), + }); //https://segmentfault.com/a/1190000006095018 + delete fetchConfig!.credentials; + //fetchConfig.mode = "cors" + for (var eReq in EngineFetchList) { + EngineFetchList[eReq] = new Request( + EngineFetchList[eReq].url, + tReq, + ); + } + } + + tRes = await new Promise(async (res, rej) => { + const EngineFetcher = async (): Promise => { + let cRes: Response; + return new Promise(async (resolve, reject) => { + if (!EngineFetch) { + switch (transform_rule.fetch?.engine || "fetch") { + case "fetch": + cRes = await engineFetch(tReq, fetchConfig!); + break; + case "crazy": + cRes = await engineCrazy(tReq, fetchConfig!); + break; + default: + logger.error( + `${tReq.url} the ${transform_rule.fetch?.engine} engine are not supported`, + ); + break; + } + } else { + switch (transform_rule.fetch?.engine || "parallel") { + case "classic": + cRes = await engineCrazy(EngineFetchList, fetchConfig!); + break; + case "parallel": + cRes = await engineParallel( + EngineFetchList, + fetchConfig!, + ); + break; + case "KFCThursdayVW50": + if (new Date().getDay() === 4) { + logger.error( + `VW50! The Best Fetch Engine in the World Said!`, + ); + } + cRes = await engineKFCThursdayVW50( + EngineFetchList, + fetchConfig!, + ); + break; + default: + logger.error( + `Fetch Engine ${transform_rule.fetch?.engine} is not supported`, + ); + break; + } + } + if ( + typeof transform_rule.fetch?.cache === "object" && + cRes.status === (transform_rule.fetch?.status || 200) + ) { + cRes = rebuildResponse(cRes, { + headers: { + ClientWorker_ExpireTime: ( + new Date().getTime() + + Number(eval(transform_rule.fetch.cache.expire || "0")) + ).toString(), + }, + }); + caches.open("ClientWorker_ResponseCache").then((cache) => { + cache.put(tReq, cRes.clone()).then(() => { + resolve(cRes); + }); + }); + } else { + resolve(cRes); + } + }); + }; + if (typeof transform_rule.fetch?.cache === "object") { + caches.open("ClientWorker_ResponseCache").then((cache) => { + cache.match(tReq).then((cRes) => { + if (!!cRes) { + if ( + Number(cRes.headers.get("ClientWorker_ExpireTime")) > + new Date().getTime() + ) { + logger.success(`${tReq.url} is fetched from cache`); + res(cRes); + return; + } else { + logger.warning(`${tReq.url} is expired.`); + res( + Promise.any([ + EngineFetcher(), + new Promise(async (resolve, reject) => { + setTimeout(() => { + logger.error( + `${tReq.url} is too late to fetch,even though the cache has expired,so return by cache`, + ); + resolve(cRes); + return; + }, transform_rule.fetch?.cache?.delay || 3000); + }), + ]), + ); + } + } else { + logger.warning( + `${tReq.url} is not cached!And it is too late to fetch!`, + ); + res(EngineFetcher()); + } + }); + }); + } else { + res(EngineFetcher()); + } + }); + tFetched = true; + break; + case "redirect": + if (typeof transform_rule.redirect === "undefined") { + logger.error(`Redirect Config is not defined for ${tReq.url}`); + break; + } + if (typeof transform_rule.redirect.url === "string") { + return Response.redirect( + transform_rule.redirect.url, + transform_rule.redirect.status || 301, + ); + } + return Response.redirect( + tReq.url.replace( + new RegExp(transform_rule.search), + transform_rule.redirect.to!, + ), + transform_rule.redirect.status || 301, + ); + case "return": + if (typeof transform_rule.return === "undefined") { + transform_rule.return = { + body: "Error!", + status: 503, + header: { ServerProvide: "", "content-type": "text/plain" }, + }; + } + return new Response(transform_rule.return.body || "Error!", { + status: transform_rule.return.status || 503, + headers: transform_rule.return.header || {}, + }); + case "script": + if (typeof transform_rule.script === "undefined") { + logger.error(`Script Config is not defined for ${tReq.url}`); + break; + } + if (typeof transform_rule.script.function === "string") { + const ClientWorkerAnonymousFunctionName = `ClientWorker_AnonymousFunction_${new Date().getTime()}`; + // @ts-ignore + self[ClientWorkerAnonymousFunctionName] = eval( + transform_rule.script.function, + ); + transform_rule.script.name = ClientWorkerAnonymousFunctionName; + } + const ScriptAns = await Function( + "return (" + transform_rule.script.name + ")", + )()({ + fetched: tFetched, + request: tReq, + response: tRes, + }); + + if (ScriptAns.fetched) { + if (transform_rule.script.skip || false) { + return ScriptAns.response; + } + tFetched = true; + tRes = ScriptAns.response; + } else { + tReq = ScriptAns.request; + } + break; + default: + logger.warning( + `This Action:${transform_rule.action} is not supported yet`, + ); + break; + } + } + } + } + if (!tFetched) { + //3.0.0 默认改为skip + return fetch(request); + } + + return tRes; +}; +export default clientworkerhandle; diff --git a/src/types/config.ts b/src/types/config.ts new file mode 100644 index 0000000..8612ffb --- /dev/null +++ b/src/types/config.ts @@ -0,0 +1,59 @@ +export type RuntimeConfig = { + hotpatch?: string[]; + hotconfig?: string[]; + cleaninterval?: string; + catch_rules: { + rule: string; + transform_rules: { + redirect?: { + status?: number; + to?: string; + url?: string; + }; + return?: { + body: string; + header: { + ServerProvide: string; + "content-type": string; + }; + status: number; + }; + fetch?: { + redirect?: "error" | "follow" | "manual"; + status?: number; + credentials?: "same-origin" | "include" | "omit"; + trylimit?: number; + mode?: "same-origin" | "cors" | "navigate" | "no-cors"; + timeout?: number; + cache?: { + enable?: boolean; + delay?: number; + expire: string; + }; + threads?: number; + enable?: boolean; + engine: "fetch" | "crazy" | "classic" | "parallel" | "KFCThursdayVW50"; + preflight: boolean; + }; + script?: { + function?: string; + name?: string; + skip: boolean; + }; + header?: { + ServerProvide: string; + "content-type": string; + }; + searchin?: string; + replace?: string | string[]; + action?: "fetch" | "redirect" | "return" | "script" | "skip"; + searchkey?: string; + replacein?: string; + replacekey?: string; + searchflags?: string; + replaceflags?: string; + search: string; + }[]; + }[]; + name: string; +}; diff --git a/src/types.ts b/src/types/index.ts similarity index 100% rename from src/types.ts rename to src/types/index.ts From 8593a0c2072d1f94c28af3de95c8f4dafff12769 Mon Sep 17 00:00:00 2001 From: so1ve Date: Thu, 29 Feb 2024 16:58:58 +0800 Subject: [PATCH 15/17] wip --- .gitignore | 1 + .vscode/settings.json | 5 +- doc/.gitignore | 1 - doc/package.json | 18 - {doc/docs => docs}/.vitepress/config.js | 4 +- {doc/docs => docs}/example/autoupdate.md | 0 {doc/docs => docs}/example/autowebp.md | 0 {doc/docs => docs}/example/forward.md | 0 {doc/docs => docs}/example/parallelcdn.md | 0 {doc/docs => docs}/ext/api.md | 0 {doc/docs => docs}/ext/autoclean.md | 0 {doc/docs => docs}/ext/engine.md | 0 {doc/docs => docs}/ext/hotupdate.md | 0 {doc/docs => docs}/index.md | 0 {static => docs/public}/404.html | 0 {static => docs/public}/autoupdate.js | 2 +- {static => docs/public}/config.yaml | 0 docs/public/cw.js | 58 ++ {doc/docs => docs}/rule/fetch.md | 0 {doc/docs => docs}/rule/header.md | 0 {doc/docs => docs}/rule/index.md | 0 {doc/docs => docs}/rule/redirect.md | 0 {doc/docs => docs}/rule/replace.md | 0 {doc/docs => docs}/rule/return.md | 0 {doc/docs => docs}/rule/script.md | 0 {doc/docs => docs}/rule/skip.md | 0 {doc/docs => docs}/start.md | 0 {doc/docs => docs}/timefunction.md | 0 eslint.config.js | 4 +- package.json | 12 +- pnpm-lock.yaml | 1026 +++++++++++++++++---- src/cgi/index.ts | 518 +++++++++++ src/{ => cgi}/routes.ts | 13 +- src/engine.ts | 9 +- src/handler.ts | 506 ---------- src/index.ts | 92 +- src/types/config.ts | 8 +- src/types/index.ts | 1 + src/utils/rebuild.ts | 2 +- static/config.schema.json | 242 ----- 40 files changed, 1494 insertions(+), 1028 deletions(-) delete mode 100644 doc/.gitignore delete mode 100644 doc/package.json rename {doc/docs => docs}/.vitepress/config.js (95%) rename {doc/docs => docs}/example/autoupdate.md (100%) rename {doc/docs => docs}/example/autowebp.md (100%) rename {doc/docs => docs}/example/forward.md (100%) rename {doc/docs => docs}/example/parallelcdn.md (100%) rename {doc/docs => docs}/ext/api.md (100%) rename {doc/docs => docs}/ext/autoclean.md (100%) rename {doc/docs => docs}/ext/engine.md (100%) rename {doc/docs => docs}/ext/hotupdate.md (100%) rename {doc/docs => docs}/index.md (100%) rename {static => docs/public}/404.html (100%) rename {static => docs/public}/autoupdate.js (97%) rename {static => docs/public}/config.yaml (100%) create mode 100644 docs/public/cw.js rename {doc/docs => docs}/rule/fetch.md (100%) rename {doc/docs => docs}/rule/header.md (100%) rename {doc/docs => docs}/rule/index.md (100%) rename {doc/docs => docs}/rule/redirect.md (100%) rename {doc/docs => docs}/rule/replace.md (100%) rename {doc/docs => docs}/rule/return.md (100%) rename {doc/docs => docs}/rule/script.md (100%) rename {doc/docs => docs}/rule/skip.md (100%) rename {doc/docs => docs}/start.md (100%) rename {doc/docs => docs}/timefunction.md (100%) create mode 100644 src/cgi/index.ts rename src/{ => cgi}/routes.ts (86%) delete mode 100644 src/handler.ts delete mode 100644 static/config.schema.json diff --git a/.gitignore b/.gitignore index 95f9ee9..f6a33e1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ lib-cov logs node_modules temp +docs/.vitepress/cache diff --git a/.vscode/settings.json b/.vscode/settings.json index a2337a0..d17c1c2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,7 @@ { "typescript.tsdk": "node_modules/typescript/lib", - "eslint.experimental.useFlatConfig": true + "eslint.experimental.useFlatConfig": true, + "yaml.schemas": { + "./schema/config.schema.json": "/config.yaml" + } } diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index b512c09..0000000 --- a/doc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/doc/package.json b/doc/package.json deleted file mode 100644 index 589e392..0000000 --- a/doc/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "clientworker-doc", - "version": "0.0.0", - "author": "", - "type": "commonjs", - "description": "", - "license": "ISC", - "main": "index.js", - "scripts": { - "docs:build": "vitepress build docs", - "docs:dev": "vitepress dev docs --host 0.0.0.0", - "docs:serve": "vitepress serve docs", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "directories": { - "doc": "docs" - } -} diff --git a/doc/docs/.vitepress/config.js b/docs/.vitepress/config.js similarity index 95% rename from doc/docs/.vitepress/config.js rename to docs/.vitepress/config.js index 4e37466..47ea35d 100644 --- a/doc/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -1,5 +1,3 @@ -import cwpkgjson from "../../../package.json"; - export default { title: "ClientWorker", description: "一个基于规则的前端路由拦截器", @@ -26,7 +24,7 @@ export default { [ "script", { - src: `https://npmm/clientworker@${cwpkgjson.version}/dist/autoupdate.js`, + src: "/autoupdate.js", }, ], ], diff --git a/doc/docs/example/autoupdate.md b/docs/example/autoupdate.md similarity index 100% rename from doc/docs/example/autoupdate.md rename to docs/example/autoupdate.md diff --git a/doc/docs/example/autowebp.md b/docs/example/autowebp.md similarity index 100% rename from doc/docs/example/autowebp.md rename to docs/example/autowebp.md diff --git a/doc/docs/example/forward.md b/docs/example/forward.md similarity index 100% rename from doc/docs/example/forward.md rename to docs/example/forward.md diff --git a/doc/docs/example/parallelcdn.md b/docs/example/parallelcdn.md similarity index 100% rename from doc/docs/example/parallelcdn.md rename to docs/example/parallelcdn.md diff --git a/doc/docs/ext/api.md b/docs/ext/api.md similarity index 100% rename from doc/docs/ext/api.md rename to docs/ext/api.md diff --git a/doc/docs/ext/autoclean.md b/docs/ext/autoclean.md similarity index 100% rename from doc/docs/ext/autoclean.md rename to docs/ext/autoclean.md diff --git a/doc/docs/ext/engine.md b/docs/ext/engine.md similarity index 100% rename from doc/docs/ext/engine.md rename to docs/ext/engine.md diff --git a/doc/docs/ext/hotupdate.md b/docs/ext/hotupdate.md similarity index 100% rename from doc/docs/ext/hotupdate.md rename to docs/ext/hotupdate.md diff --git a/doc/docs/index.md b/docs/index.md similarity index 100% rename from doc/docs/index.md rename to docs/index.md diff --git a/static/404.html b/docs/public/404.html similarity index 100% rename from static/404.html rename to docs/public/404.html diff --git a/static/autoupdate.js b/docs/public/autoupdate.js similarity index 97% rename from static/autoupdate.js rename to docs/public/autoupdate.js index 5a73764..adc29be 100644 --- a/static/autoupdate.js +++ b/docs/public/autoupdate.js @@ -29,7 +29,7 @@ } } async function updateConfig() { - await fetch("/cw-cgi/api?type=config") + await fetch("/cw-cgi/api/config") .then((res) => res.text()) .then((res) => { if (res === "ok") { diff --git a/static/config.yaml b/docs/public/config.yaml similarity index 100% rename from static/config.yaml rename to docs/public/config.yaml diff --git a/docs/public/cw.js b/docs/public/cw.js new file mode 100644 index 0000000..01c32f1 --- /dev/null +++ b/docs/public/cw.js @@ -0,0 +1,58 @@ +var j="4.0.0";var te="/cw-cgi";var Q=(e,r,n)=>i=>{console.log(`%c[${e}]%c ${i}`,`color:${r};background:${n};`,"")},W=Q("SUCCESS","white","green"),C=Q("WARNING","brown","yellow"),ft=Q("INFO","white","blue"),_=Q("ERROR","white","red"),st=Q("DEBUG","white","black");function L(e,r){e=e.clone(),e.mode==="navigate"&&C("You can't rebuild a POST method with body when it is a navigate request.ClientWorker will ignore it's body");let n=new Request(e,{headers:Se(e,r.headers),method:r.method??e.method,mode:e.mode==="navigate"?"same-origin":r.mode??e.mode,credentials:r.credentials??e.credentials,redirect:r.redirect??e.redirect});return r.url&&(n=new Request(r.url,n)),n}function N(e,r={}){return e.type==="opaque"?(_("You can't rebuild a opaque response.ClientWorker will ignore this build"),e):new Response(e.body,{headers:Se(e,r.headers),status:r.status??e.status,statusText:r.statusText??e.statusText})}function Se(e,r){if(!r)return new Headers(e.headers);let n=new Headers(e.headers);for(let i in r)i in r?n.set(i,r[i]):n.delete(i);return n}var Y=e=>new Response(`504 All gateways failed, ClientWorker shows this page. (Engine ${e})`,{status:504,statusText:"504 All Gateways Timeout"}),le=Object.freeze({threads:4,trylimit:10,status:200,timeout:5e3,redirect:"follow"}),Z=async(e,r)=>(r={status:200,timeout:5e3,redirect:"follow",...r},await fetch(e,{mode:r.mode,credentials:r.credentials,redirect:r.redirect})),de=async(e,r)=>{r={...le,...r};let n=new AbortController,i=await fetch(e,{signal:n.signal,mode:r.mode,credentials:r.credentials,redirect:r.redirect}),t=i.headers,o=Number.parseInt(t.get("Content-Length"));if(i.status===r.status)return Y("Crazy");if(n.abort(),!o||o{let c=1;async function h(){c+=1;let d=L(e,{headers:{Range:`bytes=${f*l}-${(f+1)*l-1}`},url:e.url});return fetch(d,{mode:r.mode,credentials:r.credentials,redirect:r.redirect}).then(y=>y.arrayBuffer()).catch(y=>(c>=r.trylimit&&p(y),h()))}s(h())}));let u=await Promise.all(a);return setTimeout(()=>{throw Y("Crazy")},r.timeout),new Response(new Blob(u),{headers:t,status:200,statusText:"OK"})},ke=async(e,r)=>{if(r={...le,...r},e.length===0)throw new Error("Engine Classic: No request to fetch.");if(e.length===1)return C("Engine Classic: only one request, this request will downgrade to normal fetch."),Z(e[0],r);let n=new AbortController;setTimeout(()=>{throw Y("Classic")},r.timeout);let i=e.map(async t=>{try{let o=await fetch(t,{signal:n.signal,mode:r.mode,credentials:r.credentials,redirect:r.redirect}),l=await o.arrayBuffer(),a=new Response(l,{status:o.status,headers:o.headers,statusText:o.statusText});if(a.status===r.status)return n.abort(),a}catch(o){o==="DOMException: The user aborted a request."&&console.log()}});return await Promise.any(i)},X=async(e,r)=>{if(r={...le,...r},e.length===0)throw new Error("Engine Parallel: No request to fetch.");if(e.length===1)return C("Engine Parallel: only one request, this request will downgrade to normal fetch."),Z(e[0],r);let n=new Event("abortOtherInstance"),i=new EventTarget,t=e.map(async o=>{let l=new AbortController,a=!1;i.addEventListener(n.type,()=>{a||l.abort()});try{let u=await fetch(o,{signal:l.signal,mode:r.mode,credentials:r.credentials,redirect:r.redirect});if(r.status&&u.status===r.status)return a=!0,i.dispatchEvent(n),N(u)}catch(u){u==="DOMException: The user aborted a request."&&console.log()}});return setTimeout(()=>{throw Y("Parallel")},r.timeout),await Promise.any(t)},Oe=async(e,r)=>{if(r={...le,timeout:3e4,...r},e.length===0)throw new Error("Engine KFCThursdayVW50: No request to fetch.");if(e.length===1)return C("Engine KFCThursdayVW50: only one request, this request will downgrade to engine crazy."),de(e[0],r);let n=new AbortController,i=await X(e,{signal:n.signal,mode:r.mode,credentials:r.credentials,redirect:r.redirect,timeout:r.timeout}),t=i.headers,o=Number.parseInt(t.get("Content-Length"));if(i.status===r.status)throw Y("KFCThursdayVW50");if(n.abort(),!o||o{let p=1;async function c(){p+=1;let h=[];for(let d of e)h.push(L(d,{headers:{Range:`bytes=${u*l}-${(u+1)*l-1}`},url:d.url}));return X(h,{mode:r.mode,credentials:r.credentials,redirect:r.redirect,timeout:r.timeout,status:206}).then(d=>d.arrayBuffer()).catch(async d=>(_(`Engine KFCThursdayVW50: ${await d.text()}`),p>=r.trylimit&&s(d),c()))}f(c())}));setTimeout(()=>{throw Y("KFCThursdayVW50")},r.timeout);try{let u=await Promise.all(a);return new Response(new Blob(u),{headers:t,status:200,statusText:"OK"})}catch{throw Y("KFCThursdayVW50")}};var S=class e{constructor(r,n){this.prefix=r;this.cache=n}static async create(r="CacheDBDefaultNameSpace",n="CacheDBDefaultPrefix"){let i=await caches.open(r);return new e(n,i)}generateRequestKey(r){return new Request(`https://${this.prefix}/${encodeURIComponent(r)}`)}async read(r,n={type:"text"}){let i=await this.cache.match(this.generateRequestKey(r));if(!i)return null;switch(n.type){case"json":return i.json();case"arrayBuffer":return i.arrayBuffer();case"blob":return i.blob();default:return i.text()}}async write(r,n,i={type:"text"}){await this.cache.put(this.generateRequestKey(r),new Response(n,{headers:{"Content-Type":kr(i.type)}}))}async delete(r){return await this.cache.delete(this.generateRequestKey(r))}};function kr(e){switch(e){case"json":return"application/json";case"arrayBuffer":case"blob":return"application/octet-stream";default:return"text/plain"}}var D=function(){return D=Object.assign||function(r){for(var n,i=1,t=arguments.length;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||l===95){t+=e[o++];continue}break}if(!t)throw new TypeError("Missing parameter name at "+n);r.push({type:"NAME",index:n,value:t}),n=o;continue}if(i==="("){var a=1,u="",o=n+1;if(e[o]==="?")throw new TypeError('Pattern cannot start with "?" at '+o);for(;o-1:R===void 0;t||(h+="(?:"+c+"(?="+p+"))?"),he||(h+="(?="+c+"|"+p+")")}return new RegExp(h,Ie(n))}function Le(e,r,n){return e instanceof RegExp?Lr(e,r):Array.isArray(e)?Nr(e,r,n):Dr(e,r,n)}var Ne=function(){function e(){this.routes=[]}return e.prototype.all=function(r,n,i){return i===void 0&&(i={}),this._push("ALL",r,n,i)},e.prototype.get=function(r,n,i){return i===void 0&&(i={}),this._push("GET",r,n,i)},e.prototype.post=function(r,n,i){return i===void 0&&(i={}),this._push("POST",r,n,i)},e.prototype.put=function(r,n,i){return i===void 0&&(i={}),this._push("PUT",r,n,i)},e.prototype.patch=function(r,n,i){return i===void 0&&(i={}),this._push("PATCH",r,n,i)},e.prototype.delete=function(r,n,i){return i===void 0&&(i={}),this._push("DELETE",r,n,i)},e.prototype.head=function(r,n,i){return i===void 0&&(i={}),this._push("HEAD",r,n,i)},e.prototype.options=function(r,n,i){return i===void 0&&(i={}),this._push("OPTIONS",r,n,i)},e.prototype.match=function(r,n){for(var i=0,t=this.routes;i"u"||e===null}function Br(e){return typeof e=="object"&&e!==null}function jr(e){return Array.isArray(e)?e:Qe(e)?[]:[e]}function Wr(e,r){var n,i,t,o;if(r)for(o=Object.keys(r),n=0,i=o.length;na&&(o=" ... ",r=i-a+o.length),n-i>a&&(l=" ...",n=i+a-l.length),{str:o+e.slice(r,n).replace(/\t/g,"\u2192")+l,pos:i-r+o.length}}function me(e,r){return A.repeat(" ",r-e.length)+e}function zr(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var n=/\r?\n|\r|\0/g,i=[0],t=[],o,l=-1;o=n.exec(e.buffer);)t.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&l<0&&(l=i.length-2);l<0&&(l=i.length-1);var a="",u,f,s=Math.min(e.line+r.linesAfter,t.length).toString().length,p=r.maxLength-(r.indent+s+3);for(u=1;u<=r.linesBefore&&!(l-u<0);u++)f=ge(e.buffer,i[l-u],t[l-u],e.position-(i[l]-i[l-u]),p),a=A.repeat(" ",r.indent)+me((e.line-u+1).toString(),s)+" | "+f.str+` +`+a;for(f=ge(e.buffer,i[l],t[l],e.position,p),a+=A.repeat(" ",r.indent)+me((e.line+1).toString(),s)+" | "+f.str+` +`,a+=A.repeat("-",r.indent+s+3+f.pos)+`^ +`,u=1;u<=r.linesAfter&&!(l+u>=t.length);u++)f=ge(e.buffer,i[l+u],t[l+u],e.position-(i[l]-i[l+u]),p),a+=A.repeat(" ",r.indent)+me((e.line+u+1).toString(),s)+" | "+f.str+` +`;return a.replace(/\n$/,"")}var Qr=zr,Xr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Zr=["scalar","sequence","mapping"];function Jr(e){var r={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(i){r[String(i)]=n})}),r}function en(e,r){if(r=r||{},Object.keys(r).forEach(function(n){if(Xr.indexOf(n)===-1)throw new T('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(n){return n},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=Jr(r.styleAliases||null),Zr.indexOf(this.kind)===-1)throw new T('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var b=en;function De(e,r){var n=[];return e[r].forEach(function(i){var t=n.length;n.forEach(function(o,l){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(t=l)}),n[t]=i}),n}function rn(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,n;function i(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(r=0,n=arguments.length;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),bn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function En(e){return!(e===null||!bn.test(e)||e[e.length-1]==="_")}function _n(e){var r,n;return r=e.replace(/_/g,"").toLowerCase(),n=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:n*parseFloat(r,10)}var Tn=/^[-+]?[0-9]+e/;function Fn(e,r){var n;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(A.isNegativeZero(e))return"-0.0";return n=e.toString(10),Tn.test(n)?n.replace("e",".e"):n}function Rn(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||A.isNegativeZero(e))}var Sn=new b("tag:yaml.org,2002:float",{kind:"scalar",resolve:En,construct:_n,predicate:Rn,represent:Fn,defaultStyle:"lowercase"}),kn=an.extend({implicit:[sn,gn,Cn,Sn]}),On=kn,Ze=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Je=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function In(e){return e===null?!1:Ze.exec(e)!==null||Je.exec(e)!==null}function Ln(e){var r,n,i,t,o,l,a,u=0,f=null,s,p,c;if(r=Ze.exec(e),r===null&&(r=Je.exec(e)),r===null)throw new Error("Date resolve error");if(n=+r[1],i=+r[2]-1,t=+r[3],!r[4])return new Date(Date.UTC(n,i,t));if(o=+r[4],l=+r[5],a=+r[6],r[7]){for(u=r[7].slice(0,3);u.length<3;)u+="0";u=+u}return r[9]&&(s=+r[10],p=+(r[11]||0),f=(s*60+p)*6e4,r[9]==="-"&&(f=-f)),c=new Date(Date.UTC(n,i,t,o,l,a,u)),f&&c.setTime(c.getTime()-f),c}function Nn(e){return e.toISOString()}var Dn=new b("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:In,construct:Ln,instanceOf:Date,represent:Nn});function Pn(e){return e==="<<"||e===null}var Mn=new b("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Pn}),be=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function Bn(e){if(e===null)return!1;var r,n,i=0,t=e.length,o=be;for(n=0;n64)){if(r<0)return!1;i+=6}return i%8===0}function jn(e){var r,n,i=e.replace(/[\r\n=]/g,""),t=i.length,o=be,l=0,a=[];for(r=0;r>16&255),a.push(l>>8&255),a.push(l&255)),l=l<<6|o.indexOf(i.charAt(r));return n=t%4*6,n===0?(a.push(l>>16&255),a.push(l>>8&255),a.push(l&255)):n===18?(a.push(l>>10&255),a.push(l>>2&255)):n===12&&a.push(l>>4&255),new Uint8Array(a)}function Wn(e){var r="",n=0,i,t,o=e.length,l=be;for(i=0;i>18&63],r+=l[n>>12&63],r+=l[n>>6&63],r+=l[n&63]),n=(n<<8)+e[i];return t=o%3,t===0?(r+=l[n>>18&63],r+=l[n>>12&63],r+=l[n>>6&63],r+=l[n&63]):t===2?(r+=l[n>>10&63],r+=l[n>>4&63],r+=l[n<<2&63],r+=l[64]):t===1&&(r+=l[n>>2&63],r+=l[n<<4&63],r+=l[64],r+=l[64]),r}function Yn(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Hn=new b("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Bn,construct:jn,predicate:Yn,represent:Wn}),$n=Object.prototype.hasOwnProperty,Un=Object.prototype.toString;function qn(e){if(e===null)return!0;var r=[],n,i,t,o,l,a=e;for(n=0,i=a.length;n>10)+55296,(e-65536&1023)+56320)}var or=new Array(256),lr=new Array(256);for(H=0;H<256;H++)or[H]=Be(H)?1:0,lr[H]=Be(H);var H;function fi(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||er,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ar(e,r){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=Qr(n),new T(r,n)}function g(e,r){throw ar(e,r)}function ce(e,r){e.onWarning&&e.onWarning.call(null,ar(e,r))}var je={YAML:function(r,n,i){var t,o,l;r.version!==null&&g(r,"duplication of %YAML directive"),i.length!==1&&g(r,"YAML directive accepts exactly one argument"),t=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),t===null&&g(r,"ill-formed argument of the YAML directive"),o=parseInt(t[1],10),l=parseInt(t[2],10),o!==1&&g(r,"unacceptable YAML version of the document"),r.version=i[0],r.checkLineBreaks=l<2,l!==1&&l!==2&&ce(r,"unsupported YAML version of the document")},TAG:function(r,n,i){var t,o;i.length!==2&&g(r,"TAG directive accepts exactly two arguments"),t=i[0],o=i[1],ir.test(t)||g(r,"ill-formed tag handle (first argument) of the TAG directive"),M.call(r.tagMap,t)&&g(r,'there is a previously declared suffix for "'+t+'" tag handle'),tr.test(o)||g(r,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{g(r,"tag prefix is malformed: "+o)}r.tagMap[t]=o}};function P(e,r,n,i){var t,o,l,a;if(r1&&(e.result+=A.repeat(` +`,r-1))}function si(e,r,n){var i,t,o,l,a,u,f,s,p=e.kind,c=e.result,h;if(h=e.input.charCodeAt(e.position),F(h)||K(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(t=e.input.charCodeAt(e.position+1),F(t)||n&&K(t)))return!1;for(e.kind="scalar",e.result="",o=l=e.position,a=!1;h!==0;){if(h===58){if(t=e.input.charCodeAt(e.position+1),F(t)||n&&K(t))break}else if(h===35){if(i=e.input.charCodeAt(e.position-1),F(i))break}else{if(e.position===e.lineStart&&pe(e)||n&&K(h))break;if(k(h))if(u=e.line,f=e.lineStart,s=e.lineIndent,w(e,!1,-1),e.lineIndent>=r){a=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=l,e.line=u,e.lineStart=f,e.lineIndent=s;break}}a&&(P(e,o,l,!1),_e(e,e.line-u),o=l=e.position,a=!1),$(h)||(l=e.position+1),h=e.input.charCodeAt(++e.position)}return P(e,o,l,!1),e.result?!0:(e.kind=p,e.result=c,!1)}function pi(e,r){var n,i,t;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=t=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(P(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)i=e.position,e.position++,t=e.position;else return!0;else k(n)?(P(e,i,t,!0),_e(e,w(e,!1,r)),i=t=e.position):e.position===e.lineStart&&pe(e)?g(e,"unexpected end of the document within a single quoted scalar"):(e.position++,t=e.position);g(e,"unexpected end of the stream within a single quoted scalar")}function hi(e,r){var n,i,t,o,l,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return P(e,n,e.position,!0),e.position++,!0;if(a===92){if(P(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),k(a))w(e,!1,r);else if(a<256&&or[a])e.result+=lr[a],e.position++;else if((l=ai(a))>0){for(t=l,o=0;t>0;t--)a=e.input.charCodeAt(++e.position),(l=li(a))>=0?o=(o<<4)+l:g(e,"expected hexadecimal character");e.result+=ci(o),e.position++}else g(e,"unknown escape sequence");n=i=e.position}else k(a)?(P(e,n,i,!0),_e(e,w(e,!1,r)),n=i=e.position):e.position===e.lineStart&&pe(e)?g(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}g(e,"unexpected end of the stream within a double quoted scalar")}function di(e,r){var n=!0,i,t,o,l=e.tag,a,u=e.anchor,f,s,p,c,h,d=Object.create(null),y,m,v,x;if(x=e.input.charCodeAt(e.position),x===91)s=93,h=!1,a=[];else if(x===123)s=125,h=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),x=e.input.charCodeAt(++e.position);x!==0;){if(w(e,!0,r),x=e.input.charCodeAt(e.position),x===s)return e.position++,e.tag=l,e.anchor=u,e.kind=h?"mapping":"sequence",e.result=a,!0;n?x===44&&g(e,"expected the node content, but found ','"):g(e,"missed comma between flow collection entries"),m=y=v=null,p=c=!1,x===63&&(f=e.input.charCodeAt(e.position+1),F(f)&&(p=c=!0,e.position++,w(e,!0,r))),i=e.line,t=e.lineStart,o=e.position,V(e,r,ae,!1,!0),m=e.tag,y=e.result,w(e,!0,r),x=e.input.charCodeAt(e.position),(c||e.line===i)&&x===58&&(p=!0,x=e.input.charCodeAt(++e.position),w(e,!0,r),V(e,r,ae,!1,!0),v=e.result),h?G(e,a,d,m,y,v,i,t,o):p?a.push(G(e,null,d,m,y,v,i,t,o)):a.push(y),w(e,!0,r),x=e.input.charCodeAt(e.position),x===44?(n=!0,x=e.input.charCodeAt(++e.position)):n=!1}g(e,"unexpected end of the stream within a flow collection")}function gi(e,r){var n,i,t=xe,o=!1,l=!1,a=r,u=0,f=!1,s,p;if(p=e.input.charCodeAt(e.position),p===124)i=!1;else if(p===62)i=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)xe===t?t=p===43?Pe:ni:g(e,"repeat of a chomping mode identifier");else if((s=ui(p))>=0)s===0?g(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?g(e,"repeat of an indentation width identifier"):(a=r+s-1,l=!0);else break;if($(p)){do p=e.input.charCodeAt(++e.position);while($(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!k(p)&&p!==0)}for(;p!==0;){for(Ee(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!l||e.lineIndenta&&(a=e.lineIndent),k(p)){u++;continue}if(e.lineIndentr)&&u!==0)g(e,"bad indentation of a sequence entry");else if(e.lineIndentr)&&(m&&(l=e.line,a=e.lineStart,u=e.position),V(e,r,ue,!0,t)&&(m?d=e.result:y=e.result),m||(G(e,p,c,h,d,y,l,a,u),h=d=y=null),w(e,!0,-1),x=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>r)&&x!==0)g(e,"bad indentation of a mapping entry");else if(e.lineIndentr?u=1:e.lineIndent===r?u=0:e.lineIndentr?u=1:e.lineIndent===r?u=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),p=0,c=e.implicitTypes.length;p"),e.result!==null&&d.kind!==e.kind&&g(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):g(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||s}function wi(e){var r=e.position,n,i,t,o=!1,l;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(l=e.input.charCodeAt(e.position))!==0&&(w(e,!0,-1),l=e.input.charCodeAt(e.position),!(e.lineIndent>0||l!==37));){for(o=!0,l=e.input.charCodeAt(++e.position),n=e.position;l!==0&&!F(l);)l=e.input.charCodeAt(++e.position);for(i=e.input.slice(n,e.position),t=[],i.length<1&&g(e,"directive name must not be less than one character in length");l!==0;){for(;$(l);)l=e.input.charCodeAt(++e.position);if(l===35){do l=e.input.charCodeAt(++e.position);while(l!==0&&!k(l));break}if(k(l))break;for(n=e.position;l!==0&&!F(l);)l=e.input.charCodeAt(++e.position);t.push(e.input.slice(n,e.position))}l!==0&&Ee(e),M.call(je,i)?je[i](e,i,t):ce(e,'unknown document directive "'+i+'"')}if(w(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,w(e,!0,-1)):o&&g(e,"directives end mark is expected"),V(e,e.lineIndent-1,ue,!1,!0),w(e,!0,-1),e.checkLineBreaks&&ti.test(e.input.slice(r,e.position))&&ce(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&pe(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,w(e,!0,-1));return}if(e.position"u"&&(n=r,r=null);var i=ur(e,n);if(typeof r!="function")return i;for(var t=0,o=i.length;t=55296&&n<=56319&&r+1=56320&&i<=57343)?(n-55296)*1024+i-56320+65536:n}function xr(e){var r=/^\n* /;return r.test(e)}var yr=1,Ae=2,vr=3,wr=4,q=5;function Qi(e,r,n,i,t,o,l,a){var u,f=0,s=null,p=!1,c=!1,h=i!==-1,d=-1,y=Vi(J(e,0))&&zi(J(e,e.length-1));if(r||l)for(u=0;u=65536?u+=2:u++){if(f=J(e,u),!ie(f))return q;y=y&&Ue(f,s,a),s=f}else{for(u=0;u=65536?u+=2:u++){if(f=J(e,u),f===re)p=!0,h&&(c=c||u-d-1>i&&e[d+1]!==" ",d=u);else if(!ie(f))return q;y=y&&Ue(f,s,a),s=f}c=c||h&&u-d-1>i&&e[d+1]!==" "}return!p&&!c?y&&!l&&!t(e)?yr:o===ne?q:Ae:n>9&&xr(e)?q:l?o===ne?q:Ae:c?wr:vr}function Xi(e,r,n,i,t){e.dump=function(){if(r.length===0)return e.quotingType===ne?'""':"''";if(!e.noCompatMode&&(Yi.indexOf(r)!==-1||Hi.test(r)))return e.quotingType===ne?'"'+r+'"':"'"+r+"'";var o=e.indent*Math.max(1,n),l=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),a=i||e.flowLevel>-1&&n>=e.flowLevel;function u(f){return Gi(e,f)}switch(Qi(r,a,e.indent,l,u,e.quotingType,e.forceQuotes&&!i,t)){case yr:return r;case Ae:return"'"+r.replace(/'/g,"''")+"'";case vr:return"|"+qe(r,e.indent)+Ke(He(r,o));case wr:return">"+qe(r,e.indent)+Ke(He(Zi(r,l),o));case q:return'"'+Ji(r)+'"';default:throw new T("impossible error: invalid scalar style")}}()}function qe(e,r){var n=xr(e)?String(r):"",i=e[e.length-1]===` +`,t=i&&(e[e.length-2]===` +`||e===` +`),o=t?"+":i?"":"-";return n+o+` +`}function Ke(e){return e[e.length-1]===` +`?e.slice(0,-1):e}function Zi(e,r){for(var n=/(\n+)([^\n]*)/g,i=function(){var f=e.indexOf(` +`);return f=f!==-1?f:e.length,n.lastIndex=f,Ge(e.slice(0,f),r)}(),t=e[0]===` +`||e[0]===" ",o,l;l=n.exec(e);){var a=l[1],u=l[2];o=u[0]===" ",i+=a+(!t&&!o&&u!==""?` +`:"")+Ge(u,r),t=o}return i}function Ge(e,r){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,i,t=0,o,l=0,a=0,u="";i=n.exec(e);)a=i.index,a-t>r&&(o=l>t?l:a,u+=` +`+e.slice(t,o),t=o+1),l=a;return u+=` +`,e.length-t>r&&l>t?u+=e.slice(t,l)+` +`+e.slice(l+1):u+=e.slice(t),u.slice(1)}function Ji(e){for(var r="",n=0,i,t=0;t=65536?t+=2:t++)n=J(e,t),i=E[n],!i&&ie(n)?(r+=e[t],n>=65536&&(r+=e[t+1])):r+=i||Ui(n);return r}function et(e,r,n){var i="",t=e.tag,o,l,a;for(o=0,l=n.length;o"u"&&I(e,r,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=t,e.dump="["+i+"]"}function Ve(e,r,n,i){var t="",o=e.tag,l,a,u;for(l=0,a=n.length;l"u"&&I(e,r+1,null,!0,!0,!1,!0))&&((!i||t!=="")&&(t+=we(e,r)),e.dump&&re===e.dump.charCodeAt(0)?t+="-":t+="- ",t+=e.dump);e.tag=o,e.dump=t||"[]"}function rt(e,r,n){var i="",t=e.tag,o=Object.keys(n),l,a,u,f,s;for(l=0,a=o.length;l1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),I(e,r,f,!1,!1)&&(s+=e.dump,i+=s));e.tag=t,e.dump="{"+i+"}"}function nt(e,r,n,i){var t="",o=e.tag,l=Object.keys(n),a,u,f,s,p,c;if(e.sortKeys===!0)l.sort();else if(typeof e.sortKeys=="function")l.sort(e.sortKeys);else if(e.sortKeys)throw new T("sortKeys must be a boolean or a function");for(a=0,u=l.length;a1024,p&&(e.dump&&re===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,p&&(c+=we(e,r)),I(e,r+1,s,!0,p)&&(e.dump&&re===e.dump.charCodeAt(0)?c+=":":c+=": ",c+=e.dump,t+=c));e.tag=o,e.dump=t||"{}"}function ze(e,r,n){var i,t,o,l,a,u;for(t=n?e.explicitTypes:e.implicitTypes,o=0,l=t.length;o tag resolver accepts not "'+u+'" style');e.dump=i}return!0}return!1}function I(e,r,n,i,t,o,l){e.tag=null,e.dump=n,ze(e,n,!1)||ze(e,n,!0);var a=fr.call(e.dump),u=i,f;i&&(i=e.flowLevel<0||e.flowLevel>r);var s=a==="[object Object]"||a==="[object Array]",p,c;if(s&&(p=e.duplicates.indexOf(n),c=p!==-1),(e.tag!==null&&e.tag!=="?"||c||e.indent!==2&&r>0)&&(t=!1),c&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(s&&c&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),a==="[object Object]")i&&Object.keys(e.dump).length!==0?(nt(e,r,e.dump,t),c&&(e.dump="&ref_"+p+e.dump)):(rt(e,r,e.dump),c&&(e.dump="&ref_"+p+" "+e.dump));else if(a==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!l&&r>0?Ve(e,r-1,e.dump,t):Ve(e,r,e.dump,t),c&&(e.dump="&ref_"+p+e.dump)):(et(e,r,e.dump),c&&(e.dump="&ref_"+p+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&Xi(e,e.dump,r,o,u);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new T("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?f="!"+f:f.slice(0,18)==="tag:yaml.org,2002:"?f="!!"+f.slice(18):f="!<"+f+">",e.dump=f+" "+e.dump)}return!0}function it(e,r){var n=[],i=[],t,o;for(Ce(e,n,i),t=0,o=i.length;tnew Response("Hello ClientWorker!")),e.get("/info",()=>new Response(JSON.stringify({version:j}),{headers:{"Content-Type":"application/json"}})),e.get("/page/:name",()=>new Response("Error, page type not found")),e.get("/page/install",()=>fetch("/404")),e.get("/api/config",async({queries:i})=>{let o=await(await fetch(i.url||br)).text();try{let l=await Cr(o);return await r.write("config",JSON.stringify(l),{type:"json"}),new Response("ok")}catch(l){return await r.write("config",""),new Response(l)}}),e.post("/api/clear",async()=>{let i=await n.cache.keys();return await Promise.all(i.map(async t=>{n.cache.delete(t)})),new Response("ok")}),e}async function Er(e){let r=await at(),n=new URL(e.url),i=r.match(e.method,n.pathname.slice(te.length));return i?await i.handler({params:i.params,queries:Object.fromEntries(n.searchParams.entries())}):new Response("Not Found! (Client Worker)")}async function _r(e){let r=new URL(new Request("").url).host,n=new URL(e.url).pathname,i=await S.create();if(n.startsWith(`${te}/`))return Er(e);let t=await i.read("config",{type:"json"});if(!t)return fetch(e);let o=!1,l=!1,a={},u=[],f=e,s=new Response;for(let p of t.catch_rules)if(p.rule==="_"&&(p.rule=r),!!new RegExp(p.rule).test(f.url))for(let c of p.transform_rules){let h=!1;switch(c.search==="_"&&(c.search=p.rule),c.searchin||"url"){case"url":{new RegExp(c.search,c.searchflags).test(f.url)&&(h=!0);break}case"header":{new RegExp(c.search,c.searchflags).test(f.headers.get(c.searchkey))&&(h=!0);break}case"status":{if(!o){C(`${f.url} is not fetched yet,the status rule are ignored`);break}new RegExp(c.search,c.searchflags).test(String(s.status))&&(h=!0);break}case"statusText":{if(!o){C(`${f.url} is not fetched yet,the statusText rule are ignored`);break}new RegExp(c.search,c.searchflags).test(s.statusText)&&(h=!0);break}case"body":{if(!o){C(`${f.url} is not fetched yet,the body rule are ignored`);break}new RegExp(c.search,c.searchflags).test(await s.clone().text())&&(h=!0);break}default:{_(`${f.url} the ${c.searchin} search rule are not supported`);break}}switch(c.replacein||"url"){case"url":{if(o&&h){C(`${f.url} is already fetched,the url transform rule:${c.search} are ignored`);break}if(typeof c.replace<"u"&&h)if(typeof c.replace=="string")l&&C(`EngineFetch Disabled for ${f.url},the request will downgrade to normal fetch`),f=L(f,{url:f.url.replace(new RegExp(c.replacekey||c.search,c.replaceflags),c.replace)}),l=!1;else{if(l){C(`Replacement cannot be used for ${f.url},the request is already powered by fetch-engine `);break}for(let d of c.replace){if(d==="_"){u.push(f);continue}u.push(L(f,{url:f.url.replace(new RegExp(c.replacekey||c.search,c.replaceflags),d)}))}l=!0}break}case"body":{h&&(o?s=N(s,{body:(await s.clone().text()).replace(new RegExp(c.replacekey||c.search,c.replaceflags),c.replace)}):f=L(f,{body:(await f.clone().text()).replace(new RegExp(c.replacekey||c.search,c.replaceflags),c.replace)}));break}case"status":{typeof c.replace=="string"&&h&&(s=N(s,{status:s.status.replace(new RegExp(c.replacekey||c.search,c.replaceflags),c.replace)}));break}case"statusText":{typeof c.replace=="string"&&h&&(s=N(s,{statusText:s.statusText.replace(new RegExp(c.replacekey||c.search,c.replaceflags),c.replace)}));break}default:_(`${f.url} the ${c.replacein} replace rule are not supported`)}if(h){if(typeof c.header=="object")for(let d in c.header)o?s=N(s,{headers:{[d]:c.header[d]}}):f=L(f,{headers:{[d]:c.header[d]}});if(typeof c.action<"u")switch(c.action){case"skip":return fetch(e);case"fetch":{if(o){C(`${f.url} is already fetched,the fetch action are ignored`);break}if(typeof c.fetch>"u"){_(`Fetch Config is not defined for ${f.url}`);break}if(a={status:c.fetch.status,mode:c.fetch.mode,credentials:c.fetch.credentials,redirect:c.fetch.redirect,timeout:c.fetch.timeout,threads:c.fetch.threads,limit:c.fetch.limit},!c.fetch.preflight){f=new Request(f.url,{method:(d=>d==="GET"||d==="HEAD"||d==="POST"?d:"GET")(f.method),body:(d=>f.method==="POST"?d:null)(f.body)}),delete a.credentials;for(let d in u)u[d]=new Request(u[d].url,f)}s=await new Promise(async(d,y)=>{async function m(){let v;return new Promise(async(x,B)=>{if(l)switch(c.fetch.engine||"parallel"){case"classic":{v=await ke(u,a);break}case"parallel":{v=await X(u,a);break}case"KFCThursdayVW50":{new Date().getDay()===4&&_("VW50! The Best Fetch Engine in the World Said!"),v=await Oe(u,a);break}default:{_(`Fetch Engine ${c.fetch.engine} is not supported`);break}}else switch(c.fetch.engine||"fetch"){case"fetch":{v=await Z(f,a);break}case"crazy":{v=await de(f,a);break}default:{_(`${f.url} the ${c.fetch.engine} engine are not supported`);break}}typeof c.fetch.cache=="object"&&v.status===(c.fetch.status||200)?(v=N(v,{headers:{ClientWorker_ExpireTime:Date.now()+Number((0,eval)(c.fetch.cache.expire||"0"))}}),caches.open("ClientWorker_ResponseCache").then(R=>{R.put(f,v.clone()).then(()=>{x(v)})})):x(v)})}typeof c.fetch.cache=="object"?caches.open("ClientWorker_ResponseCache").then(v=>{v.match(f).then(x=>{x?Number(x.headers.get("ClientWorker_ExpireTime"))>Date.now()?(W(`${f.url} is fetched from cache`),d(x)):(C(`${f.url} is expired.`),d(Promise.any([m(),new Promise(async(B,R)=>{setTimeout(()=>{_(`${f.url} is too late to fetch,even though the cache has expired,so return by cache`),B(x)},c.fetch.cache.delay||3e3)})]))):(C(`${f.url} is not cached!And it is too late to fetch!`),d(m()))})}):d(m())}),o=!0;break}case"redirect":{if(typeof c.redirect>"u"){_(`Redirect Config is not defined for ${f.url}`);break}return typeof c.redirect.url=="string"?Response.redirect(c.redirect.url,c.redirect.status||301):Response.redirect(f.url.replace(new RegExp(c.search),c.redirect.to),c.redirect.status||301)}case"return":return typeof c.return>"u"&&(c.return={}),new Response(c.return.body||"Error!",{status:c.return.status||503,headers:c.return.headers||{}});case"script":{if(typeof c.script>"u"){_(`Script Config is not defined for ${f.url}`);break}if(typeof c.script.function=="string"){let y=`ClientWorker_AnonymousFunction_${Date.now()}`;self[y]=(0,eval)(c.script.function),c.script.name=y}let d=await new Function(`return (${c.script.name})`)()({fetched:o,request:f,response:s});if(d.fetched){if(c.script.skip)return d.response;o=!0,s=d.response}else f=d.request;break}default:{C(`This Action:${c.action} is not supported yet`);break}}}}return o?s:fetch(e)}var Tr=self;addEventListener("fetch",e=>{e.respondWith(_r(e.request))});addEventListener("install",()=>{W(`ClientWorker@${j} installed!`),Tr.skipWaiting()});addEventListener("activate",()=>{W(`ClientWorker@${j} activated!`),Tr.clients.claim()});(async()=>{let e=await S.create(),r=await S.create("ClientWorker_ResponseCache");W(`ClientWorker${j} started!`),e.read("config").then(n=>{let i=JSON.parse(n)||{};setInterval(async()=>{W(`ClientWorker@${j} start to clean expired cache!`);let t=await r.cache.keys();for(let o of t)r.cache.match(o).then(l=>{Number(l.headers.get("ClientWorker-ExpireTime"))<=performance.now()&&r.cache.delete(o)})},parseInt(i.cleaninterval)||60*1e3)})})(); +/*! Bundled license information: + +tiny-request-router/dist/router.mjs: + (*! + * tiny-request-router v1.2.2 by berstend + * https://github.com/berstend/tiny-request-router#readme + * @license MIT + *) + (*! ***************************************************************************** + Copyright (c) Microsoft Corporation. All rights reserved. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of the + License at http://www.apache.org/licenses/LICENSE-2.0 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** *) + +js-yaml/dist/js-yaml.mjs: + (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) +*/ diff --git a/doc/docs/rule/fetch.md b/docs/rule/fetch.md similarity index 100% rename from doc/docs/rule/fetch.md rename to docs/rule/fetch.md diff --git a/doc/docs/rule/header.md b/docs/rule/header.md similarity index 100% rename from doc/docs/rule/header.md rename to docs/rule/header.md diff --git a/doc/docs/rule/index.md b/docs/rule/index.md similarity index 100% rename from doc/docs/rule/index.md rename to docs/rule/index.md diff --git a/doc/docs/rule/redirect.md b/docs/rule/redirect.md similarity index 100% rename from doc/docs/rule/redirect.md rename to docs/rule/redirect.md diff --git a/doc/docs/rule/replace.md b/docs/rule/replace.md similarity index 100% rename from doc/docs/rule/replace.md rename to docs/rule/replace.md diff --git a/doc/docs/rule/return.md b/docs/rule/return.md similarity index 100% rename from doc/docs/rule/return.md rename to docs/rule/return.md diff --git a/doc/docs/rule/script.md b/docs/rule/script.md similarity index 100% rename from doc/docs/rule/script.md rename to docs/rule/script.md diff --git a/doc/docs/rule/skip.md b/docs/rule/skip.md similarity index 100% rename from doc/docs/rule/skip.md rename to docs/rule/skip.md diff --git a/doc/docs/start.md b/docs/start.md similarity index 100% rename from doc/docs/start.md rename to docs/start.md diff --git a/doc/docs/timefunction.md b/docs/timefunction.md similarity index 100% rename from doc/docs/timefunction.md rename to docs/timefunction.md diff --git a/eslint.config.js b/eslint.config.js index d49d4b9..d1a95b5 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,6 +1,6 @@ -const { so1ve } = require("@so1ve/eslint-config"); +import { so1ve } from "@so1ve/eslint-config"; -module.exports = so1ve({ +export default so1ve({ yaml: { overrides: { "yaml/no-empty-key": "off", diff --git a/package.json b/package.json index 7bc468e..eb78161 100644 --- a/package.json +++ b/package.json @@ -49,9 +49,13 @@ "access": "public" }, "scripts": { - "build": "rimraf dist && tsup && nr build:minify", + "build": "rimraf dist && tsup && nr build:minify && nr copy-cw", "build:minify": "tsup --minify", "build:schema": "tsx scripts/build-schema.ts", + "copy-cw": "rm ./docs/public/cw.js && cp ./dist/with-yaml.min.js ./docs/public/cw.js", + "docs:build": "vitepress build docs", + "docs:dev": "vitepress dev docs --host 0.0.0.0", + "docs:serve": "vitepress serve docs", "lint": "eslint . && prettier . --check", "lint:fix": "eslint . --fix && prettier . --write", "prepublishOnly": "nr build", @@ -62,8 +66,8 @@ }, "devDependencies": { "@antfu/ni": "^0.21.8", - "@so1ve/eslint-config": "^1.4.0", - "@so1ve/prettier-config": "^1.4.0", + "@so1ve/eslint-config": "^1.5.2", + "@so1ve/prettier-config": "^1.5.2", "@types/js-yaml": "^4.0.9", "@types/node": "^20.8.3", "bumpp": "^9.2.0", @@ -75,9 +79,9 @@ "ts-json-schema-generator": "^1.5.0", "tsup": "^8.0.2", "tsx": "^3.13.0", - "type-fest": "^4.10.3", "typescript": "^5.2.2", "vite": "^4.4.11", + "vitepress": "1.0.0-rc.44", "vitest": "^0.34.6" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 70eeb49..4db47dc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,11 @@ devDependencies: specifier: ^0.21.8 version: 0.21.12 '@so1ve/eslint-config': - specifier: ^1.4.0 - version: 1.4.0(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6) + specifier: ^1.5.2 + version: 1.5.2(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6) '@so1ve/prettier-config': - specifier: ^1.4.0 - version: 1.4.0(prettier@3.2.5) + specifier: ^1.5.2 + version: 1.5.2(prettier@3.2.5) '@types/js-yaml': specifier: ^4.0.9 version: 4.0.9 @@ -47,15 +47,15 @@ devDependencies: tsx: specifier: ^3.13.0 version: 3.14.0 - type-fest: - specifier: ^4.10.3 - version: 4.10.3 typescript: specifier: ^5.2.2 version: 5.3.3 vite: specifier: ^4.4.11 version: 4.5.2(@types/node@20.11.16) + vitepress: + specifier: 1.0.0-rc.44 + version: 1.0.0-rc.44(@algolia/client-search@4.22.1)(@types/node@20.11.16)(search-insights@2.13.0)(typescript@5.3.3) vitest: specifier: ^0.34.6 version: 0.34.6 @@ -67,6 +67,140 @@ packages: engines: {node: '>=0.10.0'} dev: true + /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0): + resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} + dependencies: + '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0) + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + - search-insights + dev: true + + /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0): + resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==} + peerDependencies: + search-insights: '>= 1 < 3' + dependencies: + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) + search-insights: 2.13.0 + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + dev: true + + /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1): + resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + dependencies: + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) + '@algolia/client-search': 4.22.1 + algoliasearch: 4.22.1 + dev: true + + /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1): + resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + dependencies: + '@algolia/client-search': 4.22.1 + algoliasearch: 4.22.1 + dev: true + + /@algolia/cache-browser-local-storage@4.22.1: + resolution: {integrity: sha512-Sw6IAmOCvvP6QNgY9j+Hv09mvkvEIDKjYW8ow0UDDAxSXy664RBNQk3i/0nt7gvceOJ6jGmOTimaZoY1THmU7g==} + dependencies: + '@algolia/cache-common': 4.22.1 + dev: true + + /@algolia/cache-common@4.22.1: + resolution: {integrity: sha512-TJMBKqZNKYB9TptRRjSUtevJeQVXRmg6rk9qgFKWvOy8jhCPdyNZV1nB3SKGufzvTVbomAukFR8guu/8NRKBTA==} + dev: true + + /@algolia/cache-in-memory@4.22.1: + resolution: {integrity: sha512-ve+6Ac2LhwpufuWavM/aHjLoNz/Z/sYSgNIXsinGofWOysPilQZPUetqLj8vbvi+DHZZaYSEP9H5SRVXnpsNNw==} + dependencies: + '@algolia/cache-common': 4.22.1 + dev: true + + /@algolia/client-account@4.22.1: + resolution: {integrity: sha512-k8m+oegM2zlns/TwZyi4YgCtyToackkOpE+xCaKCYfBfDtdGOaVZCM5YvGPtK+HGaJMIN/DoTL8asbM3NzHonw==} + dependencies: + '@algolia/client-common': 4.22.1 + '@algolia/client-search': 4.22.1 + '@algolia/transporter': 4.22.1 + dev: true + + /@algolia/client-analytics@4.22.1: + resolution: {integrity: sha512-1ssi9pyxyQNN4a7Ji9R50nSdISIumMFDwKNuwZipB6TkauJ8J7ha/uO60sPJFqQyqvvI+px7RSNRQT3Zrvzieg==} + dependencies: + '@algolia/client-common': 4.22.1 + '@algolia/client-search': 4.22.1 + '@algolia/requester-common': 4.22.1 + '@algolia/transporter': 4.22.1 + dev: true + + /@algolia/client-common@4.22.1: + resolution: {integrity: sha512-IvaL5v9mZtm4k4QHbBGDmU3wa/mKokmqNBqPj0K7lcR8ZDKzUorhcGp/u8PkPC/e0zoHSTvRh7TRkGX3Lm7iOQ==} + dependencies: + '@algolia/requester-common': 4.22.1 + '@algolia/transporter': 4.22.1 + dev: true + + /@algolia/client-personalization@4.22.1: + resolution: {integrity: sha512-sl+/klQJ93+4yaqZ7ezOttMQ/nczly/3GmgZXJ1xmoewP5jmdP/X/nV5U7EHHH3hCUEHeN7X1nsIhGPVt9E1cQ==} + dependencies: + '@algolia/client-common': 4.22.1 + '@algolia/requester-common': 4.22.1 + '@algolia/transporter': 4.22.1 + dev: true + + /@algolia/client-search@4.22.1: + resolution: {integrity: sha512-yb05NA4tNaOgx3+rOxAmFztgMTtGBi97X7PC3jyNeGiwkAjOZc2QrdZBYyIdcDLoI09N0gjtpClcackoTN0gPA==} + dependencies: + '@algolia/client-common': 4.22.1 + '@algolia/requester-common': 4.22.1 + '@algolia/transporter': 4.22.1 + dev: true + + /@algolia/logger-common@4.22.1: + resolution: {integrity: sha512-OnTFymd2odHSO39r4DSWRFETkBufnY2iGUZNrMXpIhF5cmFE8pGoINNPzwg02QLBlGSaLqdKy0bM8S0GyqPLBg==} + dev: true + + /@algolia/logger-console@4.22.1: + resolution: {integrity: sha512-O99rcqpVPKN1RlpgD6H3khUWylU24OXlzkavUAMy6QZd1776QAcauE3oP8CmD43nbaTjBexZj2nGsBH9Tc0FVA==} + dependencies: + '@algolia/logger-common': 4.22.1 + dev: true + + /@algolia/requester-browser-xhr@4.22.1: + resolution: {integrity: sha512-dtQGYIg6MteqT1Uay3J/0NDqD+UciHy3QgRbk7bNddOJu+p3hzjTRYESqEnoX/DpEkaNYdRHUKNylsqMpgwaEw==} + dependencies: + '@algolia/requester-common': 4.22.1 + dev: true + + /@algolia/requester-common@4.22.1: + resolution: {integrity: sha512-dgvhSAtg2MJnR+BxrIFqlLtkLlVVhas9HgYKMk2Uxiy5m6/8HZBL40JVAMb2LovoPFs9I/EWIoFVjOrFwzn5Qg==} + dev: true + + /@algolia/requester-node-http@4.22.1: + resolution: {integrity: sha512-JfmZ3MVFQkAU+zug8H3s8rZ6h0ahHZL/SpMaSasTCGYR5EEJsCc8SI5UZ6raPN2tjxa5bxS13BRpGSBUens7EA==} + dependencies: + '@algolia/requester-common': 4.22.1 + dev: true + + /@algolia/transporter@4.22.1: + resolution: {integrity: sha512-kzWgc2c9IdxMa3YqA6TN0NW5VrKYYW/BELIn7vnLyn+U/RFdZ4lxxt9/8yq3DKV5snvoDzzO4ClyejZRdV3lMQ==} + dependencies: + '@algolia/cache-common': 4.22.1 + '@algolia/logger-common': 4.22.1 + '@algolia/requester-common': 4.22.1 + dev: true + /@antfu/ni@0.21.12: resolution: {integrity: sha512-2aDL3WUv8hMJb2L3r/PIQWsTLyq7RQr3v9xD16fiz6O8ys1xEyLhhTOv8gxtZvJiTzjTF5pHoArvRdesGL1DMQ==} hasBin: true @@ -88,6 +222,11 @@ packages: chalk: 2.4.2 dev: true + /@babel/helper-string-parser@7.23.4: + resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-validator-identifier@7.22.20: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} @@ -102,6 +241,66 @@ packages: js-tokens: 4.0.0 dev: true + /@babel/parser@7.24.0: + resolution: {integrity: sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.24.0 + dev: true + + /@babel/types@7.24.0: + resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.23.4 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: true + + /@docsearch/css@3.5.2: + resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==} + dev: true + + /@docsearch/js@3.5.2(@algolia/client-search@4.22.1)(search-insights@2.13.0): + resolution: {integrity: sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==} + dependencies: + '@docsearch/react': 3.5.2(@algolia/client-search@4.22.1)(search-insights@2.13.0) + preact: 10.19.6 + transitivePeerDependencies: + - '@algolia/client-search' + - '@types/react' + - react + - react-dom + - search-insights + dev: true + + /@docsearch/react@3.5.2(@algolia/client-search@4.22.1)(search-insights@2.13.0): + resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==} + peerDependencies: + '@types/react': '>= 16.8.0 < 19.0.0' + react: '>= 16.8.0 < 19.0.0' + react-dom: '>= 16.8.0 < 19.0.0' + search-insights: '>= 1 < 3' + peerDependenciesMeta: + '@types/react': + optional: true + react: + optional: true + react-dom: + optional: true + search-insights: + optional: true + dependencies: + '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0) + '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) + '@docsearch/css': 3.5.2 + algoliasearch: 4.22.1 + search-insights: 2.13.0 + transitivePeerDependencies: + - '@algolia/client-search' + dev: true + /@esbuild/aix-ppc64@0.19.12: resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} engines: {node: '>=12'} @@ -555,13 +754,13 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@html-eslint/eslint-plugin@0.19.1: - resolution: {integrity: sha512-Tn+/GWLtNM6NiZFLbfM+vTK0d7gKaDgnw4Pp+DsZi09lFimi4bOPOgy8dSVnLeyFIfP6LkeuwVm4pfBZZM2qbA==} - engines: {node: '>=8.10.0'} + /@html-eslint/eslint-plugin@0.23.1: + resolution: {integrity: sha512-2AU58FZSPPHjNJzuv08GfgU/nfrVgNI4Uj9y6KOaU5egzAf1DO5x6HeZwvS0MPBAduqoC0i1RqHNSQrzCcmB7A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@html-eslint/parser@0.19.1: - resolution: {integrity: sha512-dpAw6UX0ZSVNnsAzl9ULHZX7CvAGKF5uta4iebbhSDvGE1o9NX6BoOofD/6WucTvs/qnoKojc3Y2LG6vy4afiQ==} + /@html-eslint/parser@0.23.0: + resolution: {integrity: sha512-mZTxkgN8WzoLtIo0U8BKlm3y/D9pGlXuALqEaliDPah6wGo+LkTUOfxQklmuAP2N66e5ORCjdAo4PpakEcCUUg==} engines: {node: '>=8.10.0'} dependencies: es-html-parser: 0.0.9 @@ -821,29 +1020,39 @@ packages: dev: true optional: true + /@shikijs/core@1.1.7: + resolution: {integrity: sha512-gTYLUIuD1UbZp/11qozD3fWpUTuMqPSf3svDMMrL0UmlGU7D9dPw/V1FonwAorCUJBltaaESxq90jrSjQyGixg==} + dev: true + + /@shikijs/transformers@1.1.7: + resolution: {integrity: sha512-lXz011ao4+rvweps/9h3CchBfzb1U5OtP5D51Tqc9lQYdLblWMIxQxH6Ybe1GeGINcEVM4goMyPrI0JvlIp4UQ==} + dependencies: + shiki: 1.1.7 + dev: true + /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@so1ve/eslint-config@1.4.0(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6): - resolution: {integrity: sha512-HoN0X33i+6pKKo/ATj+WM0jhdqXNFTxfDCALQxvnfV30zEiSln3w8P+C07g/EwZP76I50JY9L0mxDf11lHglsA==} + /@so1ve/eslint-config@1.5.2(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6): + resolution: {integrity: sha512-songYJdny1r365JSN7Fg0BbE2Al9Ml4PktPEj8o434PdYplN/G10KOOeyfR2s/7llgHPTR1CT41GxUt5nZ04Ow==} peerDependencies: eslint: '>=8.40.0' prettier: ^3.0.0 dependencies: '@eslint-community/eslint-plugin-eslint-comments': 4.1.0(eslint@8.56.0) - '@html-eslint/eslint-plugin': 0.19.1 - '@html-eslint/parser': 0.19.1 - '@so1ve/eslint-plugin': 1.4.0(eslint@8.56.0)(typescript@5.3.3) - '@so1ve/eslint-plugin-sort-imports': 1.4.0(eslint@8.56.0) + '@html-eslint/eslint-plugin': 0.23.1 + '@html-eslint/parser': 0.23.0 + '@so1ve/eslint-plugin': 1.5.2(eslint@8.56.0)(typescript@5.3.3) + '@so1ve/eslint-plugin-sort-imports': 1.5.2(eslint@8.56.0) '@stylistic/eslint-plugin': 1.6.2(eslint@8.56.0)(typescript@5.3.3) - '@unocss/eslint-config': 0.55.7(eslint@8.56.0)(typescript@5.3.3) + '@unocss/eslint-config': 0.58.5(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 - eslint-config-flat-gitignore: 0.1.2 + eslint-config-flat-gitignore: 0.1.3 eslint-define-config: 1.24.1 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0) eslint-mdx: 2.3.4(eslint@8.56.0) - eslint-plugin-array-func: 3.1.8(eslint@8.56.0) + eslint-plugin-array-func: 5.0.1(eslint@8.56.0) eslint-plugin-case-police: 0.6.1(eslint@8.56.0)(typescript@5.3.3) eslint-plugin-etc: 2.0.3(eslint@8.56.0)(typescript@5.3.3) eslint-plugin-html: 7.1.0 @@ -853,24 +1062,24 @@ packages: eslint-plugin-jsonc: 2.13.0(eslint@8.56.0) eslint-plugin-mdx: 2.3.4(eslint@8.56.0) eslint-plugin-n: 16.6.2(eslint@8.56.0) - eslint-plugin-no-await-in-promise: 1.1.6(eslint@8.56.0) + eslint-plugin-no-await-in-promise: 1.1.5(eslint@8.56.0) eslint-plugin-no-explicit-type-exports: 0.12.1(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)(typescript@5.3.3) eslint-plugin-no-only-tests: 3.1.0 eslint-plugin-only-error: 1.0.2 eslint-plugin-promise: 6.1.1(eslint@8.56.0) - eslint-plugin-regexp: 1.15.0(eslint@8.56.0) + eslint-plugin-regexp: 2.2.0(eslint@8.56.0) eslint-plugin-solid: 0.13.1(eslint@8.56.0)(typescript@5.3.3) - eslint-plugin-toml: 0.5.0(eslint@8.56.0) - eslint-plugin-unicorn: 48.0.1(eslint@8.56.0) - eslint-plugin-unused-imports: 3.0.0(eslint@8.56.0) - eslint-plugin-vitest: 0.3.21(eslint@8.56.0)(typescript@5.3.3)(vitest@0.34.6) - eslint-plugin-vue: 9.21.1(eslint@8.56.0) + eslint-plugin-toml: 0.9.2(eslint@8.56.0) + eslint-plugin-unicorn: 51.0.1(eslint@8.56.0) + eslint-plugin-unused-imports: 3.1.0(eslint@8.56.0) + eslint-plugin-vitest: 0.3.22(eslint@8.56.0)(typescript@5.3.3)(vitest@0.34.6) + eslint-plugin-vue: 9.22.0(eslint@8.56.0) eslint-plugin-yml: 1.12.2(eslint@8.56.0) - globals: 13.24.0 + globals: 14.0.0 jsonc-eslint-parser: 2.4.0 local-pkg: 0.5.0 prettier: 3.2.5 - toml-eslint-parser: 0.6.1 + toml-eslint-parser: 0.9.3 typescript-eslint: 7.1.0(eslint@8.56.0)(typescript@5.3.3) vue-eslint-parser: 9.4.2(eslint@8.56.0) yaml-eslint-parser: 1.2.2 @@ -885,8 +1094,8 @@ packages: - vitest dev: true - /@so1ve/eslint-plugin-sort-imports@1.4.0(eslint@8.56.0): - resolution: {integrity: sha512-Qb3ajw32vSnN698CDh8GnlMxKNxWs1mRyvRJ8nJPXAJntF/fe5VDStRSiuGLA85FIP+nJjmcmMxp7EyMoGL/wQ==} + /@so1ve/eslint-plugin-sort-imports@1.5.2(eslint@8.56.0): + resolution: {integrity: sha512-+QKs6m3KJbRA4x3mEV09h1u68fl7QgzY5uku0jidcqa4ryR2xpdQPIq7N4ZegiAgkEZcNKBUpPBLzWW/KKYtlw==} peerDependencies: eslint: '>=8.40.0' dependencies: @@ -894,31 +1103,31 @@ packages: natsort: 2.0.3 dev: true - /@so1ve/eslint-plugin@1.4.0(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-u5SOeQX0XCVimewcdj48Ha3/UHIZRDfn4LbSiesc4+1kqcyc4xktDXL3mNQtaP3i492v74o7d1t2cVWIeU0QkA==} + /@so1ve/eslint-plugin@1.5.2(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-XsEJMylc6G3Li8TSqlf8//V8USSn+x6oUvQv8ynDs6Gae9nS8xqS2yLBj1XgxUkuLDwxmK+br5Vmk1AssUkzgQ==} dependencies: - '@typescript-eslint/types': 6.20.0 - '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/types': 7.1.0 + '@typescript-eslint/utils': 7.1.0(eslint@8.56.0)(typescript@5.3.3) transitivePeerDependencies: - eslint - supports-color - typescript dev: true - /@so1ve/prettier-config@1.4.0(prettier@3.2.5): - resolution: {integrity: sha512-Hs+m3JhxcBmQhHq2x3iypV6mNsr4ltwO5w2CvCJWGoSxhTTn3Sz5dvxiudEyouOwitf8Uanmowc9NYp0kJOsvA==} + /@so1ve/prettier-config@1.5.2(prettier@3.2.5): + resolution: {integrity: sha512-c0KVJ4qwUyxFWLXfOgh9wTMiOII5k6ibCqITcg3EZbEh5JURNjKMMus0a2QbaKT6mY4P/4mHkjLelHjisJgtXA==} peerDependencies: prettier: ^3.0.0 dependencies: - '@so1ve/prettier-plugin-toml': 1.4.0(prettier@3.2.5) + '@so1ve/prettier-plugin-toml': 1.5.2(prettier@3.2.5) prettier: 3.2.5 - prettier-plugin-astro: 0.12.3 - prettier-plugin-curly-and-jsdoc: 1.4.0(prettier@3.2.5) + prettier-plugin-astro: 0.13.0 + prettier-plugin-curly-and-jsdoc: 1.5.2(prettier@3.2.5) prettier-plugin-pkgsort: 0.2.1(prettier@3.2.5) dev: true - /@so1ve/prettier-plugin-toml@1.4.0(prettier@3.2.5): - resolution: {integrity: sha512-bpjBpJ6XgY7ogayTOnKevQvqOtOTiof58bMhAG8QgU/iJKmMX4gDIfQUvX2KMGOl8yQ2n/kko7Dos5SfE/78Eg==} + /@so1ve/prettier-plugin-toml@1.5.2(prettier@3.2.5): + resolution: {integrity: sha512-7jYaZAicKROef6gUBCoUqSyQZfOYTTM53Lt8GoPBoevlcQGdNPXMHQv0yQOsmhdiMcn3WfNl3bWIuCo5JwyeIA==} peerDependencies: prettier: ^3.0.0 dependencies: @@ -1064,12 +1273,27 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/linkify-it@3.0.5: + resolution: {integrity: sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==} + dev: true + + /@types/markdown-it@13.0.7: + resolution: {integrity: sha512-U/CBi2YUUcTHBt5tjO2r5QV/x0Po6nsYwQU4Y04fBS6vfoImaiZ6f8bi3CjTCxBPQSO1LMyUqkByzi8AidyxfA==} + dependencies: + '@types/linkify-it': 3.0.5 + '@types/mdurl': 1.0.5 + dev: true + /@types/mdast@3.0.15: resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==} dependencies: '@types/unist': 2.0.10 dev: true + /@types/mdurl@1.0.5: + resolution: {integrity: sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==} + dev: true + /@types/ms@0.7.34: resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} dev: true @@ -1110,6 +1334,10 @@ packages: resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} dev: true + /@types/web-bluetooth@0.0.20: + resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} + dev: true + /@types/yargs-parser@21.0.3: resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} dev: true @@ -1207,14 +1435,6 @@ packages: '@typescript-eslint/visitor-keys': 5.62.0 dev: true - /@typescript-eslint/scope-manager@6.20.0: - resolution: {integrity: sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==} - engines: {node: ^16.0.0 || >=18.0.0} - dependencies: - '@typescript-eslint/types': 6.20.0 - '@typescript-eslint/visitor-keys': 6.20.0 - dev: true - /@typescript-eslint/scope-manager@6.21.0: resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1256,11 +1476,6 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/types@6.20.0: - resolution: {integrity: sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==} - engines: {node: ^16.0.0 || >=18.0.0} - dev: true - /@typescript-eslint/types@6.21.0: resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1313,28 +1528,6 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@6.20.0(typescript@5.3.3): - resolution: {integrity: sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 6.20.0 - '@typescript-eslint/visitor-keys': 6.20.0 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.3 - semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@5.3.3) - typescript: 5.3.3 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/typescript-estree@6.21.0(typescript@5.3.3): resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1399,25 +1592,6 @@ packages: - typescript dev: true - /@typescript-eslint/utils@6.20.0(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.6 - '@typescript-eslint/scope-manager': 6.20.0 - '@typescript-eslint/types': 6.20.0 - '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) - eslint: 8.56.0 - semver: 7.5.4 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /@typescript-eslint/utils@6.21.0(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1464,14 +1638,6 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@typescript-eslint/visitor-keys@6.20.0: - resolution: {integrity: sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==} - engines: {node: ^16.0.0 || >=18.0.0} - dependencies: - '@typescript-eslint/types': 6.20.0 - eslint-visitor-keys: 3.4.3 - dev: true - /@typescript-eslint/visitor-keys@6.21.0: resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1492,44 +1658,55 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@unocss/config@0.55.7: - resolution: {integrity: sha512-+X6rPScyFEWbkZyCyM+HfoJhJNN+CEl2n2izWkm0kuDj3w9fY9B3f/0dsk+jmx/gJEI5Y797q9zspNMNDib1AA==} + /@unocss/config@0.58.5: + resolution: {integrity: sha512-O1pLSeNXfG11QHaLSVwS9rJKvE4b9304IQ3UvOdbYN+7SAT4YTZ7JDU4ngO1KWyOFBO6RD0WspCR95pgqOqJiQ==} engines: {node: '>=14'} dependencies: - '@unocss/core': 0.55.7 + '@unocss/core': 0.58.5 unconfig: 0.3.11 dev: true - /@unocss/core@0.55.7: - resolution: {integrity: sha512-c+bWe844Xjlwc1EPwHj0+n3LpntJG7ELPbEOOxNIG+CQdcEX0l1G0rkM8+nKstJ9WJmgpf1HdJQLVMF62HXvhw==} + /@unocss/core@0.58.5: + resolution: {integrity: sha512-qbPqL+46hf1/UelQOwUwpAuvm6buoss43DPYHOPdfNJ+NTWkSpATQMF0JKT04QE0QRQbHNSHdMe9ariG+IIlCw==} dev: true - /@unocss/eslint-config@0.55.7(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-ykRUpPeT5kJSXHAduOJ2PxnEoaYsGOS2jG9iVjbbvER36ZQ+71xdwep/qpBlAr4LWLeoICy7Om+No1r43ZDntw==} + /@unocss/eslint-config@0.58.5(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-HaRLlr9YBG0QPAn8nnIgYTpQ1HBVn3nuZs7hlPwV/IvFiMIY33BLVfNLEuKuGgkqxT04LmO4Oelsdau3a02+ug==} engines: {node: '>=14'} dependencies: - '@unocss/eslint-plugin': 0.55.7(eslint@8.56.0)(typescript@5.3.3) + '@unocss/eslint-plugin': 0.58.5(eslint@8.56.0)(typescript@5.3.3) transitivePeerDependencies: - eslint - supports-color - typescript dev: true - /@unocss/eslint-plugin@0.55.7(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-U+poFU/GJH8NvFBQxLp64zRRfnLWSbY41+Q8Vnlw/nP/tizZumO2lNJ+UBIGFLa1TwyMulFjru6CXt2uSFKtaA==} + /@unocss/eslint-plugin@0.58.5(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-QGB/Srml1XGiunuwbBmiVsXnkjjkRhg4/mTZ6HFkG1qZBAbsyE2QVxYJ6L7S4x4qdEgij2h2DK/Y90Cutwc7Mw==} engines: {node: '>=14'} dependencies: - '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) - '@unocss/config': 0.55.7 - '@unocss/core': 0.55.7 + '@typescript-eslint/utils': 6.21.0(eslint@8.56.0)(typescript@5.3.3) + '@unocss/config': 0.58.5 + '@unocss/core': 0.58.5 magic-string: 0.30.6 - synckit: 0.8.8 + synckit: 0.9.0 transitivePeerDependencies: - eslint - supports-color - typescript dev: true + /@vitejs/plugin-vue@5.0.4(vite@5.1.4)(vue@3.4.21): + resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + vite: ^5.0.0 + vue: ^3.2.25 + dependencies: + vite: 5.1.4(@types/node@20.11.16) + vue: 3.4.21(typescript@5.3.3) + dev: true + /@vitest/expect@0.34.6: resolution: {integrity: sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==} dependencies: @@ -1568,6 +1745,181 @@ packages: pretty-format: 29.7.0 dev: true + /@vue/compiler-core@3.4.21: + resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==} + dependencies: + '@babel/parser': 7.24.0 + '@vue/shared': 3.4.21 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.0.2 + dev: true + + /@vue/compiler-dom@3.4.21: + resolution: {integrity: sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==} + dependencies: + '@vue/compiler-core': 3.4.21 + '@vue/shared': 3.4.21 + dev: true + + /@vue/compiler-sfc@3.4.21: + resolution: {integrity: sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==} + dependencies: + '@babel/parser': 7.24.0 + '@vue/compiler-core': 3.4.21 + '@vue/compiler-dom': 3.4.21 + '@vue/compiler-ssr': 3.4.21 + '@vue/shared': 3.4.21 + estree-walker: 2.0.2 + magic-string: 0.30.7 + postcss: 8.4.35 + source-map-js: 1.0.2 + dev: true + + /@vue/compiler-ssr@3.4.21: + resolution: {integrity: sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q==} + dependencies: + '@vue/compiler-dom': 3.4.21 + '@vue/shared': 3.4.21 + dev: true + + /@vue/devtools-api@7.0.15(vue@3.4.21): + resolution: {integrity: sha512-kgEYWosDyWpS1vFSuJNNWUnHkP+VkL3Y+9mw+rf7ex41SwbYL/WdC3KXqAtjiSrEs7r/FrHmUTh0BkINJPFkbA==} + dependencies: + '@vue/devtools-kit': 7.0.15(vue@3.4.21) + transitivePeerDependencies: + - vue + dev: true + + /@vue/devtools-kit@7.0.15(vue@3.4.21): + resolution: {integrity: sha512-dT7OeCe1LUCIhHIb/yRR6Hn+XHh73r1o78onqCrxEKHdoZwBItiIeVnmJZPEUDFstIxfs+tJL231mySk3laTow==} + peerDependencies: + vue: ^3.0.0 + dependencies: + '@vue/devtools-shared': 7.0.15 + hookable: 5.5.3 + mitt: 3.0.1 + perfect-debounce: 1.0.0 + speakingurl: 14.0.1 + vue: 3.4.21(typescript@5.3.3) + dev: true + + /@vue/devtools-shared@7.0.15: + resolution: {integrity: sha512-fpfvMVvS7aDgO7x2JPFiTQ1MHcCc63/bE7yTgs278gMBybuO9b3hdiZ/k0Pw1rN+RefaU9yQiFA+5CCFc1D+6w==} + dependencies: + rfdc: 1.3.1 + dev: true + + /@vue/reactivity@3.4.21: + resolution: {integrity: sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==} + dependencies: + '@vue/shared': 3.4.21 + dev: true + + /@vue/runtime-core@3.4.21: + resolution: {integrity: sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA==} + dependencies: + '@vue/reactivity': 3.4.21 + '@vue/shared': 3.4.21 + dev: true + + /@vue/runtime-dom@3.4.21: + resolution: {integrity: sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw==} + dependencies: + '@vue/runtime-core': 3.4.21 + '@vue/shared': 3.4.21 + csstype: 3.1.3 + dev: true + + /@vue/server-renderer@3.4.21(vue@3.4.21): + resolution: {integrity: sha512-aV1gXyKSN6Rz+6kZ6kr5+Ll14YzmIbeuWe7ryJl5muJ4uwSwY/aStXTixx76TwkZFJLm1aAlA/HSWEJ4EyiMkg==} + peerDependencies: + vue: 3.4.21 + dependencies: + '@vue/compiler-ssr': 3.4.21 + '@vue/shared': 3.4.21 + vue: 3.4.21(typescript@5.3.3) + dev: true + + /@vue/shared@3.4.21: + resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==} + dev: true + + /@vueuse/core@10.9.0(vue@3.4.21): + resolution: {integrity: sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg==} + dependencies: + '@types/web-bluetooth': 0.0.20 + '@vueuse/metadata': 10.9.0 + '@vueuse/shared': 10.9.0(vue@3.4.21) + vue-demi: 0.14.7(vue@3.4.21) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: true + + /@vueuse/integrations@10.9.0(focus-trap@7.5.4)(vue@3.4.21): + resolution: {integrity: sha512-acK+A01AYdWSvL4BZmCoJAcyHJ6EqhmkQEXbQLwev1MY7NBnS+hcEMx/BzVoR9zKI+UqEPMD9u6PsyAuiTRT4Q==} + peerDependencies: + async-validator: '*' + axios: '*' + change-case: '*' + drauu: '*' + focus-trap: '*' + fuse.js: '*' + idb-keyval: '*' + jwt-decode: '*' + nprogress: '*' + qrcode: '*' + sortablejs: '*' + universal-cookie: '*' + peerDependenciesMeta: + async-validator: + optional: true + axios: + optional: true + change-case: + optional: true + drauu: + optional: true + focus-trap: + optional: true + fuse.js: + optional: true + idb-keyval: + optional: true + jwt-decode: + optional: true + nprogress: + optional: true + qrcode: + optional: true + sortablejs: + optional: true + universal-cookie: + optional: true + dependencies: + '@vueuse/core': 10.9.0(vue@3.4.21) + '@vueuse/shared': 10.9.0(vue@3.4.21) + focus-trap: 7.5.4 + vue-demi: 0.14.7(vue@3.4.21) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: true + + /@vueuse/metadata@10.9.0: + resolution: {integrity: sha512-iddNbg3yZM0X7qFY2sAotomgdHK7YJ6sKUvQqbvwnf7TmaVPxS4EJydcNsVejNdS8iWCtDk+fYXr7E32nyTnGA==} + dev: true + + /@vueuse/shared@10.9.0(vue@3.4.21): + resolution: {integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==} + dependencies: + vue-demi: 0.14.7(vue@3.4.21) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: true + /abbrev@2.0.0: resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -1610,6 +1962,25 @@ packages: uri-js: 4.4.1 dev: true + /algoliasearch@4.22.1: + resolution: {integrity: sha512-jwydKFQJKIx9kIZ8Jm44SdpigFwRGPESaxZBaHSV0XWN2yBJAOT4mT7ppvlrpA4UGzz92pqFnVKr/kaZXrcreg==} + dependencies: + '@algolia/cache-browser-local-storage': 4.22.1 + '@algolia/cache-common': 4.22.1 + '@algolia/cache-in-memory': 4.22.1 + '@algolia/client-account': 4.22.1 + '@algolia/client-analytics': 4.22.1 + '@algolia/client-common': 4.22.1 + '@algolia/client-personalization': 4.22.1 + '@algolia/client-search': 4.22.1 + '@algolia/logger-common': 4.22.1 + '@algolia/logger-console': 4.22.1 + '@algolia/requester-browser-xhr': 4.22.1 + '@algolia/requester-common': 4.22.1 + '@algolia/requester-node-http': 4.22.1 + '@algolia/transporter': 4.22.1 + dev: true + /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -1779,6 +2150,17 @@ packages: fill-range: 7.0.1 dev: true + /browserslist@4.23.0: + resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001591 + electron-to-chromium: 1.4.687 + node-releases: 2.0.14 + update-browserslist-db: 1.0.13(browserslist@4.23.0) + dev: true + /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: true @@ -1856,6 +2238,10 @@ packages: engines: {node: '>=6'} dev: true + /caniuse-lite@1.0.30001591: + resolution: {integrity: sha512-PCzRMei/vXjJyL5mJtzNiUCKP59dm8Apqc3PH8gJkMnMXZGox93RbE76jHsmLwmIo6/3nsYIpJtx0O7u5PqFuQ==} + dev: true + /case-police@0.6.1: resolution: {integrity: sha512-tOgkG3HhtzNVHU+HVHqbpVJ3CICPDihtlgoM2C4dx0RLeo6qcNVeBgiYJN5Bln+stxKrnKrw89CFgqYQDqwZQg==} hasBin: true @@ -1954,6 +2340,11 @@ packages: engines: {node: '>=8'} dev: true + /ci-info@4.0.0: + resolution: {integrity: sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==} + engines: {node: '>=8'} + dev: true + /citty@0.1.5: resolution: {integrity: sha512-AS7n5NSc0OQVMV9v6wt3ByujNIrne0/cTjiC2MYqhvao57VNfiuVksTSr2p17nVOhEr2KtqiAkGwHcgMC/qUuQ==} dependencies: @@ -2031,6 +2422,12 @@ packages: engines: {node: ^14.18.0 || >=16.10.0} dev: true + /core-js-compat@3.36.0: + resolution: {integrity: sha512-iV9Pd/PsgjNWBXeq8XRtWVSgz2tKAfhfvBs7qxYty+RlRd+OCksaWmOnc4JKrTc1cToXL1N0s3l/vwlxPtdElw==} + dependencies: + browserslist: 4.23.0 + dev: true + /cosmiconfig@7.1.0: resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} engines: {node: '>=10'} @@ -2057,6 +2454,10 @@ packages: hasBin: true dev: true + /csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + dev: true + /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -2195,6 +2596,10 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true + /electron-to-chromium@1.4.687: + resolution: {integrity: sha512-Ic85cOuXSP6h7KM0AIJ2hpJ98Bo4hyTUjc4yjMbkvD+8yTxEhfK9+8exT2KKYsSjnCn2tGsKVSZwE7ZgTORQCw==} + dev: true + /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true @@ -2395,9 +2800,10 @@ packages: semver: 7.5.4 dev: true - /eslint-config-flat-gitignore@0.1.2: - resolution: {integrity: sha512-PcBsqtd5QHEZH4ROvpnRN4EP0qcHh9voCCHgtyHxnJZHGspJREcZn7oPqRG/GfWt9m3C0fkC2l5CuBtMig2wXQ==} + /eslint-config-flat-gitignore@0.1.3: + resolution: {integrity: sha512-oQD+dEZv3RThN60tFqGFt+NJcO1DmssUcP+T/nlX+ZzEoEvVUYH0GU9X/VlmDXsbMsS9mONI1HrlxLgtKojw7w==} dependencies: + find-up: 7.0.0 parse-gitignore: 2.0.0 dev: true @@ -2509,11 +2915,11 @@ packages: - supports-color dev: true - /eslint-plugin-array-func@3.1.8(eslint@8.56.0): - resolution: {integrity: sha512-BjnbJvw+knaHgVddIL3q5xYcoqAZoK8wOdT7QF+mkvSAjXdZCdhL0z71Y7oRtgXA8BpN9QLJ2uHgD3I6ymlbOw==} - engines: {node: '>= 6.8.0'} + /eslint-plugin-array-func@5.0.1(eslint@8.56.0): + resolution: {integrity: sha512-bRydL/TorX9B6HMMGzggkTzoaY0dM1iCIdA/SGM8VB2P8+38TH+dqYmDdfLCR5LOdDUHq0XBFgkvVnb7DB61cw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: '>=3.0.0' + eslint: '>=8.51.0' dependencies: eslint: 8.56.0 dev: true @@ -2722,8 +3128,8 @@ packages: semver: 7.5.4 dev: true - /eslint-plugin-no-await-in-promise@1.1.6(eslint@8.56.0): - resolution: {integrity: sha512-4oyWw+P63MdQdHstoELk0Z05xxt/dRxS1QRpM+JPizrFgQFtdJ+DjdhV4db0CsRHoZ/y8pneS2rG3Slio60u2w==} + /eslint-plugin-no-await-in-promise@1.1.5(eslint@8.56.0): + resolution: {integrity: sha512-DsLzTfvOBvCX26Urnp5u/OI7lXDOPfoSmB0sxZbPMk+2va6QI2902CysNbSODN1lCW5VJMtMVmVu/V7HeMph5w==} engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} peerDependencies: eslint: '>=7' @@ -2769,21 +3175,20 @@ packages: eslint: 8.56.0 dev: true - /eslint-plugin-regexp@1.15.0(eslint@8.56.0): - resolution: {integrity: sha512-YEtQPfdudafU7RBIFci81R/Q1yErm0mVh3BkGnXD2Dk8DLwTFdc2ITYH1wCnHKim2gnHfPFgrkh+b2ozyyU7ag==} - engines: {node: ^12 || >=14} + /eslint-plugin-regexp@2.2.0(eslint@8.56.0): + resolution: {integrity: sha512-0kwpiWiLRVBkVr3oIRQLl196sXP/NF6DQFefv9jtR4ZOgQR+6WID2pIZ0I+wIt54qgBPwBB7Gm2a+ueh8/WsFQ==} + engines: {node: ^18 || >=20} peerDependencies: - eslint: '>=6.0.0' + eslint: '>=8.44.0' dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@eslint-community/regexpp': 4.10.0 comment-parser: 1.4.1 eslint: 8.56.0 - grapheme-splitter: 1.0.4 - jsdoctypeparser: 9.0.0 - refa: 0.11.0 - regexp-ast-analysis: 0.6.0 - scslre: 0.2.0 + jsdoc-type-pratt-parser: 4.0.0 + refa: 0.12.1 + regexp-ast-analysis: 0.7.1 + scslre: 0.3.0 dev: true /eslint-plugin-solid@0.13.1(eslint@8.56.0)(typescript@5.3.3): @@ -2792,7 +3197,7 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.21.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 is-html: 2.0.0 kebab-case: 1.0.2 @@ -2803,50 +3208,54 @@ packages: - typescript dev: true - /eslint-plugin-toml@0.5.0(eslint@8.56.0): - resolution: {integrity: sha512-EnnC+/PEdaScDmQWrJeQlOFSLdulyVkRAbWX4X97Tju7Y2W/2pT6f1BVqEAjHAMjl9daRh+cS2U3Ik6i5E+C5Q==} + /eslint-plugin-toml@0.9.2(eslint@8.56.0): + resolution: {integrity: sha512-ri0xf63PYf3pIq/WY9BIwrqxZmGTIwSkAO0bHddI0ajUwN4KGz6W8vOvdXFHOpRdRfzxlmXze/vfsY/aTEXESg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 eslint: 8.56.0 + eslint-compat-utils: 0.4.1(eslint@8.56.0) lodash: 4.17.21 - toml-eslint-parser: 0.6.1 + toml-eslint-parser: 0.9.3 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-unicorn@48.0.1(eslint@8.56.0): - resolution: {integrity: sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==} + /eslint-plugin-unicorn@51.0.1(eslint@8.56.0): + resolution: {integrity: sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==} engines: {node: '>=16'} peerDependencies: - eslint: '>=8.44.0' + eslint: '>=8.56.0' dependencies: '@babel/helper-validator-identifier': 7.22.20 '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) - ci-info: 3.9.0 + '@eslint/eslintrc': 2.1.4 + ci-info: 4.0.0 clean-regexp: 1.0.0 + core-js-compat: 3.36.0 eslint: 8.56.0 esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 jsesc: 3.0.2 - lodash: 4.17.21 pluralize: 8.0.0 read-pkg-up: 7.0.1 regexp-tree: 0.1.27 regjsparser: 0.10.0 semver: 7.5.4 strip-indent: 3.0.0 + transitivePeerDependencies: + - supports-color dev: true - /eslint-plugin-unused-imports@3.0.0(eslint@8.56.0): - resolution: {integrity: sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw==} + /eslint-plugin-unused-imports@3.1.0(eslint@8.56.0): + resolution: {integrity: sha512-9l1YFCzXKkw1qtAru1RWUtG2EVDZY0a0eChKXcL+EZ5jitG7qxdctu4RnvhOJHv4xfmUf7h+JJPINlVpGhZMrw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - '@typescript-eslint/eslint-plugin': ^6.0.0 - eslint: ^8.0.0 + '@typescript-eslint/eslint-plugin': 6 - 7 + eslint: '8' peerDependenciesMeta: '@typescript-eslint/eslint-plugin': optional: true @@ -2855,8 +3264,8 @@ packages: eslint-rule-composer: 0.3.0 dev: true - /eslint-plugin-vitest@0.3.21(eslint@8.56.0)(typescript@5.3.3)(vitest@0.34.6): - resolution: {integrity: sha512-oYwR1MrwaBw/OG6CKU+SJYleAc442w6CWL1RTQl5WLwy8X3sh0bgHIQk5iEtmTak3Q+XAvZglr0bIoDOjFdkcw==} + /eslint-plugin-vitest@0.3.22(eslint@8.56.0)(typescript@5.3.3)(vitest@0.34.6): + resolution: {integrity: sha512-atkFGQ7aVgcuSeSMDqnyevIyUpfBPMnosksgEPrKE7Y8xQlqG/5z2IQ6UDau05zXaaFv7Iz8uzqvIuKshjZ0Zw==} engines: {node: ^18.0.0 || >= 20.0.0} peerDependencies: '@typescript-eslint/eslint-plugin': '*' @@ -2868,7 +3277,7 @@ packages: vitest: optional: true dependencies: - '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.21.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 vitest: 0.34.6 transitivePeerDependencies: @@ -2876,8 +3285,8 @@ packages: - typescript dev: true - /eslint-plugin-vue@9.21.1(eslint@8.56.0): - resolution: {integrity: sha512-XVtI7z39yOVBFJyi8Ljbn7kY9yHzznKXL02qQYn+ta63Iy4A9JFBw6o4OSB9hyD2++tVT+su9kQqetUyCCwhjw==} + /eslint-plugin-vue@9.22.0(eslint@8.56.0): + resolution: {integrity: sha512-7wCXv5zuVnBtZE/74z4yZ0CM8AjH6bk4MQGm7hZjUC2DBppKU5ioeOk5LGSg/s9a1ZJnIsdPLJpXnu1Rc+cVHg==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 @@ -2887,7 +3296,7 @@ packages: natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.0.15 - semver: 7.5.4 + semver: 7.6.0 vue-eslint-parser: 9.4.2(eslint@8.56.0) xml-name-validator: 4.0.0 transitivePeerDependencies: @@ -3039,6 +3448,10 @@ packages: '@types/unist': 2.0.10 dev: true + /estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -3143,6 +3556,15 @@ packages: path-exists: 4.0.0 dev: true + /find-up@7.0.0: + resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} + engines: {node: '>=18'} + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + unicorn-magic: 0.1.0 + dev: true + /flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} @@ -3161,6 +3583,12 @@ packages: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true + /focus-trap@7.5.4: + resolution: {integrity: sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==} + dependencies: + tabbable: 6.2.0 + dev: true + /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: @@ -3339,6 +3767,11 @@ packages: type-fest: 0.20.2 dev: true + /globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + dev: true + /globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} @@ -3368,10 +3801,6 @@ packages: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} dev: true - /grapheme-splitter@1.0.4: - resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} - dev: true - /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true @@ -3420,6 +3849,10 @@ packages: function-bind: 1.1.2 dev: true + /hookable@5.5.3: + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + dev: true + /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true @@ -3749,10 +4182,9 @@ packages: argparse: 2.0.1 dev: true - /jsdoctypeparser@9.0.0: - resolution: {integrity: sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==} - engines: {node: '>=10'} - hasBin: true + /jsdoc-type-pratt-parser@4.0.0: + resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} + engines: {node: '>=12.0.0'} dev: true /jsesc@0.5.0: @@ -3917,6 +4349,13 @@ packages: p-locate: 5.0.0 dev: true + /locate-path@7.2.0: + resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + p-locate: 6.0.0 + dev: true + /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true @@ -3958,6 +4397,17 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /magic-string@0.30.7: + resolution: {integrity: sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + + /mark.js@8.11.1: + resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} + dev: true + /mdast-util-from-markdown@0.8.5: resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} dependencies: @@ -4425,6 +4875,10 @@ packages: engines: {node: '>=16 || 14 >=14.17'} dev: true + /minisearch@6.3.0: + resolution: {integrity: sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==} + dev: true + /minizlib@2.1.2: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} @@ -4433,6 +4887,10 @@ packages: yallist: 4.0.0 dev: true + /mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + dev: true + /mkdirp@1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} @@ -4487,6 +4945,10 @@ packages: resolution: {integrity: sha512-bW9T/uJDPAJB2YNYEpWzE54U5O3MQidXsOyTfnbKYtTtFexRvGzb1waphBN4ZwP6EcIvYYEOwW0b72BpAqydTw==} dev: true + /node-releases@2.0.14: + resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + dev: true + /nopt@7.2.0: resolution: {integrity: sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -4667,6 +5129,13 @@ packages: p-limit: 3.1.0 dev: true + /p-locate@6.0.0: + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + p-limit: 4.0.0 + dev: true + /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -4740,6 +5209,11 @@ packages: engines: {node: '>=8'} dev: true + /path-exists@5.0.0: + resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} @@ -4853,6 +5327,19 @@ packages: source-map-js: 1.0.2 dev: true + /postcss@8.4.35: + resolution: {integrity: sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /preact@10.19.6: + resolution: {integrity: sha512-gympg+T2Z1fG1unB8NH29yHJwnEaCH37Z32diPDku316OTnRPeMbiRV9kTrfZpocXjdfnWuFUl/Mj4BHaf6gnw==} + dev: true + /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -4873,8 +5360,8 @@ packages: sort-order: 1.1.2 dev: true - /prettier-plugin-astro@0.12.3: - resolution: {integrity: sha512-GthUSu3zCvmtVyqlArosez0xE08vSJ0R1sWurxIWpABaCkNGYFANoUdFkqmIo54EV2uPLGcVJzOucWvCjPBWvg==} + /prettier-plugin-astro@0.13.0: + resolution: {integrity: sha512-5HrJNnPmZqTUNoA97zn4gNQv9BgVhv+et03314WpQ9H9N8m2L9OSV798olwmG2YLXPl1iSstlJCR1zB3x5xG4g==} engines: {node: ^14.15.0 || >=16.0.0} dependencies: '@astrojs/compiler': 1.8.2 @@ -4882,8 +5369,8 @@ packages: sass-formatter: 0.7.9 dev: true - /prettier-plugin-curly-and-jsdoc@1.4.0(prettier@3.2.5): - resolution: {integrity: sha512-skXko+6QkeFc8XlkRPY8njoMaG3Qhl1E4oBPqKPwrhNLEhzHaP7yPK9AA/UBdegiqugHtr81oSNSgQ/1CCNt6g==} + /prettier-plugin-curly-and-jsdoc@1.5.2(prettier@3.2.5): + resolution: {integrity: sha512-Co9fNy+duQs+dehhpIQgHXwPIqYKlrjF9BolEQgHAG0AgLjW7NjmTm4K4gAZmTLZTtAyr/wz0DdN920/dIC1Gg==} peerDependencies: prettier: ^3.0.0 dependencies: @@ -4991,19 +5478,19 @@ packages: picomatch: 2.3.1 dev: true - /refa@0.11.0: - resolution: {integrity: sha512-486O8/pQXwj9jV0mVvUnTsxq0uknpBnNJ0eCUhkZqJRQ8KutrT1PhzmumdCeM1hSBF2eMlFPmwECRER4IbKXlQ==} + /refa@0.12.1: + resolution: {integrity: sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dependencies: '@eslint-community/regexpp': 4.10.0 dev: true - /regexp-ast-analysis@0.6.0: - resolution: {integrity: sha512-OLxjyjPkVH+rQlBLb1I/P/VTmamSjGkvN5PTV5BXP432k3uVz727J7H29GA5IFiY0m7e1xBN7049Wn59FY3DEQ==} + /regexp-ast-analysis@0.7.1: + resolution: {integrity: sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dependencies: '@eslint-community/regexpp': 4.10.0 - refa: 0.11.0 + refa: 0.12.1 dev: true /regexp-tree@0.1.27: @@ -5097,6 +5584,10 @@ packages: engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true + /rfdc@1.3.1: + resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==} + dev: true + /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true @@ -5194,12 +5685,17 @@ packages: suf-log: 2.5.3 dev: true - /scslre@0.2.0: - resolution: {integrity: sha512-4hc49fUMmX3jM0XdFUAPBrs1xwEcdHa0KyjEsjFs+Zfc66mpFpq5YmRgDtl+Ffo6AtJIilfei+yKw8fUn3N88w==} + /scslre@0.3.0: + resolution: {integrity: sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==} + engines: {node: ^14.0.0 || >=16.0.0} dependencies: '@eslint-community/regexpp': 4.10.0 - refa: 0.11.0 - regexp-ast-analysis: 0.6.0 + refa: 0.12.1 + regexp-ast-analysis: 0.7.1 + dev: true + + /search-insights@2.13.0: + resolution: {integrity: sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==} dev: true /semver@5.7.2: @@ -5220,6 +5716,14 @@ packages: lru-cache: 6.0.0 dev: true + /semver@7.6.0: + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + /set-function-length@1.2.0: resolution: {integrity: sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==} engines: {node: '>= 0.4'} @@ -5252,6 +5756,12 @@ packages: engines: {node: '>=8'} dev: true + /shiki@1.1.7: + resolution: {integrity: sha512-9kUTMjZtcPH3i7vHunA6EraTPpPOITYTdA5uMrvsJRexktqP0s7P3s9HVK80b4pP42FRVe03D7fT3NmJv2yYhw==} + dependencies: + '@shikijs/core': 1.1.7 + dev: true + /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: @@ -5336,6 +5846,11 @@ packages: resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==} dev: true + /speakingurl@14.0.1: + resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==} + engines: {node: '>=0.10.0'} + dev: true + /stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true @@ -5525,6 +6040,10 @@ packages: tslib: 2.6.2 dev: true + /tabbable@6.2.0: + resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} + dev: true + /tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -5579,6 +6098,11 @@ packages: engines: {node: '>=14.0.0'} dev: true + /to-fast-properties@2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + dev: true + /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -5593,13 +6117,6 @@ packages: vfile: 5.3.7 dev: true - /toml-eslint-parser@0.6.1: - resolution: {integrity: sha512-7xjjVOdu0c6GpaP2AmA48ZcjesBL7KB2qeMNz93gMG76yV/lHVzQiSlD6HqwAdMJiL9hM44fung0NzhjTfihtw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - eslint-visitor-keys: 3.4.3 - dev: true - /toml-eslint-parser@0.9.3: resolution: {integrity: sha512-moYoCvkNUAPCxSW9jmHmRElhm4tVJpHL8ItC/+uYD0EpPSFXbck7yREz9tNdJVTSpHVod8+HoipcpbQ0oE6gsw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5772,11 +6289,6 @@ packages: engines: {node: '>=8'} dev: true - /type-fest@4.10.3: - resolution: {integrity: sha512-JLXyjizi072smKGGcZiAJDCNweT8J+AuRxmPZ1aG7TERg4ijx9REl8CNhbr36RV4qXqL1gO1FF9HL8OkVmmrsA==} - engines: {node: '>=16'} - dev: true - /typed-array-buffer@1.0.0: resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} engines: {node: '>= 0.4'} @@ -5869,6 +6381,11 @@ packages: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: true + /unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + dev: true + /unified-engine@10.1.0: resolution: {integrity: sha512-5+JDIs4hqKfHnJcVCxTid1yBoI/++FfF/1PFdSMpaftZZZY+qg2JFruRbf7PaIwa9KgLotXQV3gSjtY0IdcFGQ==} dependencies: @@ -5967,6 +6484,17 @@ packages: engines: {node: '>= 10.0.0'} dev: true + /update-browserslist-db@1.0.13(browserslist@4.23.0): + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.23.0 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: @@ -6096,6 +6624,97 @@ packages: fsevents: 2.3.3 dev: true + /vite@5.1.4(@types/node@20.11.16): + resolution: {integrity: sha512-n+MPqzq+d9nMVTKyewqw6kSt+R3CkvF9QAKY8obiQn8g1fwTscKxyfaYnC632HtBXAQGc1Yjomphwn1dtwGAHg==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 20.11.16 + esbuild: 0.19.12 + postcss: 8.4.35 + rollup: 4.12.0 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /vitepress@1.0.0-rc.44(@algolia/client-search@4.22.1)(@types/node@20.11.16)(search-insights@2.13.0)(typescript@5.3.3): + resolution: {integrity: sha512-tO5taxGI7fSpBK1D8zrZTyJJERlyU9nnt0jHSt3fywfq3VKn977Hg0wUuTkEmwXlFYwuW26+6+3xorf4nD3XvA==} + hasBin: true + peerDependencies: + markdown-it-mathjax3: ^4.3.2 + postcss: ^8.4.35 + peerDependenciesMeta: + markdown-it-mathjax3: + optional: true + postcss: + optional: true + dependencies: + '@docsearch/css': 3.5.2 + '@docsearch/js': 3.5.2(@algolia/client-search@4.22.1)(search-insights@2.13.0) + '@shikijs/core': 1.1.7 + '@shikijs/transformers': 1.1.7 + '@types/markdown-it': 13.0.7 + '@vitejs/plugin-vue': 5.0.4(vite@5.1.4)(vue@3.4.21) + '@vue/devtools-api': 7.0.15(vue@3.4.21) + '@vueuse/core': 10.9.0(vue@3.4.21) + '@vueuse/integrations': 10.9.0(focus-trap@7.5.4)(vue@3.4.21) + focus-trap: 7.5.4 + mark.js: 8.11.1 + minisearch: 6.3.0 + shiki: 1.1.7 + vite: 5.1.4(@types/node@20.11.16) + vue: 3.4.21(typescript@5.3.3) + transitivePeerDependencies: + - '@algolia/client-search' + - '@types/node' + - '@types/react' + - '@vue/composition-api' + - async-validator + - axios + - change-case + - drauu + - fuse.js + - idb-keyval + - jwt-decode + - less + - lightningcss + - nprogress + - qrcode + - react + - react-dom + - sass + - search-insights + - sortablejs + - stylus + - sugarss + - terser + - typescript + - universal-cookie + dev: true + /vitest@0.34.6: resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} engines: {node: '>=v14.18.0'} @@ -6161,6 +6780,21 @@ packages: - terser dev: true + /vue-demi@0.14.7(vue@3.4.21): + resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + peerDependencies: + '@vue/composition-api': ^1.0.0-rc.1 + vue: ^3.0.0-0 || ^2.6.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + dependencies: + vue: 3.4.21(typescript@5.3.3) + dev: true + /vue-eslint-parser@9.4.2(eslint@8.56.0): resolution: {integrity: sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==} engines: {node: ^14.17.0 || >=16.0.0} @@ -6179,6 +6813,22 @@ packages: - supports-color dev: true + /vue@3.4.21(typescript@5.3.3): + resolution: {integrity: sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@vue/compiler-dom': 3.4.21 + '@vue/compiler-sfc': 3.4.21 + '@vue/runtime-dom': 3.4.21 + '@vue/server-renderer': 3.4.21(vue@3.4.21) + '@vue/shared': 3.4.21 + typescript: 5.3.3 + dev: true + /walk-up-path@3.0.1: resolution: {integrity: sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==} dev: true diff --git a/src/cgi/index.ts b/src/cgi/index.ts new file mode 100644 index 0000000..9296f62 --- /dev/null +++ b/src/cgi/index.ts @@ -0,0 +1,518 @@ +import { CW_CGI_PREFIX } from "../constants"; +import { + engineClassic, + engineCrazy, + engineFetch, + engineKFCThursdayVW50, + engineParallel, +} from "../engine"; +import type { RuntimeConfig } from "../types/config"; +import { CacheDB } from "../utils/cache-db"; +import * as logger from "../utils/logger"; +import { rebuildRequest, rebuildResponse } from "../utils/rebuild"; +import { handleRoutes } from "./routes"; + +export async function handler(request: Request) { + const domain = new URL(new Request("").url).host; // Current domain + const pathname = new URL(request.url).pathname; + const db = await CacheDB.create(); + + // Intercept the request to the CGI + if (pathname.startsWith(`${CW_CGI_PREFIX}/`)) { + return handleRoutes(request); + } + + const config: RuntimeConfig = await db.read("config", { type: "json" }); + if (!config) { + return fetch(request); + } + + let tFetched = false; + let EngineFetch = false; + let fetchConfig = {}; + const EngineFetchList: Request[] = []; + let tReq = request; + let tRes = new Response(); + for (const catch_rule of config.catch_rules) { + if (catch_rule.rule === "_") { + catch_rule.rule = domain; + } + // TODO + if (!new RegExp(catch_rule.rule).test(tReq.url)) { + continue; + } + + for (const transformRule of catch_rule.transform_rules) { + let tSearched = false; + + if (transformRule.search === "_") { + transformRule.search = catch_rule.rule; + } + switch (transformRule.searchin || "url") { + case "url": { + if ( + new RegExp(transformRule.search, transformRule.searchflags).test( + tReq.url, + ) + ) { + tSearched = true; + } + break; + } + case "header": { + if ( + new RegExp(transformRule.search, transformRule.searchflags).test( + tReq.headers.get(transformRule.searchkey)!, + ) + ) { + tSearched = true; + } + break; + } + case "status": { + if (!tFetched) { + logger.warning( + `${tReq.url} is not fetched yet,the status rule are ignored`, + ); + break; + } + if ( + new RegExp(transformRule.search, transformRule.searchflags).test( + String(tRes.status), + ) + ) { + tSearched = true; + } + break; + } + case "statusText": { + if (!tFetched) { + logger.warning( + `${tReq.url} is not fetched yet,the statusText rule are ignored`, + ); + break; + } + if ( + new RegExp(transformRule.search, transformRule.searchflags).test( + tRes.statusText, + ) + ) { + tSearched = true; + } + break; + } + case "body": { + if (!tFetched) { + logger.warning( + `${tReq.url} is not fetched yet,the body rule are ignored`, + ); + break; + } + if ( + new RegExp(transformRule.search, transformRule.searchflags).test( + await tRes.clone().text(), + ) + ) { + tSearched = true; + } + break; + } + default: { + logger.error( + `${tReq.url} the ${transformRule.searchin} search rule are not supported`, + ); + break; + } + } + + switch (transformRule.replacein || "url") { + case "url": { + if (tFetched && tSearched) { + logger.warning( + `${tReq.url} is already fetched,the url transform rule:${transformRule.search} are ignored`, + ); + break; + } + if (typeof transformRule.replace !== "undefined" && tSearched) { + if (typeof transformRule.replace === "string") { + if (EngineFetch) { + logger.warning( + `EngineFetch Disabled for ${tReq.url},the request will downgrade to normal fetch`, + ); + } + tReq = rebuildRequest(tReq, { + url: tReq.url.replace( + new RegExp( + transformRule.replacekey || transformRule.search, + transformRule.replaceflags, + ), + transformRule.replace, + ), + }); + EngineFetch = false; + } else { + if (EngineFetch) { + logger.warning( + `Replacement cannot be used for ${tReq.url},the request is already powered by fetch-engine `, + ); + break; + } + for (const replacement of transformRule.replace) { + if (replacement === "_") { + EngineFetchList.push(tReq); + continue; + } + EngineFetchList.push( + rebuildRequest(tReq, { + url: tReq.url.replace( + new RegExp( + transformRule.replacekey || transformRule.search, + transformRule.replaceflags, + ), + replacement, + ), + }), + ); + } + + EngineFetch = true; + } + } + break; + } + case "body": { + if (tSearched) { + if (tFetched) { + tRes = rebuildResponse(tRes, { + body: (await tRes.clone().text()).replace( + new RegExp( + transformRule.replacekey || transformRule.search, + transformRule.replaceflags, + ), + transformRule.replace, + ), + }); + } else { + tReq = rebuildRequest(tReq, { + body: (await tReq.clone().text()).replace( + new RegExp( + transformRule.replacekey || transformRule.search, + transformRule.replaceflags, + ), + transformRule.replace, + ), + }); + } + } + break; + } + + case "status": { + if (typeof transformRule.replace === "string" && tSearched) { + tRes = rebuildResponse(tRes, { + status: tRes.status.replace( + new RegExp( + transformRule.replacekey || transformRule.search, + transformRule.replaceflags, + ), + transformRule.replace, + ), + }); + } + break; + } + case "statusText": { + if (typeof transformRule.replace === "string" && tSearched) { + tRes = rebuildResponse(tRes, { + statusText: tRes.statusText.replace( + new RegExp( + transformRule.replacekey || transformRule.search, + transformRule.replaceflags, + ), + transformRule.replace, + ), + }); + } + break; + } + default: { + logger.error( + `${tReq.url} the ${transformRule.replacein} replace rule are not supported`, + ); + } + } + if (!tSearched) { + continue; + } + if (typeof transformRule.header === "object") { + for (const header in transformRule.header) { + if (tFetched) { + tRes = rebuildResponse(tRes, { + headers: { [header]: transformRule.header[header] }, + }); + } else { + tReq = rebuildRequest(tReq, { + headers: { [header]: transformRule.header[header] }, + }); + } + } + } + + if (typeof transformRule.action !== "undefined") { + switch (transformRule.action) { + case "skip": { + return fetch(request); + } + case "fetch": { + if (tFetched) { + logger.warning( + `${tReq.url} is already fetched,the fetch action are ignored`, + ); + break; + } + if (typeof transformRule.fetch === "undefined") { + logger.error(`Fetch Config is not defined for ${tReq.url}`); + break; + } + + fetchConfig = { + status: transformRule.fetch.status, + mode: transformRule.fetch.mode, + credentials: transformRule.fetch.credentials, + redirect: transformRule.fetch.redirect, + timeout: transformRule.fetch.timeout, + threads: transformRule.fetch.threads, + limit: transformRule.fetch.limit, + }; + if (!transformRule.fetch.preflight) { + tReq = new Request(tReq.url, { + method: ((method) => { + if ( + method === "GET" || + method === "HEAD" || + method === "POST" + ) { + return method; + } + + return "GET"; + })(tReq.method), + body: ((body) => { + if (tReq.method === "POST") { + return body; + } + + return null; + })(tReq.body), + }); // https://segmentfault.com/a/1190000006095018 + delete fetchConfig.credentials; + // fetchConfig.mode = "cors" + for (const eReq in EngineFetchList) { + EngineFetchList[eReq] = new Request( + EngineFetchList[eReq].url, + tReq, + ); + } + } + + tRes = await new Promise(async (res, rej) => { + async function EngineFetcher() { + let cRes; + + return new Promise(async (resolve, reject) => { + if (EngineFetch) { + switch (transformRule.fetch.engine || "parallel") { + case "classic": { + cRes = await engineClassic( + EngineFetchList, + fetchConfig, + ); + break; + } + case "parallel": { + cRes = await engineParallel( + EngineFetchList, + fetchConfig, + ); + break; + } + case "KFCThursdayVW50": { + if (new Date().getDay() === 4) { + logger.error( + "VW50! The Best Fetch Engine in the World Said!", + ); + } + cRes = await engineKFCThursdayVW50( + EngineFetchList, + fetchConfig, + ); + break; + } + default: { + logger.error( + `Fetch Engine ${transformRule.fetch.engine} is not supported`, + ); + break; + } + } + } else { + switch (transformRule.fetch.engine || "fetch") { + case "fetch": { + cRes = await engineFetch(tReq, fetchConfig); + break; + } + case "crazy": { + cRes = await engineCrazy(tReq, fetchConfig); + break; + } + default: { + logger.error( + `${tReq.url} the ${transformRule.fetch.engine} engine are not supported`, + ); + break; + } + } + } + if ( + typeof transformRule.fetch.cache === "object" && + cRes.status === (transformRule.fetch.status || 200) + ) { + cRes = rebuildResponse(cRes, { + headers: { + ClientWorker_ExpireTime: + Date.now() + + Number( + (0, eval)(transformRule.fetch.cache.expire || "0"), + ), + }, + }); + caches.open("ClientWorker_ResponseCache").then((cache) => { + cache.put(tReq, cRes.clone()).then(() => { + resolve(cRes); + }); + }); + } else { + resolve(cRes); + } + }); + } + if (typeof transformRule.fetch.cache === "object") { + caches.open("ClientWorker_ResponseCache").then((cache) => { + cache.match(tReq).then((cRes) => { + if (cRes) { + if ( + Number(cRes.headers.get("ClientWorker_ExpireTime")) > + Date.now() + ) { + logger.success(`${tReq.url} is fetched from cache`); + res(cRes); + } else { + logger.warning(`${tReq.url} is expired.`); + res( + Promise.any([ + EngineFetcher(), + new Promise(async (resolve, reject) => { + setTimeout(() => { + logger.error( + `${tReq.url} is too late to fetch,even though the cache has expired,so return by cache`, + ); + resolve(cRes); + }, transformRule.fetch.cache.delay || 3000); + }), + ]), + ); + } + } else { + logger.warning( + `${tReq.url} is not cached!And it is too late to fetch!`, + ); + res(EngineFetcher()); + } + }); + }); + } else { + res(EngineFetcher()); + } + }); + tFetched = true; + break; + } + case "redirect": { + if (typeof transformRule.redirect === "undefined") { + logger.error(`Redirect Config is not defined for ${tReq.url}`); + break; + } + if (typeof transformRule.redirect.url === "string") { + return Response.redirect( + transformRule.redirect.url, + transformRule.redirect.status || 301, + ); + } + + return Response.redirect( + tReq.url.replace( + new RegExp(transformRule.search), + transformRule.redirect.to, + ), + transformRule.redirect.status || 301, + ); + } + case "return": { + if (typeof transformRule.return === "undefined") { + transformRule.return = {}; + } + + return new Response(transformRule.return.body || "Error!", { + status: transformRule.return.status || 503, + headers: transformRule.return.headers || {}, + }); + } + case "script": { + if (typeof transformRule.script === "undefined") { + logger.error(`Script Config is not defined for ${tReq.url}`); + break; + } + if (typeof transformRule.script.function === "string") { + const ClientWorkerAnonymousFunctionName = `ClientWorker_AnonymousFunction_${Date.now()}`; + // eslint-disable-next-line no-eval + self[ClientWorkerAnonymousFunctionName] = (0, eval)( + transformRule.script.function, + ); + transformRule.script.name = ClientWorkerAnonymousFunctionName; + } + const ScriptAns = await new Function( + `return (${transformRule.script.name})`, + )()({ + fetched: tFetched, + request: tReq, + response: tRes, + }); + + if (ScriptAns.fetched) { + if (transformRule.script.skip || false) { + return ScriptAns.response; + } + tFetched = true; + tRes = ScriptAns.response; + } else { + tReq = ScriptAns.request; + } + break; + } + default: { + logger.warning( + `This Action:${transformRule.action} is not supported yet`, + ); + break; + } + } + } + } + } + if (!tFetched) { + // 3.0.0 默认改为skip + return fetch(request); + } + + return tRes; +} diff --git a/src/routes.ts b/src/cgi/routes.ts similarity index 86% rename from src/routes.ts rename to src/cgi/routes.ts index 7c68106..eb95c49 100644 --- a/src/routes.ts +++ b/src/cgi/routes.ts @@ -2,9 +2,9 @@ import type { Method, Params } from "tiny-request-router"; import { Router } from "tiny-request-router"; import { configFile, loadConfig } from "virtual:config-loader"; -import { version } from "../package.json"; -import { CW_CGI_PREFIX } from "./constants"; -import { CacheDB } from "./utils/cache-db"; +import { version } from "../../package.json"; +import { CW_CGI_PREFIX } from "../constants"; +import { CacheDB } from "../utils/cache-db"; async function createRouter() { const router = new Router< @@ -66,8 +66,11 @@ async function createRouter() { export async function handleRoutes(request: Request): Promise { const router = await createRouter(); - const url = new URL(request.url.slice(CW_CGI_PREFIX.length)); - const match = router.match(request.method as Method, url.pathname); + const url = new URL(request.url); + const match = router.match( + request.method as Method, + url.pathname.slice(CW_CGI_PREFIX.length), + ); if (match) { const response = await match.handler({ diff --git a/src/engine.ts b/src/engine.ts index d3cfe8e..3918fc7 100644 --- a/src/engine.ts +++ b/src/engine.ts @@ -32,9 +32,9 @@ export const engineFetch: FetchEngineFunction = async (request, config) => { ...config, }; - setTimeout(() => { - throw create504Response("Fetch"); - }, config.timeout); + // setTimeout(() => { + // throw create504Response("Fetch"); + // }, config.timeout); return await fetch(request, { mode: config.mode, @@ -281,9 +281,10 @@ export const engineKFCThursdayVW50: ListFetchEngineFunction = async ( if (!contentLength || contentLength < config.threads!) { logger.warning( - `Engine KFCThursdayVW50: The Origin does not support KFCThursdayVW50 Mode, or the size of the file is less than ${config.threads} bytes, downgrade to parallel.`, + `Engine KFCThursdayVW50: The Origin does not support KFCThursdayVW50 mode, or the size of the file is less than ${config.threads} bytes, downgrade to parallel.`, ); + // FIXME: Used to be `engineFetch`, am I wrong return engineParallel(requests, config); } diff --git a/src/handler.ts b/src/handler.ts deleted file mode 100644 index 7ab00b4..0000000 --- a/src/handler.ts +++ /dev/null @@ -1,506 +0,0 @@ -import { CacheDB } from "./utils/cache-db"; -import { RuntimeConfig } from "./types/config"; -import * as logger from "./utils/logger"; -import { rebuildRequest, rebuildResponse } from "./utils/rebuild"; -import { handleRoutes } from "./routes"; -import { - engineCrazy, - engineFetch, - engineKFCThursdayVW50, - engineParallel, -} from "./engine"; - -const clientworkerhandle = async (request: Request) => { - //当前域 new Request('').url - const domain = new URL(new Request("").url).host; - const db = new CacheDB(); - - let tReq = request; - const urlStr = tReq.url.toString(); - const urlObj = new URL(urlStr); - const pathname = urlObj.pathname; - if (pathname.split("/")[1] === "cw-cgi") { - return router_cgi(request); - } - const config = await db.read("config", { - type: "json", - }); - if (!config) { - return fetch(request); - } - - let tFetched = false; - let EngineFetch = false; - let fetchConfig: - | RuntimeConfig["catch_rules"][number]["transform_rules"][number]["fetch"] - | undefined = undefined; - let EngineFetchList: Request[] = []; - let tRes = new Response(); - for (let catch_rule of config.catch_rules) { - if (catch_rule.rule === "_") { - catch_rule.rule = domain; - } - if (!tReq.url.match(new RegExp(catch_rule.rule))) { - continue; - } - - for (let transform_rule of catch_rule.transform_rules) { - let tSearched = false; - - if (transform_rule.search === "_") { - transform_rule.search = catch_rule.rule; - } - switch (transform_rule.searchin || "url") { - case "url": - if ( - tReq.url.match( - new RegExp(transform_rule.search, transform_rule.searchflags), - ) - ) { - tSearched = true; - } - break; - case "header": - if ( - tReq.headers - .get(transform_rule.searchkey!)! - .match( - new RegExp(transform_rule.search, transform_rule.searchflags), - ) - ) { - tSearched = true; - } - break; - case "status": - if (!tFetched) { - logger.warning( - `${tReq.url} is not fetched yet,the status rule are ignored`, - ); - break; - } - if ( - String(tRes.status).match( - new RegExp(transform_rule.search, transform_rule.searchflags), - ) - ) { - tSearched = true; - } - break; - case "statusText": - if (!tFetched) { - logger.warning( - `${tReq.url} is not fetched yet,the statusText rule are ignored`, - ); - break; - } - if ( - tRes.statusText.match( - new RegExp(transform_rule.search, transform_rule.searchflags), - ) - ) { - tSearched = true; - } - break; - case "body": - if (!tFetched) { - logger.warning( - `${tReq.url} is not fetched yet,the body rule are ignored`, - ); - break; - } - if ( - (await tRes.clone().text()).match( - new RegExp(transform_rule.search, transform_rule.searchflags), - ) - ) { - tSearched = true; - } - break; - default: - logger.error( - `${tReq.url} the ${transform_rule.searchin} search rule are not supported`, - ); - break; - } - - switch (transform_rule.replacein || "url") { - case "url": - if (tFetched && tSearched) { - logger.warning( - `${tReq.url} is already fetched,the url transform rule:${transform_rule.search} are ignored`, - ); - break; - } - if (typeof transform_rule.replace !== "undefined" && tSearched) { - if (typeof transform_rule.replace === "string") { - if (EngineFetch) { - logger.warning( - `EngineFetch Disabled for ${tReq.url},the request will downgrade to normal fetch`, - ); - } - tReq = rebuildRequest(tReq, { - url: tReq.url.replace( - new RegExp( - transform_rule.replacekey || transform_rule.search, - transform_rule.replaceflags, - ), - transform_rule.replace, - ), - }); - EngineFetch = false; - } else { - if (EngineFetch) { - logger.warning( - `Replacement cannot be used for ${tReq.url},the request is already powered by fetch-engine `, - ); - break; - } - transform_rule.replace.forEach((replacement) => { - if (replacement === "_") { - EngineFetchList.push(tReq); - return; - } - EngineFetchList.push( - rebuildRequest(tReq, { - url: tReq.url.replace( - new RegExp( - transform_rule.replacekey || transform_rule.search, - transform_rule.replaceflags, - ), - replacement, - ), - }), - ); - }); - - EngineFetch = true; - } - } - break; - case "body": - if (tSearched) { - if (tFetched) { - tRes = rebuildResponse(tRes, { - body: (await tRes.clone().text()).replace( - new RegExp( - transform_rule.replacekey || transform_rule.search, - transform_rule.replaceflags, - ), - transform_rule.replace as string, - ), - }); - } else { - tReq = rebuildRequest(tReq, { - body: (await tReq.clone().text()).replace( - new RegExp( - transform_rule.replacekey || transform_rule.search, - transform_rule.replaceflags, - ), - transform_rule.replace as string, - ), - }); - } - } - break; - - case "status": - if (typeof transform_rule.replace === "string" && tSearched) { - tRes = rebuildResponse(tRes, { - status: Number( - tRes.status - .toString() - .replace( - new RegExp( - transform_rule.replacekey || transform_rule.search, - transform_rule.replaceflags, - ), - transform_rule.replace, - ), - ), - }); - } - break; - case "statusText": - if (typeof transform_rule.replace === "string" && tSearched) { - tRes = rebuildResponse(tRes, { - statusText: tRes.statusText.replace( - new RegExp( - transform_rule.replacekey || transform_rule.search, - transform_rule.replaceflags, - ), - transform_rule.replace, - ), - }); - } - break; - default: - logger.error( - `${tReq.url} the ${transform_rule.replacein} replace rule are not supported`, - ); - } - if (!tSearched) { - continue; - } - if (typeof transform_rule.header === "object") { - Object.entries(transform_rule.header).forEach(([header, val]) => { - if (tFetched) { - tRes = rebuildResponse(tRes, { - headers: { [header]: val }, - }); - } else { - tReq = rebuildRequest(tReq, { - headers: { [header]: val }, - }); - } - }); - } - - if (typeof transform_rule.action !== "undefined") { - switch (transform_rule.action) { - case "skip": - return fetch(request); - case "fetch": - if (tFetched) { - logger.warning( - `${tReq.url} is already fetched,the fetch action are ignored`, - ); - break; - } - if (typeof transform_rule.fetch === "undefined") { - logger.error(`Fetch Config is not defined for ${tReq.url}`); - break; - } - - fetchConfig = { - status: transform_rule.fetch.status, - mode: transform_rule.fetch.mode as RequestMode | undefined, - credentials: transform_rule.fetch.credentials as - | RequestCredentials - | undefined, - redirect: transform_rule.fetch.redirect as - | RequestRedirect - | undefined, - timeout: transform_rule.fetch.timeout, - threads: transform_rule.fetch.threads, - trylimit: transform_rule.fetch.trylimit, - engine: transform_rule.fetch.engine, - preflight: transform_rule.fetch.preflight, - }; - if (!transform_rule.fetch.preflight) { - tReq = new Request(tReq.url, { - method: ((method) => { - if ( - method === "GET" || - method === "HEAD" || - method === "POST" - ) { - return method; - } - return "GET"; - })(tReq.method), - body: ((body) => { - if (tReq.method === "POST") { - return body; - } - return null; - })(tReq.body), - }); //https://segmentfault.com/a/1190000006095018 - delete fetchConfig!.credentials; - //fetchConfig.mode = "cors" - for (var eReq in EngineFetchList) { - EngineFetchList[eReq] = new Request( - EngineFetchList[eReq].url, - tReq, - ); - } - } - - tRes = await new Promise(async (res, rej) => { - const EngineFetcher = async (): Promise => { - let cRes: Response; - return new Promise(async (resolve, reject) => { - if (!EngineFetch) { - switch (transform_rule.fetch?.engine || "fetch") { - case "fetch": - cRes = await engineFetch(tReq, fetchConfig!); - break; - case "crazy": - cRes = await engineCrazy(tReq, fetchConfig!); - break; - default: - logger.error( - `${tReq.url} the ${transform_rule.fetch?.engine} engine are not supported`, - ); - break; - } - } else { - switch (transform_rule.fetch?.engine || "parallel") { - case "classic": - cRes = await engineCrazy(EngineFetchList, fetchConfig!); - break; - case "parallel": - cRes = await engineParallel( - EngineFetchList, - fetchConfig!, - ); - break; - case "KFCThursdayVW50": - if (new Date().getDay() === 4) { - logger.error( - `VW50! The Best Fetch Engine in the World Said!`, - ); - } - cRes = await engineKFCThursdayVW50( - EngineFetchList, - fetchConfig!, - ); - break; - default: - logger.error( - `Fetch Engine ${transform_rule.fetch?.engine} is not supported`, - ); - break; - } - } - if ( - typeof transform_rule.fetch?.cache === "object" && - cRes.status === (transform_rule.fetch?.status || 200) - ) { - cRes = rebuildResponse(cRes, { - headers: { - ClientWorker_ExpireTime: ( - new Date().getTime() + - Number(eval(transform_rule.fetch.cache.expire || "0")) - ).toString(), - }, - }); - caches.open("ClientWorker_ResponseCache").then((cache) => { - cache.put(tReq, cRes.clone()).then(() => { - resolve(cRes); - }); - }); - } else { - resolve(cRes); - } - }); - }; - if (typeof transform_rule.fetch?.cache === "object") { - caches.open("ClientWorker_ResponseCache").then((cache) => { - cache.match(tReq).then((cRes) => { - if (!!cRes) { - if ( - Number(cRes.headers.get("ClientWorker_ExpireTime")) > - new Date().getTime() - ) { - logger.success(`${tReq.url} is fetched from cache`); - res(cRes); - return; - } else { - logger.warning(`${tReq.url} is expired.`); - res( - Promise.any([ - EngineFetcher(), - new Promise(async (resolve, reject) => { - setTimeout(() => { - logger.error( - `${tReq.url} is too late to fetch,even though the cache has expired,so return by cache`, - ); - resolve(cRes); - return; - }, transform_rule.fetch?.cache?.delay || 3000); - }), - ]), - ); - } - } else { - logger.warning( - `${tReq.url} is not cached!And it is too late to fetch!`, - ); - res(EngineFetcher()); - } - }); - }); - } else { - res(EngineFetcher()); - } - }); - tFetched = true; - break; - case "redirect": - if (typeof transform_rule.redirect === "undefined") { - logger.error(`Redirect Config is not defined for ${tReq.url}`); - break; - } - if (typeof transform_rule.redirect.url === "string") { - return Response.redirect( - transform_rule.redirect.url, - transform_rule.redirect.status || 301, - ); - } - return Response.redirect( - tReq.url.replace( - new RegExp(transform_rule.search), - transform_rule.redirect.to!, - ), - transform_rule.redirect.status || 301, - ); - case "return": - if (typeof transform_rule.return === "undefined") { - transform_rule.return = { - body: "Error!", - status: 503, - header: { ServerProvide: "", "content-type": "text/plain" }, - }; - } - return new Response(transform_rule.return.body || "Error!", { - status: transform_rule.return.status || 503, - headers: transform_rule.return.header || {}, - }); - case "script": - if (typeof transform_rule.script === "undefined") { - logger.error(`Script Config is not defined for ${tReq.url}`); - break; - } - if (typeof transform_rule.script.function === "string") { - const ClientWorkerAnonymousFunctionName = `ClientWorker_AnonymousFunction_${new Date().getTime()}`; - // @ts-ignore - self[ClientWorkerAnonymousFunctionName] = eval( - transform_rule.script.function, - ); - transform_rule.script.name = ClientWorkerAnonymousFunctionName; - } - const ScriptAns = await Function( - "return (" + transform_rule.script.name + ")", - )()({ - fetched: tFetched, - request: tReq, - response: tRes, - }); - - if (ScriptAns.fetched) { - if (transform_rule.script.skip || false) { - return ScriptAns.response; - } - tFetched = true; - tRes = ScriptAns.response; - } else { - tReq = ScriptAns.request; - } - break; - default: - logger.warning( - `This Action:${transform_rule.action} is not supported yet`, - ); - break; - } - } - } - } - if (!tFetched) { - //3.0.0 默认改为skip - return fetch(request); - } - - return tRes; -}; -export default clientworkerhandle; diff --git a/src/index.ts b/src/index.ts index 51e8b36..5987842 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,58 +1,13 @@ /* eslint-disable no-restricted-globals */ import { version } from "../package.json"; -import { handleRoutes } from "./routes"; +import { handler } from "./cgi"; import { CacheDB } from "./utils/cache-db"; import * as logger from "./utils/logger"; -const sw = self as ServiceWorkerGlobalScope & - typeof globalThis & { - handleRoutes: typeof handleRoutes; - }; - -sw.handleRoutes = handleRoutes; - -const db = await CacheDB.create(); -const responseDb = await CacheDB.create("ClientWorker_ResponseCache"); - -logger.success(`ClientWorker${version} started!`); - -// TODO -// db.read("hotpatch").then((script) => { -// if (script) { -// cons.s("Hotpatch Loaded!"); -// eval(script as string); -// } else { -// cons.w("Hotpatch Not Found!"); -// } -// }); - -db.read("config").then((config) => { - const parsedConfig = JSON.parse(config) || {}; - setInterval( - async () => { - logger.success(`ClientWorker@${version} start to clean expired cache!`); - - const keys = await responseDb.cache.keys(); - - for (const key of keys) { - responseDb.cache.match(key).then((res) => { - if ( - Number(res!.headers.get("ClientWorker-ExpireTime")) <= - performance.now() - ) { - responseDb.cache.delete(key); - } - }); - } - }, - parseInt(parsedConfig.cleaninterval) || 60 * 1000, - ); -}); +const sw = self as ServiceWorkerGlobalScope & typeof globalThis; addEventListener("fetch", (event) => { - (event as FetchEvent).respondWith( - sw.handleRoutes((event as FetchEvent).request), - ); + (event as FetchEvent).respondWith(handler((event as FetchEvent).request)); }); addEventListener("install", () => { @@ -64,3 +19,44 @@ addEventListener("activate", () => { logger.success(`ClientWorker@${version} activated!`); sw.clients.claim(); }); + +(async () => { + const db = await CacheDB.create(); + const responseDb = await CacheDB.create("ClientWorker_ResponseCache"); + + logger.success(`ClientWorker${version} started!`); + + // TODO + // db.read("hotpatch").then((script) => { + // if (script) { + // cons.s("Hotpatch Loaded!"); + // eval(script as string); + // } else { + // cons.w("Hotpatch Not Found!"); + // } + // }); + + db.read("config").then((config) => { + const parsedConfig = JSON.parse(config) || {}; + + setInterval( + async () => { + logger.success(`ClientWorker@${version} start to clean expired cache!`); + + const keys = await responseDb.cache.keys(); + + for (const key of keys) { + responseDb.cache.match(key).then((res) => { + if ( + Number(res!.headers.get("ClientWorker-ExpireTime")) <= + performance.now() + ) { + responseDb.cache.delete(key); + } + }); + } + }, + parseInt(parsedConfig.cleaninterval) || 60 * 1000, + ); + }); +})(); diff --git a/src/types/config.ts b/src/types/config.ts index 8612ffb..41f0db6 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -1,4 +1,4 @@ -export type RuntimeConfig = { +export interface RuntimeConfig { hotpatch?: string[]; hotconfig?: string[]; cleaninterval?: string; @@ -13,7 +13,7 @@ export type RuntimeConfig = { return?: { body: string; header: { - ServerProvide: string; + "ServerProvide": string; "content-type": string; }; status: number; @@ -41,7 +41,7 @@ export type RuntimeConfig = { skip: boolean; }; header?: { - ServerProvide: string; + "ServerProvide": string; "content-type": string; }; searchin?: string; @@ -56,4 +56,4 @@ export type RuntimeConfig = { }[]; }[]; name: string; -}; +} diff --git a/src/types/index.ts b/src/types/index.ts index 103e59b..661ea92 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -5,6 +5,7 @@ export type CwRequestInit = RequestInit & { export type CwResponseInit = ResponseInit & { url?: string; headers?: Record; + body?: BodyInit; }; export interface FetchEngineConfig { diff --git a/src/utils/rebuild.ts b/src/utils/rebuild.ts index bfe4e29..74b14e5 100644 --- a/src/utils/rebuild.ts +++ b/src/utils/rebuild.ts @@ -1,5 +1,5 @@ -import * as logger from "./logger"; import type { CwRequestInit, CwResponseInit } from "../types"; +import * as logger from "./logger"; export function rebuildRequest(request: Request, init: CwRequestInit) { request = request.clone(); diff --git a/static/config.schema.json b/static/config.schema.json deleted file mode 100644 index e1b359b..0000000 --- a/static/config.schema.json +++ /dev/null @@ -1,242 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-06/schema#", - "$ref": "#/definitions/ClientWorker", - "definitions": { - "ClientWorker": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "hotpatch": { - "type": "array", - "items": { - "type": "string", - "format": "uri", - "qt-uri-protocols": ["https"], - "qt-uri-extensions": [".js"] - } - }, - "hotconfig": { - "type": "array", - "items": { - "type": "string", - "format": "uri", - "qt-uri-protocols": ["https"], - "qt-uri-extensions": [".yaml"] - } - }, - "cleaninterval": { - "type": "string" - }, - "catch_rules": { - "type": "array", - "items": { - "$ref": "#/definitions/CatchRule" - } - } - }, - "required": ["catch_rules", "name"], - "title": "Clientworker" - }, - "CatchRule": { - "type": "object", - "additionalProperties": false, - "properties": { - "rule": { - "type": "string" - }, - "transform_rules": { - "type": "array", - "items": { - "$ref": "#/definitions/TransformRule" - } - } - }, - "required": ["rule", "transform_rules"], - "title": "CatchRule" - }, - "TransformRule": { - "type": "object", - "additionalProperties": false, - "properties": { - "search": { - "type": "string" - }, - "searchin": { - "type": "string" - }, - "replace": { - "$ref": "#/definitions/Replace" - }, - "action": { - "type": "string", - "enum": ["redirect", "return", "fetch", "script"] - }, - "redirect": { - "$ref": "#/definitions/Redirect" - }, - "script": { - "$ref": "#/definitions/Script" - }, - "fetch": { - "$ref": "#/definitions/Fetch" - }, - "header": { - "$ref": "#/definitions/Header" - }, - "searchkey": { - "type": "string" - }, - "replacein": { - "type": "string" - }, - "replacekey": { - "type": "string" - }, - "searchflags": { - "type": "string" - }, - "replaceflags": { - "type": "string" - }, - "return": { - "$ref": "#/definitions/Return" - } - }, - "required": ["search"], - "title": "TransformRule" - }, - "Fetch": { - "type": "object", - "additionalProperties": false, - "properties": { - "status": { - "type": "integer" - }, - "engine": { - "type": "string", - "enum": ["fetch", "Crazy", "Classic", "Parallel", "KFCThursdayVW50"] - }, - "preflight": { - "type": "boolean" - }, - "timeout": { - "type": "integer" - }, - "cache": { - "$ref": "#/definitions/Cache" - }, - "threads": { - "type": "integer" - }, - "enable": { - "type": "boolean" - } - }, - "required": ["engine", "preflight"], - "title": "Fetch" - }, - "Cache": { - "type": "object", - "additionalProperties": false, - "properties": { - "expire": { - "type": "string" - }, - "delay": { - "type": "integer" - }, - "enable": { - "type": "boolean" - } - }, - "required": ["expire"], - "title": "Cache" - }, - "Header": { - "type": "object", - "additionalProperties": false, - "properties": { - "content-type": { - "type": "string" - }, - "ServerProvide": { - "type": "string" - } - }, - "required": ["ServerProvide", "content-type"], - "title": "Header" - }, - "Redirect": { - "type": "object", - "additionalProperties": false, - "properties": { - "to": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri", - "qt-uri-protocols": ["https"] - }, - "status": { - "type": "integer" - } - }, - "required": [], - "title": "Redirect" - }, - "Return": { - "type": "object", - "additionalProperties": false, - "properties": { - "body": { - "type": "string" - }, - "header": { - "$ref": "#/definitions/Header" - }, - "status": { - "type": "integer" - } - }, - "required": ["body", "header", "status"], - "title": "Return" - }, - "Script": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "skip": { - "type": "boolean" - }, - "function": { - "type": "string" - } - }, - "required": ["skip"], - "title": "Script" - }, - "Replace": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uri", - "qt-uri-protocols": ["https"] - } - }, - { - "type": "string" - } - ], - "title": "Replace" - } - } -} From ce3d480c852864e7a760a0949e4f07ea6b683232 Mon Sep 17 00:00:00 2001 From: so1ve Date: Thu, 29 Feb 2024 17:27:42 +0800 Subject: [PATCH 16/17] lint --- .prettierignore | 1 + eslint.config.js | 1 + package.json | 6 ++-- pnpm-lock.yaml | 74 +++++++++++++++++++-------------------- schema/config.schema.json | 72 ++++++++----------------------------- src/cgi/index.ts | 50 ++++++++++++++------------ 6 files changed, 83 insertions(+), 121 deletions(-) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..51eef02 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +docs/public/cw.js diff --git a/eslint.config.js b/eslint.config.js index d1a95b5..67e42b9 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,6 +1,7 @@ import { so1ve } from "@so1ve/eslint-config"; export default so1ve({ + ignores: ["docs/public/cw.js"], yaml: { overrides: { "yaml/no-empty-key": "off", diff --git a/package.json b/package.json index eb78161..c1ba3d5 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "scripts": { "build": "rimraf dist && tsup && nr build:minify && nr copy-cw", "build:minify": "tsup --minify", - "build:schema": "tsx scripts/build-schema.ts", + "build:schema": "tsx scripts/build-schema.ts && prettier . --write", "copy-cw": "rm ./docs/public/cw.js && cp ./dist/with-yaml.min.js ./docs/public/cw.js", "docs:build": "vitepress build docs", "docs:dev": "vitepress dev docs --host 0.0.0.0", @@ -66,8 +66,8 @@ }, "devDependencies": { "@antfu/ni": "^0.21.8", - "@so1ve/eslint-config": "^1.5.2", - "@so1ve/prettier-config": "^1.5.2", + "@so1ve/eslint-config": "^1.5.3", + "@so1ve/prettier-config": "^1.5.3", "@types/js-yaml": "^4.0.9", "@types/node": "^20.8.3", "bumpp": "^9.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4db47dc..500fa72 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,11 @@ devDependencies: specifier: ^0.21.8 version: 0.21.12 '@so1ve/eslint-config': - specifier: ^1.5.2 - version: 1.5.2(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6) + specifier: ^1.5.3 + version: 1.5.3(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6) '@so1ve/prettier-config': - specifier: ^1.5.2 - version: 1.5.2(prettier@3.2.5) + specifier: ^1.5.3 + version: 1.5.3(prettier@3.2.5) '@types/js-yaml': specifier: ^4.0.9 version: 4.0.9 @@ -876,7 +876,7 @@ packages: nopt: 7.2.0 proc-log: 3.0.0 read-package-json-fast: 3.0.2 - semver: 7.5.4 + semver: 7.6.0 walk-up-path: 3.0.1 dev: true @@ -1034,8 +1034,8 @@ packages: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@so1ve/eslint-config@1.5.2(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6): - resolution: {integrity: sha512-songYJdny1r365JSN7Fg0BbE2Al9Ml4PktPEj8o434PdYplN/G10KOOeyfR2s/7llgHPTR1CT41GxUt5nZ04Ow==} + /@so1ve/eslint-config@1.5.3(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.5)(typescript@5.3.3)(vitest@0.34.6): + resolution: {integrity: sha512-QBi+jAkoVgxr/hm3Npsawj7TKiDzp0hwPJz6HeE8/CxPdIkpHJNFoUSuciUvwPYvd35AhcrYECxlAzOCjXx4ZA==} peerDependencies: eslint: '>=8.40.0' prettier: ^3.0.0 @@ -1043,8 +1043,8 @@ packages: '@eslint-community/eslint-plugin-eslint-comments': 4.1.0(eslint@8.56.0) '@html-eslint/eslint-plugin': 0.23.1 '@html-eslint/parser': 0.23.0 - '@so1ve/eslint-plugin': 1.5.2(eslint@8.56.0)(typescript@5.3.3) - '@so1ve/eslint-plugin-sort-imports': 1.5.2(eslint@8.56.0) + '@so1ve/eslint-plugin': 1.5.3(eslint@8.56.0)(typescript@5.3.3) + '@so1ve/eslint-plugin-sort-imports': 1.5.3(eslint@8.56.0) '@stylistic/eslint-plugin': 1.6.2(eslint@8.56.0)(typescript@5.3.3) '@unocss/eslint-config': 0.58.5(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 @@ -1094,8 +1094,8 @@ packages: - vitest dev: true - /@so1ve/eslint-plugin-sort-imports@1.5.2(eslint@8.56.0): - resolution: {integrity: sha512-+QKs6m3KJbRA4x3mEV09h1u68fl7QgzY5uku0jidcqa4ryR2xpdQPIq7N4ZegiAgkEZcNKBUpPBLzWW/KKYtlw==} + /@so1ve/eslint-plugin-sort-imports@1.5.3(eslint@8.56.0): + resolution: {integrity: sha512-6fSIJM2DOCRs9FyEEfzqSds44CrRYHOCxE3me2jO5a4XHgVJmZoZJs3B5N3zcLR/esdQCmmjx0xjx+x1V3VxTA==} peerDependencies: eslint: '>=8.40.0' dependencies: @@ -1103,8 +1103,8 @@ packages: natsort: 2.0.3 dev: true - /@so1ve/eslint-plugin@1.5.2(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-XsEJMylc6G3Li8TSqlf8//V8USSn+x6oUvQv8ynDs6Gae9nS8xqS2yLBj1XgxUkuLDwxmK+br5Vmk1AssUkzgQ==} + /@so1ve/eslint-plugin@1.5.3(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-I9um9UdSZliFGSEAFT4Z0pCm3L+RWvvZh9rsZUnaiojJv4yvQNa0XOotwm3qFyHfWt0wpzPrFpOX5GsAbszkqg==} dependencies: '@typescript-eslint/types': 7.1.0 '@typescript-eslint/utils': 7.1.0(eslint@8.56.0)(typescript@5.3.3) @@ -1114,20 +1114,20 @@ packages: - typescript dev: true - /@so1ve/prettier-config@1.5.2(prettier@3.2.5): - resolution: {integrity: sha512-c0KVJ4qwUyxFWLXfOgh9wTMiOII5k6ibCqITcg3EZbEh5JURNjKMMus0a2QbaKT6mY4P/4mHkjLelHjisJgtXA==} + /@so1ve/prettier-config@1.5.3(prettier@3.2.5): + resolution: {integrity: sha512-+ONVJnTuELE+99aWbvH4N3zp6pP44gU8tXRgHyM0aky6I9Ott2KawpQ1saeFIDtVigeZqh6yETS4/yOjJEXVIw==} peerDependencies: prettier: ^3.0.0 dependencies: - '@so1ve/prettier-plugin-toml': 1.5.2(prettier@3.2.5) + '@so1ve/prettier-plugin-toml': 1.5.3(prettier@3.2.5) prettier: 3.2.5 prettier-plugin-astro: 0.13.0 - prettier-plugin-curly-and-jsdoc: 1.5.2(prettier@3.2.5) + prettier-plugin-curly-and-jsdoc: 1.5.3(prettier@3.2.5) prettier-plugin-pkgsort: 0.2.1(prettier@3.2.5) dev: true - /@so1ve/prettier-plugin-toml@1.5.2(prettier@3.2.5): - resolution: {integrity: sha512-7jYaZAicKROef6gUBCoUqSyQZfOYTTM53Lt8GoPBoevlcQGdNPXMHQv0yQOsmhdiMcn3WfNl3bWIuCo5JwyeIA==} + /@so1ve/prettier-plugin-toml@1.5.3(prettier@3.2.5): + resolution: {integrity: sha512-UYaEKto2zkXxJWHZ3/Hg+ozwVwdrKvl3HuK+/wJMnIl4DCjQ8J2ppMV9GatVm8t5wxfLxPjNmOT1kzRXAvZgYw==} peerDependencies: prettier: ^3.0.0 dependencies: @@ -1370,7 +1370,7 @@ packages: graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - semver: 7.5.4 + semver: 7.6.0 ts-api-utils: 1.0.3(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: @@ -1500,7 +1500,7 @@ packages: glob: 7.2.3 is-glob: 4.0.3 lodash: 4.17.21 - semver: 7.5.4 + semver: 7.6.0 tsutils: 3.21.0(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: @@ -1521,7 +1521,7 @@ packages: debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.4 + semver: 7.6.0 tsutils: 3.21.0(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: @@ -1543,7 +1543,7 @@ packages: globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.5.4 + semver: 7.6.0 ts-api-utils: 1.0.3(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: @@ -1565,7 +1565,7 @@ packages: globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.5.4 + semver: 7.6.0 ts-api-utils: 1.0.3(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: @@ -1586,7 +1586,7 @@ packages: '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.3.3) eslint: 8.56.0 eslint-scope: 5.1.1 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript @@ -1605,7 +1605,7 @@ packages: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.3.3) eslint: 8.56.0 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript @@ -1624,7 +1624,7 @@ packages: '@typescript-eslint/types': 7.1.0 '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.3.3) eslint: 8.56.0 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript @@ -1688,7 +1688,7 @@ packages: '@typescript-eslint/utils': 6.21.0(eslint@8.56.0)(typescript@5.3.3) '@unocss/config': 0.58.5 '@unocss/core': 0.58.5 - magic-string: 0.30.6 + magic-string: 0.30.7 synckit: 0.9.0 transitivePeerDependencies: - eslint @@ -2173,7 +2173,7 @@ packages: /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: - semver: 7.5.4 + semver: 7.6.0 dev: true /bumpp@9.3.0: @@ -2797,7 +2797,7 @@ packages: eslint: '>=6.0.0' dependencies: eslint: 8.56.0 - semver: 7.5.4 + semver: 7.6.0 dev: true /eslint-config-flat-gitignore@0.1.3: @@ -2987,7 +2987,7 @@ packages: is-glob: 4.0.3 minimatch: 3.1.2 resolve: 1.22.8 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-typescript @@ -3125,7 +3125,7 @@ packages: is-core-module: 2.13.1 minimatch: 3.1.2 resolve: 1.22.8 - semver: 7.5.4 + semver: 7.6.0 dev: true /eslint-plugin-no-await-in-promise@1.1.5(eslint@8.56.0): @@ -3244,7 +3244,7 @@ packages: read-pkg-up: 7.0.1 regexp-tree: 0.1.27 regjsparser: 0.10.0 - semver: 7.5.4 + semver: 7.6.0 strip-indent: 3.0.0 transitivePeerDependencies: - supports-color @@ -4249,7 +4249,7 @@ packages: acorn: 8.11.3 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - semver: 7.5.4 + semver: 7.6.0 dev: true /jsonc-parser@3.2.1: @@ -5369,8 +5369,8 @@ packages: sass-formatter: 0.7.9 dev: true - /prettier-plugin-curly-and-jsdoc@1.5.2(prettier@3.2.5): - resolution: {integrity: sha512-Co9fNy+duQs+dehhpIQgHXwPIqYKlrjF9BolEQgHAG0AgLjW7NjmTm4K4gAZmTLZTtAyr/wz0DdN920/dIC1Gg==} + /prettier-plugin-curly-and-jsdoc@1.5.3(prettier@3.2.5): + resolution: {integrity: sha512-VWiTD2D89peAzCPGZbRjAikv8LoD3TPQVpBTN1IJ+cpj/dNfIi16WBPmvhj3N7Gec6yTAMwoPmVoYRG54+hWyA==} peerDependencies: prettier: ^3.0.0 dependencies: @@ -6808,7 +6808,7 @@ packages: espree: 9.6.1 esquery: 1.5.0 lodash: 4.17.21 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color dev: true diff --git a/schema/config.schema.json b/schema/config.schema.json index 1f9e165..5501962 100644 --- a/schema/config.schema.json +++ b/schema/config.schema.json @@ -63,54 +63,34 @@ "type": "string" } }, - "required": [ - "ServerProvide", - "content-type" - ] + "required": ["ServerProvide", "content-type"] }, "status": { "type": "number" } }, - "required": [ - "body", - "header", - "status" - ] + "required": ["body", "header", "status"] }, "fetch": { "type": "object", "properties": { "redirect": { "type": "string", - "enum": [ - "error", - "follow", - "manual" - ] + "enum": ["error", "follow", "manual"] }, "status": { "type": "number" }, "credentials": { "type": "string", - "enum": [ - "same-origin", - "include", - "omit" - ] + "enum": ["same-origin", "include", "omit"] }, "trylimit": { "type": "number" }, "mode": { "type": "string", - "enum": [ - "same-origin", - "cors", - "navigate", - "no-cors" - ] + "enum": ["same-origin", "cors", "navigate", "no-cors"] }, "timeout": { "type": "number" @@ -128,9 +108,7 @@ "type": "string" } }, - "required": [ - "expire" - ] + "required": ["expire"] }, "threads": { "type": "number" @@ -152,10 +130,7 @@ "type": "boolean" } }, - "required": [ - "engine", - "preflight" - ] + "required": ["engine", "preflight"] }, "script": { "type": "object", @@ -170,9 +145,7 @@ "type": "boolean" } }, - "required": [ - "skip" - ] + "required": ["skip"] }, "header": { "type": "object", @@ -184,10 +157,7 @@ "type": "string" } }, - "required": [ - "ServerProvide", - "content-type" - ] + "required": ["ServerProvide", "content-type"] }, "searchin": { "type": "string" @@ -207,13 +177,7 @@ }, "action": { "type": "string", - "enum": [ - "fetch", - "redirect", - "return", - "script", - "skip" - ] + "enum": ["fetch", "redirect", "return", "script", "skip"] }, "searchkey": { "type": "string" @@ -234,26 +198,18 @@ "type": "string" } }, - "required": [ - "search" - ] + "required": ["search"] } } }, - "required": [ - "rule", - "transform_rules" - ] + "required": ["rule", "transform_rules"] } }, "name": { "type": "string" } }, - "required": [ - "catch_rules", - "name" - ] + "required": ["catch_rules", "name"] } } -} \ No newline at end of file +} diff --git a/src/cgi/index.ts b/src/cgi/index.ts index 9296f62..5e5ac99 100644 --- a/src/cgi/index.ts +++ b/src/cgi/index.ts @@ -48,7 +48,7 @@ export async function handler(request: Request) { if (transformRule.search === "_") { transformRule.search = catch_rule.rule; } - switch (transformRule.searchin || "url") { + switch (transformRule.searchin ?? "url") { case "url": { if ( new RegExp(transformRule.search, transformRule.searchflags).test( @@ -125,7 +125,7 @@ export async function handler(request: Request) { } } - switch (transformRule.replacein || "url") { + switch (transformRule.replacein ?? "url") { case "url": { if (tFetched && tSearched) { logger.warning( @@ -143,7 +143,7 @@ export async function handler(request: Request) { tReq = rebuildRequest(tReq, { url: tReq.url.replace( new RegExp( - transformRule.replacekey || transformRule.search, + transformRule.replacekey ?? transformRule.search, transformRule.replaceflags, ), transformRule.replace, @@ -166,7 +166,7 @@ export async function handler(request: Request) { rebuildRequest(tReq, { url: tReq.url.replace( new RegExp( - transformRule.replacekey || transformRule.search, + transformRule.replacekey ?? transformRule.search, transformRule.replaceflags, ), replacement, @@ -186,7 +186,7 @@ export async function handler(request: Request) { tRes = rebuildResponse(tRes, { body: (await tRes.clone().text()).replace( new RegExp( - transformRule.replacekey || transformRule.search, + transformRule.replacekey ?? transformRule.search, transformRule.replaceflags, ), transformRule.replace, @@ -196,7 +196,7 @@ export async function handler(request: Request) { tReq = rebuildRequest(tReq, { body: (await tReq.clone().text()).replace( new RegExp( - transformRule.replacekey || transformRule.search, + transformRule.replacekey ?? transformRule.search, transformRule.replaceflags, ), transformRule.replace, @@ -212,7 +212,7 @@ export async function handler(request: Request) { tRes = rebuildResponse(tRes, { status: tRes.status.replace( new RegExp( - transformRule.replacekey || transformRule.search, + transformRule.replacekey ?? transformRule.search, transformRule.replaceflags, ), transformRule.replace, @@ -226,7 +226,7 @@ export async function handler(request: Request) { tRes = rebuildResponse(tRes, { statusText: tRes.statusText.replace( new RegExp( - transformRule.replacekey || transformRule.search, + transformRule.replacekey ?? transformRule.search, transformRule.replaceflags, ), transformRule.replace, @@ -307,7 +307,7 @@ export async function handler(request: Request) { }); // https://segmentfault.com/a/1190000006095018 delete fetchConfig.credentials; // fetchConfig.mode = "cors" - for (const eReq in EngineFetchList) { + for (let eReq = 0; eReq < EngineFetchList.length; eReq++) { EngineFetchList[eReq] = new Request( EngineFetchList[eReq].url, tReq, @@ -315,11 +315,12 @@ export async function handler(request: Request) { } } - tRes = await new Promise(async (res, rej) => { + tRes = await new Promise((resolve) => { async function EngineFetcher() { let cRes; - return new Promise(async (resolve, reject) => { + // eslint-disable-next-line no-async-promise-executor + return new Promise(async (resolve) => { if (EngineFetch) { switch (transformRule.fetch.engine || "parallel") { case "classic": { @@ -375,13 +376,14 @@ export async function handler(request: Request) { } if ( typeof transformRule.fetch.cache === "object" && - cRes.status === (transformRule.fetch.status || 200) + cRes.status === (transformRule.fetch.status ?? 200) ) { cRes = rebuildResponse(cRes, { headers: { ClientWorker_ExpireTime: Date.now() + Number( + // eslint-disable-next-line no-eval (0, eval)(transformRule.fetch.cache.expire || "0"), ), }, @@ -405,33 +407,34 @@ export async function handler(request: Request) { Date.now() ) { logger.success(`${tReq.url} is fetched from cache`); - res(cRes); + resolve(cRes); } else { logger.warning(`${tReq.url} is expired.`); - res( + resolve( Promise.any([ EngineFetcher(), - new Promise(async (resolve, reject) => { + new Promise((resolve) => { setTimeout(() => { logger.error( `${tReq.url} is too late to fetch,even though the cache has expired,so return by cache`, ); resolve(cRes); - }, transformRule.fetch.cache.delay || 3000); + }, transformRule.fetch.cache.delay ?? 3000); }), - ]), + // TODO: Refactor + ]) as Promise, ); } } else { logger.warning( `${tReq.url} is not cached!And it is too late to fetch!`, ); - res(EngineFetcher()); + resolve(EngineFetcher()); } }); }); } else { - res(EngineFetcher()); + resolve(EngineFetcher()); } }); tFetched = true; @@ -445,7 +448,7 @@ export async function handler(request: Request) { if (typeof transformRule.redirect.url === "string") { return Response.redirect( transformRule.redirect.url, - transformRule.redirect.status || 301, + transformRule.redirect.status ?? 301, ); } @@ -454,7 +457,7 @@ export async function handler(request: Request) { new RegExp(transformRule.search), transformRule.redirect.to, ), - transformRule.redirect.status || 301, + transformRule.redirect.status ?? 301, ); } case "return": { @@ -474,12 +477,13 @@ export async function handler(request: Request) { } if (typeof transformRule.script.function === "string") { const ClientWorkerAnonymousFunctionName = `ClientWorker_AnonymousFunction_${Date.now()}`; - // eslint-disable-next-line no-eval + // eslint-disable-next-line no-eval, no-restricted-globals self[ClientWorkerAnonymousFunctionName] = (0, eval)( transformRule.script.function, ); transformRule.script.name = ClientWorkerAnonymousFunctionName; } + // eslint-disable-next-line ts/no-implied-eval, no-new-func const ScriptAns = await new Function( `return (${transformRule.script.name})`, )()({ @@ -501,7 +505,7 @@ export async function handler(request: Request) { } default: { logger.warning( - `This Action:${transformRule.action} is not supported yet`, + `This action: ${transformRule.action as string} is not supported yet.`, ); break; } From 37e8bf5694b057b6499c9898ba7bc56211a68169 Mon Sep 17 00:00:00 2001 From: so1ve Date: Thu, 29 Feb 2024 17:43:25 +0800 Subject: [PATCH 17/17] fix lint and type --- src/cgi/index.ts | 134 +++++++++++++++++++++++++------------------- src/types/config.ts | 48 ++++++++-------- 2 files changed, 102 insertions(+), 80 deletions(-) diff --git a/src/cgi/index.ts b/src/cgi/index.ts index 5e5ac99..1995857 100644 --- a/src/cgi/index.ts +++ b/src/cgi/index.ts @@ -6,7 +6,11 @@ import { engineKFCThursdayVW50, engineParallel, } from "../engine"; -import type { RuntimeConfig } from "../types/config"; +import type { + RuntimeConfig, + TransformRuleFetch, + TransformRuleHeader, +} from "../types/config"; import { CacheDB } from "../utils/cache-db"; import * as logger from "../utils/logger"; import { rebuildRequest, rebuildResponse } from "../utils/rebuild"; @@ -28,9 +32,9 @@ export async function handler(request: Request) { } let tFetched = false; - let EngineFetch = false; - let fetchConfig = {}; - const EngineFetchList: Request[] = []; + let isUsingEngineFetch = false; + let fetchConfig: TransformRuleFetch | undefined; + const engineFetchList: Request[] = []; let tReq = request; let tRes = new Response(); for (const catch_rule of config.catch_rules) { @@ -62,7 +66,7 @@ export async function handler(request: Request) { case "header": { if ( new RegExp(transformRule.search, transformRule.searchflags).test( - tReq.headers.get(transformRule.searchkey)!, + tReq.headers.get(transformRule.searchkey!)!, ) ) { tSearched = true; @@ -135,7 +139,7 @@ export async function handler(request: Request) { } if (typeof transformRule.replace !== "undefined" && tSearched) { if (typeof transformRule.replace === "string") { - if (EngineFetch) { + if (isUsingEngineFetch) { logger.warning( `EngineFetch Disabled for ${tReq.url},the request will downgrade to normal fetch`, ); @@ -149,9 +153,9 @@ export async function handler(request: Request) { transformRule.replace, ), }); - EngineFetch = false; + isUsingEngineFetch = false; } else { - if (EngineFetch) { + if (isUsingEngineFetch) { logger.warning( `Replacement cannot be used for ${tReq.url},the request is already powered by fetch-engine `, ); @@ -159,10 +163,10 @@ export async function handler(request: Request) { } for (const replacement of transformRule.replace) { if (replacement === "_") { - EngineFetchList.push(tReq); + engineFetchList.push(tReq); continue; } - EngineFetchList.push( + engineFetchList.push( rebuildRequest(tReq, { url: tReq.url.replace( new RegExp( @@ -175,7 +179,7 @@ export async function handler(request: Request) { ); } - EngineFetch = true; + isUsingEngineFetch = true; } } break; @@ -189,7 +193,8 @@ export async function handler(request: Request) { transformRule.replacekey ?? transformRule.search, transformRule.replaceflags, ), - transformRule.replace, + // TODO + transformRule.replace as string, ), }); } else { @@ -199,7 +204,8 @@ export async function handler(request: Request) { transformRule.replacekey ?? transformRule.search, transformRule.replaceflags, ), - transformRule.replace, + // TODO + transformRule.replace as string, ), }); } @@ -210,12 +216,14 @@ export async function handler(request: Request) { case "status": { if (typeof transformRule.replace === "string" && tSearched) { tRes = rebuildResponse(tRes, { - status: tRes.status.replace( - new RegExp( - transformRule.replacekey ?? transformRule.search, - transformRule.replaceflags, + status: Number( + String(tRes.status).replace( + new RegExp( + transformRule.replacekey ?? transformRule.search, + transformRule.replaceflags, + ), + transformRule.replace, ), - transformRule.replace, ), }); } @@ -248,11 +256,17 @@ export async function handler(request: Request) { for (const header in transformRule.header) { if (tFetched) { tRes = rebuildResponse(tRes, { - headers: { [header]: transformRule.header[header] }, + headers: { + [header]: + transformRule.header[header as keyof TransformRuleHeader], + }, }); } else { tReq = rebuildRequest(tReq, { - headers: { [header]: transformRule.header[header] }, + headers: { + [header]: + transformRule.header[header as keyof TransformRuleHeader], + }, }); } } @@ -275,15 +289,8 @@ export async function handler(request: Request) { break; } - fetchConfig = { - status: transformRule.fetch.status, - mode: transformRule.fetch.mode, - credentials: transformRule.fetch.credentials, - redirect: transformRule.fetch.redirect, - timeout: transformRule.fetch.timeout, - threads: transformRule.fetch.threads, - limit: transformRule.fetch.limit, - }; + fetchConfig = transformRule.fetch; + if (!transformRule.fetch.preflight) { tReq = new Request(tReq.url, { method: ((method) => { @@ -307,9 +314,9 @@ export async function handler(request: Request) { }); // https://segmentfault.com/a/1190000006095018 delete fetchConfig.credentials; // fetchConfig.mode = "cors" - for (let eReq = 0; eReq < EngineFetchList.length; eReq++) { - EngineFetchList[eReq] = new Request( - EngineFetchList[eReq].url, + for (let eReq = 0; eReq < engineFetchList.length; eReq++) { + engineFetchList[eReq] = new Request( + engineFetchList[eReq].url, tReq, ); } @@ -317,22 +324,22 @@ export async function handler(request: Request) { tRes = await new Promise((resolve) => { async function EngineFetcher() { - let cRes; + let cRes: Response; // eslint-disable-next-line no-async-promise-executor - return new Promise(async (resolve) => { - if (EngineFetch) { - switch (transformRule.fetch.engine || "parallel") { + return new Promise(async (resolve) => { + if (isUsingEngineFetch) { + switch (transformRule.fetch?.engine ?? "parallel") { case "classic": { cRes = await engineClassic( - EngineFetchList, + engineFetchList, fetchConfig, ); break; } case "parallel": { cRes = await engineParallel( - EngineFetchList, + engineFetchList, fetchConfig, ); break; @@ -344,20 +351,20 @@ export async function handler(request: Request) { ); } cRes = await engineKFCThursdayVW50( - EngineFetchList, + engineFetchList, fetchConfig, ); break; } default: { logger.error( - `Fetch Engine ${transformRule.fetch.engine} is not supported`, + `Fetch Engine ${transformRule.fetch?.engine} is not supported`, ); break; } } } else { - switch (transformRule.fetch.engine || "fetch") { + switch (transformRule.fetch?.engine ?? "fetch") { case "fetch": { cRes = await engineFetch(tReq, fetchConfig); break; @@ -368,24 +375,27 @@ export async function handler(request: Request) { } default: { logger.error( - `${tReq.url} the ${transformRule.fetch.engine} engine are not supported`, + `${tReq.url} the ${transformRule.fetch?.engine} engine are not supported`, ); break; } } } if ( - typeof transformRule.fetch.cache === "object" && - cRes.status === (transformRule.fetch.status ?? 200) + typeof transformRule.fetch?.cache === "object" && + cRes.status === (transformRule.fetch?.status ?? 200) ) { cRes = rebuildResponse(cRes, { headers: { - ClientWorker_ExpireTime: + "ClientWorker-ExpireTime": String( Date.now() + - Number( - // eslint-disable-next-line no-eval - (0, eval)(transformRule.fetch.cache.expire || "0"), - ), + Number( + // eslint-disable-next-line no-eval + (0, eval)( + transformRule.fetch?.cache.expire ?? "0", + ), + ), + ), }, }); caches.open("ClientWorker_ResponseCache").then((cache) => { @@ -398,12 +408,13 @@ export async function handler(request: Request) { } }); } - if (typeof transformRule.fetch.cache === "object") { + if (typeof transformRule.fetch?.cache === "object") { caches.open("ClientWorker_ResponseCache").then((cache) => { cache.match(tReq).then((cRes) => { if (cRes) { if ( - Number(cRes.headers.get("ClientWorker_ExpireTime")) > + // TODO: extract to constant + Number(cRes.headers.get("ClientWorker-ExpireTime")) > Date.now() ) { logger.success(`${tReq.url} is fetched from cache`); @@ -419,7 +430,7 @@ export async function handler(request: Request) { `${tReq.url} is too late to fetch,even though the cache has expired,so return by cache`, ); resolve(cRes); - }, transformRule.fetch.cache.delay ?? 3000); + }, transformRule.fetch?.cache?.delay ?? 3000); }), // TODO: Refactor ]) as Promise, @@ -455,19 +466,25 @@ export async function handler(request: Request) { return Response.redirect( tReq.url.replace( new RegExp(transformRule.search), - transformRule.redirect.to, + // TODO + transformRule.redirect.to!, ), transformRule.redirect.status ?? 301, ); } case "return": { if (typeof transformRule.return === "undefined") { - transformRule.return = {}; + // TODO + transformRule.return = { + body: "Error!", + status: 503, + headers: { "ServerProvide": "", "content-type": "text/plain" }, + }; } - return new Response(transformRule.return.body || "Error!", { - status: transformRule.return.status || 503, - headers: transformRule.return.headers || {}, + return new Response(transformRule.return?.body ?? "Error!", { + status: transformRule.return?.status ?? 503, + headers: transformRule.return?.headers ?? {}, }); } case "script": { @@ -477,8 +494,9 @@ export async function handler(request: Request) { } if (typeof transformRule.script.function === "string") { const ClientWorkerAnonymousFunctionName = `ClientWorker_AnonymousFunction_${Date.now()}`; + // TODO // eslint-disable-next-line no-eval, no-restricted-globals - self[ClientWorkerAnonymousFunctionName] = (0, eval)( + (self as any)[ClientWorkerAnonymousFunctionName] = (0, eval)( transformRule.script.function, ); transformRule.script.name = ClientWorkerAnonymousFunctionName; diff --git a/src/types/config.ts b/src/types/config.ts index 41f0db6..136eaf3 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -1,3 +1,26 @@ +export interface TransformRuleFetch { + redirect?: RequestRedirect; + status?: number; + credentials?: RequestCredentials; + trylimit?: number; + mode?: RequestMode; + timeout?: number; + cache?: { + enable?: boolean; + delay?: number; + expire: string; + }; + threads?: number; + enable?: boolean; + engine: "fetch" | "crazy" | "classic" | "parallel" | "KFCThursdayVW50"; + preflight: boolean; +} + +export interface TransformRuleHeader { + "ServerProvide": string; + "content-type": string; +} + export interface RuntimeConfig { hotpatch?: string[]; hotconfig?: string[]; @@ -12,38 +35,19 @@ export interface RuntimeConfig { }; return?: { body: string; - header: { + headers: { "ServerProvide": string; "content-type": string; }; status: number; }; - fetch?: { - redirect?: "error" | "follow" | "manual"; - status?: number; - credentials?: "same-origin" | "include" | "omit"; - trylimit?: number; - mode?: "same-origin" | "cors" | "navigate" | "no-cors"; - timeout?: number; - cache?: { - enable?: boolean; - delay?: number; - expire: string; - }; - threads?: number; - enable?: boolean; - engine: "fetch" | "crazy" | "classic" | "parallel" | "KFCThursdayVW50"; - preflight: boolean; - }; + fetch?: TransformRuleFetch; script?: { function?: string; name?: string; skip: boolean; }; - header?: { - "ServerProvide": string; - "content-type": string; - }; + header?: TransformRuleHeader; searchin?: string; replace?: string | string[]; action?: "fetch" | "redirect" | "return" | "script" | "skip";