diff --git a/.changeset/config.json b/.changeset/config.json index cee6df899..d2b4e9031 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -5,7 +5,10 @@ "fixed": [], "linked": [], "access": "public", - "baseBranch": "main", + "baseBranch": "v2-dev", "updateInternalDependencies": "patch", - "ignore": [] + "ignore": ["@farmfe-examples/*", "farm-docs"], + "snapshot": { + "useCalculatedVersion": true + } } diff --git a/.changeset/heavy-rabbits-smile.md b/.changeset/heavy-rabbits-smile.md deleted file mode 100644 index e62138a87..000000000 --- a/.changeset/heavy-rabbits-smile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@farmfe/core": patch ---- - -add assets mode for asset path generate diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c0302e544..4e9333b43 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,146 +1,18 @@ -name: E2E Tests +name: Nightly Release CI on: - pull_request: + push: branches: - - main + - v2-dev + +permissions: + contents: write + pull-requests: write + packages: write jobs: call-rust-build: uses: ./.github/workflows/rust-build.yaml - examples-test: - name: Examples Test - runs-on: ${{ matrix.settings.os }} - needs: [call-rust-build] - strategy: - fail-fast: false - matrix: - settings: - - os: ubuntu-latest - abi: linux-x64-gnu - - os: macos-latest - abi: darwin-arm64 - - os: macos-13 - abi: darwin-x64 - - os: windows-latest - abi: win32-x64-msvc - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - - name: Install Dependencies - run: npm install -g pnpm@9.1.0 && pnpm i --frozen-lockfile - - - uses: actions/download-artifact@v4 - id: download - with: - name: ${{ github.sha }}-${{ matrix.settings.abi }} - path: ./packages/core/binding - - - uses: actions/download-artifact@v4 - id: download-plugin-sass - with: - name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-sass - path: ./rust-plugins/sass/npm/${{ matrix.settings.abi }} - - - uses: actions/download-artifact@v4 - id: download-plugin-react - with: - name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-react - path: ./rust-plugins/react/npm/${{ matrix.settings.abi }} - - - uses: actions/download-artifact@v4 - id: download-create-farm-rust - with: - name: ${{ github.sha }}-${{ matrix.settings.abi }} - path: ./packages/create-farm - - - name: Build Examples - ${{ matrix.settings.abi }} - run: node scripts/test-examples.mjs - - - name: E2E Test Examples - ${{ matrix.settings.abi }} - run: npm run test-e2e - - # test create farm - - name: Build Create Farm - run: cd packages/create-farm && npm run build - - name: Test Create Farm React - ${{ matrix.settings.abi }} - run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-react --template react && cd my-test-app-react && pnpm i && pnpm build - - name: Test Create Farm Vue - ${{ matrix.settings.abi }} - run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-vue --template vue3 && cd my-test-app-vue && pnpm i && pnpm build - - name: Test Create Farm Solid - ${{ matrix.settings.abi }} - run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-solid --template solid && cd my-test-app-solid && pnpm i && pnpm build - - name: Test Create Farm Svelte - ${{ matrix.settings.abi }} - run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-svelte --template svelte && cd my-test-app-svelte && pnpm i && pnpm build - - name: Test Create Farm Lit - ${{ matrix.settings.abi }} - run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-lit --template lit && cd my-test-app-lit && pnpm i && pnpm build - - name: Test Create Farm Vanilla - ${{ matrix.settings.abi }} - run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-vanilla --template vanilla && cd my-test-app-vanilla && pnpm i && pnpm build - - name: Test Create Farm Preact - ${{ matrix.settings.abi }} - run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-preact --template preact && cd my-test-app-preact && pnpm i && pnpm build - - name: Test Create Farm Vue2 - ${{ matrix.settings.abi }} - run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-vue2 --template vue2 && cd my-test-app-vue2 && pnpm i && pnpm build - - type-check: - name: Type Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: actions/setup-node@v3 - with: - node-version: 18 - - name: Install Dependencies - run: npm install -g pnpm@9.1.0 && pnpm i --frozen-lockfile - - name: Build CLI and Core - run: pnpm --filter @farmfe/cli run build - - name: Type Check With Tsc - run: pnpm run --filter "@farmfe/*" type-check - - name: Changesets Check - run: npx changeset status --since=origin/main - - ts-test: - name: Typescript Test - runs-on: ${{ matrix.settings.os }} - needs: call-rust-build - strategy: - fail-fast: false - matrix: - settings: - - os: ubuntu-latest - abi: linux-x64-gnu - - os: ubuntu-20.04 - abi: linux-x64-gnu - - os: macos-13 - abi: darwin-x64 - - os: macos-latest - abi: darwin-arm64 - - os: windows-latest - abi: win32-x64-msvc - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - - name: Install Dependencies - run: npm install -g pnpm@9.1.0 && pnpm i --frozen-lockfile - - name: Build CLI and Core - run: pnpm --filter @farmfe/cli run build - - uses: actions/download-artifact@v4 - id: download - with: - name: ${{ github.sha }}-${{ matrix.settings.abi }} - path: ./packages/core/binding - - name: Build Core CJS - run: cd packages/core && pnpm run build:cjs - - name: Test - ${{ matrix.settings.abi }} - run: npm run test - # - name: Setup tmate session - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - check-core-artifacts: name: Check Core Artifacts runs-on: ubuntu-latest @@ -182,6 +54,7 @@ jobs: settings: - name: plugin-sass - name: plugin-react + - name: plugin-replace-dirname steps: - uses: actions/download-artifact@v4 with: @@ -193,33 +66,72 @@ jobs: test -f /tmp/artifacts/${{ github.sha }}-${abi}-${{ matrix.settings.name }}/index.farm done - benchmarks: + nightly-release: + name: Nightly Release needs: [call-rust-build] - runs-on: ${{ matrix.settings.os }} - strategy: - fail-fast: false - matrix: - settings: - - os: ubuntu-latest - abi: linux-x64-gnu + runs-on: ubuntu-latest steps: - - uses: "actions/checkout@v3" - - uses: actions/setup-node@v3 + - name: Checkout Repo + uses: actions/checkout@v3 + + - name: Setup Node.js 18.x + uses: actions/setup-node@v3 with: - node-version: 18 - - name: Install Dependencies - run: npm install -g pnpm@9.1.0 && pnpm i --frozen-lockfile - - name: Build CLI and Core - run: pnpm --filter @farmfe/cli run build + node-version: 18.x + + # batch download artifacts - uses: actions/download-artifact@v4 - id: download with: - name: ${{ github.sha }}-${{ matrix.settings.abi }} - path: ./packages/core/binding - - name: Build Core CJS - run: cd packages/core && pnpm run build:cjs - - name: Run benchmarks - uses: CodSpeedHQ/action@v3 + path: /tmp/artifacts + - name: Copy Farm Core Binary + run: cp /tmp/artifacts/${{ github.sha }}-linux-x64-gnu/* ./packages/core/binding + - name: Move Artifacts + run: | + for abi in linux-x64-gnu linux-x64-musl darwin-x64 win32-x64-msvc linux-arm64-musl linux-arm64-gnu darwin-arm64 win32-ia32-msvc win32-arm64-msvc + do + mv /tmp/artifacts/${{ github.sha }}-${abi}/* ./packages/core/npm/${abi} + mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-react/* ./rust-plugins/react/npm/${abi} + mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-replace-dirname/* ./rust-plugins/replace-dirname/npm/${abi} + mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-sass/* ./rust-plugins/sass/npm/${abi} + mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi} + + test -f ./packages/core/npm/${abi}/farm.${abi}.node + test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node + test -f ./rust-plugins/react/npm/${abi}/index.farm + test -f ./rust-plugins/replace-dirname/npm/${abi}/index.farm + test -f ./rust-plugins/sass/npm/${abi}/index.farm + done + for abi in android-arm-eabi linux-arm-gnueabihf android-arm64 + do + mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi} + test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node + done + + - name: Install Dependencies + run: npm install -g pnpm@9.4.0 && pnpm i --frozen-lockfile + - name: Build Plugin Tools + run: pnpm --filter @farmfe/plugin-tools run build + + - name: Create Nightly Release Pull Request or Publish Nightly Version to npm + id: changesets + uses: changesets/action@v1 with: - run: npm exec vitest bench - token: ${{ secrets.CODSPEED_TOKEN }} + version: pnpm run bump:nightly + publish: npm run release:nightly + branch: v2-dev + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + # - name: Comment PR + # uses: actions/github-script@v6 + # if: success() + # with: + # github-token: ${{secrets.GITHUB_TOKEN}} + # script: | + # github.rest.issues.createComment({ + # issue_number: context.issue.number, + # owner: context.repo.owner, + # repo: context.repo.repo, + # body: '🎉 Nightly version has been published to npm!' + # }) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 8b177566d..24df7752e 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -22,15 +22,3 @@ jobs: run: cargo fmt - name: Run cargo clippy run: cargo clippy - lint: - name: TS Code Lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - - name: Install Dependencies - run: npm install -g pnpm@9.1.0 && pnpm i --frozen-lockfile - - name: Run lint - run: npx biome check --no-errors-on-unmatched --files-ignore-unknown=true diff --git a/.github/workflows/release-plz.yaml b/.github/workflows/release-plz.yaml index aba0b9860..f2383998b 100644 --- a/.github/workflows/release-plz.yaml +++ b/.github/workflows/release-plz.yaml @@ -36,4 +36,4 @@ jobs: if: ${{ failure() }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 507c69ef7..34a9b72ec 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,10 +16,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Setup Node.js 18.x - uses: actions/setup-node@v4 + uses: actions/setup-node@v3 with: node-version: 18.x diff --git a/.github/workflows/rust-build.yaml b/.github/workflows/rust-build.yaml index b2bab1955..b6307bd03 100644 --- a/.github/workflows/rust-build.yaml +++ b/.github/workflows/rust-build.yaml @@ -21,6 +21,7 @@ jobs: cd ../create-farm && npm run build -- --target x86_64-unknown-linux-gnu && cd ../../rust-plugins/react && npm run build -- --target x86_64-unknown-linux-gnu --abi linux-x64-gnu && + cd ../replace-dirname && npm run build -- --target x86_64-unknown-linux-gnu --abi linux-x64-gnu && apt install -y protobuf-compiler && cd ../sass && npm run build -- --target x86_64-unknown-linux-gnu --abi linux-x64-gnu @@ -36,6 +37,7 @@ jobs: cd ../create-farm && npm run build -- --target x86_64-unknown-linux-musl && cd ../../rust-plugins/react && npm run build -- --target x86_64-unknown-linux-musl --abi linux-x64-musl && + cd ../replace-dirname && npm run build -- --target x86_64-unknown-linux-musl --abi linux-x64-musl && apk add protobuf && cd ../sass && npm run build -- --target x86_64-unknown-linux-musl --abi linux-x64-musl @@ -60,6 +62,7 @@ jobs: cd packages/core && npm run build:rs -- --target i686-pc-windows-msvc --cargo-flags="--no-default-features" cd ../create-farm && npm run build -- --target i686-pc-windows-msvc cd ../../rust-plugins/react && npm run build -- --target i686-pc-windows-msvc --abi win32-ia32-msvc + cd ../replace-dirname && npm run build -- --target i686-pc-windows-msvc --abi win32-ia32-msvc cd ../sass && npm run build -- --target i686-pc-windows-msvc --abi win32-ia32-msvc - os: windows-latest abi: win32-arm64-msvc @@ -71,6 +74,7 @@ jobs: cd packages/core && npm run build:rs -- --target aarch64-pc-windows-msvc --cargo-flags="--no-default-features" cd ../create-farm && npm run build -- --target aarch64-pc-windows-msvc cd ../../rust-plugins/react && npm run build -- --target aarch64-pc-windows-msvc --abi win32-arm64-msvc + cd ../replace-dirname && npm run build -- --target aarch64-pc-windows-msvc --abi win32-arm64-msvc cd ../sass && npm run build -- --target aarch64-pc-windows-msvc --abi win32-arm64-msvc # linux - os: ubuntu-latest @@ -149,6 +153,7 @@ jobs: cd packages/core && npm run build:rs:publish -- ${{ matrix.settings.target && format('--target {0}', matrix.settings.target) || '' }} ${{ matrix.settings.zig && '--zig' || '' }} && cd ../create-farm && npm run build -- ${{ matrix.settings.target && format('--target {0}', matrix.settings.target) || '' }} ${{ matrix.settings.zig && '--zig' || '' }} && cd ../../rust-plugins/react && npm run build -- ${{ matrix.settings.target && format('--target {0}', matrix.settings.target) || '' }} ${{ matrix.settings.zig && '--zig' || '' }} --abi ${{ matrix.settings.abi }} && + cd ../replace-dirname && npm run build -- ${{ matrix.settings.target && format('--target {0}', matrix.settings.target) || '' }} ${{ matrix.settings.zig && '--zig' || '' }} --abi ${{ matrix.settings.abi }} && cd ../sass && npm run build -- ${{ matrix.settings.target && format('--target {0}', matrix.settings.target) || '' }} ${{ matrix.settings.zig && '--zig' || '' }} --abi ${{ matrix.settings.abi }} shell: bash - name: Build @@ -175,6 +180,12 @@ jobs: with: name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-react path: rust-plugins/react/npm/${{ matrix.settings.abi }}/index.farm + - name: Upload Plugin Replace Dirname + if: ${{ !matrix.settings.cli_only }} + uses: actions/upload-artifact@v4 + with: + name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-replace-dirname + path: rust-plugins/replace-dirname/npm/${{ matrix.settings.abi }}/index.farm - name: Upload Plugin Sass if: ${{ !matrix.settings.cli_only }} uses: actions/upload-artifact@v4 diff --git a/.gitignore b/.gitignore index 21b746af5..9f027e4e4 100644 --- a/.gitignore +++ b/.gitignore @@ -110,3 +110,7 @@ build !crates/**/build .swc .DS_Store + + +# docs +.docusaurus diff --git a/.npmrc b/.npmrc index 0b6954a0e..9f2a6cd4b 100644 --- a/.npmrc +++ b/.npmrc @@ -2,3 +2,6 @@ registry = "https://registry.npmjs.org/" auto-install-peers = false electron-mirror="https://npmmirror.com/mirrors/electron/" link-workspace-packages=true +fetch-retries=0 +tag-version-prefix="" +git-tag-version=false diff --git a/.vscode/settings.json b/.vscode/settings.json index fc7d12d02..a639d0671 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,15 +4,18 @@ "biome.enabled": true, "editor.defaultFormatter": "biomejs.biome", "[typescript]": { - "editor.defaultFormatter": "biomejs.biome" + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[javascript]": { - "editor.defaultFormatter": "biomejs.biome" + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[rust]": { "editor.defaultFormatter": "rust-lang.rust-analyzer" }, "[toml]": { "editor.defaultFormatter": "tamasfe.even-better-toml" + }, + "[yaml]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" } } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9883b3b66..1ae178616 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,13 +21,9 @@ Please feel free to open an issue using the [feature request template](https://g ## Pull Request Guidelines - Please adhere to the code style that you see around the location you are working on. - - Setup Your Development Environment. - - Checkout a topic branch from a base branch, e.g. `main` . - - Run `cargo test` and make sure that it passes. - - If you've changed some packages And prepare for an updated version, you should output `npx changeset` in the root directory. we should try our best to keep releasing the `patch version`. If there are no major changes, please choose to update the `patch version`. - When you are done with your work, verify that it works locally with `pnpm run ready` @@ -46,7 +42,6 @@ Please feel free to open an issue using the [feature request template](https://g git branch --set-upstream-to=upstream/main main ``` - ## Development Environment Setup ### Dependencies @@ -57,7 +52,6 @@ Please feel free to open an issue using the [feature request template](https://g - [Pnpm](https://pnpm.io) **version 8+** - ### IDE We recommend that you use vscode for development and recommend two necessary plugins that you need to install @@ -112,6 +106,12 @@ We also need to test two parts, a set of `Rust` tests and a set of `Node` tests. cargo test ``` +If you want to update snapshot, you can use `INSTA_UPDATE=always cargo test` + +```sh +INSTA_UPDATE=always cargo test +``` + ### Node Testing - Input `pnpm test` in the root directory to run all test cases based on `vitest`. @@ -137,6 +137,5 @@ Farm is divided into two parts: the `JavaScript side` and the `Rust side`: - **the JavaScript side**: see code in the `packages` directory. contains core (dev server, file watcher, and compiler wrapper), CLI, runtime, and runtime plugins (module system, HMR). - - **the Rust side**: see code in the `crates` and `rust-plugins` directory. contains core (compilation context, plugin drivers, etc.), compiler (compile process, HMR update, etc.), and plugins. diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md index 5c26c2140..56822e088 100644 --- a/CONTRIBUTING.zh-CN.md +++ b/CONTRIBUTING.zh-CN.md @@ -17,11 +17,8 @@ ## 提交代码指南 - 编写代码的时候, 请遵循代码编写规范。 - - 设置您的本地开发环境。 - - 在您的本地从 `main` 分支切出一个新的功能特性分支。 - - 使用 `cargo test` 确保所有测试均能通过。 - 如果您已经更改了一些包并准备更新版本,则您应该在根目录中输出`npx changeset` 用来发布新版本并且提交。 我们应该尽量保持发布 `patch` 版本, 如果没有重大更改的情况下,请选择 更新 `patch` 版本 @@ -42,7 +39,6 @@ git branch --set-upstream-to=upstream/main main ``` - ## 设置您的本地开发环境 ### 依赖 @@ -107,6 +103,8 @@ pnpm start:rs cargo test ``` +如果需要更新测试快照,你可以使用 `INSTA_UPDATE=always cargo test` + ### Node 测试 - 在根目录下输入 `pnpm test` 基于 `vitest` 运行所有的 `Node` 代码测试用例。 @@ -131,5 +129,4 @@ $ farm plugin create # create a plugin support js or rust Farm 整个项目分为两个部分, JavaScript 和 Rust。 - **JavaScript** 部分: 查看 packages 文件夹中的代码, 包含核心包(开发服务, 文件监听, 编译器包装), 脚手架, 运行时和运行时插件 (模块系统, HMR 热更新)。 - - **Rust** 部分: 查看 crates 以及 rust-plugin 文件夹中的代码, 包含核心包 (编译上下文, 插件驱动等), 编译器 (编译进程、HMR 更新等), Rust 插件。 diff --git a/Cargo.lock b/Cargo.lock index 10880d798..a9eda403b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,9 +72,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "getrandom", @@ -138,12 +138,6 @@ dependencies = [ "libc", ] -[[package]] -name = "anes" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "735d4f398ca57cfa2880225c2bf81c3b9af3be5bb22e44ae70118dad38713e84" - [[package]] name = "anstream" version = "0.6.9" @@ -200,9 +194,9 @@ checksum = "70033777eb8b5124a81a1889416543dddef2de240019b674c81285a2635a7e1e" [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "37bf3594c4c988a53154954629820791dde498571819ae4ca50ca811e060cc95" dependencies = [ "backtrace", ] @@ -236,9 +230,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "ast_node" -version = "0.9.8" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab31376d309dd3bfc9cfb3c11c93ce0e0741bbe0354b20e7f8c60b044730b79" +checksum = "94741d66bdda032fcbf33e621b4e3a888d7d11bd3ac4446d82c5593a136936ff" dependencies = [ "proc-macro2", "quote", @@ -332,9 +326,9 @@ dependencies = [ [[package]] name = "better_scoped_tls" -version = "0.1.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794edcc9b3fb07bb4aecaa11f093fd45663b4feadb782d68303a2268bc2701de" +checksum = "50fd297a11c709be8348aec039c8b91de16075d2b2bdaee1bd562c0875993664" dependencies = [ "scoped-tls", ] @@ -440,22 +434,16 @@ dependencies = [ "objc2 0.5.2", ] -[[package]] -name = "bpaf" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3280efcf6d66bc77c2cf9b67dc8acee47a217d9be67dd590b3230dffe663724d" - [[package]] name = "browserslist-rs" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf0ca73de70c3da94e4194e4a01fe732378f55d47cf4c0588caab22a0dbfa14" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", "chrono", "either", - "indexmap 2.2.6", + "indexmap 2.6.0", "itertools 0.13.0", "nom", "once_cell", @@ -476,28 +464,20 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "bytecheck" -version = "0.6.11" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" dependencies = [ - "bytecheck_derive 0.6.11", - "ptr_meta", - "simdutf8", + "allocator-api2", ] [[package]] name = "bytecheck" -version = "0.7.0" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41502630fe304ce54cbb2f8389e017784dee2b0328147779fcbe43b9db06d35d" +checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" dependencies = [ - "bytecheck_derive 0.7.0", + "bytecheck_derive", "ptr_meta", "simdutf8", ] @@ -513,17 +493,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "bytecheck_derive" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda88c587085bc07dc201ab9df871bd9baa5e07f7754b745e4d7194b43ac1eda" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "bytemuck" version = "1.16.1" @@ -559,6 +528,15 @@ dependencies = [ "serde", ] +[[package]] +name = "bytesize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" +dependencies = [ + "serde", +] + [[package]] name = "calloop" version = "0.10.6" @@ -574,10 +552,36 @@ dependencies = [ ] [[package]] -name = "cast" -version = "0.3.0" +name = "camino" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.21", + "serde", + "serde_json", + "thiserror", +] [[package]] name = "cc" @@ -625,7 +629,7 @@ dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] @@ -652,7 +656,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half 2.4.1", + "half", ] [[package]] @@ -734,17 +738,6 @@ dependencies = [ "objc", ] -[[package]] -name = "codspeed" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a104ac948e0188b921eb3fcbdd55dcf62e542df4c7ab7e660623f6288302089" -dependencies = [ - "colored", - "libc", - "serde_json", -] - [[package]] name = "color_quant" version = "1.1.0" @@ -757,16 +750,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" -[[package]] -name = "colored" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - [[package]] name = "combine" version = "4.6.7" @@ -1017,25 +1000,6 @@ dependencies = [ "napi-derive", ] -[[package]] -name = "criterion2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7258985df1aa8b33359ee2392cbc3b7802875242cdacdda91a17a602132c24a9" -dependencies = [ - "anes", - "bpaf", - "cast", - "ciborium", - "codspeed", - "colored", - "num-traits", - "oorandom", - "serde", - "serde_json", - "walkdir", -] - [[package]] name = "critical-section" version = "1.1.2" @@ -1133,12 +1097,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.3", - "darling_macro 0.20.3", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -1157,14 +1121,15 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", + "strsim 0.11.1", "syn 2.0.65", ] @@ -1181,11 +1146,11 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.3", + "darling_core 0.20.10", "quote", "syn 2.0.65", ] @@ -1203,7 +1168,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.3", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", "lock_api", "once_cell", "parking_lot_core", @@ -1251,7 +1230,16 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" dependencies = [ - "derive_builder_macro", + "derive_builder_macro 0.12.0", +] + +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro 0.20.2", ] [[package]] @@ -1266,16 +1254,38 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "derive_builder_macro" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" dependencies = [ - "derive_builder_core", + "derive_builder_core 0.12.0", "syn 1.0.109", ] +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core 0.20.2", + "syn 2.0.65", +] + [[package]] name = "dialoguer" version = "0.11.0" @@ -1357,12 +1367,33 @@ dependencies = [ "libloading 0.8.1", ] +[[package]] +name = "document-features" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0" +dependencies = [ + "litrs", +] + [[package]] name = "downcast-rs" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + [[package]] name = "ecolor" version = "0.24.1" @@ -1413,7 +1444,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c55bcb864b764eb889515a38b8924757657a250738ad15126637ee2df291ee6b" dependencies = [ "accesskit", - "ahash 0.8.8", + "ahash 0.8.11", "epaint", "log", "nohash-hasher", @@ -1477,9 +1508,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "enhanced-magic-string" -version = "0.0.15" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6082b74cc322c69840d97a7d7cba3ee9ed34fa70536fb51a69824f36742960f5" +checksum = "2eaf1f42f1728b66a856f46546be619f3ed6ad03ba4266314082be2b5e8c5316" dependencies = [ "base64 0.22.1", "farmfe_utils 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1534,7 +1565,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" dependencies = [ - "darling 0.20.3", + "darling 0.20.10", "proc-macro2", "quote", "syn 2.0.65", @@ -1547,7 +1578,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d1b9e000d21bab9b535ce78f9f7745be28b3f777f6c7223936561c5c7fefab8" dependencies = [ "ab_glyph", - "ahash 0.8.8", + "ahash 0.8.11", "bytemuck", "ecolor", "emath", @@ -1585,15 +1616,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" -[[package]] -name = "farmfe_bench" -version = "0.0.1" -dependencies = [ - "criterion2", - "farmfe_compiler", - "farmfe_core", -] - [[package]] name = "farmfe_compiler" version = "0.0.11" @@ -1626,19 +1648,18 @@ name = "farmfe_core" version = "0.6.4" dependencies = [ "blake2", - "bytecheck 0.7.0", - "dashmap", + "dashmap 5.5.3", "downcast-rs", "enhanced-magic-string", "farmfe_macro_cache_item", "farmfe_utils 0.1.5", "globset", - "heck 0.4.1", + "heck 0.5.0", "hex", "parking_lot", "petgraph", "ptr_meta", - "puffin", + "puffin 0.19.1", "rayon", "regex", "relative-path", @@ -1647,6 +1668,7 @@ dependencies = [ "rkyv_typename", "serde", "serde_json", + "serde_regex", "swc_common", "swc_css_ast", "swc_css_prefixer", @@ -1804,6 +1826,20 @@ dependencies = [ "serde", ] +[[package]] +name = "farmfe_plugin_replace_dirname" +version = "0.0.0" +dependencies = [ + "farmfe_core", + "farmfe_macro_plugin", + "farmfe_toolkit", + "farmfe_toolkit_plugin_types", + "regex", + "serde", + "serde_json", + "url", +] + [[package]] name = "farmfe_plugin_resolve" version = "0.0.11" @@ -1908,6 +1944,7 @@ name = "farmfe_testing_helpers" version = "0.0.13" dependencies = [ "farmfe_core", + "insta", ] [[package]] @@ -2048,9 +2085,9 @@ dependencies = [ [[package]] name = "from_variant" -version = "0.1.8" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc9cc75639b041067353b9bce2450d6847e547276c6fbe4487d7407980e07db" +checksum = "8d7ccf961415e7aa17ef93dcb6c2441faaa8e768abe09e659b908089546f74c5" dependencies = [ "proc-macro2", "swc_macros_common", @@ -2198,9 +2235,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -2343,12 +2380,6 @@ dependencies = [ "gl_generator", ] -[[package]] -name = "half" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" - [[package]] name = "half" version = "2.4.1" @@ -2383,19 +2414,25 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", ] [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "heapless" version = "0.7.17" @@ -2462,11 +2499,11 @@ dependencies = [ [[package]] name = "hstr" -version = "0.2.8" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0f5356d62012374578cd3a5c013d6586de3efbca3b53379fc1edfbb95c9db14" +checksum = "dae404c0c5d4e95d4858876ab02eecd6a196bb8caa42050dfa809938833fc412" dependencies = [ - "hashbrown 0.14.3", + "hashbrown 0.14.5", "new_debug_unreachable", "once_cell", "phf", @@ -2476,9 +2513,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -2536,6 +2573,22 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" +[[package]] +name = "ignore" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata", + "same-file", + "walkdir", + "winapi-util", +] + [[package]] name = "image" version = "0.24.9" @@ -2585,12 +2638,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.15.0", "serde", ] @@ -2627,6 +2680,18 @@ dependencies = [ "libc", ] +[[package]] +name = "insta" +version = "1.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "810ae6042d48e2c9e9215043563a58a80b877bc863228a74cf10c49d4620a6f5" +dependencies = [ + "console", + "lazy_static", + "linked-hash-map", + "similar", +] + [[package]] name = "instant" version = "0.1.13" @@ -2892,7 +2957,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e0d73b369f386f1c44abd9c570d5318f55ccde816ff4b562fa452e5182863d" dependencies = [ "core2", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "rle-decode-fast", ] @@ -2958,6 +3023,12 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" + [[package]] name = "lock_api" version = "0.4.11" @@ -2988,12 +3059,15 @@ name = "lz4_flex" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5" +dependencies = [ + "twox-hash", +] [[package]] -name = "mach" -version = "0.3.2" +name = "mach2" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" dependencies = [ "libc", ] @@ -3007,6 +3081,12 @@ dependencies = [ "libc", ] +[[package]] +name = "managed" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca88d725a0a943b096803bd34e73a4437208b6077654cc4ecb2947a5f91618d" + [[package]] name = "memchr" version = "2.7.1" @@ -3414,6 +3494,15 @@ dependencies = [ "syn 2.0.65", ] +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + [[package]] name = "number_prefix" version = "0.4.0" @@ -3569,12 +3658,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "oorandom" -version = "11.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" - [[package]] name = "option-ext" version = "0.2.0" @@ -3668,7 +3751,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.6.0", ] [[package]] @@ -3793,14 +3876,14 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "preset_env_base" -version = "0.5.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b30eab18be480c194938e433e269d5298a279f6410f02fbc73f3576a325c110" +checksum = "7c8a797e42c09d55157424ac6e9b6e9e5843fc68b887691b280b055e8c3ca5e4" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", "anyhow", "browserslist-rs", - "dashmap", + "dashmap 5.5.3", "from_variant", "once_cell", "semver 1.0.21", @@ -3920,6 +4003,23 @@ dependencies = [ "serde", ] +[[package]] +name = "puffin" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa9dae7b05c02ec1a6bc9bcf20d8bc64a7dcbf57934107902a872014899b741f" +dependencies = [ + "anyhow", + "bincode", + "byteorder", + "cfg-if", + "itertools 0.10.5", + "lz4_flex", + "once_cell", + "parking_lot", + "serde", +] + [[package]] name = "puffin_egui" version = "0.24.0" @@ -3930,7 +4030,7 @@ dependencies = [ "indexmap 1.9.3", "natord", "once_cell", - "puffin", + "puffin 0.18.1", "time", "vec1", "web-time", @@ -4067,9 +4167,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", @@ -4079,9 +4179,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -4090,20 +4190,20 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "region" -version = "3.0.0" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" +checksum = "e6b6ebd13bc009aef9cd476c1310d49ac354d36e240cf1bd753290f3dc7199a7" dependencies = [ "bitflags 1.3.2", "libc", - "mach", - "winapi", + "mach2", + "windows-sys 0.52.0", ] [[package]] @@ -4118,7 +4218,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" dependencies = [ - "bytecheck 0.6.11", + "bytecheck", ] [[package]] @@ -4129,12 +4229,12 @@ checksum = "e3a8614ee435691de62bcffcf4a66d91b3594bf1428a5722e79103249a095690" [[package]] name = "rkyv" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ "bitvec", - "bytecheck 0.6.11", + "bytecheck", "bytes", "hashbrown 0.12.3", "indexmap 1.9.3", @@ -4148,9 +4248,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ "proc-macro2", "quote", @@ -4299,6 +4399,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustversion" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" + [[package]] name = "rusty_pool" version = "0.7.0" @@ -4341,7 +4447,7 @@ checksum = "043fea16ac00f7132b50dce6094873fee0d328bd43c0f552faeb33d989d97b77" dependencies = [ "atty", "crossbeam-channel", - "dashmap", + "dashmap 5.5.3", "parking_lot", "prost", "regex", @@ -4353,14 +4459,39 @@ dependencies = [ ] [[package]] -name = "scoped-tls" -version = "1.0.1" +name = "schemars" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", + "url", +] [[package]] -name = "scopeguard" -version = "1.2.0" +name = "schemars_derive" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.65", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" @@ -4421,20 +4552,21 @@ dependencies = [ ] [[package]] -name = "serde_cbor" -version = "0.11.2" +name = "serde_derive" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ - "half 1.8.2", - "serde", + "proc-macro2", + "quote", + "syn 2.0.65", ] [[package]] -name = "serde_derive" -version = "1.0.204" +name = "serde_derive_internals" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", @@ -4447,40 +4579,38 @@ version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "itoa", "ryu", "serde", ] [[package]] -name = "serde_spanned" -version = "0.6.5" +name = "serde_regex" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "a8136f1a4ea815d7eac4101cfd0b16dc0cb5e1fe1b8609dfd728058656b7badf" dependencies = [ + "regex", "serde", ] [[package]] -name = "serde_yaml" -version = "0.8.26" +name = "serde_spanned" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ - "indexmap 1.9.3", - "ryu", "serde", - "yaml-rust", ] [[package]] name = "serde_yaml" -version = "0.9.30" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "itoa", "ryu", "serde", @@ -4555,6 +4685,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +[[package]] +name = "similar" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" + [[package]] name = "siphasher" version = "0.3.11" @@ -4637,6 +4773,17 @@ dependencies = [ "wayland-client", ] +[[package]] +name = "smoltcp" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee34c1e1bfc7e9206cc0fb8030a90129b4e319ab53856249bb27642cab914fb3" +dependencies = [ + "bitflags 1.3.2", + "byteorder", + "managed", +] + [[package]] name = "socket2" version = "0.4.10" @@ -4649,9 +4796,9 @@ dependencies = [ [[package]] name = "sourcemap" -version = "8.0.1" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "208d40b9e8cad9f93613778ea295ed8f3c2b1824217c6cfc7219d3f6f45b96d4" +checksum = "dab08a862c70980b8e23698b507e272317ae52a608a164a844111f5372374f1f" dependencies = [ "base64-simd", "bitvec", @@ -4723,9 +4870,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_enum" -version = "0.4.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e383308aebc257e7d7920224fa055c632478d92744eca77f99be8fa1545b90" +checksum = "c9fe66b8ee349846ce2f9557a26b8f1e74843c4a13fb381f9a3d73617a5f956a" dependencies = [ "proc-macro2", "quote", @@ -4751,13 +4898,26 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "swc_allocator" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52cacc28f0ada8e4e31a720dd849ff06864b10e6ab0a1aaa99c06456cfe046af" +dependencies = [ + "bumpalo", + "hashbrown 0.14.5", + "ptr_meta", + "rustc-hash", + "triomphe", +] + [[package]] name = "swc_atoms" -version = "0.6.7" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6567e4e67485b3e7662b486f1565bdae54bd5b9d6b16b2ba1a9babb1e42125" +checksum = "5d7211e5c57ea972f32b8a104d7006c4a68d094ec30c6a73bcd20d4d6c473c7c" dependencies = [ - "bytecheck 0.6.11", + "bytecheck", "hstr", "once_cell", "rkyv", @@ -4767,13 +4927,13 @@ dependencies = [ [[package]] name = "swc_cached" -version = "0.3.20" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83406221c501860fce9c27444f44125eafe9e598b8b81be7563d7036784cd05c" +checksum = "96b6a5ef4cfec51d3fa30b73600f206453a37fc30cf1141e4644a57b1ed88616" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", "anyhow", - "dashmap", + "dashmap 5.5.3", "once_cell", "regex", "serde", @@ -4781,14 +4941,14 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.34.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9087befec6b63911f9d2f239e4f91c9b21589c169b86ed2d616944d23cf4a243" +checksum = "e8505eddfd6488cde74b0e80a4b959b12392a8a15eb62243d45eb82cf568b9b9" dependencies = [ "anyhow", "ast_node", "better_scoped_tls", - "bytecheck 0.6.11", + "bytecheck", "cfg-if", "either", "from_variant", @@ -4801,6 +4961,7 @@ dependencies = [ "serde", "siphasher", "sourcemap", + "swc_allocator", "swc_atoms", "swc_eq_ignore_macros", "swc_visit", @@ -4811,12 +4972,12 @@ dependencies = [ [[package]] name = "swc_config" -version = "0.1.14" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b67e115ab136fe0eb03558bb0508ca7782eeb446a96d165508c48617e3fd94" +checksum = "4aa30931f9b26af8edcb4cce605909d15dcfd7577220b22c50a2988f2a53c4c1" dependencies = [ "anyhow", - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_json", "sourcemap", @@ -4826,9 +4987,9 @@ dependencies = [ [[package]] name = "swc_config_macro" -version = "0.1.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5f56139042c1a95b54f5ca48baa0e0172d369bcc9d3d473dad1de36bae8399" +checksum = "7f2ebd37ef52a8555c8c9be78b694d64adcb5e3bc16c928f030d82f1d65fac57" dependencies = [ "proc-macro2", "quote", @@ -4838,9 +4999,9 @@ dependencies = [ [[package]] name = "swc_css_ast" -version = "0.141.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a5f28ff625a89de2a269bde3ed3b99be74bb9d3dc78dea6f3b071991b2cbf4" +checksum = "216c379c04fb5740ba824bed01c80f701fc987abe7ebe3c17ca884619adae0be" dependencies = [ "is-macro", "rkyv", @@ -4851,9 +5012,9 @@ dependencies = [ [[package]] name = "swc_css_codegen" -version = "0.152.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "894275a04a693db249903c29b31dfc71fae0bde68c49d4c4a935243f9eeba691" +checksum = "bde5ed19d6407091ec839654dd9ef461fe1729e30dadbcbaa2426d85538a894e" dependencies = [ "auto_impl", "bitflags 2.5.0", @@ -4868,9 +5029,9 @@ dependencies = [ [[package]] name = "swc_css_codegen_macros" -version = "0.2.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de2ece8c7dbdde85aa1bcc9764c5f41f7450d8bf1312eac2375b8dc0ecbc13d7" +checksum = "50abd25b3b79f18423cdf99b0d11dee24e64496be3b8abe18c10a2c40bd6c91f" dependencies = [ "proc-macro2", "quote", @@ -4880,9 +5041,9 @@ dependencies = [ [[package]] name = "swc_css_minifier" -version = "0.117.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3018ef38941e9b5681af7651047cd42af8bcb1635ba1d99eee182aafd84bb3" +checksum = "98ad75e982df2f5c727b4accf0f07be766736e7cc82dec9a573c0d3fd7c4796b" dependencies = [ "serde", "swc_atoms", @@ -4894,9 +5055,9 @@ dependencies = [ [[package]] name = "swc_css_modules" -version = "0.30.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02cf9cf88016e0445fafa1335b7727d4c17ff7a3a7f43da4a81657c517f71720" +checksum = "05970f313aac3b7de71f42a80da2eb3e9c5c58971cf51c49dd40aa5de738b538" dependencies = [ "rustc-hash", "serde", @@ -4910,9 +5071,9 @@ dependencies = [ [[package]] name = "swc_css_parser" -version = "0.151.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee5dbaaea0df38195d137bcfc68149906bba9c9dffebf5e846234e286f82992" +checksum = "622aaac491256c52da8a303e982e0649cf864fc1c8bc1cecc342475826999d25" dependencies = [ "lexical", "serde", @@ -4923,9 +5084,9 @@ dependencies = [ [[package]] name = "swc_css_prefixer" -version = "0.155.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9930655060121c32d829e13fe4fa11294c03e71eb84c22e039703c929dcdf7" +checksum = "9a1cb45d6aaf248dd74ff773fcf7f8e4c61ddd884e6e9357eb0615188f5d6b3d" dependencies = [ "once_cell", "preset_env_base", @@ -4940,9 +5101,9 @@ dependencies = [ [[package]] name = "swc_css_utils" -version = "0.138.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b135df778449825f38d54664bb179c839b3285f9a553ec10dd3cc3eafb751599" +checksum = "812dd6ff3a4311d0bed04a35cbe22806e7f018d2e4a83b8a40790b513c38ca14" dependencies = [ "once_cell", "serde", @@ -4955,9 +5116,9 @@ dependencies = [ [[package]] name = "swc_css_visit" -version = "0.140.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c97dceaa18c8ae7f5a4c991e15efc5c333e5880b58ee6d61e42fd1365748ff05" +checksum = "c93e801cb6ac36d9466de3411633140b279600fb9dc5c3e3e8b0c53d885e6582" dependencies = [ "serde", "swc_atoms", @@ -4968,12 +5129,12 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.115.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be1306930c235435a892104c00c2b5e16231043c085d5a10bd3e7537b15659b" +checksum = "6795be2785b968ccff06096bc758b306459f05fc936e6363b4dd39fb27fba22a" dependencies = [ "bitflags 2.5.0", - "bytecheck 0.6.11", + "bytecheck", "is-macro", "num-bigint", "phf", @@ -4988,16 +5149,17 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.151.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5141a8cb4eb69e090e6aea5d49061b46919be5210f3d084f9d9ad63d30f5cff" +checksum = "7ae4fee003ef373adef1ff2af1e73607925f510a8105a5e368c1aa655ece9a41" dependencies = [ "memchr", "num-bigint", "once_cell", - "rustc-hash", + "regex", "serde", "sourcemap", + "swc_allocator", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -5007,9 +5169,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen_macros" -version = "0.7.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090e409af49c8d1a3c13b3aab1ed09dd4eda982207eb3e63c2ad342f072b49c8" +checksum = "5f9a42f479a6475647e248fa9750982c87cd985e19d1016a1fc18a70682305d1" dependencies = [ "proc-macro2", "quote", @@ -5019,9 +5181,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_bugfixes" -version = "0.7.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04182e17ec1343e355c4150b51226627d0160b8c0fb612bfcf3faa3d030a3866" +checksum = "057714c6d55ef69a015b8d2b21d146514c7d408773e7682e18454e9c1d76d6d8" dependencies = [ "swc_atoms", "swc_common", @@ -5036,9 +5198,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_common" -version = "0.7.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d2f791e974b5dd20a72c50aaf5507a07c6b7c2778711a4b8f62b881b92035b1" +checksum = "a83e449bb6dfc864f665ff5967f8ade2efdf61c50b0b2094e0e2770dca017e28" dependencies = [ "swc_common", "swc_ecma_ast", @@ -5049,13 +5211,14 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2015" -version = "0.7.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23a9a192078d1d074113d77d8ad811f2a81a4447ae967739824da5d391616bf" +checksum = "7f248aa75dec77e4b229bb2515f1c640915b43c6a5f3fd74678e90d1979a48b5" dependencies = [ "arrayvec", - "indexmap 2.2.6", + "indexmap 2.6.0", "is-macro", + "rustc-hash", "serde", "serde_derive", "smallvec", @@ -5075,9 +5238,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2016" -version = "0.7.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a166a024e6415bb6e6e326ed6ebe2fadcea093408f0de3cf1308b4f971c171b0" +checksum = "89ed78da21bb08165fc6482f9e18fd9d855151f1ceceb52ac479670daf638a93" dependencies = [ "swc_atoms", "swc_common", @@ -5092,9 +5255,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2017" -version = "0.7.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65f84891ddbc61b105222e64f7f33cf8a27d4020cbae2e7381899eacb69c540a" +checksum = "f07d95be4b1b211cdd5037387f5bb9bf71a24b1f0511667b10113d4c081c7e4b" dependencies = [ "serde", "swc_atoms", @@ -5110,9 +5273,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2018" -version = "0.7.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe11cda413787f46bef9a66752933fb8f6f2e509cb938758ad67d27710619ee6" +checksum = "a3c8fa68f4f4d9b9185ad67aee6055eec2cecf0b873c4ed3fe52cda54516c778" dependencies = [ "serde", "swc_atoms", @@ -5129,9 +5292,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2019" -version = "0.7.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce2888fa110ff41e36bd824fa8636f876f812e64c8b12d721df90a133c28ee86" +checksum = "007e7708253adba943bc5c099fb50176c37090bbf9eddc3579f8806f4c6d5245" dependencies = [ "swc_atoms", "swc_common", @@ -5145,9 +5308,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2020" -version = "0.7.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3baf93ce04ee5a888e41265280dcb12d4e6a7bcf907ef2526b69d2aed9187607" +checksum = "2fb6997a7425e5a5ed48939bd470d044214a24c9b63760a131baa5eb8e3072f8" dependencies = [ "serde", "swc_atoms", @@ -5163,9 +5326,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2021" -version = "0.7.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "529b0368f8ada330a928ecf82c6c480eefd51cacd2d6e9f3bdedf9187782f0da" +checksum = "87f813956f45bb0ddc59e3e74798ab13d323dc7d7994de7215edd97a374ee4db" dependencies = [ "swc_atoms", "swc_common", @@ -5179,9 +5342,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2022" -version = "0.7.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fb64c1ee316e05823b6b698d44017848241626f1e11eaf394a642bc99d4d4cd" +checksum = "205d58536ba7cbb4333bf73dc15da14dc3749f77a790c995fa123ffb3e007007" dependencies = [ "swc_atoms", "swc_common", @@ -5198,9 +5361,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es3" -version = "0.7.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d6a9792a2f534232b98a1564e3982d9135d86f6948a55e8f944ab3b960e602" +checksum = "b6399dec3eb785ecd4a910c89640ea711be532cb636d906c14f5cba88a626c64" dependencies = [ "swc_common", "swc_ecma_ast", @@ -5213,12 +5376,12 @@ dependencies = [ [[package]] name = "swc_ecma_loader" -version = "0.46.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9febebf047d1286e7b723fa2758f3229da2c103834f3eaee69833f46692612" +checksum = "2a3437031ac49f5fdc5f236a9263bb4cab144d34864cf530767b1bf53d3ca75a" dependencies = [ "anyhow", - "dashmap", + "dashmap 5.5.3", "lru", "normpath", "once_cell", @@ -5235,12 +5398,12 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.197.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adde00302d7ddb37f312ee6d07078c7f3c7ede36c0f81c5050bae1d4c3fe501c" +checksum = "0042d9b63ad6385b1a27b50f72c55462450b3f9fcb751f50c17eec568afe2bcf" dependencies = [ "arrayvec", - "indexmap 2.2.6", + "indexmap 2.6.0", "num-bigint", "num_cpus", "once_cell", @@ -5252,6 +5415,7 @@ dependencies = [ "ryu-js", "serde", "serde_json", + "swc_allocator", "swc_atoms", "swc_common", "swc_config", @@ -5269,9 +5433,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.146.12" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e0c2e85f12c63b85c805e923079b04d1fb3e25edd069d638eed5f2098de74" +checksum = "af8beb1639d45a3b6b5d0f2e9aa9f99833608b7c9c4596465035bea38264407b" dependencies = [ "either", "new_debug_unreachable", @@ -5291,13 +5455,13 @@ dependencies = [ [[package]] name = "swc_ecma_preset_env" -version = "0.210.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd4847a3356a01bb9a73ccdd1c462dfdaed66d27d7ea6d6785ee1b54c9556ce" +checksum = "ef1ece4f571841a978305f300f65e52f6e8ffbcbe94b8fab4e576b63a96b02d1" dependencies = [ "anyhow", - "dashmap", - "indexmap 2.2.6", + "dashmap 5.5.3", + "indexmap 2.6.0", "once_cell", "preset_env_base", "rustc-hash", @@ -5316,9 +5480,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms" -version = "0.232.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6845e7a7001aa2793225568e0661b55f57352a2103fa28934dd9cbc0d41cd933" +checksum = "b19ea1b66e4e99ae56d8645b763cc55683201c3b373c36c3c6876d279312ca63" dependencies = [ "swc_atoms", "swc_common", @@ -5336,13 +5500,13 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.140.3" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37dc505c92af56d0f77cf6f31a6ccd37ac40cad1e01ff77277e0b1c70e8f8ff" +checksum = "7feebd16859fb7c102d9dfdf75dde065825683c38f3ba250729da33dbfc11869" dependencies = [ "better_scoped_tls", "bitflags 2.5.0", - "indexmap 2.2.6", + "indexmap 2.6.0", "once_cell", "phf", "rayon", @@ -5360,9 +5524,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_classes" -version = "0.129.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3eab5f8179e5b0aedf385eacc2c033691c6d211a7babd1bbbff12cf794a824e" +checksum = "a82f5b18390f80e0cb0de3a4586db34f6092b419a49b1689ca2b0e8bedae7318" dependencies = [ "swc_atoms", "swc_common", @@ -5374,12 +5538,12 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_compat" -version = "0.166.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626198f214d4c09adc98ab14565c19d72b6df9630f7e806ef9b2ef05a5fd17a5" +checksum = "e8cc2d31ec8ed2f65ebc6461a931befc6d9e48438d28fb612a30038694a76227" dependencies = [ "arrayvec", - "indexmap 2.2.6", + "indexmap 2.6.0", "is-macro", "num-bigint", "rayon", @@ -5411,9 +5575,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_macros" -version = "0.5.5" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500a1dadad1e0e41e417d633b3d6d5de677c9e0d3159b94ba3348436cdb15aab" +checksum = "6845dfb88569f3e8cd05901505916a8ebe98be3922f94769ca49f84e8ccec8f7" dependencies = [ "proc-macro2", "quote", @@ -5423,16 +5587,16 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_module" -version = "0.183.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7dc1df5996d98d1a27995e8b8a13f805a801d9286cb9ed29103662c767c747e" +checksum = "09e711b88fd1c7127a7a26245a2bc9f98505969eb181709153ea7696abae1459" dependencies = [ "Inflector", "anyhow", "bitflags 2.5.0", - "indexmap 2.2.6", + "indexmap 2.6.0", "is-macro", - "path-clean 0.1.0", + "path-clean 1.0.1", "pathdiff", "regex", "serde", @@ -5450,12 +5614,12 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.201.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "724a8306e98c1b1f9640fc44c1acc0c971f6daa17651919e06b64f905d4a4564" +checksum = "04e01c27c2855f23341d26ab9267cb8e1518657b334ed0da2a0ce0864a0d9569" dependencies = [ - "dashmap", - "indexmap 2.2.6", + "dashmap 5.5.3", + "indexmap 2.6.0", "once_cell", "petgraph", "rayon", @@ -5475,9 +5639,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.174.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6df8aa6752cc2fcf3d78ac67827542fb666e52283f2b26802aa058906bb750d3" +checksum = "41de2c46fec9160b85959498285e5ed7a5bbfeb7af14badab339d4d13f2d21b3" dependencies = [ "either", "rustc-hash", @@ -5495,18 +5659,19 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.186.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446da32cac8299973aaf1d37496562bfd0c1e4f3c3ab5d0af6f07f42e8184102" +checksum = "240b46d37c929693ecbfecdd8023b3f2b50d52d46b9329df4dad705713c15a36" dependencies = [ "base64 0.21.7", - "dashmap", - "indexmap 2.2.6", + "dashmap 5.5.3", + "indexmap 2.6.0", "once_cell", "rayon", "serde", "sha1", "string_enum", + "swc_allocator", "swc_atoms", "swc_common", "swc_config", @@ -5520,9 +5685,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.191.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1ce8af2865449e714ae56dacb6b54b3f6dc4cc25074da4e39b878bd93c5e39c" +checksum = "8ad90eae9f05e0d6d533cae2da4c6d5d1a084d04bf820c20a1c7a26bbf44db48" dependencies = [ "ryu-js", "serde", @@ -5537,11 +5702,11 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.26.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146562ac3515c8de0fa9d479c43ae673cf9df9ece814f8b8130686080a7251ac" +checksum = "d2562c904e49bee2b1ee0b56a18bd5e2526202d325450fc48e8cf24b953b3375" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "rustc-hash", "swc_atoms", "swc_common", @@ -5554,11 +5719,11 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.130.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e62b199454a576c5fdbd7e1bef8ab88a395427456d8a713d994b7d469833aa" +checksum = "d3608f6babd45a29875b06b583fc2aa24b756b5aab8fabfe87e4b4371b8d43ba" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "num_cpus", "once_cell", "rayon", @@ -5574,10 +5739,11 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.101.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce0d997f0c9b4e181225f603d161f6757c2a97022258170982cfe005ec69ec92" +checksum = "d9cc511aa14bf58a6bc66815e78b76a4fed15f148681856d8d9b0456577050aa" dependencies = [ + "new_debug_unreachable", "num-bigint", "swc_atoms", "swc_common", @@ -5588,9 +5754,9 @@ dependencies = [ [[package]] name = "swc_eq_ignore_macros" -version = "0.1.3" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "695a1d8b461033d32429b5befbf0ad4d7a2c4d6ba9cd5ba4e0645c615839e8e4" +checksum = "e96e15288bf385ab85eb83cff7f9e2d834348da58d0a31b33bdb572e66ee413e" dependencies = [ "proc-macro2", "quote", @@ -5599,9 +5765,9 @@ dependencies = [ [[package]] name = "swc_error_reporters" -version = "0.18.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4689d9bb6092b5e6a0b79c0152336a8bd7f0acaf70dcf4133f86deb01775baa0" +checksum = "fca3b3c6da0e2d659c8a5cc6d0a1c76fe3272ae1d55e93e48c74de655271142b" dependencies = [ "anyhow", "miette 7.2.0", @@ -5612,11 +5778,11 @@ dependencies = [ [[package]] name = "swc_fast_graph" -version = "0.22.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf5c1687e9858fb9de1ffa90a3e21369095406e97ace870a389320d105b0a" +checksum = "1ca7ec2681ee91fd5a8dc83dd202d71aae2356e3bb12597d329aad1264bb3495" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "petgraph", "rustc-hash", "swc_common", @@ -5624,9 +5790,9 @@ dependencies = [ [[package]] name = "swc_html_ast" -version = "0.34.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b909aca7c9cbd630a461d4a0a1d476ac13704dc515d2a79264c93d3280b02d23" +checksum = "5d5d7a6d2dc82e3e0e37cce765435ea88574c6441f799f7478552edc3b1d777c" dependencies = [ "is-macro", "rkyv", @@ -5637,9 +5803,9 @@ dependencies = [ [[package]] name = "swc_html_codegen" -version = "0.43.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0c66d0bd8beac55009066d2a721ed0ef02541774c9efba13225fbe7bbdf224" +checksum = "3012cbdedfafafd7ad9eac595f2cde8d12169314ffe039019fe95315c25787d2" dependencies = [ "auto_impl", "bitflags 2.5.0", @@ -5653,9 +5819,9 @@ dependencies = [ [[package]] name = "swc_html_codegen_macros" -version = "0.2.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e593a6cbb3a49230fbab3171d4493f7d0fb1e20a34d9a9f9e972550690408ba8" +checksum = "faba8a7b6944ce27a17de34a6578e6900bb13db4247c2a004e6ed22658e9cad5" dependencies = [ "proc-macro2", "quote", @@ -5665,9 +5831,9 @@ dependencies = [ [[package]] name = "swc_html_minifier" -version = "0.139.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4123894a8afd7b8d160d1b45c74fc33edb4259d76d06b6c67ff2d9d0f6aea3a8" +checksum = "176155050c77c7741366ae6423caf0b8f2c731a2596c2b5aa64ef466406d483d" dependencies = [ "once_cell", "serde", @@ -5694,9 +5860,9 @@ dependencies = [ [[package]] name = "swc_html_parser" -version = "0.40.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0558d837b555f0b964d8a3ec94fef3fab31f89a685154cb208bfc968d29b437" +checksum = "746245cc4f2dece69422df8a1d5f4c6424f5ddb813add44d633492225c8522ac" dependencies = [ "swc_atoms", "swc_common", @@ -5706,9 +5872,9 @@ dependencies = [ [[package]] name = "swc_html_utils" -version = "0.19.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcffb3ca55f7cf634247930aa1c4d8368bdf37140622d62af91a02e9dfa867a0" +checksum = "ffbb59303f9ee157b99e78255ca2a46d4bcead61945e8043973548f17709c744" dependencies = [ "once_cell", "serde", @@ -5719,9 +5885,9 @@ dependencies = [ [[package]] name = "swc_html_visit" -version = "0.34.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37918caedd27d784ebd0a0b6f2489a01f7cff4a1a2fba58fd90d8912e0938159" +checksum = "0ef54997f934325b477b9eff387abca082bac9e126b67f586fffed0b1b0ae24e" dependencies = [ "serde", "swc_atoms", @@ -5732,9 +5898,9 @@ dependencies = [ [[package]] name = "swc_macros_common" -version = "0.3.11" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91745f3561057493d2da768437c427c0e979dff7396507ae02f16c981c4a8466" +checksum = "a509f56fca05b39ba6c15f3e58636c3924c78347d63853632ed2ffcb6f5a0ac7" dependencies = [ "proc-macro2", "quote", @@ -5743,9 +5909,9 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "0.44.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d5460f8f89905a6d698d8d9a965f6c99888c8ebcbb5a0266556d06ad39f09f7" +checksum = "d2b12f6e1064370116757b9aebc33ab82c123eabc635d00b38770a1f2dbebdc8" dependencies = [ "better_scoped_tls", "rkyv", @@ -5757,9 +5923,9 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.109.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633742a4ee0d51337b7b29771e94f93badd6944919eaff0515c4a14e7993fc4d" +checksum = "b6926f8af80f66d3c01d609a0f235512b1347b5371f61c6cab3a5ad7df2bbb06" dependencies = [ "anyhow", "enumset", @@ -5772,6 +5938,7 @@ dependencies = [ "swc_ecma_ast", "swc_plugin_proxy", "tracing", + "vergen", "virtual-fs", "wasmer", "wasmer-cache", @@ -5781,18 +5948,18 @@ dependencies = [ [[package]] name = "swc_timer" -version = "0.22.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2460de9f00f2af53f65b787c771a6ba90c719d600adb3c71cbb87219646ab4" +checksum = "4db06b46cc832f7cf83c2ce21905fc465d01443a2bdccf63644383e1f5847532" dependencies = [ "tracing", ] [[package]] name = "swc_trace_macro" -version = "0.1.3" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff9719b6085dd2824fd61938a881937be14b08f95e2d27c64c825a9f65e052ba" +checksum = "4c78717a841565df57f811376a3d19c9156091c55175e12d378f3a522de70cef" dependencies = [ "proc-macro2", "quote", @@ -5801,25 +5968,12 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.14" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043d11fe683dcb934583ead49405c0896a5af5face522e4682c16971ef7871b9" +checksum = "b40b33e89a4fe7b07b39665f81203a83ffecb3a930522b6ad075716ee6dad637" dependencies = [ "either", - "swc_visit_macros", -] - -[[package]] -name = "swc_visit_macros" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae9ef18ff8daffa999f729db056d2821cd2f790f3a11e46422d19f46bb193e7" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "swc_macros_common", - "syn 2.0.65", + "new_debug_unreachable", ] [[package]] @@ -5891,13 +6045,13 @@ dependencies = [ ] [[package]] -name = "term_size" -version = "0.3.2" +name = "terminal_size" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "libc", - "winapi", + "rustix", + "windows-sys 0.48.0", ] [[package]] @@ -5952,13 +6106,15 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "libc", "num-conv", + "num_threads", "powerfmt", "serde", "time-core", @@ -5973,9 +6129,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -6021,34 +6177,47 @@ dependencies = [ ] [[package]] -name = "toml" -version = "0.7.8" +name = "tokio-stream" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-util" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", ] [[package]] name = "toml" -version = "0.8.8" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.21.0", + "toml_edit 0.22.22", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -6059,24 +6228,22 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", - "serde", - "serde_spanned", + "indexmap 2.6.0", "toml_datetime", - "winnow", + "winnow 0.5.34", ] [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.20", ] [[package]] @@ -6113,9 +6280,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" dependencies = [ "serde", "stable_deref_trait", @@ -6127,6 +6294,16 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8686b91785aff82828ed725225925b33b4fde44c4bb15876e5f7c832724c420a" +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "static_assertions", +] + [[package]] name = "typed-arena" version = "2.0.2" @@ -6162,9 +6339,9 @@ checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" [[package]] name = "unicode-id-start" -version = "1.0.4" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02aebfa694eccbbbffdd92922c7de136b9fe764396d2f10e21bce1681477cfc1" +checksum = "97e2a3c5fc9de285c0e805d98eba666adb4b2d9e1049ce44821ff7707cc34e91" [[package]] name = "unicode-ident" @@ -6207,9 +6384,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "unsafe-libyaml" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "url" @@ -6253,6 +6430,32 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +[[package]] +name = "vergen" +version = "9.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349ed9e45296a581f455bc18039878f409992999bc1d5da12a6800eb18c8752f" +dependencies = [ + "anyhow", + "cargo_metadata", + "derive_builder 0.20.2", + "regex", + "rustversion", + "time", + "vergen-lib", +] + +[[package]] +name = "vergen-lib" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229eaddb0050920816cf051e619affaf18caa3dd512de8de5839ccbc8e53abb0" +dependencies = [ + "anyhow", + "derive_builder 0.20.2", + "rustversion", +] + [[package]] name = "version_check" version = "0.9.4" @@ -6261,14 +6464,16 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "virtual-fs" -version = "0.11.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce7b7674a3d0ddb5915b8f4feccdd6e8680c5980c296688e0f0e7378b8c69e1" +checksum = "e60ef133d8336b201a1618252518d81f9e9d30fbe27449dab706699a549216bc" dependencies = [ "anyhow", "async-trait", "bytes", + "dashmap 6.1.0", "derivative", + "dunce", "filetime", "fs_extra", "futures", @@ -6288,9 +6493,9 @@ dependencies = [ [[package]] name = "virtual-mio" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f38a379f14296f9fb93eda42ece4d57b568af417569102c3dcfeb88ab4800f" +checksum = "ff8026c9d7575dc9afd8a0907357acb7aa55ec262097fbccae5da42f67773b3c" dependencies = [ "async-trait", "bytes", @@ -6305,20 +6510,24 @@ dependencies = [ [[package]] name = "virtual-net" -version = "0.6.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b66781480898ee7ee62a2bbe2955ce1bb5a90fdc8bfedbdabe3537b177fa3e" +checksum = "05d9551aa47efdb28093f79845d40858baf5075e4b4a09c7d9c8a0edd42f942b" dependencies = [ "anyhow", "async-trait", "base64 0.21.7", "bincode", + "bytecheck", "bytes", "derivative", "futures-util", "pin-project-lite", + "rkyv", "serde", + "smoltcp", "thiserror", + "tokio", "tracing", "virtual-mio", ] @@ -6354,17 +6563,6 @@ dependencies = [ "wai-bindgen-gen-rust", ] -[[package]] -name = "wai-bindgen-gen-wasmer" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f61484185d8c520a86d5a7f7f8265f446617c2f9774b2e20a52de19b6e53432" -dependencies = [ - "heck 0.3.3", - "wai-bindgen-gen-core", - "wai-bindgen-gen-rust", -] - [[package]] name = "wai-bindgen-rust" version = "0.2.3" @@ -6387,33 +6585,6 @@ dependencies = [ "wai-bindgen-gen-rust-wasm", ] -[[package]] -name = "wai-bindgen-wasmer" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f4a7cb5421959864b139870a7ebba26eafc9b46648feda9ac143528e9a8769" -dependencies = [ - "anyhow", - "bitflags 1.3.2", - "once_cell", - "thiserror", - "tracing", - "wai-bindgen-wasmer-impl", - "wasmer", -] - -[[package]] -name = "wai-bindgen-wasmer-impl" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b3488ed88d4dd0e3bf85bad4e27dac6cb31aae5d122a5dda2424803c8dc863a" -dependencies = [ - "proc-macro2", - "syn 1.0.109", - "wai-bindgen-gen-core", - "wai-bindgen-gen-wasmer", -] - [[package]] name = "wai-parser" version = "0.2.3" @@ -6526,9 +6697,9 @@ dependencies = [ [[package]] name = "wasmer" -version = "4.2.5" +version = "4.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5467c7a23f9be04d5691590bea509dbea27e5ba5810d0020bef908456a495f33" +checksum = "4b28d4251f96ece14460328c56ee0525edcf4bbb08748cfd87fef3580ae4d403" dependencies = [ "bytes", "cfg-if", @@ -6542,6 +6713,7 @@ dependencies = [ "shared-buffer", "target-lexicon", "thiserror", + "tracing", "wasm-bindgen", "wasmer-compiler", "wasmer-compiler-cranelift", @@ -6549,14 +6721,14 @@ dependencies = [ "wasmer-types", "wasmer-vm", "wat", - "winapi", + "windows-sys 0.59.0", ] [[package]] name = "wasmer-cache" -version = "4.2.5" +version = "4.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1613ff5e7db7645eab2f003411b1e7a12dcf0ff4677f6e7712ba74ebf40b276" +checksum = "c3b1f3ef1d5a81b101513a125b3aede723a6f0991cb1c85d1fcc252aa4ced011" dependencies = [ "blake3", "hex", @@ -6566,9 +6738,9 @@ dependencies = [ [[package]] name = "wasmer-compiler" -version = "4.2.5" +version = "4.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510ad01a668d774f3a103a7c219bbc0970be93e8f1b27e2fdb48d1f4ccd1deff" +checksum = "009b8417d51dbca8ac9a640ea999cc924fc59040a81245ecd0e092cb7c45dc10" dependencies = [ "backtrace", "bytes", @@ -6577,6 +6749,7 @@ dependencies = [ "enumset", "lazy_static", "leb128", + "libc", "memmap2 0.5.10", "more-asserts", "region", @@ -6588,14 +6761,15 @@ dependencies = [ "wasmer-types", "wasmer-vm", "wasmparser", - "winapi", + "windows-sys 0.59.0", + "xxhash-rust", ] [[package]] name = "wasmer-compiler-cranelift" -version = "4.2.5" +version = "4.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54bf93078990d83960d798de3c5935bddaba771fc2fefb9ed6bab9c0bbdea5c1" +checksum = "2445c6fb03824979448293e91d8a6daf0cdf66e8d996f31ef270e0d2cc3ea1f3" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -6610,11 +6784,33 @@ dependencies = [ "wasmer-types", ] +[[package]] +name = "wasmer-config" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "644b7e3547bd7e796d92220f60bf57734914254c6cee56607e80177a3e8a28da" +dependencies = [ + "anyhow", + "bytesize", + "ciborium", + "derive_builder 0.12.0", + "hex", + "indexmap 2.6.0", + "schemars", + "semver 1.0.21", + "serde", + "serde_json", + "serde_yaml", + "thiserror", + "toml", + "url", +] + [[package]] name = "wasmer-derive" -version = "4.2.5" +version = "4.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b374fd34d97b1c091d8675f9bc472df52dc6787d139d3762d42c7dc84813a9b" +checksum = "02592d86ac19fb09c972e72edeb3e57ac5c569eac7e77b919b165da014e8c139" dependencies = [ "proc-macro-error", "proc-macro2", @@ -6623,81 +6819,97 @@ dependencies = [ ] [[package]] -name = "wasmer-toml" -version = "0.9.2" +name = "wasmer-journal" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d21472954ee9443235ca32522b17fc8f0fe58e2174556266a0d9766db055cc52" +checksum = "3045807a8a70da47eb06cb55aad673d5774f87f26ee11b7758d63c54b67bc5f4" dependencies = [ "anyhow", - "derive_builder", - "indexmap 2.2.6", - "semver 1.0.21", + "async-trait", + "base64 0.21.7", + "bincode", + "bytecheck", + "bytes", + "derivative", + "lz4_flex", + "num_enum 0.5.11", + "rkyv", "serde", - "serde_cbor", "serde_json", - "serde_yaml 0.9.30", "thiserror", - "toml 0.8.8", + "tracing", + "virtual-fs", + "virtual-net", + "wasmer", + "wasmer-wasix-types", ] [[package]] name = "wasmer-types" -version = "4.2.5" +version = "4.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0caf1c87937b52aba8e9f920a278e1beda282f7439612c0b48f51a58e7a87bab" +checksum = "3d22a00f1a90e9e66d5427853f41e76d8ab89e03eb3034debd11933607fef56a" dependencies = [ - "bytecheck 0.6.11", + "bytecheck", "enum-iterator", "enumset", + "getrandom", + "hex", "indexmap 1.9.3", "more-asserts", "rkyv", "serde", + "sha2", "target-lexicon", "thiserror", + "xxhash-rust", ] [[package]] name = "wasmer-vm" -version = "4.2.5" +version = "4.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58315c25492bc72a33f47a7d7fb0869a0106fc0164ec051e349a9e1eddba9a01" +checksum = "87d88e8355157cd730fb81e33c3b4d6849fd44c26d32bf78820638e1d935967b" dependencies = [ "backtrace", "cc", "cfg-if", "corosensei", "crossbeam-queue", - "dashmap", + "dashmap 6.1.0", "derivative", "enum-iterator", "fnv", "indexmap 1.9.3", "lazy_static", "libc", - "mach", + "mach2", "memoffset 0.9.0", "more-asserts", "region", "scopeguard", "thiserror", "wasmer-types", - "winapi", + "windows-sys 0.59.0", ] [[package]] name = "wasmer-wasix" -version = "0.18.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9697b8ffc3a37c193648919018848171de0d75e6e955377893d258431b19d7a" +checksum = "dbfe427dbe359e037e1e33ff13b3a5473706e5679df2dbb0e71b5b46c9bb6ce3" dependencies = [ + "ahash 0.8.11", "anyhow", "async-trait", + "base64 0.21.7", "bincode", + "blake3", + "bytecheck", "bytes", "cfg-if", "cooked-waker", - "dashmap", + "dashmap 6.1.0", "derivative", "futures", "getrandom", @@ -6707,45 +6919,52 @@ dependencies = [ "lazy_static", "libc", "linked_hash_set", + "lz4_flex", + "num_enum 0.5.11", "once_cell", "petgraph", "pin-project", + "pin-utils", "rand", + "rkyv", "rusty_pool", "semver 1.0.21", "serde", - "serde_cbor", "serde_derive", "serde_json", - "serde_yaml 0.8.26", + "serde_yaml", "sha2", + "shared-buffer", "tempfile", - "term_size", + "terminal_size", "termios", "thiserror", "tokio", + "tokio-stream", + "toml", "tracing", "url", "urlencoding", "virtual-fs", "virtual-mio", "virtual-net", - "wai-bindgen-wasmer", "waker-fn", "wasmer", + "wasmer-config", + "wasmer-journal", "wasmer-types", "wasmer-wasix-types", "webc", "weezl", - "winapi", + "windows-sys 0.59.0", "xxhash-rust", ] [[package]] name = "wasmer-wasix-types" -version = "0.18.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ca293eae6e3af6e4fd9fe1c8e096151d4f06cbb405ce5dd65edb779aba42d9" +checksum = "9b9304c02de27468ea4154a31f8758343717d03a29d2a620bc652e8217baab75" dependencies = [ "anyhow", "bitflags 1.3.2", @@ -6767,12 +6986,13 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.95.0" +version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ea896273ea99b15132414be1da01ab0d8836415083298ecaffbe308eaac87a" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ - "indexmap 1.9.3", - "url", + "bitflags 2.5.0", + "indexmap 2.6.0", + "semver 1.0.21", ] [[package]] @@ -6937,34 +7157,36 @@ dependencies = [ [[package]] name = "webc" -version = "5.8.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "973ca5a91b4fb3e4bb37cfebe03ef9364d0aff2765256abefdb7e79dc9188483" +checksum = "cdea84cf234555864ca9b7a5084c1a99dbdf2d148035f62a09b19ce5606532c1" dependencies = [ "anyhow", - "base64 0.21.7", - "byteorder", + "base64 0.22.1", "bytes", + "cfg-if", + "ciborium", + "document-features", "flate2", + "ignore", "indexmap 1.9.3", "leb128", "lexical-sort", + "libc", "once_cell", "path-clean 1.0.1", "rand", "semver 1.0.21", "serde", - "serde_cbor", "serde_json", "sha2", "shared-buffer", "tar", "tempfile", "thiserror", - "toml 0.7.8", + "toml", "url", - "walkdir", - "wasmer-toml", + "wasmer-config", ] [[package]] @@ -7010,7 +7232,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] @@ -7050,7 +7272,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -7085,17 +7316,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -7112,9 +7344,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -7136,9 +7368,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -7160,9 +7392,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -7184,9 +7422,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -7208,9 +7446,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -7226,9 +7464,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -7250,9 +7488,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" @@ -7297,6 +7535,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + [[package]] name = "wyz" version = "0.5.1" @@ -7359,18 +7606,9 @@ checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" [[package]] name = "xxhash-rust" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53be06678ed9e83edb1745eb72efc0bbcd7b5c3c35711a860906aed827a13d61" - -[[package]] -name = "yaml-rust" -version = "0.4.5" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] +checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" [[package]] name = "zerocopy" diff --git a/bench/CHANGELOG.md b/bench/CHANGELOG.md deleted file mode 100644 index 4fbafde19..000000000 --- a/bench/CHANGELOG.md +++ /dev/null @@ -1,139 +0,0 @@ -# bench - -## 1.0.18 - -### Patch Changes - -- Updated dependencies [663dfeed] - - @farmfe/core@1.3.29 - -## 1.0.17 - -### Patch Changes - -- Updated dependencies [e1f5c696] -- Updated dependencies [a2a32f51] -- Updated dependencies [04a124fe] -- Updated dependencies [7d84234e] - - @farmfe/core@1.3.28 - -## 1.0.16 - -### Patch Changes - -- Updated dependencies - - @farmfe/core@1.3.27 - -## 1.0.15 - -### Patch Changes - -- Updated dependencies [3b6eb912] -- Updated dependencies [ed676f02] - - @farmfe/core@1.3.26 - -## 1.0.14 - -### Patch Changes - -- Updated dependencies [97408595] - - @farmfe/core@1.3.25 - -## 1.0.13 - -### Patch Changes - -- Updated dependencies [772381b0] -- Updated dependencies [732c046d] - - @farmfe/core@1.3.24 - -## 1.0.12 - -### Patch Changes - -- Updated dependencies [e17551ad] -- Updated dependencies [4542c3d8] - - @farmfe/core@1.3.23 - -## 1.0.11 - -### Patch Changes - -- Updated dependencies [5f0c02d2] - - @farmfe/core@1.3.22 - -## 1.0.10 - -### Patch Changes - -- Updated dependencies [1b1a7c17] - - @farmfe/core@1.3.21 - -## 1.0.9 - -### Patch Changes - -- Updated dependencies [ca00a930] - - @farmfe/core@1.3.20 - -## 1.0.8 - -### Patch Changes - -- Updated dependencies [2095f173] - - @farmfe/core@1.3.19 - -## 1.0.7 - -### Patch Changes - -- Updated dependencies [e4e8b92b] - - @farmfe/core@1.3.18 - -## 1.0.6 - -### Patch Changes - -- Updated dependencies [83b89e72] - - @farmfe/core@1.3.17 - -## 1.0.5 - -### Patch Changes - -- Updated dependencies [b5d2a4c3] -- Updated dependencies [2e7f4f90] -- Updated dependencies [b7fb695a] - - @farmfe/core@1.3.16 - -## 1.0.4 - -### Patch Changes - -- @farmfe/core@1.3.15 - -## 1.0.3 - -### Patch Changes - -- Updated dependencies [535d0b2c] -- Updated dependencies [8e67cdab] -- Updated dependencies [73cfd570] - - @farmfe/core@1.3.14 - -## 1.0.2 - -### Patch Changes - -- Updated dependencies [ed5c5278] -- Updated dependencies [ef19162f] - - @farmfe/core@1.3.13 - -## 1.0.1 - -### Patch Changes - -- Updated dependencies [7417d0f3] -- Updated dependencies [49448561] -- Updated dependencies [eff069c4] - - @farmfe/core@1.3.12 diff --git a/bench/benches/example.bench.ts b/bench/benches/example.bench.ts deleted file mode 100644 index ef36dd6e0..000000000 --- a/bench/benches/example.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import path from 'node:path'; -import { build } from '@farmfe/core'; -import { bench, describe } from 'vitest'; - -async function build_react_example() { - await build({ - root: path.resolve(process.cwd(), './examples/react'), - configPath: path.resolve('./examples/react'), - compilation: { input: {}, output: {} } - }); -} - -describe('react_example_bench', () => { - let hasRun = false; - bench( - 'build_react_example', - async () => { - if (!hasRun) { - await build_react_example(); - hasRun = true; - } - }, - { warmupIterations: 0 } - ); -}); diff --git a/bench/package.json b/bench/package.json deleted file mode 100644 index 548f62fc1..000000000 --- a/bench/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "bench", - "version": "1.0.18", - "private": true, - "description": "", - "scripts": {}, - "dependencies": { - "@farmfe/core": "workspace:*" - }, - "keywords": [], - "author": "", - "license": "ISC" -} diff --git a/bench/vitest.config.mts b/bench/vitest.config.mts deleted file mode 100644 index 81970d7af..000000000 --- a/bench/vitest.config.mts +++ /dev/null @@ -1,6 +0,0 @@ -import { defineConfig } from 'vitest/config'; -import codspeedPlugin from '@codspeed/vitest-plugin'; - -export default defineConfig({ - plugins: [codspeedPlugin()] -}); diff --git a/biome.json b/biome.json index df15d80b5..90d4950eb 100644 --- a/biome.json +++ b/biome.json @@ -48,12 +48,12 @@ "rules": { "recommended": false, "complexity": { - "noBannedTypes": "warn", + "noBannedTypes": "off", "noExtraBooleanCast": "error", "noMultipleSpacesInRegularExpressionLiterals": "error", - "noUselessCatch": "error", "noUselessTypeConstraint": "error", - "noWith": "error" + "noWith": "error", + "noUselessCatch": "off" }, "correctness": { "noConstAssign": "error", @@ -75,7 +75,7 @@ "noUnsafeFinally": "error", "noUnsafeOptionalChaining": "error", "noUnusedLabels": "error", - "noUnusedVariables": "warn", + "noUnusedVariables": "off", "useIsNan": "error", "useValidForDirection": "error", "useYield": "error" @@ -119,6 +119,7 @@ "**/binding/**", "**/templates/**", "**/dist/**", + "**/docs/**", "**/node_modules/**", "**/*.config.js", "**/*.config.ts" diff --git a/crates/bench/Cargo.toml b/crates/bench/Cargo.toml deleted file mode 100644 index ac3f36ede..000000000 --- a/crates/bench/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[package] -name = "farmfe_bench" -version = "0.0.1" -edition = "2021" -authors = ["brightwu(吴明亮) <1521488775@qq.com>"] -license = "MIT" -description = "Farm Bench" -homepage = "https://farmfe.org" -repository = "https://github.com/farm-fe/farm" -documentation = "https://docs.rs/farmfe_bench" - -[dependencies] -criterion2 = { version = "0.11.0", default-features = false } -farmfe_core = { path = "../core", version = "0.6.4" } -farmfe_compiler = { path = "../compiler", version = "0.0.11" } - -[[bench]] -name = "compiler_bench" -harness = false - -[features] -codspeed = ["criterion2/codspeed"] diff --git a/crates/bench/benches/compiler_bench.rs b/crates/bench/benches/compiler_bench.rs deleted file mode 100644 index b52d9b4c1..000000000 --- a/crates/bench/benches/compiler_bench.rs +++ /dev/null @@ -1,56 +0,0 @@ -use criterion::{black_box, criterion_group, criterion_main, Criterion}; -// use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Criterion}; - -use farmfe_compiler::Compiler; -use farmfe_core::{ - config::{Config, RuntimeConfig}, - relative_path::RelativePath, -}; - -fn setup_compiler() -> Compiler { - let relative_root = RelativePath::new("./index.ts"); - let cwd = std::env::current_dir().unwrap(); - let react_examples_root = relative_root.to_logical_path(cwd.clone()); - - Compiler::new( - Config { - root: react_examples_root.to_string_lossy().to_string(), - runtime: Box::new(RuntimeConfig { - path: cwd - .join("packages") - .join("runtime") - .join("src") - .join("index.ts") - .to_string_lossy() - .to_string(), - plugins: vec![], - swc_helpers_path: cwd - .join("packages") - .join("core") - .join("node_modules") - .join("@swc") - .join("helpers") - .read_link() - .unwrap() - .to_string_lossy() - .to_string(), - ..Default::default() - }), - ..Default::default() - }, - vec![], - ) - .unwrap() -} - -fn bench_compiler_compile(c: &mut Criterion) { - let compiler = setup_compiler(); - c.bench_function("compiler_compile", |b| { - b.iter(|| { - black_box(compiler.compile().unwrap()); - }) - }); -} - -criterion_group!(benches, bench_compiler_compile); -criterion_main!(benches); diff --git a/crates/compiler/src/build/mod.rs b/crates/compiler/src/build/mod.rs index 6509029ea..0f0aaf266 100644 --- a/crates/compiler/src/build/mod.rs +++ b/crates/compiler/src/build/mod.rs @@ -35,6 +35,7 @@ use crate::{ analyze_deps::analyze_deps, finalize_module::finalize_module, load::load, parse::parse, resolve::resolve, transform::transform, }, + utils::get_module_ids_from_compilation_errors, Compiler, }; @@ -115,6 +116,17 @@ impl Compiler { } } + pub fn set_last_fail_module_ids(&self, errors: &[CompilationError]) { + let mut last_fail_module_ids = self.last_fail_module_ids.lock(); + last_fail_module_ids.clear(); + + for id in get_module_ids_from_compilation_errors(errors) { + if !last_fail_module_ids.contains(&id) { + last_fail_module_ids.push(id); + } + } + } + pub(crate) fn build(&self) -> Result<()> { self.context.plugin_driver.build_start(&self.context)?; @@ -145,12 +157,17 @@ impl Compiler { } self.handle_global_log(&mut errors); + let mut res = Ok(()); + if !errors.is_empty() { // set stats if stats is enabled self.context.record_manager.set_build_end_time(); self.context.record_manager.set_end_time(); self.set_module_graph_stats(); + // set last failed module ids + self.set_last_fail_module_ids(&errors); + let mut error_messages = vec![]; for error in errors { error_messages.push(error.to_string()); @@ -159,7 +176,9 @@ impl Compiler { .iter() .map(|e| e.to_string()) .collect::>()); - return Err(CompilationError::GenericError(errors_json.to_string())); + res = Err(CompilationError::GenericError(errors_json.to_string())); + } else { + self.set_last_fail_module_ids(&[]); } // set module graph cache @@ -186,8 +205,10 @@ impl Compiler { { farm_profile_scope!("call build_end hook".to_string()); - self.context.plugin_driver.build_end(&self.context) + self.context.plugin_driver.build_end(&self.context)?; } + + res } pub(crate) fn handle_global_log(&self, errors: &mut Vec) { diff --git a/crates/compiler/src/generate/partial_bundling.rs b/crates/compiler/src/generate/partial_bundling.rs index 6587a770b..58f8c94b4 100644 --- a/crates/compiler/src/generate/partial_bundling.rs +++ b/crates/compiler/src/generate/partial_bundling.rs @@ -219,7 +219,7 @@ mod tests { plugin::{Plugin, PluginHookContext}, }; use farmfe_plugin_partial_bundling::module_group_graph_from_entries; - use farmfe_testing_helpers::construct_test_module_graph_complex; + use farmfe_testing_helpers::{assert_resource_pots, construct_test_module_graph_complex}; use super::generate_resource_pot_map; @@ -227,10 +227,7 @@ mod tests { fn test_generate_resource_pot_map() { let mut module_graph = construct_test_module_graph_complex(); let module_group_graph = module_group_graph_from_entries( - &module_graph - .entries - .clone().into_keys() - .collect(), + &module_graph.entries.clone().into_keys().collect(), &mut module_graph, ); @@ -261,43 +258,7 @@ mod tests { resource_pots.sort_by_key(|p| p.id.clone()); assert_eq!(resource_pots.len(), 5); - // A, C - assert_eq!(resource_pots[0].modules(), vec![&"A".into(), &"C".into()]); - assert_eq!(resource_pots[0].entry_module, Some("A".into())); - // B, E - assert_eq!(resource_pots[1].modules(), vec![&"B".into(), &"E".into()]); - assert_eq!(resource_pots[1].entry_module, Some("B".into())); - // D - assert_eq!(resource_pots[2].modules(), vec![&"D".into()]); - // G - assert_eq!(resource_pots[3].modules(), vec![&"G".into()]); - // F, H - assert_eq!(resource_pots[4].modules(), vec![&"F".into(), &"H".into()]); - - // assert necessary fields are filled - assert_eq!( - resource_pots[0].module_groups, - HashSet::from(["A".into(), "F".into()]) - ); - assert_eq!(resource_pots[0].entry_module, Some("A".into())); - - assert_eq!(resource_pots[1].module_groups, HashSet::from(["B".into()])); - assert_eq!(resource_pots[1].entry_module, Some("B".into())); - - assert_eq!( - resource_pots[2].module_groups, - HashSet::from(["D".into(), "B".into()]) - ); - assert_eq!(resource_pots[2].entry_module, None); - - assert_eq!(resource_pots[3].module_groups, HashSet::from(["G".into()])); - assert_eq!(resource_pots[3].entry_module, None); - - assert_eq!( - resource_pots[4].module_groups, - HashSet::from(["F".into(), "G".into(), "B".into(), "D".into()]) - ); - assert_eq!(resource_pots[4].entry_module, None); + assert_resource_pots!(resource_pots); } #[test] @@ -307,10 +268,7 @@ mod tests { module_graph.module_mut(&"H".into()).unwrap().external = true; let module_group_graph = module_group_graph_from_entries( - &module_graph - .entries - .clone().into_keys() - .collect(), + &module_graph.entries.clone().into_keys().collect(), &mut module_graph, ); @@ -337,39 +295,7 @@ mod tests { resource_pots.sort_by_key(|p| p.id.clone()); assert_eq!(resource_pots.len(), 5); - // A, C - assert_eq!(resource_pots[0].modules(), vec![&"A".into(), &"C".into()]); - assert_eq!(resource_pots[0].entry_module, Some("A".into())); - // B, E - assert_eq!(resource_pots[1].modules(), vec![&"B".into(), &"E".into()]); - assert_eq!(resource_pots[1].entry_module, Some("B".into())); - // D - assert_eq!(resource_pots[2].modules(), vec![&"D".into()]); - // F, H - assert_eq!(resource_pots[3].modules(), vec![&"F".into()]); - // G - assert_eq!(resource_pots[4].modules(), vec![&"G".into()]); - - // assert necessary fields are filled - assert_eq!( - resource_pots[0].module_groups, - HashSet::from(["A".into(), "F".into()]) - ); - assert_eq!(resource_pots[0].entry_module, Some("A".into())); - - assert_eq!(resource_pots[1].module_groups, HashSet::from(["B".into()])); - assert_eq!(resource_pots[1].entry_module, Some("B".into())); - - assert_eq!( - resource_pots[2].module_groups, - HashSet::from(["D".into(), "B".into()]) - ); - assert_eq!(resource_pots[2].entry_module, None); - - assert_eq!(resource_pots[3].module_groups, HashSet::from(["F".into()])); - assert_eq!(resource_pots[3].entry_module, None); - assert_eq!(resource_pots[4].module_groups, HashSet::from(["G".into()])); - assert_eq!(resource_pots[4].entry_module, None); + assert_resource_pots!(&mut resource_pots); } } diff --git a/crates/compiler/src/generate/snapshots/generate_resource_pot_map-2.snap b/crates/compiler/src/generate/snapshots/generate_resource_pot_map-2.snap new file mode 100644 index 000000000..2d7fdedfc --- /dev/null +++ b/crates/compiler/src/generate/snapshots/generate_resource_pot_map-2.snap @@ -0,0 +1,59 @@ +--- +source: crates/compiler/src/generate/partial_bundling.rs +input_file: crates/compiler/src/generate/partial_bundling.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "E", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_2f5d", + ), + ( + "id", + "B_2f5d", + ), + ( + "entry", + Some( + ModuleId { + relative_path: "B", + query_string: "", + }, + ), + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/generate/snapshots/generate_resource_pot_map-3.snap b/crates/compiler/src/generate/snapshots/generate_resource_pot_map-3.snap new file mode 100644 index 000000000..0f4dee256 --- /dev/null +++ b/crates/compiler/src/generate/snapshots/generate_resource_pot_map-3.snap @@ -0,0 +1,54 @@ +--- +source: crates/compiler/src/generate/partial_bundling.rs +input_file: crates/compiler/src/generate/partial_bundling.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "D", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_3f39", + ), + ( + "id", + "B_3f39", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "D", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/generate/snapshots/generate_resource_pot_map-4.snap b/crates/compiler/src/generate/snapshots/generate_resource_pot_map-4.snap new file mode 100644 index 000000000..fadc33416 --- /dev/null +++ b/crates/compiler/src/generate/snapshots/generate_resource_pot_map-4.snap @@ -0,0 +1,50 @@ +--- +source: crates/compiler/src/generate/partial_bundling.rs +input_file: crates/compiler/src/generate/partial_bundling.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "G", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "G_333e", + ), + ( + "id", + "G_333e", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "G", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/generate/snapshots/generate_resource_pot_map-5.snap b/crates/compiler/src/generate/snapshots/generate_resource_pot_map-5.snap new file mode 100644 index 000000000..52473273b --- /dev/null +++ b/crates/compiler/src/generate/snapshots/generate_resource_pot_map-5.snap @@ -0,0 +1,66 @@ +--- +source: crates/compiler/src/generate/partial_bundling.rs +input_file: crates/compiler/src/generate/partial_bundling.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "F", + query_string: "", + }, + ModuleId { + relative_path: "H", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "test", + ), + ( + "id", + "test_custom(\"__farm_unknown\")", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "D", + query_string: "", + }, + ModuleId { + relative_path: "F", + query_string: "", + }, + ModuleId { + relative_path: "G", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/generate/snapshots/generate_resource_pot_map.snap b/crates/compiler/src/generate/snapshots/generate_resource_pot_map.snap new file mode 100644 index 000000000..48258406c --- /dev/null +++ b/crates/compiler/src/generate/snapshots/generate_resource_pot_map.snap @@ -0,0 +1,63 @@ +--- +source: crates/compiler/src/generate/partial_bundling.rs +input_file: crates/compiler/src/generate/partial_bundling.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "A", + query_string: "", + }, + ModuleId { + relative_path: "C", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "A_66be", + ), + ( + "id", + "A_66be", + ), + ( + "entry", + Some( + ModuleId { + relative_path: "A", + query_string: "", + }, + ), + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "A", + query_string: "", + }, + ModuleId { + relative_path: "F", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external-2.snap b/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external-2.snap new file mode 100644 index 000000000..2d7fdedfc --- /dev/null +++ b/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external-2.snap @@ -0,0 +1,59 @@ +--- +source: crates/compiler/src/generate/partial_bundling.rs +input_file: crates/compiler/src/generate/partial_bundling.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "E", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_2f5d", + ), + ( + "id", + "B_2f5d", + ), + ( + "entry", + Some( + ModuleId { + relative_path: "B", + query_string: "", + }, + ), + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external-3.snap b/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external-3.snap new file mode 100644 index 000000000..0f4dee256 --- /dev/null +++ b/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external-3.snap @@ -0,0 +1,54 @@ +--- +source: crates/compiler/src/generate/partial_bundling.rs +input_file: crates/compiler/src/generate/partial_bundling.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "D", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_3f39", + ), + ( + "id", + "B_3f39", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "D", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external-4.snap b/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external-4.snap new file mode 100644 index 000000000..02b861b4a --- /dev/null +++ b/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external-4.snap @@ -0,0 +1,50 @@ +--- +source: crates/compiler/src/generate/partial_bundling.rs +input_file: crates/compiler/src/generate/partial_bundling.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "F", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "F_f67a", + ), + ( + "id", + "F_f67a", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "F", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external-5.snap b/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external-5.snap new file mode 100644 index 000000000..fadc33416 --- /dev/null +++ b/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external-5.snap @@ -0,0 +1,50 @@ +--- +source: crates/compiler/src/generate/partial_bundling.rs +input_file: crates/compiler/src/generate/partial_bundling.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "G", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "G_333e", + ), + ( + "id", + "G_333e", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "G", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external.snap b/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external.snap new file mode 100644 index 000000000..48258406c --- /dev/null +++ b/crates/compiler/src/generate/snapshots/generate_resource_pot_map_external.snap @@ -0,0 +1,63 @@ +--- +source: crates/compiler/src/generate/partial_bundling.rs +input_file: crates/compiler/src/generate/partial_bundling.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "A", + query_string: "", + }, + ModuleId { + relative_path: "C", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "A_66be", + ), + ( + "id", + "A_66be", + ), + ( + "entry", + Some( + ModuleId { + relative_path: "A", + query_string: "", + }, + ), + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "A", + query_string: "", + }, + ModuleId { + relative_path: "F", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/lib.rs b/crates/compiler/src/lib.rs index c90b05fd9..a145a71ed 100644 --- a/crates/compiler/src/lib.rs +++ b/crates/compiler/src/lib.rs @@ -12,6 +12,8 @@ use farmfe_core::{ context::CompilationContext, error::Result, farm_profile_function, + module::ModuleId, + parking_lot::Mutex, plugin::Plugin, rayon::{ThreadPool, ThreadPoolBuilder}, }; @@ -24,10 +26,12 @@ pub mod build; pub mod generate; pub mod trace_module_graph; pub mod update; +pub mod utils; pub struct Compiler { context: Arc, pub thread_pool: Arc, + pub last_fail_module_ids: Mutex>, } impl Compiler { @@ -93,6 +97,7 @@ impl Compiler { .build() .unwrap(), ), + last_fail_module_ids: Mutex::new(vec![]), }) } @@ -128,11 +133,12 @@ impl Compiler { } // triggering build stage - { + let res = { #[cfg(feature = "profile")] farmfe_core::puffin::profile_scope!("Build Stage"); - self.build()?; - } + self.build() + }; + self.context.record_manager.set_build_end_time(); { #[cfg(feature = "profile")] @@ -166,7 +172,7 @@ impl Compiler { self.context.record_manager.set_end_time(); - Ok(()) + res } pub fn context(&self) -> &Arc { diff --git a/crates/compiler/src/update/handle_update_modules.rs b/crates/compiler/src/update/handle_update_modules.rs index 6c91c7322..5679b9e9d 100644 --- a/crates/compiler/src/update/handle_update_modules.rs +++ b/crates/compiler/src/update/handle_update_modules.rs @@ -11,6 +11,7 @@ use farmfe_utils::relative; pub fn handle_update_modules( paths: Vec<(String, UpdateType)>, + last_fail_module_ids: &[ModuleId], context: &Arc, update_result: &mut UpdateResult, ) -> farmfe_core::error::Result> { @@ -26,6 +27,8 @@ pub fn handle_update_modules( (vec![], 0) }; let paths = resolve_watch_graph_paths(paths, context); + let paths = resolve_last_failed_module_paths(paths, last_fail_module_ids, context); + if context.config.record { let end_time = std::time::SystemTime::now() .duration_since(std::time::UNIX_EPOCH) @@ -181,6 +184,7 @@ pub fn handle_update_modules( end_time, }) } + Ok(result) } @@ -231,3 +235,17 @@ fn resolve_watch_graph_paths( }) .collect() } + +fn resolve_last_failed_module_paths( + mut paths: Vec<(String, UpdateType)>, + last_fail_module_ids: &[ModuleId], + context: &Arc, +) -> Vec<(String, UpdateType)> { + paths.extend( + last_fail_module_ids + .iter() + .map(|id| (id.resolved_path(&context.config.root), UpdateType::Updated)), + ); + + paths +} diff --git a/crates/compiler/src/update/mod.rs b/crates/compiler/src/update/mod.rs index 107163e36..5ee3d5ce9 100644 --- a/crates/compiler/src/update/mod.rs +++ b/crates/compiler/src/update/mod.rs @@ -165,7 +165,15 @@ impl Compiler { let mut update_result = UpdateResult::default(); self.context.clear_log_store(); - let paths = handle_update_modules(paths, &self.context, &mut update_result)?; + + let last_failed_module_ids = self.last_fail_module_ids.lock(); + let paths = handle_update_modules( + paths, + &last_failed_module_ids, + &self.context, + &mut update_result, + )?; + drop(last_failed_module_ids); for (path, update_type) in paths.clone() { match update_type { @@ -219,6 +227,7 @@ impl Compiler { self.context.record_manager.set_build_end_time(); self.context.record_manager.set_end_time(); self.set_update_module_graph_stats(&update_context); + self.set_last_fail_module_ids(&errors); let mut error_messages = vec![]; for error in errors { @@ -229,6 +238,8 @@ impl Compiler { .map(|e| e.to_string()) .collect::>()); return Err(CompilationError::GenericError(errors_json.to_string())); + } else { + self.set_last_fail_module_ids(&[]); } self.context.record_manager.set_build_end_time(); diff --git a/crates/compiler/src/update/patch_module_group_graph/tests.rs b/crates/compiler/src/update/patch_module_group_graph/tests.rs index 99c78c2cb..8fcd5e71f 100644 --- a/crates/compiler/src/update/patch_module_group_graph/tests.rs +++ b/crates/compiler/src/update/patch_module_group_graph/tests.rs @@ -182,10 +182,7 @@ fn test_patch_module_group_graph_3() { let updated_modules = vec!["F".into(), "E".into(), "B".into()]; let mut module_group_graph = module_group_graph_from_entries( - &module_graph - .entries - .clone().into_keys() - .collect(), + &module_graph.entries.clone().into_keys().collect(), &mut module_graph, ); let diff_result = diff_module_graph(updated_modules.clone(), &module_graph, &update_module_graph); @@ -210,10 +207,7 @@ fn test_patch_module_group_graph_3() { ); let update_module_group_graph = module_group_graph_from_entries( - &module_graph - .entries - .clone().into_keys() - .collect(), + &module_graph.entries.clone().into_keys().collect(), &mut module_graph, ); @@ -291,10 +285,7 @@ fn test_patch_module_group_graph_css_modules() { let start_points = vec!["D".into()]; let mut module_group_graph = module_group_graph_from_entries( - &module_graph - .entries - .clone().into_keys() - .collect(), + &module_graph.entries.clone().into_keys().collect(), &mut module_graph, ); let diff_result = diff_module_graph(start_points.clone(), &module_graph, &update_module_graph); @@ -315,10 +306,7 @@ fn test_patch_module_group_graph_css_modules() { assert_eq!(affected_groups, HashSet::from(["D".into(), "B".into()])); let update_module_group_graph = module_group_graph_from_entries( - &module_graph - .entries - .clone().into_keys() - .collect(), + &module_graph.entries.clone().into_keys().collect(), &mut module_graph, ); diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots.rs b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots.rs index fbc4ce9ac..afc02db75 100644 --- a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots.rs +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots.rs @@ -249,9 +249,7 @@ fn diff_and_patch_resource_pot_map( let resource_pot = resource_pot_map .remove_resource_pot(resource_pot) .unwrap_or_else(|| { - panic!( - "The resource pot {resource_pot:?} should be in the resource pot map" - ) + panic!("The resource pot {resource_pot:?} should be in the resource pot map") }); // also remove the related resource diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-10.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-10.snap new file mode 100644 index 000000000..729599936 --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-10.snap @@ -0,0 +1,59 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "A", + query_string: "", + }, + ModuleId { + relative_path: "C", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "A_66be", + ), + ( + "id", + "A_66be", + ), + ( + "entry", + Some( + ModuleId { + relative_path: "A", + query_string: "", + }, + ), + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "A", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-11.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-11.snap new file mode 100644 index 000000000..99b0ee8c5 --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-11.snap @@ -0,0 +1,59 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "E", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_2f5d", + ), + ( + "id", + "B_2f5d", + ), + ( + "entry", + Some( + ModuleId { + relative_path: "B", + query_string: "", + }, + ), + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-12.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-12.snap new file mode 100644 index 000000000..b83015b73 --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-12.snap @@ -0,0 +1,54 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "D", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_3f39", + ), + ( + "id", + "B_3f39", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "D", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-13.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-13.snap new file mode 100644 index 000000000..63f02ffbb --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-13.snap @@ -0,0 +1,58 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "F", + query_string: "", + }, + ModuleId { + relative_path: "H", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "test", + ), + ( + "id", + "test_custom(\"__farm_unknown\")", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "F", + query_string: "", + }, + ], + ), +) diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-2.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-2.snap new file mode 100644 index 000000000..8db783809 --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-2.snap @@ -0,0 +1,7 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +[ + "A_66be", +] diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-3.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-3.snap new file mode 100644 index 000000000..f757f9607 --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-3.snap @@ -0,0 +1,9 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +[ + "B_2f5d", + "B_3f39", + "test_custom(\"__farm_unknown\")", +] diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-4.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-4.snap new file mode 100644 index 000000000..272f2d169 --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-4.snap @@ -0,0 +1,7 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +[ + "B_3f39", +] diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-5.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-5.snap new file mode 100644 index 000000000..b706ee71c --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-5.snap @@ -0,0 +1,7 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +[ + "test_custom(\"__farm_unknown\")", +] diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-6.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-6.snap new file mode 100644 index 000000000..200d659e7 --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-6.snap @@ -0,0 +1,5 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +"test_custom(\"__farm_unknown\")" diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-7.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-7.snap new file mode 100644 index 000000000..6a0326e88 --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-7.snap @@ -0,0 +1,5 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +"B_2f5d" diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-8.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-8.snap new file mode 100644 index 000000000..6a0326e88 --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-8.snap @@ -0,0 +1,5 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +"B_2f5d" diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-9.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-9.snap new file mode 100644 index 000000000..200d659e7 --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots-9.snap @@ -0,0 +1,5 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +"test_custom(\"__farm_unknown\")" diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots.snap b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots.snap new file mode 100644 index 000000000..b706ee71c --- /dev/null +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/snapshots/generate_and_diff_resource_pots.snap @@ -0,0 +1,7 @@ +--- +source: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +input_file: crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +--- +[ + "test_custom(\"__farm_unknown\")", +] diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs index cc5da1e10..a0a1b9ccb 100644 --- a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_generate_and_diff_resource_pots.rs @@ -13,7 +13,10 @@ use farmfe_core::{ plugin::{Plugin, PluginHookContext, ResolveKind}, }; use farmfe_plugin_partial_bundling::module_group_graph_from_entries; -use farmfe_testing_helpers::{construct_test_module_graph, construct_test_module_graph_complex}; +use farmfe_testing_helpers::{ + assert_debug_snapshot, assert_resource_pots, assert_sorted_iter_eq, construct_test_module_graph, + construct_test_module_graph_complex, +}; use crate::{ generate::partial_bundling::generate_resource_pot_map, @@ -42,10 +45,7 @@ fn test_generate_and_diff_resource_pots() { let updated_modules = vec!["F".into(), "E".into(), "B".into()]; let mut module_group_graph = module_group_graph_from_entries( - &module_graph - .entries - .clone().into_keys() - .collect(), + &module_graph.entries.clone().into_keys().collect(), &mut module_graph, ); let diff_result = diff_module_graph(updated_modules.clone(), &module_graph, &update_module_graph); @@ -93,7 +93,7 @@ fn test_generate_and_diff_resource_pots() { generate_resource_pot_map(&context, &PluginHookContext::default()).unwrap(); context.resource_pot_map.write().replace(resource_pot_map); - let resource_pot_ids = generate_and_diff_resource_pots( + let mut resource_pot_ids = generate_and_diff_resource_pots( &affected_groups, &diff_result, &updated_modules, @@ -101,61 +101,30 @@ fn test_generate_and_diff_resource_pots() { &context, ) .unwrap(); - println!("{resource_pot_ids:?}"); - assert_eq!( - resource_pot_ids, - vec![String::from("test_custom(\"__farm_unknown\")")] - ); + resource_pot_ids.sort(); + assert_debug_snapshot!(resource_pot_ids); let module_group_graph = context.module_group_graph.read(); let module_group_a = module_group_graph.module_group(&"A".into()).unwrap(); - assert_eq!( - module_group_a.resource_pots(), - &HashSet::from(["A_66be_custom(\"__farm_unknown\")".to_string()]) - ); + assert_sorted_iter_eq!(module_group_a.resource_pots()); let module_group_b = module_group_graph.module_group(&"B".into()).unwrap(); - assert_eq!( - module_group_b.resource_pots(), - &HashSet::from([ - "B_2f5d_custom(\"__farm_unknown\")".to_string(), - "B_3f39_custom(\"__farm_unknown\")".to_string(), - "test_custom(\"__farm_unknown\")".to_string() - ]) - ); + assert_sorted_iter_eq!(module_group_b.resource_pots()); let module_group_d = module_group_graph.module_group(&"D".into()).unwrap(); - assert_eq!( - module_group_d.resource_pots(), - &HashSet::from(["B_3f39_custom(\"__farm_unknown\")".to_string()]) - ); + assert_sorted_iter_eq!(module_group_d.resource_pots()); let module_group_f = module_group_graph.module_group(&"F".into()).unwrap(); - assert_eq!( - module_group_f.resource_pots(), - &HashSet::from(["test_custom(\"__farm_unknown\")".to_string()]) - ); + assert_sorted_iter_eq!(module_group_f.resource_pots()); let module_graph = context.module_graph.read(); // F, E, B, H let module_f = module_graph.module(&"F".into()).unwrap(); - assert_eq!( - module_f.resource_pot.as_ref().unwrap(), - "test_custom(\"__farm_unknown\")" - ); + assert_debug_snapshot!(module_f.resource_pot.as_ref().unwrap()); let module_e = module_graph.module(&"E".into()).unwrap(); - assert_eq!( - module_e.resource_pot.as_ref().unwrap(), - "B_2f5d_custom(\"__farm_unknown\")" - ); + assert_debug_snapshot!(module_e.resource_pot.as_ref().unwrap()); let module_b = module_graph.module(&"B".into()).unwrap(); - assert_eq!( - module_b.resource_pot.as_ref().unwrap(), - "B_2f5d_custom(\"__farm_unknown\")" - ); + assert_debug_snapshot!(module_b.resource_pot.as_ref().unwrap()); let module_h = module_graph.module(&"H".into()).unwrap(); - assert_eq!( - module_h.resource_pot.as_ref().unwrap(), - "test_custom(\"__farm_unknown\")" - ); + assert_debug_snapshot!(module_h.resource_pot.as_ref().unwrap()); let resource_pot_map = context.resource_pot_map.read(); println!( @@ -167,51 +136,11 @@ fn test_generate_and_diff_resource_pots() { .collect::>() ); - let resource_pot_test = resource_pot_map - .resource_pot(&"test_custom(\"__farm_unknown\")".into()) - .unwrap(); - assert_eq!(resource_pot_test.entry_module, None); - assert_eq!(resource_pot_test.modules(), vec![&"F".into(), &"H".into()]); - assert_eq!( - resource_pot_test.module_groups, - HashSet::from(["F".into(), "B".into()]) - ); - - let resource_pot_b_2f5d = resource_pot_map - .resource_pot(&"B_2f5d_custom(\"__farm_unknown\")".into()) - .unwrap(); - assert_eq!(resource_pot_b_2f5d.entry_module, Some("B".into())); - assert_eq!( - resource_pot_b_2f5d.modules(), - vec![&"B".into(), &"E".into()] - ); - assert_eq!( - resource_pot_b_2f5d.module_groups, - HashSet::from(["B".into()]) - ); + let mut resource_pots = resource_pot_map.resource_pots(); - let resource_pot_b_3f39 = resource_pot_map - .resource_pot(&"B_3f39_custom(\"__farm_unknown\")".into()) - .unwrap(); - assert_eq!(resource_pot_b_3f39.entry_module, None); - assert_eq!(resource_pot_b_3f39.modules(), vec![&"D".into()]); - assert_eq!( - resource_pot_b_3f39.module_groups, - HashSet::from(["D".into(), "B".into()]) - ); + resource_pots.sort_by(|a, b| a.id.cmp(&b.id)); - let resource_pot_a_66be = resource_pot_map - .resource_pot(&"A_66be_custom(\"__farm_unknown\")".into()) - .unwrap(); - assert_eq!(resource_pot_a_66be.entry_module, Some("A".into())); - assert_eq!( - resource_pot_a_66be.modules(), - vec![&"A".into(), &"C".into()] - ); - assert_eq!( - resource_pot_a_66be.module_groups, - HashSet::from(["A".into()]) - ); + assert_resource_pots!(resource_pots); } /// the enforce resource pot should be unchanged when only one module is changed @@ -244,10 +173,7 @@ fn test_generate_and_diff_resource_pots_one_module_changed() { ) .unwrap(); let mut module_group_graph = module_group_graph_from_entries( - &module_graph - .entries - .clone().into_keys() - .collect(), + &module_graph.entries.clone().into_keys().collect(), &mut module_graph, ); let updated_modules = vec!["I".into()]; diff --git a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_handle_enforce_resource_pots.rs b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_handle_enforce_resource_pots.rs index 3def4f420..9a143735f 100644 --- a/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_handle_enforce_resource_pots.rs +++ b/crates/compiler/src/update/regenerate_resources/generate_and_diff_resource_pots/test_handle_enforce_resource_pots.rs @@ -4,13 +4,10 @@ use std::sync::Arc; use farmfe_core::{ config::{ config_regex::ConfigRegex, partial_bundling::PartialBundlingEnforceResourceConfig, Config, - }, - context::CompilationContext, - module::{ + }, context::CompilationContext, farm_profile_function, module::{ module_graph::{ModuleGraphEdge, ModuleGraphEdgeDataItem}, Module, - }, - plugin::{Plugin, PluginHookContext, ResolveKind}, + }, plugin::{Plugin, PluginHookContext, ResolveKind} }; use farmfe_plugin_partial_bundling::module_group_graph_from_entries; use farmfe_testing_helpers::{construct_test_module_graph, construct_test_module_graph_complex}; @@ -43,10 +40,7 @@ fn test_handle_enforce_resource_pots() { let updated_modules = vec!["F".into(), "E".into(), "B".into()]; let mut module_group_graph = module_group_graph_from_entries( - &module_graph - .entries - .clone().into_keys() - .collect(), + &module_graph.entries.clone().into_keys().collect(), &mut module_graph, ); let diff_result = diff_module_graph(updated_modules.clone(), &module_graph, &update_module_graph); @@ -169,10 +163,7 @@ fn test_handle_enforce_resource_pots_one_module_changed() { ) .unwrap(); let mut module_group_graph = module_group_graph_from_entries( - &module_graph - .entries - .clone().into_keys() - .collect(), + &module_graph.entries.clone().into_keys().collect(), &mut module_graph, ); let updated_modules = vec!["I".into()]; diff --git a/crates/compiler/src/utils.rs b/crates/compiler/src/utils.rs new file mode 100644 index 000000000..2f342da7b --- /dev/null +++ b/crates/compiler/src/utils.rs @@ -0,0 +1,24 @@ +use farmfe_core::module::ModuleId; + +pub fn get_module_ids_from_compilation_errors( + errors: &[farmfe_core::error::CompilationError], +) -> Vec { + errors + .iter() + .filter_map(|e| match e { + farmfe_core::error::CompilationError::ResolveError { importer, .. } => { + Some(importer.as_str().into()) + } + farmfe_core::error::CompilationError::LoadError { resolved_path, .. } => { + Some(resolved_path.as_str().into()) + } + farmfe_core::error::CompilationError::TransformError { resolved_path, .. } => { + Some(resolved_path.as_str().into()) + } + farmfe_core::error::CompilationError::ParseError { resolved_path, .. } => { + Some(resolved_path.as_str().into()) + } + _ => None, + }) + .collect() +} diff --git a/crates/compiler/tests/tree_shake.rs b/crates/compiler/tests/tree_shake.rs index 296edfcbd..7bf338648 100644 --- a/crates/compiler/tests/tree_shake.rs +++ b/crates/compiler/tests/tree_shake.rs @@ -125,6 +125,7 @@ fn tree_shake_changed_ast() { Default::default(), Default::default(), None as Option, + unresolved_mark, top_level_mark, )); ast.visit_mut_with(&mut react::( diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index 99c8b4744..0965f9b12 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -18,6 +18,7 @@ farmfe_macro_cache_item = { version = "0.1.3", path = "../macro_cache_item" } farmfe_utils = { version = "0.1.5", path = "../utils" } serde = { version = "1.0", features = ["derive", "rc"] } serde_json = { version = "1.0", features = ["preserve_order"] } +serde_regex = "1.1.0" parking_lot = { version = "0.12", features = ["deadlock_detection"] } relative-path = "1.7" dashmap = "5.0" @@ -30,31 +31,30 @@ ptr_meta = "0.1.4" thiserror = "1.0" rayon = "1.5" petgraph = "0.6" -bytecheck = "0.7.0" downcast-rs = "1.2" wax = { version = "0.6", default-features = false, features = [ "miette", "walk", ] } globset = { version = "0.4.14" } -swc_ecma_ast = { version = "0.115.1", features = ["rkyv-impl", "serde-impl"] } -swc_ecma_parser = { version = "0.146.12" } -swc_common = { version = "0.34.4", features = [ +swc_ecma_ast = { version = "1.0.0", features = ["rkyv-impl", "serde-impl"] } +swc_ecma_parser = { version = "1.0.1" } +swc_common = { version = "1.0.0", features = [ "concurrent", "sourcemap", "rkyv-impl", ] } -swc_css_ast = { version = "0.141.0", features = ["rkyv-impl"] } -swc_css_prefixer = { version = "0.155.0" } -swc_html_ast = { version = "0.34.0", features = ["rkyv-impl"] } -heck = "0.4.1" -puffin = { version = "0.18.0", features = [ +swc_css_ast = { version = "1.0.0", features = ["rkyv-impl"] } +swc_css_prefixer = { version = "1.0.0" } +swc_html_ast = { version = "1.0.0", features = ["rkyv-impl"] } +heck = "0.5.0" +puffin = { version = "0.19.1", features = [ "packing", "lz4", "serialization", ], optional = true } regex = "1.7.3" -enhanced-magic-string = { version = "0.0.15" } +enhanced-magic-string = { version = "0.1.0" } [features] profile = ["dep:puffin"] diff --git a/crates/core/src/cache/cache_store.rs b/crates/core/src/cache/cache_store.rs index d8d2e6634..74c409aa1 100644 --- a/crates/core/src/cache/cache_store.rs +++ b/crates/core/src/cache/cache_store.rs @@ -9,7 +9,7 @@ use std::{ use crate::config::Mode; -const FARM_CACHE_VERSION: &str = "0.4.9"; +const FARM_CACHE_VERSION: &str = "0.5.0"; const FARM_CACHE_MANIFEST_FILE: &str = "farm-cache.json"; // TODO make CacheStore a trait and implement DiskCacheStore or RemoteCacheStore or more. diff --git a/crates/core/src/config/css.rs b/crates/core/src/config/css.rs index e6381ef5f..6ea8299bb 100644 --- a/crates/core/src/config/css.rs +++ b/crates/core/src/config/css.rs @@ -1,6 +1,5 @@ use heck::{ToLowerCamelCase, ToSnakeCase, ToUpperCamelCase}; use serde::{Deserialize, Serialize}; - #[derive(Debug, Clone, Serialize, Deserialize, Default)] pub enum NameConversion { /// @@ -24,7 +23,6 @@ pub enum NameConversion { /// ``` #[serde(rename = "upperCamel")] UpperCamel, - /// ```md /// "We carry a new world here, in our hearts." /// // => @@ -33,7 +31,6 @@ pub enum NameConversion { #[serde(rename = "snake")] Snake, } - impl NameConversion { pub fn transform(&self, name: &str) -> String { match self { diff --git a/crates/core/src/config/custom.rs b/crates/core/src/config/custom.rs index 5c002baf2..14756723c 100644 --- a/crates/core/src/config/custom.rs +++ b/crates/core/src/config/custom.rs @@ -16,6 +16,8 @@ const CUSTOM_CONFIG_RUNTIME_ISOLATE: &str = "runtime.isolate"; pub const CUSTOM_CONFIG_EXTERNAL_RECORD: &str = "external.record"; pub const CUSTOM_CONFIG_RESOLVE_DEDUPE: &str = "resolve.dedupe"; pub const CUSTOM_CONFIG_CSS_MODULES_LOCAL_CONVERSION: &str = "css.modules.locals_conversion"; +pub const CUSTOM_CONFIG_PARTIAL_BUNDLING_GROUPS_ENFORCE_MAP: &str = + "partial_bundling.groups.enforce"; pub const CUSTOM_CONFIG_ASSETS_MODE: &str = "assets.mode"; pub fn get_config_runtime_isolate(context: &Arc) -> bool { diff --git a/crates/core/src/config/mod.rs b/crates/core/src/config/mod.rs index cfaa05cfe..a12498eeb 100644 --- a/crates/core/src/config/mod.rs +++ b/crates/core/src/config/mod.rs @@ -1,6 +1,6 @@ -use std::collections::HashMap; - +use regex::Regex; use serde::{Deserialize, Serialize}; +use std::collections::HashMap; use swc_css_prefixer::options::Targets; use swc_ecma_parser::{EsSyntax as EsConfig, TsSyntax as TsConfig}; @@ -38,6 +38,25 @@ use asset::AssetsConfig; pub use output::*; +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AliasItem { + // TODO keep hashmap for compatibility simple alias to string & string hashmap + // Simple(String), + Complex { + find: StringOrRegex, + replacement: String, + }, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum StringOrRegex { + String(String), + #[serde(with = "serde_regex")] + Regex(Regex), +} + #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase", default)] pub struct Config { @@ -223,10 +242,59 @@ pub struct ScriptParserConfig { pub ts_config: TsConfig, } +#[derive(Debug, Serialize, Deserialize, Clone)] +#[serde(untagged)] +pub enum AliasConfig { + // TODO keep hashmap for compatibility + Map(HashMap), + Array(Vec), +} + +impl AliasConfig { + pub fn insert(&mut self, key: String, value: String) { + match self { + AliasConfig::Map(map) => { + map.insert(key, value); + } + AliasConfig::Array(array) => { + array.push(AliasItem::Complex { + find: StringOrRegex::String(key), + replacement: value, + }); + } + } + } +} + +impl Default for AliasConfig { + fn default() -> Self { + AliasConfig::Map(HashMap::new()) + } +} + +impl ResolveConfig { + pub fn format_alias(&mut self, alias_config: AliasConfig) { + match alias_config { + AliasConfig::Map(map) => { + self.alias = map + .into_iter() + .map(|(find, replacement)| AliasItem::Complex { + find: StringOrRegex::String(find), + replacement, + }) + .collect(); + } + AliasConfig::Array(array) => { + self.alias = array; + } + } + } +} + #[derive(Debug, Serialize, Deserialize, Clone)] #[serde(rename_all = "camelCase", default)] pub struct ResolveConfig { - pub alias: HashMap, + pub alias: Vec, pub main_fields: Vec, pub main_files: Vec, pub extensions: Vec, @@ -239,7 +307,7 @@ pub struct ResolveConfig { impl Default for ResolveConfig { fn default() -> Self { Self { - alias: HashMap::new(), + alias: vec![], main_fields: vec![ String::from("browser"), String::from("module"), diff --git a/crates/core/src/config/persistent_cache.rs b/crates/core/src/config/persistent_cache.rs index 331e34939..003642169 100644 --- a/crates/core/src/config/persistent_cache.rs +++ b/crates/core/src/config/persistent_cache.rs @@ -3,6 +3,7 @@ use std::{collections::HashMap, path::PathBuf}; use farmfe_utils::hash::sha256; use relative_path::RelativePath; use serde::{Deserialize, Serialize}; +use serde_json::Value; #[derive(Debug, Serialize, Deserialize, Clone)] #[serde(untagged)] @@ -76,11 +77,14 @@ impl PersistentCacheConfig { .clone_from(&default_config.as_raw_object().cache_dir); } - let mut envs = cloned_obj.envs.iter().collect::>(); - envs.sort(); - let config_str = envs + let mut keys: Vec<_> = cloned_obj.envs.keys().collect(); + keys.sort(); + let config_str = keys .into_iter() - .map(|(k, v)| format!("{k}={v}")) + .map(|k| { + let v = cloned_obj.envs.get(k).unwrap(); + format!("{k}={v}") + }) .collect::>() .join("&"); let config_hash = sha256(config_str.as_bytes(), 32); @@ -138,7 +142,7 @@ pub struct PersistentCacheConfigObj { /// It's absolute paths of farm.config by default. Farm will use their timestamp and hash to invalidate cache. /// Note that farm will resolve the config file dependencies from node side pub build_dependencies: Vec, - pub envs: HashMap, + pub envs: HashMap, } #[derive(Debug, Serialize, Deserialize, Clone)] diff --git a/crates/core/src/error/mod.rs b/crates/core/src/error/mod.rs index 1aeecc01e..fd57fd357 100644 --- a/crates/core/src/error/mod.rs +++ b/crates/core/src/error/mod.rs @@ -1,36 +1,53 @@ use std::{error::Error, sync::LockResult}; +use serde::Serialize; +use serde_json::json; use thiserror::Error; use crate::resource::resource_pot::ResourcePotType; -#[derive(Debug, Error)] +#[derive(Debug, Error, Serialize)] +#[serde(tag = "type", rename_all = "snake_case")] pub enum CompilationError { - #[error("Can not resolve `{src}` from {importer}.\nOriginal error: {source:?}.\n\nPotential Causes:\n1.The file that `{src}` points to does not exist.\n2.Install it first if `{src}` is an dependency from node_modules, if you are using pnpm refer to [https://pnpm.io/faq#pnpm-does-not-work-with-your-project-here] for solutions.\n3. If `{src}` is a alias, make sure your alias config is correct.\n")] + // #[error("Can not resolve `{src}` from {importer}.\nOriginal error: {source:?}.\n\nPotential Causes:\n1.The file that `{src}` points to does not exist.\n2.Install it first if `{src}` is an dependency from node_modules, if you are using pnpm refer to [https://pnpm.io/faq#pnpm-does-not-work-with-your-project-here] for solutions.\n3. If `{src}` is a alias, make sure your alias config is correct.\n")] + #[error("{}", serde_json::to_string(&serialize_resolve_error(src, importer, source)) + .map_err(|_| "Failed to serialize resolve error type message".to_string()) + .unwrap_or_else(|e| e))] ResolveError { importer: String, src: String, #[source] + #[serde(skip)] source: Option>, }, // TODO, give the specific recommended plugin of this kind of module + // TODO add potential causes #[error("Can not load `{resolved_path}`. Original error: \n{source:?}.\n\nPotential Causes:\n1.This kind of module is not supported, you may need plugins to support it.\n")] LoadError { resolved_path: String, #[source] + #[serde(skip)] source: Option>, }, - #[error("Transform `{resolved_path}` failed.\nError: {msg}")] + // #[error("Transform `{resolved_path}` failed.\n {msg}")] + #[error("{}", serde_json::to_string(&serialize_transform_error(resolved_path, msg)) + .map_err(|_| "Failed to serialize transform error type message".to_string()) + .unwrap_or_else(|e| e))] TransformError { resolved_path: String, msg: String }, + // TODO, give the specific recommended plugin of this kind of module - #[error("Parse `{resolved_path}` failed.\n Error: {msg}\nPotential Causes:\n1.The module have syntax error.\n2.This kind of module is not supported, you may need plugins to support it\n")] + // #[error("Parse `{resolved_path}` failed.\n {msg}\nPotential Causes:\n1.The module have syntax error.\n2.This kind of module is not supported, you may need plugins to support it\n")] + #[error("{}", serde_json::to_string(&serialize_parse_error(resolved_path, msg)) + .map_err(|_| "Failed to serialize parse error type message".to_string()) + .unwrap_or_else(|e| e))] ParseError { resolved_path: String, msg: String }, #[error("Hook `process_module` execute failed for module `{resolved_path}`.\nOriginal error: {source:?}.")] ProcessModuleError { resolved_path: String, #[source] + #[serde(skip)] source: Option>, }, @@ -40,6 +57,7 @@ pub enum CompilationError { AnalyzeDepsError { resolved_path: String, #[source] + #[serde(skip)] source: Option>, }, @@ -53,6 +71,7 @@ pub enum CompilationError { #[error("Hook `analyze_module_graph` execute failed.\nOriginal error: {source:?}.\n")] AnalyzeModuleGraphError { #[source] + #[serde(skip)] source: Option>, }, @@ -64,6 +83,7 @@ pub enum CompilationError { name: String, ty: ResourcePotType, #[source] + #[serde(skip)] source: Option>, }, @@ -80,6 +100,7 @@ pub enum CompilationError { RenderScriptModuleError { id: String, #[source] + #[serde(skip)] source: Option>, }, @@ -91,6 +112,61 @@ pub enum CompilationError { }, } +fn serialize_resolve_error( + src: &str, + importer: &str, + source: &Option>, +) -> serde_json::Value { + let mut msg = format!("Can not resolve `{}` from `{}`.", src, importer); + if let Some(source) = source { + msg.push_str(&format!("\nOriginal error: {}.", source)); + } + + let cause = format!( + "Potential Causes:\n\ + 1. The file that `{}` points to does not exist.\n\ + 2. Install it first if `{}` is a dependency from node_modules. If you are using pnpm, refer to [https://pnpm.io/faq#pnpm-does-not-work-with-your-project-here] for solutions.\n\ + 3. If `{}` is an alias, make sure your alias config is correct.", + src, src, src + ); + + let full_message = format!("{}\n{}", msg, cause); + + json!({ + "id": importer, + "type": "Resolve Error", + "errorFrame": msg, + "message": full_message, + "cause": cause + }) +} + +fn serialize_parse_error(resolved_path: &str, msg: &str) -> serde_json::Value { + if let Ok(parsed) = serde_json::from_str::(msg) { + return parsed; + } + json!({ + "id": resolved_path, + "errorFrame": msg, + "type": "Parse Error", + "cause": "Potential Causes:\n1.The module have syntax error.\n2.This kind of module is not supported, you may need plugins to support it.\n", + "message": format!("Parse `{}` failed.\n {}", resolved_path, msg) + }) +} + +fn serialize_transform_error(resolved_path: &str, msg: &str) -> serde_json::Value { + if let Ok(parsed) = serde_json::from_str::(msg) { + return parsed; + } + json!({ + "type": "Transform Error", + "id": resolved_path, + "errorFrame": msg, + "cause": "Potential Causes:\n1.This kind of module is not supported, you may need plugins to support it.\n", + "message": format!("Transform `{}` failed.\n {}", resolved_path, msg) + }) +} + pub type Result = core::result::Result; pub trait ToResolveError diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs index 2178213ff..9d7dfa5b2 100644 --- a/crates/core/src/lib.rs +++ b/crates/core/src/lib.rs @@ -24,6 +24,7 @@ pub const VERSION: &str = "0.5.0"; // re-export common external crates pub use dashmap; pub use enhanced_magic_string; +pub use heck; pub use parking_lot; pub use petgraph; #[cfg(feature = "profile")] @@ -42,7 +43,6 @@ pub use swc_ecma_ast; pub use swc_ecma_parser; pub use swc_html_ast; pub use wax; -pub use heck; #[macro_export] macro_rules! farm_profile_scope { diff --git a/crates/core/src/resource/resource_pot.rs b/crates/core/src/resource/resource_pot.rs index cad63812d..abc101a6b 100644 --- a/crates/core/src/resource/resource_pot.rs +++ b/crates/core/src/resource/resource_pot.rs @@ -61,6 +61,11 @@ impl ResourcePot { format!("{}_{}", name, ty.to_string()) } + pub fn set_resource_pot_id(&mut self, id: String) { + self.id.clone_from(&id); + self.info.id = id; + } + pub fn add_module(&mut self, module_id: ModuleId) { self.modules.insert(module_id); } diff --git a/crates/create-farm-rs/src/package_manager.rs b/crates/create-farm-rs/src/package_manager.rs index 7ce509950..b91e85982 100644 --- a/crates/create-farm-rs/src/package_manager.rs +++ b/crates/create-farm-rs/src/package_manager.rs @@ -72,7 +72,7 @@ impl PackageManager { Template::Preact, Template::Nestjs, Template::Tauri(None), - Template::Electron(None) + Template::Electron(None), ], } } diff --git a/crates/create-farm-rs/src/utils/colors.rs b/crates/create-farm-rs/src/utils/colors.rs index 88e690dd4..6f6f5a375 100644 --- a/crates/create-farm-rs/src/utils/colors.rs +++ b/crates/create-farm-rs/src/utils/colors.rs @@ -40,7 +40,11 @@ pub fn is_color_enabled() -> bool { true } -pub fn create_formatter<'a>(open: &'a str, close: &'a str, replace: Option<&'a str>) -> impl Fn(&'a str) -> String + 'a { +pub fn create_formatter<'a>( + open: &'a str, + close: &'a str, + replace: Option<&'a str>, +) -> impl Fn(&'a str) -> String + 'a { move |input| { let string = input.to_string(); let index = string.find(close).unwrap_or(open.len()); diff --git a/crates/create-farm-rs/src/utils/prompts.rs b/crates/create-farm-rs/src/utils/prompts.rs index ec1a726de..5ca5f34f1 100644 --- a/crates/create-farm-rs/src/utils/prompts.rs +++ b/crates/create-farm-rs/src/utils/prompts.rs @@ -25,11 +25,7 @@ pub(crate) fn select<'t, T: Displayable>( Ok(items.get(selected)) } -pub(crate) fn input( - prompt: &str, - default: Option<&str>, - allow_empty: bool, -) -> Result { +pub(crate) fn input(prompt: &str, default: Option<&str>, allow_empty: bool) -> Result { let theme = ColorfulTheme::default(); let mut builder = dialoguer::Input::with_theme(&theme) .with_prompt(prompt) diff --git a/crates/node/src/plugin_adapters/js_plugin_adapter/mod.rs b/crates/node/src/plugin_adapters/js_plugin_adapter/mod.rs index 9dc092bd4..c7a802747 100644 --- a/crates/node/src/plugin_adapters/js_plugin_adapter/mod.rs +++ b/crates/node/src/plugin_adapters/js_plugin_adapter/mod.rs @@ -398,9 +398,7 @@ impl Plugin for JsPluginAdapter { pub fn get_named_property(env: &Env, obj: &JsObject, field: &str) -> Result { if obj.has_named_property(field).map_err(|e| { - CompilationError::NAPIError(format!( - "Get field {field} of config object failed. {e:?}" - )) + CompilationError::NAPIError(format!("Get field {field} of config object failed. {e:?}")) })? { unsafe { T::from_napi_value( @@ -408,9 +406,7 @@ pub fn get_named_property(env: &Env, obj: &JsObject, field: &s obj .get_named_property::(field) .map_err(|e| { - CompilationError::NAPIError(format!( - "Get field {field} of config object failed. {e:?}" - )) + CompilationError::NAPIError(format!("Get field {field} of config object failed. {e:?}")) })? .raw(), ) diff --git a/crates/node/src/plugin_adapters/rust_plugin_adapter/plugin_loader.rs b/crates/node/src/plugin_adapters/rust_plugin_adapter/plugin_loader.rs index c4e00a0b3..f27d0f586 100644 --- a/crates/node/src/plugin_adapters/rust_plugin_adapter/plugin_loader.rs +++ b/crates/node/src/plugin_adapters/rust_plugin_adapter/plugin_loader.rs @@ -28,7 +28,7 @@ Please upgrade or downgrade the plugin or @farmfe/core to make the versions matc plugin core 0.4 -> @farmfe/core < 1.3.0 plugin core 0.5 -> @farmfe/core >= 1.3.0 -If you are plugin author, please build your plugin with rust toolchain `nightly-2024-04-16`\n", +If you are plugin author, please build your plugin with rust toolchain `nightly-2024-10-07`\n", VERSION, core_version, filename ); } diff --git a/crates/plugin_bundle/src/resource_pot_to_bundle/bundle/mod.rs b/crates/plugin_bundle/src/resource_pot_to_bundle/bundle/mod.rs index 3dd381e5a..165a687df 100644 --- a/crates/plugin_bundle/src/resource_pot_to_bundle/bundle/mod.rs +++ b/crates/plugin_bundle/src/resource_pot_to_bundle/bundle/mod.rs @@ -13,7 +13,7 @@ use farmfe_core::{ module::{module_graph::ModuleGraph, ModuleId, ModuleSystem}, plugin::ResolveKind, rayon::iter::{IntoParallelIterator, ParallelIterator}, - swc_common::{util::take::Take, DUMMY_SP}, + swc_common::{util::take::Take, SyntaxContext, DUMMY_SP}, swc_ecma_ast::{ self, BindingIdent, CallExpr, ClassDecl, Decl, EmptyStmt, Expr, ExprStmt, FnDecl, Ident, Module, ModuleDecl, ModuleItem, Stmt, VarDecl, VarDeclarator, @@ -606,6 +606,7 @@ impl<'a> ModuleAnalyzerManager<'a> { init: Some(export_default_decl.expr), definite: false, }], + ctxt: SyntaxContext::empty() })))); }, _ => {} @@ -623,7 +624,7 @@ impl<'a> ModuleAnalyzerManager<'a> { if !commonjs_import_executed.contains(source) { ast.body[*index] = ModuleItem::Stmt(Stmt::Expr( ExprStmt { span: DUMMY_SP, expr: Box::new(Expr::Call( - CallExpr { span: DUMMY_SP, callee: swc_ecma_ast::Callee::Expr(Box::new(Expr::Ident(bundle_variable.name(self.module_global_uniq_name.commonjs_name(source).unwrap()).as_str().into()))), args: vec![], type_args: None } + CallExpr { span: DUMMY_SP, callee: swc_ecma_ast::Callee::Expr(Box::new(Expr::Ident(bundle_variable.name(self.module_global_uniq_name.commonjs_name(source).unwrap()).as_str().into()))), args: vec![], type_args: None, ctxt: SyntaxContext::empty() } )) } )); commonjs_import_executed.insert(source.clone()); @@ -721,7 +722,7 @@ impl<'a> ModuleAnalyzerManager<'a> { bundle_variable, &context.config, polyfill, - external_config + external_config, ) } diff --git a/crates/plugin_bundle/src/resource_pot_to_bundle/defined_idents_collector.rs b/crates/plugin_bundle/src/resource_pot_to_bundle/defined_idents_collector.rs index 3f541885e..b9198a43c 100644 --- a/crates/plugin_bundle/src/resource_pot_to_bundle/defined_idents_collector.rs +++ b/crates/plugin_bundle/src/resource_pot_to_bundle/defined_idents_collector.rs @@ -3,7 +3,9 @@ use std::collections::{HashMap, HashSet}; use farmfe_core::{ swc_common::DUMMY_SP, swc_ecma_ast::{ - AssignExpr, AssignOp, AssignTarget, BindingIdent, Expr, Id, KeyValuePatProp, KeyValueProp, MemberProp, ObjectPat, ObjectPatProp, Pat, Prop, PropName, PropOrSpread, SimpleAssignTarget + AssignExpr, AssignOp, AssignTarget, BindingIdent, Expr, Id, IdentName, KeyValuePatProp, + KeyValueProp, MemberProp, ObjectPat, ObjectPatProp, Pat, Prop, PropName, PropOrSpread, + SimpleAssignTarget, }, }; use farmfe_toolkit::{ @@ -98,10 +100,9 @@ impl<'a> VisitMut for RenameIdent<'a> { Prop::Shorthand(m) => { if let Some(new_name) = self.rename(m) { *n = Prop::KeyValue(farmfe_core::swc_ecma_ast::KeyValueProp { - key: farmfe_core::swc_ecma_ast::PropName::Ident(Ident { + key: farmfe_core::swc_ecma_ast::PropName::Ident(IdentName { span: DUMMY_SP, sym: m.sym.as_str().into(), - optional: false, }), value: Box::new(farmfe_core::swc_ecma_ast::Expr::Ident( new_name.as_str().into(), @@ -123,10 +124,9 @@ impl<'a> VisitMut for RenameIdent<'a> { Prop::Shorthand(ident) => { if let Some(new_name) = self.rename(ident) { *p = Prop::KeyValue(KeyValueProp { - key: farmfe_core::swc_ecma_ast::PropName::Ident(Ident { + key: farmfe_core::swc_ecma_ast::PropName::Ident(IdentName { span: DUMMY_SP, sym: ident.sym.as_str().into(), - optional: false, }), value: Box::new(farmfe_core::swc_ecma_ast::Expr::Ident( new_name.as_str().into(), diff --git a/crates/plugin_bundle/src/resource_pot_to_bundle/modules_analyzer/analyze.rs b/crates/plugin_bundle/src/resource_pot_to_bundle/modules_analyzer/analyze.rs index 56bd5616b..49b33e64a 100644 --- a/crates/plugin_bundle/src/resource_pot_to_bundle/modules_analyzer/analyze.rs +++ b/crates/plugin_bundle/src/resource_pot_to_bundle/modules_analyzer/analyze.rs @@ -6,8 +6,8 @@ use farmfe_core::{ module::{module_graph::ModuleGraph, ModuleId}, swc_common::Mark, swc_ecma_ast::{ - self, DefaultDecl, ExportDecl, Expr, Ident, ImportSpecifier, ModuleDecl, - ModuleExportName, ModuleItem, + self, DefaultDecl, ExportDecl, Expr, Ident, ImportSpecifier, ModuleDecl, ModuleExportName, + ModuleItem, }, }; use farmfe_toolkit::swc_ecma_visit::{Visit, VisitWith}; @@ -35,8 +35,7 @@ impl CollectUnresolvedIdent { impl Visit for CollectUnresolvedIdent { fn visit_ident(&mut self, n: &Ident) { - if n.span.ctxt.outer() == self.unresolved_mark || self.unresolved_ident.contains(n.sym.as_str()) - { + if n.ctxt.outer() == self.unresolved_mark || self.unresolved_ident.contains(n.sym.as_str()) { self.unresolved_ident.insert(n.sym.to_string()); } } @@ -114,10 +113,7 @@ impl<'a> AnalyzeModuleItem<'a> { } fn register_var(&mut self, ident: &Ident, strict: bool) -> usize { - self._register_var.as_mut()( - ident, - strict || ident.span.ctxt.outer() != self.top_level_mark, - ) + self._register_var.as_mut()(ident, strict || ident.ctxt.outer() != self.top_level_mark) } } diff --git a/crates/plugin_bundle/src/resource_pot_to_bundle/polyfill/cjs.rs b/crates/plugin_bundle/src/resource_pot_to_bundle/polyfill/cjs.rs index b57fce6f0..d400009b6 100644 --- a/crates/plugin_bundle/src/resource_pot_to_bundle/polyfill/cjs.rs +++ b/crates/plugin_bundle/src/resource_pot_to_bundle/polyfill/cjs.rs @@ -1,5 +1,5 @@ use farmfe_core::{ - swc_common::DUMMY_SP, + swc_common::{SyntaxContext, DUMMY_SP}, swc_ecma_ast::{CallExpr, Callee, Expr, ExprOrSpread}, }; @@ -14,6 +14,7 @@ pub fn wrap_require_default(expr: Box, polyfill: &mut SimplePolyfill) -> B ))), args: vec![farmfe_core::swc_ecma_ast::ExprOrSpread { spread: None, expr }], type_args: None, + ctxt: SyntaxContext::empty(), })) } @@ -26,6 +27,7 @@ pub fn wrap_require_wildcard(expr: Box, polyfill: &mut SimplePolyfill) -> ))), args: vec![farmfe_core::swc_ecma_ast::ExprOrSpread { spread: None, expr }], type_args: None, + ctxt: SyntaxContext::empty(), })) } @@ -36,6 +38,7 @@ pub fn wrap_export_star(args: Vec, polyfill: &mut SimplePolyfill) callee: Callee::Expr(Box::new(Expr::Ident("_export_star".into()))), args, type_args: None, + ctxt: SyntaxContext::empty(), })) } @@ -46,5 +49,6 @@ pub fn wrap_commonjs(args: Vec, polyfill: &mut SimplePolyfill) -> callee: Callee::Expr(Box::new(Expr::Ident(("__commonJs").into()))), args, type_args: None, + ctxt: SyntaxContext::empty(), })) } diff --git a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/generate.rs b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/generate.rs index 98b9f1f76..037990f51 100644 --- a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/generate.rs +++ b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/generate.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use farmfe_core::{ error::Result, module::{ModuleId, ModuleSystem}, - swc_common::DUMMY_SP, + swc_common::{SyntaxContext, DUMMY_SP}, swc_ecma_ast::{ AssignExpr, AssignOp, AssignTarget, BindingIdent, CallExpr, Callee, Decl, Expr, ExprOrSpread, ExprStmt, KeyValueProp, Lit, MemberExpr, MemberProp, ModuleItem, ObjectLit, Pat, Prop, @@ -164,6 +164,7 @@ impl CjsGenerate { }, ], type_args: None, + ctxt: SyntaxContext::empty(), })), }))); } @@ -258,11 +259,13 @@ impl CjsGenerate { expr: Box::new(Expr::Lit(Lit::Str(module_id.to_string().as_str().into()))), }], type_args: None, + ctxt: SyntaxContext::empty(), })), polyfill, )), definite: false, }], + ctxt: SyntaxContext::empty(), }))))); let mut decls: Vec = vec![]; @@ -310,6 +313,7 @@ impl CjsGenerate { kind: VarDeclKind::Var, declare: false, decls, + ctxt: SyntaxContext::empty(), }))))); } } diff --git a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/mod.rs b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/mod.rs index e4faaefcb..fa4a9cbda 100644 --- a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/mod.rs +++ b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use farmfe_core::{ farm_profile_function, module::{module_graph::ModuleGraph, ModuleId}, - swc_common::{Mark, DUMMY_SP}, + swc_common::{Mark, SyntaxContext, DUMMY_SP}, swc_ecma_ast::{ self, BindingIdent, CallExpr, ComputedPropName, Expr, ExprOrSpread, ExprStmt, Ident, Lit, MemberExpr, MemberProp, Module as EcmaAstModule, ModuleItem, Pat, Stmt, VarDecl, VarDeclarator, @@ -129,6 +129,7 @@ impl CjsModuleAnalyzer { callee: swc_ecma_ast::Callee::Expr(Box::new(Expr::Ident(cjs_name.as_str().into()))), args: vec![], type_args: None, + ctxt: SyntaxContext::empty(), }; if reference_import.is_empty() { @@ -209,6 +210,7 @@ impl CjsModuleAnalyzer { kind: swc_ecma_ast::VarDeclKind::Var, declare: false, decls, + ctxt: SyntaxContext::empty(), }), )))); } diff --git a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/patch.rs b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/patch.rs index ac4f82c4e..2e7bf54b9 100644 --- a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/patch.rs +++ b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/patch.rs @@ -5,7 +5,7 @@ use farmfe_core::{ context::CompilationContext, error::Result, module::{module_graph::ModuleGraph, ModuleId, ModuleSystem}, - swc_common::{comments::SingleThreadedComments, util::take::Take, Mark, DUMMY_SP}, + swc_common::{util::take::Take, Mark, SyntaxContext, DUMMY_SP}, swc_ecma_ast::{ ArrowExpr, BindingIdent, BlockStmt, BlockStmtOrExpr, Decl, EsVersion, Expr, ExprOrSpread, Ident, KeyValueProp, Module as EcmaAstModule, ModuleItem, ObjectLit, Pat, Prop, PropName, @@ -70,11 +70,13 @@ impl CjsPatch { ModuleItem::Stmt(stmt) => stmt, }) .collect(), + ctxt: SyntaxContext::empty(), })), is_async: false, is_generator: false, type_params: None, return_type: None, + ctxt: SyntaxContext::empty(), })); patch_ast_items.push(ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl { @@ -105,6 +107,7 @@ impl CjsPatch { )), definite: false, }], + ctxt: SyntaxContext::empty(), }))))); Ok(patch_ast_items) @@ -117,13 +120,14 @@ impl CjsPatch { unresolved_mark: Mark, es_version: EsVersion, ) { - let module = module_graph.module(module_id).unwrap(); + // let module = module_graph.module(module_id).unwrap(); - let comments = module.meta.as_script().comments.clone().into(); + // let comments = module.meta.as_script().comments.clone().into(); ast.visit_mut_with(&mut import_analyzer(ImportInterop::Swc, true)); - ast.visit_mut_with(&mut common_js::<&SingleThreadedComments>( + ast.visit_mut_with(&mut common_js( + Default::default(), unresolved_mark, SwcConfig { ignore_dynamic: true, @@ -131,7 +135,7 @@ impl CjsPatch { ..Default::default() }, enable_available_feature_from_es_version(es_version), - Some(&comments), + // Some(&comments), )); } @@ -213,7 +217,7 @@ impl CjsPatch { bundle_variable, config, polyfill, - external_config + external_config, }; ast.visit_mut_with(&mut replacer); diff --git a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/util.rs b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/util.rs index 839dce33d..7443be676 100644 --- a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/util.rs +++ b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/cjs/util.rs @@ -1,7 +1,7 @@ use farmfe_core::{ config::{external::ExternalConfig, Config, ModuleFormat}, module::{module_graph::ModuleGraph, ModuleId}, - swc_common::{Mark, DUMMY_SP}, + swc_common::{Mark, SyntaxContext, DUMMY_SP}, swc_ecma_ast::{CallExpr, Callee, Expr, ExprOrSpread, Lit, MemberExpr, MemberProp}, }; use farmfe_toolkit::{ @@ -127,6 +127,7 @@ impl<'a> VisitMut for CJSReplace<'a> { ))), args: vec![], type_args: None, + ctxt: SyntaxContext::empty(), }; replaced = ReplaceType::Call; } else if let Some(ns) = self.module_global_uniq_name.namespace_name(&id) { diff --git a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/dynamic_import.rs b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/dynamic_import.rs index f6fc37768..9b79d5921 100644 --- a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/dynamic_import.rs +++ b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/dynamic_import.rs @@ -1,6 +1,6 @@ use farmfe_core::{ module::ModuleId, - swc_common::DUMMY_SP, + swc_common::{SyntaxContext, DUMMY_SP}, swc_ecma_ast::{CallExpr, Callee, Expr, ExprOrSpread, Ident, Lit, MemberExpr, MemberProp}, }; use farmfe_toolkit::swc_ecma_visit::{VisitMut, VisitMutWith}; @@ -113,12 +113,14 @@ impl<'a> ReplaceDynamicVisit<'a> { callee: Callee::Expr(expr), args: vec![], type_args: None, + ctxt: SyntaxContext::empty(), })) } else { expr }, }], type_args: None, + ctxt: SyntaxContext::empty(), }))); } else { // other bundle diff --git a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/esm/mod.rs b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/esm/mod.rs index 118c66d72..57e6a9d22 100644 --- a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/esm/mod.rs +++ b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/esm/mod.rs @@ -1 +1 @@ -pub mod generate; \ No newline at end of file +pub mod generate; diff --git a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/generate.rs b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/generate.rs index d60016879..d8c94b355 100644 --- a/crates/plugin_bundle/src/resource_pot_to_bundle/targets/generate.rs +++ b/crates/plugin_bundle/src/resource_pot_to_bundle/targets/generate.rs @@ -5,11 +5,11 @@ use farmfe_core::{ context::CompilationContext, error::Result, module::{ModuleId, ModuleSystem}, - swc_common::DUMMY_SP, + swc_common::{SyntaxContext, DUMMY_SP}, swc_ecma_ast::{ - self, ArrayLit, BindingIdent, Bool, CallExpr, Decl, Expr, ExprOrSpread, Ident, KeyValueProp, - ModuleItem, ObjectLit, Pat, Prop, PropName, PropOrSpread, Stmt, Str, VarDecl, VarDeclKind, - VarDeclarator, + self, ArrayLit, BindingIdent, Bool, CallExpr, Decl, Expr, ExprOrSpread, Ident, IdentName, + KeyValueProp, ModuleItem, ObjectLit, Pat, Prop, PropName, PropOrSpread, Stmt, Str, VarDecl, + VarDeclKind, VarDeclarator, }, }; @@ -96,7 +96,7 @@ pub fn generate_namespace_by_reference_map( if module_analyzer_manager.is_hybrid_or_esm(module_id) { props.push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { - key: PropName::Ident(Ident::from("__esModule")), + key: PropName::Ident(IdentName::from("__esModule")), value: Box::new(Expr::Lit(swc_ecma_ast::Lit::Bool(Bool { span: DUMMY_SP, value: true, @@ -142,6 +142,7 @@ pub fn generate_namespace_by_reference_map( callee: swc_ecma_ast::Callee::Expr(Box::new(Expr::Ident(ident))), args: vec![], type_args: None, + ctxt: SyntaxContext::empty(), })), }) }) @@ -156,6 +157,7 @@ pub fn generate_namespace_by_reference_map( }, ], type_args: None, + ctxt: SyntaxContext::empty(), }))) }; @@ -166,12 +168,13 @@ pub fn generate_namespace_by_reference_map( decls: vec![VarDeclarator { span: DUMMY_SP, name: Pat::Ident(BindingIdent { - id: Ident::new(namespace.as_str().into(), DUMMY_SP), + id: Ident::new(namespace.as_str().into(), DUMMY_SP, SyntaxContext::empty()), type_ann: None, }), init: declare_init, definite: false, }], + ctxt: SyntaxContext::empty(), }))))); Ok(patch_ast_items) } diff --git a/crates/plugin_bundle/src/resource_pot_to_bundle/uniq_name.rs b/crates/plugin_bundle/src/resource_pot_to_bundle/uniq_name.rs index c30b80251..0bd4c3923 100644 --- a/crates/plugin_bundle/src/resource_pot_to_bundle/uniq_name.rs +++ b/crates/plugin_bundle/src/resource_pot_to_bundle/uniq_name.rs @@ -10,11 +10,12 @@ use std::{ }; use farmfe_core::{ - farm_profile_function, farm_profile_scope, + farm_profile_scope, module::{ModuleId, ModuleSystem}, resource::resource_pot::ResourcePotId, swc_ecma_ast::Ident, }; +use farmfe_toolkit::fs::normalize_file_name_as_variable; use super::{ bundle::{bundle_external::ReferenceKind, ModuleAnalyzerManager}, @@ -81,51 +82,6 @@ pub struct BundleVariable { pub used_names: HashSet, } -pub fn is_valid_char(ch: char) -> bool { - ch.is_ascii_digit() || is_valid_first_char(ch) -} - -pub fn is_valid_first_char(ch: char) -> bool { - ch.is_ascii_lowercase() || ch.is_ascii_uppercase() || ch == '_' -} - -fn normalize_file_name_as_variable(str: String) -> String { - farm_profile_function!(""); - let mut res = String::with_capacity(str.len()); - - let mut first = true; - - let mut prev_is_invalid = false; - for ch in str.chars() { - if first { - if !is_valid_first_char(ch) { - res.push('_'); - - if is_valid_char(ch) { - res.push(ch); - } else { - prev_is_invalid = true; - } - } else { - res.push(ch) - } - first = false; - } else if is_valid_char(ch) || ch.is_ascii_digit() { - res.push(ch); - prev_is_invalid = false; - } else { - if prev_is_invalid { - continue; - } - - res.push('_'); - prev_is_invalid = true; - } - } - - res -} - pub fn safe_name_from_module_id(module_id: &ModuleId, root: &str) -> String { farm_profile_scope!("safe_name_from_module_id PathBuf"); let filename = module_id.resolved_path(root); @@ -494,8 +450,6 @@ mod tests { use super::{BundleVariable, UniqName}; - use super::normalize_file_name_as_variable; - #[test] fn uniq_name() { @@ -522,30 +476,6 @@ mod tests { assert_eq!(uniq_name.uniq_name("name"), "name$6"); } - #[test] - fn test_normalize_name() { - let normalized_str = normalize_file_name_as_variable(String::from("F:\\path\\to\\file.ts")); - assert_eq!(normalized_str, "F_path_to_file_ts"); - - let normalized_str = normalize_file_name_as_variable(String::from("/path/to/file.ts")); - assert_eq!(normalized_str, "_path_to_file_ts"); - - let normalized_str = normalize_file_name_as_variable(String::from("$_#$()axq")); - assert_eq!(normalized_str, "___axq"); - - let normalized_str = normalize_file_name_as_variable(String::from("_a_b_C_D")); - assert_eq!(normalized_str, "_a_b_C_D"); - - let normalized_str = normalize_file_name_as_variable(String::from("123456789")); - assert_eq!(normalized_str, "_123456789"); - - let normalized_str = normalize_file_name_as_variable(String::from("1_2_3_4")); - assert_eq!(normalized_str, "_1_2_3_4"); - - let normalized_str = normalize_file_name_as_variable(String::from("1text.ts")); - assert_eq!(normalized_str, "_1text_ts"); - } - #[test] fn find_external() -> Result<()> { // b.js / external.js diff --git a/crates/plugin_css/src/dep_analyzer.rs b/crates/plugin_css/src/dep_analyzer.rs index cad9ff00e..1e8fdad33 100644 --- a/crates/plugin_css/src/dep_analyzer.rs +++ b/crates/plugin_css/src/dep_analyzer.rs @@ -1,6 +1,7 @@ use std::collections::HashMap; use farmfe_core::{ + config::AliasItem, plugin::{PluginAnalyzeDepsHookResultEntry, ResolveKind}, swc_css_ast::{ImportHref, Url}, }; @@ -8,11 +9,11 @@ use farmfe_toolkit::{resolve::path_start_with_alias::is_start_with_alias, swc_cs pub struct DepAnalyzer { pub deps: Vec, - alias: HashMap, + alias: Vec, } impl DepAnalyzer { - pub fn new(alias: HashMap) -> Self { + pub fn new(alias: Vec) -> Self { Self { deps: vec![], alias, diff --git a/crates/plugin_css/src/lib.rs b/crates/plugin_css/src/lib.rs index 44965f90c..7bbdd22c4 100644 --- a/crates/plugin_css/src/lib.rs +++ b/crates/plugin_css/src/lib.rs @@ -7,6 +7,7 @@ use dep_analyzer::DepAnalyzer; use farmfe_core::config::css::NameConversion; use farmfe_core::config::custom::get_config_css_modules_local_conversion; use farmfe_core::config::minify::MinifyOptions; +use farmfe_core::config::AliasItem; use farmfe_core::module::CommentsMetaData; use farmfe_core::{ config::{Config, CssPrefixerConfig, TargetEnv}, @@ -337,7 +338,6 @@ impl Plugin for FarmPluginCss { } } } - export_names.push(( self.locals_conversion.transform(&name), after_transform_classes, @@ -821,7 +821,7 @@ pub fn source_replace( module_graph: &ModuleGraph, resources_map: &HashMap, public_path: String, - alias: HashMap, + alias: Vec, ) { let mut source_replacer = SourceReplacer::new( module_id.clone(), diff --git a/crates/plugin_css/src/source_replacer.rs b/crates/plugin_css/src/source_replacer.rs index b90585428..721d28bcb 100644 --- a/crates/plugin_css/src/source_replacer.rs +++ b/crates/plugin_css/src/source_replacer.rs @@ -1,6 +1,7 @@ use std::collections::HashMap; use farmfe_core::{ + config::AliasItem, module::{module_graph::ModuleGraph, ModuleId}, plugin::ResolveKind, resource::{Resource, ResourceOrigin}, @@ -19,7 +20,7 @@ pub struct SourceReplacer<'a> { module_graph: &'a ModuleGraph, resources_map: &'a HashMap, public_path: String, - alias: HashMap, + alias: Vec, } impl<'a> SourceReplacer<'a> { @@ -28,7 +29,7 @@ impl<'a> SourceReplacer<'a> { module_graph: &'a ModuleGraph, resources_map: &'a HashMap, public_path: String, - alias: HashMap, + alias: Vec, ) -> Self { Self { module_id, diff --git a/crates/plugin_css/tests/analyze_deps.rs b/crates/plugin_css/tests/analyze_deps.rs index 734e9d59b..3acb11f47 100644 --- a/crates/plugin_css/tests/analyze_deps.rs +++ b/crates/plugin_css/tests/analyze_deps.rs @@ -1,7 +1,7 @@ use std::{collections::HashMap, sync::Arc}; use farmfe_core::{ - config::{Config, ResolveConfig}, + config::{AliasItem, Config, ResolveConfig, StringOrRegex}, context::CompilationContext, module::{ModuleId, ModuleType}, plugin::{ @@ -17,10 +17,16 @@ fn analyze_deps() { fixture!("tests/fixtures/analyze_deps/basic.css", |file, cwd| { let config = Config { resolve: Box::new(ResolveConfig { - alias: HashMap::from([ - ("/@".to_string(), cwd.to_string_lossy().to_string()), - ("@".to_string(), cwd.to_string_lossy().to_string()), - ]), + alias: vec![ + AliasItem::Complex { + find: StringOrRegex::String("/@".to_string()), + replacement: cwd.to_string_lossy().to_string(), + }, + AliasItem::Complex { + find: StringOrRegex::String("@".to_string()), + replacement: cwd.to_string_lossy().to_string(), + }, + ], ..Default::default() }), ..Default::default() diff --git a/crates/plugin_html/src/lib.rs b/crates/plugin_html/src/lib.rs index fec41181b..cd605902d 100644 --- a/crates/plugin_html/src/lib.rs +++ b/crates/plugin_html/src/lib.rs @@ -168,9 +168,7 @@ impl Plugin for FarmPluginHtml { })? .ok_or(CompilationError::TransformError { resolved_path: param.resolved_path.to_string(), - msg: format!( - "Load base html({base}) fail: Base html file does not exist" - ), + msg: format!("Load base html({base}) fail: Base html file does not exist"), })?; return Ok(Some(PluginTransformHookResult { diff --git a/crates/plugin_html/src/resources_injector.rs b/crates/plugin_html/src/resources_injector.rs index 1b6f7f1f8..d850793f8 100644 --- a/crates/plugin_html/src/resources_injector.rs +++ b/crates/plugin_html/src/resources_injector.rs @@ -236,7 +236,7 @@ impl<'a> ResourcesInjector<'a> { Cow::Owned(finalize_code.into_bytes()), FARM_MODULE_SYSTEM_RESOURCE, &self.options.context, - &self.already_injected_resources + &self.already_injected_resources, ); // inject script element.children.push(Child::Element(create_element( diff --git a/crates/plugin_minify/src/imports_minifier.rs b/crates/plugin_minify/src/imports_minifier.rs index 8467cb48a..a588085ac 100644 --- a/crates/plugin_minify/src/imports_minifier.rs +++ b/crates/plugin_minify/src/imports_minifier.rs @@ -3,12 +3,12 @@ use std::collections::HashMap; use farmfe_core::{ module::{module_graph::ModuleGraph, ModuleId}, plugin::ResolveKind, - swc_common::{Mark, DUMMY_SP}, + swc_common::{Mark, SyntaxContext, DUMMY_SP}, swc_ecma_ast::{ BindingIdent, CallExpr, Callee, ExportNamedSpecifier, ExportSpecifier, Expr, ExprOrSpread, - ExprStmt, Id, Ident, KeyValuePatProp, KeyValueProp, Lit, MemberExpr, MemberProp, ModuleDecl, - ModuleExportName, ModuleItem, NamedExport, ObjectLit, Pat, Prop, PropName, PropOrSpread, Stmt, - Str, + ExprStmt, Id, Ident, IdentName, KeyValuePatProp, KeyValueProp, Lit, MemberExpr, MemberProp, + ModuleDecl, ModuleExportName, ModuleItem, NamedExport, ObjectLit, Pat, Prop, PropName, + PropOrSpread, Stmt, Str, }, }; use farmfe_toolkit::swc_ecma_visit::{VisitMut, VisitMutWith}; @@ -196,7 +196,11 @@ impl<'a> VisitMut for ImportsMinifier<'a> { self.get_imported_ident_with_count(&orig_minified_export); id_to_replace.insert(named.local.to_id(), minified_export.clone()); named.imported = Some(farmfe_core::swc_ecma_ast::ModuleExportName::Ident( - Ident::new(orig_minified_export.as_str().into(), DUMMY_SP), + Ident::new( + orig_minified_export.as_str().into(), + DUMMY_SP, + SyntaxContext::empty(), + ), )); named.local.sym = minified_export.as_str().into(); } else { @@ -335,6 +339,7 @@ impl<'a> VisitMut for ImportsMinifier<'a> { named.exported = Some(ModuleExportName::Ident(Ident::new( minified_export.as_str().into(), DUMMY_SP, + SyntaxContext::empty(), ))); current_minified_exports.insert(orig_str, minified_export); } else { @@ -381,10 +386,15 @@ impl<'a> VisitMut for ImportsMinifier<'a> { .map(|(from, to)| { ExportSpecifier::Named(ExportNamedSpecifier { span: DUMMY_SP, - orig: ModuleExportName::Ident(Ident::new(from.as_str().into(), DUMMY_SP)), + orig: ModuleExportName::Ident(Ident::new( + from.as_str().into(), + DUMMY_SP, + SyntaxContext::empty(), + )), exported: Some(ModuleExportName::Ident(Ident::new( to.as_str().into(), DUMMY_SP, + SyntaxContext::empty(), ))), is_type_only: false, }) @@ -449,9 +459,10 @@ impl<'a> VisitMut for ImportsMinifier<'a> { span: DUMMY_SP, obj: Box::new(Expr::Ident(Ident::new( "module".into(), - DUMMY_SP.apply_mark(self.unresolved_mark), + DUMMY_SP, + SyntaxContext::empty().apply_mark(self.unresolved_mark), ))), - prop: MemberProp::Ident(Ident::new("p".into(), DUMMY_SP)), + prop: MemberProp::Ident(IdentName::new("p".into(), DUMMY_SP)), }))), args: vec![ ExprOrSpread { @@ -462,11 +473,13 @@ impl<'a> VisitMut for ImportsMinifier<'a> { spread: None, expr: Box::new(Expr::Ident(Ident::new( star_ident.0, - DUMMY_SP.with_ctxt(star_ident.1), + DUMMY_SP, + star_ident.1, ))), }, ], type_args: None, + ctxt: SyntaxContext::empty(), })), })), ) @@ -494,10 +507,11 @@ impl<'a> VisitMut for IdentReplacer { farmfe_core::swc_ecma_ast::Prop::Shorthand(s) => { if let Some(replaced) = self.id_to_replace.get(&s.to_id()) { *prop = Box::new(Prop::KeyValue(KeyValueProp { - key: PropName::Ident(s.clone()), + key: PropName::Ident(IdentName::new(s.sym.clone(), s.span)), value: Box::new(Expr::Ident(Ident::new( replaced.as_str().into(), - DUMMY_SP.with_ctxt(s.span.ctxt()), + DUMMY_SP, + s.ctxt, ))), })) } @@ -537,12 +551,9 @@ impl<'a> VisitMut for IdentReplacer { value.visit_mut_with(self); } else if let Some(replaced) = self.id_to_replace.get(&a.key.id.to_id()) { *n = farmfe_core::swc_ecma_ast::ObjectPatProp::KeyValue(KeyValuePatProp { - key: PropName::Ident(a.key.id.clone()), + key: PropName::Ident(IdentName::new(a.key.id.sym.clone(), a.key.id.span)), value: Box::new(Pat::Ident(BindingIdent { - id: Ident::new( - replaced.as_str().into(), - DUMMY_SP.apply_mark(a.key.id.span.ctxt().outer()), - ), + id: Ident::new(replaced.as_str().into(), DUMMY_SP, a.key.id.ctxt), type_ann: None, })), }) diff --git a/crates/plugin_minify/src/minify_resource_pot.rs b/crates/plugin_minify/src/minify_resource_pot.rs index 2ff5adc9e..fd6521700 100644 --- a/crates/plugin_minify/src/minify_resource_pot.rs +++ b/crates/plugin_minify/src/minify_resource_pot.rs @@ -68,6 +68,7 @@ pub fn minify_js( &ExtraOptions { unresolved_mark, top_level_mark, + mangle_name_cache: None, }, ) .expect_module() diff --git a/crates/plugin_minify/src/top_level_idents_collector.rs b/crates/plugin_minify/src/top_level_idents_collector.rs index 8cb9e849f..7393ed0b8 100644 --- a/crates/plugin_minify/src/top_level_idents_collector.rs +++ b/crates/plugin_minify/src/top_level_idents_collector.rs @@ -99,7 +99,7 @@ impl UnresolvedIdentCollector { impl VisitMut for UnresolvedIdentCollector { fn visit_mut_ident(&mut self, n: &mut farmfe_core::swc_ecma_ast::Ident) { - if n.span.ctxt.outer() == self.unresolved_mark { + if n.ctxt.outer() == self.unresolved_mark { self.unresolved_idents.insert(n.sym.to_string()); } } diff --git a/crates/plugin_partial_bundling/src/generate_module_pots.rs b/crates/plugin_partial_bundling/src/generate_module_pots.rs index b17b2609a..303695a66 100644 --- a/crates/plugin_partial_bundling/src/generate_module_pots.rs +++ b/crates/plugin_partial_bundling/src/generate_module_pots.rs @@ -1,34 +1,45 @@ use std::collections::{HashMap, HashSet}; use farmfe_core::{ - config::partial_bundling::PartialBundlingConfig, + config::{partial_bundling::PartialBundlingConfig, Config}, module::{module_graph::ModuleGraph, Module, ModuleId}, }; -use crate::{generate_module_buckets::ResourceType, module_pot::ModulePot}; +use crate::{ + generate_module_buckets::ResourceType, module_pot::ModulePot, utils::group_is_enforce, +}; pub fn generate_module_pots( modules: &HashSet, module_graph: &ModuleGraph, - config: &PartialBundlingConfig, + config: &Config, resource_type: ResourceType, + groups_enforce_map: &HashMap, ) -> Vec { + let partial_bundling = &config.partial_bundling; let mut module_pot_map = HashMap::::new(); for module_id in modules { let module = module_graph.module(module_id).unwrap(); - let module_pot_name = generate_module_pot_name(module, config, resource_type.clone()); + let module_pot_meta = generate_module_pot_meta( + module, + partial_bundling, + resource_type.clone(), + groups_enforce_map, + ); let module_pot_id = ModulePot::gen_id( - &module_pot_name, + &module_pot_meta.id, module.module_type.clone(), module.immutable, ); let module_pot = module_pot_map.entry(module_pot_id).or_insert_with(|| { ModulePot::new( - module_pot_name, + module_pot_meta.id, + module_pot_meta.name, module.module_type.clone(), module.immutable, + module_pot_meta.enforce, ) }); @@ -38,28 +49,36 @@ pub fn generate_module_pots( // split module_pots from module_pot_map that its size larger that target_max_size let mut exceed_size_module_pot_ids = module_pot_map .iter() - .filter(|(_, module_pot)| module_pot.size > config.target_max_size) + .filter(|(_, module_pot)| module_pot.size > partial_bundling.target_max_size) .map(|(module_pot_id, _)| module_pot_id.clone()) .collect::>(); exceed_size_module_pot_ids.sort(); for exceed_size_module_pot_id in exceed_size_module_pot_ids { let module_pot = module_pot_map.remove(&exceed_size_module_pot_id).unwrap(); - let new_module_pot_numbers = (module_pot.size / config.target_max_size) + 1; + let new_module_pot_numbers = (module_pot.size / partial_bundling.target_max_size) + 1; let module_pot_name = module_pot.name.clone(); + let module_pot_id = module_pot.id.clone(); let immutable = module_pot.immutable; let ty = module_pot.module_type.clone(); + let enforce = module_pot.enforce; let mut modules = module_pot.take_modules().into_iter().collect::>(); modules.sort_by_key(|m| m.to_string()); let page_size = modules.len() / new_module_pot_numbers; for i in 0..new_module_pot_numbers { - let new_module_pot_name = format!("{module_pot_name}-{i}"); + let new_module_pot_name = format!("{module_pot_id}-{i}"); let new_module_pot_id = ModulePot::gen_id(&new_module_pot_name, ty.clone(), immutable); - let new_module_pot = module_pot_map - .entry(new_module_pot_id) - .or_insert_with(|| ModulePot::new(new_module_pot_name, ty.clone(), immutable)); + let new_module_pot = module_pot_map.entry(new_module_pot_id).or_insert_with(|| { + ModulePot::new( + new_module_pot_name, + module_pot_name.clone(), + ty.clone(), + immutable, + enforce, + ) + }); let start = i * page_size; let end = if i == new_module_pot_numbers - 1 { @@ -85,11 +104,19 @@ pub fn generate_module_pots( module_pots } -fn generate_module_pot_name( +#[derive(Debug, Default)] +pub struct ModulePotMeta { + id: String, + name: Option, + enforce: bool, +} + +fn generate_module_pot_meta( module: &Module, config: &PartialBundlingConfig, resource_type: ResourceType, -) -> String { + groups_enforce_map: &HashMap, +) -> ModulePotMeta { // 1. get name from partialBundling.groups for group_config in &config.groups { // use the first matched group name, so the order of groups is important @@ -101,17 +128,28 @@ fn generate_module_pot_name( if (group_config.group_type.is_match(module.immutable)) && (resource_type.is_match(group_config.resource_type.clone())) { - return group_config.name.clone(); + return ModulePotMeta { + name: Some(group_config.name.clone()), + id: group_config.name.clone(), + enforce: group_is_enforce(&group_config.name, groups_enforce_map), + }; } } } // 2. get name from immutable package if module.immutable { - return format!("{}@{}", module.package_name, module.package_version); + return ModulePotMeta { + id: format!("{}@{}", module.package_name, module.package_version), + ..Default::default() + }; } - module.id.to_string() + ModulePotMeta { + id: module.id.to_string(), + name: None, + enforce: false, + } } #[cfg(test)] @@ -123,16 +161,28 @@ mod tests { PartialBundlingConfig, PartialBundlingGroupConfig, PartialBundlingGroupConfigGroupType, PartialBundlingGroupConfigResourceType, }, + Config, }, module::{module_graph::ModuleGraph, Module, ModuleType}, }; - use farmfe_testing_helpers::fixture; + use farmfe_testing_helpers::{assert_debug_snapshot, fixture}; use std::collections::HashSet; - - use crate::{ - generate_module_buckets::ResourceType, generate_module_pots::generate_module_pots, - module_pot::ModulePot, - }; + use std::mem; + + use crate::{generate_module_buckets::ResourceType, generate_module_pots::generate_module_pots}; + + macro_rules! assert_module_pot_snapshot { + ($module_pots:expr) => { + for module_pot in $module_pots.iter_mut() { + let mut modules = mem::take(&mut module_pot.modules) + .into_iter() + .collect::>(); + modules.sort(); + assert_debug_snapshot!((&module_pot, &modules)); + module_pot.modules = modules.into_iter().collect(); + } + }; + } #[test] fn test_generate_module_pots_package() { @@ -178,36 +228,38 @@ mod tests { .map(|m| m.id.clone()) .collect::>(); - let module_pots = generate_module_pots( + let mut module_pots = generate_module_pots( &modules, &module_graph, &Default::default(), ResourceType::Initial, + &Default::default(), ); assert_eq!(module_pots.len(), 2); - assert_eq!(module_pots[0].name, "test-package1@1.0.0"); - assert_eq!(module_pots[0].size, 1 * 1024); - assert_eq!(module_pots[0].module_type, ModuleType::Js); - assert_eq!(module_pots[0].immutable, true); - assert_eq!(module_pots[0].execution_order, 1); - assert_eq!( - module_pots[0].modules(), - &HashSet::from(["tests/fixtures/generate_module_pots/basic1/index.ts".into()]) - ); - - assert_eq!(module_pots[1].name, "test-package@1.0.0"); - assert_eq!(module_pots[1].size, 15 * 1024); - assert_eq!(module_pots[1].module_type, ModuleType::Js); - assert_eq!(module_pots[1].immutable, true); - assert_eq!(module_pots[1].execution_order, 2); - assert_eq!( - module_pots[1].modules(), - &HashSet::from([ - "tests/fixtures/generate_module_pots/basic/index.ts".into(), - "tests/fixtures/generate_module_pots/basic/utils.ts".into() - ]) - ); + assert_module_pot_snapshot!(module_pots); + // assert_eq!(module_pots[0].name, "test-package1@1.0.0"); + // assert_eq!(module_pots[0].size, 1 * 1024); + // assert_eq!(module_pots[0].module_type, ModuleType::Js); + // assert_eq!(module_pots[0].immutable, true); + // assert_eq!(module_pots[0].execution_order, 1); + // assert_eq!( + // module_pots[0].modules(), + // &HashSet::from(["tests/fixtures/generate_module_pots/basic1/index.ts".into()]) + // ); + + // assert_eq!(module_pots[1].name, "test-package@1.0.0"); + // assert_eq!(module_pots[1].size, 15 * 1024); + // assert_eq!(module_pots[1].module_type, ModuleType::Js); + // assert_eq!(module_pots[1].immutable, true); + // assert_eq!(module_pots[1].execution_order, 2); + // assert_eq!( + // module_pots[1].modules(), + // &HashSet::from([ + // "tests/fixtures/generate_module_pots/basic/index.ts".into(), + // "tests/fixtures/generate_module_pots/basic/utils.ts".into() + // ]) + // ); } ); } @@ -241,122 +293,102 @@ mod tests { .map(|m| m.id.clone()) .collect::>(); - let assert_group_works = |module_pots: Vec| { - assert_eq!(module_pots.len(), 2); - - assert_eq!(module_pots[0].name, "test"); - assert_eq!(module_pots[0].size, 15 * 1024); - assert_eq!(module_pots[0].module_type, ModuleType::Js); - assert_eq!(module_pots[0].immutable, false); - assert_eq!(module_pots[0].execution_order, 1); - assert_eq!( - module_pots[0].modules(), - &HashSet::from(["src/a.ts".into(), "src/b.ts".into()]) - ); - - assert_eq!(module_pots[1].name, "utils/c.ts"); - assert_eq!(module_pots[1].size, 1 * 1024); - assert_eq!(module_pots[1].module_type, ModuleType::Js); - assert_eq!(module_pots[1].immutable, false); - assert_eq!(module_pots[1].execution_order, 3); - assert_eq!( - module_pots[1].modules(), - &HashSet::from(["utils/c.ts".into()]) - ); - }; - - let assert_group_not_works = |module_pots: Vec| { - assert_eq!(module_pots.len(), 3); - - assert_eq!(module_pots[0].name, "src/a.ts"); - assert_eq!(module_pots[0].size, 10 * 1024); - assert_eq!(module_pots[0].module_type, ModuleType::Js); - assert_eq!(module_pots[0].immutable, false); - assert_eq!(module_pots[0].execution_order, 1); - assert_eq!( - module_pots[0].modules(), - &HashSet::from(["src/a.ts".into()]) - ); - - assert_eq!(module_pots[1].name, "src/b.ts"); - assert_eq!(module_pots[1].size, 5 * 1024); - assert_eq!(module_pots[1].module_type, ModuleType::Js); - assert_eq!(module_pots[1].immutable, false); - assert_eq!(module_pots[1].execution_order, 2); - assert_eq!( - module_pots[1].modules(), - &HashSet::from(["src/b.ts".into()]) - ); - - assert_eq!(module_pots[2].name, "utils/c.ts"); - assert_eq!(module_pots[2].size, 1 * 1024); - assert_eq!(module_pots[2].module_type, ModuleType::Js); - assert_eq!(module_pots[2].immutable, false); - assert_eq!(module_pots[2].execution_order, 3); - assert_eq!( - module_pots[2].modules(), - &HashSet::from(["utils/c.ts".into()]) - ); - }; - // Default config for group_type and resource_type - let config = PartialBundlingConfig { - groups: vec![PartialBundlingGroupConfig { - name: "test".into(), - test: vec![ConfigRegex::new("src/.*")], + let config = Config { + partial_bundling: Box::new(PartialBundlingConfig { + groups: vec![PartialBundlingGroupConfig { + name: "test".into(), + test: vec![ConfigRegex::new("src/.*")], + ..Default::default() + }], ..Default::default() - }], + }), ..Default::default() }; - let module_pots = generate_module_pots(&modules, &module_graph, &config, ResourceType::Initial); - assert_group_works(module_pots); + let mut module_pots = generate_module_pots( + &modules, + &module_graph, + &config, + ResourceType::Initial, + &Default::default(), + ); + assert_module_pot_snapshot!(module_pots); // only match mutable modules - let config = PartialBundlingConfig { - groups: vec![PartialBundlingGroupConfig { - name: "test".into(), - test: vec![ConfigRegex::new("src/.*")], - group_type: PartialBundlingGroupConfigGroupType::Immutable, + let config = Config { + partial_bundling: Box::new(PartialBundlingConfig { + groups: vec![PartialBundlingGroupConfig { + name: "test".into(), + test: vec![ConfigRegex::new("src/.*")], + group_type: PartialBundlingGroupConfigGroupType::Immutable, + ..Default::default() + }], ..Default::default() - }], + }), ..Default::default() }; - let module_pots = generate_module_pots(&modules, &module_graph, &config, ResourceType::Initial); - - assert_group_not_works(module_pots); - - let config = PartialBundlingConfig { - groups: vec![PartialBundlingGroupConfig { - name: "test".into(), - test: vec![ConfigRegex::new("src/.*")], - resource_type: PartialBundlingGroupConfigResourceType::Async, + let mut module_pots = generate_module_pots( + &modules, + &module_graph, + &config, + ResourceType::Initial, + &Default::default(), + ); + assert_module_pot_snapshot!(module_pots); + + let config = Config { + partial_bundling: Box::new(PartialBundlingConfig { + groups: vec![PartialBundlingGroupConfig { + name: "test".into(), + test: vec![ConfigRegex::new("src/.*")], + resource_type: PartialBundlingGroupConfigResourceType::Async, + ..Default::default() + }], ..Default::default() - }], + }), ..Default::default() }; - let module_pots = generate_module_pots(&modules, &module_graph, &config, ResourceType::Initial); - - assert_group_not_works(module_pots); - - let module_pots = generate_module_pots(&modules, &module_graph, &config, ResourceType::Async); - - assert_group_works(module_pots); - - let config = PartialBundlingConfig { - groups: vec![PartialBundlingGroupConfig { - name: "test".into(), - test: vec![ConfigRegex::new("src/.*")], - resource_type: PartialBundlingGroupConfigResourceType::Initial, + let mut module_pots = generate_module_pots( + &modules, + &module_graph, + &config, + ResourceType::Initial, + &Default::default(), + ); + assert_module_pot_snapshot!(module_pots); + + let mut module_pots = generate_module_pots( + &modules, + &module_graph, + &config, + ResourceType::Async, + &Default::default(), + ); + assert_module_pot_snapshot!(module_pots); + + let config = Config { + partial_bundling: Box::new(PartialBundlingConfig { + groups: vec![PartialBundlingGroupConfig { + name: "test".into(), + test: vec![ConfigRegex::new("src/.*")], + resource_type: PartialBundlingGroupConfigResourceType::Initial, + ..Default::default() + }], ..Default::default() - }], + }), ..Default::default() }; - let module_pots = generate_module_pots(&modules, &module_graph, &config, ResourceType::Initial); - - assert_group_works(module_pots); + let mut module_pots = generate_module_pots( + &modules, + &module_graph, + &config, + ResourceType::Initial, + &Default::default(), + ); + assert_module_pot_snapshot!(module_pots); } } diff --git a/crates/plugin_partial_bundling/src/generate_resource_pots.rs b/crates/plugin_partial_bundling/src/generate_resource_pots.rs index b81147c34..a53b3982f 100644 --- a/crates/plugin_partial_bundling/src/generate_resource_pots.rs +++ b/crates/plugin_partial_bundling/src/generate_resource_pots.rs @@ -1,8 +1,8 @@ use std::collections::{HashMap, HashSet}; use std::path::PathBuf; +use farmfe_core::config::Config; use farmfe_core::{ - config::partial_bundling::PartialBundlingConfig, module::{module_graph::ModuleGraph, module_group::ModuleGroupId}, resource::resource_pot::ResourcePot, }; @@ -23,7 +23,8 @@ pub fn generate_resource_pots( module_group_buckets: Vec, mut module_buckets_map: HashMap, module_graph: &ModuleGraph, - config: &PartialBundlingConfig, + config: &Config, + groups_enforce_map: &HashMap, ) -> Vec { let mut resource_pots = vec![]; let mut handled_module_group_buckets = HashSet::new(); @@ -55,6 +56,7 @@ pub fn generate_resource_pots( module_graph, config, module_group_bucket.resource_type.clone(), + groups_enforce_map, ); module_group_module_pots.add_module_pots(module_bucket_id.clone(), module_pots); diff --git a/crates/plugin_partial_bundling/src/lib.rs b/crates/plugin_partial_bundling/src/lib.rs index b83c5524b..d51b44b26 100644 --- a/crates/plugin_partial_bundling/src/lib.rs +++ b/crates/plugin_partial_bundling/src/lib.rs @@ -1,6 +1,8 @@ -use std::collections::HashSet; +use std::collections::{HashMap, HashSet}; +use std::sync::RwLock; use std::{collections::VecDeque, sync::Arc}; +use farmfe_core::config::custom::CUSTOM_CONFIG_PARTIAL_BUNDLING_GROUPS_ENFORCE_MAP; use farmfe_core::{ config::Config, context::CompilationContext, @@ -25,9 +27,24 @@ mod module_pot; mod utils; /// Partial Bundling implementation for Farm. /// See https://github.com/farm-fe/rfcs/pull/9 -pub struct FarmPluginPartialBundling {} +pub struct FarmPluginPartialBundling { + partial_bundling_groups_enforce_map: RwLock>, +} impl Plugin for FarmPluginPartialBundling { + fn config(&self, config: &mut Config) -> farmfe_core::error::Result> { + *self.partial_bundling_groups_enforce_map.write().unwrap() = config + .custom + .get(CUSTOM_CONFIG_PARTIAL_BUNDLING_GROUPS_ENFORCE_MAP) + .map(|s| { + farmfe_core::serde_json::from_str(s) + .expect("failed to parse partial bundling group enforce map") + }) + .unwrap_or_default(); + + Ok(Some(())) + } + fn name(&self) -> &str { "FarmPluginPartialBundling" } @@ -74,12 +91,15 @@ impl Plugin for FarmPluginPartialBundling { let module_group_buckets = group_module_buckets_by_module_group(&module_buckets_map, &module_group_graph, &module_graph); + let enforce_map = self.partial_bundling_groups_enforce_map.read().unwrap(); + // 3. generate resource pots let resource_pots = generate_resource_pots( module_group_buckets, module_buckets_map, &module_graph, - &context.config.partial_bundling, + &context.config, + &enforce_map, ); Ok(Some(resource_pots)) @@ -88,7 +108,9 @@ impl Plugin for FarmPluginPartialBundling { impl FarmPluginPartialBundling { pub fn new(_: &Config) -> Self { - Self {} + Self { + partial_bundling_groups_enforce_map: RwLock::new(HashMap::new()), + } } } @@ -226,7 +248,9 @@ mod tests { #[test] fn analyze_module_graph() { - let plugin = FarmPluginPartialBundling {}; + let plugin = FarmPluginPartialBundling { + partial_bundling_groups_enforce_map: Default::default(), + }; let mut context = CompilationContext::new(Default::default(), vec![]).unwrap(); let graph = construct_test_module_graph(); diff --git a/crates/plugin_partial_bundling/src/merge_module_pots.rs b/crates/plugin_partial_bundling/src/merge_module_pots.rs index f2638b2c7..75f9394f0 100644 --- a/crates/plugin_partial_bundling/src/merge_module_pots.rs +++ b/crates/plugin_partial_bundling/src/merge_module_pots.rs @@ -4,8 +4,8 @@ use std::collections::{HashMap, HashSet}; use std::{cmp::Ordering, usize}; +use farmfe_core::config::Config; use farmfe_core::{ - config::partial_bundling::PartialBundlingConfig, module::{module_graph::ModuleGraph, module_group::ModuleGroupId, ModuleId, ModuleType}, resource::resource_pot::{ResourcePot, ResourcePotType}, }; @@ -99,16 +99,55 @@ impl<'a> CurrentGeneration<'a> { pub fn immutable(&self) -> bool { self.module_pots[0].immutable } + + pub fn name(&self) -> Option { + let mut set = self.module_pots.iter().collect::>(); + + set.sort_by(|a, b| a.id.cmp(&b.id)); + + set.iter().find_map(|i| i.name.clone()) + } +} + +fn create_resource_by_meta>( + id: String, + modules: &HashSet, + module_type: M, + is_with_hash: bool, + immutable: bool, + name: String, +) -> ResourcePot { + let id = format!("{}_{}", id, hash_module_ids(modules)); + let resource_name = if is_with_hash { + format!("{}_{}", name, hash_module_ids(modules)) + } else { + name + }; + + let resource_pot_type = module_type.into(); + let mut resource_pot = ResourcePot::new(resource_name, resource_pot_type); + + resource_pot.set_resource_pot_id(id); + resource_pot.immutable = immutable; + + for module_id in modules { + resource_pot.add_module(module_id.clone()); + } + + resource_pot } /// Merge module pots to resource pots in the same ModuleGroup. /// See https://github.com/farm-fe/rfcs/blob/main/rfcs/003-partial-bundling/rfc.md#merge-module-pots-into-resource-pot pub fn merge_module_pots( module_group_module_pots: ModuleGroupModulePots, - config: &PartialBundlingConfig, + config: &Config, base_resource_pot_name: &str, module_graph: &ModuleGraph, ) -> Vec { + let is_with_hash = !(config.output.filename.contains("[hash]") + || config.output.filename.contains("[contentHash]")); + let config = &config.partial_bundling; // target_concurrent_requests = 0 means no limit let target_concurrent_requests = if config.target_concurrent_requests == 0 { usize::MAX @@ -138,6 +177,7 @@ pub fn merge_module_pots( mutable_target_size, immutable_target_size, base_resource_pot_name, + is_with_hash, ); let mut resource_pots_size_mp = HashMap::new(); @@ -156,6 +196,7 @@ pub fn merge_module_pots( &resource_pots_size_mp, config.target_min_size, base_resource_pot_name, + is_with_hash, ); } @@ -165,6 +206,7 @@ pub fn merge_module_pots( &resource_pots_size_mp, target_concurrent_requests, base_resource_pot_name, + is_with_hash, ); } @@ -177,6 +219,7 @@ fn merge_resource_pots_by_buckets( mutable_target_size: usize, immutable_target_size: usize, base_resource_pot_name: &str, + is_with_hash: bool, ) -> Vec { let mut final_resource_pots = vec![]; @@ -194,7 +237,25 @@ fn merge_resource_pots_by_buckets( mutable_target_size }; + let is_same_groups = module_pots.iter().all(|m| m.name == module_pots[0].name); + for module_pot in module_pots { + if module_pot.enforce && !is_same_groups { + resource_pots.push(create_resource_by_meta( + base_resource_pot_name.to_string(), + &module_pot.modules, + module_pot.module_type.clone(), + is_with_hash, + module_pot.immutable, + if let Some(ref name) = module_pot.name { + name.clone() + } else { + base_resource_pot_name.to_string() + }, + )); + continue; + } + let key = (module_pot.module_type.clone(), module_pot.immutable); if let Some(current_generation) = current_generation_map.get_mut(&key) { @@ -210,20 +271,18 @@ fn merge_resource_pots_by_buckets( let current_generation = current_generation_map.remove(&key).unwrap(); let modules = current_generation.modules(); - let resource_pot_name = format!( - "{}_{}", - base_resource_pot_name, - hash_module_ids(&modules) // get_sorted_module_ids_str(&module_bucket.modules()) - ); - let resource_pot_type = ResourcePotType::from(module_pot.module_type.clone()); - let mut resource_pot = ResourcePot::new(resource_pot_name, resource_pot_type); - resource_pot.immutable = module_pot.immutable; - - for module_id in modules { - resource_pot.add_module(module_id); - } - - resource_pots.push(resource_pot); + resource_pots.push(create_resource_by_meta( + base_resource_pot_name.to_string(), + &modules, + current_generation.module_type(), + is_with_hash, + current_generation.immutable(), + if let Some(name) = current_generation.name() { + name + } else { + base_resource_pot_name.to_string() + }, + )); } } @@ -232,20 +291,16 @@ fn merge_resource_pots_by_buckets( for (_, current_generation) in current_generation_map { let modules = current_generation.modules(); - let resource_pot_name = format!( - "{}_{}", - base_resource_pot_name, - hash_module_ids(&modules) // get_sorted_module_ids_str(&module_bucket.modules()) - ); - let resource_pot_type = ResourcePotType::from(current_generation.module_type().clone()); - let mut resource_pot = ResourcePot::new(resource_pot_name, resource_pot_type); - resource_pot.immutable = current_generation.immutable(); - - for module_id in modules { - resource_pot.add_module(module_id); - } - - resource_pots.push(resource_pot); + resource_pots.push(create_resource_by_meta( + base_resource_pot_name.to_string(), + &modules, + current_generation.module_type(), + is_with_hash, + current_generation.immutable(), + current_generation + .name() + .unwrap_or(base_resource_pot_name.to_string()), + )); } } @@ -270,6 +325,7 @@ fn handle_enforce_target_min_size( resource_pots_size_mp: &HashMap, target_min_size: usize, base_resource_pot_name: &str, + is_with_hash: bool, ) -> Vec { let mut small_resource_pots_to_merge = vec![]; let mut resource_pot_map = resource_pots @@ -326,6 +382,7 @@ fn handle_enforce_target_min_size( resource_pot.immutable, base_resource_pot_name, &mut resource_pot_map, + is_with_hash, ); resource_pot_map.insert(merged_resource_pot.id.clone(), merged_resource_pot); @@ -386,6 +443,7 @@ fn handle_enforce_target_min_size( immutable, base_resource_pot_name, &mut resource_pot_map, + is_with_hash, ); final_resource_pot_ids.push(merged_resource_pot.id.clone()); resource_pot_map.insert(merged_resource_pot.id.clone(), merged_resource_pot); @@ -405,31 +463,49 @@ fn create_merged_resource_pot( immutable: bool, base_resource_pot_name: &str, resource_pot_map: &mut HashMap, + is_with_hash: bool, ) -> ResourcePot { let mut modules = HashSet::new(); + let mut name: Option<(String, bool)> = None; for resource_pot_id in merged_resource_pot_ids { let removed_resource_pot = resource_pot_map.remove(resource_pot_id).unwrap(); + if name.is_none() { + name = Some((removed_resource_pot.name.clone(), true)); + } + + if let Some((name, is_ready)) = name.as_mut() { + if *is_ready && *name != removed_resource_pot.name { + *is_ready = false; + } + } + for module_id in removed_resource_pot.modules() { modules.insert(module_id.clone()); } } - let resource_pot_name = format!( + let resource_pot_id = format!( "{}_{}", base_resource_pot_name, hash_module_ids(&modules) // get_sorted_module_ids_str(&module_bucket.modules()) ); - let mut merged_resource_pot = ResourcePot::new(resource_pot_name, resource_pot_type); - merged_resource_pot.immutable = immutable; - - for module_id in modules { - merged_resource_pot.add_module(module_id); - } + let resource_pot_name = if let Some((name, _)) = name { + name + } else { + base_resource_pot_name.to_string() + }; - merged_resource_pot + create_resource_by_meta( + resource_pot_id.clone(), + &modules, + resource_pot_type.clone(), + is_with_hash, + immutable, + resource_pot_name, + ) } /// Merge resource pots that are less than target_min_size to a new ResourcePot or into the smallest resource pot. @@ -438,6 +514,7 @@ fn handle_enforce_target_concurrent_requests( resource_pots_size_mp: &HashMap, target_concurrent_requests: usize, base_resource_pot_name: &str, + is_with_hash: bool, ) -> Vec { if resource_pots.len() <= target_concurrent_requests { return resource_pots; @@ -507,6 +584,7 @@ fn handle_enforce_target_concurrent_requests( resource_pot.immutable, base_resource_pot_name, &mut resource_pot_map, + is_with_hash, ); resource_pot_map.insert(merged_resource_pot.id.clone(), merged_resource_pot); } @@ -521,6 +599,7 @@ fn handle_enforce_target_concurrent_requests( immutable, base_resource_pot_name, &mut resource_pot_map, + is_with_hash, ); resource_pot_map.insert(merged_resource_pot.id.clone(), merged_resource_pot); } diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/common.rs b/crates/plugin_partial_bundling/src/merge_module_pots/common.rs index 0146ad8de..392451aa7 100644 --- a/crates/plugin_partial_bundling/src/merge_module_pots/common.rs +++ b/crates/plugin_partial_bundling/src/merge_module_pots/common.rs @@ -2,9 +2,11 @@ use farmfe_core::module::{module_graph::ModuleGraph, ModuleId}; use crate::module_pot::ModulePot; +#[cfg(test)] pub fn create_test_module_pot( module_graph: &mut ModuleGraph, module_id: &ModuleId, + name: &str, size: usize, immutable: bool, ) -> ModulePot { @@ -14,8 +16,10 @@ pub fn create_test_module_pot( let mut module_pot = ModulePot::new( module_b.id.to_string(), + Some(name.to_string()), module_b.module_type.clone(), module_b.immutable, + false, ); module_pot.add_module(module_b.id.clone(), module_b.size, module_b.execution_order); diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-2.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-2.snap new file mode 100644 index 000000000..ffd0f81ab --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-2.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "H", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "H_44bd", + ), + ( + "id", + "B_44bd", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-3.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-3.snap new file mode 100644 index 000000000..a67d19cf7 --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-3.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "E", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "E_a9f5", + ), + ( + "id", + "B_a9f5", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-4.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-4.snap new file mode 100644 index 000000000..b687c25c6 --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-4.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_df7e", + ), + ( + "id", + "B_df7e", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-5.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-5.snap new file mode 100644 index 000000000..e6625bc0f --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-5.snap @@ -0,0 +1,49 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "E", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_2f5d", + ), + ( + "id", + "B_2f5d", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-6.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-6.snap new file mode 100644 index 000000000..c5ae54b7c --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-6.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "D", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "D_3f39", + ), + ( + "id", + "B_3f39", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-7.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-7.snap new file mode 100644 index 000000000..ffd0f81ab --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0-7.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "H", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "H_44bd", + ), + ( + "id", + "B_44bd", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0.snap new file mode 100644 index 000000000..c5ae54b7c --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_concurrent_requests_0.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "D", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "D_3f39", + ), + ( + "id", + "B_3f39", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-2.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-2.snap new file mode 100644 index 000000000..c5ae54b7c --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-2.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "D", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "D_3f39", + ), + ( + "id", + "B_3f39", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-3.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-3.snap new file mode 100644 index 000000000..ffd0f81ab --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-3.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "H", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "H_44bd", + ), + ( + "id", + "B_44bd", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-4.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-4.snap new file mode 100644 index 000000000..c5ae54b7c --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-4.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "D", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "D_3f39", + ), + ( + "id", + "B_3f39", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-5.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-5.snap new file mode 100644 index 000000000..ffd0f81ab --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-5.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "H", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "H_44bd", + ), + ( + "id", + "B_44bd", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-6.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-6.snap new file mode 100644 index 000000000..a67d19cf7 --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-6.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "E", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "E_a9f5", + ), + ( + "id", + "B_a9f5", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-7.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-7.snap new file mode 100644 index 000000000..b687c25c6 --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0-7.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_df7e", + ), + ( + "id", + "B_df7e", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0.snap new file mode 100644 index 000000000..e6625bc0f --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_0.snap @@ -0,0 +1,49 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "E", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_2f5d", + ), + ( + "id", + "B_2f5d", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_not_enough_size-2.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_not_enough_size-2.snap new file mode 100644 index 000000000..51511dd94 --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_not_enough_size-2.snap @@ -0,0 +1,49 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "E", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_2f5d_2f5d", + ), + ( + "id", + "B_2f5d_2f5d", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_not_enough_size.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_not_enough_size.snap new file mode 100644 index 000000000..b2bb0ca09 --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/boundaries_enforce_min_size_not_enough_size.snap @@ -0,0 +1,49 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "D", + query_string: "", + }, + ModuleId { + relative_path: "H", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "H_44bd_2328", + ), + ( + "id", + "B_2328_2328", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/default-2.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/default-2.snap new file mode 100644 index 000000000..9a2e85b47 --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/default-2.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_default.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_default.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "D", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "D_3f39", + ), + ( + "id", + "B_3f39", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/default-3.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/default-3.snap new file mode 100644 index 000000000..a0155d717 --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/default-3.snap @@ -0,0 +1,45 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_default.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_default.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "H", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "H_44bd", + ), + ( + "id", + "B_44bd", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/default.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/default.snap new file mode 100644 index 000000000..ad885c204 --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/default.snap @@ -0,0 +1,49 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_default.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_default.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "E", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_2f5d", + ), + ( + "id", + "B_2f5d", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/enforce_configs_concurrent_requests-2.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/enforce_configs_concurrent_requests-2.snap new file mode 100644 index 000000000..e97306a02 --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/enforce_configs_concurrent_requests-2.snap @@ -0,0 +1,49 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_enforce_configs.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_enforce_configs.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "E", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_2f5d", + ), + ( + "id", + "B_2f5d", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/enforce_configs_concurrent_requests.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/enforce_configs_concurrent_requests.snap new file mode 100644 index 000000000..9a550bd7a --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/enforce_configs_concurrent_requests.snap @@ -0,0 +1,49 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_enforce_configs.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_enforce_configs.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "D", + query_string: "", + }, + ModuleId { + relative_path: "H", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "H_44bd_2328", + ), + ( + "id", + "B_2328_2328", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/enforce_configs_min_size-2.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/enforce_configs_min_size-2.snap new file mode 100644 index 000000000..71a10d89b --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/enforce_configs_min_size-2.snap @@ -0,0 +1,49 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_enforce_configs.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_enforce_configs.rs +--- +( + ( + "immutable", + true, + ), + ( + "modules", + [ + ModuleId { + relative_path: "D", + query_string: "", + }, + ModuleId { + relative_path: "H", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "D_3f39", + ), + ( + "id", + "B_3f39", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/enforce_configs_min_size.snap b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/enforce_configs_min_size.snap new file mode 100644 index 000000000..e97306a02 --- /dev/null +++ b/crates/plugin_partial_bundling/src/merge_module_pots/snapshots/enforce_configs_min_size.snap @@ -0,0 +1,49 @@ +--- +source: crates/plugin_partial_bundling/src/merge_module_pots/test_enforce_configs.rs +input_file: crates/plugin_partial_bundling/src/merge_module_pots/test_enforce_configs.rs +--- +( + ( + "immutable", + false, + ), + ( + "modules", + [ + ModuleId { + relative_path: "B", + query_string: "", + }, + ModuleId { + relative_path: "E", + query_string: "", + }, + ], + ), + ( + "resource_pot_type", + Custom( + "__farm_unknown", + ), + ), + ( + "name", + "B_2f5d", + ), + ( + "id", + "B_2f5d", + ), + ( + "entry", + None, + ), + ( + "resources", + [], + ), + ( + "module_groups", + [], + ), +) diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs b/crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs index 1fa4c2690..efe65440d 100644 --- a/crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs +++ b/crates/plugin_partial_bundling/src/merge_module_pots/test_boundaries.rs @@ -1,5 +1,8 @@ -use farmfe_core::config::partial_bundling::PartialBundlingConfig; -use farmfe_testing_helpers::construct_test_module_graph_complex; +use farmfe_core::{ + config::{partial_bundling::PartialBundlingConfig, Config}, + resource::resource_pot::ResourcePot, +}; +use farmfe_testing_helpers::{assert_resource_pots, construct_test_module_graph_complex}; use super::{common::create_test_module_pot, merge_module_pots, ModuleGroupModulePots}; @@ -9,10 +12,10 @@ fn test_boundaries_enforce_min_size_not_enough_size() { let mut module_group_module_pots = ModuleGroupModulePots::new("B".into()); let size = 10 * 1024; - let module_bucket_b = create_test_module_pot(&mut module_graph, &"B".into(), size, false); - let module_bucket_e = create_test_module_pot(&mut module_graph, &"E".into(), size, false); - let module_bucket_d = create_test_module_pot(&mut module_graph, &"D".into(), size * 2, true); - let module_bucket_h = create_test_module_pot(&mut module_graph, &"H".into(), size, true); + let module_bucket_b = create_test_module_pot(&mut module_graph, &"B".into(), "B", size, false); + let module_bucket_e = create_test_module_pot(&mut module_graph, &"E".into(), "E", size, false); + let module_bucket_d = create_test_module_pot(&mut module_graph, &"D".into(), "D", size * 2, true); + let module_bucket_h = create_test_module_pot(&mut module_graph, &"H".into(), "H", size, true); module_group_module_pots .add_module_pots("B_E".to_string(), vec![module_bucket_b, module_bucket_e]); @@ -21,10 +24,13 @@ fn test_boundaries_enforce_min_size_not_enough_size() { let mut resource_pots = merge_module_pots( module_group_module_pots, - &PartialBundlingConfig { - target_concurrent_requests: 2, - target_min_size: 30 * 1024, - enforce_target_min_size: true, + &Config { + partial_bundling: Box::new(PartialBundlingConfig { + target_concurrent_requests: 2, + target_min_size: 30 * 1024, + enforce_target_min_size: true, + ..Default::default() + }), ..Default::default() }, "B", @@ -34,10 +40,8 @@ fn test_boundaries_enforce_min_size_not_enough_size() { resource_pots.sort_by_key(|p| p.id.clone()); assert_eq!(resource_pots.len(), 2); - assert_eq!(resource_pots[0].immutable, true); - assert_eq!(resource_pots[0].modules(), vec![&"D".into(), &"H".into()]); - assert_eq!(resource_pots[1].immutable, false); - assert_eq!(resource_pots[1].modules(), vec![&"B".into(), &"E".into()]); + + assert_resource_pots!(&resource_pots); } #[test] @@ -46,10 +50,10 @@ fn test_boundaries_enforce_min_size_0() { let mut module_group_module_pots = ModuleGroupModulePots::new("B".into()); let size = 10 * 1024; - let module_bucket_b = create_test_module_pot(&mut module_graph, &"B".into(), size, false); - let module_bucket_e = create_test_module_pot(&mut module_graph, &"E".into(), size, false); - let module_bucket_d = create_test_module_pot(&mut module_graph, &"D".into(), size * 2, true); - let module_bucket_h = create_test_module_pot(&mut module_graph, &"H".into(), size, true); + let module_bucket_b = create_test_module_pot(&mut module_graph, &"B".into(), "B", size, false); + let module_bucket_e = create_test_module_pot(&mut module_graph, &"E".into(), "E", size, false); + let module_bucket_d = create_test_module_pot(&mut module_graph, &"D".into(), "D", size * 2, true); + let module_bucket_h = create_test_module_pot(&mut module_graph, &"H".into(), "H", size, true); module_group_module_pots .add_module_pots("B_E".to_string(), vec![module_bucket_b, module_bucket_e]); @@ -59,9 +63,12 @@ fn test_boundaries_enforce_min_size_0() { // test requests = 3 let mut resource_pots = merge_module_pots( module_group_module_pots.clone(), - &PartialBundlingConfig { - target_concurrent_requests: 3, - target_min_size: 0, + &Config { + partial_bundling: Box::new(PartialBundlingConfig { + target_concurrent_requests: 3, + target_min_size: 0, + ..Default::default() + }), ..Default::default() }, "B", @@ -70,21 +77,18 @@ fn test_boundaries_enforce_min_size_0() { resource_pots.sort_by_key(|p| p.id.clone()); - assert_eq!(resource_pots.len(), 3); - assert_eq!(resource_pots[0].immutable, false); - assert_eq!(resource_pots[0].modules(), vec![&"B".into(), &"E".into()]); - assert_eq!(resource_pots[1].immutable, true); - assert_eq!(resource_pots[1].modules(), vec![&"D".into()]); - assert_eq!(resource_pots[2].immutable, true); - assert_eq!(resource_pots[2].modules(), vec![&"H".into()]); + assert_resource_pots!(&resource_pots); // test requests = 4 and immutable_modules_weight = 0.5 let mut resource_pots = merge_module_pots( module_group_module_pots.clone(), - &PartialBundlingConfig { - target_concurrent_requests: 4, - target_min_size: 0, - immutable_modules_weight: 0.5, + &Config { + partial_bundling: Box::new(PartialBundlingConfig { + target_concurrent_requests: 4, + target_min_size: 0, + immutable_modules_weight: 0.5, + ..Default::default() + }), ..Default::default() }, "B", @@ -94,14 +98,7 @@ fn test_boundaries_enforce_min_size_0() { resource_pots.sort_by_key(|p| p.id.clone()); assert_eq!(resource_pots.len(), 4); - assert_eq!(resource_pots[0].immutable, true); - assert_eq!(resource_pots[0].modules(), vec![&"D".into()]); - assert_eq!(resource_pots[1].immutable, true); - assert_eq!(resource_pots[1].modules(), vec![&"H".into()]); - assert_eq!(resource_pots[2].immutable, false); - assert_eq!(resource_pots[2].modules(), vec![&"E".into()]); - assert_eq!(resource_pots[3].immutable, false); - assert_eq!(resource_pots[3].modules(), vec![&"B".into()]); + assert_resource_pots!(&resource_pots); } #[test] @@ -110,10 +107,10 @@ fn test_boundaries_enforce_concurrent_requests_0() { let mut module_group_module_pots = ModuleGroupModulePots::new("B".into()); let size = 10 * 1024; - let module_bucket_b = create_test_module_pot(&mut module_graph, &"B".into(), size, false); - let module_bucket_e = create_test_module_pot(&mut module_graph, &"E".into(), size, false); - let module_bucket_d = create_test_module_pot(&mut module_graph, &"D".into(), size * 2, true); - let module_bucket_h = create_test_module_pot(&mut module_graph, &"H".into(), size, true); + let module_bucket_b = create_test_module_pot(&mut module_graph, &"B".into(), "B", size, false); + let module_bucket_e = create_test_module_pot(&mut module_graph, &"E".into(), "E", size, false); + let module_bucket_d = create_test_module_pot(&mut module_graph, &"D".into(), "D", size * 2, true); + let module_bucket_h = create_test_module_pot(&mut module_graph, &"H".into(), "H", size, true); module_group_module_pots .add_module_pots("B_E".to_string(), vec![module_bucket_b, module_bucket_e]); @@ -122,9 +119,12 @@ fn test_boundaries_enforce_concurrent_requests_0() { let mut resource_pots = merge_module_pots( module_group_module_pots.clone(), - &PartialBundlingConfig { - target_concurrent_requests: 0, - target_min_size: 10 * 1024, + &Config { + partial_bundling: Box::new(PartialBundlingConfig { + target_concurrent_requests: 0, + target_min_size: 10 * 1024, + ..Default::default() + }), ..Default::default() }, "B", @@ -134,20 +134,17 @@ fn test_boundaries_enforce_concurrent_requests_0() { resource_pots.sort_by_key(|p| p.id.clone()); assert_eq!(resource_pots.len(), 4); - assert_eq!(resource_pots[0].immutable, true); - assert_eq!(resource_pots[0].modules(), vec![&"D".into()]); - assert_eq!(resource_pots[1].immutable, true); - assert_eq!(resource_pots[1].modules(), vec![&"H".into()]); - assert_eq!(resource_pots[2].immutable, false); - assert_eq!(resource_pots[2].modules(), vec![&"E".into()]); - assert_eq!(resource_pots[3].immutable, false); - assert_eq!(resource_pots[3].modules(), vec![&"B".into()]); + + assert_resource_pots!(&resource_pots); let mut resource_pots = merge_module_pots( module_group_module_pots.clone(), - &PartialBundlingConfig { - target_concurrent_requests: 1, - target_min_size: 10 * 1024, + &Config { + partial_bundling: Box::new(PartialBundlingConfig { + target_concurrent_requests: 1, + target_min_size: 10 * 1024, + ..Default::default() + }), ..Default::default() }, "B", @@ -157,10 +154,5 @@ fn test_boundaries_enforce_concurrent_requests_0() { resource_pots.sort_by_key(|p| p.id.clone()); assert_eq!(resource_pots.len(), 3); - assert_eq!(resource_pots[0].immutable, false); - assert_eq!(resource_pots[0].modules(), vec![&"B".into(), &"E".into()]); - assert_eq!(resource_pots[1].immutable, true); - assert_eq!(resource_pots[1].modules(), vec![&"D".into()]); - assert_eq!(resource_pots[2].immutable, true); - assert_eq!(resource_pots[2].modules(), vec![&"H".into()]); + assert_resource_pots!(&resource_pots); } diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/test_default.rs b/crates/plugin_partial_bundling/src/merge_module_pots/test_default.rs index a772b79bf..6976fa99f 100644 --- a/crates/plugin_partial_bundling/src/merge_module_pots/test_default.rs +++ b/crates/plugin_partial_bundling/src/merge_module_pots/test_default.rs @@ -1,5 +1,5 @@ -use farmfe_core::config::partial_bundling::PartialBundlingConfig; -use farmfe_testing_helpers::construct_test_module_graph_complex; +use farmfe_core::config::{partial_bundling::PartialBundlingConfig, Config}; +use farmfe_testing_helpers::{assert_resource_pots, construct_test_module_graph_complex}; use super::{common::create_test_module_pot, merge_module_pots, ModuleGroupModulePots}; @@ -9,10 +9,10 @@ fn test_default() { let mut module_group_module_pots = ModuleGroupModulePots::new("B".into()); let size = 10 * 1024; - let module_bucket_b = create_test_module_pot(&mut module_graph, &"B".into(), size, false); - let module_bucket_e = create_test_module_pot(&mut module_graph, &"E".into(), size, false); - let module_bucket_d = create_test_module_pot(&mut module_graph, &"D".into(), size * 2, true); - let module_bucket_h = create_test_module_pot(&mut module_graph, &"H".into(), size, true); + let module_bucket_b = create_test_module_pot(&mut module_graph, &"B".into(), "B", size, false); + let module_bucket_e = create_test_module_pot(&mut module_graph, &"E".into(), "E", size, false); + let module_bucket_d = create_test_module_pot(&mut module_graph, &"D".into(), "D", size * 2, true); + let module_bucket_h = create_test_module_pot(&mut module_graph, &"H".into(), "H", size, true); module_group_module_pots .add_module_pots("B_E".to_string(), vec![module_bucket_b, module_bucket_e]); @@ -21,9 +21,12 @@ fn test_default() { let mut resource_pots = merge_module_pots( module_group_module_pots, - &PartialBundlingConfig { - target_concurrent_requests: 2, - target_min_size: 20 * 1024, + &Config { + partial_bundling: Box::new(PartialBundlingConfig { + target_concurrent_requests: 2, + target_min_size: 20 * 1024, + ..Default::default() + }), ..Default::default() }, "B", @@ -32,13 +35,5 @@ fn test_default() { resource_pots.sort_by_key(|p| p.id.clone()); - assert_eq!(resource_pots.len(), 3); - assert_eq!(resource_pots[0].immutable, false); - assert_eq!(resource_pots[0].modules(), vec![&"B".into(), &"E".into()]); - - assert_eq!(resource_pots[1].immutable, true); - assert_eq!(resource_pots[1].modules(), vec![&"D".into()]); - - assert_eq!(resource_pots[2].immutable, true); - assert_eq!(resource_pots[2].modules(), vec![&"H".into()]); + assert_resource_pots!(resource_pots); } diff --git a/crates/plugin_partial_bundling/src/merge_module_pots/test_enforce_configs.rs b/crates/plugin_partial_bundling/src/merge_module_pots/test_enforce_configs.rs index 8cd765818..524021fe9 100644 --- a/crates/plugin_partial_bundling/src/merge_module_pots/test_enforce_configs.rs +++ b/crates/plugin_partial_bundling/src/merge_module_pots/test_enforce_configs.rs @@ -1,5 +1,5 @@ -use farmfe_core::config::partial_bundling::PartialBundlingConfig; -use farmfe_testing_helpers::construct_test_module_graph_complex; +use farmfe_core::config::{partial_bundling::PartialBundlingConfig, Config}; +use farmfe_testing_helpers::{assert_resource_pots, construct_test_module_graph_complex}; use super::{common::create_test_module_pot, merge_module_pots, ModuleGroupModulePots}; @@ -9,10 +9,10 @@ fn test_enforce_configs_min_size() { let mut module_group_module_pots = ModuleGroupModulePots::new("B".into()); let size = 10 * 1024; - let module_bucket_b = create_test_module_pot(&mut module_graph, &"B".into(), size, false); - let module_bucket_e = create_test_module_pot(&mut module_graph, &"E".into(), size, false); - let module_bucket_d = create_test_module_pot(&mut module_graph, &"D".into(), size * 2, true); - let module_bucket_h = create_test_module_pot(&mut module_graph, &"H".into(), size, true); + let module_bucket_b = create_test_module_pot(&mut module_graph, &"B".into(), "B", size, false); + let module_bucket_e = create_test_module_pot(&mut module_graph, &"E".into(), "E", size, false); + let module_bucket_d = create_test_module_pot(&mut module_graph, &"D".into(), "D", size * 2, true); + let module_bucket_h = create_test_module_pot(&mut module_graph, &"H".into(), "H", size, true); module_group_module_pots .add_module_pots("B_E".to_string(), vec![module_bucket_b, module_bucket_e]); @@ -21,10 +21,13 @@ fn test_enforce_configs_min_size() { let mut resource_pots = merge_module_pots( module_group_module_pots, - &PartialBundlingConfig { - target_concurrent_requests: 2, - target_min_size: 20 * 1024, - enforce_target_min_size: true, + &Config { + partial_bundling: Box::new(PartialBundlingConfig { + target_concurrent_requests: 2, + target_min_size: 20 * 1024, + enforce_target_min_size: true, + ..Default::default() + }), ..Default::default() }, "B", @@ -34,11 +37,7 @@ fn test_enforce_configs_min_size() { resource_pots.sort_by_key(|p| p.id.clone()); assert_eq!(resource_pots.len(), 2); - assert_eq!(resource_pots[0].immutable, false); - assert_eq!(resource_pots[0].modules(), vec![&"B".into(), &"E".into()]); - - assert_eq!(resource_pots[1].immutable, true); - assert_eq!(resource_pots[1].modules(), vec![&"D".into(), &"H".into()]); + assert_resource_pots!(resource_pots) } #[test] @@ -47,10 +46,10 @@ fn test_enforce_configs_concurrent_requests() { let mut module_group_module_pots = ModuleGroupModulePots::new("B".into()); let size = 10 * 1024; - let module_bucket_b = create_test_module_pot(&mut module_graph, &"B".into(), size, false); - let module_bucket_e = create_test_module_pot(&mut module_graph, &"E".into(), size, false); - let module_bucket_d = create_test_module_pot(&mut module_graph, &"D".into(), size * 2, true); - let module_bucket_h = create_test_module_pot(&mut module_graph, &"H".into(), size, true); + let module_bucket_b = create_test_module_pot(&mut module_graph, &"B".into(), "B", size, false); + let module_bucket_e = create_test_module_pot(&mut module_graph, &"E".into(), "E", size, false); + let module_bucket_d = create_test_module_pot(&mut module_graph, &"D".into(), "D", size * 2, true); + let module_bucket_h = create_test_module_pot(&mut module_graph, &"H".into(), "H", size, true); module_group_module_pots .add_module_pots("B_E".to_string(), vec![module_bucket_b, module_bucket_e]); @@ -59,10 +58,13 @@ fn test_enforce_configs_concurrent_requests() { let mut resource_pots = merge_module_pots( module_group_module_pots, - &PartialBundlingConfig { - target_concurrent_requests: 2, - target_min_size: 20 * 1024, - enforce_target_concurrent_requests: true, + &Config { + partial_bundling: Box::new(PartialBundlingConfig { + target_concurrent_requests: 2, + target_min_size: 20 * 1024, + enforce_target_concurrent_requests: true, + ..Default::default() + }), ..Default::default() }, "B", @@ -72,9 +74,5 @@ fn test_enforce_configs_concurrent_requests() { resource_pots.sort_by_key(|p| p.id.clone()); assert_eq!(resource_pots.len(), 2); - assert_eq!(resource_pots[0].immutable, true); - assert_eq!(resource_pots[0].modules(), vec![&"D".into(), &"H".into()]); - - assert_eq!(resource_pots[1].immutable, false); - assert_eq!(resource_pots[1].modules(), vec![&"B".into(), &"E".into()]); + assert_resource_pots!(resource_pots); } diff --git a/crates/plugin_partial_bundling/src/module_pot.rs b/crates/plugin_partial_bundling/src/module_pot.rs index 01cc9456b..3d24821bd 100644 --- a/crates/plugin_partial_bundling/src/module_pot.rs +++ b/crates/plugin_partial_bundling/src/module_pot.rs @@ -8,24 +8,33 @@ use farmfe_core::module::{ModuleId, ModuleType}; /// 2. Modules in the same immutable package are in the same ModulePot. For example, A, B are both in ModuleBucket_A_B and they are also in the same immutable package, then A, B would be in the same Module Pot. /// 3. For other modules, a module is a module pot pub struct ModulePot { - pub name: String, + pub name: Option, + pub id: String, pub size: usize, pub module_type: ModuleType, pub immutable: bool, pub execution_order: usize, - - modules: HashSet, + pub enforce: bool, + pub modules: HashSet, } impl ModulePot { - pub fn new(name: String, module_type: ModuleType, immutable: bool) -> Self { + pub fn new( + id: String, + name: Option, + module_type: ModuleType, + immutable: bool, + enforce: bool, + ) -> Self { Self { + id, name, modules: HashSet::new(), size: 0, module_type, immutable, execution_order: usize::MAX, + enforce, } } diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-10.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-10.snap new file mode 100644 index 000000000..6be0c3c99 --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-10.snap @@ -0,0 +1,22 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: None, + id: "utils/c.ts", + size: 1024, + module_type: Js, + immutable: false, + execution_order: 3, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "utils/c.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-11.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-11.snap new file mode 100644 index 000000000..07c317201 --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-11.snap @@ -0,0 +1,28 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: Some( + "test", + ), + id: "test", + size: 15360, + module_type: Js, + immutable: false, + execution_order: 1, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "src/a.ts", + query_string: "", + }, + ModuleId { + relative_path: "src/b.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-12.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-12.snap new file mode 100644 index 000000000..6be0c3c99 --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-12.snap @@ -0,0 +1,22 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: None, + id: "utils/c.ts", + size: 1024, + module_type: Js, + immutable: false, + execution_order: 3, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "utils/c.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-2.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-2.snap new file mode 100644 index 000000000..6be0c3c99 --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-2.snap @@ -0,0 +1,22 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: None, + id: "utils/c.ts", + size: 1024, + module_type: Js, + immutable: false, + execution_order: 3, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "utils/c.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-3.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-3.snap new file mode 100644 index 000000000..c3006641d --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-3.snap @@ -0,0 +1,22 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: None, + id: "src/a.ts", + size: 10240, + module_type: Js, + immutable: false, + execution_order: 1, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "src/a.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-4.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-4.snap new file mode 100644 index 000000000..224d744ca --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-4.snap @@ -0,0 +1,22 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: None, + id: "src/b.ts", + size: 5120, + module_type: Js, + immutable: false, + execution_order: 2, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "src/b.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-5.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-5.snap new file mode 100644 index 000000000..6be0c3c99 --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-5.snap @@ -0,0 +1,22 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: None, + id: "utils/c.ts", + size: 1024, + module_type: Js, + immutable: false, + execution_order: 3, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "utils/c.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-6.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-6.snap new file mode 100644 index 000000000..c3006641d --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-6.snap @@ -0,0 +1,22 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: None, + id: "src/a.ts", + size: 10240, + module_type: Js, + immutable: false, + execution_order: 1, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "src/a.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-7.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-7.snap new file mode 100644 index 000000000..224d744ca --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-7.snap @@ -0,0 +1,22 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: None, + id: "src/b.ts", + size: 5120, + module_type: Js, + immutable: false, + execution_order: 2, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "src/b.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-8.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-8.snap new file mode 100644 index 000000000..6be0c3c99 --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-8.snap @@ -0,0 +1,22 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: None, + id: "utils/c.ts", + size: 1024, + module_type: Js, + immutable: false, + execution_order: 3, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "utils/c.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-9.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-9.snap new file mode 100644 index 000000000..07c317201 --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group-9.snap @@ -0,0 +1,28 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: Some( + "test", + ), + id: "test", + size: 15360, + module_type: Js, + immutable: false, + execution_order: 1, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "src/a.ts", + query_string: "", + }, + ModuleId { + relative_path: "src/b.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group.snap new file mode 100644 index 000000000..07c317201 --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_group.snap @@ -0,0 +1,28 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: Some( + "test", + ), + id: "test", + size: 15360, + module_type: Js, + immutable: false, + execution_order: 1, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "src/a.ts", + query_string: "", + }, + ModuleId { + relative_path: "src/b.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_package-2.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_package-2.snap new file mode 100644 index 000000000..4223962b8 --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_package-2.snap @@ -0,0 +1,26 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: None, + id: "test-package@1.0.0", + size: 15360, + module_type: Js, + immutable: true, + execution_order: 2, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "tests/fixtures/generate_module_pots/basic/index.ts", + query_string: "", + }, + ModuleId { + relative_path: "tests/fixtures/generate_module_pots/basic/utils.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_package.snap b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_package.snap new file mode 100644 index 000000000..432b303b6 --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/generate_module_pots_package.snap @@ -0,0 +1,22 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_pots.rs +input_file: crates/plugin_partial_bundling/src/generate_module_pots.rs +--- +( + ModulePot { + name: None, + id: "test-package1@1.0.0", + size: 1024, + module_type: Js, + immutable: true, + execution_order: 1, + enforce: false, + modules: {}, + }, + [ + ModuleId { + relative_path: "tests/fixtures/generate_module_pots/basic1/index.ts", + query_string: "", + }, + ], +) diff --git a/crates/plugin_partial_bundling/src/snapshots/group_module_buckets_for_module_group.snap b/crates/plugin_partial_bundling/src/snapshots/group_module_buckets_for_module_group.snap new file mode 100644 index 000000000..9c43481d1 --- /dev/null +++ b/crates/plugin_partial_bundling/src/snapshots/group_module_buckets_for_module_group.snap @@ -0,0 +1,62 @@ +--- +source: crates/plugin_partial_bundling/src/generate_module_buckets.rs +input_file: crates/plugin_partial_bundling/src/generate_module_buckets.rs +--- +[ + ModuleGroupBuckets { + module_group_id: ModuleId { + relative_path: "A", + query_string: "", + }, + resource_type: Initial, + buckets: [ + "__farm_unknown_false_A_F", + ], + }, + ModuleGroupBuckets { + module_group_id: ModuleId { + relative_path: "B", + query_string: "", + }, + resource_type: Initial, + buckets: [ + "__farm_unknown_false_B", + "__farm_unknown_false_B_D", + "__farm_unknown_false_B_D_F_G", + ], + }, + ModuleGroupBuckets { + module_group_id: ModuleId { + relative_path: "D", + query_string: "", + }, + resource_type: Async, + buckets: [ + "__farm_unknown_false_B_D", + "__farm_unknown_false_B_D_F_G", + ], + }, + ModuleGroupBuckets { + module_group_id: ModuleId { + relative_path: "F", + query_string: "", + }, + resource_type: Async, + buckets: [ + "__farm_unknown_false_A_F", + "__farm_unknown_false_B_D_F_G", + "__farm_unknown_false_F", + ], + }, + ModuleGroupBuckets { + module_group_id: ModuleId { + relative_path: "G", + query_string: "", + }, + resource_type: Async, + buckets: [ + "__farm_unknown_false_B_D_F_G", + "__farm_unknown_false_G", + ], + }, +] diff --git a/crates/plugin_partial_bundling/src/utils.rs b/crates/plugin_partial_bundling/src/utils.rs index ca11257ac..10660aee9 100644 --- a/crates/plugin_partial_bundling/src/utils.rs +++ b/crates/plugin_partial_bundling/src/utils.rs @@ -1,4 +1,4 @@ -use std::collections::HashSet; +use std::collections::{HashMap, HashSet}; use std::path::PathBuf; use farmfe_core::module::ModuleId; @@ -26,3 +26,7 @@ pub fn hash_module_ids(module_ids: &HashSet) -> String { sha256(&str.into_bytes(), 4) } + +pub fn group_is_enforce(group_name: &str, groups_enforce_map: &HashMap) -> bool { + groups_enforce_map.get(group_name).cloned().unwrap_or(false) +} diff --git a/crates/plugin_resolve/src/resolver.rs b/crates/plugin_resolve/src/resolver.rs index f38abe60d..d993c3fec 100644 --- a/crates/plugin_resolve/src/resolver.rs +++ b/crates/plugin_resolve/src/resolver.rs @@ -5,6 +5,7 @@ use std::{ sync::Arc, }; +use farmfe_core::config::{AliasItem, StringOrRegex}; use farmfe_core::regex; use farmfe_core::{ common::PackageJsonInfo, @@ -416,44 +417,100 @@ impl Resolver { ) -> Option { farm_profile_function!("try_alias".to_string()); // sort the alias by length, so that the longest alias will be matched first - let mut alias_list: Vec<_> = context.config.resolve.alias.keys().collect(); - alias_list.sort_by(|a, b| b.len().cmp(&a.len())); - for alias in alias_list { - let replaced = context.config.resolve.alias.get(alias).unwrap(); + // let mut alias_list: Vec<_> = context.config.resolve.alias.keys().collect(); + // alias_list.sort_by(|a, b| b.len().cmp(&a.len())); + // for alias in alias_list { + // let replaced = context.config.resolve.alias.get(alias).unwrap(); + // let mut result = None; + + // // try regex alias first + // if let Some(alias) = alias.strip_prefix(REGEX_PREFIX) { + // let regex = regex::Regex::new(alias).unwrap(); + // if regex.is_match(source) { + // let replaced = regex.replace(source, replaced.as_str()).to_string(); + // result = self.resolve(&replaced, base_dir.clone(), kind, options, context); + // } + // } else if alias.ends_with('$') && source == alias.trim_end_matches('$') { + // result = self.resolve(replaced, base_dir.clone(), kind, options, context); + // } else if !alias.ends_with('$') && source.starts_with(alias) { + // // Add absolute path and values in node_modules package + + // let source_left = RelativePath::new(source.trim_start_matches(alias)); + // let new_source = source_left + // .to_logical_path(replaced) + // .to_string_lossy() + // .to_string(); + // if Path::new(&new_source).is_absolute() && !Path::new(&new_source).is_relative() { + // result = self.resolve(&new_source, base_dir.clone(), kind, options, context); + // } + // let (res, _) = self._try_node_modules_internal( + // new_source.as_str(), + // base_dir.clone(), + // kind, + // options, + // context, + // ); + // if let Some(resolve_result) = res { + // let resolved_path = resolve_result.resolved_path; + // result = self.resolve(&resolved_path, base_dir.clone(), kind, options, context); + // } + // } + + // if result.is_some() { + // return result; + // } + // } + + for alias_item in &context.config.resolve.alias { let mut result = None; - // try regex alias first - if let Some(alias) = alias.strip_prefix(REGEX_PREFIX) { - let regex = regex::Regex::new(alias).unwrap(); - if regex.is_match(source) { - let replaced = regex.replace(source, replaced.as_str()).to_string(); - result = self.resolve(&replaced, base_dir.clone(), kind, options, context); - } - } else if alias.ends_with('$') && source == alias.trim_end_matches('$') { - result = self.resolve(replaced, base_dir.clone(), kind, options, context); - } else if !alias.ends_with('$') && source.starts_with(alias) { - // Add absolute path and values in node_modules package - - let source_left = RelativePath::new(source.trim_start_matches(alias)); - let new_source = source_left - .to_logical_path(replaced) - .to_string_lossy() - .to_string(); - if Path::new(&new_source).is_absolute() && !Path::new(&new_source).is_relative() { - result = self.resolve(&new_source, base_dir.clone(), kind, options, context); - } - let (res, _) = self._try_node_modules_internal( - new_source.as_str(), - base_dir.clone(), - kind, - options, - context, - ); - if let Some(resolve_result) = res { - let resolved_path = resolve_result.resolved_path; - result = self.resolve(&resolved_path, base_dir.clone(), kind, options, context); - } + match alias_item { + AliasItem::Complex { find, replacement } => match find { + StringOrRegex::Regex(regex) => { + if regex.is_match(source) { + let replaced = regex.replace(source, replacement.as_str()).to_string(); + result = self.resolve(&replaced, base_dir.clone(), kind, options, context); + } + } + StringOrRegex::String(alias) => { + if let Some(regex_str) = alias.strip_prefix(REGEX_PREFIX) { + if let Ok(regex) = regex::Regex::new(regex_str) { + if regex.is_match(source) { + let replaced = regex.replace(source, replacement.as_str()).to_string(); + result = self.resolve(&replaced, base_dir.clone(), kind, options, context); + } + } + } else if alias.ends_with('$') && source == alias.trim_end_matches('$') { + result = self.resolve(replacement, base_dir.clone(), kind, options, context); + } else if !alias.ends_with('$') && source.starts_with(alias) { + let source_left = RelativePath::new(source.trim_start_matches(alias)); + let new_source = source_left + .to_logical_path(replacement) + .to_string_lossy() + .to_string(); + + if Path::new(&new_source).is_absolute() && !Path::new(&new_source).is_relative() { + result = self.resolve(&new_source, base_dir.clone(), kind, options, context); + } + + if result.is_none() { + let (res, _) = self._try_node_modules_internal( + new_source.as_str(), + base_dir.clone(), + kind, + options, + context, + ); + if let Some(resolve_result) = res { + let resolved_path = resolve_result.resolved_path; + result = self.resolve(&resolved_path, base_dir.clone(), kind, options, context); + } + } + } + } + }, + // AliasItem::Simple(_) => {} } if result.is_some() { diff --git a/crates/plugin_resolve/src/resolver/browser.rs b/crates/plugin_resolve/src/resolver/browser.rs index fac40fd50..134dbcfb3 100644 --- a/crates/plugin_resolve/src/resolver/browser.rs +++ b/crates/plugin_resolve/src/resolver/browser.rs @@ -39,9 +39,7 @@ pub fn try_browser_map( let browser_field = get_field_value_from_package_json_info(package_json_info, "browser"); if let Some(Value::Object(obj)) = browser_field { for (key, value) in obj { - if key == sub_path - || key == format!("{sub_path}.js") - || key == format!("{sub_path}/index.js") + if key == sub_path || key == format!("{sub_path}.js") || key == format!("{sub_path}/index.js") { match value { Value::String(str) => return Some(BrowserMapResult::Str(str.clone())), diff --git a/crates/plugin_resolve/src/resolver/exports.rs b/crates/plugin_resolve/src/resolver/exports.rs index 0d5277e87..940d95857 100644 --- a/crates/plugin_resolve/src/resolver/exports.rs +++ b/crates/plugin_resolve/src/resolver/exports.rs @@ -6,7 +6,7 @@ use std::{ use farmfe_core::{ common::PackageJsonInfo, - config::{Mode}, + config::Mode, context::CompilationContext, farm_profile_function, plugin::ResolveKind, @@ -125,9 +125,7 @@ fn exports( let name = match get_field_value_from_package_json_info(package_json_info, "name") { Some(n) => n, None => { - eprintln!( - "Missing \"name\" field in package.json {package_json_info:?}" - ); + eprintln!("Missing \"name\" field in package.json {package_json_info:?}"); return None; } }; @@ -167,9 +165,7 @@ fn imports( let name = match get_field_value_from_package_json_info(package_json_info, "name") { Some(n) => n, None => { - eprintln!( - "Missing \"name\" field in package.json {package_json_info:?}" - ); + eprintln!("Missing \"name\" field in package.json {package_json_info:?}"); return None; } }; @@ -267,9 +263,7 @@ fn loop_value( fn throws(name: &str, entry: &str, condition: Option) { let message = match condition { Some(cond) if cond != 0 => { - format!( - "No known conditions for \"{entry}\" specifier in \"{name}\" package" - ) + format!("No known conditions for \"{entry}\" specifier in \"{name}\" package") } _ => { format!("Missing \"{entry}\" specifier in \"{name}\" package") diff --git a/crates/plugin_resolve/src/resolver/utils.rs b/crates/plugin_resolve/src/resolver/utils.rs index cbf0dd22e..514a98249 100644 --- a/crates/plugin_resolve/src/resolver/utils.rs +++ b/crates/plugin_resolve/src/resolver/utils.rs @@ -1,10 +1,6 @@ use farmfe_core::{common::PackageJsonInfo, farm_profile_function, regex, serde_json::Value}; use once_cell::sync::Lazy; -use std::{ - path::{PathBuf}, - str::FromStr, -}; - +use std::{path::PathBuf, str::FromStr}; static PACKAGE_REGEX: Lazy = Lazy::new(|| regex::Regex::new(r"^(?P[^@][^/]*)|^(?P@[^/]+/[^/]+)").unwrap()); diff --git a/crates/plugin_resolve/tests/mod.rs b/crates/plugin_resolve/tests/mod.rs index 68577b21a..cfbc8499a 100644 --- a/crates/plugin_resolve/tests/mod.rs +++ b/crates/plugin_resolve/tests/mod.rs @@ -1,9 +1,10 @@ use std::{collections::HashMap, sync::Arc}; use farmfe_core::{ - config::{Config, ResolveConfig}, + config::{AliasItem, Config, ResolveConfig, StringOrRegex}, context::CompilationContext, plugin::ResolveKind, + regex::Regex, }; use farmfe_plugin_resolve::resolver::{ResolveOptions, Resolver}; use farmfe_testing_helpers::fixture; @@ -198,19 +199,24 @@ fn resolve_alias() { CompilationContext::new( Config { resolve: Box::new(ResolveConfig { - alias: HashMap::from([ - ("@".to_string(), cwd.to_string_lossy().to_string()), - ("/@".to_string(), cwd.to_string_lossy().to_string()), - // long alias - ( - "@/components".to_string(), - cwd.join("components").to_string_lossy().to_string(), - ), - ( - "$__farm_regex:^/(utils)$".to_string(), - cwd.join("$1").to_string_lossy().to_string(), - ), - ]), + alias: vec![ + AliasItem::Complex { + find: StringOrRegex::String("@".to_string()), + replacement: cwd.to_string_lossy().to_string(), + }, + AliasItem::Complex { + find: StringOrRegex::String("/@".to_string()), + replacement: cwd.to_string_lossy().to_string(), + }, + AliasItem::Complex { + find: StringOrRegex::String("@/components".to_string()), + replacement: cwd.join("components").to_string_lossy().to_string(), + }, + AliasItem::Complex { + find: StringOrRegex::String("$__farm_regex:^/(utils)$".to_string()), + replacement: cwd.join("$1").to_string_lossy().to_string(), + }, + ], ..Default::default() }), ..Default::default() diff --git a/crates/plugin_runtime/src/handle_entry_resources.rs b/crates/plugin_runtime/src/handle_entry_resources.rs index 98daca514..73261fde7 100644 --- a/crates/plugin_runtime/src/handle_entry_resources.rs +++ b/crates/plugin_runtime/src/handle_entry_resources.rs @@ -182,9 +182,9 @@ fn get_export_info_code( if let Some(import_as) = import_as { match context.config.output.format { ModuleFormat::CommonJs => format!("module.exports.{import_as} = entry.{name};"), - ModuleFormat::EsModule => format!( - "var {name}=entry.{name};export {{ {name} as {import_as} }};" - ), + ModuleFormat::EsModule => { + format!("var {name}=entry.{name};export {{ {name} as {import_as} }};") + } } } else { match context.config.output.format { diff --git a/crates/plugin_runtime/src/lib.rs b/crates/plugin_runtime/src/lib.rs index 0089c60fa..b389cf725 100644 --- a/crates/plugin_runtime/src/lib.rs +++ b/crates/plugin_runtime/src/lib.rs @@ -9,8 +9,8 @@ use std::{ use farmfe_core::{ config::{ config_regex::ConfigRegex, external::ExternalConfig, - partial_bundling::PartialBundlingEnforceResourceConfig, Config, ModuleFormat, TargetEnv, - FARM_MODULE_SYSTEM, + partial_bundling::PartialBundlingEnforceResourceConfig, AliasItem, Config, ModuleFormat, + StringOrRegex, TargetEnv, FARM_MODULE_SYSTEM, }, context::CompilationContext, enhanced_magic_string::types::{MappingsOptionHires, SourceMapOptions}, @@ -71,10 +71,10 @@ impl Plugin for FarmPluginRuntime { } if !config.runtime.swc_helpers_path.is_empty() { - config.resolve.alias.insert( - "@swc/helpers".to_string(), - config.runtime.swc_helpers_path.clone(), - ); + config.resolve.alias.push(AliasItem::Complex { + find: StringOrRegex::String("@swc/helpers".to_string()), + replacement: config.runtime.swc_helpers_path.clone(), + }); } config.partial_bundling.enforce_resources.insert( diff --git a/crates/plugin_runtime/src/render_resource_pot/render_module.rs b/crates/plugin_runtime/src/render_resource_pot/render_module.rs index f175c954b..b5f1e4c86 100644 --- a/crates/plugin_runtime/src/render_resource_pot/render_module.rs +++ b/crates/plugin_runtime/src/render_resource_pot/render_module.rs @@ -5,7 +5,7 @@ use farmfe_core::{ error::CompilationError, module::{module_graph::ModuleGraph, Module, ModuleId, ModuleSystem}, resource::resource_pot::RenderedModule, - swc_common::{comments::SingleThreadedComments, util::take::Take, Mark}, + swc_common::{comments::SingleThreadedComments, util::take::Take, Mark, SyntaxContext}, swc_ecma_ast::{ArrowExpr, BlockStmtOrExpr, Expr, ExprStmt}, }; use farmfe_toolkit::{ @@ -141,7 +141,7 @@ pub fn render_module<'a, F: Fn(&ModuleId) -> bool>( } // swc code gen would emit a trailing `;` when is_target_legacy is false. // we can not deal with this situation for now, so we set is_target_legacy to true here, it will be fixed in the future. - wrap_function(&mut cloned_module, unresolved_mark, is_async_module, true); + wrap_function(&mut cloned_module, is_async_module, true); if minify_enabled { minify_js_module( @@ -238,17 +238,12 @@ pub fn render_module<'a, F: Fn(&ModuleId) -> bool>( /// exports.b = b; /// } /// ``` -fn wrap_function( - module: &mut SwcModule, - unresolved_mark: Mark, - is_async_module: bool, - is_target_legacy: bool, -) { +fn wrap_function(module: &mut SwcModule, is_async_module: bool, is_target_legacy: bool) { let body = module.body.take(); let params = vec![ Param { - span: DUMMY_SP.apply_mark(unresolved_mark), + span: DUMMY_SP, decorators: vec![], pat: farmfe_core::swc_ecma_ast::Pat::Ident(BindingIdent { id: FARM_MODULE.into(), @@ -256,7 +251,7 @@ fn wrap_function( }), }, Param { - span: DUMMY_SP.apply_mark(unresolved_mark), + span: DUMMY_SP, decorators: vec![], pat: farmfe_core::swc_ecma_ast::Pat::Ident(BindingIdent { id: FARM_MODULE_EXPORT.into(), @@ -264,7 +259,7 @@ fn wrap_function( }), }, Param { - span: DUMMY_SP.apply_mark(unresolved_mark), + span: DUMMY_SP, decorators: vec![], pat: farmfe_core::swc_ecma_ast::Pat::Ident(BindingIdent { id: FARM_REQUIRE.into(), @@ -272,7 +267,7 @@ fn wrap_function( }), }, Param { - span: DUMMY_SP.apply_mark(unresolved_mark), + span: DUMMY_SP, decorators: vec![], pat: farmfe_core::swc_ecma_ast::Pat::Ident(BindingIdent { id: FARM_DYNAMIC_REQUIRE.into(), @@ -298,11 +293,13 @@ fn wrap_function( body: Box::new(BlockStmtOrExpr::BlockStmt(BlockStmt { span: DUMMY_SP, stmts, + ctxt: SyntaxContext::empty(), })), is_async: is_async_module, is_generator: false, type_params: None, return_type: None, + ctxt: SyntaxContext::empty(), })), })) } else { @@ -312,15 +309,17 @@ fn wrap_function( function: Box::new(Function { params, decorators: vec![], - span: DUMMY_SP.apply_mark(unresolved_mark), + span: DUMMY_SP, body: Some(BlockStmt { - span: DUMMY_SP.apply_mark(unresolved_mark), + span: DUMMY_SP, stmts, + ctxt: SyntaxContext::empty(), }), is_generator: false, is_async: is_async_module, type_params: None, return_type: None, + ctxt: SyntaxContext::empty(), }), }))) }; diff --git a/crates/plugin_runtime/src/render_resource_pot/source_replacer.rs b/crates/plugin_runtime/src/render_resource_pot/source_replacer.rs index 94084c620..ddd3b3601 100644 --- a/crates/plugin_runtime/src/render_resource_pot/source_replacer.rs +++ b/crates/plugin_runtime/src/render_resource_pot/source_replacer.rs @@ -11,7 +11,7 @@ use farmfe_core::{ config::{Mode, TargetEnv, FARM_DYNAMIC_REQUIRE, FARM_REQUIRE}, module::{module_graph::ModuleGraph, ModuleId}, plugin::ResolveKind, - swc_common::{Mark, DUMMY_SP}, + swc_common::{Mark, SyntaxContext, DUMMY_SP}, swc_ecma_ast::{ Bool, CallExpr, Callee, Expr, ExprOrSpread, Ident, Lit, MemberExpr, MemberProp, Str, }, @@ -133,6 +133,7 @@ impl SourceReplacer<'_> { span: DUMMY_SP, sym: FARM_REQUIRE.into(), optional: false, + ctxt: SyntaxContext::empty(), }))); let (id, resolve_kind) = @@ -200,6 +201,7 @@ impl SourceReplacer<'_> { span: DUMMY_SP, sym: FARM_DYNAMIC_REQUIRE.into(), optional: false, + ctxt: SyntaxContext::empty(), }))); str.value = id.id(self.mode.clone()).into(); diff --git a/crates/plugin_runtime/src/render_resource_pot/transform_async_module.rs b/crates/plugin_runtime/src/render_resource_pot/transform_async_module.rs index f46656663..ae5f172a5 100644 --- a/crates/plugin_runtime/src/render_resource_pot/transform_async_module.rs +++ b/crates/plugin_runtime/src/render_resource_pot/transform_async_module.rs @@ -1,10 +1,10 @@ use farmfe_core::{ config::FARM_REQUIRE, - swc_common::DUMMY_SP, + swc_common::{SyntaxContext, DUMMY_SP}, swc_ecma_ast::{ ArrayLit, ArrayPat, AwaitExpr, BindingIdent, CallExpr, Callee, Decl, Expr, ExprOrSpread, - ExprStmt, Ident, Lit, MemberExpr, MemberProp, Module, ModuleItem, Pat, Stmt, Str, VarDecl, - VarDeclKind, VarDeclarator, + ExprStmt, Ident, IdentName, Lit, MemberExpr, MemberProp, Module, ModuleItem, Pat, Stmt, Str, + VarDecl, VarDeclKind, VarDeclarator, }, }; use farmfe_toolkit::swc_ecma_visit::{VisitMut, VisitMutWith}; @@ -99,6 +99,7 @@ pub fn transform_async_module(ast: &mut Module) { span: DUMMY_SP, sym: rename_ident(id).into(), optional: false, + ctxt: SyntaxContext::empty(), }, type_ann: None, }) @@ -111,6 +112,7 @@ pub fn transform_async_module(ast: &mut Module) { init: Some(Box::new(create_promise_all(&await_all))), definite: false, }], + ctxt: SyntaxContext::empty(), }))); ast.body.insert(0, ModuleItem::Stmt(await_all_stmt)); } @@ -128,11 +130,11 @@ fn create_promise_all(await_all: &Vec<(Option, String)>) -> Expr { span: DUMMY_SP, sym: "Promise".into(), optional: false, + ctxt: SyntaxContext::empty(), })), - prop: MemberProp::Ident(Ident { + prop: MemberProp::Ident(IdentName { span: DUMMY_SP, sym: "all".into(), - optional: false, }), }))), args: vec![ExprOrSpread { @@ -149,6 +151,7 @@ fn create_promise_all(await_all: &Vec<(Option, String)>) -> Expr { callee: Callee::Expr(Box::new(Expr::Ident(Ident::new( FARM_REQUIRE.into(), DUMMY_SP, + SyntaxContext::empty(), )))), args: vec![ExprOrSpread { spread: None, @@ -159,6 +162,7 @@ fn create_promise_all(await_all: &Vec<(Option, String)>) -> Expr { }))), }], type_args: None, + ctxt: SyntaxContext::empty(), })), }) }) @@ -166,6 +170,7 @@ fn create_promise_all(await_all: &Vec<(Option, String)>) -> Expr { })), }], type_args: None, + ctxt: SyntaxContext::empty(), })), }) } @@ -190,7 +195,11 @@ impl VisitMut for FarmRequireVisitor { fn visit_mut_expr(&mut self, expr: &mut farmfe_core::swc_ecma_ast::Expr) { if let Some(id) = try_get_farm_require_id(expr) { self.requires.push(id); - *expr = Expr::Ident(Ident::new(rename_ident(&self.name).into(), DUMMY_SP)); + *expr = Expr::Ident(Ident::new( + rename_ident(&self.name).into(), + DUMMY_SP, + SyntaxContext::empty(), + )); } else { expr.visit_mut_children_with(self); } diff --git a/crates/plugin_runtime/src/render_resource_pot/transform_module_decls.rs b/crates/plugin_runtime/src/render_resource_pot/transform_module_decls.rs index a5a4ddd76..35d63c48f 100644 --- a/crates/plugin_runtime/src/render_resource_pot/transform_module_decls.rs +++ b/crates/plugin_runtime/src/render_resource_pot/transform_module_decls.rs @@ -2,14 +2,14 @@ use std::{collections::HashMap, ffi::OsStr}; use farmfe_core::{ regex::Regex, - swc_common::{util::take::Take, Mark, DUMMY_SP}, + swc_common::{util::take::Take, Mark, SyntaxContext, DUMMY_SP}, swc_ecma_ast::{ ArrowExpr, AssignExpr, AssignOp, AssignTarget, BindingIdent, BlockStmt, BlockStmtOrExpr, CallExpr, Callee, Class, ClassDecl, ClassExpr, Decl, ExportAll, ExportDecl, ExportDefaultDecl, ExportDefaultExpr, Expr, ExprOrSpread, ExprStmt, FnDecl, FnExpr, Function, Id, Ident, - ImportDecl, ImportSpecifier, KeyValueProp, Lit, MemberExpr, MemberProp, Module as SwcModule, - ModuleDecl, ModuleExportName, ModuleItem, NamedExport, Pat, Prop, ReturnStmt, - SimpleAssignTarget, Stmt, Str, VarDecl, VarDeclKind, VarDeclarator, + IdentName, ImportDecl, ImportSpecifier, KeyValueProp, Lit, MemberExpr, MemberProp, + Module as SwcModule, ModuleDecl, ModuleExportName, ModuleItem, NamedExport, Pat, Prop, + ReturnStmt, SimpleAssignTarget, Stmt, Str, VarDecl, VarDeclKind, VarDeclarator, }, }; use farmfe_toolkit::{ @@ -142,6 +142,7 @@ pub fn transform_module_decls( expr: Box::new(Expr::Ident(create_exports_ident(unresolved_mark))), }], type_args: None, + ctxt: SyntaxContext::default(), })), })), ) @@ -182,13 +183,13 @@ fn transform_import_decl( MemberExpr { span: DUMMY_SP, obj: Box::new(Expr::Ident(val_name_ident.clone())), - prop: MemberProp::Ident(imported_ident), + prop: MemberProp::Ident(IdentName::new(imported_ident.sym, imported_ident.span)), } } else { MemberExpr { span: DUMMY_SP, obj: Box::new(Expr::Ident(val_name_ident.clone())), - prop: MemberProp::Ident(Ident::new(specifier_ident.sym.clone(), DUMMY_SP)), + prop: MemberProp::Ident(IdentName::new(specifier_ident.sym.clone(), DUMMY_SP)), } }; import_bindings_map.insert(specifier_ident.to_id(), Expr::Member(init)); @@ -456,7 +457,11 @@ fn transform_export_default_decl( ) -> ExportModuleItem { match default_decl.decl { farmfe_core::swc_ecma_ast::DefaultDecl::Class(class_decl) => { - let exported_ident = Ident::new(FARM_MODULE_SYSTEM_DEFAULT.into(), DUMMY_SP); + let exported_ident = Ident::new( + FARM_MODULE_SYSTEM_DEFAULT.into(), + DUMMY_SP, + SyntaxContext::empty(), + ); return create_export_class_decl_stmts( class_decl.ident, exported_ident, @@ -466,7 +471,11 @@ fn transform_export_default_decl( ); } farmfe_core::swc_ecma_ast::DefaultDecl::Fn(fn_decl) => { - let exported_ident = Ident::new(FARM_MODULE_SYSTEM_DEFAULT.into(), DUMMY_SP); + let exported_ident = Ident::new( + FARM_MODULE_SYSTEM_DEFAULT.into(), + DUMMY_SP, + SyntaxContext::empty(), + ); return create_export_fn_decl_stmts( fn_decl.ident, exported_ident, @@ -485,7 +494,11 @@ fn transform_export_default_expr( ) -> Vec { let mut items = vec![]; let exports_assign_left = create_exports_assign_left( - Ident::new(FARM_MODULE_SYSTEM_DEFAULT.into(), DUMMY_SP), + Ident::new( + FARM_MODULE_SYSTEM_DEFAULT.into(), + DUMMY_SP, + SyntaxContext::empty(), + ), unresolved_mark, ); items.push(create_exports_assign_stmt( @@ -516,6 +529,7 @@ fn transform_export_all(export_all: ExportAll, unresolved_mark: Mark) -> Vec) -> ModuleItem { init: Some(init), definite: false, }], + ctxt: SyntaxContext::empty(), })))) } @@ -562,13 +577,15 @@ fn create_require_call_expr(src: Str, unresolved_mark: Mark) -> Box { span: DUMMY_SP, callee: Callee::Expr(Box::new(Expr::Ident(Ident::new( FARM_MODULE_SYSTEM_REQUIRE.into(), - DUMMY_SP.apply_mark(unresolved_mark), + DUMMY_SP, + SyntaxContext::empty().apply_mark(unresolved_mark), )))), args: vec![ExprOrSpread { spread: None, expr: Box::new(Expr::Lit(Lit::Str(src))), }], type_args: None, + ctxt: SyntaxContext::empty(), })) } @@ -585,21 +602,26 @@ fn create_require_stmt(src: Str, unresolved_mark: Mark) -> (ModuleItem, Ident) { fn create_require_val_ident(src: &str) -> Ident { let val_name = get_name_from_src(src); - Ident::new(val_name.into(), DUMMY_SP.apply_mark(Mark::new())) + Ident::new( + val_name.into(), + DUMMY_SP, + SyntaxContext::empty().apply_mark(Mark::new()), + ) } fn create_exports_assign_left(exported_ident: Ident, unresolved_mark: Mark) -> AssignTarget { AssignTarget::Simple(SimpleAssignTarget::Member(MemberExpr { span: DUMMY_SP, obj: Box::new(Expr::Ident(create_exports_ident(unresolved_mark))), - prop: MemberProp::Ident(exported_ident), + prop: MemberProp::Ident(IdentName::new(exported_ident.sym, exported_ident.span)), })) } fn create_exports_ident(unresolved_mark: Mark) -> Ident { Ident::new( FARM_MODULE_SYSTEM_EXPORTS.into(), - DUMMY_SP.apply_mark(unresolved_mark), + DUMMY_SP, + SyntaxContext::empty().apply_mark(unresolved_mark), ) } @@ -716,12 +738,13 @@ fn create_export_class_decl_stmts( } fn create_module_helper_callee(helper: &str, unresolved_mark: Mark) -> Callee { - let prop = Ident::new(helper.into(), DUMMY_SP); + let prop = IdentName::new(helper.into(), DUMMY_SP); Callee::Expr(Box::new(Expr::Member(MemberExpr { span: DUMMY_SP, obj: Box::new(Expr::Ident(Ident::new( FARM_MODULE_SYSTEM_MODULE.into(), - DUMMY_SP.apply_mark(unresolved_mark), + DUMMY_SP, + SyntaxContext::empty().apply_mark(unresolved_mark), ))), prop: MemberProp::Ident(prop), }))) @@ -758,6 +781,7 @@ fn create_module_helper_call_expr( callee, args, type_args: None, + ctxt: SyntaxContext::empty(), }; call_expr } @@ -786,14 +810,17 @@ fn create_define_export_property_ident_call_expr( span: DUMMY_SP, arg: Some(Box::new(Expr::Ident(Ident::new( local_ident.0, - DUMMY_SP.with_ctxt(local_ident.1), + DUMMY_SP, + local_ident.1, )))), })], + ctxt: SyntaxContext::empty(), }), is_generator: false, is_async: false, type_params: None, return_type: None, + ctxt: SyntaxContext::empty(), }), }) } else { @@ -802,12 +829,14 @@ fn create_define_export_property_ident_call_expr( params: vec![], body: Box::new(BlockStmtOrExpr::Expr(Box::new(Expr::Ident(Ident::new( local_ident.0, - DUMMY_SP.with_ctxt(local_ident.1), + DUMMY_SP, + local_ident.1, ))))), is_generator: false, is_async: false, return_type: None, type_params: None, + ctxt: SyntaxContext::empty(), }) }; // module.o(exports, ident, function(){return ident;}) diff --git a/crates/plugin_script/Cargo.toml b/crates/plugin_script/Cargo.toml index 3dc12b3c9..ce748bee5 100644 --- a/crates/plugin_script/Cargo.toml +++ b/crates/plugin_script/Cargo.toml @@ -15,16 +15,16 @@ farmfe_toolkit = { path = "../toolkit", version = "0.0.13" } farmfe_testing_helpers = { path = "../testing_helpers", version = "0.0.13" } farmfe_utils = { path = "../utils", version = "0.1.5" } farmfe_swc_transformer_import_glob = { path = "../swc_transformer_import_glob", version = "0.0.11" } -swc_plugin_proxy = { version = "0.44.2", features = [ +swc_plugin_proxy = { version = "1.0.0", features = [ "plugin-rt", ], optional = true } -swc_plugin_runner = { version = "0.109.1", features = [ +swc_plugin_runner = { version = "1.0.0", features = [ "ecma", "rkyv-impl", "plugin_transform_schema_v1", "plugin_transform_host_native", ], optional = true } -swc_ecma_loader = { version = "0.46.1", features = [ +swc_ecma_loader = { version = "1.0.0", features = [ "cache", "node", "tsc", diff --git a/crates/plugin_script/src/import_meta_visitor.rs b/crates/plugin_script/src/import_meta_visitor.rs index 0148a2f99..87fd15d30 100644 --- a/crates/plugin_script/src/import_meta_visitor.rs +++ b/crates/plugin_script/src/import_meta_visitor.rs @@ -5,10 +5,10 @@ use farmfe_core::{ context::CompilationContext, module::ModuleId, plugin::{PluginResolveHookParam, ResolveKind}, - swc_common::DUMMY_SP, + swc_common::{SyntaxContext, DUMMY_SP}, swc_ecma_ast::{ - CallExpr, Callee, Expr, ExprOrSpread, Ident, Lit, MemberExpr, MemberProp, MetaPropKind, - NewExpr, Str, + CallExpr, Callee, Expr, ExprOrSpread, Ident, IdentName, Lit, MemberExpr, MemberProp, + MetaPropKind, NewExpr, Str, }, }; use farmfe_toolkit::swc_ecma_visit::{VisitMut, VisitMutWith}; @@ -31,8 +31,12 @@ impl VisitMut for ImportMetaVisitor { // check if it's hmr accepted *expr = Expr::Member(MemberExpr { span: DUMMY_SP, - obj: Box::new(Expr::Ident(Ident::new(FARM_MODULE.into(), DUMMY_SP))), - prop: MemberProp::Ident(Ident::new("meta".into(), DUMMY_SP)), + obj: Box::new(Expr::Ident(Ident::new( + FARM_MODULE.into(), + DUMMY_SP, + SyntaxContext::empty(), + ))), + prop: MemberProp::Ident(IdentName::new("meta".into(), DUMMY_SP)), }); } } @@ -73,13 +77,13 @@ impl VisitMut for HmrAcceptedVisitor { obj: box Expr::Member(MemberExpr { obj: box Expr::Ident(Ident { sym: module, .. }), - prop: MemberProp::Ident(Ident { sym: meta, .. }), + prop: MemberProp::Ident(IdentName { sym: meta, .. }), .. }), - prop: MemberProp::Ident(Ident { sym: hot, .. }), + prop: MemberProp::Ident(IdentName { sym: hot, .. }), .. }), - prop: MemberProp::Ident(Ident { sym: accept, .. }), + prop: MemberProp::Ident(IdentName { sym: accept, .. }), .. })), args, @@ -189,6 +193,7 @@ impl ImportMetaURLVisitor { }, ]), type_args: None, + ctxt: SyntaxContext::empty(), })), prop: MemberProp::Ident("href".into()), }); diff --git a/crates/plugin_script/src/swc_script_transforms.rs b/crates/plugin_script/src/swc_script_transforms.rs index eda852397..b9778c68f 100644 --- a/crates/plugin_script/src/swc_script_transforms.rs +++ b/crates/plugin_script/src/swc_script_transforms.rs @@ -31,6 +31,7 @@ pub fn strip_typescript( ) -> farmfe_core::error::Result<()> { try_with(cm.clone(), &context.meta.script.globals, || { let top_level_mark = Mark::from_u32(param.meta.as_script().top_level_mark); + let unresolved_mark = Mark::from_u32(param.meta.as_script().unresolved_mark); let ast = param.meta.as_script_mut().take_ast(); let mut program = Program::Module(ast); @@ -40,7 +41,11 @@ pub fn strip_typescript( // Do nothing, jsx should be handled by other plugins } farmfe_core::module::ModuleType::Ts => { - program.visit_mut_with(&mut typescript(default_config(), top_level_mark)); + program.visit_mut_with(&mut typescript( + default_config(), + unresolved_mark, + top_level_mark, + )); } farmfe_core::module::ModuleType::Tsx => { let comments: SingleThreadedComments = param.meta.as_script().comments.clone().into(); @@ -50,9 +55,14 @@ pub fn strip_typescript( default_config(), TsxConfig::default(), comments, + unresolved_mark, + top_level_mark, + )); + program.visit_mut_with(&mut typescript( + default_config(), + unresolved_mark, top_level_mark, )); - program.visit_mut_with(&mut typescript(default_config(), top_level_mark)); } _ => {} } diff --git a/crates/plugin_script/src/transform_import_meta_url/mod.rs b/crates/plugin_script/src/transform_import_meta_url/mod.rs index d124f48c8..4a53e9ede 100644 --- a/crates/plugin_script/src/transform_import_meta_url/mod.rs +++ b/crates/plugin_script/src/transform_import_meta_url/mod.rs @@ -2,11 +2,12 @@ use farmfe_core::{ swc_common::{ comments::{Comments, SingleThreadedComments}, util::take::Take, - Spanned, DUMMY_SP, + Spanned, SyntaxContext, DUMMY_SP, }, swc_ecma_ast::{ - CallExpr, Callee, ComputedPropName, Expr, ExprOrSpread, Ident, KeyValueProp, Lit, MemberExpr, - MemberProp, MetaPropExpr, MetaPropKind, Module, ObjectLit, Prop, PropName, PropOrSpread, + CallExpr, Callee, ComputedPropName, Expr, ExprOrSpread, IdentName, KeyValueProp, Lit, + MemberExpr, MemberProp, MetaPropExpr, MetaPropKind, Module, ObjectLit, Prop, PropName, + PropOrSpread, }, }; use farmfe_toolkit::swc_ecma_visit::{VisitMut, VisitMutWith}; @@ -82,7 +83,7 @@ impl<'a> ImportMetaURLVisitor<'a> { kind: MetaPropKind::ImportMeta, .. }), - prop: MemberProp::Ident(Ident { sym, .. }), + prop: MemberProp::Ident(IdentName { sym, .. }), .. }) = expr { @@ -206,6 +207,7 @@ impl<'a> ImportMetaURLVisitor<'a> { }, ], type_args: None, + ctxt: SyntaxContext::empty(), })), prop: MemberProp::Computed(ComputedPropName { span: DUMMY_SP, diff --git a/crates/plugin_tree_shake/src/remove_hot_update.rs b/crates/plugin_tree_shake/src/remove_hot_update.rs index 0a0d5fbf1..7082c08be 100644 --- a/crates/plugin_tree_shake/src/remove_hot_update.rs +++ b/crates/plugin_tree_shake/src/remove_hot_update.rs @@ -1,7 +1,7 @@ use farmfe_core::{ module::module_graph::ModuleGraph, swc_common::DUMMY_SP, - swc_ecma_ast::{EmptyStmt, Expr, Ident, MemberExpr, MemberProp, Stmt}, + swc_ecma_ast::{EmptyStmt, Expr, Ident, IdentName, MemberExpr, MemberProp, Stmt}, }; use farmfe_toolkit::swc_ecma_visit::{VisitMut, VisitMutWith}; @@ -30,10 +30,10 @@ impl VisitMut for UselessHotUpdateStmtRemover { obj: box Expr::Member(MemberExpr { obj: box Expr::Ident(Ident { sym: module, .. }), - prop: MemberProp::Ident(Ident { sym: meta, .. }), + prop: MemberProp::Ident(IdentName { sym: meta, .. }), .. }), - prop: MemberProp::Ident(Ident { sym: hot, .. }), + prop: MemberProp::Ident(IdentName { sym: hot, .. }), .. }) = &*if_stmt.test { diff --git a/crates/plugin_tree_shake/src/statement_graph.rs b/crates/plugin_tree_shake/src/statement_graph.rs index b5ecafa5a..9eef043fd 100644 --- a/crates/plugin_tree_shake/src/statement_graph.rs +++ b/crates/plugin_tree_shake/src/statement_graph.rs @@ -337,7 +337,6 @@ impl StatementGraph { let deps = analyze_deps_by_used_idents::analyze_deps_by_used_idents(AnalyzeUsedIdentsParams { // 2.2 add edges to graph - id: &index, stmt: item, reverse_defined_idents_map: &reverse_defined_idents_map, }); diff --git a/crates/plugin_tree_shake/src/statement_graph/analyze_deps_by_used_idents.rs b/crates/plugin_tree_shake/src/statement_graph/analyze_deps_by_used_idents.rs index 33fe654a8..4fbf10335 100644 --- a/crates/plugin_tree_shake/src/statement_graph/analyze_deps_by_used_idents.rs +++ b/crates/plugin_tree_shake/src/statement_graph/analyze_deps_by_used_idents.rs @@ -6,7 +6,6 @@ use farmfe_toolkit::swc_ecma_visit::{Visit, VisitWith}; use super::{defined_idents_collector::DefinedIdentsCollector, StatementGraphEdge, StatementId}; pub struct AnalyzeUsedIdentsParams<'a> { - pub id: &'a StatementId, pub stmt: &'a ModuleItem, pub reverse_defined_idents_map: &'a HashMap, } diff --git a/crates/plugin_tree_shake/src/statement_graph/analyze_statement_side_effects.rs b/crates/plugin_tree_shake/src/statement_graph/analyze_statement_side_effects.rs index e833dfa44..6d5dca069 100644 --- a/crates/plugin_tree_shake/src/statement_graph/analyze_statement_side_effects.rs +++ b/crates/plugin_tree_shake/src/statement_graph/analyze_statement_side_effects.rs @@ -177,7 +177,7 @@ impl<'a> Visit for SideEffectsAnalyzer<'a> { farmfe_core::swc_ecma_ast::PropOrSpread::Spread(s) => s.visit_with(self), farmfe_core::swc_ecma_ast::PropOrSpread::Prop(prop) => match &**prop { farmfe_core::swc_ecma_ast::Prop::Shorthand(ident) => { - if self.in_top_level || ident.span.ctxt.outer() == self.top_level_mark { + if self.in_top_level || ident.ctxt.outer() == self.top_level_mark { self .side_effects .merge_side_effects(StatementSideEffects::ReadTopLevelVar(HashSet::from([ @@ -232,16 +232,16 @@ impl<'a> Visit for SideEffectsAnalyzer<'a> { self .side_effects .merge_side_effects(if self.in_assign_left { - if ident.span.ctxt().outer() == self.unresolved_mark { + if ident.ctxt.outer() == self.unresolved_mark { StatementSideEffects::WriteOrCallGlobalVar - } else if self.in_top_level || ident.span.ctxt().outer() == self.top_level_mark { + } else if self.in_top_level || ident.ctxt.outer() == self.top_level_mark { StatementSideEffects::WriteTopLevelVar(HashSet::from([ident.to_id()])) } else { StatementSideEffects::NoSideEffects } - } else if self.in_call && ident.span.ctxt().outer() == self.unresolved_mark { + } else if self.in_call && ident.ctxt.outer() == self.unresolved_mark { StatementSideEffects::WriteOrCallGlobalVar - } else if self.in_top_level || ident.span.ctxt().outer() == self.top_level_mark { + } else if self.in_top_level || ident.ctxt.outer() == self.top_level_mark { StatementSideEffects::ReadTopLevelVar(HashSet::from([ident.to_id()])) } else { StatementSideEffects::NoSideEffects @@ -255,13 +255,13 @@ impl<'a> Visit for SideEffectsAnalyzer<'a> { farmfe_core::swc_ecma_ast::SimpleAssignTarget::Ident(i) => { // for idents that are added by ast transform, the mark may not be top_level_mark // in this case, we treat it as top level as long as current assign expr is in top level - if self.in_top_level || i.id.span.ctxt.outer() == self.top_level_mark { + if self.in_top_level || i.id.ctxt.outer() == self.top_level_mark { self .side_effects .merge_side_effects(StatementSideEffects::WriteTopLevelVar(HashSet::from([i .id .to_id()]))); - } else if i.id.span.ctxt.outer() == self.unresolved_mark { + } else if i.id.ctxt.outer() == self.unresolved_mark { self .side_effects .merge_side_effects(StatementSideEffects::WriteOrCallGlobalVar); diff --git a/crates/swc_transformer_import_glob/src/lib.rs b/crates/swc_transformer_import_glob/src/lib.rs index ee07b6d2b..7d90900ab 100644 --- a/crates/swc_transformer_import_glob/src/lib.rs +++ b/crates/swc_transformer_import_glob/src/lib.rs @@ -18,9 +18,13 @@ use std::collections::HashMap; use std::path::Component; use std::path::PathBuf; +use farmfe_core::config::AliasItem; +use farmfe_core::config::StringOrRegex; use farmfe_core::regex; use farmfe_core::relative_path::RelativePath; +use farmfe_core::swc_common::SyntaxContext; use farmfe_core::swc_common::DUMMY_SP; +use farmfe_core::swc_ecma_ast::IdentName; use farmfe_core::swc_ecma_ast::{ self, ArrayLit, ArrowExpr, BindingIdent, BlockStmtOrExpr, CallExpr, Callee, Expr, ExprOrSpread, Ident, Import, KeyValueProp, Lit, MemberExpr, MemberProp, MetaPropExpr, MetaPropKind, @@ -37,7 +41,7 @@ pub fn transform_import_meta_glob( ast: &mut SwcModule, root: String, cur_dir: String, - alias: &HashMap, + alias: &Vec, ) -> farmfe_core::error::Result<()> { let mut visitor = ImportGlobVisitor::new(cur_dir, root, alias); ast.visit_mut_with(&mut visitor); @@ -75,6 +79,7 @@ pub fn transform_import_meta_glob( local: farmfe_core::swc_ecma_ast::Ident::new( format!("__glob__{index}_{glob_index}").into(), DUMMY_SP, + SyntaxContext::empty(), ), }, )], @@ -138,9 +143,10 @@ fn create_eager_named_import( local: farmfe_core::swc_ecma_ast::Ident::new( format!("__glob__{index}_{glob_index}").into(), DUMMY_SP, + SyntaxContext::empty(), ), imported: Some(farmfe_core::swc_ecma_ast::ModuleExportName::Ident( - Ident::new(import.into(), DUMMY_SP), + Ident::new(import.into(), DUMMY_SP, SyntaxContext::empty()), )), is_type_only: false, }, @@ -171,6 +177,7 @@ fn create_eager_namespace_import( local: farmfe_core::swc_ecma_ast::Ident::new( format!("__glob__{index}_{glob_index}").into(), DUMMY_SP, + SyntaxContext::empty(), ), }, )], @@ -196,6 +203,7 @@ fn create_eager_default_import(index: usize, glob_index: usize, globed_source: & local: farmfe_core::swc_ecma_ast::Ident::new( format!("__glob__{index}_{glob_index}").into(), DUMMY_SP, + SyntaxContext::empty(), ), }, )], @@ -230,12 +238,12 @@ pub struct ImportGlobVisitor<'a> { import_globs: Vec, cur_dir: String, root: String, - alias: &'a HashMap, + alias: &'a Vec, pub errors: Vec, } impl<'a> ImportGlobVisitor<'a> { - pub fn new(cur_dir: String, root: String, alias: &'a HashMap) -> Self { + pub fn new(cur_dir: String, root: String, alias: &'a Vec) -> Self { Self { import_globs: vec![], cur_dir, @@ -283,48 +291,102 @@ impl<'a> ImportGlobVisitor<'a> { import_glob_info } + // fn try_alias(&self, source: &str) -> String { + // let (source, negative) = if source.starts_with('!') { + // (&source[1..], true) + // } else { + // (source, false) + // }; + // let mut result = source.to_string(); + // // sort the alias by length, so that the longest alias will be matched first + // let mut alias_list: Vec<_> = self.alias.keys().collect(); + // alias_list.sort_by(|a, b| b.len().cmp(&a.len())); + + // for alias in alias_list { + // let replaced = self.alias.get(alias).unwrap(); + + // // try regex alias first + // if let Some(alias) = alias.strip_prefix(REGEX_PREFIX) { + // let regex = regex::Regex::new(alias).unwrap(); + // if regex.is_match(source) { + // let replaced = regex.replace(source, replaced.as_str()).to_string(); + // result = replaced; + // break; + // } + // } + + // if alias.ends_with('$') && source == alias.trim_end_matches('$') { + // result = replaced.to_string(); + // break; + // } else if !alias.ends_with('$') && source.starts_with(alias) { + // let source_left = RelativePath::new(source.trim_start_matches(alias)); + // let new_source = source_left.to_logical_path(replaced); + + // result = if new_source.is_absolute() { + // format!( + // "/{}", + // relative(&self.root, &new_source.to_string_lossy().to_string()) + // ) + // } else { + // new_source.to_string_lossy().to_string() + // }; + // break; + // } + // } + + // if negative { + // format!("!{}", result) + // } else { + // result + // } + // } + fn try_alias(&self, source: &str) -> String { let (source, negative) = if source.starts_with('!') { (&source[1..], true) } else { (source, false) }; - let mut result = source.to_string(); - // sort the alias by length, so that the longest alias will be matched first - let mut alias_list: Vec<_> = self.alias.keys().collect(); - alias_list.sort_by(|a, b| b.len().cmp(&a.len())); - - for alias in alias_list { - let replaced = self.alias.get(alias).unwrap(); - - // try regex alias first - if let Some(alias) = alias.strip_prefix(REGEX_PREFIX) { - let regex = regex::Regex::new(alias).unwrap(); - if regex.is_match(source) { - let replaced = regex.replace(source, replaced.as_str()).to_string(); - result = replaced; - break; - } - } - if alias.ends_with('$') && source == alias.trim_end_matches('$') { - result = replaced.to_string(); - break; - } else if !alias.ends_with('$') && source.starts_with(alias) { - let source_left = RelativePath::new(source.trim_start_matches(alias)); - let new_source = source_left.to_logical_path(replaced); - - result = if new_source.is_absolute() { - format!( - "/{}", - relative(&self.root, &new_source.to_string_lossy().to_string()) - ) - } else { - new_source.to_string_lossy().to_string() - }; - break; - } - } + let result = self + .alias + .iter() + .find_map(|alias_item| { + match alias_item { + AliasItem::Complex { find, replacement } => match find { + StringOrRegex::String(alias) => { + if let Some(regex_str) = alias.strip_prefix(REGEX_PREFIX) { + if let Ok(regex) = regex::Regex::new(regex_str) { + if regex.is_match(source) { + return Some(regex.replace(source, replacement.as_str()).to_string()); + } + } + } else if alias.ends_with('$') && source == alias.trim_end_matches('$') { + return Some(replacement.to_string()); + } else if !alias.ends_with('$') && source.starts_with(alias) { + let source_left = RelativePath::new(source.trim_start_matches(alias)); + let new_source = source_left.to_logical_path(replacement); + + return Some(if new_source.is_absolute() { + format!( + "/{}", + relative(&self.root, &new_source.to_string_lossy().to_string()) + ) + } else { + new_source.to_string_lossy().to_string() + }); + } + } + StringOrRegex::Regex(regex) => { + if regex.is_match(source) { + return Some(regex.replace(source, replacement.as_str()).to_string()); + } + } + }, // AliasItem::Simple(_) => {} + } + None + }) + .unwrap_or_else(|| source.to_string()); if negative { format!("!{result}") @@ -495,6 +557,7 @@ impl<'a> ImportGlobVisitor<'a> { Box::new(Expr::Ident(Ident::new( format!("__glob__{cur_index}_{entry_index}").into(), DUMMY_SP, + SyntaxContext::empty(), ))), )) } else { @@ -527,6 +590,7 @@ impl<'a> ImportGlobVisitor<'a> { }))), }], type_args: None, + ctxt: SyntaxContext::empty(), })); if let Some(import) = import.as_ref() { @@ -541,33 +605,40 @@ impl<'a> ImportGlobVisitor<'a> { callee: Callee::Expr(Box::new(Expr::Member(MemberExpr { span: DUMMY_SP, obj: import_call_expr, - prop: MemberProp::Ident(Ident::new("then".into(), DUMMY_SP)), + prop: MemberProp::Ident(IdentName::new("then".into(), DUMMY_SP)), }))), args: vec![ExprOrSpread { spread: None, expr: Box::new(Expr::Arrow(ArrowExpr { span: DUMMY_SP, params: vec![Pat::Ident(BindingIdent { - id: Ident::new("m".into(), DUMMY_SP), + id: Ident::new("m".into(), DUMMY_SP, SyntaxContext::empty()), type_ann: None, })], body: Box::new(BlockStmtOrExpr::Expr(Box::new(Expr::Member(MemberExpr { span: DUMMY_SP, - obj: Box::new(Expr::Ident(Ident::new("m".into(), DUMMY_SP))), - prop: MemberProp::Ident(Ident::new(import.as_str().into(), DUMMY_SP)), + obj: Box::new(Expr::Ident(Ident::new( + "m".into(), + DUMMY_SP, + SyntaxContext::empty(), + ))), + prop: MemberProp::Ident(IdentName::new(import.as_str().into(), DUMMY_SP)), })))), is_async: false, is_generator: false, type_params: None, return_type: None, + ctxt: SyntaxContext::empty(), })), }], type_args: None, + ctxt: SyntaxContext::empty(), })))), is_async: false, is_generator: false, type_params: None, return_type: None, + ctxt: SyntaxContext::empty(), })), ) } else { @@ -581,6 +652,7 @@ impl<'a> ImportGlobVisitor<'a> { is_generator: false, type_params: None, return_type: None, + ctxt: SyntaxContext::empty(), })), ) } @@ -598,7 +670,7 @@ impl<'a> VisitMut for ImportGlobVisitor<'a> { kind: MetaPropKind::ImportMeta, .. }), - prop: MemberProp::Ident(Ident { sym, .. }), + prop: MemberProp::Ident(IdentName { sym, .. }), .. })), args, @@ -655,6 +727,7 @@ impl<'a> VisitMut for ImportGlobVisitor<'a> { Box::new(Expr::Ident(Ident::new( format!("__glob__{cur_index}_{entry_index}").into(), DUMMY_SP, + SyntaxContext::empty(), ))), )); } else { diff --git a/crates/swc_transformer_import_glob/tests/mod.rs b/crates/swc_transformer_import_glob/tests/mod.rs index 15576c91a..621855c3e 100644 --- a/crates/swc_transformer_import_glob/tests/mod.rs +++ b/crates/swc_transformer_import_glob/tests/mod.rs @@ -1,6 +1,11 @@ -use std::{collections::HashMap, sync::Arc}; +use std::sync::Arc; -use farmfe_core::{swc_common::SourceMap, swc_ecma_ast::EsVersion, swc_ecma_parser::Syntax}; +use farmfe_core::{ + config::{AliasItem, StringOrRegex}, + swc_common::SourceMap, + swc_ecma_ast::EsVersion, + swc_ecma_parser::Syntax, +}; use farmfe_swc_transformer_import_glob::transform_import_meta_glob; use farmfe_testing_helpers::fixture; use farmfe_toolkit::script::{codegen_module, parse_module, ParseScriptModuleResult}; @@ -29,16 +34,16 @@ fn test_import_meta_glob() { &mut ast, root.to_string(), dir.to_string(), - &HashMap::from([( - "@".to_string(), - file + &vec![AliasItem::Complex { + find: StringOrRegex::String("@".to_string()), + replacement: file .parent() .unwrap() .to_path_buf() .join("dir") .to_string_lossy() .to_string(), - )]), + }], ) .unwrap(); diff --git a/crates/testing_helpers/Cargo.toml b/crates/testing_helpers/Cargo.toml index 52307e4bc..c312f1a02 100644 --- a/crates/testing_helpers/Cargo.toml +++ b/crates/testing_helpers/Cargo.toml @@ -11,3 +11,4 @@ documentation = "https://docs.rs/farmfe_plugin_define" [dependencies] farmfe_core = { path = "../core", version = "0.6.4" } +insta = "1.39.0" diff --git a/crates/testing_helpers/src/assert.rs b/crates/testing_helpers/src/assert.rs new file mode 100644 index 000000000..d92f5c74b --- /dev/null +++ b/crates/testing_helpers/src/assert.rs @@ -0,0 +1,34 @@ +#[macro_export] +macro_rules! assert_resource_pots { + ($resource_pots:expr) => { + for resource_pot in $resource_pots { + let mut resources = resource_pot.resources(); + let mut module_groups = resource_pot.module_groups.iter().collect::>(); + + resources.sort(); + module_groups.sort_by_key(|a| a.to_string()); + + farmfe_testing_helpers::assert_debug_snapshot!(( + ("immutable", resource_pot.immutable), + ("modules", resource_pot.modules()), + ("resource_pot_type", &resource_pot.resource_pot_type), + ("name", &resource_pot.name), + ("id", &resource_pot.id), + ("entry", &resource_pot.entry_module), + ("resources", resources), + ("module_groups", module_groups), + )); + } + }; +} + +#[macro_export] +macro_rules! assert_sorted_iter_eq { + ($v:expr) => { + let mut left = ($v).iter().cloned().collect::>(); + + left.sort(); + + farmfe_testing_helpers::assert_debug_snapshot!(left); + }; +} diff --git a/crates/testing_helpers/src/lib.rs b/crates/testing_helpers/src/lib.rs index 80d5ad41a..034115efe 100644 --- a/crates/testing_helpers/src/lib.rs +++ b/crates/testing_helpers/src/lib.rs @@ -12,8 +12,25 @@ use farmfe_core::{ wax::Glob, }; +pub mod assert; +pub use insta; + +#[macro_export] +macro_rules! assert_debug_snapshot { + ($ex:expr) => { + let mut setting = farmfe_testing_helpers::insta::Settings::clone_current(); + setting.set_sort_maps(true); + setting.set_omit_expression(true); + setting.set_input_file(file!()); + setting.set_prepend_module_to_snapshot(false); + setting.bind(|| { + farmfe_testing_helpers::insta::assert_debug_snapshot!($ex); + }); + }; +} + pub fn is_update_snapshot_from_env() -> bool { - std::env::var("FARM_UPDATE_SNAPSHOTS").is_ok() + std::env::var("FARM_UPDATE_SNAPSHOTS").is_ok() || std::env::var("INSTA_UPDATE").is_ok() } /// construct a test module graph like below: diff --git a/crates/toolkit/Cargo.toml b/crates/toolkit/Cargo.toml index 83df54f5c..7ccdbd498 100644 --- a/crates/toolkit/Cargo.toml +++ b/crates/toolkit/Cargo.toml @@ -22,32 +22,32 @@ farmfe_core = { path = "../core", version = "0.6.4" } farmfe_utils = { path = "../utils", version = "0.1.5" } farmfe_toolkit_plugin_types = { path = "../toolkit_plugin_types", version = "0.0.20" } farmfe_testing_helpers = { path = "../testing_helpers", version = "0.0.13" } -swc_ecma_parser = { version = "0.146.12" } -swc_ecma_visit = { version = "0.101.0" } -swc_ecma_codegen = { version = "0.151.1" } -swc_ecma_transforms = { version = "0.232.1", features = [ +swc_ecma_parser = { version = "1.0.1" } +swc_ecma_visit = { version = "1.0.0" } +swc_ecma_codegen = { version = "1.0.0" } +swc_ecma_transforms = { version = "1.0.0", features = [ "module", "typescript", "react", "concurrent", ] } -swc_ecma_preset_env = { version = "0.210.0" } -preset_env_base = { version = "0.5.1" } -swc_css_parser = { version = "0.151.0" } -swc_css_visit = { version = "0.140.0" } -swc_css_codegen = { version = "0.152.0" } -swc_css_minifier = { version = "0.117.1" } -swc_css_modules = { version = "0.30.0" } -swc_css_prefixer = { version = "0.155.0" } -swc_html_parser = { version = "0.40.0" } -swc_html_visit = { version = "0.34.0" } -swc_html_codegen = { version = "0.43.0" } -swc_html_minifier = { version = "0.139.1" } -swc_error_reporters = { version = "0.18.1" } -swc_atoms = { version = "0.6.7" } -swc_ecma_transforms_base = "0.140.3" -swc_ecma_minifier = "0.197.3" -swc_ecma_utils = "0.130.3" +swc_ecma_preset_env = { version = "1.0.0" } +preset_env_base = { version = "1.0.0" } +swc_css_parser = { version = "1.0.0" } +swc_css_visit = { version = "1.0.0" } +swc_css_codegen = { version = "1.0.0" } +swc_css_minifier = { version = "1.0.0" } +swc_css_modules = { version = "1.0.0" } +swc_css_prefixer = { version = "1.0.0" } +swc_html_parser = { version = "1.0.0" } +swc_html_visit = { version = "1.0.0" } +swc_html_codegen = { version = "1.0.0" } +swc_html_minifier = { version = "1.0.0" } +swc_error_reporters = { version = "2.0.0" } +swc_atoms = { version = "2.0.0" } +swc_ecma_transforms_base = "1.0.0" +swc_ecma_minifier = "1.0.1" +swc_ecma_utils = "1.0.1" lazy_static = "1.4.0" -sourcemap = "8.0.1" -anyhow = { version = "1.0.40", features = ["backtrace"] } +sourcemap = "9.0.0" +anyhow = { version = "1.0.90", features = ["backtrace"] } diff --git a/crates/toolkit/src/common.rs b/crates/toolkit/src/common.rs index 177796e92..22670bb71 100644 --- a/crates/toolkit/src/common.rs +++ b/crates/toolkit/src/common.rs @@ -33,7 +33,7 @@ pub struct Source { /// create a swc source map from a source pub fn create_swc_source_map(source: Source) -> (Arc, Arc) { let cm = Arc::new(SourceMap::default()); - let sf = cm.new_source_file_from(FileName::Real(source.path), source.content); + let sf = cm.new_source_file_from(Arc::new(FileName::Real(source.path)), source.content); (cm, sf) } @@ -181,9 +181,7 @@ pub fn load_source_original_source_map( let mut map = None; // try load source map when load module content. if content.contains(source_map_comment_prefix) { - let base64_prefix = format!( - "{source_map_comment_prefix}=data:application/json;base64," - ); + let base64_prefix = format!("{source_map_comment_prefix}=data:application/json;base64,"); // detect that the source map is inline or not let source_map = if content.contains(&base64_prefix) { // inline source map diff --git a/crates/toolkit/src/fs/mod.rs b/crates/toolkit/src/fs/mod.rs index af3f883ad..f506cbc21 100644 --- a/crates/toolkit/src/fs/mod.rs +++ b/crates/toolkit/src/fs/mod.rs @@ -64,3 +64,77 @@ pub fn transform_output_entry_filename( transform_output_filename(res, name, bytes, ext) } + +fn is_valid_char(ch: char) -> bool { + ch.is_ascii_digit() || is_valid_first_char(ch) +} + +fn is_valid_first_char(ch: char) -> bool { + ch.is_ascii_lowercase() || ch.is_ascii_uppercase() || ch == '_' +} + +/// normalize file name as variable name. +pub fn normalize_file_name_as_variable(str: String) -> String { + let mut res = String::with_capacity(str.len()); + + let mut first = true; + + let mut prev_is_invalid = false; + for ch in str.chars() { + if first { + if !is_valid_first_char(ch) { + res.push('_'); + + if is_valid_char(ch) { + res.push(ch); + } else { + prev_is_invalid = true; + } + } else { + res.push(ch) + } + first = false; + } else if is_valid_char(ch) || ch.is_ascii_digit() { + res.push(ch); + prev_is_invalid = false; + } else { + if prev_is_invalid { + continue; + } + + res.push('_'); + prev_is_invalid = true; + } + } + + res +} + +#[cfg(test)] +mod tests { + use crate::fs::normalize_file_name_as_variable; + + #[test] + fn test_normalize_name() { + let normalized_str = normalize_file_name_as_variable(String::from("F:\\path\\to\\file.ts")); + assert_eq!(normalized_str, "F_path_to_file_ts"); + + let normalized_str = normalize_file_name_as_variable(String::from("/path/to/file.ts")); + assert_eq!(normalized_str, "_path_to_file_ts"); + + let normalized_str = normalize_file_name_as_variable(String::from("$_#$()axq")); + assert_eq!(normalized_str, "___axq"); + + let normalized_str = normalize_file_name_as_variable(String::from("_a_b_C_D")); + assert_eq!(normalized_str, "_a_b_C_D"); + + let normalized_str = normalize_file_name_as_variable(String::from("123456789")); + assert_eq!(normalized_str, "_123456789"); + + let normalized_str = normalize_file_name_as_variable(String::from("1_2_3_4")); + assert_eq!(normalized_str, "_1_2_3_4"); + + let normalized_str = normalize_file_name_as_variable(String::from("1text.ts")); + assert_eq!(normalized_str, "_1text_ts"); + } +} diff --git a/crates/toolkit/src/get_dynamic_resources_map.rs b/crates/toolkit/src/get_dynamic_resources_map.rs index 451344380..2347e93d8 100644 --- a/crates/toolkit/src/get_dynamic_resources_map.rs +++ b/crates/toolkit/src/get_dynamic_resources_map.rs @@ -105,9 +105,7 @@ pub fn get_dynamic_resources_code( dynamic_resources.push(format!(r#"{{ path: '{resource_name}', type: 1 }}"#)); } _ => { - panic!( - "unsupported type ({resource_type:?}) when injecting dynamic resources" - ) + panic!("unsupported type ({resource_type:?}) when injecting dynamic resources") } } diff --git a/crates/toolkit/src/minify/mod.rs b/crates/toolkit/src/minify/mod.rs index e3d2ff602..ef48ef0ee 100644 --- a/crates/toolkit/src/minify/mod.rs +++ b/crates/toolkit/src/minify/mod.rs @@ -40,6 +40,7 @@ pub fn minify_js_module( &ExtraOptions { unresolved_mark, top_level_mark, + mangle_name_cache: None, }, ) .expect_module() diff --git a/crates/toolkit/src/resolve/path_start_with_alias.rs b/crates/toolkit/src/resolve/path_start_with_alias.rs index bc1fb54eb..51f5b6c16 100644 --- a/crates/toolkit/src/resolve/path_start_with_alias.rs +++ b/crates/toolkit/src/resolve/path_start_with_alias.rs @@ -1,22 +1,51 @@ use std::collections::HashMap; -use farmfe_core::regex::Regex; +use farmfe_core::{ + config::{AliasItem, StringOrRegex}, + regex::Regex, +}; const REGEX_PREFIX: &str = "$__farm_regex:"; /// Determine whether the path conforms to the configuration of alias. -pub fn is_start_with_alias(alias_map: &HashMap, path: &str) -> bool { - let mut aliases: Vec<&str> = alias_map.keys().map(|k| k.as_str()).collect(); - aliases.sort_by(|a, b| b.len().cmp(&a.len())); - - aliases.iter().any(|&alias| { - if let Some(stripped_alias) = alias.strip_prefix(REGEX_PREFIX) { - let regex = Regex::new(stripped_alias).unwrap(); - return regex.is_match(path); - } else if alias.ends_with("$") && path == alias.trim_end_matches('$') { - return true; - } else { - return path.starts_with(alias); +// pub fn is_start_with_alias(alias_map: &Vec, path: &str) -> bool { +// let mut aliases: Vec<&str> = alias_map.keys().map(|k| k.as_str()).collect(); +// aliases.sort_by(|a, b| b.len().cmp(&a.len())); + +// aliases.iter().any(|&alias| { +// if let Some(stripped_alias) = alias.strip_prefix(REGEX_PREFIX) { +// let regex = Regex::new(stripped_alias).unwrap(); +// return regex.is_match(path); +// } else if alias.ends_with("$") && path == alias.trim_end_matches('$') { +// return true; +// } else { +// return path.starts_with(alias); +// } +// }) +// } + +pub fn is_start_with_alias(alias_vec: &Vec, path: &str) -> bool { + alias_vec.iter().any(|alias_item| { + match alias_item { + AliasItem::Complex { + find, + replacement: _, + } => match find { + StringOrRegex::String(alias) => { + if let Some(stripped_alias) = alias.strip_prefix(REGEX_PREFIX) { + if let Ok(regex) = Regex::new(stripped_alias) { + regex.is_match(path) + } else { + false + } + } else if alias.ends_with("$") && path == alias.trim_end_matches('$') { + true + } else { + path.starts_with(alias) + } + } + StringOrRegex::Regex(regex) => regex.is_match(path), + }, // AliasItem::Simple(_) => false, } }) } @@ -32,15 +61,24 @@ mod test { fn test() { let cwd = PathBuf::from("/root/src"); - let alias = HashMap::from([ - ("/@".to_string(), cwd.to_string_lossy().to_string()), - ("@".to_string(), cwd.to_string_lossy().to_string()), - ("react$".to_string(), cwd.to_string_lossy().to_string()), - ( - "$__farm_regex:^/(utils)$".to_string(), - cwd.join("$1").to_string_lossy().to_string(), - ), - ]); + let alias: Vec = vec![ + AliasItem::Complex { + find: StringOrRegex::String("/@".to_string()), + replacement: cwd.to_string_lossy().to_string(), + }, + AliasItem::Complex { + find: StringOrRegex::String("@".to_string()), + replacement: cwd.to_string_lossy().to_string(), + }, + AliasItem::Complex { + find: StringOrRegex::Regex(Regex::new("react$").unwrap()), + replacement: cwd.to_string_lossy().to_string(), + }, + AliasItem::Complex { + find: StringOrRegex::Regex(Regex::new("^/(utils)$").unwrap()), + replacement: cwd.join("$1").to_string_lossy().to_string(), + }, + ]; assert_eq!(is_start_with_alias(&alias, "/@/img/logo.png"), true); assert_eq!(is_start_with_alias(&alias, "@/img/logo.png"), true); diff --git a/crates/toolkit/src/script/mod.rs b/crates/toolkit/src/script/mod.rs index 885c14546..d191cc180 100644 --- a/crates/toolkit/src/script/mod.rs +++ b/crates/toolkit/src/script/mod.rs @@ -4,7 +4,7 @@ use swc_ecma_codegen::{ text_writer::{JsWriter, WriteJs}, Emitter, Node, }; -use swc_ecma_parser::{lexer::Lexer, EsConfig, Parser, StringInput, Syntax, TsConfig}; +use swc_ecma_parser::{lexer::Lexer, EsSyntax, Parser, StringInput, Syntax, TsSyntax}; use farmfe_core::{ config::{comments::CommentsConfig, ScriptParserConfig}, @@ -17,8 +17,8 @@ use farmfe_core::{ BytePos, FileName, LineCol, Mark, SourceMap, }, swc_ecma_ast::{ - CallExpr, Callee, EsVersion, Expr, Ident, Import, MemberProp, Module as SwcModule, ModuleItem, - Stmt, + CallExpr, Callee, EsVersion, Expr, Ident, IdentName, Import, MemberProp, Module as SwcModule, + ModuleItem, Stmt, }, }; use swc_ecma_visit::{Visit, VisitWith}; @@ -89,7 +89,10 @@ pub fn parse_stmt( cm: Arc, top_level: bool, ) -> Result { - let source_file = cm.new_source_file(FileName::Real(PathBuf::from(id)), content.to_string()); + let source_file = cm.new_source_file( + Arc::new(FileName::Real(PathBuf::from(id))), + content.to_string(), + ); let input = StringInput::from(&*source_file); // TODO support parsing comments let mut parser = Parser::new(syntax, input, None); @@ -163,21 +166,21 @@ pub fn syntax_from_module_type( config: ScriptParserConfig, ) -> Option { match module_type { - ModuleType::Js => Some(Syntax::Es(EsConfig { + ModuleType::Js => Some(Syntax::Es(EsSyntax { jsx: false, import_attributes: true, ..config.es_config })), - ModuleType::Jsx => Some(Syntax::Es(EsConfig { + ModuleType::Jsx => Some(Syntax::Es(EsSyntax { jsx: true, import_attributes: true, ..config.es_config })), - ModuleType::Ts => Some(Syntax::Typescript(TsConfig { + ModuleType::Ts => Some(Syntax::Typescript(TsSyntax { tsx: false, ..config.ts_config })), - ModuleType::Tsx => Some(Syntax::Typescript(TsConfig { + ModuleType::Tsx => Some(Syntax::Typescript(TsSyntax { tsx: true, ..config.ts_config })), @@ -195,9 +198,8 @@ pub fn is_commonjs_require( top_level_mark: Mark, call_expr: &CallExpr, ) -> bool { - if let Callee::Expr(box Expr::Ident(Ident { span, sym, .. })) = &call_expr.callee { - sym == "require" - && (span.ctxt.outer() == unresolved_mark || span.ctxt.outer() == top_level_mark) + if let Callee::Expr(box Expr::Ident(Ident { ctxt, sym, .. })) = &call_expr.callee { + sym == "require" && (ctxt.outer() == unresolved_mark || ctxt.outer() == top_level_mark) } else { false } @@ -259,14 +261,14 @@ impl Visit for ModuleSystemAnalyzer { return; } - if let box Expr::Ident(Ident { sym, span, .. }) = &n.obj { - if sym == "module" && span.ctxt.outer() == self.unresolved_mark { - if let MemberProp::Ident(Ident { sym, .. }) = &n.prop { + if let box Expr::Ident(Ident { sym, ctxt, .. }) = &n.obj { + if sym == "module" && ctxt.outer() == self.unresolved_mark { + if let MemberProp::Ident(IdentName { sym, .. }) = &n.prop { if sym == "exports" { self.contain_module_exports = true; } } - } else if sym == "exports" && span.ctxt.outer() == self.unresolved_mark { + } else if sym == "exports" && ctxt.outer() == self.unresolved_mark { self.contain_module_exports = true; } else { n.visit_children_with(self); @@ -287,11 +289,7 @@ impl Visit for ModuleSystemAnalyzer { } } -pub fn module_system_from_ast( - ast: &SwcModule, - module_system: ModuleSystem, - has_deps: bool, -) -> ModuleSystem { +pub fn module_system_from_ast(ast: &SwcModule, module_system: ModuleSystem) -> ModuleSystem { if module_system != ModuleSystem::Hybrid { // if the ast contains ModuleDecl, it's a esm module for item in ast.body.iter() { diff --git a/crates/toolkit/src/script/swc_try_with.rs b/crates/toolkit/src/script/swc_try_with.rs index b0aecaa55..3b8a89630 100644 --- a/crates/toolkit/src/script/swc_try_with.rs +++ b/crates/toolkit/src/script/swc_try_with.rs @@ -3,8 +3,8 @@ use std::sync::Arc; use farmfe_core::{ context::CompilationContext, error::{CompilationError, Result}, - swc_common::{errors::HANDLER, Globals, Mark, SourceMap, Span, SyntaxContext, GLOBALS}, - swc_ecma_ast::Module, + swc_common::{errors::HANDLER, Globals, Mark, SourceMap, SyntaxContext, GLOBALS}, + swc_ecma_ast::{Ident, Module}, }; use swc_ecma_transforms::helpers::{Helpers, HELPERS}; use swc_ecma_transforms_base::resolver; @@ -28,8 +28,8 @@ where pub struct ResetSpanVisitMut; impl VisitMut for ResetSpanVisitMut { - fn visit_mut_span(&mut self, span: &mut Span) { - span.ctxt = SyntaxContext::empty(); + fn visit_mut_syntax_context(&mut self, ctxt: &mut farmfe_core::swc_common::SyntaxContext) { + *ctxt = SyntaxContext::empty(); } } diff --git a/cspell.json b/cspell.json index c2ec1c176..5eabad8c7 100644 --- a/cspell.json +++ b/cspell.json @@ -6,29 +6,47 @@ "language": "en", // words - list of words to be always considered correct "words": [ + "3Csvg", "aarch", + "Aavci", + "Aceternity", + "ACVHU", "addtional", "arcgis", "Alexey", + "Andale", "androideabi", "antd", "Antdv", "apng", "applescript", + "AQDBI", "Architecure", "armv", "arraify", + "assuptions", "Avenir", + "Bartosz", "Basepath", + "begining", + "bento", + "Bento", "bindgen", + "Bitstream", + "Bluch", "bpos", + "breo", "brightwu", "Brooooooklyn", "bufferutil", + "buidling", "Bytedance", "bytepos", + "Cace", "cacheable", + "callqh", "canonicalize", + "Cfudsi", "changset", "chpos", "clippy", @@ -45,16 +63,24 @@ "Convertion", "cpus", "csspart", + "cssvars", "ctxt", + "Cuph", "dashmap", "dedupe", "deepmerge", + "demostration", "Denysov", "Deoptimization", "Deque", + "derectly", "deserializers", "dialoguer", "DIMRESET", + "docsearch", + "doctag", + "documate", + "drei", "dylib", "eabi", "eframe", @@ -62,34 +88,53 @@ "elems", "embeded", "envinfo", + "Erkelost", "esbuild", + "Esdx", "execa", + "exlude", "fargs", "farmfe", + "farmup", + "Farmup", + "feio", "fibo", "flac", + "flexbox", "fnames", "Fock", "funs", + "Gamage", "globset", + "GLTF", + "Glvyg", "gnueabihf", "guolao", "hashbrown", "hasher", + "Hensel", + "Himesh", + "HMRPing", "icns", "idents", "IHDR", "iife", + "Iljwt", "importee", "Inctive", "indicatif", + "Infima", + "insta", "instanceof", "Instantiator", + "JDEL", "jfif", "JIDA", "jquery", "jridgewell", "jsnext", + "Jsxhmf", + "Jtjc", "kolorist", "Kostiantyn", "libfarmfe", @@ -98,13 +143,17 @@ "linechpos", "loglevel", "lukastaegert", + "maked", "mapref", + "Margus", "mdsvex", "Menlo", "Mergeable", + "metastring", "mgfe", "middlewares", "minifier", + "moduletypes", "msvc", "multibyte", "musleabihf", @@ -112,18 +161,33 @@ "nanospinner", "napi", "NAPI", + "neccessary", + "NITH", + "nodebuffer", "Nonoctal", + "noopener", + "nord", + "noreferrer", "normpath", "npmlog", + "nums", + "Nybxx", + "Oaky", + "oblador", + "ohter", "onwarn", "opentelemetry", "osascript", + "Oudd", "outro", + "Oyzy", "pageerror", "pargs", "pathdiff", "peekable", "petgraph", + "pffn", + "phvjb", "pico", "picomatch", "Pinia", @@ -134,40 +198,68 @@ "preact", "prefixer", "primevue", + "procee", "proto", "protobuf", "protoc", + "Ptktl", + "PUFY", + "pulgin", + "PVPW", + "pxtorem", "quasis", "querify", "querystring", "Raspopov", + "raxjs", + "Rcfchj", + "Rdjg", + "reduckted", "replacen", "repr", + "Reshammiya", "rfind", + "RFVLYs", "riscv", "rkyv", + "Rolup", "rootpath", + "rsbuild", "rsdoctor", "Rspack", "rsplit", + "rspress", + "Rucdk", "Rustup", "sabi", "safelisted", + "Salman", + "serde", + "shiki", "shulan", "shulandmimi", "Sider", + "siderbar", "sirv", + "Skeen", "srcset", "struct", + "structs", "styl", "stylesheet", "Stylesheet", + "sublist", "svgr", + "svgs", + "SXNQ", + "tabler", "tailwindcss", "Tauri", + "teidesu", "Tencent", "thiserror", "threadsafe", + "tnum", "topo", "toposort", "treeshake", @@ -175,23 +267,42 @@ "tsfn", "tsup", "Turbopack", + "twoslash", "Typecheck", + "typedotenv", "typeofs", + "Ujanq", + "unioned", "unocss", "unplugin", "unref", "unsize", "unwatch", + "UOUI", "upcasting", + "usize", + "VDSVA", "Verinov", + "Vgud", + "virutal", "vite", + "vitesse", + "Vklun", "walkdir", "wasi", "wasix", "wasmer", + "Webscoker", "wechat", + "Windi", + "Wojtkowiak", "xlink", - "Yuxi" + "Yhci", + "Yuxi", + "ZERs", + "Zjwg", + "Zwram", + "zzse" ], "ignorePaths": [ "pnpm-lock.yaml", diff --git a/docs/.github/workflows/deploy.yml b/docs/.github/workflows/deploy.yml new file mode 100644 index 000000000..cc971c45b --- /dev/null +++ b/docs/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + # Review gh actions docs if you want to further define triggers, paths, etc + # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on + +jobs: + deploy: + name: Deploy to GitHub Pages + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install Pnpm + run: npm install -g pnpm@8 + - name: Install dependencies + run: pnpm install --no-frozen-lockfile + - name: Build website + run: pnpm run build + + # Popular action to deploy to GitHub Pages: + # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + # Build output to publish to the `gh-pages` branch: + publish_dir: ./build + # The following lines assign commit authorship to the official + # GH-Actions bot for deploys to `gh-pages` branch: + # https://github.com/actions/checkout/issues/13#issuecomment-724415212 + # The GH actions bot is used by default if you didn't specify the two fields. + # You can swap them out with your own user credentials. + user_name: github-actions[bot] + user_email: 41898282+github-actions[bot]@users.noreply.github.com diff --git a/docs/.github/workflows/test-deploy.yml b/docs/.github/workflows/test-deploy.yml new file mode 100644 index 000000000..c6a727c26 --- /dev/null +++ b/docs/.github/workflows/test-deploy.yml @@ -0,0 +1,24 @@ +name: Test deployment + +on: + pull_request: + branches: + - main + # Review gh actions docs if you want to further define triggers, paths, etc + # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on + +jobs: + test-deploy: + name: Test deployment + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install pnpm + run: npm install -g pnpm@8 + - name: Install dependencies + run: pnpm install --no-frozen-lockfile + - name: Test build website + run: pnpm build diff --git a/docs/LICENSE b/docs/LICENSE new file mode 100644 index 000000000..bfb373348 --- /dev/null +++ b/docs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 farm-fe + +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/docs/README.md b/docs/README.md new file mode 100644 index 000000000..4bb4cd8fa --- /dev/null +++ b/docs/README.md @@ -0,0 +1,14 @@ +# Farm docs +Docs site of Farm. + +Install dependencies: +```bash +pnpm i +``` + +Development locally: +```bash +npm start +``` + +Merge the changes to main will automatically publish to github pages. \ No newline at end of file diff --git a/docs/babel.config.js b/docs/babel.config.js new file mode 100644 index 000000000..e00595dae --- /dev/null +++ b/docs/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: [require.resolve('@docusaurus/core/lib/babel/preset')], +}; diff --git a/docs/blog/index.md b/docs/blog/index.md new file mode 100644 index 000000000..ada9009e1 --- /dev/null +++ b/docs/blog/index.md @@ -0,0 +1,3 @@ +# Blob + +## 2024 diff --git a/docs/components.json b/docs/components.json new file mode 100644 index 000000000..a2672fe89 --- /dev/null +++ b/docs/components.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "default", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "tailwind.config.js", + "css": "src/css/custom.scss", + "baseColor": "slate", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "examples": "@/components/examples", + "blocks": "@/components/blocks" + } +} \ No newline at end of file diff --git a/docs/crowdin.yml b/docs/crowdin.yml new file mode 100644 index 000000000..f97c01e61 --- /dev/null +++ b/docs/crowdin.yml @@ -0,0 +1,126 @@ +# +# Your Crowdin credentials +# +"project_id": "603701" +"api_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ3UUVxdmhVM3ZMT2EyWGljbVV5VCIsImp0aSI6IjYxZjI5YjkyYmU4YTUwMjk5MWEzMmM0ZWRmMDQ3ZTk1NjFhZDIyMzk2OGE1MmQ4MGFlNzM1YmY1YWVjNzZiMDVlODk5YjEzMWMzN2MxYWY2IiwiaWF0IjoxNjkwMjg5MTE2LjY2NDAxOCwibmJmIjoxNjkwMjg5MTE2LjY2NDAyMSwiZXhwIjoxNzIxODI1MTE2LjU1NjU4Miwic3ViIjoiMTU5MzQ5MDMiLCJzY29wZXMiOlsicHJvamVjdCJdLCJkb21haW4iOm51bGwsImFzc29jaWF0aW9ucyI6WyIqIl0sInNlc3Npb24iOjB9.rG2dtUOUI6y4YzlL4_AxfHSGhH8XsAQDBIPxb-hts56kOWnaACVHU9-Y2e7ABzaAmEsdxJ4Wl6kByFAF1DJ-n-ga02PVPW1EV8RulXZwram5lofZUjanq8OBuBMnOptJsxhmf962_t8G7lDvN0zYcOuddKg_sBcmEC1QS8ngF0OwDrQhOyzyAavciUIbwZERsLKoXyMj1EDWEtJ8UWePFcCiQUk5pffnOXR-lVgudO9JgK4breoKB6cTKp_J4mj8eFUmEOwgYhciNIxTYhmMrv43l9-sgPQA2NBct5p0ifHrPtktl5uEZYrjMQqwGhVDSVA5OakyYVdp2MsT2dTgBBqd9HY7Cuph9A5JDEL3ZwEW8Exw3qWcBDUKv7-IONcRSrbUIyTzw0ZYBSz5lE--33vsdWEOuZCDaU16pHOjCfudsiDjQI5RFVLYsMo05Qkf0zzse3WYNybxx2YrO2JiYRdjgGzN-inUoMek7phvjbFKq30XCI2CZDa3XrZjwgCF3RTAd-hoFIsi65u1vj-L554xvIU6NITHVklunZcIcZjoRFeDN1uw5pXcRMRcfchjBpSXNQRucdkRN-P2ay5dZS1M8tGlvygJtjc5pFgDGV51Zx_NFVGv75xrQ_UivKE8UIljwt5Aci_eHDE_f8keMANrATdSzMmXlyRUhh-8aWI" +"base_path": "." +"base_url": "https://api.crowdin.com" + +# +# Choose file structure in Crowdin +# e.g. true or false +# +"preserve_hierarchy": true +locale: { "zh-CN": "zh" } +# +# Files configuration +# +files: [ + { + # + # Source files filter + # e.g. "/resources/en/*.json" + # + "source": "/i18n/zh/**/*", + + # + # Where translations will be placed + # e.g. "/resources/%two_letters_code%/%original_file_name%" + # + "translation": "/i18n/%locale%/**/%original_file_name%", + # + # Files or directories for ignore + # e.g. ["/**/?.txt", "/**/[0-9].txt", "/**/*\?*.txt"] + # + # "ignore": [], + + # + # The dest allows you to specify a file name in Crowdin + # e.g. "/messages.json" + # + # "dest": "", + + # + # File type + # e.g. "json" + # + # "type": "", + + # + # The parameter "update_option" is optional. If it is not set, after the files update the translations for changed strings will be removed. Use to fix typos and for minor changes in the source strings + # e.g. "update_as_unapproved" or "update_without_changes" + # + # "update_option": "", + + # + # Start block (for XML only) + # + + # + # Defines whether to translate tags attributes. + # e.g. 0 or 1 (Default is 1) + # + # "translate_attributes": 1, + + # + # Defines whether to translate texts placed inside the tags. + # e.g. 0 or 1 (Default is 1) + # + # "translate_content": 1, + + # + # This is an array of strings, where each item is the XPaths to DOM element that should be imported + # e.g. ["/content/text", "/content/text[@value]"] + # + # "translatable_elements": [], + + # + # Defines whether to split long texts into smaller text segments + # e.g. 0 or 1 (Default is 1) + # + # "content_segmentation": 1, + + # + # End block (for XML only) + # + + # + # Start .properties block + # + + # + # Defines whether single quote should be escaped by another single quote or backslash in exported translations + # e.g. 0 or 1 or 2 or 3 (Default is 3) + # 0 - do not escape single quote; + # 1 - escape single quote by another single quote; + # 2 - escape single quote by backslash; + # 3 - escape single quote by another single quote only in strings containing variables ( {0} ). + # + # "escape_quotes": 3, + + # + # Defines whether any special characters (=, :, ! and #) should be escaped by backslash in exported translations. + # e.g. 0 or 1 (Default is 0) + # 0 - do not escape special characters + # 1 - escape special characters by a backslash + # + # "escape_special_characters": 0 + # + + # + # End .properties block + # + + # + # Does the first line contain header? + # e.g. true or false + # + # "first_line_contains_header": true, + + # + # for spreadsheets + # e.g. "identifier,source_phrase,context,uk,ru,fr" + # + # "scheme": "", + }, + ] diff --git a/docs/docs/advanced/minification.md b/docs/docs/advanced/minification.md new file mode 100644 index 000000000..699ebe8a4 --- /dev/null +++ b/docs/docs/advanced/minification.md @@ -0,0 +1,19 @@ +# Minification +Farm supports production minify out of box, which is automatically enabled `in production` by default. It can be enable or disable via the [`compilation.minify`](/docs/config/compilation-options#minify) option. + +```ts title="farm.config.ts" +export default { + compilation: { + // enable minification for both development and production + minify: true + }, +}; +``` + +If minify is enabled: +* For js/ts modules, the code will be `compressed` and `mangled`, and all the blank characters will be removed. +* For css and html modules, all spaces will be removed. + +:::note +Farm use swc minifier under the hood, refer to [compilation.minify](/docs/config/compilation-options#minify) for detailed options. +::: \ No newline at end of file diff --git a/docs/docs/advanced/partial-bundling.md b/docs/docs/advanced/partial-bundling.md new file mode 100644 index 000000000..84448486f --- /dev/null +++ b/docs/docs/advanced/partial-bundling.md @@ -0,0 +1,263 @@ +# Partial Bundling +`Partial Bundling` is a strategy that Farm uses to bundle modules, similar to what other bundlers do but the goal of Farm's `Partial Bundling` is different. + +Unlike other bundlers, Farm will not trying to bundle everything together and then split them out using optimizations like `splitChunks`, on the opposite, Farm will bundle projects into several output files directly. For example, if there are hundreds of modules needed to launch a html page, Farm will try to bundle them into 20-30 output files directly. Farm calls this behavior `Partial Bundling`. + +Farm's goal of Partial Bundling is to: +1. **Reduce request numbers and request hierarchy**: Make hundreds or thousands of module requests reduce to 20-30 requests, and avoid loading modules one after one due to dependency hierarchy, which would make resource loading faster. +2. **Increase cache hit rate**: When a modules changed, makes sure that only a few output files are affected, so more cache can be used for a online project. + +For traditional bundlers, we may have a hard time to configure complex `splitChunks` or `manualChunks` to achieve the goal above, but in Farm, it is supported natively through `Partial Bundling`. + +Note that the default bundling strategy is designed for browser, but it also works well for Node.js. Try [Configuring Partial Bundling](#configuring-partial-bundling) if want to change bundling strategy for Node.js. + +:::tip +Refer to [RFC-003 Partial Bundling](https://github.com/farm-fe/rfcs/blob/main/rfcs/003-partial-bundling/rfc.md) to get more technical details. +::: + +## Motivation +There are two main methods of handling modules in web build tools now: Bundling or native ESM. But they both have drawbacks: +* For bundling, bundlers aim to bundle everything together and then split them out for optimization, but splitting is often hard to configure and is hard to balance resources loading performance and cache hit rate manually. +* For native esm, every module can be compiled, cached separately, but the load performance are heavily affected when there are hundreds of module requests. + +So I was always thinking that if there is a strategy to avoid these two extremes - maybe we can do partial bundling? we can just bundle the project into several limited, size balanced resources directly and automatically. I named this thinking `Module Merging` - Find a balance between bundle and unbundled, only bundles a few related modules to improve loading performance without losing cache granularity. + +> I renamed `Module Merging` to `Partial Bundling` later because I think `Partial Bundling` can expresses more accurately what I was thinking. + +## Partial Bundling Rules +> In this section, we will introduce the basic rules that `Partial Bundling` uses by examples. + +First we look into a basic react project example. For a basic react project like below, we only import react and react-dom in the entry script: +```tsx title="index.tsx" +import React from 'react'; +import { createRoot } from 'react-dom/client'; +import './index.scss'; + +const container = document.querySelector('#root'); +const root = createRoot(container); + +root.render( + <> +
Index page
+ +); +``` +The bundling result will looks like: +```text +./dist/ +├── index_9c07.49b83356.js # contains react-dom +├── index_a35f.0ac21082.js # contains ./index.tsx +├── index_b7e0.7ab9ca2d.js # contains react and its dependencies +├── index_ce26.7f833381.css $ contains ./index.scss +└── index.html # contains ./index.html +``` +Farm will bundle your project into 5 files by default: +* `2 js files` are from `node_modules` and contains `react`, `react-dom` and their dependencies. +* `1 js file` are from `./index.tsx` +* `1 css file` are from `./index.scss`; +* `1 html file` are from `./index.html`; + +Farm uses following rules to get above results: +1. **Mutable and immutable modules should always be in different output files**: By default Farm treat all modules under `node_modules` are immutable, otherwise they are mutable. So `./index.tsx` is in a separate file cause it's a mutable module, so it never be in the same output file with `react` and `react-dom`. +2. **Different type of module are always in different output files**: So `./index.scss` are in a separate file. +3. **Modules in the same package should be in the same output file**: So all `react` modules are always in the same output file, so does `react-dom`. +4. **The target concurrent requests for a resource loading should be between 20-30 by default**: So there are 3 js output files instead of 1 js bundles. +5. **Output files should be of similar size and min resource size should be greater than 20KB by default**: Because `react-dom` is the largest and more than 100KB, it is in a separate file, and `react` and its dependencies are smaller than `20KB`, there are merged into the same output file. + +Now we have familiar with `Partial Bundling`'s basic rules, if met problems with partial bundling, using above rules to debug your project. Next we'll cover how to configure partial bundling. + +## Configuring Partial Bundling +### Two Configuring Methods +There 2 different ways to control bundling: +* **`groups`**: Tell Farm that you want these modules bundled together as possible, but it's not enforced because of the optimization strategy of Farm. See [Grouping Modules](#grouping-modules) for this method. +* **`enforceResources`**: Tell Farm that you want these module always bundled together, ignore all other optimization strategy constraints. See [Using `enforceResources`](#using-enforceresources) for this method. + +### Partial Bundling Options +`Partial Bundling` supports a lot of options to let users customize its behavior. All the options are as below: + +1. **`targetConcurrentRequests`**: Farm tries to generate resource numbers as closer as possible to this config value for initial resource loading or a dynamic resource loading. +2. **`targetMinSize`**: The minimum size of generated resources before minify and gzip. Note that `targetMinSize` will not be satisfied if `ModuleBucket's size` is less than `targetMinSize`, `ModuleBucket` will be given priority. Config `enforceTargetMinSize` can be used to enforce size. +3. **`targetMaxSize`**: The maximum size of generated resources before minify and gzip. +4. **`groups`**: A group of modules that should be placed together. Note that this group config is only a hit to the compiler that these modules should be placed together, it may produce multiple resources, if you want to enforce modules in the same resource, you should use `enforceResources`. + * **name**: Name of this group. + * **test**: Regex array to match the modules which are in this group. + * **groupType**: `mutable` or `immutable`, this group only applies to the specified type of modules. + * **resourceType**: `all`, `initial` or `async`, this group only applies to the specified type of resources. +5. **`enforceResources`**: Array to match the modules that should always be in the same output resource, ignore all other constraints. + * **name**: Name of this resource. + * **test**: Regex array to match the modules which are in this resource. +6. **`enforceTargetConcurrentRequests`**: Enforce target concurrent requests for every resource loading, when true, smaller resource will be merged into bigger resource to meet the target concurrent requests. this may cause issue for css resource, be careful to use this option +7. **`enforceTargetMinSize`**: Enforce target min size for every resource, when true, smaller resource will be merged into bigger resource to meet the target concurrent requests. this may cause issue for css resource, be careful to use this option +8. **`immutableModules`**: Regex array to match the immutable modules +9. **`immutableModulesWeight`**: Default to `0.8`, immutable module will have 80% request numbers. For example, if `targetConcurrentRequest` is 25, then immutable resources will take `25 * 80% = 20` by default. This option is to make sure that mutable and immutable modules are isolate, if change your business code, code under node_modules won't be affected. + +:::note +In general, you can use `targetConcurrentRequests`, `targetMinSize` and `targetMaxSize` to control the default behavior of Partial Bundling. The default value set by Farm is based on best practice, so make sure it's necessary when you want to change the default value. +::: + +### Grouping Modules +you can use `groups` to group modules together, for above basic react project example, using following configuration to make modules under `node_modules` are bundled together: +```ts title="farm.config.ts" {4-9} +export default defineConfig({ + compilation: { + partialBundling: { + groups: [ + { + name: 'vendor-react', + test: ['node_modules/'], + } + ] + }, + }, +}); +``` +we add a `group item` with `name` and `test` to group `react` and `react-dom` together. The bundle result is: +``` +./dist/ +├── index_499e.72cf733c.js # contains `react`, `react-dom` and all other files under node_modules +├── index_a35f.0ac21082.js # contains `./index.tsx` +├── index_ce26.7f833381.css # contains `./index.scss` +└── index.html # contains `./index.html` +``` + +Now all modules under `node_modules` are bundled into `index_499e.72cf733c.js`. Note that `groups` is not not enforce that all modules matches this group are bundled, a `group` make produce multiple `output file`, because: +1. mutable and immutable module are always in different output files. When both mutable and immutable modules hit this `group`, they will be in different output. +2. when comes to a multi page app or dynamic imported entries, there may be shared modules, and these should modules are always in different output files. + +If you need to enforce modules in the same output files, you can use `enforceResources` + +### Using `enforceResources` +To group all modules together and ignore all other conditions, you can use `enforceResources`, for example: +```ts title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + partialBundling: { + // c-highlight-start + enforceResources: [ + { + name: 'index', + test: ['.+'], + } + ] + // c-highlight-end + }, + }, +}); +``` +will produce: +``` +./dist/ +├── index.7f833381.css # all css modules are bundled together +├── index.ba5550d9.js # all script modules are bundled together +└── index.html +``` + +:::warning +`enforceResources` will ignore all Farm's internal optimization, be careful when you use it. +::: + +### Configuring `immutable modules` +Using `immutableModules` to configure immutable modules, by default, Farm set it to `node_modules/`. + +```ts title="farm.config.ts" +export default defineConfig({ + compilation: { + partialBundling: { + immutableModules: ['node_modules/', '/global-constants'] + }, + }, +}); +``` +Immutable module can affect bundling and incoming persistent cache, be careful if you want to change it. + +## Examples +:::note +Normally you don't need to configure bundling manually, if you want to configure the bundles, make sure you really need it. And these examples are only illustrations to help you learn how to configure bundling strategy easily. +::: + +### Grouping Files under Same Directory +Grouping `modules` under `src/components` and output them in the same bundle **as possible**. + +```ts title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + partialBundling: { + // c-highlight-start + groups: [ + { + name: 'components', + test: ['./src/components'], + } + ] + // c-highlight-end + }, + }, +}); +``` + +### Configuring Bundle Numbers and Size +```ts title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + partialBundling: { + // c-highlight-start + targetConcurrentRequests: 15, + targetMinSize: 200 * 1024 // 200 KB + // c-highlight-end + }, + }, +}); +``` + +In above example, Farm will try to bundle your project into `15` files **as possible**, with min size of each file larger than `200KB` **as possible**. + +### Bundle All Modules Together +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + partialBundling: { + // c-highlight-start + enforceResources: [ + { + name: 'index', + test: ['.+'], + } + ] + // c-highlight-end + }, + }, +}); +``` +In above example, we enforce to bundle all modules together and ignore all other constraints(for example, request numbers, file size). You can also enforce to bundle some modules together using `enforceResources`: + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + partialBundling: { + // c-highlight-start + enforceResources: [ + { + name: 'index', + test: ['\\./src/components/.+'], + } + ] + // c-highlight-end + }, + }, +}); +``` + +We enforce to bundle all modules under `src/components` directory. +:::note +`enforceResources` would break internal optimization for bundles, be careful when you use it. +::: \ No newline at end of file diff --git a/docs/docs/advanced/persistent-cache.md b/docs/docs/advanced/persistent-cache.md new file mode 100644 index 000000000..4e9c4d5df --- /dev/null +++ b/docs/docs/advanced/persistent-cache.md @@ -0,0 +1,113 @@ +# Incremental Building + +:::tip +Farm supports incremental build by persistent cache since `v0.14.0` +::: + +Since `v0.14.0`, Farm supports cache the compiled result to disk, which can greatly speed up the compilation for hot start/hot build. When `persistentCache` is enabled, the compilation time can reduce **up to `80%`**. + +Performance compare between cold start(without cache) and hot start(with cache) using [examples/argo-pro](https://github.com/farm-fe/farm/tree/main/examples/arco-pro): + + +| | Cold(without cache) | Hot(with cache) | diff | +| ----- | ------------------- | --------------- | ----------- | +| start | 1519ms | 371ms | reduced 75% | +| build | 3582ms | 562ms | reduced 84% | + + +## Using Cache + +Using [`compilation.persistentCache`](/docs/config/compilation-options#persistentcache) to `enable/disable` Cache: + +```ts +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + compilation: { + persistentCache: true, + }, +}); +``` + +:::note +`persistentCache: true` is equal to: + +```js +({ + persistentCache: { + // Directory that cache is stored + cacheDir: "node_modules/.farm/cache", + // namespace of the cache + namespace: "farm-cache", + buildDependencies: [ + "farm.config.ts", + "@farmfe/core", + "@farmfe/plugin-react", + // ... all other dependencies + ], + moduleCacheKeyStrategy: { + timestamp: true, + hash: true, + }, + }, +}); +``` +::: + +Configuring `persistentCache` to `false` to disable cache. + +## Cache Validation + +Cache will be validated when trying to reuse it by following conditions, if any of following conditions changed, all cache will be invalidated: + + +- **Env Object**: configured by `persistentCache.envs`, default to `Farm Env Mode`(`process.env.NODE_ENV`, `process.env.DEV`, `process.env.PROD`), see **[`Environment Variables and Modes`](/docs/features/env)**. +- **lockfile**: If your lockfile changed, means there are dependencies changes, the cache will be invalidated. +* **Build Dependencies**: configured by `persistentCache.buildDependencies`, if any of the buildDependencies changed, all cache will be invalidated. +* **Cache Namespace**: configured by `persistentCache.namespace`, cache under different namespaces won't be reused. If you want to invalidate all cache, you can configure a different namespace. +* **Internal Cache Version**: Farm maintains a cache version internally, if Farm itself changed, for example, render optimization that affects the output between versions of Farm, Farm will bump the cache version and all cache will be invalidated. + +If your cache does not work, check out above conditions to figure out the reason. If the cache is broken, you can also delete `node_modules/.farm/cache` to remove cache manually. + +## Build Dependencies + +Build dependencies is dependencies that can affect the compilation process or compiled output, for examples, plugins or config files. If any of these dependencies changed, all cache will be invalidated. + +Build dependencies can be a file path for a package name, for example: + +```ts +import { defineConfig } from "@farmfe/core"; +import path from "node:path"; + +export default defineConfig({ + persistentCache: { + buildDependencies: [ + // a file path + path.resolve(process.cwd(), "./plugins/my-plugin.js"), + // a package name, note that this package must expose package.json + "farm-plugin-custom-xxx", + ], + }, +}); +``` + +:::note +By default, all config files and its dependencies are included. But if you want to add some additional files or dependencies to invalidate the cache, you can using `buildDependencies` once these files changed, all cache will be invalidated. +::: + +## Module Cache Key Strategy + +Farm provides 2 strategies to control how to generate module cache key: + +- `timestamp`: whether check timestamp of the module, if the update timestamp does not change, the build of this module will be skipped, which has the best performance. +- `hash`: whether check content hash after load and transform, if the content does not change, the left build of this module will be skipped. + +By default `timestamp` and `hash` are both enabled. + +## Caveats For Plugins + +when `timestamp` is enabled, all build stages hooks like `load` and `transform` won't be called. So if the plugin relies `load` and `transform` and it does not implement `plugin_cache_loaded` and `write_plugin_cache` hook, it may not work as expected. For example, if a plugin collect information in `load` and `transform`, all emit them at `finish` hook, it should implement `plugin_cache_loaded` and `write_plugin_cache` hook to load and write cache, otherwise it will not work as expected. + +Farm will set `timestamp` to `false` when `output.targetEnv` is `node`. + + diff --git a/docs/docs/advanced/polyfill.md b/docs/docs/advanced/polyfill.md new file mode 100644 index 000000000..75bd043a8 --- /dev/null +++ b/docs/docs/advanced/polyfill.md @@ -0,0 +1,73 @@ +# Syntax Downgrade and Polyfill +By default, Farm will downgrade to `ES2017`(native support `async/await`) and inject necessary `polyfills` automatically in production mode. + +:::note +By default, Farm won't do transformation and inject polyfills for modules under `node_modules/`, if you need to downgrade syntax and inject polyfills for `node_modules/` you can use `compilation.presetEnv.include`. +::: + +## Configuring `targetEnv` +Farm provide a normalized [`output.targetEnv`](/docs/config/compilation-options#output-targetenv) option to configure the target execution environment of your application. Farm will perform properly `syntax downgrade` and `polyfill injection` for your target environment automatically. For example: + +```ts title="farm.config.ts" +export default { + compilation: { + output: { + targetEnv: 'browser-legacy' + } + }, +}; +``` + +Farm will compile your application to legacy browsers(ES5): +* Compile all `Js/Jsx/Ts/Tsx` modules to `ES5`, and inject all polyfills(Promise, regenerator-runtime and so on). +* Add prefix for all `css/scss/less` modules, for example, `--webkit-`. + +Farm supports many normalized `targetEnv` options like `browser-modern`, `browser-es2017`, `browser-es2015`, `node16`, `node-legacy`, etc. **By default, `targetEnv` is `browser-es2017`**. Refer to [`output.targetEnv`](/docs/config/compilation-options#output-targetenv). + +:::note +You may need to install `core-js@3` or `regeneration-runtime` manually if polyfill is needed. Try run `pnpm add core-js` if you met something error like `can not resolve 'core-js/modules/xxx'` +::: + +## Configuring Syntax and Polyfill Separately +Internally, `targetEnv` just presets of `presetEnv`, `script.target` and `css.prefixer`. You can configure them more precisely if you need. + +### Configuring `presetEnv` +You can use `compilation.presetEnv` to custom syntax downgrade and polyfill injection. By default all modules under `node_modules` will be ignored. Using `include` to add extra modules that need to be polyfilled. + +```ts title="farm.config.ts" +export default { + compilation: { + presetEnv: { + // include a package under node_modules + include: ['node_modules/package-name'], + options: { + targets: "Chrome >= 48" + } + } + }, +}; +``` + +Note that if your project does not require browser compatibility, you can use set a looser value for `targets`, then less polyfills will be injected and output sizes will be smaller. + +Refer to [compilation.presetEnv](/docs/config/farm-config#presetenv) for more options. + +### Configuring `script.target` +`script.target` is used to control the target env when generate code. If you want to downgrade your project to `ES5`, you should set both: + +```ts title="farm.config.ts" +export default { + compilation: { + script: { + target: 'ES5' + }, + presetEnv: { + // include a package under node_modules + include: ['node_modules/package-name'], + options: { + targets: "> 0.25%, not dead" + } + } + }, +}; +``` \ No newline at end of file diff --git a/docs/docs/advanced/ssr.md b/docs/docs/advanced/ssr.md new file mode 100644 index 000000000..353d82cfe --- /dev/null +++ b/docs/docs/advanced/ssr.md @@ -0,0 +1,279 @@ +# Server-Side Rendering (SSR) +Server-Side Rendering (SSR) means rendering front-end frameworks(for example React, Vue, Solid, etc) to `html` in Node.js(Server Side), and hydrating the `rendered html` on the client. + +:::note +This document describes how to built a SSR application on top of Farm from scratch. +::: + +## Example Projects +Farm provides a list of SSR [examples](https://github.com/farm-fe/farm/tree/main/examples) for popular frameworks: + +* **[React](https://github.com/farm-fe/farm/tree/main/examples/react-ssr)** +* **[Vue](https://github.com/farm-fe/farm/tree/main/examples/vue-ssr)** +* **[Solid](https://github.com/farm-fe/farm/tree/main/examples/solid-ssr)** + +## Project Structure +A [SSR typical application](https://github.com/farm-fe/farm/tree/main/examples/react-ssr) often have the following source file structure: + +``` +. +├── index.html +├── farm.config.ts +├── farm.config.server.ts +├── server.js +└── src + ├── index-client.tsx + ├── index-server.tsx + └── main.tsx +``` + +* **`index.html`**: Entry html of the application that running on the client(browser) +* **`farm.config.ts`**: farm config that builds the project to client +* **`farm.config.server.ts`**: Farm config that builds the project to Node.js(server) +* **`server.js`**: Server script that should be deployed for production +* **`src/index-client.tsx`**: Client entry scripts +* **`src/index-server.tsx`**: Server entry scripts +* **`src/main.tsx`**: Application code shared for both client and server + +`index.html` need to reference `index-client.tsx` and include a placeholder where the server-rendered `markup` should injected: +```html +
app-html-to-replace
+ +``` + +You should replace `
app-html-to-replace
` to the server-rendered `markup`. + +:::tip +We have to build the SSR application **twice**, one for `client`(browser) and one for `server`(Node.js). So `farm.config.ts` and `farm.config.server.ts` are needed, we'll discuss the details in later sections. +::: + +## Setting up Dev Server +For above example, `farm.config.ts` is used to **build the project for browser** and setting up DevServer for server rendering. The content of `farm.config.ts` normally would be: + +```ts title="farm.config.ts" +import path from 'path'; +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + input: { + index_client: './index.html' + }, + output: { + path: './build' + }, + }, + server: { + hmr: true, + cors: true, + middlewares: [ + // register a middleware that render the application on the server, + // inject server rendered markup and return final index.html + (server) => { + server.app().use(async (ctx, next) => { + await next(); + + // handle index.html or SPA fallback + if (ctx.path === '/' || ctx.status === 404) { + // loading the server entry, and render it by ctx.path + const render = await import(path.join(process.cwd(), 'dist', 'index.js')).then( + (m) => m.default + ); + const renderedHtml = render(ctx.path); + + // get compiled index.html content from server.getCompiler() + // The html is compiled for client with all client bundles injected + const template = server + .getCompiler() + .resource('index_client.html') + .toString(); + + // replace the placeholder to rendered markup and return it as html + const html = template.replace( + '
app-html-to-replace
', + renderedHtml + ); + ctx.body = html; + ctx.type = 'text/html'; + ctx.status = 200; + } + + console.log('ctx.path outer', ctx.path); + }); + } + ] + }, + plugins: ['@farmfe/plugin-react', '@farmfe/plugin-sass'] +}); +``` + +In above example, a `middleware` is required for rendering the application to markup and serve it as html. Normal workflow for SSR in the `middleware`: +* **Load compiled server entry:** A `index-server` entry which exports a `render` function is required, we need to `import(server_entry_path)` to get the `render` function. +* **Get compiled client index.html:** All client bundles and Farm runtime are injected to `index.html`, so the client can `hydrate` successfully. +* **Replace the placeholder to rendered markup:** Replace the placeholder and return the `final html`. + +:::note +In this example, we are building a `SPA` SSR application with `if (ctx.path === '/' || ctx.status === 404) {`, if you are building a `MPA` SSR application, guard `ctx.path` to your pages. +::: + +## Building for Node.js +`farm.config.server.ts` is used to **build the project for Node.js**, producing the compiled server entry which can be used to rendering the application to markup on the server side. + +```ts title="farm.config.server.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + // c-highlight-start + input: { + index: './src/index-server.tsx' + }, + output: { + path: './dist', + targetEnv: 'node' + } + // c-highlight-end + }, + plugins: [ + [ + '@farmfe/plugin-react', + { + refresh: false, + development: false + } + ], + '@farmfe/plugin-sass' + ] +}); +``` + +For `farm.config.server.ts`, we set `input` to **server entry** and [`output.targetEnv`](/docs/config/compilation-options#output-targetenv) to `node`. + +:::note +By default, Farm compiles server entry script to `esm`, if you want to compile it to `cjs`, try set [`output.format`](/docs/config/compilation-options#output-format). +::: + +## Develop SSR Project +You have start compilation for both `client` and `server`, for example, you may have following `scripts` in `package.json`: + +```json title="package.json" +{ + "name": "@farmfe-examples/react-ssr", + "scripts": { + // c-highlight-start + "start": "farm start", + "start:server": "farm watch --config farm.config.server.mjs", + // c-highlight-end + } +} +``` + +When starting your SSR project, you should run both `npm run start` and `npm run start:server` in different terminal. + +## Building for Production +You have build both `client` and `server`, for example, you may add following command to `scripts`: + +```json title="package.json" +{ + "name": "@farmfe-examples/react-ssr", + "scripts": { + "start": "farm start", + "start:server": "farm watch --config farm.config.server.mjs", + // c-highlight-start + "build": "farm build", + "build:server": "farm build --config farm.config.server.mjs" + // c-highlight-end + } +} +``` + +When building for production, you should run both `npm run build` and `npm run build:server`, the client bundles will be emitted to `build` dir, and the server bundles will be emitted to `dist` dir. + +For production, you need a `node server` for `rendering` and serving `rendered html`, in this example, we provide a `server.js` as production server: + +```js title="server.js" +import path from 'node:path'; +import { fileURLToPath } from 'node:url' +import fsp from 'fs/promises'; +import express from 'express'; + +function resolve(p) { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + return path.resolve(__dirname, p); +} + +// create a node production server +async function createServer() { + let app = express(); + // serve the client builds as static assets, you can also deploy client builds to CDN or separate dev server as you wish. + app.use(express.static(resolve('build'))); + // listen '/' route, you can replace it to the routes you use. + app.use('/', async (req, res) => { + let url = req.originalUrl; + + try { + let template; + let render; + + // load client html + template = await fsp.readFile(resolve('build/index_client.html'), 'utf8'); + // load server render function + render = await import(resolve('dist/index.js')).then( + (m) => m.default + ); + // render the application to markup + const markup = render(url); + + let html = template.replace( + '
app-html-to-replace
', + markup + ); + // return the rendered html with client bundles, the client bundles hydrate the server rendered markup and make it interactive + res.setHeader('Content-Type', 'text/html'); + return res.status(200).end(html); + } catch (error) { + console.log(error.stack); + res.status(500).end(error.stack); + } + }); + + return app; +} +// create and listen the server +createServer().then((app) => { + app.listen(3000, () => { + console.log('HTTP server is running at http://localhost:3000'); + }); +}); +``` + +We use `express` as server here, but you can use whatever server frameworks you want. The rendering process are the same: +* Loading client compiled html +* Loading `render` function from compiled server script +* Call `const markup = render(url)` function to get the server-side rendered markup of your application +* Replace the `placeholder` in `client index.html` to the `rendered markup` and return the replaced html as final result + +## Static-Site Generation(SSG) +The same flow of SSG is the same as SSR, the difference is SSG that emits to `replaced html` to the final resources. Example scripts for SSG: + +```ts +// load client html +const template = await fsp.readFile(resolve('build/index_client.html'), 'utf8'); +// load server render function +const render = await import(resolve('dist/index.js')).then( + (m) => m.default +); + +const pages = renderDirEntry('src/pages'); + +for (const page of pages) { + // render the application to markup + const markup = render(url); + const html = template.replace( + '
app-html-to-replace
', + markup + ); + // emit the static generated page, for example writing it to disk + emitPage(page, html); +} +``` diff --git a/docs/docs/advanced/tree-shake.md b/docs/docs/advanced/tree-shake.md new file mode 100644 index 000000000..0efbf6ddc --- /dev/null +++ b/docs/docs/advanced/tree-shake.md @@ -0,0 +1,82 @@ +# Tree Shake +Farm supports Tree Shake, which is automatically enabled in the default Production environment. It can be turned on or off by the [`compilation.treeShaking`](/docs/config/compilation-options#treeshaking) option. + +During Tree Shake, the `sideEffects` field in package.json will be automatically read, and modules with `sideEffects` will not perform Tree Shake. + +:::note +Farm will treat all circularly dependent modules as sideEffects and will not perform Tree Shake. Please try to avoid circular dependencies in your project. +::: + +Tree shake example: +```js title="a.js" +import { b1, b2 } from 'b'; +console.log(b1); +``` +```js title="b.js" +export b1 = "B1"; +export b2 = "B2"; +``` +`a.js` is entry and it imports `b.js`, after tree shaking, the result is: +```js title="a.js" +import { b1 } from 'b'; +console.log(b1); +``` +```js title="b.js" +export b1 = "B1"; +``` +`b2` is not used and will be removed in both `a.js` and `b.js` + +## Configuring Tree Shake +Tree Shake is enabled in production mode by default, to disable tree shake, use `compilation.treeShake`: + +```ts title="farm.config.ts" +export default { + compilation: { + treeShake: false, + }, +}; +``` + +## Deal With Side Effects +When a module contains `side effects`, Farm won't apply tree shake for it, and all of its imported and exports are treated as used. Farm will think following modules have `side effects`: +1. CommonJs modules always have side effects. +2. A module contains `self-executed` statement at global scope has side effects +3. Modules that contains cyclic dependencies has side effects +4. Modules matches `sideEffects` config in its closest `package.json` +5. Entry modules are always has side effects. + +Example 1: +```js +const a = require('./') +module.exports = a; +``` +CommonJs module are always has side effects. + +Example 2: +```js +import a from './'; + +a(); +``` +`a()` is executed at global scope and we treat it as side effect. + +Example 3: +```js +// a.js +import b from './b.js' + +// b.js +import a from './a.js' +``` +`a`, `b` are cyclic dependencies, so they will be treated as side effects too. + +Example 4: +```json title="package.json" +{ + "name": "my-package", + "sideEffects": [ + "./global/**.ts" + ] +} +``` +all ts modules under `global/` are treat as side effects. \ No newline at end of file diff --git a/docs/docs/api/hmr-api.md b/docs/docs/api/hmr-api.md new file mode 100644 index 000000000..2383c7334 --- /dev/null +++ b/docs/docs/api/hmr-api.md @@ -0,0 +1,191 @@ +# Hmr Api +:::note +The Farm HMR API is compatible with [Vite's HMR API](https://vitejs.dev/guide/api-hmr.html). +::: + +Farm exports its HMR API via the special `import.meta.hot` object(compatible with Vite): +```ts +export interface ViteHotContext { + readonly data: any; + + accept(): void; + accept(cb: (mod: ModuleNamespace | undefined) => void): void; + accept(dep: string, cb: (mod: ModuleNamespace | undefined) => void): void; + accept( + deps: readonly string[], + cb: (mods: Array) => void + ): void; + + dispose(cb: (data: any) => void): void; + prune(cb: (data: any) => void): void; + invalidate(message?: string): void; + + on( + event: T, + cb: (payload: InferCustomEventPayload) => void + ): void; + off( + event: T, + cb: (payload: InferCustomEventPayload) => void + ): void; + send(event: T, data?: InferCustomEventPayload): void; +} +``` + +## Required Conditional Guard +HMR only works for development mode, make sure to guard HMR API usage with a conditional block: + +```ts +if (import.meta.hot) { + // HMR Code +} +``` + +## IntelliSense for TypeScript +The same as Vite, Farm provides type definitions for `import.meta.hot` in `@farmfe/core/client.d.ts`. You can create an `env.d.ts` in the src directory so TypeScript picks up the type definitions: + +```ts +/// +``` + +## hot.accept() +For a self-accepted module, use `import.meta.hot.accept()`: + +```ts +if (import.meta.hot) { + // self accept without reload the page + import.meta.hot.accept(); + + const div = document.getElementById(id); + // update the page + if (div) { + const comp = SelfAcceptedEmpty().render(); + div.replaceWith(comp); + } +} +``` + +## hot.accept(cb) +If you want to update the module status based on `exports of updated module`, you can use `import.meta.hot.accept(cb)`: + +```ts +if (import.meta.hot) { + // self accept without reload the page + import.meta.hot.accept(mod => { + const div = document.getElementById(id); + const comp = mod[id]().render(); + div?.replaceWith(comp); + }); +} +``` +Arguments of `cb` is the `exports of updated module`, you can do updates based on it. + +## hot.accept(deps, cb) +A module can also accept updates from direct dependencies without reloading itself. + +Accept single dependency: +```ts +if (import.meta.hot) { + // accept dependencies + import.meta.hot.accept('./accept-deps-data', (data) => { + console.log(data); + const div = document.getElementById(id); + const renderData = data.compData(id); + div!.innerText = renderData; + }); +} +``` + +Accept multiple dependencies: +```ts +if (import.meta.hot) { + // accept dependencies + import.meta.hot.accept(['./accept-deps-data'], ([data]) => { + console.log(data); + const div = document.getElementById(id); + const renderData = data.compData(id); + div!.innerText = renderData; + }); +} +``` + +## hot.dispose(cb) +A self-accepting module or a module that expects to be accepted by others can use hot.dispose to clean-up any persistent side effects created by its updated copy: + +```ts +if (import.meta.hot) { + // self accept without reload the page + import.meta.hot.accept(mod => { + const div = document.getElementById(id); + div?.appendChild(mod.createChild()); + }); + + // clean side effects + import.meta.hot.dispose(() => { + // remove all children of the div + const div = document.getElementById(id); + + if (div) { + while (div.firstChild) { + console.log('dispose', div.firstChild); + div.removeChild(div.firstChild); + } + } + }); +} +``` + +## hot.prune(cb) +Register a callback that will call when the module is no longer imported on the page. Compared to hot.dispose, this can be used if the source code cleans up side-effects by itself on updates and you only need to clean-up when it's removed from the page. Farm currently uses this for .css imports(the same as Vite). + +```ts +if (import.meta.hot) {{ + import.meta.hot.accept(); + import.meta.hot.prune(() => {{ + style.remove(); + }}); +}} +``` + +## hot.data + +The import.meta.hot.data object is persisted across different instances of the same updated module. It can be used to pass on information from a previous version of the module to the next one. + +```ts +import.meta.hot.data.value = 'value'; +``` + +## hot.invalidate(message?: string) +A self-accepting module may realize during runtime that it can't handle a HMR update, and so the update needs to be forcefully propagated to importers. By calling import.meta.hot.invalidate(), the HMR server will invalidate the importers of the caller, as if the caller wasn't self-accepting. This will log a message both in the browser console and in the terminal. You can pass a message to give some context on why the invalidation happened. + +Note that you should always call import.meta.hot.accept even if you plan to call invalidate immediately afterwards, or else the HMR client won't listen for future changes to the self-accepting module. To communicate your intent clearly, we recommend calling invalidate within the accept callback like so: + +```ts +if (import.meta.hot) { + // accept dependencies + import.meta.hot.accept((mod) => { + if (cannotHandleUpdate(mod)) { + import.meta.hot.invalidate('parent module should accept this'); + } + }); +} +``` + +## hot.on(event, cb) +The same as Vite, see [Vite hot.on](https://vitejs.dev/guide/api-hmr.html#hot-on-event-cb) + +## hot.off(event, cb) +Remove callback from the event listeners + +## hot.send(event, data) +Send message from HMR client to dev server: + +```ts +import.meta.hot.send('event-name', { data: '123' }); +``` + +Receive message on dev server: + +```ts +server.ws.on('event-name', (data) => {}); +``` \ No newline at end of file diff --git a/docs/docs/api/javascript-api.mdx b/docs/docs/api/javascript-api.mdx new file mode 100644 index 000000000..febe630e4 --- /dev/null +++ b/docs/docs/api/javascript-api.mdx @@ -0,0 +1,576 @@ +import { PackageManagerTabs } from "../../src/theme/PackageManagerTabs"; + +# Javascript Api + +`Farm` provides a comprehensive set of APIs for development servers, compilers, watchers, etc. Developers can use these APIs by importing the `@farmfe/core` package. + +Install the `@farmfe/core` package: + + + +## Start + +The `start` method is used to quickly launch the development server. + +After calling the `start` method, you can see the log information of the available `ip` address in the current console. By default, it compiles the `index.html` file in the current directory. + +Type: + +```typescript +start(options: InlineConfig): Promise +``` +Basic example: + +```javascript +import { start, logger } from "@farmfe/core"; +try { + await start({ + compilation: { + output: { + publicPath: "/dist" + }, + input: { + index: "./base.html" + } + }, + server: { + port: 6532, + hmr: { + path: "/__farm_hmr", + } + }, + plugins: [ + '@farmfe/plugin-react', + '@farmfe/plugin-sass' + ], + }); +} catch (error) { + logger.error(`Failed to start server:\n ${error.stack}`); + process.exit(1); +} + +``` + +another way is use more deep api to start server: + + + +```javascript +import { + createCompiler, + createDevServer, + resolveConfig +} from '@farmfe/core'; + +const resolveUserConfig = await resolveConfig({ + compilation: { + output: { + publicPath: "/dist" + }, + input: { + index: "./base.html" + } + }, + server: { + port: 6532, + hmr: { + path: "/__farm_hmr", + } + }, + plugins: [ + '@farmfe/plugin-react', + '@farmfe/plugin-sass' + ], +}) + +// create compiler +const compiler = await createCompiler(resolveUserConfig); +const server = await createDevServer(compiler, resolveUserConfig); +server.listen(); +``` + +## Build +The build method is used to build for the production environment. + +After calling the build method, it defaults to building browser artifacts and generates a dist folder in the current directory. If you need to build artifacts for different environments and versions, such as node, node-next, browser, browser-es2017, etc., you can configure it by checking output targetEnv. + +Type: + +```typescript +build(options: InlineConfig): Promise +``` +Basic example: + +```javascript +import { build, logger } from "@farmfe/core"; +try { + await build(options); +} catch (error) { + logger.error(`error during build:\n ${error.stack}`); + process.exit(1); +} +``` +## Watch +The watch method provides real-time updates for the compilation of the current project, equivalent to npx farm build --watch. Generally used in the node environment. + +Type: + +```typescript +watch(options: InlineConfig): Promise +``` +Basic example: + +```javascript +import { watch, logger } from "@farmfe/core"; +try { + await watch(defaultOptions); +} catch (error) { + logger.error(`error during watch project:\n ${error.stack}`); + process.exit(1); +} +``` +## Preview +The preview method starts a preview server for previewing production artifacts. Make sure to have built the artifacts using the build method and have the correct production artifacts. + +Type: + +```typescript +preview(options: InlineConfig): Promise +``` +Basic example: + +```javascript +import { preview, logger } from "@farmfe/core"; +try { + await preview(defaultOptions); +} catch (error) { + logger.error(`Failed to start preview server:\n ${error.stack}`); + process.exit(1); +} +``` +## Clean +The clean method clears the cache generated by the farm incremental build. If you have issues with the incremental build causing crashes due to unforeseen or undiscovered problems, clearing the cache might help. + +:::warning +If there are problems with the incremental build causing crashes that are not resolved by clearing the cache, please submit an issue on GitHub. +::: + +Type: + +```typescript +clean(options: InlineConfig): Promise +``` +Basic example: + +```javascript +import { clean, logger } from "@farmfe/core"; +try { + await clean(defaultOptions); +} catch (error) { + logger.error(`Failed to clean cache:\n ${error.stack}`); + process.exit(1); +} +``` + +## loadEnv +Load environment variables from the .env file. + +```ts +type LoadEnvFunc = ( + mode: string, + envDir: string, + prefixes: string | string[] = ['FARM_', 'VITE_'] +) => [env: Record, existsEnvFiles: string[]]; +``` + +* `mode` is `development`, `production` or any string. `loadEnv` will try load `[``.env``, ``.env.local``, ``.env.${mode}``, ``.env.${mode}.local``]` for `envDir`. +* `envDir` is the directory where the `.env` file is located. +* `prefixes` is the prefix of the environment variable. The default value is `['FARM_', 'VITE_']`. Env variables with these prefixes will be injected into `define` automatically. + +```js +const [env, files] = loadEnv('development', '/path/to/project/env'); +// use env +``` + +## createDevServer +The createDevServer method is used to start a local development server. You need to instantiate the Server object first and pass the compiler as a parameter. + +Type: + +```typescript +createDevServer(options: DevServerOptions): Promise +``` +Basic example: + +```javascript +import { Server } from "@farmfe/core"; +const server = new Server(); +await server.createDevServer(options); +server.listen() +``` +## createPreviewServer +Create a preview server for previewing production artifacts. + +Type: + +```typescript +createPreviewServer(options: DevServerOptions): Promise +``` +Basic example: + +```javascript + +import { Server } from "@farmfe/core"; +const server = new Server(); +await server.createPreviewServer(options); +``` +## getCompiler +Get the current development server's compiler instance. Pass the compiler as a parameter when instantiating the Server. + +Type: + +```typescript + +getCompiler(): Compiler +``` +Basic example: + +```javascript + +import { Server, Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +const server = new Server({ + compiler +}); +const compilerInstance = server.getCompiler(); +``` +## close +Close all servers and WebSocket services opened by createDevServer. + +Basic example: + +```javascript + +import { Server } from "@farmfe/core"; +const server = new Server(); +await server.createDevServer(options); +server.listen() +await server.close(); +``` +## Compiler +The Compiler provides a set of compiler APIs. You can create a compiler instance by instantiating Compiler. + +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile(); +``` +### compile +Asynchronously start the compilation process. Returns a Promise. + +:::note +If specific environment variables are set (process.env.FARM_PROFILE), it performs a synchronous compilation. +::: + +Type: + +```typescript + +compile(): Promise +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile(); +``` +### compileSync +Synchronously start the compilation process. + +Type: + +```typescript + +compileSync(): void +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +compiler.compileSync(); +``` +### traceDependencies +Trace dependencies between files. Returns an array of all dependencies for the provided input in the compiler configuration. Useful for restarting compilation based on file dependencies. + +Type: + +```typescript + +traceDependencies(): Array +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; + +const config = { + input: "./farm.config.js" +} +const compiler = new Compiler(config); +const dependencies = compiler.traceDependencies(); +``` +Returns an array of paths representing all dependencies. + +### update +Update compilation based on the provided paths. Returns a Promise resolving to a JsUpdateResult. If compilation is already in progress, it waits for completion and updates. If ignoreCompilingCheck is set to true, it won't check the compilation status. + +```typescript + +type JsUpdateResult = { + success: boolean + errors: Array + warnings: Array +} + +update(paths: Array, sync: boolean, ignoreCompilingCheck: boolean): JsUpdateResult +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +const result = await compiler.update(paths, true, true); +``` +### hasModule +Pass a path to determine if the current path is within the modules compiled by the compiler. + +Type: + +```typescript + +hasModule(path: string): boolean +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +const result = compiler.hasModule(path); +``` +### getParentFiles +Retrieve the current file that a module import with the module import name (id) or resolved path identifier (resolvedPath) imports. + +Type: + +```typescript + +getParentFiles(resolvedPath: string): Array +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +const result = compiler.getParentFiles(resolvedPath); +``` +### resources +Return all resources compiled by the compiler. + +Type: + +```typescript + +type Resource = { + path: string + buffer: Buffer +} +resources(): Array +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile() +const result = compiler.resources(); +``` +### Resource +Return the buffer of the current artifact based on the given file. + +Type: + +```typescript + +resource(path: string): Buffer | null +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile() +const result = compiler.resource(path); +``` +### writeResourcesToDisk +Write resources to disk based on the configured output path. + +Type: + +```typescript + +writeResourcesToDisk(): void +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile() +compiler.writeResourcesToDisk(); +``` +### removeOutputPathDir +Remove the output path directory. + +Type: + +```typescript + +removeOutputPathDir(): void +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile() +compiler.removeOutputPathDir(); +``` +### resolvedWatchPaths +Return resolved watch paths. + +Type: + +```typescript + +resolvedWatchPaths(): Array +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile() +const result = compiler.resolvedWatchPaths(); +``` +### resolvedModulePaths +Return resolved module paths relative to the provided root path. + +Type: + +```typescript + +resolvedModulePaths(rootPath: string): Array +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile() +const result = compiler.resolvedModulePaths(rootPath); +``` +### onUpdateFinish +Add a callback to be executed after the update process is complete. + +Type: + +```typescript + +onUpdateFinish(callback: (...args: any[]) => any): void +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +compiler.onUpdateFinish(callback); +``` +### outputPath +Return the resolved output path. + +Type: + +```typescript + +outputPath(): string +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +const result = compiler.outputPath(); +``` +### addExtraWatchFile +Add extra watch files for the compiler. + +Type: + +```typescript + +addExtraWatchFile(rootPath: string, filePath: string[]): void +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +compiler.addExtraWatchFile(rootPath, filePath); +``` +### modules +Return an array of objects representing file module resolutions. + +Type: + +```typescript + +export interface Module { + id: string + moduleType: string + moduleGroups: Array + resourcePot?: string + sideEffects: boolean + sourceMapChain: Array + external: boolean + immutable: boolean +} +modules(): Array +``` +Basic example: + +```javascript + +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +const result = compiler.modules(); +``` diff --git a/docs/docs/api/js-plugin-api.md b/docs/docs/api/js-plugin-api.md new file mode 100644 index 000000000..0a3939469 --- /dev/null +++ b/docs/docs/api/js-plugin-api.md @@ -0,0 +1,884 @@ +# Js Plugin Api + +Farm Js Plugin has designed a similar rollup style design plugin system and easy to migrate your plugins/projects from Rollup/Vite/Webpack. + + +## Configuring Js Plugins + +Adding JS plugins by `plugins` option: + +```ts title="farm.config.ts" {3,7} +import { defineConfig } from "@farmfe/core"; +// import a js plugin +import farmPluginFoo from "farm-plugin-foo"; + +export default defineConfig({ + // configuring it in plugins + plugins: [farmPluginFoo()], +}); +``` + +## Writing Js Plugins +A Farm Js Plugin is a plain javascript object which exposes a set of `hook`s. for example: + +```ts title="my-farm-plugin.ts" +// Create a plugin file that exports a plugin function which returns a `JsPlugin` Object: +import type { JsPlugin } from '@farmfe/core'; + +// Plugin Options +export interface PluginOptions { + test: boolean; +} +// export a Plugin Function +export default function MyPlugin(options: PluginOptions): JsPlugin { + // reading options + const { test } = options; + + // return a object that exposes hook + return { + name: 'my-farm-plugin', + // using load hook to load custom modules + load: { + filters: { + resolvedPaths: ['\\.test$'] // filter files to improve performance + }, + async executor({ resolvedPath }) { + if (test && resolvedPath.endsWith('.test')) { + return { + content: 'test file', + sourceMap: null + } + } + } + } + } +} +``` + +:::note +* Farm provided `create-farm-plugin` tool to help you create and develop you js plugin quickly. For more details about writing JS plugins, refer to [Writing JS Plugins](/docs/plugins/writing-plugins/js-plugin) +::: + +## Plugin Hook Overview +The Js plugin hook is the same as the Rust plugin, See [Rust Plugin Hook Overview](/docs/api/rust-plugin-api#plugin-hooks-overview). + +:::note +Not all hooks are exposed to Js Plugins, only hooks listed in this document are available. +::: + +## hooks +### name +- **type: `string`** +- **required: `true`** + +The name of this plugins, MUST not be empty. +```ts +export default function MyPlugin() { + return { + name: 'my-plugin', + // ... + } +} +``` + +### priority +- **type: `number`** +- **required: `false`** +- **default: `100`** + +The priority of this plugins, default to `100`. `priority` controls the execution order of plugins, the larger the value, the earlier the plugin is executed. + +```ts +export default function MyPlugin() { + return { + name: 'my-plugin', + priority: 1000, // make this plugins execute before all other plugins + // ... + } +} +``` +:::note +Note that the priority of most farm internal plugins like `plugin-script`, `plugin-resolve` is `99`, which means your plugins is always executed before the internal plugins. If your want to make your plugin executed after farm internal plugins, set `priority` to a value that smaller than `99`, for example: `98`. Also the priority value can be negative, you can set it to `-9999` to make sure it is always executed at last. +::: + +### config +- **type: `config?: (config: UserConfig) => UserConfig | Promise;`** +- **hook type: `serial`** +- **required: `false`** + +Modify [Farm config](/docs/config/configuring-farm.md) in `config` hook, return the (partial) `modified config`, the returned config will be deeply merged into the config resolved from cli and config file. You can also directly mutate the config. + +Example: +```ts +const resolveConfigPlugin = () => ({ + name: 'return-resolve-config-plugin', + config: (_config) => ({ + compilation: { + resolve: { + alias: { + foo: 'bar' + } + } + } + }) +}); +``` + +:::note +`config` hook is called after all `user plugins` are resolved, so add new plugins into the config has no effect. +::: + + +### configResolved +- **type: `configResolved?: (config: ResolvedUserConfig) => void | Promise;`** +- **hook type: `serial`** +- **required: `false`** + +Called when the config resolved(after all plugin's `config` hook being called). Useful when you want to get the final resolved config for your plugin. + +Example: +```ts +const myPlugin = () => { + let farmConfig; + + return { + name: 'my-plugin', + configResolved(resolvedConfig) { + // get resolved config + resolvedConfig = farmConfig; + }, + transform: { + filters: { + moduleTypes: ['js'] + }, + async executor(param) { + if (farmConfig.xxx) { + // ... + } + } + } + } +} +``` + +### configureDevServer +- **type: `configureDevServer?: (server: Server) => void | Promise;`** +- **hook type: `serial`** +- **required: `false`** + +:::note +Note that this hook runs in development mode only. +::: + +Called when `Dev Server` is ready, you can get the dev server instance. + +Example: +```ts +const myPlugin = () => { + let devServer; + + return { + name: 'my-plugin', + configureDevServer(server) { + devServer = server; + } + } +} +``` + +:::note +Both `config` and `configResolved` hook of `js plugin` are called before `config` hook of `rust plugin`. +::: + +### configureCompiler +- **type: `configureCompiler?: (compiler: Compiler) => void | Promise;`** +- **hook type: `serial`** +- **required: `false`** + +Called when `Rust Compiler` is ready, this hook runs in both development and production. You can get `Compiler` instance here + +Example: +```ts +const myPlugin = () => { + let farmCompiler; + + return { + name: 'my-plugin', + configureCompiler(compiler) { + farmCompiler = compiler; + } + } +} +``` + +### buildStart +- **type: `buildStart?: { executor: Callback, void> };`** +- **hook type: `parallel`** +- **required: `false`** + +Called before the compilation starts. You can do some initialization work here. + +Example: +```ts +const myPlugin = () => { + // your plugin operations + let myPluginContext = createMyPluginContext(); + + return { + name: 'my-plugin', + buildStart: { + async executor() { + // set up my plugin before compilation. + myPluginContext.setup(); + } + } + } +} +``` +:::note +`buildStart` is only called once for the first compile. Later compiling like `Lazy Compilation` and `HMR Update` won't trigger `buildStart`. +::: + +### resolve +- **required: `false`** +- **hook type: `first`** +- **type:** +```ts +type ResolveHook = { + filters: { + importers: string[]; + sources: string[]; + }; + executor: Callback +}; + +type Callback = ( + param: P, + context?: CompilationContext, + hookContext?: { caller?: string; meta: Record } +) => Promise; + +/// Parameter of the resolve hook +export interface PluginResolveHookParam { + /// the start location to resolve `source`, being [None] if resolving a entry or resolving a hmr update. + /// it's id of the parent module, for example: `src/index.ts` or `src/index.vue?vue&type=xxx` + importer: string | null; + /// for example, [ResolveKind::Import] for static import (`import a from './a'`) + kind: ResolveKind; + /// source of the import. for example in index.ts (import App from "./App.vue") + /// source should be './App.vue' + source: string; +} +/// Resolve result of the resolve hook +export interface PluginResolveHookResult { + /// resolved path, normally a absolute path. you can also return a virtual path, and use [PluginLoadHookResult] to provide the content of the virtual path + resolvedPath: string; + /// whether this module should be external, if true, the module won't present in the final result + external: boolean; + /// whether this module has side effects, affects tree shaking + sideEffects: boolean; + /// the query parsed from specifier, for example, query should be `{ inline: true }` if specifier is `./a.png?inline` + /// if you custom plugins, your plugin should be responsible for parsing query + /// if you just want a normal query parsing like the example above, [crate::utils::parse_query] is for you + query: [string, string][] | null; + /// meta data of the module, will be passed to [PluginLoadHookParam] and [PluginTransformHookParam] + meta: Record | null; +} +``` + +:::note +All filters `sources` and `importers` of resolve hook are `regex string`. +::: + +Custom `source` resolving from `importer`, for example, resolving `./b` from `a.ts`: +```ts title="a.ts" +import b from './b?raw'; +// ... +``` +Then the resolve params would be: +```ts +const param = { + source: "./b", + importer: { relative_path: "a.ts", query_string: "" }, + kind: 'import' +} +``` +The resolve result of default resolver would be: +```rust +const resolve_result = { + resolved_path: "/root/b.ts", // resolved absolute path of the module + external: false, // this module should be included in the final compiled resources and should not be external + side_effects: false, // this module may be tree shaken as it does not contains side effects + query: [["raw", ""]], // query from the source. + meta: {} +} +``` + +The `HookContext` is used to pass status when you can the hooks recursively, for example, your plugin call `context.resolve` in `resolve hook`: +```ts +const myPlugin = () => ({ + name: 'my-plugin', + resolve: { + filters: { + sources: ['^.+foo.+$'], + importers: ['^src/index.ts$'] + }, + executor: async (param, context, hookContext) => { + console.log(param); + if (hookContext.caller === 'my-plugin') { + return null; + } + // replace the original source and resolve new source + const newSource = param.source.replace('foo', 'bar'); + return context.resolve({ + ...param, + source: newSource + }, { + caller: 'my-plugin', + meta: {} + }); + } + } +}); +``` + +In above example, we call `context.resolve` and pass `caller` as parameter, then we should add a guard like `if (hookContext.caller === 'my-plugin') {` to avoid infinite loop. + +Note: +* By default, you `resolve hook` are executed **after** the default resolver inside Farm, only the sources that can not be resolved by internal resolver will be passed to your plugin, which means if you want to override the default resolve, you need to set your **plugin's priority larger** than `101`. +* Usually `resolved_path` is the real absolute path that points to a file. But you can still return a `virtual module id` like `virtual:my-module`, but for virtual module you need to implement `load` hook to custom how to load your virtual module. And in Farm, `resolved_path + query = module_id`. +* `ResolveKind` presents the `import type`, Example values: `require`(imported by commonjs require), `cssImport`(imported by css's import statement), etc. +* `meta` can be shared between plugins and hooks, you can get `meta` from params of `load`, `transform` and `parse` hooks in any plugin. + +### load +- **required: `false`** +- **hook type: `first`** +- **type:** +```ts +type LoadHook = { + filters: { + importers: string[]; + sources: string[]; + }; + executor: Callback +}; + +type Callback = ( + param: P, + context?: CompilationContext, + hookContext?: { caller?: string; meta: Record } +) => Promise; + +export interface PluginLoadHookParam { + moduleId: string; + resolvedPath: string; + query: [string, string][]; + meta: Record | null; +} + +export interface PluginLoadHookResult { + /// the content of the module + content: string; + /// the type of the module, for example [ModuleType::Js] stands for a normal javascript file, + /// usually end with `.js` extension + moduleType: ModuleType; + /// source map of the module + sourceMap?: string | null; +} +``` + +Custom how to load your module from a resolved module path or module id. For example, load a virtual module: +```ts +const myPlugin = () => ({ + name: 'my-plugin', + load: { + filters: { + resolvedPaths: ['^virtual:my-plugin$'], + }, + executor: async (param, context, hookContext) => { + if (param.resolvedPath === 'virutal:my-plugin') { + return { + content: 'export default "foo"', + moduleType: 'js' + }; + } + } + } +}); +``` + +`module_type` and `content` is required when loading modules in your `load` hook. `source_map` is optional, you can return source map if you do transform in the `load` hook(which is not recommended, we recommend to use `transform` hook for this situation) or you load original source map from other locations. + + +`filters.resolvedPath` of `load hook` is `resolvedPath + query`, for example: `/root/src/index.vue?vue&type=style&lang=css`. If you want to ignore query when filtering modules, you can use `$`: `src/index\\.vue$`; If you want to filter modules by query, for example, filtering `lang=css`, you can use `src/index.vue\\.+\\?vue&.+lang=css`. + +### transform +- **required: `false`** +- **hook type: `serial`** +- **type:** +```ts +type TransformHook = { + filters: { + importers: string[]; + sources: string[]; + }; + executor: Callback +}; + +type Callback = ( + param: P, + context?: CompilationContext, + hookContext?: { caller?: string; meta: Record } +) => Promise; + +export interface PluginTransformHookParam { + moduleId: string; + /// source content after load or transformed result of previous plugin + content: string; + /// module type after load + moduleType: ModuleType; // Module Type is 'js' | 'jsx' | 'ts' | 'tsx' | 'css' | 'html'... + resolvedPath: string; + query: [string, string][]; + meta: Record | null; + sourceMapChain: string[]; +} + +export interface PluginTransformHookResult { + /// transformed source content, will be passed to next plugin. + content: string; + /// you can change the module type after transform. + moduleType?: ModuleType; + /// transformed source map, all plugins' transformed source map will be stored as a source map chain. + sourceMap?: string | null; + // ignore previous source map. if true, the source map chain will be cleared. and this result should return a new source map that combines all previous source map. + ignorePreviousSourceMap?: boolean; +} +``` + +Do transformation based on **`module content`** and **`module type`**. Example for transforming `sass` to `css`: + +```ts +export default function farmSassPlugin( + options: SassPluginOptions = {} +): JsPlugin { + return { + name: pluginName, + load: { + filters: { resolvedPaths: ['\\.(scss|sass)$'] }, + async executor(param) { + if (param.query.length === 0 && existsSync(param.resolvedPath)) { + const data = await readFile(param.resolvedPath); + return { + content: data, + moduleType: 'sass' + }; + } + + return null; + } + }, + transform: { + filters: { + moduleTypes: ['sass'] + }, + async executor(param, ctx) { + const { css: compiledCss, map } = compileSass(param.content); + return { + content: compiledCss, + moduleType: 'css' // transformed sass to css, + sourceMap: JSON.stringify(map) + ignorePreviousSourceMap: false, + } + } + } + } +} +``` +Normal steps for writing `transform hook`: +1. add a `if` guard based `moduleType` or `resolvedPath` or `moduleId` +2. do transformation of the `content` +3. return the transformed `content`, `sourceMap` and `moduleType` + +For `ignorePreviousSourceMap`, if you handled `param.sourceMapChain` and collapsed the source maps of previous plugins in the `transform hook`. You should set `ignorePreviousSourceMap` to `true` to ensure source map is correct. Otherwise, you should always set this option to `false` and leave source map chain handled by Farm. + +For filters: +* When both `resolvedPaths` and `moduleTypes` are specified, take the union. +* `filters.resolvedPaths` is `resolvedPath + query`, for example: `/root/src/index.vue?vue&type=style&lang=css`. If you want to ignore query when filtering modules, you can use `$`: `src/index\\.vue$`; If you want to filter modules by query, for example, filtering `lang=css`, you can use `src/index.vue\\.+\\?vue&.+lang=css`. +* `filters.moduleTypes` is **NOT** `regex`, it must exactly match the `ModuleType` like `css`, `js`, `tsx`, etc. + +:::note +`transform` hook is **content to content**. There is a similar hook called `process_module`, `process_module` is **ast to ast**. Js plugin does not support `process_module` hook due to performance issues, if you want **ast to ast** transformations, try [`Rust Plugin`](/docs/plugins/writing-plugins/rust-plugin) instead. +::: + +### buildEnd +- **type: `buildEnd?: { executor: Callback, void> };`** +- **hook type: `parallel`** +- **required: `false`** + +Called after the `ModuleGraph` built, but before the resources render and generation starts. You can do some status updating or finalization work here. + +Example: +```ts +const myPlugin = () => { + // your plugin operations + let myPluginContext = createMyPluginContext(); + + return { + name: 'my-plugin', + buildEnd: { + async executor() { + // update my plugin status + myPluginContext.updateStatus('module-graph-built'); + } + } + } +} +``` +:::note +`buildEnd` is only called once for the first compile. Later compiling like `Lazy Compilation` and `HMR Update` won't trigger `buildEnd`. +::: + +### renderStart +- **type: `renderStart?: { executor: Callback; };`** +- **hook type: `parallel`** +- **required: `false`** + +Called before the resources render starts. + +Example: +```ts +const myPlugin = () => { + // your plugin operations + let myPluginContext = createMyPluginContext(); + + return { + name: 'my-plugin', + renderStart: { + async executor() { + // update my plugin status + myPluginContext.updateStatus('render-start'); + } + } + } +} +``` +:::note +`renderStart` is only called once for the first compile. Later compiling like `Lazy Compilation` and `HMR Update` won't trigger `renderStart`. +::: + +### renderResourcePot +- **required: `false`** +- **hook type: `serial`** +- **type:** +```ts +type RenderResourcePotHook = JsPluginHook< + { + resourcePotTypes?: ResourcePotType[]; + moduleIds?: string[]; + }, + RenderResourcePotParams, + RenderResourcePotResult +>; + +type Callback = ( + param: P, + context?: CompilationContext, +) => Promise; +type JsPluginHook = { filters: F; executor: Callback }; + +export interface RenderResourcePotParams { + content: string; + sourceMapChain: string[]; + resourcePotInfo: { + id: string; + name: string; + resourcePotType: ResourcePotType; + map?: string; + modules: Record; + moduleIds: ModuleId[]; + data: JsResourcePotInfoData; + custom: Record; + }; +} +export interface RenderResourcePotResult { + content: string; + sourceMap?: string; +} +``` + +`Resource Pot` is the abstract representation of the final output bundle file, you can return transformed `resourcePot content` to mutate the final bundle. For example, rendering css: + +```ts +const myPlugin = () => ({ + name: 'test-render-resource-pot', + renderResourcePot: { + filters: { + moduleIds: ['^index.ts\\?foo=bar$'], + resourcePotTypes: ['css'] + }, + executor: async (param) => { + return { + content: param.content.replace( + '<--layer-->', + cssCode + ), + sourceMap + }; + } + } +}) +``` +We transform all `<--layer-->` in css resource pot and replace them to real `css code`. + +:::note +When both `filters.moduleIds` and `filters.resourcePotTypes` are specified, take the union. +::: + +### augmentResourceHash +- **required: `false`** +- **hook type: `serial`** +- **type:** +```ts +type AugmentResourceHash = JsPluginHook< + { + resourcePotTypes?: ResourcePotType[]; + moduleIds?: string[]; + }, + { + id: string; + name: string; + resourcePotType: ResourcePotType; + map?: string; + modules: Record; + moduleIds: ModuleId[]; + data: JsResourcePotInfoData; + custom: Record; + }, + string +>; + +type Callback = ( + param: P, + context?: CompilationContext, +) => Promise; +type JsPluginHook = { filters: F; executor: Callback }; +``` + +Append resource hash for give Resource Pot. Useful if you want to add additional conditions when generating resource hash. + + +```ts +const myPlugin = () => ({ + name: 'test-augment-resource-pot', + renderResourcePot: { + filters: { + moduleIds: ['^index.ts\\?foo=bar$'], + resourcePotTypes: ['css'] + }, + executor: async (param) => { + return 'my-hash-args'; + } + } +}) +``` + +:::note +When both `filters.moduleIds` and `filters.resourcePotTypes` are specified, take the union. +::: + +### finalizeResources +- **required: `false`** +- **hook type: `serial`** +- **type:** +```ts +type FinalizeResourcesHook = { + executor: Callback< + FinalizeResourcesHookParams, + FinalizeResourcesHookParams['resourcesMap'] + >; +}; + +export type FinalizeResourcesHookParams = { + resourcesMap: Record; + config: Config['config']; +}; + +export interface Resource { + name: string; + bytes: number[]; + emitted: boolean; + resourceType: string; + origin: { type: 'ResourcePot' | 'Module'; value: string }; + info?: ResourcePotInfo; +} +``` + +Do some transformations for all generated resources, return `transformed resourcesMap`. You can `add`, `remove`, `modify` final generated resources in this hook. + +Note: +* `bytes` is binary of the final output, for `js/css/html` code, you can use `Buffer.from(bytes).toString()` to get the code. +* `name` is the final file name. +* `origin` represent where this `Resource` is from, `ResourcePot` means it's generated from `ResourcePot` which is a modules bundle; `Module` means it's from `Module`, for example, static files like `.png/.jpg` are from `Module`. + +### transformHtml +- **required: `false`** +- **hook type: `serial`** +- **type:** +```ts +type TransformHtmlHook = { + order?: 0 | 1 | 2; + executor: Callback<{ htmlResource: Resource }, Resource>; +}; +``` + +The `order` is used to configure when to execute `transformHtml` hook: +* `0`: means `pre`, executed before parse and generate resources. You can transform original html in this stage. +* `1` and `2`: means `normal` and `post`, executed after parse and generate resources. In this stage, all ` + + +``` + +and when loading dynamic scripts and css, the dynamic fetched resources url would also be: `https://cdn.com/` + +#### `output.assetsFileName` + +- **Default value**: `"[resourceName].[ext]"` + +The filename configuration for static resource output, the placeholder is the same as `output.filename`. + +#### `output.targetEnv` + +- **default**: `"browser-es2017"` + +Configure the execution environment of the product, which can be `"browser"` or `"node"`. Farm will automatically inject polyfill and downgrade syntax(for both script and css) for your specified targetEnv, the supported `targetEnv`s is below: + +Targeting `browser`: +* **`browser-es2017`**: Compiling the project to browsers that support `async await` natively. +* **`browser-es2015`**: Compiling the project to browsers that support `es6 features` natively. +* **`browser-legacy`**: Compile the project to `ES5`, for example, `IE9`. Note that this may introduce lots of polyfills which makes production size larger. Make sure you really need to support legacy browsers like `IE9`. +* **`browser-esnext`**: Compile the project to latest modern browsers, no polyfill will be injected. +* **`browser`**: Alias of `browser-es2017` + +Targeting `node`: +* **`node16`**: Compile the project to `Node 16`. +* **`node-legacy`**: Compile the project to `Node 10`. +* **`node-next`**: Compile the project to latest Node Version, no polyfill will be injected. +* **`node`**: Alias of `node16` + + +#### `output.format` + +- **default**: `"esm"` + +The format of the configuration product, which can be `"esm"` or `"cjs"`. + +:::note +This option is only valid for Js products +::: + +### resolve + +- **type**: `ResolveOptions` + +```ts +interface ResolveOptions { + extensions?: string[]; + alias?: Record; + mainFields?: string[]; + conditions?: string[]; + symlinks?: boolean; + strictExports?: boolean; +} +``` + +#### `resolve.extensions` + +- **default**: `["tsx", "ts", "jsx", "js", "mjs", "json", "html", "css"]` + +Configure the suffix when parsing dependencies. For example, when parsing `./index`, if it is not resolved, the suffix parsing will be automatically added, such as trying `./index.tsx`, `./index.css`, etc. + +#### `resolve.alias` + +- **Default value**: `{}` + +Configure parsing alias, example: + +```ts +export default defineConfig({ + compilation: { + resolve: { + alias: { + "/@": path.join(process.cwd(), "src"), + stream$: "readable-stream", + "$__farm_regex:^/(utils)$": path.join(process.cwd(), "src/$1"), + }, + }, + }, +}); +``` + +alias is prefix replacement, for the above example `/@/pages` will be replaced by `/root/src/pages`. + +If you want an exact match, you can add `$`, for example `stream$` will only replace `stream`, but not `stream/xxx`. + +If you want to use regex, you can use `$__farm_regex:`, for example `$__farm_regex:^/(utils)$` will replace `/utils` to `/root/src/utils`. + +#### `resolve. mainFields` + +- **default**: `["exports", "browser", "module", "main"]` + +When parsing dependencies under node_modules, the fields and order configured in `mainFields` will be parsed from package.json. For `package.json` + +```json +{ + "name": "package-a", + "module": "es/index.js", + "main": "lib/index.js" +} +``` + +Will use `es/index.js` first (if the path exists), and will continue to search backwards if it does not exist. + +#### `resolve.conditions` + +Configuration is not currently supported. + +#### `resolve.symlinks` + +- **default**: `true` + +When parsing a file, whether to track the real directory corresponding to the symlink, and start parsing the next dependency from the real directory. If pnpm is used to manage dependencies, this option must be configured as true. + +#### `resolve. strictExports` + +- **default**: `false` + +Whether to strictly follow the exports defined in `exports` in `package.json`. If set to true, when `exports` is defined in `package.json`, but `exports` does not define the corresponding export, an error will be reported directly. If set to true, it will continue to try other entries according to mainFields. + +### define + +- **Default value**: `{}` + +Global variable injection, the configured variable name and value will be injected into the product at compile time. Farm injects `process.env.NODE_ENV` and some variables used by Farm itself such as `FARM_HMR_PORT` by default + +```ts +export default defineConfig({ + compilation: { + define: { + MY_VAR: 123, + }, + }, +}); +``` + +### external + +- **default**: `[]` +- **type**: `(string | Record)[]` + +Configure the imports that are external, and the imports that are external will not appear in the compiled product. However, the corresponding import statement will not be deleted. You need to customize how to deal with external, otherwise an error will be reported at runtime. If targetEnv is an external module under node, it will automatically try to require the module. + +It needs to be configured in a regular way, for example: + +```ts +export default defineConfig({ + compilation: { + external: ["^stream$", { jquery: "Jquery" }], + }, +}); +``` + +### externalNodeBuiltins +- **default**: `true` + +External `module.builtinModules` or not, by default, all builtin modules like `fs` will be external. You can also set `externalNodeBuiltins` as `array` to specify the modules to external manually: + +```ts +export default defineConfig({ + compilation: { + externalNodeBuiltins: ["^stream$"], + }, +}); +``` + +### mode + +- **default**: `development` for start, watch commands, `production` for build commands + +Configure the compilation mode. In order to optimize the performance during development, if there is no manual configuration of production optimization related options (minify, tree shake, etc.), the production environment optimization such as compression and tree shake will be disabled by default under `development`. In `production` mode enabled. + + +### runtime + +Configure Farm runtime capabilities. The types are as follows: + +```ts +interface FarmRuntimeOptions { + runtime?: { + path: string; + plugins?: string[]; + namespace?: string; + isolate?: boolean; + }; +} +``` + +#### `runtime.path` + +- **Default value**: The path of Farm's built-in runtime + +Customize a Runtime to replace Farm's built-in Runtime. + +:::warning +It is not recommended to configure this option under normal circumstances, because once this option is configured, the pointed runtime needs all +::: + +#### `runtime.plugins` + +- **Default value**: The path of Farm's built-in runtime-plugin-hmr + +Configure the Runtime plug-in, through the Runtime plug-in, you can intervene in Runtime behavior, such as module loading, resource loading, etc. For details, please refer to: WIP. + +#### `runtime.namespace` + +- **default**: name field of project package.json + +Configure the namespace of Farm Runtime to ensure that the execution of different products under the same window or global can be isolated from each other. By default, the name field of the project package.json is used as the namespace. + +#### `runtime.isolate` + +- **default**: `false` + +By default, runtime files in html are written inline. If you want to reduce the size of the html file by popping it up as a separate file, then you can set this attribute to true. +If set to true, the farm entry script will be emitted as a separate file. + + +### assets + +#### `assets.include` + +- **default**: `[]` + +Additional file suffixes that are regarded as static resources, such as the following example, `txt` will be regarded as posture resources, and will be treated as static resources when importing txt files: + +```ts +export default defineConfig({ + compilation: { + assets: { + include: ["txt"], + }, + }, +}); +``` + +### script + +#### `script.target` + +- **Default value**: `esnext` (dynamically adjusted according to the iteration of Farm) + +Configure Farm to parse the AST of `js/jsx/ts/tsx` and support the ES syntax version when generating code. Possible values: `es5`, `es6`, `es2015` - `es2023`, `esnext` + +#### `script.parser` + +- **default**: same as SWC + +Configure the behavior of SWC when parsing AST, configuration item reference: https://swc.rs/docs/configuration/compilation#jscparser + +#### `script.plugins` + +- **default**: `[]` + +Configure the swc plugin array, each item of the array contains three fields: + +- **name**: the package name of the swc plugin +- **options**: Configuration items passed to swc plugin +- **filters**: Which modules to execute the plug-in, must be configured, support `resolvedPaths` and `moduleTypes` these two filter items, if both are specified at the same time, take the union. + +An example of a configuration that supports JSX for a Vue project is as follows: + +```ts +import jsPluginVue from "@farmfe/js-plugin-vue"; + +/** + * @type {import('@farmfe/core').UserConfig} + */ +export default { + compilation: { + script: { + plugins: [ + { + name: "swc-plugin-vue-jsx", + options: { + transformOn: true, + optimize: true, + }, + filters: { + // resolvedPaths: [".+"] + moduleTypes: ["tsx", "jsx"], + }, + }, + ], + }, + }, + plugins: [jsPluginVue()], +}; +``` + +#### `script.decorators` + +```ts +export interface DecoratorsConfig { + legacyDecorator: boolean; + decoratorMetadata: boolean; + /** + * The version of the decorator proposal to use. 2021-12 or 2022-03 + * @default 2021-12 + */ + decoratorVersion: "2021-12" | "2022-03" | null; + /** + * @default [] + */ + includes: string[]; + /** + * @default ["node_modules/"] + */ + excludes: string[]; +} +``` + +It's recommended to use default decorators configuration of Farm, unless you want to improve performance, you can set `includes` and `excludes`. + +Options: + +- **legacyDecorator**: default to `true`. Using legacy decorator proposal. +- **decoratorMetadata**: default to `false`. You have to set `legacyDecorator` to `false` if you want to set it to true. +- **decoratorVersion**: default to '2021-12', proposal version. The value is 2021-12 or 2022-03. +- **includes**: default to `[]`. If you want to include modules that are excluded, you can set this option. Regex supported. +- **excludes**: default to `['node_modules/']`. Modules under these paths are ignored when transform decorators. Regex supported + +### css + +#### `css.modules` + +Configure Farm CSS Modules. + +```ts +interface FarmCssModulesConfig { + // Configure which paths will be processed as css modules, using regular strings + // defaults to `.module.css` or `.module.scss` or `.module.less` + paths?: string[]; + // configure the generated css class name, the default is `[name]-[hash]` + indentName?: string; +} +``` + +##### `css.modules.paths` + +- **default**: `["\\.module\\.(css|scss|sass|less)"]` + +Configure which paths correspond to modules that will be treated as CSS Modules. A regular string needs to be configured. Defaults to files ending in `.module.(css|scss|sass|less)`. + +##### `css.modules.identName` + +- **default**: `[name]-[hash]` + +Configure the generated CSS Modules class name, the default is `[name]-[hash]`, `[name]`, `[hash]` are placeholders (also all currently supported placeholders). `[name]` means the original class name, `[hash]` means the hash of the modified css file id. + +#### `css.prefixer` + +Configure CSS compatibility prefixes, such as `-webkit-`. + +```ts +interface FarmCssPrefixer { + targets?: string[] | string | BrowserTargetsRecord; +} + +type BrowserTargetsRecord = Partial< + Record< + | "chrome" + | "opera" + | "edge" + | "firefox" + | "safari" + | "ie" + | "ios" + | "android" + | "node" + | "electron", + string + > +> & { [key: string]: string }; +``` + +##### `css.prefixer.targets` + +- **Default value**: `undefined` + +Configure which target browsers or browser versions to enable, for example: + +```ts +import { defineConfig } from "@farmfe/core"; + +function defineConfig(config: UserConfig) { + return config; +} + +export default defineConfig({ + compilation: { + css: { + prefix: { + targets: ["last 2 versions", "Firefox ESR", "> 1%", "ie >= 11"], + }, + }, + }, +}); +``` + +### html + +#### `html.base` + +- **Default value**: `undefined` + +All HTML entries will inherit `html.base`, for details, refer to [Guide - HTML](/docs/features/html) + +### sourcemap + +- **default**: `true` + +Configure whether to enable sourcemap, optional configuration items and descriptions are as follows: + +- **`true`**: Only generate sourcemap for files not under `node_modules`, and generate a separate sourcemap file +- **`false`**: turn off sourcemap +- **`inline`**: Only generate sourcemap for files not under `node_modules`, and inline sourcemap into the product, do not generate a separate file +- **`all`**: generate sourcemap for all files, and generate a separate sourcemap file +- **`all-inline`**: Generate sourcemaps for all files, and inline sourcemaps into the product, do not generate separate files + +### partialBundling + +Configure the behavior of Farm's partial bundling. For details, please refer to [Partial Bundling](/docs/features/partial-bundling) + +```ts +export interface FarmPartialBundlingConfig { + targetConcurrentRequests?: number; + targetMinSize?: number; + targetMaxSize?: number; + groups?: { + name: string; + test: string[]; + groupType?: "mutable" | "immutable"; + resourceType?: "all" | "initial" | "async"; + }[]; + enforceResources?: { + name: string; + test: string[]; + }[]; + enforceTargetConcurrentRequests?: boolean; + enforceTargetMinSize?: boolean; + immutableModules?: string[]; +} +``` + +#### `partialBundling.targetConcurrentRequests` + +- **default**: `25` + +Farm tries to generate resource numbers as closer as possible to this config value for initial resource loading or a dynamic resource loading. + +#### `partialBundling.targetMinSize` + +- **default**: `20 * 1024` bytes, 20 KB + +The minimum size of each generated resources **before minify and gzip**. Note that `targetMinSize` will not be satisfied if `ModuleBucket's size` is less than `targetMinSize`, `ModuleBucket` will be given priority. Config `enforceTargetMinSize` can be used to enforce size. + +#### `partialBundling.targetMaxSize` + +- **default**: `1500 * 1024` bytes, 1500 KB + +The maximum size of generated resources before minify and gzip. + +#### `partialBundling.groups` + +- **default**: `[]` + +A group of modules that should be placed together. Note that this group config is only a hit to the compiler that these modules should be placed together, it may produce multiple resources, if you want to enforce modules in the same resource, you should use `enforceResources`. + +Options for each item: + +- **name**: Name of this group. +- **test**: Regex array to match the modules which are in this group. +- **groupType**: `mutable` or `immutable`, this group only applies to the specified type of modules. +- **resourceType**: `all`, `initial` or `async`, this group only applies to the specified type of resources. + +```ts title="farm.config.ts" {4-9} +export default defineConfig({ + compilation: { + partialBundling: { + groups: [ + { + name: "vendor-react", + test: ["node_modules/"], + }, + ], + }, + }, +}); +``` + +#### `partialBundling.enforceResources` + +- **default**: `[]` + +Array to match the modules that should always be in the same output resource, ignore all other constraints. + +Options for each item: + +- **name**: Name of this resource. +- **test**: Regex array to match the modules which are in this resource. + +```ts title="farm.config.ts" {4-9} +export default defineConfig({ + compilation: { + partialBundling: { + enforceResources: [ + { + name: "index", + test: [".+"], + }, + ], + }, + }, +}); +``` + +:::warning +`enforceResources` will ignore all Farm's internal optimization, be careful when you use it. +::: + +#### `partialBundling.enforceTargetConcurrentRequests` + +- **default**: `false` + +Enforce target concurrent requests for every resource loading, when true, smaller resource will be merged into bigger resource to meet the target concurrent requests. this may cause issue for css resource, be careful to use this option. + +#### `partialBundling.enforceTargetMinSize` + +- **default**: `false` + +Enforce target min size for every resource, when tue, smaller resource will be merged into bigger resource to meet the target concurrent requests. this may cause issue for css resource, be careful to use this option + +#### `partialBundling.immutableModules` + +- **default**: `['node_modules']` + +Regex array to match the immutable modules. + +```ts title="farm.config.ts" +export default defineConfig({ + compilation: { + partialBundling: { + immutableModules: ["node_modules/", "/global-constants"], + }, + }, +}); +``` + +Immutable module can affect bundling and incoming persistent cache, be careful if you want to change it. + +#### `partialBundling.immutableModulesWeight` + +- **default**: `0.8` + +Default to `0.8`, means the output bundles of immutable module takes 80%. for example, if `targetConcurrentRequest` is `25`,then immutable bundles files numbers are `25 * 80% = 20`. This option is used isolate your mutable and immutable module, if you modified your business code, bundles generating from `node_modules` won't be affected. + +### lazyCompilation + +- **default**: `true` in development mode, `false` in build mode + +Whether to enable lazy compilation, configure to false to close. See [lazy compilation](/docs/features/lazy-compilation). + +### treeShaking + +- **default**: `false` in development mode, `true` in build mode + +Whether to enable tree shake, set to false to close. See [Tree Shake](/docs/features/tree-shake). + +### minify + +- **default**: `false` in development mode, `true` in build mode + +Whether to enable compression, the product will be compressed and confused after it is turned on. See [Minification](/docs/advanced/minification). + +```ts +type MinifyOptions = boolean | { + compress?: ToSnakeCaseProperties | boolean; + mangle?: ToSnakeCaseProperties | boolean; +}; +``` +The `compress` and `mangle` options is the same as [swc's minify config](https://swc.rs/docs/configuration/minification). + +#### `minify.compress` + +- **default**: `{}` +- **type**: [`TerserCompressOptions`](https://swc.rs/docs/configuration/minification#jscminifycompress) + +compress option + +#### `minify.mangle` + +- **default**: `{}` +- **type**: [`TerserMangleOptions`](https://swc.rs/docs/configuration/minification#jscminifymangle) + +compress variable parameters + +#### `minify.include` + +- **default**: `[]` +- **type**: `string[]` + +contains modules that need to be compressed, defaults to all, only takes effect when `minify.mode` is `minify-module`. + +#### `minify.exclude` + +- **default**: `["*.min.js"]` +- **type**: `string[]` + +exclude unnecessary compression modules, only takes effect when `minify.mode` is `minify-module`. + +#### `minify.mode` + +- **default**: `'minify-module'` +- **type**: `'minify-module' | 'minify-resource-pot'` + +`minify-module` module level `minify`, you can control which modules need to be minified through parameters, the compression is more refined and the efficiency is better + +`minify-resource-pot` `ResourcePot` level `minify`, specific modules cannot be controlled through parameters + +### presetEnv + +- **default**: `false` in development mode, `true` in build mode + +```ts +type FarmPresetEnvConfig = + | boolean + | { + include?: string[]; + exclude?: string[]; + // TODO using swc's config + options?: any; + assumptions?: any; + }; +``` + +By default, polyfills will not be injected into modules under node_modules, if necessary, please use `include` to add polyfills. + +#### `presetEnv.include` + +- **default**: `[]` + +Include additional modules that require polyfill, configure regular strings, for example `include: ['node_modules/(es6-package|my-package)/']` + +#### `presetEnv. exclude` + +- **default**: `['node_modules/']` + +Configure modules that do not require polyfill, and configure regular strings, such as `exclude: ['custom-path/(es5-package|my-package)/']`. By default node_modules is excluded, if you need to include excluded modules, it is recommended to use `include` + +#### `presetEnv.options` + +- **default**: `downgrade to ES5` + +Options passed to swc preset env, see https://swc.rs/docs/configuration/compilation#env. + +### persistentCache + +- **default**: `true` + +Options for [Persistent Cache](/docs/features/persistent-cache). Configuring it `false` to disable cache. + +```ts +export type PersistentCache = + | boolean + | { + namespace?: string; + cacheDir?: string; + buildDependencies?: string[]; + moduleCacheKeyStrategy?: { + timestamp?: boolean; + hash?: boolean; + }; + }; +``` + +#### `persistentCache.namespace` + +- **default**: `farm-cache` + +Namespace for the cache, caches under different namespace will be isolated. + +#### `persistentCache.cacheDir` + +- **default**: `node_modules/.farm/cache` + +Cache store directory. + +#### `persistentCache.buildDependencies` + +- **default**: `farm.config.ts and all its deep dependencies` + +File path or package name that may affect the compilation, for example, plugins. By default, `farm.config.ts/js/mjs` and all of its deep dependencies will be treated as build dependencies, if any of these files changed, all cache will be invalidated. + +it can be a file path or a package name, for example: + +```ts +import { defineConfig } from "@farmfe/core"; +import path from "node:path"; + +export default defineConfig({ + persistentCache: { + buildDependencies: [ + // a file path + path.resolve(process.cwd(), "./plugins/my-plugin.js"), + // a package name, note that this package must expose package.json + "farm-plugin-custom-xxx", + ], + }, +}); +``` + +#### `persistentCache.moduleCacheKeyStrategy` + +- **default**: `{ timestamp: true, hash: true }` + +How to generate cache key when trying to reuse cache. if `timestamp` is true and the timestamp of the module is not changed, then all build stage hooks like `load`, `transform` will be skipped and the cached module will be reused. if `hash` is true and the content of the module is not changed, `load` and `transform` hook will be called to get the transformed content, other hooks will be skipped and the cached module will be reused. + +- `timestamp`: whether check timestamp of the module, which has the best performance +- `hash`: whether check content hash after load and transform + +#### `persistentCache.envs` + +- **default**: [Farm Env](/docs/config/farm-config#environment-variable) + +Envs used to invalidate cache, if the configured env changed, then all cache will be invalidated. + + + +### progress +- **default**: `true` + +Enable progress bar or not. + +### comments +- **default**: `license` + +Preserve comments or not: +* `true`: Preserve all comments +* `false`: Remove all comments +* `license`: Preserve all **LICENSE comments**, and remove the others diff --git a/docs/docs/config/configuring-farm.md b/docs/docs/config/configuring-farm.md new file mode 100644 index 000000000..b2568d9e5 --- /dev/null +++ b/docs/docs/config/configuring-farm.md @@ -0,0 +1,96 @@ +# Configuring Farm + +## Config File Spec +By default, Farm reads the configuration from the `farm.config.ts|js|mjs` file in the project root directory, an example configuration file: + +```ts title="farm.config.ts" {5-7} +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + root: process.cwd(), // compiled root directory + // compile options + compilation: { + //... + }, + // Dev Server options + server: { + hmr: true, + //... + }, + // plugin configuration + plugins: [], +}); +``` + +For config options details, refer to: +* [`Compiler Options`](/docs/config/compilation-options): Configuring compiler options(`compilation` field), like `input`, `output`, `css compilation`, `bundling rules` and so on. +* [`Dev Server Options`](/docs/config/dev-server): Configuring dev server options(`server` field), like `port`, `host`, `protocol` and so on. +* [`Shared Options`](/docs/config/shared): Configuring shared options between `compiler options` and `dev server options`, like `root`, `env` and so on. + +:::note +You can also use `farm start/build -c my-config.ts` to use a custom file as config file. +::: + +## Loading Ts Config File +Farm support load ts config file like `farm.config.ts` out of box. Farm will bundle `farm.config.ts` and it's local ts dependencies into `farm-config.xxx.mjs` file first and load it from disk. Because Farm compiles the `farm.config.ts` into `mjs` file, you **CAN NOT** use `__dirname` or `__filename` in your `farm.config.ts`, use `import.meta.url` instead. + +Or you can use `farm.config.mjs` or `farm.config.cjs` with `@type` to support types avoid bundling `farm.config.ts`: + +```js title="farm.config.mjs" +/** + * @type {import('@farmfe/core').UserConfig} + */ +export default { + // ... +} +``` + +## Examples +### Input and Output +```ts title="farm.config.ts" {5-7} +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + // compile options + compilation: { + input: { + index: './src/index.html', + about: './src/about.html', + }, + output: { + path: 'build', + publicPath: process.env.NODE_ENV === 'production' ? 'https://my-cdn.com' : '/' + } + }, +}); +``` + +In above example, we configured `./src/index.html` and `./src/about.html` as input, then output the compiled resources to `build` dir. + +### Dev Server Port + +```ts title="farm.config.ts" {5-7} +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + server: { + port: 9801 + } +}); +``` + +### Disable Default Optimizations +```ts title="farm.config.ts" {5-7} +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + // compile options + compilation: { + lazyCompilation: false, + persistentCache: false, + minify: false, + treeShake: false + }, +}); +``` + diff --git a/docs/docs/config/dev-server.md b/docs/docs/config/dev-server.md new file mode 100644 index 000000000..86688f3a1 --- /dev/null +++ b/docs/docs/config/dev-server.md @@ -0,0 +1,184 @@ +# Dev Server Options + +## DevServer Options - server + +Configure the behavior of Farm Dev Server. Example: + +```ts +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + // All dev server options are under server + server: { + port: 9000, + //... + }, +}); +``` + +type: + +```ts +export interface UserServerConfig { + headers?: OutgoingHttpHeaders | undefined; + port?: number; + https?: SecureServerOptions; + protocol?: 'http' | 'https'; + // http2?: boolean; + hmr?: boolean | UserHmrConfig; + proxy?: Record; + strictPort?: boolean; + open?: boolean; + host?: string | boolean; + cors?: boolean | cors.Options; + // whether to serve static assets in spa mode, default to true + spa?: boolean; + middlewares?: DevServerMiddleware[]; + writeToDisk?: boolean; +} +``` + +### port + +- **default**: `9000` + +The port the DevServer listens on. + +### https +- **default**: `undefined` + +Enable TLS + HTTP2. The value is [options](https://nodejs.org/api/http2.html#http2createsecureserveroptions-onrequesthandler) that passes to [http2.createSecureServer](https://nodejs.org/api/http2.html#http2createsecureserveroptions-onrequesthandler). + +:::note +Note that a **valid certificate** is needed if `https` enabled. +::: + +### headers +- **default**: `undefined` + +Setup global http response headers for the DevServer. + +```ts +import { defineConfig } from '@farmfe/core' + +export default defineConfig({ + server: { + headers: { + 'Accept': 'xxxx' + } + } +}) +``` + +### strictPort +- **default**: `false` + +By default, Farm will automatically resolve to a new port when given port is used. For example, if `9001` is used, then `9001` will be tried. But if `strictPort` is `true`, a error will be thrown when port conflicts, instead of try other ports automatically. + +### cors +- **default**: `false` + +Configure [@koa/cors options](https://www.npmjs.com/package/@koa/cors). + + +### spa +- **default**: `true` + +Enable fallback to `index.html` or not. + +### hmr + +- **default**: `true` for start command, false for other commands + +Enable HMR. After enabling the HMR capability, it will monitor the changes of the modules involved in the compilation process. When the modules change, it will automatically trigger recompilation and push the results to Farm Runtime for update. HMR can also be configured through an object, for example: + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + // All dev server options are under server + server: { + hmr: { + // Configure the port for web socket listening + port: 9802 + // Configure the host for web socket listening + host: 'localhost', + // Files to ignore when configuring file monitoring + ignores: ['auto_generated/*'] + } + //... + } +}); +``` + +#### `hmr.port` + +- **default**: `9801` + +The port the Web Socket server listens on + +#### `hmr.host` + +- **default**: `localhost` + +Host on which the Web Socket server listens. + +### proxy + +- **Default value**: `undefined` + +Configure server proxy. farm uses `http-proxy` as a proxy for the development server. Based on [http-proxy](https://github.com/http-party/node-http-proxy?tab=readme-ov-file#options) implementation, specific options refer to its documentation, example: + +```ts +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + server: { + proxy: { + "/api": { + target: "https://music-erkelost.vercel.app/banner", + changeOrigin: true, + pathRewrite: (path: any) => path.replace(/^\/api/, ""), + }, + }, + }, +}); +``` + +### open + +- **default**: `false` + +After the compilation is completed, the browser is automatically opened to the corresponding page. + +### host + +- **default**: `localhost` + +The host that the Dev Server listens on. + +### middlewares + +- **default**: `[]` + +Configuring middlewares for the dev server. + +```ts +import { defineConfig } from "@farmfe/core"; +import compression from 'koa-compress'; + +export default defineConfig({ + server: { + middlewares: [ + compression + ] + }, +}); +``` + +Note that a `middleware` is a function that returns a koa middleware. + +## writeToDisk +- **default**: `false` + +By default the compiled resources are stored and served in memory, set `writeToDisk` to `true` to emitted dev resources to the disk. diff --git a/docs/docs/config/shared.md b/docs/docs/config/shared.md new file mode 100644 index 000000000..7c50e3b64 --- /dev/null +++ b/docs/docs/config/shared.md @@ -0,0 +1,80 @@ +# Shared Options + +Configure shared options for Both Farm's DevServer and Compiler. Example: + +```ts +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + // All dev server options are under server + root: process.cwd(), +}); +``` + +Type: +```ts +export interface UserConfig { + /** current root of this project, default to current working directory */ + root?: string; + clearScreen?: boolean; + envDir?: string; + envPrefix?: string | string[]; + /** Files under this dir will always be treated as static assets. serve it in dev, and copy it to output.path when build */ + publicDir?: string; + /** js plugin(which is a javascript object) and rust plugin(which is string refer to a .farm file or a package) */ + plugins?: (RustPlugin | JsPlugin | JsPlugin[])[]; + /** vite plugins */ + vitePlugins?: (object | (() => { vitePlugin: any; filters: string[] }))[]; + // /** config related to compilation */ + // compilation?: Pick; + // /** config related to dev server */ + // server?: UserServerConfig; +} +``` +## root + +- **default**: `process.cwd()` + +Configure the root directory for project compilation. All relative paths are relative to `root` during compilation. + +## clearScreen +- **default**: `true` + +Whether to clear the screen when start to compile the project. + +## envDir +- **default**: `` + +Configuring the directory to load `.env`, `.env.development`, `.env.production` files. By default it's the same as root. + +```ts +import { defineConfig } from '@farmfe/core'; +import { resolve } from 'path'; +export default defineConfig({ + envPrefix: ['FARM_', 'CUSTOM_PREFIX_', 'NEW_'], + envDir: resolve(process.cwd(), './env'), +}); +``` +In above example, will load `.env`, `.env.development`, `.env.production` files from `/env` directory. + +## envPrefix +- **default**: `['FARM_', 'VITE_']` + +Env variables starts with `envPrefix` will be injected [`define`](/docs/config/compilation-options#define) automatically. + +## publicDir +- **default**: `public` + +Files under `publicDir` will always be treated as static assets. serve it in dev, and copy it to output.path when build. + +For example, you can add static assets like font to `public` dir and using them as `/xxx.ttf`. + +## plugins +- **default**: `[]` + +Configure Farm Plugins. See [Using Farm Plugins](/docs/using-plugins#farm-compilation-plugins) + +## vitePlugins +- **default**: `[]` + +Configure Vite/Rollup/Unplugin plugins. See [Using Vite Plugins](/docs/using-plugins#using-viterollupunplugin-plugins-in-farm) \ No newline at end of file diff --git a/docs/docs/contribution.mdx b/docs/docs/contribution.mdx new file mode 100644 index 000000000..3e217e251 --- /dev/null +++ b/docs/docs/contribution.mdx @@ -0,0 +1,138 @@ +import { PackageManagerTabs } from '../src/theme/PackageManagerTabs'; + +# Contribution Guide + +Thank you for your interest in contributing to Farm!. Before submitting your contribution, please make sure to take a moment and read through the following guidelines. + +## Code of Conduct + +All contributors are expected to follow our [Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct). + +## Bug reports + +As farm is currently in the process of rapid development iteration, some unexpected problems may be encountered in the process of development. + +We can't fix what we don't know about, so please report problems and unexpected behavior. + +You can open a new issue by following [new-issues](https://github.com/farm-fe/farm/issues/new/choose) and choosing one of the issue templates. + +## Feature requests + +Please feel free to open an issue using the [feature request template](https://github.com/farm-fe/farm/issues/new/choose). + +## Pull Request Guidelines + +- Please adhere to the code style that you see around the location you are working on. + +- Setup Your Development Environment. + +- Checkout a topic branch from a base branch, e.g. `main` . + +- Run `cargo test` and make sure that it passes. + +- If you've changed some packages And prepare for an updated version, you should output `npx changeset` in the root directory. we should try our best to keep releasing the `patch version`. If there are no major changes, please choose to update the `patch version`. + +- When you are done with your work, verify that it works locally with `pnpm run ready` + +## Setup + +- Fork and clone the repo. + +- Create a branch for your PR with `git checkout -b your-branch-name`. + +- To keep `main` branch pointing to remote repository and make pull requests from branches on your fork. To do this, run: + +```bash + git remote add upstream https://github.com/farm-fe/farm.git + git fetch upstream + git branch --set-upstream-to=upstream/main main +``` + + +## Development Environment Setup + +### Dependencies + +- Install Rust using [rustup](https://www.rust-lang.org/tools/install). + +- [Node.js](https://nodejs.org) **version 16+** + +- [Pnpm](https://pnpm.io) **version 8+** + + +### IDE + +We recommend that you use vscode for development and recommend two necessary plugins that you need to install + +- `rust-analyzer` support rust language +- `biome` farm use biome to detect and format the code + +You can install them in the extension + +### Setup Other Dependencies + +- Install [protoc](https://grpc.io/docs/protoc-installation/) for building `sass-embedded`. + +**TIP:** When you run `pnpm bootstrap` and you use mac or linux systems, farm will automatically install protoc for you system + +## Start running + +Farm development is very simple. You only need to execute `pnpm bootstrap` in the root directory for development. + + + +- use `pnpm bootstrap` to install dependencies and build core packages with series of initialization operations. + +- Work with examples (open a new terminal): `cd examples/react && pnpm start`, report an issue if the example does not start normally. + +- If `examples/react` project runs successfully, the development environment has been configured successfully + +- If you changed Rust code in `crates`, run `npm run build:rs` under `packages/core` again to get the latest binary. + +When you are developing node side code, the root directory executes pnpm start to debug the code in real time, and when you are developing rust side code, the root directory executes pnpm start:rs to debug the code in real time. + + + + + +## Testing + +We also need to test two parts, a set of `Rust` tests and a set of `Node` tests. Make sure all the tests pass before you submit the code. + +### Rust Testing + +- Input `cargo test` in the root directory will run all the test cases. + +```sh +# root path or crates path +cargo test +``` + +### Node Testing + +- Input `pnpm test` in the root directory to run all test cases based on `vitest`. + +```sh +# root path +pnpm test +``` + +## Quickly create plugins through scaffold + +If you want to develop a plugin for farm, farm provides a scaffolding to help you quickly create a plugin, which you can create with the following command. +You can go to the `cd packages/ cli` directory, run `npm link` or global installation `@ farmfe/ cli` to use this CLI, after the installation is complete, You can create a plugin through `farm plugin create`. +Farm supports the creation of rust and js plugins. + +```bash +$ farm plugin create # create a plugin support js or rust +``` + +## Pull Request Preface Tip + +Farm is divided into two parts: the `JavaScript side` and the `Rust side`: + +- **the JavaScript side**: + see code in the `packages` directory. contains core (dev server, file watcher, and compiler wrapper), CLI, runtime, and runtime plugins (module system, HMR). + +- **the Rust side**: + see code in the `crates` and `rust-plugins` directory. contains core (compilation context, plugin drivers, etc.), compiler (compile process, HMR update, etc.), and plugins. diff --git a/docs/docs/features/_category_.json b/docs/docs/features/_category_.json new file mode 100644 index 000000000..f64dcb808 --- /dev/null +++ b/docs/docs/features/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Features", + "position": 3, + "link": { + "type": "generated-index", + "description": "Features supported by Farm" + } +} diff --git a/docs/docs/features/css.md b/docs/docs/features/css.md new file mode 100644 index 000000000..153313032 --- /dev/null +++ b/docs/docs/features/css.md @@ -0,0 +1,179 @@ +# Css/Sass/Less +Farm support Css out of box, just import the css file: + +```tsx +import './index.css'; +``` + +Then farm will auto enable HMR for css module, and generating bundled resources for css. + +## Css Modules +Farm support css modules out of box, the modules end with `.module.css|less|scss|sass` will be treated as css modules by default. + +```tsx title="comp.tsx" +// ... +import styles from './index.module.css' + +export function Comp() { + return
Main
+} +``` +```css title="index.module.css" +.main { + color: green; +} +``` +You can configuring css modules by [`css.modules`](/docs/config/compilation-options#cssmodules). for example you can set `css.modules.paths` to `['.css|sass|less|scss']` then all css files will be treated as css modules. + +## Css Pre-Processor +Farm provide official sass, less, postcss plugins to support css pre-processor. + +### Sass +Farm sass plugin is a Rust Plugin and use `sass-embeded`(we may migrate to [grass](https://github.com/connorskees/grass) in the future). + +Steps to compile `sass/scss` modules in Farm. +1. Install dependencies +```sh +# npm or yarn or pnpm, choose your favorite package manager +pnpm add -D @farmfe/plugin-sass +``` + +2. Configure the plugin +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + // ... + plugins: ['@farmfe/plugin-sass'] // to use a rust plugin, just configure its package name as a string + // if you want to specify options for plugin-sass, use + // plugins: [ + // ['@farmfe/plugin-sass', { sourceMap: false }] + // ] +}); +``` + +3. Import sass module +```ts +import './index.scss'; +``` + +To use sass with css modules, change the file name from `index.scss` to `index.module.scss`, see [css modules](/docs/config/farm-config#cssmodules). + +`@farmfe/plugin-sass` supports a lot of options, use the array syntax of `plugins` to specify options for plugin sass: + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + // if you want to specify options for plugin-sass, use + plugins: [ + [ + '@farmfe/plugin-sass', + // all supported options as below + { + sourceMap: true // bool + sourceMapIncludeSources: true, // bool + alertAscii: true, // bool + alertColor: true, // bool + charset: true, // bool + quietDeps: true, // bool + verbose: false, // bool + style: 'expanded' | 'compressed' // output code style + } + ] + ] +}); +``` + + +### Less +Farm less plugin is a Js Plugin. Steps to compile `less` modules in Farm. + +1. Install dependencies +```sh +# npm or yarn or pnpm, choose your favorite package manager +pnpm add -D @farmfe/js-plugin-less +``` + +2. Configure the plugin +```ts +import { defineConfig } from '@farmfe/core'; +import less from '@farmfe/js-plugin-less'; + +export default defineConfig({ + // ... + plugins: [less()] // pass argument to the less function like `less({ /* your options */ })` to specify less options +}); +``` + +3. Import sass module +```ts +import './index.less'; +``` + +To use sass with css modules, change the file name from `index.less` to `index.module.less`, see [css modules](/docs/config/farm-config#cssmodules) + +### Postcss +The Farm postcss plugin is a JS plugin. The steps to introduce postcss in Farm are as follows: + +1. Install dependencies +```sh +# npm or yarn or pnpm, choose your favorite package manager +pnpm add -D @farmfe/js-plugin-postcss +``` + +2. Configure the plugin +```ts +import { defineConfig } from '@farmfe/core'; +import postcss from '@farmfe/js-plugin-postcss'; + +export default defineConfig({ + //... + plugins: [postcss()] // pass argument to the less function like `less({ /* your options */ })` to specify less options +}); +``` + +3. Configure `postcss.config.js` and import the required postcss plugins + +```js title=postcss.config.js +module.exports = { + plugins: [ + require('postcss-pxtorem')({ + rootValue: 16, + propList: ['*'], + }), + require('tailwindcss'), + ] +} +``` + +## Css Prefixer +Farm supports css prefixer out of box, you can configure it using `compilation.css.prefixer`. + +:::note +`css.prefix.targets` will be set automatically when [`output.targetEnv`](/docs/config/compilation-options#output-targetenv). Normally set [`output.targetEnv`](/docs/config/compilation-options#output-targetenv) would be enough. +::: + +```ts title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + css: { + prefix: { + targets: ['ie >= 10'] + } + }, + }, +}); +``` +Then for input code: +```css +div { + display: flex; +} +``` +output code: +```css +div{display:-ms-flexbox;display:flex} +``` diff --git a/docs/docs/features/dev-server.md b/docs/docs/features/dev-server.md new file mode 100644 index 000000000..090bdf706 --- /dev/null +++ b/docs/docs/features/dev-server.md @@ -0,0 +1,82 @@ +# DevServer and HMR +Farm provides `DevServer` and enabled `HMR` in `development` by default. + +## Configuring Dev Server +Farm provides a lot of useful options to configure dev server. All dev server options are configured by [`server`](/docs/config/dev-server). + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + server: { + port: 9801, + cors: true, + proxy: { + // ... + }, + open: true, + } +}) +``` + +:::note +If you are built tools on top of farm, refer to [Javascript API](/docs/api/javascript-api) for creating a Dev Server programmatically. +::: + +## Dev Server Middlewares +You can use [`middlewares`](/docs/config/dev-server#middlewares) to handle dev server requests. For example: + +```ts title="farm.config.ts" +import { Middleware } from 'koa'; +import { Server, defineConfig } from '@farmfe/core'; + +export function headers(devSeverContext: Server): Middleware { + const { config } = devSeverContext; + if (!config.headers) return; + + return async (ctx, next) => { + if (config.headers) { + for (const name in config.headers) { + ctx.set(name, config.headers[name] as string | string[]); + } + } + await next(); + }; +} + +export default defineConfig({ + server: { + middlewares: [ + headers + ] + } +}) +``` + +In above example, a Farm middleware is a function that expose `Koa Middleware`. Common Koa middlewares can be used directly, for example: + +```ts {2,7} +import { defineConfig } from "@farmfe/core"; +import compression from 'koa-compress'; + +export default defineConfig({ + server: { + middlewares: [ + compression + ] + }, +}); +``` + +## Hot Module Replacement(HMR) +Farm provides a [Vite-compatible HMR API](/docs/api/hmr-api). If you are framework authors, leverage the API to update your Application instance, precise without reloading the page. + +* For React, **React Refresh** are enabled automatically by official plugins [@farmfe/plugin-react](/docs/plugins/official-plugins/react). +* For Vue, Solid and other frameworks, it's HMR are supported by there plugins like `@vitejs/plugin-vue`, `vite-plugin-solid` and so on. + +Farm provides official templates that set all these capabilities up already, create an app via [create-farm](/docs/quick-start) then all HMR abilities are ready. + +:::note +* Usually HMR is supported out of box for app users, refer to [Vite-compatible HMR API](/docs/api/hmr-api) if you are framework author. +* Refer to [HMR Options](/docs/config/dev-server#hmr) for how to configuring HMR. +::: diff --git a/docs/docs/features/env.md b/docs/docs/features/env.md new file mode 100644 index 000000000..decd750b5 --- /dev/null +++ b/docs/docs/features/env.md @@ -0,0 +1,64 @@ +# Environment Variables and Modes + +`Farm` distinguishes between `development` and `production` environments through `process.env.NODE_ENV`. + +In different environments, environment variables are replaced statically, so use static constants to represent environment variables instead of dynamic expressions. + +## `.env` file + +`Farm` uses `dotenv` to load your additional environment variables, such as `.env` files. By default `.env` file are loaded from [`root`](/docs/config/shared#root), you can use [`envDir`](#envdir) to customize. + +```js +// .env +FARM_APP_SECRET=secret +Farm_APP_PASSWORD=password +APP_VERSION=1.0.0 +``` + +`Farm` loads the file `.env` via dotenv, and loads it into `process.env` and finally injects it into define. + +:::danger +In order to ensure the security of the client, preventing the environment variables in the current system from being exposed to the client `Farm` will only identify some important environment variables that start with `FARM_`、`VITE_` (In order to better compatible with vite and its ecological environment). +::: + +`Farm` expands environment variables through dotenv-expand. For development only envs use `.env.development`, for production only envs use `.env.production`, for custom mode passed by `--mode `, load from `.env.` file. + +* If you want to customize the directory to load `.env` file, you can configure [`envDir`](#envdir). +* If you want to customize the prefix of env variables which are injected to [`define`](/docs/config/compilation-options#define), you can configure [`envPrefix`](#envprefix). + + +## envPrefix + +- **default value**: `FARM_`、`VITE_` + +Customize the prefix of the `env` variable by configuring `envPrefix`. Env variables start with `envPrefix` will be injected into define automatically. For example, in the `.env` file: + +```js +// .env +FARM_CUSTOM_VERSION=1.0.0 +APP_VERSION=0.1.0 +``` +Then `FARM_CUSTOM_VERSION` will be injected, but not `APP_VERSION`, in your business code: + +```tsx +export function MyComp() { + const farmCustomVersion = FARM_CUSTOM_VERSION; + return
Farm Custom Version: {farmCustomVersion}
+} +``` +`FARM_CUSTOM_VERSION` will be replaced by `'1.0.0'` automatically. + + + +## envDir +- **default value**: `` + +The directory to load [`env file`](#env-file). By default Farm load `env file` from root. + +```ts +export defineConfig({ + envDir: './env' +}) +``` + +For above config example, Farm will load `.env`, `.env.development`, etc from `/env` dir. diff --git a/docs/docs/features/html.md b/docs/docs/features/html.md new file mode 100644 index 000000000..cb0c91e20 --- /dev/null +++ b/docs/docs/features/html.md @@ -0,0 +1,114 @@ +--- +sidebar_position: 1 +--- + +# Html + +## Basic Usage + +Farm support compile Html out of box, **and you should use Html as entry when build a web project**, for example: + +```ts title="farm.config.ts" +import type { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + input: { + index: "./index.html", // using ./index.html as entry + }, +}); +``` + +:::note +If the input is not specified, default to `{ index: 'index.html' }`. +::: + +and in `./index.html`, a ` + + +``` + +and you can also use `` to refer to your global css. + +Farm will transform these `scripts` and `links` to final production resources when compiling. Note that you have to use `relative path` when you want to refer to a local module, for example `` will refer to a local module and compile it, but `` or `` would not. + +:::tip +The `script` and `link` can refer to any module types that farm support, for example, `js`, `jsx`, `ts`, `tsx`, or other module types supported by plugins. You can use as many `scripts` or `links` as you want. +::: + +## Multi Page App + +If you are building a Multi Page Application, just configure multiple html input, for example: + +```ts title="farm.config.ts" +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + compilation: { + input: { + home: "./index.html", // Home Page + about: "./about.html", // About Page + // ... more pages + }, + }, +}); +``` + +Farm will compile these pages in parallel, and all dependencies of these pages will be shared too. + +## Inherit html template + +Farm supports inherit html template by using `html.base` config, which is helpful when building a multi-page application with html shared. + +```ts title="farm.config.ts" +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + // ... + compilation: { + input: { + home: "./index.html", // Home Page + about: "./about.html", // About Page + // ... more pages + }, + // c-highlight-start + html: { + base: "./base.html", + }, + // c-highlight-end + }, +}); +``` + +Then add a `base.html`, placeholder `{{children}}` will be replaced by children's content. + +```html title="./base.html" + + + + + + + Document + + +
+ + {{children}} + + +``` + +Inherit `./base.html`: + +```html title="./src/home.html" + + +``` diff --git a/docs/docs/features/lazy-compilation.md b/docs/docs/features/lazy-compilation.md new file mode 100644 index 000000000..5c7752e15 --- /dev/null +++ b/docs/docs/features/lazy-compilation.md @@ -0,0 +1,58 @@ +# Lazy Compilation +When comes to a big project, you may want to split them into small pieces and load on demand. This can be achieved by dynamic imports. + +```js +const page = React.lazy(() => import('./page')); // lazy load page +``` + +By default, Farm will lazy compile these dynamic imports in development, only compile them when the module is really executed. Lazy compilation can really speedup the compiling of a large project. + +:::note +Lazy Compilation are always disabled for production build. +::: + +Note that it is important to use the `dynamic import` properly to make `lazy compilation` work better. For example, if one of your page has a big dependencies, but this dependencies won't be used until this page rendered, then it is necessary to make sure that this big dependencies are dynamic imported, so it won't be compiled util the page rendered. + +## Configuring Lazy Compilation +Using `compilation.lazyCompilation` to enable or disable it: +```ts title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + lazyCompilation: true, + }, +}); +``` + +## How Lazy Compilation Work +When lazy compilation is enabled, Farm will analyze all of your `dynamic import` first, for example: + +```js +const page = React.lazy(() => import('./page')); +``` +Farm will treat `./page` as a module that should be lazy compiled and won't compile it, instead, Farm will return a virtual placeholder module for `./page` like: +```ts +// ... other actions +const compilingModules = FarmModuleSystem.compilingModules; +// return a promise, this promise will be resolved when lazy compilation finished. +let promise = Promise.resolve(); + +// it has lazy been lazy compiling +if (compilingModules.has(modulePath)) { + promise = promise.then(() => compilingModules.get(modulePath)); +} else { + // request the dev server for lazy compilation + const url = '/__lazy_compile?paths=' + paths.join(',') + `&t=${Date.now()}`; + promise = import(url).then((module: any) => { + const result: LazyCompileResult = module.default; + // ... + }); + // ... more actions +} + +export const __farm_async = true; +export default promise; +``` + +Above example illustrated a basic structure of that virtual placeholder module. When the placeholder executed, it will request the dev server to compile this module and its dependencies. After getting the lazy compiled result from dev server, the placeholder module will patch these changes to Farm's runtime module system. \ No newline at end of file diff --git a/docs/docs/features/script.md b/docs/docs/features/script.md new file mode 100644 index 000000000..67a1a65a0 --- /dev/null +++ b/docs/docs/features/script.md @@ -0,0 +1,198 @@ +# TS/TSX +Farm support compiling `Js/Jsx/Ts/Tsx` out of box, and compile `Jsx/Tsx` to React by default. + +```tsx title="./button.tsx" +import Button from "./Button"; + +function ButtonGroup(props: ButtonProps) { + return ( +
+ {props.buttons.map((b) => ( + + ))} +
+ ); +} +``` + +Farm using SWC to compile scripts, and Farm has set reasonable default configurations for script compilation. Also, you can use `compilation.script` to configure how to compile your script file. see [compilation.script](/docs/config/compilation-options#script) for details. + +## Configuring Swc Parser + +You can configuring the SWC Parser through `compilation.script.parser`. Refer to https://swc.rs/docs/configuration/compilation#jscparser. + +For example, if you want to enable decorator, you can set `compilation.script.parser.esConfig.decorators`(or `tsConfig.decorators` if the module is TS): + +```ts title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + script: { + // for .js/.jsx files + esConfig: { + decorators: true, + }, + // for .ts/.tsx files + tsConfig: { + decorators: true, + }, + }, + }, +}); +``` + +By default Farm set `jsx: true` for `.jsx|.tsx` files. Other field are default to SWC's defaults. + +## Configuring Target + +Using `compilation.script.target` to configure your target env when running your project, Farm set it based on [`output.targetEnv`](/docs/config/compilation-options#output-targetenv). +:::note +Farm set `compilation.script.target` automatically based on [`output.targetEnv`](/docs/config/compilation-options#output-targetenv). Normally you should not set `target` manually, use [`output.targetEnv`](/docs/config/compilation-options#output-targetenv) would be enough. +::: + +This option can be used along with `compilation.presetEnv` to gracefully downgrade your project for old browsers. For example, you can set target to `ES5` and enable `presetEnv`, then your project will be fully downgrade to ES5. + +```ts title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + script: { + target: "ES5", + }, + presetEnv: true, + }, +}); +``` + +Refer to [Syntax Downgrade and Polyfill](/docs/advanced/polyfill) for more about `presetEnv` and `target`. + + +## Decorators + +Decorators is disabled by default, you can set `compilation.script.parser.tsConfig.decorators` to `true` to enable decorators. + +```ts +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + compilation: { + script: { + parser: { + tsConfig: { + // support decorators + decorators: true, + }, + }, + // configuring decorators + decorators: { + legacyDecorator: true, + decoratorMetadata: false, + decoratorVersion: '2021-12', + includes: ["src/broken.ts"], + excludes: ['node_modules/'], + } + }, + }, +}); +``` + +> Farm provide a example for supporting decorators, see https://github.com/farm-fe/farm/tree/main/examples/decorators +> By default, Farm won't transform decorators for modules under `node_modules`, refer to [compilation.script.decorators.excludes](/docs/config/compilation-options#scriptdecorators). + + +## Using SWC Plugins + +SWC Plugins can be used directly in Farm, for example, we use `swc-plugin-vue-jsx` to compiling vue jsx in Farm: + +```ts title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; +import jsPluginVue from "@farmfe/js-plugin-vue"; + +export default defineConfig({ + compilation: { + script: { + plugins: [ + { + name: "swc-plugin-vue-jsx", + options: { + transformOn: true, + optimize: true, + }, + filters: { + // resolvedPaths: [".+"] + moduleTypes: ["tsx", "jsx"], + }, + }, + ], + }, + }, + plugins: [jsPluginVue()], +}); +``` + +Refer to [Using Plugins](/docs/using-plugins#using-swc-plugins) for more details. + +## Vite-style `import.meta.glob` + +Farm fully support Vite-style `import.meta.glob`, see [glob import](https://vitejs.dev/guide/features.html#glob-import). + +for example: + +```ts +const modules = import.meta.glob("./dir/*.js"); +``` + +The above will be transformed into the following: + +```ts +// code produced by Farm +const modules = { + "./dir/foo.js": () => import("./dir/foo.js"), + "./dir/bar.js": () => import("./dir/bar.js"), +}; +``` + +Using `{ eager: true }`: + +```ts +const modules = import.meta.glob("./dir/*.js", { eager: true }); +``` + +The above will be transformed into the following: + +```ts +// code produced by Farm +import * as __glob__0_0 from "./dir/foo.js"; +import * as __glob__0_1 from "./dir/bar.js"; +const modules = { + "./dir/foo.js": __glob__0_0, + "./dir/bar.js": __glob__0_1, +}; +``` + +multiple patterns are supported: + +```ts +const modules = import.meta.glob(["./dir/*.js", "./another/*.js"]); +``` + +negative patterns are also supported: + +```ts +const modules = import.meta.glob(["./dir/*.js", "!**/bar.js"]); +``` + +```ts +// code produced by Farm +const modules = { + "./dir/foo.js": () => import("./dir/foo.js"), +}; +``` + +:::note + +- You should also be aware that all the arguments in the import.meta.glob must be passed as literals. You can NOT use variables or expressions in them. +- `import.meta.glob` transformed by Farm in compile time, it does not exist in runtime. + ::: diff --git a/docs/docs/features/sourcemap.md b/docs/docs/features/sourcemap.md new file mode 100644 index 000000000..589f0c26c --- /dev/null +++ b/docs/docs/features/sourcemap.md @@ -0,0 +1,26 @@ +# Source Map +Farm supports `Source Map`, which is automatically enabled by default. Sourcemap can be `enable` or `disable` via the [`compilation.sourcemap`](/docs/config/compilation-options#sourcemap) option. + +:::note +Farm will not generate sourcemap for files under `node_modules` by default, if you want to generate sourcemap for files under node_modules, configure `compilation.sourcemap` to `all`. +::: + +Using `compilation.sourcemap` to configuring sourcemap generation: +```ts title="farm.config.ts" +export default { + compilation: { + sourcemap: 'all', // generate sourcemap for modules under node_modules + }, +}; +``` + +All options are as below: +* **`true`**: Only generate sourcemap for files not under `node_modules`, and generate a **separate sourcemap file** +* **`false`**: disable sourcemap +* **`inline`**: Only generate sourcemap for files not under `node_modules`, and inline sourcemap into the product, do not generate a separate file +* **`all`**: generate sourcemap for all files, and generate a separate sourcemap file +* **`all-inline`**: Generate source maps for all files, and inline source maps into the product, do not generate separate files + +:::note +For plugin authors, if you transform the code in [`transform hook`](/docs/api/rust-plugin-api#transform) or [`renderResourcePot hook`](/docs/api/rust-plugin-api#render_resource_pot), you should return the source map of your transformation to ensure source map is correct. Farm maintains a **source map chain** of plugins to trace the final resources back to the real original code. +::: \ No newline at end of file diff --git a/docs/docs/features/static.md b/docs/docs/features/static.md new file mode 100644 index 000000000..bbe34fd74 --- /dev/null +++ b/docs/docs/features/static.md @@ -0,0 +1,59 @@ +# Static Assets + +Farm treat modules that is not treated as `code` as `Static Assets`, for example, images like `png/svg/etc`, text files like `txt/xlsx/etc`. This document describes how Farm deal with these assets. + +## url +Import a image: +```jsx +import rocketUrl from './assets/rocket.svg'; // return the url of this image + +export function Main() { + return // using the url +} +``` +Default to use url method when import a image. When using url methods to import a image, the image will be emitted to the output dir directly, and the image module itself will be compiled to a js module like: + +```js +export default '/rocket..svg' +``` +using [`compilation.output.assetFilename`](/docs/config/compilation-options#outputassetsfilename) to config your asset name。 + +## inline +Using query `?inline` to tell Farm that you want to inline your assets,then the assets will be transformed to base64,for example: + +```js +// importer +import logo from './assets/logo.png?inline'; // logo is a base 64 str + +// the image module will be compiled to: +export default 'data:image/png,base64,xxxxx=='; +``` + +## raw +Using query `?raw` to tell Farm that you want to read the raw string of the assets, for example +```js +// import +import logo from './assets/license.txt?raw'; // return the content string of the assets + +// the txt file will be compiled to: +export default 'MIT xxxx'; +``` + +## Configuring Assets +* Using [`compilation.output.assetFileName`](/docs/config/compilation-options#outputassetsfilename) to control the production file name +* using [`compilation.assets.include`](/docs/config/compilation-options#assetsinclude) to treat more kind of files as asset modules. + +```js +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + output: { + assetsFilename: 'assets/[resourceName].[hash].[ext]', // [] is a placeholder, Farm currently only these three kind of placeholders + }, + assets: { + include: ['txt'] // extra static asset extension + } + } +}); +``` diff --git a/docs/docs/frameworks/electron.mdx b/docs/docs/frameworks/electron.mdx new file mode 100644 index 000000000..788ae1ece --- /dev/null +++ b/docs/docs/frameworks/electron.mdx @@ -0,0 +1,52 @@ +import { PackageManagerTabs } from "../../src/theme/PackageManagerTabs"; + +# Electron + +Create a `Electron` project based on `Farm`. + +`Farm` provides two approaches to support creating `Electron` projects: +- Use the `create-farm` scaffold to create a scaffold project +- You can manually create a `Electron` project following the current documentation + +### Creating a Electron Project + + + + +Select `Electron` template in `Select Framework` + +After selecting `Electron`, you can continue to select all sub templates already supported by `Farm` + +```ts +- React +- Vue +- Preact +- Svelte +- Solid +``` + +You can choose the framework you want to use to run on electron, farm wrote electron js plugin + +such as react template + +```ts +import { defineConfig } from '@farmfe/core'; +import electron from '@farmfe/js-plugin-electron'; + +export default defineConfig({ + plugins: [ + '@farmfe/plugin-react', + electron({ + main: { + input: 'electron/main.ts', + }, + preload: { + input: 'electron/preload.ts', + }, + }), + ] +}); + +``` + +For more example details: [Electron Example](https://github.com/farm-fe/farm/tree/main/examples/electron) diff --git a/docs/docs/frameworks/lit.mdx b/docs/docs/frameworks/lit.mdx new file mode 100644 index 000000000..721c7f4a0 --- /dev/null +++ b/docs/docs/frameworks/lit.mdx @@ -0,0 +1,43 @@ +import { PackageManagerTabs } from "../../src/theme/PackageManagerTabs"; + +# Lit + +Create a `Lit` project based on `Farm`. + +`Farm` provides two approaches to support creating `Lit` projects: +- Use the `create-farm` scaffold to create a scaffold project +- You can manually create a `Lit` project following the current documentation + +### Creating a Lit Project + + + + +Select `Lit` template in `Select Framework` + +If you use lit then we need to configure the decorator + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + presetEnv: false, + script: { + plugins: [], + target: 'es2022', + parser: { + tsConfig: { + decorators: true, + dts: false, + noEarlyErrors: false, + tsx: false + } + } + } + } +}); + +``` + +For more example details: [React Example](https://github.com/farm-fe/farm/tree/main/examples/Lit) diff --git a/docs/docs/frameworks/nestjs.mdx b/docs/docs/frameworks/nestjs.mdx new file mode 100644 index 000000000..19a9c220c --- /dev/null +++ b/docs/docs/frameworks/nestjs.mdx @@ -0,0 +1,26 @@ +import { PackageManagerTabs } from "../../src/theme/PackageManagerTabs"; + +# NestJs + +Create a `NestJs` project based on `Farm`. + +`Farm` provides two approaches to support creating `NestJs` projects: +- Use the `create-farm` scaffold to create a scaffold project +- You can manually create a `NestJs` project following the current documentation + +### Creating a NestJs Project + + + +Select `NestJs` template in `Select Framework` + +The nestjs project uses [farmup](https://github.com/farm-fe/farmup) to start and build the project. [Farmup](https://github.com/farm-fe/farmup) is built based on farm to simplify the way you run ts files in node js. + +After downloading the template, run pnpm dev to start the nestjs project + + + + +Start enjoying the development experience of millisecond builds + +For more example details: [React Example](https://github.com/farm-fe/farm/tree/main/examples/react) diff --git a/docs/docs/frameworks/preact.mdx b/docs/docs/frameworks/preact.mdx new file mode 100644 index 000000000..492d83e2d --- /dev/null +++ b/docs/docs/frameworks/preact.mdx @@ -0,0 +1,42 @@ +import { PackageManagerTabs } from "../../src/theme/PackageManagerTabs"; + +# Preact + +Create a `Preact` project based on `Farm`. + +`Farm` provides two approaches to support creating `Preact` projects: +- Use the `create-farm` scaffold to create a scaffold project +- You can manually create a `Preact` project following the current documentation + +### Creating a Preact Project + + + +Select `Preact` template in `Select Framework` + +:::warning Preact +For `Preact` support, `Farm` recommends using `Vite` plugins. +::: + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; +import Preact from "vite-plugin-preact"; + +export default defineConfig({ + plugins: [Preact()], +}); +``` + +If you want to start DevServer + + + +If you need to run the build production environment product command + + + +If you need to preview your build product + + + +For more example details: [Preact Example](https://github.com/farm-fe/farm/tree/main/examples/preact) diff --git a/docs/docs/frameworks/react.mdx b/docs/docs/frameworks/react.mdx new file mode 100644 index 000000000..fd25aef33 --- /dev/null +++ b/docs/docs/frameworks/react.mdx @@ -0,0 +1,118 @@ +import { PackageManagerTabs } from "../../src/theme/PackageManagerTabs"; + +# React + +Create a `React` project based on `Farm`. + +`Farm` provides two approaches to support creating `React` projects: +- Use the `create-farm` scaffold to create a scaffold project +- You can manually create a `React` project following the current documentation + +### Creating a React Project + + + +Select `React` template in `Select Framework` + +`Farm` requires the registration of the `@farmfe/plugin-react` plugin to support `React` projects. + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + plugins: ['@farmfe/plugin-react'], +}); +``` + +The `@farmfe/plugin-react` plugin is written in `Rust`, so you do not need to explicitly import it; you can register it by passing a string package name. + +### Integrating emotion +You can support `emotion` by registering the `@swc/plugin-emotion` plugin. + + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + script: { + plugins: [ + { + name: '@swc/plugin-emotion', + options: {}, + filters: { + moduleTypes: ['tsx'], + }, + }, + ], + }, + }, + plugins: [['@farmfe/plugin-react', { "importSource": "@emotion/react" }]], +}); + +``` + +```javascript title="src/index.tsx" +import { css } from '@emotion/react'; + +const color = 'white'; + +export function Main() { + return ( +
setCount((c) => c + 1)} + css={css` + padding: 32px; + background-color: hotpink; + font-size: 24px; + border-radius: 4px; + &:hover { + color: ${color}; + } + `} + > + {a}: {count} +
+ ); +} +``` + + +### Integrating svgr +`SVGR` is a tool for transforming svgs into React components. Farm offers a Js plugin to support SVGR. + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; +import farmJsPluginSvgr from '@farmfe/js-plugin-svgr'; + +export default defineConfig(async (env) => { + return { + plugins: [ + [ + '@farmfe/plugin-react', + { + refresh: process.env.NODE_ENV === 'development', + development: process.env.NODE_ENV === 'development' + } + ], + farmJsPluginSvgr() + ] + }; +}); + + +``` + +If you want to start DevServer + + + +If you need to run the build production environment product command + + + +If you need to preview your build product + + + +For more example details: [React Example](https://github.com/farm-fe/farm/tree/main/examples/react) diff --git a/docs/docs/frameworks/solid.mdx b/docs/docs/frameworks/solid.mdx new file mode 100644 index 000000000..6d6611779 --- /dev/null +++ b/docs/docs/frameworks/solid.mdx @@ -0,0 +1,46 @@ +import { PackageManagerTabs } from "../../src/theme/PackageManagerTabs"; + +# Solid + +Create a `Solid` project based on `Farm`. + +`Farm` provides two approaches to support creating `Solid` projects: +- Use the `create-farm` scaffold to create a scaffold project +- You can manually create a `Solid` project following the current documentation + +### Creating a Solid Project + + + +Select `Solid` template in `Select Framework` + +:::warning Solid +For `Solid` support, `Farm` recommends using `Vite` plugins. +::: + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; +import solid from 'vite-plugin-solid'; + +export default defineConfig({ + vitePlugins: [ + () => ({ + vitePlugin: solid(), + filters: ['\\.tsx$', '\\.jsx$'] + }) + ] +}); +``` +If you want to start DevServer + + + +If you need to run the build production environment product command + + + +If you need to preview your build product + + + +For more example details: [Solid Example](https://github.com/farm-fe/farm/tree/main/examples/vite-adapter-solid) diff --git a/docs/docs/frameworks/svelte.mdx b/docs/docs/frameworks/svelte.mdx new file mode 100644 index 000000000..cd617efd4 --- /dev/null +++ b/docs/docs/frameworks/svelte.mdx @@ -0,0 +1,50 @@ +import { PackageManagerTabs } from "../../src/theme/PackageManagerTabs"; + +# Svelte + +Create a `Svelte` project based on `Farm`. + +`Farm` provides two approaches to support creating `Svelte` projects: +- Use the `create-farm` scaffold to create a scaffold project +- You can manually create a `Svelte` project following the current documentation + +### Creating a Svelte Project + + + +Select `Svelte` template in `Select Framework` + +:::warning Svelte +For `Svelte` support, `Farm` recommends using `Vite` plugins. +::: + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core' +import { svelte } from '@sveltejs/vite-plugin-svelte' + +export default defineConfig({ + vitePlugins: [svelte()], +}) + +``` + +```javascript title="svelte.config.ts" +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' + +export default { + preprocess: vitePreprocess(), +} +``` +If you want to start DevServer + + + +If you need to run the build production environment product command + + + +If you need to preview your build product + + + +For more example details: [Svelte Example](https://github.com/farm-fe/farm/tree/main/examples/vite-adapter-svelte) diff --git a/docs/docs/frameworks/tauri.mdx b/docs/docs/frameworks/tauri.mdx new file mode 100644 index 000000000..604e5fd15 --- /dev/null +++ b/docs/docs/frameworks/tauri.mdx @@ -0,0 +1,40 @@ +import { PackageManagerTabs } from "../../src/theme/PackageManagerTabs"; + +# Tauri + +Create a `Tauri` project based on `Farm`. + +`Farm` provides two approaches to support creating `Tauri` projects: +- Use the `create-farm` scaffold to create a scaffold project +- You can manually create a `Tauri` project following the current documentation + +### Creating a Tauri Project + + + + +Select `Tauri` template in `Select Framework` + +1. project name + +2. choose sub template + +In your terminal, cd into the new Tauri project folder. + +Update the file with the following content: + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + plugins: ['@farmfe/plugin-react'], + server: { + port: 1420 + } +}); + +``` + +then run `pnpm tauri dev` + +For more example details: [React Example](https://github.com/farm-fe/farm/tree/main/examples/Tauri) diff --git a/docs/docs/frameworks/vanilla.mdx b/docs/docs/frameworks/vanilla.mdx new file mode 100644 index 000000000..047820362 --- /dev/null +++ b/docs/docs/frameworks/vanilla.mdx @@ -0,0 +1,30 @@ +import { PackageManagerTabs } from "../../src/theme/PackageManagerTabs"; + +# Vanilla + +Create a `Vanilla` project based on `Farm`. + +`Farm` provides two approaches to support creating `Vanilla` projects: +- Use the `create-farm` scaffold to create a scaffold project +- You can manually create a `Vanilla` project following the current documentation + +### Creating a Vanilla Project + + + + +Select `Vanilla` template in `Select Framework` + +Using the vanilla template you do not need to install any other framework dependencies, just run dev to start devServer + + + +If you need to run the build production environment product command + + + +If you need to preview your build product + + + +For more example details: [React Example](https://github.com/farm-fe/farm/tree/main/crates/create-farm-rs/template/vanilla) diff --git a/docs/docs/frameworks/vue.mdx b/docs/docs/frameworks/vue.mdx new file mode 100644 index 000000000..e6264c598 --- /dev/null +++ b/docs/docs/frameworks/vue.mdx @@ -0,0 +1,54 @@ +import { PackageManagerTabs } from "../../src/theme/PackageManagerTabs"; + +# Vue + +Create a `Vue` project based on `Farm`. + +`Farm` provides two approaches to support creating `Vue` projects: +- Use the `create-farm` scaffold to create a scaffold project +- You can manually create a `Vue` project following the current documentation + +### Creating a Vue Project + + + +Select `Vue` template in `Select Framework` + +:::warning +Currently, `Farm` uses `Vite` plugins for both `vue2` and `vue3` and `vue2.7` compilation. Also the development of Rust Vue plugin [fervid](https://github.com/phoenix-ru/fervid) is also underway. +::: + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; +import Vue from '@vitejs/plugin-vue' + +export default defineConfig({ + vitePlugins: [Vue()], +}); +``` + +### Integrating jsx + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; +import VueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + vitePlugins: [VueJsx()], +}); +``` + + +If you want to start DevServer + + + +If you need to run the build production environment product command + + + +If you need to preview your build product + + + +For more example details: [Vue Example](https://github.com/farm-fe/farm/tree/main/examples/vite-adapter-vue) diff --git a/docs/docs/migration/from-vite.md b/docs/docs/migration/from-vite.md new file mode 100644 index 000000000..1cbec69a6 --- /dev/null +++ b/docs/docs/migration/from-vite.md @@ -0,0 +1,15 @@ +# Migrate From Vite +:::note +Vite plugins like `unocss` are deeply integrated with `Vite`, these plugins may not be compatible with Farm due to the difference of internal design. You can try other method like `unocss postcss plugin` as walk-around. +::: + +Migrating from Vite is really simple as Farm is Vite-compatible. All you need to do is transforming `vite.config.ts` to `farm.config.ts`: +* Refer to [Configuring Farm](/docs/config/configuring-farm) for mapping farm config options to vite config options. +* For `Vite Plugins`, move `plugins` in `vite.config.ts` to `vitePlugins` in `farm.config.ts`. + +Note that: +* Some Vite config options is not needed in Farm, like `optimizeDeps`, you can ignore these options when migrating to Farm. +* For SSR, you need to refactor it to [Farm SSR](/docs/advanced/ssr) + + +We have migrated a [Real Vite Admin Project](https://github.com/farm-fe/farm-soybean-admin) to Farm. Check this migration example for details. diff --git a/docs/docs/plugins/community-plugins.md b/docs/docs/plugins/community-plugins.md new file mode 100644 index 000000000..cf09f876d --- /dev/null +++ b/docs/docs/plugins/community-plugins.md @@ -0,0 +1,94 @@ +# Community Plugins + +## Vite/Rollup Plugins + +Farm support `Vite/Rollup` plugins out of box. So `Vite/Rollup` or `unplugin` plugins can be used in Farm directly. + +:::tip +Farm recommends to write Farm Plugins instead of `Vite/Rollup` plugins for Farm. Because Farm Plugins have the best compatibility and performance. Still, PR welcome if you developed a Farm compatible plugin and you want to list it here. +::: + +using `vitePlugins` in `farm.config.ts` to configure `Vite/Rollup` plugins. + +```ts +import { UserConfig } from "@farmfe/core"; +import vue from "@vitejs/plugin-vue"; +import vueJsx from "@vitejs/plugin-vue-jsx"; + +const config: UserConfig = { + vitePlugins: [vue(), vueJsx()], +}; +``` + +- **[`@vitejs/plugin-vue`](https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue/README.md)**: Vue support. +- **[`@vitejs/plugin-vue-jsx`](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue-jsx)**: Vue Jsx/Tsx support. +- **[`vite-plugin-solid`](https://www.npmjs.com/package/vite-plugin-solid)**: Solid support for Farm. +- **[`vite-plugin-mock`](https://www.npmjs.com/package/vite-plugin-solid)**: Mock data in both dev and prod. +- ... + +## unplugin + +:::note +Currently you can use `unplugin/farm`, `unplugin/vite` and `unplugin/rollup` in Farm. If you are using `unplugin/vite` or `unplugin/rollup`, some attributes may not have been fully adapted, or the Farm team believes that the api does not have the adaptation conditions, you can provide [issues](https://github.com/farm-fe/farm/issues/new/choose). +::: + +```ts +import Icons from "unplugin-icons/vite"; +import IconsResolver from "unplugin-icons/resolver"; +import Components from "unplugin-vue-components/rollup"; +import { NaiveUiResolver } from "unplugin-vue-components/resolvers"; +import { FileSystemIconLoader } from "unplugin-icons/loaders"; + +const config: UserConfig = { + vitePlugins: [ + Icons({ + compiler: "vue3", + customCollections: { + [collectionName]: FileSystemIconLoader(localIconPath, (svg) => + svg.replace(/^ + +## Usage + +Create a `farm.config.js` [configuration file](https://www.farmfe.org/docs/config/configuring-farm) and import the plugin: + +```js +import { defineConfig } from '@farmfe/core'; +import dsv from '@farmfe/plugin-dsv'; + +export default defineConfig({ + plugins: [ + [ + dsv() + ] + ], +}); +``` + +## Practical Example + +Suppose that you have a CSV (or TSV!) file which contains some information on delicious fruits: + +```csv +type,count +apples,7 +pears,4 +bananas,5 +``` + +And suppose you'd like to import that CSV as an `Array` within some part of your code. After adding the plugin (as shown above), you may `import` (or `require`) the CSV file directly. The import will provide an `Array` of `Objects` representing rows from the CSV file: + +```js +import fruit from './fruit.csv'; + +console.log(fruit); +// [ +// { type: 'apples', count: '7' }, +// { type: 'pears', count: '4' }, +// { type: 'bananas', count: '5' } +// ] +``` diff --git a/docs/docs/plugins/official-plugins/js-dts.mdx b/docs/docs/plugins/official-plugins/js-dts.mdx new file mode 100644 index 000000000..468f98d86 --- /dev/null +++ b/docs/docs/plugins/official-plugins/js-dts.mdx @@ -0,0 +1,108 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/js-plugin-dts +Support `Generate .d.ts files` for Farm. This plugin is used for building tools and libraries, generate `.d.ts` for your typescript code. + +## Installation + + + + npm install @farmfe/js-plugin-dts + + + yarn add @farmfe/js-plugin-dts + + + pnpm add @farmfe/js-plugin-dts + + + +## Usage +```ts {2,6} +import { UserConfig } from '@farmfe/core'; +import farmJsPluginDts from '@farmfe/js-plugin-dts'; + +const config: UserConfig = { + plugins: [ + farmJsPluginDts({ /* options */ }) + ] +} +``` + +## Options +```ts +import type { ts, Diagnostic } from 'ts-morph'; + +export interface DtsPluginOptions { + /** + * Depends on the root directory + */ + root?: string; + + /** + * Declaration files output directory + */ + outputDir?: string | string[]; + + /** + * set the root path of the entry files + */ + entryRoot?: string; + + /** + * Project init compilerOptions using by ts-morph + */ + compilerOptions?: ts.CompilerOptions | null; + + /** + * Project init tsconfig.json file path by ts-morph + */ + tsConfigPath?: string; + + /** + * set include glob + */ + include?: string | string[]; + + /** + * set exclude glob + */ + exclude?: string | string[]; + + /** + * Whether copy .d.ts source files into outputDir + * + * @default false + */ + copyDtsFiles?: boolean; + + /** + * Whether emit nothing when has any diagnostic + * + * @default false + */ + noEmitOnError?: boolean; + + /** + * Whether skip typescript diagnostics + * + * @default true + */ + skipDiagnostics?: boolean; + + /** + * Customize typescript lib folder path + * + * @default undefined + */ + libFolderPath?: string; + + /** + * According to the length to judge whether there is any type error + */ + afterDiagnostic?: (diagnostics: Diagnostic[]) => void | Promise; +} + +``` diff --git a/docs/docs/plugins/official-plugins/js-less.mdx b/docs/docs/plugins/official-plugins/js-less.mdx new file mode 100644 index 000000000..35053e81c --- /dev/null +++ b/docs/docs/plugins/official-plugins/js-less.mdx @@ -0,0 +1,156 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/js-plugin-less +Support `less` for Farm. + +## Installation + + + + npm install @farmfe/js-plugin-less less + + + yarn add @farmfe/js-plugin-less less + + + pnpm add @farmfe/js-plugin-less less + + + +## Usage +```ts {2,6} +import { UserConfig } from '@farmfe/core'; +import farmJsPluginLess from '@farmfe/js-plugin-less'; + +const config: UserConfig = { + plugins: [ + farmJsPluginLess({ /* options */ }) + ] +} +``` + +## Options +```ts +export type LessPluginOptions = { + lessOptions?: Less.Options; + implementation?: string; + filters?: { + resolvedPaths?: string[]; + moduleTypes?: string[]; + }; + additionalData?: + | string + | ((context?: string, resolvePath?: string) => string | Promise); +}; +``` + +### lessOptions +Less options. See [less options](https://lesscss.org/usage/#less-options). + +Example: +```ts +import path from 'node:path'; +import { UserConfig } from '@farmfe/core'; +import farmJsPluginLess from '@farmfe/js-plugin-less'; + +const config: UserConfig = { + plugins: [ + farmJsPluginLess({ + lessOptions: { + paths: [path.resolve(process.cwd(), 'styles')] + } + }) + ] +} + +export default config; +``` + +### filters +Which files should be processed by `less`. default to `{ resolvedPaths: ['\\.less$'] }` for load and `{ moduleTypes: ['less'] }` for transform. + +* `resolvedPaths`: Only files under these paths will be processed. Support regex. +* `moduleTypes`: Only files with these module types will be processed. + +`resolvedPaths` and `moduleTypes` are unioned, which means files match any of them will be processed. + +Example: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginLess from '@farmfe/js-plugin-less'; + +const config: UserConfig = { + plugins: [ + farmJsPluginLess({ + filters: { + // all files end with .custom-css will be processed + resolvedPaths: ['\\.custom-less$'], + moduleTypes: ['less'] + } + }) + ] +} + +export default config; +``` + +### implementation +`implementation` package name of `less`. Default to `less`. + +### additionalData +```ts +type AdditionalDataOption = string | ((content?: string, resolvePath?: string) => string | Promise); +``` +Additional data to be added to every less file. Example: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginLess from '@farmfe/js-plugin-less'; + +const config: UserConfig = { + plugins: [ + farmJsPluginLess({ + // add variables.less to every less file + additionalData: ` + @import "./src/styles/variables.less"; + ` + }) + ] +} +``` +For less file: +```less title="index.less" +.foo { + color: @primary-color; +} +``` +`additionalData` will be added to the top of the file: +```less title="index.less" +@import "./src/styles/variables.less"; + +.foo { + color: @primary-color; +} +``` + +Function form: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginLess from '@farmfe/js-plugin-less'; + +const config: UserConfig = { + plugins: [ + farmJsPluginLess({ + // add variables.less to every less file + additionalData: (content, resolvePath) => { + if (resolvePath === '/path/to/index.less') { + return ` + @import "./src/styles/variables.less"; + `; + } + } + }) + ] +} +``` diff --git a/docs/docs/plugins/official-plugins/js-postcss.mdx b/docs/docs/plugins/official-plugins/js-postcss.mdx new file mode 100644 index 000000000..5a9982213 --- /dev/null +++ b/docs/docs/plugins/official-plugins/js-postcss.mdx @@ -0,0 +1,107 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/js-plugin-postcss +Support `postcss` for Farm. + +## Installation + + + + npm install @farmfe/js-plugin-postcss postcss + + + yarn add @farmfe/js-plugin-postcss postcss + + + pnpm add @farmfe/js-plugin-postcss postcss + + + +## Usage +```ts {2,6} +import { UserConfig } from '@farmfe/core'; +import farmJsPluginPostcss from '@farmfe/js-plugin-postcss'; + +const config: UserConfig = { + plugins: [ + farmJsPluginPostcss({ /* options */ }) + ] +} +``` + +## Options +```ts +export type PostcssPluginOptions = { + /** + * @default undefined + * postcss-load-config options. path default to farm.config.js root. + */ + postcssLoadConfig?: { + ctx?: postcssLoadConfig.ConfigContext; + path?: string; + options?: Parameters[2]; + }; + filters?: { + resolvedPaths?: string[]; + moduleTypes?: string[]; + }; + implementation?: string; +}; + +``` + +### postcssLoadConfig +Farm uses `postcss-load-config` to load `postcss` config, so you can use `postcss-load-config`'s options. Refer to [postcss-load-config](https://github.com/postcss/postcss-load-config). + +Example: +```ts +import path from 'node:path'; +import { UserConfig } from '@farmfe/core'; +import farmJsPluginPostcss from '@farmfe/js-plugin-postcss'; + +const config: UserConfig = { + plugins: [ + farmJsPluginPostcss({ + postcssLoadConfig: { + // load config from client/postcss.config.js + path: path.join(process.cwd(), 'client') + } + }) + ] +} + +export default config; +``` + +### filters +Which files should be processed by `postcss`. default to `{ moduleTypes: ['css'] }`. + +* `resolvedPaths`: Only files under these paths will be processed. Support regex. +* `moduleTypes`: Only files with these module types will be processed. note that less/sass files should be processed by `@farmfe/js-plugin-less`/`@farmfe/plugin-sass` first. + +`resolvedPaths` and `moduleTypes` are unioned, which means files match any of them will be processed. + +Example: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginPostcss from '@farmfe/js-plugin-postcss'; + +const config: UserConfig = { + plugins: [ + farmJsPluginPostcss({ + filters: { + // all files end with .custom-css will be processed + resolvedPaths: ['\\.custom-css$'], + moduleTypes: ['css'] + } + }) + ] +} + +export default config; +``` + +### implementation +`implementation` package name of `postcss`. Default to `postcss`. \ No newline at end of file diff --git a/docs/docs/plugins/official-plugins/js-sass.mdx b/docs/docs/plugins/official-plugins/js-sass.mdx new file mode 100644 index 000000000..29b854665 --- /dev/null +++ b/docs/docs/plugins/official-plugins/js-sass.mdx @@ -0,0 +1,185 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/js-plugin-sass +Support `sass` for Farm. + +## Installation + + + + npm install @farmfe/js-plugin-sass sass + + + yarn add @farmfe/js-plugin-sass sass + + + pnpm add @farmfe/js-plugin-sass sass + + + +## Usage +```ts {2,6} +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSass from '@farmfe/js-plugin-sass'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSass({ /* options */ }) + ] +} +``` + +## Options +```ts +export type SassPluginOptions = { + sassOptions?: StringOptions<'async'>; + filters?: { + resolvedPaths?: string[]; + moduleTypes?: string[]; + }; + + /** + * - relative or absolute path + * - globals file will be added to the top of the sass file + * - when file changed, the file can't be hot-reloaded + * + * relative to project root or cwd + */ + implementation?: string | undefined; + globals?: string[]; + additionalData?: + | string + | ((content?: string, resolvePath?: string) => string | Promise); +}; +``` + +### sassOptions +Sass options. See [sass options](https://sass-lang.com/documentation/js-api/interfaces/options/) for more details. + +Example: +```ts +import path from 'node:path'; +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSass from '@farmfe/js-plugin-sass'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSass({ + sassOptions: { + loadPaths: [path.resolve(process.cwd(), 'styles')] + } + }) + ] +} + +export default config; +``` + +### filters +Which files should be processed by `sass`. Default to `{ resolvedPaths: ['\\.(s[ac]ss)$'] }` for load and `{ moduleTypes: ['sass'] }` for transform. + +* `resolvedPaths`: Only files under these paths will be processed. Support regex. +* `moduleTypes`: Only files with these module types will be processed. + +`resolvedPaths` and `moduleTypes` are unioned, which means files match any of them will be processed. + +Example: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSass from '@farmfe/js-plugin-sass'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSass({ + filters: { + // all files end with .custom-css will be processed + resolvedPaths: ['\\.custom-sass$'], + moduleTypes: ['sass'] + } + }) + ] +} + +export default config; +``` + +### implementation +`implementation` package name of `sass`. Default to `sass`. If you want to use `sass-embedded`, you can set it to `sass-embedded`. + +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSass from '@farmfe/js-plugin-sass'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSass({ + implementation: 'sass-embedded' + }) + ] +} +``` +:::note +You should install `sass-embedded` manually. +::: + +### additionalData +```ts +type AdditionalDataOption = string | ((content?: string, resolvePath?: string) => string | Promise); +``` +Additional data to be added to every sass file. Example: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSass from '@farmfe/js-plugin-sass'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSass({ + // add variables.sass to every sass file + additionalData: ` + @import "./src/styles/variables.scss"; + ` + }) + ] +} +``` +For sass file: +```sass title="index.scss" +.foo { + color: @primary-color; +} +``` +`additionalData` will be added to the top of the file: +```sass title="index.scss" +@import "./src/styles/variables.scss"; + +.foo { + color: @primary-color; +} +``` + +Function form: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSass from '@farmfe/js-plugin-sass'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSass({ + // add variables.sass to every sass file + additionalData: (content, resolvePath) => { + if (resolvePath === '/path/to/index.sass') { + return ` + @import "./src/styles/variables.sass"; + `; + } + } + }) + ] +} +``` + +### globals +Global sass files. These files will be added to the top of every sass file. It's the same as `additionalData` but more convenient. + diff --git a/docs/docs/plugins/official-plugins/js-svgr.mdx b/docs/docs/plugins/official-plugins/js-svgr.mdx new file mode 100644 index 000000000..8af583b66 --- /dev/null +++ b/docs/docs/plugins/official-plugins/js-svgr.mdx @@ -0,0 +1,88 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/js-plugin-svgr +Support `React SVG Components` for Farm. + +## Installation + + + + npm install @farmfe/js-plugin-svgr + + + yarn add @farmfe/js-plugin-svgr + + + pnpm add @farmfe/js-plugin-svgr + + + +## Usage +```ts {2,6} +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSvgr from '@farmfe/js-plugin-svgr'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSvgr({ /* options */ }) + ] +} +``` + +## Options +```ts +export interface FarmSvgrPluginOptions { + svgrOptions?: SvgrOptions; + filters?: { + resolvedPaths?: string[]; + }; +} +``` + +### svgrOptions +See [svgr options](https://react-svgr.com/docs/options/) for more details. + +Example: +```ts +import path from 'node:path'; +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSvgr from '@farmfe/js-plugin-svgr'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSvgr({ + svgrOptions: { + loadPaths: [path.resolve(process.cwd(), 'styles')] + } + }) + ] +} + +export default config; +``` + +### filters +Which files should be processed by `svgr`. Default to `{ resolvedPaths: ['\\.svg$'] }`. + +* `resolvedPaths`: Only files under these paths will be processed. Support regex. + +Example: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSvgr from '@farmfe/js-plugin-svgr'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSvgr({ + filters: { + // all files end with .custom-svg will be processed + resolvedPaths: ['\\.custom-svg$'], + } + }) + ] +} + +export default config; +``` \ No newline at end of file diff --git a/docs/docs/plugins/official-plugins/overview.md b/docs/docs/plugins/official-plugins/overview.md new file mode 100644 index 000000000..f7152a9a7 --- /dev/null +++ b/docs/docs/plugins/official-plugins/overview.md @@ -0,0 +1,31 @@ +# Overview + +Farm officially provides a lot of useful plugins, including Rust plugins and JS plugins. Rust plugins are much faster than Js plugins, we recommend to use Rust plugins whenever possible. + +:::tip +Refer to [Using Plugins](/docs/using-plugins) for how to use plugins in Farm. +::: + +## Rust Plugins + +* **[`@farmfe/plugin-react`](./react)**:Support React `jsx` and `react-refresh`. +* **[`@farmfe/plugin-sass`](./sass)**:Support compiling `sass/scss` files. +* **[`@farmfe/plugin-strip`](./strip)**:A Farm rust plugin to remove `debugger` statements and functions like `assert.equal` and `console.log` from your code. +* **[`@farmfe/plugin-dsv`](./dsv)**:A Farm plugin which converts `.csv` and `.tsv` files into JavaScript modules. +* **[`@farmfe/plugin-yaml`](./yaml)**:A Farm plugin which Converts YAML files to ES6 modules. +* **[`@farmfe/plugin-virtual`](./virtual)**:A rust plugin for farm to easily use virtual module. +* **[`@farmfe/plugin-react-components`](./react-components)**:On-demand components auto importing for React. + +## Js Plugins + +* **[`@farmfe/js-plugin-postcss`](./js-postcss)**:Support `postcss` in your project. +* **[`@farmfe/js-plugin-less`](./js-less)**:Support compiling `less` files. +* **[`@farmfe/js-plugin-svgr`](./js-svgr)**:Support compiling `svg` files. +* **[`@farmfe/js-plugin-dts`](./js-dts)**:Support compiling `*.d.ts` files. +* **[`@farmfe/js-plugin-sass`](./js-sass)**:Support compiling `sass/scss` files. + +## Community Plugins + +If official plugins doesn't meet your needs, you can try [Community Plugins](../community-plugins) + +And of course check out [awesome-farm](https://github.com/farm-fe/awesome-farm) - you can also submit a PR to list your plugins there. diff --git a/docs/docs/plugins/official-plugins/react-components.mdx b/docs/docs/plugins/official-plugins/react-components.mdx new file mode 100644 index 000000000..67be2324a --- /dev/null +++ b/docs/docs/plugins/official-plugins/react-components.mdx @@ -0,0 +1,157 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/plugin-react-components + +On-demand components auto importing for React. + +## Installation + + + + npm install @farmfe/plugin-react-components + + + yarn add @farmfe/plugin-react-components + + + pnpm add @farmfe/plugin-react-components + + + +## Usage +`@farmfe/plugin-react-components` is a Rust plugin, you only need to configure its package name in `plugins` field in `farm.config.ts`. +```ts {4} +import { UserConfig } from '@farmfe/core'; + +const config: UserConfig = { + plugins: ['@farmfe/plugin-react-components', { /** options here */}] +} +``` + +## Features + +- 💚 Supports React out-of-the-box. +- ✨ Supports both components and directives. +- 🏝 Tree-shakable, only registers the components you use. +- 🪐 Folder names as namespaces. +- 🦾 Full TypeScript support. +- 🌈 [Built-in resolvers](#importing-from-ui-libraries) for popular UI libraries. + +## Usage + +Use components in templates as you would usually do, it will import components on demand, and there is no `import` and `component registration` required anymore! If you register the parent component asynchronously (or lazy route), the auto-imported components will be code-split along with their parent. + +It will automatically turn this + +```tsx +export function Main() { + return +} +``` + +into this + +```tsx +import HelloWorld from './src/components/HelloWorld' + +export function Main() { + return +} +``` + +> **Note** +> By default this plugin will import components in the `src/components` path. You can customize it using the `dirs` option. + +## TypeScript + +To get TypeScript support for auto-imported components. + +```ts +Components({ + dts: true, // enabled by default if `typescript` is installed +}) +``` + +Once the setup is done, a `components.d.ts` will be generated and updates automatically with the type definitions. Feel free to commit it into git or not as you want. + +> **Make sure you also add `components.d.ts` to your `tsconfig.json` under `include`.** + +## Importing from UI Libraries + +We have several built-in resolvers for popular UI libraries like **Ant Design**, **Arco Design**, and **Material UI**, where you can enable them by: + +Supported Resolvers: + +- [Ant Design](https://ant.design/) +- [Arco Design](https://arco.design/react/docs/start) +- [Material UI](https://mui.com/) + +```ts +// farm.config.js + +import { UserConfig } from '@farmfe/core'; + +const config: UserConfig = { + plugins: ['@farmfe/plugin-react-components', { + local: true, + resolvers:[ + { + module: "antd", + prefix: "Ant" + }, + { + module:"@arco-design/web-react", + prefix: "Arco", + import_style: true // style/index.js + } + ] + }] +} +``` + +## Configuration + +The following show the default values of the configuration +component +```ts +{ + // relative paths to the directory to search for components. + dirs: ['src/components'], + + // resolvers for custom components. + resolvers: [], + + /** + * Components are introduced with Absolute or Relative path. + * + * @default Absolute + */ + import_mode: "Absolute" + + /** + * Is it valid for local components + * + * @default true + */ + local: true, + + /** + * import style `style/index.js` , also accepts a path for custom path (/**) with components + * + * @default false + */ + importStyle?: boolean | string + + // generate `components.d.ts` global declarations, + // also accepts a path for custom filename + // default: `true` if package typescript is installed + dts: true, + + // Filters for transforming targets (components to insert the auto import) + // Note these are NOT about including/excluding components registered - use `Regex` for that + include: ["src/components"], + exclude: ["node_modules"], +} +``` diff --git a/docs/docs/plugins/official-plugins/react.mdx b/docs/docs/plugins/official-plugins/react.mdx new file mode 100644 index 000000000..d603c8902 --- /dev/null +++ b/docs/docs/plugins/official-plugins/react.mdx @@ -0,0 +1,33 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/plugin-react +Support `React Jsx` and `React Refresh` for Farm. + +## Installation + + + + npm install @farmfe/plugin-react react-refresh + + + yarn add @farmfe/plugin-react react-refresh + + + pnpm add @farmfe/plugin-react react-refresh + + + +## Usage +`@farmfe/plugin-react` is a Rust plugin, you only need to configure its package name in `plugins` field in `farm.config.ts`. +```ts {4} +import { UserConfig } from '@farmfe/core'; + +const config: UserConfig = { + plugins: ['@farmfe/plugin-react', { /** options here */}] +} +``` + +## Options +See [SWC Transform React Options](https://swc.rs/docs/configuration/compilation#jsctransformreact). diff --git a/docs/docs/plugins/official-plugins/sass.mdx b/docs/docs/plugins/official-plugins/sass.mdx new file mode 100644 index 000000000..eb8cc5511 --- /dev/null +++ b/docs/docs/plugins/official-plugins/sass.mdx @@ -0,0 +1,37 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/plugin-sass + +Support `Sass` for Farm. + +## Installation + + + + npm install @farmfe/plugin-sass + + + yarn add @farmfe/plugin-sass + + + pnpm add @farmfe/plugin-sass + + + +## Usage +`@farmfe/plugin-sass` is a Rust plugin, you only need to configure its package name in `plugins` field in `farm.config.ts`. +```ts {4} +import { UserConfig } from '@farmfe/core'; + +const config: UserConfig = { + plugins: ['@farmfe/plugin-sass', { /** options here */}] +} +``` + +## Options +### additionalData +* **Type**: `string` + +Add extra content to the head of each `sass` file, such as an `@import '@/styles/variables.scss';` statement. \ No newline at end of file diff --git a/docs/docs/plugins/official-plugins/strip.mdx b/docs/docs/plugins/official-plugins/strip.mdx new file mode 100644 index 000000000..b8968fef6 --- /dev/null +++ b/docs/docs/plugins/official-plugins/strip.mdx @@ -0,0 +1,103 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + + +# @farmfe/plugin-strip + +🍣 A Farm rust plugin to remove `debugger` statements and functions like `assert.equal` and `console.log` from your code. + +## Requirements + +This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v18.0.0+) and Farm v1.0.0+. + +## Installation + + + + npm install @farmfe/plugin-strip + + + yarn add @farmfe/plugin-strip + + + pnpm add @farmfe/plugin-strip + + + +## Usage + +Create a `farm.config.js` [configuration file](https://www.farmfe.org/docs/config/configuring-farm) and import the plugin: + +```js +import { defineConfig } from '@farmfe/core'; +import strip from '@farmfe/plugin-strip'; + +export default defineConfig({ + // ... + plugins: [ + [ + strip({ + // plugin options + functions:[ 'console.*', 'assert.*' ], + labels: ['unittest'] + }) + ] + ], + // ... +}); +``` + +## Options + +### `include` + +Type: `String | RegExp | Array[...String|RegExp]`
+Default: `['**/*.js']`
+Example: `include: '**/*.(mjs|js)',`
+ +A pattern, or array of patterns, which specify the files in the build the plugin should operate on. + +### `exclude` + +Type: `String | RegExp | Array[...String|RegExp]`
+Default: `[]`
+Example: `exlude: 'tests/**/*',`
+ +A pattern, or array of patterns, which specify the files in the build the plugin should _ignore_. + +### `debugger` + +Type: `Boolean`
+Default: `true`
+Example: `debugger: false,`
+ +If `true` instructs the plugin to remove debugger statements. + +### `functions` + +Type: `Array[...String]`
+Default: `[ 'console.*', 'assert.*' ]`
+Example: `functions: [ 'console.log', 'MyClass.Test' ],`
+ +Specifies the functions that the plugin will target and remove. + +_Note: specifying functions that are used at the begining of a chain, such as 'a().b().c()', will result in '(void 0).b().c()' which will generate an error at runtime._ + +### `labels` + +Type: `Array[...String]`
+Default: `[]`
+Example: `labels: ['unittest'],`
+ +Specifies the [labeled blocks or statements](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label) that the plugin will target and remove. + +_Note: the '**:**' is implied and should not be specified in the config._ + +### `sourceMap` + +Type: `Boolean`
+Default: `true`
+Example: `sourceMap: false,`
+ +If `true`, instructs the plugin to update source maps accordingly after removing configured targets from the bundle. diff --git a/docs/docs/plugins/official-plugins/virtual.mdx b/docs/docs/plugins/official-plugins/virtual.mdx new file mode 100644 index 000000000..2378da441 --- /dev/null +++ b/docs/docs/plugins/official-plugins/virtual.mdx @@ -0,0 +1,55 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/plugin-virtual + +Inspired By [@rollup/plugin-virtual](https://www.npmjs.com/package/@rollup/plugin-virtual) + +A rust plugin for farm to easily use virtual module + +## Installation + + + + npm install @farmfe/plugin-virtual + + + yarn add @farmfe/plugin-virtual + + + pnpm add @farmfe/plugin-virtual + + + +## Usage + +farm.config.ts + +```typescript +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + plugins: [ + [ + '@farmfe/plugin-virtual', + { + 'virtual-module': 'export const a = 1', + 'src/01.js': 'export const module01 = "virtual-module"', + }, + ], + ], +}); +``` + +index.js + +```javascript +import { a } from 'virtual-module'; +``` + +src/02.js + +```javascript +import { module01 } from './01.js'; +``` diff --git a/docs/docs/plugins/official-plugins/yaml.mdx b/docs/docs/plugins/official-plugins/yaml.mdx new file mode 100644 index 000000000..0c5101906 --- /dev/null +++ b/docs/docs/plugins/official-plugins/yaml.mdx @@ -0,0 +1,48 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/plugin-yaml + +Inspired By [@rollup/plugin-yaml](https://www.npmjs.com/package/@rollup/plugin-yaml) + +🍣 A Farm plugin which Converts YAML files to ES6 modules. + +## Installation + + + + npm install @farmfe/plugin-yaml + + + yarn add @farmfe/plugin-yaml + + + pnpm add @farmfe/plugin-yaml + + + +## Usage + +farm.config.ts + +```typescript +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + plugins: [ + [ + '@farmfe/plugin-yaml', + { + documentMode: 'single' | 'multi', // default single + include: Regex, // default None, + exclude: Regex, // default None + }, + ], + ], +}); +``` + +notice: + +include or exclude is Regex not glob For example `**/01.yaml` is not illegal。What is right is like `".*\\/01.yaml"` diff --git a/docs/docs/plugins/writing-plugins/js-plugin.mdx b/docs/docs/plugins/writing-plugins/js-plugin.mdx new file mode 100644 index 000000000..fda5d4290 --- /dev/null +++ b/docs/docs/plugins/writing-plugins/js-plugin.mdx @@ -0,0 +1,203 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + + +# Writing JavaScript Plugins + +A JavaScript plugin is simply a pure JavaScript object that defines a set of property hooks: + +```js +// farm.config.ts +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + // ... + plugins: [ + // a plugin object + { + name: "my-resolve-plugin", + priority: 1000, // the priority of this plugin, the larger the value, the earlier the execution. Normally internal plugins is 100. + resolve: { + filters: { + // Only execute the hook when following conditions satisfied + sources: ["\\./index.ts"], // a regex array + importers: ["None"], + }, + executor: async (param) => { + // this hook executor + console.log(param); // resolve params + // return the resolve result + return { + resolvedPath: "virtual:my-module", + query: {}, + sideEffects: false, + external: false, + }; + }, + }, + }, + // load, transform are similar to resolve, refer to their types + ], +}); +``` + +If you want to pass args to your plugins,you can use a closure. + +```ts +// my-resolve-plugin.ts +export function myResolvePlugin(options: Options) { + const { xx } = options; + + return { + name: "my-resolve-plugin", + resolve: { + // ... + }, + }; +} + +// farm.config.ts +import { defineConfig } from "@farmfe/core"; +import { myResolvePlugin } from "./myResolvePlugin.ts"; + +export default defineConfig({ + // ... + plugins: [myResolvePlugin({ xx: "xx" })], +}); +``` + +:::note +* See [Create Plugin](#create-plugin) to create a new plugin quickly based on official plugin templates. +* This document only covers how to create, develop and publish a js plugin, for more detail about the plugin hooks, see [Js Plugin Hooks](/docs/api/js-plugin-api). +::: + +## Conventions + +For farm specific js plugins: + +- The Farm Js plugin should have a name with a `farm-plugin-` prefix and clear semantics. +- Include the `farm-plugin-` keyword in package.json. + +If your plugin is only applicable to a specific framework, its name should follow the following prefix format: + +- `farm-plugin-vue-`: Prefix as a Vue plugin +- `farm-plugin-react-`: Prefix as a React plugin +- `farm-plugin-svelte-`: Prefix as a svelte plugin +- ... + +## Concepts +Before you start to write your js plugin, you should know the following concepts: +* **filters**: Cause Js Plugins are much slower than Rust Plugins, your js plugin need to set explicit filters to avoid unnecessary call for js plugins hook. For example, you should set `transform.filters.moduleTypes = ['js']` to make sure that the transform hook of your js plugin only runs for `.js/mjs/cjs` files. +* **module_type**: The type of the module, it can be `js`, `ts`, `css`, `sass`, `json`, etc. Farm supports `js/ts/jsx/tsx`, `css`, `html`, `json`, `static assets(png, svg, etc)` natively. `module_type` is returned by `load` hook or `transform` hook. +* **resolved_path and module_id**: `resolved_path` is the absolute path of the module, and `module_id` is the unique id of the module, it's usually `relative path of the module from the project root` + `query`. For example, we import a module as `import './a?query'`, the resolved_path is `/project/src/a.ts` and the module_id is `src/a.ts?query`. +* **context**: All the hooks in the plugin accept a `context` argument, it's the compilation context of the farm project, you can use it to get the ModuleGraph, Module, Resources, etc. +* **Resource and Resource Pot**: `Resource` is the final output bundle file, and `Resource Pot` is the abstract representation of the resource, similar to `Chunk` of other bundlers. Inside Farm, first we will generate `Resource Pots` from `ModuleGraph`, render `Resource Pots` and finally generate `Resources` from `Resource Pots`. + +### Filters +Cause `Js Plugins` are much slower than `Rust Plugins`, Farm use `filters` to control the execution of js plugin hooks. The plugin hook executes only when given `filters` matched to improve performance. `filters` is neccessary for some commonly used hooks, such as `resolve`, `load`, `transform`, etc. + +For example, if you want to transform css files, you can use `transform.filters.moduleTypes = ['css']` to make sure that the transform hook of your js plugin only runs for `.css` files: + +```ts +const myCssPlugin = { + name: "my-css-plugin", + transform: { + filters: { + // Only execute the hook when following conditions satisfied + // resolvedPaths: ["\\./index.ts"], // a regex array to match the resolvedPaths + moduleTypes: ["css"], + }, + executor: async (param) => { + // transform css + }, + }, +}; +``` + +### Module Type +In Farm, every thing is `First Class Citizens`, so Farm designs `module_type` to identify the type of a module and handle different kinds of ModuleTypes in different plugins. + +`module_type` returned by `load` hook, and can be transformed by `transform` hook. Farm supports `js/ts/jsx/tsx`, `css`, `html`, `json`, `static assets(png, svg, etc)` natively. For these module types, you can return them directly in `load` or `transform` hook directly. But if you want to handle custom module types, you may need to implement ohter hooks like `parse`, `render_resource_pot_modules`, `generate resources`, etc to control how to parse, render and generate resources for the custom module types. + +:::note +Js Plugins don't support `parse`, `render_resource_pot_modules`, `generate resources` hooks, you have to use Rust Plugins to handle custom module types. +::: + +## Create Plugin +Farm provides official templates to help your create your js plugins quickly: +<> + + + pnpm create farm-plugin + + + npm create farm-plugin@latest + + + + yarn create farm-plugin + + + + +then follow the prompts to create your plugin. + +or you can create a plugin derectly by running the following command: + + + pnpm create farm-plugin my-farm-plugin --type js + + + npm create my-farm-plugin --type js + + + + yarn create my-farm-plugin --type js + + +Above command will create new js plugin with name `my-farm-plugin` in the current directory. `--type` can be `rust` or `js` + +## Develop Plugin +After creating the plugin, you can start to develop your plugin. The plugin is a pure JavaScript object that defines a set of property hooks: + +```ts +// import { readFileSync } from 'node:fs'; +import type { JsPlugin } from '@farmfe/core'; + +interface Options { + /* Your options here */ +} + +export default function farmPlugin(options: Options): JsPlugin { + return { + name: '', + /* Your plugin hooks here: */ + + // transform: { + // filters: { + // moduleTypes: ['js'] + // }, + // async executor(params) { + // const { content } = params; + // return { + // content, + // moduleType: 'js' + // }; + // } + // }, + // finish: { + // executor() {} + // } + }; +} +``` + +:::tip +For more detail about the plugin hooks, see [Js Plugin Hooks](/docs/api/js-plugin-api). +::: + +Run `npm run dev` to compile the plugin and watch for changes. Run `npm run build` to build the plugin. + +## Publish Plugin +A js plugin package is a normal npm package, you can publish it to npm registry by running `npm publish`. \ No newline at end of file diff --git a/docs/docs/plugins/writing-plugins/overview.md b/docs/docs/plugins/writing-plugins/overview.md new file mode 100644 index 000000000..20bd1ed6e --- /dev/null +++ b/docs/docs/plugins/writing-plugins/overview.md @@ -0,0 +1,22 @@ + +# Overview +To use a Rust plugin, configuring `plugins` in `farm.config.ts`. + +```ts +import { defineFarmConfig } from '@farmfe/core'; + +defineFarmConfig({ + // ... + plugins: [ + { /*..*/ }, // Js plugin, a object with hook defined + '@farmfe/plugin-react', // rust plugin package name + ] +}) + +``` + +Farm support both rust plugins and js plugins: + +* [Writing Rust Plugin](/docs/plugins/writing-plugins/rust-plugin) +* [Writing Js Plugin](/docs/plugins/writing-plugins/js-plugin) + \ No newline at end of file diff --git a/docs/docs/plugins/writing-plugins/runtime-plugin.md b/docs/docs/plugins/writing-plugins/runtime-plugin.md new file mode 100644 index 000000000..4f99504c0 --- /dev/null +++ b/docs/docs/plugins/writing-plugins/runtime-plugin.md @@ -0,0 +1,166 @@ +# Writing Runtime Plugin +A Farm runtime plugin is a pure javascript object that define a set of hooks to enhance Farm runtime. Example: + +```ts +/** + * HMR client as a Farm Runtime Plugin + */ +import type { Plugin } from '@farmfe/runtime'; +import { createHotContext } from './hot-module-state'; +import { HmrClient } from './hmr-client'; + +let hmrClient: HmrClient; +// export a Farm runtime plugin object +export default { + name: 'farm-runtime-hmr-client-plugin', + // define hooks + bootstrap(moduleSystem) { + hmrClient = new HmrClient(moduleSystem); + hmrClient.connect(); + }, + moduleCreated(module) { + // create a hot context for each module + module.meta.hot = createHotContext(module.id, hmrClient); + } +}; +``` + +Above it's a runtime plugin that supports HMR for Farm. Essentials: +* A runtime plugin entry file should **`export`** a default object that defines a set of hooks. e.g `export default {/*...*/}` +* `name` is required to identify the plugin, make sure `name` is unique +* A `hook` is a method that defined in the exported object. + +:::note +See [@farmfe/runtime-plugin-hmr](https://github.com/farm-fe/farm/tree/main/packages/runtime-plugin-hmr) for full implementation of above examples. +::: + +## Caveat +You should make your runtime plugin as **simple** as possible. You **SHOULD NOT**: +* Use **big dependencies** from node_modules, this would make your farm plugin very large, it's really bad for performance. +* Use new features like `top level await` as these runtime related features are hard to polyfill for low level runtime. + +It's really recommended to make sure your runtime plugin **as small and simple as possible**. + +:::tip +`import.meta.xxx` will be compiled to `module.meta.xxx`, you can `append values` to `module.meta` in runtime plugins to enhance `import.meta`. For example, `module.meta.hot = createHotContext(module.id, hmrClient)` makes `import.meta.hot` available. +::: + +## Conventions +A Farm runtime plugin name should be prefixed by `farm-runtime-plugin`, e.g `farm-runtime-plugin-xxx`. + +:::note +Both `plugin.name` and `package name`(Only if you publish your plugin as a package) should be prefixed. +::: + + +## Using Runtime Plugins +Use `compilation.runtime.plugins` to configure runtime plugins for your project: + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + runtime: { + plugins: [ + // relative path + './src/my-plugin1.ts', + // absolute path + '/root/project/src/my-plugin2.ts', + // package name + '@scope/plugin-package-from-node-modules' + ] + } + } +}); +``` + +You can configure runtime plugin item by 3 ways: +* **`relative path`**: Path that is relative to `root`, e.g `./src/my-plugin1.ts` will try load plugin from `/src/my-plugin1.ts`. +* **`absolute path`**: e.g `/root/project/src/my-plugin2.ts`. (Absolute path should be `C:\project\src\my-plugin2.ts` on windows). +* **`package name`**: Farm will try load this package from `node_modules`, e.g `@scope/plugin-package-from-node-modules`. + +## Writing Runtime Plugins +:::tip +Farm support loading `.ts` file directly, so you can configure a `.ts` file(or a package whose entry is a `ts` file) in `runtime.plugins` directly. + +```ts +export default defineConfig({ + compilation: { + runtime: { + plugins: [ + // configuring ts file directly + './src/my-plugin.ts', + ] + } + } +}); +``` +::: + +### Create a Plugin +As we mentioned above, a Farm runtime plugin is a pure javascript object that define a set of hooks, you can just create a ts file like: + +```ts title="./plugins/runtime.ts" +import type { Plugin } from '@farmfe/runtime'; + +export default { + name: 'my-plugin', + // ... +} +``` + +Then define [hooks](#runtime-plugin-hooks) you need in the exported object: + +```ts title="./plugins/runtime.ts" +import type { Plugin } from '@farmfe/runtime'; + +export default { + name: 'my-plugin', + moduleCreated(module) { + // ... + }, + readModuleCache(module) { + // ... + }, + loadResource(resource, targetEnv) { + // ... + }, + // ... more hooks as long as you need +} +``` + +### Debug the Plugin +Configure the plugin you created in `runtime.plugins`: + +```ts +export default defineConfig({ + compilation: { + runtime: { + plugins: [ + './plugins/runtime.ts', + ] + } + } +}); +``` +Then start the Farm project, this plugin will be injected in the runtime of output resources. + +### Publish the Plugin(Optional) +You can publish the runtime plugin to npm registry to share your Farm runtime plugin. Just create a `package.json` like: + +```json +{ + "name": "@farmfe/runtime-plugin-hmr", + "version": "3.4.2", + "description": "Runtime hmr plugin of Farm", + // c-highlight-start + "main": "src/index.ts", + // c-highlight-end + // ... ignore other fields +} +``` +You can just export `ts` file using `"main": "src/index.ts"`. + +## Runtime Plugin Hooks +See [Runtime Plugin API](/docs/api/runtime-plugin-api) \ No newline at end of file diff --git a/docs/docs/plugins/writing-plugins/rust-plugin.mdx b/docs/docs/plugins/writing-plugins/rust-plugin.mdx new file mode 100644 index 000000000..11053a487 --- /dev/null +++ b/docs/docs/plugins/writing-plugins/rust-plugin.mdx @@ -0,0 +1,514 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# Writing Rust Plugins +Rust plugins are the recommended way to write your plugins cause Rust plugins are much **faster and powerful** than Js Plugins. A Rust plugin is a `struct` that implements `farmfe_core::plugin::Plugin` trait, example: + +```rust +#![deny(clippy::all)] + +use farmfe_core::{config::Config, plugin::Plugin}; + +use farmfe_macro_plugin::farm_plugin; + +// define your rust plugins +#[farm_plugin] +pub struct FarmPluginExample {} + +impl FarmPluginExample { + // a Rust plugin must export a new method that accepts 2 arguments for initialization。 + fn new(config: &Config, options: String) -> Self { + Self {} + } +} +// Implement Plugin trait to define plugin hooks +impl Plugin for FarmPluginExample { + fn name(&self) -> &str { + "FarmPluginExample" + } + + // more hooks here +} +``` +Note for a Rust plugin struct: +- The struct must be `pub` and `#[farm_plugin]` attribute is required. +- The struct must implement `Plugin` trait, and the `name` method must be implemented. +- The struct must export a `new` method that accepts 2 arguments for initialization, the first argument is `&Config` and the second argument is `String`. The `new` method is called when the plugin is loaded, and the `Config` is the farm project config, and the `String` is the plugin options. + +We also provide a Rust plugin example repository: [farm-rust-plugin-example](https://github.com/farm-fe/rust-plugin-example). + +:::note +This document only covers how to create, develop and publish a rust plugin, for more detail about the plugin hooks, see [Plugin Hooks](/docs/api/rust-plugin-api). +::: + +## Conventions + +For farm specific Rust plugins: + +- The Farm plugin should have a name with a `farm-plugin-` prefix and clear semantics. +- Include the `farm-plugin-` keyword in package.json. + +If your plugin is only applicable to a specific framework, its name should follow the following prefix format: + +- `farm-plugin-vue-`: Prefix as a Vue plugin +- `farm-plugin-react-`: Prefix as a React plugin +- `farm-plugin-svelte-`: Prefix as a svelte plugin +- ... + +## Concepts +Before you start to write your rust plugin, you should know the following concepts: +* **module_type**: The type of the module, it can be `js`, `ts`, `css`, `sass`, `json`, etc. Farm supports `js/ts/jsx/tsx`, `css`, `html`, `json`, `static assets(png, svg, etc)` natively. `module_type` is returned by `load` hook. You can extend natively supported module type by Rust plugins the same as Farm internal plugins. +* **resolved_path and module_id**: `resolved_path` is the absolute path of the module, and `module_id` is the unique id of the module, it's usually `relative path of the module from the project root` + `query`. For example, we import a module as `import './a?query'`, the resolved_path is `/project/src/a.ts` and the module_id is `src/a.ts?query`. +* **context**: All the hooks in the plugin accept a `context` argument, it's the compilation context of the farm project, you can use it to get the ModuleGraph, Module, Resources, etc. +* **Resource and Resource Pot**: `Resource` is the final output bundle file, and `Resource Pot` is the abstract representation of the resource, similar to `Chunk` of other bundlers. Inside Farm, first we will generate `Resource Pots` from `ModuleGraph`, render `Resource Pots` and finally generate `Resources` from `Resource Pots`. + +### Module Type +In Farm, every thing is `First Class Citizens`, so Farm designs `module_type` to identify the type of a module and handle different kinds of ModuleTypes in different plugins. + +`module_type` returned by `load` hook, and can be transformed by `transform` hook. Farm supports `js/ts/jsx/tsx`, `css`, `html`, `json`, `static assets(png, svg, etc)` natively. For these module types, you can return them directly in `load` or `transform` hook directly. But if you want to handle custom module types, you may need to implement ohter hooks like `parse`, `render_resource_pot_modules`, `generate resources`, etc to control how to parse, render and generate resources for the custom module types. + + +## Create Plugin +Farm provides official templates to help your create your rust plugins quickly: +<> + + + pnpm create farm-plugin + + + npm create farm-plugin@latest + + + + yarn create farm-plugin + + + + +then follow the prompts to create your plugin. + +or you can create a plugin derectly by running the following command: + + + pnpm create farm-plugin my-farm-plugin --type rust + + + npm create my-farm-plugin --type rust + + + + yarn create my-farm-plugin --type rust + + +Above command will create new rust plugin with name `my-farm-plugin` in the current directory. `--type` can be `rust` or `js` + +## Plugin Project Structure +The plugin project structure is as follows: +```plaintext +my-farm-plugin +├── .github +│ └── workflows +| ├── release.yml +| ├── build.yml +│ └── ci.yml +├── Cargo.toml +|── .gitignore +├── npm +│ ├── darwin-x64 +│ ├── linux-x64-gnu +| ├── win32-x64-msvc +│ └── ... +├── package.json +├── src +│ └── lib.rs +└── rust-toolchain.toml +``` +Notable files and directories: +- `src/lib.rs`: The main file of the plugin, where you define your plugin. +- `Cargo.toml`: The manifest file for Rust. +- `package.json`: The manifest file for npm. +- `npm`: Where your platform specific binary packages placed. These packages should be published to npm registry before publish the plugin. +- `.github/workflows`: Used to cross build and publish your plugin in github actions. +- `rust-toolchain.toml`: The rust toolchain file, it should **not be modified manually**, it should always using **the same version as the farm core**. + +Farm provides a tool(`@farmfe/plugin-tools`) to help you build and publish your rust plugin, see `package.json`: +```json +{ + // ... + "scripts": { + // build your plugin for current platform + "build": "farm-plugin-tools build --platform --cargo-name my_farm_plugin -p my_farm_plugin --release", + // publish all platform packages under npm directory to npm registry + "prepublishOnly": "farm-plugin-tools prepublish" + }, + // ... +} +``` +More detail about building and publishing your plugin, see [buidling](#cross-build) and [publishing](#publish) sections. + +## Develop Plugin +To develop and test your plugin locally, you should build your plugin for your platform first, run: +```bash +pnpm build +``` +Then you can use the built plugin in your farm project by adding the plugin to the `plugins` field in `farm.config.ts`: +```javascript +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + plugins: [ + 'my-farm-plugin' + ] +}); +``` +and execute `pnpm i` in your farm project, and run `farm start` to start your farm project with your plugin. + +when you make changes to your plugin, you should rebuild your plugin and restart your farm project to see the changes. for example, add `load` hook to your plugin: +```rust {8-18} title="src/lib.rs" +// ... ignore other code + +impl Plugin for FarmPluginExample { + fn name(&self) -> &str { + "FarmPluginExample" + } + + fn load( + &self, + param: &farmfe_core::plugin::PluginLoadHookParam, + _context: &std::sync::Arc, + _hook_context: &farmfe_core::plugin::PluginHookContext, + ) -> farmfe_core::error::Result> { + println!( + "load path: {:?}, id: {:?}", + param.resolved_path, param.module_id + ); + Ok(None) + } +} +``` +Then rebuild your plugin with `pnpm build` and restart your farm project with `farm start`, you will see the `load` hook is called when compiling your farm project. + +:::note +For more detail about the plugin hooks, see [Plugin Hooks](/docs/api/rust-plugin-api). +::: + +### Handle ModuleType +`module_type` is returned by the `load` hook or `transform` hook. Your set any module type to the module in the `load` hook, and the module will be processed by the corresponding plugin that supports the module type. + +For native supported module types, you can just return the module type in the `load` hook: +```rust {8-18} title="src/lib.rs" +// ... ignore other code + +impl Plugin for FarmPluginExample { + fn name(&self) -> &str { + "FarmPluginExample" + } + + fn load( + &self, + param: &farmfe_core::plugin::PluginLoadHookParam, + _context: &std::sync::Arc, + _hook_context: &farmfe_core::plugin::PluginHookContext, + ) -> farmfe_core::error::Result> { + // handle virtual module + if param.module_id.starts_with("virtual:my-css:css") { + // return module type and content + Ok(Some(farmfe_core::plugin::PluginLoadHookResult { + module_type: "css".to_string(), + content: ".red { color: red; }".to_string(), + ..Default::default() + })) + } else { + Ok(None) + } + } +} +``` + +For non-native supported module types, you should use `transform` hook to transform the module type to a native supported module type, otherwise you need to implement `parse`, `renderResourcePot` hook to handle your custom module type: + +```rust {8-18} title="src/lib.rs" +// ... ignore other code + +impl Plugin for FarmPluginExample { + fn name(&self) -> &str { + "FarmPluginExample" + } + + fn transform( + &self, + param: &farmfe_core::plugin::PluginTransformHookParam, + _context: &std::sync::Arc, + _hook_context: &farmfe_core::plugin::PluginHookContext, + ) -> farmfe_core::error::Result> { + // module type guard is required + if matches!(param.module_type, ModuleType::Custom("sass")) { + // compile sass and transform the module type from sass to css + Ok(Some(farmfe_core::plugin::PluginTransformHookResult { + module_type: "css".to_string(), + content: compileSass(param.content), + ..Default::default() + })) + } else { + Ok(None) + } + } +} +``` + +:::note +Module type guard like `matches!(param.module_type, ModuleType::Custom("sass"))` is required in the `transform` hook, cause the `transform` hook will be called for all module types, and you should only handle your custom module type in the `transform` hook. So do the `parse` and other hooks. +::: + + +or implement `parse`, `render_resource_pot_modules` hook to handle your custom module type, see how native farm css plugin handle `css` module type in [farm-plugin-css](https://github.com/farm-fe/farm/blob/main/crates/plugin_html/src/lib.rs#L159). + + +### Handle Plugin Options +The rust plugin options can be configured in `farm.config.ts`: +```javascript +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + plugins: [ + ['my-farm-plugin', { + // plugin options + myOption: 'myOption' + }] + ] +}); +``` +The Option will be json serialized and passed to the `new` method of your plugin, you can handle the options in the `new` method: +```rust title="src/lib.rs" +// ... ignore other code + +// define your rust plugin options +#[derive(serde::Deserialize)] +pub struct Options { + pub my_option: Option, +} + +impl FarmPluginExample { + fn new(config: &Config, options: String) -> Self { + // deserialize the options + let my_option: Options = serde_json::from_str(&options).unwrap(); + // handle the options... + Self {} + } +} +``` + +Note that you should add dependencies `serde` and `serde_json` to your `Cargo.toml` to support options deserialization: + +```toml +[dependencies] +# ... ignore other code +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +``` + +:::note +Non json serializable options are not supported. Which means you can only use types like string, number, boolean, array, object, etc. `function options` are not supported. +::: + +### Using farm_core In Plugin +Farm exposes all core structures and utilities in [`farmfe_core`](https://docs.rs/farmfe_core) crate. Refer to the [farmfe_core](https://docs.rs/farmfe_core) documentation for more detail. + +:::note +If you want to use swc structures like `Module`, `Program`, etc. in your plugin, you should use `farmfe_core::swc_ast` that re-exposed by farm core. Cause the swc version used by farm core may be different from the swc version you used in your plugin, and the swc version used by farm core is guaranteed to be compatible with farm core. +::: + +### Caveats +#### Using SWC In Plugin +Note that your rust plugin should not use any SWC related packages like `swc_common`, `swc_transforms`, etc. Cause SWC stores the global state in the process, it may cause **dead lock** when you use SWC in your plugin. + +Farm recommended to write [SWC Plugin](/docs/using-plugins#using-swc-plugins) if you want to make changes to the AST of your farm project. For how to write SWC plugin, see [Write SWC Plugin](https://swc.rs/docs/plugin/ecmascript/getting-started). + +#### Choosing Rust toolchain +Cause Farm Rust Plugin is a dynamic linked library, you should always use the same version of the rust toolchain as the farm core. The rust toolchain is defined in `rust-toolchain.toml`, it should **not be modified manually**. +And should should always build your plugin from Rust, cause Farm Core does not support FFI and not promise ABI stability to provide best performance. + +### Plugin Compatibility +Farm core maintains a API version that exposes to the plugin. If you met a message like `Incompatible Rust Plugin: Current core's version...`, it means your plugin is not compatible with the current farm core version. You should update your plugin to the latest version to fix the issue. + +For plugin authors, you should rebuild and publish your plugin for the latest farm core version to make your plugin compatible with the latest farm core version. + +:::note +Farm promises API Compatibility for the same major version, for example, if your plugin is compatible with farm core 1.0.0, it should also be compatible with farm core 1.1.0, 1.2.0, etc. which means your plugin will always work for the same major version of farm. +::: + +## Cross Build +A Farm Rust Plugin is a **platform specific dynamic linked library**, you should build your plugin for all platforms you want to support. +Farm provided a example for how to build your plugin using github actions, see [.github/workflows/build.yml](https://github.com/farm-fe/rust-plugin-example/blob/main/.github/workflows/build.yaml) + +By default, A farm rust plugin should be built for the following platforms: +- `linux-x64-gnu ` +- `linux-x64-musl` +- `darwin-x64` +- `win32-x64-msvc` +- `linux-arm64-musl` +- `linux-arm64-gnu` +- `darwin-arm64` +- `win32-ia32-msvc` +- `win32-arm64-msvc` + +For a public plugin that published to npm registry, we recommend you to publish your plugin for all platforms above. For a private rust plugin, you can build your plugin for any platform you want to support. + +:::tip +Cause a rust plugin is a pure dynamic linked library, if you have questions about how to build your plugin for a specific platform, just google how to build a dynamic linked library for that platform in Rust. +::: + +## Publish + +Steps to publish your Rust plugin: +1. Cross build the Rust plugin to dynamic linked library, see [Cross Build](#cross-build) for detail. +2. Copy the binary artifacts to npm dir, for example: Copy to `npm/linux-x64-gnu/index.farm`. +3. Publish platform specific packages under npm dir, you can use `farm-plugin-tool prepublish` to publish packages under `npm` dir. +4. Publish the package itself + +see example [github actions publish workflow](https://github.com/farm-fe/rust-plugin-example/blob/main/.github/workflows/release.yml) + + +## Examples +We will use `@farmfe/plugin-sass` as demostration to a real Rust plugin example. This plugin will support compiling `.scss` and `.sass` file in your farm project. + +### Define Plugin +Exports a Rust struct named `FarmPluginSass`. + +```rust title="src/lib.rs" +use farmfe_macro_plugin::farm_plugin; + +// 1. define a struct with #[farm_plugin] attribute +#[farm_plugin] +pub struct FarmPluginSass { + sass_options: String, + regex: Regex, +} + +impl FarmPluginSass { + // 2. define a new method with 2 arguments + pub fn new(_config: &Config, options: String) -> Self { + Self { + sass_options: options, + regex: Regex::new(r#"\.(sass|scss)$"#).unwrap(), + } + } +} +``` + +- The struct must be `pub` and `#[farm_plugin]` attribute is required. +- The struct must export a `new` method that accepts 2 arguments for initialization, the first argument is `&Config` and the second argument is `String`. + +### Implement Plugin Trait +`Plugin` trait is used to define `hooks` that can hook into Farm compiler. + +```rust {21-30} +use farmfe_core::plugin::Plugin; +use farmfe_macro_plugin::farm_plugin; + +// 1. define a struct with #[farm_plugin] attribute +#[farm_plugin] +pub struct FarmPluginSass { + sass_options: String, + regex: Regex, +} + +impl FarmPluginSass { + // 2. define a new method with 2 arguments + pub fn new(_config: &Config, options: String) -> Self { + Self { + sass_options: options, + regex: Regex::new(r#"\.(sass|scss)$"#).unwrap(), + } + } +} +// Implement Plugin Trait +impl Plugin for FarmPluginSass { + fn name(&self) -> &str { + "FarmPluginSass" + } + + // this plugin should be executed before internal plugins + fn priority(&self) -> i32 { + 101 + } +} +``` + +### Load `.scss` File +Implement `load` hook to support load `.scss` files. + +```rust {14-32} +// ignore other code ... + +// Implement Plugin Trait +impl Plugin for FarmPluginSass { + fn name(&self) -> &str { + "FarmPluginSass" + } + + // this plugin should be executed before internal plugins + fn priority(&self) -> i32 { + 101 + } + + fn load( + &self, + param: &farmfe_core::plugin::PluginLoadHookParam, + _context: &std::sync::Arc, + _hook_context: &farmfe_core::plugin::PluginHookContext, + ) -> farmfe_core::error::Result> { + if param.query.is_empty() && self.regex.is_match(param.resolved_path) { + let content = fs::read_file_utf8(param.resolved_path); + + if let Ok(content) = content { + return Ok(Some(farmfe_core::plugin::PluginLoadHookResult { + content, + module_type: ModuleType::Custom(String::from("sass")), + })); + } + } + + Ok(None) + } +} +``` + +In the `load` hook, we only read the file that ends with `.scss` or `.sass`, return the file content and maked its module_type as `ModuleType::Custom(String::from("sass"))`. + +### Transform `sass` File +After we load the `.scss` file, we need to transform it to `css` in `transform` hook, then Farm will treat it as css in following process. + +```rust +// ignore other code ... +fn transform( + &self, + param: &farmfe_core::plugin::PluginTransformHookParam, + context: &std::sync::Arc, +) -> farmfe_core::error::Result> { + // module type guard is neccessary + if param.module_type == ModuleType::Custom(String::from("sass")) { + // ... ignore other code + + // parse options + const options = parse_options(&self.options, param.module_id); + // compile sass to css + let compile_result = compileSass(¶m.content, options); + + return Ok(Some(farmfe_core::plugin::PluginTransformHookResult { + content: compile_result.css, + source_map: compile_result.source_map, + // tell farm compiler that we have transformed this module to css + module_type: Some(farmfe_core::module::ModuleType::Css), + ignore_previous_source_map: false, + })); + } + + Ok(None) +} +``` + +:::tip +This example only covers how to implement a transformer plugin. For more abilities that Farm support, refer to [Plugin Hooks](/docs/api/rust-plugin-api). +::: \ No newline at end of file diff --git a/docs/docs/quick-start.mdx b/docs/docs/quick-start.mdx new file mode 100644 index 000000000..3150b6002 --- /dev/null +++ b/docs/docs/quick-start.mdx @@ -0,0 +1,117 @@ +--- +sidebar_position: 1 +--- + +import { PackageManagerTabs } from "@site/src/theme/PackageManagerTabs"; + +# Quick Start + + +:::warning Nightly Warning +If you are using version 2.0.0-nightly, please note the following: + +- The Farm team is working hard on version 2.0. We have refactored the entire Node backend and added many practical features. Please check our RoadMap for future updates. + +- This is a nightly build version that may contain new features and fixes that haven't been fully tested. As a result, unstable behavior or unexpected errors may occur. + +- Since this version is in the development phase, features and APIs may change in future versions. Please regularly check the changelog for the latest information. + +- We recommend against using this version in production environments unless you are prepared to handle potential issues. + +If you encounter any problems, please feel free to create an Issue to provide feedback to us. Your feedback is crucial for improving Farm's functionality and stability. +and we will continue to update the documentation in the coming days. Thank you for your understanding and support. +::: + + +:::warning +Farm needs **Node 16.18.0 and above**. +::: + +## Online experience + +[![Edit Farm](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/github/ErKeLost/react/main) + +## Create a Farm Project + + + +:::warning +If you are using the nightly version, you need to install all Farm dependencies as nightly versions. We have provided nightly versions for all core packages and plugins. e.g: + +::: + +:::note{title="Then follow the prompts!"} + +You can also directly specify the project name and the template you want to use via additional command line options: +::: + + + +| Template | Description | Optional Features | +|:-------:|:--------:|:-------:| +| vanilla | Vanilla JavaScript | TypeScript | +| react | react18 | TypeScript | +| vue3 | vue3 | TypeScript | +| vue2 | vue2 | TypeScript | +| svelte | svelte | TypeScript | +| solid | solid | TypeScript | +| preact | preact | TypeScript | +| lit | lit | TypeScript | +| nestjs | nestjs | TypeScript | +| tauri | tauri2 | TypeScript | +| electron | electron | TypeScript | + + + +## 2. Start the Project + +Choose the package manager you like, install dependencies, then start the project. +Then, start the project: + + + +> The project will start at `http://localhost:9000` by default. + +## 3. Configuring the Project + +The project is configured by `farm.config.ts/js/mjs` file in the root directory of the project. + +```ts title="farm.config.ts" +import { defineConfig } from "@farmfe/core"; +import react from '@farmfe/plugin-react'; + +export default defineConfig({ + // Additional plugins + plugins: [react()], +}); +``` + +:::note +See **[Configuring Farm](/docs/config/configuring-farm)** for details. +::: + +## 4. Building the project + +Build the Farm project as production-ready static files: + + + +The built product is downgraded to `ES2017` by default, and the product will be compressed and Tree Shake. If you want to preview the build product locally, you can execute `npm run preview` or `npx farm preview`. + +:::note +See **[Build For Production](/docs/tutorials/build)** for details. +::: + +## 4. Preview the build products + +Start preview server + + + +## Next Steps + +- [Why Farm?](/docs/why-farm) +- [Features](/docs/features/html) +- [Configuring Farm](/docs/config/configuring-farm) +- [Plugins](/docs/plugins/official-plugins/overview) +--- diff --git a/docs/docs/tutorials/0-overview.md b/docs/docs/tutorials/0-overview.md new file mode 100644 index 000000000..0b1ad4530 --- /dev/null +++ b/docs/docs/tutorials/0-overview.md @@ -0,0 +1,27 @@ +# Overview +In this tutorial, we will create a Farm react project from scratch, and introducing how to add useful component libraries and Farm plugins. + +:::note +Vue project is also fully supported by Farm. You can directly use `Vite`'s `@vitejs/plugin-vue` in Farm. Farm is compatible with most vite plugins and can use them out of box. +::: + +you will learn: +* How to build a production ready Farm React project from scratch. We will introduce how to add popular component library +* The basic concept of Farm, like `input`, `output`, `dev-server`, `HMR` and `plugins` +* Farm's daily configurations and commonly used plugins. + +We aim to make you familiar quickly with Farm concepts and ecosystem through this tutorial. And it can also be helpful if you want to migrate from other tools to Farm. + +:::note +This tutorial is `build a Farm react project from scratch`, If you are trying to init a new Farm Project rapidly, use our official template with command `pnpm create farm`. See **[Quick Start](/docs/quick-start)** +::: + +Following our tutorial, and open your super-fast Farm develop journey! + +* [1. Create A Farm React Project](/docs/tutorials/create) +* [2. Develop Project With Farm](/docs/tutorials/start) +* [3. Build For Production](/docs/tutorials/build) + +:::note +The source code of this tutorial is in [farm tutorials](https://github.com/farm-fe/tutorials) +::: diff --git a/docs/docs/tutorials/1-create.md b/docs/docs/tutorials/1-create.md new file mode 100644 index 000000000..25fcc070e --- /dev/null +++ b/docs/docs/tutorials/1-create.md @@ -0,0 +1,145 @@ +# Create A Project +In this chapter, we will create a new Farm React project **from scratch**, and launch it in development mode. + +:::note +In this tutorial, we use `pnpm` as default package manager. This chapter is `build a Farm react project from scratch`, If you are trying to init a new Farm Project rapidly, use our official template with command `pnpm create farm`. See **[Quick Start](/docs/quick-start)**. +::: + +## Create A Package +First we execute `pnpm init` to create a new package. + +```bash +mkdir farm-react && cd farm-react && pnpm init +``` + +A `package.json` file will be autogenerated. + +## Install Dependencies +Install necessary dependencies: + +react and react-dom: +```bash +pnpm add react react-dom && pnpm add react-refresh @types/react @types/react-dom -D +``` + +farm related dependencies: +```bash +pnpm add -D @farmfe/cli @farmfe/core @farmfe/plugin-react +``` +There are 3 packages that are necessary for a react project: +* **`@farmfe/cli`**: This package provides commands like `farm start`, `farm build`, `farm preview`, it must be used with `@farmfe/core` and can not be used separately. +* **`@farmfe/core`**: This package provides `Compilation` and `Dev Server` abilities, provides all necessary component for local development and product build. It exports `Compiler`, `DevServer` and `Watcher`, which is used for `compile the project`, `serve the project in development mode` and `watch the project for Hot Module Replacement`. +* **`@farmfe/plugin-react`**: This package provides abilities for React Jsx compilation, and react-refresh support. + +## Create Farm Config File +Create a `farm.config.ts` file under project root: +```text {2} +. +├── farm.config.ts +├── package.json +└── pnpm-lock.yaml +``` +and add following configuration: +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + input: { + index: './src/index.html' + }, + output: { + path: 'build', + publicPath: '/', + targetEnv: 'browser' + } + }, + plugins: [ + '@farmfe/plugin-react', + ] +}); +``` +For configuration file above, we use `input`, `output` and `plugins`, which is the most basic configuration in Farm. +* **`input`**: Configure the entry point. Farm will compile and build a module graph from the entries. +* **`output`**: Confiture the output dir, file name and so on. For full options, see [compilation.output](/docs/config/compilation-options#output). +* **`plugins`**: Configure farm plugins, all extended abilities like React, Vue SFC are supported by plugins. Here we use a Rust Plugin(`@farmfe/plugin-react`) to support compiling React jsx. + +Check [Configuring Farm](/docs/config/configuring-farm) for more options. + +:::note +In above example, we config input as `index: './src/index.html'`, if we do not configure `input`, it's default to `index: './index.html'`. And we can configure multiple entries in `input`, see [Multi Page App](/docs/features/html#multi-page-app) for details +::: + +## Create A Entry Html and Tsx File +Create 2 files `src/index.html` and `src/index.tsx` under project root: +```text {5-7} +. +├── farm.config.ts +├── package.json +├── pnpm-lock.yaml +└── src + ├── index.html + └── index.tsx +``` +Content of `src/index.html` is: +```html + + + + + + Document + + +
+ + + + +``` +:::note +Note that we must add at least one ` + + +``` + +and when loading dynamic scripts and css, the dynamic fetched resources url would also be: `https://cdn.com/` + +## Configuring Alias And Externals + +Alias and externals are also most useful configurations, we can use `compilation.resolve.alias` and `compilation.externals` in Farm: + +```ts title="farm.config.ts" +// ... + +export default defineConfig({ + compilation: { + resolve: { + alias: { + "@/": path.join(process.cwd(), "src"), + }, + }, + externals: ["node:fs"], + }, + // ... +}); +``` + +## Configuring DevServer + +You can find server configuration in [Farm Dev Server Options](/docs/config/dev-server). + +### Useful Configuration + +Example configuration: + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + // All dev server options are under server + server: { + open: true, + port: 9001, + hmr: { + // Configure the port for web socket listening + port: 9801 + // Configure the host for web socket listening + host: 'localhost', + // Files to ignore when configuring file monitoring + ignores: ['auto_generated/*'] + } + //... + } +}); +``` + +For above examples, we used following options: + +- **open**: open the browser with specified port automatically +- **port**: set the dev sever port to `9001` +- **hmr**: set the hmr port and watched files, we ignores file changes under `auto_generated` directory. + +### Setup Proxy + +Configure server proxy. farm uses `http-proxy` as a proxy for the development server. Based on [http-proxy](https://github.com/http-party/node-http-proxy?tab=readme-ov-file#options) implementation, specific options refer to its documentation, example: + +```ts +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + server: { + proxy: { + "/api": { + target: "https://music-erkelost.vercel.app/banner", + changeOrigin: true, + pathRewrite: (path: any) => path.replace(/^\/api/, ""), + }, + }, + }, +}); +``` + +## Configuring root and envDir + +Use `root` and `envDir` to specify your project root and the directory to load env variables. Add following options in `farm.config.ts`: + +```ts title="farm.config.ts" +import path from "node:path"; +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + root: path.join(process.cwd(), "client"), + envDir: "my-env-dir", +}); +``` + +:::note +For details about `envDir`, see [Environment Variables and Modes](/docs/features/env) +::: diff --git a/docs/docs/tutorials/3-build.md b/docs/docs/tutorials/3-build.md new file mode 100644 index 000000000..9eac7e4af --- /dev/null +++ b/docs/docs/tutorials/3-build.md @@ -0,0 +1,126 @@ +# Build For Production +By default, Farm has enabled support for the following features for production builds: +* **`Tree Shake`**: Crop and filter irrelevant modules and code +* **`Compression`**: Compress and mangle the output resources. +* **`Automatically inject Polyfill`**: Farm downgrades to modern browsers(ES7) by default, if you need legacy browsers support, configuring [`targetEnv`](/docs/config/compilation-options#output-targetenv) +* **`Automatic partial packaging`**: Based on dependencies and size, the project is partially bundled. For each resource request, about 25 resources are generated to ensure parallel loading performance and improve cache hits rate as much as possible. + +## Configuring Output Dir +Add build script in `package.json`: +```json title="package.json" {7-8} +{ + "name": "1-create-a-project", + "version": "1.0.0", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "start": "farm start", + "build": "farm build", + "preview": "farm preview" + }, + // ...ignore other fields +} +``` +Then execute `npm run build`, the built resources will be emitted to `build` dir: + +```text title="Project Build Resource Structure" +build +├─ favicon.ico +├─ index.html +├─ index_02bc.bd68e90b.js +├─ index_02bc.bd68e90b.js.map +├─ index_1c74.4b50f73e.js +├─ index_7734.440d56a3.js +├─ index_880b.4631ecee.js +├─ index_8d49.63f7b906.css +├─ index_8d49.63f7b906.css.map +├─ index_9025.84e1f8e6.js +├─ index_ca37.f2c276ef.js +├─ index_ef2f.e25349d8.js +├─ index_f346.369a7312.js +``` + +If you want to custom the path that the resources emitted to, you can use: +* [`output.filename`](/docs/config/compilation-options#outputfilename) +* [`output.assetsFilename`](/docs/config/compilation-options#outputassetsfilename) + +```ts title="farm.config.ts" +import defineConfig from '@farmfe/core'; + +export default defineConfig({ + compilation: { + output: { + path: 'build', + filename: 'assets/[name].[hash].[ext]', + assetsFilename: 'static/[resourceName].[ext]' + } + } +}) +``` + +For above example, all `js/css` will be emitted to `build/assets/`(example: `build/assets/index-ea54.abbe3e.js`). All static assets like image will be emitted to `build/static`(example: `build/static/background.png`) + +## Preview Built Resources +After the resources built, you can preview them by `npm run preview`: + +```sh +$ npm run preview + +> 3-build@1.0.0 preview +> farm preview + +[ Farm ] Using config file at /root/tutorials/3-build-for-production/farm.config.ts +[ Farm ] preview server running at: + +[ Farm ] > Local: http://localhost:1911/ +[ Farm ] > Network: http://198.18.0.1:1911/ +[ Farm ] > Network: http://10.242.197.146:1911/ +[ Farm ] > Network: http://192.168.1.31:1911/ +``` + +open `http://localhost:1911/` to preview your project. + +## Browser Compatibility +By default, Farm build projects to Modern Browsers that natively support `async/await`: + +* Chrome >= 62 +* Firefox >= 63 +* Safari >= 13.1 +* Edge >= 79 + +You can use [output.targetEnv](/docs/config/compilation-options#output-targetenv) to configuring your target browsers: + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + output: { + targetEnv: 'browser-legacy' + } + } +}) +``` +In above example, Farm will downgrade the syntax to `es5` and inject polyfill automatically. Then we have to install `core-js@3` to polyfill injection: + +```sh +pnpm add -D core-js@3 +``` + +:::note +* You need to install `core-js@3` manually if your target to legacy browsers. +* If you want to configure browsers targets more precisely, see [Syntax Downgrade And Polyfill](/docs/advanced/polyfill) +::: + +## Configure Tree Shake and Minify +Production optimization like `treeShake` and `minify` are **disabled** by default in `development` for performance reasons, and **enabled** by default in `production`. But if `treeShake` or `minify` are configured manually, the default value will be used regardless of `development` or `production`. + +For details about tree shake and minify, see: +* [Tree Shake](/docs/advanced/tree-shake) +* [Minification](/docs/advanced/minification) + +## Configure Partial Bundling +:::note +Refer to [Partial Bundling](/docs/advanced/partial-bundling) for details. +::: + +Farm enabled best practice of bundling already, make sure you really need to configure bundles manually. See [Partial Bundling](/docs/advanced/partial-bundling) for details. diff --git a/docs/docs/using-plugins.mdx b/docs/docs/using-plugins.mdx new file mode 100644 index 000000000..d940f2ae9 --- /dev/null +++ b/docs/docs/using-plugins.mdx @@ -0,0 +1,288 @@ +# Using Plugins +There are 4 kinds of plugins supported in Farm: +* **`Farm Compilation Plugins`**: Support both Rust Plugins and Js Plugins, which adopt a rollup-style hooks. +* **`Vite/Rollup/Unplugin Plugin`**: Vite/Rollup/Unplugin plugins are supported in Farm out of Box. +* **`Farm Runtime Plugin`**: Adding abilities for Farm's runtime system. +* **`Swc Plugins`**: Swc plugins are supported in Farm out of Box. + +Farm adopt Vite/Rollup ecosystem, Vite/Rollup Plugins can be used directly in Farm. + +:::tip +For how to write your own plugins, refer to [Writing Plugins](/docs/plugins/writing-plugins/overview) +::: + +## Farm Compilation Plugins +First, install the plugins your need, for example: +```bash +pnpm add -D @farmfe/plugin-sass @farmfe/js-plugin-postcss +``` + +Using `plugins` to configure Farm compilation plugins: +```ts title="farm.config.ts" +import farmPostcssPlugin from "@farmfe/js-plugin-postcss"; + +export default defineConfig({ + // ... + plugins: [ + // Rust plugin, configure its package name + "@farmfe/plugin-sass", + // Js plugin, configure the plugin object + farmPostcssPlugin() + ], +}); +``` + +There are 2 kinds of Farm compilation plugins: +* **`Rust Plugins`**: which is written in Rust and has best performance. +* **`Js Plugins`**: which is written in JS/TS, and it's used for compatibility with current JS ecosystem + +### Using Rust Plugins +Using `package name` to configure a Rust Plugin, for example: +```ts title="farm.config.ts" +export default defineConfig({ + // ... + plugins: [ + // Rust plugin, configure its package name + "@farmfe/plugin-sass", + ], +}); +``` +For above example, Farm will resolve package `@farmfe/plugin-sass` and treat it as a Farm Rust Plugin. + +If you want to configure options for rust plugins, you can use `array syntax` like `[packageName, optionsObject]`, for example: +```ts title="farm.config.ts" +export default defineConfig({ + // ... + plugins: [ + // using array syntax to configure a rust plugin + [ + // rust plugin's name + "@farmfe/plugin-sass", + // rust plugin's options + { + additionalData: '@use "@/global-variables.scss";' + } + ], + ], +}); +``` +Currently Farm supports 2 rust plugins officially: +* **`@farmfe/plugin-react`**: Farm rust plugin for react jsx compilation and react-refresh injection. +* **`@farmfe/plugin-sass`**: Farm rust plugin for scss files compilation, uses `sass-embedded` internally. + +:::tip +To learn more about rust plugins, see [Rust Plugins](/docs/plugins/official-plugins/overview#rust-plugins) +::: + +### Using Js Plugins +Farm JS plugin is a JS object with methods as hooks, for example: +```ts title="farm.config.ts" +import farmPostcssPlugin from "@farmfe/js-plugin-postcss"; + +export default defineConfig({ + plugins: [ + // Js plugin, configure the plugin object + farmPostcssPlugin({ + // ... configure postcss options + }) + ], +}); +``` +`farmPostcssPlugin()` returns a plugin object, and you can pass any postcss options by its arguments. + +You can use `priority` to control the order of your plugins, for example: +```ts title="farm.config.ts" {10,11} +import farmPostcssPlugin from "@farmfe/js-plugin-postcss"; + +export default defineConfig({ + plugins: [ + // Js plugin, configure the plugin object + { + ...farmPostcssPlugin({ + // ... configure postcss options + }), + // larger priority will be executed first, priority of internal plugin are 100. + priority: 1000, + } + ], +}); +``` +priority of internal plugin are 100, if you want the plugin execute first, set it larger than 100, otherwise set it smaller than 100. + +If you want to add a Farm JS plugin quickly, you can just configure a plugin object: +```ts title="farm.config.ts" +import readFileSync from 'fs'; + +export default defineConfig({ + plugins: [ + // configure a custom plugin + { + // plugin name, required + name: 'my-first-farm-plugin', + // this priority of this plugin, bigger value will be executed first, default to 100. + priority: 1000, + // define a load hook to determine how to load a more + load: { + // to improve performance, modules will be skipped if they don't match the filters. + filters: { + // only be executed for .png files. + resolvedPaths: ['\\.png$'] + }, + // executor callback for this hook + executor: (params, context) => { + const { resolvedPath } = params; + const content = readFileSync(resolvedPath, 'utf-8'); + + return { + content: `export default '${content}'`, + moduleType: 'js' + } + } + } + } + ], +}); +``` +:::note +`filters` is required in Farm for js plugins. Because Js Plugin is really slow and we should avoid executing it as much as possible. For those modules that don't match the filters, Farm won't trigger js plugin hook for them at all! Which means Farm can handle them only on Rust side safely and concurrently. +::: + +:::tip +To learn more about Farm Js Plugins, refer to [JS Plugin](/docs/plugins/official-plugins/overview#js-plugins) +::: + +## Using Vite/Rollup/Unplugin Plugins In Farm +Farm supports Vite plugins out of Box. First you need to install vite plugins,for example: +```bash +pnpm add @vitejs/plugin-vue @vitejs/plugin-vue-jsx vite -D +``` + +Then you can use vite plugins directly by `vitePlugins` in `farm.config.ts`. + +```ts title="farm.config.ts" +import vue from '@vitejs/plugin-vue', +import vueJsx from '@vitejs/plugin-vue-jsx'; + +export default defineConfig({ + // configuring vite plugins + vitePlugins: [ + vue(), + vueJsx() + ] +}); +``` +To improve performance of vite plugins, you can use `function syntax` that returns a `filters`, for example: + +```ts title="farm.config.ts" +import vue from '@vitejs/plugin-vue', + +// Using function syntax of Vite plugin +function configureVitePluginVue() { + // return plugin and its filters + return { + // using plugin vue + vitePlugin: vue(), + // configuring filters for it. Unmatched module paths will be skipped. + filters: ['\\.vue$', '\\\\0.+'] + }; +} + +export default defineConfig({ + // configuring vite plugins + vitePlugins: [ + configureVitePluginVue + ] +}); +``` + +Using unplugin: +```bash +pnpm add unplugin-auto-import unplugin-vue-components -D +``` +configuring unplugin in `vitePlugins` via `unplugin/vite` or `unplugin/rollup`: +```ts title="farm.config.ts" +import vue from '@vitejs/plugin-vue', +import AutoImport from 'unplugin-auto-import/vite' +import Components from 'unplugin-vue-components/vite' +import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' + +export default defineConfig({ + vitePlugins: [ + vue(), + // ... + AutoImport({ + resolvers: [ElementPlusResolver({ importStyle: 'sass' })], + }), + Components({ + resolvers: [ElementPlusResolver({ importStyle: 'sass' })], + }), + ] +}); +``` +:::note +Currently you can use `unplugin/vite` or `unplugin/rollup`. `unplugin/farm` will be available as soon as [this unplugin PR](https://github.com/unjs/unplugin/pull/341) merged. +::: + + +## Farm Runtime Plugin +Farm has a runtime module system to control how to load and execute modules. Configuring `compilation.runtime.plugins` to add more runtime plugin, for example: +```ts +export default defineConfig({ + compilation: { + // configure Farm runtime module system + runtime: { + plugins: [ + // a runtime plugin package + require.resolve('farm-plugin-runtime-mock'), + // a local runtime plugin + path.join(process.cwd(), "build/runtime-plugin.ts") + ] + } + } +}); +``` +you have to configure a path that point to your runtime plugin's entry. Recommend to a absolute path to avoid path issue. + +:::tip +To learn more about runtime plugin refer to [Runtime Plugin](/docs/plugins/writing-plugins/runtime-plugin) +::: + +## Using SWC Plugins +Swc Plugin can also be used directly in Farm, Configuring `compilation.script.plugins` to add SWC plugins, for example: +```ts +import jsPluginVue from '@farmfe/js-plugin-vue'; + +/** + * @type {import('@farmfe/core').UserConfig} + */ +export default { + compilation: { + script: { + plugins: [{ + // the package name of the swc plugin + name: 'swc-plugin-vue-jsx', + // options of this swc plugin + options: { + "transformOn": true, + "optimize": true + }, + // plugin execute when the filters are matched. + filters: { + // resolvedPaths: [".+"] + moduleTypes: ['tsx', 'jsx'], + } + }] + } + }, + plugins: [jsPluginVue()], +}; +``` + +Each plugin item of the array contains three fields: +* **name**: the package name of the swc plugin +* **options**: Configuration items passed to swc plugin +* **filters**: Which modules to execute the plug-in, must be configured, support `resolvedPaths` and `moduleTypes` these two filter items, if both are specified at the same time, take the union. + +:::note +`SWC plugin` may not be compatible with the `SWC version`(rust crate `swc_core v0.90`) that Farm uses. If a error occurred, try upgrade the plugin version. +::: diff --git a/docs/docs/why-farm.md b/docs/docs/why-farm.md new file mode 100644 index 000000000..d1b47a4d2 --- /dev/null +++ b/docs/docs/why-farm.md @@ -0,0 +1,35 @@ +--- +sidebar_position: 2 +--- + +# Why Farm? + +## What is Farm? +Farm is an extremely fast Rust-based web build tool, like `webpack` and `vite`, but **`much faster`**. Farm resolves, loads, and transforms all of your `assets(js/jsx/ts/tsx, css/sass/less, html, static assets, json, etc)`, and bundle them into a set of `deployable files`. Farm is an extremely fast build tool that helps you build faster `web/nodejs` apps. + +## Why Farm? + +As web projects scale, build performance has been their major bottleneck. For a huge project compiling with webpack may cost 10 or more minutes and an HMR update may cost 10s or more, heavily reducing development efficiency. + +Then, tools like Vite came out. It uses native ESM and is unbundled for source files in dev mode, pre-bundles dependencies using esbuild, which makes the dev server launch and the HMR very fast. + +But Unbundled is not perfect, there are still big problems when comes to a large project: +* **The huge number of module requests**: For a large project, there may be thousands of modules that need to be loaded. Using the native module system to load thousands of modules will make the browser get stuck or even cause it to crash. +* **Inconsistency between Dev and Production**: Native modules cannot be used in production for most situations, due to compatibility and request number issues. So Unbundled tools choose to bundle in production. This brings inconsistency, when there are production bugs caused by this inconsistency, it's really hard to debug and really painful. Vite uses esbuild in dev and using rollup in production, which makes the inconsistency worse. +* **Inflexible Chunk Splitting**: Configuration for Chunk Splitting is not flexible enough. +* Vite is so fast in dev because of esbuild, which is written in go. Go takes advantage of the native platform and is much faster than JS. + +So I think we just need a fast, powerful, consistent web bundler, which can solve the problems above and fast, then I designed and implemented Farm. + +And Farm is not just a normal bundler re-written in Rust, it has a lot of powerful and progressive designs: + +## Farm Design Philosophy + +* **Performance first**: Everything will be written in Rust for as long as we can; only several parts which are not the performance bottleneck will be written in JS. +* **Consistency first**: Make sure that development and production are exactly the same by default. What you see in development will be the same as what you get in production. +* **Partial Bundling**: The bundling goal of Farm is not to bundle everything together, but to limit the request numbers of resources. Farm will bundle your project into 20-30 small resources according to the dependency relation and resource size, to get the best resource loading performance without losing caching granularity. +* **First class citizen support of all web assets**: Farm won't need to transform everything to Javascript any more, it treats anything as first class citizen, assets like `html`, `js/jsx/ts/tsx`, `css/scss`, `png/svg/...` are all basic modules supported by Farm, more assets can be supported by plugins. +* **Compatibility**: Farm will work with both legacy (ES5) and modern browsers. +* **Rollup style plugin system and vite/rollup compatible js-plugins**: Easy to create your own plugins and easy to migrate your plugins/projects from rollup/vite. Support both Rust and JS plugins. + +Farm's goal is to be the real next generation build tool, inherit all advantages from existing tools, and to be fast, powerful, consistent, and provide the best development experience for web developers. diff --git a/docs/documate.json b/docs/documate.json new file mode 100644 index 000000000..344a02b22 --- /dev/null +++ b/docs/documate.json @@ -0,0 +1,5 @@ +{ + "root": "docs", + "include": ["**/*.md", "**/*.mdx"], + "backend": "https://8gw8jajsc1.us.aircode.run/upload" +} diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js new file mode 100644 index 000000000..d4901b500 --- /dev/null +++ b/docs/docusaurus.config.js @@ -0,0 +1,203 @@ +import { themes as prismThemes } from "prism-react-renderer"; +import remarkGfm from "remark-gfm"; + +/** @type {import('@docusaurus/types').Config} */ +const config = { + title: "Farm", + tagline: "Super fast web build tool written in Rust", + favicon: "img/favicon.ico", + + url: "https://farmfe.org", + // Set the // pathname under which your site is served + // For GitHub pages deployment, it is often '//' + baseUrl: "/", + // GitHub pages deployment config. + // If you aren't using GitHub pages, you don't need these. + organizationName: "farm-fe", // Usually your GitHub org/user name. + projectName: "farm-fe.github.io", // Usually your repo name. + deploymentBranch: "gh-pages", + onBrokenLinks: "ignore", + // onBrokenLinks: "throw", + onBrokenMarkdownLinks: "warn", + + i18n: { + defaultLocale: "en", + locales: ["en", "zh"], + localeConfigs: { + en: { + label: "English", + direction: "ltr", + }, + zh: { + label: `简体中文`, + direction: "ltr", + }, + }, + }, + + presets: [ + [ + "@docusaurus/preset-classic", + /** @type {import('@docusaurus/preset-classic').Options} */ + ({ + docs: { + sidebarPath: require.resolve("./sidebars.js"), + // Please change this to your repo. + // Remove this to remove the "edit this page" links. + // remarkPlugins: [remarkGfm], + editUrl: "https://github.com/farm-fe/farm-fe.github.io/tree/main/", + lastVersion: "current", + versions: { + current: { + label: "2.0.0-nightly Version", + }, + }, + }, + theme: { + customCss: require.resolve("./src/css/custom.scss"), + }, + }), + ], + ], + themeConfig: + /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ + ({ + // Replace with your project's social card + image: "img/farm-social-card.png", + navbar: { + title: "Farm", + logo: { + alt: "My Site Logo", + src: "img/logo.png", + }, + items: [ + { + type: "doc", + docId: "quick-start", + position: "left", + label: "Guides", + }, + { + type: "doc", + docId: "config/configuring-farm", + position: "left", + label: "Config", + }, + { + type: "doc", + docId: "api/rust-plugin-api", + position: "left", + label: "API", + }, + { + type: "doc", + docId: "plugins/official-plugins/overview", + position: "left", + label: "Plugins", + }, + { + position: "left", + label: "Community", + items: [ + { + label: "Team", + to: "/team", + }, + { + label: "Blog", + to: "/blog/index", + }, + { + label: "Awesome Farm", + href: "https://github.com/farm-fe/awesome-farm", + }, + { + label: "Discord", + href: "https://discord.com/invite/mDErq9aFnF", + }, + { + label: "Twitter", + href: "https://x.com/brightwwu46799", + }, + { + label: "WeChat Group", + href: "https://github.com/farm-fe/farm?tab=readme-ov-file#chat-with-us", + }, + ], + }, + { + to: "/roadmap", + position: "left", + label: "Roadmap", + }, + { + type: "docsVersionDropdown", + position: "right", + }, + { + type: "localeDropdown", + position: "right", + }, + + { + href: "https://github.com/farm-fe/farm", + position: "right", + className: "header-github-link", + "aria-label": "GitHub repository", + }, + ], + }, + docs: { + versionPersistence: "localStorage", + }, + prism: { + additionalLanguages: ["powershell"], + theme: prismThemes.nightOwlLight, + darkTheme: prismThemes.oneDark, + magicComments: [ + // Remember to extend the default highlight class name as well! + { + className: "theme-code-block-highlighted-line", + line: "highlight-next-line", + block: { start: "highlight-start", end: "highlight-end" }, + }, + { + className: "code-block-highlight-line", + line: "c-highlight-next-line", + block: { start: "c-highlight-start", end: "c-highlight-end" }, + }, + ], + }, + // announcementBar: { + // id: "announcementBar-2", // Increment on change + // content: `🎉 Farm is now in 1.0.0 stable and production ready. If you like Farm, give it a ⭐️ on GitHub`, + // }, + customFields: { + customFooter: "src/theme/Footer/index.tsx", + }, + algolia: { + appId: "G3J92PUFY2", + apiKey: "2b0f3f1f06f381249d44682a21206f4f", + indexName: "farm-feio", + }, + colorMode: { + defaultMode: "light", + }, + }), + plugins: [ + "docusaurus-plugin-sass", + async function TailwindCSSPlugin(context, options) { + return { + name: "docusaurus-tailwindcss", + configurePostCss(postcssOptions) { + // Appends TailwindCSS and AutoPrefixer. + postcssOptions.plugins.push(require("tailwindcss")); + postcssOptions.plugins.push(require("autoprefixer")); + return postcssOptions; + }, + }; + }, + ], +}; + +module.exports = config; diff --git a/docs/i18n/zh/code.json b/docs/i18n/zh/code.json new file mode 100644 index 000000000..0a9dd01c0 --- /dev/null +++ b/docs/i18n/zh/code.json @@ -0,0 +1,518 @@ +{ + "theme.ErrorPageContent.title": { + "message": "页面已崩溃。", + "description": "The title of the fallback page when the page crashed" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "重试", + "description": "The label of the button to try again rendering when the React error boundary captures an error" + }, + "theme.NotFound.title": { + "message": "找不到页面", + "description": "The title of the 404 page" + }, + "theme.NotFound.p1": { + "message": "我们找不到您要找的页面。", + "description": "The first paragraph of the 404 page" + }, + "theme.NotFound.p2": { + "message": "请联系原始链接来源网站的所有者,并告知他们链接已损坏。", + "description": "The 2nd paragraph of the 404 page" + }, + "theme.admonition.note": { + "message": "备注", + "description": "The default label used for the Note admonition (:::note)" + }, + "theme.admonition.tip": { + "message": "提示", + "description": "The default label used for the Tip admonition (:::tip)" + }, + "theme.admonition.danger": { + "message": "危险", + "description": "The default label used for the Danger admonition (:::danger)" + }, + "theme.admonition.info": { + "message": "信息", + "description": "The default label used for the Info admonition (:::info)" + }, + "theme.admonition.caution": { + "message": "警告", + "description": "The default label used for the Caution admonition (:::caution)" + }, + "theme.blog.archive.title": { + "message": "历史博文", + "description": "The page & hero title of the blog archive page" + }, + "theme.blog.archive.description": { + "message": "历史博文", + "description": "The page & hero description of the blog archive page" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "回到顶部", + "description": "The ARIA label for the back to top button" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "博文列表分页导航", + "description": "The ARIA label for the blog pagination" + }, + "theme.blog.paginator.newerEntries": { + "message": "较新的博文", + "description": "The label used to navigate to the newer blog posts page (previous page)" + }, + "theme.blog.paginator.olderEntries": { + "message": "较旧的博文", + "description": "The label used to navigate to the older blog posts page (next page)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "博文分页导航", + "description": "The ARIA label for the blog posts pagination" + }, + "theme.blog.post.paginator.newerPost": { + "message": "较新一篇", + "description": "The blog post button label to navigate to the newer/previous post" + }, + "theme.blog.post.paginator.olderPost": { + "message": "较旧一篇", + "description": "The blog post button label to navigate to the older/next post" + }, + "theme.blog.post.plurals": { + "message": "{count} 篇博文", + "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} 含有标签「{tagName}」", + "description": "The title of the page for a blog tag" + }, + "theme.tags.tagsPageLink": { + "message": "查看所有标签", + "description": "The label of the link targeting the tag list page" + }, + "theme.colorToggle.ariaLabel": { + "message": "切换浅色/暗黑模式(当前为{mode})", + "description": "The ARIA label for the navbar color mode toggle" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "暗黑模式", + "description": "The name for the dark color mode" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "浅色模式", + "description": "The name for the light color mode" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "页面路径", + "description": "The ARIA label for the breadcrumbs" + }, + "theme.docs.DocCard.categoryDescription": { + "message": "{count} 个项目", + "description": "The default description for a category card in the generated index about how many items this category includes" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "文档分页导航", + "description": "The ARIA label for the docs pagination" + }, + "theme.docs.paginator.previous": { + "message": "上一页", + "description": "The label used to navigate to the previous doc" + }, + "theme.docs.paginator.next": { + "message": "下一页", + "description": "The label used to navigate to the next doc" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "{count} 篇文档带有标签", + "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged}「{tagName}」", + "description": "The title of the page for a docs tag" + }, + "theme.docs.versionBadge.label": { + "message": "版本:{versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "此为 {siteTitle} {versionLabel} 版尚未发行的文档。", + "description": "The label used to tell the user that he's browsing an unreleased doc version" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "此为 {siteTitle} {versionLabel} 版的文档,现已不再积极维护。", + "description": "The label used to tell the user that he's browsing an unmaintained doc version" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "最新的文档请参阅 {latestVersionLink} ({versionLabel})。", + "description": "The label used to tell the user to check the latest version" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "最新版本", + "description": "The label used for the latest version suggestion link label" + }, + "theme.common.editThisPage": { + "message": "编辑此页", + "description": "The link label to edit the current page" + }, + "theme.common.headingLinkTitle": { + "message": "{heading}的直接链接", + "description": "Title for link to heading" + }, + "theme.lastUpdated.atDate": { + "message": "于 {date} ", + "description": "The words used to describe on which date a page has been last updated" + }, + "theme.lastUpdated.byUser": { + "message": "由 {user} ", + "description": "The words used to describe by who the page has been last updated" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "最后{byUser}{atDate}更新", + "description": "The sentence used to display when a page has been last updated, and by who" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "选择版本", + "description": "The label for the navbar versions dropdown on mobile view" + }, + "theme.tags.tagsListLabel": { + "message": "标签:", + "description": "The label alongside a tag list" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "关闭", + "description": "The ARIA label for close button of announcement bar" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "最近博文导航", + "description": "The ARIA label for recent posts in the blog sidebar" + }, + "theme.CodeBlock.copied": { + "message": "复制成功", + "description": "The copied button label on code blocks" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "复制代码到剪贴板", + "description": "The ARIA label for copy code blocks button" + }, + "theme.CodeBlock.copy": { + "message": "复制", + "description": "The copy button label on code blocks" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "切换自动换行", + "description": "The title attribute for toggle word wrapping button of code block lines" + }, + "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { + "message": "打开/收起侧边栏菜单「{label}」", + "description": "The ARIA label to toggle the collapsible sidebar category" + }, + "theme.NavBar.navAriaLabel": { + "message": "主导航", + "description": "The ARIA label for the main navigation" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "选择语言", + "description": "The label for the mobile language switcher dropdown" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "本页总览", + "description": "The label used by the button on the collapsible TOC component" + }, + "theme.blog.post.readMore": { + "message": "阅读更多", + "description": "The label used in blog post item excerpts to link to full blog posts" + }, + "theme.blog.post.readMoreLabel": { + "message": "阅读 {title} 的全文", + "description": "The ARIA label for the link to full blog posts from excerpts" + }, + "theme.blog.post.readingTime.plurals": { + "message": "阅读需 {readingTime} 分钟", + "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.breadcrumbs.home": { + "message": "主页面", + "description": "The ARIA label for the home page in the breadcrumbs" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "收起侧边栏", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "收起侧边栏", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "文档侧边栏", + "description": "The ARIA label for the sidebar navigation" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "关闭导航栏", + "description": "The ARIA label for close button of mobile sidebar" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← 回到主菜单", + "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "切换导航栏", + "description": "The ARIA label for hamburger menu button of mobile navigation" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "展开侧边栏", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "展开侧边栏", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "找到 {count} 份文件", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "「{query}」的搜索结果", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "在文档中搜索", + "description": "The search page title for empty query" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "在此输入搜索字词", + "description": "The placeholder for search page input" + }, + "theme.SearchPage.inputLabel": { + "message": "搜索", + "description": "The ARIA label for search page input" + }, + "theme.SearchPage.algoliaLabel": { + "message": "通过 Algolia 搜索", + "description": "The ARIA label for Algolia mention" + }, + "theme.SearchPage.noResultsText": { + "message": "未找到任何结果", + "description": "The paragraph for empty search result" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "正在获取新的搜索结果...", + "description": "The paragraph for fetching new search results" + }, + "theme.SearchBar.seeAll": { + "message": "查看全部 {count} 个结果" + }, + "theme.SearchBar.label": { + "message": "搜索", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "清除查询", + "description": "The label and ARIA label for search box reset button" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "取消", + "description": "The label and ARIA label for search box cancel button" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "最近搜索", + "description": "The title for recent searches" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "没有最近搜索", + "description": "The text when no recent searches" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "保存这个搜索", + "description": "The label for save recent search button" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "从历史记录中删除这个搜索", + "description": "The label for remove recent search button" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "收藏", + "description": "The title for favorite searches" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "从收藏列表中删除这个搜索", + "description": "The label for remove favorite search button" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "无法获取结果", + "description": "The title for error screen of search modal" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "你可能需要检查网络连接。", + "description": "The help text for error screen of search modal" + }, + "theme.SearchModal.footer.selectText": { + "message": "选中", + "description": "The explanatory text of the action for the enter key" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter 键", + "description": "The ARIA label for the Enter key button that makes the selection" + }, + "theme.SearchModal.footer.navigateText": { + "message": "导航", + "description": "The explanatory text of the action for the Arrow up and Arrow down key" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "向上键", + "description": "The ARIA label for the Arrow up key button that makes the navigation" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "向下键", + "description": "The ARIA label for the Arrow down key button that makes the navigation" + }, + "theme.SearchModal.footer.closeText": { + "message": "关闭", + "description": "The explanatory text of the action for Escape key" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Esc 键", + "description": "The ARIA label for the Escape key button that close the modal" + }, + "theme.SearchModal.footer.searchByText": { + "message": "搜索提供", + "description": "The text explain that the search is making by Algolia" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "没有结果:", + "description": "The text explains that there are no results for the following search" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "试试搜索", + "description": "The text for the suggested query when no results are found for the following search" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "认为这个查询应该有结果?", + "description": "The text for the question where the user thinks there are missing results" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "请告知我们。", + "description": "The text for the link to report missing results" + }, + "theme.SearchModal.placeholder": { + "message": "搜索文档", + "description": "The placeholder of the input of the DocSearch pop-up modal" + }, + "theme.common.skipToMainContent": { + "message": "跳到主要内容", + "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" + }, + "theme.tags.tagsPageTitle": { + "message": "标签", + "description": "The title of the tag list page" + }, + "Super Fast Web": { + "message": "Super Fast Web" + }, + "Build Tool": { + "message": "Build Tool" + }, + "Written In": { + "message": "Written In" + }, + "Quick Start": { + "message": "快速开始" + }, + "Why Farm?": { + "message": "为什么选择 Farm ?" + }, + "Super Fast": { + "message": "超级快" + }, + "Super Fast: Written in Rust, start a React / Vue project in milliseconds and perform an HMR update within 10ms for most situations.": { + "message": "超快: 用 Rust 编写, 在毫秒内启动 React / Vue 项目, 并在大多数情况下在10毫秒内执行热更新。" + }, + "Rich Features": { + "message": "丰富的特性" + }, + "Rich Features and Fully Pluggable": { + "message": "丰富的特性和完全可插拔" + }, + "Fully Pluggable": { + "message": "完全可插拔" + }, + "Partial Bundling": { + "message": "局部打包" + }, + "Consistency": { + "message": "一致性" + }, + "Extremely Fast": { + "message": "超级快" + }, + "Extremely": { + "message": "极速" + }, + " Fast ": { + "message": "的" + }, + " Build Tool .": { + "message": "构建工具" + }, + "Written in": { + "message": "使用 " + }, + " Rust": { + "message": "Rust 编写" + }, + "Incremental Building": { + "message": "增量构建" + }, + "Get to know our team": { + "message": "认识我们的团队" + }, + "is a Rust-Based Web Building Engine to Facilitate Your Web Program and JavaScript Library": { + "message": "是一个基于 Rust 实现的极速构建引擎,帮助您更快地构建 Web 程序 和 JavaScript 库。" + }, + "Written in Rust, start a React / Vue project in milliseconds and perform an HMR update within 10ms for most situations.": { + "message": "用Rust编写,可以在毫秒内启动React/Vue项目,并在大多数情况下在10毫秒内进行热模块替换(HMR)更新。" + }, + "What you see in development will be the same as what you get in production. Supports both legacy (ES5) and modern browsers.": { + "message": "一致性: 开发环境和生产环境的表现一致,所见即所得。支持传统(ES5)和现代浏览器。" + }, + "Incremental Building: Support persistent cache, module level cache enabled by default, any module won't be compiled twice until it's changed!": { + "message": "增量构建:默认启用, 支持持久缓存,模块级别缓存,任何模块在未发生变化之前不会被重新编译!" + }, + "Farm support compiling Html, Css, Css Modules, Js/Jsx/Ts/Tsx, Json, Static Assets out of box, support sass, less, postcss, vue, react, solid by official plugins, support lazy compiling, partial bundling and more": { + "message": "丰富的编译能力支持: 开箱即用, Farm 内置了 Js/Ts/Jsx/Tsx、Css/Css Modules/Sass/Less、HTML 和静态资源,可以通过官方插件支持 sass、less、postcss、react、vue、solid 等常用技术栈,支持懒编译、局部打包等海量特性。" + }, + "Fully Pluggable and Vite Compatible": { + "message": "完全可插拔 & 兼容 Vite 生态" + }, + "Consistency and Compatibility": { + "message": "一致性 & 兼容性" + }, + "Everything inside Farm is powered by plugins, Supports both Rust and JavaScript plugins. Support Vite plugins out of box.": { + "message": "Farm 由插件驱动, 通过创建插件来实现任何您想要的功能, 同时支持 Rust 和 JavaScript 两种插件模式, 开箱即用支持 Vite 插件。" + }, + "Farm supports compiling HTML, CSS, CSS Modules, Js/Jsx/Ts/Tsx, JSON, Static Assets out of the box, supports Sass, Less, PostCSS, Vue, React, Solid by way of official plugins, supports lazy compiling, partial bundling and more. Everything inside Farm is powered by plugins, Supports both Rust and JavaScript plugins. Support Vite plugins out of box.": { + "message": "丰富的编译能力支持: 开箱即用, Farm 内置了 Js/Ts/Jsx/Tsx、Css/Css Modules/Sass/Less、HTML 和静态资源,可以通过官方插件支持 sass、less、postcss、react、vue、solid 等常用技术栈,支持懒编译、局部打包等海量特性。并且 Farm 由插件驱动, 通过创建插件来实现任何您想要的功能, 同时支持 Rust 和 JavaScript 两种插件模式, 开箱即用支持 Vite 插件。" + }, + "Partial Bundling: Bundle your project into a few reasonable bundles, speeding up resource loading without losing caching granularity.": { + "message": "自动根据依赖关系、资源大小,将项目打包成若干个资源,提升资源加载性能的同时,保证缓存命中率。" + }, + "Contributors": { + "message": "感谢贡献者" + }, + "ColdStart": { + "message": "冷启动" + }, + "HotStart": { + "message": "热启动" + }, + "HmrRoot": { + "message": "热更新 (根模块)" + }, + "HmrLeaf": { + "message": "热更新 (子模块)" + }, + "ColdBuild": { + "message": "冷构建" + }, + "HotBuild": { + "message": "热构建" + }, + "See benchmark details": { + "message": "查看 benchmark 详情" + } +} diff --git a/docs/i18n/zh/docusaurus-plugin-content-blog/options.json b/docs/i18n/zh/docusaurus-plugin-content-blog/options.json new file mode 100644 index 000000000..9239ff706 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-blog/options.json @@ -0,0 +1,14 @@ +{ + "title": { + "message": "Blog", + "description": "The title for the blog used in SEO" + }, + "description": { + "message": "Blog", + "description": "The description for the blog used in SEO" + }, + "sidebar.title": { + "message": "Recent posts", + "description": "The label for the left sidebar" + } +} diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current.json b/docs/i18n/zh/docusaurus-plugin-content-docs/current.json new file mode 100644 index 000000000..a07aaf700 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,50 @@ +{ + "version.label": { + "message": "1.0.0", + "description": "当前文档版本" + }, + "sidebar.tutorialSidebar.category.Features": { + "message": "编译能力", + "description": "Farm 的各项编译能力文档" + }, + "sidebar.tutorialSidebar.category.Benchmarks": { + "message": "基准测试", + "description": "Farm 的各项编译能力以及其他框架基准测试的对比" + }, + "sidebar.tutorialSidebar.category.Getting Started": { + "message": "快速开始", + "description": "Farm 的快速开始以及介绍" + }, + "sidebar.tutorialSidebar.category.Tutorial": { + "message": "教程", + "description": "Farm 的教程文档" + }, + "sidebar.tutorialSidebar.category.Advanced": { + "message": "高级用法", + "description": "Farm 的进阶用法介绍" + }, + "sidebar.tutorialSidebar.category.Frameworks": { + "message": "框架模版", + "description": "Farm 的框架支持模版" + }, + "sidebar.tutorialSidebar.category.Migration": { + "message": "迁移指南", + "description": "从其他构建工具迁移到Farm 的指南" + }, + "sidebar.pluginSidebar.category.Writing Plugins": { + "message": "编写插件", + "description": "编写 Farm 插件" + }, + "sidebar.pluginSidebar.category.Official Plugins": { + "message": "官方插件", + "description": "Farm 官方插件介绍" + }, + "sidebar.pluginSidebar.category.Rust Plugins": { + "message": "Rust 插件", + "description": "Farm Rust 官方插件介绍" + }, + "sidebar.pluginSidebar.category.Js Plugins": { + "message": "Js 插件", + "description": "Farm Js 官方插件介绍" + } +} \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/minification.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/minification.md new file mode 100644 index 000000000..1f48f6caf --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/minification.md @@ -0,0 +1,22 @@ +# 产物压缩 + +Farm 支持开箱即用的生产压缩,默认情况下在生产中自动启用,可以通过[compilation.minify](/zh/docs/config/compilation-options#minify) 选项启用或禁用。 + +```ts title="farm.config.ts" +export default { + compilation: { + // enable minification for both development and production + minify: true, + }, +}; +``` + +如果启用压缩: + +- 对于 js/ts 模块,代码将被`compressed`和 `mangled`,所有空白字符将被删除. +- 对于css和html模块,所有空格都将被删除 + +:::note + +Farm 使用 swc minifier,有关详细选项,请参阅[compilation.minify](/zh/docs/config/compilation-options#minify) +::: diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/partial-bundling.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/partial-bundling.md new file mode 100644 index 000000000..2aa3fdedc --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/partial-bundling.md @@ -0,0 +1,278 @@ +# 局部打包 +局部打包(`Partial Bundling`)是 Farm 用来打包模块的策略,类似于其他打包工具,但 Farm 的 `局部打包` 目标不同。 + +与其它打包工具不同,Farm不会尝试将所有内容打包在一起,而是使用像 `splitChunks` 之类的优化策略将其拆分出来,相反,Farm会将项目直接捆打包成多个输出文件。例如,如果需要数百个模块来启动一个html页面,Farm将尝试将它们直接打包成20到30个输出文件。Farm将这种行为称为`局部打包`。 + +Farm局部打包的目标是: +1. **减少请求数量和请求层次**: 将数百上千个模块请求减少到20-30个请求,避免由于依赖层次结构而逐个加载模块,从而加快资源的加载。 +2. **提高缓存命中率**: 当模块发生更改时,确保只有少数输出文件受到影响,因此可以为项目提高缓存命中率。 + +对于传统打包工具,我们可能很难通过复杂的 `splitChunks` 或 `manualChunks` 配置来实现上述目标,但是 Farm 原生支持`局部打包`。 + +请注意,默认的打包策略是为浏览器设计的,但它也适用于 Node.js。 如果想要更改 Node.js 的打包策略,请尝试[配置局部打包](#configuring-partial-bundling)。 + +:::tip +请参考 [RFC-003 Partial Bundling](https://github.com/farm-fe/rfcs/blob/main/rfcs/003-partial-bundling/rfc.md) 局部打包以获取更多技术细节。 +::: + +## 动机 +目前,Web构建工具处理模块的主要方法有两种:完全打包或原生ESM。但它们都有缺点: +* 对于完全打包,打包工具旨在将所有内容打包在一起,然后拆分出来进行优化,但拆分通常难以配置,手动平衡资源加载性能和缓存命中率很难。 +* 对于原生ESM,每个模块都可以单独编译和缓存,但当有数百个模块请求时,会严重影响加载性能。 + +因此,我一直在思考是否有一种策略可以避免这两种极端情况 - 也许我们可以进行局部打包?我们可以直接将项目打包成几个有限、大小平衡的资源,并且自动进行。我将这种思考命名为`模块合并` ( `Module Merging` )- 在全量打包和非打包之间找到平衡,只打包几个相关的模块以提高加载性能,同时不失去缓存颗粒度。 + +> 后来,我将`模块合并`更名为`局部打包`,因为我认为`局部打包`更能准确地表达我的想法。 + +## 局部打包规则 +> 在这一节中,我们将通过示例介绍`局部打包`的基本规则。 + +首先,我们来看一个基本的React项目示例。对于一个基本的React项目,我们只在入口文件中导入react和react-dom: + +```tsx title="index.tsx" +import React from 'react'; +import { createRoot } from 'react-dom/client'; +import './index.scss'; + +const container = document.querySelector('#root'); +const root = createRoot(container); + +root.render( + <> +
Index page
+ +); +``` + +打包结果将如下所示: + +```text +./dist/ +├── index_9c07.49b83356.js # contains react-dom +├── index_a35f.0ac21082.js # contains ./index.tsx +├── index_b7e0.7ab9ca2d.js # contains react and its dependencies +├── index_ce26.7f833381.css $ contains ./index.scss +└── index.html # contains ./index.html +``` + +默认情况下,Farm会将你的项目打包成5个文件: + +* 2个js文件来自 `node_modules` ,包含 `react` 、 `react-dom` 其依赖项。 +* 1个js文件来自 `./index.tsx` +* 1个css文件来自 `./index.scss`; +* 1个html文件来自 `./index.html`; + +Farm使用以下规则来获得上述结果: + +1. **可变和不可变模块应始终位于不同的输出文件中**: 默认情况下,Farm 将 `node_modules` 下的所有模块视为不可变的,否则它们是可变的。因此 `./index.tsx` 位于单独的文件中,因为它是一个可变模块,因此它永远不会与 `react` 和 `react-dom` 位于同一输出文件中。 +2. **不同类型的模块应始终位于不同的输出文件中**: 因此 `./index.scss` 位于单独的文件中。 +3. **同一包中的模块应位于同一输出文件中**: 因此,所有 `react` 模块始终位于同一输出文件中, `react-dom` 也是如此。 +4. **资源加载的目标并发请求应默认在20-30之间**: 因此有3个js输出文件,而不是1个js输出文件。 +5. **输出文件应具有相似的大小,最小资源大小应默认大于20KB**: 因为 `react-dom` 是最大的,超过100KB,所以它位于单独的文件中,而 `react` 及其依赖项小于20KB,因此被合并到同一输出文件中。 + +现在我们已经熟悉了`局部打包`的基本规则,如果遇到局部打包问题,请使用上述规则调试您的项目。接下来,我们将介绍如何配置局部打包。 + +## 配置局部打包 +### 两种配置方法 + +有两种不同的方式来控制打包: +* **`groups`**: 告诉Farm您希望将这些模块尽可能地打包在一起,但由于Farm的优化策略,这并不是强制执行的。请参阅[模块分组](#模块分组)以了解此方法。 +* **`enforceResources`**: 告诉Farm您希望这些模块始终打包在一起,忽略所有其他优化策略约束。请参阅使用 [`enforceResources`](#使用-enforceresources) 以了解此方法。 + +### 局部打包选项 + +`局部打包`支持许多选项,使用户可以自定义其行为。所有选项如下: + +1. **`targetConcurrentRequests`**: Farm尝试为初始资源加载或动态资源加载生成尽可能接近此配置值的资源数量。 +2. **`targetMinSize`**: 生成资源的最小大小,在压缩和gzip之前。请注意,如果 `ModuleBucket的大小` 小于 `targetMinSize`, `ModuleBucket` 将优先考虑,这时候大小限制不一定会被强制保证。可以使用配置 `enforceTargetMinSize` 来强制保证大小,但是这样可能会导致一些共享模块的优化策略失效。 +3. **`targetMaxSize`**: 类似 `targetMinSize`,生成资源的最大大小,在压缩和gzip之前。 +4. **`groups`**: 一组应该放在一起的模块。请注意,此组配置只是告诉编译器这些模块应该放在一起,它可能会产生多个资源,如果您想强制将模块放在同一资源中,应该使用 `enforceResources`。 + * **name**: 这组资源的名称. + * **test**: 匹配属于该组的模块的正则表达式数组。 + * **groupType**: `mutable` 或 `immutable` ,此组仅用于指定模块的类型。 + * **resourceType**: `all`、 `initial` 或 `async`,此组仅用于指定资源的类型。 +5. **`enforceResources`**: 匹配应该始终位于同一输出资源中的模块的数组,忽略所有其他约束。 + * **name**: 资源的名称. + * **test**: 匹配属于该资源的模块的正则表达式数组。 +6. **`enforceTargetConcurrentRequests`**: 强制目标并发请求对于每个资源加载,当为true时,较小的资源将被合并到较大的资源中以满足目标并发请求。这可能会导致css资源出现问题,请谨慎使用此选项。 +7. **`enforceTargetMinSize`**: 强制设置对于每个资源的目标最小大小,当为true时,较小的资源将被合并到较大的资源中以满足目标并发请求。这可能会导致css资源出现问题,请谨慎使用此选项。 +8. **`immutableModules`**: 匹配不可变模块的正则表达式数组。 +9. **`immutableModulesWeight`**: 默认为0.8,不可变模块将具有80%的请求数量。例如,如果 `targetConcurrentRequest` 为25,则不可变资源将默认为 `25 * 80% = 20` 。此选项是为了确保可变和不可变模块是隔离的,如果您更改了业务代码,node_modules下的代码将不会受到影响。 + +:::note +通常,您可以使用 `targetConcurrentRequests` 、 `targetMinSize` 和 `targetMaxSize` 来控制局部打包的默认行为。Farm设置的默认值基于最佳实践,因此请确认是否必须修改默认值。 +::: + +### 模块分组 +您可以使用 `groups` 将模块分组在一起。对于上述基本React项目示例,可以使用以下配置将 `node_modules` 下的模块打包在一起: +```ts title="farm.config.ts" {4-9} +export default defineConfig({ + compilation: { + partialBundling: { + groups: [ + { + name: 'vendor-react', + test: ['node_modules/'], + } + ] + }, + }, +}); +``` +我们添加了一个 `group item` ,其中包含 `name` 和 `test` ,以将 `react` 和 `react-dom` 分组在一起。打包结果如下: +``` +./dist/ +├── index_499e.72cf733c.js # contains `react`, `react-dom` and all other files under node_modules +├── index_a35f.0ac21082.js # contains `./index.tsx` +├── index_ce26.7f833381.css # contains `./index.scss` +└── index.html # contains `./index.html` +``` + +现在, `node_modules` 下的所有模块都打包到 `index_499e.72cf733c.js` 中。请注意,groups并不强制所有匹配该组的模块都打包在一起,一个 `group`可以产生多个 `output file` ,因为: +1. 可变和不可变模块始终位于不同的输出文件中。当可变和不可变模块都匹配到这个 `group` 时,它们将位于不同的输出中。 +2. 对于多页面应用或动态导入的入口,可能存在共享模块,这些模块应始终位于不同的输出文件中。 + +如果您需要强制将模块放在同一输出文件中,可以使用 `enforceResources` + +### 使用 `enforceResources` +要将所有模块分组在一起并忽略所有其他条件,可以使用 `enforceResources` ,例如: +```ts title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + partialBundling: { + // c-highlight-start + enforceResources: [ + { + name: 'index', + test: ['.+'], + } + ] + // c-highlight-end + }, + }, +}); +``` + +打包结果: + +``` +./dist/ +├── index.7f833381.css # all css modules are bundled together +├── index.ba5550d9.js # all script modules are bundled together +└── index.html +``` + +:::warning +`enforceResources` 将忽略Farm的所有内部优化,使用时请小心。 +::: + +### 配置 `immutable modules` + +使用 `immutableModules` 配置不可变模块,默认情况下,Farm将其设置为 `node_modules/` 。 + +```ts title="farm.config.ts" +export default defineConfig({ + compilation: { + partialBundling: { + immutableModules: ['node_modules/', '/global-constants'] + }, + }, +}); +``` + +不可变模块会影响打包和传入的持久化缓存,如果您想修改它,请小心。 + +## 示例 +:::note +通常您不需要手动配置打包,如果您想手动配置打包,请确保您确实需要它。这些示例仅用于帮助您轻松学习如何配置打包策略。 +::: + +### 将同一目录下的文件分组 + +将 `src/components` 下的 `modules` 分组,并**尽可能**将它们输出到同一资源中。 + +```ts title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + partialBundling: { + // c-highlight-start + groups: [ + { + name: 'components', + test: ['./src/components'], + } + ] + // c-highlight-end + }, + }, +}); +``` + +### 配置打包的数量和大小 +```ts title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + partialBundling: { + // c-highlight-start + targetConcurrentRequests: 15, + targetMinSize: 200 * 1024 // 200 KB + // c-highlight-end + }, + }, +}); +``` + +在上面的示例中,Farm将尝试**尽可能**地将您的项目打包到 `15` 个文件中,每个文件的最小大小**尽可能**大于 `200KB` 。 + +### 将所有模块打包在一起 +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + partialBundling: { + // c-highlight-start + enforceResources: [ + { + name: 'index', + test: ['.+'], + } + ] + // c-highlight-end + }, + }, +}); +``` + +在上面的示例中,我们强制将所有模块打包在一起,并忽略所有其他约束(例如,请求数量、文件大小)。您也可以使用 `enforceResources` 强制将某些模块打包在一起: + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + partialBundling: { + // c-highlight-start + enforceResources: [ + { + name: 'index', + test: ['\\./src/components/.+'], + } + ] + // c-highlight-end + }, + }, +}); +``` + +我们强制将 `src/components` 目录下的所有模块打包在一起。 + +:::note +`enforceResources` 会破坏打包的内部优化,使用时请小心。 +::: diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/persistent-cache.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/persistent-cache.md new file mode 100644 index 000000000..707724f9a --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/persistent-cache.md @@ -0,0 +1,114 @@ +# 增量构建 + +:::tip +Farm 从`v0.14.0`开始支持通过持久缓存的增量构建 +::: + +从`v0.14.0`开始,Farm 支持将编译结果缓存到磁盘,这可以大大加快热启动/热构建的编译速度。当启用`persistentCache`时,编译时间可以减少**高达`80%`**。 + +冷启动(无缓存)和热启动(有缓存)的性能比较使用 [examples/argo-pro](https://github.com/farm-fe/farm/tree/main/examples/arco-pro): + +| | Cold(without cache) | Hot(with cache) | diff | +| ----- | ------------------- | --------------- | ----------- | +| start | 1519ms | 371ms | reduced 75% | +| build | 3582ms | 562ms | reduced 84% | + +## 使用缓存 + +使用[`compilation.persistentCache`](/zh/docs/config/compilation-options#persistentcache) 来`启用/禁用`缓存: + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + persistentCache: true, + }, +}); +``` + +:::note +`persistentCache: true` 相当于: + +```js +({ + persistentCache: { + // Directory that cache is stored + cacheDir: 'node_modules/.farm/cache', + // namespace of the cache + namespace: 'farm-cache', + buildDependencies: [ + 'farm.config.ts', + '@farmfe/core', + '@farmfe/plugin-react', + // ... all other dependencies + ], + moduleCacheKeyStrategy: { + timestamp: true, + hash: true, + }, + }, +}); +``` + +::: +将`persistentCache`为`false`以禁用缓存 + +## 缓存验证 + +缓存在尝试重用时会通过以下条件进行验证,如果以下任何条件发生变化,所有缓存都将失效 + +- **Env Object**:由`persistentCache.envs`配置,默认为`Farm Env Mode`(`process.env.NODE_ENV`, `process.env.DEV`, `process.env.PROD`),参见 **[`环境变量和模式`](/zh/docs/features/env)**。 + +- **lockfile**:如果你的 lockfile (例如 pnpm-lock.yaml) 改变了,意味着有依赖项改变,缓存将失效。 + +- **构建依赖项**:由`persistentCache.buildDependencies`配置,如果任何 buildDependency 更改,所有缓存将失效。 + +- **Cache 命名空间**:由`persistentCache.namespace`配置,不同命名空间下的缓存不会重复使用。如果要使所有缓存失效,可以配置不同的命名空间。 + +- **内部缓存版本**:Farm 内部维护一个缓存版本,如果 Farm 本身发生了变化,例如,影响 Farm 版本之间输出的渲染优化,Farm 将碰撞缓存版本,所有缓存将失效。 + +如果您的缓存不起作用,请查看上述条件以找出原因。如果缓存损坏,您还可以删除 `node_modules/.farm/cache` 以手动删除缓存。 + +## 构建依赖项 + +构建依赖是可以影响编译过程或编译输出的依赖,例如插件或 config 文件。如果这些依赖中的任何一个发生了变化,所有缓存都将失效 + +构建依赖项可以是包名的文件路径,例如: + +```ts +import { defineConfig } from '@farmfe/core'; +import path from 'node:path'; + +export default defineConfig({ + persistentCache: { + buildDependencies: [ + // a file path + path.resolve(process.cwd(), './plugins/my-plugin.js'), + // a package name, note that this package must expose package.json + 'farm-plugin-custom-xxx', + ], + }, +}); +``` + +:::note +默认情况下,所有配置文件及其依赖项都包含在内。但是,如果您想添加一些额外的文件或依赖项来使缓存失效,您可以使用`buildDependencies`一旦这些文件更改,所有缓存都将失效 +::: + +## 模块缓存密钥策略 + +Farm 提供了 2 种策略来控制如何生成模块缓存键: + +- `timestamp`: 检查模块的时间戳,如果更新时间戳没有变化,则跳过此模块的构建,具有最佳性能. +- `hash`: 加载和转换后检查 content hash,如果内容没有变化,将跳过此模块的剩余构建. + +默认情况下,`timestamp`和`hash`都是启用的 + +## 插件注意事项 + +当启用`timestamp`时,不会调用所有构建阶段钩子,如`load`和`transform`。因此,如果插件依赖于`load`和`transform`,并且没有实现 `plugin_cache_loaded` 和 `write_plugin_cache` 钩子,它可能无法按预期工作。例如,如果插件在`load`和`transform`中收集信息,所有在`finish` hook 时发出它们,它应该实现 `plugin_cache_loaded` 和 `write_plugin_cache` hook 来加载和写入缓存,否则它将无法按预期工作。 + +Farm 将设置`timestamp`为`false` 当 `output.targetEnv`是 `node` + + diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/polyfill.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/polyfill.md new file mode 100644 index 000000000..9133f8fd5 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/polyfill.md @@ -0,0 +1,79 @@ +# 语法降级和 Polyfill + +默认情况下,Farm 将降级到 ES2017(原生支持 async/await),并在生产模式下自动注入必要的`polyfills` + +:::note +默认情况下,Farm 不会为 `node_modules/` 下的模块进行转换和注入 polyfills ,如果您需要降级语法并为 `node_modules/` 注入 polyfills ,您可以使用 `compilation.presetEnv.include` +::: + +## 配置 `targetEnv` + +Farm 提供一个规范化的[`output.targetEnv`](/zh/docs/config/compilation-options#output-targetenv)选项来配置你的应用程序的目标执行环境。Farm 会自动为你的目标环境执行正确的`syntax downgrade`和`polyfill injection`。例如: + +```ts title="farm.config.ts" +export default { + compilation: { + output: { + targetEnv: 'browser-legacy', + }, + }, +}; +``` + +Farm 会将您的应用程序编译为旧版浏览器(ES5) + +- 将所有的 `Js/Jsx/Ts/Tsx`模块编译到 ES5,并注入所有的 polyfills(Promise,regenerator-runtime 等) +- 为所有 `css/scss/less` 模块添加前缀,例如`--webkit-` + +Farm 支持许多规范化的`targetEnv`选项,如`browser-modern`,`browser-es2017`,`browser-es2015`,`node16`,`node-legacy`等。**默认情况下,`targetEnv`是`browser-es2017`**。请参阅[`output.targetEnv`](/zh/docs/config/compilation-options#output-targetenv) + +:::note +您可能需要手动安装 `core-js@3`或`regeneration-runtime`,如果需要 polyfill 。尝试运行`pnpm add core-js` 如果你遇到了一些错误例如:`can not resolve 'core-js/modules/xxx'` +::: + +## 分别配置语法和 Polyfill + +在内部,`targetEnv`只是 `presetEnv`、`script.target` 和 `css.prefixer`的预设。如果需要,您可以更精确地配置它们 + +### 配置 `presetEnv` + +您可以使用 `compilation.presetEnv` 自定义语法降级和 polyfill injection。默认情况下,`node_modules`下的所有模块都将被忽略。使用`include`添加需要被 polyfill 的额外模块。 + +```ts title="farm.config.ts" +export default { + compilation: { + presetEnv: { + // include a package under node_modules + include: ['node_modules/package-name'], + options: { + targets: 'Chrome >= 48', + }, + }, + }, +}; +``` + +请注意,如果您的项目不需要浏览器兼容性,您可以为 `targets` 设置一个较宽松的值,那么注入的 polyfills 会更少,产物体积也会更小 + +有关更多选项,请参阅[compilation.presetEnv](/docs/config/compilation-options#presetenv) + +### 配置 `script.target` + +`script.target` 用于在生成代码时控制目标环境。如果要将项目降级为 `ES5`,则应同时设置: + +```ts title="farm.config.ts" +export default { + compilation: { + script: { + target: 'ES5', + }, + presetEnv: { + // include a package under node_modules + include: ['node_modules/package-name'], + options: { + targets: '> 0.25%, not dead', + }, + }, + }, +}; +``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/ssr.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/ssr.md new file mode 100644 index 000000000..99c790374 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/ssr.md @@ -0,0 +1,282 @@ +# 服务端渲染 (SSR) +Server-Side Rendering(SSR)意味着在Node.js(服务器端)中将前端框架(例如React、Vue、Solid等)渲染为 `html` ,并在客户端对已经渲染好的HTML( `rendered html` )进行注水 (hydrate)。 + +:::note +本文档描述了如何从头开始在 Farm 上构建 SSR 应用程序。 +::: + +## 示例项目 +Farm为流行的框架提供了 SSR [示例](https://github.com/farm-fe/farm/tree/main/examples): + +* **[React](https://github.com/farm-fe/farm/tree/main/examples/react-ssr)** +* **[Vue](https://github.com/farm-fe/farm/tree/main/examples/vue-ssr)** +* **[Solid](https://github.com/farm-fe/farm/tree/main/examples/solid-ssr)** + +## Project Structure +一个[典型的SSR应用程序](https://github.com/farm-fe/farm/tree/main/examples)通常具有以下源文件结构: + +``` +. +├── index.html +├── farm.config.ts +├── farm.config.server.ts +├── server.js +└── src + ├── index-client.tsx + ├── index-server.tsx + └── main.tsx +``` + +* **`index.html`**: 应用程序运行在客户端(浏览器)上的入口HTML +* **`farm.config.ts`**: 构建项目到客户端的farm配置 +* **`farm.config.server.ts`**: 构建项目到Node.js(服务端)的farm配置 +* **`server.js`**: 应该部署到生产环境的服务端脚本 +* **`src/index-client.tsx`**: 客户端入口脚本 +* **`src/index-server.tsx`**: 服务端入口脚本 +* **`src/main.tsx`**: 客户端和服务器共享的应用程序代码 + +`index.html` 需要引用 `index-client.tsx` 并包含一个占位符,其中应注入服务器渲染的标记(`markup`): + +```html +
app-html-to-replace
+ +``` + +你应该将 `
app-html-to-replace
` 替换为服务器渲染的`markup`。 + +:::tip +我们必须为客户端(浏览器)和服务端(Node.js)分别构建SSR应用程序**共两次**。因此,需要 `farm.config.ts` 和 `farm.config.server.ts` ,我们将在后面的章节中讨论详细信息。 +::: + +## 设置开发服务器 +对于上述示例, `farm.config.ts` 用于**构建浏览器端项目**并设置开发服务器进行服务器渲染。 `farm.config.ts` 的通常这样写: + +```ts title="farm.config.ts" +import path from 'path'; +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + input: { + index_client: './index.html' + }, + output: { + path: './build' + }, + }, + server: { + hmr: true, + cors: true, + middlewares: [ + // 注册一个中间件,在服务端渲染应用, + // 然后注入到服务器渲染的标记并返回最终的index.html + (server) => { + server.app().use(async (ctx, next) => { + await next(); + + // 处理index.html或单页面应用路由设置 + if (ctx.path === '/' || ctx.status === 404) { + // 加载服务端入口,并通过ctx.path渲染 + const render = await import(path.join(process.cwd(), 'dist', 'index.js')).then( + (m) => m.default + ); + const renderedHtml = render(ctx.path); + + // 通过server.getCompiler()获取编译的index.html内容 + // 这里的html经过编译并注入了所有客户端bundles文件 + const template = server + .getCompiler() + .resource('index_client.html') + .toString(); + + // 将占位符替换为渲染好的内容,并将其作为HTML返回 + const html = template.replace( + '
app-html-to-replace
', + renderedHtml + ); + ctx.body = html; + ctx.type = 'text/html'; + ctx.status = 200; + } + + console.log('ctx.path outer', ctx.path); + }); + } + ] + }, + plugins: ['@farmfe/plugin-react', '@farmfe/plugin-sass'] +}); +``` + +在上面的示例中,需要一个中间件(`middleware`)来将应用程序渲染为标记并将其作为HTML提供。中间件中SSR的正常工作流程: +* **加载编译后的服务端入口:** 需要一个导出 `render` 函数的index-server入口,然后通过 `import(server_entry_path)` 来获取这个 `render` 函数。 +* **获取编译后的客户端index.html:** 所有客户端打包代码和Farm运行时都注入到 `index.html`中,用于在客户端进行水合作用(`hydrate`)。 +* **将占位符替换为渲染后的代码:** 替换占位符并返回最终的html代码(`final html`)。 + +:::note +在这个示例中,我们使用 `if (ctx.path === '/' || ctx.status === 404) {` 来构建一个 `SPA` SSR应用程序,如果你需要构建一个 `MPA` SSR应用程序,请将 `ctx.path` 传递到你的页面。 +::: + +## 构建 Node.js 服务端产物 +`farm.config.server.ts` 用于**构建 Node.js 端产物**,生成编译后的服务端入口,可用于在服务端将应用渲染为标记(`markup`)。 + +```ts title="farm.config.server.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + // c-highlight-start + input: { + index: './src/index-server.tsx' + }, + output: { + path: './dist', + targetEnv: 'node' + } + // c-highlight-end + }, + plugins: [ + [ + '@farmfe/plugin-react', + { + refresh: false, + development: false + } + ], + '@farmfe/plugin-sass' + ] +}); +``` + +对于 `farm.config.server.ts` ,我们将 `input` 设置为**服务端入口**,并将 [`output.targetEnv`](/zh/docs/config/compilation-options#output-targetenv) 设置为 `node` 。 + +:::note +默认情况下,Farm将服务端入口脚本编译为 `esm` ,如果你想要将其编译为cjs,请尝试设置 [`output.format`](/zh/docs/config/compilation-options#output-format)。 +::: + +## 开发SSR项目 +你需要为客户端和服务端启动编译,例如,你可能会在package.json中有以下脚本: + +```json title="package.json" +{ + "name": "@farmfe-examples/react-ssr", + "scripts": { + // c-highlight-start + "start": "farm start", + "start:server": "farm watch --config farm.config.server.mjs", + // c-highlight-end + } +} +``` + +当你开发SSR项目时,你需要在不同的终端中运行 `npm run start` 和 `npm run start:server` 。同时监听 server 和 client 的变动并重新编译。 + +## 生产环境构建 +你需要同时为客户端和服务器构建项目,例如,你可能需要在 `scripts` 中添加以下命令: + +```json title="package.json" +{ + "name": "@farmfe-examples/react-ssr", + "scripts": { + "start": "farm start", + "start:server": "farm watch --config farm.config.server.mjs", + // c-highlight-start + "build": "farm build", + "build:server": "farm build --config farm.config.server.mjs" + // c-highlight-end + } +} +``` + +打包构建时,你需要运行 `npm run build` 和 `npm run build:server`,客户端打包将被输出到 `build` 目录,服务端打包将被输出到 `dist` 目录。 + +对于生产环境,你需要一个 `node server` 来渲染和提供 `rendered html`。在这个示例中,我们使用了一个 `server.js` 作为生产服务端: + +```js title="server.js" +import path from 'node:path'; +import { fileURLToPath } from 'node:url' +import fsp from 'fs/promises'; +import express from 'express'; + +function resolve(p) { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + return path.resolve(__dirname, p); +} + +// 创建一个Node生产服务端 +async function createServer() { + let app = express(); + // 为客户端打包产物提供静态文件服务,也可以将客户端构建部署到CDN或单独的开发服务器,按照你的需求。 + app.use(express.static(resolve('build'))); + // 监听 '/' 路由, 你也可以将其替换为你需要的路由. + app.use('/', async (req, res) => { + let url = req.originalUrl; + + try { + let template; + let render; + + // 加载客户端html + template = await fsp.readFile(resolve('build/index_client.html'), 'utf8'); + // 加载服务端渲染函数 + render = await import(resolve('dist/index.js')).then( + (m) => m.default + ); + // 将应用渲染为标记 + const markup = render(url); + + let html = template.replace( + '
app-html-to-replace
', + markup + ); + // 返回包含客户端打包的rendered html + // 客户端打包代码和服务器渲染的标记进行水和作用, + // 并使其具有交互性 + res.setHeader('Content-Type', 'text/html'); + return res.status(200).end(html); + } catch (error) { + console.log(error.stack); + res.status(500).end(error.stack); + } + }); + + return app; +} +// create and listen the server +createServer().then((app) => { + app.listen(3000, () => { + console.log('HTTP server is running at http://localhost:3000'); + }); +}); +``` + +我们在这里使用 `express` 作为服务端,但你可以使用任何你想要的服务端框架。渲染过程是相同的: +* 加载客户端编译后的HTML(`client index.html`) +* 从服务端脚本代码加载 `render` 函数 +* 调用 `const markup = render(url)` 函数以获取应用的服务器端渲染标记 +* 将 `client index.html` 中占位符替换为服务端渲染标记,并将替换后的html作为最终结果返回 + +## 静态站点生成(SSG) +SSG的流程与SSR相同,不同的是SSG将替换的html输出到最终产物。SSG的示例脚本: + +```ts +// 加载 client html +const template = await fsp.readFile(resolve('build/index_client.html'), 'utf8'); +// 加载服务端渲染函数 +const render = await import(resolve('dist/index.js')).then( + (m) => m.default +); + +const pages = renderDirEntry('src/pages'); + +for (const page of pages) { + // 将应用渲染为标记 + const markup = render(url); + const html = template.replace( + '
app-html-to-replace
', + markup + ); + // 输出静态生成的页面,例如将其写入硬盘 + emitPage(page, html); +} +``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/tree-shake.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/tree-shake.md new file mode 100644 index 000000000..757b1ef6e --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/advanced/tree-shake.md @@ -0,0 +1,98 @@ +# Tree Shake + +Farm 支持 Tree Shake,该功能在默认的生产环境中自动启用,可以通过[compilation.treeShaking](/zh/document/config/compcompation-option#treeshaking)选项打开或关闭。 + +在 Tree Shake 期间,package.json 中的 sideEffects 字段将被自动读取,具有 sideEffects 的模块将不会执行 Tree Shake。 + +:::note +Farm 会将所有循环依赖的模块视为 sideEffects,不会执行 Tree Shake。请尽量避免项目中的循环依赖。 +::: + +Tree shake 示例: + +```js title="a.js" +import { b1, b2 } from 'b'; +console.log(b1); +``` + +```js title="b.js" +export b1 = "B1"; +export b2 = "B2"; +``` + +`a.js` 是 entry,它导入`b.js`,tree shaking 后,结果是: + +```js title="a.js" +import { b1 } from 'b'; +console.log(b1); +``` + +```js title="b.js" +export b1 = "B1"; +``` + +`b2`未使用,将在`a.js`和 `b.js`中删除 + +## 配置 Tree Shake + +Tree Shake 默认在生产模式下启用,要禁用 tree Shake,请使用 `compilation. treeShake`: + +```ts title="farm.config.ts" +export default { + compilation: { + treeShake: false, + }, +}; +``` + +## 处理 Side Effects + +当一个模块包含`Side Effects`时,Farm 不会为其应用 tree shake,其所有导入和导出都被视为已使用。Farm 会认为以下模块有 `Side effects`: + +1. Common Js 模块总是有副作用. +2. 一个模块包含`自执行`的语句在全局范围有副作用 +3. 包含循环依赖的模块有副作用 +4. 模块匹配 `sideEffects` 配置在其最接近的 `package. json` +5. 入口模块总是有副作用 + +示例 1: + +```js +const a = require('./'); +module.exports = a; +``` + +Common Js 模块总是有副作用. + +示例 2: + +```js +import a from './'; + +a(); +``` + +`a()` 在全局范围内执行,我们将其视为副作用. + +Example 3: + +```js +// a.js +import b from './b.js'; + +// b.js +import a from './a.js'; +``` + +`a`,`b`是循环依赖关系,所以它们也会被视为副作用. + +Example 4: + +```json title="package.json" +{ + "name": "my-package", + "sideEffects": ["./global/**.ts"] +} +``` + +所有 `global/` 下的 ts 模块都被视为副作用. diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/api/hmr-api.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/api/hmr-api.md new file mode 100644 index 000000000..8dd98aa5f --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/api/hmr-api.md @@ -0,0 +1,193 @@ +# Hmr Api +:::note +HMR API 兼容[Vite 的 HMR API](https://vitejs.dev/guide/api-hmr.html)。 +::: + +Farm 通过特殊的 `import.meta.hot` 对象导出 HMR API(与Vite兼容): + +```ts +export interface ViteHotContext { + readonly data: any; + + accept(): void; + accept(cb: (mod: ModuleNamespace | undefined) => void): void; + accept(dep: string, cb: (mod: ModuleNamespace | undefined) => void): void; + accept( + deps: readonly string[], + cb: (mods: Array) => void + ): void; + + dispose(cb: (data: any) => void): void; + prune(cb: (data: any) => void): void; + invalidate(message?: string): void; + + on( + event: T, + cb: (payload: InferCustomEventPayload) => void + ): void; + off( + event: T, + cb: (payload: InferCustomEventPayload) => void + ): void; + send(event: T, data?: InferCustomEventPayload): void; +} +``` + +## HMR 前置判断 +HMR 仅适用于开发模式,请确保使用条件块保护 HMR API 使用: + +```ts +if (import.meta.hot) { + // HMR Code +} +``` + +## Typescript 支持 + +和 Vite 一样,Farm 在 @farmfe/core/client.d.ts 中提供了 import.meta.hot 的类型定义。 您可以在 src 目录中创建一个 `env.d.ts` ,以便 TypeScript 获取类型定义: + +```ts +/// +``` + +## hot.accept() +对于接收自身更新的模块,请使用 `import.meta.hot.accept()` : + +```ts +if (import.meta.hot) { + // self accept without reload the page + import.meta.hot.accept(); + + const div = document.getElementById(id); + // update the page + if (div) { + const comp = SelfAcceptedEmpty().render(); + div.replaceWith(comp); + } +} +``` + +## hot.accept(cb) +如果你想根据 `更新模块的导出` 来更新模块状态,可以使用 `import.meta.hot.accept(cb)` : + +```ts +if (import.meta.hot) { + // self accept without reload the page + import.meta.hot.accept(mod => { + const div = document.getElementById(id); + const comp = mod[id]().render(); + div?.replaceWith(comp); + }); +} +``` + + `cb` 的参数是 `更新模块的导出` ,您可以基于它进行更新。 + +## hot.accept(deps, cb) +模块还可以接受来自直接依赖项的更新,而无需重新加载自身。 + +接受单一依赖: +```ts +if (import.meta.hot) { + // accept dependencies + import.meta.hot.accept('./accept-deps-data', (data) => { + console.log(data); + const div = document.getElementById(id); + const renderData = data.compData(id); + div!.innerText = renderData; + }); +} +``` + +接受多个依赖项: +```ts +if (import.meta.hot) { + // accept dependencies + import.meta.hot.accept(['./accept-deps-data'], ([data]) => { + console.log(data); + const div = document.getElementById(id); + const renderData = data.compData(id); + div!.innerText = renderData; + }); +} +``` + +## hot.dispose(cb) +自我接受模块或期望被其他模块接受的模块可以使用 hot.dispose 来清理其更新副本所产生的任何持久副作用: + +```ts +if (import.meta.hot) { + // 接受 HMR 更新以避免页面刷新 + import.meta.hot.accept(mod => { + const div = document.getElementById(id); + div?.appendChild(mod.createChild()); + }); + + // 清理副作用 + import.meta.hot.dispose(() => { + // 删除div的所有子元素 + const div = document.getElementById(id); + + if (div) { + while (div.firstChild) { + console.log('dispose', div.firstChild); + div.removeChild(div.firstChild); + } + } + }); +} +``` + +## hot.prune(cb) + +注册一个回调,当页面上不再导入模块时将调用该回调。 与 hot.dispose 相比,如果源代码在更新时自行清除副作用,并且您只需要在从页面中删除它时进行清除,则可以使用此方法。 Farm 目前使用它来导入 .css(与 Vite 相同)。 + +```ts +if (import.meta.hot) {{ + import.meta.hot.accept(); + import.meta.hot.prune(() => {{ + style.remove(); + }}); +}} +``` + +## hot.data +import.meta.hot.data 对象在同一更新模块的不同实例中保留。 它可用于将信息从模块的前一版本传递到下一版本。 + +````ts +import.meta.hot.data.value = 'value'; +```` + +## hot.invalidate(message?: string) +自接受模块可能会在运行时意识到它无法处理 HMR 更新,因此需要将更新强制传播到祖先模块。 通过调用 import.meta.hot.invalidate(),HMR 服务器将使调用者的接收更新状态失效,并将此次更新通知以此到所有祖先模块,如果有任意祖先模块接收本次更新,HMR 成功,否则,将会刷新页面。 这将在浏览器控制台和终端中打印一条消息。 您可以传递一条消息来提供有关失效发生原因的一些背景信息。 + +请注意,即使您计划随后立即调用 invalidate,您也应该始终调用 import.meta.hot.accept,否则 HMR 客户端将不会监听自我接受模块的未来更改。 为了清楚地传达您的意图,我们建议在接受回调中调用 invalidate,如下所示: + +```ts +if (import.meta.hot) { + import.meta.hot.accept((mod) => { + if (cannotHandleUpdate(mod)) { + import.meta.hot.invalidate('parent module should accept this'); + } + }); +} +``` + +## hot.on(event, cb) +与Vite相同,参见 [Vite hot.on](https://vitejs.dev/guide/api-hmr.html#hot-on-event-cb) + +## hot.off(event, cb) +从事件监听器中删除回调 + +## hot.send(event, data) +从 HMR 客户端向开发服务器发送消息: + +```ts +import.meta.hot.send('event-name', { data: '123' }); +``` + +在开发服务器上接收消息: + +```ts +server.ws.on('event-name', (data) => {}); +``` \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/api/javascript-api.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/api/javascript-api.mdx new file mode 100644 index 000000000..6ea8647ed --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/api/javascript-api.mdx @@ -0,0 +1,568 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; +import CodeBlock from "@theme/CodeBlock"; + +# JavaScript Api + +`Farm` 提供完整的开发服务器、编译器、监听器等 `JavaScript Api`, 开发者可以通过引入 `@farmfe/core` 包来使用这些 Api。 + +安装 `@farmfe/core` 包: + +<> + + + npm install @farmfe/core@latest + + + + yarn add @farmfe/core@latest + + + pnpm add @farmfe/core@latest + + + + + +## Start + +`Start` 方法用于快速启动开发服务器 + +调用 `start` 方法之后就可以在当前控制台看见可用的 `ip` 地址的日志信息, 默认会编译当前目录下的 `index.html` 文件 + +类型: + +```typescript +start(options: InlineConfig): Promise +``` + +基本示例: + +```javascript +import { start, logger } from "@farmfe/core"; +try { + await start(options); +} catch (error) { + logger.error(`Failed to start server:\n ${error.stack}`); + process.exit(1); +} +``` + + + +## Build + +`Build` 方法对生产环境进行构建 + +调用 `build` 方法之后默认构建浏览器产物, 并且会在当前目录下生成一个 `dist` 文件夹, 如若需要构建不同环境以及不同版本产物, 例如 `node`、`node-next`、`browser`、`browser-es2017` 等, 可以通过查看 [output targetEnv](/docs/config/compilation-options#output) 来进行配置. +类型: + +```typescript +build(options: InlineConfig): Promise +``` + +基本示例: + +```javascript +import { build, logger } from "@farmfe/core"; +try { + await build(options); +} catch (error) { + logger.error(`error during build:\n ${error.stack}`); + process.exit(1); +} +``` + +## Watch + +`Watch` 方法对当前项目的编译进行实时更新, 等同于 `npx farm build --watch`, 一般作用于 `node` 环境 + +类型: + +```typescript +watch(options: InlineConfig): Promise +``` + +基本示例: + +```javascript +import { watch, logger } from "@farmfe/core"; +try { + await watch(defaultOptions); +} catch (error) { + logger.error(`error during watch project:\n ${error.stack}`); + process.exit(1); +} +``` + +## Preview + +`Preview` 方法启动一个预览服务器, 对生产环境产物进行预览, 使用时需要确保已经通过 `build` 方法进行构建, 并且生成了正确的生产环境产物 + +类型: + +```typescript +preview(options: InlineConfig): Promise +``` + +基本示例: + +```javascript +import { preview, logger } from "@farmfe/core"; +try { + await preview(defaultOptions); +} catch (error) { + logger.error(`Failed to start preview server:\n ${error.stack}`); + process.exit(1); +} +``` + +## Clean + +`Clean` 方法清理 `farm` 增量构建所产生缓存, 如果您开启了增量构建功能, 那么这个方法可能对您有所帮助 + +:::warning +对于目前使用增量构建功能而导致某些不可预知或者未发现的问题所导致的程序崩溃, 可以尝试通过清理缓存来解决问题, 若并不能解决请在 github 上提交 issues +::: + +类型: + +```typescript +clean(options: InlineConfig): Promise +``` + +基本示例: + +```javascript +import { clean, logger } from "@farmfe/core"; +try { + await clean(defaultOptions); +} catch (error) { + logger.error(`Failed to clean cache:\n ${error.stack}`); + process.exit(1); +} +``` + +## loadEnv +从 .env 文件加载环境变量。 + +```ts +type LoadEnvFunc = ( + mode: string, + envDir: string, + prefixes: string | string[] = ['FARM_', 'VITE_'] +) => [env: Record, existsEnvFiles: string[]]; +``` + +* `mode` 是 `development`、`Production` 或任何字符串。 `loadEnv` 将尝试加载 `[``.env``, ``.env.local``, ``.env.${mode}``, ``.env.${mode}.local``] ` 为 `envDir`。 +* `envDir` 是 `.env` 文件所在的目录。 +* `prefixes` 是环境变量的前缀。 默认值为 `['FARM_', 'VITE_']` 。 带有这些前缀的环境变量将自动注入到`define`中。 + +```js +const [env, files] = loadEnv('development', '/path/to/project/env'); +// use env +``` + +### createDevServer + +`createDevServer` 方法用于启动本地开发服务器, 需要先实例化 `Server` 对象, 传递参数需要 `farm` 的 `compiler` + +类型: + +```typescript +createDevServer(options: DevServerOptions): Promise +``` + +基本示例: + +```javascript +import { Server } from "@farmfe/core"; +const server = new Server(); +await server.createDevServer(options); +server.listen() +``` + +### createPreviewServer + +创建一个 预览服务器,用于预览生产环境产物 + +类型: + +```typescript +createPreviewServer(options: DevServerOptions): Promise +``` + +基本示例: + +```javascript +import { Server } from "@farmfe/core"; +const server = new Server(); +await server.createPreviewServer(options); +``` + +### getCompiler + +获取当前开发服务器的编译器实例, 在实例化 `Server` 的时候需要传递一个 `compiler` 参数 + +类型: + +```typescript +getCompiler(): Compiler +``` + +基本示例: + +```javascript +import { Server, Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +const server = new Server({ + compiler +}); +const compiler = server.getCompiler(); +``` + +### close + +关闭当前由 `createDevServer` 开启的所有 `Server` 以及 `Webscoker` 服务 + +基本示例: + +```javascript +import { Server } from "@farmfe/core"; +const server = new Server(); +await server.createDevServer(options); +server.listen() +await server.close(); +``` + + +## Compiler + +`Compiler` 提供一系列编译器的 `Api`,可以通过实例化 `Compiler` 创建一个编译器实例。 + +基本示例 + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile(); +``` + +### compile + +编译器异步启动编译过程。返回一个 `promise` + +:::note +如果设置了特定的环境变量 (procee.env.FARM_PROFILE) , 则执行同步编译。 +::: + +类型: + +```typescript +compile(): promise +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile(); +``` + +### compileSync + +编译器同步启动编译过程。 + +类型: + +```typescript +compileSync(): void +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +compiler.compileSync(); +``` + +### traceDependencies + +追踪文件之间的依赖关系, 根据 `compiler` 传递的 `config` 参数中的 `input` 返回当前文件的所有依赖关系, 这对于根据文件依赖关系进行重启编译非常有用。 + +类型: + +```typescript +traceDependencies(): Array[string] +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; + +const config = { + input: "./farm.config.js" +} +const compiler = new Compiler(config); +const dependencies = compiler.traceDependencies(); +``` + +返回一个所有依赖关系的路径组成的数组 + +### update + +根据提供的路径来更新编译, 返回一个解析为 `JsUpdateResult` 的 `Promise`。如果编译已经在进行中, 它会等待处理并更新。如果设置了 `ignoreCompilingCheck` 为 `true`, 则不会检查编译状态。 + +类型: + +```typescript +update(paths: Array, sync: boolean, ignoreCompilingCheck: boolean): JsUpdateResult +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +const result = await compiler.update(paths, true, true); +``` + +### hasModule + +传递一个 `path` 判断当前 `path` 是否处于 `compiler` 所编译的模块中。 + +类型: + +```typescript +hasModule(path: string): boolean +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +const result = compiler.hasModule(path); +``` + +### getParentFiles + +检索由 模块导入名 (`id`) 或已解析路径标识(`resolvedPath`)的模块导入的当前文件。 + +类型: + +```typescript +getParentFiles(resolvedPath: string): Array +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +const result = compiler.getParentFiles(resolvedPath); +``` + +### resources + +返回所有经过 `compiler` 编译后的所有产物资源 + +类型: + +```typescript +type Resource = { + path: string + buffer: Buffer +} +resources(): Array +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile() +const result = compiler.resources(); +``` + +### Resource + +根据传入的文件返回当前产物的 `buffer` + +类型: + +```typescript +resource(path: string): Buffer | null +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile() +const result = compiler.resource(path); +``` + +### writeResourcesToDisk + +根据配置输出路径将资源写入磁盘 + +类型: + +```typescript +writeResourcesToDisk(): void +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile() +compiler.writeResourcesToDisk(); +``` + +### removeOutputPathDir + +删除输出产物路径目录 + +类型: + +```typescript +removeOutputPathDir(): void +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile() +compiler.removeOutputPathDir(); +``` + +### resolvedWatchPaths + +返回已解析的监视路径 + +类型: + +```typescript +resolvedWatchPaths(): Array +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile() +const result = compiler.resolvedWatchPaths(); +``` + + +### resolvedModulePaths + +返回相对于提供的根路径已解析的模块路径。 + +类型: + +```typescript +resolvedModulePaths(rootPath: string): Array +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +await compiler.compile() +const result = compiler.resolvedModulePaths(rootPath); +``` + +### onUpdateFinish + +添加一个在更新过程完成后执行的回调。 + +类型: + +```typescript +onUpdateFinish(callback: (...args: any[]) => any): void +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +compiler.onUpdateFinish(callback); +``` + +### outputPath + +返回已解析的输出路径 + +类型: + +```typescript +outputPath(): string +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +const result = compiler.outputPath(); +``` + +### addExtraWatchFile + +为编译器添加额外的监视文件。 + +类型: + +```typescript +addExtraWatchFile(rootPath: string,. filePath: string[]): void +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +compiler.addExtraWatchFile(rootPath, filePath); +``` + +### modules + +返回文件模块解析后的对象数组 + +类型: + +```typescript +export interface Module { + id: string + moduleType: string + moduleGroups: Array + resourcePot?: string + sideEffects: boolean + sourceMapChain: Array + external: boolean + immutable: boolean +} +modules(): Array +``` + +基本示例: + +```javascript +import { Compiler } from "@farmfe/core"; +const compiler = new Compiler(config); +const result = compiler.modules(); +``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/api/js-plugin-api.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/api/js-plugin-api.md new file mode 100644 index 000000000..a1d7c16f9 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/api/js-plugin-api.md @@ -0,0 +1,880 @@ +# Js Plugin Api +Farm Js Plugin 设计了类似 rollup 风格的设计插件系统,可以轻松地从 Rollup/Vite/Webpack 迁移您的插件/项目。 + + +## 配置 Js 插件 + +通过 `plugins` 选项添加 JS 插件: + +```ts title="farm.config.ts" {3,7} +import { defineConfig } from "@farmfe/core"; +// import a js plugin +import farmPluginFoo from "farm-plugin-foo"; + +export default defineConfig({ + // configuring it in plugins + plugins: [farmPluginFoo()], +}); +``` + +## 编写Js插件 +Farm Js 插件是一个普通的 javascript 对象,它公开了一组 `hook` 。 例如: + +```ts title="my-farm-plugin.ts" +// 创建一个插件文件,导出一个返回 `JsPlugin` 对象的插件函数: +import type { JsPlugin } from '@farmfe/core'; + +// 插件选项 +export interface PluginOptions { + test: boolean; +} +// 导出插件函数 +export default function MyPlugin(options: PluginOptions): JsPlugin { + // 读取插件 options + const { test } = options; + + // 返回一个暴露钩子的对象 + return { + name: 'my-farm-plugin', + // 使用load hook加载自定义模块 + load: { + filters: { + resolvedPaths: ['\\.test$'] // 过滤文件以提高性能 + }, + async executor({ resolvedPath }) { + if (test && resolvedPath.endsWith('.test')) { + return { + content: 'test file', + sourceMap: null + } + } + } + } + } +} +``` + +:::note +* Farm提供`create-farm-plugin`工具来帮助您快速创建和开发您的js插件。 有关编写 JS 插件的更多详细信息,请参阅[编写 JS 插件](/docs/plugins/writing-plugins/js-plugin) +::: + +## Plugin Hook Overview +Js 插件 Hook 与 Rust 插件相同,请参阅 [Rust 插件 Hook 概述](/docs/api/rust-plugin-api#plugin-hooks-overview)。 + +:::note +并非所有钩子都暴露给 Js 插件,只有本文档中列出的钩子可用。 +::: + +## hooks +### name +- **type: `string`** +- **required: `true`** + +该插件的名称,不能为空。 +```ts +export default function MyPlugin() { + return { + name: 'my-plugin', + // ... + } +} +``` + +### priority +- **type: `number`** +- **required: `false`** +- **default: `100`** + +该插件的优先级,默认为 `100` 。 `priority` 控制插件的执行顺序,值越大,插件越早执行。 + +```ts +export default function MyPlugin() { + return { + name: 'my-plugin', + priority: 1000, // // 使该插件先于所有其他插件执行 + // ... + } +} +``` +:::note +请注意,大多数 Farm 内部插件(如 `plugin-script` 、 `plugin-resolve` )的优先级是 `99` ,这意味着您的插件始终在内部插件之前执行。 如果您想让您的插件在农场内部插件之后执行,请将 `priority` 设置为小于 `99` 的值,例如: `98` 。 优先级值也可以为负数,您可以将其设置为 `-9999` 以确保它始终最后执行。 +::: + +### config +- **type: `config?: (config: UserConfig) => UserConfig | Promise;`** +- **hook type: `serial`** +- **required: `false`** + +在`config`钩子中修改[Farm config](/docs/config/configuring-farm),返回(部分)`修改后的配置`,返回的配置将深度合并到从cli和配置文件解析的配置中。 您也可以直接更改配置。 + +示例: +```ts +const resolveConfigPlugin = () => ({ + name: 'return-resolve-config-plugin', + config: (_config) => ({ + compilation: { + resolve: { + alias: { + foo: 'bar' + } + } + } + }) +}); +``` + +:::note +在解析所有 `用户插件` 后,会调用 `config` 钩子,因此在 config 钩子中将新插件添加到配置中无效。 +::: + + +### configResolved +- **type: `configResolved?: (config: ResolvedUserConfig) => void | Promise;`** +- **hook type: `serial`** +- **required: `false`** + +当配置解析时调用(在调用所有插件的 `config` 钩子之后)。 当您想要获得插件的最终解析配置时很有用。 + +示例: +```ts +const myPlugin = () => { + let farmConfig; + + return { + name: 'my-plugin', + configResolved(resolvedConfig) { + // get resolved config + resolvedConfig = farmConfig; + }, + transform: { + filters: { + moduleTypes: ['js'] + }, + async executor(param) { + if (farmConfig.xxx) { + // ... + } + } + } + } +} +``` + +### configureDevServer +- **type: `configureDevServer?: (server: Server) => void | Promise;`** +- **hook type: `serial`** +- **required: `false`** + +:::note +请注意,该钩子仅在开发模式下运行。 +::: + +当 `Dev Server` 准备就绪时调用,您可以获得开发服务器实例。 + +示例: +```ts +const myPlugin = () => { + let devServer; + + return { + name: 'my-plugin', + configureDevServer(server) { + devServer = server; + } + } +} +``` + +:::note +`js plugin` 的 `config` 和 `configResolved` 钩子都会在 `rust plugin` 的 `config` 钩子之前被调用。 +::: + +### configureCompiler +- **type: `configureCompiler?: (compiler: Compiler) => void | Promise;`** +- **hook type: `serial`** +- **required: `false`** + +当 `Rust Compiler` 准备好时调用,该钩子在开发和生产中运行。 您可以在此处获取 `Compiler` 实例 + +示例: +```ts +const myPlugin = () => { + let farmCompiler; + + return { + name: 'my-plugin', + configureCompiler(compiler) { + farmCompiler = compiler; + } + } +} +``` + +### buildStart +- **type: `buildStart?: { executor: Callback, void> };`** +- **hook type: `parallel`** +- **required: `false`** + +在编译开始之前调用。 你可以在这里做一些初始化工作。 + +Example: +```ts +const myPlugin = () => { + // 定义插件操作 + let myPluginContext = createMyPluginContext(); + + return { + name: 'my-plugin', + buildStart: { + async executor() { + // 在编译之前初始化插件上下文 + myPluginContext.setup(); + } + } + } +} +``` +:::note +`buildStart` 仅在第一次编译时调用一次。 后期编译如 `Lazy Compilation` 和 `HMR Update` 不会触发 `buildStart` 。 +::: + +### resolve +- **required: `false`** +- **hook type: `first`** +- **type:** +```ts +type ResolveHook = { + filters: { + importers: string[]; + sources: string[]; + }; + executor: Callback +}; + +type Callback = ( + param: P, + context?: CompilationContext, + hookContext?: { caller?: string; meta: Record } +) => Promise; + +/// resolve 钩子的参数 +export interface PluginResolveHookParam { + /// 解析 `source` 的起始位置,如果 resolve 入口或 resolve hmr 更新,则为 [None]。 + /// 值为父模块的id,例如:`src/index.ts` 或 `src/index.vue?vue&type=xxx` + importer: string | null; + /// 例如,[ResolveKind::Import] 用于静态导入 (`import a from './a'`) + kind: ResolveKind; + /// 导入来源。 例如在index.ts中(import App from "./App.vue") + /// 源应该是 './App.vue' + source: string; +} +/// resolve 钩子的解析结果 +export interface PluginResolveHookResult { + /// 解析路径,通常是绝对路径。 您还可以返回虚拟路径,并使用 [PluginLoadHookResult] 提供虚拟路径的内容 + resolvedPath: string; + /// 该模块是否应该被 external,如果为 true,则该模块不会出现在最终结果中 + external: boolean; + /// 该模块是否有副作用,影响tree shake + sideEffects: boolean; + /// 从说明符解析的查询,例如,如果说明符是`./a.png?inline`,查询应该是`{ inline: true }` + query: [string, string][] | null; + /// 模块的元数据,将传递给 [PluginLoadHookParam] 和 [PluginTransformHookParam] + meta: Record | null; +} +``` + +:::note +解析钩子的所有过滤器 `sources` 和 `importers` 都是 `正则字符串` 。 +::: + +从 `importer` 解析自定义 `source` ,例如从 `a.ts` resolve `./b` : +```ts title="a.ts" +import b from './b?raw'; +// ... +``` +那么 resolve 参数将是: +```ts +const param = { + source: "./b", + importer: { relative_path: "a.ts", query_string: "" }, + kind: 'import' +} +``` +默认的 resolve 结果为: +```rust +const resolve_result = { + resolved_path: "/root/b.ts", // 解析后的模块绝对路径 + external: false, // 该模块应该包含在最终编译的资源中,并且不应该被 external + side_effects: false, // 不包含副作用,可以被 tree shake + query: [["raw", ""]], // query 参数 + meta: {} +} +``` + +`HookContext` 用于在您可以递归挂钩时传递状态,例如,您的插件在 `resolve hook` 中调用 `context.resolve`: +```ts +const myPlugin = () => ({ + name: 'my-plugin', + resolve: { + filters: { + sources: ['^.+foo.+$'], + importers: ['^src/index.ts$'] + }, + executor: async (param, context, hookContext) => { + console.log(param); + if (hookContext.caller === 'my-plugin') { + return null; + } + // 替换原来的源并解析新的源 + const newSource = param.source.replace('foo', 'bar'); + return context.resolve({ + ...param, + source: newSource + }, { + caller: 'my-plugin', + meta: {} + }); + } + } +}); +``` + +在上面的例子中,我们调用 `context.resolve` 并传递 `caller` 作为参数,然后我们应该添加一个类似 `if (hookContext.caller === 'my-plugin') {` 的保护以避免无限循环。 + +注意: +* 默认情况下,您的`resolve hook`在Farm内部默认解析器**之后**执行,只有内部解析器无法解析的源才会传递给您的插件,这意味着如果您想覆盖默认解析器 ,您需要将**插件的优先级设置为大于**`101`。 +* 通常 `resolved_path` 是指向文件的真实绝对路径。 但是您仍然可以返回一个 `虚拟模块 id` ,例如 `virtual:my-module` ,但是对于虚拟模块,您需要实现 `load` 钩子来自定义如何加载虚拟模块。 在 Farm 中,`resolved_path + query = module_id`。 +* `ResolveKind` 表示 `import type`,示例值:`require`(由 commonjs require 导入)、`cssImport`(由 css 的 import 语句导入)等。 +* `meta` 可以在插件和钩子之间共享,您可以从任何插件中的 `load`、`transform` 和 `parse` 钩子的参数中获取 `meta`。 + +### load +- **required: `false`** +- **hook type: `first`** +- **type:** +```ts +type LoadHook = { + filters: { + importers: string[]; + sources: string[]; + }; + executor: Callback +}; + +type Callback = ( + param: P, + context?: CompilationContext, + hookContext?: { caller?: string; meta: Record } +) => Promise; + +export interface PluginLoadHookParam { + moduleId: string; + resolvedPath: string; + query: [string, string][]; + meta: Record | null; +} + +export interface PluginLoadHookResult { + /// 模块的内容 + content: string; + /// 模块的类型,例如[ModuleType::Js]代表普通的javascript文件, + /// 通常以 `.js` 扩展名结尾 + moduleType: ModuleType; + sourceMap?: string | null; +} +``` + +自定义如何从已解析的模块路径或模块 ID 加载模块。 例如加载一个虚拟模块: +```ts +const myPlugin = () => ({ + name: 'my-plugin', + load: { + filters: { + resolvedPaths: ['^virtual:my-plugin$'], + }, + executor: async (param, context, hookContext) => { + if (param.resolvedPath === 'virutal:my-plugin') { + return { + content: 'export default "foo"', + moduleType: 'js' + }; + } + } + } +}); +``` + +在 `load` 挂钩中加载模块时需要返回 `module_type` 和 `content` 。 `source_map` 是可选的,如果您在 `load` 钩子中进行转换(不推荐,我们建议在这种情况下使用 `transform` 钩子)或者从其他位置加载原始源地图,则可以返回源地图。 + + +`load hook` 的 `filters.resolvedPath` 为 `resolvedPath + query`,例如:`/root/src/index.vue?vue&type=style&lang=css`。 如果你想在过滤模块时忽略查询,可以使用 `$`: `src/index\\.vue$`; 如果你想通过查询来过滤模块,例如过滤 `lang=css`,可以使用`src/index.vue\\.+\\?vue&.+lang=css`。 + +### transform +- **required: `false`** +- **hook type: `serial`** +- **type:** +```ts +type TransformHook = { + filters: { + importers: string[]; + sources: string[]; + }; + executor: Callback +}; + +type Callback = ( + param: P, + context?: CompilationContext, + hookContext?: { caller?: string; meta: Record } +) => Promise; + +export interface PluginTransformHookParam { + moduleId: string; + /// 加载后的源内容或上一个插件转换后的结果 + content: string; + /// 加载后的模块类型 + moduleType: ModuleType; // Module Type is 'js' | 'jsx' | 'ts' | 'tsx' | 'css' | 'html'... + resolvedPath: string; + query: [string, string][]; + meta: Record | null; + sourceMapChain: string[]; +} + +export interface PluginTransformHookResult { + /// 转换后的源内容,将传递给下一个插件。 + content: string; + /// 您可以在转换后更改模块类型。 + moduleType?: ModuleType; + /// 转换后的源映射,所有插件转换后的源映射将存储为源映射链。 + sourceMap?: string | null; + // 忽略之前的 source map。 如果为 true,则source map链将被清除。 这个结果应该返回一个新的source map,它结合了所有以前的 source map。 + ignorePreviousSourceMap?: boolean; +} +``` + +根据**`模块内容`**和**`模块类型`**进行转换。 将 `sass` 转换为 `css` 的示例: + +```ts +export default function farmSassPlugin( + options: SassPluginOptions = {} +): JsPlugin { + return { + name: pluginName, + load: { + filters: { resolvedPaths: ['\\.(scss|sass)$'] }, + async executor(param) { + if (param.query.length === 0 && existsSync(param.resolvedPath)) { + const data = await readFile(param.resolvedPath); + return { + content: data, + moduleType: 'sass' + }; + } + + return null; + } + }, + transform: { + filters: { + moduleTypes: ['sass'] + }, + async executor(param, ctx) { + const { css: compiledCss, map } = compileSass(param.content); + return { + content: compiledCss, + moduleType: 'css' // transformed sass to css, + sourceMap: JSON.stringify(map) + ignorePreviousSourceMap: false, + } + } + } + } +} +``` + +编写 `transform hook` 的正常步骤: +1. 添加基于 `moduleType` 或 `resolvedPath` 或 `moduleId` 的 `if` 保护 +2. 对 `内容` 进行转换 +3.返回转换后的`content`、`sourceMap`和`moduleType` + +对于 `ignorePreviousSourceMap` ,如果您处理了 `param.sourceMapChain` 并折叠了 `transform hook` 中以前插件的源映射。 您应该将 `ignorePreviousSourceMap` 设置为 `true` 以确保源映射正确。 否则,您应该始终将此选项设置为 `false` 并让 Farm 处理源映射链。 + +对于 filters: +* 当同时指定 `resolvedPaths` 和 `moduleTypes` 时,取并集。 +* `filters.resolvedPaths` 是 `resolvedPath + query`,例如:`/root/src/index.vue?vue&type=style&lang=css`。 如果你想在过滤模块时忽略查询,可以使用 `$`: `src/index\\.vue$`; 如果你想通过查询来过滤模块,例如过滤 `lang=css`,可以使用`src/index.vue\\.+\\?vue&.+lang=css`。 +* `filters.moduleTypes` 不是 ** `regex`,它必须与 `ModuleType` 完全匹配,如 `css`、`js`、`tsx` 等。 + +:::note +`transform` 钩子是**内容到内容**。 有一个类似的钩子叫做 `process_module` , `process_module` 是**ast 到 ast**。 由于性能问题,Js 插件不支持 `process_module` 钩子,如果您想要 **ast 到 ast** 转换,请尝试使用 [`Rust Plugin`](/docs/plugins/writing-plugins/rust-plugin)。 +::: + +### buildEnd +- **type: `buildEnd?: { executor: Callback, void> };`** +- **hook type: `parallel`** +- **required: `false`** + +在 `ModuleGraph` 构建之后、资源渲染和生成开始之前调用。 您可以在此处进行一些状态更新或完成工作。 + +示例: +```ts +const myPlugin = () => { + // 定义插件上下文 + let myPluginContext = createMyPluginContext(); + + return { + name: 'my-plugin', + buildEnd: { + async executor() { + // 更新插件状态 + myPluginContext.updateStatus('module-graph-built'); + } + } + } +} +``` +:::note +`buildEnd` 仅在第一次编译时调用一次。 稍后编译如`Lazy Compilation`和`HMR Update`不会触发`buildEnd`。 +::: + +### renderStart +- **type: `renderStart?: { executor: Callback; };`** +- **hook type: `parallel`** +- **required: `false`** + +在资源渲染开始之前调用。 + +示例: +```ts +const myPlugin = () => { + // 定义插件上下文 + let myPluginContext = createMyPluginContext(); + + return { + name: 'my-plugin', + renderStart: { + async executor() { + // 更新插件状态 + myPluginContext.updateStatus('render-start'); + } + } + } +} +``` +:::note +`renderStart` 仅在第一次编译时调用一次。 稍后编译如 `Lazy Compilation` 和 `HMR Update` 将不会触发 `renderStart` 。 +::: + +### renderResourcePot +- **required: `false`** +- **hook type: `serial`** +- **type:** +```ts +type RenderResourcePotHook = JsPluginHook< + { + resourcePotTypes?: ResourcePotType[]; + moduleIds?: string[]; + }, + RenderResourcePotParams, + RenderResourcePotResult +>; + +type Callback = ( + param: P, + context?: CompilationContext, +) => Promise; +type JsPluginHook = { filters: F; executor: Callback }; + +export interface RenderResourcePotParams { + content: string; + sourceMapChain: string[]; + resourcePotInfo: { + id: string; + name: string; + resourcePotType: ResourcePotType; + map?: string; + modules: Record; + moduleIds: ModuleId[]; + data: JsResourcePotInfoData; + custom: Record; + }; +} +export interface RenderResourcePotResult { + content: string; + sourceMap?: string; +} +``` + +`Resource Pot` 是最终输出的打包后的文件的抽象表示,您可以返回转换后的 `resourcePot content` 来改变最终的包。 例如渲染CSS: + +```ts +const myPlugin = () => ({ + name: 'test-render-resource-pot', + renderResourcePot: { + filters: { + moduleIds: ['^index.ts\\?foo=bar$'], + resourcePotTypes: ['css'] + }, + executor: async (param) => { + return { + content: param.content.replace( + '<--layer-->', + cssCode + ), + sourceMap + }; + } + } +}) +``` +我们将 css 资源罐中的所有 `<--layer-->` 进行转换,并将其替换为真正的 `css 代码`。 + +:::note +当同时指定了 `filters.moduleIds` 和 `filters.resourcePotTypes` 时,取并集。 +::: + +### augmentResourceHash +- **required: `false`** +- **hook type: `serial`** +- **type:** +```ts +type AugmentResourceHash = JsPluginHook< + { + resourcePotTypes?: ResourcePotType[]; + moduleIds?: string[]; + }, + { + id: string; + name: string; + resourcePotType: ResourcePotType; + map?: string; + modules: Record; + moduleIds: ModuleId[]; + data: JsResourcePotInfoData; + custom: Record; + }, + string +>; + +type Callback = ( + param: P, + context?: CompilationContext, +) => Promise; +type JsPluginHook = { filters: F; executor: Callback }; +``` + +为给定资源罐附加资源哈希。 如果您想在生成资源哈希时添加附加条件,则非常有用。 + +```ts +const myPlugin = () => ({ + name: 'test-augment-resource-pot', + renderResourcePot: { + filters: { + moduleIds: ['^index.ts\\?foo=bar$'], + resourcePotTypes: ['css'] + }, + executor: async (param) => { + return 'my-hash-args'; + } + } +}) +``` + +:::note +当同时指定了 `filters.moduleIds` 和 `filters.resourcePotTypes` 时,取并集。 +::: + +### finalizeResources +- **required: `false`** +- **hook type: `serial`** +- **type:** +```ts +type FinalizeResourcesHook = { + executor: Callback< + FinalizeResourcesHookParams, + FinalizeResourcesHookParams['resourcesMap'] + >; +}; + +export type FinalizeResourcesHookParams = { + resourcesMap: Record; + config: Config['config']; +}; + +export interface Resource { + name: string; + bytes: number[]; + emitted: boolean; + resourceType: string; + origin: { type: 'ResourcePot' | 'Module'; value: string }; + info?: ResourcePotInfo; +} +``` + +对所有生成的资源进行一些转换,返回 `转换后的resourcesMap` 。 您可以在此钩子中 `添加` 、 `删除` 、 `修改` 最终生成的资源。 + +注意: +* `bytes` 是最终输出的二进制,对于 `js/css/html` 代码,可以使用 `Buffer.from(bytes).toString()` 来获取代码。 +* `name` 是最终的文件名。 +* `origin` 代表这个 `Resource` 的来源,`ResourcePot` 表示它是从 `ResourcePot` 生成的,而 `ResourcePot` 是一个模块包; `Module` 表示它来自 `Module` ,例如 `.png/.jpg` 等静态文件来自 `Module` 。 + +### transformHtml +- **required: `false`** +- **hook type: `serial`** +- **type:** +```ts +type TransformHtmlHook = { + order?: 0 | 1 | 2; + executor: Callback<{ htmlResource: Resource }, Resource>; +}; +``` + +`order` 控制 `transformHtml` 执行时机: +* `0`: 代表 `pre`, 在 parse 之前执行,在这里可以转换原始的 html。 +* `1` and `2`: 代表 `normal` and `post`, 在 parse 和 generate resources 之后执行. 在这个阶段, 所有的 ` + + +``` + +当加载动态脚本和CSS时,动态获取的资源url也将是:`https://cdn.com/` + +#### `output.assetsFileName` + +- **默认值**: `"[resourceName].[ext]"` + +静态资源输出的文件名配置,占位符和 `output.filename` 相同。 + +#### `output.targetEnv` + +- **默认**:`"browser-es2017"` + +配置产物的执行环境,可以是 `浏览器` 或 `节点` 。 Farm 会自动为您指定的 `targetEnv` 注入 `polyfill` 和降级语法(对于脚本和 css),支持的 `targetEnv` 如下: + +针对 `浏览器` : +* **`browser-es2017`**:将项目编译到原生支持 `async wait` 的浏览器。 +* **`browser-es2015`**:将项目编译到原生支持 `es6 features` 的浏览器。 +* **`browser-legacy`**:将项目编译为`ES5`,例如`IE9`。 请注意,这可能会引入大量的填充,从而使生产规模更大。 确保您确实需要支持 `IE9` 等旧版浏览器。 +* **`browser-esnext`**:将项目编译到最新的现代浏览器,不会注入任何polyfill。 +* **`浏览器`**:`browser-es2017`的别名 + +针对 `Node.js` : +* **`node16`**:将项目编译到`Node 16`。 +* **`node-legacy`**:将项目编译到 `Node 10` 。 +* **`node-next`**:将项目编译到最新的 Node 版本,不会注入任何 polyfill。 +* **`node`**:`node16`的别名 + +#### `output.format` + +- **默认值**: `"esm"` + +配置产物的格式,可以是 `"esm"` 或者 `"cjs"`. + +:::note +该选项只对 Js 产物有效 +::: + +### resolve + +- **type**: `ResolveOptions` + +```ts +interface ResolveOptions { + extensions?: string[]; + alias?: Record; + mainFields?: string[]; + conditions?: string[]; + symlinks?: boolean; + strictExports?: boolean; +} +``` + +#### `resolve.extensions` + +- **默认值**: `["tsx", "ts", "jsx", "js", "mjs", "json", "html", "css"]` + +配置解析依赖时的后缀,例如解析 `./index` 时,如果没有解析到,则会自动加上后缀解析,如尝试 `./index.tsx`, `./index.css` 等。 + +#### `resolve.alias` + +- **默认值**: `{}` + +配置解析别名,示例: + +```ts +export default defineConfig({ + compilation: { + resolve: { + alias: { + "/@": path.join(process.cwd(), "src"), + stream$: "readable-stream", + "$__farm_regex:^/(utils)$": path.join(process.cwd(), "src/$1"), + }, + }, + }, +}); +``` + +alias 为前缀替换,对于上述例子 `/@/pages` 将会被替换为,`/root/src/pages`。 + +如果希望精确匹配,可以加上 `$`,例如 `stream$` 只会替换 `stream`,而不会替换 `stream/xxx`。 + +当然也支持使用正则表达式,例如 `$__farm_regex:^/(utils)$`,将会匹配 `/utils`,并替换为 `/root/src/utils`。 + +#### `resolve.mainFields` + +- **默认值**: `["exports", "browser", "module", "main"]` + +解析 node_modules 下依赖时,从 package.json 中将会按照 `mainFields` 中配置的字段和顺序进行解析。对于 `package.json` + +```json +{ + "name": "package-a", + "module": "es/index.js", + "main": "lib/index.js" +} +``` + +将会优先使用 `es/index.js`(如果路径存在),不存在则会继续向后搜索。 + +#### `resolve.conditions` + +暂不支持配置。 + +#### `resolve.symlinks` + +- **默认值**: `true` + +解析文件时,是否追踪 symlink 对应的真实目录,并从真实目录开始解析下一个依赖。如果使用 pnpm 管理依赖,该选项必须配置为 true。 + +#### `resolve.strictExports` + +- **默认值**: `false` + +是否严格遵循 `package.json` 中 `exports` 中定义的导出。如果设置为 true,当 `package.json` 中定义了 `exports`,但是 `exports` 没有定义对应导出时,会直接报错。如果设置为 true,会按照 mainFields 继续尝试其他入口。 + +### define + +- **默认值**: `{}` + +全局变量注入,配置的变量名和值将会在编译时注入到产物中。Farm 默认注入 `process.env.NODE_ENV` 以及部分 Farm 自身使用的变量比如 `FARM_HMR_PORT` + +```ts +export default defineConfig({ + compilation: { + define: { + MY_VAR: 123, + }, + }, +}); +``` + +### external + +- **默认值**: `[]` +- **类型**: `(string | Record)[]` + +配置被 external 的导入,被 external 的导入不会出现在编译产物中。但是对应 import 语句不会删除,需要自定义 external 后如何处理,否则运行时会报错,对于 targetEnv 是 node 下的 external 模块,会自动尝试 require 该模块。 + +需要使用正则方式配置,例如: + +```ts +export default defineConfig({ + compilation: { + external: ["^stream$", { jquery: "Jquery" }], + }, +}); +``` + +### externalNodeBuiltins +- **默认**:`true` + +无论是否外部 `module.builtinModules`,默认情况下,所有内置模块(如 `fs`)都将是外部的。 您还可以将 `externalNodeBuiltins` 设置为 `array` 以手动将模块指定为外部: + +```ts +export default defineConfig({ + compilation: { + externalNodeBuiltins: ["^stream$"], + }, +}); +``` + +### mode + +- **默认值**: 对于 start、watch 命令是 `development`,对于 build 命令是 `production` + +配置编译模式,为了优化开发时性能,在没有手动配置生产优化相关选项(minify,tree shake 等)时,默认在 `development` 下会禁用生产环境优化比如压缩和 tree shake,在 `production` 模式下启用。 + +### root + +- **默认值**: `process.cwd()` + +配置项目编译的 root 目录,该选项会影响默认配置文件的查找路径,编译模块依赖的查找等。 + +### runtime + +配置 Farm 运行时能力。类型如下: + +```ts +interface FarmRuntimeOptions { + runtime?: { + path: string; + plugins?: string[]; + namespace?: string; + isolate?: boolean; + }; +} +``` + +#### `runtime.path` + +- **默认值**: Farm 内置 runtime 的路径 + +自定义一个 Runtime 替换 Farm 内置的 Runtime。 + +:::warning +正常情况下不建议配置该选项,因为一旦配置了该选项,指向的 runtime 需要所有实现 Farm Runtime 已有的能力,例如模块系统、HMR、动态资源加载等。 +::: + +#### `runtime.plugins` + +- **默认值**: Farm 内置 runtime-plugin-hmr 的路径 + +配置 Runtime 插件,通过 Runtime 插件,可以干预 Runtime 行为,如模块加载,资源加载等。具体可以参考:WIP。 + +#### `runtime.namespace` + +- **默认值**: 项目 package.json 的 name 字段 + +配置 Farm Runtime 的命名空间,保证在同一个 window 或者 global 下不同产物的执行能够相互隔离。默认使用项目 package.json 的 name 字段作为 namespace。 + + +#### `runtime.isolate` + +- **默认值**: `false` + +默认情况下,html 中的运行时文件是内联写入的。如果您想以单独文件的形式弹出,从而减小 html 文件的大小,那么可以将此属性设为 true。 +如果设置为 true,农场入口脚本将以单独文件的形式发布。 + +### assets + +#### `assets.include` + +- **默认值**: `[]` + +额外视为静态资源的文件后缀,例如下述示例,`txt` 将会被视为姿态资源,引入 txt 文件时当作静态资源处理: + +```ts +export default defineConfig({ + compilation: { + assets: { + include: ["txt"], + }, + }, +}); +``` + +### script + +#### `script.target` + +- **默认值**: `esnext`(根据 Farm 的迭代动态调整) + +配置 Farm 解析 `js/jsx/ts/tsx` 的 AST 以及生成代码时支持的 ES 语法版本。 可选值:`es5`, `es6`, `es2015` - `es2023`, `esnext` + +#### `script.parser` + +- **默认值**: 与 SWC 相同 + +配置 SWC 解析 AST 时的行为,配置项参考:https://swc.rs/docs/configuration/compilation#jscparser + +#### `script.plugins` + +- **默认值**: `[]` + +配置 swc 插件数组,数组每一项包含三个字段: + +- **name**:swc 插件的包名 +- **options**: 传给 swc 插件的配置项 +- **filters**: 对哪些模块执行该插件,必须配置,支持 `resolvedPaths` 和 `moduleTypes` 这两个过滤项,两者如果同时指定,取并集。 + +对于 Vue 项目支持 JSX 的配置示例如下: + +```ts +import jsPluginVue from "@farmfe/js-plugin-vue"; + +/** + * @type {import('@farmfe/core').UserConfig} + */ +export default { + compilation: { + script: { + plugins: [ + { + name: "swc-plugin-vue-jsx", + options: { + transformOn: true, + optimize: true, + }, + filters: { + // resolvedPaths: [".+"] + moduleTypes: ["tsx", "jsx"], + }, + }, + ], + }, + }, + plugins: [jsPluginVue()], +}; +``` + +#### `script.decorators` + +```ts +export interface DecoratorsConfig { + legacyDecorator: boolean; + decoratorMetadata: boolean; + /** + * 装饰器版本: 2021-12 或者 2022-03 + * @default 2021-12 + */ + decoratorVersion: "2021-12" | "2022-03" | null; + /** + * @default [] + */ + includes: string[]; + /** + * @default ["node_modules/"] + */ + excludes: string[]; +} +``` + +建议使用 Farm 默认的装饰器配置,除非你想提高性能,可以设置`includes`和`excludes`。 + +选项: + +- **legacyDecorator**:默认为`true`。使用遗留装饰器提案。 +- **decoratorMetadata**:默认为`false`。如果您想将`legacyDecorator`设置为`true`,则必须将其设置为`false`。 +- **decoratorVersion**:默认为`2021-12`,提案版本。该值为 2021-12 或 2022-03。 +- **包括**:默认为`[]`。如果要包含排除的模块,可以设置此选项。支持正则表达式。 +- **排除**:默认为`['node_modules/']`。变换装饰器时,这些路径下的模块将被忽略。支持正则表达式 + +### css + +#### `css.modules` + +配置 Farm CSS Modules。 + +```ts +interface FarmCssModulesConfig { + // 配置哪些路径会被处理为 css modules,使用正则字符串 + // 默认为 `.module.css` 或者 `.module.scss` 或者 `.module.less` + paths?: string[]; + // 配置生成的 css 类名,默认为 `[name]-[hash]` + indentName?: string; +} +``` + +##### `css.modules.paths` + +- **默认值**: `["\\.module\\.(css|scss|sass|less)"]` + +配置哪些路径对应的模块会被视为 CSS Modules。需要配置正则字符串。默认是以 `.module.(css|scss|sass|less)` 结尾的文件。 + +##### `css.modules.identName` + +- **默认值**: `[name]-[hash]` + +配置生成的 CSS Modules 类名,默认是 `[name]-[hash]`,`[name]`, `[hash]` 为占位符(也是目前支持的所有占位符)。`[name]` 表示原始类名,`[hash]` 表示改 css 文件 id 的 hash。 + +#### `css.prefixer` + +配置 CSS 的兼容性前缀,例如 `-webkit-`。 + +```ts +interface FarmCssPrefixer { + targets?: string[] | string | BrowserTargetsRecord; +} + +type BrowserTargetsRecord = Partial< + Record< + | "chrome" + | "opera" + | "edge" + | "firefox" + | "safari" + | "ie" + | "ios" + | "android" + | "node" + | "electron", + string + > +> & { [key: string]: string }; +``` + +##### `css.prefixer.targets` + +- **默认值**: `undefined` + +配置对于哪些目标浏览器或者浏览器版本开启,示例: + +```ts +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + compilation: { + css: { + prefixer: { + targets: ["last 2 versions", "Firefox ESR", "> 1%", "ie >= 11"], + }, + }, + }, +}); +``` + +### html + +#### `html.base` + +- **默认值**: `undefined` + +所有的 HTML 入口会继承 `html.base`,详情参考 [指南 - HTML](/docs/features/html) + +### sourcemap + +- **默认值**: `true` + +配置是否启用 sourcemap,可选配置项及说明如下: + +- **`true`**:仅对非 `node_modules` 下的文件生成 sourcemap,并且生成单独的 sourcemap 文件 +- **`false`**: 关闭 sourcemap +- **`inline`**:仅对非 `node_modules` 下的文件生成 sourcemap,并且内联 sourcemap 到产物中,不生成单独的文件 +- **`all`**:对所有文件生成 sourcemap,并且生成单独的 sourcemap 文件 +- **`all-inline`**: 对所有的文件生成 sourcemap,并且内联 sourcemap 到产物中,不生成单独的文件 + +### partialBundling + +配置 Farm 局部打包的行为,详情可以参考 [局部打包](/docs/advanced/partial-bundling) + +```ts +export interface FarmPartialBundlingConfig { + targetConcurrentRequests?: number; + targetMinSize?: number; + targetMaxSize?: number; + groups?: { + name: string; + test: string[]; + groupType?: "mutable" | "immutable"; + resourceType?: "all" | "initial" | "async"; + }[]; + enforceResources?: { + name: string; + test: string[]; + }[]; + enforceTargetConcurrentRequests?: boolean; + enforceTargetMinSize?: boolean; + immutableModules?: string[]; +} +``` + +#### `partialBundling.targetConcurrentRequests` + +- **default**: `25` + +Farm 尝试生成尽可能接近此配置值的资源数量,控制初始资源加载或动态资源加载的并发请求数量。 + +#### `partialBundling.targetMinSize` + +- **default**: `20 * 1024` bytes, 20 KB + +minify 和 gzip 之前生成的资源的最小大小。 请注意,`targetMinSize` 并不一定保证满足,可以配置`enforceTargetMinSize`可用于强制限制最小的大小。 + +#### `partialBundling.targetMaxSize` + +- **default**: `1500 * 1024` bytes, 1500 KB + +minify 和 gzip 之前生成的资源的最大大小。 + +#### `partialBundling.groups` + +- **default**: `[]` + +一组应该放在一起的模块。 请注意,此组配置只是对编译器的打击,即这些模块应该放置在一起,它可能会产生多个资源,如果您想强制打包模块到同一个资源中,使用`enforceResources`。 + +数组每一项的配置选项如下: + +- **name**: 该组的名称。 +- **test**: 匹配该组中的模块路径的正则表达式数组。. +- **groupType**: `mutable` 或 `immutable`,限制该组仅适用于指定类型的模块。 +- **resourceType**: `all`、`initial` 或 `async`,限制该组仅适用于指定类型的资源。 + +```ts title="farm.config.ts" {4-9} +export default defineConfig({ + compilation: { + partialBundling: { + groups: [ + { + name: "vendor-react", + test: ["node_modules/"], + }, + ], + }, + }, +}); +``` + +#### `partialBundling.enforceResources` + +- **default**: `[]` + +Array to match the modules that should always be in the same output resource, ignore all other constraints. + +Options for each item: + +- **name**: Name of this resource. +- **test**: Regex array to match the modules which are in this resource. + +```ts title="farm.config.ts" {4-9} +export default defineConfig({ + compilation: { + partialBundling: { + enforceResources: [ + { + name: "index", + test: [".+"], + }, + ], + }, + }, +}); +``` + +:::warning +`enforceResources` will ignore all Farm's internal optimization, be careful when you use it. +::: + +#### `partialBundling.enforceTargetConcurrentRequests` + +- **default**: `false` + +对每个资源加载强制执行目标并发请求数量,当为 true 时,较小的资源将合并为较大的资源以满足目标并发请求。 这可能会导致 css 资源出现问题,请小心使用此选项 + +#### `partialBundling.enforceTargetMinSize` + +- **default**: `false` + +为每个资源强制执行目标最小大小限制,如果为真,较小的资源将合并为较大的资源以满足目标并发请求。 这可能会导致 css 资源出现问题,请小心使用此选项 + +#### `partialBundling.immutableModules` + +- **default**: `['node_modules']` + +匹配不可变模块的正则表达式数组 + +```ts title="farm.config.ts" +export default defineConfig({ + compilation: { + partialBundling: { + immutableModules: ["node_modules/", "/global-constants"], + }, + }, +}); +``` + +不可变模块会影响打包和持久缓存,如果要更改它,请小心。 + +#### `partialBundling.immutableModulesWeight` + +- **default**: `0.8` + +Default to `0.8`, immutable module will have 80% request numbers. For example, if `targetConcurrentRequest` is 25, then immutable resources will take `25 * 80% = 20` by default. This option is to make sure that mutable and immutable modules are isolate, if change your business code, code under node_modules won't be affected. + +### lazyCompilation + +- **默认值**: 在开发模式是 `true`,构建模式是 `false` + +是否启用懒编译,配置为 false 关闭。参考 [懒编译](/docs/features/lazy-compilation)。 + +### treeShaking + +- **默认值**: 在开发模式是 `false`,构建模式是 `true` + +是否启用 tree shake,配置为 false 关闭。参考 [Tree Shake](/docs/advanced/tree-shake)。 + +### minify + +- **默认值**: 在开发模式是 `false`,构建模式是 `true` +- **类型**: `bool | JsMinifyOptions` + +是否启用压缩,开启后将会对产物进行压缩和混淆。参考 [压缩](/docs/advanced/tree-shake)。 + +#### `minify.compress` + +- **默认值**: `{}` +- **类型**: [`TerserCompressOptions`](https://swc.rs/docs/configuration/minification#jscminifycompress) + +压缩参数 + +#### `minify.mangle` + +- **默认值**: `{}` +- **类型**: [`TerserMangleOptions`](https://swc.rs/docs/configuration/minification#jscminifymangle) + +压缩变量参数 + +#### `minify.include` + +- **默认值**: `[]` +- **类型**: `string[]` + +包含需要压缩的模块,默认全部,仅在 `minify.mode` 为 `minify-module` 生效 + +#### `minify.exclude` + +- **默认值**: `["*.min.(js|css|html)"]` +- **类型**: `string[]` + +排除不需要压缩模块,仅在 `minify.mode` 为 `minify-module` 生效 + +#### `minify.mode` + +- **默认值**: `'minify-module'` +- **类型**: `'minify-module' | 'minify-resource-pot'` + +`minify-module` 模块级别 `minify`,可以通过参数控制需要 minify 哪些模块,压缩的更为精细,效率更好 + +`minify-resource-pot` `ResourcePot` 级别 `minify`,无法通过参数控制具体的模块 + +### presetEnv + +- **默认值**: 在开发模式是 `false`,构建模式是 `true` + +```ts +type FarmPresetEnvConfig = + | boolean + | { + include?: string[]; + exclude?: string[]; + // TODO using swc's config + options?: any; + assumptions?: any; + }; +``` + +默认不会对 node_modules 下的模块注入 polyfill,如果需要,请使用 `include` 添加 polyfill。 + +#### `presetEnv.include` + +- **默认值**: `[]` + +额外包含哪些需要 polyfill 的模块,配置正则字符串,例如 `include: ['node_modules/(es6-package|my-package)/']` + +#### `presetEnv.exclude` + +- **默认值**: `['node_modules/']` + +配置哪些不需要 polyfill 的模块,配置正则字符串,例如 `exclude: ['custom-path/(es5-package|my-package)/']`。默认 node_modules 被排除,如果需要包含被排除的模块,建议使用 `include` + +#### `presetEnv.options` + +- **默认值**: `降级到 ES5` + +传递给 swc preset env 的选项,参考 https://swc.rs/docs/configuration/compilation#env。 + +### persistentCache + +- **default**: `true` + +[增量构建](/docs/advanced/persistent-cache) 的缓存配置选项. 配置成 `false` 来禁用缓存. + +```ts +export type PersistentCache = + | boolean + | { + namespace?: string; + cacheDir?: string; + buildDependencies?: string[]; + moduleCacheKeyStrategy?: { + timestamp?: boolean; + hash?: boolean; + }; + }; +``` + +#### `persistentCache.namespace` + +- **default**: `farm-cache` + +缓存的命名空间,不同空间下的缓存会相互隔离,不会复用。 + +#### `persistentCache.cacheDir` + +- **default**: `node_modules/.farm/cache` + +缓存文件的存放目录。 + +#### `persistentCache.buildDependencies` + +- **default**: `farm.config.ts and all its deep dependencies` + +所有配置文件、插件等构建依赖的路径,默认包含 `farm.config.ts/js/mjs` 的所有依赖以及配置的所有 rust 和 js 插件。如果任意一个构建依赖变更了,所有缓存将会失效。 + +配置项可以是一个路径或者一个包名, 例如: + +```ts +import { defineConfig } from "@farmfe/core"; +import path from "node:path"; + +export default defineConfig({ + persistentCache: { + buildDependencies: [ + // a file path + path.resolve(process.cwd(), "./plugins/my-plugin.js"), + // a package name, note that this package must expose package.json + "farm-plugin-custom-xxx", + ], + }, +}); +``` + +#### `persistentCache.moduleCacheKeyStrategy` + +- **default**: `{ timestamp: true, hash: true }` + +控制复用缓存时,如何生成缓存的键。如果 `timestamp` 被设置为 true,并且模块没有倍改过,那么该模块所有的构建步骤将会被跳过(如`load`, `transform` 等钩子),缓存的模块将会被复用。如果`hash`设置成 true,并且 timestamp 没有命中,那么会调用 `load` 以及 `transform` 钩子来获取模块的内容,如果模块内容没有变更,那么缓存将会被复用,剩余构建步骤会被跳过。 + +- `timestamp`: 是否检查模块的 timestamp,性能最优,但是如果某些插件依赖前一次的构建状态,可能存在问题,见[注意事项](/docs/features/persistent-cache#caveats-for-plugins). +- `hash`: 是否检查 load 和 transform 后的内容。 + +#### `persistentCache.envs` + +- **default**: [Farm Env](/docs/features/env) + +可能影响构建过程的环境变量,如果任意一个环境变化了,缓存将会过期。 + + + +### progress +- **default**: `true` + +是否启动进度条 + +### comments +- **default**: `license` + +配置如何处理注释: +* `true`: 保留所有注释 +* `false`: 删除所有注释 +* `license`: 保留所有 **LICENSE 注释**, 移除所有非 LICENSE 注释 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/config/configuring-farm.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/config/configuring-farm.md new file mode 100644 index 000000000..2300c0631 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/config/configuring-farm.md @@ -0,0 +1,96 @@ +# 配置 Farm + +## 配置文件规范 +默认情况下,Farm 从项目根目录下的“farm.config.ts|js|mjs”文件中读取配置,示例配置文件: + +```ts title="farm.config.ts" {5-7} +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + root: process.cwd(), // // 编译的根目录 + // 编译选项 + compilation: { + //... + }, + // 开发服务器选项 + server: { + hmr: true, + //... + }, + // 插件配置 + plugins: [], +}); +``` + +有关配置选项的详细信息,请参阅: +* [`编译器选项`](/docs/config/compilation-options): 配置编译器选项(`compilation`字段),如`input`、`output`、`css 编译`、`打包配置`等。 +* [`开发服务器选项`](/docs/config/dev-server): 配置开发服务器选项(`server`字段),如`port`、`host`、`protocol`等。 +* [`共享选项`](/docs/config/shared): 配置共享选项,如 `root`、`env` 等。 + +:::note +您还可以使用“farm start/build -c my-config.ts”将自定义文件用作配置文件。 +::: + +## 加载Ts配置文件 +Farm 支持开箱即用加载 ts 配置文件,如“farm.config.ts”。 Farm 将首先将“farm.config.ts”及其本地 ts 依赖项打包到“farm-config.xxx.mjs”文件中,然后从磁盘加载它。 由于 Farm 将 `farm.config.ts` 编译为 `mjs` 文件,因此您 **不能** 在 `farm.config.ts` 中使用 `__dirname` 或 `__filename`,请使用 `import.meta.url` 作为替代。 + +或者您可以使用“farm.config.mjs”或“farm.config.cjs”与“@type”来支持类型,避免打包“farm.config.ts”: + +```js title="farm.config.mjs" +/** + * @type {import('@farmfe/core').UserConfig} + */ +export default { + // ... +} +``` + +## 示例 +### 输入和输出 +```ts title="farm.config.ts" {5-7} +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + // compile options + compilation: { + input: { + index: './src/index.html', + about: './src/about.html', + }, + output: { + path: 'build', + publicPath: process.env.NODE_ENV === 'production' ? 'https://my-cdn.com' : '/' + } + }, +}); +``` + +In above example, we configured `./src/index.html` and `./src/about.html` as input, then output the compiled resources to `build` dir. + +### 开发服务器端口 + +```ts title="farm.config.ts" {5-7} +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + server: { + port: 9801 + } +}); +``` + +### 仅用默认优化策略 +```ts title="farm.config.ts" {5-7} +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + // compile options + compilation: { + lazyCompilation: false, + persistentCache: false, + minify: false, + treeShake: false + }, +}); +``` + diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/config/dev-server.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/config/dev-server.md new file mode 100644 index 000000000..f74e733a1 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/config/dev-server.md @@ -0,0 +1,157 @@ +# DevServer 配置 - server + +配置 Farm Dev Server 的行为。示例: + +```ts +import type { UserConfig } from "@farmfe/core"; + +function defineConfig(config: UserConfig) { + return config; +} + +export default defineConfig({ + // 所有 dev server 选项都在 server 下面 + server: { + port: 9000, + // ... + }, +}); +``` + +类型: + +```ts +export interface UserServerConfig { + port?: number; + // https?: boolean; + protocol?: "http" | "https"; + hostname?: string; + // http2?: boolean; + hmr?: boolean | UserHmrConfig; + proxy?: Record; + strictPort?: boolean; + open?: boolean; + host?: string; + cors?: boolean | cors.Options; + // whether to serve static assets in spa mode, default to true + spa?: boolean; + plugins?: DevServerPlugin[]; + writeToDisk?: boolean; +} +``` + +### port + +- **默认值**: `9000` + +DevServer 监听的端口。 + + + +### hmr + +- **默认值**: 对于 start 命令是 `true`,其他命令是 false + +启用 HMR,开启后启用 HMR 能力,将会监听编译过程中涉及到的模块的变动,当模块变化时,自动触发重编译并将结果推送给 Farm Runtime 进行更新。也可以通过一个对象来配置 HMR,例如: + +```ts +import type { UserConfig } from '@farmfe/core'; + +function defineConfig(config: UserConfig) { + return config; +} + +export default defineConfig({ + // 所有 dev server 选项都在 server 下面 + server: { + hmr: { + // 配置 web socket 监听的端口 + port: 9802 + // 配置 web socket 监听的 host + host: 'localhost', + // 配置文件监听时,忽略的文件 + ignores: ['auto_generated/*'] + } + // ... + } +}); +``` + +#### `hmr.port` + +- **默认值**: `9801` + +Web Socket 服务器监听的端口 + +#### `hmr.host` + +- **默认值**: `localhost` + +Web Socket 服务器监听的 Host + +### proxy + +- **默认值**: `undefined` + +配置服务器代理。基于 [http-proxy](https://github.com/http-party/node-http-proxy?tab=readme-ov-file#options) 实现,具体选项参考其文档,示例: + +```ts +import type { UserConfig } from "@farmfe/core"; + +function defineConfig(config: UserConfig) { + return config; +} + +export default defineConfig({ + server: { + proxy: { + "/api": { + target: "https://music-erkelost.vercel.app/banner", + changeOrigin: true, + pathRewrite: (path: any) => path.replace(/^\/api/, ""), + }, + }, + }, +}); +``` + + + +### open + +- **默认值**: `false` + +编译完成后自动打开浏览器到对应的页面。 + +### host + +- **默认值**: `localhost` + +Dev Server 监听的 host。 + +### plugins + +- **默认值**: `[]` + +配置 Farm 的 Dev Server 插件,通过 Dev Server 插件可以扩展 DevServer 的上下文,添加 middleware 等。插件就是一个函数,插件示例如下: + +```ts +export function hmrPlugin(devServer: DevServer) { + const { config, logger } = devServer; + if (config.hmr) { + devServer.ws = new WebSocketServer({ + port: config.hmr.port, + host: config.hmr.host, + }); + devServer.app().use(hmr(devServer)); + devServer.hmrEngine = new HmrEngine( + devServer.getCompiler(), + devServer, + logger + ); + } +} +``` + +然后将该插件配置到 `server.plugins` 中。 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/config/shared.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/config/shared.md new file mode 100644 index 000000000..8efa974e4 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/config/shared.md @@ -0,0 +1,77 @@ +# 通用配置 + +为 Farm 的 DevServer 和编译器配置共享选项。 例如: + +```ts +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + // All dev server options are under server + root: process.cwd(), +}); +``` + +类型: +```ts +export interface UserConfig { + /** 该项目的当前根目录,默认为当前工作目录 */ + root?: string; + envDir?: string; + envPrefix?: string | string[]; + /** 该目录下的文件将始终被视为静态资产。 在dev中提供它,并在构建时将其复制到output.path */ + publicDir?: string; + /** js 插件(这是一个 javascript 对象)和 rust 插件(这是引用 .farm 文件或包的字符串) */ + plugins?: (RustPlugin | JsPlugin | JsPlugin[])[]; + /** vite 插件 */ + vitePlugins?: (object | (() => { vitePlugin: any; filters: string[] }))[]; + // compilation?: Pick; + // server?: UserServerConfig; +} +``` +## root + +- **default**: `process.cwd()` + +配置项目编译的根目录。 所有相对路径在编译期间都是相对于 `root` 的。 + +## clearScreen +- **default**: `true` + +开始编译时是否清屏。 + +## envDir +- **default**: `` + +配置目录以加载 `.env`、`.env.development`、`.env.Production` 文件。 默认情况下它与 root 相同。 + +```ts +import { defineConfig } from '@farmfe/core'; +import { resolve } from 'path'; +export default defineConfig({ + envPrefix: ['FARM_', 'CUSTOM_PREFIX_', 'NEW_'], + envDir: resolve(process.cwd(), './env'), +}); +``` +在上面的示例中,将从 `/env` 目录加载 `.env`、`.env.development`、`.env.Production` 文件。 + +## envPrefix +- **default**: `['FARM_', 'VITE_']` + +以 `envPrefix` 开头的环境变量将自动注入 [`define`](/docs/config/compilation-options#define)。 + +## publicDir +- **default**: `public` + +`publicDir` 下的文件将始终被视为静态资源。 在 dev 时可以通过 dev server 直接访问,在构建时会将其复制到 [`output.path`](/docs/config/compilation-options#outputpath)。 + +例如,您可以将字体等静态资源添加到 `public` 目录,并将它们用作 `/xxx.ttf` 。 + +## plugins +- **default**: `[]` + +配置 Farm 插件。 参考[使用 Farm 插件](/docs/using-plugins#farm-compilation-plugins) + +## vitePlugins +- **default**: `[]` + +配置 Vite/Rollup/Unplugin 插件。 参见 [使用Vite插件](/docs/using-plugins#using-viterollupunplugin-plugins-in-farm) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/contribution.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/contribution.md new file mode 100644 index 000000000..5c26c2140 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/contribution.md @@ -0,0 +1,135 @@ +# 贡献指南 + +非常感谢您对 Farm 的贡献, 在您提交 Pull Request 之前, 请先阅读以下指南。 + +## 行为规范准则 + +所有贡献者都应该遵循 Rust [行为规范](https://www.rust-lang.org/policies/code-of-conduct)。 + +## 错误报告 + +目前 Farm 正在快速开发和迭代中, 在开发和使用中可能会遇到一些问题, 如果您遇到了一些我们不可预料的问题, 请提交 issues 用来报告错误问题, 通过新建一个 [issues](https://github.com/farm-fe/farm/issues/new/choose) 来报告您所遇到的问题。 + +## 创建新特性 + +如果要创建新的功能或者特性, 请在 issues 中添加 [feature request](https://github.com/farm-fe/farm/issues/new/choose)。 + +## 提交代码指南 + +- 编写代码的时候, 请遵循代码编写规范。 + +- 设置您的本地开发环境。 + +- 在您的本地从 `main` 分支切出一个新的功能特性分支。 + +- 使用 `cargo test` 确保所有测试均能通过。 + +- 如果您已经更改了一些包并准备更新版本,则您应该在根目录中输出`npx changeset` 用来发布新版本并且提交。 我们应该尽量保持发布 `patch` 版本, 如果没有重大更改的情况下,请选择 更新 `patch` 版本 + +- 当你完成你的工作后,请通过 `pnpm run ready` 来验证是否可以在本地正常运行 + +## 设置 + +- Fock 并且 clone 仓库到本地。 + +- 为你的 PR 创建一个新的分支。 `git checkout -b your-branch-name`。 + +- 保证您的 `main` 分支指向远程仓库, 并从分支上发出拉取请求, 请确保您的分支是基于 `main` 分支的, 并且运行: + +```bash + git remote add upstream https://github.com/farm-fe/farm.git + git fetch upstream + git branch --set-upstream-to=upstream/main main +``` + + +## 设置您的本地开发环境 + +### 依赖 + +- 安装 Rust 环境 [rustup](https://www.rust-lang.org/tools/install)。 + +- 确保您的 [Node.js](https://nodejs.org) 版本在 **16** 以上。 + +- 确保您的 [Pnpm](https://pnpm.io) 版本在 **8** 以上。 + +### IDE + +我们推荐使用 `vscode` 进行开发, 并且我们推荐两个必要的插件 + +- `rust-analyzer` 支持 `rust` 语言。 +- `biome` 使用 `biome` 进行格式化和检查代码。 + +你可以在扩展中安装它们 + +### 其他依赖 + +- 在构建 `sass-embedded` 需要用到 [protoc](https://grpc.io/docs/protoc-installation/) 所以您的本地开发环境还需要安装 [protoc](https://grpc.io/docs/protoc-installation/)。 + +**TIP:** 当您在初次开发时, 请确保您的本地环境已经安装了 `protoc`。如果您的本地环境没有安装 `protoc`,则在执行 `pnpm bootstrap` 时会触发脚本, 针对 `mac` `linux` 用户会自动安装 `protoc`, 针对 `windows` 用户不会自动安装, 但是可以根据提示自行下载安装。 + +## 运行项目 + +Farm 的开发启动非常简单, 您只需在根目录中执行 `pnpm bootstrap` 一条命令即可构建所有子包中需要构建的代码。 + +```bash +$ pnpm bootstrap # install the dependencies of the project with series of initialization operations. +``` + +- 使用`pnpm bootstrap`安装依赖项,并通过一系列初始化操作构建核心包。 + +- 使用示例(打开新终端):`cd examples/react && pnpm start`,如果示例不能正常启动,则上报问题。 + +- 如果`examples/react`正常运行,则表明开发环境配置成功。 + +- 如果您更改了`crates`中的 `Rust` 代码,请再次运行 `Packages/core` 下的 `npm run build:rs` 以获取最新的二进制代码。 + +当你在开发 node 侧代码时, 根目录执行 pnpm start 就可以实时调试代码了,当你在开发 rust 侧代码时, 根目录执行 pnpm start:rs 就可以实时调试代码了 + +```bash +// node side +pnpm start + +// rust side +pnpm start:rs +``` + +## 测试 + +我们还需要测试两个部分,一套 `Rust` 测试,一套 `Node` 测试,在您提交代码之前,请确保所有测试均能通过。 + +### Rust 测试 + +- 在根目录下输入 `cargo test` 将会运行所有的 `Rust` 代码测试用例。 + +```sh +# root path or crates path +cargo test +``` + +### Node 测试 + +- 在根目录下输入 `pnpm test` 基于 `vitest` 运行所有的 `Node` 代码测试用例。 + +```sh +# root path +pnpm test +``` + +## 通过脚手架快速创建插件 + +Farm 提供了一个脚手架来帮助您快速创建一个插件, 您可以通过以下命令来创建一个插件。 +您可以 `cd packages/cli` 目录下, 运行 `npm link` 或者全局安装 `@farmfe/cli` 来使用, +安装完成之后, 您可以通过 `farm plugin create` 来创建一个插件, 支持 `rust` 和 `js` 插件 + +```bash +$ farm plugin create # create a plugin support js or rust +``` + +## 小提示 + +Farm 整个项目分为两个部分, JavaScript 和 Rust。 + +- **JavaScript** 部分: 查看 packages 文件夹中的代码, 包含核心包(开发服务, 文件监听, 编译器包装), 脚手架, 运行时和运行时插件 (模块系统, HMR 热更新)。 + +- **Rust** 部分: 查看 crates 以及 rust-plugin 文件夹中的代码, 包含核心包 (编译上下文, 插件驱动等), 编译器 (编译进程、HMR 更新等), Rust 插件。 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/_category_.json b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/_category_.json new file mode 100644 index 000000000..828d95ac6 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "编译能力", + "position": 3, + "link": { + "type": "generated-index", + "description": "Features supported by Farm" + } +} diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/css.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/css.md new file mode 100644 index 000000000..4ac3888a7 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/css.md @@ -0,0 +1,180 @@ +# Css/Sass/Less +Farm 支持开箱即用的 CSS 编译,例如: + +```tsx +import './index.css'; +``` + +然后 Farm 会自动为 css 模块启用 HMR,并自动打包 Css。 + +## CSS Modules +Farm 默认支持 css modules,以 `.module.css|less|scss|sass` 结尾的模块默认将被视为 `Css Modules`。 + +```tsx title="comp.tsx" +// ... +import styles from './index.module.css' + +export function Comp() { + return
Main
+} +``` +```css title="index.module.css" +.main { + color: red; +} +``` + +您可以通过[`css.modules`](/docs/config/farm-config#cssmodules)配置CSS模块。 例如,您可以将 `css.modules.paths` 设置为 `['.css|sass|less|scss']` 那么所有 css 文件将被视为 css 模块。 + +## CSS 预处理器 +Farm 官方提供了 sass、less、postcss 插件。 + +### Sass +Farm Sass 插件是一个 Rust 插件,使用 `sass-embeded`(后面我们可能会迁移到纯 Rust 编写的 [`grass`](https://github.com/connorskees/grass))。 + +在 Farm 中编译 `sass/scss` 模块的步骤如下: + +1. 安装依赖 +```sh +# npm 或者 yarn 或者 pnpm,使用任意你喜欢的包管理器 +npm install @farmfe/plugin-sass +``` + +2. 配置插件 +```ts +import type { UserConfig } from '@farmfe/core'; + +export default { + // ... + plugins: ['@farmfe/plugin-sass'] // 配置 Rust 插件的包名即可引入和使用该插件 + // 如果你希望配置 plugin-sass 的参数,可以使用如下形式的配置 + // plugins: [ + // ['@farmfe/plugin-sass', { sourceMap: false }] + // ] +}; +``` + +3. 导入sass模块 +```ts +import './index.scss'; +``` + +如果要将 `sass` 与 `css modules` 一起使用,请将文件名从 `index.scss` 更改为 `index.module.scss`,请参阅 [css modules](#css-modules)。 + +`@farmfe/plugin-sass` 支持很多选项,使用 plugins 的数组配置指定插件 sass 的选项: + +```ts +import type { UserConfig } from '@farmfe/core'; + +export default { + plugins: [ + // 通过数组语法指定插件以及配置 + [ + '@farmfe/plugin-sass', + // 所有支持的选项如下 + { + sourceMap: true // bool + sourceMapIncludeSources: true, // bool + alertAscii: true, // bool + alertColor: true, // bool + charset: true, // bool + quietDeps: true, // bool + verbose: false, // bool + style: 'expanded' | 'compressed' // output code style + } + ] + ] +}; +``` + +### Less +Farm less 插件是一个 Js 插件。 在 Farm 中编译 `less` 模块的步骤如下: + +1. 安装依赖 +```sh +# npm or yarn or pnpm, choose your favorite package manager +npm install @farmfe/js-plugin-less +``` + +2. 配置插件 +```ts +import type { UserConfig } from '@farmfe/core'; +import less from '@farmfe/js-plugin-less'; + +export default { + // ... + plugins: [less()] // pass argument to the less function like `less({ /* your options */ })` to specify less options +}; +``` + +3. 导入 Less 模块 +```ts +import './index.less'; +``` + +要将 `less` 与 `css modules` 一起使用,请将文件名从 `index.less` 更改为 `index.module.less`,参考 [css modules](#css-modules) + +### Postcss +Farm postcss 插件是一个 JS 插件,在 Farm 中引入 postcss 的步骤如下: + +1. 安装依赖 +```sh +# npm or yarn or pnpm, choose your favorite package manager +npm install @farmfe/js-plugin-postcss +``` + +2. 配置插件 +```ts +import type { UserConfig } from '@farmfe/core'; +import postcss from '@farmfe/js-plugin-postcss'; + +export default { + // ... + plugins: [postcss()] // pass argument to the less function like `less({ /* your options */ })` to specify less options +}; +``` + +3. 配置 `postcss.config.js`,引入需要的 postcss 插件 + +```js title=postcss.config.js +module.exports = { + plugins: [ + require('postcss-pxtorem')({ + rootValue: 16, + propList: ['*'], + }), + require('tailwindcss'), + ] +} +``` + +## Css Prefixer +Farm 支持开箱即用的 css prefixer,您可以使用`compilation.css.prefixer`对其进行配置。 + +```ts title="farm.config.ts" +import type { UserConfig } from '@farmfe/core'; + +function defineConfig(config: UserConfig) { + return config; +} + +export default defineConfig({ + compilation: { + css: { + prefix: { + targets: ['ie >= 10'] + } + }, + }, +}); +``` +对于输入代码 +```css +div { + display: flex; +} +``` +输出 +```css +div{display:-ms-flexbox;display:flex} +``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/dev-server.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/dev-server.md new file mode 100644 index 000000000..381b00216 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/dev-server.md @@ -0,0 +1,84 @@ +# DevServer 和 HMR +Farm默认在 `development` 环境中提供 `DevServer` 并启用了 `HMR` 。 + +## 配置 Dev Server +Farm提供了许多有用的选项来配置开发服务器。所有的DevServer选项都是通过[`server`](/zh/docs/config/dev-server)配置的。 + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + server: { + port: 9801, + cors: true, + proxy: { + // ... + }, + open: true, + } +}) +``` + +:::note +如果你正在为Farm开发工具,请参考[Javascript API](/zh/docs/api/javascript-api)然后以编程方式创建开发服务器。 +::: + +## Dev Server 中间件 +你可以使用 [`middlewares`](/zh/docs/config/dev-server#middlewares) 来处理开发服务器的请求。例如: + +```ts title="farm.config.ts" +import { Middleware } from 'koa'; +import { Server, defineConfig } from '@farmfe/core'; + +export function headers(devSeverContext: Server): Middleware { + const { config } = devSeverContext; + if (!config.headers) return; + + return async (ctx, next) => { + if (config.headers) { + for (const name in config.headers) { + ctx.set(name, config.headers[name] as string | string[]); + } + } + await next(); + }; +} + +export default defineConfig({ + server: { + middlewares: [ + headers + ] + } +}) +``` + +在上述示例中,Farm中间件是一个暴露 `Koa Middleware` 的函数。常见的Koa中间件可以直接使用,例如: + +```ts {2,7} +import { defineConfig } from "@farmfe/core"; +import compression from 'koa-compress'; + +export default defineConfig({ + server: { + middlewares: [ + compression + ] + }, +}); +``` + +## Hot Module Replacement(HMR) +Farm提供了一个与 [兼容 Vite 的HMR API](/zh/docs/api/hmr-api)。如果你是框架作者,可以利用这个 API 来更新你的应用实例,而无需重新加载页面。 + +HMR API允许你在应用运行时接收模块的更新,并应用这些更新,而无需重新加载整个页面。这可以极大地提高开发效率,因为它允许你在不丢失应用状态的情况下看到代码更改的效果。 + +* 对于React,官方插件 [@farmfe/plugin-react](/docs/plugins/official-plugins/react)会自动启用 HMR。 +* 对于Vue、Solid等框架,它们的插件如 `@vitejs/plugin-vue` 、 `vite-plugin-solid` 等都支持HMR。 + +Farm提供了官方模板,这些模板已经设置好了所有这些能力,你可以通过create-farm创建应用,然后所有的HMR能力就可用了。 + +:::note +* 对于应用用户,HMR通常是开箱即用的,如果你需要自定义HMR行为,可以参考 **[兼容 Vite 的 HMR API](/zh/docs/api/hmr-api)**。 +* 如果你是框架作者,可以参考 [HMR选项](/zh/docs/config/dev-server#hmr) 来配置HMR。 +::: diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/env.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/env.md new file mode 100644 index 000000000..f903805d2 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/env.md @@ -0,0 +1,65 @@ +# 环境变量和模式 + +`Farm` 通过 `process.env.NODE_ENV` 来区分 `development` 环境和 `production` 环境。 + +在不同的环境中,环境变量会被静态替换,因此使用静态常量来表示环境变量,而不是使用动态表达式。 + +## `.env` 文件 + +`Farm` 使用 `dotenv` 来加载你的额外环境变量,例如 `.env` 文件。默认情况下, `.env` 文件从 [`root`](/zh/docs/config/shared#root) 加载,你可以使用 [`envDir`](#envdir) 来自定义。 + +```js +// .env +FARM_APP_SECRET=secret +Farm_APP_PASSWORD=password +APP_VERSION=1.0.0 +``` + +`Farm` 通过dotenv加载 `.env` 文件,将其加载到 `process.env` 中,并最终将其注入到define中。 + +:::danger +为了确保客户端的安全,防止当前系统中的环境变量被暴露给客户端, `Farm` 只会识别以 `FARM_`、`VITE_` 开头的重要环境变量,以便更好地兼容vite及其生态系统。前缀可以通过 [`envPrefix`](#envprefix) 前缀配置 +::: + +`Farm` 通过dotenv-expand扩展环境变量。对于仅用于开发的环境变量,使用 `.env.development` 文件,对于仅用于生产的环境变量,使用 `.env.production` 文件,对于通过 `--mode ` 传递的自定义模式,从 `.env.` 文件加载。 + +* 如果你想自定义加载 `.env` 文件的目录,你可以配置 [`envDir`](#envdir)。 +* 如果你想自定义注入到 [`define`](/zh/docs/config/compilation-options#define) 的环境变量的前缀,你可以配置 [`envPrefix`](#envprefix)。 + + +## envPrefix + +- **默认值**: `FARM_`、`VITE_` + +通过配置 `envPrefix` 来自定义环境变量的前缀。以 `envPrefix` 开头的环境变量将自动注入到define中。例如,在 `.env` 文件中: + +```js +// .env +FARM_CUSTOM_VERSION=1.0.0 +APP_VERSION=0.1.0 +``` + +那么 `FARM_CUSTOM_VERSION` 将被注入到你的业务代码中,但 `APP_VERSION` 不会被注入。在你的业务代码中: + +```tsx +export function MyComp() { + const farmCustomVersion = FARM_CUSTOM_VERSION; + return
Farm Custom Version: {farmCustomVersion}
+} +``` +`FARM_CUSTOM_VERSION` 将自动被替换为 `'1.0.0'` 。 + + + +## envDir +- **默认值**: `` + +加载env文件的目录。默认情况下,Farm从根目录加载 [`env 文件`](#env-文件)。 + +```ts +export defineConfig({ + envDir: './env' +}) +``` + +对于上述配置示例,Farm将从 `/env` 目录加载`.env`、`.env.development`等环境变量文件。 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/html.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/html.md new file mode 100644 index 000000000..47f1962a5 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/html.md @@ -0,0 +1,114 @@ +--- +sidebar_position: 1 +--- + +# Html + +## 基本用法 + +Farm 支持开箱即用地编译 Html,并且在构建 Web 项目时应该使用 Html 作为入口,例如: + +```ts title="farm.config.ts" +import type { UserConfig } from "@farmfe/core"; + +export default defineConfig({ + input: { + index: "./index.html", // using ./index.html as entry + }, +}); +``` + +:::note +如果未指定 `input`,则默认为 `{index: './index.html'}`。 +::: + +在`./index.html`中,应该使用` + + +``` + +你也可以使用``来引用你的全局 CSS。 + +Farm 在编译时会将这些 `script` 和 `link` 转化为最终的生产可用的产物。请注意,当您想引用本地模块时,必须使用 `相对路径`,例如 `` 将引用本地模块并编译它, 但 `` 或 `` 则不会。 + +:::note +`script` 和 `link` 可以引用 farm 支持的任何模块类型,例如,`js`、`jsx`、`ts`、`tsx` 或插件支持的其他模块类型。 您可以根据需要使用任意数量的 `script` 或 `link`。 +::: + +## 多页面应用程序 - MPA + +如果您正在构建多页面应用程序,只需配置多个 html,例如: + +```ts title="farm.config.ts" +import type { UserConfig } from '@farmfe/core'; + +export default defineConfig({ + input: { + home: './index.html', // Home Page + about: './about.html', // About Page + // ... more pages + } +}) +``` + +Farm 将并行编译这些页面。 + +## 继承 html 模板 + +Farm 支持通过使用 `html.base` 配置继承 html 模板,这在构建共享 html 的多页面应用程序时很有帮助。 + +```ts title="farm.config.ts" +import type { UserConfig } from "@farmfe/core"; + +export function defineConfig(config: UserConfig) { + return config; +} + +export default defineConfig({ + // ... + compilation: { + input: { + home: "./index.html", // Home Page + about: "./about.html", // About Page + // ... more pages + }, + html: { + base: "./base.html", + }, + }, +}); +``` + +然后添加一个`base.html`,占位符`{{children}}`将被替换为子 html 的内容。 + +```html title="./base.html" + + + + + + + Document + + +
+ + {{children}} + + +``` + +继承`./base.html`: + +```html title="./src/home.html" + + +``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/lazy-compilation.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/lazy-compilation.md new file mode 100644 index 000000000..6fe094414 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/lazy-compilation.md @@ -0,0 +1,58 @@ +# 懒编译 +当涉及到一个大项目时,您可能希望将它们分成小块并按需加载。 这可以通过动态导入来实现。 + +````js +const page = React.lazy(() => import('./page')); // 延迟加载页面 +```` + +默认情况下,Farm 会在开发时延迟编译这些动态导入,仅在模块真正执行时才编译它们。 延迟编译可以极大提速大型项目的编译。 + +:::note +对于生产构建,延迟编译始终被禁用。 +::: + +请注意,正确使用`动态导入`对于使`懒编译`更好地工作非常重要。 例如,如果你的一个页面有一个很大的依赖项,但是这个依赖项在这个页面渲染之前不会被使用,那么有必要确保这个大的依赖项是动态导入的,所以它不会被编译,直到页面执行。 + +## 配置延迟编译 +使用`compilation.lazyCompilation`来启用或禁用它: + +```ts title="farm.config.ts" +export default { + compilation: { + lazyCompilation: true, + }, +}; +``` + +## 懒编译如何工作 +当启用延迟编译时,Farm 将首先分析您的所有`动态导入`,例如: + +```js +const page = React.lazy(() => import('./page')); +``` +Farm 会将 `./page` 视为应该延迟编译的模块,并且不会编译它,相反,Farm 将为 `./page` 返回一个虚拟占位符模块,如下所示: + +```ts +// ... other actions +const compilingModules = FarmModuleSystem.compilingModules; +// 返回一个promise,这个promise将在延迟编译完成后 resolve。 +let promise = Promise.resolve(); + +// 模块已经在懒编译中 +if (compilingModules.has(modulePath)) { + promise = promise.then(() => compilingModules.get(modulePath)); +} else { + // 请求开发服务器进行延迟编译 + const url = '/__lazy_compile?paths=' + paths.join(',') + `&t=${Date.now()}`; + promise = import(url).then((module: any) => { + const result: LazyCompileResult = module.default; + // ... + }); + // ... more actions +} + +export const __farm_async = true; +export default promise; +``` + +上面的例子说明了虚拟占位符模块的基本结构。 当占位符执行时,它将请求开发服务器编译该模块及其依赖项。 从开发服务器获取延迟编译结果后,占位符模块会将这些更改修补到 Farm 的运行时模块系统。 \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/optimization.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/optimization.md new file mode 100644 index 000000000..aafccce55 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/optimization.md @@ -0,0 +1 @@ +# Product Optimization \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/script.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/script.md new file mode 100644 index 000000000..1c666cfb6 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/script.md @@ -0,0 +1,193 @@ +# TS/TSX + +Farm 支持开箱即用地编译`Js/Jsx/Ts/Tsx`,并默认将`Jsx/Tsx`编译为 React。 + +```tsx title="./button.tsx" +import Button from "./Button"; + +function ButtonGroup(props: ButtonProps) { + return ( +
+ {props.buttons.map((b) => ( + + ))} +
+ ); +} +``` + +Farm 使用 SWC 来编译脚本,Farm 为脚本编译设置了合理的默认配置。 另外,您可以使用`compilation.script`来配置如何编译脚本文件。 有关详细信息,请参阅 [compilation.script](/docs/config/farm-config#compilation-options)。 + +## 配置 Swc 解析器 + +您可以通过`compilation.script.parser`配置 SWC 解析器。 请参阅 https://swc.rs/docs/configuration/compilation#jscparser。 + +例如,如果你想启用装饰器,你可以设置`compilation.script.parser.esConfig.decorators`(如果模块是 TS,则设置 tsConfig.decorators): + +```ts title="farm.config.ts" +export default { + compilation: { + script: { + // for .js/.jsx files + esConfig: { + decorators: true, + }, + // for .ts/.tsx files + tsConfig: { + decorators: true, + }, + }, + }, +}; +``` + +默认情况下,Farm 为`.jsx|.tsx`文件设置`jsx: true`。 其他字段默认为 SWC 的默认值。 + +## 配置目标执行环境 + +运行项目时使用`compilation.script.target`配置目标环境,Farm 将其默认设置为`ESNext`。 + +此选项可以与`compilation.presetEnv`一起使用,以针对旧浏览器优雅地降级您的项目。 例如,您可以将 target 设置为 `ES5` 并启用 `presetEnv`,那么您的项目将完全降级到 ES5。 + +```ts title="farm.config.ts" +export default { + compilation: { + script: { + target: "ES5", + }, + presetEnv: true, + }, +}; +``` + +有关`presetEnv`的更多信息,请参阅 [Polyfill](/docs/features/polyfill)。 + +## 装饰器 + +装饰器默认不启用, 可以通过设置 `compilation.script.parser.tsConfig.decorators` 为 `true` 来启用装饰器。 + +```ts +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + compilation: { + script: { + parser: { + tsConfig: { + // 启用装饰器 + decorators: true, + }, + }, + // 配置装饰器 + decorators: { + legacyDecorator: true, + decoratorMetadata: false, + decoratorVersion: '2021-12', + includes: ["src/broken.ts"], + excludes: ['node_modules/'], + } + }, + }, +}); +``` + +> Farm 提供了一个装饰器的示例,可以看 https://github.com/farm-fe/farm/tree/main/examples/decorators + +> 默认情况下, Farm 不会转译 `node_modules` 下的装饰器, 参考 [compilation.script.decorators.excludes](/docs/config/farm-config#scriptdecorators). + +## 使用 SWC 插件 + +SWC Plugins 可以直接在 Farm 中使用,例如我们在 Farm 中使用 swc-plugin-vue-jsx 来编译 vue jsx: + +```ts title="farm.config.ts" +import jsPluginVue from "@farmfe/js-plugin-vue"; + +/** + * @type {import('@farmfe/core').UserConfig} + */ +export default { + compilation: { + script: { + plugins: [ + { + name: "swc-plugin-vue-jsx", + options: { + transformOn: true, + optimize: true, + }, + filters: { + // resolvedPaths: [".+"] + moduleTypes: ["tsx", "jsx"], + }, + }, + ], + }, + }, + plugins: [jsPluginVue()], +}; +``` + +有关更多详细信息,请参阅[使用插件](/docs/using-plugins#using-swc-plugins)。 + +## Vite 风格的 `import.meta.glob` + +Farm 完整支持 Vite 风格的 `import.meta.glob`, 参考 [glob import](https://vitejs.dev/guide/features.html#glob-import). + +例如: + +```ts +const modules = import.meta.glob("./dir/*.js"); +``` + +将会被编译成以下结果 + +```ts +// code produced by Farm +const modules = { + "./dir/foo.js": () => import("./dir/foo.js"), + "./dir/bar.js": () => import("./dir/bar.js"), +}; +``` + +使用 `{ eager: true }` 后: + +```ts +const modules = import.meta.glob("./dir/*.js", { eager: true }); +``` + +将会被编译成以下结果: + +```ts +// code produced by Farm +import * as __glob__0_0 from "./dir/foo.js"; +import * as __glob__0_1 from "./dir/bar.js"; +const modules = { + "./dir/foo.js": __glob__0_0, + "./dir/bar.js": __glob__0_1, +}; +``` + +支持数组形式: + +```ts +const modules = import.meta.glob(["./dir/*.js", "./another/*.js"]); +``` + +支持通过 `!` 排除某些匹配: + +```ts +const modules = import.meta.glob(["./dir/*.js", "!**/bar.js"]); +``` + +```ts +// code produced by Farm +const modules = { + "./dir/foo.js": () => import("./dir/foo.js"), +}; +``` + +:::note + +- `import.meta.glob` 参数必须全部是字面量,不能使用表达式。 +- `import.meta.glob` 在编译时处理和转换,在运行时不存在。 + ::: diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/sourcemap.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/sourcemap.md new file mode 100644 index 000000000..31a1baf50 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/sourcemap.md @@ -0,0 +1,22 @@ +# Source Map +Farm 支持 Source Map,默认情况下自动启用。 可以通过选项启用或禁用 sourcemap。 + +:::note +Farm 默认不会为 node_modules 下的文件生成 sourcemap,如果你想为 node_modules 下的文件生成 sourcemap,请将 `compilation.sourcemap` 配置为`all`。 +::: + +使用`compilation.sourcemap`配置 sourcemap 生成: +```ts title="farm.config.ts" +export default { + compilation: { + sourcemap: 'all', // generate sourcemap for modules under node_modules + }, +}; +``` + +所有选项如下: +* **`true`**:只为不在`node_modules`下的文件生成 sourcemap,并生成单独的 sourcemap 文件 +* **`false`**:禁用源映射 +* **`inline`**:只为不在`node_modules`下的文件生成 sourcemap,并将 sourcemap 内联到产物中,不生成单独的文件 +* **`all`**:为所有文件生成 sourcemap,并生成单独的 sourcemap 文件 +* **`all-inline`**:为所有文件生成 sourcemap,并将 sourcemap 内联到产品中,不生成单独的文件 \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/static.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/static.md new file mode 100644 index 000000000..623adf126 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/features/static.md @@ -0,0 +1,61 @@ +# 静态资源 +> v0.4 及以上支持 +Farm 支持三种资源加载方式: `url` , `inline` , `raw` 。 + +## 以 URL 形式使用 +导入图片: +```jsx +import rocketUrl from './assets/rocket.svg'; // return the url of this image + +export function Main() { + return // using the url +} +``` + +导入图片时默认以 URL 的形式。 当使用 URL 形式导入图像时,图像将直接复制到输出目录,并且图像模块本身将被编译为 js 模块,如下所示: + +```js +export default '/rocket..svg' +``` + +使用 `compilation.output.assetsFilename` 来配置你的资源名称。 + +## 内联 + +使用查询 `?inline` 告诉 Farm 你想要内联你的资源,然后资源将被转换为 `base64`,例如: + +```js +// importer +import logo from './assets/logo.png?inline'; // logo is a base 64 str + +// the image module will be compiled to: +export default 'data:image/png,base64,xxxxx=='; +``` + +## 原始字符串 +例如,使用查询`?raw`告诉 Farm 您要读取资产的原始字符串 + +```js +// import +import logo from './assets/license.txt?raw'; // return the content string of the assets + +// the txt file will be compiled to: +export default 'MIT xxxx'; +``` + +## 相关配置 +* 使用 `compilation.output.assetFileName` 来控制产物文件名 +* 使用 `compilation.assets.include` 将更多类型的文件视为静态资源。 + +```js +export default { + compilation: { + output: { + assetsFilename: 'assets/[resourceName].[hash].[ext]', // [] 里面的是 Farm 支持的全部占位符 + }, + assets: { + include: ['txt'] // 额外静态资源类型 + } + } +} +``` \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/electron.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/electron.mdx new file mode 100644 index 000000000..16656f386 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/electron.mdx @@ -0,0 +1,30 @@ +import { PackageManagerTabs } from "../../../../../src/theme/PackageManagerTabs"; + +# Electron + +基于 `Farm` 创建一个 `Electron` 项目。 + +`Farm` 提供两种方案来支持创建 `Electron` 项目: +- 使用 `create-farm` 脚手架创建脚手架项目 +- 你可以根据当前文档手动创建一个 `Electron` 项目 + +### 创建 Electron 项目 + + + + +在 `Select Framework` 中选择 `Electron` 模版 + +开发环境时运行 + + + +在生产环境下进行打包 + + + +预览生产环境打包之后构建的产物 + + + +如若想查看示例详情: [Electron 示例](https://github.com/farm-fe/farm/tree/main/examples/electron) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/lit.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/lit.mdx new file mode 100644 index 000000000..fab8eaf3d --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/lit.mdx @@ -0,0 +1,55 @@ +import { PackageManagerTabs } from "../../../../../src/theme/PackageManagerTabs"; + +# Lit + +基于 `Farm` 创建一个 `Lit` 项目。 + +`Farm` 提供两种方案来支持创建 `Lit` 项目: +- 使用 `create-farm` 脚手架创建脚手架项目 +- 你可以根据当前文档手动创建一个 `Lit` 项目 + +### 创建 Lit 项目 + + + + +在 `Select Framework` 中选择 `Lit` 模版 + +在使用 lit 的情况下我们需要配置`装饰器` + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + presetEnv: false, + script: { + plugins: [], + target: 'es2022', + parser: { + tsConfig: { + decorators: true, + dts: false, + noEarlyErrors: false, + tsx: false + } + } + } + } +}); + +``` + +开发环境时运行 + + + +在生产环境下进行打包 + + + +预览生产环境打包之后构建的产物 + + + +如若想查看示例详情: [Lit 示例](https://github.com/farm-fe/farm/tree/main/examples/Lit) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/nestjs.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/nestjs.mdx new file mode 100644 index 000000000..f2df620c7 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/nestjs.mdx @@ -0,0 +1,29 @@ +import { PackageManagerTabs } from "../../../../../src/theme/PackageManagerTabs"; + +# NestJs + +基于 `Farm` 创建一个 `NestJs` 项目。 + +`Farm` 提供两种方案来支持创建 `NestJs` 项目: +- 使用 `create-farm` 脚手架创建脚手架项目 +- 你可以根据当前文档手动创建一个 `NestJs` 项目 + +### 创建 NestJs 项目 + + + +在 `Select Framework` 中选择 `NestJs` 模版 + +开发环境时运行 + + + +在生产环境下进行打包 + + + +预览生产环境打包之后构建的产物 + + + +如若想查看示例详情: [Nestjs 示例](https://github.com/farm-fe/farm/tree/main/examples/nestjs) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/preact.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/preact.mdx new file mode 100644 index 000000000..4d3198828 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/preact.mdx @@ -0,0 +1,43 @@ +import { PackageManagerTabs } from "../../../../../src/theme/PackageManagerTabs"; + +# Preact + + +基于 `Farm` 创建一个 `Preact` 项目。 + +`Farm` 提供两种方案来支持创建 `Preact` 项目: +- 使用 `create-farm` 脚手架创建脚手架项目 +- 你可以根据当前文档手动创建一个 `Preact` 项目 + +### 创建 Preact 项目 + + + +在 `Select Framework` 中选择 `Preact` 模版 + +:::warning Preact +对于 `Preact` 的支持, `Farm` 使用 `vite` 的 `preact` 插件 +::: + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; +import Preact from "vite-plugin-preact"; + +export default defineConfig({ + plugins: [Preact()], +}); +``` + +开发环境时运行 + + + +在生产环境下进行打包 + + + +预览生产环境打包之后构建的产物 + + + +如若想查看示例详情: [Preact 示例](https://github.com/farm-fe/farm/tree/main/examples/preact) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/react.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/react.mdx new file mode 100644 index 000000000..0d446bdf6 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/react.mdx @@ -0,0 +1,115 @@ +import { PackageManagerTabs } from "../../../../../src/theme/PackageManagerTabs"; + +# React + +基于 `Farm` 创建一个 `React` 项目。 + +`Farm` 提供两种方案来支持创建 `React` 项目: +- 使用 `create-farm` 脚手架创建脚手架项目 +- 你可以根据当前文档手动创建一个 `React` 项目 + +### 创建 React 项目 + + + +在 `Select Framework` 中选择 `React` 模版 + +`Farm` 需要通过注册 `@farmfe/plugin-react` 插件来对 `React` 项目进行支持。 + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + plugins: ['@farmfe/plugin-react'], +}); +``` +`@farmfe/plugin-react` 插件由 `Rust` 编写, 因此你不需要显式引入, 通过传递一个字符串包名即可注册。 + +### 集成 `emotion` + +你可以通过注册 `@swc/plugin-emotion` 插件来对 `emotion` 进行支持。 + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + script: { + plugins: [ + { + name: '@swc/plugin-emotion', + options: {}, + filters: { + moduleTypes: ['tsx'], + }, + }, + ], + }, + }, + plugins: [['@farmfe/plugin-react', { "runtime": "automatic", "importSource": "@emotion/react" }]], +}); + +``` + +```javascript title="src/index.tsx" +import { css } from '@emotion/react'; + +const color = 'white'; + +export function Main() { + return ( +
setCount((c) => c + 1)} + css={css` + padding: 32px; + background-color: hotpink; + font-size: 24px; + border-radius: 4px; + &:hover { + color: ${color}; + } + `} + > + {a}: {count} +
+ ); +} +``` + +### 集成 `svgr` + +SVGR 是一个用于将 SVG 转换为 React 组件的工具,Farm 提供了 Js 插件来支持 SVGR。 + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; +import farmJsPluginSvgr from '@farmfe/js-plugin-svgr'; + +export default defineConfig(async (env) => { + return { + plugins: [ + [ + '@farmfe/plugin-react', + { + refresh: process.env.NODE_ENV === 'development', + development: process.env.NODE_ENV === 'development' + } + ], + farmJsPluginSvgr() + ] + }; +}); + +开发环境时运行 + + + +在生产环境下进行打包 + + + +预览生产环境打包之后构建的产物 + + + + +如若想查看示例详情: [React 示例](https://github.com/farm-fe/farm/tree/main/examples/react) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/solid.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/solid.mdx new file mode 100644 index 000000000..4c92811e8 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/solid.mdx @@ -0,0 +1,42 @@ +import { PackageManagerTabs } from "../../../../../src/theme/PackageManagerTabs"; + +# Solid + +基于 `Farm` 创建一个 `Solid` 项目。 + +`Farm` 提供两种方案来支持创建 `Solid` 项目: +- 使用 `create-farm` 脚手架创建脚手架项目 +- 你可以根据当前文档手动创建一个 `Solid` 项目 + +### 创建 Solid 项目 + + + +在 `Select Framework` 中选择 `Solid` 模版 + +:::warning Solid +对于 `Solid` 的支持, `Farm` 推荐使用 `Vite` 插件。 +::: + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; +import Solid from "vite-plugin-solid"; + +export default defineConfig({ + plugins: [Solid()], +}); +``` + +开发环境时运行 + + + +在生产环境下进行打包 + + + +预览生产环境打包之后构建的产物 + + + +如若想查看示例详情: [Solid 示例](https://github.com/farm-fe/farm/tree/main/examples/vite-adapter-solid) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/svelte.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/svelte.mdx new file mode 100644 index 000000000..55ab6383c --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/svelte.mdx @@ -0,0 +1,51 @@ +import { PackageManagerTabs } from "../../../../../src/theme/PackageManagerTabs"; + +# Svelte + +基于 `Farm` 创建一个 `Svelte` 项目。 + +`Farm` 提供两种方案来支持创建 `Svelte` 项目: +- 使用 `create-farm` 脚手架创建脚手架项目 +- 你可以根据当前文档手动创建一个 `Svelte` 项目 + +### 创建 Svelte 项目 + + + +在 `Select Framework` 中选择 `Svelte` 模版 + +:::warning Svelte +对于 `Svelte` 的支持, `Farm` 推荐使用 `Vite` 插件。 +::: + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core' +import { svelte } from '@sveltejs/vite-plugin-svelte' + +export default defineConfig({ + vitePlugins: [svelte()], +}) + +``` + +```javascript title="svelte.config.ts" +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' + +export default { + preprocess: vitePreprocess(), +} +``` + +开发环境时运行 + + + +在生产环境下进行打包 + + + +预览生产环境打包之后构建的产物 + + + +如若想查看示例详情: [Svelte 示例](https://github.com/farm-fe/farm/tree/main/examples/vite-adapter-svelte) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/tauri.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/tauri.mdx new file mode 100644 index 000000000..75b511c83 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/tauri.mdx @@ -0,0 +1,31 @@ +import { PackageManagerTabs } from "../../../../../src/theme/PackageManagerTabs"; + +# Tauri + +基于 `Farm` 创建一个 `Tauri` 项目。 + +`Farm` 提供两种方案来支持创建 `Tauri` 项目: +- 使用 `create-farm` 脚手架创建脚手架项目 +- 你可以根据当前文档手动创建一个 `Tauri` 项目 + +### 创建 Tauri 项目 + + + + +在 `Select Framework` 中选择 `Tauri` 模版 + +开发环境时运行 + + + +在生产环境下进行打包 + + + +预览生产环境打包之后构建的产物 + + + + +如若想查看示例详情: [Tauri 示例](https://github.com/farm-fe/farm/tree/main/examples/Tauri) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/vanilla.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/vanilla.mdx new file mode 100644 index 000000000..758a25490 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/vanilla.mdx @@ -0,0 +1,31 @@ +import { PackageManagerTabs } from "../../../../../src/theme/PackageManagerTabs"; + +# Vanilla + +基于 `Farm` 创建一个 `Vanilla` 项目。 + +`Farm` 提供两种方案来支持创建 `Vanilla` 项目: +- 使用 `create-farm` 脚手架创建脚手架项目 +- 你可以根据当前文档手动创建一个 `Vanilla` 项目 + +### 创建 Vanilla 项目 + + + +在 `Select Framework` 中选择 `Vanilla` 模版 + +运行 vanilla 模版项目不需要安装任何其他依赖,直接启动开发服务器即可 + +开发环境时运行 + + + +在生产环境下进行打包 + + + +预览生产环境打包之后构建的产物 + + + +如若想查看示例详情: [Vanilla 示例](https://github.com/farm-fe/farm/tree/main/crates/create-farm-rs/template/vanilla) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/vue.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/vue.mdx new file mode 100644 index 000000000..94ac2646e --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/frameworks/vue.mdx @@ -0,0 +1,54 @@ +import { PackageManagerTabs } from "../../../../../src/theme/PackageManagerTabs"; + +# Vue + +基于 `Farm` 创建一个 `Vue` 项目。 + +`Farm` 提供两种方案来支持创建 `Vue` 项目: +- 使用 `create-farm` 脚手架创建脚手架项目 +- 你可以根据当前文档手动创建一个 `Vue` 项目 + +### 创建 Vue 项目 + + + +在 `Select Framework` 中选择 `Vue` 模版 + +:::warning Vue +目前 `Farm` 支持 `vue3`, `vue2`, `vue2.7` +对于 `Vue` 插件 `Farm` 推荐使用 `Vite` 插件, 支持的三种 vue 版本需要安装对应的 `vite` 插件, 目前也正在进行原生插件 [fervid](https://github.com/phoenix-ru/fervid)的开发。 +::: + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; +import Vue from '@vite/plugin-vue' + +export default defineConfig({ + plugins: [Vue()], // vue3 plugin +}); +``` + +### 集成 jsx + +```javascript title="farm.config.ts" +import { defineConfig } from '@farmfe/core'; +import Vue from '@vite/plugin-vue-jsx' + +export default defineConfig({ + plugins: [Vue()], +}); +``` + +开发环境时运行 + + + +在生产环境下进行打包 + + + +预览生产环境打包之后构建的产物 + + + +如若想查看示例详情: [Vue 示例](https://github.com/farm-fe/farm/tree/main/examples/vite-adapter-vue) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/migration/from-vite.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/migration/from-vite.md new file mode 100644 index 000000000..dcfffb223 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/migration/from-vite.md @@ -0,0 +1,17 @@ +# 从 Vite 迁移 + +:::note +Vite 插件如 `unocss` 与 `Vite` 深度集成,由于内部设计的差异,这些插件可能与 Farm 不兼容。您可以尝试其他方法,如 `unocss postcss` 插件。 +::: + +从 Vite 迁移非常简单,因为 Farm 与 Vite 兼容。您需要做的就是将 `vite.config.ts` 转换为 `farm.config.ts` + +- 参考[Configuring Farm](/zh/docs/config/configuring-farm) 将 farm 配置选项映射到 vite 配置 +- 对于 `Vite Plugins`,将 `vite.config.ts` 中的`plugins`移动到 `farm.config.ts` 中的 `vitePlugins` + +注意: + +- 一些 Vite 配置选项在 Farm 中是不需要的,例如 `optimizeDeps`,您可以在迁移到 Farm 时忽略这些选项 +- 对于 SSR,您需要将其重构为[Farm SSR](/zh/docs/advanced/ssr) + +我们已将 [Real Vite Admin Project](https://github.com/farm-fe/farm-soybean-admin) 迁移到 Farm。有关详细信息,请查看此迁移示例 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/community-plugins.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/community-plugins.md new file mode 100644 index 000000000..0a2841333 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/community-plugins.md @@ -0,0 +1,98 @@ +# 社区插件 + +## Farm Plugins + +- [farm-pulgin-strip](https://github.com/CCherry07/farm-pulgin-strip): 一个 Farm Rust 插件,用于从代码中删除 debugger 语句和函数,例如 assert.equal 和 console.log 。 + +## Vite/Rollup Plugins + +Farm支持 `Vite/Rollup` 插件开箱即用。所以`Vite/Rollup`或`unplugin`插件可以直接在Farm中使用。 + +:::tip +如果您开发了兼容 Farm 的插件并且想在此处列出,欢迎 PR。 +::: + +使用 `farm.config.ts` 中的 `vitePlugins` 来配置 `Vite/Rollup` 插件。 + +```ts +import { UserConfig } from '@farmfe/core'; +import vue from '@vitejs/plugin-vue'; +import vueJsx from '@vitejs/plugin-vue-jsx'; + +const config: UserConfig = { + vitePlugins: [ + vue(), + vueJsx(), + ] +} +``` + +- **[`@vitejs/plugin-vue`](https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue/README.md)**: Vue 支持. +- **[`@vitejs/plugin-vue-jsx`](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue-jsx)**: Vue Jsx/Tsx 支持. +- **[`vite-plugin-solid`](https://www.npmjs.com/package/vite-plugin-solid)**: Solid 支持 +- **[`vite-plugin-mock`](https://www.npmjs.com/package/vite-plugin-solid)**: Mock 数据. +- ... + +## unplugin + +:::note +目前,您可以在 Farm 中使用“unplugin/vite”进行“unplugin/rollup”。 当[此 PR](https://github.com/unjs/unplugin/pull/341) 合并到 unplugin 时,`unplugin/farm` 将可用。 +::: + +```ts +import Icons from 'unplugin-icons/vite'; +import IconsResolver from 'unplugin-icons/resolver'; +import Components from 'unplugin-vue-components/rollup'; +import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'; +import { FileSystemIconLoader } from 'unplugin-icons/loaders'; + +const config: UserConfig = { + vitePlugins: [ + Icons({ + compiler: 'vue3', + customCollections: { + [collectionName]: FileSystemIconLoader(localIconPath, svg => + svg.replace(/^ + + npm install @farmfe/plugin-dsv + + + yarn add @farmfe/plugin-dsv + + + pnpm add @farmfe/plugin-dsv + + + +## 使用 + +创建一个`farm.config.js`[配置文件](https://www.farmfe.org/docs/config/configuring-farm)并导入插件: + +```js +import { defineConfig } from '@farmfe/core'; +import dsv from '@farmfe/plugin-dsv'; + +export default defineConfig({ + plugins: [ + [ + dsv() + ] + ], +}); +``` + +## 实际示例 + +假设你有一个包含一些关于美味水果信息的CSV(或TSV)文件: + +```csv +type,count +apples,7 +pears,4 +bananas,5 +``` + +并且假设你想在代码的某个部分将该CSV文件作为`Array`导入。添加插件之后(如上所示),你可以直接`import`(或`require`)CSV文件。导入将提供一个`Array`,包含代表CSV文件行的`Objects`: + +```js +import fruit from './fruit.csv'; + +console.log(fruit); +// [ +// { type: 'apples', count: '7' }, +// { type: 'pears', count: '4' }, +// { type: 'bananas', count: '5' } +// ] +``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-dts.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-dts.mdx new file mode 100644 index 000000000..00405e15a --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-dts.mdx @@ -0,0 +1,108 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/js-plugin-dts +支持 `.d.ts` 文件。 该插件用于构建的工具库,为您的 ts 代码生成“.d.ts” + +## Installation + + + + npm install @farmfe/js-plugin-dts + + + yarn add @farmfe/js-plugin-dts + + + pnpm add @farmfe/js-plugin-dts + + + +## Usage +```ts {2,6} +import { UserConfig } from '@farmfe/core'; +import farmJsPluginDts from '@farmfe/js-plugin-dts'; + +const config: UserConfig = { + plugins: [ + farmJsPluginDts({ /* options */ }) + ] +} +``` + +## Options +```ts +import type { ts, Diagnostic } from 'ts-morph'; + +export interface DtsPluginOptions { + /** + * Depends on the root directory + */ + root?: string; + + /** + * Declaration files output directory + */ + outputDir?: string | string[]; + + /** + * set the root path of the entry files + */ + entryRoot?: string; + + /** + * Project init compilerOptions using by ts-morph + */ + compilerOptions?: ts.CompilerOptions | null; + + /** + * Project init tsconfig.json file path by ts-morph + */ + tsConfigPath?: string; + + /** + * set include glob + */ + include?: string | string[]; + + /** + * set exclude glob + */ + exclude?: string | string[]; + + /** + * Whether copy .d.ts source files into outputDir + * + * @default false + */ + copyDtsFiles?: boolean; + + /** + * Whether emit nothing when has any diagnostic + * + * @default false + */ + noEmitOnError?: boolean; + + /** + * Whether skip typescript diagnostics + * + * @default true + */ + skipDiagnostics?: boolean; + + /** + * Customize typescript lib folder path + * + * @default undefined + */ + libFolderPath?: string; + + /** + * According to the length to judge whether there is any type error + */ + afterDiagnostic?: (diagnostics: Diagnostic[]) => void | Promise; +} + +``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-less.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-less.mdx new file mode 100644 index 000000000..20e3904c4 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-less.mdx @@ -0,0 +1,157 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/js-plugin-less +支持 `Less` 编译 + +## Installation + + + + npm install @farmfe/js-plugin-less less + + + yarn add @farmfe/js-plugin-less less + + + pnpm add @farmfe/js-plugin-less less + + + +## Usage +```ts {2,6} +import { UserConfig } from '@farmfe/core'; +import farmJsPluginLess from '@farmfe/js-plugin-less'; + +const config: UserConfig = { + plugins: [ + farmJsPluginLess({ /* options */ }) + ] +} +``` + +## Options +```ts +export type LessPluginOptions = { + lessOptions?: Less.Options; + implementation?: string; + filters?: { + resolvedPaths?: string[]; + moduleTypes?: string[]; + }; + additionalData?: + | string + | ((context?: string, resolvePath?: string) => string | Promise); +}; +``` + +### lessOptions +请参阅[Less 选项](https://lesscss.org/usage/#less-options)。 + +Example: +```ts +import path from 'node:path'; +import { UserConfig } from '@farmfe/core'; +import farmJsPluginLess from '@farmfe/js-plugin-less'; + +const config: UserConfig = { + plugins: [ + farmJsPluginLess({ + lessOptions: { + paths: [path.resolve(process.cwd(), 'styles')] + } + }) + ] +} + +export default config; +``` + +### filters +哪些文件应该由 `less` 处理。 默认为“ `{resolvedPaths: ['\\.less$'] }`”用于加载,“`{ moduleTypes: ['less'] }`”用于转换。 + +* `resolvedPaths`: 仅处理这些路径下的文件。 支持正则表达式。 +* `moduleTypes`:仅处理具有这些模块类型的文件。 + +`resolvedPaths` 和 `moduleTypes` 取并集。 + +Example: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginLess from '@farmfe/js-plugin-less'; + +const config: UserConfig = { + plugins: [ + farmJsPluginLess({ + filters: { + // all files end with .custom-css will be processed + resolvedPaths: ['\\.custom-less$'], + moduleTypes: ['less'] + } + }) + ] +} + +export default config; +``` + +### implementation +`less` 的 `implementation` 包名称。 默认为 `less`。 + +### additionalData +```ts +type AdditionalDataOption = string | ((content?: string, resolvePath?: string) => string | Promise); +``` +要添加到每个 less 文件的附加数据。示例: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginLess from '@farmfe/js-plugin-less'; + +const config: UserConfig = { + plugins: [ + farmJsPluginLess({ + // add variables.less to every less file + additionalData: ` + @import "./src/styles/variables.less"; + ` + }) + ] +} +``` +Less 文件: +```less title="index.less" +.foo { + color: @primary-color; +} +``` +`additionalData` 将会被添加到这个文件的头部: + +```less title="index.less" +@import "./src/styles/variables.less"; + +.foo { + color: @primary-color; +} +``` + +函数形式用法: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginLess from '@farmfe/js-plugin-less'; + +const config: UserConfig = { + plugins: [ + farmJsPluginLess({ + // add variables.less to every less file + additionalData: (content, resolvePath) => { + if (resolvePath === '/path/to/index.less') { + return ` + @import "./src/styles/variables.less"; + `; + } + } + }) + ] +} +``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-postcss.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-postcss.mdx new file mode 100644 index 000000000..499d8c7f3 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-postcss.mdx @@ -0,0 +1,107 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/js-plugin-postcss +支持 `postcss` 的前置编译工作 + +## Installation + + + + npm install @farmfe/js-plugin-postcss postcss + + + yarn add @farmfe/js-plugin-postcss postcss + + + pnpm add @farmfe/js-plugin-postcss postcss + + + +## Usage +```ts {2,6} +import { UserConfig } from '@farmfe/core'; +import farmJsPluginPostcss from '@farmfe/js-plugin-postcss'; + +const config: UserConfig = { + plugins: [ + farmJsPluginPostcss({ /* options */ }) + ] +} +``` + +## Options +```ts +export type PostcssPluginOptions = { + /** + * @default undefined + * postcss-load-config options. path default to farm.config.js root. + */ + postcssLoadConfig?: { + ctx?: postcssLoadConfig.ConfigContext; + path?: string; + options?: Parameters[2]; + }; + filters?: { + resolvedPaths?: string[]; + moduleTypes?: string[]; + }; + implementation?: string; +}; + +``` + +### postcssLoadConfig +Farm 使用 `postcss-load-config` 来加载 `postcss` 配置,因此您可以使用 `postcss-load-config` 的选项。 参考[postcss-load-config](https://github.com/postcss/postcss-load-config)。 + +示例: +```ts +import path from 'node:path'; +import { UserConfig } from '@farmfe/core'; +import farmJsPluginPostcss from '@farmfe/js-plugin-postcss'; + +const config: UserConfig = { + plugins: [ + farmJsPluginPostcss({ + postcssLoadConfig: { + // load config from client/postcss.config.js + path: path.join(process.cwd(), 'client') + } + }) + ] +} + +export default config; +``` + +### filters +哪些文件应该由`postcss`处理。 默认为 `{ moduleTypes: ['css'] }`。 + +* `resolvedPaths`: 仅处理这些路径下的文件。 支持正则表达式。 +* `moduleTypes`:仅处理具有这些模块类型的文件。 请注意,less/sass 文件应首先由 `@farmfe/js-plugin-less`/`@farmfe/plugin-sass` 处理。 + +`resolvedPaths` 和 `moduleTypes` 取并集。 + +例子: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginPostcss from '@farmfe/js-plugin-postcss'; + +const config: UserConfig = { + plugins: [ + farmJsPluginPostcss({ + filters: { + // all files end with .custom-css will be processed + resolvedPaths: ['\\.custom-css$'], + moduleTypes: ['css'] + } + }) + ] +} + +export default config; +``` + +### implementation +`postcss` 的 `implementation` 包名称。 默认为 `postcss`。 \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-sass.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-sass.mdx new file mode 100644 index 000000000..434501940 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-sass.mdx @@ -0,0 +1,186 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/js-plugin-sass +支持 `sass` 编译 + +## Installation + + + + npm install @farmfe/js-plugin-sass sass + + + yarn add @farmfe/js-plugin-sass sass + + + pnpm add @farmfe/js-plugin-sass sass + + + +## Usage +```ts {2,6} +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSass from '@farmfe/js-plugin-sass'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSass({ /* options */ }) + ] +} +``` + +## Options +```ts +export type SassPluginOptions = { + sassOptions?: StringOptions<'async'>; + filters?: { + resolvedPaths?: string[]; + moduleTypes?: string[]; + }; + + /** + * - relative or absolute path + * - globals file will be added to the top of the sass file + * - when file changed, the file can't be hot-reloaded + * + * relative to project root or cwd + */ + implementation?: string | undefined; + globals?: string[]; + additionalData?: + | string + | ((content?: string, resolvePath?: string) => string | Promise); +}; +``` + +### sassOptions +请参阅 [sass 选项](https://sass-lang.com/documentation/js-api/interfaces/options/)。 + +Example: +```ts +import path from 'node:path'; +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSass from '@farmfe/js-plugin-sass'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSass({ + sassOptions: { + loadPaths: [path.resolve(process.cwd(), 'styles')] + } + }) + ] +} + +export default config; +``` + +### filters +哪些文件应该由 `sass` 处理。 对于 load 钩子默认为 `{resolvedPaths: ['\\.(s[ac]ss)$'] }`, 对于 transform 钩子默认为 `{ moduleTypes: ['sass'] }`。 + +* `resolvedPaths`: 仅处理这些路径下的文件。 支持正则表达式。 +* `moduleTypes`:仅处理具有这些模块类型的文件。 + +`resolvedPaths` 和 `moduleTypes` 取并集。 + +示例: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSass from '@farmfe/js-plugin-sass'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSass({ + filters: { + // all files end with .custom-css will be processed + resolvedPaths: ['\\.custom-sass$'], + moduleTypes: ['sass'] + } + }) + ] +} + +export default config; +``` + +### implementation +`sass` 的 `implementation` 包名称。 默认为 `sass`。 如果你想使用`sass-embedded`,可以将其设置为`sass-embedded`。 + +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSass from '@farmfe/js-plugin-sass'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSass({ + implementation: 'sass-embedded' + }) + ] +} +``` +:::note +您应该手动安装 `sass-embedded`。 +::: + +### additionalData +```ts +type AdditionalDataOption = string | ((content?: string, resolvePath?: string) => string | Promise); +``` +要添加到每个 sass 文件的附加数据。 例子: + +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSass from '@farmfe/js-plugin-sass'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSass({ + // add variables.sass to every sass file + additionalData: ` + @import "./src/styles/variables.scss"; + ` + }) + ] +} +``` +Sass 文件 +```sass title="index.scss" +.foo { + color: @primary-color; +} +``` +`additionalData` 将会被添加到这个文件的头部: +```sass title="index.scss" +@import "./src/styles/variables.scss"; + +.foo { + color: @primary-color; +} +``` + +函数形式用法: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSass from '@farmfe/js-plugin-sass'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSass({ + // add variables.sass to every sass file + additionalData: (content, resolvePath) => { + if (resolvePath === '/path/to/index.sass') { + return ` + @import "./src/styles/variables.sass"; + `; + } + } + }) + ] +} +``` + +### globals +全局 sass 文件。 这些文件将添加到每个 sass 文件的顶部。 它与 `additionalData` 相同,但更方便。 + diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-svgr.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-svgr.mdx new file mode 100644 index 000000000..54891343f --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/js-svgr.mdx @@ -0,0 +1,88 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/js-plugin-svgr +支持将 `SVG` 编译成 `React` 组建 + +## Installation + + + + npm install @farmfe/js-plugin-svgr + + + yarn add @farmfe/js-plugin-svgr + + + pnpm add @farmfe/js-plugin-svgr + + + +## Usage +```ts {2,6} +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSvgr from '@farmfe/js-plugin-svgr'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSvgr({ /* options */ }) + ] +} +``` + +## Options +```ts +export interface FarmSvgrPluginOptions { + svgrOptions?: SvgrOptions; + filters?: { + resolvedPaths?: string[]; + }; +} +``` + +### svgrOptions +请参阅 [svgr 选项](https://react-svgr.com/docs/options/)。 + +示例: +```ts +import path from 'node:path'; +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSvgr from '@farmfe/js-plugin-svgr'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSvgr({ + svgrOptions: { + loadPaths: [path.resolve(process.cwd(), 'styles')] + } + }) + ] +} + +export default config; +``` + +### filters +哪些文件应该由 `svgr` 处理。 默认为 `{resolvedPaths: ['\\.svg$'] }`。 + +* `resolvedPaths`: 仅处理这些路径下的文件。 支持正则表达式。 + +示例: +```ts +import { UserConfig } from '@farmfe/core'; +import farmJsPluginSvgr from '@farmfe/js-plugin-svgr'; + +const config: UserConfig = { + plugins: [ + farmJsPluginSvgr({ + filters: { + // all files end with .custom-svg will be processed + resolvedPaths: ['\\.custom-svg$'], + } + }) + ] +} + +export default config; +``` \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/overview.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/overview.md new file mode 100644 index 000000000..a730f6590 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/overview.md @@ -0,0 +1,31 @@ +# 插件概览 + +Farm官方提供了很多有用的插件,包括Rust插件和JS插件。 Rust 插件比 Js 插件快得多,我们建议尽可能使用 Rust 插件。 + +:::tip +关于如何在 Farm 中使用插件,请参阅[使用插件](/docs/using-plugins)。 +::: + +## Rust 插件 + +* **[`@farmfe/plugin-react`](./react)**:支持 React `jsx` 和 `react-refresh`。 +* **[`@farmfe/plugin-sass`](./sass)**:支持编译`sass/scss`文件。 +* **[`@farmfe/plugin-strip`](./strip)**:一个Farm的Rust插件,用于从你的代码中移除`debugger`语句和类似`assert.equal`、`console.log`这样的函数。 +* **[`@farmfe/plugin-dsv`](./dsv)**:一个Farm插件,用于将`.csv`和`.tsv`文件转换为JavaScript模块。 +* **[`@farmfe/plugin-yaml`](./yaml)**:一个Farm插件,用于将YAML文件转换为ES6模块。 +* **[`@farmfe/plugin-virtual`](./virtual)**:一个方便在farm中使用虚拟模块的rust插件。 +* **[`@farmfe/plugin-react-components`](./react-components)**:用于React的按需组件自动导入。 + +## Js 插件 + +* **[`@farmfe/js-plugin-postcss`](./js-postcss)**:支持 React `jsx` 和 `react-refresh`。 +* **[`@farmfe/js-plugin-less`](./js-less)**:支持编译 `sass/scss` 文件。 +* **[`@farmfe/js-plugin-svgr`](./js-svgr)**:支持编译`sass/scss`文件。 +* **[`@farmfe/js-plugin-dts`](./js-dts)**:支持编译`sass/scss`文件。 +* **[`@farmfe/js-plugin-sass`](./js-sass)**:支持编译`sass/scss`文件。 + +## 社区插件 + +如果官方插件不能满足您的需求,您可以尝试[社区插件](../community-plugins)。 + +当然也可以前往查看 [awesome-farm](https://github.com/farm-fe/awesome-farm) - 您也可以提交 PR,在那里列出您的插件。 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/react-components.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/react-components.mdx new file mode 100644 index 000000000..117740418 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/react-components.mdx @@ -0,0 +1,157 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/plugin-react-components + +按需自动导入React组件。 + +## 安装 + + + + npm install @farmfe/plugin-react-components + + + yarn add @farmfe/plugin-react-components + + + pnpm add @farmfe/plugin-react-components + + + +## 使用 +`@farmfe/plugin-react-components` 是一个Rust插件,你只需要在 `farm.config.ts` 的 `plugins` 字段中配置其包名即可。 +```ts {4} +import { UserConfig } from '@farmfe/core'; + +const config: UserConfig = { + plugins: ['@farmfe/plugin-react-components', { /** 选项在此 */}] +} +``` + +## 功能 + +- 💚 支持React开箱即用。 +- ✨ 支持组件和指令。 +- 🏝 树摇(Tree-shaking),只注册你使用的组件。 +- 🪐 文件夹名称作为命名空间。 +- 🦾 完整的TypeScript支持。 +- 🌈 为流行的UI库提供[内置解析器](#从UI库中导入)。 + +## 使用 + +像往常一样在模板中使用组件,它将按需导入组件,不再需要`import`和`component registration`!如果你异步注册父组件(或懒加载路由),自动导入的组件会与其父组件一起进行代码拆分。 + +它会自动将这个 + +```tsx +export function Main() { + return +} +``` + +转换成这个 + +```tsx +import HelloWorld from './src/components/HelloWorld' + +export function Main() { + return +} +``` + +> **注意** +> 默认情况下,此插件会导入`src/components`路径中的组件。你可以使用`dirs`选项进行自定义。 + +## TypeScript + +为自动导入的组件获得TypeScript支持。 + +```ts +Components({ + dts: true, // 如果安装了`typescript`默认启用 +}) +``` + +完成设置后,将自动生成一个`components.d.ts`文件,并自动更新类型定义。你可以选择是否将其提交到git。 + +> **确保你也将`components.d.ts`添加到`tsconfig.json`的`include`中。** + +## 从UI库中导入 + +我们为几个流行的UI库(如**Ant Design**、**Arco Design**和**Material UI**)提供了几个内置解析器,你可以通过以下方式启用它们: + +支持的解析器: + +- [Ant Design](https://ant.design/) +- [Arco Design](https://arco.design/react/docs/start) +- [Material UI](https://mui.com/) + +```ts +// farm.config.js + +import { UserConfig } from '@farmfe/core'; + +const config: UserConfig = { + plugins: ['@farmfe/plugin-react-components', { + local: true, + resolvers:[ + { + module: "antd", + prefix: "Ant" + }, + { + module:"@arco-design/web-react", + prefix: "Arco", + import_style: true // style/index.js + } + ] + }] +} +``` + +## 配置 + +以下显示了配置的默认值 +component +```ts +{ + // 相对路径到搜索组件的目录。 + dirs: ['src/components'], + + // 自定义组件的解析器。 + resolvers: [], + + /** + * 组件以绝对或相对路径引入。 + * + * @default 绝对 + */ + import_mode: "Absolute" + + /** + * 是否对本地组件有效 + * + * @default true + */ + local: true, + + /** + * 导入样式`style/index.js`,也接受路径用于自定义路径(/**)与组件 + * + * @default false + */ + importStyle?: boolean | string + + // 生成全局声明的`components.d.ts`, + // 也接受自定义文件名的路径 + // 默认:如果安装了typescript包则为`true` + dts: true, + + // 转换目标(要插入自动导入的组件)的过滤器 + // 注意,这不是关于包含/排除注册组件 - 使用`Regex`来做那个 + include: ["src/components"], + exclude: ["node_modules"], +} +``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/react.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/react.mdx new file mode 100644 index 000000000..30f175151 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/react.mdx @@ -0,0 +1,21 @@ +import { PackageManagerTabs } from "../../../../../../src/theme/PackageManagerTabs"; + +# @farmfe/plugin-react +支持 `React Jsx` 和 `React Refresh` + +## Installation + + + +## Usage +`@farmfe/plugin-react` 是一个 Rust 插件,你只需要在 `farm.config.ts` 的 `plugins` 字段中配置它的包名。 +```ts {4} +import { UserConfig } from '@farmfe/core'; + +const config: UserConfig = { + plugins: ['@farmfe/plugin-react', { /** options here */}] +} +``` + +## Options +请参阅[SWC 转换 React 选项](https://swc.rs/docs/configuration/compilation#jsctransformreact)。 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/sass.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/sass.mdx new file mode 100644 index 000000000..6285f5a0d --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/sass.mdx @@ -0,0 +1,37 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/plugin-sass + +支持 `sass` 编译 + +## Installation + + + + npm install @farmfe/plugin-sass + + + yarn add @farmfe/plugin-sass + + + pnpm add @farmfe/plugin-sass + + + +## Usage +`@farmfe/plugin-sass` 是一个 Rust 插件,你只需要在 `farm.config.ts` 的 `plugins` 字段中配置它的包名。 +```ts {4} +import { UserConfig } from '@farmfe/core'; + +const config: UserConfig = { + plugins: ['@farmfe/plugin-sass', { /** options here */}] +} +``` + +## Options +### additionalData +* **类型**: `string` + +在每个 `sass` 文件头部添加额外内容,例如 `@import '@/styles/variables.scss';` 语句。 \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/strip.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/strip.mdx new file mode 100644 index 000000000..ba97a3398 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/strip.mdx @@ -0,0 +1,102 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/plugin-strip + +🍣 一个Farm Rust插件,用于从你的代码中移除`debugger`语句和如`assert.equal`、`console.log`这样的函数。 + +## 要求 + +这个插件需要一个[LTS](https://github.com/nodejs/Release) Node版本(v18.0.0+)和Farm v1.0.0+。 + +## 安装 + + + + npm install @farmfe/plugin-strip + + + yarn add @farmfe/plugin-strip + + + pnpm add @farmfe/plugin-strip + + + +## 使用 + +创建一个`farm.config.js`[配置文件](https://www.farmfe.org/docs/config/configuring-farm)并导入插件: + +```js +import { defineConfig } from '@farmfe/core'; +import strip from '@farmfe/plugin-strip'; + +export default defineConfig({ + // ... + plugins: [ + [ + strip({ + // 插件选项 + functions:[ 'console.*', 'assert.*' ], + labels: ['unittest'] + }) + ] + ], + // ... +}); +``` + +## 选项 + +### `include` + +类型: `String | RegExp | Array[...String|RegExp]`
+默认值: `['**/*.js']`
+示例: `include: '**/*.(mjs|js)',`
+ +指定插件应操作的构建中的文件的模式或模式数组。 + +### `exclude` + +类型: `String | RegExp | Array[...String|RegExp]`
+默认值: `[]`
+示例: `exlude: 'tests/**/*',`
+ +指定插件应_忽略_的构建中的文件的模式或模式数组。 + +### `debugger` + +类型: `Boolean`
+默认值: `true`
+示例: `debugger: false,`
+ +如果为`true`,指示插件移除debugger语句。 + +### `functions` + +类型: `Array[...String]`
+默认值: `[ 'console.*', 'assert.*' ]`
+示例: `functions: [ 'console.log', 'MyClass.Test' ],`
+ +指定插件将目标定位和移除的函数。 + +_注意:指定在链的开头使用的函数,如'a().b().c()',将导致'(void 0).b().c()',这在运行时会产生错误。_ + +### `labels` + +类型: `Array[...String]`
+默认值: `[]`
+示例: `labels: ['unittest'],`
+ +指定插件将目标定位和移除的[带标签的块或语句](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label)。 + +_注意:'**:**'是隐含的,不应在配置中指定。_ + +### `sourceMap` + +类型: `Boolean`
+默认值: `true`
+示例: `sourceMap: false,`
+ +如果为`true`,指示插件在从捆绑包中移除配置的目标后相应地更新源映射。 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/virtual.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/virtual.mdx new file mode 100644 index 000000000..95aed57bb --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/virtual.mdx @@ -0,0 +1,59 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/plugin-virtual + +受 [@rollup/plugin-virtual](https://www.npmjs.com/package/@rollup/plugin-virtual) 启发 + +一个为farm打造的rust插件,用于轻松使用虚拟模块 + +## 安装 + + + + npm install @farmfe/plugin-virtual + + + yarn add @farmfe/plugin-virtual + + + pnpm add @farmfe/plugin-virtual + + + +## 使用 + +farm.config.ts + +```typescript +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + plugins: [ + [ + '@farmfe/plugin-virtual', + { + 'virtual-module': 'export const a = 1', + 'src/01.js': 'export const module01 = "virtual-module"', + }, + ], + ], +}); +``` + +index.js + +```javascript +import { a } from 'virtual-module'; +``` + +src/02.js + +```javascript +import { module01 } from './01.js'; +``` + +这个 `@farmfe/plugin-virtual` 插件允许你定义虚拟模块,这些模块并不对应任何实际的文件系统中的文件,但可以像普通模块一样被导入和使用。这在模拟第三方库、环境变量或任何不便于直接放在文件系统中的数据时特别有用。 + +通过在 `farm.config.ts` 配置文件中的 `plugins` 数组中注册插件并配置虚拟模块,你可以在项目中的任何地方通过指定的模块名来导入这些虚拟模块。在上面的例子中,定义了一个名为 `virtual-module` 的虚拟模块,它导出了一个常量 `a`,以及另一个名为 `src/01.js` 的虚拟模块,它导出了一个名为 `module01` 的变量。这些模块随后可以在项目中的任何地方被导入和使用,就像它们是实际存在于文件系统中的一样。 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/yaml.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/yaml.mdx new file mode 100644 index 000000000..01a091bb6 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/official-plugins/yaml.mdx @@ -0,0 +1,50 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# @farmfe/plugin-yaml + +受 [@rollup/plugin-yaml](https://www.npmjs.com/package/@rollup/plugin-yaml) 启发 + +🍣 一个Farm插件,用于将YAML文件转换为ES6模块。 + +## 安装 + + + + npm install @farmfe/plugin-yaml + + + yarn add @farmfe/plugin-yaml + + + pnpm add @farmfe/plugin-yaml + + + +## 使用 + +farm.config.ts + +```typescript +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + plugins: [ + [ + '@farmfe/plugin-yaml', + { + documentMode: 'single' | 'multi', // 默认 single + include: Regex, // 默认 None + exclude: Regex, // 默认 None + }, + ], + ], +}); +``` + +注意: + +`include` 或 `exclude` 使用的是正则表达式而不是glob。例如 `**/01.yaml` 是不合法的。正确的表达方式类似于 `".*\\/01.yaml"`。 + +这个插件允许你在Farm项目中直接导入YAML文件,并将它们转换成ES6模块。`documentMode` 选项允许你指定处理单个文档的YAML文件(`single`)或包含多个文档的YAML文件(`multi`)。`include` 和 `exclude` 选项让你可以更细致地控制哪些YAML文件应该被插件处理,通过指定匹配特定格式的正则表达式。这种灵活性让你能够在Farm项目中轻松地处理和利用YAML数据。 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/_category_.json b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/_category_.json new file mode 100644 index 000000000..d4be49b8b --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "编写插件", + "link": { + "type": "generated-index", + "description": "如何编写 Farm 插件" + } +} diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/js-plugin.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/js-plugin.mdx new file mode 100644 index 000000000..0e33f658d --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/js-plugin.mdx @@ -0,0 +1,198 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# 编写 JavaScript 插件 + +一个 JavaScript 插件只是一个定义了一系列 hooks 的纯 JavaScript 对象: + +```js +// farm.config.ts +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + // ... + plugins: [ + // 一个插件对象 + { + name: "my-resolve-plugin", + priority: 1000, // 插件的优先级越高越早执行 通常的优先级是 100 + resolve: { + filters: { + // 仅仅符合下面的条件才会执行 hook + sources: ["\\./index.ts"], // 正则表达式的数组 + importers: ["None"], + }, + executor: async (param) => { + // hook 执行器 + console.log(param); // 解析 param + // 返回最终的结果 + return { + resolvedPath: "virtual:my-module", + query: {}, + sideEffects: false, + external: false, + }; + }, + }, + }, + // Load、transform和 resolve 类似, 引用他们的类型 + ], +}); +``` + +如果你想向插件传递参数,可以使用闭包 + +```ts +// my-resolve-plugin.ts +export function myResolvePlugin(options: Options) { + const { xx } = options; + + return { + name: "my-resolve-plugin", + resolve: { + // ... + }, + }; +} + +// farm.config.ts +import { defineConfig } from "@farmfe/core"; +import { myResolvePlugin } from "./myResolvePlugin.ts"; + +export default defineConfig({ + // ... + plugins: [myResolvePlugin({ xx: "xx" })], +}); +``` +:::note +* 参考 [创建插件](#create-plugin),可以根据官方模版快速写一个新的插件 +* 本文档仅介绍如何创建、开发和发布一个 JavaScript 插件,有关插件 hook 的更多细节,请参阅[Javascript 插件 Hooks](/zh/docs/api/js-plugin-api) +::: + +## 约定 + +对于特定的 Farm JavaScript 插件 + +- 一个 Farm 的 JavaScript 插件应该有一个 `farm-plugin-` 前缀的名称并且语义清晰 +- package.json 里面有 `farm-plugin-` 关键字 + + +如果你的 JavaScript 插件仅仅适配特定框架,其名称应遵循以下前缀格式: + +- `farm-plugin-vue-`: 作为 Vue 插件前缀 +- `farm-plugin-react-`: 作为 React 插件前缀 +- `farm-plugin-svelte-`: 作为 Svelte 插件前缀 +- ... + +## 概念 +在开始编写 JavaScript 插件之前,你应该了解以下概念: + +* **filters**: 由于 JavaScript 插件运行要比 Rust 插件慢得多,你的 JavaScript 插件应该显式的设置 filter 来避免不必要的 hook 调用。 举个例子,你应该设置 `transform.filters.moduleTypes = ['js']` 来确保你的 JavaScript 插件 transform 钩子仅仅在 `.js/mjs/cjs` 文件执行 +* **module_type**:模块的类型,他可能是 `js`, `ts`, `css`, `sass`, `json` 等等。Farm 原生支持 `js/ts/jsx/tsx`, `css`, `html`, `json`, `static asserts(png, svg等等)`。`module_type` 会被 `load` 或者 `transform` 钩子返回 +* **resolved_path 和 module_id**:`resolved_path` 是一个模块的绝对路径,`module_id`是一个模块的唯一 id,通常是`模块对于项目根目录的相对路径` + `query`。例如 我们引用了一个模块 `import './a?query'` resolved_path 是 `/project/src/a.ts` module_id 是 `src/a.ts?query` +* **context**: 所有的插件都会接受一个 `context` 参数,它有 Farm 项目的整个编译上下文,你可以从里面拿到 ModuleGraph,Module,Resources等等 +* **Resource and Resource Pot**:`Resource` 是输出出来的最终打包产物,` Resource Pot`是资源的抽象表示,类似于其他打包器的 `Chunk`。在 Farm 项目中,我们首先从 `ModuleGraph` 生成 `Resource Pots`, 渲染 `Resource Pots`,最终从 `Resource Pots` 生成 `Resource` + + +### Filters + +由于 `JavaScript插件` 比 `Rust插件` 慢得多,Farm 使用 `filters` 来控制 JavaScript 插件钩子的执行。为了提高性能,只有匹配当前的 `filters` ,插件钩子才会执行。`filters` 对于一些常用的钩子是必需的,例如`resolve`, `load`, `transform`等。 +例如,如果你想转换 css 文件,你可以使用`transform.filters. moduletypes = ['css']`来确保 JavaScript 插件的 transform 钩子只对`.css`文件运行: + +```ts +const myCssPlugin = { + name: "my-css-plugin", + transform: { + filters: { + // Only execute the hook when following conditions satisfied + // resolvedPaths: ["\\./index.ts"], // a regex array to match the resolvedPaths + moduleTypes: ["css"], + }, + executor: async (param) => { + // transform css + }, + }, +}; +``` + +### Module Type +在 Farm 中,一切都被认为是“一等公民”,因此 Farm 设计 `module_type` 来标识模块类型,并在用不同的插件处理不同的模块类型 +`Module_type `由 `load` 钩子返回,并且可以由 `transform` 钩子转换。Farm 原生支持 `js/ts/jsx/tsx`、`css`、`html`、`json`、`static assets(png、svg等)`。对于这些模块类型,你可以直接在 `load` 或 `transform` hook 中返回。但是如果你想处理自定义模块类型,你需要实现其他钩子例如 `parse`, `render_resource_pot_modules`, `generate resources` 等来控制如何对自定义模块进行类型解析,渲染和生成资源。 + +## 创建插件 + +Farm 提供了官方模板来帮助你快速创建 JavaScript 插件: + + + pnpm create farm-plugin + + + npm create farm-plugin@latest + + + yarn create farm-plugin + + + + +然后按照提示创建插件 + +或者直接运行以下命令创建插件: + + + pnpm create farm-plugin my-farm-plugin --type js + + + npm create my-farm-plugin --type js + + + yarn create my-farm-plugin --type js + + + +上面的命令会在当前目录中创建一个名为 `my-farm-plugin` 的js插件。`——type` 可以是 `rust` 或者 `js` + +## 开发一个插件 + +创建插件后,就可以开始开发插件了。这个插件只是一个定义了一系列 hooks 的纯 JavaScript 对象: + +```ts +// import { readFileSync } from 'node:fs'; +import type { JsPlugin } from '@farmfe/core'; + +interface Options { + /* Your options here */ +} + +export default function farmPlugin(options: Options): JsPlugin { + return { + name: '', + /* Your plugin hooks here: */ + + // transform: { + // filters: { + // moduleTypes: ['js'] + // }, + // async executor(params) { + // const { content } = params; + // return { + // content, + // moduleType: 'js' + // }; + // } + // }, + // finish: { + // executor() {} + // } + }; +} +``` +:::tip +有关插件钩子的更多细节, 参阅[Javascript 插件 Hooks](/zh/docs/api/js-plugin-api). +::: + +运行 `npm Run dev` 来编译插件开启监听。运行 `npm Run build` 来构建插件 + +## 发布插件 +JavaScript 插件是一个普通的 npm 包,你可以通过运行 `npm publish` 将其发布到 npm registry。 \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/overview.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/overview.md new file mode 100644 index 000000000..f412f4988 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/overview.md @@ -0,0 +1,27 @@ + +# 概览 + +Farm 采用完全插件化的形式,提供了多种类型的插件来干预 Farm 的几乎所有行为,Farm 支持的主要插件类型分为以下几类: +* **编译插件**:干预、增强 Farm 的编译能力,支持使用 Rust(推荐)以及 Js 编写插件 +* **运行时插件**:干预、增强 Farm 的运行时能力,使用 Js 编写 +* **Dev Server 插件**:干预、增强 Farm 的 Dev Server,例如挂载更多变量,注册 middleware 等 + +To use a Rust plugin, configuring `plugins` in `farm.config.ts`. + +```ts +import { defineFarmConfig } from '@farmfe/core/dist/config'; + +defineFarmConfig({ + // ... + plugins: [ + { /*..*/ }, // Js plugin, a object with hook defined + '@farmfe/plugin-react', // rust plugin package name + ] +}) + +``` + +Farm support both rust plugins and js plugins: + +* [Rust Plugin](/docs/plugins/rust-plugin) +* [Js plugin](/docs/plugins/js-plugin) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/runtime-plugin.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/runtime-plugin.md new file mode 100644 index 000000000..678915017 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/runtime-plugin.md @@ -0,0 +1,166 @@ +# 编写 Runtime 插件 +Farm 运行时插件是一个纯 JavaScript 对象,它定义了一组钩子来增强 Farm 运行时。 例子: + +```ts +/** + * HMR 客户端作为 Farm 运行时插件 + */ +import type { Plugin } from '@farmfe/runtime'; +import { createHotContext } from './hot-module-state'; +import { HmrClient } from './hmr-client'; + +let hmrClient: HmrClient; +// 导出 Farm 运行时插件对象 +export default { + name: 'farm-runtime-hmr-client-plugin', + // 定义钩子 + bootstrap(moduleSystem) { + hmrClient = new HmrClient(moduleSystem); + hmrClient.connect(); + }, + moduleCreated(module) { + // 为每个模块创建一个 hot 上下文 + module.meta.hot = createHotContext(module.id, hmrClient); + } +}; +``` + +上面是一个支持 Farm 的 HMR 的运行时插件。 要点: +* 运行时插件入口文件应该 **`导出`** 定义一组钩子的默认对象。 例如 `导出默认 {/*...*/}` +* 需要`name`来标识插件,确保`name`是唯一的 +* `hook` 是在导出对象中定义的方法。 + +:::note +有关上述示例的完整实现,请参阅 [@farmfe/runtime-plugin-hmr](https://github.com/farm-fe/farm/tree/main/packages/runtime-plugin-hmr)。 +::: + +## 注意事项 +您应该使您的运行时插件尽可能**简单**。 你**不应该**: +* 使用node_modules中的**大依赖**,这会让你的 Farm 运行时插件非常大,可能会严重影响运行时性能。 +* 使用 `top level await` 等新功能,因为这些与运行时相关的功能很难针对低级别运行时进行 polyfill。 + +强烈建议确保您的运行时插件**尽可能小且简单**。 + +:::tip +`import.meta.xxx` 将被编译为 `module.meta.xxx`,您可以在运行时插件中向 `module.meta` 添加值来增强 `import.meta`。 例如, `module.meta.hot = createHotContext(module.id, hmrClient)` 使 `import.meta.hot` 可用。 +::: + +## 惯例 +Farm 运行时插件名称应以 `farm-runtime-plugin` 为前缀,例如 `farm-runtime-plugin-xxx` 。 + +:::note +`plugin.name` 和 `package name`(仅当您将插件发布为包时)都应该加上前缀。 +::: + + +## 使用 Runtime 插件 +使用 `compilation.runtime.plugins` 为您的项目配置运行时插件: + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + runtime: { + plugins: [ + // relative path + './src/my-plugin1.ts', + // absolute path + '/root/project/src/my-plugin2.ts', + // package name + '@scope/plugin-package-from-node-modules' + ] + } + } +}); +``` + +您可以通过 3 种方式配置运行时插件项: +* **`相对路径`**:相对于`root`的路径,例如`./src/my-plugin1.ts`将尝试从`/src/my-plugin1.ts`加载插件。 +* **`绝对路径`**:例如`/root/project/src/my-plugin2.ts`。 (在 Windows 上绝对路径应为 `C:\project\src\my-plugin2.ts` )。 +* **`包名称`**:Farm将尝试从`node_modules`加载此包,例如`@scope/plugin-package-from-node-modules`。 + +## 编写 Runtime 插件 +:::tip +Farm支持直接加载`.ts`文件,因此您可以直接在`runtime.plugins`中配置一个`.ts`文件(或条目为`ts`文件的包)。 + +```ts +export default defineConfig({ + compilation: { + runtime: { + plugins: [ + // configuring ts file directly + './src/my-plugin.ts', + ] + } + } +}); +``` +::: + +### 创建插件 +正如我们上面提到的,Farm 运行时插件是一个纯 JavaScript 对象,它定义了一组钩子,您只需创建一个 ts 文件,例如: + +```ts title="./plugins/runtime.ts" +import type { Plugin } from '@farmfe/runtime'; + +export default { + name: 'my-plugin', + // ... +} +``` + +然后在导出的对象中定义您需要的[hooks](#runtime-plugin-hooks): + +```ts title="./plugins/runtime.ts" +import type { Plugin } from '@farmfe/runtime'; + +export default { + name: 'my-plugin', + moduleCreated(module) { + // ... + }, + readModuleCache(module) { + // ... + }, + loadResource(resource, targetEnv) { + // ... + }, + // ... more hooks as long as you need +} +``` + +### 定义插件 +配置您在 `runtime.plugins` 中创建的插件: + +```ts +export default defineConfig({ + compilation: { + runtime: { + plugins: [ + './plugins/runtime.ts', + ] + } + } +}); +``` +然后启动Farm项目,这个插件会在编译时注入输出资源的 runtime 中。 + +### 发布插件(可选) +您可以将运行时插件发布到 npm 注册表以共享您的 Farm 运行时插件。 只需创建一个 `package.json` ,例如: + +```json +{ + "name": "@farmfe/runtime-plugin-hmr", + "version": "3.4.2", + "description": "Runtime hmr plugin of Farm", + // c-highlight-start + "main": "src/index.ts", + // c-highlight-end + // ... ignore other fields +} +``` +You can just export `ts` file using `"main": "src/index.ts"`. + +## 运行时插件钩子 +请参阅[运行时插件 API](/docs/api/runtime-plugin-api) \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/rust-plugin.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/rust-plugin.mdx new file mode 100644 index 000000000..6e7c4830f --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/plugins/writing-plugins/rust-plugin.mdx @@ -0,0 +1,545 @@ +import CodeBlock from "@theme/CodeBlock"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# 编写 Rust 插件 + +用 Rust 写你的插件是一个推荐的方式,因为 Rust 插件比 JavaScript 插件**更快和富有表现力**。一个 Rust 插件应该是实现了 `farmfe_core::plugin::Plugin` trait 的 `struct`, 例如 + +```rust +#![deny(clippy::all)] + +use farmfe_core::{config::Config, plugin::Plugin}; + +use farmfe_macro_plugin::farm_plugin; + +// define your rust plugins +#[farm_plugin] +pub struct FarmPluginExample {} + +impl FarmPluginExample { + // 一个 Rust 插件必须导出一个名称是 new 的函数 并且初始化的时候接受两个参数 + fn new(config: &Config, options: String) -> Self { + Self {} + } +} +// 实现插件的 trait 来定义插件 hooks +impl Plugin for FarmPluginExample { + fn name(&self) -> &str { + "FarmPluginExample" + } + + // more hooks here +} +``` + +Rust 插件注意事项: +- `struct` 必须是 `pub` 并且需要有 `#[farm_plugin]` 属性 +- `struct` 必须实现 `Plugin` trait, 并且 `name` 方法必须要实现 +- `struct` 必须导出一个 `new` 的方法,在初始化的时候接受两个参数 第一个参数是 `&Config`, 第二个参数是 `String`。`new` 方法在插件加载的时候调用。 `Config` 是 farm 项目的配置 `String` 是插件的选项 + +我们同时提供了 Rust 插件示例代码仓库:[farm-rust-plugin-example](https://github.com/farm-fe/rust-plugin-example) + + +:::note +本文章仅仅涵盖如何创建,开发和发布一个 Rust 插件,更多的细节参考 [插件 Hooks](/zh//docs/api/rust-plugin-api) +::: + +## 约定 + +对于特定的 Farm 插件 + +- 一个 Farm 的 Rust 插件应该有一个 `farm-plugin-` 前缀的名称并且语义清晰 +- package.json 里面有 `farm-plugin-` 关键字 + + +如果你的插件仅仅适配特定框架,其名称应遵循以下前缀格式: + +- `farm-plugin-vue-`: 作为 Vue 插件前缀 +- `farm-plugin-react-`: 作为 React 插件前缀 +- `farm-plugin-svelte-`: 作为 Svelte 插件前缀 +- ... + + +## 概念 + +在开始编写 Rust 插件之前,你应该了解以下概念: + +* **module_type**:模块的类型,他可能是 `js`, `ts`, `css`, `sass`, `json` 等等。Farm 原生支持 `js/ts/jsx/tsx`, `css`, `html`, `json`, `static asserts(png, svg等等)`。`module_type` 会被 `load` 或者 `transform` 钩子返回 +* **resolved_path 和 module_id**:`resolved_path` 是一个模块的绝对路径,`module_id`是一个模块的唯一 id,通常是`模块对于项目根目录的相对路径` + `query`。例如 我们引用了一个模块 `import './a?query'` resolved_path 是 `/project/src/a.ts` module_id 是 `src/a.ts?query` +* **context**: 所有的插件都会接受一个 `context` 参数,它有 Farm 项目的整个编译上下文,你可以从里面拿到 ModuleGraph,Module,Resources等等 +* **Resource and Resource Pot**:`Resource` 是输出出来的最终打包产物,` Resource Pot`是资源的抽象表示,类似于其他打包器的 `Chunk`。在 Farm 项目中,我们首先从 `ModuleGraph` 生成 `Resource Pots`, 渲染 `Resource Pots`,最终从 `Resource Pots` 生成 `Resource + +### 模块类型 + +在 Farm 中,一切都被认为是“一等公民”,因此 Farm 设计 `module_type` 来标识模块类型,并在用不同的插件处理不同的模块类型 +`Module_type `由 `load` 钩子返回,并且可以由 `transform` 钩子转换。Farm 原生支持 `js/ts/jsx/tsx`、`css`、`html`、`json`、`static assets(png、svg等)`。对于这些模块类型,你可以直接在 `load` 或 `transform` hook 中返回。但是如果你想处理自定义模块类型,你需要实现其他钩子例如 `parse`, `render_resource_pot_modules`, `generate resources` 等来控制如何对自定义模块进行类型解析,渲染和生成资源。 + +## 创建插件 +Farm 提供了官方模板来帮助你快速创建 Rust 插件: + +<> + + + pnpm create farm-plugin + + + npm create farm-plugin@latest + + + + yarn create farm-plugin + + + + +然后按照提示创建插件 + +或者直接运行以下命令创建插件: + + + + pnpm create farm-plugin my-farm-plugin --type rust + + + npm create my-farm-plugin --type rust + + + + yarn create my-farm-plugin --type rust + + + +上面的命令会在当前目录中创建一个名为 `my-farm-plugin` 的js插件。`——type` 可以是 `rust` 或者 `js` + +## 插件项目结构 + +一个插件项目结构如下: + +```plaintext +my-farm-plugin +├── .github +│ └── workflows +| ├── release.yml +| ├── build.yml +│ └── ci.yml +├── Cargo.toml +|── .gitignore +├── npm +│ ├── darwin-x64 +│ ├── linux-x64-gnu +| ├── win32-x64-msvc +│ └── ... +├── package.json +├── src +│ └── lib.rs +└── rust-toolchain.toml +``` + +值得注意的文件和目录: + +- `src/lib.rs`: 插件的主要文件,你在这里定义你的插件 +- `Cargo.toml`: Rust 项目的清单 +- `package.json`: npm 项目清单 +- `npm`: 平台特定的二进制包所在的位置。在发布插件之前,这些包应该发布到 npm registry +- `.github/workflows`: 用于在 github actions 中交叉构建和发布插件 +- `rust-toolchain.toml`: rust 工具链文件,它不应该 **被手动修改**,它应该始终使用 **与 farm core相同的版本**。 + +Farm 提供了一个工具 (`@farmfe/plugin-tools`) 来帮助你构建和发布插件,参考 `package.json`: + +```json +{ + // ... + "scripts": { + // build your plugin for current platform + "build": "farm-plugin-tools build --platform --cargo-name my_farm_plugin -p my_farm_plugin --release", + // publish all platform packages under npm directory to npm registry + "prepublishOnly": "farm-plugin-tools prepublish" + }, + // ... +} +``` + +更多关于构建和发布的细节参考 [构建](#cross-build) 和 [发布](#publish)章节: + + +## 开发插件 + +为了在本地开发和测试你的插件 你首先依据你平台构建插件,运行: + +```bash +pnpm build +``` + +然后你可以使用你构建好的插件,在 `frame.config.ts` 的 `plugins`添加你的插件: + +```javascript +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + plugins: [ + 'my-farm-plugin' + ] +}); +``` + +在你的 farm 项目中运行 `pnpm i` 并且运行 `farm start` 来运行你的带有你插件的 farm 项目 +当对插件进行更改时,应该重新构建插件并重启 farm 项目以查看更改。例如,在你的插件中添加 `load` 钩子: + +```rust {8-18} title="src/lib.rs" +// ... ignore other code + +impl Plugin for FarmPluginExample { + fn name(&self) -> &str { + "FarmPluginExample" + } + + fn load( + &self, + param: &farmfe_core::plugin::PluginLoadHookParam, + _context: &std::sync::Arc, + _hook_context: &farmfe_core::plugin::PluginHookContext, + ) -> farmfe_core::error::Result> { + println!( + "load path: {:?}, id: {:?}", + param.resolved_path, param.module_id + ); + Ok(None) + } +} +``` + +然后用 `pnpm build` 重新构建你的插件,用 `farm start` 重新启动你的 farm 项目,你会看到 `load` 钩子在编译你的 farm 项目时被调用。 + +:::note +想了解更多关于插件 hooks , 参阅 [插件钩子](/zh/docs/api/rust-plugin-api). +::: + +### 处理 ModuleType +`module_type` 由 `load` hook 或 `transform` hook 返回。你在 `load` hook 中可以给 module 设置任意的 module type,该模块将由支持该模块类型的相应插件处理。 +对于原生支持的模块类型,你可以在 `load` 钩子中返回模块类型: + +```rust {8-18} title="src/lib.rs" +// ... ignore other code + +impl Plugin for FarmPluginExample { + fn name(&self) -> &str { + "FarmPluginExample" + } + + fn load( + &self, + param: &farmfe_core::plugin::PluginLoadHookParam, + _context: &std::sync::Arc, + _hook_context: &farmfe_core::plugin::PluginHookContext, + ) -> farmfe_core::error::Result> { + // handle virtual module + if param.module_id.starts_with("virtual:my-css:css") { + // return module type and content + Ok(Some(farmfe_core::plugin::PluginLoadHookResult { + module_type: "css".to_string(), + content: ".red { color: red; }".to_string(), + ..Default::default() + })) + } else { + Ok(None) + } + } +} +``` + +对于原生支持的模块类型,你应该使用 `transform` hook 将模块类型转换为原生支持的模块类型,否则你需要实现 `parse`、`renderResourcePot` hook 来处理你的自定义模块类型: + +```rust {8-18} title="src/lib.rs" +// ... ignore other code + +impl Plugin for FarmPluginExample { + fn name(&self) -> &str { + "FarmPluginExample" + } + + fn transform( + &self, + param: &farmfe_core::plugin::PluginTransformHookParam, + _context: &std::sync::Arc, + _hook_context: &farmfe_core::plugin::PluginHookContext, + ) -> farmfe_core::error::Result> { + // module type guard is required + if matches!(param.module_type, ModuleType::Custom("sass")) { + // compile sass and transform the module type from sass to css + Ok(Some(farmfe_core::plugin::PluginTransformHookResult { + module_type: "css".to_string(), + content: compileSass(param.content), + ..Default::default() + })) + } else { + Ok(None) + } + } +} +``` + +:::note +模块类型保护,如 `matches!(module_type, ModuleType::Custom("sass"))` `transform` 钩子是必需的,因为所有模块类型都会调用 `transform` 钩子,并且你应该只在 `transform` hook 中处理你的自定义模块类型。`parse`和其他 hook 也是如此。 +::: + +或者实现 `parse`,`render_resource_pot_modules` 钩子来处理你的自定义模块类型 参考 farm 如何原生处理 css 插件如何处理 `css` 模块类型的 [farm-plugin-css](https://github.com/farm-fe/farm/blob/main/crates/plugin_html/src/lib.rs#L159) + + +### 处理插件选项 +rust 插件选项可以在`farm.config.ts`中配置: + +```javascript +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + plugins: [ + ['my-farm-plugin', { + // plugin options + myOption: 'myOption' + }] + ] +}); +``` + +该选项将被 json 序列化并传递给插件的`new`方法,你可以在`new`方法中处理该选项: + +```rust title="src/lib.rs" +// ... ignore other code + +// define your rust plugin options +#[derive(serde::Deserialize)] +pub struct Options { + pub my_option: Option, +} + +impl FarmPluginExample { + fn new(config: &Config, options: String) -> Self { + // deserialize the options + let my_option: Options = serde_json::from_str(&options).unwrap(); + // handle the options... + Self {} + } +} +``` + +请注意,你应该将依赖 `serde` 和 `serde_json` 添加到你的`Cargo.toml`中。来支持反序列化: + +```toml +[dependencies] +# ... ignore other code +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +``` + +:::note +不能被 json 序列化选项不被支持。这意味着你只能使用字符串、数字、布尔值、数组、对象等类型。不支持`函数选项`。 +::: + +### 在插件里面使用 farm_core + +Farm 在 [`farmfe_core`](https://docs.rs/farmfe_core) crate 中暴露所有核心结构和工具函数。更多细节请参阅[`farmfe_core`](https://docs.rs/farmfe_core)文档。 + +:::note +如果你想在插件中使用 swc 中的 `Module`、`Program` 等结构,你应该使用由 farm_core 重新暴露的 `farmfe_core::swc_ast`。因为 farm_core 使用的 swc 版本可能与你在插件中使用的 swc 版本不同,并且 farm_core 使用的 swc 版本保证与 farm_core 兼容。 +::: + +### 警告 + +#### 在插件中使用 SWC + +请注意,你的 rust 插件不应该使用任何与 SWC 相关的包,如`swc_common`、`swc_transforms`等。SWC 在进程中存储全局状态,当你在插件中使用 SWC 时,它可能会导致**死锁**。 + +如果你想要修改你的 Farm 项目的AST,建议写[SWC Plugin](/zh/docs/using-plugins#using-swc plugins)。关于如何编写SWC插件,请参阅[编写SWC插件](https://swc.rs/docs/plugin/ecmascript/getting-started)。 + +#### 选择 Rust 工具链 + +因为 Farm 的 Rust 插件是一个动态链接库,你应该始终使用和 farm core 相同版本的 Rust 工具链。rust 工具链定义在` rust-toolchain.toml`中。它不应该**被手动修改**。 +并且应该始终使用 Rust 构建插件,因为Farm Core 不支持 FFI,也不承诺 ABI 稳定性以提供最佳性能。 + +### 插件的兼容性 + +Farm core 维护了一个向插件暴漏出来一个 API 版本。如果你遇到类似`Incompatible Rust Plugin: Current core's version…`,这意味着你的插件与当前 farm core版本不兼容。你应该更新你的插件到最新版本来解决这个问题。 + +对于插件作者来说,你应该重新用最新的 farm core 版本构建和发布插件,来让你的插件与最新的 farm core版本兼容。 + +:::note +Farm 承诺与相同主版本的 AP I兼容,例如,如果你的插件兼容 Farm core 1.0.0,那么它也应该兼容 Farm core 1.1.0、1.2.0等,这意味着你的插件将始终适用于相同的 Farm 主版本。 +::: + +## 交叉构建 +一个 Farm Rust 插件是一个**特定于平台的动态链接库**,你应该为你想要支持的所有平台构建插件。 +Farm 提供了一个使用 github actions 构建插件的示例,请参阅[.github/workflows/build.yml](https://github.com/farm-fe/rust-plugin-example/blob/main/.github/workflows/build.yaml) + +默认情况下,farm rust 插件应该针对以下平台构建: +- `linux-x64-gnu ` +- `linux-x64-musl` +- `darwin-x64` +- `win32-x64-msvc` +- `linux-arm64-musl` +- `linux-arm64-gnu` +- `darwin-arm64` +- `win32-ia32-msvc` +- `win32-arm64-msvc` + +对于公开发布到 npm registry 的插件,建议发布支持上面所有平台的插件。对于私有 rust 插件,你可以为任何你想支持的平台构建插件。 + +:::tip +因为 rust 插件是一个纯动态链接库,如果您有关于如何为特定平台构建插件的问题,只需谷歌如何在 rust 中为该平台构建动态链接库。 +::: + +## 发布 + +发布 Rust插件的有以下的步骤: +1. 交叉构建动态链接库的 Rust 插件,详情请参阅[交叉构建](#cross-build) +2. 将二进制文件复制到 npm 目录下,例如:复制到 `npm/linux-x64-gnu/index.farm` +3. 在 npm 目录下发布平台特定的包,你可以使用`farm-plugin-tool prepublish`在 npm 目录下发布包 +4. 发布包本身 + +参见示例[github actions publish workflow](https://github.com/farm-fe/rust-plugin-example/blob/main/.github/workflows/release.yml) + +## 例子 + +我们将使用 `@farmfe/plugin-sass` 作为一个真正的 Rust 插件示例。这个插件将支持在你的项目中编译`.scss` 和 `.sass` 文件 + + +### 定义一个插件 +导出一个名为 `FarmPluginSass` 的 Rust struct + +```rust title="src/lib.rs" +use farmfe_macro_plugin::farm_plugin; + +// 1. define a struct with #[farm_plugin] attribute +#[farm_plugin] +pub struct FarmPluginSass { + sass_options: String, + regex: Regex, +} + +impl FarmPluginSass { + // 2. define a new method with 2 arguments + pub fn new(_config: &Config, options: String) -> Self { + Self { + sass_options: options, + regex: Regex::new(r#"\.(sass|scss)$"#).unwrap(), + } + } +} +``` +- struct 必须是`pub`并且必须有 `#[farm_plugin]` 属性。 +- 结构体必须导出一个`new`方法,该方法接受两个参数作为初始化参数,第一个参数是`&Config`,第二个参数是`String`。 + +### 实现插件 Trait + +`Plugin` trait 用于定义可以挂接到 farm compiler 的 `hooks` + +```rust {21-30} +use farmfe_core::plugin::Plugin; +use farmfe_macro_plugin::farm_plugin; + +// 1. define a struct with #[farm_plugin] attribute +#[farm_plugin] +pub struct FarmPluginSass { + sass_options: String, + regex: Regex, +} + +impl FarmPluginSass { + // 2. define a new method with 2 arguments + pub fn new(_config: &Config, options: String) -> Self { + Self { + sass_options: options, + regex: Regex::new(r#"\.(sass|scss)$"#).unwrap(), + } + } +} +// Implement Plugin Trait +impl Plugin for FarmPluginSass { + fn name(&self) -> &str { + "FarmPluginSass" + } + + // this plugin should be executed before internal plugins + fn priority(&self) -> i32 { + 101 + } +} +``` +### 加载 `.scss` 文件 +实现 `load` 钩子以支持加载` .scss` 文件 + +```rust {14-32} +// ignore other code ... + +// Implement Plugin Trait +impl Plugin for FarmPluginSass { + fn name(&self) -> &str { + "FarmPluginSass" + } + + // this plugin should be executed before internal plugins + fn priority(&self) -> i32 { + 101 + } + + fn load( + &self, + param: &farmfe_core::plugin::PluginLoadHookParam, + _context: &std::sync::Arc, + _hook_context: &farmfe_core::plugin::PluginHookContext, + ) -> farmfe_core::error::Result> { + if param.query.is_empty() && self.regex.is_match(param.resolved_path) { + let content = fs::read_file_utf8(param.resolved_path); + + if let Ok(content) = content { + return Ok(Some(farmfe_core::plugin::PluginLoadHookResult { + content, + module_type: ModuleType::Custom(String::from("sass")), + })); + } + } + + Ok(None) + } +} +``` + +在 `load` 钩子中,我们只读取以`.scss` 或者 `.sass`结尾的文件,返回文件内容并将其 module_type 设置为`ModuleType::Custom(String::from("sass"))`。 + +### 转化 `sass` 文件 + +加载 `.scss` 文件之后,我们需要在 `transform` hook 中将其转换为 `css`,然后 Farm 将在接下来的过程中将其视为 css + + +```rust +// ignore other code ... +fn transform( + &self, + param: &farmfe_core::plugin::PluginTransformHookParam, + context: &std::sync::Arc, +) -> farmfe_core::error::Result> { + // module type guard is neccessary + if param.module_type == ModuleType::Custom(String::from("sass")) { + // ... ignore other code + + // parse options + const options = parse_options(&self.options, param.module_id); + // compile sass to css + let compile_result = compileSass(¶m.content, options); + + return Ok(Some(farmfe_core::plugin::PluginTransformHookResult { + content: compile_result.css, + source_map: compile_result.source_map, + // tell farm compiler that we have transformed this module to css + module_type: Some(farmfe_core::module::ModuleType::Css), + ignore_previous_source_map: false, + })); + } + + Ok(None) +} +``` + +:::tip +这个例子只介绍了如何实现转换器。有关 Farm 支持的更多能力,请参阅[插件钩子](/zh/docs/api/rust-plugin-api)。 +::: diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/quick-start.mdx b/docs/i18n/zh/docusaurus-plugin-content-docs/current/quick-start.mdx new file mode 100644 index 000000000..d90a5d864 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/quick-start.mdx @@ -0,0 +1,104 @@ +--- +sidebar_position: 1 +--- + +import { PackageManagerTabs } from "../../../../src/theme/PackageManagerTabs"; + +:::warning +如果您正在使用的是 2.0.0-nightly 版本。请注意以下几点: +- Farm 正在为 2.0 版本努力, 我们重构了整个 node 端和 新增了很多实用的功能, 后续请查看 RoadMap +- 此版本是一个夜间构建版本,可能包含未经过全面测试的新功能和修复。因此,可能会出现不稳定的行为或意外的错误。 +- 由于此版本处于开发阶段,功能和API可能会在未来的版本中发生变化。请定期查看更新日志以获取最新信息。 +- 建议不要在生产环境中使用此版本,除非您已做好应对潜在问题的准备。 + +如果遇到了问题, 可以提供 Issues 来向我们反馈, 您的反馈对我们改进 Farm 的功能以及稳定性至关重要。 +::: + +# 快速开始 + +:::note +Farm 需要 **Node 16.18.0 及更高版本**。 +::: + +## 在线体验 + +[![Edit Farm](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/github/ErKeLost/react/main) + + +## 1. 创建一个 Farm 项目 + + + +:::warning +如果使用的是nightly 版本则需要把 Farm 的依赖都安装成 nightly 版本, 所有核心包以及插件我们都已经提供nightly 版本 + +::: + + +:::note{title="然后按照提示操作!"} +您还可以通过附加命令行选项直接指定项目名称和要使用的模板: +::: + + + + +## 2.启动项目 + +选择您喜欢的包管理器,安装依赖项,然后启动项目。 + + + + +默认情况下,该项目将从`http://localhost:9000`启动。 + +## 3. 配置项目 + +该项目由项目根目录中的“farm.config.ts/js/mjs”文件进行配置。 + +```ts title="farm.config.ts" +import { defineConfig } from "@farmfe/core"; + +export default defineConfig({ + // 编译相关配置 + compilation: { + input: { + // 可以配置相对或者绝对路径 + index: "./index.html", + }, + output: { + path: "./build", + publicPath: "/", + }, + // ... + }, + // Dev Server 相关配置 + server: { + port: 9000, + // ... + }, + // 插件配置 + plugins: [], +}); +``` + +:::note +配置详情请参阅 **[配置 Farm](/docs/config/configuring-farm)**。 +::: + +## 4. 构建项目 +将 Farm 项目构建为生产环境可用的静态文件: + +```bash +npm run build +``` + +构建的产品默认降级为`ES2017`,并且产品将被压缩和Tree Shake。 如果您想在本地预览构建产品,可以执行`npm run Preview`或`npx farm Preview`。 + +## 下一步 + +- [为什么需要 Farm?](/docs/why-farm) +- [特性](/docs/features/dev-server) +- [配置参考](/docs/config/configuring-farm) +- [插件](/docs/plugins/official-plugins/overview) +--- + diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/0-overview.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/0-overview.md new file mode 100644 index 000000000..51cde4a1c --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/0-overview.md @@ -0,0 +1,27 @@ +# 概述 +在本教程中,我们将从头开始创建一个 Farm React 项目,并介绍如何添加有用的组件库和 Farm 插件。 + +:::note +Vue项目也得到了Farm的全力支持。 Farm中可以直接使用`Vite`的`@vitejs/plugin-vue`。 Farm 与大多数 vite 插件兼容,并且可以开箱即用。 +::: + +你将学习: +* 如何从头开始构建一个生产就绪的 Farm React 项目。 我们将介绍配置常用插件、添加常见组件库等。 +* Farm的基本概念,如`input`、`output`、`dev-server`、`HMR`和`plugins` +* Farm的日常配置和常用插件。 + +我们的目标是通过本教程简化您使用 Farm 生态系统的开发体验。 如果您想从其他工具迁移到 Farm,它也会很有帮助。 + +:::note +本教程将 `从头开始构建 Farm React 项目`,如果您想快速启动一个新的 Farm 项目,请使用我们的官方模板和命令 `pnpm create farm`。 +::: + +跟着我们的教程,开启你的 Farm 极速开发之旅吧! + +* [1. 创建 Farm React 项目](/docs/tutorials/create) +* [2. 使用 Farm 开发项目](/docs/tutorials/start) +* [3. 使用 Farm 构建生产环境](/docs/tutorials/build) + +:::note +本教程的源代码在[Farm 教程仓库](https://github.com/farm-fe/tutorials) +::: \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/1-create.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/1-create.md new file mode 100644 index 000000000..6cc05e086 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/1-create.md @@ -0,0 +1,148 @@ +# 1. 创建一个项目 +在本章中,我们将从头开始创建一个新的 Farm React 项目,并以开发模式启动它。 + +:::note +在本教程中,我们使用 `pnpm` 作为默认包管理器。 本章将 `从头开始构建 Farm React 项目`,如果您想快速启动一个新的 Farm 项目,请使用我们的官方模板和命令 `pnpm create farm`。 +::: + +## 创建一个 Npm 包 +首先我们执行`pnpm init`来创建一个新包。 + +````bash +mkdir farm-react && cd farm-react && pnpm init +```` + +将自动生成`package.json`文件。 + +## 安装依赖项 +安装必要的依赖项(react 以及 react-dom:): + +```bash +pnpm add react react-dom && pnpm add react-refresh @types/react @types/react-dom -D +``` + +然后安装 Farm 相关依赖: +```bash +pnpm add -D @farmfe/cli @farmfe/core @farmfe/plugin-react +``` +React 项目需要 3 个包: +* **`@farmfe/cli`**:该包提供了`farm start`、`farm build`、`farm Preview`等命令,必须与`@farmfe/core`一起使用,不能单独使用。 +* **`@farmfe/core`**:该软件包提供`编译`和`Dev Server`,为本地开发和产品构建提供所有必要的组件。 它导出`Compiler`,`DevServer`和`Watcher`,用于`编译项目`,`以开发模式服务项目`和`监视项目的热模块替换`。 +* **`@farmfe/plugin-react`**:此包提供 React Jsx 编译和 React-refresh 支持。 + +## 创建 Farm 配置文件 +在项目根目录下创建一个`farm.config.ts`文件: +```text {2} +. +├── farm.config.ts +├── package.json +└── pnpm-lock.yaml +``` +并添加以下配置: +```ts +import { UserConfig } from '@farmfe/core'; + +function defineConfig(config: UserConfig): UserConfig { + return config; +} + +export default defineConfig({ + compilation: { + input: { + index: './src/index.html' + }, + output: { + path: 'build', + publicPath: '/', + targetEnv: 'browser' + } + }, + plugins: [ + '@farmfe/plugin-react', + ] +}); +``` +对于上面的配置文件,我们使用了`input`、`output`和`plugins`,这是Farm中最基本的配置。 +* **`input`**:配置入口点。 Farm 将根据条目编译并构建模块图。 +* **`输出`**:配置输出目录、文件名等。 有关完整选项,请参阅 [compilation.output](/docs/config/farm-config#output)。 +* **`plugins`**:配置farm插件,React、Vue SFC等所有扩展能力均由插件支持。 这里我们使用一个 Rust 插件(`@farmfe/plugin-react`)来支持编译 React jsx。 + +查阅[配置参考](/docs/config/farm-config)以获取更多选项。 + +:::note +在上面的例子中,我们将 input 配置为 `index: './src/index.html'`,如果我们不配置 `input`,则默认为 `index: './index.html'`。 并且我们可以在`input`中配置多个条目,详细信息请参见[多页面应用](/docs/features/html#multi-page-app) +::: + +## 创建一个入口Html和Js +在项目根目录下创建 2 个文件 `src/index.html` 和 `src/index.tsx`: +```text {5-7} +. +├── farm.config.ts +├── package.json +├── pnpm-lock.yaml +└── src + ├── index.html + └── index.tsx +``` +`src/index.html` 的内容是: +```html + + + + + + Document + + +
+ + + + +``` +:::note +请注意,我们必须添加至少一个` + + +``` + +当加载动态脚本和CSS时,动态获取的资源url也将是:`https://cdn.com/` + + +## 配置 Alias 以及 Externals +Alias 和 externals 是最常用的配置之一, 在 Farm 中,可以使用 `compilation.resolve.alias` 和 `compilation.externals` 配置项: + +```ts title="farm.config.ts" +// ... + +export default defineConfig({ + compilation: { + resolve: { + alias: { + '@/': path.join(process.cwd(), 'src') + }, + externals: [ + 'node:fs' + ] + } + } + // ... +}); +``` + +## 配置开发服务器 +您可以在[Farm Dev Server Config](/docs/config/farm-config#devserver-options---server)中找到服务器配置。 + +### 常用配置 +配置示例: +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + // 所有开发服务器选项都在 server 下 + server: { + open: true, + port: 9001, + hmr: { + // 配置Websocket的监听端口 + port: 9801 + host: 'localhost', + // 配置文件监听时要忽略的文件 + ignores: ['auto_generated/*'] + } + //... + } +}); +``` +对于上面的示例,我们使用了以下选项: +* **打开**:自动打开指定端口的浏览器 +* **端口**:将开发服务器端口设置为`9001` +* **hmr**:设置 hmr 端口和监视文件,我们忽略 `auto_generate` 目录下的文件更改。 + + +### Setup Proxy +配置服务器代理。基于 [http-proxy](https://github.com/http-party/node-http-proxy?tab=readme-ov-file#options) 实现,具体选项参考其文档,示例: + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + server: { + proxy: { + '/api': { + target: 'https://music-erkelost.vercel.app/banner', + changeOrigin: true, + pathRewrite: (path: any) => path.replace(/^\/api/, ''), + }, + }, + }, +}); +``` + +## 配置 root 和 envDir +使用`root`和`envDir`指定项目根目录和加载环境变量的目录。 在`farm.config.ts`中添加以下选项: + +```ts title="farm.config.ts" +import path from 'node:path'; +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + root: path.join(process.cwd(), 'client'), + envDir: 'my-env-dir' +}); +``` + +:::note +有关 `envDir` 的详细信息,请参阅[环境变量和模式](/docs/features/env) +::: diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/3-build.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/3-build.md new file mode 100644 index 000000000..ef44ebccb --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/3-build.md @@ -0,0 +1,130 @@ +# 3. 使用 Farm 构建生产项目 +默认情况下,Farm 已启用对生产版本的以下功能的支持: +* **`Tree Shake`**:裁剪和过滤不相关的模块和代码 +* **`压缩`**:压缩并混淆输出资源,有效减小产物体积。 +* **`自动注入Polyfill`**:默认情况下 Farm 降级到现代浏览器(ES7),如果需要旧版浏览器支持,请配置[`targetEnv`](/docs/config/compilation-options#output-targetenv) +* **`自动局部打包`**:根据依赖关系和大小,对项目进行局部打包。 对于每个资源请求,会生成大约25个资源,以保证并行加载性能,并尽可能提高缓存命中率。 + +## 配置输出目录 +在 `package.json` 中添加构建脚本: + +```json title="package.json" {7-8} +{ + "name": "1-create-a-project", + "version": "1.0.0", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "start": "farm start", + "build": "farm build", + "preview": "farm preview" + }, + // ...ignore other fields +} +``` + +然后执行`npm run build`,构建的资源将被生成到`build`目录 + +```text +build +├─ favicon.ico +├─ index.html +├─ index_02bc.bd68e90b.js +├─ index_02bc.bd68e90b.js.map +├─ index_1c74.4b50f73e.js +├─ index_7734.440d56a3.js +├─ index_880b.4631ecee.js +├─ index_8d49.63f7b906.css +├─ index_8d49.63f7b906.css.map +├─ index_9025.84e1f8e6.js +├─ index_ca37.f2c276ef.js +├─ index_ef2f.e25349d8.js +├─ index_f346.369a7312.js +``` + +如果您想自定义资源生成的路径,您可以使用: +* [`output.filename`](/docs/config/compilation-options#outputfilename) +* [`output.assetsFilename`](/docs/config/compilation-options#outputassetsfilename) + +```ts +import defineConfig from '@farmfe/core'; + +export default defineConfig({ + compilation: { + output: { + path: 'build', + filename: 'assets/[name].[hash].[ext]', + assetsFilename: 'static/[resourceName].[ext]' + } + } +}) +``` + +对于上面的示例,所有`js/css`将被发送到`build/assets/`(例如:`build/assets/index-ea54.abbe3e.js`)。 所有静态资源(例如图像)都将发送到`build/static`(例如:`build/static/background.png`) + +## 预览构建的资源 +资源构建完成后,您可以通过`npm run Preview`进行预览: + +```sh +$ npm run preview + +> 3-build@1.0.0 preview +> farm preview + +[ Farm ] Using config file at /root/tutorials/3-build-for-production/farm.config.ts +[ Farm ] preview server running at: + +[ Farm ] > Local: http://localhost:1911/ +[ Farm ] > Network: http://198.18.0.1:1911/ +[ Farm ] > Network: http://10.242.197.146:1911/ +[ Farm ] > Network: http://192.168.1.31:1911/ +``` + +打开`http://localhost:1911/`来预览项目。 + +## 浏览器兼容性 +默认情况下,Farm 将项目构建到本机支持`async/await`的现代浏览器: + +* Chrome >= 62 +* Firefox >= 63 +* Safari >= 13.1 +* Edge >= 79 + +可以使用 [output.targetEnv](/docs/config/compilation-options#output-targetenv) 来配置目标浏览器: + +```ts +import { defineConfig } from '@farmfe/core'; + +export default defineConfig({ + compilation: { + output: { + targetEnv: 'browser-legacy' + } + } +}) +``` + +在上面的例子中,Farm 会将语法降级为 `es5` 并自动注入 polyfill。 然后我们必须安装`core-js@3`来进行`polyfill`注入: + +```sh +pnpm add -D core-js@3 +``` + +:::note +* 如果您的目标是旧版浏览器,则需要手动安装 `core-js@3`。 +* 如果你想更精确地配置浏览器目标,请参阅[语法 Downgrade 和 Polyfill](/docs/advanced/polyfill) +::: + +## 配置 Tree Shake 和 Minify +出于性能原因,像`treeShake`和`minify`这样的生产优化在`development`中默认被`禁用`,而在`生产`中默认被`启用`。 但如果手动配置了`treeShake`或`minify`,则无论`development`或`productive`都将使用默认值。 + +有关 Tree Shake 和 Minify 的详细信息,请参阅: +* [Tree Shake](/docs/advanced/tree-shake) +* [Minification](/docs/advanced/minification) + + +## 配置局部打包策略 +:::note +详细信息参考[局部打包](/docs/advanced/partial-bundling)。 +::: + +Farm 已经启用了打包的最佳实践,请确保您确实需要手动配置打包策略,参考[局部打包](/docs/advanced/partial-bundling) 了解详情。 \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/_category_.json b/docs/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/_category_.json new file mode 100644 index 000000000..8fb5c6807 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/tutorials/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "教程", + "position": 3, + "link": { + "type": "generated-index", + "description": "Features supported by Farm" + } +} diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/using-plugins.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/using-plugins.md new file mode 100644 index 000000000..5062779d5 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/using-plugins.md @@ -0,0 +1,278 @@ +# 使用插件 +Farm支持4种插件: +* **`Farm 编译插件`**:支持 Rust 插件和 Js 插件,采用 rollup 风格的 hooks。 +* **`Vite/Rollup/Unplugin 插件`**:Farm 开箱即用支持 Vite/Rollup/Unplugin 插件 +* **`Farm 运行时插件`**:为 Farm 的运行时系统添加功能。 +* **`Swc 插件`**:Farm 开箱即用支持 Swc 插件。 + +:::tip +如何编写自己的插件,请参考[插件](/docs/plugins/writing-plugins/overview) +::: + +## Farm 编译插件 +首先,安装您需要的插件,例如: +```bash +pnpm add -D @farmfe/plugin-sass @farmfe/js-plugin-postcss +``` + +使用 `plugins` 配置 Farm 编译插件: +```ts title="farm.config.ts" +import farmPostcssPlugin from "@farmfe/js-plugin-postcss"; + +export default defineConfig({ + // ... + plugins: [ + // Rust插件,配置其包名 + "@farmfe/plugin-sass", + // JS插件,配置插件对象 + farmPostcssPlugin() + ], +}); +``` + +Farm编译插件有2种: +* **`Rust Plugins`**:用 Rust 编写,具有最佳性能。 +* **`Js Plugins`**:用JS/TS编写,用于兼容当前的JS生态系统 + +### 使用 Rust 插件 +使用 `package name` 来配置 Rust 插件,例如: +```ts title="farm.config.ts" +export default defineConfig({ + // ... + plugins: [ + "@farmfe/plugin-sass", + ], +}); +``` +对于上面的例子,Farm 将解析包 `@farmfe/plugin-sass` 并将其视为 Farm Rust 插件。 + +如果要为 Rust 插件配置选项,可以使用`数组语法`,如`[packageName, optionsObject]`,例如: +```ts title="farm.config.ts" +export default defineConfig({ + // ... + plugins: [ + // 使用数组语法来配置 Rust 插件 + [ + // Rust 插件的名称 + "@farmfe/plugin-sass", + // Rust 插件的选项 + { + additionalData: '@use "@/global-variables.scss";' + } + ], + ], +}); +``` +目前 Farm 官方支持 2 个 Rust 插件: +* **`@farmfe/plugin-react`**:Farm rust 插件,用于 React jsx 编译和 React-refresh 注入。 +* **`@farmfe/plugin-sass`**:用于 scss 文件编译的 Farm rust 插件,内部使用 `sass-embedded`。 + +:::tip +要了解有关 rust 插件的更多信息,请参阅 [Rust 插件](/docs/plugins/official-plugins/overview#rust-插件) +::: + +### 使用 Js 插件 +Farm JS 插件是一个以方法为钩子的 JS 对象,例如: +```ts title="farm.config.ts" +import farmPostcssPlugin from "@farmfe/js-plugin-postcss"; + +export default defineConfig({ + plugins: [ + farmPostcssPlugin({ + // ... 配置 postcss 选项 + }) + ], +}); +``` +`farmPostcssPlugin()`返回一个插件对象,您可以通过其参数传递任何 postcss 选项。 + +您可以使用`priority`来控制插件的顺序,例如: +```ts title="farm.config.ts" {10,11} +import farmPostcssPlugin from "@farmfe/js-plugin-postcss"; + +export default defineConfig({ + plugins: [ + { + ...farmPostcssPlugin({ + // ... configure postcss options + }), + // larger priority will be executed first, priority of internal plugin are 100. + priority: 1000, + } + ], +}); +``` +内部插件的优先级都是100,如果想让插件先执行,就设置大于100,否则设置小于100。 + +如果你想快速添加 Farm JS 插件,只需配置一个插件对象即可: +```ts title="farm.config.ts" +import readFileSync from 'fs'; + +export default defineConfig({ + plugins: [ + // 配置自定义插件 + { + // 插件名称,必填 + name: 'my-first-farm-plugin', + // 这个插件的优先级,值越大先执行,默认100。 + priority: 1000, + // 定义一个加载钩子来确定如何加载模块 + load: { + // 为了提高性能,如果模块与过滤器不匹配,将被跳过。 + filters: { + // 仅对 .png 文件执行。 + resolvedPaths: ['\\.txt$'] + }, + // 该钩子的执行回调 + executor: (params, context) => { + const { resolvedPath } = params; + const content = readFileSync(resolvedPath, 'utf-8'); + + return { + content: `export default '${content}'`, + moduleType: 'js' + } + } + } + } + ], +}); +``` +:::warning +Farm 中的 js 插件需要 `filters`。 因为Js Plugin实在是太慢了,我们应该尽量避免执行它。配置 filters 后,对于那些不符合过滤器的模块,Farm 根本不会为它们触发 js 插件钩子! 这意味着 Farm 只在 Rust 侧就能安全、并发地进行处理,以最大化提升编译性能。 +::: + +:::tip +了解更多关于 Farm Js 插件的信息,请参考 [JS 插件](/docs/plugins/official-plugins/overview#js-插件) +::: + +## 使用 Vite/Rollup/Unplugin 插件 +Farm 兼容 Vite 插件,Vite 插件可以直接在 Farm 中配置使用。 首先需要安装 vite 插件,例如: +```bash +pnpm add @vitejs/plugin-vue @vitejs/plugin-vue-jsx vite -D +``` + +然后就可以通过`farm.config.ts`中的`vitePlugins`直接使用vite插件了。 + +```ts title="farm.config.ts" +import vue from '@vitejs/plugin-vue', +import vueJsx from '@vitejs/plugin-vue-jsx'; + +export default defineConfig({ + // 配置vite插件 + vitePlugins: [ + vue(), + vueJsx() + ] +}); +``` +为了提高 vite 插件的性能,您可以使用返回`过滤器`的`函数语法`,例如: + +```ts title="farm.config.ts" +import vue from '@vitejs/plugin-vue', + +// // 使用Farm 中 Vite 插件的函数语法 +function configureVitePluginVue() { + // 返回插件及其过滤器 + return { + // 使用 vue 插件 + vitePlugin: vue(), + // 为其配置过滤器。 不匹配的模块路径将被跳过。 + filters: ['\\.vue$', '\\\\0.+'] + }; +} + +export default defineConfig({ + vitePlugins: [ + configureVitePluginVue + ] +}); +``` + +使用 unplugin: +```bash +pnpm add unplugin-auto-import unplugin-vue-components -D +``` +在 `vitePlugins` 中配置,通过 `unplugin/vite` 或者 `unplugin/rollup` 支持: +```ts title="farm.config.ts" +import vue from '@vitejs/plugin-vue', +import AutoImport from 'unplugin-auto-import/vite' +import Components from 'unplugin-vue-components/vite' +import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' + +export default defineConfig({ + vitePlugins: [ + vue(), + // ... + AutoImport({ + resolvers: [ElementPlusResolver({ importStyle: 'sass' })], + }), + Components({ + resolvers: [ElementPlusResolver({ importStyle: 'sass' })], + }), + ] +}); +``` +:::note +目前,您可以在 Farm 中使用`unplugin/farm`、`unplugin/vite`和`unplugin/rollup`。如果您使用的是`unplugin/vite`或`unplugin/Rolup`,有些属性可能还没有完全适配,或者 Farm 团队认为该 `api` 不具备适配条件,可以提供[issues](https://github.com/farm-fe/farm/issues/new/choose) . +::: + +## Farm 运行时插件 +Farm有一个运行时模块系统来控制如何加载和执行模块。 配置 `compilation.runtime.plugins` 以添加更多运行时插件,例如: +```ts +export default defineConfig({ + compilation: { + // 配置 Farm 运行时模块系统 + runtime: { + plugins: [ + // 运行时插件包 + require.resolve('farm-plugin-runtime-mock'), + // 本地运行时插件 + path.join(process.cwd(), "build/runtime-plugin.ts") + ] + } + } +}); +``` +您必须配置指向运行时插件的路径。 推荐使用 **绝对路径** 以避免路径问题。 + +:::tip +要了解有关运行时插件的更多信息,请参阅 [运行时插件](/docs/plugins/writing-plugins/runtime-plugin) +::: + +## 使用 SWC 插件 +Swc Plugin 也可以直接在Farm中使用,配置`compilation.script.plugins`来添加SWC插件,例如: +```ts +import jsPluginVue from '@farmfe/js-plugin-vue'; + +export default defineConfig({ + compilation: { + script: { + plugins: [{ + //swc插件的包名 + name: 'swc-plugin-vue-jsx', + // 该swc插件的选项 + options: { + "transformOn": true, + "optimize": true + }, + // 当过滤器匹配时插件执行。 + filters: { + // resolvedPaths: [".+"] + moduleTypes: ['tsx', 'jsx'], + } + }] + } + }, + plugins: [jsPluginVue()], +}); +``` + +数组的每个插件项包含三个字段: +* **name**:swc插件的包名 +* **options**:传递给swc插件的配置项 +* **filters**:执行插件的哪些模块,必须配置,支持`resolvedPaths`和`moduleTypes`这两个过滤项,如果两者同时指定,则取并集。 + +:::note +`SWC 插件`可能与 Farm 使用的 `SWC 版本`(rust crate `swc_core v0.90`) 不兼容。 如果出现错误,请尝试升级插件。 +::: diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/why-farm.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/why-farm.md new file mode 100644 index 000000000..eadab99b4 --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/why-farm.md @@ -0,0 +1,47 @@ +--- +sidebar_position: 2 +--- + +# 为什么需要 Farm? + +## Farm 是什么? + +Farm 是一个非常快的基于 Rust 的 Web 构建工具,类似 `webpack` 和 `vite`,但**更快**。 farm `resolve, load, transform` 所有 `asset(js/jsx/ts/tsx、css/sass/less、html、静态资源、json 等)`,并将它们打包成一系列`可部署文件`。 Farm 是一个速度极快的构建工具,可帮助您构建更快的 `web/nodejs` 应用程序。 + +## 为什么需要 Farm? + +随着 web 项目规模的扩大,构建性能已经成为主要瓶颈,对于一个庞大的项目,使用 webpack 编译可能需要 10min 甚至更多,一次 hmr 更新可能需要 10s 甚至更多,严重降低了研发效率。 + +因此我们急需极速的构建工具,解决项目编译性能问题。然后 vite/snowpack 这样的 unbundled 工具应运而生,此类工具主要有下面三个特性: + +1. 使用原生 ESM,在 dev server 启动时**不对**源文件进行编译和打包,源文件在入口模块执行时才会通过浏览器请求 dev server 编译,编译后的产物返回给浏览器 +2. HMR 时,只重新编译一个模块,这样 HMR 的时间约等于一个模块的编译时间 +3. 对外部依赖(如 node_modules 下的依赖)进行预打包 + +这使得 dev 服务器热启动和 HMR 非常快,但 vite 等工具使用的 Unbundled 模式并不完美,对于大型项目来说仍然存在很大的问题: + +- **大量的模块请求**:对于一个大型项目,使用上述策略 1、2,首次启动可能需要加载数千个模块,使用原生模块系统加载数千个模块会导致浏览器卡住甚至崩溃。虽然 Dev Server 的启动快了,但是请求时的模块的首次编译依然会耗费大量时间,会有数十秒起步的白屏,编译时间只是转移了,并没有消失。 +- **开发和生产之间的不一致**:出于兼容性和请求数量、请求层级的考虑,原生 ES 模块在大多数情况下无法在生产中使用。 因此 vite 选择在生产环境选择用 rollup 打包。 这就带来了不一致,当这种不一致导致生产错误时,调试起来非常困难且非常痛苦。 而 vite 在 dev 中使用 esbuild,在生产中使用 rollup,这更加就放大了不一致性。 +- **拆包优化困难**: 受限于 Rollup,拆包配置不够灵活、易用。 +- 而 Vite 在 dev 上之所以这么快,esbuild 功不可没,它是用 go 编写的。 Go 利用了原生平台的优势,远快于 Js。 + +事实上,我们真正需要的是一个快速、强大、一致的 Web 构建工具,可以在解决上述问题的基础上,提供更加极致的编译效率。因此我们设计并开发了 Farm。 + + + + + +不过 Farm 不仅仅是一个用 Rust 重写的打包工具,它还有很多强大且先进的设计: + +## Farm 设计理念 + +- **性能优先**:一切都会用 Rust 编写,只有少数不是性能瓶颈的部分会用 JS 编写 +- **一致性**:默认情况下确保开发和生产完全相同,您在开发中看到的将与您在生产中得到的相同。 +- **局部打包**:Farm 的打包目标不是将所有东西打包在一起,而是限制资源的请求数量。 Farm 会根据依赖关系和资源大小将您的项目捆绑成 20-30 个小资源,在不损失缓存粒度的情况下获得最佳的资源加载性能。 +- **所有资源视为一等公民**:Farm 不再需要将所有内容转换为 Javascript,它将任何内容视为一等公民,如 `html`、`js/jsx/ts/tsx`、`css/scss`、`png/svg/...`都是 Farm 支持的基础模块,更多类型的模块可以通过插件支持。 +- **兼容性**:Farm 将适用于旧版 (ES5) 和现代浏览器。 +- **Rollup 风格的插件系统**:轻松创建自己的插件,并轻松从 `rollup/vite/webpack` 迁移您的插件/项目。兼容 `Vite/Rollup/Unplugin` 插件 + +Farm 的目标是成为真正的下一代构建工具,快速、强大、一致,并为 Web 开发人员提供最佳的开发体验。 diff --git a/docs/i18n/zh/docusaurus-theme-classic/footer.json b/docs/i18n/zh/docusaurus-theme-classic/footer.json new file mode 100644 index 000000000..2bdc8e81a --- /dev/null +++ b/docs/i18n/zh/docusaurus-theme-classic/footer.json @@ -0,0 +1,62 @@ +{ + "link.title.Docs": { + "message": "Docs", + "description": "The title of the footer links column with title=Docs in the footer" + }, + "link.title.More": { + "message": "More", + "description": "The title of the footer links column with title=More in the footer" + }, + "link.item.label.Guilds": { + "message": "Guilds", + "description": "The label of footer link with label=Guilds linking to /docs/quick-start" + }, + "link.item.label.Blog": { + "message": "Blog", + "description": "The label of footer link with label=Blog linking to /quick-start" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "The label of footer link with label=GitHub linking to https://github.com/farm-fe/farm" + }, + "copyright": { + "message": "Copyright © 2023 Farm Team. Built with Docusaurus.", + "description": "The footer copyright" + }, + "link.title.Learn": { + "message": "Learn", + "description": "The title of the footer links column with title=Learn in the footer" + }, + "link.title.Community": { + "message": "Community", + "description": "The title of the footer links column with title=Community in the footer" + }, + "link.item.label.Introduction": { + "message": "Introduction", + "description": "The label of footer link with label=Introduction linking to /why-farm" + }, + "link.item.label.Installation": { + "message": "Installation", + "description": "The label of footer link with label=Installation linking to /quick-start" + }, + "link.item.label.WeChat Group": { + "message": "WeChat Group", + "description": "The label of footer link with label=WeChat Group linking to https://github.com/farm-fe/farm#chat-with-us" + }, + "link.item.label.Discord": { + "message": "Discord", + "description": "The label of footer link with label=Discord linking to https://discord.com/invite/mDErq9aFnF" + }, + "link.item.label.Changelog": { + "message": "Changelog", + "description": "The label of footer link with label=Changelog linking to /quick-start" + }, + "link.item.label.Twitter": { + "message": "Twitter", + "description": "The label of footer link with label=Twitter linking to https://twitter.com/@farm-fe" + }, + "logo.alt": { + "message": "Farm Logo", + "description": "The alt text of footer logo" + } +} diff --git a/docs/i18n/zh/docusaurus-theme-classic/navbar.json b/docs/i18n/zh/docusaurus-theme-classic/navbar.json new file mode 100644 index 000000000..7f9114908 --- /dev/null +++ b/docs/i18n/zh/docusaurus-theme-classic/navbar.json @@ -0,0 +1,34 @@ +{ + "title": { + "message": "Farm", + "description": "The title in the navbar" + }, + "item.label.Guides": { + "message": "指南", + "description": "Navbar item with label Guides" + }, + "item.label.Config": { + "message": "配置", + "description": "Navbar item with label Config" + }, + "item.label.Plugins": { + "message": "插件", + "description": "Navbar item with label Plugins" + }, + "item.label.Community": { + "message": "社区", + "description": "Navbar item with label Community" + }, + "item.label.Team": { + "message": "团队", + "description": "Navbar item with label Community Team" + }, + "item.label.Blog": { + "message": "日志", + "description": "Navbar item with label Community Blog" + }, + "logo.alt": { + "message": "My Site Logo", + "description": "The alt text of navbar logo" + } +} diff --git a/docs/nyxbui.json b/docs/nyxbui.json new file mode 100644 index 000000000..35c2caf04 --- /dev/null +++ b/docs/nyxbui.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://nyxbui.design/schema.json", + "style": "default", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "tailwind.config.js", + "css": "src/css/custom.scss", + "baseColor": "rose", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "~/components", + "utils": "~/lib/utils" + } +} \ No newline at end of file diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 000000000..45366dc92 --- /dev/null +++ b/docs/package.json @@ -0,0 +1,93 @@ +{ + "name": "farm-docs", + "version": "0.0.0", + "private": true, + "scripts": { + "docusaurus": "docusaurus", + "start": "docusaurus start --port 1911", + "dev": "docusaurus start --port 1911", + "dev:zh": "docusaurus start --port 1911 --locale zh", + "build": "docusaurus build", + "swizzle": "docusaurus swizzle", + "deploy": "docusaurus deploy", + "clear": "docusaurus clear", + "serve": "docusaurus serve --port 9000", + "write-translations": "docusaurus write-translations", + "write-heading-ids": "docusaurus write-heading-ids", + "crowdin-upload": "pnpm write-translations && crowdin upload sources --auto-update", + "crowdin-download": "crowdin download", + "crowdin-status": "crowdin status translation --no-colors --no-progress", + "crowdin:sync": "pnpm copy-docs && pnpm crowdin-upload && pnpm crowdin-download --verbose", + "update-progress": "ts-node ./scripts/translations.ts", + "crowdin": "crowdin", + "documate:upload": "documate upload" + }, + "dependencies": { + "@crowdin/cli": "3", + "@crowdin/crowdin-api-client": "^1.23.4", + "@docusaurus/core": "3.5.2", + "@docusaurus/plugin-ideal-image": "3.5.2", + "@docusaurus/preset-classic": "3.5.2", + "@docusaurus/theme-common": "3.5.2", + "@docusaurus/theme-search-algolia": "3.5.2", + "@mdx-js/react": "^3.0.0", + "@radix-ui/react-icons": "^1.3.0", + "@react-spring/web": "^9.7.3", + "@react-three/drei": "9.112.1", + "@react-three/fiber": "8.17.7", + "@shikijs/markdown-it": "^1.18.0", + "@shikijs/transformers": "^1.18.0", + "@tabler/icons-react": "^3.11.0", + "autoprefixer": "^10.4.14", + "class-variance-authority": "^0.7.0", + "docusaurus-plugin-sass": "0.2.5", + "docusaurus-preset-shiki-twoslash": "^1.1.41", + "leva": "^0.9.35", + "lucide-react": "^0.394.0", + "markdown-it": "^14.1.0", + "next-themes": "^0.3.0", + "postcss": "^8.4.24", + "postcss-preset-env": "^10.0.3", + "prism-react-renderer": "^2.1.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-icons": "^5.3.0", + "react-intersection-observer": "^9.5.1", + "react-use-measure": "^2.1.1", + "remark-gfm": "^4.0.0", + "sass": "^1.63.6", + "tailwindcss-animate": "^1.0.7", + "three": "0.168.0" + }, + "devDependencies": { + "@docusaurus/module-type-aliases": "3.5.2", + "@docusaurus/types": "3.5.2", + "@swc/core": "^1.3.99", + "babel-loader": "^9.1.3", + "clsx": "^1.2.1", + "framer-motion": "^11.2.10", + "shiki": "^1.7.0", + "shikiji": "0.9.10", + "swc-loader": "^0.2.3", + "tailwind-merge": "^2.3.0", + "tailwindcss": "^3.4.4", + "ts-node": "^10.9.1" + }, + "browserslist": { + "production": [ + ">0.5%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + }, + "engines": { + "node": ">=18.0", + "pnpm": ">=8" + }, + "packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a" +} \ No newline at end of file diff --git a/docs/scripts/progress_translate_lang.json b/docs/scripts/progress_translate_lang.json new file mode 100644 index 000000000..2aa7f954c --- /dev/null +++ b/docs/scripts/progress_translate_lang.json @@ -0,0 +1,6 @@ +{ + "zh-CN": { + "translationProgress": 100, + "approvalProgress": 100 + } +} \ No newline at end of file diff --git a/docs/scripts/translations.ts b/docs/scripts/translations.ts new file mode 100644 index 000000000..9c4cccb42 --- /dev/null +++ b/docs/scripts/translations.ts @@ -0,0 +1,31 @@ +import fs from "fs/promises"; +import path from "path"; + +import crowdin, { + Credentials, + TranslationStatus, +} from "@crowdin/crowdin-api-client"; + +const token = + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ3UUVxdmhVM3ZMT2EyWGljbVV5VCIsImp0aSI6IjYxZjI5YjkyYmU4YTUwMjk5MWEzMmM0ZWRmMDQ3ZTk1NjFhZDIyMzk2OGE1MmQ4MGFlNzM1YmY1YWVjNzZiMDVlODk5YjEzMWMzN2MxYWY2IiwiaWF0IjoxNjkwMjg5MTE2LjY2NDAxOCwibmJmIjoxNjkwMjg5MTE2LjY2NDAyMSwiZXhwIjoxNzIxODI1MTE2LjU1NjU4Miwic3ViIjoiMTU5MzQ5MDMiLCJzY29wZXMiOlsicHJvamVjdCJdLCJkb21haW4iOm51bGwsImFzc29jaWF0aW9ucyI6WyIqIl0sInNlc3Npb24iOjB9.rG2dtUOUI6y4YzlL4_AxfHSGhH8XsAQDBIPxb-hts56kOWnaACVHU9-Y2e7ABzaAmEsdxJ4Wl6kByFAF1DJ-n-ga02PVPW1EV8RulXZwram5lofZUjanq8OBuBMnOptJsxhmf962_t8G7lDvN0zYcOuddKg_sBcmEC1QS8ngF0OwDrQhOyzyAavciUIbwZERsLKoXyMj1EDWEtJ8UWePFcCiQUk5pffnOXR-lVgudO9JgK4breoKB6cTKp_J4mj8eFUmEOwgYhciNIxTYhmMrv43l9-sgPQA2NBct5p0ifHrPtktl5uEZYrjMQqwGhVDSVA5OakyYVdp2MsT2dTgBBqd9HY7Cuph9A5JDEL3ZwEW8Exw3qWcBDUKv7-IONcRSrbUIyTzw0ZYBSz5lE--33vsdWEOuZCDaU16pHOjCfudsiDjQI5RFVLYsMo05Qkf0zzse3WYNybxx2YrO2JiYRdjgGzN-inUoMek7phvjbFKq30XCI2CZDa3XrZjwgCF3RTAd-hoFIsi65u1vj-L554xvIU6NITHVklunZcIcZjoRFeDN1uw5pXcRMRcfchjBpSXNQRucdkRN-P2ay5dZS1M8tGlvygJtjc5pFgDGV51Zx_NFVGv75xrQ_UivKE8UIljwt5Aci_eHDE_f8keMANrATdSzMmXlyRUhh-8aWI"; + +(async () => { + const credentials: Credentials = { + token, + }; + const { projectsGroupsApi } = new crowdin(credentials); + const t = await projectsGroupsApi.listProjects(); + const api: TranslationStatus = new TranslationStatus(credentials); + const progress = await api.getProjectProgress(603701, { limit: 100 }); + const final = progress.data.reduce((acc, item) => { + const { languageId, translationProgress, approvalProgress } = item.data; + // @ts-ignore + acc[languageId] = { translationProgress, approvalProgress }; + return acc; + }, {}); + + fs.writeFile( + path.join(__dirname, "./progress_translate_lang.json"), + JSON.stringify(final, null, 4) + ); +})(); diff --git a/docs/sidebars.js b/docs/sidebars.js new file mode 100644 index 000000000..54fdb7f2d --- /dev/null +++ b/docs/sidebars.js @@ -0,0 +1,178 @@ +/** + * Creating a sidebar enables you to: + - create an ordered group of docs + - render a sidebar for each doc of that group + - provide next/previous navigation + + The sidebars can be generated from the filesystem, or explicitly defined here. + + Create as many sidebars as you want. + */ + +// @ts-check + +/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ +const sidebars = { + // By default, Docusaurus generates a sidebar from the docs folder structure + // tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], + + // But you can create a sidebar manually + tutorialSidebar: [ + { + type: "category", + label: "Getting Started", + collapsed: false, + items: ["why-farm", "quick-start", "using-plugins", 'contribution'], + }, + { + type: "category", + label: "Tutorial", + collapsed: false, + items: [ + "tutorials/overview", + "tutorials/create", + "tutorials/start", + "tutorials/build", + ], + }, + { + type: "category", + label: "Features", + collapsed: false, + items: [ + "features/dev-server", + "features/html", + "features/css", + "features/script", + "features/static", + "features/env", + "features/lazy-compilation", + "features/sourcemap", + ], + }, + { + type: "category", + label: "Frameworks", + collapsed: true, + items: [ + "frameworks/vanilla", + "frameworks/react", + "frameworks/vue", + "frameworks/solid", + "frameworks/svelte", + "frameworks/preact", + "frameworks/lit", + "frameworks/electron", + "frameworks/tauri", + "frameworks/nestjs", + ], + }, + { + type: "category", + label: "Advanced", + collapsed: true, + items: [ + "advanced/ssr", + "advanced/partial-bundling", + "advanced/tree-shake", + "advanced/minification", + "advanced/polyfill", + "advanced/persistent-cache" + ], + }, + { + type: "category", + label: "Migration", + collapsed: true, + items: ["migration/from-vite"], + }, + // "comparisons", + "benchmark", + ], + configSidebar: [ + { + type: "category", + label: "Configuration Reference", + collapsed: false, + items: [ + "config/configuring-farm", + "config/compilation-options", + "config/dev-server", + "config/shared", + // "config/plugins-options", + ], + }, + { + type: "category", + label: "CLI", + collapsed: false, + items: ["cli/cli-api"], + }, + // "config/farm-config", + // "config/cli", + ], + apiSidebar: [ + { + type: "category", + label: "Api Reference", + collapsed: false, + items: [ + "api/hmr-api", + "api/js-plugin-api", + "api/rust-plugin-api", + "api/runtime-plugin-api", + "api/javascript-api", + "api/rust-api", + ], + }, + ], + pluginSidebar: [ + { + type: "category", + label: "Official Plugins", + items: [ + "plugins/official-plugins/overview", + { + type: "category", + label: "Rust Plugins", + collapsed: false, + items: [ + "plugins/official-plugins/react", + "plugins/official-plugins/sass", + "plugins/official-plugins/strip", + "plugins/official-plugins/dsv", + "plugins/official-plugins/yaml", + "plugins/official-plugins/virtual", + "plugins/official-plugins/react-components", + ], + }, + { + type: "category", + label: "Js Plugins", + collapsed: false, + items: [ + "plugins/official-plugins/js-postcss", + "plugins/official-plugins/js-less", + "plugins/official-plugins/js-sass", + "plugins/official-plugins/js-svgr", + "plugins/official-plugins/js-dts", + ], + }, + ], + }, + "plugins/community-plugins", + { + type: "category", + label: "Writing Plugins", + collapsed: false, + items: [ + "plugins/writing-plugins/overview", + "plugins/writing-plugins/rust-plugin", + "plugins/writing-plugins/js-plugin", + "plugins/writing-plugins/runtime-plugin", + ], + }, + ], +}; + +module.exports = sidebars; diff --git a/docs/src/components/Benchmark/ProgressBar.tsx b/docs/src/components/Benchmark/ProgressBar.tsx new file mode 100644 index 000000000..5557c6d0f --- /dev/null +++ b/docs/src/components/Benchmark/ProgressBar.tsx @@ -0,0 +1,51 @@ +import React, { useState, useEffect } from "react"; +import { useSpring, animated } from "@react-spring/web"; +import styles from "./index.module.css"; + +export function formatTime(time: number, totalTime: number) { + if (totalTime < 1000) { + return `${time.toFixed(0)}ms`; + } else { + return `${(time / 1000).toFixed(2)}s`; + } +} + +export function ProgressBar({ value, max }) { + const [elapsedTime, setElapsedTime] = useState(0); + const TOTAL_TIME = value * 1000; + const isMobile = window.innerWidth < 768; + const progressBarWidth = isMobile ? 80 : 18; + const formattedTime = formatTime(elapsedTime, TOTAL_TIME); + const props = useSpring({ + width: "100%", + from: { width: "0%" }, + config: { + duration: TOTAL_TIME, + }, + onChange(data) { + setElapsedTime((parseFloat(data.value.width) / 100) * TOTAL_TIME); + }, + }); + + return ( +
+
+ +
+
+ {formattedTime} +
+
+ ); +} diff --git a/docs/src/components/Benchmark/index.module.css b/docs/src/components/Benchmark/index.module.css new file mode 100644 index 000000000..6b3ab26bc --- /dev/null +++ b/docs/src/components/Benchmark/index.module.css @@ -0,0 +1,84 @@ +.progress-bar-container { + width: 50vw; + height: 35px; + border-radius: 4px; + padding: 2px 6px; + box-sizing: content-box; + border: 1px solid var(--farm--border); +} + +.progress-bar-inner-container { + height: 25px; + background: #9f1a8f; + border-radius: 2px; +} + +.progress-bar { + height: 100%; + background: linear-gradient(to right, rgb(192 38 211), #d2269e); + border-radius: 2px; +} + +.font-mono { + font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, + Bitstream Vera Sans Mono, Courier New, monospace; +} + +:global(.dark) { + .progress-bar-inner-container { + background: #fba; + } +} + +@media (max-width: 768px) { + .progress-bar-container, + .progress-bar-inner-container { + height: 30px; + } +} + +.main { + position: relative; + width: 200px; + height: 50px; + cursor: pointer; + border-radius: 5px; + border: 2px solid #272727; + overflow: hidden; +} + +.fill { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: hotpink; +} + +.content { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + color: #272727; +} + +.container { + display: flex; + align-items: center; + height: 100%; + justify-content: center; +} + +.tabs { + display: flex; + justify-content: center; + flex-direction: column; + align-items: center; + width: 100%; +} diff --git a/docs/src/components/Benchmark/index.tsx b/docs/src/components/Benchmark/index.tsx new file mode 100644 index 000000000..7919615e4 --- /dev/null +++ b/docs/src/components/Benchmark/index.tsx @@ -0,0 +1,221 @@ +import { ProgressBar } from "./ProgressBar"; +import farmCard from "../Card"; +import { useInView } from "react-intersection-observer"; +import styles from "./index.module.css"; +import Translate from "@docusaurus/Translate"; +import Link from "@docusaurus/Link"; +import React, { useState, useMemo } from "react"; +import clsx from "clsx"; +import ShinyTextEx from "../MagicUi/shiny-text"; +const BENCHMARK_DATA = { + ColdStart: [ + { + name: "farm", + time: 0.396, + }, + { + name: "rsbuild", + time: 0.468, + }, + { + name: "vite", + time: 1.700, + }, + { + name: "webpack", + time: 2.078, + }, + ], + HotStart: [ + { + name: "farm", + time: 0.273, + }, + { + name: "rsbuild", + time: 0.468, + }, + { + name: "vite", + time: 1.426, + }, + { + name: "webpack", + time: 0.945, + }, + ], + HmrRoot: [ + { + name: "farm", + time: 0.018, + }, + { + name: "rsbuild", + time: 0.087, + }, + { + name: "vite", + time: 0.022, + }, + { + name: "webpack", + time: 0.532, + }, + ], + HmrLeaf: [ + { + name: "farm", + time: 0.013, + }, + { + name: "rsbuild", + time: 0.074, + }, + { + name: "vite", + time: 0.011, + }, + { + name: "webpack", + time: 0.165, + }, + ], + ColdBuild: [ + { + name: "farm", + time: 0.313, + }, + { + name: "rsbuild", + time: 0.363, + }, + { + name: "vite", + time: 1.543, + }, + { + name: "webpack", + time: 4.128, + }, + ], + HotBuild: [ + { + name: "farm", + time: 0.16, + }, + { + name: "rsbuild", + time: 0.363, + }, + { + name: "vite", + time: 1.540, + }, + { + name: "webpack", + time: 0.527, + }, + ], +}; +export default function Benchmark() { + const SCENE = [ + { name: ColdStart, title: "ColdStart" }, + { name: HotStart, title: "HotStart" }, + { name: HmrRoot, title: "HmrRoot" }, + { name: HmrLeaf, title: "HmrLeaf" }, + { name: ColdBuild, title: "ColdBuild" }, + { name: HotBuild, title: "HotBuild" }, + ]; + const [activeScene, setActiveScene] = useState("ColdStart"); + const { ref, inView } = useInView({ + triggerOnce: true, + threshold: 0.1, + }); + const performanceInfoList = useMemo(() => BENCHMARK_DATA[activeScene], [activeScene]); + + const [visibleSection, setVisibleSection] = useState("ColdStart"); + + function Pill({ section }) { + return ( +
+
{ + setVisibleSection(section.title); + setActiveScene(section.title); + }} + > + {section.name} +
+
+ ); + } + + function PillTabs({ SCENE, children }) { + return ( +
+
+ {SCENE.map((item, index) => { + return ; + })} +
+
{children}
+
+ ); + } + return ( + <> +
+ <> +
+
+
+ + {performanceInfoList.map((info) => ( +
+ {inView && ( + <> +
+ {info.name} +
+ info.time) + )} + /> + + )} +
+ ))} +
+
+ + {/* See benchmark details */} + + +
+
+
+
+ +
+ + ); +} diff --git a/docs/src/components/HomepageFeatures/index.js b/docs/src/components/HomepageFeatures/index.js new file mode 100644 index 000000000..20a2a8d04 --- /dev/null +++ b/docs/src/components/HomepageFeatures/index.js @@ -0,0 +1,144 @@ +import React from "react"; +import clsx from "clsx"; +import Translate, { translate } from "@docusaurus/Translate"; +// import Image from "@theme/IdealImage"; +import Rocket from "@site/static/img/rocket.png"; +import Plug from "@site/static/img/plug.png"; +import FeaturePng from "@site/static/img/feature.png"; +import Box from "@site/static/img/box.png"; +import Compatibility from "@site/static/img/compatible.png"; +import Consistency from "@site/static/img/consistency.png"; +import styles from "./styles.module.css"; +const FeatureList = [ + { + title: Extremely Fast, + Img: Rocket, + description: ( + + Written in Rust, start a React / Vue project in milliseconds and perform + an HMR update within 10ms for most situations. + + ), + className: + "w-full rounded-lg sm:block sm:col-span-2 md:col-span-1 lg:row-start-2 lg:col-span-2", + }, + { + title: Incremental Building, + Img: Box, + description: ( + + Incremental Building: Support persistent cache, module level cache + enabled by default, any module won't be compiled twice until it's + changed! + + ), + className: + "w-full rounded-lg sm:block sm:col-span-2 md:col-span-1 lg:row-start-2 lg:col-span-2", + }, + { + title: Rich Features, + Img: FeaturePng, + description: ( + + Farm supports compiling HTML, CSS, CSS Modules, Js/Jsx/Ts/Tsx, JSON, + Static Assets out of the box, supports Sass, Less, PostCSS, Vue, React, + Solid by way of official plugins, supports lazy compiling, partial + bundling and more + + ), + className: + "w-full rounded-lg sm:block sm:col-span-2 md:col-span-1 lg:row-start-2 lg:col-span-2", + }, + { + title: Fully Pluggable and Vite Compatible, + Img: Plug, + description: ( + + Everything inside Farm is powered by plugins, Supports both Rust and + JavaScript plugins. Support Vite plugins out of box. + + ), + className: + " w-full flex h-52 rounded-lg md:block lg:row-start-2 lg:col-span-2 lg:h-auto", + }, + { + title: Partial Bundling, + Img: Box, + description: ( + + Partial Bundling: Bundle your project into a few reasonable bundles, + speeding up resource loading without losing caching granularity. + + ), + className: + "w-full rounded-lg sm:block sm:col-span-2 md:col-span-1 lg:row-start-2 lg:col-span-2", + }, + { + title: Consistency and Compatibility, + Img: Compatibility, + description: ( + + What you see in development will be the same as what you get in + production. Supports both legacy (ES5) and modern browsers. + + ), + className: + " w-full flex h-52 rounded-lg md:block lg:row-start-2 lg:col-span-2 lg:h-auto", + }, +]; + +function Feature({ Img, title, description, className }) { + return ( +
+
+
+ +
+ +
+

{title}

+

{description}

+
+
+
+ ); +} + +export default function FeatureSection() { + return ( +
+
+
+ {FeatureList.map((feature, index) => ( + + ))} +
+
+
+ ); +} diff --git a/docs/src/components/HomepageFeatures/styles.module.css b/docs/src/components/HomepageFeatures/styles.module.css new file mode 100644 index 000000000..4095a9414 --- /dev/null +++ b/docs/src/components/HomepageFeatures/styles.module.css @@ -0,0 +1,111 @@ +.features { + display: flex; + align-items: center; + padding: 2rem 0; + width: 100%; +} + +.item { + width: 100%; + margin: 0 auto; +} + +.card { + /* border: 3px solid #252529; */ + border-radius: 10px; + padding: 0 0.5rem; + padding-top: 2rem; + position: relative; + /* background: var(--ifm-background) !important; */ + background: var(--ifm-f-white-soft); + z-index: 0; + width: 100%; + background-image: radial-gradient( + rgba(255, 255, 255, 0.2) 8%, + transparent 8% + ); + background-position: 0% 0%; + background-size: 5vmin 5vmin; + position: relative; + transition: background-position 350ms ease; + z-index: 2; + box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; +} + +.backgroundImage { + background: linear-gradient(-45deg, #e67ac6 50%, #47caff 50%); + border-radius: 50%; + filter: blur(36px); +} + +/*test card */ +.card-container { + cursor: pointer; + justify-content: center; + position: relative; +} + +.card-container:hover::before { + content: ""; + background: linear-gradient( + 45deg, + #7a00ff, + #9f1a8f, + #7a00ff, + #ff00c8, + #9f1a8f, + #7a00ff, + #ff00c8 + ); + position: absolute; + top: -2px; + left: -2px; + background-size: 400%; + z-index: -1000; + filter: blur(5px); + width: calc(100% + 4px); + height: calc(100% + 4px); + animation: glowing 16s linear infinite; + opacity: 1; + transition: opacity 0.3s ease-in-out; + border-radius: 10px; +} + +.card-container:after { + z-index: -1; + content: ""; + position: absolute; + width: 100%; + height: 100%; + background: var(--ifm-f-white-soft); + background-image: radial-gradient( + rgba(255, 255, 255, 0.2) 8%, + transparent 8% + ); + background-position: 0% 0%; + background-size: 5vmin 5vmin; + /* position: relative; */ + transition: background-position 350ms ease; + z-index: 100; + box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; + left: 0; + top: 0; + border-radius: 10px; +} +.card-container-content { + position: relative; + transition: background-position 350ms ease; + z-index: 1000; +} + +@keyframes glowing { + 0% { + background-position: 0 0; + } + 50% { + background-position: 400% 0; + } + 100% { + background-position: 0 0; + } +} diff --git a/docs/src/components/MagicUi/animated-beam.tsx b/docs/src/components/MagicUi/animated-beam.tsx new file mode 100644 index 000000000..fb8bf7c8e --- /dev/null +++ b/docs/src/components/MagicUi/animated-beam.tsx @@ -0,0 +1,188 @@ +"use client"; + +import { RefObject, useEffect, useId, useState } from "react"; +import { motion } from "framer-motion"; + +import { cn } from "../../lib/utils"; + +export interface AnimatedBeamProps { + className?: string; + containerRef: RefObject; // Container ref + fromRef: RefObject; + toRef: RefObject; + curvature?: number; + reverse?: boolean; + pathColor?: string; + pathWidth?: number; + pathOpacity?: number; + gradientStartColor?: string; + gradientStopColor?: string; + delay?: number; + duration?: number; + startXOffset?: number; + startYOffset?: number; + endXOffset?: number; + endYOffset?: number; +} + +export const AnimatedBeam: React.FC = ({ + className, + containerRef, + fromRef, + toRef, + curvature = 0, + reverse = false, // Include the reverse prop + duration = Math.random() * 3 + 4, + delay = 0, + pathColor = "gray", + pathWidth = 2, + pathOpacity = 0.2, + gradientStartColor = "#ffaa40", + gradientStopColor = "#9c40ff", + startXOffset = 0, + startYOffset = 0, + endXOffset = 0, + endYOffset = 0, +}) => { + const id = useId(); + const [pathD, setPathD] = useState(""); + const [svgDimensions, setSvgDimensions] = useState({ width: 0, height: 0 }); + + // Calculate the gradient coordinates based on the reverse prop + const gradientCoordinates = reverse + ? { + x1: ["90%", "-10%"], + x2: ["100%", "0%"], + y1: ["0%", "0%"], + y2: ["0%", "0%"], + } + : { + x1: ["10%", "110%"], + x2: ["0%", "100%"], + y1: ["0%", "0%"], + y2: ["0%", "0%"], + }; + + useEffect(() => { + const updatePath = () => { + if (containerRef.current && fromRef.current && toRef.current) { + const containerRect = containerRef.current.getBoundingClientRect(); + const rectA = fromRef.current.getBoundingClientRect(); + const rectB = toRef.current.getBoundingClientRect(); + + const svgWidth = containerRect.width; + const svgHeight = containerRect.height; + setSvgDimensions({ width: svgWidth, height: svgHeight }); + + const startX = + rectA.left - containerRect.left + rectA.width / 2 + startXOffset; + const startY = + rectA.top - containerRect.top + rectA.height / 2 + startYOffset; + const endX = + rectB.left - containerRect.left + rectB.width / 2 + endXOffset; + const endY = + rectB.top - containerRect.top + rectB.height / 2 + endYOffset; + + const controlY = startY - curvature; + const d = `M ${startX},${startY} Q ${ + (startX + endX) / 2 + },${controlY} ${endX},${endY}`; + setPathD(d); + } + }; + + // Initialize ResizeObserver + const resizeObserver = new ResizeObserver((entries) => { + // For all entries, recalculate the path + for (let entry of entries) { + updatePath(); + } + }); + + // Observe the container element + if (containerRef.current) { + resizeObserver.observe(containerRef.current); + } + + // Call the updatePath initially to set the initial path + updatePath(); + + // Clean up the observer on component unmount + return () => { + resizeObserver.disconnect(); + }; + }, [ + containerRef, + fromRef, + toRef, + curvature, + startXOffset, + startYOffset, + endXOffset, + endYOffset, + ]); + + return ( + + + + + + + + + + + + + ); +}; diff --git a/docs/src/components/MagicUi/animated-shiny-text.tsx b/docs/src/components/MagicUi/animated-shiny-text.tsx new file mode 100644 index 000000000..9732075b6 --- /dev/null +++ b/docs/src/components/MagicUi/animated-shiny-text.tsx @@ -0,0 +1,49 @@ +import { cn } from "../../lib/utils"; +import { ReactNode } from "react"; +import React from "react"; +import { ChevronRight, Github } from "lucide-react"; + +export function AnimatedGradientText({ + children, + className, +}: { + children: ReactNode; + className?: string; +}) { + return ( +
+
+ + {children} +
+ ); +} + +export default function AnimatedGradientStarWithGithub() { + return ( +
window.open("https://github.com/farm-fe/farm")} + className="z-10 flex min-h-[2rem] items-center justify-center cursor-pointer" + > + + ⭐️
{" "} + + Give Star with Farm Github + + + +
+
+ ); +} diff --git a/docs/src/components/MagicUi/blur-fade.tsx b/docs/src/components/MagicUi/blur-fade.tsx new file mode 100644 index 000000000..8204c7f07 --- /dev/null +++ b/docs/src/components/MagicUi/blur-fade.tsx @@ -0,0 +1,59 @@ +"use client"; + +import { useRef } from "react"; +import { AnimatePresence, motion, useInView, Variants } from "framer-motion"; + +interface BlurFadeProps { + children: React.ReactNode; + className?: string; + variant?: { + hidden: { y: number }; + visible: { y: number }; + }; + duration?: number; + delay?: number; + yOffset?: number; + inView?: boolean; + inViewMargin?: string; + blur?: string; +} + +export default function BlurFade({ + children, + className, + variant, + duration = 0.4, + delay = 0, + yOffset = 6, + inView = false, + inViewMargin = "-50px", + blur = "6px", +}: BlurFadeProps) { + const ref = useRef(null); + const inViewResult = useInView(ref, { once: true, margin: inViewMargin }); + const isInView = !inView || inViewResult; + const defaultVariants: Variants = { + hidden: { y: yOffset, opacity: 0, filter: `blur(${blur})` }, + visible: { y: -yOffset, opacity: 1, filter: `blur(0px)` }, + }; + const combinedVariants = variant || defaultVariants; + return ( + + + {children} + + + ); +} diff --git a/docs/src/components/MagicUi/card.tsx b/docs/src/components/MagicUi/card.tsx new file mode 100644 index 000000000..e93d8bccc --- /dev/null +++ b/docs/src/components/MagicUi/card.tsx @@ -0,0 +1,276 @@ +"use client"; +import { cn } from "../../lib/utils"; +import React from "react"; +import { BentoGrid, BentoGridItem } from "../ui/bento-grid"; +import Translate from "@docusaurus/Translate"; +import Rocket from "@site/static/img/rocket.png"; +import Plug from "@site/static/img/plug.png"; +import FeaturePng from "@site/static/img/feature.png"; +import Box from "@site/static/img/box.png"; +import Compatibility from "@site/static/img/compatible.png"; +import Consistency from "@site/static/img/consistency.png"; +import { + IconBoxAlignRightFilled, + IconClipboardCopy, + IconFileBroken, + IconSignature, + IconTableColumn, +} from "@tabler/icons-react"; +import { motion } from "framer-motion"; +import { AnimatedBeamPig } from "../ui/beam"; + +export default function BentoGridCard() { + return ( + + {items.map((item, i) => ( + p:text-lg]", item.className)} + icon={item.icon} + /> + ))} + + ); +} + +const SkeletonOne = () => { + const variants = { + initial: { + x: 0, + y: 0, + opacity: 1, + }, + animate: { + x: [0, 12], + transition: { + duration: .2, // + ease: "easeInOut", // + }, + }, + }; + + return ( + + + + + + ); +}; +const SkeletonTwo = () => { + const variants = { + initial: { + x: 0, + y: 0, + opacity: 1, + }, + animate: { + x: [0, 12], + transition: { + duration: .2, // + ease: "easeInOut", // + }, + }, + }; + + return ( + + + + + + ); +}; +const SkeletonThree = () => { + const variants = { + initial: { + x: 0, + y: 0, + opacity: 1, + }, + animate: { + x: [0, 12], + transition: { + duration: .2, // + ease: "easeInOut", // + }, + }, + }; + + return ( + + + + + + ); +}; +const SkeletonFour = () => { + const variants = { + initial: { + x: 0, + y: 0, + opacity: 1, + }, + animate: { + x: [0, 12], + transition: { + duration: .2, // + ease: "easeInOut", // + }, + }, + }; + + return ( + + + + ); +}; +const SkeletonFive = () => { + const variants = { + initial: { + x: 0, + y: 0, + opacity: 1, + }, + animate: { + x: [0, 12], + transition: { + duration: .2, // + ease: "easeInOut", // + }, + }, + }; + + return ( + + + + + + ); +}; +const items = [ + { + title: Extremely Fast, + description: ( + + + Written in Rust, start a React / Vue project in milliseconds and perform an HMR update within 10ms for most situations. + + + ), + header: , + className: "md:col-span-1", + icon: , + }, + { + title: Incremental Building, + description: ( + + + Incremental Building: Support persistent cache, module level cache + enabled by default, any module won't be compiled twice until it's + changed! + + + ), + header: , + className: "md:col-span-1", + icon: , + }, + { + title: Partial Bundling, + description: ( + + + Partial Bundling: Bundle your project into a few reasonable bundles, + speeding up resource loading without losing caching granularity. + + + ), + header: , + className: "md:col-span-1", + icon: , + }, + { + title: Rich Features and Fully Pluggable, + description: ( + + + Farm supports compiling HTML, CSS, CSS Modules, Js/Jsx/Ts/Tsx, JSON, Static Assets out of the box, supports Sass, Less, PostCSS, Vue, React, Solid by way of official plugins, supports lazy compiling, partial bundling and more. Everything inside Farm is powered by plugins, Supports both Rust and JavaScript plugins. Support Vite plugins out of box. + + + ), + header: , + className: "md:col-span-2", + icon: , + }, + + { + title: Consistency and Compatibility, + description: ( + + + What you see in development will be the same as what you get in + production. Supports both legacy (ES5) and modern browsers. + + + ), + header: , + className: "md:col-span-1", + icon: , + }, +]; diff --git a/docs/src/components/MagicUi/neon-gradient-card.tsx b/docs/src/components/MagicUi/neon-gradient-card.tsx new file mode 100644 index 000000000..4f8cec089 --- /dev/null +++ b/docs/src/components/MagicUi/neon-gradient-card.tsx @@ -0,0 +1,110 @@ +"use client"; + +import { cn } from "../../lib/utils"; +import React, { CSSProperties, ReactNode, useEffect, useRef, useState, useMemo } from "react"; + +interface NeonColorsProps { + firstColor: string; + secondColor: string; + thirdColor: string; +} + +interface NeonGradientCardProps { + className?: string; + children?: ReactNode; + borderSize?: number; + borderRadius?: number; + neonColors?: NeonColorsProps; + height?: string; + [key: string]: any; +} + +const DEFAULT_NEON_COLORS: NeonColorsProps = { + firstColor: "#ffaa40", + secondColor: "#9c40ff", + thirdColor: "#00FFF1", +}; + +const NeonGradientCard: React.FC = React.memo(({ + className, + children, + borderSize = 0, + borderRadius = 20, + height = '26rem', + neonColors = DEFAULT_NEON_COLORS, + ...props +}) => { + const containerRef = useRef(null); + const [dimensions, setDimensions] = useState({ width: 0, height: 0 }); + const childrenRef = useRef(children); + + const updateDimensions = () => { + if (containerRef.current) { + const { offsetWidth, offsetHeight } = containerRef.current; + setDimensions({ width: offsetWidth, height: offsetHeight }); + } + }; + + useEffect(() => { + updateDimensions(); + window.addEventListener("resize", updateDimensions); + return () => window.removeEventListener("resize", updateDimensions); + }, []); + + useEffect(() => { + if (childrenRef.current !== children) { + childrenRef.current = children; + updateDimensions(); + } + }, [children]); + + const cardStyle = useMemo(() => { + return { + "--border-size": `${borderSize}px`, + "--border-radius": `${borderRadius}px`, + "--neon-first-color": neonColors.firstColor, + "--neon-second-color": neonColors.secondColor, + "--neon-third-color": neonColors.thirdColor, + "--card-width": `${dimensions.width}px`, + "--card-height": `${dimensions.height}px`, + "--card-content-radius": `${borderRadius - borderSize}px`, + "--pseudo-element-background-image": `linear-gradient(0deg, ${neonColors.firstColor}, ${neonColors.secondColor}, ${neonColors.thirdColor})`, + "--pseudo-element-width": `${dimensions.width + borderSize * 2}px`, + "--pseudo-element-height": height, + "--after-blur": `${dimensions.width / 3}px`, + } as CSSProperties; + }, [borderSize, borderRadius, neonColors, dimensions, height]); + + return ( +
+
+ {children} +
+
+ ); +}); + +export default NeonGradientCard; diff --git a/docs/src/components/MagicUi/shiny-text.tsx b/docs/src/components/MagicUi/shiny-text.tsx new file mode 100644 index 000000000..0c1d6f178 --- /dev/null +++ b/docs/src/components/MagicUi/shiny-text.tsx @@ -0,0 +1,56 @@ +import { ArrowRightIcon } from "lucide-react"; +import { cn } from "../../lib/utils"; +import { CSSProperties, FC, ReactNode } from "react"; + +interface AnimatedShinyTextProps { + children: ReactNode; + className?: string; + shimmerWidth?: number; +} + +const ShinyText: FC = ({ + children, + className, + shimmerWidth = 100, +}) => { + return ( +
+ {children} +
+ ); +}; + + +export default function ShinyTextEx() { + return ( +
+
+ + 📈 See Benchmark Details + + +
+
+ ); +} diff --git a/docs/src/components/StarrySky/index.css b/docs/src/components/StarrySky/index.css new file mode 100644 index 000000000..6ca69f123 --- /dev/null +++ b/docs/src/components/StarrySky/index.css @@ -0,0 +1,39 @@ +@import url("https://rsms.me/inter/inter.css"); + +canvas { + margin: 0; + padding: 0; + width: 100%; + height: 100%; +} + +h1 { + inherit: unset; +} + +.layer { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + /* background: linear-gradient( + 0deg, + rgba(63, 12, 88, 0.25) 0%, + transparent 100% + ); */ + pointer-events: none; +} + +span.header { + font-weight: 700; + position: absolute; + display: inline-block; + width: 500px; + transform: translate3d(0, -50%, 0); + font-size: 9em; + line-height: 0.9em; + pointer-events: none; + top: 350px; + left: 50px; +} diff --git a/docs/src/components/StarrySky/index.js b/docs/src/components/StarrySky/index.js new file mode 100644 index 000000000..2a85fcf0b --- /dev/null +++ b/docs/src/components/StarrySky/index.js @@ -0,0 +1,95 @@ +import React, { Suspense, useRef } from "react"; +import { Canvas, primitive, useLoader } from "@react-three/fiber"; +import * as THREE from "three"; +import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader"; +import { + Loader, + useGLTF, + OrbitControls, + PerspectiveCamera, + Environment, + Stars, +} from "@react-three/drei"; + +import "./index.css"; + +function Model({ url }) { + const { nodes, materials } = useGLTF(url); + const model = useLoader(GLTFLoader, "/test.glb"); + + return ; +} + +export default function App() { + const starMaterial = new THREE.PointsMaterial({ + color: "rgb(255, 255, 0)", // 星星的颜色 + size: 0.1, // 星星的大小 + }); + + const particleCount = 100; + const particleGeometry = new THREE.BufferGeometry(); + const particleMaterial = new THREE.PointsMaterial({ + color: "white", + size: 0.1, + }); + const particlePositions = new Float32Array(particleCount * 3); + + for (let i = 0; i < particleCount; i++) { + const x = Math.random() * 100 - 50; + const y = Math.random() * 100 - 50; + const z = Math.random() * 100 - 50; + particlePositions[i * 3] = x; + particlePositions[i * 3 + 1] = y; + particlePositions[i * 3 + 2] = z; + } + + particleGeometry.setAttribute( + "position", + new THREE.BufferAttribute(particlePositions, 3) + ); + const particleSystem = useRef(); + return ( + <> + + + + + + + + {/* + + */} + + {/* */} + + +
+ + + ); +} diff --git a/docs/src/components/TeamMembers/index.module.css b/docs/src/components/TeamMembers/index.module.css new file mode 100644 index 000000000..f0c6cc2d8 --- /dev/null +++ b/docs/src/components/TeamMembers/index.module.css @@ -0,0 +1,25 @@ +.teamMembers .container { + grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); +} + +@media (min-width: 375px) { + .teamMembers .container { + grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); + } +} + +.banner { + background: linear-gradient(45deg, rgb(113, 26, 95), #fda7df 70%); + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + color: transparent; +} + +.container { + width: 100%; + display: grid; + gap: 40px; + margin: 0 auto; + width: 100%; +} diff --git a/docs/src/components/TeamMembers/index.tsx b/docs/src/components/TeamMembers/index.tsx new file mode 100644 index 000000000..7bf9963d1 --- /dev/null +++ b/docs/src/components/TeamMembers/index.tsx @@ -0,0 +1,35 @@ +import React from "react"; +import clsx from "clsx"; +import Link from "@docusaurus/Link"; +import Translate from "@docusaurus/Translate"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import styles from "./index.module.css"; +import FarmCard from "../card"; +import TeamMembersItem from "../TeamMembersItem"; + +export function TeamMembers(props) { + const { members, size } = props; + const { siteConfig } = useDocusaurusContext(); + const classes = clsx(styles.teamMembers, "small my-10"); + return ( +
+
+ Get to know our team +
+
+ {members.map((member) => ( +
+ + + +
+ ))} +
+
+ ); +} diff --git a/docs/src/components/TeamMembersItem/index.module.css b/docs/src/components/TeamMembersItem/index.module.css new file mode 100644 index 000000000..302b9ee17 --- /dev/null +++ b/docs/src/components/TeamMembersItem/index.module.css @@ -0,0 +1,130 @@ +.teamMembersItem { + display: flex; + flex-direction: column; + gap: 2px; + border-radius: 12px; + width: 100%; + height: 100%; + overflow: hidden; +} + +.teamMembersItem .profile { + padding: 10px; +} + +.teamMembersItem .avatar { + width: 64px; + height: 64px; + cursor: pointer; + transition: all 0.2s ease-in-out; +} + +.teamMembersItem .name { + line-height: 24px; + font-size: 16px; +} + +.teamMembersItem .org { + line-height: 24px; + font-size: 14px; +} + +.teamMembersItem .affiliation { + padding-top: 4px; + line-height: 20px; + font-size: 14px; +} + +.teamMembersItem .desc { + padding-top: 12px; + line-height: 20px; + font-size: 14px; +} + +.teamMembersItem .links { + margin: 0 -16px -20px; + padding: 10px 0 0; +} + +.profile { + flex-grow: 1; + display: flex; + flex-direction: column; + align-items: center; + gap: 20px; +} + +.data { + text-align: center; +} + +.avatar { + position: relative; + flex-shrink: 0; + margin: 0 auto; + border-radius: 50%; +} + +.avatar-img { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + border-radius: 50%; + object-fit: cover; +} + +.name { + margin: 0; + font-weight: 600; +} + +.affiliation { + margin: 0; + font-weight: 500; +} + +.org.link { + transition: color 0.25s; +} + +.desc { + margin: 0 auto; +} + +.desc :deep(a) { + font-weight: 500; + text-decoration-style: dotted; + transition: color 0.25s; +} + +.links { + display: flex; + justify-content: center; + height: 56px; +} + +.sp-link { + display: flex; + justify-content: center; + align-items: center; + text-align: center; + padding: 16px; + font-size: 14px; + font-weight: 500; + background-color: var(--ifm-f-white); + transition: color 0.25s, background-color 0.25s; +} + +.sp .sp-link.link:hover, +.sp .sp-link.link:focus { + outline: none; +} + +.sp-icon { + margin-right: 8px; + width: 16px; + height: 16px; + fill: currentColor; +} diff --git a/docs/src/components/TeamMembersItem/index.tsx b/docs/src/components/TeamMembersItem/index.tsx new file mode 100644 index 000000000..64f24f8c9 --- /dev/null +++ b/docs/src/components/TeamMembersItem/index.tsx @@ -0,0 +1,29 @@ +import React from "react"; +import clsx from "clsx"; +import Link from "@docusaurus/Link"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import styles from "./index.module.css"; + +export default function TeamMembersItem({ member }) { + return ( +
+
+
window.open(member.orgLink, "_blank")} + > + {member.name} +
+
+

{member.name}

+

{member.org}

+ {member.desc ?

{member.desc}

: null} +
+
+
+ ); +} diff --git a/docs/src/components/card/index.module.css b/docs/src/components/card/index.module.css new file mode 100644 index 000000000..3e1b673cb --- /dev/null +++ b/docs/src/components/card/index.module.css @@ -0,0 +1,16 @@ +.card-main { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; +} + +.card { + /* width: 20ch; */ + /* height: 20ch; */ + border-radius: 8px; + transition: box-shadow 0.5s; + will-change: transform; +} diff --git a/docs/src/components/card/index.tsx b/docs/src/components/card/index.tsx new file mode 100644 index 000000000..92a5b9ec5 --- /dev/null +++ b/docs/src/components/card/index.tsx @@ -0,0 +1,52 @@ +import React, { useRef, useState } from "react"; +import { useSpring, animated } from "@react-spring/web"; +import { useControls } from "leva"; +import styled from "./index.module.css"; + +export default function Card(props) { + const cardRef = useRef(null); + const config = useControls({ + // mass: 1, + // tension: 170, + // friction: 26, + // clamp: false, + // precision: 0.01, + // velocity: 0, + }); + + const [{ xys }, api] = useSpring(() => ({ xys: [0, 0, 1] }), [config]); + + const handleMouseLeave = () => + api.start({ + xys: [0, 0, 1], + }); + + const handleMouseMove = (e) => { + const rect = cardRef.current.getBoundingClientRect(); + api.start({ + xys: calc(e.clientX / 1.2, e.clientY / 1.2, rect), + }); + }; + + return ( +
+ + {props.children} + +
+ ); +} + +const calc = (x, y, rect) => [ + -(y - rect.top - rect.height / 40) / 8, + (x - rect.left - rect.width / 40) / 8, + 1.4, +]; + +const trans = (x, y, s) => + `perspective(600px) rotateX(${x}deg) rotateY(${y}deg) scale(${s})`; diff --git a/docs/src/components/ui/aurora-back.tsx b/docs/src/components/ui/aurora-back.tsx new file mode 100644 index 000000000..40aad66a1 --- /dev/null +++ b/docs/src/components/ui/aurora-back.tsx @@ -0,0 +1,52 @@ +"use client"; +import { cn } from "../../lib/utils"; +import React, { ReactNode } from "react"; + +interface AuroraBackgroundProps extends React.HTMLProps { + showRadialGradient?: boolean; + className?: string; +} + +export const AuroraBackground = ({ + className, + showRadialGradient = true, + ...props +}: AuroraBackgroundProps) => { + return ( +
+
+
+
+
+
+
+ ); +}; diff --git a/docs/src/components/ui/beam.tsx b/docs/src/components/ui/beam.tsx new file mode 100644 index 000000000..219e1058b --- /dev/null +++ b/docs/src/components/ui/beam.tsx @@ -0,0 +1,139 @@ +"use client"; + +import React, { forwardRef, useRef } from "react"; + +import { cn } from "../../lib/utils"; +import { AnimatedBeam } from "../MagicUi/animated-beam"; + +const Circle = forwardRef< + HTMLDivElement, + { className?: string; children?: React.ReactNode } +>(({ className, children }, ref) => { + return ( +
+ {children} +
+ ); +}); + +Circle.displayName = "Circle"; + +export function AnimatedBeamPig() { + const containerRef = useRef(null); + const div1Ref = useRef(null); + const div2Ref = useRef(null); + const div3Ref = useRef(null); + const div4Ref = useRef(null); + const div5Ref = useRef(null); + const div6Ref = useRef(null); + const div7Ref = useRef(null); + + return ( +
+
+
+ + + + + + +
+
+ + + + + + + + + +
+
+ + + + + + +
+
+ + + + + + + +
+ ); +} + +const Icons = { + notion: () => ( + + ), + openai: () => ( + + ), + googleDrive: () => ( + + ), + whatsapp: () => ( + + ), + googleDocs: () => ( + + ), + zapier: () => ( + + ), + messenger: () => ( + + ), +}; diff --git a/docs/src/components/ui/bento-grid.tsx b/docs/src/components/ui/bento-grid.tsx new file mode 100644 index 000000000..7251f27e6 --- /dev/null +++ b/docs/src/components/ui/bento-grid.tsx @@ -0,0 +1,56 @@ +import { cn } from "../../lib/utils"; +import React from 'react' + +export const BentoGrid = ({ + className, + children, +}: { + className?: string; + children?: React.ReactNode; +}) => { + return ( +
+ {children} +
+ ); +}; + +export const BentoGridItem = ({ + className, + title, + description, + header, + icon, +}: { + className?: string; + title?: string | React.ReactNode; + description?: string | React.ReactNode; + header?: React.ReactNode; + icon?: React.ReactNode; +}) => { + return ( +
+ {header} +
+ {icon} +
+ {title} +
+
+ {description} +
+
+
+ ); +}; diff --git a/docs/src/components/ui/timeline.tsx b/docs/src/components/ui/timeline.tsx new file mode 100644 index 000000000..55d7c4bcd --- /dev/null +++ b/docs/src/components/ui/timeline.tsx @@ -0,0 +1,81 @@ +"use client"; +import { + useMotionValueEvent, + useScroll, + useTransform, + motion, +} from "framer-motion"; +import React, { useEffect, useRef, useState } from "react"; + +interface TimelineEntry { + title: string; + content: React.ReactNode; +} + +export const Timeline = ({ data }: { data: TimelineEntry[] }) => { + const ref = useRef(null); + const containerRef = useRef(null); + const [height, setHeight] = useState(0); + + useEffect(() => { + if (ref.current) { + const rect = ref.current.getBoundingClientRect(); + setHeight(rect.height); + } + }, [ref]); + + const { scrollYProgress } = useScroll({ + target: containerRef, + offset: ["start 10%", "end 50%"], + }); + + const heightTransform = useTransform(scrollYProgress, [0, 1], [0, height]); + const opacityTransform = useTransform(scrollYProgress, [0, 0.1], [0, 1]); + + return ( +
+ +
+ {data.map((item, index) => ( +
+
+
+
+
+

+ {item.title} +

+
+ +
+

+ {item.title} +

+ {item.content}{" "} +
+
+ ))} +
+ +
+
+
+ ); +}; diff --git a/docs/src/css/_admonition.scss b/docs/src/css/_admonition.scss new file mode 100644 index 000000000..511f9d7f9 --- /dev/null +++ b/docs/src/css/_admonition.scss @@ -0,0 +1,150 @@ +html[data-theme="light"] { + --admonition-color: #404040; + + --admonition-note-border-color: #60a5fa4d !important; + --admonition-note-c-bg: #bfdbfe66 !important; + + --admonition-tip-border-color: #4ade804d !important; + --admonition-tip-c-bg: #bbf7d066 !important; + + --admonition-warning-border-color: #fbbf244d !important; + --admonition-warning-c-bg: #fde68a4d !important; + + --admonition-important-border-color: #a78bfa4d !important; + --admonition-important-c-bg: #ddd6fe80 !important; + + --admonition-danger-border-color: #f871714d !important; + --admonition-danger-c-bg: #fecaca66 !important; + + --admonition-info-c-color: inherit; + --admonition-tip-c-color: inherit; + --admonition-warning-c-color: inherit; + --admonition-caution-c-color: inherit; + --admonition-danger-c-color: inherit; +} + +html[data-theme="dark"] { + --admonition-color: rgb(var(--color-gray-300) / var(--tw-text-opacity)); + + --admonition-note-border-color: #2563eb4d !important; + --admonition-note-c-bg: #1e40af66 !important; + + --admonition-tip-border-color: #16a34a4d !important; + --admonition-tip-c-bg: #16653466 !important; + + --admonition-warning-border-color: #92400e66 !important; + --admonition-warning-c-bg: #92400e66 !important; + + --admonition-important-border-color: #7c3aed4d !important; + --admonition-important-c-bg: #5b21b64d !important; + + --admonition-danger-border-color: #dc26264d !important; + --admonition-danger-c-bg: #991b1b66 !important; + + --admonition-note-c-color: #ff9ff3; + --admonition-info-c-color: var(--c-blue-50); + --admonition-tip-c-color: var(--c-green-50); + --admonition-warning-c-color: var(--c-yellow-50); + --admonition-caution-c-color: var(--c-orange-50); + --admonition-danger-c-color: var(--c-red-50); + + --ifm-alert-tip-background-color: var(--c-green-50-a); + --admonition-code-note-c-bg: #ff9ff350; + --admonition-code-warning-c-bg: var(--c-yellow-50-a); + --admonition-code-info-c-bg: #00163d; + --admonition-code-tip-c-bg: #003d11; + --admonition-code-caution-c-bg: #3d1200; + --admonition-code-danger-c-bg: #3d0003; + --ifm-alert-warning-background-color: var(--c-yellow-30-a); +} + +:root { + --admonition-bar-note-c-bg: var(--c-yellow-80); + --admonition-bar-info-c-bg: var(--c-blue-80); + --admonition-bar-tip-c-bg: var(--c-green-80); + --admonition-bar-caution-c-bg: var(--c-orange-80); + --admonition-bar-danger-c-bg: var(--c-red-60); + + --admonition-link-note-c: var(--c-brand); + --admonition-link-info-c: var(--c-teal-90); + --admonition-link-tip-c: var(--c-green-60); + --admonition-color-tip-c: var(--note-color); + --admonition-color-note-c: var(--note-color); + --admonition-link-caution-c: var(--c-orange-90); + --admonition-link-danger-c: var(--c-red-60); +} + +.theme-admonition { + position: relative; + border: none; + + --ifm-alert-color: var(--ifm-font-color-base); + --ifm-alert-padding-horizontal: 1.5rem; + --ifm-alert-padding-vertical: 1rem; + + [class^="admonitionHeading_"] { + text-transform: capitalize; + + font-size: 1rem; + line-height: 1.6; + + [class^="admonitionIcon_"] { + display: none; + } + } + + [class^="admonitionContent_"] { + p { + a { + color: var(--admonition-link-c); + text-decoration: underline; + } + + code { + background: var(--admonition-code-c-bg); + } + } + } + + &-note { + border: 1px solid var(--admonition-note-border-color); + background: var(--admonition-note-c-bg); + color: var(--admonition-color); + } + + &-tip { + border: 1px solid var(--admonition-tip-border-color); + background: var(--admonition-tip-c-bg); + color: var(--admonition-color); + } + + &-info { + border: 1px solid var(--admonition-note-border-color); + background: var(--admonition-note-c-bg); + color: var(--admonition-color); + } + + &-warning { + border: 1px solid var(--admonition-warning-border-color); + background: var(--admonition-warning-c-bg); + color: var(--admonition-color); + } + + &-caution { + border: 1px solid var(--admonition-important-border-color); + background: var(--admonition-important-c-bg); + color: var(--admonition-color); + } + + &-danger { + border: 1px solid var(--admonition-danger-border-color); + background: var(--admonition-danger-c-bg); + color: var(--admonition-color); + } + + &-important { + border: 1px solid var(--admonition-important-border-color); + background: var(--admonition-important-c-bg); + color: var(--admonition-color); + } +} diff --git a/docs/src/css/_doc.siderbar.scss b/docs/src/css/_doc.siderbar.scss new file mode 100644 index 000000000..15c86b5cc --- /dev/null +++ b/docs/src/css/_doc.siderbar.scss @@ -0,0 +1,217 @@ +html[data-theme="light"] { + --sidebar-category-c: var(--c-gray-100); + --sidebar-border-c: var(--c-gray-0); + --ifm-menu-color-active: var(--ifm-color-primary-text); + --ifm-menu-color-background-active: #ff9ff330; + --ifm-menu-color: var(--c-indigo-80); +} + +html[data-theme="dark"] { + --sidebar-category-c: var(--c-gray-0); + --sidebar-border-c: var(--c-gray-90); + --ifm-menu-color-active: var(--ifm-color-primary-text); + --ifm-menu-color: var(--c-gray-20); +} + +:root { + --doc-sidebar-width: 17.5rem; + + --dropdown-icon-width: 0.625rem; + --dropdown-icon-height: 0.375rem; + --dropdown-icon-gap: 0.688rem; + + --ifm-menu-link-padding-vertical: 0.5rem; + + --sidebar-spacing-horizontal: 1.5rem; + + // The variable aims to style the collapsible menu items on the sidebar. + --ifm-menu-color-background-hover: transparent; +} + +@media screen and (min-width: 1140px) { + [class^="docRoot_"] { + width: 1440px !important; + } + + [class^="docsWrapper_"] { + display: flex; + justify-content: center; + } +} + +//overrides +#__docusaurus { + .theme-doc-sidebar-container { + background: var(--token-primary-bg-c); + + position: sticky; + top: 60px; + bottom: 0; + margin-block-start: 0; + will-change: initial; + + height: calc(100vh - 60px); + + border-inline-end: 1px solid var(--sidebar-border-c); + + [class^="sidebarViewport"] { + // Targets the logo + > a { + display: flex; + align-items: center; + height: var(--ifm-navbar-height); + + padding-inline-start: var(--sidebar-spacing-horizontal); + padding-inline-end: var(--sidebar-spacing-horizontal); + } + } + } + + [class^="sidebar_"] { + max-height: 100vh; + position: static; + + overflow-y: auto; + + padding-inline-start: var(--sidebar-spacing-horizontal); + padding-inline-end: var(--sidebar-spacing-horizontal); + padding-block-start: 1rem; + + > .menu { + overflow-x: initial; + padding-block-end: 2rem; + padding: 0; + } + } + + [class^="sidebarLogo"] { + display: none !important; + } + + .theme-doc-sidebar-item-category-level-1 > .menu__list { + /* removes indentation from first level categories */ + padding: 0; + } + + .menu__list { + // display: block !important; + transition: height 0.35s cubic-bezier(0.36, 0.66, 0.04, 1) 25ms !important; + will-change: initial !important; + + // margin-top: 10px; + + .menu__list { + .menu__link--sublist { + margin-inline-start: calc( + -1 * (var(--dropdown-icon-width) + var(--dropdown-icon-gap)) + ); + + &::after { + // The chevron icon will have less opacity when it's not on the first level. + opacity: 0.6; + } + } + } + + &-item { + &.theme-doc-sidebar-item-link-level-1 { + padding-inline-start: calc(var(--dropdown-icon-width)); + + & > .menu__link { + font-weight: 500; + font-size: 14px; + color: var(--sidebar-category-c); + } + } + &:not(:first-child) { + margin-block-start: 0; + } + .menu__list { + .menu__link { + padding-inline-start: calc( + var(--dropdown-icon-width) + var(--dropdown-icon-gap) + ); + } + } + &-collapsible { + // This allows the item to be clickable across the entire width of the sidebar. + display: block; + } + } + } + + .theme-doc-sidebar-item-category-level-1 + > .menu__list + > .menu__list-item:last-of-type { + padding-block-end: 0.5rem; + } + + .theme-doc-sidebar-item-category-level-1:last-of-type { + margin-block-end: 0.5rem; + } + + .menu__link { + font-weight: 500; + font-size: 0.85rem; + line-height: 16px; + /* identical to box height */ + + display: flex; + align-items: center; + letter-spacing: -0.01em; + + transition: opacity 0.2s ease-out; + + &:not(.menu__link--active:not(.menu__link--sublist)) { + background: initial; + } + + &:not(.menu__link--active):not(.menu__link--sublist) { + &:hover, + &:active, + &:focus { + opacity: 0.7; + } + } + } + + .menu__link--sublist { + padding-inline-start: 0; + padding-inline-end: 0; + + margin-block-end: 0; + + display: flex; + align-items: center; + flex-direction: row-reverse; + justify-content: flex-end; + + &::after { + background: var(--ifm-menu-link-sublist-icon) center / + var(--dropdown-icon-width) var(--dropdown-icon-height); + background-repeat: no-repeat; + + min-width: auto; + + width: var(--dropdown-icon-width); + height: var(--dropdown-icon-height); + + margin-inline-end: var(--dropdown-icon-gap); + margin-block-end: 0; + + margin-inline-start: unset; + } + } + + .theme-doc-sidebar-item-category-level-1 { + & > .menu__list-item-collapsible { + .menu__link { + color: var(--sidebar-category-c); + + font-weight: 600; + font-size: 0.938rem; + line-height: 100%; + } + } + } +} diff --git a/docs/src/css/custom.scss b/docs/src/css/custom.scss new file mode 100644 index 000000000..4f9175d1f --- /dev/null +++ b/docs/src/css/custom.scss @@ -0,0 +1,373 @@ +@use "./doc.siderbar"; +@use "./admonition"; +@use "./token.css"; + +@tailwind components; +@tailwind base; +@tailwind utilities; +/** + * Any CSS included here will be global. The classic template + * bundles Infima by default. Infima is a CSS framework designed to + * work well for content-centric websites. + */ + +/* You can override the default Infima variables here. */ +:root { + --sans-serif: -apple-system, BlinkMacSystemFont, san-francisco, Avenir Next, + Segoe UI, Roboto, Noto Sans, Helvetica Neue; + --serif: Iowan Old Style, Apple Garamond, Baskerville, Times New Roman; + --monospaced: Menlo; + --border: rgb(3, 169, 244); + --code-block: #fff; + --g1: rgba(0, 0, 0, 0.2); + --g2: rgba(143, 26, 127, 0.2); + --g3: rgba(31, 31, 31, 0.2); + --ifm-color-primary: #8f1a7f; + --ifm-color-primary-dark: #6f1a5f; + --ifm-color-primary-text: #6f1a5f; + --ifm-color-primary-darker: #5f1a4f; + --ifm-color-primary-darkest: #4f1a3f; + --ifm-color-primary-light: #9f1a8f; + --ifm-color-primary-lighter: #af1a9f; + --ifm-color-primary-lightest: #bf1aaf; + --ifm-code-font-size: 95%; + --ifm-border-color: rgba(0, 0, 0, 0.05); + --ifm-background: rgba(0, 0, 0, 0.01); + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); + --ifm-announcementBar-height: 40px; + --ifm-primary-hue-saturation: 308 78%; + --ifm-primary-hue-saturation-light: 308 78%; + --accent: 113, 26, 95; + --accent-background-card-gradient: linear-gradient( + 45deg, + rgb(var(--accent)), + #fda7df 10%, + var(--ifm-f-white) 40% + ); + --ifm-footer-background-color: #181818; + --ifm-f-white: #ffffff; + --ifm-f-re-white: #181818; + --ifm-f-white-soft: #f8f8f8; + --ifm-f-white-soft2: #fff; + --ifm-f-white-mute: #f2f2f2; + --ifm-f-bg-soft: #f6f6f7; + --farm--border: rgba(86, 86, 86, 0.125); + --docsearch-searchbox-background: rgba(143, 26, 127, 0.7); + --max-layout-width: 1680px; + --ifm-navbar-link-hover-color: initial; + --ifm-navbar-padding-vertical: 0; + --ifm-navbar-item-padding-vertical: 0; + --ifm-color-soft: rgb(82 82 82 / var(--tw-text-opacity)); + + --ifm-font-family-base: -apple-system, BlinkMacSystemFont, Inter, Helvetica, + Arial, sans-serif, "Apple Color Emoji", "Segoe UI emoji"; + --ifm-font-family-monospace: "SFMono-Regular", "Roboto Mono", Consolas, + "Liberation Mono", Menlo, Courier, monospace; + + --ifm-menu-link-sublist-icon: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iNiIgdmlld0JveD0iMCAwIDEwIDYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04Ljk5OTg4IDVMNC45OTk4OCAxTDAuOTk5ODc4IDUiIHN0cm9rZT0iIzAzMDYwQiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K"); + + --z-sidebar: 2000; + --z-backdrop: 1100; + --ifm-menu-color-background-active: #ff9ff330; + --ifm-menu-color-background: #ff9ff310; + --docusaurus-highlighted-code-line-bg: #ff9ff310; +} + +[date-theme="light"] { + --code-block: #fff; + --ui-background: #fff; + --background: rgb(var(--ui-background) / var(--tw-bg-opacity)); +} + +/* For readability concerns, you should choose a lighter palette in dark mode. */ +[data-theme="dark"] { + --code-border-color: #fff; + --code-block: rgb(25, 25, 25); + --ui-background: #181818; + --background: rgb(var(--ui-background) / var(--tw-bg-opacity)); + --ifm-color-soft: rgb(82 82 82 / var(--tw-text-opacity)); + --ifm-f-bg-soft: #252529; + --ifm-background-color: #000 !important; + --ifm-color-primary: #fff; + --ifm-color-primary-text: #fff; + --ifm-color-primary-dark: #21af90; + --ifm-color-primary-darker: #1fa588; + --ifm-color-primary-darkest: #1a8870; + --ifm-color-primary-light: #29d5b0; + --ifm-color-primary-lighter: #32d8b4; + --ifm-color-primary-lightest: #4fddbf; + --ifm-menu-color-background-active: #ff9ff330; + --ifm-menu-color-background: #ff9ff340; + --ifm-background: rgba(0, 0, 0, 0.3); + --ifm-f-white: #c74040; + --ifm-f-re-white: #ffffff; + --ifm-f-white-soft: #222222; + --ifm-f-white-soft2: #111; + --ifm-f-white-mute: #282828; + --ifm-footer-background-color: #181818; + --farm--border: #fafafa20; + --docusaurus-highlighted-code-line-bg: rgba(143, 26, 127, 0.7); + --docsearch-primary-color: var(--ifm-color-primary-dark) !important; + --docsearch-searchbox-background: #3a3a3a !important; +} + +.navbar__title { + color: #6f1a5f; + font-size: 1.5em; +} + +.navbar__title:hover { + color: #bf1aaf; +} + +.header-github-link:hover { + opacity: 0.6; +} + +.header-github-link::before { + content: ""; + width: 20px; + height: 20px; + display: flex; + background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") + no-repeat; +} + +[data-theme="dark"] .header-github-link::before { + background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") + no-repeat; +} +.bg { + background-color: var(--ifm-f-white-soft); +} + +.bg-re { + background-color: var(--ifm-f-re-white); +} + +.color { + color: var(--ifm-f-white); +} + +.token.color { + color: #c44cac; +} + +.color-re { + color: var(--ifm-f-re-white); +} + +.theme-back-to-top-button { + width: 50px !important; + height: 50px !important; +} + +[class^="backToTopButton_"]::after { + mask: var(--ifm-menu-link-sublist-icon) 50% / 1.5rem 1.5rem no-repeat !important; + mask-size: 3rem 3rem !important; + -webkit-mask-size: 3rem 3rem !important; +} +.clean-btn::after { + mask: var(--ifm-menu-link-sublist-icon) 50% / 1.5rem 1.5rem no-repeat !important; + mask-size: 1.5rem 1.5rem !important; + -webkit-mask-size: 1.5rem 1.5rem !important; +} + +div[class^="announcementBar_"] { + --site-announcement-bar-stripe-color1: hsl( + var(--ifm-primary-hue-saturation) 85% + ); + --site-announcement-bar-stripe-color2: hsl( + var(--ifm-primary-hue-saturation) 95% + ); + + background: linear-gradient( + 45deg, + #711a5f, + #c44cac 30%, + #9f1a8f 60%, + #fda7df 80% + ); + font-weight: bold; + color: var(--c-white); + height: var(--ifm-announcementBar-height); + + @media (max-width: 768px) { + height: calc(var(--ifm-announcementBar-height) + 12px); + } +} + +.navbar__items .documate-button { + @media (max-width: 768px) { + display: none !important; + } +} + +footer[class="footer"] { + background-color: var(--ifm-f-white-soft) !important; +} + +.footer__link-item { + line-height: 3; + display: flex; + align-items: center; + gap: 6px; +} + +.navbar__link { + display: flex; + align-items: center; + + @media (max-width: 768px) { + display: none !important; + } +} + +.code-block-highlight-line { + background-color: var(--docusaurus-highlighted-code-line-bg); + display: block; + margin: 0 calc(-1 * var(--ifm-pre-padding)); + padding: 0 var(--ifm-pre-padding); + border-left: 5px solid rgb(196, 76, 172); +} + +a { + color: rgb(196, 76, 172); +} + +@keyframes glowing { + 0% { + background-position: 0 0; + } + 50% { + background-position: 400% 0; + } + 100% { + background-position: 0 0; + } +} + +.DocSearch-Button { + width: 250px; + border-radius: 8px !important; +} + +.dropdown > .navbar__link:after { + top: 4px; +} + +.theme-admonition-warning { + color: var(--c-yellow-120); +} + +.theme-admonition-danger { + color: var(--c-red-60); +} + +.theme-doc-version-badge { + margin: 10px 0; +} + +.navbar--fixed-top { + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); +} + +@media screen and (min-width: 1140px) { + .navbar--fixed-top { + backdrop-filter: blur(8px); /* Apply the blur effect */ + -webkit-backdrop-filter: blur(8px); /* Safari support */ + background: transparent; + } +} + +.font-sans { + font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; +} + +figure { + margin: 12px 12px; +} + +body { + background: var(--background); +} + +.package-manager-tab { + cursor: pointer; +} + +.package-manager-name { + margin-left: 8px; + font-size: 14px; + font-weight: 500; +} + +.react-tabs__tab--selected .package-manager-tab { + background-color: rgba(0, 0, 0, 0.1); +} + +.codeBlock-tab { + margin: 0 !important; + border-radius: none; + pre { + margin: 0; + } +} + +.highlighted-line { + background-color: var(--ifm-menu-color-background-active); +} + +html[data-theme="light"] { + --code-block: #fff; + --code-block-border: 1px solid #eee; +} + +html[data-theme="dark"] { + --code-block: rgb(25, 25, 25); + --code-block-border: 1px solid #303030; + --code-block-select-color: #2e3440ff; +} + +.border-package { + border: var(--code-block-border); +} + +[data-theme="light"] .shiki.dark-plus { + display: none; +} + +[data-theme="dark"] .shiki.light-plus { + display: none; +} + +[class*="codeBlockContainer_"] { + margin-bottom: 0 !important; +} + +[class*="codeBlockTitle_"] { + display: none; +} + +[class*="codeBlock_"] { + background-color: var(--code-block) !important; +} + +.shiki { + margin: 0; + border-radius: 0; +} + +.file-icon { + display: inline-block; + width: 16px; + height: 16px; + margin-right: 8px; + vertical-align: middle; +} + +.file-icon svg { + width: 100%; + height: 100%; +} diff --git a/docs/src/css/token.css b/docs/src/css/token.css new file mode 100644 index 000000000..d2ae68216 --- /dev/null +++ b/docs/src/css/token.css @@ -0,0 +1,312 @@ +:root { + --c-black: #000000; + --c-white: #ffffff; + --c-blue-0: #f0f6ff; + --c-blue-10: #e3edff; + --c-blue-20: #cddfff; + --c-blue-30: #b2ceff; + --c-blue-40: #97bdff; + --c-blue-50: #7cabff; + --c-blue-60: #639bff; + --c-blue-70: #4d8dff; + --c-blue-80: #3880ff; + --c-blue-90: #176bff; + --c-blue-100: #0054e9; + --c-blue-110: #004dd6; + --c-blue-120: #0046c1; + --c-blue-130: #003fae; + --c-blue-140: #00389b; + --c-blue-150: #002d7c; + --c-blue-160: #002669; + --c-blue-170: #001d52; + --c-blue-180: #001740; + --c-blue-190: #00112f; + --c-blue-200: #000b1f; + --c-gray-0: #f3f3f3; + --c-gray-10: #e4e4e4; + --c-gray-20: #c8c8c8; + --c-gray-30: #aeaeae; + --c-gray-40: #959595; + --c-gray-50: #818181; + --c-gray-60: #6d6d6d; + --c-gray-70: #5f5f5f; + --c-gray-80: #474747; + --c-gray-90: #2f2f2f; + --c-gray-100: #141414; + --c-carbon-0: #eef1f3; + --c-carbon-10: #d7dde2; + --c-carbon-20: #b4bcc6; + --c-carbon-30: #98a2ad; + --c-carbon-40: #7d8894; + --c-carbon-50: #677483; + --c-carbon-60: #556170; + --c-carbon-70: #434f5e; + --c-carbon-80: #35404e; + --c-carbon-90: #222d3a; + --c-carbon-100: #03060b; + --c-indigo-0: #fbfbfd; + --c-indigo-10: #f6f8fc; + --c-indigo-20: #e9edf3; + --c-indigo-30: #dee3ea; + --c-indigo-40: #ced6e0; + --c-indigo-50: #b2becd; + --c-indigo-60: #92a0b3; + --c-indigo-70: #73849a; + --c-indigo-80: #445b78; + --c-indigo-90: #2d4665; + --c-indigo-100: #001a3a; + --c-green-0: #f1fdf5; + --c-green-10: #deffe7; + --c-green-20: #c7fbd5; + --c-green-30: #a7f1bb; + --c-green-40: #80e89d; + --c-green-50: #62e085; + --c-green-50-a: #62e08560; + --c-green-60: #4ada71; + --c-green-70: #2dd55b; + --c-green-80: #17c948; + --c-green-90: #00ba33; + --c-green-100: #00a52d; + --c-green-110: #009b2b; + --c-green-120: #009128; + --c-green-130: #008725; + --c-green-140: #007d22; + --c-green-150: #00711f; + --c-green-160: #00661c; + --c-green-170: #00581a; + --c-green-180: #004314; + --c-green-190: #002f0e; + --c-green-200: #001807; + --c-lime-0: #f5fff0; + --c-lime-10: #ebfee3; + --c-lime-20: #ddfcd0; + --c-lime-30: #cffbbc; + --c-lime-40: #bbf9a2; + --c-lime-50: #a3f581; + --c-lime-60: #8bf35f; + --c-lime-70: #64ec44; + --c-lime-80: #4ddf2b; + --c-lime-90: #3ad515; + --c-lime-100: #27c100; + --c-lime-110: #25b400; + --c-lime-120: #22a400; + --c-lime-130: #1e9200; + --c-lime-140: #1a7e00; + --c-lime-150: #176d00; + --c-lime-160: #135a00; + --c-lime-170: #0f4900; + --c-lime-180: #0c3900; + --c-lime-190: #092c00; + --c-lime-200: #061d00; + --c-lavender-0: #f7f8ff; + --c-lavender-10: #e6ebff; + --c-lavender-20: #ced9ff; + --c-lavender-30: #b6c6ff; + --c-lavender-40: #9fb5ff; + --c-lavender-50: #8aa4ff; + --c-lavender-60: #7493ff; + --c-lavender-70: #597eff; + --c-lavender-80: #3c67ff; + --c-lavender-90: #194bfd; + --c-lavender-100: #0033e8; + --c-lavender-110: #002dcc; + --c-lavender-120: #0028b8; + --c-lavender-130: #0023a2; + --c-lavender-140: #002092; + --c-lavender-150: #001a79; + --c-lavender-160: #001560; + --c-lavender-170: #00114e; + --c-lavender-180: #000e41; + --c-lavender-190: #000a30; + --c-lavender-200: #000721; + --c-lavender-210: #8aa4ff50; + --c-lavender-220: #7493ff40; + --c-purple-0: #f4f4ff; + --c-purple-10: #e9eaff; + --c-purple-20: #d0d2ff; + --c-purple-30: #b6b9f9; + --c-purple-40: #9a99fc; + --c-purple-50: #8482fb; + --c-purple-60: #786df9; + --c-purple-70: #6e5afd; + --c-purple-80: #6030ff; + --c-purple-90: #4712fb; + --c-purple-100: #3400e6; + --c-purple-110: #3000d1; + --c-purple-120: #2b00bc; + --c-purple-130: #2600a6; + --c-purple-140: #20008e; + --c-purple-150: #1b0075; + --c-purple-160: #15005c; + --c-purple-170: #100048; + --c-purple-180: #0d0038; + --c-purple-190: #0b0030; + --c-purple-200: #080022; + --c-brand: #8f1a7f; + --c-brand-a: #8f1a7f60; + --c-pink-0: #ffeff5; + --c-pink-10: #ffe3ed; + --c-pink-20: #ffd8e5; + --c-pink-30: #ffc9db; + --c-pink-40: #ffb6d0; + --c-pink-50: #ff99bd; + --c-pink-60: #ff80ac; + --c-pink-70: #ff6098; + --c-pink-80: #fb4082; + --c-pink-90: #ec216a; + --c-pink-100: #da0d56; + --c-pink-110: #d0004a; + --c-pink-120: #c40046; + --c-pink-130: #b30040; + --c-pink-140: #a3003b; + --c-pink-150: #940035; + --c-pink-160: #850030; + --c-pink-170: #710029; + --c-pink-180: #5f0022; + --c-pink-190: #460019; + --c-pink-200: #20000b; + --c-red-0: #fff1f3; + --c-red-10: #ffe6e8; + --c-red-20: #ffcfd3; + --c-red-30: #feb7bc; + --c-red-40: #fc9aa2; + --c-red-50: #f9838c; + --c-red-50-a: #f9838c60; + --c-red-60: #f56570; + --c-red-70: #f24c58; + --c-red-80: #ef3442; + --c-red-90: #e21827; + --c-red-100: #d0000f; + --c-red-110: #c5000f; + --c-red-120: #b3000e; + --c-red-130: #9c000c; + --c-red-140: #89000b; + --c-red-150: #760009; + --c-red-160: #650008; + --c-red-170: #520006; + --c-red-180: #410005; + --c-red-190: #300004; + --c-red-200: #1d0002; + --c-red-210: #f24c5830; + --c-red-220: #ef344215; + --c-orange-0: #fff5f0; + --c-orange-10: #ffede6; + --c-orange-20: #ffdfd1; + --c-orange-30: #ffd0bc; + --c-orange-40: #ffc0a5; + --c-orange-50: #ffaf8c; + --c-orange-60: #ff9b70; + --c-orange-70: #ff8753; + --c-orange-80: #ff7336; + --c-orange-90: #ff5b13; + --c-orange-100: #eb4700; + --c-orange-110: #d94200; + --c-orange-120: #c93d00; + --c-orange-130: #b63700; + --c-orange-140: #a53200; + --c-orange-150: #8c2a00; + --c-orange-160: #772400; + --c-orange-170: #5e1c00; + --c-orange-180: #481600; + --c-orange-190: #341000; + --c-orange-200: #1d0900; + --c-yellow-0: #fffbef; + --c-yellow-10: #fff8e2; + --c-yellow-20: #fff4d1; + --c-yellow-30: #ffefbd; + --c-yellow-30-a: #fcd28550; + --c-yellow-40: #ffe9a3; + --c-yellow-50: #ffcb2d; + --c-yellow-50-a: #ffd75a60; + --c-yellow-60: #ffd75a; + --c-yellow-60-a: #ffd75a30; + --c-yellow-70: #ffce31; + --c-yellow-80: #ffc409; + --c-yellow-90: #f4b100; + --c-yellow-90-a: #f4b10060; + --c-yellow-100: #eaa100; + --c-yellow-110: #dd9800; + --c-yellow-120: #cc8d00; + --c-yellow-130: #be8300; + --c-yellow-140: #b17a00; + --c-yellow-150: #9c6c00; + --c-yellow-160: #8a6000; + --c-yellow-170: #755100; + --c-yellow-180: #5f4100; + --c-yellow-190: #452f00; + --c-yellow-200: #231800; + --c-yellow-210: #ffc40950; + --c-yellow-220: #ffce3140; + --c-aqua-0: #f0fff9; + --c-aqua-10: #e6fff6; + --c-aqua-20: #ceffed; + --c-aqua-30: #b7fce3; + --c-aqua-40: #93f9d5; + --c-aqua-50: #79f5c9; + --c-aqua-60: #59f0ba; + --c-aqua-70: #38e9aa; + --c-aqua-80: #1ae19a; + --c-aqua-90: #00d287; + --c-aqua-100: #00ba78; + --c-aqua-110: #00aa6d; + --c-aqua-120: #009b63; + --c-aqua-130: #00915c; + --c-aqua-140: #008152; + --c-aqua-150: #016e46; + --c-aqua-160: #015d3c; + --c-aqua-170: #014f32; + --c-aqua-180: #013e28; + --c-aqua-190: #012e1e; + --c-aqua-200: #011e13; + --c-teal-0: #eefeff; + --c-teal-10: #dffdff; + --c-teal-20: #d0fdff; + --c-teal-30: #bbfcff; + --c-teal-40: #a2fcff; + --c-teal-50: #8bfbff; + --c-teal-60: #73f6fb; + --c-teal-60-a: #73f6fb60; + --c-teal-70: #55ecf2; + --c-teal-80: #35e2e9; + --c-teal-90: #1bd2d9; + --c-teal-100: #00b9c0; + --c-teal-110: #01adb4; + --c-teal-120: #019fa5; + --c-teal-130: #018f94; + --c-teal-210: #3dc1d340; + --c-teal-220: #3dc1d325; + --c-teal-140: #017e83; + --c-teal-150: #016d71; + --c-teal-160: #015d61; + --c-teal-170: #014d4f; + --c-teal-180: #013c3e; + --c-teal-190: #012c2e; + --c-teal-200: #011c1d; + --c-cyan-0: #f3faff; + --c-cyan-10: #e8f5ff; + --c-cyan-20: #d3ecff; + --c-cyan-30: #bfe4ff; + --c-cyan-40: #a7daff; + --c-cyan-50: #8dcfff; + --c-cyan-60: #77c6ff; + --c-cyan-70: #62bdff; + --c-cyan-80: #46b1ff; + --c-cyan-90: #24a3ff; + --c-cyan-100: #0091fa; + --c-cyan-110: #0189ec; + --c-cyan-120: #017ed8; + --c-cyan-130: #0170c0; + --c-cyan-140: #0163aa; + --c-cyan-150: #015592; + --c-cyan-160: #01487b; + --c-cyan-170: #013a64; + --c-cyan-180: #012d4d; + --c-cyan-190: #011e33; + --c-cyan-200: #01121e; +} + +html[data-theme="dark"] { + --c-brand: #ff73ec90; + --c-yellow-50: #f9d76f; + --c-yellow-50-a: #ffd75a60; +} diff --git a/docs/src/lib/utils.ts b/docs/src/lib/utils.ts new file mode 100644 index 000000000..abdb16cd2 --- /dev/null +++ b/docs/src/lib/utils.ts @@ -0,0 +1,7 @@ +// lib/utils.ts +import clsx, { ClassValue } from "clsx"; +import { twMerge } from "tailwind-merge"; + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)); +} diff --git a/docs/src/pages/data.js b/docs/src/pages/data.js new file mode 100644 index 000000000..4107cf955 --- /dev/null +++ b/docs/src/pages/data.js @@ -0,0 +1,119 @@ +export const members = [ + { + avatar: "https://www.github.com/wre232114.png", + name: "brightwu", + org: "@bytedance", + desc: "Author/Lead Maintainer of @farm-fe. Rust && TS && Java..", + links: [ + { icon: "github", link: "https://github.com/wre232114" }, + { icon: "twitter", link: "https://twitter.com/wre232114" }, + ], + }, + { + avatar: "https://www.github.com/erkelost.png", + name: "Erkelost", + org: "", + desc: "Rust & Go & Node & Web development ❤️❤️", + links: [ + { icon: "github", link: "https://github.com/ErKeLost" }, + { icon: "twitter", link: "https://twitter.com/ErKeLost" }, + ], + }, + { + avatar: "https://www.github.com/shulandmimi.png", + name: "shulandmimi", + title: "", + desc: "Core team member of Farm.", + links: [ + { icon: "github", link: "https://github.com/shulandmimi" }, + { icon: "twitter", link: "https://twitter.com/shulandmimi" }, + ], + }, + { + avatar: "https://github.com/Nirvana-Jie.png", + name: "Nirvana-Jie", + org: "@bytedance", + desc: "There are too many things to learn, I can only keep moving forward.", + links: [ + { icon: "github", link: "https://github.com/Nirvana-Jie" }, + { icon: "twitter", link: "https://twitter.com/Nirvana-Jie" }, + ], + }, + { + avatar: "https://github.com/NidMo.png", + name: "NidMo", + orgLink: "https://github.com/NidMo", + desc: "Core team member of Farm.", + links: [ + { icon: "github", link: "https://github.com/NidMo" }, + { icon: "twitter", link: "https://twitter.com/NidMo" }, + ], + }, + { + avatar: "https://github.com/wjq990112.png", + name: "wjq990112", + title: "@bytedance", + orgLink: "https://github.com/wjq990112", + desc: "Member of @raxjs, @ice-lab and @farm-fe.", + links: [ + { icon: "github", link: "https://github.com/wjq990112" }, + { icon: "twitter", link: "https://twitter.com/wjq990112" }, + ], + }, + { + avatar: "https://github.com/callqh.png", + name: "callqh", + org: "", + desc: "Javascript & Rust.", + links: [ + { icon: "github", link: "https://github.com/callqh" }, + { icon: "twitter", link: "https://twitter.com/callqh" }, + ], + }, + { + avatar: "https://github.com/oblador.png", + name: "oblador", + title: "Open Source Developer", + orgLink: "https://github.com/oblador", + desc: "╥━━━━━━━━╭━━╮━━┳ ╢╭╮╭━━━━━┫┃▋▋━▅┣ ╢┃╰┫┈┈┈┈┈┃┃┈┈╰┫┣ ╢╰━┫┈┈┈┈┈╰╯╰┳━╯┣ ╢┊┊┃┏┳┳━━┓┏┳┫┊┊┣ ╨━━┗┛┗┛━━┗┛┗┛━━┻", + links: [ + { icon: "github", link: "https://github.com/oblador" }, + { icon: "twitter", link: "https://twitter.com/oblador" }, + ], + }, + { + avatar: "https://github.com/ysy945.png", + name: "ysy945", + title: "Open Source Developer", + orgLink: "https://github.com/ysy945", + desc: "Core team member of Farm.", + links: [ + { icon: "github", link: "https://github.com/ysy945" }, + { icon: "twitter", link: "https://twitter.com/ysy945" }, + ], + }, + { + avatar: "https://github.com/NaturelLee.png", + name: "NaturelLee", + title: "Open Source Developer", + orgLink: "https://github.com/NaturelLee", + desc: "Core team member of Farm.", + links: [ + { icon: "github", link: "https://github.com/NaturelLee" }, + { icon: "twitter", link: "https://twitter.com/NaturelLee" }, + ], + }, + { + avatar: "https://github.com/CCherry07.png", + name: "Cherry7", + org: "@bytedance", + title: "Open Source Developer", + orgLink: "https://github.com/CCherry07", + desc: "Core team member of Farm & Ant Design Vue.", + links: [ + { icon: "github", link: "https://github.com/CCherry07" }, + ], + } +]; + +export default function Empty() {} diff --git a/docs/src/pages/index.module.css b/docs/src/pages/index.module.css new file mode 100644 index 000000000..f753d790d --- /dev/null +++ b/docs/src/pages/index.module.css @@ -0,0 +1,183 @@ +/** + * CSS files with the .module.css suffix will be treated as CSS modules + * and scoped locally. + */ + +.heroBanner { + padding: 3rem 0; + text-align: center; + position: relative; + overflow: hidden; +} + +.banner { + background: linear-gradient(45deg, rgb(113, 26, 95), #fda7df 70%); + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + color: transparent; +} + +@media screen and (max-width: 996px) { + .heroBanner { + padding: 2rem; + } +} + +.buttons { + display: flex; + align-items: center; + /* justify-content: center; */ +} + +.btn { + font-size: 1rem; + font-family: Open Sans; + font-weight: 600; + font-style: normal; + line-height: 1.5rem; + text-transform: none; + min-width: 130px; + border-radius: 8px; + border-width: 2px; + padding-left: 20px; + padding-right: 20px; + padding-top: 12px; + padding-bottom: 12px; +} + +.farmButton { + height: 50px; + border: none; + outline: none; + color: #fff; + background: #111; + cursor: pointer; + position: relative; + z-index: 0; + border-radius: 10px; +} + +.farmButton:before { + content: ""; + background: linear-gradient( + 45deg, + #7a00ff, + #9f1a8f, + #7a00ff, + #ff00c8, + #9f1a8f, + #7a00ff, + #ff00c8 + ); + position: absolute; + top: -2px; + left: -2px; + background-size: 400%; + z-index: -1; + filter: blur(5px); + width: calc(100% + 4px); + height: calc(100% + 4px); + opacity: 1; + transition: opacity 0.5s ease-in-out; + border-radius: 10px; + animation: glowing 120s linear infinite; +} + +.farmButton:after { + z-index: -1; + content: ""; + position: absolute; + width: 100%; + height: 100%; + background: #111; + left: 0; + top: 0; + border-radius: 10px; +} + +@keyframes glowing { + 0% { + background-position: 0 0; + } + 50% { + background-position: 400% 0; + } + 100% { + background-position: 0 0; + } +} + +.fKVWgc { + position: absolute; + inset: 0px; + mask-image: linear-gradient(black, transparent); +} + +.farmButton2 { + height: 50px; + border: none; + outline: none; + color: #fff; + background: rgb(23, 23, 23); + cursor: pointer; + position: relative; + z-index: 0; + border-radius: 10px; +} + +.farmButton2:before { + content: ""; + background: linear-gradient( + 45deg, + #ffaa40, + #9f1a8f, + #ffaa40, + #ff00c8, + #9f1a8f, + #7a00ff, + #ff00c8 + ); + position: absolute; + top: -2px; + left: -2px; + background-size: 400%; + z-index: -1; + filter: blur(5px); + width: calc(100% + 4px); + height: calc(100% + 4px); + opacity: 1; + transition: opacity 0.2s ease-in-out; + border-radius: 10px; + animation: glowing 100s linear infinite; +} + +.farmButton2:after { + z-index: -1; + content: ""; + position: absolute; + width: 100%; + height: 100%; + background: #111; + left: 0; + top: 0; + border-radius: 10px; +} + +@keyframes glowing { + 0% { + background-position: 0 0; + } + 30% { + background-position: 400% 0; + } + 100% { + background-position: 0 0; + } +} + +.gradientText { + background: linear-gradient(to bottom right, black, gray 40%, white); + -webkit-background-clip: text; + color: transparent; +} diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx new file mode 100644 index 000000000..5b70df3bb --- /dev/null +++ b/docs/src/pages/index.tsx @@ -0,0 +1,145 @@ +import Link from "@docusaurus/Link"; +import Translate from "@docusaurus/Translate"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import Layout from "@theme/Layout"; +import clsx from "clsx"; +import React from "react"; +import Benchmark from "../components/Benchmark"; +import AnimatedGradientStarWithGithub from "../components/MagicUi/animated-shiny-text"; +import BlurFade from "../components/MagicUi/blur-fade"; +import BentoGridCard from "../components/MagicUi/card"; +import StarrySky from "../components/StarrySky"; +import { AuroraBackground } from "../components/ui/aurora-back"; +import { useColorMode } from "@docusaurus/theme-common"; +import NeonGradientCard from "../components/MagicUi/neon-gradient-card"; +import styles from "./index.module.css"; + +function HomepageHeader() { + return ( +
+
+ +
+
+ + Extremely + + + Fast + + + Web + +
+
+ + Build Tool + +
+
+ + Written in + + + Rust + +
+
+
+ + +
+
+ + Farm + + + + is a Rust-Based Web Building Engine to Facilitate Your Web + Program and JavaScript Library + + +
+
+
+
+ +
+ Quick Start +
+ + +
+ Why Farm? +
+ +
+
+
+ ); +} + +const HomeBaseContent = () => { + const { colorMode } = useColorMode(); + + const mainContent = React.useMemo(() => { + return ( +
+ + + + + + +
+ ); + }, []); + + if (colorMode === "dark") { + return ( + <> + + {mainContent} + + ); + } else { + return ( + <> + + {mainContent} + + ); + } +}; + +export default function Home() { + const { siteConfig } = useDocusaurusContext(); + return ( + + + + ); +} diff --git a/docs/src/pages/markdown-page.md b/docs/src/pages/markdown-page.md new file mode 100644 index 000000000..9756c5b66 --- /dev/null +++ b/docs/src/pages/markdown-page.md @@ -0,0 +1,7 @@ +--- +title: Markdown page example +--- + +# Markdown page example + +You don't need React to write simple standalone pages. diff --git a/docs/src/pages/roadmap.tsx b/docs/src/pages/roadmap.tsx new file mode 100644 index 000000000..3559af945 --- /dev/null +++ b/docs/src/pages/roadmap.tsx @@ -0,0 +1,179 @@ +import React from 'react'; +import Layout from '@theme/Layout'; +import { Timeline } from "../components/ui/timeline"; + +export default function Roadmap() { + return ( + +
+
+

+ Farm RoadMap 🚜 +

+

+ We will plan for new features that will be released soon and future tasks that can be performed +

+

+ Farm has a detailed rfc design, click to view our rfc +

+
+ coming soon + {/* */} +
+
+ ); +} + + + +export function TimelineCpm() { + const data = [ + { + title: "2024", + content: ( +
+

+ Farm RoadMap +

+
+ startup template + startup template + startup template + startup template +
+
+ ), + }, + { + title: "Early 2023", + content: ( +
+

+ I usually run out of copy, but when I see content this big, I try to + integrate lorem ipsum. +

+

+ Lorem ipsum is for people who are too lazy to write copy. But we are + not. Here are some more example of beautiful designs I built. +

+
+ hero template + feature template + bento template + cards template +
+
+ ), + }, + { + title: "Changelog", + content: ( +
+

+ Deployed 5 new components on Aceternity today +

+
+
+ ✅ Card grid component +
+
+ ✅ Startup template Aceternity +
+
+ ✅ Random file upload lol +
+
+ ✅ Himesh Reshammiya Music CD +
+
+ ✅ Salman Bhai Fan Club registrations open +
+
+
+ hero template + feature template + bento template + cards template +
+
+ ), + }, + ]; + return ( +
+ +
+ ); +} diff --git a/docs/src/pages/team.module.css b/docs/src/pages/team.module.css new file mode 100644 index 000000000..e91767055 --- /dev/null +++ b/docs/src/pages/team.module.css @@ -0,0 +1,7 @@ +.banner { + background: linear-gradient(45deg, rgb(113, 26, 95), #fda7df 70%); + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + color: transparent; +} diff --git a/docs/src/pages/team.tsx b/docs/src/pages/team.tsx new file mode 100644 index 000000000..a87d74d07 --- /dev/null +++ b/docs/src/pages/team.tsx @@ -0,0 +1,19 @@ +import React from "react"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import Layout from "@theme/Layout"; +import { TeamMembers } from "../components/TeamMembers"; +import { members } from "./data"; + +export default function Team() { + const { siteConfig } = useDocusaurusContext(); + return ( + +
+ +
+
+ ); +} diff --git a/docs/src/theme/CodeBlock/index.module.css b/docs/src/theme/CodeBlock/index.module.css new file mode 100644 index 000000000..822d76281 --- /dev/null +++ b/docs/src/theme/CodeBlock/index.module.css @@ -0,0 +1,138 @@ +.shiki-wrapper { + margin: 1.5em 0; + border-radius: 8px; + overflow: hidden; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + transition: box-shadow 0.3s ease; +} + +.shiki-wrapper:hover { + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); +} + +.code-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0.5em 1em; + border-bottom: var(--code-block-border); + background-color: var(--code-block); +} + +.code-title { + font-weight: 600; + font-size: 0.9em; + display: flex; + align-items: center; + gap: 6px; + svg { + width: 22px; + } +} + +.copy-button { + display: flex; + align-items: center; + background-color: transparent; + border: 1px solid #ced4da; + border-radius: 4px; + font-size: 0.85em; + cursor: pointer; + transition: all 0.2s ease; +} + +.copy-button:hover { + background-color: #e9ecef; + border-color: #adb5bd; +} + +.copy-icon { + width: 1em; + height: 1em; + margin-right: 0.5em; + fill: currentColor; +} + +.copy-button span { + transition: opacity 0.2s ease; +} + +.copy-button:active span { + opacity: 0.6; +} + +@keyframes popIn { + 0% { + transform: scale(0.8); + opacity: 0; + } + 100% { + transform: scale(1); + opacity: 1; + } +} + +.copy-button svg { + animation: popIn 0.3s ease forwards; +} + +.copy-button { + display: flex; + align-items: center; + background-color: transparent; + border: none; + border-radius: 4px; + padding: 0.5em 0em 0.5em 0.5em; + font-size: 0.85em; + cursor: pointer; + transition: all 0.2s ease; + outline: none; +} + +.copy-button:hover { + background-color: var(--ifm-color-emphasis-200); + /* border-color: var(--ifm-color-emphasis-400); */ +} + +.copy-button:focus { + /* box-shadow: 0 0 0 2px var(--ifm-color-primary-lightest); */ +} + +.copy-icon { + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + fill: currentColor; + transition: transform 0.2s ease; +} + +.copy-button:hover .copy-icon { + transform: scale(1.1); +} + +.copy-button span { + transition: opacity 0.2s ease; +} + +.copy-button:active span { + opacity: 0.6; +} + +@keyframes popIn { + 0% { + transform: scale(0.8); + opacity: 0; + } + 100% { + transform: scale(1); + opacity: 1; + } +} + +.copy-button svg { + animation: popIn 0.3s ease forwards; +} + +.copy-success { + color: var(--ifm-color-success); +} diff --git a/docs/src/theme/CodeBlock/index.tsx b/docs/src/theme/CodeBlock/index.tsx new file mode 100644 index 000000000..2dc4994cc --- /dev/null +++ b/docs/src/theme/CodeBlock/index.tsx @@ -0,0 +1,112 @@ +import CodeBlock from '@theme-original/CodeBlock'; +import type CodeBlockType from '@theme/CodeBlock'; +import type { WrapperProps } from '@docusaurus/types'; +import React, { useEffect, useState } from 'react'; +import styles from './index.module.css' +import { codeToHtml } from 'shiki'; +import useIsBrowser from '@docusaurus/useIsBrowser'; +import { useColorMode } from '@docusaurus/theme-common'; +import { svgs } from './svg'; +type Props = WrapperProps; + +export default function CodeBlockWrapper(props: Props): JSX.Element { + const [highlightedCode, setHighlightedCode] = useState(''); + const [copied, setCopied] = useState(false); + const language = props.className ? props.className.replace(/language-/, '') : 'javascript'; + const title = props.metastring ? props.metastring.match(/title="([^"]+)"/) : null; + const fileName = title ? title[1] : null; + const highlightLines = props.metastring ? props.metastring.match(/{([\d,-]+)}/) : null; + const { colorMode } = useColorMode(); + const iconMap = { + ts: svgs.find(svg => svg.name === "ts")?.content, + js: svgs.find(svg => svg.name === "js")?.content, + css: svgs.find(svg => svg.name === "css")?.content, + json: svgs.find(svg => svg.name === "json")?.content, + txt: svgs.find(svg => svg.name === "text")?.content, + vue: svgs.find(svg => svg.name === "vue")?.content, + }; + const getFileIcon = (fileName) => { + if (!fileName) return null; + const extension = fileName.split('.').pop().toLowerCase(); + const svgContent = iconMap[extension]; + return svgContent ? renderSvg(svgContent, styles['file-icon']) : null; + }; + const renderSvg = (content, className) => ( + + ); + useEffect(() => { + const highlight = async () => { + let lines = []; + if (highlightLines) { + lines = highlightLines[1].split(',').flatMap(range => { + const [start, end] = range.split('-').map(Number); + return end ? Array.from({ length: end - start + 1 }, (_, i) => start + i) : [start]; + }); + } + + const highlighted = await codeToHtml(props.children, { + lang: language, + theme: colorMode === 'dark' ? 'vitesse-dark' : 'vitesse-light', + transformers: [{ + name: 'line-highlight', + code(node) { + let lineIndex = 0; + node.children.forEach((child) => { + if (child.type === 'element' && child.tagName === 'span' && child.properties.class === 'line') { + lineIndex++; + if (lines.includes(lineIndex)) { + child.properties.class = 'line highlighted-line'; + } + } + }); + return node; + } + }] + }); + + setHighlightedCode(highlighted); + }; + + highlight(); + }, [props.children, colorMode, language, highlightLines]); + const copyCode = () => { + navigator.clipboard.writeText(props.children).then(() => { + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }); + }; + return ( + <> +
+
+ {/* {fileName &&
{fileName} +
} */} + {fileName && ( +
+ {getFileIcon(fileName)} + {fileName} +
+ )} + +
+ {/* */} +
+
+ + ); +} + diff --git a/docs/src/theme/CodeBlock/svg.ts b/docs/src/theme/CodeBlock/svg.ts new file mode 100644 index 000000000..09063f134 --- /dev/null +++ b/docs/src/theme/CodeBlock/svg.ts @@ -0,0 +1,26 @@ +export const svgs = [ + { + name: "ts", + content: ``, + }, + { + name: "js", + content: ``, + }, + { + name: "css", + content: ``, + }, + { + name: "json", + content: `` + }, + { + name: "text", + content: `` + }, + { + name: "vue", + content: `` + } +]; diff --git a/docs/src/theme/CodeBlockShiki/index.module.css b/docs/src/theme/CodeBlockShiki/index.module.css new file mode 100644 index 000000000..5f0c4b03a --- /dev/null +++ b/docs/src/theme/CodeBlockShiki/index.module.css @@ -0,0 +1,72 @@ +.shiki-wrapper { + margin: 1.5em 0; + border-radius: 8px; + overflow: hidden; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + transition: box-shadow 0.3s ease; +} + +.shiki-wrapper:hover { + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); +} + +.code-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0.75em 1em; + background-color: #e9ecef; + border-bottom: 1px solid #dee2e6; +} + +.code-title { + font-weight: 600; + font-size: 0.9em; +} + +.copy-button { + display: flex; + align-items: center; + background-color: transparent; + border: 1px solid #ced4da; + border-radius: 4px; + padding: 0.25em 0.5em; + font-size: 0.85em; + cursor: pointer; + transition: all 0.2s ease; +} + +.copy-button:hover { + background-color: #e9ecef; + border-color: #adb5bd; +} + +.copy-icon { + width: 1em; + height: 1em; + margin-right: 0.5em; + fill: currentColor; +} + +.copy-button span { + transition: opacity 0.2s ease; +} + +.copy-button:active span { + opacity: 0.6; +} + +@keyframes popIn { + 0% { + transform: scale(0.8); + opacity: 0; + } + 100% { + transform: scale(1); + opacity: 1; + } +} + +.copy-button svg { + animation: popIn 0.3s ease forwards; +} diff --git a/docs/src/theme/CodeBlockShiki/index.tsx b/docs/src/theme/CodeBlockShiki/index.tsx new file mode 100644 index 000000000..2a02cf95d --- /dev/null +++ b/docs/src/theme/CodeBlockShiki/index.tsx @@ -0,0 +1,82 @@ +import React, { useEffect, useState } from 'react'; +import { codeToHtml } from 'shiki'; +import styles from './index.module.css' + +const CodeBlock = ({ children, className, metastring }) => { + const [highlightedCode, setHighlightedCode] = useState(''); + const [copied, setCopied] = useState(false); + const language = className ? className.replace(/language-/, '') : 'javascript'; + const title = metastring ? metastring.match(/title="([^"]+)"/) : null; + const fileName = title ? title[1] : null; + const highlightLines = metastring ? metastring.match(/{([\d,-]+)}/) : null; + + useEffect(() => { + const highlight = async () => { + let lines = []; + if (highlightLines) { + lines = highlightLines[1].split(',').flatMap(range => { + const [start, end] = range.split('-').map(Number); + return end ? Array.from({ length: end - start + 1 }, (_, i) => start + i) : [start]; + }); + } + + const highlighted = await codeToHtml(children, { + lang: language, + themes: { + light: 'vitesse-light', + dark: 'vitesse-dark' + }, + transformers: [{ + name: 'line-highlight', + code(node) { + let lineIndex = 0; + node.children.forEach((child) => { + if (child.type === 'element' && child.tagName === 'span' && child.properties.class === 'line') { + lineIndex++; + if (lines.includes(lineIndex)) { + child.properties.class = 'line highlighted-line'; + } + } + }); + return node; + } + }] + }); + + setHighlightedCode(highlighted); + }; + + highlight(); + }, [children, language, highlightLines]); + + const copyCode = () => { + navigator.clipboard.writeText(children).then(() => { + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }); + }; + + return ( +
+
+ {fileName &&
{fileName} +
} + +
+
+
+ ); +}; + +export default CodeBlock; diff --git a/docs/src/theme/Footer/index.tsx b/docs/src/theme/Footer/index.tsx new file mode 100644 index 000000000..2c8a3d676 --- /dev/null +++ b/docs/src/theme/Footer/index.tsx @@ -0,0 +1,79 @@ +import React from 'react'; +import type FooterType from '@theme/Footer'; +import { FaXTwitter } from "react-icons/fa6"; +import type { WrapperProps } from '@docusaurus/types'; +import { GitHubLogoIcon, DiscordLogoIcon } from '@radix-ui/react-icons'; + + +type Props = WrapperProps; + +export default function FooterWrapper(props: Props): JSX.Element { + return ( +
+
+
+
+ + Extremely Fast Web Build Tool Written in Rust +
+
+
+
+

Guide

+ +
+ +
+

Community

+ +
+ +
+

More

+ +
+
+
+
+ +
+ +
+ +

Copyright © 2024 Farm Community. Built with Docusaurus.

+
+
+
+ ); +} diff --git a/docs/src/theme/ManagerTabs/index.module.css b/docs/src/theme/ManagerTabs/index.module.css new file mode 100644 index 000000000..547aa888e --- /dev/null +++ b/docs/src/theme/ManagerTabs/index.module.css @@ -0,0 +1,54 @@ +.container { + /* background-color: var(--rp-code-block-bg); */ + contain: content; + border-radius: 6px; + + :global(div[class*="language-"]) { + margin: 6px 0; + + code { + /* background-color: var(--rp-c-bg); */ + } + } +} + +.tab-list { + display: flex; + min-width: 100%; + overflow-x: scroll; + padding: 8px 0 8px 8px; +} + +.tab { + /* color: var(--rp-c-text-2); */ + border: 1px solid transparent; + box-sizing: border-box; + margin-right: 10px; + padding: 4px 6px; + margin-bottom: -1px; + user-select: none; + transition: all 0.2s ease-in-out; + cursor: pointer; +} + +.tab:last-child { + margin-right: 0; +} + +.selected { + border-color: rgb(244 244 245); + background-color: rgb(244 244 245); + border-radius: 0.55rem; + color: var(--code-block-select-color) +} + +.no-scrollbar::-webkit-scrollbar { + display: none; +} + +.no-scrollbar { + -ms-overflow-style: none; + scrollbar-width: none; +} + + diff --git a/docs/src/theme/ManagerTabs/index.tsx b/docs/src/theme/ManagerTabs/index.tsx new file mode 100644 index 000000000..fffec1f89 --- /dev/null +++ b/docs/src/theme/ManagerTabs/index.tsx @@ -0,0 +1,206 @@ + +/* +Use the rspress tabs component to rewrite tabs +https://rspress.dev/ +*/ +import React from 'react'; +import { + Children, + type ReactNode, + type ReactElement, + useMemo, + useState, + useEffect, + useContext, + forwardRef, + type ForwardedRef, + isValidElement, + type ComponentPropsWithRef, + type ForwardRefExoticComponent, +} from 'react'; +import { TabDataContext } from '../logic/TabDataContext'; +import { useStorageValue } from '../logic/useStorageValue'; +import styles from './index.module.css'; + +type TabItem = { + value?: string; + label?: string | ReactNode; + disabled?: boolean; +}; + +interface TabsProps { + values?: ReactNode[] | ReadonlyArray | TabItem[]; + defaultValue?: string; + onChange?: (index: number) => void; + children: ReactNode; + groupId?: string; + tabContainerClassName?: string; + tabPosition?: 'left' | 'center'; +} + +function isTabItem(item: unknown): item is TabItem { + if (item && typeof item === 'object' && 'label' in item) { + return true; + } + return false; +} + +const renderTab = (item: ReactNode | TabItem) => { + if (isTabItem(item)) { + return item.label || item.value; + } + return item; +}; + +export const groupIdPrefix = 'tabs.'; + +export const Tabs: ForwardRefExoticComponent = forwardRef( + (props: TabsProps, ref: ForwardedRef): ReactElement => { + const { + values, + defaultValue, + onChange, + children: rawChildren, + groupId, + tabPosition = 'left', + tabContainerClassName, + } = props; + // remove "\n" character when write JSX element in multiple lines, use Children.toArray for Tabs with no Tab element + const children = Children.toArray(rawChildren).filter( + child => !(typeof child === 'string' && child.trim() === ''), + ); + + + let tabValues = values || []; + + if (tabValues.length === 0) { + tabValues = Children.map(children, child => { + if (isValidElement(child)) { + return { + label: child.props?.label, + value: child.props?.value || child.props?.label, + }; + } + + return { + label: undefined, + value: undefined, + }; + }); + } + + const { tabData, setTabData } = useContext(TabDataContext); + const [activeIndex, setActiveIndex] = useState(() => { + if (defaultValue === undefined) { + return 0; + } + + return tabValues.findIndex(item => { + if (typeof item === 'string') { + return item === defaultValue; + } + if (item && typeof item === 'object' && 'value' in item) { + return item.value === defaultValue; + } + return false; + }); + }); + + const [storageIndex, setStorageIndex] = useStorageValue( + `${groupIdPrefix}${groupId}`, + activeIndex, + ); + + + const syncIndex = useMemo(() => { + if (groupId) { + if (tabData[groupId] !== undefined) { + return tabData[groupId]; + } + + return Number.parseInt(storageIndex); + } + + return activeIndex; + }, [tabData[groupId]]); + + // sync when other browser page trigger update + useEffect(() => { + if (groupId) { + const correctIndex = Number.parseInt(storageIndex); + + if (syncIndex !== correctIndex) { + setTabData({ ...tabData, [groupId]: correctIndex }); + } + } + }, [storageIndex]); + + // const currentIndex = groupId ? syncIndex : activeIndex; + useEffect(() => { + if (groupId) { + setCurrentIndex(syncIndex); + } else { + setCurrentIndex(activeIndex); + } + }, [groupId, syncIndex, activeIndex]); + + const [currentIndex, setCurrentIndex] = useState(groupId ? syncIndex : activeIndex); + + return ( +
+
+ {tabValues.length ? ( +
+ {tabValues.map((item, index) => { + return ( +
{ + const newIndex = index; + onChange?.(newIndex); + setCurrentIndex(newIndex); + + if (groupId) { + setTabData({ ...tabData, [groupId]: newIndex }); + setStorageIndex(newIndex); + } else { + setActiveIndex(newIndex); + } + }} + > + {renderTab(item)} +
+ ); + })} +
+ ) : null} +
+
{Children.toArray(children)[currentIndex]}
+
+ ); + }, +); + +export function Tab({ + children, + ...props +}: ComponentPropsWithRef<'div'> & + Pick): ReactElement { + return ( +
+ {children} +
+ ); +} diff --git a/docs/src/theme/NavbarItem/ComponentTypes.js b/docs/src/theme/NavbarItem/ComponentTypes.js new file mode 100644 index 000000000..26269b038 --- /dev/null +++ b/docs/src/theme/NavbarItem/ComponentTypes.js @@ -0,0 +1,22 @@ +import DefaultNavbarItem from "@theme/NavbarItem/DefaultNavbarItem"; +import DropdownNavbarItem from "@theme/NavbarItem/DropdownNavbarItem"; +import LocaleDropdownNavbarItem from "@theme/NavbarItem/LocaleDropdownNavbarItem"; +import SearchNavbarItem from "@theme/NavbarItem/SearchNavbarItem"; +import HtmlNavbarItem from "@theme/NavbarItem/HtmlNavbarItem"; +import DocNavbarItem from "@theme/NavbarItem/DocNavbarItem"; +import DocSidebarNavbarItem from "@theme/NavbarItem/DocSidebarNavbarItem"; +import DocsVersionNavbarItem from "@theme/NavbarItem/DocsVersionNavbarItem"; +import DocsVersionDropdownNavbarItem from "@theme/NavbarItem/DocsVersionDropdownNavbarItem"; + +const ComponentTypes = { + default: DefaultNavbarItem, + localeDropdown: LocaleDropdownNavbarItem, + search: SearchNavbarItem, + dropdown: DropdownNavbarItem, + html: HtmlNavbarItem, + doc: DocNavbarItem, + docSidebar: DocSidebarNavbarItem, + docsVersion: DocsVersionNavbarItem, + docsVersionDropdown: DocsVersionDropdownNavbarItem, +}; +export default ComponentTypes; diff --git a/docs/src/theme/PackageManagerTabs/icons/Bun.tsx b/docs/src/theme/PackageManagerTabs/icons/Bun.tsx new file mode 100644 index 000000000..fd9fdac1d --- /dev/null +++ b/docs/src/theme/PackageManagerTabs/icons/Bun.tsx @@ -0,0 +1,101 @@ +import type { ComponentProps } from 'react'; + +export function Bun(props: ComponentProps<'svg'>) { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +} diff --git a/docs/src/theme/PackageManagerTabs/icons/Npm.tsx b/docs/src/theme/PackageManagerTabs/icons/Npm.tsx new file mode 100644 index 000000000..6b69b2f3f --- /dev/null +++ b/docs/src/theme/PackageManagerTabs/icons/Npm.tsx @@ -0,0 +1,16 @@ +import type { ComponentProps } from 'react'; + +export function Npm(props: ComponentProps<'svg'>) { + return ( + + + + + ); +} diff --git a/docs/src/theme/PackageManagerTabs/icons/Pnpm.tsx b/docs/src/theme/PackageManagerTabs/icons/Pnpm.tsx new file mode 100644 index 000000000..391a8e2ee --- /dev/null +++ b/docs/src/theme/PackageManagerTabs/icons/Pnpm.tsx @@ -0,0 +1,22 @@ +import type { ComponentProps } from 'react'; + +export function Pnpm(props: ComponentProps<'svg'>) { + return ( + + + + + ); +} diff --git a/docs/src/theme/PackageManagerTabs/icons/Yarn.tsx b/docs/src/theme/PackageManagerTabs/icons/Yarn.tsx new file mode 100644 index 000000000..ea865340a --- /dev/null +++ b/docs/src/theme/PackageManagerTabs/icons/Yarn.tsx @@ -0,0 +1,18 @@ +import type { ComponentProps } from 'react'; + +export function Yarn(props: ComponentProps<'svg'>) { + return ( + + + + + + + ); +} diff --git a/docs/src/theme/PackageManagerTabs/index.tsx b/docs/src/theme/PackageManagerTabs/index.tsx new file mode 100644 index 000000000..1f5d32928 --- /dev/null +++ b/docs/src/theme/PackageManagerTabs/index.tsx @@ -0,0 +1,159 @@ +import { Tabs, Tab } from '../ManagerTabs'; +import React from 'react'; +import { Npm } from './icons/Npm'; +import { Yarn } from './icons/Yarn'; +import { Pnpm } from './icons/Pnpm'; +import { Bun } from './icons/Bun'; +import { codeToHtml } from 'shiki'; +import { useEffect, useState } from 'react'; +import useIsBrowser from '@docusaurus/useIsBrowser'; +import { useColorMode } from '@docusaurus/theme-common'; +export interface PackageManagerTabProps { + skip?: boolean; + command: + | string + | { + npm?: string; + yarn?: string; + pnpm?: string; + bun?: string; + }; + additionalTabs?: { + tool: string; + icon?: React.ReactNode; + }[]; +} + +function normalizeCommand(command: string): string { + if (!command?.includes('install')) { + return command; + } + // If command include `install` and package name, replace `install` with `add` + const pureCommand = command + .split(' ') + .filter(item => !item.startsWith('-') && !item.startsWith('--')) + .join(' '); + if (pureCommand === 'yarn install' || pureCommand === 'bun install') { + return command; + } + + return command.replace('install', 'add'); +} + + +function replaceTool(command, tool) { + const tools = ['npm', 'yarn', 'pnpm', 'bun']; + let newCommand = command; + + tools.forEach(t => { + const regex = new RegExp(`\\b${t}\\b`, 'g'); + newCommand = newCommand.replace(regex, tool); + }); + + return newCommand; +} + +export function PackageManagerTabs({ + command, + skip = true, + additionalTabs = [], +}: PackageManagerTabProps) { + let commandInfo: { + npm?: string; + yarn?: string; + pnpm?: string; + bun?: string; + [key: string]: string | undefined; + }; + + // Init Icons + const packageMangerToIcon = { + npm: , + yarn: , + pnpm: , + bun: , + }; + additionalTabs.forEach(tab => { + packageMangerToIcon[tab.tool] = tab.icon; + }); + + // Init Command + if (typeof command === 'string') { + commandInfo = { + npm: `npm ${command}`, + yarn: `yarn ${command}`, + pnpm: `pnpm ${command}`, + bun: `bun ${command}`, + }; + additionalTabs.forEach(tab => { + if (skip) { + commandInfo[tab.tool] = replaceTool(command, tab.tool); + } else { + commandInfo[tab.tool] = `${tab.tool} ${command}`; + } + }); + } else { + commandInfo = command; + } + + // Normalize yarn/bun command + commandInfo.yarn && (commandInfo.yarn = normalizeCommand(commandInfo.yarn)); + commandInfo.bun && (commandInfo.bun = normalizeCommand(commandInfo.bun)); + if (skip) { + const tools = ['npm', 'yarn', 'pnpm', 'bun']; + tools.forEach(tool => { + commandInfo[tool] = replaceTool(command, tool); + }); + } + const [highlightedCode, setHighlightedCode] = useState({}); + const { colorMode } = useColorMode(); + const isBrowser = useIsBrowser(); + useEffect(() => { + async function highlightCode() { + if (isBrowser) { + const { codeToHtml } = await import('shiki'); + const highlighted = {}; + for (const [key, value] of Object.entries(commandInfo)) { + highlighted[key] = await codeToHtml(value as string, { + lang: 'bash', + theme: colorMode === 'dark' ? 'vitesse-dark' : 'vitesse-light', + }); + } + setHighlightedCode(highlighted); + } + } + highlightCode(); + }, [command, colorMode, isBrowser]); + + return ( +
+ ( +
+ {packageMangerToIcon[key]} + {key} +
+ ))} + > + {Object.entries(commandInfo).map(([key, value]) => ( + +
+
+ ))} +
+
+ ); +} diff --git a/docs/src/theme/logic/TabDataContext.ts b/docs/src/theme/logic/TabDataContext.ts new file mode 100644 index 000000000..f541711e2 --- /dev/null +++ b/docs/src/theme/logic/TabDataContext.ts @@ -0,0 +1,16 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars +import React, { createContext } from 'react'; + +export interface TabData { + [key: string]: number | undefined; +} + +export interface ITabDataContext { + tabData: TabData; + setTabData: (data: TabData) => void; +} + +export const TabDataContext = createContext({ + tabData: {}, + setTabData: () => {}, +}); diff --git a/docs/src/theme/logic/useStorageValue.ts b/docs/src/theme/logic/useStorageValue.ts new file mode 100644 index 000000000..c8f969026 --- /dev/null +++ b/docs/src/theme/logic/useStorageValue.ts @@ -0,0 +1,42 @@ +import { useCallback, useEffect, useState } from 'react'; + +/** + * Read/update the value in localStorage, and keeping it in sync with other tabs. + */ +export const useStorageValue = (key: string, defaultValue = null) => { + const [value, setValueInternal] = useState(() => { + if (typeof window === 'undefined') { + return defaultValue; + } + return localStorage.getItem(key) ?? defaultValue; + }); + + const setValue = useCallback( + value => { + setValueInternal(prev => { + const next = typeof value === 'function' ? value(prev) : value; + if (next == null) { + localStorage.removeItem(key); + } else { + localStorage.setItem(key, next); + } + return next; + }); + }, + [key], + ); + + useEffect(() => { + const listener = (e: StorageEvent) => { + if (e.key === key) { + setValueInternal(localStorage.getItem(key) ?? defaultValue); + } + }; + window.addEventListener('storage', listener); + return () => { + window.removeEventListener('storage', listener); + }; + }, [key, defaultValue]); + + return [value, setValue] as const; +}; diff --git a/docs/static/img/2023-10-10-21-34-33.png b/docs/static/img/2023-10-10-21-34-33.png new file mode 100644 index 000000000..7ab9b8ae5 Binary files /dev/null and b/docs/static/img/2023-10-10-21-34-33.png differ diff --git a/docs/static/img/2023-10-10-21-41-45.png b/docs/static/img/2023-10-10-21-41-45.png new file mode 100644 index 000000000..efd0e716c Binary files /dev/null and b/docs/static/img/2023-10-10-21-41-45.png differ diff --git a/docs/static/img/2023-10-12-22-16-48.png b/docs/static/img/2023-10-12-22-16-48.png new file mode 100644 index 000000000..8c6c82dc3 Binary files /dev/null and b/docs/static/img/2023-10-12-22-16-48.png differ diff --git a/docs/static/img/2023-10-14-21-24-40.png b/docs/static/img/2023-10-14-21-24-40.png new file mode 100644 index 000000000..90da9c1e5 Binary files /dev/null and b/docs/static/img/2023-10-14-21-24-40.png differ diff --git a/docs/static/img/2023-10-15-16-44-26.png b/docs/static/img/2023-10-15-16-44-26.png new file mode 100644 index 000000000..1b9d49ac1 Binary files /dev/null and b/docs/static/img/2023-10-15-16-44-26.png differ diff --git a/docs/static/img/20231204223204.png b/docs/static/img/20231204223204.png new file mode 100644 index 000000000..be5d55397 Binary files /dev/null and b/docs/static/img/20231204223204.png differ diff --git a/docs/static/img/benchmark.png b/docs/static/img/benchmark.png new file mode 100644 index 000000000..e5feb96b2 Binary files /dev/null and b/docs/static/img/benchmark.png differ diff --git a/docs/static/img/box.png b/docs/static/img/box.png new file mode 100644 index 000000000..316d4587a Binary files /dev/null and b/docs/static/img/box.png differ diff --git a/docs/static/img/build-linux.png b/docs/static/img/build-linux.png new file mode 100644 index 000000000..51b0e71ab Binary files /dev/null and b/docs/static/img/build-linux.png differ diff --git a/docs/static/img/compatible.png b/docs/static/img/compatible.png new file mode 100644 index 000000000..830af4c50 Binary files /dev/null and b/docs/static/img/compatible.png differ diff --git a/docs/static/img/consistency.png b/docs/static/img/consistency.png new file mode 100644 index 000000000..f277410ec Binary files /dev/null and b/docs/static/img/consistency.png differ diff --git a/docs/static/img/farm-plugin-hooks.png b/docs/static/img/farm-plugin-hooks.png new file mode 100644 index 000000000..f83f1b7e5 Binary files /dev/null and b/docs/static/img/farm-plugin-hooks.png differ diff --git a/docs/static/img/farm-social-card.png b/docs/static/img/farm-social-card.png new file mode 100644 index 000000000..727ecfcae Binary files /dev/null and b/docs/static/img/farm-social-card.png differ diff --git a/docs/static/img/favicon.ico b/docs/static/img/favicon.ico new file mode 100644 index 000000000..80465dedc Binary files /dev/null and b/docs/static/img/favicon.ico differ diff --git a/docs/static/img/feature.png b/docs/static/img/feature.png new file mode 100644 index 000000000..4f3f56912 Binary files /dev/null and b/docs/static/img/feature.png differ diff --git a/docs/static/img/github-mark.svg b/docs/static/img/github-mark.svg new file mode 100644 index 000000000..37fa923df --- /dev/null +++ b/docs/static/img/github-mark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/static/img/hmr-linux.png b/docs/static/img/hmr-linux.png new file mode 100644 index 000000000..8a39eb007 Binary files /dev/null and b/docs/static/img/hmr-linux.png differ diff --git a/docs/static/img/logo-farm.png b/docs/static/img/logo-farm.png new file mode 100644 index 000000000..67112a5ca Binary files /dev/null and b/docs/static/img/logo-farm.png differ diff --git a/docs/static/img/logo.png b/docs/static/img/logo.png new file mode 100644 index 000000000..0caeb4381 Binary files /dev/null and b/docs/static/img/logo.png differ diff --git a/docs/static/img/plug.png b/docs/static/img/plug.png new file mode 100644 index 000000000..716131e15 Binary files /dev/null and b/docs/static/img/plug.png differ diff --git a/docs/static/img/plug.svg b/docs/static/img/plug.svg new file mode 100644 index 000000000..929a811ca --- /dev/null +++ b/docs/static/img/plug.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + icon bus bar + 2007-04-18T02:48:48 + simple red circular icon with white simplified power cord + http://openclipart.org/detail/3987/icon-bus-bar-by-jportugall + + + JPortugall + + + + + clip art + clipart + event + icon + image + media + microphone + organization + public domain + svg + + + + + + + + + + + diff --git a/docs/static/img/rocket.png b/docs/static/img/rocket.png new file mode 100644 index 000000000..56e71a4c9 Binary files /dev/null and b/docs/static/img/rocket.png differ diff --git a/docs/static/img/rocket.svg b/docs/static/img/rocket.svg new file mode 100644 index 000000000..b46f58aed --- /dev/null +++ b/docs/static/img/rocket.svg @@ -0,0 +1,396 @@ + + + + + image/svg+xml + + image/svg+xml + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/static/img/startup-linux.png b/docs/static/img/startup-linux.png new file mode 100644 index 000000000..43602db21 Binary files /dev/null and b/docs/static/img/startup-linux.png differ diff --git a/docs/static/img/toolbox.svg b/docs/static/img/toolbox.svg new file mode 100644 index 000000000..83b3e7a5a --- /dev/null +++ b/docs/static/img/toolbox.svg @@ -0,0 +1,4272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + + + + + + + + + diff --git a/docs/tailwind.config.js b/docs/tailwind.config.js new file mode 100644 index 000000000..11c513de6 --- /dev/null +++ b/docs/tailwind.config.js @@ -0,0 +1,169 @@ +const { + default: flattenColorPalette, +} = require("tailwindcss/lib/util/flattenColorPalette"); + +/** @type {import('tailwindcss').Config} */ +module.exports = { + corePlugins: { + preflight: false, + }, + darkMode: ["class"], + content: ["./src/**/*.{js,jsx,ts,tsx}"], + theme: { + extend: { + "brand-color": "#fea7df", + colors: { + soft: "var(--ifm-f-white-soft2)", + border: "hsl(var(--border))", + input: "hsl(var(--input))", + ring: "hsl(var(--ring))", + background: "hsl(var(--background))", + foreground: "hsl(var(--foreground))", + primary: { + DEFAULT: "hsl(var(--primary))", + foreground: "hsl(var(--primary-foreground))", + }, + secondary: { + DEFAULT: "hsl(var(--secondary))", + foreground: "hsl(var(--secondary-foreground))", + }, + destructive: { + DEFAULT: "hsl(var(--destructive))", + foreground: "hsl(var(--destructive-foreground))", + }, + muted: { + DEFAULT: "hsl(var(--muted))", + foreground: "hsl(var(--muted-foreground))", + }, + accent: { + DEFAULT: "hsl(var(--accent))", + foreground: "hsl(var(--accent-foreground))", + }, + popover: { + DEFAULT: "hsl(var(--popover))", + foreground: "hsl(var(--popover-foreground))", + }, + card: { + DEFAULT: "hsl(var(--card))", + foreground: "hsl(var(--card-foreground))", + }, + }, + }, + + animation: { + aurora: "aurora 60s linear infinite", + shimmer: "shimmer 8s infinite", + "border-beam": "border-beam calc(var(--duration)*1s) infinite linear", + marquee: "marquee var(--duration) linear infinite", + "marquee-vertical": "marquee-vertical var(--duration) linear infinite", + backgroundPositionSpin: + "background-position-spin 3000ms infinite alternate", + "accordion-down": "accordion-down 0.2s ease-out", + "accordion-up": "accordion-up 0.2s ease-out", + "border-beam": "border-beam calc(var(--duration)*1s) infinite linear", + "image-glow": "image-glow 4100ms 600ms ease-out forwards", + "fade-in": "fade-in 1000ms var(--animation-delay, 0ms) ease forwards", + "fade-up": "fade-up 1000ms var(--animation-delay, 0ms) ease forwards", + shimmer: "shimmer 8s infinite", + marquee: "marquee var(--duration) infinite linear", + "marquee-vertical": "marquee-vertical var(--duration) linear infinite", + }, + keyframes: { + aurora: { + from: { + backgroundPosition: "50% 50%, 50% 50%", + }, + to: { + backgroundPosition: "350% 50%, 350% 50%", + }, + }, + marquee: { + from: { transform: "translateX(0)" }, + to: { transform: "translateX(calc(-100% - var(--gap)))" }, + }, + "marquee-vertical": { + from: { transform: "translateY(0)" }, + to: { transform: "translateY(calc(-100% - var(--gap)))" }, + }, + "border-beam": { + "100%": { + "offset-distance": "100%", + }, + }, + shimmer: { + "0%, 90%, 100%": { + "background-position": "calc(-100% - var(--shimmer-width)) 0", + }, + "30%, 60%": { + "background-position": "calc(100% + var(--shimmer-width)) 0", + }, + }, + "background-position-spin": { + "0%": { backgroundPosition: "top center" }, + "100%": { backgroundPosition: "bottom center" }, + }, + "accordion-down": { + from: { height: "0" }, + to: { height: "var(--radix-accordion-content-height)" }, + }, + "accordion-up": { + from: { height: "var(--radix-accordion-content-height)" }, + to: { height: "0" }, + }, + "border-beam": { + "100%": { + "offset-distance": "100%", + }, + }, + "image-glow": { + "0%": { + opacity: "0", + "animation-timing-function": "cubic-bezier(0.74, 0.25, 0.76, 1)", + }, + "10%": { + opacity: "0.7", + "animation-timing-function": "cubic-bezier(0.12, 0.01, 0.08, 0.99)", + }, + "100%": { + opacity: "0.4", + }, + }, + "fade-in": { + from: { opacity: "0", transform: "translateY(-10px)" }, + to: { opacity: "1", transform: "none" }, + }, + "fade-up": { + from: { opacity: "0", transform: "translateY(20px)" }, + to: { opacity: "1", transform: "none" }, + }, + shimmer: { + "0%, 90%, 100%": { + "background-position": "calc(-100% - var(--shimmer-width)) 0", + }, + "30%, 60%": { + "background-position": "calc(100% + var(--shimmer-width)) 0", + }, + }, + marquee: { + from: { transform: "translateX(0)" }, + to: { transform: "translateX(calc(-100% - var(--gap)))" }, + }, + "marquee-vertical": { + from: { transform: "translateY(0)" }, + to: { transform: "translateY(calc(-100% - var(--gap)))" }, + }, + }, + }, + plugins: [addVariablesForColors, require("tailwindcss-animate")], +}; + +function addVariablesForColors({ addBase, theme }) { + let allColors = flattenColorPalette(theme("colors")); + let newVars = Object.fromEntries( + Object.entries(allColors).map(([key, val]) => [`--${key}`, val]), + ); + + addBase({ + ":root": newVars, + }); +} diff --git a/examples/arco-pro/farm.config.ts b/examples/arco-pro/farm.config.ts index 6f4b76160..253f462cb 100644 --- a/examples/arco-pro/farm.config.ts +++ b/examples/arco-pro/farm.config.ts @@ -9,7 +9,7 @@ export default defineConfig((env) => { input: { index: './index.html' }, - // minify: false, + sourcemap: false, presetEnv: false, // persistentCache: false, resolve: { @@ -29,7 +29,18 @@ export default defineConfig((env) => { assetsFilename: 'static/[resourceName].[contentHash].[ext]' }, partialBundling: { - targetMinSize: 1024 * 2 + targetMinSize: 1024 * 2000, + groups: [ + { + name: 'components', + test: ['src/components/.+'], + enforce: true, + }, + { + name: 'xxxx', + test: ['src/pages/.+'] + } + ] }, progress: true }, diff --git a/examples/arco-pro/src/layout.tsx b/examples/arco-pro/src/layout.tsx index ba55003ba..a5286ba05 100644 --- a/examples/arco-pro/src/layout.tsx +++ b/examples/arco-pro/src/layout.tsx @@ -56,68 +56,22 @@ function getIconFromKey(key) { } function getFlattenRoutes(routes) { - const res = [] - // function travel(_routes) { - // _routes.forEach((route) => { - // if (route.key && !route.children) { - // route.component = lazyload(() => import(`./pages/${route.key}`)); - // res.push(route); - // } else if (isArray(route.children) && route.children.length) { - // travel(route.children); - // } - // }); - // } - // travel(routes); - - // You may be very surprised why it is written this way, so am I... + const res = []; + // @ts-ignore + const mod = import.meta.glob("./pages/**/*.tsx"); function travel(_routes) { _routes.forEach((route) => { if (route.key && !route.children) { - if (route.key.includes('dashboard/monitor')) { - route.component = lazyload(() => import('./pages/dashboard/monitor')) - } else if (route.key.includes('dashboard/workplace')) { - route.component = lazyload(() => import('./pages/dashboard/workplace')) - } else if (route.key.includes('exception/403')) { - route.component = lazyload(() => import('./pages/exception/403')) - } else if (route.key.includes('exception/404')) { - route.component = lazyload(() => import('./pages/exception/404')) - } else if (route.key.includes('exception/500')) { - route.component = lazyload(() => import('./pages/exception/500')) - } else if (route.key.includes('form/group')) { - route.component = lazyload(() => import('./pages/form/group')) - } else if (route.key.includes('form/step')) { - route.component = lazyload(() => import('./pages/form/step')) - } else if (route.key.includes('list/card')) { - route.component = lazyload(() => import('./pages/list/card')) - } else if (route.key.includes('list/search-table')) { - route.component = lazyload(() => import('./pages/list/search-table')) - } else if (route.key.includes('profile/basic')) { - route.component = lazyload(() => import('./pages/profile/basic')) - } else if (route.key.includes('result/error')) { - route.component = lazyload(() => import('./pages/result/error')) - } else if (route.key.includes('result/success')) { - route.component = lazyload(() => import('./pages/result/success')) - } else if (route.key.includes('user/info')) { - route.component = lazyload(() => import('./pages/user/info')) - } else if (route.key.includes('user/setting')) { - route.component = lazyload(() => import('./pages/user/setting')) - } else if (route.key.includes('visualization/data-analysis')) { - route.component = lazyload(() => import('./pages/visualization/data-analysis')) - } else if (route.key.includes('visualization/multi-dimension-data-analysis')) { - route.component = lazyload(() => import('./pages/visualization/multi-dimension-data-analysis')) - } else if (route.key.includes('welcome')) { - route.component = lazyload(() => import('./pages/welcome')) - } else if (route.key.includes('login')) { - route.component = lazyload(() => import('./pages/login')) - } - res.push(route) + route.component = lazyload(mod[`./pages/${route.key}/index.tsx`]); + res.push(route); } else if (isArray(route.children) && route.children.length) { - travel(route.children) + travel(route.children); } - }) + }); } - travel(routes) - return res + + travel(routes); + return res; } function PageLayout() { diff --git a/examples/build-lib-external/package.json b/examples/build-lib-external/package.json index 158e4443e..12b87d827 100644 --- a/examples/build-lib-external/package.json +++ b/examples/build-lib-external/package.json @@ -1,5 +1,5 @@ { - "name": "@farm-exmaples/a-learn", + "name": "@farmfe-examples/a-learn", "version": "1.0.0", "description": "", "private": true, @@ -19,4 +19,4 @@ }, "author": "", "license": "ISC" -} \ No newline at end of file +} diff --git a/examples/decorators/package.json b/examples/decorators/package.json index d80dc2677..17d71c32f 100644 --- a/examples/decorators/package.json +++ b/examples/decorators/package.json @@ -3,8 +3,8 @@ "version": "1.0.1", "private": true, "devDependencies": { - "@farmfe/cli": "^1.0.1", - "@farmfe/core": "^1.2.4" + "@farmfe/cli": "workspace:*", + "@farmfe/core": "workspace:*" }, "scripts": { "build": "farm build && node test.mjs" diff --git a/examples/external/package.json b/examples/external/package.json index c0d31de24..63b4eecd4 100644 --- a/examples/external/package.json +++ b/examples/external/package.json @@ -11,8 +11,8 @@ "clean": "farm clean" }, "devDependencies": { - "@farmfe/cli": "^1.0.1", - "@farmfe/core": "^1.1.1", + "@farmfe/cli": "workspace:*", + "@farmfe/core": "workspace:*", "@types/jquery": "^3.5.29", "jquery": "^3.7.1", "typescript": "^5.4.3" diff --git a/examples/import-meta/package.json b/examples/import-meta/package.json index a37d9efbc..f4357f13a 100644 --- a/examples/import-meta/package.json +++ b/examples/import-meta/package.json @@ -12,7 +12,7 @@ "author": "", "license": "ISC", "devDependencies": { - "@farmfe/cli": "^1.0.4", + "@farmfe/cli": "workspace:*", "@farmfe/core": "workspace:*" } } diff --git a/examples/invalid-css-issue-1557/package.json b/examples/invalid-css-issue-1557/package.json index 133ef446d..f46a0dd3a 100644 --- a/examples/invalid-css-issue-1557/package.json +++ b/examples/invalid-css-issue-1557/package.json @@ -17,9 +17,9 @@ "react-highlight-words": "^0.20.0" }, "devDependencies": { - "@farmfe/cli": "^1.0.2", - "@farmfe/core": "^1.2.8", - "@farmfe/plugin-react": "^1.1.0", + "@farmfe/cli": "workspace:*", + "@farmfe/core": "workspace:*", + "@farmfe/plugin-react": "2.0.0-nightly-20241022124925", "@types/react": "18", "@types/react-dom": "18", "core-js": "^3.36.1", diff --git a/examples/lazy-compilation/farm.config.ts b/examples/lazy-compilation/farm.config.ts index 8bb275426..86dda4c70 100644 --- a/examples/lazy-compilation/farm.config.ts +++ b/examples/lazy-compilation/farm.config.ts @@ -5,7 +5,6 @@ export default defineConfig({ persistentCache: false, progress: false }, - clearScreen: false, server: { host: '127.0.0.1' } diff --git a/examples/nestjs/package.json b/examples/nestjs/package.json index 97b6b4cba..ae619f205 100644 --- a/examples/nestjs/package.json +++ b/examples/nestjs/package.json @@ -1,5 +1,5 @@ { - "name": "nest", + "name": "@farmfe-examples/nest", "version": "0.0.1", "description": "", "author": "", diff --git a/examples/node-lazy-compile/e2e.spec.ts b/examples/node-lazy-compile/e2e.spec.ts index 0b3bc48c2..e4084c056 100644 --- a/examples/node-lazy-compile/e2e.spec.ts +++ b/examples/node-lazy-compile/e2e.spec.ts @@ -1,4 +1,4 @@ -import { test, expect } from 'vitest'; +import { test, expect, describe } from 'vitest'; import { watchProjectAndTest } from '../../e2e/vitestSetup.js'; import { basename, dirname } from 'path'; import { fileURLToPath } from 'url'; @@ -6,12 +6,13 @@ import { fileURLToPath } from 'url'; const name = basename(import.meta.url); const projectPath = dirname(fileURLToPath(import.meta.url)); -test(`e2e tests - ${name}`, async () => { +describe(`e2e tests - ${name}`, async () => { const runTest = (command?: 'watch' | 'preview') => watchProjectAndTest( projectPath, async (log, done) => { if (command === 'preview') { + console.log(log); if (log.includes('script start') && log.includes('111aaa')) { done(); } @@ -23,8 +24,13 @@ test(`e2e tests - ${name}`, async () => { }, command ); + // preview build - await runTest('preview'); - await runTest('watch'); - await runTest('preview'); + test('preview', async () => { + await runTest('preview'); + }); + + test('watch', async () => { + await runTest('watch'); + }); }); diff --git a/examples/public-dir/src/main.tsx b/examples/public-dir/src/main.tsx index 56357bee7..c7c53774a 100644 --- a/examples/public-dir/src/main.tsx +++ b/examples/public-dir/src/main.tsx @@ -1,7 +1,8 @@ import React, { useState } from "react"; import "./main.css"; import reactLogo from "./assets/react.svg"; -// import FarmLogo from "../public/logo.png"; +import FarmLogo from "/new-logo.png"; +// import FarmLogo from "../newPublic/new-logo.png"; export function Main() { const [count, setCount] = useState(0); diff --git a/examples/qrcode/index.html b/examples/qrcode/index.html index fd9f1ccb1..922f24fad 100644 --- a/examples/qrcode/index.html +++ b/examples/qrcode/index.html @@ -6,7 +6,7 @@ Document -
+
diff --git a/examples/react-fast-refresh/package.json b/examples/react-fast-refresh/package.json index d993f6b07..ff5965fb2 100644 --- a/examples/react-fast-refresh/package.json +++ b/examples/react-fast-refresh/package.json @@ -1,6 +1,7 @@ { - "name": "react-fast-refresh", + "name": "@farmfe-examples/react-fast-refresh", "version": "1.0.0", + "private": true, "scripts": { "dev": "farm start", "start": "farm start", @@ -13,12 +14,12 @@ "react-dom": "18" }, "devDependencies": { - "@farmfe/cli": "workspace:", - "@farmfe/core": "workspace:", - "@farmfe/plugin-react": "workspace:", + "@farmfe/cli": "workspace:*", + "@farmfe/core": "workspace:*", + "@farmfe/plugin-react": "workspace:*", "@types/react": "18", "core-js": "^3.36.1", "@types/react-dom": "18", "react-refresh": "^0.14.0" } -} \ No newline at end of file +} diff --git a/examples/react/farm.config.js b/examples/react/farm.config.js index b35ddf3ac..e8febd351 100644 --- a/examples/react/farm.config.js +++ b/examples/react/farm.config.js @@ -9,6 +9,10 @@ export default defineConfig((env) => { compilation: { sourcemap: true, // persistentCache: false, + persistentCache: { + // cacheDir: "node_modules/.farm/adny", + cacheDir: "node_modules/adny/cache", + }, presetEnv: false, progress: false // output: { diff --git a/examples/react/public/vite.svg b/examples/react/public/vite.svg new file mode 100644 index 000000000..e7b8dfb1b --- /dev/null +++ b/examples/react/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/react/src/vite.svg b/examples/react/src/vite.svg new file mode 100644 index 000000000..e7b8dfb1b --- /dev/null +++ b/examples/react/src/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/refactor-react/.gitignore b/examples/refactor-react/.gitignore new file mode 100644 index 000000000..a4cf82d2c --- /dev/null +++ b/examples/refactor-react/.gitignore @@ -0,0 +1,22 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.sln +*.sw? diff --git a/examples/refactor-react/README.md b/examples/refactor-react/README.md new file mode 100644 index 000000000..5802e857f --- /dev/null +++ b/examples/refactor-react/README.md @@ -0,0 +1,37 @@ +# Farm + React + +This template should help you start developing using React and TypeScript in Farm. + +## Setup + +Install the dependencies: + +```bash +pnpm install +``` + +## Get Started + +Start the dev server: + +```bash +pnpm start +``` + +Build the app for production: + +```bash +pnpm build +``` + +Preview the Production build product: + +```bash +pnpm preview +``` + +Clear persistent cache local files + +```bash +pnpm clean +``` diff --git a/examples/refactor-react/about.html b/examples/refactor-react/about.html new file mode 100644 index 000000000..5b65d32cf --- /dev/null +++ b/examples/refactor-react/about.html @@ -0,0 +1,11 @@ + + + + + + Document + + + im about page + + diff --git a/examples/refactor-react/farm.config.ts b/examples/refactor-react/farm.config.ts new file mode 100644 index 000000000..5a89f2b10 --- /dev/null +++ b/examples/refactor-react/farm.config.ts @@ -0,0 +1,53 @@ +import { defineConfig } from "@farmfe/core"; + +import react from "@farmfe/plugin-react"; +import path from "path"; + +console.log(__dirname); + +export default defineConfig({ + plugins: [ + react(), + // myCustomPlugin(), + compilerPlugin(), + ], + compilation: { + // persistentCache: false, + persistentCache: { + cacheDir: "node_modules/.adny", + }, + output: { + // publicPath: "/aaa/", + }, + resolve: { + // alias: { + // "@": path.resolve("src"), + // }, + alias: [{ find: "@", replacement: path.resolve("src") }], + }, + }, + // timeUnit: "s", + server: { + port: 8854, + }, +}); + +function myCustomPlugin() { + return { + name: "custom", + updateModules: { + executor(data: any) { + console.log(data, "更新的模块"); + }, + }, + }; +} + +function compilerPlugin() { + return { + name: "compiler", + configureCompiler(compiler: any) { + // console.log(compiler, "compiler") + }, + }; +} diff --git a/examples/refactor-react/index.html b/examples/refactor-react/index.html new file mode 100644 index 000000000..816b92291 --- /dev/null +++ b/examples/refactor-react/index.html @@ -0,0 +1,15 @@ + + + + + + + + + Farm + React + TS + + +
+ + + diff --git a/examples/refactor-react/package.json b/examples/refactor-react/package.json new file mode 100644 index 000000000..0629ef955 --- /dev/null +++ b/examples/refactor-react/package.json @@ -0,0 +1,28 @@ +{ + "name": "@farmfe-examples/react-template", + "version": "1.0.0", + "type": "module", + "private": true, + "scripts": { + "dev": "farm", + "start": "farm start --debug", + "build": "farm build", + "preview": "farm preview", + "clean": "farm clean" + }, + "dependencies": { + "@ant-design/happy-work-theme": "^1.0.0", + "antd": "^5.4.2", + "react": "18", + "react-dom": "18" + }, + "devDependencies": { + "@farmfe/cli": "workspace:*", + "@farmfe/core": "workspace:*", + "@farmfe/plugin-react": "workspace:*", + "@types/react": "18", + "@types/react-dom": "18", + "core-js": "^3.36.1", + "react-refresh": "^0.14.0" + } +} diff --git a/examples/refactor-react/public/favicon.ico b/examples/refactor-react/public/favicon.ico new file mode 100644 index 000000000..80465dedc Binary files /dev/null and b/examples/refactor-react/public/favicon.ico differ diff --git a/examples/refactor-react/public/react.svg b/examples/refactor-react/public/react.svg new file mode 100644 index 000000000..6c87de9bb --- /dev/null +++ b/examples/refactor-react/public/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/refactor-react/src/assets/base/react.svg b/examples/refactor-react/src/assets/base/react.svg new file mode 100644 index 000000000..6c87de9bb --- /dev/null +++ b/examples/refactor-react/src/assets/base/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/refactor-react/src/assets/logo.png b/examples/refactor-react/src/assets/logo.png new file mode 100644 index 000000000..0caeb4381 Binary files /dev/null and b/examples/refactor-react/src/assets/logo.png differ diff --git a/examples/refactor-react/src/assets/react.svg b/examples/refactor-react/src/assets/react.svg new file mode 100644 index 000000000..6c87de9bb --- /dev/null +++ b/examples/refactor-react/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/refactor-react/src/index.css b/examples/refactor-react/src/index.css new file mode 100644 index 000000000..6cc4daf98 --- /dev/null +++ b/examples/refactor-react/src/index.css @@ -0,0 +1,69 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #9f1a8f; + text-decoration: inherit; +} +a:hover { + color: #9f1a8f; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #9f1a8f; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #9F1A8F; + } + button { + background-color: #f9f9f9; + } +} diff --git a/examples/refactor-react/src/index.tsx b/examples/refactor-react/src/index.tsx new file mode 100644 index 000000000..d808fef79 --- /dev/null +++ b/examples/refactor-react/src/index.tsx @@ -0,0 +1,11 @@ +import React from 'react'; +import { createRoot } from 'react-dom/client'; +import { Main } from './main'; +import './index.css' + + +const container = document.querySelector('#root'); +// biome-ignore lint/style/noNonNullAssertion: +const root = createRoot(container!); + +root.render(
) diff --git a/examples/refactor-react/src/main.css b/examples/refactor-react/src/main.css new file mode 100644 index 000000000..97420f8ca --- /dev/null +++ b/examples/refactor-react/src/main.css @@ -0,0 +1,42 @@ +#root { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #9F1A8Faa); +} +.logo.react:hover { + filter: drop-shadow(0 0 2em #9761fbaa); +} + +@keyframes logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@media (prefers-reduced-motion: no-preference) { + a:nth-of-type(2) .logo { + animation: logo-spin infinite 20s linear; + } +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} diff --git a/examples/refactor-react/src/main.tsx b/examples/refactor-react/src/main.tsx new file mode 100644 index 000000000..a1b77f3a4 --- /dev/null +++ b/examples/refactor-react/src/main.tsx @@ -0,0 +1,42 @@ +import { useState } from "react"; +import "./main.css"; +import reactLogo from "/react.svg"; +import FarmLogo from "./assets/logo.png"; +// import { a } from './a.js' +// import { Button } from 'antd' +// import { HappyProvider } from '@ant-design/happy-work-theme'; +export function Main() { + const [count, setCount] = useState(0); + // console.log(a); + + return ( + <> + + {/* + + + + + */} +

Farm + react

+
+ +

+ Edit src/main.tsx and save to test HMR +

+
+

+ Click on the Farm and React logos to learn more +

+ + ); +} diff --git a/examples/refactor-react/src/typings.d.ts b/examples/refactor-react/src/typings.d.ts new file mode 100644 index 000000000..fa0a2da54 --- /dev/null +++ b/examples/refactor-react/src/typings.d.ts @@ -0,0 +1,3 @@ +declare module '*.svg'; +declare module '*.png'; +declare module '*.css'; diff --git a/examples/refactor-react/tsconfig.json b/examples/refactor-react/tsconfig.json new file mode 100644 index 000000000..7a7611e4a --- /dev/null +++ b/examples/refactor-react/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} \ No newline at end of file diff --git a/examples/refactor-react/tsconfig.node.json b/examples/refactor-react/tsconfig.node.json new file mode 100644 index 000000000..8d4232518 --- /dev/null +++ b/examples/refactor-react/tsconfig.node.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true + }, + "include": ["farm.config.ts"] +} diff --git a/examples/resolve-module-graph/package.json b/examples/resolve-module-graph/package.json index 6d55bb08d..6c2890520 100644 --- a/examples/resolve-module-graph/package.json +++ b/examples/resolve-module-graph/package.json @@ -1,5 +1,5 @@ { - "name": "@farm-examples/resolve-module-graph", + "name": "@farmfe-examples/resolve-module-graph", "version": "1.0.0", "description": "", "private": true, @@ -16,4 +16,4 @@ "@farmfe/core": "workspace:*", "@farmfe/cli": "workspace:*" } -} \ No newline at end of file +} diff --git a/examples/server-proxy/package.json b/examples/server-proxy/package.json index 32044fdca..b55d8bafc 100644 --- a/examples/server-proxy/package.json +++ b/examples/server-proxy/package.json @@ -1,5 +1,5 @@ { - "name": "@farm-examples/server-proxy", + "name": "@farmfe-examples/server-proxy", "version": "1.0.0", "description": "", "main": "index.js", diff --git a/examples/visualizer/.gitignore b/examples/visualizer/.gitignore new file mode 100644 index 000000000..a4cf82d2c --- /dev/null +++ b/examples/visualizer/.gitignore @@ -0,0 +1,22 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.sln +*.sw? diff --git a/examples/visualizer/README.md b/examples/visualizer/README.md new file mode 100644 index 000000000..5802e857f --- /dev/null +++ b/examples/visualizer/README.md @@ -0,0 +1,37 @@ +# Farm + React + +This template should help you start developing using React and TypeScript in Farm. + +## Setup + +Install the dependencies: + +```bash +pnpm install +``` + +## Get Started + +Start the dev server: + +```bash +pnpm start +``` + +Build the app for production: + +```bash +pnpm build +``` + +Preview the Production build product: + +```bash +pnpm preview +``` + +Clear persistent cache local files + +```bash +pnpm clean +``` diff --git a/examples/visualizer/about.html b/examples/visualizer/about.html new file mode 100644 index 000000000..5b65d32cf --- /dev/null +++ b/examples/visualizer/about.html @@ -0,0 +1,11 @@ + + + + + + Document + + + im about page + + diff --git a/examples/visualizer/farm.config.ts b/examples/visualizer/farm.config.ts new file mode 100644 index 000000000..bed4d0ed6 --- /dev/null +++ b/examples/visualizer/farm.config.ts @@ -0,0 +1,26 @@ +import { defineConfig } from "@farmfe/core"; +// import viewer from "@farmfe/js-plugin-visualizer"; +import react from "@farmfe/plugin-react"; +import compression from "compression"; +const myPlugin = () => ({ + name: "configure-server", + configureServer(server) { + server.middlewares.use(compression()); + server.middlewares.use((req, res, next) => { + // 自定义请求处理... + next(); + }); + }, +}); + +export default defineConfig({ + plugins: [react(), myPlugin()], + compilation: { + output: { + // publicPath: "/aaa/", + }, + }, + server: { + // port: 3000, + }, +}); diff --git a/examples/visualizer/index.html b/examples/visualizer/index.html new file mode 100644 index 000000000..816b92291 --- /dev/null +++ b/examples/visualizer/index.html @@ -0,0 +1,15 @@ + + + + + + + + + Farm + React + TS + + +
+ + + diff --git a/examples/visualizer/package.json b/examples/visualizer/package.json new file mode 100644 index 000000000..4f3a751be --- /dev/null +++ b/examples/visualizer/package.json @@ -0,0 +1,28 @@ +{ + "name": "@farmfe-examples/visualizer", + "version": "1.0.0", + "type": "module", + "private": true, + "scripts": { + "dev": "farm", + "start": "farm start --debug", + "build": "farm build", + "preview": "farm preview", + "clean": "farm clean" + }, + "dependencies": { + "react": "18", + "react-dom": "18" + }, + "devDependencies": { + "@farmfe/cli": "workspace:*", + "@farmfe/core": "workspace:*", + "@farmfe/js-plugin-visualizer": "workspace:*", + "@farmfe/plugin-react": "workspace:*", + "@types/react": "18", + "@types/react-dom": "18", + "compression": "^1.7.4", + "core-js": "^3.36.1", + "react-refresh": "^0.14.0" + } +} diff --git a/examples/visualizer/public/favicon.ico b/examples/visualizer/public/favicon.ico new file mode 100644 index 000000000..80465dedc Binary files /dev/null and b/examples/visualizer/public/favicon.ico differ diff --git a/examples/visualizer/public/react.svg b/examples/visualizer/public/react.svg new file mode 100644 index 000000000..6c87de9bb --- /dev/null +++ b/examples/visualizer/public/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/visualizer/src/assets/base/react.svg b/examples/visualizer/src/assets/base/react.svg new file mode 100644 index 000000000..6c87de9bb --- /dev/null +++ b/examples/visualizer/src/assets/base/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/visualizer/src/assets/logo.png b/examples/visualizer/src/assets/logo.png new file mode 100644 index 000000000..0caeb4381 Binary files /dev/null and b/examples/visualizer/src/assets/logo.png differ diff --git a/examples/visualizer/src/assets/react.svg b/examples/visualizer/src/assets/react.svg new file mode 100644 index 000000000..6c87de9bb --- /dev/null +++ b/examples/visualizer/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/visualizer/src/index.css b/examples/visualizer/src/index.css new file mode 100644 index 000000000..6cc4daf98 --- /dev/null +++ b/examples/visualizer/src/index.css @@ -0,0 +1,69 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #9f1a8f; + text-decoration: inherit; +} +a:hover { + color: #9f1a8f; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #9f1a8f; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #9F1A8F; + } + button { + background-color: #f9f9f9; + } +} diff --git a/examples/visualizer/src/index.tsx b/examples/visualizer/src/index.tsx new file mode 100644 index 000000000..39df64e84 --- /dev/null +++ b/examples/visualizer/src/index.tsx @@ -0,0 +1,11 @@ +import React from 'react'; +import { createRoot } from 'react-dom/client'; +import { Main } from './main'; +import './index.css' + + +const container = document.querySelector('#root'); +// biome-ignore lint/style/noNonNullAssertion: +const root = createRoot(container!); + +root.render(
); diff --git a/examples/visualizer/src/main.css b/examples/visualizer/src/main.css new file mode 100644 index 000000000..97420f8ca --- /dev/null +++ b/examples/visualizer/src/main.css @@ -0,0 +1,42 @@ +#root { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #9F1A8Faa); +} +.logo.react:hover { + filter: drop-shadow(0 0 2em #9761fbaa); +} + +@keyframes logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@media (prefers-reduced-motion: no-preference) { + a:nth-of-type(2) .logo { + animation: logo-spin infinite 20s linear; + } +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} diff --git a/examples/visualizer/src/main.tsx b/examples/visualizer/src/main.tsx new file mode 100644 index 000000000..92662eded --- /dev/null +++ b/examples/visualizer/src/main.tsx @@ -0,0 +1,31 @@ +import { useState } from "react"; +import "./main.css"; +import reactLogo from "/react.svg"; +import FarmLogo from "./assets/logo.png"; +export function Main() { + const [count, setCount] = useState(0); + return ( + <> + +

Farm + react

+
+ +

+ Edit src/main.tsx and save to test HMR +

+
+

+ Click on the Farm and React logos to learn more +

+ + ); +} diff --git a/examples/visualizer/src/typings.d.ts b/examples/visualizer/src/typings.d.ts new file mode 100644 index 000000000..fa0a2da54 --- /dev/null +++ b/examples/visualizer/src/typings.d.ts @@ -0,0 +1,3 @@ +declare module '*.svg'; +declare module '*.png'; +declare module '*.css'; diff --git a/examples/visualizer/tsconfig.json b/examples/visualizer/tsconfig.json new file mode 100644 index 000000000..7a7611e4a --- /dev/null +++ b/examples/visualizer/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} \ No newline at end of file diff --git a/examples/visualizer/tsconfig.node.json b/examples/visualizer/tsconfig.node.json new file mode 100644 index 000000000..8d4232518 --- /dev/null +++ b/examples/visualizer/tsconfig.node.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true + }, + "include": ["farm.config.ts"] +} diff --git a/examples/vite-adapter-react/src/pages/index.tsx b/examples/vite-adapter-react/src/pages/index.tsx index 8ea6ca581..e9d779685 100644 --- a/examples/vite-adapter-react/src/pages/index.tsx +++ b/examples/vite-adapter-react/src/pages/index.tsx @@ -4,7 +4,7 @@ import FarmLogo from '../assets/logo.png'; import reactLogo from '../assets/react.svg'; import './main.css'; - export default function () { +export default function () { const [count, setCount] = useState(0); const go = useNavigate(); @@ -17,7 +17,7 @@ import './main.css'; React logo -
+
12312123

Farm + React

diff --git a/examples/vite-adapter-solid/src/App.tsx b/examples/vite-adapter-solid/src/App.tsx index 91aa47cff..4acae856f 100644 --- a/examples/vite-adapter-solid/src/App.tsx +++ b/examples/vite-adapter-solid/src/App.tsx @@ -15,7 +15,7 @@ const App: Component = () => {
logo

- Editsrc/App.tsx and save to reload. + Editsrc/App.tsx1232131231231221312321 and save to reload.

- import svelteLogo from './assets/svelte.svg' - import farmLogo from '/logo.png' - import Counter from './lib/Counter.svelte' + import svelteLogo from "./assets/svelte.svg"; + import farmLogo from "/logo.png"; + import Counter from "./lib/Counter.svelte";
- + 1321321 @@ -23,9 +23,7 @@ Powered by Farm and svelet vite plugin

-

- Click on the Farm and Svelte logos to learn more -

+

Click on the Farm and Svelte logos to learn more

\ No newline at end of file + diff --git a/examples/vite-adapter-vue2.7/package.json b/examples/vite-adapter-vue2.7/package.json index 5d725ab87..2235492ca 100644 --- a/examples/vite-adapter-vue2.7/package.json +++ b/examples/vite-adapter-vue2.7/package.json @@ -17,8 +17,8 @@ "vue": "~2.7.16" }, "devDependencies": { - "@farmfe/cli": "workspace:^1.0.0", - "@farmfe/core": "workspace:^1.0.11", + "@farmfe/cli": "workspace:*", + "@farmfe/core": "workspace:*", "@vitejs/plugin-vue2": "^2.3.1", "core-js": "^3.30.1", "vue-template-compiler": "~2.7.16" diff --git a/examples/vite-adapter-vue2/package.json b/examples/vite-adapter-vue2/package.json index 447b95a59..0df7216a7 100644 --- a/examples/vite-adapter-vue2/package.json +++ b/examples/vite-adapter-vue2/package.json @@ -17,8 +17,8 @@ "vue": "2.6.14" }, "devDependencies": { - "@farmfe/cli": "workspace:^1.0.0", - "@farmfe/core": "workspace:^1.0.11", + "@farmfe/cli": "workspace:*", + "@farmfe/core": "workspace:*", "axios": "^1.7.2", "core-js": "^3.30.1", "vite-plugin-vue2": "^2.0.3", diff --git a/examples/vite-adapter-vue2/src/App.vue b/examples/vite-adapter-vue2/src/App.vue index bf8d6a5a2..491d6f998 100644 --- a/examples/vite-adapter-vue2/src/App.vue +++ b/examples/vite-adapter-vue2/src/App.vue @@ -3,7 +3,7 @@ farm logo {{ res }} -

Welcome to use TDesign!

+

Welcome to use

diff --git a/examples/vue-antdv/farm.config.ts b/examples/vue-antdv/farm.config.ts index 903706251..141616149 100644 --- a/examples/vue-antdv/farm.config.ts +++ b/examples/vue-antdv/farm.config.ts @@ -11,7 +11,8 @@ export default defineConfig({ alias: { '/@': path.join(process.cwd(), 'src') } - } + }, + lazyCompilation: false, }, plugins: [farmJsPluginLess()], vitePlugins: [Vue()] diff --git a/examples/vue-antdv/src/home.vue b/examples/vue-antdv/src/home.vue index 3575aa737..117c410eb 100644 --- a/examples/vue-antdv/src/home.vue +++ b/examples/vue-antdv/src/home.vue @@ -1,7 +1,7 @@ `, + ); + }, + configResolved(config) { + // console.log(config.build.rollupOptions); + }, + // configureServer(server) { + // server.middlewares.use((req, res, next) => { + // console.log(`收到请求 之前的: ${req.url}`); + // next(); + // }); + + // return () => { + // server.middlewares.use((req, res, next) => { + // console.log(`收到请求 posthook的: ${req.url}`); + // next(); + // }); + // }; + // }, + }; +} + +export default defineConfig({ + vitePlugins: [ + // mkcert(), + // viteCompression(), + // VueRouter(), + // AutoImport({ + // imports: ["vue", VueRouterAutoImports], + // }), + vue(), + UnoCSS(), + // federation({ + // name: "remote", + // filename: "remoteEntry.js", + // exposes: { + // "./remote-app": "./src/App.vue", + // }, + // shared: ["vue"], + // }), + // Inspector({ + // enabled: true, + // }), + // compressionMiddleware(), + myCustomPlugin(), + // createHtmlPlugin({ + // minify: true, + // /** + // * 在这里写entry后,你将不需要在`index.html`内添加 script 标签,原有标签需要删除 + // * @default src/main.ts + // */ + // // entry: 'src/main.ts', + // /** + // * 如果你想将 `index.html`存放在指定文件夹,可以修改它,否则不需要配置 + // * @default index.html + // */ + // // template: 'public/index.html', + + // /** + // * 需要注入 index.html ejs 模版的数据 + // */ + // inject: { + // data: { + // title: 'index', + // injectScript: ``, + // }, + // tags: [ + // { + // injectTo: 'body-prepend', + // tag: 'div', + // attrs: { + // id: 'tag', + // }, + // }, + // ], + // }, + // }), + // Inspect(), + // compressionMiddleware(), + ], + // customLogger: logger, + + compilation: { + input: { + index: "index.html", + }, + persistentCache: false, + runtime: { + isolate: true, + }, + progress: false, + resolve: { + // alias: { + // "@": path.resolve("src"), + // }, + alias: [{ find: "@", replacement: path.resolve("src") }], + }, + }, + server: { + // https: true, + port: 5380, + }, + // plugins: [myCustomPlugin()], + // plugins: [compressionMiddleware()], + // server: { + // port: 5232, + // proxy: { + // "/aaa": { + // target: "http://v.juhe.cn/toutiao/index", + // changeOrigin: true, + // ws: true, + // rewrite: (path) => path.replace(/^\/aaa/, ""), + // }, + // }, + // }, +}); diff --git a/examples/vue3/index.html b/examples/vue3/index.html new file mode 100644 index 000000000..6952429f3 --- /dev/null +++ b/examples/vue3/index.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + +
+ + + + diff --git a/examples/vue3/package.json b/examples/vue3/package.json new file mode 100644 index 000000000..7a8c0bdf6 --- /dev/null +++ b/examples/vue3/package.json @@ -0,0 +1,31 @@ +{ + "name": "@farmfe-examples/vue3", + "version": "1.0.0", + "private": true, + "scripts": { + "dev": "farm start", + "start": "farm start", + "build": "farm build", + "preview": "farm preview", + "clean": "farm clean" + }, + "dependencies": { + "@module-federation/vite": "^1.1.1", + "unplugin-auto-import": "^0.16.7", + "unplugin-vue-router": "^0.7.0", + "vue": "^3.4.0", + "vue-router": "^4.4.3" + }, + "devDependencies": { + "@vitejs/plugin-vue": "5.1.4", + "compression": "^1.7.4", + "core-js": "^3.30.1", + "unocss": "^0.62.2", + "unplugin-vue-inspector": "^2.2.0", + "vite-plugin-compression": "^0.5.1", + "vite-plugin-html": "^3.2.2", + "vite-plugin-inspect": "^0.8.7", + "vite-plugin-mkcert": "^1.17.6", + "vite-plugin-vue-inspector": "/Users/adny/vue/vite-plugin-vue-inspector/packages/core" + } +} diff --git a/examples/vue3/public/favicon.ico b/examples/vue3/public/favicon.ico new file mode 100644 index 000000000..80465dedc Binary files /dev/null and b/examples/vue3/public/favicon.ico differ diff --git a/examples/vue3/src/App.vue b/examples/vue3/src/App.vue new file mode 100644 index 000000000..580e45437 --- /dev/null +++ b/examples/vue3/src/App.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/examples/vue3/src/assets/logo.png b/examples/vue3/src/assets/logo.png new file mode 100644 index 000000000..0caeb4381 Binary files /dev/null and b/examples/vue3/src/assets/logo.png differ diff --git a/examples/vue3/src/assets/vue.svg b/examples/vue3/src/assets/vue.svg new file mode 100644 index 000000000..770e9d333 --- /dev/null +++ b/examples/vue3/src/assets/vue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/vue3/src/auto_import.d.ts b/examples/vue3/src/auto_import.d.ts new file mode 100644 index 000000000..df54a15f1 --- /dev/null +++ b/examples/vue3/src/auto_import.d.ts @@ -0,0 +1,5 @@ +/* generated by farmfe_plugin_auto_import */ +export {} +declare global { + const farm.config: typeof import('./../farm.config.ts')['default'] +} diff --git a/examples/vue3/src/components/HelloWorld.vue b/examples/vue3/src/components/HelloWorld.vue new file mode 100644 index 000000000..7135f2b54 --- /dev/null +++ b/examples/vue3/src/components/HelloWorld.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/examples/vue3/src/env.d.ts b/examples/vue3/src/env.d.ts new file mode 100644 index 000000000..4ae8e90af --- /dev/null +++ b/examples/vue3/src/env.d.ts @@ -0,0 +1,2 @@ +declare module '*.vue'; +declare module '*.svg'; diff --git a/examples/vue3/src/index.ts b/examples/vue3/src/index.ts new file mode 100644 index 000000000..97806ddee --- /dev/null +++ b/examples/vue3/src/index.ts @@ -0,0 +1,6 @@ +import { createApp } from 'vue' +import 'virtual:uno.css' +import './style.css' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/examples/vue3/src/indexa.ts b/examples/vue3/src/indexa.ts new file mode 100644 index 000000000..a5ce15f7c --- /dev/null +++ b/examples/vue3/src/indexa.ts @@ -0,0 +1,11 @@ +function aaa () { + // 写一个算法 返回一个值 + return 123 + 456 +} + +export function bbb () { + // 写一个算法 返回一个值 + console.log(); + + return 123 + aaa() +} diff --git a/examples/vue3/src/pages/Home.vue b/examples/vue3/src/pages/Home.vue new file mode 100644 index 000000000..f4173a6ad --- /dev/null +++ b/examples/vue3/src/pages/Home.vue @@ -0,0 +1,52 @@ + diff --git a/examples/vue3/src/pages/about.vue b/examples/vue3/src/pages/about.vue new file mode 100644 index 000000000..48f51ed28 --- /dev/null +++ b/examples/vue3/src/pages/about.vue @@ -0,0 +1,10 @@ + diff --git a/examples/vue3/src/pages/index.vue b/examples/vue3/src/pages/index.vue new file mode 100644 index 000000000..f4173a6ad --- /dev/null +++ b/examples/vue3/src/pages/index.vue @@ -0,0 +1,52 @@ + diff --git a/examples/vue3/src/style.css b/examples/vue3/src/style.css new file mode 100644 index 000000000..6efbecc02 --- /dev/null +++ b/examples/vue3/src/style.css @@ -0,0 +1,80 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #9F1A8F; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #9F1A8F; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +.card { + padding: 2em; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #9F1A8F; + } + button { + background-color: #f9f9f9; + } +} diff --git a/examples/vue3/test.js b/examples/vue3/test.js new file mode 100644 index 000000000..6a566deee --- /dev/null +++ b/examples/vue3/test.js @@ -0,0 +1 @@ +export const aaa2222 = 121222222222222222223; diff --git a/examples/vue3/tsconfig.json b/examples/vue3/tsconfig.json new file mode 100644 index 000000000..ee019e988 --- /dev/null +++ b/examples/vue3/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], + "references": [{ "path": "./tsconfig.node.json" }] +} \ No newline at end of file diff --git a/examples/vue3/tsconfig.node.json b/examples/vue3/tsconfig.node.json new file mode 100644 index 000000000..8d4232518 --- /dev/null +++ b/examples/vue3/tsconfig.node.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true + }, + "include": ["farm.config.ts"] +} diff --git a/examples/vue3/typed-router.d.ts b/examples/vue3/typed-router.d.ts new file mode 100644 index 000000000..a82f215be --- /dev/null +++ b/examples/vue3/typed-router.d.ts @@ -0,0 +1,143 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️ +// It's recommended to commit this file. +// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry. + +/// + +import type { + // type safe route locations + RouteLocationTypedList, + RouteLocationResolvedTypedList, + RouteLocationNormalizedTypedList, + RouteLocationNormalizedLoadedTypedList, + RouteLocationAsString, + RouteLocationAsRelativeTypedList, + RouteLocationAsPathTypedList, + + // helper types + // route definitions + RouteRecordInfo, + ParamValue, + ParamValueOneOrMore, + ParamValueZeroOrMore, + ParamValueZeroOrOne, + + // vue-router extensions + _RouterTyped, + RouterLinkTyped, + RouterLinkPropsTyped, + NavigationGuard, + UseLinkFnTyped, + + // data fetching + _DataLoader, + _DefineLoaderOptions, +} from 'unplugin-vue-router/types' + +declare module 'vue-router/auto/routes' { + export interface RouteNamedMap { + '/': RouteRecordInfo<'/', '/', Record, Record>, + '/about': RouteRecordInfo<'/about', '/about', Record, Record>, + '/Home': RouteRecordInfo<'/Home', '/Home', Record, Record>, + } +} + +declare module 'vue-router/auto' { + import type { RouteNamedMap } from 'vue-router/auto/routes' + + export type RouterTyped = _RouterTyped + + /** + * Type safe version of `RouteLocationNormalized` (the type of `to` and `from` in navigation guards). + * Allows passing the name of the route to be passed as a generic. + */ + export type RouteLocationNormalized = RouteLocationNormalizedTypedList[Name] + + /** + * Type safe version of `RouteLocationNormalizedLoaded` (the return type of `useRoute()`). + * Allows passing the name of the route to be passed as a generic. + */ + export type RouteLocationNormalizedLoaded = RouteLocationNormalizedLoadedTypedList[Name] + + /** + * Type safe version of `RouteLocationResolved` (the returned route of `router.resolve()`). + * Allows passing the name of the route to be passed as a generic. + */ + export type RouteLocationResolved = RouteLocationResolvedTypedList[Name] + + /** + * Type safe version of `RouteLocation` . Allows passing the name of the route to be passed as a generic. + */ + export type RouteLocation = RouteLocationTypedList[Name] + + /** + * Type safe version of `RouteLocationRaw` . Allows passing the name of the route to be passed as a generic. + */ + export type RouteLocationRaw = + | RouteLocationAsString + | RouteLocationAsRelativeTypedList[Name] + | RouteLocationAsPathTypedList[Name] + + /** + * Generate a type safe params for a route location. Requires the name of the route to be passed as a generic. + */ + export type RouteParams = RouteNamedMap[Name]['params'] + /** + * Generate a type safe raw params for a route location. Requires the name of the route to be passed as a generic. + */ + export type RouteParamsRaw = RouteNamedMap[Name]['paramsRaw'] + + export function useRouter(): RouterTyped + export function useRoute(name?: Name): RouteLocationNormalizedLoadedTypedList[Name] + + export const useLink: UseLinkFnTyped + + export function onBeforeRouteLeave(guard: NavigationGuard): void + export function onBeforeRouteUpdate(guard: NavigationGuard): void + + export const RouterLink: RouterLinkTyped + export const RouterLinkProps: RouterLinkPropsTyped + + // Experimental Data Fetching + + export function defineLoader< + P extends Promise, + Name extends keyof RouteNamedMap = keyof RouteNamedMap, + isLazy extends boolean = false, + >( + name: Name, + loader: (route: RouteLocationNormalizedLoaded) => P, + options?: _DefineLoaderOptions, + ): _DataLoader, isLazy> + export function defineLoader< + P extends Promise, + isLazy extends boolean = false, + >( + loader: (route: RouteLocationNormalizedLoaded) => P, + options?: _DefineLoaderOptions, + ): _DataLoader, isLazy> + + export { + _definePage as definePage, + _HasDataLoaderMeta as HasDataLoaderMeta, + _setupDataFetchingGuard as setupDataFetchingGuard, + _stopDataFetchingScope as stopDataFetchingScope, + } from 'unplugin-vue-router/runtime' +} + +declare module 'vue-router' { + import type { RouteNamedMap } from 'vue-router/auto/routes' + + export interface TypesConfig { + beforeRouteUpdate: NavigationGuard + beforeRouteLeave: NavigationGuard + + $route: RouteLocationNormalizedLoadedTypedList[keyof RouteNamedMap] + $router: _RouterTyped + + RouterLink: RouterLinkTyped + } +} diff --git a/examples/vue3/uno.config.ts b/examples/vue3/uno.config.ts new file mode 100644 index 000000000..b17bf0a6b --- /dev/null +++ b/examples/vue3/uno.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'unocss' + +export default defineConfig({ + rules: [ + ['m-1', { margin: '1px' }], + ], +}) diff --git a/js-plugins/dts/package.json b/js-plugins/dts/package.json index a92aa28c0..e5f9f6ef9 100644 --- a/js-plugins/dts/package.json +++ b/js-plugins/dts/package.json @@ -32,8 +32,6 @@ "typescript": "^5.4.5" }, "devDependencies": { - "@farmfe/cli": "workspace:*", - "@farmfe/core": "workspace:*", "@types/fs-extra": "^11.0.1" }, "files": [ diff --git a/js-plugins/electron/package.json b/js-plugins/electron/package.json index c8b0889b1..b5206f5d0 100644 --- a/js-plugins/electron/package.json +++ b/js-plugins/electron/package.json @@ -39,8 +39,6 @@ "keywords": [], "license": "MIT", "devDependencies": { - "@farmfe/cli": "workspace:*", - "@farmfe/core": "workspace:*", "@farmfe/js-plugin-dts": "workspace:*", "cross-env": "^7.0.3", "electron": "^30.0.7" diff --git a/js-plugins/electron/src/index.ts b/js-plugins/electron/src/index.ts index 84d5c48d3..c5574b897 100644 --- a/js-plugins/electron/src/index.ts +++ b/js-plugins/electron/src/index.ts @@ -3,7 +3,7 @@ import type { AddressInfo } from 'node:net'; import path from 'node:path'; // TODO: submit a PR to farm(export default farm) import { - type FarmCLIOptions, + type FarmCliOptions, type JsPlugin, type Server, type UserConfig, @@ -46,10 +46,10 @@ export default function farmElectronPlugin( // config.compilation.assets.publicDir ??= '' return config; }, - configureDevServer(server) { + configureServer(server) { isDev = true; - server.server?.once('listening', () => { + server.httpServer?.once('listening', () => { // Used in electron/main.ts for during dev process.env.FARM_DEV_SERVER_URL = resolveServerUrl(server); @@ -158,12 +158,12 @@ function resolveFarmConfig( }); } - // TODO: submit a PR to farm(Omit & UserConfig) - return opts.farm as FarmCLIOptions; + // TODO: submit a PR to farm(Omit & UserConfig) + return opts.farm as FarmCliOptions; } function resolveServerUrl(server: Server) { - const addressInfo = server.server?.address(); + const addressInfo = server.httpServer?.address(); const isAddressInfo = (x: any): x is AddressInfo => x?.address; if (isAddressInfo(addressInfo)) { diff --git a/js-plugins/less/CHANGELOG.md b/js-plugins/less/CHANGELOG.md index d7833e36a..25ab8eb8b 100644 --- a/js-plugins/less/CHANGELOG.md +++ b/js-plugins/less/CHANGELOG.md @@ -1,5 +1,59 @@ # @farmfe/js-plugin-less +## 2.0.0-nightly-20241024090954 + +### Patch Changes + +- Updated dependencies [f460eb1] + - @farmfe/core@2.0.0-nightly-20241024090954 + +## 2.0.0-nightly-20241024075304 + +### Patch Changes + +- @farmfe/core@2.0.0-nightly-20241024075304 + +## 2.0.0-nightly-20241023101523 + +### Patch Changes + +- Updated dependencies [d7c5ffb] + - @farmfe/core@2.0.0-nightly-20241023101523 + +## 2.0.0-nightly-20241023020505 + +### Patch Changes + +- Updated dependencies [3651244] + - @farmfe/core@2.0.0-nightly-20241023020505 + +## 2.0.0-nightly-20241022143924 + +### Patch Changes + +- Updated dependencies [83838bd] + - @farmfe/core@2.0.0-nightly-20241022143924 + +## 2.0.0-nightly-20241022124925 + +### Patch Changes + +- @farmfe/core@2.0.0-nightly-20241022124925 + +## 2.0.0-nightly-20241022041556 + +### Patch Changes + +- Updated dependencies [24347c9] + - @farmfe/core@2.0.0-nightly-20241022041556 + +## 2.0.0-nightly-20241022014521 + +### Patch Changes + +- Updated dependencies [a82a5b2] + - @farmfe/core@2.0.0-nightly-20241022014521 + ## 1.9.0 ### Patch Changes diff --git a/js-plugins/less/package.json b/js-plugins/less/package.json index 74a586c40..4614da7c1 100644 --- a/js-plugins/less/package.json +++ b/js-plugins/less/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/js-plugin-less", - "version": "1.9.0", + "version": "2.0.0-nightly-20241024090954", "description": "support less compile for farm.", "main": "./build/cjs/index.cjs", "types": "./build/cjs/index.d.ts", @@ -40,13 +40,13 @@ "license": "MIT", "devDependencies": { "@farmfe/cli": "workspace:*", - "@farmfe/core": "workspace:^1.3.17", + "@farmfe/core": "workspace:*", "@farmfe/js-plugin-dts": "workspace:^", "@types/less": "^3.0.3", "less": "^4.1.3" }, "peerDependencies": { - "@farmfe/core": "workspace:^1.3.17", + "@farmfe/core": "workspace:*", "less": "^3.5.0 || ^4.0.0" } } diff --git a/js-plugins/postcss/CHANGELOG.md b/js-plugins/postcss/CHANGELOG.md index d3eb199a1..ba9e5dfdf 100644 --- a/js-plugins/postcss/CHANGELOG.md +++ b/js-plugins/postcss/CHANGELOG.md @@ -1,5 +1,59 @@ # @farmfe/js-plugin-postcss +## 2.0.0-nightly-20241024090954 + +### Patch Changes + +- Updated dependencies [f460eb1] + - @farmfe/core@2.0.0-nightly-20241024090954 + +## 2.0.0-nightly-20241024075304 + +### Patch Changes + +- @farmfe/core@2.0.0-nightly-20241024075304 + +## 2.0.0-nightly-20241023101523 + +### Patch Changes + +- Updated dependencies [d7c5ffb] + - @farmfe/core@2.0.0-nightly-20241023101523 + +## 2.0.0-nightly-20241023020505 + +### Patch Changes + +- Updated dependencies [3651244] + - @farmfe/core@2.0.0-nightly-20241023020505 + +## 2.0.0-nightly-20241022143924 + +### Patch Changes + +- Updated dependencies [83838bd] + - @farmfe/core@2.0.0-nightly-20241022143924 + +## 2.0.0-nightly-20241022124925 + +### Patch Changes + +- @farmfe/core@2.0.0-nightly-20241022124925 + +## 2.0.0-nightly-20241022041556 + +### Patch Changes + +- Updated dependencies [24347c9] + - @farmfe/core@2.0.0-nightly-20241022041556 + +## 2.0.0-nightly-20241022014521 + +### Patch Changes + +- Updated dependencies [a82a5b2] + - @farmfe/core@2.0.0-nightly-20241022014521 + ## 1.8.1 ### Patch Changes diff --git a/js-plugins/postcss/package.json b/js-plugins/postcss/package.json index 2e42395e6..06a82bed0 100644 --- a/js-plugins/postcss/package.json +++ b/js-plugins/postcss/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/js-plugin-postcss", - "version": "1.8.1", + "version": "2.0.0-nightly-20241024090954", "description": "support postcss for farm.", "main": "./build/cjs/index.cjs", "types": "./build/cjs/index.d.ts", @@ -40,7 +40,7 @@ "license": "MIT", "devDependencies": { "@farmfe/cli": "workspace:*", - "@farmfe/core": "workspace:^1.3.25", + "@farmfe/core": "workspace:*", "@farmfe/js-plugin-dts": "workspace:*", "@types/postcss-import": "^14.0.3", "@types/postcss-url": "^10.0.4", @@ -51,7 +51,7 @@ "postcss-url": "^10.1.3" }, "peerDependencies": { - "@farmfe/core": "workspace:^1.3.25", + "@farmfe/core": "workspace:*", "postcss": ">=8.0.0" } } diff --git a/js-plugins/sass/CHANGELOG.md b/js-plugins/sass/CHANGELOG.md index baa7ce3b7..80e5b5a23 100644 --- a/js-plugins/sass/CHANGELOG.md +++ b/js-plugins/sass/CHANGELOG.md @@ -1,5 +1,59 @@ # @farmfe/js-plugin-sass +## 3.0.0-nightly-20241024090954 + +### Patch Changes + +- Updated dependencies [f460eb1] + - @farmfe/core@2.0.0-nightly-20241024090954 + +## 3.0.0-nightly-20241024075304 + +### Patch Changes + +- @farmfe/core@2.0.0-nightly-20241024075304 + +## 3.0.0-nightly-20241023101523 + +### Patch Changes + +- Updated dependencies [d7c5ffb] + - @farmfe/core@2.0.0-nightly-20241023101523 + +## 3.0.0-nightly-20241023020505 + +### Patch Changes + +- Updated dependencies [3651244] + - @farmfe/core@2.0.0-nightly-20241023020505 + +## 3.0.0-nightly-20241022143924 + +### Patch Changes + +- Updated dependencies [83838bd] + - @farmfe/core@2.0.0-nightly-20241022143924 + +## 3.0.0-nightly-20241022124925 + +### Patch Changes + +- @farmfe/core@2.0.0-nightly-20241022124925 + +## 3.0.0-nightly-20241022041556 + +### Patch Changes + +- Updated dependencies [24347c9] + - @farmfe/core@2.0.0-nightly-20241022041556 + +## 3.0.0-nightly-20241022014521 + +### Patch Changes + +- Updated dependencies [a82a5b2] + - @farmfe/core@2.0.0-nightly-20241022014521 + ## 2.9.0 ### Patch Changes diff --git a/js-plugins/sass/package.json b/js-plugins/sass/package.json index 66ed02183..114d106ce 100644 --- a/js-plugins/sass/package.json +++ b/js-plugins/sass/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/js-plugin-sass", - "version": "2.9.0", + "version": "3.0.0-nightly-20241024090954", "description": "support scss compile for farm.", "main": "./build/cjs/index.cjs", "types": "./build/cjs/index.d.ts", @@ -46,13 +46,13 @@ "license": "MIT", "devDependencies": { "@farmfe/cli": "workspace:*", - "@farmfe/core": "workspace:^1.3.17", + "@farmfe/core": "workspace:*", "@farmfe/js-plugin-dts": "workspace:*", "sass": "^1.74.1", "sass-embedded": "^1.74.1" }, "peerDependencies": { - "@farmfe/core": "workspace:^1.3.17", + "@farmfe/core": "workspace:*", "sass": "^1.3.0", "sass-embedded": "*" } diff --git a/js-plugins/solid/CHANGELOG.md b/js-plugins/solid/CHANGELOG.md index 82b84b708..38208467b 100644 --- a/js-plugins/solid/CHANGELOG.md +++ b/js-plugins/solid/CHANGELOG.md @@ -1,5 +1,59 @@ # @farmfe/js-plugin-solid +## 3.0.0-nightly-20241024090954 + +### Patch Changes + +- Updated dependencies [f460eb1] + - @farmfe/core@2.0.0-nightly-20241024090954 + +## 3.0.0-nightly-20241024075304 + +### Patch Changes + +- @farmfe/core@2.0.0-nightly-20241024075304 + +## 3.0.0-nightly-20241023101523 + +### Patch Changes + +- Updated dependencies [d7c5ffb] + - @farmfe/core@2.0.0-nightly-20241023101523 + +## 3.0.0-nightly-20241023020505 + +### Patch Changes + +- Updated dependencies [3651244] + - @farmfe/core@2.0.0-nightly-20241023020505 + +## 3.0.0-nightly-20241022143924 + +### Patch Changes + +- Updated dependencies [83838bd] + - @farmfe/core@2.0.0-nightly-20241022143924 + +## 3.0.0-nightly-20241022124925 + +### Patch Changes + +- @farmfe/core@2.0.0-nightly-20241022124925 + +## 3.0.0-nightly-20241022041556 + +### Patch Changes + +- Updated dependencies [24347c9] + - @farmfe/core@2.0.0-nightly-20241022041556 + +## 3.0.0-nightly-20241022014521 + +### Patch Changes + +- Updated dependencies [a82a5b2] + - @farmfe/core@2.0.0-nightly-20241022014521 + ## 2.8.0 ### Patch Changes diff --git a/js-plugins/solid/package.json b/js-plugins/solid/package.json index 75eb0cd43..30eedb0cf 100644 --- a/js-plugins/solid/package.json +++ b/js-plugins/solid/package.json @@ -1,7 +1,8 @@ { "name": "@farmfe/js-plugin-solid", - "version": "2.8.0", + "version": "3.0.0-nightly-20241024090954", "description": "SolidJS support for Farm", + "private": true, "author": { "name": "J4ck W4n9", "email": "1163585385@qq.com" @@ -34,14 +35,12 @@ "solid-refresh": "^0.5.3" }, "devDependencies": { - "@farmfe/cli": "workspace:*", - "@farmfe/core": "workspace:*", "@farmfe/js-plugin-dts": "workspace:*", "@types/babel__core": "^7.20.1", "solid-js": "^1.7.8" }, "peerDependencies": { - "@farmfe/core": "workspace:^1.3.29" + "@farmfe/core": "workspace:*" }, "files": [ "build" diff --git a/js-plugins/svgr/CHANGELOG.md b/js-plugins/svgr/CHANGELOG.md index 49c4e9af1..93ee662e1 100644 --- a/js-plugins/svgr/CHANGELOG.md +++ b/js-plugins/svgr/CHANGELOG.md @@ -1,5 +1,59 @@ # @farmfe/js-plugin-svgr +## 2.0.0-nightly-20241024090954 + +### Patch Changes + +- Updated dependencies [f460eb1] + - @farmfe/core@2.0.0-nightly-20241024090954 + +## 2.0.0-nightly-20241024075304 + +### Patch Changes + +- @farmfe/core@2.0.0-nightly-20241024075304 + +## 2.0.0-nightly-20241023101523 + +### Patch Changes + +- Updated dependencies [d7c5ffb] + - @farmfe/core@2.0.0-nightly-20241023101523 + +## 2.0.0-nightly-20241023020505 + +### Patch Changes + +- Updated dependencies [3651244] + - @farmfe/core@2.0.0-nightly-20241023020505 + +## 2.0.0-nightly-20241022143924 + +### Patch Changes + +- Updated dependencies [83838bd] + - @farmfe/core@2.0.0-nightly-20241022143924 + +## 2.0.0-nightly-20241022124925 + +### Patch Changes + +- @farmfe/core@2.0.0-nightly-20241022124925 + +## 2.0.0-nightly-20241022041556 + +### Patch Changes + +- Updated dependencies [24347c9] + - @farmfe/core@2.0.0-nightly-20241022041556 + +## 2.0.0-nightly-20241022014521 + +### Patch Changes + +- Updated dependencies [a82a5b2] + - @farmfe/core@2.0.0-nightly-20241022014521 + ## 1.6.0 ### Patch Changes diff --git a/js-plugins/svgr/package.json b/js-plugins/svgr/package.json index 91b56d34a..f78af62d0 100644 --- a/js-plugins/svgr/package.json +++ b/js-plugins/svgr/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/js-plugin-svgr", - "version": "1.6.0", + "version": "2.0.0-nightly-20241024090954", "description": "support svgr compile for farm.", "main": "./build/cjs/index.cjs", "types": "./build/cjs/index.d.ts", @@ -40,7 +40,7 @@ "license": "MIT", "devDependencies": { "@farmfe/cli": "workspace:*", - "@farmfe/core": "workspace:^1.3.17", + "@farmfe/core": "workspace:*", "@farmfe/js-plugin-dts": "workspace:^" }, "dependencies": { @@ -48,6 +48,6 @@ "@svgr/plugin-jsx": "^8.1.0" }, "peerDependencies": { - "@farmfe/core": "workspace:^1.3.17" + "@farmfe/core": "workspace:*" } } diff --git a/js-plugins/visualizer/package.json b/js-plugins/visualizer/package.json index d5dd8aa6a..65899ae01 100644 --- a/js-plugins/visualizer/package.json +++ b/js-plugins/visualizer/package.json @@ -31,8 +31,6 @@ "ws": "^8.14.2" }, "devDependencies": { - "@farmfe/cli": "workspace:*", - "@farmfe/core": "workspace:*", "@farmfe/js-plugin-dts": "workspace:*", "@farmfe/js-plugin-less": "workspace:*", "@farmfe/js-plugin-postcss": "workspace:*", diff --git a/js-plugins/visualizer/src/dev.ts b/js-plugins/visualizer/src/dev.ts index c0753d1a3..352eb2a3e 100644 --- a/js-plugins/visualizer/src/dev.ts +++ b/js-plugins/visualizer/src/dev.ts @@ -17,7 +17,7 @@ export default function farmRecorderPlugin(): JsPlugin { config.compilation = { ...config.compilation, record: true }; return config; }, - configureDevServer(server) { + configureServer(server) { const middlewares = [records] as DevServerMiddleware[]; server.applyMiddlewares(middlewares); } diff --git a/js-plugins/vue/CHANGELOG.md b/js-plugins/vue/CHANGELOG.md index 2ef3915d8..a64cdb739 100644 --- a/js-plugins/vue/CHANGELOG.md +++ b/js-plugins/vue/CHANGELOG.md @@ -1,5 +1,59 @@ # @farmfe/js-plugin-vue +## 4.0.0-nightly-20241024090954 + +### Patch Changes + +- Updated dependencies [f460eb1] + - @farmfe/core@2.0.0-nightly-20241024090954 + +## 4.0.0-nightly-20241024075304 + +### Patch Changes + +- @farmfe/core@2.0.0-nightly-20241024075304 + +## 4.0.0-nightly-20241023101523 + +### Patch Changes + +- Updated dependencies [d7c5ffb] + - @farmfe/core@2.0.0-nightly-20241023101523 + +## 4.0.0-nightly-20241023020505 + +### Patch Changes + +- Updated dependencies [3651244] + - @farmfe/core@2.0.0-nightly-20241023020505 + +## 4.0.0-nightly-20241022143924 + +### Patch Changes + +- Updated dependencies [83838bd] + - @farmfe/core@2.0.0-nightly-20241022143924 + +## 4.0.0-nightly-20241022124925 + +### Patch Changes + +- @farmfe/core@2.0.0-nightly-20241022124925 + +## 4.0.0-nightly-20241022041556 + +### Patch Changes + +- Updated dependencies [24347c9] + - @farmfe/core@2.0.0-nightly-20241022041556 + +## 4.0.0-nightly-20241022014521 + +### Patch Changes + +- Updated dependencies [a82a5b2] + - @farmfe/core@2.0.0-nightly-20241022014521 + ## 3.9.0 ### Patch Changes diff --git a/js-plugins/vue/package.json b/js-plugins/vue/package.json index 2159aec53..3c32ef8e5 100644 --- a/js-plugins/vue/package.json +++ b/js-plugins/vue/package.json @@ -1,6 +1,7 @@ { "name": "@farmfe/js-plugin-vue", - "version": "3.9.0", + "version": "4.0.0-nightly-20241024090954", + "private": true, "description": "support vue sfc for farm.", "main": "./build/index.cjs", "module": "./dist/farm-vue-plugin.js", @@ -37,8 +38,6 @@ "author": "ysy945", "license": "MIT", "devDependencies": { - "@farmfe/cli": "workspace:^", - "@farmfe/core": "workspace:^", "@farmfe/js-plugin-dts": "workspace:^", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", @@ -52,7 +51,7 @@ "source-map": "^0.7.4" }, "peerDependencies": { - "@farmfe/core": "workspace:^1.3.29", + "@farmfe/core": "workspace:*", "less": "*", "sass": "*", "stylus": "*" diff --git a/package.json b/package.json index c67514308..5418bb9e8 100644 --- a/package.json +++ b/package.json @@ -9,48 +9,54 @@ "scripts": { "preinstall": "npx only-allow pnpm", "bootstrap": "pnpm install && node scripts/clean.mjs && node scripts/bootstrap.mjs && pnpm start", - "test": "cross-env NODE_OPTIONS=--trace-exit vitest run", "start:rs": "cargo watch -w crates -w rust-plugins -s 'scripts/watch.sh'", "start": "pnpm --filter @farmfe/cli start", + "build:cli": "pnpm --filter @farmfe/cli build", + "build:core": "pnpm --filter @farmfe/core build", + "doc": "pnpm --filter farm-docs dev", "release": "node scripts/release.mjs", + "release:nightly": "node scripts/release-nightly.mjs", "check": "biome check . --diagnostic-level=warn --apply", - "clean": "node scripts/clean.mjs && rimraf node_modules **/*/node_modules", "bump": "node scripts/bump.mjs", + "bump:nightly": "node scripts/bump-nightly.mjs", "bump:create-farm": "node scripts/bump-create-farm-version.mjs", - "test:rs:update": "cross-env FARM_UPDATE_SNAPSHOTS=1 cargo test -p farmfe_compiler", + "test:rs:update": "cross-env FARM_UPDATE_SNAPSHOTS=1 INSTA_UPDATE=always cargo test -p farmfe_compiler", "ready": "node scripts/ready.mjs", "test-e2e": "vitest run -c vitest.config.e2e.ts", - "prepare": "husky" + "prepare": "husky", + "clean": "node scripts/clean.mjs && rimraf node_modules **/*/node_modules", + "test": "cross-env NODE_OPTIONS=--trace-exit vitest run" }, "devDependencies": { - "@farmfe/core": "workspace:*", - "@farmfe/cli": "workspace:*", "@biomejs/biome": "1.8.3", - "@changesets/cli": "^2.26.0", + "@changesets/cli": "2.27.9", "@codspeed/vitest-plugin": "^3.1.1", "@commitlint/cli": "^17.0.3", "@commitlint/config-conventional": "^17.0.3", - "@types/node": "20.14.12", + "@farmfe/cli": "workspace:*", + "@farmfe/core": "workspace:*", + "@types/node": "22.5.0", "@vitest/coverage-v8": "2.0.4", "cross-env": "^7.0.3", - "cspell": "^6.2.2", + "cspell": "8.14.2", "execa": "^7.1.1", "husky": "^9.0.11", "lint-staged": "^13.0.3", "nanospinner": "^1.1.0", + "node-emoji": "^2.1.3", "playwright-chromium": "^1.42.1", - "rimraf": "^3.0.2", + "rimraf": "6.0.1", "rollup": "^3.29.4", - "typescript": "^4.9.4", + "typescript": "5.6.3", "vite": "^5.2.6", "vitest": "2.0.4" }, "lint-staged": { "packages/**/*.ts": [ - "npx biome check --no-errors-on-unmatched --files-ignore-unknown=true --apply" + "npx biome check --no-errors-on-unmatched --files-ignore-unknown=true --write" ], "js-plugins/**/*.ts": [ - "npx biome check --no-errors-on-unmatched --files-ignore-unknown=true --apply" + "npx biome check --no-errors-on-unmatched --files-ignore-unknown=true --write" ] }, "pnpm": { diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index d4a5d93e4..1ce377e48 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,39 @@ # @farmfe/cli +## 2.0.0-nightly-20241022101407 + +### Major Changes + +- 46883f3: bump nightly version + +## 2.0.0-nightly-20241022090550 + +### Major Changes + +- e7920ed: remove peerdep + +## 2.0.0-nightly-20241022041556 + +### Major Changes + +- 6667953: update nightly cli + +### Patch Changes + +- Updated dependencies [24347c9] + - @farmfe/core@2.0.0-nightly-20241022041556 + +## 2.0.0-nightly-20241022014521 + +### Major Changes + +- a82a5b2: bump nightly version + +### Patch Changes + +- Updated dependencies [a82a5b2] + - @farmfe/core@2.0.0-nightly-20241022014521 + ## 1.0.4 ### Patch Changes diff --git a/packages/cli/README.md b/packages/cli/README.md index 7c6c7bcb7..16546f99f 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -8,20 +8,26 @@ pnpm add @farmfe/cli -D ``` -start your farm project: +start your farm project in development mode: ```sh -farm start +farm dev ``` -build: +build your farm project in production mode: ```sh farm build ``` -preview: +preview your farm project in production mode: ```sh farm preview ``` + +clean your farm persistent cache: + +```sh +farm clean +``` diff --git a/packages/cli/bin/farm.mjs b/packages/cli/bin/farm.mjs index 0277db328..4f0099a18 100755 --- a/packages/cli/bin/farm.mjs +++ b/packages/cli/bin/farm.mjs @@ -1,3 +1,6 @@ #!/usr/bin/env node +if (process.argv.includes('--debug')) { + process.env.DEBUG = 'farm:*'; +} -import '../dist/index.js'; +import('../dist/index.js') diff --git a/packages/cli/package.json b/packages/cli/package.json index 0ca751807..566468a43 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/cli", - "version": "1.0.4", + "version": "2.0.0-nightly-20241022101407", "description": "CLI of Farm", "type": "module", "author": { @@ -28,28 +28,17 @@ }, "files": [ "dist", - "bin", - "templates" + "bin" ], "scripts": { "start": "rimraf dist && tsc -b -w", "build": "tsc -b", - "type-check": "tsc --noEmit", "prepublishOnly": "npm run build" }, "engines": { "node": ">= 16" }, "dependencies": { - "cac": "^6.7.14", - "cross-spawn": "^7.0.3", - "inquirer": "9.2.12", - "walkdir": "^0.4.1" - }, - "devDependencies": { - "@farmfe/cli": "workspace:*", - "@farmfe/core": "workspace:*", - "@types/cross-spawn": "^6.0.2", - "@types/inquirer": "^9.0.3" + "cac": "^6.7.14" } } diff --git a/packages/cli/src/config.ts b/packages/cli/src/config.ts deleted file mode 100644 index 467019af8..000000000 --- a/packages/cli/src/config.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { FarmCLIOptions, UserConfig } from '@farmfe/core'; -import { FarmCLIBuildOptions, GlobalFarmCLIOptions } from './types.js'; - -export function getOptionFromBuildOption( - options: FarmCLIBuildOptions & GlobalFarmCLIOptions -): FarmCLIOptions & UserConfig { - const { - input, - outDir, - target, - format, - watch, - minify, - sourcemap, - treeShaking, - mode - } = options; - - const output: UserConfig['compilation']['output'] = { - ...(outDir && { path: outDir }), - ...(target && { targetEnv: target }), - ...(format && { format }) - }; - - const compilation: UserConfig['compilation'] = { - input: { ...(input && { index: input }) }, - output, - ...(watch && { watch }), - ...(minify && { minify }), - ...(sourcemap && { sourcemap }), - ...(treeShaking && { treeShaking }) - }; - - const defaultOptions: FarmCLIOptions & UserConfig = { - compilation, - ...(mode && { mode }) - }; - - return defaultOptions; -} diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index e8409c5c3..0858976c8 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -1,37 +1,47 @@ -import { readFileSync } from 'node:fs'; - +import { VERSION as CORE_VERSION } from '@farmfe/core'; import { cac } from 'cac'; -import { getOptionFromBuildOption } from './config.js'; + import { + VERSION, handleAsyncOperationErrors, - preventExperimentalWarning, resolveCliConfig, resolveCommandOptions, resolveCore } from './utils.js'; import type { - FarmCLIBuildOptions, - FarmCLIPreviewOptions, - FarmCLIServerOptions, - GlobalFarmCLIOptions, - ICleanOptions + CleanOptions, + CliBuildOptions, + CliPreviewOptions, + CliServerOptions, + GlobalCliOptions } from './types.js'; -const { version } = JSON.parse( - readFileSync(new URL('../package.json', import.meta.url)).toString() -); - const cli = cac('farm'); // common command cli - .option('-c, --config ', 'use specified config file') - .option('-m, --mode ', 'set env mode') - .option('--base ', 'public base path') - .option('--clearScreen', 'allow/disable clear screen when logging', { - default: true - }); + .option( + '-c, --config ', + '[string] use specified config file (default: farm.config.js / farm.config.ts / farm.config.mjs / farm.config.cjs / farm.config.mts / farm.config.cts)' + ) + .option( + '-m, --mode ', + '[string] set env mode, when use with development (default: /)' + ) + .option('--base ', '[string] public base path') + .option('-d, --debug [feat]', `[string | boolean] show debug logs`) + .option( + '-t, --timeUnit ', + '[string] time unit for time log (default: ms) optionals: ms, s' + ) + .option( + '--clearScreen', + '[boolean] allow/disable clear screen when logging (default: true)', + { + default: true + } + ); // dev command cli @@ -41,33 +51,56 @@ cli ) .alias('start') .alias('dev') - .option('-l, --lazy', 'lazyCompilation') - .option('--host ', 'specify host') - .option('--port ', 'specify port') - .option('--open', 'open browser on server start') - .option('--hmr', 'enable hot module replacement') - .option('--cors', 'enable cors') - .option('--strictPort', 'specified port is already in use, exit with error') + .option('-l, --lazy', '[boolean] lazyCompilation (default: true)') + .option('--host ', '[string] specify host') + .option('--port ', '[string] specify port') + .option('--open', '[boolean] open browser on server start') + .option('--hmr', '[boolean] enable hot module replacement') + .option('--cors', '[boolean] enable cors') + .option( + '--strictPort', + '[boolean] specified port is already in use, exit with error (default: true)' + ) + .option('--target ', '[string] transpile targetEnv node, browser') + .option('--format ', '[string] transpile format esm, commonjs') + .option('--sourcemap', '[boolean] output source maps for build') + .option( + '--treeShaking', + '[boolean] Eliminate useless code without side effects' + ) + .option('--minify', '[boolean] code compression at build time') .action( async ( - rootPath: string, - options: FarmCLIServerOptions & GlobalFarmCLIOptions + root: string, + options: CliServerOptions & CliBuildOptions & GlobalCliOptions ) => { - const { root, configPath } = resolveCliConfig(rootPath, options); const resolveOptions = resolveCommandOptions(options); const defaultOptions = { root, - compilation: { - lazyCompilation: options.lazy - }, server: resolveOptions, clearScreen: options.clearScreen, - configPath, - mode: options.mode + configFile: options.config, + mode: options.mode, + timeUnit: options.timeUnit, + compilation: { + lazyCompilation: options.lazy, + output: { + path: options?.outDir, + targetEnv: options?.target, + format: options?.format + }, + input: { + index: options?.input + }, + sourcemap: options.sourcemap, + minify: options.minify, + treeShaking: options.treeShaking + } }; const { start } = await resolveCore(); + handleAsyncOperationErrors( start(defaultOptions), 'Failed to start server' @@ -78,83 +111,72 @@ cli // build command cli .command('build [root]', 'compile the project in production mode') - .option('-o, --outDir ', 'output directory') - .option('-i, --input ', 'input file path') - .option('-w, --watch', 'watch file change') - .option('--target ', 'transpile targetEnv node, browser') - .option('--format ', 'transpile format esm, commonjs') - .option('--sourcemap', 'output source maps for build') - .option('--treeShaking', 'Eliminate useless code without side effects') - .option('--minify', 'code compression at build time') - .action( - async ( - rootPath: string, - options: FarmCLIBuildOptions & GlobalFarmCLIOptions - ) => { - const { root, configPath } = resolveCliConfig(rootPath, options); - - const defaultOptions = { - root, - configPath, - ...getOptionFromBuildOption(options) - }; - - const { build } = await resolveCore(); - handleAsyncOperationErrors(build(defaultOptions), 'error during build'); - } - ); - -cli - .command('watch [root]', 'watch file change') - .option('-o, --outDir ', 'output directory') - .option('-i, --input ', 'input file path') - .option('--target ', 'transpile targetEnv node, browser') - .option('--format ', 'transpile format esm, commonjs') - .option('--sourcemap', 'output source maps for build') - .option('--treeShaking', 'Eliminate useless code without side effects') - .option('--minify', 'code compression at build time') - .action( - async ( - rootPath: string, - options: FarmCLIBuildOptions & GlobalFarmCLIOptions - ) => { - const { root, configPath } = resolveCliConfig(rootPath, options); - - const defaultOptions = { - root, - configPath, - ...getOptionFromBuildOption(options) - }; - - const { watch } = await resolveCore(); - handleAsyncOperationErrors( - watch(defaultOptions), - 'error during watch project' - ); - } - ); + .option('-o, --outDir ', '[string] output directory') + .option('-i, --input ', '[string] input file path') + .option('-w, --watch', '[boolean] watch file change and rebuild') + .option('--target ', '[string] transpile targetEnv node, browser') + .option('--format ', '[string] transpile format esm, commonjs') + .option('--sourcemap', '[boolean] output source maps for build') + .option( + '--treeShaking', + '[boolean] Eliminate useless code without side effects' + ) + .option('--minify', '[boolean] code compression at build time') + .action(async (root: string, options: CliBuildOptions & GlobalCliOptions) => { + const defaultOptions = { + root, + configFile: options.config, + mode: options.mode, + watch: options.watch, + timeUnit: options.timeUnit, + compilation: { + output: { + path: options?.outDir, + targetEnv: options?.target, + format: options?.format + }, + input: { + index: options?.input + }, + sourcemap: options.sourcemap, + minify: options.minify, + treeShaking: options.treeShaking + } + }; + const { build } = await resolveCore(); + + handleAsyncOperationErrors(build(defaultOptions), 'error during build'); + }); cli .command('preview [root]', 'compile the project in watch mode') - .option('--port ', 'specify port') - .option('--open', 'open browser on server preview start') + .option('--host [host]', `[string] specify hostname`) + .option('--port ', `[number] specify port`) + .option('--open', '[boolean] open browser on server preview start') + .option('--outDir ', `[string] output directory (default: dist)`) + .option('--strictPort', `[boolean] exit if specified port is already in use`) .action( - async ( - rootPath: string, - options: FarmCLIPreviewOptions & GlobalFarmCLIOptions - ) => { - const { root, configPath } = resolveCliConfig(rootPath, options); - - const resolveOptions = resolveCommandOptions(options); + async (root: string, options: CliPreviewOptions & GlobalCliOptions) => { const defaultOptions = { root, mode: options.mode, - server: resolveOptions, - configPath, - port: options.port + preview: { + port: options.port, + strictPort: options?.strictPort, + host: options.host, + open: options.open + }, + configFile: options.config, + port: options.port, + compilation: { + output: { + path: options.outDir + } + } }; const { preview } = await resolveCore(); + handleAsyncOperationErrors( preview(defaultOptions), 'Failed to start preview server' @@ -168,37 +190,20 @@ cli '--recursive', 'Recursively search for node_modules directories and clean them' ) - .action(async (rootPath: string, options: ICleanOptions) => { + .action(async (rootPath: string, options: CleanOptions) => { const { root } = resolveCliConfig(rootPath, options); - const { clean } = await resolveCore(); - try { - await clean(root, options?.recursive); - } catch (e) { - const { Logger } = await import('@farmfe/core'); - const logger = new Logger(); - logger.error(`Failed to clean cache: \n ${e.stack}`); - process.exit(1); - } + const { clean } = await resolveCore(); + handleAsyncOperationErrors( + clean(root, options?.recursive), + 'Failed to clean cache' + ); }); -// Listening for unknown command -cli.on('command:*', async () => { - const { Logger } = await import('@farmfe/core'); - const logger = new Logger(); - logger.error( - 'Unknown command place Run "farm --help" to see available commands' - ); -}); - -// warning::: use mdn browser compatibility data with experimental warning in terminal so prevent experimental warning -// we don't use it in `@farmfe/core` package because -// we need to prevent it in cli package but we don't prevent it in core package -// We only keep the original code environment. -preventExperimentalWarning(); - cli.help(); -cli.version(version); +cli.version( + `@farmfe/cli ${VERSION ?? 'unknown'} @farmfe/core ${CORE_VERSION ?? 'unknown'}` +); cli.parse(); diff --git a/packages/cli/src/types.ts b/packages/cli/src/types.ts index afdd44364..4a97ebde2 100644 --- a/packages/cli/src/types.ts +++ b/packages/cli/src/types.ts @@ -1,36 +1,35 @@ -export interface GlobalFarmCLIOptions { +export interface GlobalCliOptions { '--'?: string[]; c?: boolean | string; config?: string; - configPath?: string; - m?: string; base?: string; - mode?: 'development' | 'production'; - w?: boolean; - watch?: boolean; - watchPath?: string; - port?: number; - lazy?: boolean; - l?: boolean; + m?: string; + mode?: 'development' | 'production' | string; clearScreen?: boolean; + timeUnit?: 'ms' | 's'; } -export interface ICleanOptions { - path?: string; +export interface CleanOptions { recursive?: boolean; } -export interface FarmCLIServerOptions { - port?: string; +export interface CliServerOptions { + port?: number; open?: boolean; - https?: boolean; hmr?: boolean; + cors?: boolean; strictPort?: boolean; } -export interface FarmCLIBuildOptions { - input?: string; +export interface CliBuildOptions { + o?: string; outDir?: string; + i?: string; + input?: string; + w?: boolean; + watch?: boolean; + l?: boolean; + lazy?: boolean; sourcemap?: boolean; minify?: boolean; treeShaking?: boolean; @@ -44,10 +43,16 @@ export interface FarmCLIBuildOptions { | 'browser-legacy' | 'browser-es2015' | 'browser-es2017' - | 'browser-esnext'; + | 'browser-esnext' + | 'library' + | 'library-browser' + | 'library-node'; } -export interface FarmCLIPreviewOptions { - open?: boolean; +export interface CliPreviewOptions { + host?: string | boolean; port?: number; + open?: boolean | string; + outDir?: string; + strictPort?: boolean; } diff --git a/packages/cli/src/utils.ts b/packages/cli/src/utils.ts index 18717f8cb..740180280 100644 --- a/packages/cli/src/utils.ts +++ b/packages/cli/src/utils.ts @@ -1,30 +1,30 @@ -import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'; -import path from 'node:path'; -import readline from 'node:readline'; -import { fileURLToPath } from 'node:url'; -import type { build, clean, preview, start, watch } from '@farmfe/core'; +import { readFileSync } from 'node:fs'; +import { isAbsolute, resolve } from 'node:path'; import { Logger } from '@farmfe/core'; -import spawn from 'cross-spawn'; -import walkdir from 'walkdir'; -import type { GlobalFarmCLIOptions, ICleanOptions } from './types.js'; +import type { build, clean, preview, start } from '@farmfe/core'; +import type { + CleanOptions, + CliBuildOptions, + CliServerOptions, + GlobalCliOptions +} from './types.js'; const logger = new Logger(); -interface installProps { - cwd: string; - package: string; -} - -export const TEMPLATES_DIR = path.join( - path.dirname(fileURLToPath(import.meta.url)), - '..', - 'templates' -); +/** + * + * @returns {Promise<{ start: typeof start, build: typeof build, watch: typeof watch, preview: typeof preview, clean: typeof clean }>} + * A promise that resolves to an object containing the core functionalities: + * - `start`: Compile the project in dev mode and serve it with farm dev server'. + * - `build`: compile the project in production mode'. + * - `watch`: watch file change'. + * - `preview`: compile the project in watch mode'. + * - `clean`: Clean up the cache built incrementally'. + */ export async function resolveCore(): Promise<{ start: typeof start; build: typeof build; - watch: typeof watch; preview: typeof preview; clean: typeof clean; }> { @@ -32,75 +32,12 @@ export async function resolveCore(): Promise<{ return import('@farmfe/core'); } catch (err) { logger.error( - `Cannot find @farmfe/core module, Did you successfully install: \n${err.stack},` - ); - process.exit(1); - } -} - -export function copyFiles( - source: string, - dest: string, - callback?: (content: string) => string -): void { - walkdir(source, { sync: true }, (p, stat) => { - if (stat.isFile()) { - const content = readFileSync(p).toString(); - const newContent = callback?.(content) ?? content; - - const relativePath = path.relative(source, p); - const destPath = path.join(dest, relativePath); - - if (!existsSync(path.dirname(destPath))) { - mkdirSync(path.dirname(destPath), { recursive: true }); - } - - writeFileSync(destPath, newContent); - } - }); - - if (!existsSync(path.join(dest, '.gitignore'))) { - writeFileSync( - path.join(dest, '.gitignore'), - ` -node_modules -*.farm` + `Cannot find @farmfe/core module, Did you successfully install: \n${err.stack},`, + { exit: true } ); } } -export async function install(options: installProps): Promise { - const cwd = options.cwd; - return new Promise((resolve, reject) => { - const command = options.package; - const args = ['install']; - - const child = spawn(command, args, { - cwd, - stdio: 'inherit' - }); - - child.once('close', (code: number) => { - if (code !== 0) { - reject({ - command: `${command} ${args.join(' ')}` - }); - return; - } - resolve(); - }); - child.once('error', reject); - }); -} -/** - * 用于规范化目标路径 - * @param {string |undefined} targetDir - * @returns - */ -export function formatTargetDir(targetDir: string | undefined) { - return targetDir?.trim()?.replace(/\/+$/g, ''); -} - /** * filter duplicate item in options */ @@ -111,19 +48,13 @@ export function filterDuplicateOptions(options: T) { } } } - /** - * clear command screen + * @param options The cli passes parameters + * @returns Remove parameters that are not required */ -export function clearScreen() { - const repeatCount = process.stdout.rows - 2; - const blank = repeatCount > 0 ? '\n'.repeat(repeatCount) : ''; - console.log(blank); - readline.cursorTo(process.stdout, 0, 0); - readline.clearScreenDown(process.stdout); -} - -export function cleanOptions(options: GlobalFarmCLIOptions) { +export function cleanOptions( + options: GlobalCliOptions & CliServerOptions & CliBuildOptions +) { const resolveOptions = { ...options }; delete resolveOptions['--']; @@ -140,18 +71,34 @@ export function cleanOptions(options: GlobalFarmCLIOptions) { return resolveOptions; } +/** + * + * @param options cli parameters + * @returns resolve command options + */ export function resolveCommandOptions( - options: GlobalFarmCLIOptions -): GlobalFarmCLIOptions { + options: GlobalCliOptions & CliServerOptions +): GlobalCliOptions & CliServerOptions { const resolveOptions = { ...options }; filterDuplicateOptions(resolveOptions); return cleanOptions(resolveOptions); } +/** + * + * @param root root path + * @param configPath config path + * @returns config path absolute path + */ export function getConfigPath(root: string, configPath: string) { - return path.resolve(root, configPath ?? ''); + return resolve(root, configPath ?? ''); } +/** + * + * @param asyncOperation The asynchronous operation to be executed. + * @param errorMessage The error message to log if the operation fails. + */ export async function handleAsyncOperationErrors( asyncOperation: Promise, errorMessage: string @@ -159,31 +106,32 @@ export async function handleAsyncOperationErrors( try { await asyncOperation; } catch (error) { - logger.error(`${errorMessage}:\n${error.stack}`); - process.exit(1); + logger.error(`${errorMessage}:\n${error.stack}`, { exit: true }); } } -// prevent node experimental warning -export function preventExperimentalWarning() { - const defaultEmit = process.emit; - process.emit = function (...args: any[]) { - if (args[1].name === 'ExperimentalWarning') { - return undefined; - } - return defaultEmit.call(this, ...args); - }; -} - +/** + * + * @param rootPath root path + * @returns absolute path + */ export function resolveRootPath(rootPath = '') { - return rootPath && path.isAbsolute(rootPath) + return rootPath && isAbsolute(rootPath) ? rootPath - : path.resolve(process.cwd(), rootPath); + : resolve(process.cwd(), rootPath); } +/** + * + * @param root root path + * @param options cli parameters + * @returns + * - root root path + * - configPath + */ export function resolveCliConfig( root: string, - options: GlobalFarmCLIOptions & ICleanOptions + options: GlobalCliOptions & CleanOptions ) { root = resolveRootPath(root); const configPath = getConfigPath(root, options.config); @@ -192,3 +140,9 @@ export function resolveCliConfig( configPath }; } + +const { version } = JSON.parse( + readFileSync(new URL('../package.json', import.meta.url)).toString() +); + +export const VERSION = version; diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index 47c0ed577..a2daa35cf 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -6,14 +6,9 @@ "declaration": false, "noUnusedLocals": false, "noUnusedParameters": false, - "module": "NodeNext" }, - "exclude": [ - "node_modules" - ], - "include": [ - "src/**/*" - ], + "exclude": ["node_modules"], + "include": ["src/**/*"], "references": [ { "path": "../core/tsconfig.build.json" diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index f7b48c38d..5e8a87508 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,59 @@ # @farmfe/core +## 2.0.0-nightly-20241024090954 + +### Major Changes + +- f460eb1: bump core version fix spa reload not 404 + +## 2.0.0-nightly-20241024075304 + +### Patch Changes + +- Updated dependencies [9a1b2b9] + - @farmfe/plugin-replace-dirname@1.0.0-nightly-20241024075304 + +## 2.0.0-nightly-20241023101523 + +### Major Changes + +- d7c5ffb: support node 16 + +## 2.0.0-nightly-20241023020505 + +### Patch Changes + +- 3651244: add assets mode for asset path generate +- Updated dependencies [cab79e8] + - @farmfe/runtime@1.0.0-nightly-20241023020505 + - @farmfe/runtime-plugin-hmr@4.0.0-nightly-20241023020505 + - @farmfe/runtime-plugin-import-meta@1.0.0-nightly-20241023020505 + +## 2.0.0-nightly-20241022143924 + +### Major Changes + +- 83838bd: remove lightCyan color utils + +## 2.0.0-nightly-20241022124925 + +### Patch Changes + +- Updated dependencies [6a1038c] + - @farmfe/utils@1.0.0-nightly-20241022124925 + +## 2.0.0-nightly-20241022041556 + +### Major Changes + +- 24347c9: update deps + +## 2.0.0-nightly-20241022014521 + +### Major Changes + +- a82a5b2: bump nightly version + ## 1.3.29 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index df733aae6..30d59ec0c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/core", - "version": "1.3.29", + "version": "2.0.0-nightly-20241024090954", "main": "dist/index.js", "types": "dist/index.d.ts", "type": "module", @@ -54,7 +54,8 @@ "hmr" ], "scripts": { - "artifacts": "napi artifacts", + "start": "tsc -w -p tsconfig.build.json", + "start:debug": "tsc -w -p tsconfig.build.json", "build:cjs": "node scripts/build-cjs.mjs", "build": "tsc -p tsconfig.build.json && npm run build:cjs", "build:rs": "npm run build:rs:debug -- --release", @@ -63,45 +64,51 @@ "build:rs:profile": "cross-env FARM_PROFILE=1 npm run build:rs -- --features profile", "prepublishOnly": "napi prepublish -t npm && FARM_PUBLISH=true npm run build:cjs", "clean": "rimraf dist tsconfig.build.tsbuildinfo", - "version": "napi version", - "start": "tsc -w -p tsconfig.build.json", + "napi:version": "napi version", + "artifacts": "napi artifacts", "type-check": "tsc -p tsconfig.build.json" }, "devDependencies": { "@napi-rs/cli": "^2.18.4", + "@types/compression": "^1.7.5", + "@types/connect": "^3.4.38", + "@types/cors": "^2.8.17", + "@types/debug": "^4.1.12", + "@types/etag": "^1.8.3", + "@types/figlet": "^1.5.5", "@types/fs-extra": "^11.0.1", - "@types/koa": "^2.13.5", - "@types/koa-compress": "^4.0.3", - "@types/koa-static": "^4.0.2", - "@types/koa__cors": "^5.0.0", - "@types/ws": "^8.5.4" + "@types/http-proxy": "^1.17.14", + "@types/mime-types": "^2.1.2", + "@types/ws": "^8.5.8", + "react-refresh": "^0.14.0" }, "dependencies": { - "@farmfe/runtime": "workspace:0.12.7", - "@farmfe/runtime-plugin-hmr": "workspace:3.5.7", - "@farmfe/runtime-plugin-import-meta": "workspace:0.2.2", + "@farmfe/runtime": "workspace:1.0.0-nightly-20241023020505", + "@farmfe/runtime-plugin-hmr": "workspace:4.0.0-nightly-20241023020505", + "@farmfe/runtime-plugin-import-meta": "workspace:1.0.0-nightly-20241023020505", "@farmfe/utils": "workspace:*", - "@koa/cors": "^5.0.0", "@swc/helpers": "^0.5.0", "chokidar": "^3.5.3", "deepmerge": "^4.3.1", "dotenv": "^16.4.5", "dotenv-expand": "^11.0.6", - "execa": "^7.1.1", - "farm-browserslist-generator": "^1.0.0", - "farm-plugin-replace-dirname": "0.2.1", + "execa": "8.0.0", + "farm-browserslist-generator": "^1.0.5", + "@farmfe/plugin-replace-dirname": "workspace:*", "fast-glob": "^3.3.2", "fs-extra": "^11.1.1", - "http-proxy-middleware": "^3.0.0", "is-plain-object": "^5.0.0", - "koa": "^2.13.4", - "koa-compress": "^5.1.1", - "koa-connect": "^2.1.0", - "koa-static": "^5.0.0", - "lodash.debounce": "^4.0.8", - "loglevel": "^1.8.1", - "open": "^9.1.0", - "ws": "^8.12.0", + "mime": "^4.0.4", + "mime-types": "^2.1.35", + "open": "10.1.0", + "slashes": "^3.0.12", + "connect": "^3.7.0", + "cors": "^2.8.5", + "debug": "^4.3.5", + "etag": "^1.8.1", + "http-proxy": "^1.18.1", + "sirv": "^2.0.4", + "ws": "^8.14.2", "zod": "^3.23.8", "zod-validation-error": "^1.3.0" }, diff --git a/packages/core/scripts/build-cjs.mjs b/packages/core/scripts/build-cjs.mjs index 17c704421..77ad4af23 100644 --- a/packages/core/scripts/build-cjs.mjs +++ b/packages/core/scripts/build-cjs.mjs @@ -1,11 +1,12 @@ import path from 'path'; // import { copyFile, readdir } from 'fs/promises'; -import { build } from '../dist/index.js'; +// TODO build cjs +// import { build } from '../dist/index.js'; -await build({ - configPath: path.join(process.cwd(), 'farm.config.ts') -}); +// await build({ +// configPath: path.join(process.cwd(), 'farm.config.ts') +// }); // if (!process.env.FARM_PUBLISH) { // // copy artifacts diff --git a/packages/core/src/compiler/index.ts b/packages/core/src/compiler/index.ts index 51788ab04..97b9bf8f2 100644 --- a/packages/core/src/compiler/index.ts +++ b/packages/core/src/compiler/index.ts @@ -1,13 +1,16 @@ import { existsSync, mkdirSync, rmSync, writeFileSync } from 'node:fs'; import path from 'node:path'; -import { Compiler as BindingCompiler } from '../../binding/index.js'; -import type { Resource } from '../index.js'; -import type { Config, JsUpdateResult } from '../types/binding.js'; -import { type ILogger, Logger } from '../utils/logger.js'; +import { Compiler as BindingCompiler } from '../../binding/index.js'; +import type { + ResolvedCompilation, + ResolvedUserConfig, + Resource +} from '../index.js'; +import type { JsUpdateResult } from '../types/binding.js'; export const VIRTUAL_FARM_DYNAMIC_IMPORT_SUFFIX = - '.farm_dynamic_import_virtual_module'; + '.farm_dynamic_import_virtual_module' as const; /** * Cause the update process is async, we need to keep the update queue to make sure the update process is executed in order. @@ -36,12 +39,17 @@ export class Compiler { private _onUpdateFinishQueue: (() => void | Promise)[] = []; public compiling = false; - - constructor( - public config: Config, - private logger: ILogger = new Logger() - ) { - this._bindingCompiler = new BindingCompiler(this.config); + private _compileFinishPromise: Promise | null = null; + private _resolveCompileFinish: (() => void) | null = null; + _isInitialCompile = true; + + constructor(public config: ResolvedUserConfig) { + this._bindingCompiler = new BindingCompiler({ + // @ts-ignore + config: config.compilation, + jsPlugins: config.jsPlugins, + rustPlugins: config.rustPlugins + }); } async traceDependencies() { @@ -53,30 +61,32 @@ export class Compiler { } async compile() { - if (this.compiling) { - this.logger.error('Already compiling', { - exit: true - }); - } - + this.checkCompiling(); + this._createCompileFinishPromise(); this.compiling = true; - if (process.env.FARM_PROFILE) { - this._bindingCompiler.compileSync(); - } else { - await this._bindingCompiler.compile(); + try { + if (process.env.FARM_PROFILE) { + this._bindingCompiler.compileSync(); + } else { + await this._bindingCompiler.compile(); + } + } finally { + this.compiling = false; + this._resolveCompileFinishPromise(); + this._isInitialCompile = false; } - this.compiling = false; } compileSync() { - if (this.compiling) { - this.logger.error('Already compiling', { - exit: true - }); - } + this.checkCompiling(); + this._createCompileFinishPromise(); this.compiling = true; this._bindingCompiler.compileSync(); this.compiling = false; + this._resolveCompileFinishPromise(); + if (this._isInitialCompile) { + this._isInitialCompile = false; + } } async update( @@ -154,35 +164,25 @@ export class Compiler { writeResourcesToDisk(): void { const resources = this.resources(); - const configOutputPath = this.config.config.output.path; - const outputPath = path.isAbsolute(configOutputPath) - ? configOutputPath - : path.join(this.config.config.root, configOutputPath); + const outputPath = this.getOutputPath(); - for (const [name, resource] of Object.entries(resources)) { - // remove query params and hash of name - const nameWithoutQuery = name.split('?')[0]; - const nameWithoutHash = nameWithoutQuery.split('#')[0]; - - let filePath = path.join(outputPath, nameWithoutHash); - if (!existsSync(path.dirname(filePath))) { - mkdirSync(path.dirname(filePath), { recursive: true }); - } - - writeFileSync(filePath, resource); - } + Object.entries(resources).forEach(([name, resource]) => { + const filePath = path.join(outputPath, name.split(/[?#]/)[0]); + mkdirSync(path.dirname(filePath), { recursive: true }); + writeFileSync(filePath, new Uint8Array(resource)); + }); this.callWriteResourcesHook(); } callWriteResourcesHook() { - for (const jsPlugin of this.config.jsPlugins ?? []) { + for (const jsPlugin of this.config.jsPlugins) { jsPlugin.writeResources?.executor?.({ resourcesMap: this._bindingCompiler.resourcesMap() as Record< string, Resource >, - config: this.config.config + config: this.config.compilation }); } } @@ -209,15 +209,7 @@ export class Compiler { p = p.slice(0, -VIRTUAL_FARM_DYNAMIC_IMPORT_SUFFIX.length); } - if (path.isAbsolute(p)) { - return p; - } - - if (p.includes('?')) { - return path.join(root, p.split('?')[0]); - } - - return path.join(root, p); + return path.isAbsolute(p) ? p : path.join(root, p.split('?')[0]); } onUpdateFinish(cb: () => void) { @@ -225,12 +217,7 @@ export class Compiler { } outputPath() { - const { output, root } = this.config.config; - const configOutputPath = output.path; - const outputPath = path.isAbsolute(configOutputPath) - ? configOutputPath - : path.join(root, configOutputPath); - return outputPath; + return this.getOutputPath(); } addExtraWatchFile(root: string, paths: string[]) { @@ -240,4 +227,62 @@ export class Compiler { stats() { return this._bindingCompiler.stats(); } + + // wait for the compiler to finish compiling + async waitForInitialCompileFinish() { + if (this._isInitialCompile) { + await this.waitForCompileFinish(); + } + } + + async waitForCompileFinish() { + if (this.compiling && this._compileFinishPromise) { + await this._compileFinishPromise; + } + } + + private _createCompileFinishPromise() { + this._compileFinishPromise = new Promise((resolve) => { + this._resolveCompileFinish = resolve; + }); + } + + private _resolveCompileFinishPromise() { + if (this._resolveCompileFinish) { + this._resolveCompileFinish(); + this._compileFinishPromise = null; + this._resolveCompileFinish = null; + } + } + + private checkCompiling() { + if (this.compiling) { + this.config.logger.error('Already compiling', { + exit: true + }); + } + } + + private getOutputPath(): string { + const { output, root } = this.config.compilation; + const configOutputPath = output.path; + const outputPath = path.isAbsolute(configOutputPath) + ? configOutputPath + : path.join(root, configOutputPath); + return outputPath; + } +} + +export function createCompiler(resolvedUserConfig: ResolvedUserConfig) { + return new Compiler(resolvedUserConfig); +} + +export function createInlineCompiler( + config: ResolvedUserConfig, + options: ResolvedCompilation = {} +) { + return new Compiler({ + ...config, + compilation: { ...config.compilation, ...options } + }); } diff --git a/packages/core/src/config/_global.ts b/packages/core/src/config/_global.ts index 68d4d8747..03c579d12 100644 --- a/packages/core/src/config/_global.ts +++ b/packages/core/src/config/_global.ts @@ -1,3 +1,4 @@ export const __FARM_GLOBAL__ = { - __FARM_RESTART_DEV_SERVER__: false + __FARM_RESTART_DEV_SERVER__: false, + __FARM_SHOW_DEV_SERVER_URL__: true }; diff --git a/packages/core/src/config/constants.ts b/packages/core/src/config/constants.ts index 08bbc34f3..677402fad 100644 --- a/packages/core/src/config/constants.ts +++ b/packages/core/src/config/constants.ts @@ -1,3 +1,5 @@ +import { readFileSync } from 'node:fs'; + export const DEFAULT_CONFIG_NAMES = [ 'farm.config.ts', 'farm.config.js', @@ -14,7 +16,14 @@ export const CUSTOM_KEYS = { runtime_isolate: 'runtime.isolate', resolve_dedupe: 'resolve.dedupe', css_locals_conversion: 'css.modules.locals_conversion', + partial_bundling_groups_enforce: 'partial_bundling.groups.enforce', assets_mode: 'assets.mode' }; export const FARM_RUST_PLUGIN_FUNCTION_ENTRY = 'func.js'; + +const { version } = JSON.parse( + readFileSync(new URL('../../package.json', import.meta.url)).toString() +); + +export const VERSION = version; diff --git a/packages/core/src/config/env.ts b/packages/core/src/config/env.ts index d2e5d840a..5de34545b 100644 --- a/packages/core/src/config/env.ts +++ b/packages/core/src/config/env.ts @@ -7,7 +7,6 @@ * https://github.com/vitejs/vite/blob/main/LICENSE * */ - import fs from 'node:fs'; import path from 'node:path'; diff --git a/packages/core/src/config/index.ts b/packages/core/src/config/index.ts index 55b30a15a..f78b93be4 100644 --- a/packages/core/src/config/index.ts +++ b/packages/core/src/config/index.ts @@ -1,8 +1,9 @@ -import crypto from 'node:crypto'; +import { createHash } from 'node:crypto'; import fs from 'node:fs'; -import module from 'node:module'; -import path, { isAbsolute, join } from 'node:path'; +import { createRequire } from 'node:module'; +import path from 'node:path'; import { pathToFileURL } from 'node:url'; +import fse from 'fs-extra'; import { bindingPath } from '../../binding/index.js'; import { OutputConfig } from '../types/binding.js'; @@ -16,21 +17,15 @@ import { resolveConfigResolvedHook, resolveFarmPlugins } from '../plugin/index.js'; -import { Server } from '../server/index.js'; import { Logger, - bold, clearScreen, colors, - getAliasEntries, - green, isArray, isEmptyObject, isObject, isWindows, - normalizeBasePath, - normalizePath, - transformAliasWithVite + normalizePath } from '../utils/index.js'; import { traceDependencies } from '../utils/trace-dependencies.js'; import { __FARM_GLOBAL__ } from './_global.js'; @@ -49,6 +44,7 @@ import { parseUserConfig } from './schema.js'; import { externalAdapter } from '../plugin/js/external-adapter.js'; import { convertErrorMessage } from '../utils/error.js'; +import { resolveHostname } from '../utils/http.js'; import merge from '../utils/merge.js'; import { CUSTOM_KEYS, @@ -59,10 +55,11 @@ import { mergeConfig, mergeFarmCliConfig } from './mergeConfig.js'; import { normalizeAsset } from './normalize-config/normalize-asset.js'; import { normalizeCss } from './normalize-config/normalize-css.js'; import { normalizeExternal } from './normalize-config/normalize-external.js'; +import normalizePartialBundling from './normalize-config/normalize-partial-bundling.js'; import { normalizeResolve } from './normalize-config/normalize-resolve.js'; import type { - Alias, - FarmCLIOptions, + ConfigEnv, + FarmCliOptions, NormalizedServerConfig, ResolvedCompilation, ResolvedUserConfig, @@ -74,6 +71,7 @@ import type { } from './types.js'; export * from './types.js'; +export * from './constants.js'; export function defineFarmConfig(config: UserConfig): UserConfig; export function defineFarmConfig( @@ -87,104 +85,70 @@ export function defineFarmConfig(config: UserConfigExport): UserConfigExport { return config; } -async function getDefaultConfig( - config: UserConfig, - inlineOptions: FarmCLIOptions, - mode?: CompilationMode, - logger?: Logger -) { - logger = logger ?? new Logger(); - const resolvedUserConfig = await resolveMergedUserConfig( - config, - undefined, - inlineOptions.mode ?? mode, - logger - ); - - resolvedUserConfig.server = normalizeDevServerConfig( - inlineOptions.server, - mode - ); - - resolvedUserConfig.compilation = await normalizeUserCompilationConfig( - resolvedUserConfig, - config, - logger, - mode, - true - ); - resolvedUserConfig.root = resolvedUserConfig.compilation.root; - resolvedUserConfig.jsPlugins = []; - resolvedUserConfig.rustPlugins = []; - - return resolvedUserConfig; -} - -async function handleServerPortConflict( - resolvedUserConfig: ResolvedUserConfig, - logger: Logger, - mode?: CompilationMode -) { - // check port availability: auto increment the port if a conflict occurs - - try { - mode !== 'production' && - (await Server.resolvePortConflict(resolvedUserConfig.server, logger)); - // eslint-disable-next-line no-empty - } catch {} -} +const COMMANDS = { + START: 'start', + BUILD: 'build', + WATCH: 'watch', + PREVIEW: 'preview', + CLEAN: 'clean' +} as const; /** * Resolve and load user config from the specified path * @param configPath */ export async function resolveConfig( - inlineOptions: FarmCLIOptions & UserConfig = {}, - mode?: CompilationMode, - logger?: Logger, - isHandleServerPortConflict = true + inlineOptions: FarmCliOptions & UserConfig, + command: 'start' | 'build' | 'watch' | 'preview', + defaultMode: CompilationMode = 'development', + defaultNodeEnv: CompilationMode = 'development', + isPreview = false ): Promise { - // Clear the console according to the cli command + // TODO mode 这块还是不对 要区分 mode 和 build 还是 dev 环境 + // TODO 在使用 vite 插件的时候 不要在开发环境使用 生产环境的mode vue 插件会导致 hmr 失效 记在文档里 + const compileMode = defaultMode; - checkClearScreen(inlineOptions); - logger = logger ?? new Logger(); - inlineOptions.mode = inlineOptions.mode ?? mode; - // configPath may be file or directory - let { configPath } = inlineOptions; - let rawConfig: UserConfig = mergeFarmCliConfig(inlineOptions, {}); - - // if the config file can not found, just merge cli options and return default - if (configPath) { - if (!path.isAbsolute(configPath)) { - throw new Error('configPath must be an absolute path'); - } - const loadedUserConfig = await loadConfigFile( - configPath, - inlineOptions, - mode, - logger - ); + const mode = inlineOptions.mode || defaultMode; + const isNodeEnvSet = !!process.env.NODE_ENV; + inlineOptions.mode = mode; - if (loadedUserConfig) { - configPath = loadedUserConfig.configFilePath; - rawConfig = mergeConfig(rawConfig, loadedUserConfig.config); - } - rawConfig.compilation.mode = - loadedUserConfig?.config?.compilation?.mode ?? mode; - } else { - mergeConfig( - rawConfig, - await getDefaultConfig(rawConfig, inlineOptions, mode, logger) - ); + if (!isNodeEnvSet) { + setProcessEnv(defaultNodeEnv); } - const { config: userConfig, configFilePath } = { - configFilePath: configPath, - config: rawConfig + const configEnv: ConfigEnv = { + mode, + command, + isPreview }; + // configPath may be file or directory + const { configFile, configPath: initialConfigPath } = inlineOptions; + + const loadedUserConfig = await loadConfigFile( + configFile, + inlineOptions, + configEnv, + defaultNodeEnv + ); + + let rawConfig: UserConfig = mergeFarmCliConfig( + inlineOptions, + {}, + compileMode + ); + + const inlineConfig = rawConfig; + + let configFilePath = initialConfigPath; + + if (loadedUserConfig) { + configFilePath = loadedUserConfig.configFilePath; + rawConfig = mergeConfig(rawConfig, loadedUserConfig.config); + } + const { jsPlugins, vitePlugins, rustPlugins, vitePluginAdapters } = - await resolvePlugins(userConfig, logger, mode); + await resolvePlugins(rawConfig, compileMode); const sortFarmJsPlugins = getSortedPlugins([ ...jsPlugins, @@ -192,60 +156,75 @@ export async function resolveConfig( externalAdapter() ]); - const config = await resolveConfigHook(userConfig, sortFarmJsPlugins); + const config = await resolveConfigHook(rawConfig, sortFarmJsPlugins); + // define logger when resolvedConfigHook + const logger = new Logger({ + customLogger: loadedUserConfig.config?.customLogger, + allowClearScreen: loadedUserConfig.config?.clearScreen + }); - const mergedUserConfig = mergeFarmCliConfig(inlineOptions, config); - - const resolvedUserConfig = await resolveMergedUserConfig( - mergedUserConfig, + const resolvedUserConfig = await resolveUserConfig( + config, configFilePath, - inlineOptions.mode ?? mode, - logger + compileMode ); - // normalize server config first cause it may be used in normalizeUserCompilationConfig + resolvedUserConfig.logger = logger; + + // normalize server config first cause it may be used in normalizeUserCompilationFnConfig resolvedUserConfig.server = normalizeDevServerConfig( resolvedUserConfig.server, - mode + compileMode ); - if (isHandleServerPortConflict) { - await handleServerPortConflict(resolvedUserConfig, logger, mode); - } - resolvedUserConfig.compilation = await normalizeUserCompilationConfig( resolvedUserConfig, - mergedUserConfig, - logger, - mode + mode as CompilationMode ); - // normalize root path - resolvedUserConfig.root = normalizeBasePath( - resolvedUserConfig.compilation.root - ); - resolvedUserConfig.jsPlugins = sortFarmJsPlugins; - resolvedUserConfig.rustPlugins = rustPlugins; - - // Temporarily dealing with alias objects and arrays in js will be unified in rust in the future.] - if (vitePlugins.length) { - resolvedUserConfig.compilation.resolve.alias = getAliasEntries( - resolvedUserConfig.compilation.resolve.alias - ); - } + Object.assign(resolvedUserConfig, { + root: resolvedUserConfig.compilation.root, + jsPlugins: sortFarmJsPlugins, + rustPlugins: rustPlugins, + inlineConfig + }); await resolveConfigResolvedHook(resolvedUserConfig, sortFarmJsPlugins); // Fix: Await the Promise and pass the resolved value to the function. - // TODO Temporarily solve the problem of alias adaptation to vite - if (resolvedUserConfig.compilation?.resolve?.alias && vitePlugins.length) { - resolvedUserConfig.compilation.resolve.alias = transformAliasWithVite( - resolvedUserConfig.compilation.resolve.alias as unknown as Array - ); - } + await handleLazyCompilation( + resolvedUserConfig, + command as keyof typeof COMMANDS + ); return resolvedUserConfig; } +async function handleLazyCompilation( + config: ResolvedUserConfig, + command: keyof typeof COMMANDS +) { + const commandHandlers = { + [COMMANDS.START]: async (cfg: ResolvedUserConfig) => { + if ( + cfg.compilation.lazyCompilation && + typeof cfg.server?.host === 'string' + ) { + await setLazyCompilationDefine(cfg); + } + }, + [COMMANDS.WATCH]: async (cfg: ResolvedUserConfig) => { + if (cfg.compilation?.lazyCompilation) { + await setLazyCompilationDefine(cfg); + } + } + }; + + const handler = commandHandlers[command as keyof typeof commandHandlers]; + if (handler) { + await handler(config); + } +} + /** * Normalize user config and transform it to rust compiler compatible config * @@ -261,26 +240,21 @@ export async function resolveConfig( */ export async function normalizeUserCompilationConfig( resolvedUserConfig: ResolvedUserConfig, - userConfig: UserConfig, - logger: Logger, - mode: CompilationMode = 'development', - isDefault = false + mode: CompilationMode = 'development' ): Promise { - const { compilation, root = process.cwd(), clearScreen } = resolvedUserConfig; + const { compilation, root } = resolvedUserConfig; // resolve root path + const resolvedRootPath = normalizePath(root); resolvedUserConfig.root = resolvedRootPath; - if (!userConfig.compilation) { - userConfig.compilation = {}; - } - // if normalize default config, skip check input option - const inputIndexConfig = !isDefault - ? checkCompilationInputValue(userConfig, logger) - : {}; + const inputIndexConfig = await checkCompilationInputValue( + resolvedUserConfig, + resolvedUserConfig.logger + ); const resolvedCompilation: ResolvedCompilation = merge( {}, @@ -289,9 +263,6 @@ export async function normalizeUserCompilationConfig( input: inputIndexConfig, root: resolvedRootPath }, - { - clearScreen - }, compilation ); @@ -301,28 +272,26 @@ export async function normalizeUserCompilationConfig( resolvedCompilation.coreLibPath = bindingPath; - normalizeOutput(resolvedCompilation, isProduction, logger); - normalizeExternal(userConfig, resolvedCompilation); + normalizeOutput(resolvedCompilation, isProduction, resolvedUserConfig.logger); + normalizeExternal(resolvedUserConfig, resolvedCompilation); // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore do not check type for this internal option if (!resolvedCompilation.assets?.publicDir) { - if (!resolvedCompilation.assets) { - resolvedCompilation.assets = {}; - } + resolvedCompilation.assets ??= {}; const userPublicDir = resolvedUserConfig.publicDir ? resolvedUserConfig.publicDir - : join(resolvedCompilation.root, 'public'); + : path.join(resolvedCompilation.root, 'public'); - if (isAbsolute(userPublicDir)) { + if (path.isAbsolute(userPublicDir)) { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore do not check type for this internal option resolvedCompilation.assets.publicDir = userPublicDir; } else { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore do not check type for this internal option - resolvedCompilation.assets.publicDir = join( + resolvedCompilation.assets.publicDir = path.join( resolvedCompilation.root, userPublicDir ); @@ -348,7 +317,7 @@ export async function normalizeUserCompilationConfig( }, {}) ); - const require = module.createRequire(import.meta.url); + const require = createRequire(import.meta.url); const hmrClientPluginPath = require.resolve('@farmfe/runtime-plugin-hmr'); const ImportMetaPluginPath = require.resolve( '@farmfe/runtime-plugin-import-meta' @@ -374,33 +343,27 @@ export async function normalizeUserCompilationConfig( if (!resolvedCompilation.runtime.plugins) { resolvedCompilation.runtime.plugins = []; } else { + const resolvePluginPath = (plugin: any) => { + if (path.isAbsolute(plugin)) return plugin; + return plugin.startsWith('.') + ? path.resolve(resolvedRootPath, plugin) + : require.resolve(plugin); + }; // make sure all plugin paths are absolute resolvedCompilation.runtime.plugins = - resolvedCompilation.runtime.plugins.map((plugin) => { - if (!path.isAbsolute(plugin)) { - if (!plugin.startsWith('.')) { - // resolve plugin from node_modules - return require.resolve(plugin); - } else { - return path.resolve(resolvedRootPath, plugin); - } - } - - return plugin; - }); + resolvedCompilation.runtime.plugins.map(resolvePluginPath); } // set namespace to package.json name field's hash if (!resolvedCompilation.runtime.namespace) { // read package.json name field const packageJsonPath = path.resolve(resolvedRootPath, 'package.json'); - const packageJsonExists = fs.existsSync(packageJsonPath); + const packageJsonExists = fse.existsSync(packageJsonPath); const namespaceName = packageJsonExists - ? JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf-8' })) - ?.name ?? FARM_DEFAULT_NAMESPACE + ? JSON.parse(fse.readFileSync(packageJsonPath, 'utf-8')).name || + FARM_DEFAULT_NAMESPACE : FARM_DEFAULT_NAMESPACE; - resolvedCompilation.runtime.namespace = crypto - .createHash('md5') + resolvedCompilation.runtime.namespace = createHash('md5') .update(namespaceName) .digest('hex'); } @@ -408,18 +371,20 @@ export async function normalizeUserCompilationConfig( if (isProduction) { resolvedCompilation.lazyCompilation = false; } else if (resolvedCompilation.lazyCompilation === undefined) { - if (isDevelopment) { - resolvedCompilation.lazyCompilation = true; - } else { - resolvedCompilation.lazyCompilation = false; - } + resolvedCompilation.lazyCompilation ??= isDevelopment; } - if (resolvedCompilation.mode === undefined) { - resolvedCompilation.mode = mode; - } + resolvedCompilation.mode ??= mode; + setProcessEnv(resolvedCompilation.mode); + // TODO add targetEnv `lib-browser` and `lib-node` support + const is_entry_html = + !resolvedCompilation.input || + Object.values(resolvedCompilation.input).some( + (value) => value && value.endsWith('.html') + ); + if ( resolvedCompilation.output.targetEnv !== 'node' && isArray(resolvedCompilation.runtime.plugins) && @@ -430,7 +395,7 @@ export async function normalizeUserCompilationConfig( resolvedCompilation.output.publicPath ); const serverOptions = resolvedUserConfig.server; - const defineHmrPath = normalizeBasePath( + const defineHmrPath = normalizePath( path.join(publicPath, resolvedUserConfig.server.hmr.path) ); @@ -475,15 +440,11 @@ export async function normalizeUserCompilationConfig( } if (resolvedCompilation.treeShaking === undefined) { - if (isProduction) { - resolvedCompilation.treeShaking = true; - } else { - resolvedCompilation.treeShaking = false; - } + resolvedCompilation.treeShaking ??= isProduction; } if (resolvedCompilation.script?.plugins?.length) { - logger.info( + resolvedUserConfig.logger.info( `Swc plugins are configured, note that Farm uses ${colors.yellow( 'swc_core v0.96' )}, please make sure the plugin is ${colors.green( @@ -498,26 +459,18 @@ export async function normalizeUserCompilationConfig( // so, it only happens in development mode // https://github.com/farm-fe/farm/issues/962 if (resolvedCompilation.treeShaking && resolvedCompilation.lazyCompilation) { - logger.error( + resolvedUserConfig.logger.error( 'treeShaking option is not supported in lazyCompilation mode, lazyCompilation will be disabled.' ); resolvedCompilation.lazyCompilation = false; } if (resolvedCompilation.minify === undefined) { - if (isProduction) { - resolvedCompilation.minify = true; - } else { - resolvedCompilation.minify = false; - } + resolvedCompilation.minify ??= isProduction; } if (resolvedCompilation.presetEnv === undefined) { - if (isProduction) { - resolvedCompilation.presetEnv = true; - } else { - resolvedCompilation.presetEnv = false; - } + resolvedCompilation.presetEnv ??= isProduction; } // setting the custom configuration @@ -546,28 +499,18 @@ export async function normalizeUserCompilationConfig( }; if (resolvedCompilation.script.parser.tsConfig !== undefined) resolvedCompilation.script.parser.tsConfig.decorators = true; - else - userConfig.compilation.script.parser.tsConfig = { - decorators: true - }; } // normalize persistent cache at last - await normalizePersistentCache( - resolvedCompilation, - resolvedUserConfig, - logger - ); - - normalizeResolve(userConfig, resolvedCompilation); - normalizeCss(userConfig, resolvedCompilation); - normalizeAsset(userConfig, resolvedCompilation); - + await normalizePersistentCache(resolvedCompilation, resolvedUserConfig); + normalizeResolve(resolvedUserConfig, resolvedCompilation); + normalizeCss(resolvedUserConfig, resolvedCompilation); + normalizePartialBundling(resolvedCompilation); return resolvedCompilation; } export const DEFAULT_HMR_OPTIONS: Required = { - host: true, + host: 'localhost', port: (process.env.FARM_DEFAULT_HMR_PORT && Number(process.env.FARM_DEFAULT_HMR_PORT)) ?? @@ -575,7 +518,11 @@ export const DEFAULT_HMR_OPTIONS: Required = { path: '/__hmr', overlay: true, protocol: 'ws', - watchOptions: {} + watchOptions: {}, + clientPort: 9000, + timeout: 0, + server: null, + channels: [] }; export const DEFAULT_DEV_SERVER_OPTIONS: NormalizedServerConfig = { @@ -588,8 +535,9 @@ export const DEFAULT_DEV_SERVER_OPTIONS: NormalizedServerConfig = { protocol: 'http', hostname: { name: 'localhost', host: undefined }, host: true, - proxy: {}, + proxy: undefined, hmr: DEFAULT_HMR_OPTIONS, + middlewareMode: false, open: false, strictPort: false, cors: false, @@ -623,12 +571,20 @@ export const DEFAULT_COMPILATION_OPTIONS: Partial = { }; // eslint-disable-next-line @typescript-eslint/no-explicit-any -function tryAsFileRead(value?: any): string | Buffer { - if (typeof value === 'string' && fs.existsSync(value)) { - return fs.readFileSync(path.resolve(value.toString())); + +function tryHttpsAsFileRead(value: unknown): string | Buffer | unknown { + if (typeof value === 'string') { + try { + const resolvedPath = path.resolve(value); + const stats = fse.statSync(resolvedPath); + + if (stats.isFile()) { + return fse.readFileSync(resolvedPath); + } + } catch {} } - return value; + return Buffer.isBuffer(value) ? value : value; } export function normalizeDevServerConfig( @@ -655,10 +611,10 @@ export function normalizeDevServerConfig( https: https ? { ...https, - ca: tryAsFileRead(options.https.ca), - cert: tryAsFileRead(options.https.cert), - key: tryAsFileRead(options.https.key), - pfx: tryAsFileRead(options.https.pfx) + ca: tryHttpsAsFileRead(options.https.ca), + cert: tryHttpsAsFileRead(options.https.cert), + key: tryHttpsAsFileRead(options.https.key), + pfx: tryHttpsAsFileRead(options.https.pfx) } : undefined }) as NormalizedServerConfig; @@ -677,103 +633,55 @@ const formatToExt: Record = { esm: 'mjs' }; -async function readConfigFile( - inlineOptions: FarmCLIOptions, +export async function readConfigFile( + inlineOptions: FarmCliOptions, configFilePath: string, - logger: Logger, + configEnv: any, mode: CompilationMode = 'development' ): Promise { - if (fs.existsSync(configFilePath)) { - !__FARM_GLOBAL__.__FARM_RESTART_DEV_SERVER__ && - logger.info(`Using config file at ${bold(green(configFilePath))}`); - const format: Format = process.env.FARM_CONFIG_FORMAT - ? process.env.FARM_CONFIG_FORMAT === 'cjs' - ? 'cjs' - : 'esm' - : formatFromExt[path.extname(configFilePath).slice(1)] ?? 'esm'; - // we need transform all type farm.config with __dirname and __filename - const Compiler = (await import('../compiler/index.js')).Compiler; - const outputPath = path.join( - path.dirname(configFilePath), - 'node_modules', - '.farm' - ); + if (!fse.existsSync(configFilePath)) return; - const fileName = `farm.config.bundle-${Date.now()}-${Math.random() - .toString(16) - .split('.') - .join('')}.${formatToExt[format]}`; + const format = getFormat(configFilePath); - const tsDefaultUserConfig: UserConfig = { - root: inlineOptions.root, - compilation: { - input: { - [fileName]: configFilePath - }, - output: { - entryFilename: '[entryName]', - path: outputPath, - format, - targetEnv: 'library-node' - }, - external: [ - ...(process.env.FARM_CONFIG_FULL_BUNDLE - ? [] - : ['!^(\\./|\\.\\./|[A-Za-z]:\\\\|/).*']), - '^@farmfe/core$' - ], - partialBundling: { - enforceResources: [ - { - name: fileName, - test: ['.+'] - } - ] - }, - watch: false, - sourcemap: false, - treeShaking: false, - minify: false, - presetEnv: false, - lazyCompilation: false, - persistentCache: false, - progress: false - } - }; + const Compiler = (await import('../compiler/index.js')).Compiler; - const tsDefaultResolvedUserConfig: ResolvedUserConfig = - await resolveMergedUserConfig( - tsDefaultUserConfig, - undefined, - mode, - logger - ); - - const normalizedConfig = await normalizeUserCompilationConfig( - tsDefaultResolvedUserConfig, - tsDefaultUserConfig, - logger, - mode - ); + const outputPath = path.join( + path.dirname(configFilePath), + 'node_modules', + '.farm' + ); - const replaceDirnamePlugin = await import( - 'farm-plugin-replace-dirname' - ).then((mod) => mod.default); + const fileName = `farm.config.bundle-${Date.now()}-${Math.random() + .toString(16) + .split('.') + .join('')}.${formatToExt[format]}`; - const compiler = new Compiler( - { - config: normalizedConfig, - jsPlugins: [], - rustPlugins: [[replaceDirnamePlugin, '{}']] - }, - logger - ); + const normalizedConfig = await resolveDefaultUserConfig({ + inlineOptions, + configFilePath, + format, + outputPath, + fileName, + mode + }); + + const replaceDirnamePlugin = await import( + '@farmfe/plugin-replace-dirname' + ).then((mod) => mod.default); + + const compiler = new Compiler({ + compilation: normalizedConfig, + jsPlugins: [], + rustPlugins: [[replaceDirnamePlugin, '{}']] + }); + + const FARM_PROFILE = process.env.FARM_PROFILE; + // disable FARM_PROFILE in farm_config + if (FARM_PROFILE) { + process.env.FARM_PROFILE = ''; + } - const FARM_PROFILE = process.env.FARM_PROFILE; - // disable FARM_PROFILE in farm_config - if (FARM_PROFILE) { - process.env.FARM_PROFILE = ''; - } + try { await compiler.compile(); if (FARM_PROFILE) { @@ -782,9 +690,7 @@ async function readConfigFile( compiler.writeResourcesToDisk(); - const filePath = isWindows - ? pathToFileURL(path.join(outputPath, fileName)) - : path.join(outputPath, fileName); + const filePath = getFilePath(outputPath, fileName); // Change to vm.module of node or loaders as far as it is stable const userConfig = (await import(filePath as string)).default; @@ -799,94 +705,28 @@ async function readConfigFile( /** do nothing */ } - const configEnv = { mode: inlineOptions.mode ?? process.env.NODE_ENV }; const config = await (typeof userConfig === 'function' ? userConfig(configEnv) : userConfig); - if (!config.root) { - config.root = inlineOptions.root; - } - if (!isObject(config)) { throw new Error(`config must export or return an object.`); } + + config.root ??= inlineOptions.root; + return config; + } finally { + fse.unlink(getFilePath(outputPath, fileName)).catch(() => {}); } } -export function normalizePublicDir(root: string, userPublicDir?: string) { - const publicDir = userPublicDir ?? 'public'; +export function normalizePublicDir(root: string, publicDir = 'public') { const absPublicDirPath = path.isAbsolute(publicDir) ? publicDir - : path.join(root, publicDir); - return absPublicDirPath; -} - -export function checkClearScreen( - inlineConfig: FarmCLIOptions | ResolvedUserConfig -) { - if ( - inlineConfig?.clearScreen && - !__FARM_GLOBAL__.__FARM_RESTART_DEV_SERVER__ - ) { - clearScreen(); - } -} - -export async function resolveMergedUserConfig( - mergedUserConfig: UserConfig, - configFilePath: string | undefined, - mode: 'development' | 'production' | string, - logger: Logger = new Logger() -): Promise { - const resolvedUserConfig = { - ...mergedUserConfig, - compilation: { - ...mergedUserConfig.compilation, - external: [] - } - } as ResolvedUserConfig; - - // set internal config - resolvedUserConfig.envMode = mode; - - if (configFilePath) { - const dependencies = await traceDependencies(configFilePath, logger); - dependencies.sort(); - resolvedUserConfig.configFileDependencies = dependencies; - resolvedUserConfig.configFilePath = configFilePath; - } - - const resolvedRootPath = resolvedUserConfig.root ?? process.cwd(); - const resolvedEnvPath = resolvedUserConfig.envDir - ? resolvedUserConfig.envDir - : resolvedRootPath; - - const userEnv = loadEnv( - resolvedUserConfig.envMode ?? mode, - resolvedEnvPath, - resolvedUserConfig.envPrefix - ); - const existsEnvFiles = getExistsEnvFiles( - resolvedUserConfig.envMode ?? mode, - resolvedEnvPath - ); + : path.resolve(root, publicDir); - resolvedUserConfig.envFiles = [ - ...(Array.isArray(resolvedUserConfig.envFiles) - ? resolvedUserConfig.envFiles - : []), - ...existsEnvFiles - ]; - - resolvedUserConfig.env = { - ...userEnv, - NODE_ENV: mergedUserConfig.compilation.mode ?? mode, - mode: mode - }; - - return resolvedUserConfig; + return absPublicDirPath; } /** @@ -896,28 +736,31 @@ export async function resolveMergedUserConfig( * @returns loaded config and config file path */ export async function loadConfigFile( - configPath: string, - inlineOptions: FarmCLIOptions, - mode: CompilationMode = 'development', - logger: Logger = new Logger() -): Promise<{ config: UserConfig; configFilePath: string } | undefined> { - // if configPath points to a directory, try to find a config file in it using default config + configFile: string, + inlineOptions: any, + configEnv: any, + mode: CompilationMode = 'development' +): Promise<{ config: any; configFilePath: string } | undefined> { + const { root = '.' } = inlineOptions; + const configRootPath = path.resolve(root); + let resolvedPath: string | undefined; try { - const configFilePath = await getConfigFilePath(configPath); - - if (configFilePath) { - const config = await readConfigFile( - inlineOptions, - configFilePath, - logger, - mode - ); + resolvedPath = await resolveConfigFilePath( + configFile, + root, + configRootPath + ); - return { - config: config && parseUserConfig(config), - configFilePath: configFilePath - }; - } + const config = await readConfigFile( + inlineOptions, + resolvedPath, + configEnv, + mode + ); + return { + config: config && parseUserConfig(config), + configFilePath: resolvedPath + }; } catch (error) { // In this place, the original use of throw caused emit to the outermost catch // callback, causing the code not to execute. If the internal catch compiler's own @@ -926,44 +769,48 @@ export async function loadConfigFile( const errorMessage = convertErrorMessage(error); const stackTrace = error.code === 'GenericFailure' ? '' : `\n${error.stack}`; - if (inlineOptions.mode === 'production') { - logger.error( - `Failed to load config file: ${errorMessage} \n${stackTrace}`, - { - exit: true - } + throw new Error( + `Failed to load farm config file: ${errorMessage} \n${stackTrace}` ); } - const potentialSolution = 'Potential solutions: \n1. Try set `FARM_CONFIG_FORMAT=cjs`(default to esm)\n2. Try set `FARM_CONFIG_FULL_BUNDLE=1`'; - + // throw new Error( + // `Failed to load farm config file: ${errorMessage}. \n ${potentialSolution} \n ${error.stack}` + // ); throw new Error( - `Failed to load farm config file: ${errorMessage}. \n ${potentialSolution} \n ${error.stack}` + `Failed to load farm config file: ${errorMessage}. \n ${potentialSolution}` + // `Failed to load farm config file: ${errorMessage}.`, ); } } -function checkCompilationInputValue(userConfig: UserConfig, logger: Logger) { +export async function checkCompilationInputValue( + userConfig: UserConfig, + logger: Logger +) { const { compilation } = userConfig; const targetEnv = compilation?.output?.targetEnv; + const inputValue = Object.values(compilation?.input).filter(Boolean); const isTargetNode = targetEnv === 'node'; const defaultHtmlPath = './index.html'; let inputIndexConfig: { index?: string } = { index: '' }; let errorMessage = ''; // Check if input is specified - if (!isEmptyObject(compilation?.input)) { + if (!isEmptyObject(compilation?.input) && inputValue.length) { inputIndexConfig = compilation?.input; } else { + const rootPath = userConfig?.root ?? '.'; if (isTargetNode) { // If input is not specified, try to find index.js or index.ts const entryFiles = ['./index.js', './index.ts']; for (const entryFile of entryFiles) { try { - if (fs.statSync(path.resolve(userConfig?.root, entryFile))) { + const resolvedPath = path.resolve(rootPath, entryFile); + if (await checkFileExists(resolvedPath)) { inputIndexConfig = { index: entryFile }; break; } @@ -973,7 +820,8 @@ function checkCompilationInputValue(userConfig: UserConfig, logger: Logger) { } } else { try { - if (fs.statSync(path.resolve(userConfig?.root, defaultHtmlPath))) { + const resolvedHtmlPath = path.resolve(rootPath, defaultHtmlPath); + if (await checkFileExists(resolvedHtmlPath)) { inputIndexConfig = { index: defaultHtmlPath }; } } catch (error) { @@ -986,8 +834,8 @@ function checkCompilationInputValue(userConfig: UserConfig, logger: Logger) { logger.error( `Build failed due to errors: Can not resolve ${ isTargetNode ? 'index.js or index.ts' : 'index.html' - } from ${userConfig.root}. \n${errorMessage}`, - { exit: true } + } from ${userConfig.root}. \n${errorMessage}` + // { exit: true } ); } } @@ -996,20 +844,21 @@ function checkCompilationInputValue(userConfig: UserConfig, logger: Logger) { } export async function getConfigFilePath( - configPath: string + configRootPath: string ): Promise { - if (fs.statSync(configPath).isDirectory()) { - for (const name of DEFAULT_CONFIG_NAMES) { - const resolvedPath = path.join(configPath, name); - const isFile = - fs.existsSync(resolvedPath) && fs.statSync(resolvedPath).isFile(); + const stat = await fse.stat(configRootPath); + if (!stat.isDirectory()) { + return undefined; + } - if (isFile) { + for (const name of DEFAULT_CONFIG_NAMES) { + const resolvedPath = path.join(configRootPath, name); + try { + const fileStat = await fse.stat(resolvedPath); + if (fileStat.isFile()) { return resolvedPath; } - } - } else if (fs.statSync(configPath).isFile()) { - return configPath; + } catch {} } return undefined; @@ -1017,30 +866,218 @@ export async function getConfigFilePath( export async function resolvePlugins( userConfig: UserConfig, - logger: Logger, mode: CompilationMode ) { - const { jsPlugins, rustPlugins } = await resolveFarmPlugins(userConfig); - const rawJsPlugins = (await resolveAsyncPlugins(jsPlugins || [])).filter( - Boolean - ); + const { jsPlugins: rawJsPlugins, rustPlugins } = + await resolveFarmPlugins(userConfig); + const jsPlugins = await resolveAndFilterAsyncPlugins(rawJsPlugins); - let vitePluginAdapters: JsPlugin[] = []; const vitePlugins = (userConfig?.vitePlugins ?? []).filter(Boolean); - if (vitePlugins.length) { - vitePluginAdapters = await handleVitePlugins( - vitePlugins, - userConfig, - logger, - mode - ); - } + const vitePluginAdapters = vitePlugins.length + ? await handleVitePlugins(vitePlugins, userConfig, mode) + : []; return { - jsPlugins: rawJsPlugins, + jsPlugins, vitePlugins, rustPlugins, vitePluginAdapters }; } + +export async function resolveDefaultUserConfig(options: any) { + const defaultConfig: UserConfig = createDefaultConfig(options); + + const resolvedUserConfig: ResolvedUserConfig = await resolveUserConfig( + defaultConfig, + undefined, + defaultConfig.compilation.mode + ); + + const normalizedConfig = await normalizeUserCompilationConfig( + resolvedUserConfig, + 'development' + ); + + return normalizedConfig; +} + +export async function resolveUserConfig( + userConfig: UserConfig, + configFilePath?: string | undefined, + mode: 'development' | 'production' | string = 'development' +): Promise { + const resolvedUserConfig = { + ...userConfig, + envMode: mode + } as ResolvedUserConfig; + + // set internal config + if (configFilePath) { + const dependencies = await traceDependencies(configFilePath); + resolvedUserConfig.configFileDependencies = dependencies.sort(); + resolvedUserConfig.configFilePath = configFilePath; + } + + const resolvedRootPath = resolvedUserConfig.root; + const resolvedEnvPath = resolvedUserConfig.envDir ?? resolvedRootPath; + + const userEnv = loadEnv( + resolvedUserConfig.envMode, + resolvedEnvPath, + resolvedUserConfig.envPrefix + ); + const existsEnvFiles = getExistsEnvFiles( + resolvedUserConfig.envMode, + resolvedEnvPath + ); + + resolvedUserConfig.envFiles = [ + ...(Array.isArray(resolvedUserConfig.envFiles) + ? resolvedUserConfig.envFiles + : []), + ...existsEnvFiles + ]; + + resolvedUserConfig.env = { + ...userEnv, + NODE_ENV: userConfig.compilation.mode, + // TODO publicPath rewrite to BASE_URL + BASE_URL: userConfig.compilation.output.publicPath ?? '/', + mode, + DEV: mode === 'development', + PROD: mode === 'production' + }; + + resolvedUserConfig.publicDir = normalizePublicDir( + resolvedRootPath, + userConfig.publicDir + ); + + // TODO type error + // @ts-ignore + // resolveUserConfig.logger = logger; + + return resolvedUserConfig; +} + +export function createDefaultConfig(options: any): UserConfig { + const { inlineOptions, mode, format, outputPath, fileName, configFilePath } = + options; + + return { + root: path.resolve(inlineOptions.root ?? '.'), + compilation: { + input: { + [fileName]: configFilePath + }, + output: { + entryFilename: '[entryName]', + path: outputPath, + format, + targetEnv: 'library-node' + }, + mode, + external: [ + ...(process.env.FARM_CONFIG_FULL_BUNDLE + ? [] + : ['!^(\\./|\\.\\./|[A-Za-z]:\\\\|/).*']), + '^@farmfe/core$' + ], + partialBundling: { + enforceResources: [ + { + name: fileName, + test: ['.+'] + } + ] + }, + sourcemap: false, + treeShaking: false, + minify: false, + presetEnv: false, + lazyCompilation: false, + persistentCache: false, + progress: false + } + }; +} + +export async function resolveAndFilterAsyncPlugins( + plugins: JsPlugin[] = [] +): Promise { + return (await resolveAsyncPlugins(plugins)).filter(Boolean); +} + +export async function checkFileExists(filePath: string): Promise { + try { + await fse.stat(filePath); + return true; + } catch { + return false; + } +} + +export async function resolveConfigFilePath( + configFile: string | undefined, + root: string, + configRootPath: string +): Promise { + if (configFile) { + return path.resolve(root, configFile); + } else { + return await getConfigFilePath(configRootPath); + } +} + +// export async function handleServerPortConflict( +// resolvedUserConfig: ResolvedUserConfig, +// logger: Logger, +// mode?: CompilationMode +// ) { +// // check port availability: auto increment the port if a conflict occurs + +// try { +// mode !== 'production' && +// (await Server.resolvePortConflict(resolvedUserConfig.server, logger)); +// // eslint-disable-next-line no-empty +// } catch {} +// } + +export function checkClearScreen( + inlineConfig: FarmCliOptions | ResolvedUserConfig +) { + if ( + inlineConfig?.clearScreen && + !__FARM_GLOBAL__.__FARM_RESTART_DEV_SERVER__ + ) { + clearScreen(); + } +} + +export function getFormat(configFilePath: string): Format { + return process.env.FARM_CONFIG_FORMAT === 'cjs' + ? 'cjs' + : process.env.FARM_CONFIG_FORMAT === 'esm' + ? 'esm' + : formatFromExt[path.extname(configFilePath).slice(1)] ?? 'esm'; +} + +export function getFilePath(outputPath: string, fileName: string): string { + return isWindows + ? pathToFileURL(path.join(outputPath, fileName)).toString() + : path.join(outputPath, fileName); +} + +async function setLazyCompilationDefine( + resolvedUserConfig: ResolvedUserConfig +) { + const hostname = await resolveHostname(resolvedUserConfig.server.host); + resolvedUserConfig.compilation.define = { + ...(resolvedUserConfig.compilation.define ?? {}), + FARM_LAZY_COMPILE_SERVER_URL: `${ + resolvedUserConfig.server.protocol || 'http' + }://${hostname.host || 'localhost'}:${resolvedUserConfig.server.port}` + }; +} diff --git a/packages/core/src/config/mergeConfig.ts b/packages/core/src/config/mergeConfig.ts index f58578b62..ec4b841d2 100644 --- a/packages/core/src/config/mergeConfig.ts +++ b/packages/core/src/config/mergeConfig.ts @@ -1,7 +1,7 @@ import path, { isAbsolute } from 'node:path'; import { isString } from '../plugin/js/utils.js'; import { isArray, isObject } from '../utils/share.js'; -import { FarmCLIOptions, UserConfig } from './types.js'; +import { FarmCliOptions, UserConfig } from './types.js'; // eslint-disable-next-line @typescript-eslint/no-explicit-any export function mergeConfig>( @@ -46,10 +46,12 @@ export function mergeConfig>( } export function mergeFarmCliConfig( - cliOption: FarmCLIOptions & UserConfig, - target: UserConfig + cliOption: FarmCliOptions & UserConfig, + target: UserConfig, + mode?: 'development' | 'production' ): UserConfig { let left: UserConfig = {}; + const options = initialCliOptions(cliOption); ( [ @@ -57,15 +59,17 @@ export function mergeFarmCliConfig( 'compilation', 'envDir', 'envPrefix', + 'timeUnit', + 'watch', 'plugins', 'publicDir', 'server', 'vitePlugins' ] satisfies (keyof UserConfig)[] - ).forEach((key) => { - const value = cliOption[key]; + ).forEach((key: keyof (FarmCliOptions & UserConfig)) => { + const value = options[key]; if (value || typeof value === 'boolean') { - left = mergeConfig(left, { [key]: cliOption[key] }); + left = mergeConfig(left, { [key]: options[key] }); } }); @@ -77,12 +81,12 @@ export function mergeFarmCliConfig( const cliRoot = cliOption.root; if (!isAbsolute(cliRoot)) { - target.root = path.resolve(process.cwd(), cliRoot); + target.root = path.resolve(cliRoot); } else { target.root = cliRoot; } } else { - target.root = process.cwd(); + target.root = path.resolve('.'); } if (configRootPath) { @@ -90,60 +94,102 @@ export function mergeFarmCliConfig( } if (target.root && !isAbsolute(target.root)) { - const resolvedRoot = path.resolve(cliOption.configPath, target.root); + const resolvedRoot = path.resolve(cliOption.configFile, target.root); target.root = resolvedRoot; } } - if (isString(cliOption.host) || typeof cliOption.host === 'boolean') { - left = mergeConfig(left, { server: { host: cliOption.host } }); + if ( + isString(options.server?.host) || + typeof options.server?.host === 'boolean' + ) { + left = mergeConfig(left, { server: { host: options.host } }); } - if (typeof cliOption.minify === 'boolean') { - left = mergeConfig(left, { compilation: { minify: cliOption.minify } }); + if (typeof options.compilation.minify === 'boolean') { + left = mergeConfig(left, { compilation: { minify: options.minify } }); } - if (cliOption.outDir) { + if (options.compilation.output.outDir) { left = mergeConfig(left, { - compilation: { output: { path: cliOption.outDir } } + compilation: { output: { path: options.outDir } } }); } - if (cliOption.port) { + if (options.server?.port) { left = mergeConfig(left, { server: { - port: cliOption.port + port: options.port } }); } - if (cliOption.mode) { + if (options.mode) { left = mergeConfig(left, { compilation: { - mode: cliOption.mode as UserConfig['compilation']['mode'] + mode: mode ?? (options.mode as UserConfig['compilation']['mode']) } }); } - if (cliOption.https) { + if (options.server?.https) { left = mergeConfig(left, { server: { - https: cliOption.https + https: options.https } }); } - if (cliOption.sourcemap) { + if (options.compilation?.sourcemap) { left = mergeConfig(left, { - compilation: { sourcemap: cliOption.sourcemap } + compilation: { sourcemap: options.sourcemap } + }); + } + if (options.timeUnit) { + left = mergeConfig(left, { + timeUnit: options.timeUnit }); } return mergeConfig(left, target); } -export function initialCliOptions(options: FarmCLIOptions): FarmCLIOptions { - return { - ...options +export function initialCliOptions(options: any): any { + const { mode, watch } = options; + + const compilationOptions = options.compilation || {}; + const { minify, sourcemap, treeShaking } = compilationOptions; + const { outDir, target, format } = compilationOptions.output || {}; + + const input = compilationOptions.input + ? Object.values(compilationOptions.input).filter(Boolean) + : []; + const hasInput = input.length > 0; + + const output: UserConfig['compilation']['output'] = { + ...(outDir && { path: outDir }), + ...(target && { targetEnv: target }), + ...(format && { format }) }; + + const compilation: UserConfig['compilation'] = { + input: hasInput ? { ...compilationOptions.input } : {}, + output, + ...(minify && { minify }), + ...(sourcemap && { sourcemap }), + ...(treeShaking && { treeShaking }) + }; + + const defaultOptions: any = { + compilation, + watch: !!watch, + root: options.root, + server: options.server, + clearScreen: !!options.clearScreen, + configFile: options.configFile, + timeUnit: options.timeUnit, + ...(mode && { mode }) + }; + + return defaultOptions; } diff --git a/packages/core/src/config/normalize-config/normalize-css.ts b/packages/core/src/config/normalize-config/normalize-css.ts index 5b28827bb..eedb48196 100644 --- a/packages/core/src/config/normalize-config/normalize-css.ts +++ b/packages/core/src/config/normalize-config/normalize-css.ts @@ -1,6 +1,5 @@ import { CUSTOM_KEYS } from '../constants.js'; import { ResolvedCompilation, UserConfig } from '../types.js'; - export function normalizeCss( config: UserConfig, resolvedCompilation: ResolvedCompilation @@ -9,7 +8,6 @@ export function normalizeCss( normalizeCssModules(config, resolvedCompilation); } } - function normalizeCssModules( config: UserConfig, resolvedCompilation: ResolvedCompilation diff --git a/packages/core/src/config/normalize-config/normalize-external.ts b/packages/core/src/config/normalize-config/normalize-external.ts index e950fc119..9ba81ebb8 100644 --- a/packages/core/src/config/normalize-config/normalize-external.ts +++ b/packages/core/src/config/normalize-config/normalize-external.ts @@ -2,10 +2,11 @@ import module from 'node:module'; import { existsSync, readFileSync } from 'node:fs'; import path from 'node:path'; + import { Config } from '../../types/binding.js'; -import { safeJsonParse } from '../../utils/json.js'; -import { isObject } from '../../utils/share.js'; +import { isObject, safeJsonParse } from '../../utils/index.js'; import { CUSTOM_KEYS } from '../constants.js'; + import type { ResolvedCompilation, UserConfig } from '../types.js'; type PartialExternal = [string[], Record]; @@ -62,6 +63,7 @@ export function normalizeExternal( defaultExternals.push( ...[...module.builtinModules].filter( (m) => + //@ts-ignore !resolvedCompilation.resolve?.alias?.[m] && !packageJson?.devDependencies?.[m] && !packageJson?.dependencies?.[m] diff --git a/packages/core/src/config/normalize-config/normalize-output.ts b/packages/core/src/config/normalize-config/normalize-output.ts index 386d1fb11..253be463d 100644 --- a/packages/core/src/config/normalize-config/normalize-output.ts +++ b/packages/core/src/config/normalize-config/normalize-output.ts @@ -7,7 +7,7 @@ import { Logger } from '../../utils/logger.js'; import { FARM_TARGET_BROWSER_ENVS, mapTargetEnvValue, - normalizeBasePath + normalizePath } from '../../utils/share.js'; import { ResolvedCompilation } from '../types.js'; @@ -266,7 +266,7 @@ export function getValidPublicPath(publicPath = '/'): string { if (publicPath.startsWith('/')) { validPublicPath = publicPath; } else if (publicPath.startsWith('.')) { - validPublicPath = normalizeBasePath(path.join('/', publicPath)); + validPublicPath = normalizePath(path.join('/', publicPath)); } return validPublicPath; diff --git a/packages/core/src/config/normalize-config/normalize-partial-bundling.ts b/packages/core/src/config/normalize-config/normalize-partial-bundling.ts new file mode 100644 index 000000000..29227b2ad --- /dev/null +++ b/packages/core/src/config/normalize-config/normalize-partial-bundling.ts @@ -0,0 +1,18 @@ +import { CUSTOM_KEYS } from '../constants.js'; +import { ResolvedCompilation } from '../types.js'; + +export default function normalizePartialBundling( + resolvedCompilation: ResolvedCompilation +) { + const partialBundlingItemEnforceMap: Record = {}; + const partialBundleGroups = resolvedCompilation.partialBundling?.groups ?? []; + + for (const group of partialBundleGroups) { + if (group.enforce) { + partialBundlingItemEnforceMap[group.name] = true; + } + } + + resolvedCompilation.custom[CUSTOM_KEYS.partial_bundling_groups_enforce] = + JSON.stringify(partialBundlingItemEnforceMap); +} diff --git a/packages/core/src/config/normalize-config/normalize-persistent-cache.ts b/packages/core/src/config/normalize-config/normalize-persistent-cache.ts index b493a2023..603c19ebd 100644 --- a/packages/core/src/config/normalize-config/normalize-persistent-cache.ts +++ b/packages/core/src/config/normalize-config/normalize-persistent-cache.ts @@ -4,7 +4,6 @@ import path from 'node:path'; import { RustPlugin } from '../../plugin/index.js'; import { Config } from '../../types/binding.js'; -import { Logger } from '../../utils/logger.js'; import { traceDependencies } from '../../utils/trace-dependencies.js'; import { isDisableCache } from '../env.js'; import { ResolvedUserConfig } from '../index.js'; @@ -19,8 +18,7 @@ const defaultGlobalBuiltinCacheKeyStrategy = { export async function normalizePersistentCache( config: Config['config'], - resolvedUserConfig: ResolvedUserConfig, - logger: Logger + resolvedUserConfig: ResolvedUserConfig ) { if (isDisableCache()) { config.persistentCache = false; @@ -30,6 +28,16 @@ export async function normalizePersistentCache( return; } + if ( + typeof config.persistentCache === 'object' && + config.persistentCache.cacheDir + ) { + config.persistentCache.cacheDir = path.resolve( + config.root, + config.persistentCache.cacheDir + ); + } + if (config.persistentCache === true || config.persistentCache == undefined) { config.persistentCache = { buildDependencies: [], @@ -134,7 +142,7 @@ export async function normalizePersistentCache( ) { const files = resolvedUserConfig?.configFileDependencies?.length ? resolvedUserConfig.configFileDependencies - : await traceDependencies(resolvedUserConfig.configFilePath, logger); + : await traceDependencies(resolvedUserConfig.configFilePath); const packages = []; diff --git a/packages/core/src/config/normalize-config/normalize-resolve.ts b/packages/core/src/config/normalize-config/normalize-resolve.ts index b68c0031f..8203e397b 100644 --- a/packages/core/src/config/normalize-config/normalize-resolve.ts +++ b/packages/core/src/config/normalize-config/normalize-resolve.ts @@ -16,4 +16,64 @@ export function normalizeResolve( resolvedCompilation.custom[CUSTOM_KEYS.resolve_dedupe] = JSON.stringify(dedupe); + + const alias = normalizeResolveAlias(config); + + if (alias.length) { + resolvedCompilation.resolve.alias = alias; + } +} + +export function normalizeResolveAlias( + config: any +): Array<{ find: string | RegExp; replacement: string }> { + const alias = config.compilation.resolve?.alias; + const logger = config.logger; + + const normalizeItem = (find: string | RegExp, replacement: string) => { + if (typeof find === 'string' || find instanceof RegExp) { + if (typeof replacement === 'string') { + return { find, replacement }; + } + logger.warn(`Invalid replacement for '${find}': must be a string`); + } else { + logger.warn(`Invalid alias key: '${find}' must be a string or RegExp`); + } + return null; + }; + + const normalizeArray = (arr: any) => + arr + .map((item: any, _index: any) => + typeof item === 'object' && item !== null + ? normalizeItem(item.find, item.replacement) + : normalizeItem(item, item) + ) + .filter(Boolean); + + const normalizeObject = (obj: any) => { + return Object.entries(obj as Record) + .map(([find, replacement]) => { + const result = normalizeItem(find, replacement); + return result; + }) + .filter(Boolean); + }; + + let result: Array<{ find: string | RegExp; replacement: string }>; + switch (true) { + case alias === null || alias === undefined: + result = []; + break; + case Array.isArray(alias): + result = normalizeArray(alias); + break; + case typeof alias === 'object': + result = normalizeObject(alias); + break; + default: + logger.warn('Alias configuration must be an object or an array'); + result = []; + } + return result; } diff --git a/packages/core/src/config/schema.ts b/packages/core/src/config/schema.ts index e843350b5..bf646be46 100644 --- a/packages/core/src/config/schema.ts +++ b/packages/core/src/config/schema.ts @@ -1,17 +1,37 @@ -import http from 'http'; +import http from 'node:http'; import { SecureServerOptions } from 'node:http2'; + import { z } from 'zod'; import { fromZodError } from 'zod-validation-error'; import type { UserConfig } from './types.js'; -const stringRewriteSchema = z.record(z.string(), z.string()); +enum TargetEnv { + BROWSER = 'browser', + NODE = 'node', + NODE_LEGACY = 'node-legacy', + NODE_NEXT = 'node-next', + NODE16 = 'node16', + BROWSER_LEGACY = 'browser-legacy', + BROWSER_ESNEXT = 'browser-esnext', + BROWSER_ES2015 = 'browser-es2015', + BROWSER_ES2017 = 'browser-es2017', + LIBRARY = 'library', + LIBRARY_BROWSER = 'library-browser', + LIBRARY_NODE = 'library-node' +} -const functionRewriteSchema = z.union([ - z.function().args(z.string(), z.any()).returns(z.string()), - z.function().args(z.string(), z.any()).returns(z.promise(z.string())) +const baseRewriteSchema = z.union([ + z.record(z.string(), z.string()), + z + .function() + .args(z.string(), z.any()) + .returns(z.union([z.string(), z.promise(z.string())])) ]); +const stringRewriteSchema = baseRewriteSchema; +const functionRewriteSchema = baseRewriteSchema; + const pathFilterSchema = z.union([ z.string(), z.array(z.string()), @@ -21,44 +41,115 @@ const pathFilterSchema = z.union([ .returns(z.boolean()) ]); -const pathRewriteSchema = z.union([stringRewriteSchema, functionRewriteSchema]); +const pathRewriteSchema = baseRewriteSchema; + +const outputSchema = z + .object({ + entryFilename: z.string().optional(), + filename: z.string().optional(), + path: z.string().optional(), + publicPath: z.string().optional(), + assetsFilename: z.string().optional(), + targetEnv: z.nativeEnum(TargetEnv).optional(), + format: z.enum(['cjs', 'esm']).optional() + }) + .strict() + .optional(); + +const serverSchema = z + .object({ + headers: z.record(z.string()).optional(), + port: z.number().positive().int().optional(), + host: z + .union([ + z.string().regex(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/), + z.literal('localhost'), + z.boolean() + ]) + .optional(), + open: z.boolean().optional(), + https: z.custom(), + cors: z.boolean().optional(), + spa: z.boolean().optional(), + proxy: z + .record( + z + .object({ + target: z.string(), + changeOrigin: z.boolean().optional(), + agent: z.any().optional(), + secure: z.boolean().optional(), + logs: z.any().optional(), + pathRewrite: pathRewriteSchema.optional(), + pathFilter: pathFilterSchema.optional(), + headers: z.record(z.string()).optional(), + on: z + .object({ + proxyReq: z + .function() + .args(z.any(), z.any(), z.any()) + .returns(z.void()) + .optional(), + proxyRes: z + .function() + .args(z.any(), z.any(), z.any()) + .returns(z.void()) + .optional(), + error: z + .function() + .args(z.instanceof(Error), z.any(), z.any()) + .returns(z.void()) + .optional() + }) + .optional() + }) + .passthrough() + ) + .optional(), + strictPort: z.boolean().optional(), + hmr: z + .union([ + z.boolean(), + z + .object({ + protocol: z.string().optional(), + host: z.union([z.string().min(1), z.boolean()]).optional(), + port: z.number().positive().int().optional(), + path: z.string().optional(), + watchOptions: z + .object({ + awaitWriteFinish: z.number().positive().int().optional() + }) + .optional(), + overlay: z.boolean().optional() + }) + .strict() + ]) + .optional(), + middlewares: z.array(z.any()).optional(), + writeToDisk: z.boolean().optional() + }) + .strict(); + +const aliasItemSchema = z.object({ + find: z.union([z.string(), z.instanceof(RegExp)]), + replacement: z.string(), + customResolver: z + .union([z.function(), z.object({ resolve: z.function() })]) + .optional() +}); + +const aliasSchema = z.union([z.record(z.string()), z.array(aliasItemSchema)]); const compilationConfigSchema = z .object({ root: z.string().optional(), input: z.record(z.string()).optional(), - output: z - .object({ - entryFilename: z.string().optional(), - filename: z.string().optional(), - path: z.string().optional(), - publicPath: z.string().optional(), - assetsFilename: z.string().optional(), - targetEnv: z - .enum([ - 'browser', - 'node', - 'node-legacy', - 'node-next', - 'node16', - 'browser-legacy', - 'browser-esnext', - 'browser-es2015', - 'browser-es2017', - 'library', - 'library-browser', - 'library-node' - ]) - .optional(), - format: z.enum(['cjs', 'esm']).optional(), - clean: z.boolean().optional() - }) - .strict() - .optional(), + output: outputSchema, resolve: z .object({ extensions: z.array(z.string()).optional(), - alias: z.record(z.string()).optional(), + alias: aliasSchema.optional(), mainFields: z.array(z.string()).optional(), conditions: z.array(z.string()).optional(), symlinks: z.boolean().optional(), @@ -187,7 +278,8 @@ const compilationConfigSchema = z name: z.string(), test: z.array(z.string()), groupType: z.enum(['mutable', 'immutable']).optional(), - resourceType: z.enum(['all', 'initial', 'async']).optional() + resourceType: z.enum(['all', 'initial', 'async']).optional(), + enforce: z.boolean().optional() }) ) .optional(), @@ -204,7 +296,8 @@ const compilationConfigSchema = z enforceTargetConcurrentRequests: z.boolean().optional(), enforceTargetMinSize: z.boolean().optional(), immutableModules: z.array(z.string()).optional(), - immutableModulesWeight: z.number().optional() + immutableModulesWeight: z.number().optional(), + enforce: z.boolean().optional() }) .strict() .optional(), @@ -223,8 +316,7 @@ const compilationConfigSchema = z z.literal('minify-module'), z.literal('minify-resource-pot') ]) - .optional(), - moduleDecls: z.boolean().optional() + .optional() }) ]) .optional(), @@ -306,110 +398,27 @@ const FarmConfigSchema = z clearScreen: z.boolean().optional(), configPath: z.string().optional(), envDir: z.string().optional(), + timeUnit: z.union([z.literal('ms'), z.literal('s')]).optional(), envPrefix: z.union([z.string(), z.array(z.string())]).optional(), publicDir: z.string().optional(), plugins: z.array(z.any()).optional(), vitePlugins: z.array(z.any()).optional(), compilation: compilationConfigSchema.optional(), mode: z.string().optional(), - server: z - .object({ - headers: z.record(z.string()).optional(), - port: z.number().positive().int().optional(), - host: z - .union([ - z.string().regex(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/), - z.literal('localhost'), - z.boolean() - ]) - .optional(), - open: z.boolean().optional(), - https: z.custom(), - cors: z.boolean().optional(), - spa: z.boolean().optional(), - proxy: z - .record( - z - .object({ - target: z.string(), - changeOrigin: z.boolean().optional(), - agent: z.any().optional(), - secure: z.boolean().optional(), - logs: z.any().optional(), - pathRewrite: pathRewriteSchema.optional(), - pathFilter: pathFilterSchema.optional(), - headers: z.record(z.string()).optional(), - on: z - .object({ - proxyReq: z - .function() - .args( - z.instanceof(Object), - z.instanceof(Object), - z.instanceof(Object) - ) - .returns(z.void()) - .optional(), - proxyRes: z - .function() - .args( - z.instanceof(Object), - z.instanceof(Object), - z.instanceof(Object) - ) - .returns(z.void()) - .optional(), - error: z - .function() - .args( - z.instanceof(Error), - z.instanceof(Object), - z.instanceof(Object) - ) - .returns(z.void()) - .optional() - }) - .optional() - }) - .passthrough() - ) - .optional(), - strictPort: z.boolean().optional(), - hmr: z - .union([ - z.boolean(), - z - .object({ - protocol: z.string().optional(), - host: z.union([z.string().min(1), z.boolean()]).optional(), - port: z.number().positive().int().optional(), - path: z.string().optional(), - watchOptions: z - .object({ - awaitWriteFinish: z.number().positive().int().optional() - }) - .optional(), - overlay: z.boolean().optional() - }) - .strict() - ]) - .optional(), - middlewares: z.array(z.any()).optional(), - writeToDisk: z.boolean().optional() - }) - .strict() - .optional() + watch: z.boolean().optional(), + server: serverSchema.optional(), + // TODO ANY type + customLogger: z.any().optional() }) .strict(); export function parseUserConfig(config: UserConfig): UserConfig { try { const parsed = FarmConfigSchema.parse(config); + // TODO type not need `as UserConfig` return parsed as UserConfig; - // return config as UserConfig; } catch (err) { const validationError = fromZodError(err); - // the error now is readable by the user throw new Error( `${validationError.toString()}. \n Please check your configuration file or command line configuration.` ); diff --git a/packages/core/src/config/types.ts b/packages/core/src/config/types.ts index 4f72214f1..90c92942b 100644 --- a/packages/core/src/config/types.ts +++ b/packages/core/src/config/types.ts @@ -2,21 +2,42 @@ import { SecureServerOptions } from 'node:http2'; import { Server } from '../index.js'; import type { OutgoingHttpHeaders } from 'http'; -import type cors from '@koa/cors'; import { WatchOptions } from 'chokidar'; -import type { Options } from 'http-proxy-middleware'; -import { Middleware } from 'koa'; import type { RustPlugin } from '../plugin/rust/index.js'; import type { JsPlugin } from '../plugin/type.js'; +import { HMRChannel } from '../server/hmr.js'; import type { Config, CssConfig } from '../types/binding.js'; import type { Logger } from '../utils/index.js'; +// export interface HmrOptions { +// protocol?: string; +// host?: string; +// port?: number; +// clientPort?: number; +// path?: string; +// timeout?: number; +// overlay?: boolean; +// server?: Server; +// } +export interface HmrOptions { + protocol?: string; + host?: string; + port?: number; + clientPort?: number; + path?: string; + timeout?: number; + overlay?: boolean; + server?: Server; + /** @internal */ + channels?: HMRChannel[]; +} + export interface ConfigEnv { mode: string; + command: string; + isPreview: boolean; } -export type ProxyOptions = Options; - export type UserConfigFnPromise = (env: ConfigEnv) => Promise; export type UserConfigFn = (env: ConfigEnv) => UserConfig | Promise; export type UserConfigFnObject = (env: ConfigEnv) => UserConfig; @@ -36,14 +57,15 @@ export interface UserServerConfig { hostname?: { name: string; host: string | undefined }; // http2?: boolean; hmr?: boolean | UserHmrConfig; - proxy?: Record; + proxy?: Record; strictPort?: boolean; open?: boolean; host?: string | boolean; - cors?: boolean | cors.Options; + cors?: boolean | any; // whether to serve static assets in spa mode, default to true spa?: boolean; middlewares?: DevServerMiddleware[]; + middlewareMode?: boolean | string; writeToDisk?: boolean; } @@ -58,7 +80,7 @@ export interface UserPreviewServerConfig { export type NormalizedServerConfig = Required< Omit & { - hmr?: Required; + hmr?: UserHmrConfig; } >; @@ -67,13 +89,9 @@ export interface NormalizedConfig { serverConfig?: NormalizedServerConfig; } -export interface UserHmrConfig { - host?: string | boolean; - port?: number; - path?: string; - overlay?: boolean; - protocol?: string; +export interface UserHmrConfig extends HmrOptions { watchOptions?: WatchOptions; + overlay?: boolean; } type InternalConfig = Config['config'] extends undefined @@ -90,8 +108,10 @@ export interface UserConfig { root?: string; clearScreen?: boolean; envDir?: string; + watch?: boolean; envPrefix?: string | string[]; publicDir?: string; + timeUnit?: 'ms' | 's'; /** js plugin(which is a javascript object) and rust plugin(which is string refer to a .farm file or a package) */ plugins?: (RustPlugin | JsPlugin | JsPlugin[] | undefined | null | false)[]; /** vite plugins */ @@ -106,6 +126,13 @@ export interface UserConfig { /** config related to dev server */ server?: UserServerConfig; /** Files under this dir will always be treated as static assets. serve it in dev, and copy it to output.path when build */ + logger?: Logger; +} + +interface ResolvedCss extends CssConfig { + modules?: CssConfig['modules'] & { + localsConversion?: never; + }; } interface ResolvedCss extends CssConfig { @@ -126,20 +153,26 @@ export interface ResolvedCompilation } export interface ResolvedUserConfig extends UserConfig { + // watch?: boolean; + // root?: string; env?: Record; envDir?: string; envFiles?: string[]; envPrefix?: string | string[]; configFilePath?: string; envMode?: string; + timeUnit?: 'ms' | 's'; configFileDependencies?: string[]; compilation?: ResolvedCompilation; server?: NormalizedServerConfig; jsPlugins?: JsPlugin[]; rustPlugins?: [string, string][]; + inlineConfig?: FarmCliOptions; + logger?: Logger; + watch?: boolean; } -export interface GlobalFarmCLIOptions { +export interface GlobalCliOptions { '--'?: string[]; c?: boolean | string; config?: string; @@ -169,11 +202,13 @@ export interface FarmCLIPreviewOptions { host?: string | boolean; } -export interface FarmCLIOptions +export interface FarmCliOptions extends FarmCLIBuildOptions, FarmCLIPreviewOptions { logger?: Logger; config?: string; + configFile?: string; + // todo: check to delete configPath?: string; compilation?: Config['config']; mode?: string; @@ -182,7 +217,7 @@ export interface FarmCLIOptions clearScreen?: boolean; } -export type DevServerMiddleware = (context: Server) => Middleware | undefined; +export type DevServerMiddleware = (context: Server) => any | undefined; export interface Alias { // TODO support RegExp diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 70dc69d1c..bdba8dd60 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -3,261 +3,142 @@ export * from './config/index.js'; export * from './server/index.js'; export * from './plugin/type.js'; export * from './utils/index.js'; -export type { - ModuleType, - ResolveKind, - PluginLoadHookParam, - PluginLoadHookResult, - PluginResolveHookParam, - PluginResolveHookResult, - OutputConfig, - ResolveConfig, - RuntimeConfig, - ScriptConfig, - CssConfig, - PersistentCacheConfig, - PartialBundlingConfig, - PresetEnvConfig, - Config, - PluginTransformHookParam, - PluginTransformHookResult -} from './types/binding.js'; -import { statSync } from 'node:fs'; -import fs from 'node:fs/promises'; -import path from 'node:path'; -import fse from 'fs-extra'; +export { defineFarmConfig as defineConfig } from './config/index.js'; -import { Compiler } from './compiler/index.js'; -import { loadEnv, setProcessEnv } from './config/env.js'; -import { - UserConfig, - checkClearScreen, - getConfigFilePath, - normalizePublicDir, - resolveConfig -} from './config/index.js'; -import { Server } from './server/index.js'; -import { compilerHandler } from './utils/build.js'; -import { colors } from './utils/color.js'; -import { Logger } from './utils/logger.js'; -import { FileWatcher } from './watcher/index.js'; +export type { Compiler as BindingCompiler } from './types/binding.js'; -import { __FARM_GLOBAL__ } from './config/_global.js'; -import type { - FarmCLIOptions, - ResolvedUserConfig, - UserPreviewServerConfig -} from './config/types.js'; -import { logError } from './server/error.js'; -import { lazyCompilation } from './server/middlewares/lazy-compilation.js'; -import { ConfigWatcher } from './watcher/config-watcher.js'; +import fs from 'node:fs/promises'; -import type { JsPlugin } from './plugin/type.js'; -import { resolveHostname } from './utils/http.js'; +import { createCompiler } from './compiler/index.js'; +import { __FARM_GLOBAL__ } from './config/_global.js'; +import { UserConfig, resolveConfig } from './config/index.js'; +import { getPluginHooks } from './plugin/index.js'; +import { Server } from './server/index.js'; +import { PersistentCacheConfig } from './types/binding.js'; +import { + PersistentCacheBrand, + bold, + colors, + copyPublicDirectory, + findNodeModulesRecursively, + getShortName, + green +} from './utils/index.js'; +import { handlerWatcher } from './watcher/index.js'; + +import type { FarmCliOptions } from './config/types.js'; export async function start( - inlineConfig?: FarmCLIOptions & UserConfig + inlineConfig?: FarmCliOptions & UserConfig ): Promise { inlineConfig = inlineConfig ?? {}; - const logger = inlineConfig.logger ?? new Logger(); - setProcessEnv('development'); - + const server = new Server(inlineConfig); try { - const resolvedUserConfig = await resolveConfig( - inlineConfig, - 'development', - logger - ); - - if ( - resolvedUserConfig.compilation.lazyCompilation && - typeof resolvedUserConfig.server?.host === 'string' - ) { - await setLazyCompilationDefine(resolvedUserConfig); - } - - const compiler = await createCompiler(resolvedUserConfig, logger); - - const devServer = await createDevServer( - compiler, - resolvedUserConfig, - logger - ); - - await devServer.listen(); + await server.createServer(); + server.listen(); } catch (error) { - logger.error('Failed to start the server', { exit: true, error }); + server.logger.error('Failed to start the server', { exit: false, error }); } } export async function build( - inlineConfig?: FarmCLIOptions & UserConfig + inlineConfig: FarmCliOptions & UserConfig = {} ): Promise { - inlineConfig = inlineConfig ?? {}; - const logger = inlineConfig.logger ?? new Logger(); - setProcessEnv('production'); - - const resolvedUserConfig = await resolveConfig( - inlineConfig, - 'production', - logger, - false - ); - - try { - await createBundleHandler(resolvedUserConfig, logger); - // copy resources under publicDir to output.path - await copyPublicDirectory(resolvedUserConfig, logger); - } catch (err) { - logger.error(`Failed to build: ${err}`, { exit: true }); - } -} - -export async function preview(inlineConfig?: FarmCLIOptions): Promise { - inlineConfig = inlineConfig ?? {}; - const logger = inlineConfig.logger ?? new Logger(); const resolvedUserConfig = await resolveConfig( inlineConfig, + 'build', 'production', - logger + 'production' ); - const { root, output } = resolvedUserConfig.compilation; - const distDir = path.resolve(root, output.path); + const { persistentCache, output } = resolvedUserConfig.compilation; try { - statSync(distDir); - } catch (err) { - if (err.code === 'ENOENT') { - throw new Error( - `The directory "${distDir}" does not exist. Did you build your project?` - ); - } - } - - // reusing port conflict check from DevServer - const serverConfig = { - ...resolvedUserConfig.server, - host: inlineConfig.host ?? true, - port: - inlineConfig.port ?? - (Number(process.env.FARM_DEFAULT_SERVER_PORT) || 1911) - }; - await Server.resolvePortConflict(serverConfig, logger); - const port = serverConfig.port; - const host = serverConfig.host; - const previewOptions: UserPreviewServerConfig = { - ...serverConfig, - distDir, - output: { path: output.path, publicPath: output.publicPath }, - port, - host - }; - - const server = new Server({ logger }); - server.createPreviewServer(previewOptions); -} - -export async function watch( - inlineConfig?: FarmCLIOptions & UserConfig -): Promise { - inlineConfig = inlineConfig ?? {}; - const logger = inlineConfig.logger ?? new Logger(); - setProcessEnv('development'); - - inlineConfig.server ??= {}; - inlineConfig.server.hmr ??= false; - - const resolvedUserConfig = await resolveConfig( - inlineConfig, - 'development', - logger, - false - ); - - const lazyEnabled = resolvedUserConfig.compilation?.lazyCompilation; - - if (lazyEnabled) { - await setLazyCompilationDefine(resolvedUserConfig); - } - - const compilerFileWatcher = await createBundleHandler( - resolvedUserConfig, - logger, - true - ); - - let devServer: Server | undefined; - // create dev server for lazy compilation - if (lazyEnabled) { - devServer = new Server({ - logger, - compiler: compilerFileWatcher.serverOrCompiler as Compiler - }); - await devServer.createServer(resolvedUserConfig.server); - devServer.applyMiddlewares([lazyCompilation]); - await devServer.startServer(resolvedUserConfig.server); - } - - async function handleFileChange(files: string[]) { - logFileChanges(files, resolvedUserConfig.root, logger); + const compiler = await createCompiler(resolvedUserConfig); - try { - farmWatcher.close(); - - if (lazyEnabled && devServer) { - devServer.close(); - } + for (const hook of getPluginHooks( + resolvedUserConfig.jsPlugins, + 'configureCompiler' + )) { + await hook?.(compiler); + } - __FARM_GLOBAL__.__FARM_RESTART_DEV_SERVER__ = true; + if (output?.clean) { + compiler.removeOutputPathDir(); + } - compilerFileWatcher?.close(); + const startTime = performance.now(); + await compiler.compile(); + const elapsedTime = Math.floor(performance.now() - startTime); + const persistentCacheText = persistentCache + ? bold(PersistentCacheBrand) + : ''; - await watch(inlineConfig); - } catch (error) { - logger.error(`Error restarting the watcher: ${error.message}`); + const shortFile = getShortName( + resolvedUserConfig.configFilePath, + resolvedUserConfig.root + ); + resolvedUserConfig.logger.info( + `Using config file at ${bold(green(shortFile))}` + ); + resolvedUserConfig.logger.info( + `Build completed in ${bold( + green(`${elapsedTime}ms`) + )} ${persistentCacheText} Resources emitted to ${bold( + green(output.path) + )}.` + ); + compiler.writeResourcesToDisk(); + await copyPublicDirectory(resolvedUserConfig); + if (resolvedUserConfig.watch) { + handlerWatcher(resolvedUserConfig, compiler); } + } catch (err) { + resolvedUserConfig.logger.error(`Failed to build: ${err}`, { exit: true }); } - - const farmWatcher = new ConfigWatcher(resolvedUserConfig).watch( - handleFileChange - ); } +// TODO preview method +export async function preview(inlineConfig: FarmCliOptions & UserConfig = {}) {} + export async function clean( rootPath: string, recursive?: boolean | undefined ): Promise { - // TODO After optimizing the reading of config, put the clean method into compiler - const logger = new Logger(); + const resolvedUserConfig = await resolveConfig( + {}, + 'build', + 'production', + 'production' + ); + const cachePath = ( + resolvedUserConfig.compilation.persistentCache as PersistentCacheConfig + ).cacheDir; const nodeModulesFolders = recursive ? await findNodeModulesRecursively(rootPath) - : [path.join(rootPath, 'node_modules')]; + : [cachePath]; await Promise.all( nodeModulesFolders.map(async (nodeModulesPath) => { - // TODO Bug .farm cacheDir folder not right - const farmFolderPath = path.join(nodeModulesPath, '.farm'); try { - const stats = await fs.stat(farmFolderPath); - if (stats.isDirectory()) { - await fs.rm(farmFolderPath, { recursive: true, force: true }); - // TODO optimize nodeModulePath path e.g: /Users/xxx/node_modules/.farm/cache - logger.info( - `Cache cleaned at ${colors.bold(colors.green(nodeModulesPath))}` + const farmFolderStats = await fs.stat(cachePath); + if (farmFolderStats.isDirectory()) { + await fs.rm(cachePath, { recursive: true, force: true }); + resolvedUserConfig.logger.info( + `✨ ✨ Cache cleaned at ${colors.bold(colors.green(cachePath))}` ); } } catch (error) { - if (error.code === 'ENOENT') { - logger.warn( + if (error?.code === 'ENOENT') { + resolvedUserConfig.logger.warn( `No cached files found in ${colors.bold( colors.green(nodeModulesPath) )}` ); } else { - logger.error( + resolvedUserConfig.logger.error( `Error cleaning cache in ${colors.bold( colors.green(nodeModulesPath) )}: ${error.message}` @@ -267,203 +148,3 @@ export async function clean( }) ); } - -async function findNodeModulesRecursively(rootPath: string): Promise { - const result: string[] = []; - - async function traverse(currentPath: string) { - const items = await fs.readdir(currentPath); - for (const item of items) { - const fullPath = path.join(currentPath, item); - const stats = await fs.stat(fullPath); - - if (stats.isDirectory()) { - if (item === 'node_modules') { - result.push(fullPath); - } else { - await traverse(fullPath); - } - } - } - } - - await traverse(rootPath); - return result; -} - -export async function createBundleHandler( - resolvedUserConfig: ResolvedUserConfig, - logger: Logger, - watchMode = false -) { - const compiler = await createCompiler(resolvedUserConfig, logger); - - await compilerHandler( - async () => { - if (resolvedUserConfig.compilation?.output?.clean) { - compiler.removeOutputPathDir(); - } - try { - await compiler.compile(); - } catch (err) { - throw new Error(logError(err) as unknown as string); - } - compiler.writeResourcesToDisk(); - }, - resolvedUserConfig, - logger - ); - - if (resolvedUserConfig.compilation?.watch || watchMode) { - const watcher = new FileWatcher(compiler, resolvedUserConfig, logger); - await watcher.watch(); - return watcher; - } -} - -export async function createCompiler( - resolvedUserConfig: ResolvedUserConfig, - logger: Logger -) { - const { - jsPlugins, - rustPlugins, - compilation: compilationConfig - } = resolvedUserConfig; - - const compiler = new Compiler( - { - config: compilationConfig, - jsPlugins, - rustPlugins - }, - logger - ); - - for (const plugin of jsPlugins) { - await plugin.configureCompiler?.(compiler); - } - - return compiler; -} - -async function copyPublicDirectory( - resolvedUserConfig: ResolvedUserConfig, - logger: Logger -): Promise { - const absPublicDirPath = normalizePublicDir( - resolvedUserConfig.root, - resolvedUserConfig.publicDir - ); - - try { - if (await fse.pathExists(absPublicDirPath)) { - const files = await fse.readdir(absPublicDirPath); - const outputPath = resolvedUserConfig.compilation.output.path; - for (const file of files) { - const publicFile = path.join(absPublicDirPath, file); - const destFile = path.join(outputPath, file); - - if (await fse.pathExists(destFile)) { - continue; - } - await fse.copy(publicFile, destFile); - } - - logger.info( - `Public directory resources copied ${colors.bold( - colors.green('successfully') - )}.` - ); - } - } catch (error) { - logger.error(`Error copying public directory: ${error.message}`); - } -} - -export async function createDevServer( - compiler: Compiler, - resolvedUserConfig: ResolvedUserConfig, - logger: Logger -) { - const server = new Server({ compiler, logger }); - await server.createDevServer(resolvedUserConfig.server); - await createFileWatcher(server, resolvedUserConfig, logger); - // call configureDevServer hook after both server and watcher are ready - resolvedUserConfig.jsPlugins.forEach((plugin: JsPlugin) => - plugin.configureDevServer?.(server) - ); - - return server; -} - -export async function createFileWatcher( - devServer: Server, - resolvedUserConfig: ResolvedUserConfig, - logger: Logger = new Logger() -) { - if ( - devServer.config.hmr && - resolvedUserConfig.compilation.mode === 'production' - ) { - logger.error('HMR cannot be enabled in production mode.'); - return; - } - - if (!devServer.config.hmr) { - return; - } - - if (devServer.watcher) { - return; - } - - const fileWatcher = new FileWatcher(devServer, resolvedUserConfig, logger); - devServer.watcher = fileWatcher; - await fileWatcher.watch(); - - const configFilePath = await getConfigFilePath(resolvedUserConfig.root); - const farmWatcher = new ConfigWatcher({ - ...resolvedUserConfig, - configFilePath - }); - farmWatcher.watch(async (files: string[]) => { - checkClearScreen(resolvedUserConfig); - - devServer.restart(async () => { - logFileChanges(files, resolvedUserConfig.root, logger); - farmWatcher?.close(); - - await devServer.close(); - __FARM_GLOBAL__.__FARM_RESTART_DEV_SERVER__ = true; - // TODO: resolvedUserConfig params type check - await start(resolvedUserConfig as unknown as FarmCLIOptions & UserConfig); - }); - }); - return fileWatcher; -} - -export function logFileChanges(files: string[], root: string, logger: Logger) { - const changedFiles = files - .map((file) => path.relative(root, file)) - .join(', '); - logger.info( - colors.bold(colors.green(`${changedFiles} changed, server will restart.`)) - ); -} - -async function setLazyCompilationDefine( - resolvedUserConfig: ResolvedUserConfig -) { - const hostname = await resolveHostname(resolvedUserConfig.server.host); - resolvedUserConfig.compilation.define = { - ...(resolvedUserConfig.compilation.define ?? {}), - FARM_LAZY_COMPILE_SERVER_URL: `${ - resolvedUserConfig.server.protocol || 'http' - }://${hostname.host || 'localhost'}:${resolvedUserConfig.server.port}` - }; -} - -export { defineFarmConfig as defineConfig } from './config/index.js'; - -export { loadEnv }; diff --git a/packages/core/src/plugin/index.ts b/packages/core/src/plugin/index.ts index 73c010f6e..7df19d072 100644 --- a/packages/core/src/plugin/index.ts +++ b/packages/core/src/plugin/index.ts @@ -141,9 +141,29 @@ export function getSortedPlugins(plugins: readonly JsPlugin[]): JsPlugin[] { return [...prePlugins, ...normalPlugins, ...postPlugins]; } +export function getPluginHooks( + plugins: JsPlugin[], + hookName: keyof JsPlugin +): any { + return plugins.map((p: JsPlugin) => p[hookName]).filter(Boolean); +} + export function getSortedPluginHooks( plugins: JsPlugin[], hookName: keyof JsPlugin ): any { + plugins = getSortedPlugins(plugins); return plugins.map((p: JsPlugin) => p[hookName]).filter(Boolean); } + +export function getSortedPluginHooksBindThis( + plugins: JsPlugin[], + hookName: keyof JsPlugin +) { + plugins = getSortedPlugins(plugins); + return plugins + .map((p: JsPlugin) => + typeof p[hookName] === 'function' ? p[hookName].bind(p) : p[hookName] + ) + .filter(Boolean); +} diff --git a/packages/core/src/plugin/js/adapter-plugins/default-load.ts b/packages/core/src/plugin/js/adapter-plugins/default-load.ts index 81d4d4f33..fee2ea1f0 100644 --- a/packages/core/src/plugin/js/adapter-plugins/default-load.ts +++ b/packages/core/src/plugin/js/adapter-plugins/default-load.ts @@ -12,10 +12,10 @@ import { VitePluginAdapter } from '../vite-plugin-adapter.js'; export function defaultLoadPlugin(options: { filtersUnion: Set; - logger: Logger; userConfig: UserConfig; }): JsPlugin { - const { filtersUnion, logger, userConfig } = options; + const logger = new Logger(); + const { filtersUnion, userConfig } = options; const resolvedPaths = Array.from(filtersUnion).map(normalizeFilterPath); return { diff --git a/packages/core/src/plugin/js/constants.ts b/packages/core/src/plugin/js/constants.ts index b21f1d638..3c19054c7 100644 --- a/packages/core/src/plugin/js/constants.ts +++ b/packages/core/src/plugin/js/constants.ts @@ -36,6 +36,7 @@ export const VITE_DEFAULT_ASSETS: string[] = [ 'pdf', 'txt' ]; + // the name of the virtual module internal the adapter export const VITE_ADAPTER_VIRTUAL_MODULE: string = 'vite-adapter-virtual:'; diff --git a/packages/core/src/plugin/js/farm-to-vite-config.ts b/packages/core/src/plugin/js/farm-to-vite-config.ts index 451feeff3..5a50a19ca 100644 --- a/packages/core/src/plugin/js/farm-to-vite-config.ts +++ b/packages/core/src/plugin/js/farm-to-vite-config.ts @@ -85,6 +85,8 @@ export function farmUserConfigToViteConfig(config: UserConfig): ViteUserConfig { // TODO make it configurable cacheDir: 'node_modules/.farm/cache', envDir: config.envDir, + // @ts-ignore + env: config.env, assetsInclude: [ ...VITE_DEFAULT_ASSETS, ...(config.compilation?.assets?.include ?? []) @@ -232,6 +234,7 @@ export function proxyViteConfig( 'css', 'build', 'logger', + 'env', 'cacheDir', 'envDir', 'assetsInclude', @@ -349,19 +352,19 @@ export function viteConfigToFarmConfig( >; } else { if (!farmConfig.compilation.resolve.alias) { - farmConfig.compilation.resolve.alias = {}; + farmConfig.compilation.resolve.alias = []; } const farmRegexPrefix = '$__farm_regex:'; - for (const { find, replacement } of config.resolve.alias) { - if (find instanceof RegExp) { - const key = farmRegexPrefix + find.source; - farmConfig.compilation.resolve.alias[key] = replacement; - } else { - farmConfig.compilation.resolve.alias[find] = replacement; - } - } + // for (const { find, replacement } of config.resolve.alias) { + // if (find instanceof RegExp) { + // const key = farmRegexPrefix + find.source; + // farmConfig.compilation.resolve.alias[key] = replacement; + // } else { + // farmConfig.compilation.resolve.alias[find] = replacement; + // } + // } } } @@ -374,6 +377,7 @@ export function viteConfigToFarmConfig( if (config.server) { farmConfig.server ??= {}; + // @ts-ignore farmConfig.server.hmr = config.server.hmr; farmConfig.server.port = config.server.port; diff --git a/packages/core/src/plugin/js/farm-to-vite-context.ts b/packages/core/src/plugin/js/farm-to-vite-context.ts index 7edf7a77e..57b5d7ce3 100644 --- a/packages/core/src/plugin/js/farm-to-vite-context.ts +++ b/packages/core/src/plugin/js/farm-to-vite-context.ts @@ -1,6 +1,7 @@ +import { Logger } from '../../utils/logger.js'; + import type { PluginContext } from 'rollup'; import type { UserConfig } from '../../config/types.js'; -import { Logger } from '../../utils/logger.js'; import type { CompilationContext } from '../type.js'; import { normalizePath, revertNormalizePath } from './utils.js'; diff --git a/packages/core/src/plugin/js/index.ts b/packages/core/src/plugin/js/index.ts index fced347a3..504f22763 100644 --- a/packages/core/src/plugin/js/index.ts +++ b/packages/core/src/plugin/js/index.ts @@ -1,7 +1,6 @@ import { CompilationMode } from '../../config/env.js'; import { type JsPlugin, - Logger, type UserConfig, normalizeDevServerConfig } from '../../index.js'; @@ -21,7 +20,6 @@ type VitePluginsType = VitePluginType[]; export async function handleVitePlugins( vitePlugins: VitePluginsType, userConfig: UserConfig, - logger: Logger, mode: CompilationMode ): Promise { const jsPlugins: JsPlugin[] = []; @@ -48,7 +46,7 @@ export async function handleVitePlugins( filters = f; } filters?.forEach((filter) => filtersUnion.add(filter)); - processVitePlugin(vitePlugin, userConfig, filters, jsPlugins, logger, mode); + processVitePlugin(vitePlugin, userConfig, filters, jsPlugins, mode); } // if vitePlugins is not empty, append a load plugin to load file @@ -57,7 +55,6 @@ export async function handleVitePlugins( jsPlugins.push( defaultLoadPlugin({ filtersUnion, - logger, userConfig }) ); @@ -73,7 +70,6 @@ export function processVitePlugin( userConfig: UserConfig, filters: string[], jsPlugins: JsPlugin[], - logger: Logger, mode: CompilationMode ) { const processPlugin = (plugin: any) => { @@ -81,7 +77,6 @@ export function processVitePlugin( plugin as any, userConfig, filters, - logger, mode ); convertPlugin(vitePluginAdapter); diff --git a/packages/core/src/plugin/js/utils.ts b/packages/core/src/plugin/js/utils.ts index 4d7dafc3a..d3fc977ee 100644 --- a/packages/core/src/plugin/js/utils.ts +++ b/packages/core/src/plugin/js/utils.ts @@ -1,5 +1,4 @@ import path from 'node:path'; -// import path from 'node:path'; import * as querystring from 'node:querystring'; import fse from 'fs-extra'; import type { @@ -11,10 +10,16 @@ import type { RenderedChunk, RenderedModule } from 'rollup'; -import { Config } from '../../types/binding.js'; -import { JsResourcePotInfoData, Resource, ResourcePotInfo } from '../type.js'; + import { VITE_ADAPTER_VIRTUAL_MODULE } from './constants.js'; +import type { Config } from '../../types/binding.js'; +import type { + JsResourcePotInfoData, + Resource, + ResourcePotInfo +} from '../type.js'; + export type WatchChangeEvents = 'create' | 'update' | 'delete'; export function convertEnforceToPriority(value: 'pre' | 'post' | undefined) { diff --git a/packages/core/src/plugin/js/vite-plugin-adapter.ts b/packages/core/src/plugin/js/vite-plugin-adapter.ts index 264ce5340..ffe83ae6e 100644 --- a/packages/core/src/plugin/js/vite-plugin-adapter.ts +++ b/packages/core/src/plugin/js/vite-plugin-adapter.ts @@ -1,5 +1,4 @@ import type { ResolvedUserConfig, UserConfig } from '../../config/types.js'; -import type { Server } from '../../server/index.js'; import { CompilationContext, CompilationContextEmitFileParams, @@ -53,7 +52,7 @@ import type { } from 'rollup'; import { VIRTUAL_FARM_DYNAMIC_IMPORT_SUFFIX } from '../../compiler/index.js'; import { CompilationMode } from '../../config/env.js'; -import { Logger } from '../../index.js'; +import { Logger, Server } from '../../index.js'; import { Config, PluginLoadHookParam, @@ -124,7 +123,6 @@ export class VitePluginAdapter implements JsPlugin { rawPlugin: Plugin, farmConfig: UserConfig, filters: string[], - logger: Logger, mode: CompilationMode ) { this.name = rawPlugin.name || `vite-plugin-adapted-${Date.now()}`; @@ -138,7 +136,8 @@ export class VitePluginAdapter implements JsPlugin { this._rawPlugin = rawPlugin; this._farmConfig = farmConfig; this._viteConfig = farmUserConfigToViteConfig(farmConfig); - this._logger = logger; + + this._logger = new Logger(); this.filters = filters; @@ -149,7 +148,6 @@ export class VitePluginAdapter implements JsPlugin { load: () => (this.load = this.viteLoadToFarmLoad()), transform: () => (this.transform = this.viteTransformToFarmTransform()), buildEnd: () => (this.buildEnd = this.viteBuildEndToFarmBuildEnd()), - // closeBundle: () => (this.finish = this.viteCloseBundleToFarmFinish()), handleHotUpdate: () => (this.updateModules = this.viteHandleHotUpdateToFarmUpdateModules()), renderChunk: () => @@ -270,7 +268,7 @@ export class VitePluginAdapter implements JsPlugin { } } - async configureDevServer(devServer: Server) { + async configureServer(server: Server) { const hook = this.wrapRawPluginHook( 'configureServer', this._rawPlugin.configureServer @@ -279,24 +277,11 @@ export class VitePluginAdapter implements JsPlugin { this._viteDevServer = createViteDevServerAdapter( this.name, this._viteConfig, - devServer + server ); if (hook) { - await hook(this._viteDevServer); - this._viteDevServer.middlewareCallbacks.forEach((cb) => { - devServer.app().use((ctx, koaNext) => { - return new Promise((resolve, reject) => { - // koaNext is async, but vite's next is sync, we need a adapter here - const next = (err: Error) => { - if (err) reject(err); - koaNext().then(resolve); - }; - - return cb(ctx.req, ctx.res, next); - }); - }); - }); + return await hook(this._viteDevServer); } } diff --git a/packages/core/src/plugin/js/vite-server-adapter.ts b/packages/core/src/plugin/js/vite-server-adapter.ts index 1e7c0a1fa..b52e5742d 100644 --- a/packages/core/src/plugin/js/vite-server-adapter.ts +++ b/packages/core/src/plugin/js/vite-server-adapter.ts @@ -1,67 +1,42 @@ -// import { watch } from 'chokidar'; -import { FSWatcher } from 'chokidar'; -import { Server } from '../../index.js'; -import { Server as httpServer } from '../../server/type.js'; -import WsServer from '../../server/ws.js'; import { CompilationContext, ViteModule } from '../type.js'; import { throwIncompatibleError } from './utils.js'; +// TODO type error refactor vite adaptor export class ViteDevServerAdapter { - moduleGraph: ViteModuleGraphAdapter; - config: any; - pluginName: string; - watcher: FSWatcher; - middlewares: any; - middlewareCallbacks: any[]; - ws: WsServer; - httpServer: httpServer; - - constructor(pluginName: string, config: any, server: Server) { - this.moduleGraph = createViteModuleGraphAdapter(pluginName); - this.config = config; - this.pluginName = pluginName; - // watcher is not used in Farm vite plugin for now - // it's only for compatibility - // this.watcher = watch(config.root); - this.watcher = server.watcher.getInternalWatcher(); - this.middlewareCallbacks = []; - this.middlewares = new Proxy( - { - use: (...args: any[]) => { - if ( - args.length === 2 && - typeof args[0] === 'string' && - typeof args[1] === 'function' - ) { - this.middlewareCallbacks.push((req: any, res: any, next: any) => { - const [url, cb] = args; - if (req.url.startsWith(url)) { - cb(req, res, next); - } - }); - } else if (args.length === 1 && typeof args[0] === 'function') { - this.middlewareCallbacks.push(args[0]); + private _server: any; + private _config: any; + private _moduleGraphAdapter: any; + [key: string]: any; + [key: symbol]: any; + constructor(pluginName: string, config: any, server: any) { + this._server = server; + this._config = config; + this._moduleGraphAdapter = createViteModuleGraphAdapter(pluginName); + + return new Proxy(this, { + get: (_target, prop) => { + switch (prop) { + case 'moduleGraph': + return this._moduleGraphAdapter; + case 'watcher': + return this._server.watcher.getInternalWatcher(); + case 'middlewares': + return this._server.middlewares; + case 'config': + return this._config; + default: { + const value = this._server[prop]; + return typeof value === 'function' + ? value.bind(this._server) + : value; } } }, - { - get(target, key) { - if (key === 'use') { - return target[key as keyof typeof target]; - } - - throwIncompatibleError( - pluginName, - 'viteDevServer.middlewares', - ['use'], - key - ); - } + set: (_target, prop, value) => { + this._server[prop] = value; + return true; } - ); - - this.ws = server.ws; - this.httpServer = server.server; + }); } } @@ -134,7 +109,7 @@ function proxyViteModuleNode( export function createViteDevServerAdapter( pluginName: string, config: any, - server: Server + server: any ) { const proxy = new Proxy( new ViteDevServerAdapter(pluginName, config, server), @@ -146,6 +121,9 @@ export function createViteDevServerAdapter( 'prototype' ]; const allowedKeys = [ + 'serverOptions', + 'resolvedUrls', + 'printUrls', 'moduleGraph', 'config', 'watcher', diff --git a/packages/core/src/plugin/type.ts b/packages/core/src/plugin/type.ts index 34f095456..07f5bf5ee 100644 --- a/packages/core/src/plugin/type.ts +++ b/packages/core/src/plugin/type.ts @@ -141,7 +141,7 @@ export interface JsPlugin { * @param server * @returns */ - configureDevServer?: (server: Server) => void | Promise; + configureServer?: (server: Server) => void | Promise; /** * @param compiler * @returns diff --git a/packages/core/src/server/error.ts b/packages/core/src/server/error.ts index 467f338ec..33ae32be6 100644 --- a/packages/core/src/server/error.ts +++ b/packages/core/src/server/error.ts @@ -1,7 +1,6 @@ import type { RollupError } from 'rollup'; import { colors } from '../utils/color.js'; import { pad } from '../utils/share.js'; -// import { DevServer } from './index.js'; export function prepareError(err: Error & { potentialSolution?: string }) { return { diff --git a/packages/core/src/server/hmr-engine.ts b/packages/core/src/server/hmr-engine.ts index 7234a32ce..b2961b266 100644 --- a/packages/core/src/server/hmr-engine.ts +++ b/packages/core/src/server/hmr-engine.ts @@ -4,37 +4,28 @@ import fse from 'fs-extra'; import { stat } from 'node:fs/promises'; import { isAbsolute, relative } from 'node:path'; -import { Compiler } from '../compiler/index.js'; -import { checkClearScreen } from '../config/index.js'; +import type { Resource } from '@farmfe/runtime/src/resource-loader.js'; +import { UserHmrConfig } from '../config/index.js'; import type { JsUpdateResult } from '../types/binding.js'; -import { - Logger, - bold, - cyan, - getDynamicResources, - green -} from '../utils/index.js'; -import { logError } from './error.js'; -import { Server } from './index.js'; +import { convertErrorMessage } from '../utils/error.js'; +import { bold, cyan, formatExecutionTime, green } from '../utils/index.js'; import { WebSocketClient } from './ws.js'; export class HmrEngine { private _updateQueue: string[] = []; - // private _updateResults: Map = + // private _updateResults: Map; - private _compiler: Compiler; - private _devServer: Server; private _onUpdates: ((result: JsUpdateResult) => void)[]; private _lastModifiedTimestamp: Map; - constructor( - compiler: Compiler, - devServer: Server, - private _logger: Logger + // compiler: Compiler, + // devServer: HttpServer, + // config: UserConfig, + // ws: WebSocketServer, + // private _logger: Logger + private readonly app: any ) { - this._compiler = compiler; - this._devServer = devServer; // this._lastAttemptWasError = false; this._lastModifiedTimestamp = new Map(); } @@ -60,13 +51,13 @@ export class HmrEngine { let updatedFilesStr = queue .map((item) => { if (isAbsolute(item)) { - return relative(this._compiler.config.config.root, item); + return relative(this.app.compiler.config.root, item); } else { - const resolvedPath = this._compiler.transformModulePath( - this._compiler.config.config.root, + const resolvedPath = this.app.compiler.transformModulePath( + this.app.compiler.config.root, item ); - return relative(this._compiler.config.config.root, resolvedPath); + return relative(this.app.compiler.config.root, resolvedPath); } }) .join(', '); @@ -75,75 +66,97 @@ export class HmrEngine { updatedFilesStr.slice(0, 100) + `...(${queue.length} files)`; } - try { - // we must add callback before update - this._compiler.onUpdateFinish(async () => { - // if there are more updates, recompile again - if (this._updateQueue.length > 0) { - await this.recompileAndSendResult(); - } - if (this._devServer?.config?.writeToDisk) { - this._compiler.writeResourcesToDisk(); + // try { + // we must add callback before update + this.app.compiler.onUpdateFinish(async () => { + // if there are more updates, recompile again + if (this._updateQueue.length > 0) { + await this.recompileAndSendResult(); + } + if (this.app.resolvedUserConfig?.server.writeToDisk) { + this.app.compiler.writeResourcesToDisk(); + } + }); + + const start = performance.now(); + + const result = await this.app.compiler.update(queue); + + this.app.logger.info( + `${bold(cyan(updatedFilesStr))} updated in ${bold( + green( + formatExecutionTime( + performance.now() - start, + this.app.resolvedUserConfig.timeUnit + ) + ) + )}`, + true + ); + + // clear update queue after update finished + this._updateQueue = this._updateQueue.filter( + (item) => !queue.includes(item) + ); + + let dynamicResourcesMap: Record = null; + + if (result.dynamicResourcesMap) { + for (const [key, value] of Object.entries(result.dynamicResourcesMap)) { + if (!dynamicResourcesMap) { + dynamicResourcesMap = {} as Record; } - }); - - checkClearScreen(this._compiler.config.config); - const start = Date.now(); - const result = await this._compiler.update(queue); - this._logger.info( - `${bold(cyan(updatedFilesStr))} updated in ${bold( - green(`${Date.now() - start}ms`) - )}` - ); - - // clear update queue after update finished - this._updateQueue = this._updateQueue.filter( - (item) => !queue.includes(item) - ); - - const { dynamicResources, dynamicModuleResourcesMap } = - getDynamicResources(result.dynamicResourcesMap); - - const { - added, - changed, - removed, - immutableModules, - mutableModules, - boundaries - } = result; - const resultStr = `{ + + // @ts-ignore + dynamicResourcesMap[key] = value.map((r) => ({ + path: r[0], + type: r[1] as 'script' | 'link' + })); + } + } + const { + added, + changed, + removed, + immutableModules, + mutableModules, + boundaries + } = result; + const resultStr = `{ added: [${formatHmrResult(added)}], changed: [${formatHmrResult(changed)}], removed: [${formatHmrResult(removed)}], immutableModules: ${JSON.stringify(immutableModules.trim())}, mutableModules: ${JSON.stringify(mutableModules.trim())}, boundaries: ${JSON.stringify(boundaries)}, - dynamicResources: ${JSON.stringify(dynamicResources)}, - dynamicModuleResourcesMap: ${JSON.stringify(dynamicModuleResourcesMap)} + dynamicResourcesMap: ${JSON.stringify(dynamicResourcesMap)} }`; - this.callUpdates(result); + this.callUpdates(result); - this._devServer.ws.clients.forEach((client: WebSocketClient) => { - client.rawSend(` + this.app.ws.wss.clients.forEach((client: WebSocketClient) => { + // @ts-ignore + client.send(` { type: 'farm-update', result: ${resultStr} } `); - }); - } catch (err) { - checkClearScreen(this._compiler.config.config); - throw new Error(logError(err) as unknown as string); - } + }); + // } catch (err) { + // checkClearScreen(this.app.compiler.config.config); + // this.app.logger.error(convertErrorMessage(err)); + + // } }; async hmrUpdate(absPath: string | string[], force = false) { const paths = Array.isArray(absPath) ? absPath : [absPath]; - for (const path of paths) { - if (this._compiler.hasModule(path) && !this._updateQueue.includes(path)) { + if ( + this.app.compiler.hasModule(path) && + !this._updateQueue.includes(path) + ) { if (fse.existsSync(path)) { const lastModifiedTimestamp = this._lastModifiedTimestamp.get(path); const currentTimestamp = (await stat(path)).mtime.toISOString(); @@ -158,7 +171,7 @@ export class HmrEngine { } } - if (!this._compiler.compiling && this._updateQueue.length > 0) { + if (!this.app.compiler.compiling && this._updateQueue.length > 0) { try { await this.recompileAndSendResult(); } catch (e) { @@ -167,16 +180,24 @@ export class HmrEngine { const errorStr = `${JSON.stringify({ message: serialization })}`; - this._devServer.ws.clients.forEach((client: WebSocketClient) => { - client.rawSend(` + + this.app.ws.wss.clients.forEach((client: WebSocketClient) => { + // @ts-ignore + // client.rawSend(` + client.send(` { type: 'error', err: ${errorStr}, - overlay: ${this._devServer.config.hmr.overlay} + overlay: ${ + (this.app.resolvedUserConfig.server.hmr as UserHmrConfig) + .overlay + } } `); }); - this._logger.error(e); + + this.app.logger.error(convertErrorMessage(e), true); + // throw new Error(`hmr update failed: ${e.stack}`); } } } diff --git a/packages/core/src/server/hmr.ts b/packages/core/src/server/hmr.ts new file mode 100644 index 000000000..29b99664b --- /dev/null +++ b/packages/core/src/server/hmr.ts @@ -0,0 +1,45 @@ +import { + HMRBroadcasterClient, + HMRPayload, + InferCustomEventPayload +} from './type.js'; + +export interface HMRChannel { + /** + * Unique channel name + */ + name: string; + /** + * Broadcast events to all clients + */ + send(payload: HMRPayload): void; + /** + * Send custom event + */ + send(event: T, payload?: InferCustomEventPayload): void; + /** + * Handle custom event emitted by `import.meta.hot.send` + */ + on( + event: T, + listener: ( + data: InferCustomEventPayload, + client: HMRBroadcasterClient, + ...args: any[] + ) => void + ): void; + on(event: 'connection', listener: () => void): void; + /** + * Unregister event listener + */ + + off(event: string, listener: Function): void; + /** + * Start listening for messages + */ + listen(): void; + /** + * Disconnect all clients, called when server is closed or restarted. + */ + close(): void; +} diff --git a/packages/core/src/server/http.ts b/packages/core/src/server/http.ts new file mode 100644 index 000000000..d8d98366d --- /dev/null +++ b/packages/core/src/server/http.ts @@ -0,0 +1,108 @@ +/** + * The following is modified based on source found in + * https://github.com/vitejs/vite/blob/main/packages/vite/src/node/env.ts + * + * MIT License + * Copyright (c) 2019-present, Yuxi (Evan) + * https://github.com/vitejs/vite/blob/main/LICENSE + * + * Farm draws on the code of part of the vite server in order to better achieve the compatibility + * progress of the vite ecosystem and the integrity of vite's ecological development, + * which can reduce many unknown or known problems. + */ + +import type { OutgoingHttpHeaders as HttpServerHeaders } from 'node:http'; +import type { ServerOptions as HttpsServerOptions } from 'node:https'; +import connect from 'connect'; +import { readFileIfExists } from '../utils/fsUtils.js'; +import { Logger } from '../utils/logger.js'; +import { HttpServer } from './index.js'; +import { ProxyOptions } from './middlewares/proxy.js'; + +export interface CommonServerOptions { + port?: number; + strictPort?: boolean; + host?: string | boolean; + https?: HttpsServerOptions; + open?: boolean | string; + proxy?: Record; + cors?: CorsOptions | boolean; + headers?: HttpServerHeaders; +} + +export type CorsOrigin = boolean | string | RegExp | (string | RegExp)[]; + +export interface CorsOptions { + origin?: + | CorsOrigin + | ((origin: string, cb: (err: Error, origins: CorsOrigin) => void) => void); + methods?: string | string[]; + allowedHeaders?: string | string[]; + exposedHeaders?: string | string[]; + credentials?: boolean; + maxAge?: number; + preflightContinue?: boolean; + optionsSuccessStatus?: number; +} + +export interface ResolvedServerUrls { + local: string[]; + network: string[]; +} + +// For the unencrypted tls protocol, we use http service. +// In other cases, https / http2 is used. +export class httpServer { + public logger: Logger; + protected httpServer: HttpServer | null = null; + protected resolvedUrls: ResolvedServerUrls | null = null; + constructor() {} + + protected async resolveHttpServer( + { proxy }: CommonServerOptions, + app: connect.Server, + httpsOptions?: HttpsServerOptions + ): Promise { + if (!httpsOptions) { + const { createServer } = await import('node:http'); + return createServer(app); + } + + // EXISTING PROBLEM: + // https://github.com/http-party/node-http-proxy/issues/1237 + + // MAYBE SOLUTION: + // https://github.com/nxtedition/node-http2-proxy + // https://github.com/fastify/fastify-http-proxy + + if (proxy) { + const { createServer } = await import('node:https'); + return createServer(httpsOptions, app); + } else { + const { createSecureServer } = await import('node:http2'); + return createSecureServer( + { + maxSessionMemory: 1000, + ...httpsOptions, + allowHTTP1: true + }, + // @ts-ignore + app + ); + } + } + + protected async resolveHttpsConfig( + https: HttpsServerOptions | undefined + ): Promise { + if (!https) return undefined; + + const [ca, cert, key, pfx] = await Promise.all([ + readFileIfExists(https.ca), + readFileIfExists(https.cert), + readFileIfExists(https.key), + readFileIfExists(https.pfx) + ]); + return { ...https, ca, cert, key, pfx }; + } +} diff --git a/packages/core/src/server/index.ts b/packages/core/src/server/index.ts index 0a2a1d360..c544646e3 100644 --- a/packages/core/src/server/index.ts +++ b/packages/core/src/server/index.ts @@ -1,436 +1,753 @@ -import http from 'node:http'; -import http2 from 'node:http2'; -import * as httpsServer from 'node:https'; -import Koa from 'koa'; -import compression from 'koa-compress'; - -import path from 'node:path'; -import { promisify } from 'node:util'; +import fs, { PathLike } from 'node:fs'; +import { WatchOptions } from 'chokidar'; +import connect from 'connect'; +import corsMiddleware from 'cors'; + import { Compiler } from '../compiler/index.js'; +import { bold, colors, getShortName, green, resolveConfig } from '../index.js'; +import Watcher from '../watcher/index.js'; +import { HmrEngine } from './hmr-engine.js'; +import { httpServer } from './http.js'; +import { openBrowser } from './open.js'; +import { WsServer } from './ws.js'; + import { __FARM_GLOBAL__ } from '../config/_global.js'; import { - DEFAULT_HMR_OPTIONS, - DevServerMiddleware, - NormalizedServerConfig, - UserPreviewServerConfig, - UserServerConfig, - normalizePublicDir -} from '../config/index.js'; -import { - getValidPublicPath, - normalizePublicPath -} from '../config/normalize-config/normalize-output.js'; -import { resolveHostname, resolveServerUrls } from '../utils/http.js'; -import { - Logger, - bootstrap, - clearScreen, - normalizeBasePath, - printServerUrls -} from '../utils/index.js'; -import { FileWatcher } from '../watcher/index.js'; -import { logError } from './error.js'; -import { HmrEngine } from './hmr-engine.js'; -import { hmrPing } from './middlewares/hmrPing.js'; + getPluginHooks, + getSortedPluginHooksBindThis +} from '../plugin/index.js'; +import { isCacheDirExists } from '../utils/cacheDir.js'; +import { createDebugger } from '../utils/debug.js'; +import { resolveServerUrls, teardownSIGTERMListener } from '../utils/http.js'; +import { Logger, bootstrap, printServerUrls } from '../utils/logger.js'; +import { initPublicFiles } from '../utils/publicDir.js'; +import { arrayEqual, isObject, normalizePath } from '../utils/share.js'; + import { - cors, - headers, - lazyCompilation, - proxy, - resources, - staticMiddleware + adaptorViteMiddleware, + hmrPingMiddleware, + htmlFallbackMiddleware, + lazyCompilationMiddleware, + notFoundMiddleware, + proxyMiddleware, + publicMiddleware, + publicPathMiddleware, + resourceMiddleware } from './middlewares/index.js'; -import { openBrowser } from './open.js'; -import { Server as httpServer } from './type.js'; -import WsServer from './ws.js'; -/** - * Farm Dev Server, responsible for: - * * parse and normalize dev server options - * * launch http server based on options - * * compile the project in dev mode and serve the production - * * HMR middleware and websocket supported - */ -interface ServerUrls { - local: string[]; - network: string[]; -} +import type * as http from 'node:http'; +import type { + Server as HttpBaseServer, + ServerOptions as HttpsServerOptions +} from 'node:http'; +import type { Http2SecureServer } from 'node:http2'; +import type * as net from 'node:net'; + +import { createCompiler } from '../compiler/index.js'; +import type { + FarmCliOptions, + HmrOptions, + NormalizedServerConfig, + ResolvedUserConfig, + UserConfig +} from '../config/types.js'; +import type { + JsUpdateResult, + PersistentCacheConfig +} from '../types/binding.js'; +import { convertErrorMessage } from '../utils/error.js'; +import type { CommonServerOptions, ResolvedServerUrls } from './http.js'; + +export type HttpServer = HttpBaseServer | Http2SecureServer; -type ErrorMap = { - EACCES: string; - EADDRNOTAVAIL: string; -}; - -interface ImplDevServer { - createServer(options: UserServerConfig): void; - createDevServer(options: UserServerConfig): void; - createPreviewServer(options: UserServerConfig): void; - listen(): Promise; - close(): Promise; - getCompiler(): Compiler; +type CompilerType = Compiler | undefined; + +export interface ServerOptions extends CommonServerOptions { + /** + * Configure HMR-specific options (port, host, path & protocol) + */ + hmr?: HmrOptions | boolean; + /** + * Do not start the websocket connection. + * @experimental + */ + ws?: false; + /** + * chokidar watch options or null to disable FS watching + * https://github.com/paulmillr/chokidar#api + */ + watchOptions?: WatchOptions | undefined; + /** + * Create dev server to be used as a middleware in an existing server + * @default false + */ + middlewareMode?: + | boolean + | { + /** + * Parent server instance to attach to + * + * This is needed to proxy WebSocket connections to the parent server. + */ + server: http.Server; + }; + origin?: string; } -export class Server implements ImplDevServer { - private _app: Koa; - private restart_promise: Promise | null = null; - private compiler: Compiler | null; - public logger: Logger; +type ServerConfig = CommonServerOptions & NormalizedServerConfig; +export const debugServer = createDebugger('farm:server'); + +export function noop() { + // noop +} + +/** + * Represents a Farm development server. + * @class + */ +export class Server extends httpServer { ws: WsServer; - config: NormalizedServerConfig & UserPreviewServerConfig; - hmrEngine?: HmrEngine; - server?: httpServer; - publicDir?: string; + serverOptions: ServerConfig; + httpsOptions: HttpsServerOptions; + publicDir: string | undefined; publicPath?: string; - resolvedUrls?: ServerUrls; - watcher: FileWatcher; - - constructor({ - compiler = null, - logger - }: { - compiler?: Compiler | null; - logger: Logger; - }) { - this.compiler = compiler; - this.logger = logger ?? new Logger(); - - this.initializeKoaServer(); + publicFiles?: Set; + httpServer: HttpServer; + watcher: Watcher; + hmrEngine?: HmrEngine; + middlewares: connect.Server; + compiler: CompilerType; + root: string; + resolvedUserConfig: ResolvedUserConfig; + closeHttpServerFn: () => Promise; + postConfigureServerHooks: ((() => void) | void)[] = []; + logger: Logger; + /** + * Creates an instance of Server. + * @param {FarmCliOptions & UserConfig} inlineConfig - The inline configuration options. + * @param {Logger} logger - The logger instance. + */ + constructor(readonly inlineConfig: FarmCliOptions & UserConfig) { + super(); + this.logger = new Logger(); + } - if (!compiler) return; + /** + * Creates and initializes the server. + * + * This method performs the following operations: + * Resolves HTTPS configuration + * Handles public files + * Creates middleware + * Creates HTTP server (if not in middleware mode) + * Initializes HMR engine + * Creates WebSocket server + * Sets up Vite invalidation handler + * Initializes middlewares + * + * @returns {Promise} A promise that resolves when the server creation process is complete + * @throws {Error} If an error occurs during the server creation process + */ + async createServer(): Promise { + try { + this.resolvedUserConfig = await resolveConfig( + this.inlineConfig, + 'start', + 'development', + 'development' + ); - this.publicDir = normalizePublicDir(compiler?.config.config.root); + this.logger = this.resolvedUserConfig.logger; - this.publicPath = - normalizePublicPath( - compiler.config.config.output.targetEnv, - compiler.config.config.output.publicPath, - logger, - false - ) || '/'; - } + this.#resolveOptions(); - getCompiler(): Compiler { - return this.compiler; - } + this.compiler = await createCompiler(this.resolvedUserConfig); - app(): Koa { - return this._app; - } + for (const hook of getPluginHooks( + this.resolvedUserConfig.jsPlugins, + 'configureCompiler' + )) { + await hook?.(this.compiler); + } - async listen(): Promise { - if (!this.server) { - this.logger.error('HTTP server is not created yet'); - return; + const [httpsOptions, publicFiles] = await Promise.all([ + this.resolveHttpsConfig(this.serverOptions.https), + this.#handlePublicFiles() + ]); + this.httpsOptions = httpsOptions; + this.publicFiles = publicFiles; + this.middlewares = connect() as connect.Server; + this.httpServer = this.serverOptions.middlewareMode + ? null + : await this.resolveHttpServer( + this.serverOptions as CommonServerOptions, + this.middlewares, + this.httpsOptions + ); + + // close server function prepare promise + this.closeHttpServerFn = this.closeServer(); + + // init hmr engine When actually updating, we need to get the clients of ws for broadcast, 、 + // so we can instantiate hmrEngine by default at the beginning. + this.createHmrEngine(); + + // init websocket server + this.createWebSocketServer(); + + // invalidate vite handler + this.#invalidateVite(); + + // init watcher + await this.#createWatcher(); + + await this.handleConfigureServer(); + + // init middlewares + this.#initializeMiddlewares(); + + if (!this.serverOptions.middlewareMode && this.httpServer) { + this.httpServer.once('listening', () => { + // update actual port since this may be different from initial value + this.serverOptions.port = ( + this.httpServer.address() as net.AddressInfo + ).port; + }); + } + } catch (error) { + // this.logger.error( + // `Failed to create farm server: ${error}` + // ); + throw error; } - const { port, open, protocol, hostname } = this.config; + } - const start = Date.now(); - // compile the project and start the dev server - await this.compile(); + /** + * create watcher + */ + async #createWatcher() { + this.watcher = new Watcher(this.resolvedUserConfig); - // watch extra files after compile - this.watcher?.watchExtraFiles?.(); + await this.watcher.createWatcher(); - bootstrap(Date.now() - start, this.compiler.config); + this.watcher.watcher.on('add', async (file: string) => { + // TODO pluginContainer hooks + }); - await this.startServer(this.config); + this.watcher.watcher.on('unlink', async (file: string) => { + const parentFiles = this.compiler.getParentFiles(file); + const normalizeParentFiles = parentFiles.map((file) => + normalizePath(file) + ); + this.hmrEngine.hmrUpdate(normalizeParentFiles, true); + }); - !__FARM_GLOBAL__.__FARM_RESTART_DEV_SERVER__ && - (await this.displayServerUrls()); + this.watcher.watcher.on('change', async (file: string) => { + file = normalizePath(file); + const shortFile = getShortName(file, this.resolvedUserConfig.root); + const isConfigFile = this.resolvedUserConfig.configFilePath === file; + const isConfigDependencyFile = + this.resolvedUserConfig.configFileDependencies.some( + (name) => file === name + ); + const isEnvFile = this.resolvedUserConfig.envFiles.some( + (name) => file === name + ); + if (isConfigFile || isConfigDependencyFile || isEnvFile) { + __FARM_GLOBAL__.__FARM_RESTART_DEV_SERVER__ = true; + this.logger.info( + `${bold(green(shortFile))} changed, Server is being restarted`, + true + ); + debugServer?.(`[config change] ${colors.dim(file)}`); + try { + await this.restartServer(); + return; + } catch (e) { + this.resolvedUserConfig.logger.error(`restart server error ${e}`); + } + } + try { + this.hmrEngine.hmrUpdate(file); + } catch (error) { + this.resolvedUserConfig.logger.error(`Farm Hmr Update Error: ${error}`); + } + }); + const handleUpdateFinish = (updateResult: JsUpdateResult) => { + const added = [ + ...updateResult.added, + ...updateResult.extraWatchResult.add + ].map((addedModule) => { + const resolvedPath = this.compiler.transformModulePath( + this.root, + addedModule + ); + return resolvedPath; + }); + const filteredAdded = added.filter((file) => + this.watcher.filterWatchFile(file, this.root) + ); - if (open) { - let publicPath = getValidPublicPath(this.publicPath) || '/'; + if (filteredAdded.length > 0) { + this.watcher.watcher.add(filteredAdded); + } + }; - const serverUrl = `${protocol}://${hostname.name}:${port}${publicPath}`; - openBrowser(serverUrl); - } + this.hmrEngine?.onUpdateFinish(handleUpdateFinish); } - private async compile(): Promise { - try { - await this.compiler.compile(); - } catch (err) { - throw new Error(logError(err) as unknown as string); + /** + * Restarts the server. + * @returns {Promise} + */ + async restartServer() { + if (this.serverOptions.middlewareMode) { + await this.restart(); + return; } + const { port: prevPort, host: prevHost } = this.serverOptions; + const prevUrls = this.resolvedUrls; + + await this.restart(); + + const { port, host } = this.serverOptions; - if (this.config.writeToDisk) { - this.compiler.writeResourcesToDisk(); + if ( + port !== prevPort || + host !== prevHost || + this.hasUrlsChanged(prevUrls, this.resolvedUrls) + ) { + __FARM_GLOBAL__.__FARM_SHOW_DEV_SERVER_URL__ = true; } else { - this.compiler.callWriteResourcesHook(); + __FARM_GLOBAL__.__FARM_SHOW_DEV_SERVER_URL__ = false; } } - async startServer(serverOptions: UserServerConfig) { - const { port, hostname } = serverOptions; - const listen = promisify(this.server.listen).bind(this.server); + /** + * Checks if the server URLs have changed. + * @param {ResolvedServerUrls} oldUrls - The old server URLs. + * @param {ResolvedServerUrls} newUrls - The new server URLs. + * @returns {boolean} True if the URLs have changed, false otherwise. + */ + hasUrlsChanged(oldUrls: ResolvedServerUrls, newUrls: ResolvedServerUrls) { + return !( + oldUrls === newUrls || + (oldUrls && + newUrls && + arrayEqual(oldUrls.local, newUrls.local) && + arrayEqual(oldUrls.network, newUrls.network)) + ); + } + + /** + * Restarts the server. + */ + async restart() { + let newServer: Server = null; try { - await listen(port, hostname.host); + await this.close(); + newServer = new Server(this.inlineConfig); + await newServer.createServer(); } catch (error) { - this.handleServerError(error, port, hostname.host); + this.logger.error(`Failed to restart server :\n ${error}`); + return; } + await this.watcher.close(); + await newServer.listen(); + this.logger.info(bold(green('Server restarted successfully ✨ ✨'))); } - handleServerError( - error: Error & { code?: string }, - port: number, - host: string | undefined - ) { - const errorMap: ErrorMap = { - EACCES: `Permission denied to use port ${port} `, - EADDRNOTAVAIL: `The IP address host: ${host} is not available on this machine.` - }; + /** + * Creates and initializes the WebSocket server. + * @throws {Error} If the HTTP server is not created. + */ + async createWebSocketServer() { + if (!this.httpServer) { + throw new Error( + 'Websocket requires a http server. please check the server is be created' + ); + } - const errorMessage = - errorMap[error.code as keyof ErrorMap] || - `An error occurred: ${error.stack} `; - this.logger.error(errorMessage); + this.ws = new WsServer(this); } - async close() { - if (!this.server) { - this.logger.error('HTTP server is not created yet'); + /** + * Creates and initializes the Hot Module Replacement (HMR) engine. + * @throws {Error} If the HTTP server is not created. + */ + createHmrEngine() { + if (!this.httpServer) { + throw new Error( + 'HmrEngine requires a http server. please check the server is be created' + ); } - // the server is already closed - if (!this.server.listening) { + + this.hmrEngine = new HmrEngine(this); + } + + /** + * Starts the server and begins listening for connections. + * @returns {Promise} + * @throws {Error} If there's an error starting the server. + */ + async listen(): Promise { + if (!this.httpServer) { + this.logger.warn('HTTP server is not created yet'); return; } - const promises = []; - if (this.ws) { - promises.push(this.ws.close()); - } + const { port, hostname, open, strictPort } = this.serverOptions; - if (this.server) { - promises.push(new Promise((resolve) => this.server.close(resolve))); - } + try { + const serverPort = await this.httpServerStart({ + port, + strictPort: strictPort, + host: hostname.host + }); + + this.resolvedUserConfig.compilation.define.FARM_HMR_PORT = + serverPort.toString(); + + this.resolvedUrls = await resolveServerUrls( + this.httpServer, + this.resolvedUserConfig + ); + // compile the project and start the dev server + await this.#startCompile(); + + // watch extra files after compile + this.watcher?.watchExtraFiles?.(); - await Promise.all(promises); + if (open) { + this.#openServerBrowser(); + } + + __FARM_GLOBAL__.__FARM_SHOW_DEV_SERVER_URL__ && this.printUrls(); + } catch (error) { + this.resolvedUserConfig.logger.error( + `start farm dev server error: ${error} \n ${error.stack}` + ); + // throw error; + } } - async restart(promise: () => Promise) { - if (!this.restart_promise) { - this.restart_promise = promise(); + /** + * Starts the HTTP server. + * @protected + * @param {Object} serverOptions - The server options. + * @returns {Promise} The port the server is listening on. + * @throws {Error} If the server fails to start. + */ + protected async httpServerStart(serverOptions: { + port: number; + strictPort: boolean | undefined; + host: string | undefined; + }): Promise { + if (!this.httpServer) { + throw new Error('httpServer is not initialized'); } - return this.restart_promise; + + let { port, strictPort, host } = serverOptions; + + return new Promise((resolve, reject) => { + const onError = (e: Error & { code?: string }) => { + if (e.code === 'EADDRINUSE') { + if (strictPort) { + this.httpServer.removeListener('error', onError); + reject(new Error(`Port ${port} is already in use`)); + } else { + this.logger.warn(`Port ${port} is in use, trying another one...`); + this.httpServer.listen(++port, host); + } + } else { + this.httpServer.removeListener('error', onError); + reject(e); + } + }; + + this.httpServer.on('error', onError); + + this.httpServer.listen(port, host, () => { + this.httpServer.removeListener('error', onError); + resolve(port); + }); + }); } - private initializeKoaServer() { - this._app = new Koa(); + /** + * Get current compiler instance in the server + * @returns { CompilerType } return current compiler, may be compiler or undefined + */ + getCompiler(): CompilerType { + return this.compiler; } - public async createServer( - options: NormalizedServerConfig & UserPreviewServerConfig - ) { - const { https, host } = options; - const protocol = https ? 'https' : 'http'; - const hostname = await resolveHostname(host); - const publicPath = getValidPublicPath( - this.compiler?.config.config.output?.publicPath ?? - options?.output.publicPath - ); - // TODO refactor previewServer If it's preview server, then you can't use create server. we need to create a new one because hmr is false when you preview. - const hmrPath = normalizeBasePath( - path.join(publicPath, options.hmr.path ?? DEFAULT_HMR_OPTIONS.path) - ); + /** + * Set current compiler instance in the server + * @param { Compiler } compiler - choose a new compiler instance + */ + setCompiler(compiler: Compiler) { + this.compiler = compiler; + } - this.config = { - ...options, - port: Number(process.env.FARM_DEV_SERVER_PORT || options.port), - hmr: { - ...options.hmr, - path: hmrPath - }, - protocol, - hostname - }; + /** + * Adds additional files to be watched by the compiler. + * @param {string} root - The root directory. + * @param {string[]} deps - Array of file paths to be watched. + */ + addWatchFile(root: string, deps: string[]): void { + this.getCompiler().addExtraWatchFile(root, deps); + } - const isProxy = Object.keys(options.proxy).length; - if (https) { - if (isProxy) { - this.server = httpsServer.createServer(https, this._app.callback()); - } else { - this.server = http2.createSecureServer( - { - maxSessionMemory: 1000, - ...https, - allowHTTP1: true - }, - this._app.callback() - ); + /** + * Handles the configureServer hook. + */ + async handleConfigureServer() { + const reflexServer = new Proxy(this, { + get: (_, property: keyof Server) => + this[property as keyof this] ?? undefined, + set: (_, property: keyof Server, value: unknown) => { + this[property as keyof this] = value as this[keyof this]; + return true; } - } else { - this.server = http.createServer(this._app.callback()); - } - } + }); + const { jsPlugins } = this.resolvedUserConfig; - public createWebSocket() { - if (!this.server) { - throw new Error('Websocket requires a server.'); + for (const hook of getSortedPluginHooksBindThis( + jsPlugins, + 'configureServer' + )) { + this.postConfigureServerHooks.push(await hook(reflexServer)); } - this.ws = new WsServer(this.server, this.config, this.hmrEngine); } - private invalidateVite() { - // Note: path should be Farm's id, which is a relative path in dev mode, - // but in vite, it's a url path like /xxx/xxx.js - this.ws.on('vite:invalidate', ({ path, message }) => { - // find hmr boundary starting from the parent of the file - this.logger.info(`HMR invalidate: ${path}. ${message ?? ''} `); - const parentFiles = this.compiler.getParentFiles(path); - this.hmrEngine.hmrUpdate(parentFiles, true); - }); + /** + * resolve and setting server options + * + * this method extracts compilation and server options from resolvedUserConfig + * and set the publicPath and publicDir, and then resolve server options + * @private + * @returns { void } + */ + #resolveOptions() { + const { + compilation: { + output: { publicPath }, + assets: { publicDir } + }, + root, + server + } = this.resolvedUserConfig; + this.publicPath = publicPath; + this.publicDir = publicDir; + + this.serverOptions = server as CommonServerOptions & NormalizedServerConfig; + this.root = root; } - public async createPreviewServer(options: UserPreviewServerConfig) { - await this.createServer(options as NormalizedServerConfig); + /** + * Initializes and configures the middleware stack for the server. + * @private + */ + #initializeMiddlewares() { + this.middlewares.use(hmrPingMiddleware()); - this.applyPreviewServerMiddlewares(this.config.middlewares); + const { proxy, middlewareMode, cors } = this.serverOptions; - await this.startServer(this.config); + if (cors) { + this.middlewares.use( + corsMiddleware(typeof cors === 'boolean' ? {} : cors) + ); + } - await this.displayServerUrls(true); - } + if (proxy) { + const middlewareServer = + isObject(middlewareMode) && 'server' in middlewareMode + ? middlewareMode.server + : this.httpServer; - public async createDevServer(options: NormalizedServerConfig) { - if (!this.compiler) { - throw new Error('DevServer requires a compiler for development mode.'); + this.middlewares.use(proxyMiddleware(this, middlewareServer)); } - await this.createServer(options); + if (this.publicPath !== '/') { + this.middlewares.use(publicPathMiddleware(this)); + } - this.hmrEngine = new HmrEngine(this.compiler, this, this.logger); + if (fs.existsSync(this.publicDir as PathLike)) { + this.middlewares.use(publicMiddleware(this)); + } - this.createWebSocket(); + if (this.resolvedUserConfig.compilation.lazyCompilation) { + this.middlewares.use(lazyCompilationMiddleware(this)); + } - this.invalidateVite(); + if (this.resolvedUserConfig.vitePlugins?.length) { + this.middlewares.use(adaptorViteMiddleware(this)); + } - this.applyServerMiddlewares(options.middlewares); - } + this.postConfigureServerHooks.reduce((_, fn) => { + if (typeof fn === 'function') fn(); + }, null); - static async resolvePortConflict( - normalizedDevConfig: NormalizedServerConfig, - logger: Logger - ): Promise { - let devPort = normalizedDevConfig.port; - let hmrPort = normalizedDevConfig.hmr.port; - - const { strictPort, host } = normalizedDevConfig; - const httpServer = http.createServer(); - const isPortAvailable = (portToCheck: number) => { - return new Promise((resolve, reject) => { - const onError = async (error: { code: string }) => { - if (error.code === 'EADDRINUSE') { - clearScreen(); - if (strictPort) { - httpServer.removeListener('error', onError); - reject(new Error(`Port ${devPort} is already in use`)); - } else { - logger.warn(`Port ${devPort} is in use, trying another one...`); - httpServer.removeListener('error', onError); - resolve(false); - } - } else { - logger.error(`Error in httpServer: ${error} `); - reject(true); - } - }; - httpServer.on('error', onError); - httpServer.on('listening', () => { - httpServer.close(); - resolve(true); - }); - httpServer.listen(portToCheck, host as string); - }); - }; + // TODO todo add appType 这块要判断 单页面还是 多页面 多 html 处理不一样 + this.middlewares.use(htmlFallbackMiddleware(this)); - let isPortAvailableResult = await isPortAvailable(devPort); + this.middlewares.use(resourceMiddleware(this)); - while (isPortAvailableResult === false) { - if (typeof normalizedDevConfig.hmr === 'object') { - normalizedDevConfig.hmr.port = ++hmrPort; - } + this.middlewares.use(notFoundMiddleware()); + } - normalizedDevConfig.port = ++devPort; - isPortAvailableResult = await isPortAvailable(devPort); + /** + * Compiles the project. + * @private + * @returns {Promise} + * @throws {Error} If compilation fails. + */ + async #compile(): Promise { + try { + await this.compiler.compile(); + await (this.resolvedUserConfig.server.writeToDisk + ? this.compiler.writeResourcesToDisk() + : this.compiler.callWriteResourcesHook()); + } catch (err) { + this.resolvedUserConfig.logger.error( + `Compilation failed: ${convertErrorMessage(err)}` + ); + // throw err; } } /** - * Add listening files for root manually - * - * > listening file with root must as file. - * - * @param root - * @param deps + * Opens the server URL in the default browser. + * @private */ - - addWatchFile(root: string, deps: string[]): void { - this.getCompiler().addExtraWatchFile(root, deps); + async #openServerBrowser() { + const url = + this.resolvedUrls?.local?.[0] ?? this.resolvedUrls?.network?.[0] ?? ''; + openBrowser(url); } - applyMiddlewares(internalMiddlewares?: DevServerMiddleware[]) { - internalMiddlewares.forEach((middleware) => { - const middlewareImpl = middleware(this); + /** + * Starts the compilation process. + * @private + */ + async #startCompile() { + // check if cache dir exists + const { persistentCache } = this.compiler.config.compilation; + const hasCacheDir = await isCacheDirExists( + (persistentCache as PersistentCacheConfig).cacheDir + ); + const start = performance.now(); + await this.#compile(); - if (middlewareImpl) { - if (Array.isArray(middlewareImpl)) { - middlewareImpl.forEach((m) => { - this._app.use(m); - }); - } else { - this._app.use(middlewareImpl); - } - } - }); + const duration = performance.now() - start; + bootstrap(duration, this.compiler.config, hasCacheDir); } - setCompiler(compiler: Compiler) { - this.compiler = compiler; + /** + * Handles the initialization of public files. + * @private + * @returns {Promise>} A promise that resolves to a set of public file paths. + */ + async #handlePublicFiles() { + const initPublicFilesPromise = initPublicFiles(this.resolvedUserConfig); + return await initPublicFilesPromise; } - private applyPreviewServerMiddlewares( - middlewares?: DevServerMiddleware[] - ): void { - const internalMiddlewares = [ - ...(middlewares || []), - compression, - proxy, - staticMiddleware - ]; - this.applyMiddlewares(internalMiddlewares as DevServerMiddleware[]); + /** + * Sets up the Vite invalidation handler. + * @private + */ + #invalidateVite(): void { + // Note: path should be Farm's id, which is a relative path in dev mode, + // but in vite, it's a url path like /xxx/xxx.js + + this.ws.wss.on('vite:invalidate', ({ path, message }: any) => { + // find hmr boundary starting from the parent of the file + this.resolvedUserConfig.logger.info( + `HMR invalidate: ${path}. ${message ?? ''} ` + ); + const parentFiles = this.compiler.getParentFiles(path); + const normalizeParentFiles = parentFiles.map((file) => + normalizePath(file) + ); + this.hmrEngine.hmrUpdate(normalizeParentFiles, true); + }); } + async closeServerAndExit() { + try { + await this.httpServer.close(); + } finally { + process.exit(); + } + } + + /** + * Closes the server and sockets. + * @returns {() => Promise} + */ + closeServer(): () => Promise { + if (!this.httpServer) { + return () => Promise.resolve(); + } + debugServer?.(`prepare close dev server`); + + let hasListened = false; + const openSockets = new Set(); + + this.httpServer.on('connection', (socket) => { + openSockets.add(socket); + debugServer?.(`has open server socket ${openSockets}`); + + socket.on('close', () => { + debugServer?.('close all server socket'); + openSockets.delete(socket); + }); + }); - private applyServerMiddlewares(middlewares?: DevServerMiddleware[]): void { - const internalMiddlewares = [ - ...(middlewares || []), - hmrPing, - headers, - lazyCompilation, - cors, - resources, - proxy - ]; - - this.applyMiddlewares(internalMiddlewares as DevServerMiddleware[]); + this.httpServer.once('listening', () => { + hasListened = true; + }); + + return () => + new Promise((resolve, reject) => { + openSockets.forEach((s) => s.destroy()); + + if (hasListened) { + this.httpServer.close((err) => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + } else { + resolve(); + } + }); } - private async displayServerUrls(showPreviewFlag = false) { - let publicPath = getValidPublicPath( - this.compiler - ? this.compiler.config.config.output?.publicPath - : this.config.output.publicPath - ); + async close() { + if (!this.serverOptions.middlewareMode) { + teardownSIGTERMListener(this.closeServerAndExit); + } - this.resolvedUrls = await resolveServerUrls( - this.server, - this.config, - publicPath - ); + await Promise.allSettled([this.ws.wss.close(), this.closeHttpServerFn()]); + } + printUrls() { if (this.resolvedUrls) { - printServerUrls(this.resolvedUrls, this.logger, showPreviewFlag); + printServerUrls( + this.resolvedUrls, + this.serverOptions.host, + this.resolvedUserConfig.logger + ); + } else if (this.serverOptions.middlewareMode) { + throw new Error('cannot print server URLs in middleware mode.'); } else { - throw new Error('cannot print server URLs with Server Error.'); + throw new Error( + 'cannot print server URLs before server.listen is called.' + ); } } } diff --git a/packages/core/src/server/middlewares/adaptorVite.ts b/packages/core/src/server/middlewares/adaptorVite.ts new file mode 100644 index 000000000..6ad69c18c --- /dev/null +++ b/packages/core/src/server/middlewares/adaptorVite.ts @@ -0,0 +1,45 @@ +/** + * when use vite-plugin-vue some assets resource not compiled in dev mode + * so we need to invalidate vite handler to recompile + * and automatically res.body to resolve this asset resource e.g: img + * if resource is image or font, try it in local file system to be compatible with vue + */ + +import { existsSync, readFileSync, statSync } from 'node:fs'; +import path from 'node:path'; + +import { stripQueryAndHash } from '../../utils/path.js'; +import { normalizePathByPublicPath } from '../publicDir.js'; +import { send } from '../send.js'; + +import type Connect from 'connect'; +import type { Server } from '../index.js'; + +export function adaptorViteMiddleware(app: Server): Connect.NextHandleFunction { + const { resolvedUserConfig, compiler } = app; + return function handleAdaptorViteMiddleware(req, res, next) { + let stripQueryAndHashUrl = stripQueryAndHash(req.url); + + const { resourceWithoutPublicPath } = normalizePathByPublicPath( + app.publicPath, + stripQueryAndHashUrl + ); + + // try local file system + const localFilePath = path.join( + compiler.config.root, + resourceWithoutPublicPath + ); + + // TODO maybe we can use sirv to serve static file + // try local file system + if (existsSync(localFilePath) && statSync(localFilePath).isFile()) { + const headers = resolvedUserConfig.server.headers; + send(req, res, readFileSync(localFilePath), stripQueryAndHashUrl, { + headers + }); + return; + } + next(); + }; +} diff --git a/packages/core/src/server/middlewares/cors.ts b/packages/core/src/server/middlewares/cors.ts deleted file mode 100644 index d3c26bf2c..000000000 --- a/packages/core/src/server/middlewares/cors.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { default as koaCors } from '@koa/cors'; -import { Middleware } from 'koa'; -import { Server } from '../index.js'; - -export function cors(devSeverContext: Server): Middleware { - const { config } = devSeverContext; - if (!config.cors) return; - return koaCors(typeof config.cors === 'boolean' ? {} : config.cors); -} diff --git a/packages/core/src/server/middlewares/headers.ts b/packages/core/src/server/middlewares/headers.ts deleted file mode 100644 index 16b65ba35..000000000 --- a/packages/core/src/server/middlewares/headers.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Middleware } from 'koa'; -import { Server } from '../index.js'; - -export function headers(devSeverContext: Server): Middleware { - const { config } = devSeverContext; - if (!config.headers) return; - - return async (ctx, next) => { - if (config.headers) { - for (const name in config.headers) { - ctx.set(name, config.headers[name] as string | string[]); - } - } - await next(); - }; -} diff --git a/packages/core/src/server/middlewares/hmrPing.ts b/packages/core/src/server/middlewares/hmrPing.ts index f9226e5cf..b6a957695 100644 --- a/packages/core/src/server/middlewares/hmrPing.ts +++ b/packages/core/src/server/middlewares/hmrPing.ts @@ -1,10 +1,11 @@ -import { Context, Next } from 'koa'; -export function hmrPing() { - return async (ctx: Context, next: Next) => { - if (ctx.get('accept') === 'text/x-farm-ping') { - ctx.status = 204; +import type Connect from 'connect'; + +export function hmrPingMiddleware(): Connect.NextHandleFunction { + return function handleHMRPingMiddleware(req, res, next) { + if (req.headers['accept'] === 'text/x-farm-ping') { + res.writeHead(204).end(); } else { - await next(); + next(); } }; } diff --git a/packages/core/src/server/middlewares/htmlFallback.ts b/packages/core/src/server/middlewares/htmlFallback.ts new file mode 100644 index 000000000..c13509fff --- /dev/null +++ b/packages/core/src/server/middlewares/htmlFallback.ts @@ -0,0 +1,59 @@ +import path from 'node:path'; + +import { cleanUrl, commonFsUtils } from '../../utils/index.js'; + +import type Connect from 'connect'; +import type { Server } from '../index.js'; + +export function htmlFallbackMiddleware( + app: Server +): Connect.NextHandleFunction { + return async function htmlFallbackMiddleware(req, _res, next) { + if ( + // Only accept GET or HEAD + (req.method !== 'GET' && req.method !== 'HEAD') || + // Exclude default favicon requests + req.url === '/favicon.ico' || + // Require Accept: text/html or */* + !( + req.headers.accept === undefined || // equivalent to `Accept: */*` + req.headers.accept === '' || // equivalent to `Accept: */*` + req.headers.accept.includes('text/html') || + req.headers.accept.includes('*/*') + ) + ) { + return next(); + } + const url = cleanUrl(req.url); + const pathname = decodeURIComponent(url); + const { resolvedUserConfig: config } = app; + if (pathname.endsWith('.html')) { + const filePath = path.join(config.root, pathname); + if (commonFsUtils.existsSync(filePath)) { + req.url = url; + return next(); + } + } else if (pathname[pathname.length - 1] === '/') { + const filePath = path.join(config.root, pathname, 'index.html'); + if (commonFsUtils.existsSync(filePath)) { + const newUrl = url + 'index.html'; + req.url = newUrl; + return next(); + } + } else { + //TODO mpa not compatible 如果是纯 html 的结果 html 需要可能判断一下 mpa 适配 + const filePath = path.join(config.root, pathname + '.html'); + if (commonFsUtils.existsSync(filePath)) { + const newUrl = url + '.html'; + req.url = newUrl; + return next(); + } + } + + // TODO htmlFallBack when spa + // if (config.appType === 'spa') { + // req.url = '/index.html'; + // } + next(); + }; +} diff --git a/packages/core/src/server/middlewares/index.ts b/packages/core/src/server/middlewares/index.ts index 1f6d27e22..91539a0cc 100644 --- a/packages/core/src/server/middlewares/index.ts +++ b/packages/core/src/server/middlewares/index.ts @@ -1,6 +1,9 @@ -export * from './cors.js'; -export * from './headers.js'; -export * from './lazy-compilation.js'; +export * from './htmlFallback.js'; +export * from './lazyCompilation.js'; +export * from './notFound.js'; export * from './proxy.js'; -export * from './resources.js'; -export * from './static.js'; +export * from './resource.js'; +export * from './publicResource.js'; +export * from './publicPath.js'; +export * from './hmrPing.js'; +export * from './adaptorVite.js'; diff --git a/packages/core/src/server/middlewares/lazy-compilation.ts b/packages/core/src/server/middlewares/lazy-compilation.ts deleted file mode 100644 index 4fb4fbd37..000000000 --- a/packages/core/src/server/middlewares/lazy-compilation.ts +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Lazy compilation middleware. Using the same logic as HMR middleware - */ - -import { relative } from 'node:path'; -import { Context, Middleware, Next } from 'koa'; - -import { - VIRTUAL_FARM_DYNAMIC_IMPORT_SUFFIX, - bold, - checkClearScreen, - cyan, - getDynamicResources, - green -} from '../../index.js'; -import { Server } from '../index.js'; - -import { existsSync } from 'node:fs'; -import { logError } from '../error.js'; - -export function lazyCompilation(devSeverContext: Server): Middleware { - const compiler = devSeverContext.getCompiler(); - - if (!compiler.config.config?.lazyCompilation) { - return; - } - - return async (ctx: Context, next: Next) => { - if (ctx.path === '/__lazy_compile') { - const paths = (ctx.query.paths as string).split(','); - const pathsStr = paths - .map((p) => { - if ( - p.startsWith('/') && - !p.endsWith(VIRTUAL_FARM_DYNAMIC_IMPORT_SUFFIX) && - !existsSync(p) - ) { - return p; - } - const resolvedPath = compiler.transformModulePath( - compiler.config.config.root, - p - ); - return relative(compiler.config.config.root, resolvedPath); - }) - .join(', '); - checkClearScreen(compiler.config.config); - devSeverContext.logger.info(`Lazy compiling ${bold(cyan(pathsStr))}`); - const start = Date.now(); - // sync update when node is true - let result; - try { - // sync regenerate resources - result = await compiler.update(paths, true, false, false); - } catch (e) { - logError(e); - } - - if (!result) { - return; - } - - if (ctx.query.node || devSeverContext.config.writeToDisk) { - compiler.writeResourcesToDisk(); - } - - devSeverContext.logger.info( - `${bold(green(`✓`))} Lazy compilation done(${bold( - cyan(pathsStr) - )}) in ${bold(green(`${Date.now() - start}ms`))}.` - ); - - if (result) { - const { dynamicResources, dynamicModuleResourcesMap } = - getDynamicResources(result.dynamicResourcesMap); - - const returnObj = `{ - "dynamicResources": ${JSON.stringify(dynamicResources)}, - "dynamicModuleResourcesMap": ${JSON.stringify( - dynamicModuleResourcesMap - )} - }`; - const code = !ctx.query.node - ? `export default ${returnObj}` - : returnObj; - ctx.type = !ctx.query.node - ? 'application/javascript' - : 'application/json'; - ctx.body = code; - // enable cors - ctx.set('Access-Control-Allow-Origin', '*'); - ctx.set('Access-Control-Allow-Methods', '*'); - ctx.set('Access-Control-Allow-Headers', '*'); - } else { - throw new Error(`Lazy compilation result not found for paths ${paths}`); - } - } else { - await next(); - } - }; -} diff --git a/packages/core/src/server/middlewares/lazyCompilation.ts b/packages/core/src/server/middlewares/lazyCompilation.ts new file mode 100644 index 000000000..cebc26b4b --- /dev/null +++ b/packages/core/src/server/middlewares/lazyCompilation.ts @@ -0,0 +1,114 @@ +import { existsSync } from 'node:fs'; +import { relative } from 'node:path'; +import { parse as parseUrl } from 'node:url'; + +import { + Server, + VIRTUAL_FARM_DYNAMIC_IMPORT_SUFFIX, + bold, + cyan, + formatExecutionTime, + getDynamicResources, + green +} from '../../index.js'; +import { send } from '../send.js'; + +import type Connect from 'connect'; + +const DEFAULT_LAZY_COMPILATION_PATH = '/__lazy_compile'; + +export function lazyCompilationMiddleware( + app: Server +): Connect.NextHandleFunction { + return async function handleLazyCompilationMiddleware(req, res, next) { + const { resolvedUserConfig, compiler } = app; + + if (!req.url.startsWith(DEFAULT_LAZY_COMPILATION_PATH)) { + return await next(); + } + const parsedUrl = parseUrl(req.url, true); + const paths = (parsedUrl.query.paths as string).split(','); + + const isNodeEnvironment = parsedUrl.query.node; + const root = compiler.config.root; + const pathsStr = paths + .map((p) => { + if ( + p.startsWith('/') && + !p.endsWith(VIRTUAL_FARM_DYNAMIC_IMPORT_SUFFIX) && + !existsSync(p) + ) { + return p; + } + const resolvedPath = compiler.transformModulePath(root, p); + return relative(root, resolvedPath); + }) + .join(', '); + + resolvedUserConfig.logger.info( + `${bold(green('✨Lazy compiling'))} ${bold(cyan(pathsStr))}`, + true + ); + const start = performance.now(); + + let result; + try { + // sync regenerate resources + result = await compiler.update(paths, true, false, false); + } catch (e) { + throw new Error(`Lazy compilation update failed: ${e.message}`); + } + + if (!result) { + return next(); + } + + // TODO 取的对象不对 writeToDisk + // if (isNodeEnvironment || resolvedUserConfig.writeToDisk) { + if (isNodeEnvironment) { + compiler.writeResourcesToDisk(); + } + + resolvedUserConfig.logger.info( + `${bold(green(`✓ Lazy compilation done`))} ${bold( + cyan(pathsStr) + )} in ${bold( + green( + formatExecutionTime( + performance.now() - start, + resolvedUserConfig.timeUnit + ) + ) + )}.` + ); + + if (result) { + const { dynamicResources, dynamicModuleResourcesMap } = + getDynamicResources(result.dynamicResourcesMap); + + const responseData = { + dynamicResources, + dynamicModuleResourcesMap + }; + + const lazyCompilationContent = !isNodeEnvironment + ? `export default ${JSON.stringify(responseData)}` + : JSON.stringify(responseData); + + const contentType = !isNodeEnvironment + ? 'application/javascript' + : 'application/json'; + + send(req, res, lazyCompilationContent, req.url, { + headers: { + 'Content-Type': contentType, + 'Access-Control-Allow-Origin': '*', + 'Access-Control-Allow-Methods': '*', + 'Access-Control-Allow-Headers': '*' + } + }); + } else { + throw new Error(`Lazy compilation result not found for paths ${paths}`); + } + }; +} diff --git a/packages/core/src/server/middlewares/notFound.ts b/packages/core/src/server/middlewares/notFound.ts new file mode 100644 index 000000000..da5073736 --- /dev/null +++ b/packages/core/src/server/middlewares/notFound.ts @@ -0,0 +1,8 @@ +import type { NextHandleFunction } from 'connect'; + +export function notFoundMiddleware(): NextHandleFunction { + return function handle404Middleware(_, res) { + res.statusCode = 404; + res.end(); + }; +} diff --git a/packages/core/src/server/middlewares/proxy.ts b/packages/core/src/server/middlewares/proxy.ts index 2815a6374..3ee864787 100644 --- a/packages/core/src/server/middlewares/proxy.ts +++ b/packages/core/src/server/middlewares/proxy.ts @@ -1,98 +1,178 @@ -import { Options, createProxyMiddleware } from 'http-proxy-middleware'; -import { Context, Middleware, Next } from 'koa'; +import httpProxy from 'http-proxy'; +import { ResolvedUserConfig } from '../../config/types.js'; +import { colors } from '../../utils/index.js'; -import { UserConfig, UserHmrConfig } from '../../config/types.js'; -import { Logger } from '../../utils/logger.js'; -import type { Server } from '../index.js'; +import type * as http from 'node:http'; +import type * as net from 'node:net'; +import type Server from 'http-proxy'; -export function useProxy( - options: UserConfig['server'], - devSeverContext: Server, - logger: Logger -) { - const proxyOption = options['proxy']; - for (const path of Object.keys(proxyOption)) { - let opts = proxyOption[path] as Options; +import type Connect from 'connect'; +import type { Server as DevServer, HttpServer } from '../index.js'; +export interface ProxyOptions extends httpProxy.ServerOptions { + rewrite?: (path: string) => string; + configure?: (proxy: httpProxy, options: ProxyOptions) => void; + bypass?: ( + req: http.IncomingMessage, + res: http.ServerResponse, + options: ProxyOptions + ) => void | null | undefined | false | string; + rewriteWsOrigin?: boolean | undefined; +} + +export function proxyMiddleware( + app: DevServer, + middlewareServer: HttpServer | unknown +): Connect.NextHandleFunction { + const { serverOptions, resolvedUserConfig } = app; + const proxies: Record = {}; + Object.keys(serverOptions.proxy).forEach((context) => { + let opts = serverOptions.proxy[context]; + if (!opts) { + return; + } if (typeof opts === 'string') { - opts = { target: opts, changeOrigin: true }; + opts = { target: opts, changeOrigin: true } as ProxyOptions; } + const proxy = httpProxy.createProxyServer(opts) as Server; + + if (opts.configure) { + opts.configure(proxy, opts); + } + + proxy.on('error', (err, _req, originalRes) => { + // When it is ws proxy, res is net.Socket + // originalRes can be falsy if the proxy itself errored + const res = originalRes as http.ServerResponse | net.Socket | undefined; + if (!res) { + console.log( + `${colors.red(`http proxy error: ${err.message}`)}\n${err.stack}` + ); + } else if ('req' in res) { + // console.log( + // `${colors.red(`http proxy error: ${originalRes.req.url}`)}\n${ + // err.stack + // }`, + // ); + + if (!res.headersSent && !res.writableEnded) { + res + .writeHead(500, { + 'Content-Type': 'text/plain' + }) + .end(); + } + } else { + console.log(`${colors.red(`ws proxy error:`)}\n${err.stack}`); + res.end(); + } + }); + + proxy.on('proxyReqWs', (proxyReq, _req, socket, options, _head) => { + rewriteOriginHeader(proxyReq, options, resolvedUserConfig); - const proxyMiddleware = createProxyMiddleware(opts); - const server = devSeverContext.server; - const hmrOptions = options.hmr as UserHmrConfig; - if (server) { - server.on('upgrade', (req, socket: any, head) => { - if (req.url === hmrOptions.path) return; - for (const path in options.proxy) { - const opts = proxyOption[path] as Options; + socket.on('error', (err) => { + console.log(`${colors.red(`ws proxy socket error:`)}\n${err.stack}`); + }); + }); + + // https://github.com/http-party/node-http-proxy/issues/1520#issue-877626125 + // https://github.com/chimurai/http-proxy-middleware/blob/cd58f962aec22c925b7df5140502978da8f87d5f/src/plugins/default/debug-proxy-errors-plugin.ts#L25-L37 + proxy.on('proxyRes', (proxyRes, _req, res) => { + res.on('close', () => { + if (!res.writableEnded) { + proxyRes.destroy(); + } + }); + }); + + // clone before saving because http-proxy mutates the options + proxies[context] = [proxy, { ...opts }]; + }); + + if (app.httpServer) { + app.httpServer.on('upgrade', (req: any, socket: any, head: any) => { + const url = req.url; + for (const context in proxies) { + if (doesProxyContextMatchUrl(context, url)) { + const [proxy, opts] = proxies[context]; if ( opts.ws || opts.target?.toString().startsWith('ws:') || opts.target?.toString().startsWith('wss:') ) { - const proxy = createProxyMiddleware(opts); - if (opts.pathRewrite) { - const fromPath = Object.keys(opts.pathRewrite)[0]; - const toPath: string = ( - opts.pathRewrite as { [regexp: string]: string } - )[fromPath]; - req.url = rewritePath(req.url, fromPath, toPath); + if (opts.rewrite) { + req.url = opts.rewrite(url); } - proxy.upgrade(req, socket, head); + proxy.ws(req, socket, head); return; } } - }); - } - - const errorHandlerMiddleware = async (ctx: Context, next: Next) => { - try { - await new Promise((resolve, reject) => { - proxyMiddleware(ctx.req, ctx.res, (err) => { - if (err) { - reject(err); - } else { - resolve(); - } - }); - }); - await next(); - } catch (err) { - logger.error(`Error in proxy for path ${path}: \n ${err.stack}`); } - }; - - try { - if (path.length > 0) { - const pathRegex = new RegExp(path); - const app = devSeverContext.app(); - app.use((ctx, next) => { - if (pathRegex.test(ctx.path)) { - return errorHandlerMiddleware(ctx, next); + }); + } + return function handleProxyMiddleware(req, res, next) { + const url = req.url; + for (const context in proxies) { + if (doesProxyContextMatchUrl(context, url)) { + const [proxy, opts] = proxies[context]; + const options: httpProxy.ServerOptions = {}; + + if (opts.bypass) { + const bypassResult = opts.bypass(req, res, opts); + if (typeof bypassResult === 'string') { + req.url = bypassResult; + return next(); + } else if (bypassResult === false) { + res.statusCode = 404; + return res.end(); } - return next(); - }); + } + + if (opts.rewrite) { + req.url = opts.rewrite(req.url!); + } + proxy.web(req, res, options); + return; } - } catch (err) { - logger.error(`Error setting proxy for path ${path}: \n ${err.stack}`); } - } + next(); + }; } -export function proxy(devSeverContext: Server): Middleware { - const { config, logger } = devSeverContext; - if (!config.proxy) { - return; - } +function rewriteOriginHeader( + proxyReq: http.ClientRequest, + options: ProxyOptions, + config: ResolvedUserConfig +) { + // Browsers may send Origin headers even with same-origin + // requests. It is common for WebSocket servers to check the Origin + // header, so if rewriteWsOrigin is true we change the Origin to match + // the target URL. + if (options.rewriteWsOrigin) { + const { target } = options; - useProxy(config, devSeverContext, logger); -} + if (proxyReq.headersSent) { + console.warn( + 'Unable to rewrite Origin header as headers are already sent.' + ); + return; + } -function rewritePath(path: string, fromPath: RegExp | string, toPath: string) { - if (fromPath instanceof RegExp) { - return path.replace(fromPath, toPath); - } else { - return path.replace(new RegExp(fromPath), toPath); + if (proxyReq.getHeader('origin') && target) { + const changedOrigin = + typeof target === 'object' + ? `${target.protocol}//${target.host}` + : target; + + proxyReq.setHeader('origin', changedOrigin); + } } } + +function doesProxyContextMatchUrl(context: string, url: string): boolean { + return ( + (context[0] === '^' && new RegExp(context).test(url)) || + url.startsWith(context) + ); +} diff --git a/packages/core/src/server/middlewares/publicPath.ts b/packages/core/src/server/middlewares/publicPath.ts new file mode 100644 index 000000000..f5ef936bf --- /dev/null +++ b/packages/core/src/server/middlewares/publicPath.ts @@ -0,0 +1,77 @@ +import { cleanUrl, withTrailingSlash } from '../../utils/index.js'; + +import type Connect from 'connect'; +import type { Server } from '../index.js'; + +export function publicPathMiddleware(app: Server): Connect.NextHandleFunction { + const { publicPath, serverOptions } = app; + return function handlePublicPathMiddleware(req, res, next) { + // auto redirect to public path + const url = cleanUrl(req.url); + + if (url.startsWith(publicPath)) { + req.url = stripBase(url, publicPath); + return next(); + } + + if (serverOptions.middlewareMode) { + return next(); + } + + if (url === '/' || url === '/index.html') { + // redirect root visit to based url with search and hash + res.writeHead(302, { + Location: `${publicPath}${url.slice(url.length)}` + }); + res.end(); + return; + } + + const redirectPath = + withTrailingSlash(url) !== publicPath + ? joinUrlSegments(publicPath, url) + : publicPath; + + if (req.headers.accept?.includes('text/html')) { + res.writeHead(404, { + 'Content-Type': 'text/html' + }); + res.end( + `The server is configured with a public base URL of ${publicPath} - ` + + `did you mean to visit ${redirectPath} instead?` + ); + return; + } else { + // not found for resources + res.writeHead(404, { + 'Content-Type': 'text/plain' + }); + res.end( + `The server is configured with a public base URL of ${publicPath} - ` + + `did you mean to visit ${redirectPath} instead?` + ); + return; + } + }; +} + +export function stripBase(path: string, base: string): string { + if (path === base) { + return '/'; + } + const devBase = withTrailingSlash(base); + return path.startsWith(devBase) ? path.slice(devBase.length - 1) : path; +} + +export function joinUrlSegments(a: string, b: string): string { + if (!a || !b) { + return a || b || ''; + } + if (a[a.length - 1] === '/') { + a = a.substring(0, a.length - 1); + } + if (b[0] !== '/') { + b = '/' + b; + } + return a + b; +} diff --git a/packages/core/src/server/middlewares/publicResource.ts b/packages/core/src/server/middlewares/publicResource.ts new file mode 100644 index 000000000..c22c786b5 --- /dev/null +++ b/packages/core/src/server/middlewares/publicResource.ts @@ -0,0 +1,74 @@ +import sirv from 'sirv'; + +import { + cleanUrl, + knownJavascriptExtensionRE, + normalizePath +} from '../../utils/index.js'; + +import type Connect from 'connect'; +import type { Server } from '../index.js'; + +// TODO: if url endsWith importQueryRE we need can check if it is a module then serve or not + +export function publicMiddleware(app: Server): Connect.NextHandleFunction { + const { + resolvedUserConfig: config, + publicDir, + publicFiles, + publicPath + } = app; + + const headers = config.server.headers; + const serve = sirv(publicDir, { + etag: true, + setHeaders: (res, path) => { + // res.setHeader("Cache-Control", "public,max-age=31536000,immutable"); + if (knownJavascriptExtensionRE.test(path)) { + res.setHeader('Content-Type', 'text/javascript'); + } + if (headers) { + for (const name in headers) { + res.setHeader(name, headers[name]); + } + } + } + }); + const toFilePath = (url: string) => { + let filePath = cleanUrl(url); + if (filePath.indexOf('%') !== -1) { + try { + filePath = decodeURI(filePath); + } catch (err) { + // ignore + } + } + return normalizePath(filePath); + }; + + return async function farmHandlerPublicMiddleware( + req: any, + res: any, + next: () => void + ) { + const originalUrl = req.url; + const filePath = toFilePath(originalUrl); + // TODO public 缓存问题 + // 移除 URL 开头的 publicPath + const urlWithoutPublicPath = filePath.startsWith('/' + publicPath) + ? filePath.slice(publicPath.length + 1) + : filePath; + + // 检查文件是否在 publicFiles 中或者在 public 目录中 + if ( + (publicFiles && publicFiles.has(urlWithoutPublicPath)) || + (publicDir && serve(req, res, () => {})) + ) { + req.url = urlWithoutPublicPath; + + return serve(req, res, next); + } + + next(); + }; +} diff --git a/packages/core/src/server/middlewares/resource.ts b/packages/core/src/server/middlewares/resource.ts new file mode 100644 index 000000000..fbda71fb4 --- /dev/null +++ b/packages/core/src/server/middlewares/resource.ts @@ -0,0 +1,146 @@ +import mime from 'mime'; + +import path from 'node:path/posix'; + +import { Compiler } from '../../compiler/index.js'; +import { + cleanUrl, + generateFileTree, + generateFileTreeHtml +} from '../../utils/index.js'; +import { normalizePathByPublicPath } from '../publicDir.js'; +import { send } from '../send.js'; + +import type Connect from 'connect'; +import type { Server } from '../index.js'; + +type RealResourcePath = { + resourcePath: string; + rawPath: string; + resource: Buffer; +}; + +export function resourceMiddleware(app: Server): Connect.NextHandleFunction { + return async function generateResourceMiddleware(req, res, next) { + if (res.writableEnded) { + return next(); + } + const url = cleanUrl(req.url); + + const { compiler, resolvedUserConfig: config, publicPath } = app; + // TODO resolve html but not input file html + // htmlFallbackMiddleware appends '.html' to URLs + // if (url?.endsWith('.html') && req.headers['sec-fetch-dest'] !== 'script') { + // } + + if (compiler._isInitialCompile) { + await compiler.waitForInitialCompileFinish(); + } else { + if (compiler.compiling) { + await new Promise((resolve) => + compiler.onUpdateFinish(() => resolve()) + ); + } + } + + const resourceResult: any = findResource(req, res, compiler, publicPath); + + if (resourceResult === true) { + return next(); + } + // TODO if write to dist should be use sirv middleware + if (resourceResult) { + // need judge if resource is a deps node_modules set cache-control to 1 year + const headers = config.server.headers; + send(req, res, resourceResult.resource, url, { headers }); + return; + } + + // publicPath + // 处理找不到资源的情况 + + const { resourceWithoutPublicPath } = normalizePathByPublicPath( + publicPath, + url + ); + + const extension = path.extname(resourceWithoutPublicPath).toLowerCase(); + const mimeType = mime.getType(extension) || 'application/octet-stream'; + + const isHtmlRequest = + mimeType === 'text/html' || + (!extension && req.headers.accept?.includes('text/html')); + + if (!isHtmlRequest) { + // 对于非 HTML 请求,尝试在根目录查找资源 + const rootResource = compiler.resource( + path.basename(resourceWithoutPublicPath) + ); + if (rootResource) { + send(req, res, rootResource, url, { + headers: config.server.headers + }); + return; + } + // 如果在根目录也找不到,返回 404 + res.statusCode = 404; + res.end('Not found'); + return; + } + + // TODO prepare add spa config or else + // if (config.spa !== false) { + // let indexHtml = compiler.resources()["index.html"]; + + // if (indexHtml) { + // res.setHeader("Content-Type", "text/html"); + // res.end(indexHtml); + // return; + // } + // } + // TODO redefine spa mpa + let indexHtml = compiler.resources()['index.html']; + + if (indexHtml) { + res.setHeader('Content-Type', 'text/html'); + res.end(indexHtml); + return; + } + + // 如果找不到任何匹配的资源,返回 404 + res.statusCode = 404; + res.end('Not found'); + }; +} + +function findResource( + req: any, + res: any, + compiler: Compiler, + publicPath: string +): true | undefined | RealResourcePath { + const url = req.url && cleanUrl(req.url); + // output_files + if (url === '_output_files') { + const files = Object.keys(compiler.resources()).sort(); + const fileTree = generateFileTree(files); + res.type = '.html'; + res.body = generateFileTreeHtml(fileTree); + return true; + } + + const { resourceWithoutPublicPath } = normalizePathByPublicPath( + publicPath, + url + ); + + const resource = compiler.resource(resourceWithoutPublicPath); + + if (resource) { + return { + resource, + resourcePath: resourceWithoutPublicPath, + rawPath: url + }; + } +} diff --git a/packages/core/src/server/middlewares/resources.ts b/packages/core/src/server/middlewares/resources.ts deleted file mode 100644 index 175a42db4..000000000 --- a/packages/core/src/server/middlewares/resources.ts +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Serve resources that stored in memory. This middleware will be enabled when server.writeToDisk is false. - */ - -import { ReadStream, existsSync, readFileSync, statSync } from 'node:fs'; -import path, { extname } from 'node:path'; -import { Context, Middleware, Next } from 'koa'; -import koaStatic from 'koa-static'; -import { Compiler } from '../../compiler/index.js'; -import { - generateFileTree, - generateFileTreeHtml, - stripQueryAndHash -} from '../../utils/index.js'; -import { Server } from '../index.js'; - -interface RealResourcePath { - resourcePath: string; - rawPath: string; - resource: Buffer; -} - -function normalizePathByPublicPath(publicPath: string, resourcePath: string) { - const base = publicPath.match(/^https?:\/\//) ? '' : publicPath; - let resourceWithoutPublicPath = resourcePath; - - if (base && resourcePath.startsWith(base)) { - resourcePath = resourcePath.replace(new RegExp(`([^/]+)${base}`), '$1/'); - resourceWithoutPublicPath = resourcePath.slice(base.length); - } - - return { resourceWithoutPublicPath, fullPath: resourcePath }; -} - -function outputFilesMiddleware(compiler: Compiler): Middleware { - return async (ctx: Context, next: Next) => { - if (ctx.path === '/_output_files') { - const files = Object.keys(compiler.resources()).sort(); - const fileTree = generateFileTree(files); - ctx.type = '.html'; - ctx.body = generateFileTreeHtml(fileTree); - } else { - await next(); - } - }; -} - -function findResource( - paths: string[], - compiler: Compiler, - publicPath: string -): true | undefined | RealResourcePath { - for (const resourcePath of new Set(paths)) { - const { resourceWithoutPublicPath } = normalizePathByPublicPath( - publicPath, - resourcePath - ); - - const resource = compiler.resource(resourceWithoutPublicPath); - - if (resource) { - return { - resource, - resourcePath: resourceWithoutPublicPath, - rawPath: resourcePath - }; - } - } -} - -export function resourcesMiddleware(compiler: Compiler, serverContext: Server) { - return async (ctx: Context, next: Next) => { - await next(); - if (ctx.method !== 'HEAD' && ctx.method !== 'GET') return; - const hasHtmlPathWithPublicDir = path.resolve( - serverContext.publicDir, - 'index.html' - ); - - let isSkipPublicHtml; - if (ctx.body instanceof ReadStream) { - const readStream = ctx.body; - isSkipPublicHtml = readStream.path === hasHtmlPathWithPublicDir; - } - - // the response is already handled - if ((ctx.body || ctx.status !== 404) && !isSkipPublicHtml) return; - - const { config, publicPath } = serverContext; - // if compiler is compiling, wait for it to finish - if (compiler.compiling) { - await new Promise((resolve) => { - compiler.onUpdateFinish(() => resolve(undefined)); - }); - } - // Fallback to index.html if the resource is not found - const url = ctx.url?.slice(1) || 'index.html'; // remove leading slash - - let stripQueryAndHashUrl = stripQueryAndHash(url); - const resourceResult = findResource( - [url, stripQueryAndHashUrl], - compiler, - publicPath - ); - - if (resourceResult === true) { - return; - } - - if (resourceResult) { - ctx.type = extname(ctx?.path?.slice?.(1) || 'index.html'); - ctx.body = resourceResult.resource; - return; - } - - const { fullPath, resourceWithoutPublicPath } = normalizePathByPublicPath( - publicPath, - stripQueryAndHashUrl - ); - - // if resource is image or font, try it in local file system to be compatible with vue - { - // try local file system - const absPath = path.join( - compiler.config.config.root, - resourceWithoutPublicPath - ); - // const mimeStr = mime.lookup(absPath); - - if ( - existsSync(absPath) && - statSync(absPath).isFile() - // mimeStr && - // (mimeStr.startsWith('image') || mimeStr.startsWith('font')) - ) { - ctx.type = extname(fullPath); - ctx.body = readFileSync(absPath); - return; - } - - // try local file system with publicDir - const absPathPublicDir = path.resolve( - compiler.config.config.root, - compiler.config.config.assets.publicDir, - resourceWithoutPublicPath - ); - - if (existsSync(absPathPublicDir) && statSync(absPathPublicDir).isFile()) { - ctx.type = extname(fullPath); - ctx.body = readFileSync(absPathPublicDir); - return; - } - } - - // if resource is not found and spa is not disabled, find the closest index.html from resourcePath - { - // if request mime is not html, return 404 - if (!ctx.accepts('html')) { - ctx.status = 404; - } else if (config.spa !== false) { - const pathComps = resourceWithoutPublicPath.split('/'); - - while (pathComps.length > 0) { - const pathStr = pathComps.join('/') + '.html'; - const resource = compiler.resources()[pathStr]; - - if (resource) { - ctx.type = '.html'; - ctx.body = resource; - return; - } - - pathComps.pop(); - } - - const indexHtml = compiler.resources()['index.html']; - - if (indexHtml) { - ctx.type = '.html'; - ctx.body = indexHtml; - return; - } - } else { - // cannot find index.html, return 404 - ctx.status = 404; - } - } - }; -} - -export function resources(devSeverContext: Server): Middleware | Middleware[] { - const middlewares = [outputFilesMiddleware(devSeverContext.getCompiler())]; - if (!devSeverContext.config.writeToDisk) { - middlewares.push( - resourcesMiddleware(devSeverContext.getCompiler(), devSeverContext) - ); - } else { - middlewares.push( - koaStatic(devSeverContext.getCompiler().config.config.output.path, { - extensions: ['html'] - }) - ); - } - - middlewares.push(koaStatic(devSeverContext.publicDir)); - return middlewares; -} diff --git a/packages/core/src/server/middlewares/static.ts b/packages/core/src/server/middlewares/static.ts deleted file mode 100644 index 4c36bc501..000000000 --- a/packages/core/src/server/middlewares/static.ts +++ /dev/null @@ -1,60 +0,0 @@ -import fs from 'fs'; -import path, { relative } from 'path'; -import { Context, Middleware, Next } from 'koa'; -import serve from 'koa-static'; -import { Server } from '../index.js'; - -export function staticMiddleware(devServerContext: Server): Middleware { - const { config } = devServerContext; - - const staticMiddleware = serve(config.distDir, { - // multiple page maybe receive "about", should auto try extension - extensions: ['html'] - }); - - // Fallback - const fallbackMiddleware: Middleware = async (ctx: Context, next: Next) => { - await next(); - - // If staticMiddleware doesn't find the file, try to serve index.html - if (ctx.status === 404 && !ctx.body) { - ctx.type = 'html'; - ctx.body = fs.createReadStream(path.join(config.distDir, 'index.html')); - } - }; - - return async (ctx: Context, next: Next) => { - if (ctx.status !== 404 || ctx.body) { - await next(); - return; - } - - const requestPath = ctx.request?.path; - let modifiedPath = requestPath; - - if (requestPath) { - if (config.output.publicPath.startsWith('/')) { - modifiedPath = requestPath.substring(config.output.publicPath.length); - } else { - const publicPath = relative( - path.join(config.distDir, config.output.publicPath), - config.distDir - ); - modifiedPath = requestPath.substring(publicPath.length + 1); - } - } - - ctx.request.path = `/${modifiedPath}`; - - try { - // Serve middleware for static files - await staticMiddleware(ctx, async () => { - // If staticMiddleware doesn't find the file or refresh current page router, execute fallbackMiddleware - await fallbackMiddleware(ctx, next); - }); - } catch (error) { - devServerContext.logger.error('Static file handling error:', error); - ctx.status = 500; - } - }; -} diff --git a/packages/core/src/server/preview.ts b/packages/core/src/server/preview.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/packages/core/src/server/preview.ts @@ -0,0 +1 @@ +export {}; diff --git a/packages/core/src/server/publicDir.ts b/packages/core/src/server/publicDir.ts new file mode 100644 index 000000000..6880c6df4 --- /dev/null +++ b/packages/core/src/server/publicDir.ts @@ -0,0 +1,49 @@ +import { ResolvedUserConfig } from '../config/types.js'; +import { recursiveReaddir } from '../utils/index.js'; + +export const ERR_SYMLINK_IN_RECURSIVE_READDIR = + 'ERR_SYMLINK_IN_RECURSIVE_READDIR'; + +const publicFilesMap = new WeakMap>(); + +export async function initPublicFiles( + config: ResolvedUserConfig +): Promise | undefined> { + let fileNames: string[]; + const publicDir: string = config.publicDir; + + try { + fileNames = await recursiveReaddir(publicDir); + } catch (e) { + if (e.code === ERR_SYMLINK_IN_RECURSIVE_READDIR) { + return; + } + throw e; + } + const publicFiles = new Set( + fileNames.map((fileName) => fileName.slice(publicDir.length)) + ); + publicFilesMap.set(config, publicFiles); + return publicFiles; +} + +export function getPublicFiles( + config: ResolvedUserConfig +): Set | undefined { + return publicFilesMap.get(config); +} + +export function normalizePathByPublicPath( + publicPath: string, + resourcePath: string +) { + const base = publicPath.match(/^https?:\/\//) ? '' : publicPath; + let resourceWithoutPublicPath = resourcePath; + + if (base && resourcePath.startsWith(base)) { + resourcePath = resourcePath.replace(new RegExp(`([^/]+)${base}`), '$1/'); + resourceWithoutPublicPath = resourcePath.slice(base.length); + } + + return { resourceWithoutPublicPath, fullPath: resourcePath }; +} diff --git a/packages/core/src/server/send.ts b/packages/core/src/server/send.ts new file mode 100644 index 000000000..32d26731e --- /dev/null +++ b/packages/core/src/server/send.ts @@ -0,0 +1,48 @@ +import { IncomingMessage, OutgoingHttpHeaders, ServerResponse } from 'http'; +import getEtag from 'etag'; +import mime from 'mime'; +import { extname } from 'path/posix'; + +export interface SendOptions { + etag?: string; + cacheControl?: string; + headers?: OutgoingHttpHeaders; +} + +export function send( + req: IncomingMessage, + res: ServerResponse, + content: string | Buffer, + url: string, + options: SendOptions +): void { + const { + etag = getEtag(content, { weak: true }), + cacheControl = 'no-cache', + headers + } = options; + + if (res.writableEnded) { + return; + } + + if (req.headers['if-none-match'] === etag) { + res.statusCode = 304; + res.end(); + return; + } + + res.setHeader('Content-Type', mime.getType(extname(url))); + res.setHeader('Cache-Control', cacheControl); + res.setHeader('Etag', etag); + + if (headers) { + for (const name in headers) { + res.setHeader(name, headers[name]); + } + } + + res.statusCode = 200; + res.end(content); + return; +} diff --git a/packages/core/src/server/type.ts b/packages/core/src/server/type.ts index 6e6a93f64..b8f039136 100644 --- a/packages/core/src/server/type.ts +++ b/packages/core/src/server/type.ts @@ -1,4 +1,99 @@ -import http from 'node:http'; -import http2 from 'node:http2'; +export type HMRPayload = + | ConnectedPayload + | UpdatePayload + | FullReloadPayload + | CustomPayload + | ErrorPayload + | PrunePayload; -export type Server = http.Server | http2.Http2SecureServer; +export interface ConnectedPayload { + type: 'connected'; +} + +export interface UpdatePayload { + type: 'update'; + updates: Update[]; +} + +export interface Update { + type: 'js-update' | 'css-update'; + path: string; + acceptedPath: string; + timestamp: number; + /** @internal */ + explicitImportRequired?: boolean; + /** @internal */ + isWithinCircularImport?: boolean; + /** @internal */ + ssrInvalidates?: string[]; +} + +export interface PrunePayload { + type: 'prune'; + paths: string[]; +} + +export interface FullReloadPayload { + type: 'full-reload'; + path?: string; + /** @internal */ + triggeredBy?: string; +} + +export interface CustomPayload { + type: 'custom'; + event: string; + data?: any; +} + +export interface ErrorPayload { + type: 'error'; + err: { + [name: string]: any; + message: string; + stack: string; + id?: string; + frame?: string; + plugin?: string; + pluginCode?: string; + loc?: { + file?: string; + line: number; + column: number; + }; + }; +} + +export interface CustomEventMap { + 'vite:beforeUpdate': UpdatePayload; + 'vite:afterUpdate': UpdatePayload; + 'vite:beforePrune': PrunePayload; + 'vite:beforeFullReload': FullReloadPayload; + 'vite:error': ErrorPayload; + 'vite:invalidate': InvalidatePayload; + 'vite:ws:connect': WebSocketConnectionPayload; + 'vite:ws:disconnect': WebSocketConnectionPayload; +} + +export interface WebSocketConnectionPayload { + webSocket: WebSocket; +} + +export interface InvalidatePayload { + path: string; + message: string | undefined; +} + +export type InferCustomEventPayload = + T extends keyof CustomEventMap ? CustomEventMap[T] : any; + +export interface HMRBroadcasterClient { + /** + * Send event to the client + */ + send(payload: HMRPayload): void; + /** + * Send custom event + */ + send(event: string, payload?: CustomPayload['data']): void; +} diff --git a/packages/core/src/server/ws.ts b/packages/core/src/server/ws.ts index 1281974c4..e89eb90b3 100644 --- a/packages/core/src/server/ws.ts +++ b/packages/core/src/server/ws.ts @@ -1,24 +1,73 @@ -import type { IncomingMessage } from 'node:http'; -import type { Duplex } from 'node:stream'; -import type { WebSocket as WebSocketRawType } from 'ws'; +import { STATUS_CODES, createServer as createHttpServer } from 'node:http'; +import { createServer as createHttpsServer } from 'node:https'; +import path from 'node:path'; +import { WebSocketServer as WebSocketServerRaw_ } from 'ws'; -import { WebSocket, WebSocketServer as WebSocketServerRaw } from 'ws'; -import { Logger, NormalizedServerConfig, red } from '../index.js'; -import { HmrEngine } from './hmr-engine.js'; -import { Server } from './type.js'; +import { ILogger, Logger } from '../utils/logger.js'; +import { isObject } from '../utils/share.js'; +import { HMRChannel } from './hmr.js'; +import { ServerOptions } from './index.js'; -import type { ILogger } from '../index.js'; +import type { IncomingMessage, Server } from 'node:http'; +import type { Socket } from 'node:net'; +import type { Duplex } from 'node:stream'; +import type { WebSocket as WebSocketRaw } from 'ws'; +import type { WebSocket as WebSocketTypes } from '../types/ws.js'; -const HMR_HEADER = 'farm_hmr'; +import { + CustomPayload, + ErrorPayload, + HMRPayload, + InferCustomEventPayload +} from './type.js'; -export interface IWebSocketServer { - clients: Set; +const WS_CONNECTED_MESSAGE = JSON.stringify({ type: 'connected' }); +const WS_CUSTOM_EVENT_TYPE = 'custom'; + +export interface WebSocketServer extends HMRChannel { + /** + * Listen on port and host + */ listen(): void; - send(payload: any): void; - send(event: T, payload?: any): void; + /** + * Get all connected clients. + */ + clients: Set; + /** + * Disconnect all clients and terminate the server. + */ close(): Promise; - on(event: string, listener: any): void; - off(event: string, listener: any): void; + /** + * Handle custom event emitted by `import.meta.hot.send` + */ + on: WebSocketTypes.Server['on'] & { + ( + event: T, + listener: WebSocketCustomListener> + ): void; + }; + /** + * Unregister event listener. + */ + off: WebSocketTypes.Server['off'] & { + (event: string, listener: Function): void; + }; +} + +export interface WebSocketClient { + /** + * Send event to the client + */ + send(payload: HMRPayload): void; + /** + * Send custom event + */ + send(event: string, payload?: CustomPayload['data']): void; + /** + * The raw WebSocket instance + * @advanced + */ + socket: WebSocketTypes; } const wsServerEvents = [ @@ -28,138 +77,138 @@ const wsServerEvents = [ 'listening', 'message' ]; + +function noop() { + // noop +} + +const HMR_HEADER = 'farm_hmr'; + export type WebSocketCustomListener = ( data: T, client: WebSocketClient ) => void; -export interface WebSocketClient { - send(payload: any): void; - send(event: string, payload?: any['data']): void; - rawSend(str: string): void; - socket: WebSocketRawType; -} -export default class WsServer implements IWebSocketServer { - public wss: WebSocketServerRaw; +const WebSocketServerRaw = process.versions.bun + ? // @ts-expect-error: Bun defines `import.meta.require` + import.meta.require('ws').WebSocketServer + : WebSocketServerRaw_; + +export class WsServer { + public wss: WebSocketServerRaw_; public customListeners = new Map>>(); - public clientsMap = new WeakMap(); - public bufferedError: any = null; + public clientsMap = new WeakMap(); + public bufferedError: ErrorPayload | null = null; public logger: ILogger; - constructor( - private httpServer: Server, - private config: NormalizedServerConfig, - private hmrEngine: HmrEngine, - logger?: ILogger - ) { - this.logger = logger ?? new Logger(); - this.createWebSocketServer(); - } - - private createWebSocketServer() { - try { - const WebSocketServer = process.versions.bun - ? // @ts-expect-error: Bun defines `import.meta.require` - import.meta.require('ws').WebSocketServer - : WebSocketServerRaw; - this.wss = new WebSocketServer({ noServer: true }); - this.connection(); - // TODO IF not have httpServer - this.httpServer.on('upgrade', this.upgradeWsServer.bind(this)); - } catch (err) { - this.handleSocketError(err); - } - } - - private upgradeWsServer( - request: IncomingMessage, + public wsServer: any; + wsHttpServer: Server | undefined; + private serverConfig: ServerOptions; + private port: number; + private host: string | undefined; + private hmrServerWsListener: ( + req: InstanceType, socket: Duplex, head: Buffer - ) { - if (this.isHMRRequest(request)) { - this.handleHMRUpgrade(request, socket, head); - } + ) => void; + /** + * Creates a new WebSocket server instance. + * @param {any} app - The application instance containing configuration and logger. + */ + constructor(private readonly app: any) { + this.logger = app.logger ?? new Logger(); + this.serverConfig = app.resolvedUserConfig.server as ServerOptions; + this.createWebSocketServer(); } - listen() { - // TODO alone with use httpServer we need start this function - // Start listening for WebSocket connections + /** + * Gets the server name. + * @returns {string} Returns "ws". + */ + get name(): string { + return 'ws'; } - // Farm uses the `sendMessage` method in hmr and - // the send method is reserved for migration vite - send(...args: any[]) { - let payload: any; - if (typeof args[0] === 'string') { - payload = { - type: 'custom', - event: args[0], - data: args[1] + /** + * Creates the WebSocket server. + */ + createWebSocketServer() { + if (this.serverConfig.ws === false) { + return { + name: 'ws', + get clients() { + return new Set(); + }, + async close() { + // noop + }, + on: noop as any as WebSocketServer['on'], + off: noop as any as WebSocketServer['off'], + listen: noop, + send: noop }; - } else { - payload = args[0]; } - if (payload.type === 'error' && !this.wss.clients.size) { - this.bufferedError = payload; - return; - } + const hmr = isObject(this.serverConfig.hmr) + ? this.serverConfig.hmr + : undefined; + const hmrServer = hmr?.server; + const hmrPort = hmr?.port; + const portsAreCompatible = !hmrPort || hmrPort === this.serverConfig.port; + this.wsServer = hmrServer || (portsAreCompatible && this.app.httpServer); - const stringified = JSON.stringify(payload); - this.wss.clients.forEach((client) => { - // readyState 1 means the connection is open - if (client.readyState === 1) { - client.send(stringified); - } - }); - } - - private isHMRRequest(request: IncomingMessage): boolean { - return ( - request.url === this.config.hmr.path && - request.headers['sec-websocket-protocol'] === HMR_HEADER - ); - } - - private handleHMRUpgrade( - request: IncomingMessage, - socket: Duplex, - head: Buffer - ) { - this.wss.handleUpgrade(request, socket, head, (ws: WebSocketRawType) => { - this.wss.emit('connection', ws, request); - }); - } + this.port = (hmrPort as number) || 9000; + this.host = ((hmr && hmr.host) as string) || undefined; - get clients(): Set { - return new Set( - Array.from(this.wss.clients).map(this.getSocketClient.bind(this)) - ); - } + if (this.wsServer) { + let hmrBase = this.app.publicPath; - // a custom method defined by farm to send custom events - public sendCustomEvent(event: T, payload?: any) { - // Send a custom event to all clients - this.send({ type: 'custom', event, data: payload }); - } + const hmrPath = hmr?.path; + if (hmrPath) { + hmrBase = path.posix.join(hmrBase, hmrPath as string); + } - public on(event: string, listener: (...args: any[]) => void) { - if (wsServerEvents.includes(event)) { - this.wss.on(event, listener); + this.wss = new WebSocketServerRaw({ noServer: true }); + this.hmrServerWsListener = (req, socket, head) => { + // TODO 这里需要处理一下 normalizePublicPath 的问题 hmrBase 路径匹配不到 req.url 的问题 + if ( + req.headers['sec-websocket-protocol'] === HMR_HEADER && + req.url === hmrBase + ) { + this.wss.handleUpgrade(req, socket as Socket, head, (ws) => { + this.wss.emit('connection', ws, req); + }); + } + }; + this.wsServer.on('upgrade', this.hmrServerWsListener); } else { - this.addCustomEventListener(event, listener); - } - } + // http server request handler keeps the same with + // https://github.com/websockets/ws/blob/45e17acea791d865df6b255a55182e9c42e5877a/lib/websocket-server.js#L88-L96 + const route = ((_, res) => { + const statusCode = 426; + const body = STATUS_CODES[statusCode]; + if (!body) + throw new Error( + `No body text found for the ${statusCode} status code` + ); - public off(event: string, listener: () => void) { - if (wsServerEvents.includes(event)) { - this.wss.off(event, listener); - } else { - this.removeCustomEventListener(event, listener); + res.writeHead(statusCode, { + 'Content-Length': body.length, + 'Content-Type': 'text/plain' + }); + res.end(body); + }) as Parameters[1]; + + if (this.app.httpsOptions) { + this.wsHttpServer = createHttpsServer(this.app.httpsOptions, route); + } else { + this.wsHttpServer = createHttpServer(route); + } + // vite dev server in middleware mode + // need to call ws listen manually + this.wss = new WebSocketServerRaw({ server: this.wsHttpServer }); } - } - connection() { - this.wss.on('connection', (socket: WebSocketRawType) => { + this.wss.on('connection', (socket) => { socket.on('message', (raw) => { if (!this.customListeners.size) return; let parsed: any; @@ -170,115 +219,170 @@ export default class WsServer implements IWebSocketServer { } // transform vite js-update to farm update if (parsed?.type === 'js-update' && parsed?.path) { - this.hmrEngine.hmrUpdate(parsed.path, true); + this.app.hmrEngine.hmrUpdate(parsed.path, true); return; } - - if (!parsed || parsed.type !== 'custom' || !parsed.event) return; + if (!parsed || parsed.type !== WS_CUSTOM_EVENT_TYPE || !parsed.event) + return; const listeners = this.customListeners.get(parsed.event); if (!listeners?.size) return; - const client = this.getSocketClient(socket); + const client = this.#getSocketClient(socket); listeners.forEach((listener) => listener(parsed.data, client)); }); - - socket.on('error', (err: Error & { code: string }) => { - return this.handleSocketError(err); + socket.on('error', (err) => { + throw new Error(`WebSocket error: \n${err.stack}`); }); - socket.send(JSON.stringify({ type: 'connected' })); + socket.send(WS_CONNECTED_MESSAGE); if (this.bufferedError) { socket.send(JSON.stringify(this.bufferedError)); this.bufferedError = null; } }); + + this.wss.on('error', (e: Error & { code: string }) => { + if (e.code === 'EADDRINUSE') { + throw new Error('WebSocket server error: Port is already in use'); + } else { + throw new Error(`WebSocket server error ${e.stack || e.message}`); + } + }); + } + + /** + * Starts listening for WebSocket connections. + */ + listen() { + this.wsHttpServer?.listen(this.port, this.host); } - public async close() { - if (this.upgradeWsServer && this.httpServer) { - this.httpServer.off('upgrade', this.upgradeWsServer); + /** + * Adds a listener for the specified event. + * @param {string} event - The name of the event. + * @param {Function} fn - The listener function. + */ + on(event: string, fn: () => void) { + if (wsServerEvents.includes(event)) { + this.wss.on(event, fn); + } else { + if (!this.customListeners.has(event)) { + this.customListeners.set(event, new Set()); + } + this.customListeners.get(event).add(fn); } - await this.terminateAllClients(); - await this.closeWebSocketServer(); - // TODO if not have httpServer we need close httpServer } - private terminateAllClients() { - const terminatePromises = Array.from(this.wss.clients).map((client) => { - return new Promise((resolve) => { - if (client.readyState === WebSocket.OPEN) { - client.send(JSON.stringify({ type: 'closing' })); - client.close(1000, 'Server shutdown'); - } - // Temporarily remove the direct shutdown of ws - // client.terminate(); - client.once('close', () => resolve(true)); - }); - }); - return Promise.all(terminatePromises); + /** + * Removes a listener for the specified event. + * @param {string} event - The name of the event. + * @param {Function} fn - The listener function to remove. + */ + off(event: string, fn: () => void) { + if (wsServerEvents.includes(event)) { + this.wss.off(event, fn); + } else { + this.customListeners.get(event)?.delete(fn); + } } - private closeWebSocketServer() { - return new Promise((resolve, reject) => { - this.wss.close((err) => { - if (err) { - reject(err); - } else { - // TODO if not have httpServer - resolve(true); - } - }); - }); + /** + * Gets all connected clients. + * @returns {Set} A set of connected clients. + */ + get clients() { + return new Set( + Array.from(this.wss.clients).map((socket: any) => + this.#getSocketClient(socket) + ) + ); } - private addCustomEventListener(event: string, listener: () => void) { - if (!this.customListeners.has(event)) { - this.customListeners.set(event, new Set()); + /** + * Sends a message to all connected clients. + * @param {...any} args - The message arguments to send. + */ + send(...args: any[]) { + const payload: HMRPayload = this.#createPayload(...args); + if (payload.type === 'error' && !this.wss.clients.size) { + this.bufferedError = payload; + return; } - this.customListeners.get(event).add(listener); - } - private removeCustomEventListener(event: string, listener: () => void) { - this.customListeners.get(event)?.delete(listener); + const stringified = JSON.stringify(payload); + this.wss.clients.forEach((client: any) => { + // readyState 1 means the connection is open + if (client.readyState === 1) { + client.send(stringified); + } + }); } - private getSocketClient(socket: WebSocketRawType) { - if (!this.clientsMap.has(socket)) { - this.clientsMap.set(socket, { - send: (...args) => this.sendMessage(socket, ...args), - socket, - rawSend: (str) => socket.send(str) + /** + * Closes the WebSocket server. + * @returns {Promise} A promise that resolves when the server is closed. + */ + async close() { + // should remove listener if hmr.server is set + // otherwise the old listener swallows all WebSocket connections + if (this.hmrServerWsListener && this.wsServer) { + this.wsServer.off('upgrade', this.hmrServerWsListener); + } + try { + this.wss.clients.forEach((client: any) => { + client.terminate(); + }); + await new Promise((resolve, reject) => { + this.wss.close((err: any) => (err ? reject(err) : resolve())); }); + if (this.wsHttpServer) { + await new Promise((resolve, reject) => { + this.wsHttpServer.close((err: any) => + err ? reject(err) : resolve() + ); + }); + } + } catch (err) { + throw new Error(`Failed to close WebSocket server: ${err}`); } - return this.clientsMap.get(socket); } - private sendMessage(socket: WebSocketRawType, ...args: any[]) { - let payload: any; + /** + * Creates an HMR payload. + * @private + * @param {...any} args - The payload arguments. + * @returns {HMRPayload} The HMR payload object. + */ + #createPayload(...args: any[]): HMRPayload { if (typeof args[0] === 'string') { - payload = { + return { type: 'custom', event: args[0], data: args[1] }; } else { - payload = args[0]; + return args[0]; } - socket.send(JSON.stringify(payload)); } - private handleSocketError(err: Error & { code: string }) { - if (err.code === 'EADDRINUSE') { - this.logger.error(red(`WebSocket server error: Port is already in use`), { - error: err + /** + * Gets the client object associated with a WebSocket. + * @private + * @param {WebSocketRaw} socket - The raw WebSocket object. + * @returns {WebSocketClient} The client object. + */ + #getSocketClient(socket: WebSocketRaw) { + if (!this.clientsMap.has(socket)) { + this.clientsMap.set(socket, { + send: (...args) => { + const payload: HMRPayload = this.#createPayload(...args); + socket.send(JSON.stringify(payload)); + }, + // @ts-ignore + rawSend: (str: string) => socket.send(str), + socket }); - } else { - this.logger.error( - red(`WebSocket server error:\n${err.stack || err.message}`), - { - error: err - } - ); } + return this.clientsMap.get(socket); } } diff --git a/packages/core/src/types/binding.ts b/packages/core/src/types/binding.ts index fb2a31851..a88168e51 100644 --- a/packages/core/src/types/binding.ts +++ b/packages/core/src/types/binding.ts @@ -176,7 +176,10 @@ export interface ResolveConfig { /** * Configure parsing alias. Alias is prefix replacement, for example /@/pages/index will be replaced by /root/src/pages/index. If you want an exact match, you can add $, for example stream$ will only replace stream, but not stream/xxx. */ - alias?: Record; + // TODO customResolver?: ResolverFunction | ResolverObject + alias?: + | Record + | Array<{ find: string | RegExp; replacement: string }>; /** * When parsing dependencies under node_modules, the fields and order configured in mainFields will be parsed from package.json. For package.json * @default ["exports", "browser", "module", "main"] @@ -370,6 +373,7 @@ export interface PartialBundlingConfig { test: string[]; groupType?: 'mutable' | 'immutable'; resourceType?: 'all' | 'initial' | 'async'; + enforce?: boolean; }[]; /** * Array to match the modules that should always be in the same bundles, ignore all other constraints. @@ -405,7 +409,6 @@ export interface PresetEnvConfig { export interface Config { config?: { - clearScreen?: boolean; coreLibPath?: string; /** * Compilation entries diff --git a/packages/core/src/types/ws.ts b/packages/core/src/types/ws.ts new file mode 100644 index 000000000..f03298cd9 --- /dev/null +++ b/packages/core/src/types/ws.ts @@ -0,0 +1,559 @@ +// Modified and inlined to avoid extra dependency +// Source: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/ws/index.d.ts + +// Type definitions for ws 8.5 +// Project: https://github.com/websockets/ws +// Definitions by: Paul Loyd +// Margus Lamp +// Philippe D'Alva +// reduckted +// teidesu +// Bartosz Wojtkowiak +// Kyle Hensel +// Samuel Skeen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { EventEmitter } from 'node:events'; +import type { + Agent, + ClientRequest, + ClientRequestArgs, + Server as HTTPServer, + IncomingMessage, + OutgoingHttpHeaders +} from 'node:http'; +import type { Server as HTTPSServer } from 'node:https'; +import type { Duplex, DuplexOptions } from 'node:stream'; +import type { SecureContextOptions } from 'node:tls'; +import type { URL } from 'node:url'; +import type { ZlibOptions } from 'node:zlib'; + +// WebSocket socket. +declare class WebSocket extends EventEmitter { + /** The connection is not yet open. */ + static readonly CONNECTING: 0; + /** The connection is open and ready to communicate. */ + static readonly OPEN: 1; + /** The connection is in the process of closing. */ + static readonly CLOSING: 2; + /** The connection is closed. */ + static readonly CLOSED: 3; + + binaryType: 'nodebuffer' | 'arraybuffer' | 'fragments'; + readonly bufferedAmount: number; + readonly extensions: string; + /** Indicates whether the websocket is paused */ + readonly isPaused: boolean; + readonly protocol: string; + /** The current state of the connection */ + readonly readyState: + | typeof WebSocket.CONNECTING + | typeof WebSocket.OPEN + | typeof WebSocket.CLOSING + | typeof WebSocket.CLOSED; + readonly url: string; + + /** The connection is not yet open. */ + readonly CONNECTING: 0; + /** The connection is open and ready to communicate. */ + readonly OPEN: 1; + /** The connection is in the process of closing. */ + readonly CLOSING: 2; + /** The connection is closed. */ + readonly CLOSED: 3; + + onopen: ((event: WebSocket.Event) => void) | null; + onerror: ((event: WebSocket.ErrorEvent) => void) | null; + onclose: ((event: WebSocket.CloseEvent) => void) | null; + onmessage: ((event: WebSocket.MessageEvent) => void) | null; + + constructor(address: null); + constructor( + address: string | URL, + options?: WebSocket.ClientOptions | ClientRequestArgs + ); + constructor( + address: string | URL, + protocols?: string | string[], + options?: WebSocket.ClientOptions | ClientRequestArgs + ); + + close(code?: number, data?: string | Buffer): void; + ping(data?: any, mask?: boolean, cb?: (err: Error) => void): void; + pong(data?: any, mask?: boolean, cb?: (err: Error) => void): void; + send(data: any, cb?: (err?: Error) => void): void; + send( + data: any, + options: { + mask?: boolean | undefined; + binary?: boolean | undefined; + compress?: boolean | undefined; + fin?: boolean | undefined; + }, + cb?: (err?: Error) => void + ): void; + terminate(): void; + + /** + * Pause the websocket causing it to stop emitting events. Some events can still be + * emitted after this is called, until all buffered data is consumed. This method + * is a noop if the ready state is `CONNECTING` or `CLOSED`. + */ + pause(): void; + /** + * Make a paused socket resume emitting events. This method is a noop if the ready + * state is `CONNECTING` or `CLOSED`. + */ + resume(): void; + + // HTML5 WebSocket events + addEventListener( + method: 'message', + cb: (event: WebSocket.MessageEvent) => void, + options?: WebSocket.EventListenerOptions + ): void; + addEventListener( + method: 'close', + cb: (event: WebSocket.CloseEvent) => void, + options?: WebSocket.EventListenerOptions + ): void; + addEventListener( + method: 'error', + cb: (event: WebSocket.ErrorEvent) => void, + options?: WebSocket.EventListenerOptions + ): void; + addEventListener( + method: 'open', + cb: (event: WebSocket.Event) => void, + options?: WebSocket.EventListenerOptions + ): void; + + removeEventListener( + method: 'message', + cb: (event: WebSocket.MessageEvent) => void + ): void; + removeEventListener( + method: 'close', + cb: (event: WebSocket.CloseEvent) => void + ): void; + removeEventListener( + method: 'error', + cb: (event: WebSocket.ErrorEvent) => void + ): void; + removeEventListener( + method: 'open', + cb: (event: WebSocket.Event) => void + ): void; + + // Events + on( + event: 'close', + listener: (this: WebSocket, code: number, reason: Buffer) => void + ): this; + on(event: 'error', listener: (this: WebSocket, err: Error) => void): this; + on( + event: 'upgrade', + listener: (this: WebSocket, request: IncomingMessage) => void + ): this; + on( + event: 'message', + listener: ( + this: WebSocket, + data: WebSocket.RawData, + isBinary: boolean + ) => void + ): this; + on(event: 'open', listener: (this: WebSocket) => void): this; + on( + event: 'ping' | 'pong', + listener: (this: WebSocket, data: Buffer) => void + ): this; + on( + event: 'unexpected-response', + listener: ( + this: WebSocket, + request: ClientRequest, + response: IncomingMessage + ) => void + ): this; + on( + event: string | symbol, + listener: (this: WebSocket, ...args: any[]) => void + ): this; + + once( + event: 'close', + listener: (this: WebSocket, code: number, reason: Buffer) => void + ): this; + once(event: 'error', listener: (this: WebSocket, err: Error) => void): this; + once( + event: 'upgrade', + listener: (this: WebSocket, request: IncomingMessage) => void + ): this; + once( + event: 'message', + listener: ( + this: WebSocket, + data: WebSocket.RawData, + isBinary: boolean + ) => void + ): this; + once(event: 'open', listener: (this: WebSocket) => void): this; + once( + event: 'ping' | 'pong', + listener: (this: WebSocket, data: Buffer) => void + ): this; + once( + event: 'unexpected-response', + listener: ( + this: WebSocket, + request: ClientRequest, + response: IncomingMessage + ) => void + ): this; + once( + event: string | symbol, + listener: (this: WebSocket, ...args: any[]) => void + ): this; + + off( + event: 'close', + listener: (this: WebSocket, code: number, reason: Buffer) => void + ): this; + off(event: 'error', listener: (this: WebSocket, err: Error) => void): this; + off( + event: 'upgrade', + listener: (this: WebSocket, request: IncomingMessage) => void + ): this; + off( + event: 'message', + listener: ( + this: WebSocket, + data: WebSocket.RawData, + isBinary: boolean + ) => void + ): this; + off(event: 'open', listener: (this: WebSocket) => void): this; + off( + event: 'ping' | 'pong', + listener: (this: WebSocket, data: Buffer) => void + ): this; + off( + event: 'unexpected-response', + listener: ( + this: WebSocket, + request: ClientRequest, + response: IncomingMessage + ) => void + ): this; + off( + event: string | symbol, + listener: (this: WebSocket, ...args: any[]) => void + ): this; + + addListener( + event: 'close', + listener: (code: number, reason: Buffer) => void + ): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener( + event: 'upgrade', + listener: (request: IncomingMessage) => void + ): this; + addListener( + event: 'message', + listener: (data: WebSocket.RawData, isBinary: boolean) => void + ): this; + addListener(event: 'open', listener: () => void): this; + addListener(event: 'ping' | 'pong', listener: (data: Buffer) => void): this; + addListener( + event: 'unexpected-response', + listener: (request: ClientRequest, response: IncomingMessage) => void + ): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener( + event: 'close', + listener: (code: number, reason: Buffer) => void + ): this; + removeListener(event: 'error', listener: (err: Error) => void): this; + removeListener( + event: 'upgrade', + listener: (request: IncomingMessage) => void + ): this; + removeListener( + event: 'message', + listener: (data: WebSocket.RawData, isBinary: boolean) => void + ): this; + removeListener(event: 'open', listener: () => void): this; + removeListener( + event: 'ping' | 'pong', + listener: (data: Buffer) => void + ): this; + removeListener( + event: 'unexpected-response', + listener: (request: ClientRequest, response: IncomingMessage) => void + ): this; + removeListener( + event: string | symbol, + listener: (...args: any[]) => void + ): this; +} + +declare const WebSocketAlias: typeof WebSocket; +// @ts-ignore +interface WebSocketAlias extends WebSocket {} // tslint:disable-line no-empty-interface + +// @ts-ignore +// biome-ignore lint/style/noNamespace: +declare namespace WebSocket { + /** + * Data represents the raw message payload received over the WebSocket. + */ + type RawData = Buffer | ArrayBuffer | Buffer[]; + + /** + * Data represents the message payload received over the WebSocket. + */ + type Data = string | Buffer | ArrayBuffer | Buffer[]; + + /** + * CertMeta represents the accepted types for certificate & key data. + */ + type CertMeta = string | string[] | Buffer | Buffer[]; + + /** + * VerifyClientCallbackSync is a synchronous callback used to inspect the + * incoming message. The return value (boolean) of the function determines + * whether or not to accept the handshake. + */ + type VerifyClientCallbackSync = (info: { + origin: string; + secure: boolean; + req: IncomingMessage; + }) => boolean; + + /** + * VerifyClientCallbackAsync is an asynchronous callback used to inspect the + * incoming message. The return value (boolean) of the function determines + * whether or not to accept the handshake. + */ + type VerifyClientCallbackAsync = ( + info: { origin: string; secure: boolean; req: IncomingMessage }, + callback: ( + res: boolean, + code?: number, + message?: string, + headers?: OutgoingHttpHeaders + ) => void + ) => void; + + interface ClientOptions extends SecureContextOptions { + protocol?: string | undefined; + followRedirects?: boolean | undefined; + generateMask?(mask: Buffer): void; + handshakeTimeout?: number | undefined; + maxRedirects?: number | undefined; + perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined; + localAddress?: string | undefined; + protocolVersion?: number | undefined; + headers?: { [key: string]: string } | undefined; + origin?: string | undefined; + agent?: Agent | undefined; + host?: string | undefined; + family?: number | undefined; + checkServerIdentity?(servername: string, cert: CertMeta): boolean; + rejectUnauthorized?: boolean | undefined; + maxPayload?: number | undefined; + skipUTF8Validation?: boolean | undefined; + } + + interface PerMessageDeflateOptions { + serverNoContextTakeover?: boolean | undefined; + clientNoContextTakeover?: boolean | undefined; + serverMaxWindowBits?: number | undefined; + clientMaxWindowBits?: number | undefined; + zlibDeflateOptions?: + | { + flush?: number | undefined; + finishFlush?: number | undefined; + chunkSize?: number | undefined; + windowBits?: number | undefined; + level?: number | undefined; + memLevel?: number | undefined; + strategy?: number | undefined; + dictionary?: Buffer | Buffer[] | DataView | undefined; + info?: boolean | undefined; + } + | undefined; + zlibInflateOptions?: ZlibOptions | undefined; + threshold?: number | undefined; + concurrencyLimit?: number | undefined; + } + + interface Event { + type: string; + target: WebSocket; + } + + interface ErrorEvent { + error: any; + message: string; + type: string; + target: WebSocket; + } + + interface CloseEvent { + wasClean: boolean; + code: number; + reason: string; + type: string; + target: WebSocket; + } + + interface MessageEvent { + data: Data; + type: string; + target: WebSocket; + } + + interface EventListenerOptions { + once?: boolean | undefined; + } + + interface ServerOptions { + host?: string | undefined; + port?: number | undefined; + backlog?: number | undefined; + server?: HTTPServer | HTTPSServer | undefined; + verifyClient?: + | VerifyClientCallbackAsync + | VerifyClientCallbackSync + | undefined; + handleProtocols?: ( + protocols: Set, + request: IncomingMessage + ) => string | false; + path?: string | undefined; + noServer?: boolean | undefined; + clientTracking?: boolean | undefined; + perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined; + maxPayload?: number | undefined; + skipUTF8Validation?: boolean | undefined; + WebSocket?: typeof WebSocket.WebSocket | undefined; + } + + interface AddressInfo { + address: string; + family: string; + port: number; + } + + // WebSocket Server + class Server extends EventEmitter { + options: ServerOptions; + path: string; + clients: Set; + + constructor(options?: ServerOptions, callback?: () => void); + + address(): AddressInfo | string; + close(cb?: (err?: Error) => void): void; + handleUpgrade( + request: IncomingMessage, + socket: Duplex, + upgradeHead: Buffer, + callback: (client: T, request: IncomingMessage) => void + ): void; + shouldHandle(request: IncomingMessage): boolean | Promise; + + // Events + on( + event: 'connection', + cb: (this: Server, socket: T, request: IncomingMessage) => void + ): this; + on(event: 'error', cb: (this: Server, error: Error) => void): this; + on( + event: 'headers', + cb: (this: Server, headers: string[], request: IncomingMessage) => void + ): this; + on(event: 'close' | 'listening', cb: (this: Server) => void): this; + on( + event: string | symbol, + listener: (this: Server, ...args: any[]) => void + ): this; + + once( + event: 'connection', + cb: (this: Server, socket: T, request: IncomingMessage) => void + ): this; + once(event: 'error', cb: (this: Server, error: Error) => void): this; + once( + event: 'headers', + cb: (this: Server, headers: string[], request: IncomingMessage) => void + ): this; + once(event: 'close' | 'listening', cb: (this: Server) => void): this; + once( + event: string | symbol, + listener: (this: Server, ...args: any[]) => void + ): this; + + off( + event: 'connection', + cb: (this: Server, socket: T, request: IncomingMessage) => void + ): this; + off(event: 'error', cb: (this: Server, error: Error) => void): this; + off( + event: 'headers', + cb: (this: Server, headers: string[], request: IncomingMessage) => void + ): this; + off(event: 'close' | 'listening', cb: (this: Server) => void): this; + off( + event: string | symbol, + listener: (this: Server, ...args: any[]) => void + ): this; + + addListener( + event: 'connection', + cb: (client: T, request: IncomingMessage) => void + ): this; + addListener(event: 'error', cb: (err: Error) => void): this; + addListener( + event: 'headers', + cb: (headers: string[], request: IncomingMessage) => void + ): this; + addListener(event: 'close' | 'listening', cb: () => void): this; + addListener( + event: string | symbol, + listener: (...args: any[]) => void + ): this; + + removeListener(event: 'connection', cb: (client: T) => void): this; + removeListener(event: 'error', cb: (err: Error) => void): this; + removeListener( + event: 'headers', + cb: (headers: string[], request: IncomingMessage) => void + ): this; + removeListener(event: 'close' | 'listening', cb: () => void): this; + removeListener( + event: string | symbol, + listener: (...args: any[]) => void + ): this; + } + + const WebSocketServer: typeof Server; + interface WebSocketServer extends Server {} // tslint:disable-line no-empty-interface + const WebSocket: typeof WebSocketAlias; + interface WebSocket extends WebSocketAlias {} // tslint:disable-line no-empty-interface + + // WebSocket stream + function createWebSocketStream( + websocket: WebSocket, + options?: DuplexOptions + ): Duplex; +} + +// export = WebSocket +export { WebSocket, WebSocketAlias }; diff --git a/packages/core/src/utils/build.ts b/packages/core/src/utils/build.ts deleted file mode 100644 index b7ee1530b..000000000 --- a/packages/core/src/utils/build.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { performance } from 'node:perf_hooks'; -import { Logger } from './logger.js'; - -import { - FARM_TARGET_NODE_ENVS, - ResolvedUserConfig, - clearScreen -} from '../index.js'; -import { logError } from '../server/error.js'; -import { PersistentCacheBrand, bold, green } from './color.js'; - -interface CompilerHandlerOptions { - clear?: boolean; -} - -export async function compilerHandler( - callback: () => Promise, - config: ResolvedUserConfig, - logger: Logger, - options?: CompilerHandlerOptions -) { - const IS_TARGET_NODE = FARM_TARGET_NODE_ENVS.includes( - config.compilation.output.targetEnv - ); - IS_TARGET_NODE && options?.clear && clearScreen(); - const { persistentCache, output } = config.compilation; - const startTime = performance.now(); - - try { - await callback(); - } catch (error) { - logger.error(`Compiler ${logError(error, false)}`); - return; - } - - const elapsedTime = Math.floor(performance.now() - startTime); - const persistentCacheText = persistentCache ? bold(PersistentCacheBrand) : ''; - logger.info( - `Build completed in ${bold( - green(`${elapsedTime}ms`) - )} ${persistentCacheText} Resources emitted to ${bold(green(output.path))}.` - ); -} diff --git a/packages/core/src/utils/cacheDir.ts b/packages/core/src/utils/cacheDir.ts new file mode 100644 index 000000000..18b4b1692 --- /dev/null +++ b/packages/core/src/utils/cacheDir.ts @@ -0,0 +1,11 @@ +import fs from 'node:fs'; + +export async function isCacheDirExists(dir: string): Promise { + try { + const hasCacheDir = fs.readdirSync(dir, { withFileTypes: true }); + + return !!(hasCacheDir && hasCacheDir.length); + } catch (_) { + return false; + } +} diff --git a/packages/core/src/utils/debug.ts b/packages/core/src/utils/debug.ts new file mode 100644 index 000000000..18fdf4af7 --- /dev/null +++ b/packages/core/src/utils/debug.ts @@ -0,0 +1,32 @@ +import debug from 'debug'; + +const DEBUG = process.env.DEBUG; + +interface DebuggerOptions { + onlyWhenFocused?: boolean | string; +} + +export type FarmDebugScope = `farm:${string}`; + +export function createDebugger( + namespace: FarmDebugScope, + options: DebuggerOptions = {} +): debug.Debugger['log'] | undefined { + const log = debug(namespace); + const { onlyWhenFocused } = options; + + let enabled = log.enabled; + + if (enabled && onlyWhenFocused) { + const ns = + typeof onlyWhenFocused === 'string' ? onlyWhenFocused : namespace; + + enabled = !!DEBUG?.includes(ns); + } + + if (enabled) { + return (...args: [string, ...any[]]) => { + log(...args); + }; + } +} diff --git a/packages/core/src/utils/error.ts b/packages/core/src/utils/error.ts index 514563b31..b73eb804f 100644 --- a/packages/core/src/utils/error.ts +++ b/packages/core/src/utils/error.ts @@ -1,10 +1,31 @@ export function convertErrorMessage(error: Error) { - let errorMessage = ''; + let errorMessages = []; try { - errorMessage = JSON.parse(error.message).join('\n'); + const parsedErrors = JSON.parse(error.message); + + if (Array.isArray(parsedErrors)) { + errorMessages = parsedErrors.map(parseErrorItem); + } else { + errorMessages = [parseErrorItem(parsedErrors)]; + } + } catch { + errorMessages = [error.message]; + } + + return errorMessages.join('\n'); +} + +function parseErrorItem(item: any): string { + try { + const parsedItem = typeof item === 'string' ? JSON.parse(item) : item; + + if (typeof parsedItem === 'object' && parsedItem !== null) { + return parsedItem.message || JSON.stringify(parsedItem); + } else { + return String(parsedItem); + } } catch { - errorMessage = error.message; + return String(item); } - return errorMessage; } diff --git a/packages/core/src/utils/fsUtils.ts b/packages/core/src/utils/fsUtils.ts new file mode 100644 index 000000000..e28ef7a71 --- /dev/null +++ b/packages/core/src/utils/fsUtils.ts @@ -0,0 +1,192 @@ +import { exec } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import fse from 'fs-extra'; +import { ResolvedUserConfig, normalizePublicDir } from '../config/index.js'; +import { colors } from './color.js'; +import { isWindows, normalizePath, tryStatSync } from './share.js'; + +function isDirectory(path: string): boolean { + const stat = tryStatSync(path); + return stat?.isDirectory() ?? false; +} + +function tryResolveRealFile( + file: string, + preserveSymlinks?: boolean +): string | undefined { + const stat = tryStatSync(file); + if (stat?.isFile()) return getRealPath(file, preserveSymlinks); +} + +function tryResolveRealFileWithExtensions( + filePath: string, + extensions: string[], + preserveSymlinks?: boolean +): string | undefined { + for (const ext of extensions) { + const res = tryResolveRealFile(filePath + ext, preserveSymlinks); + if (res) return res; + } +} + +function tryResolveRealFileOrType( + file: string, + preserveSymlinks?: boolean +): { path?: string; type: 'directory' | 'file' } | undefined { + const fileStat = tryStatSync(file); + if (fileStat?.isFile()) { + return { path: getRealPath(file, preserveSymlinks), type: 'file' }; + } + if (fileStat?.isDirectory()) { + return { type: 'directory' }; + } + return; +} +const windowsNetworkMap = new Map(); + +function windowsMappedRealpathSync(path: string) { + const realPath = fs.realpathSync.native(path); + if (realPath.startsWith('\\\\')) { + for (const [network, volume] of windowsNetworkMap) { + if (realPath.startsWith(network)) + return realPath.replace(network, volume); + } + } + return realPath; +} +function optimizeSafeRealPathSync() { + // Skip if using Node <18.10 due to MAX_PATH issue: https://github.com/vitejs/vite/issues/12931 + const nodeVersion = process.versions.node.split('.').map(Number); + if (nodeVersion[0] < 18 || (nodeVersion[0] === 18 && nodeVersion[1] < 10)) { + safeRealpathSync = fs.realpathSync; + return; + } + // Check the availability `fs.realpathSync.native` + // in Windows virtual and RAM disks that bypass the Volume Mount Manager, in programs such as imDisk + // get the error EISDIR: illegal operation on a directory + try { + fs.realpathSync.native(path.resolve('./')); + } catch (error) { + if (error.message.includes('EISDIR: illegal operation on a directory')) { + safeRealpathSync = fs.realpathSync; + return; + } + } + exec('net use', (error, stdout) => { + if (error) return; + const lines = stdout.split('\n'); + // OK Y: \\NETWORK\Foo Microsoft Windows Network + // OK Z: \\NETWORK\Bar Microsoft Windows Network + for (const line of lines) { + const m = line.match(parseNetUseRE); + if (m) windowsNetworkMap.set(m[3], m[2]); + } + if (windowsNetworkMap.size === 0) { + safeRealpathSync = fs.realpathSync.native; + } else { + safeRealpathSync = windowsMappedRealpathSync; + } + }); +} + +const parseNetUseRE = /^(\w+)? +(\w:) +([^ ]+)\s/; +let firstSafeRealPathSyncRun = false; + +function windowsSafeRealPathSync(path: string): string { + if (!firstSafeRealPathSyncRun) { + optimizeSafeRealPathSync(); + firstSafeRealPathSyncRun = true; + } + return fs.realpathSync(path); +} + +// `fs.realpathSync.native` resolves differently in Windows network drive, +// causing file read errors. skip for now. +// https://github.com/nodejs/node/issues/37737 +export let safeRealpathSync = isWindows + ? windowsSafeRealPathSync + : fs.realpathSync.native; + +function getRealPath(resolved: string, preserveSymlinks?: boolean): string { + if (!preserveSymlinks) { + resolved = safeRealpathSync(resolved); + } + return normalizePath(resolved); +} + +export const commonFsUtils = { + existsSync: fs.existsSync, + isDirectory, + + tryResolveRealFile, + tryResolveRealFileWithExtensions, + tryResolveRealFileOrType +}; + +export async function readFileIfExists(value?: string | Buffer | any[]) { + if (typeof value === 'string') { + return fse.readFile(path.resolve(value)).catch(() => value); + } + return value; +} + +export async function findNodeModulesRecursively( + rootPath: string +): Promise { + const result: string[] = []; + + async function traverse(currentPath: string) { + const items = await fse.readdir(currentPath); + for (const item of items) { + const fullPath = path.join(currentPath, item); + const stats = await fse.stat(fullPath); + + if (stats.isDirectory()) { + if (item === 'node_modules') { + result.push(fullPath); + } else { + await traverse(fullPath); + } + } + } + } + + await traverse(rootPath); + return result; +} + +export async function copyPublicDirectory( + resolvedUserConfig: ResolvedUserConfig +): Promise { + const absPublicDirPath = normalizePublicDir( + resolvedUserConfig.root, + resolvedUserConfig.publicDir + ); + + try { + if (await fse.pathExists(absPublicDirPath)) { + const files = await fse.readdir(absPublicDirPath); + const outputPath = resolvedUserConfig.compilation.output.path; + for (const file of files) { + const publicFile = path.join(absPublicDirPath, file); + const destFile = path.join(outputPath, file); + + if (await fse.pathExists(destFile)) { + continue; + } + await fse.copy(publicFile, destFile); + } + + resolvedUserConfig.logger.info( + `Public directory resources copied ${colors.bold( + colors.green('successfully') + )}.` + ); + } + } catch (error) { + resolvedUserConfig.logger.error( + `Error copying public directory: ${error.message}` + ); + } +} diff --git a/packages/core/src/utils/http.ts b/packages/core/src/utils/http.ts index c78a7ce6e..f992436b1 100644 --- a/packages/core/src/utils/http.ts +++ b/packages/core/src/utils/http.ts @@ -7,9 +7,10 @@ * https://github.com/vitejs/vite/blob/main/LICENSE */ +import { promises as dns } from 'node:dns'; import type { AddressInfo, Server } from 'node:net'; import os from 'node:os'; -import { UserServerConfig } from '../index.js'; +import { ResolvedUserConfig } from '../config/types.js'; export interface ResolvedServerUrls { local: string[]; @@ -38,8 +39,7 @@ export const wildcardHosts = new Set([ export async function resolveServerUrls( server: Server, - options: UserServerConfig, - publicPath?: string + config: ResolvedUserConfig ): Promise { const address = server.address(); const isAddressInfo = (x: any): x is AddressInfo => x?.address; @@ -47,26 +47,29 @@ export async function resolveServerUrls( if (!isAddressInfo(address)) { return { local: [], network: [] }; } - + const serverOptions = config.server; const local: string[] = []; const network: string[] = []; - const hostname = await resolveHostname(options.host); - const protocol = options.https ? 'https' : 'http'; - const { port } = getAddressHostnamePort(address); - const base = publicPath || ''; + const hostname = await resolveHostname(serverOptions.host); + const protocol = serverOptions.https ? 'https' : 'http'; + const port = address.port; + const base = config.compilation.output.publicPath; if (hostname.host !== undefined && !wildcardHosts.has(hostname.host)) { - const url = createServerUrl(protocol, hostname.name, port, base); + let hostnameName = hostname.name; + // ipv6 host + if (hostnameName.includes(':')) { + hostnameName = `[${hostnameName}]`; + } + const address = `${protocol}://${hostnameName}:${port}${base}`; if (loopbackHosts.has(hostname.host)) { - local.push(url); + local.push(address); } else { - network.push(url); + network.push(address); } } else { - const networkInterfaces = Object.values(os.networkInterfaces()).flatMap( - (nInterface) => nInterface || [] - ); - networkInterfaces + Object.values(os.networkInterfaces()) + .flatMap((nInterface) => nInterface ?? []) .filter( (detail) => detail && @@ -77,14 +80,18 @@ export async function resolveServerUrls( ) .forEach((detail) => { let host = detail.address.replace('127.0.0.1', hostname.name); - host = host.includes(':') ? `[${host}]` : host; - const url = createServerUrl(protocol, host, port, base); - detail.address.includes('127.0.0.1') - ? local.push(url) - : network.push(url); + // ipv6 host + if (host.includes(':')) { + host = `[${host}]`; + } + const url = `${protocol}://${host}:${port}${base}`; + if (detail.address.includes('127.0.0.1')) { + local.push(url); + } else { + network.push(url); + } }); } - return { local, network }; } @@ -93,15 +100,25 @@ export async function resolveHostname( ): Promise { let host: string | undefined; if (optionsHost === undefined || optionsHost === false) { + // Use a secure default host = 'localhost'; } else if (optionsHost === true) { - host = undefined; + // If passed --host in the CLI without arguments + host = undefined; // undefined typically means 0.0.0.0 or :: (listen on all IPs) } else { host = optionsHost; } - const name = - host === undefined || wildcardHosts.has(host) ? 'localhost' : host; + // Set host name to localhost when possible + let name = host === undefined || wildcardHosts.has(host) ? 'localhost' : host; + + if (host === 'localhost') { + // See #8647 for more details. + const localhostAddr = await getLocalhostAddressIfDiffersFromDNS(); + if (localhostAddr) { + name = localhostAddr; + } + } return { host, name }; } @@ -124,3 +141,32 @@ function createServerUrl( const hostnameName = hostname.includes(':') ? `[${hostname}]` : hostname; return `${protocol}://${hostnameName}:${port}${publicPath}`; } + +export const teardownSIGTERMListener = ( + callback: () => Promise +): void => { + process.off('SIGTERM', callback); + if (process.env.CI !== 'true') { + process.stdin.off('end', callback); + } +}; + +/** + * Returns resolved localhost address when `dns.lookup` result differs from DNS + * + * `dns.lookup` result is same when defaultResultOrder is `verbatim`. + * Even if defaultResultOrder is `ipv4first`, `dns.lookup` result maybe same. + * For example, when IPv6 is not supported on that machine/network. + */ +export async function getLocalhostAddressIfDiffersFromDNS(): Promise< + string | undefined +> { + const [nodeResult, dnsResult] = await Promise.all([ + dns.lookup('localhost'), + dns.lookup('localhost', { verbatim: true }) + ]); + const isSame = + nodeResult.family === dnsResult.family && + nodeResult.address === dnsResult.address; + return isSame ? undefined : nodeResult.address; +} diff --git a/packages/core/src/utils/index.ts b/packages/core/src/utils/index.ts index fcabd962e..527553604 100644 --- a/packages/core/src/utils/index.ts +++ b/packages/core/src/utils/index.ts @@ -1,6 +1,5 @@ export * from './share.js'; export * from './logger.js'; -export * from './build.js'; export * from './file.js'; export * from './color.js'; export * from './url.js'; @@ -8,4 +7,7 @@ export * from './path.js'; export * from './publicDir.js'; export * from './rebase-url.js'; export * from './plugin-utils.js'; +export * from './cacheDir.js'; export * from './dynamic-resources.js'; +export * from './utils.js'; +export * from './fsUtils.js'; diff --git a/packages/core/src/utils/logger.ts b/packages/core/src/utils/logger.ts index 734f87179..e5d981795 100644 --- a/packages/core/src/utils/logger.ts +++ b/packages/core/src/utils/logger.ts @@ -1,26 +1,30 @@ -import { Config } from '../types/binding.js'; -import { ColorFunction, PersistentCacheBrand, colors } from './color.js'; -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { pad, version } from './share.js'; +import { __FARM_GLOBAL__ } from '../config/_global.js'; +import { ResolvedUserConfig } from '../config/types.js'; +import { + ColorFunction, + PersistentCacheBrand, + bold, + colors, + green +} from './color.js'; +import { ResolvedServerUrls } from './http.js'; +import { getShortName } from './path.js'; +import { clearScreen, formatExecutionTime, pad, version } from './share.js'; type LogLevelNames = 'trace' | 'debug' | 'info' | 'warn' | 'error'; -enum LogLevel { - Trace = 'trace', - Debug = 'debug', - Info = 'info', - Warn = 'warn', - Error = 'error' -} - export interface ILogger { - trace(message: string): void; - debug(message: string): void; - info(message: string): void; - warn(message: string): void; - warnOnce(message: string): void; - errorOnce(message: string | Error): void; - error(message: string | Error, options?: ErrorOptions): void; + trace(message: string, clearScreen?: Boolean): void; + debug(message: string, clearScreen?: Boolean): void; + info(message: string, clearScreen?: Boolean): void; + warn(message: string, clearScreen?: Boolean): void; + warnOnce(message: string, clearScreen?: Boolean): void; + errorOnce(message: string | Error, clearScreen?: Boolean): void; + error( + message: string | Error, + options?: ErrorOptions, + clearScreen?: Boolean + ): void; } export interface ErrorOptions { @@ -29,7 +33,9 @@ export interface ErrorOptions { error?: Error; } interface LoggerOptions { - name?: string; + prefix?: string; + customLogger?: Logger; + allowClearScreen?: boolean; brandColor?: ColorFunction; exit?: boolean; } @@ -45,24 +51,51 @@ const infoOnceMessages = new Set(); const errorOnceMessages = new Set(); export class Logger implements ILogger { + prefix: string; + canClearScreen: boolean; + colorMap: { + trace: (input: string) => string; + debug: (input: string) => string; + info: (input: string) => string; + warn: (input: string) => string; + error: (input: string) => string; + }; + + private clear: () => void = () => {}; + private customLogger?: Logger; + constructor( - public options?: LoggerOptions, + { + prefix = 'Farm', + allowClearScreen = true, + customLogger, + brandColor + }: LoggerOptions = {}, private levelValues: Record = { trace: 0, debug: 1, info: 2, warn: 3, error: 4 - }, - private prefix?: string + } ) { - if (!this.options) this.options = {}; + this.canClearScreen = + allowClearScreen && process.stdout.isTTY && !process.env.CI; + this.clear = this.canClearScreen ? clearScreen : () => {}; + this.colorMap = { + trace: colors.green, + debug: colors.debugColor, + info: brandColor ?? colors.brandColor, + warn: colors.yellow, + error: colors.red + }; + this.prefix = prefix; + this.customLogger = customLogger; this.brandPrefix(); } private brandPrefix(color?: (s: string | string[]) => string): void { - const { name = 'Farm' } = this.options; - const formattedName = colors.bold(name); + const formattedName = colors.bold(this.prefix); const formattedPrefix = colors.bold(`[ ${formattedName} ]`); this.prefix = color ? color(formattedPrefix) : formattedPrefix; } @@ -71,56 +104,54 @@ export class Logger implements ILogger { level: LogLevelNames, message: string | Error, color?: (s: string | string[]) => string, + clearScreen = false, showBanner = true ): void { + if (this.customLogger) { + this.customLogger.logMessage(level, message, color, clearScreen); + return; + } const loggerMethod = level in LOGGER_METHOD ? LOGGER_METHOD[level as keyof typeof LOGGER_METHOD] : 'log'; if (this.levelValues[level] <= this.levelValues[level]) { - const prefix = showBanner ? this.prefix + ' ' : ''; - const loggerMessage = color ? color(prefix + message) : prefix + message; - console[loggerMethod](loggerMessage); + this.canClearScreen && clearScreen && this.clear(); + const prefix = showBanner ? `${this.prefix} ` : ''; + const prefixColor = this.colorMap[level]; + const loggerMessage = color ? color(message as string) : message; + console[loggerMethod](prefixColor(prefix) + loggerMessage); } } setPrefix(options: LoggerOptions): void { - if (options.name) { - this.options.name = options.name; + if (options.prefix) { + this.prefix = options.prefix; this.brandPrefix(options.brandColor); } } - trace(message: string): void { - this.brandPrefix(colors.green); - this.logMessage(LogLevel.Trace, message, colors.magenta); + trace(message: string, clearScreen = false): void { + this.logMessage('trace', message, colors.magenta, clearScreen); } - debug(message: string): void { - this.brandPrefix(colors.debugColor); - this.logMessage(LogLevel.Debug, message, colors.blue); + debug(message: string, clearScreen = false): void { + this.logMessage('debug', message, colors.blue, clearScreen); } - info(message: string, iOptions?: LoggerOptions): void { - const options: LoggerOptions | undefined = iOptions; - if (options) { - this.setPrefix(options); - } - if (!options || !options.brandColor) { - this.brandPrefix(colors.brandColor); - } - this.logMessage(LogLevel.Info, message, null); + info(message: string, clearScreen = false): void { + this.logMessage('info', message, null, clearScreen); } - warn(message: string): void { - this.brandPrefix(colors.yellow); - this.logMessage(LogLevel.Warn, message, colors.yellow); + warn(message: string, clearScreen = false): void { + this.logMessage('warn', message, colors.yellow, clearScreen); } - error(message: string | Error, errorOptions?: ErrorOptions): void { - this.brandPrefix(colors.red); - - const effectiveOptions = { ...this.options, ...errorOptions }; + error( + message: string | Error, + errorOptions?: ErrorOptions, + clearScreen = false + ): void { const causeError = errorOptions?.e || errorOptions?.error; let error; @@ -136,30 +167,30 @@ export class Logger implements ILogger { error.message += `\nCaused by: ${causeError.stack ?? causeError}`; } - this.logMessage(LogLevel.Error, error, colors.red); - - if (effectiveOptions.exit) { - process.exit(1); - } + this.logMessage('error', error, colors.red, clearScreen); } - infoOnce(message: string) { + + infoOnce(message: string, clearScreen = false): void { if (!infoOnceMessages.has(message)) { infoOnceMessages.add(message); - this.info(message); + this.info(message, clearScreen); } } - warnOnce(message: string) { + + warnOnce(message: string, clearScreen = false): void { if (!warnOnceMessages.has(message)) { warnOnceMessages.add(message); - this.warn(message); + this.warn(message, clearScreen); } } - errorOnce(message: string | Error) { + + errorOnce(message: string | Error, clearScreen = false): void { if (!errorOnceMessages.has(message)) { errorOnceMessages.add(message); - this.error(message); + this.error(message, undefined, clearScreen); } } + hasErrorLogged(message: string | Error) { return errorOnceMessages.has(message); } @@ -174,7 +205,7 @@ export class NoopLogger extends Logger { setPrefix(_options: LoggerOptions): void {} trace(_message: string): void {} debug(_message: string): void {} - info(_message: string, _iOptions?: LoggerOptions): void {} + info(_message: string): void {} warn(_message: string): void {} error(_message: string | Error, _errorOptions?: ErrorOptions): void { if (_errorOptions.exit) { @@ -197,33 +228,20 @@ export class NoopLogger extends Logger { } } -export function printServerUrls( - urls: any, - logger: Logger, - previewFlag = false -): void { - if (previewFlag) - logger.info(colors.bold(colors.magenta('preview server running at: \n'))); - const colorUrl = (url: string) => - colors.cyan(url.replace(/:(\d+)\//, (_, port) => `:${colors.bold(port)}/`)); - - const logUrl = (url: string, type: string) => - logger.info( - `${colors.bold(colors.magenta('>'))} ${colors.bold(type)}${colors.bold( - colorUrl(url) - )}` - ); - - urls.local.map((url: string) => logUrl(url, 'Local: ')); - urls.network.map((url: string) => logUrl(url, 'Network: ')); -} - export function bootstrapLogger(options?: LoggerOptions): Logger { return new Logger(options); } -export function bootstrap(times: number, config: Config) { - const usePersistentCache = config.config.persistentCache; +export function bootstrap( + times: number, + config: ResolvedUserConfig, + hasCacheDir: boolean +): void { + if (!__FARM_GLOBAL__.__FARM_RESTART_DEV_SERVER__) { + const shortFile = getShortName(config.configFilePath, config.root); + config.logger.info(`Using config file at ${bold(green(shortFile))}`, true); + } + const usePersistentCache = config.compilation.persistentCache && hasCacheDir; const persistentCacheFlag = usePersistentCache ? colors.bold(PersistentCacheBrand) : ''; @@ -232,10 +250,13 @@ export function bootstrap(times: number, config: Config) { '\n', colors.bold(colors.brandColor(`${'ϟ'} Farm v${version}`)) ); + console.log( `${colors.bold(colors.green(` ✓`))} ${colors.bold( - 'Ready in' - )} ${colors.bold(colors.green(`${times}ms`))} ${persistentCacheFlag}`, + 'Compile in' + )} ${colors.bold( + colors.green(formatExecutionTime(times, config.timeUnit)) + )} ${persistentCacheFlag}`, '\n' ); } @@ -261,3 +282,33 @@ function cleanStack(stack: string) { .filter((l) => /^\s*at/.test(l)) .join('\n'); } + +export function printServerUrls( + urls: ResolvedServerUrls, + optionsHost: string | boolean | undefined, + logger: ILogger +): void { + const colorUrl = (url: string) => + colors.cyan(url.replace(/:(\d+)\//, (_, port) => `:${colors.bold(port)}/`)); + for (const url of urls.local) { + logger.info( + `${colors.bold(colors.green('➜ '))} ${colors.bold( + 'Local' + )}: ${colors.bold(colorUrl(url))}` + ); + } + for (const url of urls.network) { + logger.info( + `${colors.bold(colors.green('➜ '))} ${colors.bold( + 'Network' + )}: ${colors.bold(colorUrl(url))}` + ); + } + if (urls.network.length === 0 && optionsHost === undefined) { + logger.info( + colors.dim(` ${colors.green('➜ ')} ${colors.bold('Network')}: use `) + + colors.bold('--host') + + colors.dim(' to expose') + ); + } +} diff --git a/packages/core/src/utils/path.ts b/packages/core/src/utils/path.ts index 7a8519f3f..41d8a48aa 100644 --- a/packages/core/src/utils/path.ts +++ b/packages/core/src/utils/path.ts @@ -1,3 +1,5 @@ +import path from 'node:path'; + const windowsSlashRE = /\\/g; export function slash(p: string): string { return p.replace(windowsSlashRE, '/'); @@ -14,3 +16,15 @@ const postfixRE = /[?#].*$/; export function stripQueryAndHash(path: string): string { return path.replace(postfixRE, ''); } + +export function removeHashFromPath(path: string): string { + const hashRE = /([_-][a-f0-9]{4,12})(\.[^./]+(\.[^./]+)*)$/; + return path.replace(hashRE, '$2'); +} + +export function getShortName(file: string, root: string): string { + const result = file.startsWith(withTrailingSlash(root)) + ? path.posix.relative(root, file) + : file; + return result; +} diff --git a/packages/core/src/utils/publicDir.ts b/packages/core/src/utils/publicDir.ts index 443896bbe..637675efb 100644 --- a/packages/core/src/utils/publicDir.ts +++ b/packages/core/src/utils/publicDir.ts @@ -48,6 +48,7 @@ export async function initPublicFiles( fileNames.map((fileName) => fileName.slice(config.publicDir.length)) ); publicFilesMap.set(config, publicFiles); + return publicFiles; } diff --git a/packages/core/src/utils/rebase-url.ts b/packages/core/src/utils/rebase-url.ts index 9061dbeca..d8a1dbf27 100644 --- a/packages/core/src/utils/rebase-url.ts +++ b/packages/core/src/utils/rebase-url.ts @@ -26,7 +26,7 @@ SOFTWARE. import path from 'node:path'; import fse from 'fs-extra'; -import { normalizeBasePath } from './share.js'; +import { normalizePath } from './share.js'; const nonEscapedDoubleQuoteRe = /(?(target: T | T[]): T[] { @@ -177,3 +171,25 @@ export function tryStatSync(file: string): fs.Stats | undefined { return fs.statSync(file, { throwIfNoEntry: false }); } catch {} } + +export function formatExecutionTime( + time: number, + format: 'ms' | 's' = 'ms' +): string { + switch (format) { + case 's': + return `${Math.floor(time) / 1000}s`; + case 'ms': + default: + return `${Math.floor(time)}ms`; + } +} + +export function arrayEqual(a: any[], b: any[]): boolean { + if (a === b) return true; + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; i++) { + if (a[i] !== b[i]) return false; + } + return true; +} diff --git a/packages/core/src/utils/trace-dependencies.ts b/packages/core/src/utils/trace-dependencies.ts index 181b5cf80..09ae80691 100644 --- a/packages/core/src/utils/trace-dependencies.ts +++ b/packages/core/src/utils/trace-dependencies.ts @@ -1,19 +1,17 @@ -import { Compiler } from '../compiler/index.js'; import { convertErrorMessage } from './error.js'; -import { Logger } from './logger.js'; import * as fs from 'node:fs'; -import type { Config } from '../types/binding.js'; +import { createInlineCompiler } from '../compiler/index.js'; +import { ResolvedUserConfig } from '../config/types.js'; -function createTraceDepCompiler(entry: string, logger: Logger) { +function createTraceDepCompiler(entry: string) { const config = getDefaultTraceDepCompilerConfig(entry); - config.config.progress = false; - return new Compiler(config, logger); + + return createInlineCompiler(config); } export async function traceDependencies( - configFilePath: string, - logger: Logger + configFilePath: string ): Promise { try { // maybe not find config from local @@ -23,7 +21,7 @@ export async function traceDependencies( return []; } - const compiler = createTraceDepCompiler(configFilePath, logger); + const compiler = createTraceDepCompiler(configFilePath); const files = (await compiler.traceDependencies()) as string[]; return files; } catch (error) { @@ -32,9 +30,9 @@ export async function traceDependencies( } } -function getDefaultTraceDepCompilerConfig(entry: string): Config { +function getDefaultTraceDepCompilerConfig(entry: string): ResolvedUserConfig { return { - config: { + compilation: { input: { index: entry }, @@ -46,6 +44,7 @@ function getDefaultTraceDepCompilerConfig(entry: string): Config { presetEnv: false, persistentCache: false, minify: false, + progress: false, lazyCompilation: false }, jsPlugins: [ diff --git a/packages/core/src/utils/url.ts b/packages/core/src/utils/url.ts index edb507354..fa6d78c42 100644 --- a/packages/core/src/utils/url.ts +++ b/packages/core/src/utils/url.ts @@ -2,3 +2,16 @@ const postfixRE = /[?#].*$/; export function cleanUrl(url: string): string { return url.replace(postfixRE, ''); } + +const importQueryRE = /(\?|&)import=?(?:&|$)/; +export const isImportRequest = (url: string): boolean => + importQueryRE.test(url); + +const trailingSeparatorRE = /[?&]$/; +export function removeImportQuery(url: string): string { + return url.replace(importQueryRE, '$1').replace(trailingSeparatorRE, ''); +} + +export const knownJavascriptExtensionRE = /\.[tj]sx?$/; + +export const urlRE = /(\?|&)url(?:&|$)/; diff --git a/packages/core/src/utils/json.ts b/packages/core/src/utils/utils.ts similarity index 100% rename from packages/core/src/utils/json.ts rename to packages/core/src/utils/utils.ts diff --git a/packages/core/src/watcher/config-watcher.ts b/packages/core/src/watcher/config-watcher.ts deleted file mode 100644 index de1cd661e..000000000 --- a/packages/core/src/watcher/config-watcher.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { existsSync } from 'fs'; -import { FSWatcher } from 'chokidar'; -import { ResolvedUserConfig } from '../config/index.js'; -import { createWatcher } from './create-watcher.js'; - -export class ConfigWatcher { - private watcher: FSWatcher; - private _close = false; - - constructor(private resolvedUserConfig: ResolvedUserConfig) { - if (!resolvedUserConfig) { - throw new Error( - 'Invalid resolvedUserConfig provided to Farm JsConfigWatcher' - ); - } - } - - watch(callback: (file: string[]) => void) { - async function handle(file: string[]) { - callback(file); - } - - const watchedFilesSet = new Set([ - ...(this.resolvedUserConfig.envFiles ?? []), - ...(this.resolvedUserConfig.configFileDependencies ?? []), - ...(this.resolvedUserConfig.configFilePath - ? [this.resolvedUserConfig.configFilePath] - : []) - ]); - - const watchedFiles = Array.from(watchedFilesSet).filter( - (file) => file && existsSync(file) - ); - const chokidarOptions = { - awaitWriteFinish: - process.platform === 'linux' - ? undefined - : { - stabilityThreshold: 10, - pollInterval: 80 - } - }; - this.watcher = createWatcher( - this.resolvedUserConfig, - watchedFiles, - chokidarOptions - ); - - this.watcher.on('change', (path) => { - if (this._close) return; - if (watchedFiles.includes(path)) { - handle([path]); - } - }); - return this; - } - - close() { - this._close = true; - this.watcher = null; - } -} diff --git a/packages/core/src/watcher/create-watcher.ts b/packages/core/src/watcher/create-watcher.ts deleted file mode 100644 index 4877aae24..000000000 --- a/packages/core/src/watcher/create-watcher.ts +++ /dev/null @@ -1,63 +0,0 @@ -import path from 'node:path'; - -import chokidar, { FSWatcher, WatchOptions } from 'chokidar'; -import glob from 'fast-glob'; - -import { ResolvedUserConfig } from '../index.js'; - -function resolveChokidarOptions( - config: ResolvedUserConfig, - insideChokidarOptions: WatchOptions -) { - const { ignored = [], ...userChokidarOptions } = - config.server?.hmr?.watchOptions ?? {}; - let cacheDir = path.resolve(config.root, 'node_modules', '.farm', 'cache'); - - if ( - typeof config.compilation?.persistentCache === 'object' && - config.compilation.persistentCache.cacheDir - ) { - cacheDir = config.compilation.persistentCache.cacheDir; - - if (!path.isAbsolute(cacheDir)) { - cacheDir = path.resolve(config.root, cacheDir); - } - } - - const options: WatchOptions = { - ignored: [ - '**/.git/**', - '**/node_modules/**', - '**/test-results/**', // Playwright - glob.escapePath(cacheDir) + '/**', - glob.escapePath( - path.resolve(config.root, config.compilation.output.path) - ) + '/**', - ...(Array.isArray(ignored) ? ignored : [ignored]) - ], - ignoreInitial: true, - ignorePermissionErrors: true, - // for windows and macos, we need to wait for the file to be written - awaitWriteFinish: - process.platform === 'linux' - ? undefined - : { - stabilityThreshold: 10, - pollInterval: 10 - }, - ...userChokidarOptions, - ...insideChokidarOptions - }; - - return options; -} - -export function createWatcher( - config: ResolvedUserConfig, - files: string[], - chokidarOptions?: WatchOptions -): FSWatcher { - const options = resolveChokidarOptions(config, chokidarOptions); - - return chokidar.watch(files, options); -} diff --git a/packages/core/src/watcher/index.ts b/packages/core/src/watcher/index.ts index f27728942..3b034445b 100644 --- a/packages/core/src/watcher/index.ts +++ b/packages/core/src/watcher/index.ts @@ -1,159 +1,303 @@ -import { createRequire } from 'node:module'; - -import { FSWatcher } from 'chokidar'; +import EventEmitter from 'node:events'; +import { existsSync } from 'node:fs'; +import path from 'node:path'; +import chokidar from 'chokidar'; +import type { FSWatcher, WatchOptions } from 'chokidar'; +import glob from 'fast-glob'; import { Compiler } from '../compiler/index.js'; -import { Server } from '../server/index.js'; -import { Logger, compilerHandler } from '../utils/index.js'; +import { createInlineCompiler } from '../compiler/index.js'; +import { createDebugger } from '../utils/debug.js'; +import { convertErrorMessage } from '../utils/error.js'; +import { arraify, bold, green, normalizePath } from '../utils/index.js'; -import { existsSync } from 'node:fs'; import type { ResolvedUserConfig } from '../config/index.js'; -import type { JsUpdateResult } from '../types/binding.js'; -import { createWatcher } from './create-watcher.js'; +import type { + JsUpdateResult, + PersistentCacheConfig +} from '../types/binding.js'; -interface ImplFileWatcher { - watch(): Promise; -} +export const debugWatcher = createDebugger('farm:watcher'); -export class FileWatcher implements ImplFileWatcher { - private _root: string; - private _watcher: FSWatcher; - private _close = false; - private _watchedFiles = new Set(); - - constructor( - public serverOrCompiler: Server | Compiler, - public options: ResolvedUserConfig, - private _logger: Logger - ) { - this._root = options.root; +export default class Watcher { + private watchedFiles = new Set(); + resolvedWatchOptions: WatchOptions; + watcher: FSWatcher; + extraWatchedFiles: string[]; + + constructor(public config: ResolvedUserConfig) { + this.resolveChokidarOptions(); } getInternalWatcher() { - return this._watcher; + return this.watcher; } filterWatchFile(file: string, root: string): boolean { - const suffix = process.platform === 'win32' ? '\\' : '/'; - + const separator = process.platform === 'win32' ? '\\' : '/'; return ( - !file.startsWith(`${root}${suffix}`) && - !file.includes(`node_modules${suffix}`) && + !file.startsWith(`${root}${separator}`) && !file.includes('\0') && existsSync(file) ); } - getExtraWatchedFiles() { - const compiler = this.getCompilerFromServerOrCompiler( - this.serverOrCompiler - ); - - return [ - ...compiler.resolvedModulePaths(this._root), + getExtraWatchedFiles(compiler?: Compiler | null) { + this.extraWatchedFiles = [ + ...compiler.resolvedModulePaths(this.config.root), ...compiler.resolvedWatchPaths() - ].filter((file) => this.filterWatchFile(file, this._root)); + ].filter((file) => this.filterWatchFile(file, this.config.root)); + return this.extraWatchedFiles; } watchExtraFiles() { - const files = this.getExtraWatchedFiles(); - - for (const file of files) { - if (!this._watchedFiles.has(file)) { - this._watcher.add(file); - this._watchedFiles.add(file); + this.extraWatchedFiles.forEach((file) => { + if (!this.watchedFiles.has(file)) { + this.watcher.add(file); + this.watchedFiles.add(file); } - } + }); } - async watch() { - // Determine how to compile the project - const compiler = this.getCompilerFromServerOrCompiler( - this.serverOrCompiler - ); + async watch() {} - const handlePathChange = async (path: string): Promise => { - if (this._close) { - return; - } + // async watch() { + // const compiler = this.getCompiler(); + + // const handlePathChange = async (path: string) => { + // if (this.close) return; + + // try { + // if (this.compiler instanceof NewServer && this.compiler.getCompiler()) { + // await this.compiler.hmrEngine.hmrUpdate(path); + // } + + // if ( + // this.compiler instanceof Compiler && + // this.compiler.hasModule(path) + // ) { + // await compilerHandler( + // async () => { + // const result = await compiler.update([path], true); + // this.handleUpdateFinish(result, compiler); + // compiler.writeResourcesToDisk(); + // }, + // this.config, + // this.logger, + // { clear: true } + // ); + // } + // } catch (error) { + // this.logger.error(error); + // } + // }; + + // const filesToWatch = [this.config.root, ...this.getExtraWatchedFiles()]; + // this.watchedFiles = new Set(filesToWatch); + // this.watcher ??= createWatcher(this.config, filesToWatch); + + // this.watcher.on('change', (path) => { + // if (this.close) return; + // handlePathChange(path); + // }); + + // if (this.compiler instanceof NewServer) { + // this.compiler.hmrEngine?.onUpdateFinish((result) => + // this.handleUpdateFinish(result, compiler) + // ); + // } + // } + + // async watchConfigs(callback: (files: string[]) => void) { + // const filesToWatch = Array.from([ + // ...(this.config.envFiles ?? []), + // ...(this.config.configFileDependencies ?? []), + // ...(this.config.configFilePath ? [this.config.configFilePath] : []) + // ]).filter((file) => file && existsSync(file)); + // const chokidarOptions = { + // awaitWriteFinish: + // process.platform === 'linux' + // ? undefined + // : { + // stabilityThreshold: 10, + // pollInterval: 80 + // } + // }; + // this.watcher ??= createWatcher(this.config, filesToWatch, chokidarOptions); + + // this.watcher.on('change', (path) => { + // if (this.close) return; + // if (filesToWatch.includes(path)) { + // callback([path]); + // } + // }); + // return this; + // } + + // private handleUpdateFinish(updateResult: JsUpdateResult, compiler: Compiler) { + // const addedFiles = [ + // ...updateResult.added, + // ...updateResult.extraWatchResult.add + // ].map((addedModule) => + // compiler.transformModulePath(this.config.root, addedModule) + // ); + + // const filteredAdded = addedFiles.filter((file) => + // this.filterWatchFile(file, this.config.root) + // ); + + // if (filteredAdded.length > 0) { + // this.watcher.add(filteredAdded); + // } + // } + + async createWatcher() { + const compiler = await createInlineCompiler(this.config, { + progress: false + }); + // TODO type error here + // @ts-ignore + const enabledWatcher = this.config.watch !== null; + const files = [this.config.root, ...this.getExtraWatchedFiles(compiler)]; + + this.watcher = enabledWatcher + ? (chokidar.watch(files, this.resolvedWatchOptions) as FSWatcher) + : new NoopWatcher(this.resolvedWatchOptions); + } + + resolveChokidarOptions() { + // TODO type error here + // @ts-ignore + const userWatchOptions = this.config.server.watch; + const { ignored: ignoredList, ...otherOptions } = userWatchOptions ?? {}; + const cacheDir = ( + this.config.compilation.persistentCache as PersistentCacheConfig + ).cacheDir; + const ignored: WatchOptions['ignored'] = [ + '**/.git/**', + '**/node_modules/**', + '**/test-results/**', // Playwright + glob.escapePath( + path.resolve(this.config.root, this.config.compilation.output.path) + ) + '/**', + cacheDir ? glob.escapePath(cacheDir) + '/**' : undefined, + ...arraify(ignoredList || []) + ].filter(Boolean); - try { - if (this.serverOrCompiler instanceof Server) { - await this.serverOrCompiler.hmrEngine.hmrUpdate(path); - } - - if ( - this.serverOrCompiler instanceof Compiler && - this.serverOrCompiler.hasModule(path) - ) { - compilerHandler( - async () => { - const result = await compiler.update([path], true); - handleUpdateFinish(result); - compiler.writeResourcesToDisk(); + this.resolvedWatchOptions = { + ignored, + ignoreInitial: true, + ignorePermissionErrors: true, + awaitWriteFinish: + process.platform === 'linux' + ? undefined + : { + stabilityThreshold: 10, + pollInterval: 10 }, - this.options, - this._logger, - { clear: true } - ); - } - } catch (error) { - this._logger.error(error); - } + ...otherOptions }; + } - const watchedFiles = this.getExtraWatchedFiles(); + async close() { + if (this.watcher) { + debugWatcher?.('close watcher'); + await this.watcher.close(); + this.watcher = null; + } + } +} - const files = [this.options.root, ...watchedFiles]; - this._watchedFiles = new Set(files); - this._watcher = createWatcher(this.options, files); +class NoopWatcher extends EventEmitter implements FSWatcher { + constructor(public options: WatchOptions) { + super(); + } - this._watcher.on('change', (path) => { - if (this._close) return; - handlePathChange(path); - }); + add() { + return this; + } + unwatch() { + return this; + } + + getWatched() { + return {}; + } + + ref() { + return this; + } + + unref() { + return this; + } + + async close() { + // noop + } +} + +export async function handlerWatcher( + resolvedUserConfig: ResolvedUserConfig, + compiler: Compiler +) { + const watcher = new Watcher(resolvedUserConfig); + await watcher.createWatcher(); + watcher.watcher.on('change', async (file: string | string[] | any) => { + file = normalizePath(file); + // TODO restart with node side v2.0 we may be think about this feature + // const shortFile = getShortName(file, resolvedUserConfig.root); + // const isConfigFile = resolvedUserConfig.configFilePath === file; + // const isConfigDependencyFile = + // resolvedUserConfig.configFileDependencies.some((name) => file === name); + // const isEnvFile = resolvedUserConfig.envFiles.some((name) => file === name); + // if (isConfigFile || isConfigDependencyFile || isEnvFile) { + // __FARM_GLOBAL__.__FARM_RESTART_DEV_SERVER__ = true; + // resolvedUserConfig.logger.info( + // `${bold(green(shortFile))} changed, Bundler Config is being reloaded`, + // true + // ); + // TODO then rebuild node side + // } const handleUpdateFinish = (updateResult: JsUpdateResult) => { const added = [ ...updateResult.added, ...updateResult.extraWatchResult.add ].map((addedModule) => { const resolvedPath = compiler.transformModulePath( - this._root, + resolvedUserConfig.root, addedModule ); return resolvedPath; }); + const filteredAdded = added.filter((file) => - this.filterWatchFile(file, this._root) + watcher.filterWatchFile(file, resolvedUserConfig.root) ); if (filteredAdded.length > 0) { - this._watcher.add(filteredAdded); + watcher.watcher.add(filteredAdded); } }; - if (this.serverOrCompiler instanceof Server) { - this.serverOrCompiler.hmrEngine?.onUpdateFinish(handleUpdateFinish); + try { + const start = performance.now(); + const result = await compiler.update([file], true); + const elapsedTime = Math.floor(performance.now() - start); + resolvedUserConfig.logger.info( + `update completed in ${bold( + green(`${elapsedTime}ms`) + )} Resources emitted to ${bold( + green(resolvedUserConfig.compilation.output.path) + )}.` + ); + handleUpdateFinish(result); + compiler.writeResourcesToDisk(); + } catch (error) { + resolvedUserConfig.logger.error( + `Farm Update Error: ${convertErrorMessage(error)}` + ); } - } - - private getCompilerFromServerOrCompiler( - serverOrCompiler: Server | Compiler - ): Compiler { - return serverOrCompiler instanceof Server - ? serverOrCompiler.getCompiler() - : serverOrCompiler; - } - - close() { - this._close = true; - this._watcher = null; - this.serverOrCompiler = null; - } -} - -export function clearModuleCache(modulePath: string) { - const _require = createRequire(import.meta.url); - delete _require.cache[_require.resolve(modulePath)]; + }); } diff --git a/packages/core/tests/common.ts b/packages/core/tests/common.ts index ef997a5a7..72346e06c 100644 --- a/packages/core/tests/common.ts +++ b/packages/core/tests/common.ts @@ -49,9 +49,8 @@ export async function getCompiler( const compilationConfig = await normalizeUserCompilationConfig( resolvedUserConfig, - userConfig, - new Logger(), - 'production' + 'production', + new Logger() ); return new Compiler({ diff --git a/packages/core/tests/js-plugin-hooks/__snapshots__/augment-resource-hash-generate-resources.spec.ts.snap b/packages/core/tests/js-plugin-hooks/__snapshots__/augment-resource-hash-generate-resources.spec.ts.snap index 11f4ab003..3bfb451f0 100644 --- a/packages/core/tests/js-plugin-hooks/__snapshots__/augment-resource-hash-generate-resources.spec.ts.snap +++ b/packages/core/tests/js-plugin-hooks/__snapshots__/augment-resource-hash-generate-resources.spec.ts.snap @@ -3,7 +3,7 @@ exports[`Js Plugin Execution - augmentResourceHash 1`] = ` [ "FARM_RUNTIME_runtime", - "index.8f800683.js", + "index.d4c2c502.js", ] `; @@ -19,7 +19,7 @@ exports[`Js Plugin Execution - augmentResourceHash 2`] = ` "isEntry": true, "isImplicitEntry": false, }, - "id": "index_eab4_js", + "id": "index_eab4", "map": null, "moduleIds": [ "index.ts?foo=bar", @@ -33,7 +33,7 @@ exports[`Js Plugin Execution - augmentResourceHash 2`] = ` "renderedMap": null, }, }, - "name": "index_eab4", + "name": "index", "resourcePotType": "js", } `; @@ -41,6 +41,6 @@ exports[`Js Plugin Execution - augmentResourceHash 2`] = ` exports[`Js Plugin Execution - augmentResourceHash 3`] = ` [ "FARM_RUNTIME_runtime", - "index.c7bded02.js", + "index.cbe2c1dd.js", ] `; diff --git a/packages/core/tests/js-plugin-hooks/__snapshots__/render-resource-pot.spec.ts.snap b/packages/core/tests/js-plugin-hooks/__snapshots__/render-resource-pot.spec.ts.snap index 32ff79470..d3086cb0f 100644 --- a/packages/core/tests/js-plugin-hooks/__snapshots__/render-resource-pot.spec.ts.snap +++ b/packages/core/tests/js-plugin-hooks/__snapshots__/render-resource-pot.spec.ts.snap @@ -12,7 +12,7 @@ exports[`Js Plugin Execution - renderResourcePot 1`] = ` "isEntry": true, "isImplicitEntry": false, }, - "id": "index_eab4_js", + "id": "index_eab4", "map": null, "moduleIds": [ "index.ts?foo=bar", @@ -26,7 +26,7 @@ exports[`Js Plugin Execution - renderResourcePot 1`] = ` "renderedMap": null, }, }, - "name": "index_eab4", + "name": "index", "resourcePotType": "js", } `; diff --git a/packages/core/tsconfig.build.json b/packages/core/tsconfig.build.json index 3ea933058..14d5897b4 100644 --- a/packages/core/tsconfig.build.json +++ b/packages/core/tsconfig.build.json @@ -3,7 +3,9 @@ "compilerOptions": { "rootDir": "src", "outDir": "dist", - "composite": true + "composite": true, + "noUnusedLocals": false, + "noUnusedParameters": false, }, "include": ["src/**/*.ts", "binding/**/*.d.ts"], "exclude": ["src/**/*.spec.ts"], diff --git a/packages/create-farm-plugin/package.json b/packages/create-farm-plugin/package.json index 32c8ab477..614356767 100644 --- a/packages/create-farm-plugin/package.json +++ b/packages/create-farm-plugin/package.json @@ -38,8 +38,6 @@ "url": "https://github.com/farm-fe/farm" }, "devDependencies": { - "@farmfe/cli": "workspace:*", - "@farmfe/core": "workspace:*", "@farmfe/utils": "workspace:*", "@types/minimist": "^1.2.2", "@types/prompts": "^2.4.4", diff --git a/packages/create-farm-plugin/templates/rust/rust-toolchain.toml b/packages/create-farm-plugin/templates/rust/rust-toolchain.toml index 0eb96b51a..4e5de48e8 100644 --- a/packages/create-farm-plugin/templates/rust/rust-toolchain.toml +++ b/packages/create-farm-plugin/templates/rust/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2024-04-16" +channel = "nightly-2024-10-07" components = ["clippy", "rustfmt", "rust-src", "rustc-dev"] diff --git a/packages/create-farm/build.rs b/packages/create-farm/build.rs index 9fc236788..1f866b6a3 100644 --- a/packages/create-farm/build.rs +++ b/packages/create-farm/build.rs @@ -1,5 +1,5 @@ extern crate napi_build; fn main() { - napi_build::setup(); + napi_build::setup(); } diff --git a/packages/create-farm/src/lib.rs b/packages/create-farm/src/lib.rs index 4f1095419..7d2267922 100644 --- a/packages/create-farm/src/lib.rs +++ b/packages/create-farm/src/lib.rs @@ -1,5 +1,5 @@ #[allow(unused)] #[napi_derive::napi] fn run(args: Vec, bin_name: Option, pkg_manager: Option) { - create_farm::run(args, bin_name, pkg_manager); + create_farm::run(args, bin_name, pkg_manager); } diff --git a/packages/plugin-tools/CHANGELOG.md b/packages/plugin-tools/CHANGELOG.md index 2244d6589..5317a8709 100644 --- a/packages/plugin-tools/CHANGELOG.md +++ b/packages/plugin-tools/CHANGELOG.md @@ -1,5 +1,12 @@ # @farmfe/plugin-tools +## 0.1.2-nightly-20241022124925 + +### Patch Changes + +- Updated dependencies [6a1038c] + - @farmfe/utils@1.0.0-nightly-20241022124925 + ## 0.1.1 ### Patch Changes diff --git a/packages/plugin-tools/package.json b/packages/plugin-tools/package.json index c21ba98f0..2dcb221f5 100644 --- a/packages/plugin-tools/package.json +++ b/packages/plugin-tools/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/plugin-tools", - "version": "0.1.1", + "version": "0.1.2-nightly-20241022124925", "description": "farmfe plugin tools to help build farmfe plugin", "exports": { ".": "./bin/farm-plugin-tools.mjs" @@ -28,7 +28,9 @@ "build tool", "bundler" ], - "files": ["dist"], + "files": [ + "dist" + ], "repository": { "type": "git", "url": "https://github.com/farm-fe/farm" diff --git a/packages/runtime-plugin-hmr/CHANGELOG.md b/packages/runtime-plugin-hmr/CHANGELOG.md index 4a3cc6adf..1988a44a7 100644 --- a/packages/runtime-plugin-hmr/CHANGELOG.md +++ b/packages/runtime-plugin-hmr/CHANGELOG.md @@ -1,5 +1,11 @@ # @farmfe/runtime-plugin-hmr +## 4.0.0-nightly-20241023020505 + +### Major Changes + +- cab79e8: bump major version with runtime + ## 3.5.7 ### Patch Changes diff --git a/packages/runtime-plugin-hmr/package.json b/packages/runtime-plugin-hmr/package.json index 23862d420..62f74247c 100644 --- a/packages/runtime-plugin-hmr/package.json +++ b/packages/runtime-plugin-hmr/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/runtime-plugin-hmr", - "version": "3.5.7", + "version": "4.0.0-nightly-20241023020505", "description": "Runtime hmr plugin of Farm", "author": { "name": "bright wu", @@ -24,9 +24,10 @@ "type-check": "tsc -p tsconfig.json --noEmit" }, "devDependencies": { - "@farmfe/runtime": "workspace:^0.12.2" + "@farmfe/runtime": "workspace:1.0.0-nightly-20241023020505" }, "dependencies": { - "core-js": "^3.30.1" + "core-js": "^3.30.1", + "highlight.js": "^11.10.0" } } diff --git a/packages/runtime-plugin-hmr/src/hmr-client.ts b/packages/runtime-plugin-hmr/src/hmr-client.ts index 6e28e33e9..c7b0b8533 100644 --- a/packages/runtime-plugin-hmr/src/hmr-client.ts +++ b/packages/runtime-plugin-hmr/src/hmr-client.ts @@ -35,11 +35,13 @@ export class HmrClient { `${socketProtocol}://${socketHostUrl}`, 'farm_hmr' ); + this.socket = socket; // listen for the message from the server // when the user save the file, the server will recompile the file(and its dependencies as long as its dependencies are changed) // after the file is recompiled, the server will generated a update resource and send its id to the client // the client will apply the update + socket.addEventListener('message', (event) => { const result: HMRPayload = new Function(`return (${event.data})`)(); if (result?.type === 'closing') { @@ -65,7 +67,10 @@ export class HmrClient { this.notifyListeners('vite:ws:disconnect', { webSocket: socket }); this.notifyListeners('farm:ws:disconnect', { webSocket: socket }); - logger.debug('disconnected from the server, please reload the page.'); + logger.debug( + 'disconnected from the server, Please refresh the page manually. If you still encounter errors, this may be a farm bug. Please submit an issue. https://github.com/farm-fe/farm/issues' + ); + await waitForSuccessfulPing(socketProtocol, `${socketHostUrl}`); location.reload(); }); @@ -105,7 +110,6 @@ export class HmrClient { for (const id of result.changed) { moduleSystem.update(id, result.modules[id]); - if (!result.boundaries[id]) { // do not found boundary module, reload the window location.reload(); @@ -177,7 +181,7 @@ export class HmrClient { } catch (err) { // The boundary module's dependencies may not present in current module system for a multi-page application. We should reload the window in this case. // See https://github.com/farm-fe/farm/issues/383 - logger.error(err); + logger.error(`Error occurred while applying hot updates: ${err}`); location.reload(); } } diff --git a/packages/runtime-plugin-hmr/src/index.ts b/packages/runtime-plugin-hmr/src/index.ts index dade75959..a1ec77ef3 100644 --- a/packages/runtime-plugin-hmr/src/index.ts +++ b/packages/runtime-plugin-hmr/src/index.ts @@ -1,20 +1,19 @@ /** * HMR client as a Farm Runtime Plugin */ -import type { Plugin } from '@farmfe/runtime'; import { HmrClient } from './hmr-client'; import { createHotContext } from './hot-module-state'; let hmrClient: HmrClient; -export default ({ +export default { name: 'farm-runtime-hmr-client-plugin', - bootstrap(moduleSystem) { + bootstrap(moduleSystem: any) { hmrClient = new HmrClient(moduleSystem); hmrClient.connect(); }, - moduleCreated(module) { + moduleCreated(module: any) { // create a hot context for each module module.meta.hot = createHotContext(module.id, hmrClient); } -}); +}; diff --git a/packages/runtime-plugin-hmr/src/overlay.ts b/packages/runtime-plugin-hmr/src/overlay.ts index 39ff716cf..d07462424 100644 --- a/packages/runtime-plugin-hmr/src/overlay.ts +++ b/packages/runtime-plugin-hmr/src/overlay.ts @@ -1,6 +1,12 @@ -const base = '/'; +import hljs from 'highlight.js'; +import { + extractErrorMessage, + parseIfJSON, + splitErrorMessage, + stripAnsi +} from './utils'; -const brandSvg = ``; +const base = '/'; // set :host styles to make playwright detect the element as visible const template = /*html*/ ` @@ -14,10 +20,10 @@ const template = /*html*/ ` z-index: 99999; --monospace: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; - --red: #ff5555; + --red: #cf1322; --brand-color: #9f1a8f; --window-background: #ffffff; - --window-color: #d8d8d8; + --window-color: #ccc; --brand-color-o: rgba(248, 44, 224, 0.3); } @@ -36,7 +42,7 @@ const template = /*html*/ ` .window { font-family: var(--monospace); line-height: 1.5; - width: 800px; + width: 1000px; color: var(--window-color); margin: 60px auto; position: relative; @@ -77,13 +83,24 @@ pre.frame { } .message { - max-height: 400px; - padding: 25px 30px; + max-height: 500px; + font-size: 14px; line-height: 1.3; font-weight: 600; white-space: pre-wrap; + overflow-y: auto; +} + +.message { + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* IE and Edge */ } +.message::-webkit-scrollbar { + display: none; /* Chrome, Safari, and Opera */ +} + + .message-body { color: var(--red); } @@ -125,6 +142,19 @@ kbd { border-color: rgb(54, 57, 64); border-image: initial; } +.message-container { + padding: 10px 10px; +} + + +.code-block { + background-color: #f8f8f8; + border-radius: 3px; + padding: 10px; + margin: 10px 0; +} + + kbd { line-height: 1.5; @@ -140,22 +170,262 @@ kbd { border-color: rgb(54, 57, 64); border-image: initial; } +.message-container { +} +pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em +} +code.hljs { + padding: 3px 5px +} +/* + +Atom One Dark by Daniel Gamage +Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax + +base: #282c34 +mono-1: #abb2bf +mono-2: #818896 +mono-3: #5c6370 +hue-1: #56b6c2 +hue-2: #61aeee +hue-3: #c678dd +hue-4: #98c379 +hue-5: #e06c75 +hue-5-2: #be5046 +hue-6: #d19a66 +hue-6-2: #e6c07b + +*/ +.hljs { + color: #abb2bf; + background: #282c34 +} +.hljs-comment, +.hljs-quote { + color: #5c6370; + font-style: italic +} +.hljs-doctag, +.hljs-keyword, +.hljs-formula { + color: #c678dd +} +.hljs-section, +.hljs-name, +.hljs-selector-tag, +.hljs-deletion, +.hljs-subst { + color: #e06c75 +} +.hljs-literal { + color: #56b6c2 +} +.hljs-string, +.hljs-regexp, +.hljs-addition, +.hljs-attribute, +.hljs-meta .hljs-string { + color: #98c379 +} +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-type, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-number { + color: #d19a66 +} +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-meta, +.hljs-selector-id, +.hljs-title { + color: #61aeee +} +.hljs-built_in, +.hljs-title.class_, +.hljs-class .hljs-title { + color: #e6c07b +} +.hljs-emphasis { + font-style: italic +} +.hljs-strong { + font-weight: bold +} +.hljs-link { + text-decoration: underline +} + +.code-block-wrapper { + background-color: #282c34; /* Atom One Dark 背景色 */ + border-radius: 6px; + padding: 16px; + margin: 10px; + box-shadow: 0 2px 4px rgba(0,0,0,0.1); +} + +.code-block-wrapper pre { + margin: 0; +} + +.code-block-wrapper code { + font-family: 'Consolas', 'Monaco', 'Andale Mono', 'Ubuntu Mono', monospace; + font-size: 14px; + line-height: 1.5; +} +.alert { + box-sizing: border-box; + margin: 8px 0; + padding: 0; + color: rgba(0, 0, 0, 0.85); + font-size: 14px; + font-variant: tabular-nums; + line-height: 1.5715; + list-style: none; + font-feature-settings: 'tnum'; + position: relative; + display: flex; + align-items: flex-start; + padding: 8px 15px; + word-wrap: break-word; + border-radius: 4px; +} + +.alert-error { + background-color: #fff2f0; + border: 1px solid #ffccc7; +} + +.alert-icon { + margin-right: 14px; + font-size: 14px; + margin-top: 2px; +} + +.alert-error .alert-icon { + color: #ff4d4f; +} + +.alert-content { + flex: 1; + min-width: 0; +} + +.alert-message { + color: rgba(0, 0, 0, 0.85); + font-size: 14px; +} + +.alert-description { + font-size: 14px; + line-height: 22px; +} + +.alert-error .alert-message { + color: #cf1322; +} + +.alert-error .alert-description { + color: rgba(0, 0, 0, 0.75); +} + +.alert-warn { + background-color: #fffbe6; + border: 1px solid #ffe58f; +} + +.alert-warn .alert-icon { + color: #faad14; +} + +.alert-warn .alert-message { + color: #d46b08; +} + +.alert-warn .alert-description { + color: rgba(0, 0, 0, 0.75); +} + +.terminal-block { + background-color: #1e1e1e; + border-radius: 6px; + overflow: hidden; + margin: 4px 0; +} + +.file-info { + height: 28px; + display: flex; + align-items: center; + justify-content: space-between; + background-color: #2d2d2d; + color: #d4d4d4; + padding: 8px 12px; + font-family: 'Consolas', 'Monaco', 'Andale Mono', 'Ubuntu Mono', monospace; + font-size: 12px; +} + +.file-info-left { + display: flex; + align-items: center; +} + +.file-info-left svg { + margin-right: 8px; +} +
-
+
+
`; +const errorAlert = ( + message: string, + description: string, + _type: string +) => /*html*/ ` +
+ + + +
+
${message}
+
Failed to compile: ${description}
+
+
+`; + +const warnAlert = (description: string, type = 'warn') => /*html*/ ` +
+ + ${getAlertIcon(type)} + +
+
${description.replace(/\n/g, '
')}
+
+
+`; + const fileRE = /(?:[a-zA-Z]:\\|\/).*?:\d+:\d+/g; -const codeframeRE = /^(?:>?\s*\d+\s+\|.*|\s+\|\s*\^.*)\r?\n/gm; +// const codeframeRE = /^(?:>?\s*\d+\s+\|.*|\s+\|\s*\^.*)\r?\n/gm; // Allow `ErrorOverlay` to extend `HTMLElement` even in environments where // `HTMLElement` was not originally defined. @@ -169,27 +439,9 @@ export class ErrorOverlay extends HTMLElement { this.root = this.attachShadow({ mode: 'open' }); this.root.innerHTML = template; - codeframeRE.lastIndex = 0; - const hasFrame = err.frame && codeframeRE.test(err.frame); - const message = hasFrame - ? err.message.replace(codeframeRE, '') - : err.message; - if (err.plugin) { - this.text('.plugin', `[plugin:${err.plugin}] `); - } - this.text('.message-body', message); + const messages = parseIfJSON(err.message); - const [file] = (err.loc?.file || err.id || 'unknown file').split(`?`); - if (err.loc) { - this.text('.file', `${file}:${err.loc.line}:${err.loc.column}`, links); - } else if (err.id) { - this.text('.file', file); - } - - if (hasFrame) { - this.text('.frame', err.frame?.trim()); - } - this.text('.stack', err.stack, links); + this.renderMessages(messages, links); this.root.querySelector('.window')?.addEventListener('click', (e) => { e.stopPropagation(); @@ -239,14 +491,271 @@ export class ErrorOverlay extends HTMLElement { } } } + + setMessageText(element: HTMLElement, text: string, linkFiles: boolean) { + if (!linkFiles) { + element.textContent = text; + } else { + element.innerHTML = ''; + let lastIndex = 0; + text.replace(fileRE, (file, index) => { + if (index > lastIndex) { + element.appendChild( + document.createTextNode(text.substring(lastIndex, index)) + ); + } + const link = document.createElement('a'); + link.textContent = file; + link.className = 'file-link'; + link.onclick = () => { + fetch(`${base}__open-in-editor?file=${encodeURIComponent(file)}`); + }; + element.appendChild(link); + lastIndex = index + file.length; + return file; + }); + if (lastIndex < text.length) { + element.appendChild(document.createTextNode(text.substring(lastIndex))); + } + } + } + + highlightCode(code: string, language = 'javascript') { + if (language) { + return hljs.highlight(code, { language }).value; + } + return hljs.highlightAuto(code).value; + } + + renderMessages(messages: any[], _link: any) { + const messageContainer = this.root.querySelector('.message-container')!; + messageContainer.innerHTML = ''; + if (typeof messages === 'string') { + const messageElement = document.createElement('div'); + const messageBody = document.createElement('div'); + messageBody.className = 'message'; + const terminalBlock = document.createElement('div'); + const highlightedCode = this.highlightCode(extractErrorMessage(messages)); + terminalBlock.className = 'terminal-block'; + + const fileInfo = document.createElement('div'); + fileInfo.className = 'file-info'; + + const fileInfoRight = document.createElement('div'); + const fileInfoLeft = document.createElement('div'); + fileInfoRight.className = 'file-info-right'; + fileInfoRight.innerHTML = ` + + + + + + `; + + fileInfoLeft.className = 'file-info-left'; + fileInfoLeft.textContent = ''; + + fileInfo.appendChild(fileInfoLeft); + fileInfo.appendChild(fileInfoRight); + + const codeBlockWrapper = document.createElement('div'); + codeBlockWrapper.className = 'code-block-wrapper'; + codeBlockWrapper.innerHTML = highlightedCode; + + terminalBlock.appendChild(fileInfo); + terminalBlock.appendChild(codeBlockWrapper); + messageBody.appendChild(terminalBlock); + messageElement.appendChild(messageBody); + messageContainer.appendChild(messageElement); + return; + } + + messages.forEach((msg) => { + const messageElement = document.createElement('div'); + messageElement.className = 'error-message'; + msg = parseIfJSON(msg); + + if (msg.type) { + const TypeError = document.createElement('span'); + TypeError.className = 'type-error'; + TypeError.textContent = msg.type; + const TypeCodeError = document.createElement('div'); + TypeCodeError.innerHTML = errorAlert(msg.type, msg.id, msg.type); + messageElement.appendChild(TypeCodeError); + } + + // if (msg.plugin) { + // const pluginElement = document.createElement('span'); + // pluginElement.className = 'plugin'; + // pluginElement.textContent = `[plugin:${msg.plugin}] `; + // messageElement.appendChild(pluginElement); + // } + + const messageBody = document.createElement('div'); + messageBody.className = 'message'; + + const splitMessage = splitErrorMessage(msg); + + console.error(splitMessage.errorInfo); + + if (splitMessage.codeBlocks && splitMessage.codeBlocks.length > 0) { + splitMessage.codeBlocks.forEach((codeBlock, blockIndex) => { + const terminalBlock = document.createElement('div'); + const highlightedCode = this.highlightCode(codeBlock); + + terminalBlock.className = 'terminal-block'; + + const fileInfo = document.createElement('div'); + fileInfo.className = 'file-info'; + + const fileInfoRight = document.createElement('div'); + const fileInfoLeft = document.createElement('div'); + fileInfoRight.className = 'file-info-right'; + fileInfoRight.innerHTML = ` + + + + + + `; + + fileInfoLeft.className = 'file-info-left'; + fileInfoLeft.textContent = splitMessage.idCodeLines[blockIndex]; + + fileInfo.appendChild(fileInfoLeft); + fileInfo.appendChild(fileInfoRight); + + const codeBlockWrapper = document.createElement('div'); + codeBlockWrapper.className = 'code-block-wrapper'; + codeBlockWrapper.innerHTML = highlightedCode; + + terminalBlock.appendChild(fileInfo); + terminalBlock.appendChild(codeBlockWrapper); + messageBody.appendChild(terminalBlock); + }); + } else if (splitMessage.errorInfo) { + const terminalBlock = document.createElement('div'); + + const highlightedCode = this.highlightCode( + extractErrorMessage(splitMessage.frame) + ); + + terminalBlock.className = 'terminal-block'; + + const fileInfo = document.createElement('div'); + fileInfo.className = 'file-info'; + + const fileInfoRight = document.createElement('div'); + const fileInfoLeft = document.createElement('div'); + fileInfoRight.className = 'file-info-right'; + fileInfoRight.innerHTML = ` + + + + + + `; + + fileInfoLeft.className = 'file-info-left'; + fileInfoLeft.textContent = `Error Info ${ + msg.plugin ? `[plugin: ${msg.plugin}]` : '' + }`; + + fileInfo.appendChild(fileInfoLeft); + fileInfo.appendChild(fileInfoRight); + + const codeBlockWrapper = document.createElement('div'); + codeBlockWrapper.className = 'code-block-wrapper'; + codeBlockWrapper.innerHTML = highlightedCode; + + terminalBlock.appendChild(fileInfo); + terminalBlock.appendChild(codeBlockWrapper); + messageBody.appendChild(terminalBlock); + } + + messageElement.appendChild(messageBody); + + if (msg.frame) { + const messageElement = document.createElement('div'); + const messageBody = document.createElement('div'); + messageBody.className = 'message'; + const terminalBlock = document.createElement('div'); + const highlightedCode = this.highlightCode( + extractErrorMessage(stripAnsi(msg.frame)) + ); + terminalBlock.className = 'terminal-block'; + + const fileInfo = document.createElement('div'); + fileInfo.className = 'file-info'; + + const fileInfoRight = document.createElement('div'); + const fileInfoLeft = document.createElement('div'); + fileInfoRight.className = 'file-info-right'; + fileInfoRight.innerHTML = ` + + + + + + `; + + fileInfoLeft.className = 'file-info-left'; + fileInfoLeft.textContent = ''; + + fileInfo.appendChild(fileInfoLeft); + fileInfo.appendChild(fileInfoRight); + + const codeBlockWrapper = document.createElement('div'); + codeBlockWrapper.className = 'code-block-wrapper'; + codeBlockWrapper.innerHTML = highlightedCode; + + terminalBlock.appendChild(fileInfo); + terminalBlock.appendChild(codeBlockWrapper); + messageBody.appendChild(terminalBlock); + messageElement.appendChild(messageBody); + messageContainer.appendChild(messageElement); + } + + // if (msg.stack) { + // const stack = document.createElement('pre'); + // stack.className = 'stack'; + // this.setMessageText(stack, msg.stack, links); + // messageElement.appendChild(stack); + // } + + if (msg.cause) { + const causeElement = document.createElement('div'); + causeElement.innerHTML = warnAlert(msg.cause); + messageElement.appendChild(causeElement); + } + + messageContainer.appendChild(messageElement); + }); + } + close(): void { this.parentNode?.removeChild(this); document.removeEventListener('keydown', this.closeOnEsc); } } -export const overlayId = 'vite-error-overlay'; +export const overlayId = 'farm-error-overlay'; const { customElements } = globalThis; // Ensure `customElements` is defined before the next line. if (customElements && !customElements.get(overlayId)) { customElements.define(overlayId, ErrorOverlay); } + +function getAlertIcon(type: string) { + switch (type) { + case 'error': + return ``; + case 'warn': + return ``; + default: + return ''; + } +} diff --git a/packages/runtime-plugin-hmr/src/utils.ts b/packages/runtime-plugin-hmr/src/utils.ts index e2758f24f..bc280f101 100644 --- a/packages/runtime-plugin-hmr/src/utils.ts +++ b/packages/runtime-plugin-hmr/src/utils.ts @@ -12,3 +12,116 @@ export function handleErrorSync( // eslint-disable-next-line @typescript-eslint/no-empty-function function noop() {} + +export function parseIfJSON(str: string): any { + if (typeof str !== 'string') { + return str; + } + + try { + const parsed = JSON.parse(str); + if (Object(parsed) !== parsed) { + return str; + } + return parsed; + } catch (e) { + return str; + } +} + +// remove rollup deps use any type +export function prepareError(err: Error & { potentialSolution?: string }) { + return { + message: stripAnsi(err.message), + stack: stripAnsi(cleanStack(err.stack || '')), + id: (err as any).id, + frame: stripAnsi((err as any).frame || ''), + plugin: (err as any).plugin, + pluginCode: (err as any).pluginCode?.toString(), + loc: (err as any).loc, + potential: err.potentialSolution || '' + }; +} + +export function stripAnsi(str: string) { + // eslint-disable-next-line no-control-regex + return str.replace(/\x1b\[[0-9;]*m/g, ''); +} + +export function cleanStack(stack: string) { + return stack + .split(/\n/g) + .filter((l) => /^\s*at/.test(l)) + .join('\n'); +} + +export function splitErrorMessage(errorMsg: any) { + // @ts-ignore + const potentialCauses = errorMsg.cause; + const stripErrorFrame = stripAnsi(errorMsg.errorFrame ?? ''); + const { codeBlocks, idCodeLines } = extractSwcCodeBlocks(stripErrorFrame); + return { + errorInfo: stripAnsi(errorMsg.message), + codeBlocks, + potentialCauses, + idCodeLines, + frame: stripErrorFrame, + errorBrowser: `${stripAnsi(errorMsg.message)}\n\n${potentialCauses}\n\n` + }; +} + +export function extractSwcCodeBlocks(errorMsg: string) { + const lines = errorMsg.split('\n'); + let codeBlocks = []; + let idCodeLines = []; + let currentBlock: any = []; + let inCodeBlock = false; + let errorLine = ''; + let currentIdCodeLine = ''; + + for (const line of lines) { + if (line.trim().startsWith('×')) { + if (inCodeBlock) { + codeBlocks.push(currentBlock.join('\n')); + idCodeLines.push(currentIdCodeLine); + currentBlock = []; + currentIdCodeLine = ''; + } + errorLine = line; + inCodeBlock = false; + } else if (line.includes('╭─[')) { + inCodeBlock = true; + currentBlock = errorLine ? [errorLine, line] : [line]; + errorLine = ''; + const match = line.match(/\s*╭─(.*?)$$/); + + if (match) { + currentIdCodeLine = match[1]; + } + } else if (inCodeBlock) { + currentBlock.push(line); + if (line.includes('╰────')) { + codeBlocks.push(currentBlock.join('\n')); + idCodeLines.push(currentIdCodeLine); + currentBlock = []; + currentIdCodeLine = ''; + inCodeBlock = false; + } + } + } + + if (currentBlock.length > 0) { + codeBlocks.push(currentBlock.join('\n')); + idCodeLines.push(currentIdCodeLine); + } + + return { codeBlocks, idCodeLines }; +} + +export function extractErrorMessage(errorString: string) { + const regex = /^([\s\S]*?)(?=\s+at constructor)/; + + const match = errorString.match(regex); + + return match ? match[1].trim() : errorString; +} diff --git a/packages/runtime-plugin-import-meta/CHANGELOG.md b/packages/runtime-plugin-import-meta/CHANGELOG.md index 3eb22f4ce..d68cfc600 100644 --- a/packages/runtime-plugin-import-meta/CHANGELOG.md +++ b/packages/runtime-plugin-import-meta/CHANGELOG.md @@ -1,5 +1,11 @@ # @farmfe/runtime-plugin-import-meta +## 1.0.0-nightly-20241023020505 + +### Major Changes + +- cab79e8: bump major version with runtime + ## 0.2.2 ### Patch Changes diff --git a/packages/runtime-plugin-import-meta/package.json b/packages/runtime-plugin-import-meta/package.json index a8b342a06..78ccc9bd6 100644 --- a/packages/runtime-plugin-import-meta/package.json +++ b/packages/runtime-plugin-import-meta/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/runtime-plugin-import-meta", - "version": "0.2.2", + "version": "1.0.0-nightly-20241023020505", "description": "Runtime Import Meta plugin of Farm", "author": { "name": "Ming07", @@ -23,7 +23,7 @@ "type-check": "tsc -p tsconfig.json --noEmit" }, "devDependencies": { - "@farmfe/runtime": "workspace:^0.12.0" + "@farmfe/runtime": "workspace:1.0.0-nightly-20241023020505" }, "dependencies": { "core-js": "^3.30.1" diff --git a/packages/runtime-plugin-import-meta/src/index.ts b/packages/runtime-plugin-import-meta/src/index.ts index 8d50db78e..c7779557f 100644 --- a/packages/runtime-plugin-import-meta/src/index.ts +++ b/packages/runtime-plugin-import-meta/src/index.ts @@ -1,14 +1,14 @@ -import type { ModuleSystem, Plugin } from '@farmfe/runtime'; +import type { ModuleSystem } from '@farmfe/runtime'; const __global_this__ = typeof globalThis !== 'undefined' ? globalThis : window; -export default ({ +export default { name: 'farm-runtime-import-meta', _moduleSystem: {} as ModuleSystem, bootstrap(system: ModuleSystem) { this._moduleSystem = system; }, - moduleCreated(module) { + moduleCreated(module: any) { const publicPath = this._moduleSystem.publicPaths?.[0] || ""; const isSSR = this._moduleSystem.targetEnv === "node"; const { location } = __global_this__; @@ -43,4 +43,4 @@ export default ({ : module.resource_pot; module.meta.url = url; } -}); +}; diff --git a/packages/runtime/CHANGELOG.md b/packages/runtime/CHANGELOG.md index aed1fd106..55775bc77 100644 --- a/packages/runtime/CHANGELOG.md +++ b/packages/runtime/CHANGELOG.md @@ -1,5 +1,11 @@ # @farmfe/runtime +## 1.0.0-nightly-20241023020505 + +### Major Changes + +- cab79e8: bump major version with runtime + ## 0.12.7 ### Patch Changes diff --git a/packages/runtime/package.json b/packages/runtime/package.json index cf47cb0d7..af92fc86e 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/runtime", - "version": "0.12.7", + "version": "1.0.0-nightly-20241023020505", "description": "Runtime of Farm", "author": { "name": "bright wu", @@ -23,8 +23,8 @@ "type-check": "tsc -p tsconfig.json --noEmit" }, "devDependencies": { - "@types/node": "^18.0.1", - "typescript": "^4.7.4" + "@types/node": "22.3.0", + "typescript": "5.5.4" }, "dependencies": { "core-js": "^3.30.1" diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index eb323a615..2c15c3ce7 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,11 @@ # @farmfe/utils +## 1.0.0-nightly-20241022124925 + +### Major Changes + +- 6a1038c: update nightly tag + ## 0.1.0 ### Minor Changes diff --git a/packages/utils/package.json b/packages/utils/package.json index 2cf312330..2acd31dec 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/utils", - "version": "0.1.0", + "version": "1.0.0-nightly-20241022124925", "description": "farmfe utils", "main": "dist/index.js", "type": "module", @@ -36,5 +36,7 @@ "dev-server", "hmr" ], - "files": ["dist"] + "files": [ + "dist" + ] } diff --git a/packages/utils/src/color.ts b/packages/utils/src/color.ts index a144f2bf4..8714bd238 100644 --- a/packages/utils/src/color.ts +++ b/packages/utils/src/color.ts @@ -27,6 +27,8 @@ const gradientPurpleColor = [176, 106, 179]; const gradientPinkColor = [198, 66, 110]; const brandGradientColors = [255, 182, 193]; const brandGradientColors2 = [128, 0, 128]; +const gradientOrangeColor = [255, 165, 0]; +const gradientGoldColor = [255, 215, 0]; const argv = process.argv || [], env = process.env; @@ -116,12 +118,16 @@ export const purple = enabled export const orange = enabled ? createFormatter('\x1b[38;2;255;137;54m', '\x1b[39m') : String; +export const lightCyan = enabled + ? createFormatter('\x1b[38;2;180;240;240m', '\x1b[39m') + : String; export const cyan = enabled ? createFormatter('\x1b[36m', '\x1b[39m') : String; export const white = enabled ? createFormatter('\x1b[37m', '\x1b[39m') : String; export const bgBlack = enabled ? createFormatter('\x1b[40m', '\x1b[49m') : String; + export const bgRed = enabled ? createFormatter('\x1b[41m', '\x1b[49m') : String; export const bgGreen = enabled ? createFormatter('\x1b[42m', '\x1b[49m') @@ -175,17 +181,28 @@ export function interpolateColor( export const PersistentCacheBrand = brandColor('⚡️') + gradientString(`FULL EXTREME!`, [ + // gradientPurpleColor, + // interpolateColor(gradientPurpleColor, gradientPinkColor, 0.1), + // interpolateColor(gradientPurpleColor, gradientPinkColor, 0.2), + // interpolateColor(gradientPurpleColor, gradientPinkColor, 0.3), + // interpolateColor(gradientPurpleColor, gradientPinkColor, 0.4), + // interpolateColor(gradientPurpleColor, gradientPinkColor, 0.5), + // interpolateColor(gradientPurpleColor, gradientPinkColor, 0.6), + // interpolateColor(gradientPurpleColor, gradientPinkColor, 0.7), + // interpolateColor(gradientPurpleColor, gradientPinkColor, 0.8), + // interpolateColor(gradientPurpleColor, gradientPinkColor, 0.9), + // gradientPinkColor gradientPurpleColor, - interpolateColor(gradientPurpleColor, gradientPinkColor, 0.1), interpolateColor(gradientPurpleColor, gradientPinkColor, 0.2), - interpolateColor(gradientPurpleColor, gradientPinkColor, 0.3), interpolateColor(gradientPurpleColor, gradientPinkColor, 0.4), - interpolateColor(gradientPurpleColor, gradientPinkColor, 0.5), interpolateColor(gradientPurpleColor, gradientPinkColor, 0.6), - interpolateColor(gradientPurpleColor, gradientPinkColor, 0.7), interpolateColor(gradientPurpleColor, gradientPinkColor, 0.8), - interpolateColor(gradientPurpleColor, gradientPinkColor, 0.9), - gradientPinkColor + gradientPinkColor, + interpolateColor(gradientPinkColor, gradientOrangeColor, 0.3), + interpolateColor(gradientPinkColor, gradientOrangeColor, 0.6), + gradientOrangeColor, + interpolateColor(gradientOrangeColor, gradientGoldColor, 0.5), + gradientGoldColor ]); export function handleBrandText(text: string) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 86cd7711c..70a4168aa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,14 +17,14 @@ importers: specifier: 1.8.3 version: 1.8.3 '@changesets/cli': - specifier: ^2.26.0 - version: 2.26.2 + specifier: 2.27.9 + version: 2.27.9 '@codspeed/vitest-plugin': specifier: ^3.1.1 - version: 3.1.1(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vitest@2.0.4(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + version: 3.1.1(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vitest@2.0.4(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) '@commitlint/cli': specifier: ^17.0.3 - version: 17.8.1 + version: 17.8.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) '@commitlint/config-conventional': specifier: ^17.0.3 version: 17.8.1 @@ -35,17 +35,17 @@ importers: specifier: workspace:* version: link:packages/core '@types/node': - specifier: 20.14.12 - version: 20.14.12 + specifier: 22.5.0 + version: 22.5.0 '@vitest/coverage-v8': specifier: 2.0.4 - version: 2.0.4(vitest@2.0.4(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + version: 2.0.4(vitest@2.0.4(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) cross-env: specifier: ^7.0.3 version: 7.0.3 cspell: - specifier: ^6.2.2 - version: 6.31.3(encoding@0.1.13) + specifier: 8.14.2 + version: 8.14.2 execa: specifier: ^7.1.1 version: 7.2.0 @@ -58,30 +58,172 @@ importers: nanospinner: specifier: ^1.1.0 version: 1.1.0 + node-emoji: + specifier: ^2.1.3 + version: 2.1.3 playwright-chromium: specifier: ^1.42.1 version: 1.42.1 rimraf: - specifier: ^3.0.2 - version: 3.0.2 + specifier: 6.0.1 + version: 6.0.1 rollup: specifier: ^3.29.4 version: 3.29.4 typescript: - specifier: ^4.9.4 - version: 4.9.5 + specifier: 5.6.3 + version: 5.6.3 vite: specifier: ^5.2.6 - version: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + version: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) vitest: specifier: 2.0.4 - version: 2.0.4(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + version: 2.0.4(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - bench: + docs: dependencies: - '@farmfe/core': - specifier: workspace:* - version: link:../packages/core + '@crowdin/cli': + specifier: '3' + version: 3.19.4(encoding@0.1.13) + '@crowdin/crowdin-api-client': + specifier: ^1.23.4 + version: 1.36.0 + '@docusaurus/core': + specifier: 3.5.2 + version: 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/plugin-ideal-image': + specifier: 3.5.2 + version: 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(prop-types@15.8.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/preset-classic': + specifier: 3.5.2 + version: 3.5.2(@algolia/client-search@4.24.0)(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/react@18.2.35)(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/theme-common': + specifier: 3.5.2 + version: 3.5.2(@docusaurus/plugin-content-docs@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))))(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3) + '@docusaurus/theme-search-algolia': + specifier: 3.5.2 + version: 3.5.2(@algolia/client-search@4.24.0)(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/react@18.2.35)(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@mdx-js/react': + specifier: ^3.0.0 + version: 3.0.1(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-icons': + specifier: ^1.3.0 + version: 1.3.0(react@18.2.0) + '@react-spring/web': + specifier: ^9.7.3 + version: 9.7.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@react-three/drei': + specifier: 9.112.1 + version: 9.112.1(@react-three/fiber@8.17.7(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(three@0.168.0))(@types/react@18.2.35)(@types/three@0.163.0)(immer@10.0.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(three@0.168.0) + '@react-three/fiber': + specifier: 8.17.7 + version: 8.17.7(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(three@0.168.0) + '@shikijs/markdown-it': + specifier: ^1.18.0 + version: 1.22.0 + '@shikijs/transformers': + specifier: ^1.18.0 + version: 1.22.0 + '@tabler/icons-react': + specifier: ^3.11.0 + version: 3.19.0(react@18.2.0) + autoprefixer: + specifier: ^10.4.14 + version: 10.4.16(postcss@8.4.47) + class-variance-authority: + specifier: ^0.7.0 + version: 0.7.0 + docusaurus-plugin-sass: + specifier: 0.2.5 + version: 0.2.5(@docusaurus/core@3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))))(sass@1.74.1)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + docusaurus-preset-shiki-twoslash: + specifier: ^1.1.41 + version: 1.1.41 + leva: + specifier: ^0.9.35 + version: 0.9.35(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + lucide-react: + specifier: ^0.394.0 + version: 0.394.0(react@18.2.0) + markdown-it: + specifier: ^14.1.0 + version: 14.1.0 + next-themes: + specifier: ^0.3.0 + version: 0.3.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + postcss: + specifier: ^8.4.24 + version: 8.4.47 + postcss-preset-env: + specifier: ^10.0.3 + version: 10.0.6(postcss@8.4.47) + prism-react-renderer: + specifier: ^2.1.0 + version: 2.4.0(react@18.2.0) + react: + specifier: ^18.2.0 + version: 18.2.0 + react-dom: + specifier: ^18.2.0 + version: 18.2.0(react@18.2.0) + react-icons: + specifier: ^5.3.0 + version: 5.3.0(react@18.2.0) + react-intersection-observer: + specifier: ^9.5.1 + version: 9.13.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react-use-measure: + specifier: ^2.1.1 + version: 2.1.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + remark-gfm: + specifier: ^4.0.0 + version: 4.0.0 + sass: + specifier: ^1.63.6 + version: 1.74.1 + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.13(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3))) + three: + specifier: 0.168.0 + version: 0.168.0 + devDependencies: + '@docusaurus/module-type-aliases': + specifier: 3.5.2 + version: 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/types': + specifier: 3.5.2 + version: 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@swc/core': + specifier: ^1.3.99 + version: 1.7.26(@swc/helpers@0.5.3) + babel-loader: + specifier: ^9.1.3 + version: 9.2.1(@babel/core@7.25.2)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + clsx: + specifier: ^1.2.1 + version: 1.2.1 + framer-motion: + specifier: ^11.2.10 + version: 11.11.1(@emotion/is-prop-valid@1.3.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + shiki: + specifier: ^1.7.0 + version: 1.22.0 + shikiji: + specifier: 0.9.10 + version: 0.9.10 + swc-loader: + specifier: ^0.2.3 + version: 0.2.6(@swc/core@1.7.26(@swc/helpers@0.5.3))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + tailwind-merge: + specifier: ^2.3.0 + version: 2.5.3 + tailwindcss: + specifier: ^3.4.4 + version: 3.4.13(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3)) + ts-node: + specifier: ^10.9.1 + version: 10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3) examples/arcgis: dependencies: @@ -268,7 +410,7 @@ importers: version: 18.2.14 postcss-pxtorem: specifier: ^6.0.0 - version: 6.0.0(postcss@8.4.40) + version: 6.0.0(postcss@8.4.47) react-refresh: specifier: ^0.14.0 version: 0.14.0 @@ -323,7 +465,7 @@ importers: version: 0.1.13 devDependencies: '@farmfe/cli': - specifier: ^1.0.1 + specifier: workspace:* version: link:../../packages/cli '@farmfe/core': specifier: workspace:* @@ -423,7 +565,7 @@ importers: examples/external: devDependencies: '@farmfe/cli': - specifier: ^1.0.1 + specifier: workspace:* version: link:../../packages/cli '@farmfe/core': specifier: workspace:* @@ -469,7 +611,7 @@ importers: examples/import-meta: devDependencies: '@farmfe/cli': - specifier: ^1.0.4 + specifier: workspace:* version: link:../../packages/cli '@farmfe/core': specifier: workspace:* @@ -494,13 +636,13 @@ importers: version: 0.20.0(react@17.0.2) devDependencies: '@farmfe/cli': - specifier: ^1.0.2 + specifier: workspace:* version: link:../../packages/cli '@farmfe/core': specifier: workspace:* version: link:../../packages/core '@farmfe/plugin-react': - specifier: ^1.1.0 + specifier: 2.0.0-nightly-20241022124925 version: link:../../rust-plugins/react '@types/react': specifier: '18' @@ -690,7 +832,7 @@ importers: version: link:../../packages/core '@nestjs/cli': specifier: ^10.0.0 - version: 10.4.2 + version: 10.4.2(@swc/core@1.7.26(@swc/helpers@0.5.3)) '@nestjs/schematics': specifier: ^10.0.0 version: 10.1.2(chokidar@3.6.0)(typescript@5.4.5) @@ -726,10 +868,10 @@ importers: version: 5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.2) farmup: specifier: latest - version: 0.1.0 + version: 0.1.4 jest: specifier: ^29.5.0 - version: 29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)) + version: 29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)) prettier: specifier: ^3.0.0 version: 3.3.2 @@ -741,13 +883,13 @@ importers: version: 6.3.4 ts-jest: specifier: ^29.1.0 - version: 29.1.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)))(typescript@5.4.5) + version: 29.1.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)))(typescript@5.4.5) ts-loader: specifier: ^9.4.3 - version: 9.5.1(typescript@5.4.5)(webpack@5.92.1) + version: 9.5.1(typescript@5.4.5)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@20.12.12)(typescript@5.4.5) + version: 10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5) tsconfig-paths: specifier: ^4.2.0 version: 4.2.0 @@ -810,7 +952,7 @@ importers: version: link:../../rust-plugins/react '@pandacss/dev': specifier: ^0.42.0 - version: 0.42.0(typescript@5.4.5) + version: 0.42.0(typescript@5.6.3) '@types/react': specifier: '18' version: 18.2.35 @@ -853,7 +995,7 @@ importers: version: 6.0.0(postcss@8.4.31) tailwindcss: specifier: ^3.3.2 - version: 3.3.5(ts-node@10.9.1(@types/node@20.14.12)(typescript@4.9.5)) + version: 3.3.5(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3)) examples/public-dir: dependencies: @@ -949,7 +1091,7 @@ importers: version: 2.2.1(react-redux@7.2.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0) '@sentry/react': specifier: ^8.33.1 - version: 8.33.1(react@18.2.0) + version: 8.34.0(react@18.2.0) clsx: specifier: ^1.2.1 version: 1.2.1 @@ -1065,13 +1207,13 @@ importers: version: 18.2.0(react@18.2.0) devDependencies: '@farmfe/cli': - specifier: 'workspace:' + specifier: workspace:* version: link:../../packages/cli '@farmfe/core': specifier: workspace:* version: link:../../packages/core '@farmfe/plugin-react': - specifier: 'workspace:' + specifier: workspace:* version: link:../../rust-plugins/react '@types/react': specifier: '18' @@ -1130,7 +1272,7 @@ importers: version: 0.14.0 vite-plugin-pages: specifier: ^0.32.0 - version: 0.32.0(@vue/compiler-sfc@3.4.35)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + version: 0.32.0(@vue/compiler-sfc@3.4.35)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) examples/react-sass-js: dependencies: @@ -1215,6 +1357,43 @@ importers: specifier: ^0.14.0 version: 0.14.0 + examples/refactor-react: + dependencies: + '@ant-design/happy-work-theme': + specifier: ^1.0.0 + version: 1.0.0(antd@5.11.0(date-fns@2.30.0)(luxon@3.4.4)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + antd: + specifier: ^5.4.2 + version: 5.11.0(date-fns@2.30.0)(luxon@3.4.4)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react: + specifier: '18' + version: 18.2.0 + react-dom: + specifier: '18' + version: 18.2.0(react@18.2.0) + devDependencies: + '@farmfe/cli': + specifier: workspace:* + version: link:../../packages/cli + '@farmfe/core': + specifier: workspace:* + version: link:../../packages/core + '@farmfe/plugin-react': + specifier: workspace:* + version: link:../../rust-plugins/react + '@types/react': + specifier: '18' + version: 18.2.35 + '@types/react-dom': + specifier: '18' + version: 18.2.14 + core-js: + specifier: ^3.36.1 + version: 3.37.1 + react-refresh: + specifier: ^0.14.0 + version: 0.14.2 + examples/resolve-module-graph: devDependencies: '@farmfe/cli': @@ -1417,7 +1596,7 @@ importers: version: 0.5.3(solid-js@1.8.5) vite-plugin-solid: specifier: ^2.7.0 - version: 2.7.2(solid-js@1.8.5)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + version: 2.7.2(solid-js@1.8.5)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) examples/static-assets: dependencies: @@ -1470,16 +1649,16 @@ importers: version: 18.2.14 autoprefixer: specifier: ^10.4.14 - version: 10.4.16(postcss@8.4.31) + version: 10.4.16(postcss@8.4.47) postcss: specifier: ^8.4.24 - version: 8.4.31 + version: 8.4.47 react-refresh: specifier: ^0.14.0 version: 0.14.0 tailwindcss: specifier: ^3.3.2 - version: 3.3.5(ts-node@10.9.1(@types/node@20.14.12)(typescript@4.9.5)) + version: 3.3.5(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3)) examples/target-env: dependencies: @@ -1569,7 +1748,7 @@ importers: version: 1.15.3(babel-plugin-macros@3.1.0) '@vanilla-extract/vite-plugin': specifier: ^4.0.13 - version: 4.0.13(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + version: 4.0.13(@types/node@22.5.0)(babel-plugin-macros@3.1.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) devDependencies: '@farmfe/cli': specifier: workspace:* @@ -1582,7 +1761,44 @@ importers: version: 5.4.5 vite: specifier: ^5.2.6 - version: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + version: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + + examples/visualizer: + dependencies: + react: + specifier: '18' + version: 18.2.0 + react-dom: + specifier: '18' + version: 18.2.0(react@18.2.0) + devDependencies: + '@farmfe/cli': + specifier: workspace:* + version: link:../../packages/cli + '@farmfe/core': + specifier: workspace:* + version: link:../../packages/core + '@farmfe/js-plugin-visualizer': + specifier: workspace:* + version: link:../../js-plugins/visualizer + '@farmfe/plugin-react': + specifier: workspace:* + version: link:../../rust-plugins/react + '@types/react': + specifier: '18' + version: 18.2.35 + '@types/react-dom': + specifier: '18' + version: 18.2.14 + compression: + specifier: ^1.7.4 + version: 1.7.4 + core-js: + specifier: ^3.36.1 + version: 3.37.1 + react-refresh: + specifier: ^0.14.0 + version: 0.14.2 examples/vite-adapter-react: dependencies: @@ -1625,7 +1841,7 @@ importers: version: 0.14.0 vite-plugin-pages: specifier: ^0.32.0 - version: 0.32.0(@vue/compiler-sfc@3.4.35)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + version: 0.32.0(@vue/compiler-sfc@3.4.35)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) examples/vite-adapter-solid: dependencies: @@ -1650,19 +1866,19 @@ importers: version: 5.2.2 vite-plugin-solid: specifier: ^2.7.0 - version: 2.7.2(solid-js@1.8.5)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + version: 2.7.2(solid-js@1.8.5)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) examples/vite-adapter-svelte: devDependencies: '@farmfe/cli': - specifier: ^1.0.4 + specifier: workspace:* version: link:../../packages/cli '@farmfe/core': specifier: workspace:* version: link:../../packages/core '@sveltejs/vite-plugin-svelte': specifier: ^3.0.1 - version: 3.0.1(svelte@4.0.0)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + version: 3.0.1(svelte@4.0.0)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) '@tsconfig/svelte': specifier: ^5.0.2 version: 5.0.2 @@ -1671,7 +1887,7 @@ importers: version: 4.0.0 svelte-check: specifier: ^3.6.2 - version: 3.6.2(@babel/core@7.25.2)(less@4.2.0)(postcss-load-config@4.0.1(postcss@8.4.40))(postcss@8.4.40)(sass@1.74.1)(svelte@4.0.0) + version: 3.6.2(@babel/core@7.25.2)(less@4.2.0)(postcss-load-config@4.0.1(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.2.2)))(postcss@8.4.47)(sass@1.74.1)(svelte@4.0.0) tslib: specifier: ^2.6.2 version: 2.6.2 @@ -1683,7 +1899,7 @@ importers: dependencies: vite-tsconfig-paths: specifier: ^4.3.1 - version: 4.3.1(typescript@5.4.5)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + version: 4.3.1(typescript@5.6.3)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) devDependencies: '@farmfe/cli': specifier: workspace:* @@ -1708,7 +1924,7 @@ importers: version: 0.32.33 ant-design-vue: specifier: '3' - version: 3.2.20(vue@3.3.7(typescript@5.4.5)) + version: 3.2.20(vue@3.3.7(typescript@5.6.3)) axios: specifier: ^1.4.0 version: 1.6.0 @@ -1723,23 +1939,17 @@ importers: version: 3.33.2 element-plus: specifier: ^2.4.1 - version: 2.4.2(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)) + version: 2.4.2(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)) prettier: specifier: ^3.3.2 version: 3.3.2 vue: specifier: ^3.2.45 - version: 3.3.7(typescript@5.4.5) + version: 3.3.7(typescript@5.6.3) vue-router: specifier: ^4.2.1 - version: 4.2.5(vue@3.3.7(typescript@5.4.5)) + version: 4.2.5(vue@3.3.7(typescript@5.6.3)) devDependencies: - '@farmfe/cli': - specifier: workspace:* - version: link:../../packages/cli - '@farmfe/core': - specifier: workspace:* - version: link:../../packages/core '@farmfe/js-plugin-less': specifier: workspace:^ version: link:../../js-plugins/less @@ -1766,10 +1976,10 @@ importers: version: 0.62.2(postcss@8.4.32) '@vitejs/plugin-vue': specifier: 5.1.4 - version: 5.1.4(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1))(vue@3.3.7(typescript@5.4.5)) + version: 5.1.4(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1))(vue@3.3.7(typescript@5.6.3)) '@vitejs/plugin-vue-jsx': specifier: ^3.1.0 - version: 3.1.0(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1))(vue@3.3.7(typescript@5.4.5)) + version: 3.1.0(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1))(vue@3.3.7(typescript@5.6.3)) postcss: specifier: ^8.4.32 version: 8.4.32 @@ -1781,34 +1991,34 @@ importers: version: 1.69.5 unocss: specifier: ^0.62.2 - version: 0.62.2(postcss@8.4.32)(rollup@4.14.1)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1)) + version: 0.62.2(postcss@8.4.32)(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1)) unplugin-auto-import: specifier: ^0.16.7 - version: 0.16.7(@vueuse/core@9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)))(rollup@4.14.1) + version: 0.16.7(@vueuse/core@9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)))(rollup@4.14.1) unplugin-svg-component: specifier: ^0.8.0 version: 0.8.0(@vue/compiler-sfc@3.4.35) unplugin-vue-components: specifier: ^0.25.2 - version: 0.25.2(@babel/parser@7.25.3)(rollup@4.14.1)(vue@3.3.7(typescript@5.4.5)) + version: 0.25.2(@babel/parser@7.25.7)(rollup@4.14.1)(vue@3.3.7(typescript@5.6.3)) unplugin-vue-router: specifier: ^0.7.0 - version: 0.7.0(rollup@4.14.1)(vue-router@4.2.5(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)) + version: 0.7.0(rollup@4.14.1)(vue-router@4.2.5(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)) vite-svg-loader: specifier: ^5.1.0 - version: 5.1.0(vue@3.3.7(typescript@5.4.5)) + version: 5.1.0(vue@3.3.7(typescript@5.6.3)) examples/vite-adapter-vue-css: dependencies: vue: specifier: ^3.4.27 - version: 3.4.27(typescript@5.4.5) + version: 3.4.27(typescript@5.6.3) vue-router: specifier: ^4.3.2 - version: 4.3.2(vue@3.4.27(typescript@5.4.5)) + version: 4.3.2(vue@3.4.27(typescript@5.6.3)) devDependencies: '@farmfe/cli': - specifier: ^1.0.2 + specifier: workspace:* version: link:../../packages/cli '@farmfe/core': specifier: workspace:* @@ -1818,10 +2028,10 @@ importers: version: link:../../rust-plugins/sass '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.0.4(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.27(typescript@5.4.5)) + version: 5.0.4(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.27(typescript@5.6.3)) '@vitejs/plugin-vue-jsx': specifier: ^3.1.0 - version: 3.1.0(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.27(typescript@5.4.5)) + version: 3.1.0(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.27(typescript@5.6.3)) prettier: specifier: ^3.2.5 version: 3.2.5 @@ -1830,17 +2040,17 @@ importers: dependencies: vue: specifier: ^3.4.15 - version: 3.4.15(typescript@5.4.5) + version: 3.4.15(typescript@5.6.3) devDependencies: '@farmfe/cli': - specifier: workspace:^1.0.0 + specifier: workspace:* version: link:../../packages/cli '@farmfe/core': specifier: workspace:* version: link:../../packages/core '@vitejs/plugin-vue': specifier: ^5.0.3 - version: 5.0.3(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.15(typescript@5.4.5)) + version: 5.0.3(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.15(typescript@5.6.3)) core-js: specifier: ^3.35.1 version: 3.35.1 @@ -1849,10 +2059,10 @@ importers: dependencies: tdesign-icons-vue: specifier: latest - version: 0.2.4(vue@2.6.14) + version: 0.2.5(vue@2.6.14) tdesign-vue: specifier: latest - version: 1.9.8(vue@2.6.14) + version: 1.10.4(vue@2.6.14) vite-plugin-vue2-svg: specifier: ^0.4.0 version: 0.4.0(ejs@3.1.10)(lodash@4.17.21)(vue-template-compiler@2.6.14(vue@2.6.14)) @@ -1861,7 +2071,7 @@ importers: version: 2.6.14 devDependencies: '@farmfe/cli': - specifier: workspace:^1.0.0 + specifier: workspace:* version: link:../../packages/cli '@farmfe/core': specifier: workspace:* @@ -1874,7 +2084,7 @@ importers: version: 3.36.1 vite-plugin-vue2: specifier: ^2.0.3 - version: 2.0.3(ejs@3.1.10)(lodash@4.17.21)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue-template-compiler@2.6.14(vue@2.6.14))(vue@2.6.14) + version: 2.0.3(ejs@3.1.10)(lodash@4.17.21)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue-template-compiler@2.6.14(vue@2.6.14))(vue@2.6.14) vue-template-compiler: specifier: 2.6.14 version: 2.6.14(vue@2.6.14) @@ -1883,10 +2093,10 @@ importers: dependencies: tdesign-icons-vue: specifier: latest - version: 0.2.4(vue@2.7.16) + version: 0.2.5(vue@2.7.16) tdesign-vue: specifier: latest - version: 1.9.8(vue@2.7.16) + version: 1.10.4(vue@2.7.16) vite-plugin-vue2-svg: specifier: ^0.4.0 version: 0.4.0(ejs@3.1.10)(lodash@4.17.21)(vue-template-compiler@2.7.16(vue@2.7.16)) @@ -1895,14 +2105,14 @@ importers: version: 2.7.16 devDependencies: '@farmfe/cli': - specifier: workspace:^1.0.0 + specifier: workspace:* version: link:../../packages/cli '@farmfe/core': specifier: workspace:* version: link:../../packages/core '@vitejs/plugin-vue2': specifier: ^2.3.1 - version: 2.3.1(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@2.7.16) + version: 2.3.1(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@2.7.16) core-js: specifier: ^3.30.1 version: 3.36.1 @@ -1920,10 +2130,10 @@ importers: version: 3.33.2 element-plus: specifier: ^2.4.1 - version: 2.4.2(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)) + version: 2.4.2(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)) vue: specifier: ^3.3.0 - version: 3.3.7(typescript@5.4.5) + version: 3.3.7(typescript@5.6.3) devDependencies: '@farmfe/cli': specifier: workspace:* @@ -1948,19 +2158,19 @@ importers: dependencies: '@ant-design/icons-vue': specifier: ^6.1.0 - version: 6.1.0(vue@3.3.7(typescript@5.4.5)) + version: 6.1.0(vue@3.3.7(typescript@5.6.3)) ant-design-vue: specifier: ^4.0.3 - version: 4.0.6(vue@3.3.7(typescript@5.4.5)) + version: 4.0.6(vue@3.3.7(typescript@5.6.3)) core-js: specifier: ^3.30.1 version: 3.33.2 vue: specifier: ^3.3.0 - version: 3.3.7(typescript@5.4.5) + version: 3.3.7(typescript@5.6.3) vue-router: specifier: ^4.2.1 - version: 4.2.5(vue@3.3.7(typescript@5.4.5)) + version: 4.2.5(vue@3.3.7(typescript@5.6.3)) xlsx: specifier: ^0.18.5 version: 0.18.5 @@ -1976,7 +2186,7 @@ importers: version: link:../../js-plugins/less '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.0.4(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.7(typescript@5.4.5)) + version: 5.0.4(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.7(typescript@5.6.3)) xlsx-js-style: specifier: ^1.2.0 version: 1.2.0 @@ -1985,7 +2195,7 @@ importers: dependencies: vue: specifier: ^3.3.0 - version: 3.3.7(typescript@5.4.5) + version: 3.3.7(typescript@5.6.3) devDependencies: '@farmfe/cli': specifier: workspace:* @@ -1995,16 +2205,16 @@ importers: version: link:../../packages/core '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.0.4(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.7(typescript@5.4.5)) + version: 5.0.4(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.7(typescript@5.6.3)) '@vitejs/plugin-vue-jsx': specifier: ^3.1.0 - version: 3.1.0(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.7(typescript@5.4.5)) + version: 3.1.0(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.7(typescript@5.6.3)) examples/vue-nativeui: dependencies: vue: specifier: ^3.4.34 - version: 3.4.35(typescript@5.4.5) + version: 3.4.35(typescript@5.6.3) devDependencies: '@farmfe/cli': specifier: workspace:* @@ -2014,13 +2224,16 @@ importers: version: link:../../packages/core '@vitejs/plugin-vue': specifier: ^5.1.1 - version: 5.1.2(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.35(typescript@5.4.5)) + version: 5.1.2(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.35(typescript@5.6.3)) + compression: + specifier: ^1.7.4 + version: 1.7.4 core-js: specifier: ^3.37.1 version: 3.37.1 naive-ui: specifier: ^2.39.0 - version: 2.39.0(vue@3.4.35(typescript@5.4.5)) + version: 2.39.0(vue@3.4.35(typescript@5.6.3)) examples/vue-ssr: dependencies: @@ -2035,13 +2248,13 @@ importers: version: 4.18.2 primevue: specifier: '3' - version: 3.52.0(vue@3.3.12(typescript@5.4.5)) + version: 3.52.0(vue@3.3.12(typescript@5.6.3)) vue: specifier: ^3.3.12 - version: 3.3.12(typescript@5.4.5) + version: 3.3.12(typescript@5.6.3) vue-router: specifier: ^4.2.1 - version: 4.2.5(vue@3.3.12(typescript@5.4.5)) + version: 4.2.5(vue@3.3.12(typescript@5.6.3)) devDependencies: '@farmfe/cli': specifier: workspace:* @@ -2051,7 +2264,56 @@ importers: version: link:../../packages/core '@vitejs/plugin-vue': specifier: ^4.4.0 - version: 4.4.0(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.12(typescript@5.4.5)) + version: 4.4.0(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.12(typescript@5.6.3)) + + examples/vue3: + dependencies: + '@module-federation/vite': + specifier: ^1.1.1 + version: 1.1.1(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(rollup@4.14.1)(sass@1.74.1)(terser@5.31.1) + unplugin-auto-import: + specifier: ^0.16.7 + version: 0.16.7(@vueuse/core@9.13.0(@vue/composition-api@1.7.2(vue@3.4.35(typescript@5.6.3)))(vue@3.4.35(typescript@5.6.3)))(rollup@4.14.1) + unplugin-vue-router: + specifier: ^0.7.0 + version: 0.7.0(rollup@4.14.1)(vue-router@4.4.5(vue@3.4.35(typescript@5.6.3)))(vue@3.4.35(typescript@5.6.3)) + vue: + specifier: ^3.4.0 + version: 3.4.35(typescript@5.6.3) + vue-router: + specifier: ^4.4.3 + version: 4.4.5(vue@3.4.35(typescript@5.6.3)) + devDependencies: + '@vitejs/plugin-vue': + specifier: 5.1.4 + version: 5.1.4(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.35(typescript@5.6.3)) + compression: + specifier: ^1.7.4 + version: 1.7.4 + core-js: + specifier: ^3.30.1 + version: 3.37.1 + unocss: + specifier: ^0.62.2 + version: 0.62.2(postcss@8.4.47)(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + unplugin-vue-inspector: + specifier: ^2.2.0 + version: 2.2.0(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + vite-plugin-compression: + specifier: ^0.5.1 + version: 0.5.1(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + vite-plugin-html: + specifier: ^3.2.2 + version: 3.2.2(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + vite-plugin-inspect: + specifier: ^0.8.7 + version: 0.8.7(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + vite-plugin-mkcert: + specifier: ^1.17.6 + version: 1.17.6(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + vite-plugin-vue-inspector: + specifier: /Users/adny/vue/vite-plugin-vue-inspector/packages/core + version: link:../../../../vue/vite-plugin-vue-inspector/packages/core examples/x-data-spreadsheet: dependencies: @@ -2090,24 +2352,12 @@ importers: specifier: ^5.4.5 version: 5.4.5 devDependencies: - '@farmfe/cli': - specifier: workspace:* - version: link:../../packages/cli - '@farmfe/core': - specifier: workspace:* - version: link:../../packages/core '@types/fs-extra': specifier: ^11.0.1 version: 11.0.3 js-plugins/electron: devDependencies: - '@farmfe/cli': - specifier: workspace:* - version: link:../../packages/cli - '@farmfe/core': - specifier: workspace:* - version: link:../../packages/core '@farmfe/js-plugin-dts': specifier: workspace:* version: link:../dts @@ -2164,7 +2414,7 @@ importers: version: 16.0.1(postcss@8.4.31) postcss-load-config: specifier: ^4.0.1 - version: 4.0.1(postcss@8.4.31)(ts-node@10.9.1(@types/node@20.14.12)(typescript@4.9.5)) + version: 4.0.1(postcss@8.4.31)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3)) postcss-url: specifier: ^10.1.3 version: 10.1.3(postcss@8.4.31) @@ -2208,12 +2458,6 @@ importers: specifier: ^0.5.3 version: 0.5.3(solid-js@1.8.5) devDependencies: - '@farmfe/cli': - specifier: workspace:* - version: link:../../packages/cli - '@farmfe/core': - specifier: workspace:* - version: link:../../packages/core '@farmfe/js-plugin-dts': specifier: workspace:* version: link:../dts @@ -2228,10 +2472,10 @@ importers: dependencies: '@svgr/core': specifier: ^8.1.0 - version: 8.1.0(typescript@5.4.5) + version: 8.1.0(typescript@5.6.3) '@svgr/plugin-jsx': specifier: ^8.1.0 - version: 8.1.0(@svgr/core@8.1.0(typescript@5.4.5)) + version: 8.1.0(@svgr/core@8.1.0(typescript@5.6.3)) devDependencies: '@farmfe/cli': specifier: workspace:* @@ -2247,16 +2491,16 @@ importers: dependencies: '@ant-design/icons-vue': specifier: ^7.0.1 - version: 7.0.1(vue@3.4.15(typescript@5.4.5)) + version: 7.0.1(vue@3.4.15(typescript@5.6.3)) '@guolao/vue-monaco-editor': specifier: ^1.5.1 - version: 1.5.1(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.4.5)))(vue@3.4.15(typescript@5.4.5)) + version: 1.5.1(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.6.3)))(vue@3.4.15(typescript@5.6.3)) '@types/ws': specifier: ^8.5.4 version: 8.5.8 ant-design-vue: specifier: ^4.1.2 - version: 4.1.2(vue@3.4.15(typescript@5.4.5)) + version: 4.1.2(vue@3.4.15(typescript@5.6.3)) axios: specifier: ^1.5.0 version: 1.6.5 @@ -2271,7 +2515,7 @@ importers: version: 7.11.1 pinia: specifier: ^2.1.7 - version: 2.1.7(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.4.5)))(typescript@5.4.5)(vue@3.4.15(typescript@5.4.5)) + version: 2.1.7(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.6.3)))(typescript@5.6.3)(vue@3.4.15(typescript@5.6.3)) sirv: specifier: ^2.0.3 version: 2.0.3 @@ -2280,20 +2524,14 @@ importers: version: 6.0.3 vue: specifier: ^3.3.4 - version: 3.4.15(typescript@5.4.5) + version: 3.4.15(typescript@5.6.3) vue-router: specifier: ^4.2.1 - version: 4.2.5(vue@3.4.15(typescript@5.4.5)) + version: 4.2.5(vue@3.4.15(typescript@5.6.3)) ws: specifier: ^8.14.2 version: 8.14.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) devDependencies: - '@farmfe/cli': - specifier: workspace:* - version: link:../../packages/cli - '@farmfe/core': - specifier: workspace:* - version: link:../../packages/core '@farmfe/js-plugin-dts': specifier: workspace:* version: link:../dts @@ -2314,7 +2552,7 @@ importers: version: 2.13.10 '@vitejs/plugin-vue': specifier: ^4.4.0 - version: 4.6.2(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.15(typescript@5.4.5)) + version: 4.6.2(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.15(typescript@5.6.3)) autoprefixer: specifier: ^10.4.14 version: 10.4.16(postcss@8.4.35) @@ -2326,16 +2564,10 @@ importers: version: 8.4.35 tailwindcss: specifier: ^3.3.2 - version: 3.3.5(ts-node@10.9.1(@types/node@20.14.12)(typescript@5.4.5)) + version: 3.3.5(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3)) js-plugins/vue: devDependencies: - '@farmfe/cli': - specifier: workspace:^ - version: link:../../packages/cli - '@farmfe/core': - specifier: workspace:* - version: link:../../packages/core '@farmfe/js-plugin-dts': specifier: workspace:^ version: link:../dts @@ -2375,52 +2607,39 @@ importers: cac: specifier: ^6.7.14 version: 6.7.14 - cross-spawn: - specifier: ^7.0.3 - version: 7.0.3 - inquirer: - specifier: 9.2.12 - version: 9.2.12 - walkdir: - specifier: ^0.4.1 - version: 0.4.1 - devDependencies: - '@farmfe/cli': - specifier: workspace:* - version: 'link:' - '@farmfe/core': - specifier: workspace:* - version: link:../core - '@types/cross-spawn': - specifier: ^6.0.2 - version: 6.0.4 - '@types/inquirer': - specifier: ^9.0.3 - version: 9.0.6 packages/core: dependencies: + '@farmfe/plugin-replace-dirname': + specifier: workspace:* + version: link:../../rust-plugins/replace-dirname '@farmfe/runtime': - specifier: workspace:0.12.7 + specifier: workspace:1.0.0-nightly-20241023020505 version: link:../runtime '@farmfe/runtime-plugin-hmr': - specifier: workspace:3.5.7 + specifier: workspace:4.0.0-nightly-20241023020505 version: link:../runtime-plugin-hmr '@farmfe/runtime-plugin-import-meta': - specifier: workspace:0.2.2 + specifier: workspace:1.0.0-nightly-20241023020505 version: link:../runtime-plugin-import-meta '@farmfe/utils': specifier: workspace:* version: link:../utils - '@koa/cors': - specifier: ^5.0.0 - version: 5.0.0 '@swc/helpers': specifier: ^0.5.0 version: 0.5.3 chokidar: specifier: ^3.5.3 version: 3.5.3 + connect: + specifier: ^3.7.0 + version: 3.7.0 + cors: + specifier: ^2.8.5 + version: 2.8.5 + debug: + specifier: ^4.3.5 + version: 4.3.6 deepmerge: specifier: ^4.3.1 version: 4.3.1 @@ -2430,50 +2649,44 @@ importers: dotenv-expand: specifier: ^11.0.6 version: 11.0.6 + etag: + specifier: ^1.8.1 + version: 1.8.1 execa: - specifier: ^7.1.1 - version: 7.2.0 + specifier: 8.0.0 + version: 8.0.0 farm-browserslist-generator: - specifier: ^1.0.0 - version: 1.0.0 - farm-plugin-replace-dirname: - specifier: 0.2.1 - version: 0.2.1 + specifier: ^1.0.5 + version: 1.0.5 fast-glob: specifier: ^3.3.2 version: 3.3.2 fs-extra: specifier: ^11.1.1 version: 11.1.1 - http-proxy-middleware: - specifier: ^3.0.0 - version: 3.0.0 + http-proxy: + specifier: ^1.18.1 + version: 1.18.1(debug@4.3.6) is-plain-object: specifier: ^5.0.0 version: 5.0.0 - koa: - specifier: ^2.13.4 - version: 2.14.2 - koa-compress: - specifier: ^5.1.1 - version: 5.1.1 - koa-connect: - specifier: ^2.1.0 - version: 2.1.0 - koa-static: - specifier: ^5.0.0 - version: 5.0.0 - lodash.debounce: - specifier: ^4.0.8 - version: 4.0.8 - loglevel: - specifier: ^1.8.1 - version: 1.8.1 + mime: + specifier: ^4.0.4 + version: 4.0.4 + mime-types: + specifier: ^2.1.35 + version: 2.1.35 open: - specifier: ^9.1.0 - version: 9.1.0 + specifier: 10.1.0 + version: 10.1.0 + sirv: + specifier: ^2.0.4 + version: 2.0.4 + slashes: + specifier: ^3.0.12 + version: 3.0.12 ws: - specifier: ^8.12.0 + specifier: ^8.14.2 version: 8.14.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) zod: specifier: ^3.23.8 @@ -2485,24 +2698,39 @@ importers: '@napi-rs/cli': specifier: ^2.18.4 version: 2.18.4 + '@types/compression': + specifier: ^1.7.5 + version: 1.7.5 + '@types/connect': + specifier: ^3.4.38 + version: 3.4.38 + '@types/cors': + specifier: ^2.8.17 + version: 2.8.17 + '@types/debug': + specifier: ^4.1.12 + version: 4.1.12 + '@types/etag': + specifier: ^1.8.3 + version: 1.8.3 + '@types/figlet': + specifier: ^1.5.5 + version: 1.7.0 '@types/fs-extra': specifier: ^11.0.1 version: 11.0.3 - '@types/koa': - specifier: ^2.13.5 - version: 2.13.10 - '@types/koa-compress': - specifier: ^4.0.3 - version: 4.0.5 - '@types/koa-static': - specifier: ^4.0.2 - version: 4.0.3 - '@types/koa__cors': - specifier: ^5.0.0 - version: 5.0.0 + '@types/http-proxy': + specifier: ^1.17.14 + version: 1.17.14 + '@types/mime-types': + specifier: ^2.1.2 + version: 2.1.4 '@types/ws': - specifier: ^8.5.4 + specifier: ^8.5.8 version: 8.5.8 + react-refresh: + specifier: ^0.14.0 + version: 0.14.2 packages/create-farm: devDependencies: @@ -2512,12 +2740,6 @@ importers: packages/create-farm-plugin: devDependencies: - '@farmfe/cli': - specifier: workspace:* - version: link:../cli - '@farmfe/core': - specifier: workspace:* - version: link:../core '@farmfe/utils': specifier: workspace:* version: link:../utils @@ -2556,20 +2778,23 @@ importers: version: 3.33.2 devDependencies: '@types/node': - specifier: ^18.0.1 - version: 18.18.8 + specifier: 22.3.0 + version: 22.3.0 typescript: - specifier: ^4.7.4 - version: 4.9.5 + specifier: 5.5.4 + version: 5.5.4 packages/runtime-plugin-hmr: dependencies: core-js: specifier: ^3.30.1 version: 3.33.2 + highlight.js: + specifier: ^11.10.0 + version: 11.10.0 devDependencies: '@farmfe/runtime': - specifier: workspace:^0.12.2 + specifier: workspace:1.0.0-nightly-20241023020505 version: link:../runtime packages/runtime-plugin-import-meta: @@ -2579,7 +2804,7 @@ importers: version: 3.30.1 devDependencies: '@farmfe/runtime': - specifier: workspace:^0.12.0 + specifier: workspace:1.0.0-nightly-20241023020505 version: link:../runtime packages/utils: {} @@ -2590,6 +2815,12 @@ importers: specifier: workspace:* version: link:../../packages/plugin-tools + rust-plugins/replace-dirname: + devDependencies: + '@farmfe/plugin-tools': + specifier: workspace:* + version: link:../../packages/plugin-tools + rust-plugins/sass: optionalDependencies: sass-embedded-darwin-arm64: @@ -2626,6 +2857,74 @@ packages: '@adobe/css-tools@4.4.0': resolution: {integrity: sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==} + '@algolia/autocomplete-core@1.9.3': + resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} + + '@algolia/autocomplete-plugin-algolia-insights@1.9.3': + resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==} + peerDependencies: + search-insights: '>= 1 < 3' + + '@algolia/autocomplete-preset-algolia@1.9.3': + resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + + '@algolia/autocomplete-shared@1.9.3': + resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + + '@algolia/cache-browser-local-storage@4.24.0': + resolution: {integrity: sha512-t63W9BnoXVrGy9iYHBgObNXqYXM3tYXCjDSHeNwnsc324r4o5UiVKUiAB4THQ5z9U5hTj6qUvwg/Ez43ZD85ww==} + + '@algolia/cache-common@4.24.0': + resolution: {integrity: sha512-emi+v+DmVLpMGhp0V9q9h5CdkURsNmFC+cOS6uK9ndeJm9J4TiqSvPYVu+THUP8P/S08rxf5x2P+p3CfID0Y4g==} + + '@algolia/cache-in-memory@4.24.0': + resolution: {integrity: sha512-gDrt2so19jW26jY3/MkFg5mEypFIPbPoXsQGQWAi6TrCPsNOSEYepBMPlucqWigsmEy/prp5ug2jy/N3PVG/8w==} + + '@algolia/client-account@4.24.0': + resolution: {integrity: sha512-adcvyJ3KjPZFDybxlqnf+5KgxJtBjwTPTeyG2aOyoJvx0Y8dUQAEOEVOJ/GBxX0WWNbmaSrhDURMhc+QeevDsA==} + + '@algolia/client-analytics@4.24.0': + resolution: {integrity: sha512-y8jOZt1OjwWU4N2qr8G4AxXAzaa8DBvyHTWlHzX/7Me1LX8OayfgHexqrsL4vSBcoMmVw2XnVW9MhL+Y2ZDJXg==} + + '@algolia/client-common@4.24.0': + resolution: {integrity: sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==} + + '@algolia/client-personalization@4.24.0': + resolution: {integrity: sha512-l5FRFm/yngztweU0HdUzz1rC4yoWCFo3IF+dVIVTfEPg906eZg5BOd1k0K6rZx5JzyyoP4LdmOikfkfGsKVE9w==} + + '@algolia/client-search@4.24.0': + resolution: {integrity: sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==} + + '@algolia/events@4.0.1': + resolution: {integrity: sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==} + + '@algolia/logger-common@4.24.0': + resolution: {integrity: sha512-LLUNjkahj9KtKYrQhFKCzMx0BY3RnNP4FEtO+sBybCjJ73E8jNdaKJ/Dd8A/VA4imVHP5tADZ8pn5B8Ga/wTMA==} + + '@algolia/logger-console@4.24.0': + resolution: {integrity: sha512-X4C8IoHgHfiUROfoRCV+lzSy+LHMgkoEEU1BbKcsfnV0i0S20zyy0NLww9dwVHUWNfPPxdMU+/wKmLGYf96yTg==} + + '@algolia/recommend@4.24.0': + resolution: {integrity: sha512-P9kcgerfVBpfYHDfVZDvvdJv0lEoCvzNlOy2nykyt5bK8TyieYyiD0lguIJdRZZYGre03WIAFf14pgE+V+IBlw==} + + '@algolia/requester-browser-xhr@4.24.0': + resolution: {integrity: sha512-Z2NxZMb6+nVXSjF13YpjYTdvV3032YTBSGm2vnYvYPA6mMxzM3v5rsCiSspndn9rzIW4Qp1lPHBvuoKJV6jnAA==} + + '@algolia/requester-common@4.24.0': + resolution: {integrity: sha512-k3CXJ2OVnvgE3HMwcojpvY6d9kgKMPRxs/kVohrwF5WMr2fnqojnycZkxPoEg+bXm8fi5BBfFmOqgYztRtHsQA==} + + '@algolia/requester-node-http@4.24.0': + resolution: {integrity: sha512-JF18yTjNOVYvU/L3UosRcvbPMGT9B+/GQWNWnenIImglzNVGpyzChkXLnrSf6uxwVNO6ESGu6oN8MqcGQcjQJw==} + + '@algolia/transporter@4.24.0': + resolution: {integrity: sha512-86nI7w6NzWxd1Zp9q3413dRshDqAzSbsQjhcDhPIatEFiZrL1/TjnHL8S7jVKFePlIMzDsZWXAXwXzcok9c5oA==} + '@alloc/quick-lru@5.2.0': resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} @@ -2674,6 +2973,14 @@ packages: react: '>=16.0.0' react-dom: '>=16.0.0' + '@ant-design/happy-work-theme@1.0.0': + resolution: {integrity: sha512-BKuz5PZkGZwXqzDwTE9fiHYlpKdDyoGnApEih2MG1GF79/a/YekxBc4tdqocykDtWzt3z1wwmHv8AiB7EUTWsQ==} + engines: {node: '>=8.x'} + peerDependencies: + antd: '>= 5.8.2' + react: '>=16.9.0' + react-dom: '>=16.9.0' + '@ant-design/icons-svg@4.3.1': resolution: {integrity: sha512-4QBZg8ccyC6LPIRii7A0bZUk3+lEDCLnhB+FVsflGdcWPPmV+j3fire4AwwoqHV/BibgvBmR9ZIo4s867smv+g==} @@ -2842,6 +3149,10 @@ packages: resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} + '@babel/code-frame@7.25.7': + resolution: {integrity: sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==} + engines: {node: '>=6.9.0'} + '@babel/compat-data@7.24.1': resolution: {integrity: sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==} engines: {node: '>=6.9.0'} @@ -2850,6 +3161,10 @@ packages: resolution: {integrity: sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==} engines: {node: '>=6.9.0'} + '@babel/compat-data@7.25.7': + resolution: {integrity: sha512-9ickoLz+hcXCeh7jrcin+/SLWm+GkxE2kTvoYyp38p4WkdFXfQJxDFGWp/YHjiKLPx06z2A7W8XKuqbReXDzsw==} + engines: {node: '>=6.9.0'} + '@babel/core@7.23.2': resolution: {integrity: sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==} engines: {node: '>=6.9.0'} @@ -2874,6 +3189,10 @@ packages: resolution: {integrity: sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==} engines: {node: '>=6.9.0'} + '@babel/generator@7.25.7': + resolution: {integrity: sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==} + engines: {node: '>=6.9.0'} + '@babel/helper-annotate-as-pure@7.22.5': resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} @@ -2882,6 +3201,14 @@ packages: resolution: {integrity: sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==} engines: {node: '>=6.9.0'} + '@babel/helper-annotate-as-pure@7.25.7': + resolution: {integrity: sha512-4xwU8StnqnlIhhioZf1tqnVWeQ9pvH/ujS8hRfw/WOza+/a+1qv69BWNy+oY231maTCWgKWhfBU7kDpsds6zAA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-builder-binary-assignment-operator-visitor@7.25.7': + resolution: {integrity: sha512-12xfNeKNH7jubQNm7PAkzlLwEmCs1tfuX3UjIw6vP6QXi+leKh6+LyC/+Ed4EIQermwd58wsyh070yjDHFlNGg==} + engines: {node: '>=6.9.0'} + '@babel/helper-compilation-targets@7.22.15': resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} engines: {node: '>=6.9.0'} @@ -2894,6 +3221,10 @@ packages: resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==} engines: {node: '>=6.9.0'} + '@babel/helper-compilation-targets@7.25.7': + resolution: {integrity: sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==} + engines: {node: '>=6.9.0'} + '@babel/helper-create-class-features-plugin@7.24.1': resolution: {integrity: sha512-1yJa9dX9g//V6fDebXoEfEsxkZHk3Hcbm+zLhyu6qVgYFLvmTALTeV+jNU9e5RnYtioBrGEOdoI2joMSNQ/+aA==} engines: {node: '>=6.9.0'} @@ -2906,11 +3237,28 @@ packages: peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-create-class-features-plugin@7.25.7': + resolution: {integrity: sha512-bD4WQhbkx80mAyj/WCm4ZHcF4rDxkoLFO6ph8/5/mQ3z4vAzltQXAmbc7GvVJx5H+lk5Mi5EmbTeox5nMGCsbw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-create-regexp-features-plugin@7.25.7': + resolution: {integrity: sha512-byHhumTj/X47wJ6C6eLpK7wW/WBEcnUeb7D0FNc/jFQnQVw7DOso3Zz5u9x/zLrFVkHa89ZGDbkAa1D54NdrCQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/helper-define-polyfill-provider@0.4.3': resolution: {integrity: sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 + '@babel/helper-define-polyfill-provider@0.6.2': + resolution: {integrity: sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==} + peerDependencies: + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 + '@babel/helper-environment-visitor@7.22.20': resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} engines: {node: '>=6.9.0'} @@ -2931,6 +3279,10 @@ packages: resolution: {integrity: sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==} engines: {node: '>=6.9.0'} + '@babel/helper-member-expression-to-functions@7.25.7': + resolution: {integrity: sha512-O31Ssjd5K6lPbTX9AAYpSKrZmLeagt9uwschJd+Ixo6QiRyfpvgtVQp8qrDR9UNFjZ8+DO34ZkdrN+BnPXemeA==} + engines: {node: '>=6.9.0'} + '@babel/helper-module-imports@7.18.6': resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} @@ -2939,8 +3291,8 @@ packages: resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.24.7': - resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} + '@babel/helper-module-imports@7.25.7': + resolution: {integrity: sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==} engines: {node: '>=6.9.0'} '@babel/helper-module-transforms@7.23.0': @@ -2961,6 +3313,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-module-transforms@7.25.7': + resolution: {integrity: sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/helper-optimise-call-expression@7.22.5': resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} @@ -2969,6 +3327,10 @@ packages: resolution: {integrity: sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==} engines: {node: '>=6.9.0'} + '@babel/helper-optimise-call-expression@7.25.7': + resolution: {integrity: sha512-VAwcwuYhv/AT+Vfr28c9y6SHzTan1ryqrydSTFGjU0uDJHw3uZ+PduI8plCLkRsDnqK2DMEDmwrOQRsK/Ykjng==} + engines: {node: '>=6.9.0'} + '@babel/helper-plugin-utils@7.22.5': resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} engines: {node: '>=6.9.0'} @@ -2981,6 +3343,16 @@ packages: resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} engines: {node: '>=6.9.0'} + '@babel/helper-plugin-utils@7.25.7': + resolution: {integrity: sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-remap-async-to-generator@7.25.7': + resolution: {integrity: sha512-kRGE89hLnPfcz6fTrlNU+uhgcwv0mBE4Gv3P9Ke9kLVJYpi4AMVVEElXvB5CabrPZW4nCM8P8UyyjrzCM0O2sw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/helper-replace-supers@7.24.1': resolution: {integrity: sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==} engines: {node: '>=6.9.0'} @@ -2993,6 +3365,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-replace-supers@7.25.7': + resolution: {integrity: sha512-iy8JhqlUW9PtZkd4pHM96v6BdJ66Ba9yWSE4z0W4TvSZwLBPkyDsiIU3ENe4SmrzRBs76F7rQXTy1lYC49n6Lw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/helper-simple-access@7.22.5': resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} @@ -3001,6 +3379,10 @@ packages: resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} engines: {node: '>=6.9.0'} + '@babel/helper-simple-access@7.25.7': + resolution: {integrity: sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-skip-transparent-expression-wrappers@7.22.5': resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} @@ -3009,6 +3391,10 @@ packages: resolution: {integrity: sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==} engines: {node: '>=6.9.0'} + '@babel/helper-skip-transparent-expression-wrappers@7.25.7': + resolution: {integrity: sha512-pPbNbchZBkPMD50K0p3JGcFMNLVUCuU/ABybm/PGNj4JiHrpmNyqqCphBk4i19xXtNV0JhldQJJtbSW5aUvbyA==} + engines: {node: '>=6.9.0'} + '@babel/helper-split-export-declaration@7.22.6': resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} @@ -3017,14 +3403,14 @@ packages: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.23.4': - resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.24.8': resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.25.7': + resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.22.20': resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} @@ -3033,6 +3419,10 @@ packages: resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.25.7': + resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.22.15': resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} @@ -3045,6 +3435,14 @@ packages: resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.25.7': + resolution: {integrity: sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-wrap-function@7.25.7': + resolution: {integrity: sha512-MA0roW3JF2bD1ptAaJnvcabsVlNQShUaThyJbCDD4bCp8NEgiFvpoqRI2YS22hHlc2thjO/fTg2ShLMC3jygAg==} + engines: {node: '>=6.9.0'} + '@babel/helpers@7.23.2': resolution: {integrity: sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==} engines: {node: '>=6.9.0'} @@ -3065,6 +3463,10 @@ packages: resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} + '@babel/highlight@7.25.7': + resolution: {integrity: sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==} + engines: {node: '>=6.9.0'} + '@babel/parser@7.23.0': resolution: {integrity: sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==} engines: {node: '>=6.0.0'} @@ -3085,6 +3487,41 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.25.7': + resolution: {integrity: sha512-aZn7ETtQsjjGG5HruveUK06cU3Hljuhd9Iojm4M8WWv3wLE6OkE5PWbDUkItmMgegmccaITudyuW5RPYrYlgWw==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.7': + resolution: {integrity: sha512-UV9Lg53zyebzD1DwQoT9mzkEKa922LNUp5YkTJ6Uta0RbyXaQNUgcvSt7qIu1PpPzVb6rd10OVNTzkyBGeVmxQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.7': + resolution: {integrity: sha512-GDDWeVLNxRIkQTnJn2pDOM1pkCgYdSqPeT1a9vh9yIqu2uzzgw1zcqEb+IJOhy+dTBMlNdThrDIksr2o09qrrQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.7': + resolution: {integrity: sha512-wxyWg2RYaSUYgmd9MR0FyRGyeOMQE/Uzr1wzd/g5cf5bwi9A4v6HFdDm7y1MgDtod/fLOSTZY6jDgV0xU9d5bA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.7': + resolution: {integrity: sha512-Xwg6tZpLxc4iQjorYsyGMyfJE7nP5MV8t/Ka58BgiA7Jw0fRqQNcANlLfdJ/yvBt9z9LD2We+BEkT7vLqZRWng==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.13.0 + + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.7': + resolution: {integrity: sha512-UVATLMidXrnH+GMUIuxq55nejlj02HP7F5ETyBONzP6G87fPBogG4CH6kxrSrdIuAjdwNO9VzyaYsrZPscWUrw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/plugin-proposal-class-properties@7.18.6': resolution: {integrity: sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==} engines: {node: '>=6.9.0'} @@ -3119,6 +3556,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2': + resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-async-generators@7.8.4': resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: @@ -3134,12 +3577,40 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-class-static-block@7.14.5': + resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-decorators@7.24.1': resolution: {integrity: sha512-05RJdO/cCrtVWuAaSn1tS3bH8jbsJa/Y1uD186u6J4C/1mnHFxseeuWpsqr9anvo7TUulev7tm7GDwRV+VuhDw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-dynamic-import@7.8.3': + resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-export-namespace-from@7.8.3': + resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-assertions@7.25.7': + resolution: {integrity: sha512-ZvZQRmME0zfJnDQnVBKYzHxXT7lYBB3Revz1GuS7oLXWMgqUPX4G+DDbT30ICClht9WKV34QVrZhSw6WdklwZQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-attributes@7.25.7': + resolution: {integrity: sha512-AqVo+dguCgmpi/3mYBdu9lkngOBlQ2w2vnNpa6gfiCxQZLzV4ZbhsXitJ2Yblkoe1VQwtHSaNmIaGll/26YWRw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-import-meta@7.10.4': resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: @@ -3168,6 +3639,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-jsx@7.25.7': + resolution: {integrity: sha512-ruZOnKO+ajVL/MVx+PwNBPOkrnXTXoWMtte1MBpegfCArhqOe3Bj52avVj1huLLxNKYKXYaSxZ2F+woK1ekXfw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-logical-assignment-operators@7.10.4': resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: @@ -3198,6 +3675,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-private-property-in-object@7.14.5': + resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-top-level-await@7.14.5': resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} engines: {node: '>=6.9.0'} @@ -3222,30 +3705,174 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-unicode-sets-regex@7.18.6': + resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/plugin-transform-arrow-functions@7.24.1': resolution: {integrity: sha512-ngT/3NkRhsaep9ck9uj2Xhv9+xB1zShY3tM3g6om4xxCELwCDN4g4Aq5dRn48+0hasAql7s2hdBOysCfNpr4fw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-arrow-functions@7.25.7': + resolution: {integrity: sha512-EJN2mKxDwfOUCPxMO6MUI58RN3ganiRAG/MS/S3HfB6QFNjroAMelQo/gybyYq97WerCBAZoyrAoW8Tzdq2jWg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-async-generator-functions@7.25.7': + resolution: {integrity: sha512-4B6OhTrwYKHYYgcwErvZjbmH9X5TxQBsaBHdzEIB4l71gR5jh/tuHGlb9in47udL2+wVUcOz5XXhhfhVJwEpEg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-async-to-generator@7.25.7': + resolution: {integrity: sha512-ZUCjAavsh5CESCmi/xCpX1qcCaAglzs/7tmuvoFnJgA1dM7gQplsguljoTg+Ru8WENpX89cQyAtWoaE0I3X3Pg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-block-scoped-functions@7.25.7': + resolution: {integrity: sha512-xHttvIM9fvqW+0a3tZlYcZYSBpSWzGBFIt/sYG3tcdSzBB8ZeVgz2gBP7Df+sM0N1850jrviYSSeUuc+135dmQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-block-scoping@7.24.4': resolution: {integrity: sha512-nIFUZIpGKDf9O9ttyRXpHFpKC+X3Y5mtshZONuEUYBomAKoM4y029Jr+uB1bHGPhNmK8YXHevDtKDOLmtRrp6g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-block-scoping@7.25.7': + resolution: {integrity: sha512-ZEPJSkVZaeTFG/m2PARwLZQ+OG0vFIhPlKHK/JdIMy8DbRJ/htz6LRrTFtdzxi9EHmcwbNPAKDnadpNSIW+Aow==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-class-properties@7.25.7': + resolution: {integrity: sha512-mhyfEW4gufjIqYFo9krXHJ3ElbFLIze5IDp+wQTxoPd+mwFb1NxatNAwmv8Q8Iuxv7Zc+q8EkiMQwc9IhyGf4g==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-class-static-block@7.25.7': + resolution: {integrity: sha512-rvUUtoVlkDWtDWxGAiiQj0aNktTPn3eFynBcMC2IhsXweehwgdI9ODe+XjWw515kEmv22sSOTp/rxIRuTiB7zg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.12.0 + + '@babel/plugin-transform-classes@7.25.7': + resolution: {integrity: sha512-9j9rnl+YCQY0IGoeipXvnk3niWicIB6kCsWRGLwX241qSXpbA4MKxtp/EdvFxsc4zI5vqfLxzOd0twIJ7I99zg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-computed-properties@7.24.1': resolution: {integrity: sha512-5pJGVIUfJpOS+pAqBQd+QMaTD2vCL/HcePooON6pDpHgRp4gNRmzyHTPIkXntwKsq3ayUFVfJaIKPw2pOkOcTw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-computed-properties@7.25.7': + resolution: {integrity: sha512-QIv+imtM+EtNxg/XBKL3hiWjgdLjMOmZ+XzQwSgmBfKbfxUjBzGgVPklUuE55eq5/uVoh8gg3dqlrwR/jw3ZeA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-destructuring@7.24.1': resolution: {integrity: sha512-ow8jciWqNxR3RYbSNVuF4U2Jx130nwnBnhRw6N6h1bOejNkABmcI5X5oz29K4alWX7vf1C+o6gtKXikzRKkVdw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-destructuring@7.25.7': + resolution: {integrity: sha512-xKcfLTlJYUczdaM1+epcdh1UGewJqr9zATgrNHcLBcV2QmfvPPEixo/sK/syql9cEmbr7ulu5HMFG5vbbt/sEA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-dotall-regex@7.25.7': + resolution: {integrity: sha512-kXzXMMRzAtJdDEgQBLF4oaiT6ZCU3oWHgpARnTKDAqPkDJ+bs3NrZb310YYevR5QlRo3Kn7dzzIdHbZm1VzJdQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-duplicate-keys@7.25.7': + resolution: {integrity: sha512-by+v2CjoL3aMnWDOyCIg+yxU9KXSRa9tN6MbqggH5xvymmr9p4AMjYkNlQy4brMceBnUyHZ9G8RnpvT8wP7Cfg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.7': + resolution: {integrity: sha512-HvS6JF66xSS5rNKXLqkk7L9c/jZ/cdIVIcoPVrnl8IsVpLggTjXs8OWekbLHs/VtYDDh5WXnQyeE3PPUGm22MA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/plugin-transform-dynamic-import@7.25.7': + resolution: {integrity: sha512-UvcLuual4h7/GfylKm2IAA3aph9rwvAM2XBA0uPKU3lca+Maai4jBjjEVUS568ld6kJcgbouuumCBhMd/Yz17w==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-exponentiation-operator@7.25.7': + resolution: {integrity: sha512-yjqtpstPfZ0h/y40fAXRv2snciYr0OAoMXY/0ClC7tm4C/nG5NJKmIItlaYlLbIVAWNfrYuy9dq1bE0SbX0PEg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-export-namespace-from@7.25.7': + resolution: {integrity: sha512-h3MDAP5l34NQkkNulsTNyjdaR+OiB0Im67VU//sFupouP8Q6m9Spy7l66DcaAQxtmCqGdanPByLsnwFttxKISQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-for-of@7.25.7': + resolution: {integrity: sha512-n/TaiBGJxYFWvpJDfsxSj9lEEE44BFM1EPGz4KEiTipTgkoFVVcCmzAL3qA7fdQU96dpo4gGf5HBx/KnDvqiHw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-function-name@7.25.7': + resolution: {integrity: sha512-5MCTNcjCMxQ63Tdu9rxyN6cAWurqfrDZ76qvVPrGYdBxIj+EawuuxTu/+dgJlhK5eRz3v1gLwp6XwS8XaX2NiQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-json-strings@7.25.7': + resolution: {integrity: sha512-Ot43PrL9TEAiCe8C/2erAjXMeVSnE/BLEx6eyrKLNFCCw5jvhTHKyHxdI1pA0kz5njZRYAnMO2KObGqOCRDYSA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-literals@7.25.7': + resolution: {integrity: sha512-fwzkLrSu2fESR/cm4t6vqd7ebNIopz2QHGtjoU+dswQo/P6lwAG04Q98lliE3jkz/XqnbGFLnUcE0q0CVUf92w==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-logical-assignment-operators@7.25.7': + resolution: {integrity: sha512-iImzbA55BjiovLyG2bggWS+V+OLkaBorNvc/yJoeeDQGztknRnDdYfp2d/UPmunZYEnZi6Lg8QcTmNMHOB0lGA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-member-expression-literals@7.25.7': + resolution: {integrity: sha512-Std3kXwpXfRV0QtQy5JJcRpkqP8/wG4XL7hSKZmGlxPlDqmpXtEPRmhF7ztnlTCtUN3eXRUJp+sBEZjaIBVYaw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-modules-amd@7.25.7': + resolution: {integrity: sha512-CgselSGCGzjQvKzghCvDTxKHP3iooenLpJDO842ehn5D2G5fJB222ptnDwQho0WjEvg7zyoxb9P+wiYxiJX5yA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-modules-commonjs@7.23.0': resolution: {integrity: sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ==} engines: {node: '>=6.9.0'} @@ -3258,24 +3885,186 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-modules-commonjs@7.25.7': + resolution: {integrity: sha512-L9Gcahi0kKFYXvweO6n0wc3ZG1ChpSFdgG+eV1WYZ3/dGbJK7vvk91FgGgak8YwRgrCuihF8tE/Xg07EkL5COg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-modules-systemjs@7.25.7': + resolution: {integrity: sha512-t9jZIvBmOXJsiuyOwhrIGs8dVcD6jDyg2icw1VL4A/g+FnWyJKwUfSSU2nwJuMV2Zqui856El9u+ElB+j9fV1g==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-modules-umd@7.25.7': + resolution: {integrity: sha512-p88Jg6QqsaPh+EB7I9GJrIqi1Zt4ZBHUQtjw3z1bzEXcLh6GfPqzZJ6G+G1HBGKUNukT58MnKG7EN7zXQBCODw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-named-capturing-groups-regex@7.25.7': + resolution: {integrity: sha512-BtAT9LzCISKG3Dsdw5uso4oV1+v2NlVXIIomKJgQybotJY3OwCwJmkongjHgwGKoZXd0qG5UZ12JUlDQ07W6Ow==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/plugin-transform-new-target@7.25.7': + resolution: {integrity: sha512-CfCS2jDsbcZaVYxRFo2qtavW8SpdzmBXC2LOI4oO0rP+JSRDxxF3inF4GcPsLgfb5FjkhXG5/yR/lxuRs2pySA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-nullish-coalescing-operator@7.25.7': + resolution: {integrity: sha512-FbuJ63/4LEL32mIxrxwYaqjJxpbzxPVQj5a+Ebrc8JICV6YX8nE53jY+K0RZT3um56GoNWgkS2BQ/uLGTjtwfw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-numeric-separator@7.25.7': + resolution: {integrity: sha512-8CbutzSSh4hmD+jJHIA8vdTNk15kAzOnFLVVgBSMGr28rt85ouT01/rezMecks9pkU939wDInImwCKv4ahU4IA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-object-rest-spread@7.25.7': + resolution: {integrity: sha512-1JdVKPhD7Y5PvgfFy0Mv2brdrolzpzSoUq2pr6xsR+m+3viGGeHEokFKsCgOkbeFOQxfB1Vt2F0cPJLRpFI4Zg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-object-super@7.25.7': + resolution: {integrity: sha512-pWT6UXCEW3u1t2tcAGtE15ornCBvopHj9Bps9D2DsH15APgNVOTwwczGckX+WkAvBmuoYKRCFa4DK+jM8vh5AA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-optional-catch-binding@7.25.7': + resolution: {integrity: sha512-m9obYBA39mDPN7lJzD5WkGGb0GO54PPLXsbcnj1Hyeu8mSRz7Gb4b1A6zxNX32ZuUySDK4G6it8SDFWD1nCnqg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-optional-chaining@7.25.7': + resolution: {integrity: sha512-h39agClImgPWg4H8mYVAbD1qP9vClFbEjqoJmt87Zen8pjqK8FTPUwrOXAvqu5soytwxrLMd2fx2KSCp2CHcNg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-parameters@7.24.1': resolution: {integrity: sha512-8Jl6V24g+Uw5OGPeWNKrKqXPDw2YDjLc53ojwfMcKwlEoETKU9rU0mHUtcg9JntWI/QYzGAXNWEcVHZ+fR+XXg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-parameters@7.25.7': + resolution: {integrity: sha512-FYiTvku63me9+1Nz7TOx4YMtW3tWXzfANZtrzHhUZrz4d47EEtMQhzFoZWESfXuAMMT5mwzD4+y1N8ONAX6lMQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-private-methods@7.25.7': + resolution: {integrity: sha512-KY0hh2FluNxMLwOCHbxVOKfdB5sjWG4M183885FmaqWWiGMhRZq4DQRKH6mHdEucbJnyDyYiZNwNG424RymJjA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-private-property-in-object@7.25.7': + resolution: {integrity: sha512-LzA5ESzBy7tqj00Yjey9yWfs3FKy4EmJyKOSWld144OxkTji81WWnUT8nkLUn+imN/zHL8ZQlOu/MTUAhHaX3g==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-property-literals@7.25.7': + resolution: {integrity: sha512-lQEeetGKfFi0wHbt8ClQrUSUMfEeI3MMm74Z73T9/kuz990yYVtfofjf3NuA42Jy3auFOpbjDyCSiIkTs1VIYw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-constant-elements@7.25.7': + resolution: {integrity: sha512-/qXt69Em8HgsjCLu7G3zdIQn7A2QwmYND7Wa0LTp09Na+Zn8L5d0A7wSXrKi18TJRc/Q5S1i1De/SU1LzVkSvA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-display-name@7.25.7': + resolution: {integrity: sha512-r0QY7NVU8OnrwE+w2IWiRom0wwsTbjx4+xH2RTd7AVdof3uurXOF+/mXHQDRk+2jIvWgSaCHKMgggfvM4dyUGA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-development@7.25.7': + resolution: {integrity: sha512-5yd3lH1PWxzW6IZj+p+Y4OLQzz0/LzlOG8vGqonHfVR3euf1vyzyMUJk9Ac+m97BH46mFc/98t9PmYLyvgL3qg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx@7.25.7': + resolution: {integrity: sha512-vILAg5nwGlR9EXE8JIOX4NHXd49lrYbN8hnjffDtoULwpL9hUx/N55nqh2qd0q6FyNDfjl9V79ecKGvFbcSA0Q==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-pure-annotations@7.25.7': + resolution: {integrity: sha512-6YTHJ7yjjgYqGc8S+CbEXhLICODk0Tn92j+vNJo07HFk9t3bjFgAKxPLFhHwF2NjmQVSI1zBRfBWUeVBa2osfA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-regenerator@7.25.7': + resolution: {integrity: sha512-mgDoQCRjrY3XK95UuV60tZlFCQGXEtMg8H+IsW72ldw1ih1jZhzYXbJvghmAEpg5UVhhnCeia1CkGttUvCkiMQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-reserved-words@7.25.7': + resolution: {integrity: sha512-3OfyfRRqiGeOvIWSagcwUTVk2hXBsr/ww7bLn6TRTuXnexA+Udov2icFOxFX9abaj4l96ooYkcNN1qi2Zvqwng==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-runtime@7.23.2': resolution: {integrity: sha512-XOntj6icgzMS58jPVtQpiuF6ZFWxQiJavISGx5KGjRj+3gqZr8+N6Kx+N9BApWzgS+DOjIZfXXj0ZesenOWDyA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-shorthand-properties@7.25.7': + resolution: {integrity: sha512-uBbxNwimHi5Bv3hUccmOFlUy3ATO6WagTApenHz9KzoIdn0XeACdB12ZJ4cjhuB2WSi80Ez2FWzJnarccriJeA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-spread@7.24.1': resolution: {integrity: sha512-KjmcIM+fxgY+KxPVbjelJC6hrH1CgtPmTvdXAfn3/a9CnWGSTY7nH4zm5+cjmWJybdcPSsD0++QssDsjcpe47g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-spread@7.25.7': + resolution: {integrity: sha512-Mm6aeymI0PBh44xNIv/qvo8nmbkpZze1KvR8MkEqbIREDxoiWTi18Zr2jryfRMwDfVZF9foKh060fWgni44luw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-sticky-regex@7.25.7': + resolution: {integrity: sha512-ZFAeNkpGuLnAQ/NCsXJ6xik7Id+tHuS+NT+ue/2+rn/31zcdnupCdmunOizEaP0JsUmTFSTOPoQY7PkK2pttXw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-template-literals@7.25.7': + resolution: {integrity: sha512-SI274k0nUsFFmyQupiO7+wKATAmMFf8iFgq2O+vVFXZ0SV9lNfT1NGzBEhjquFmD8I9sqHLguH+gZVN3vww2AA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-typeof-symbol@7.25.7': + resolution: {integrity: sha512-OmWmQtTHnO8RSUbL0NTdtpbZHeNTnm68Gj5pA4Y2blFNh+V4iZR68V1qL9cI37J21ZN7AaCnkfdHtLExQPf2uA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-typescript@7.22.15': resolution: {integrity: sha512-1uirS0TnijxvQLnlv5wQBwOX3E1wCFX7ITv+9pBV2wKEk4K+M5tqDaoNXnTH8tjEIYHLO98MwiTWO04Ggz4XuA==} engines: {node: '>=6.9.0'} @@ -3294,6 +4083,47 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-unicode-escapes@7.25.7': + resolution: {integrity: sha512-BN87D7KpbdiABA+t3HbVqHzKWUDN3dymLaTnPFAMyc8lV+KN3+YzNhVRNdinaCPA4AUqx7ubXbQ9shRjYBl3SQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-unicode-property-regex@7.25.7': + resolution: {integrity: sha512-IWfR89zcEPQGB/iB408uGtSPlQd3Jpq11Im86vUgcmSTcoWAiQMCTOa2K2yNNqFJEBVICKhayctee65Ka8OB0w==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-unicode-regex@7.25.7': + resolution: {integrity: sha512-8JKfg/hiuA3qXnlLx8qtv5HWRbgyFx2hMMtpDDuU2rTckpKkGu4ycK5yYHwuEa16/quXfoxHBIApEsNyMWnt0g==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-unicode-sets-regex@7.25.7': + resolution: {integrity: sha512-YRW8o9vzImwmh4Q3Rffd09bH5/hvY0pxg+1H1i0f7APoUeg12G7+HhLj9ZFNIrYkgBXhIijPJ+IXypN0hLTIbw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/preset-env@7.25.7': + resolution: {integrity: sha512-Gibz4OUdyNqqLj+7OAvBZxOD7CklCtMA5/j0JgUEwOnaRULsPDXmic2iKxL2DX2vQduPR5wH2hjZas/Vr/Oc0g==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/preset-modules@0.1.6-no-external-plugins': + resolution: {integrity: sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==} + peerDependencies: + '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 + + '@babel/preset-react@7.25.7': + resolution: {integrity: sha512-GjV0/mUEEXpi1U5ZgDprMRRgajGMRW3G5FjMr5KLKD8nT2fTG8+h/klV3+6Dm5739QE+K5+2e91qFKAYI3pmRg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/preset-typescript@7.23.2': resolution: {integrity: sha512-u4UJc1XsS1GhIGteM8rnGiIvf9rJpiVgMEeCnwlLA7WJPC+jcXWJAGxYmeqs5hOZD8BbAfnV5ezBOxQbb4OUxA==} engines: {node: '>=6.9.0'} @@ -3306,6 +4136,10 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/runtime-corejs3@7.25.7': + resolution: {integrity: sha512-gMmIEhg35sXk9Te5qbGp3W9YKrvLt3HV658/d3odWrHSqT0JeG5OzsJWFHRLiOohRyjRsJc/x03DhJm3i8VJxg==} + engines: {node: '>=6.9.0'} + '@babel/runtime@7.23.2': resolution: {integrity: sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==} engines: {node: '>=6.9.0'} @@ -3326,6 +4160,10 @@ packages: resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} engines: {node: '>=6.9.0'} + '@babel/template@7.25.7': + resolution: {integrity: sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==} + engines: {node: '>=6.9.0'} + '@babel/traverse@7.23.2': resolution: {integrity: sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==} engines: {node: '>=6.9.0'} @@ -3338,6 +4176,10 @@ packages: resolution: {integrity: sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==} engines: {node: '>=6.9.0'} + '@babel/traverse@7.25.7': + resolution: {integrity: sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==} + engines: {node: '>=6.9.0'} + '@babel/types@7.23.0': resolution: {integrity: sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==} engines: {node: '>=6.9.0'} @@ -3354,6 +4196,10 @@ packages: resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==} engines: {node: '>=6.9.0'} + '@babel/types@7.25.7': + resolution: {integrity: sha512-vwIVdXG+j+FOpkwqHRcBgHLYNL7XMkufrlaFvL9o6Ai9sJn9+PdyIL5qa0XzTZw084c+u9LOls53eoZWP/W5WQ==} + engines: {node: '>=6.9.0'} + '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} @@ -3422,107 +4268,95 @@ packages: '@bufbuild/protobuf@1.4.1': resolution: {integrity: sha512-4dthhwBGD9nlpY35ic8dMQC5R0dsND2b2xyeVO3qf+hBk8m7Y9dUs+SmMh6rqO2pGLUTKHefGXLDW+z19hBPdQ==} - '@changesets/apply-release-plan@6.1.4': - resolution: {integrity: sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==} - '@changesets/apply-release-plan@7.0.1': resolution: {integrity: sha512-aPdSq/R++HOyfEeBGjEe6LNG8gs0KMSyRETD/J2092OkNq8mOioAxyKjMbvVUdzgr/HTawzMOz7lfw339KnsCA==} - '@changesets/assemble-release-plan@5.2.4': - resolution: {integrity: sha512-xJkWX+1/CUaOUWTguXEbCDTyWJFECEhmdtbkjhn5GVBGxdP/JwaHBIU9sW3FR6gD07UwZ7ovpiPclQZs+j+mvg==} + '@changesets/apply-release-plan@7.0.5': + resolution: {integrity: sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==} '@changesets/assemble-release-plan@6.0.0': resolution: {integrity: sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw==} - '@changesets/changelog-git@0.1.14': - resolution: {integrity: sha512-+vRfnKtXVWsDDxGctOfzJsPhaCdXRYoe+KyWYoq5X/GqoISREiat0l3L8B0a453B2B4dfHGcZaGyowHbp9BSaA==} + '@changesets/assemble-release-plan@6.0.4': + resolution: {integrity: sha512-nqICnvmrwWj4w2x0fOhVj2QEGdlUuwVAwESrUo5HLzWMI1rE5SWfsr9ln+rDqWB6RQ2ZyaMZHUcU7/IRaUJS+Q==} '@changesets/changelog-git@0.2.0': resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} - '@changesets/cli@2.26.2': - resolution: {integrity: sha512-dnWrJTmRR8bCHikJHl9b9HW3gXACCehz4OasrXpMp7sx97ECuBGGNjJhjPhdZNCvMy9mn4BWdplI323IbqsRig==} - hasBin: true - '@changesets/cli@2.27.2': resolution: {integrity: sha512-6/kADjKMOrlLwNr/Y5HAq7T9oGOA2Lq5A59AGtwQCCiXuSGp4EgszzdJFeBiF8pdz7Wn1HaLzSUBhAaNToEJqg==} hasBin: true - '@changesets/config@2.3.1': - resolution: {integrity: sha512-PQXaJl82CfIXddUOppj4zWu+987GCw2M+eQcOepxN5s+kvnsZOwjEJO3DH9eVy+OP6Pg/KFEWdsECFEYTtbg6w==} + '@changesets/cli@2.27.9': + resolution: {integrity: sha512-q42a/ZbDnxPpCb5Wkm6tMVIxgeI9C/bexntzTeCFBrQEdpisQqk8kCHllYZMDjYtEc1ZzumbMJAG8H0Z4rdvjg==} + hasBin: true '@changesets/config@3.0.0': resolution: {integrity: sha512-o/rwLNnAo/+j9Yvw9mkBQOZySDYyOr/q+wptRLcAVGlU6djOeP9v1nlalbL9MFsobuBVQbZCTp+dIzdq+CLQUA==} - '@changesets/errors@0.1.4': - resolution: {integrity: sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q==} + '@changesets/config@3.0.3': + resolution: {integrity: sha512-vqgQZMyIcuIpw9nqFIpTSNyc/wgm/Lu1zKN5vECy74u95Qx/Wa9g27HdgO4NkVAaq+BGA8wUc/qvbvVNs93n6A==} '@changesets/errors@0.2.0': resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} - '@changesets/get-dependents-graph@1.3.6': - resolution: {integrity: sha512-Q/sLgBANmkvUm09GgRsAvEtY3p1/5OCzgBE5vX3vgb5CvW0j7CEljocx5oPXeQSNph6FXulJlXV3Re/v3K3P3Q==} - '@changesets/get-dependents-graph@2.0.0': resolution: {integrity: sha512-cafUXponivK4vBgZ3yLu944mTvam06XEn2IZGjjKc0antpenkYANXiiE6GExV/yKdsCnE8dXVZ25yGqLYZmScA==} - '@changesets/get-release-plan@3.0.17': - resolution: {integrity: sha512-6IwKTubNEgoOZwDontYc2x2cWXfr6IKxP3IhKeK+WjyD6y3M4Gl/jdQvBw+m/5zWILSOCAaGLu2ZF6Q+WiPniw==} + '@changesets/get-dependents-graph@2.1.2': + resolution: {integrity: sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==} '@changesets/get-release-plan@4.0.0': resolution: {integrity: sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w==} - '@changesets/get-version-range-type@0.3.2': - resolution: {integrity: sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg==} + '@changesets/get-release-plan@4.0.4': + resolution: {integrity: sha512-SicG/S67JmPTrdcc9Vpu0wSQt7IiuN0dc8iR5VScnnTVPfIaLvKmEGRvIaF0kcn8u5ZqLbormZNTO77bCEvyWw==} '@changesets/get-version-range-type@0.4.0': resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} - '@changesets/git@2.0.0': - resolution: {integrity: sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A==} - '@changesets/git@3.0.0': resolution: {integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==} - '@changesets/logger@0.0.5': - resolution: {integrity: sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw==} + '@changesets/git@3.0.1': + resolution: {integrity: sha512-pdgHcYBLCPcLd82aRcuO0kxCDbw/yISlOtkmwmE8Odo1L6hSiZrBOsRl84eYG7DRCab/iHnOkWqExqc4wxk2LQ==} '@changesets/logger@0.1.0': resolution: {integrity: sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==} - '@changesets/parse@0.3.16': - resolution: {integrity: sha512-127JKNd167ayAuBjUggZBkmDS5fIKsthnr9jr6bdnuUljroiERW7FBTDNnNVyJ4l69PzR57pk6mXQdtJyBCJKg==} + '@changesets/logger@0.1.1': + resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} '@changesets/parse@0.4.0': resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} - '@changesets/pre@1.0.14': - resolution: {integrity: sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==} - '@changesets/pre@2.0.0': resolution: {integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==} - '@changesets/read@0.5.9': - resolution: {integrity: sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==} + '@changesets/pre@2.0.1': + resolution: {integrity: sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==} '@changesets/read@0.6.0': resolution: {integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==} + '@changesets/read@0.6.1': + resolution: {integrity: sha512-jYMbyXQk3nwP25nRzQQGa1nKLY0KfoOV7VLgwucI0bUO8t8ZLCr6LZmgjXsiKuRDc+5A6doKPr9w2d+FEJ55zQ==} + + '@changesets/should-skip-package@0.1.1': + resolution: {integrity: sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==} + '@changesets/types@4.1.0': resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} - '@changesets/types@5.2.1': - resolution: {integrity: sha512-myLfHbVOqaq9UtUKqR/nZA/OY7xFjQMdfgfqeZIBK4d0hA6pgxArvdv8M+6NUzzBsjWLOtvApv8YHr4qM+Kpfg==} - '@changesets/types@6.0.0': resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} - '@changesets/write@0.2.3': - resolution: {integrity: sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw==} - '@changesets/write@0.3.1': resolution: {integrity: sha512-SyGtMXzH3qFqlHKcvFY2eX+6b0NGiFcNav8AFsYwy5l8hejOeoeTDemu5Yjmke2V5jpzY+pBvM0vCCQ3gdZpfw==} + '@changesets/write@0.3.2': + resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} + '@clack/core@0.3.3': resolution: {integrity: sha512-5ZGyb75BUBjlll6eOa1m/IZBxwk91dooBWhPSL67sWcLS0zt9SnswRL0l26TVdBhb0wnWORRxUn//uH6n4z7+A==} @@ -3613,55 +4447,67 @@ packages: resolution: {integrity: sha512-PXDQXkAmiMEG162Bqdh9ChML/GJZo6vU+7F03ALKDK8zYc6SuAr47LjG7hGYRqUOz+WK0dU7bQ0xzuqFMdxzeQ==} engines: {node: '>=v14'} - '@cspell/cspell-bundled-dicts@6.31.3': - resolution: {integrity: sha512-KXy3qKWYzXOGYwqOGMCXHem3fV39iEmoKLiNhoWWry/SFdvAafmeY+LIDcQTXAcOQLkMDCwP2/rY/NadcWnrjg==} - engines: {node: '>=14'} + '@crowdin/cli@3.19.4': + resolution: {integrity: sha512-j0SiRGKOH/Pa/TdBeIxBBRrByHPqmVqWVo/LSjnri1lLPGywjcu9kB+pib7P4wmI00jgcVu+80yGdun5zRcDNQ==} + hasBin: true - '@cspell/cspell-json-reporter@6.31.3': - resolution: {integrity: sha512-ZJwj2vT4lxncYxduXcxy0dCvjjMvXIfphbLSCN5CXvufrtupB4KlcjZUnOofCi4pfpp8qocCSn1lf2DU9xgUXA==} - engines: {node: '>=14'} + '@crowdin/crowdin-api-client@1.36.0': + resolution: {integrity: sha512-fVHIG8DcSUQe5D1lggNScc1yUc2zcSFpaBJq7F15v1dQoiBvdRTWcrVdwU7mXcbzpEUqykI87svWxwomG1BLlg==} + engines: {node: '>=12.9.0'} - '@cspell/cspell-pipe@6.31.3': - resolution: {integrity: sha512-Lv/y4Ya/TJyU1pf66yl1te7LneFZd3lZg1bN5oe1cPrKSmfWdiX48v7plTRecWd/OWyLGd0yN807v79A+/0W7A==} - engines: {node: '>=14'} + '@cspell/cspell-bundled-dicts@8.14.2': + resolution: {integrity: sha512-Kv2Utj/RTSxfufGXkkoTZ/3ErCsYWpCijtDFr/FwSsM7mC0PzLpdlcD9xjtgrJO5Kwp7T47iTG21U4Mwddyi8Q==} + engines: {node: '>=18'} - '@cspell/cspell-service-bus@6.31.3': - resolution: {integrity: sha512-x5j8j3n39KN8EXOAlv75CpircdpF5WEMCC5pcO916o6GBmJBy8SrdzdsBGJhVcYGGilqy6pf8R9RCZ3yAmG8gQ==} - engines: {node: '>=14'} + '@cspell/cspell-json-reporter@8.14.2': + resolution: {integrity: sha512-TZavcnNIZKX1xC/GNj80RgFVKHCT4pHT0qm9jCsQFH2QJfyCrUlkEvotKGSQ04lAyCwWg6Enq95qhouF8YbKUQ==} + engines: {node: '>=18'} - '@cspell/cspell-types@6.31.3': - resolution: {integrity: sha512-wZ+t+lUsQJB65M31btZM4fH3K1CkRgE8pSeTiCwxYcnCL19pi4TMcEEMKdO8yFZMdocW4B7VRwzxNoQMw2ewBg==} - engines: {node: '>=14'} + '@cspell/cspell-pipe@8.14.2': + resolution: {integrity: sha512-aWMoXZAXEre0/M9AYWOW33YyOJZ06i4vvsEpWBDWpHpWQEmsR/7cMMgld8Pp3wlEjIUclUAKTYmrZ61PFWU/og==} + engines: {node: '>=18'} + + '@cspell/cspell-resolver@8.14.2': + resolution: {integrity: sha512-pSyBsAvslaN0dx0pHdvECJEuFDDBJGAD6G8U4BVbIyj2OPk0Ox0HrZIj6csYxxoJERAgNO/q7yCPwa4j9NNFXg==} + engines: {node: '>=18'} + + '@cspell/cspell-service-bus@8.14.2': + resolution: {integrity: sha512-WUF7xf3YgXYIqjmBwLcVugYIrYL4WfXchgSo9rmbbnOcAArzsK+HKfzb4AniZAJ1unxcIQ0JnVlRmnCAKPjjLg==} + engines: {node: '>=18'} + + '@cspell/cspell-types@8.14.2': + resolution: {integrity: sha512-MRY8MjBNOKGMDSkxAKueYAgVL43miO+lDcLCBBP+7cNXqHiUFMIZteONcGp3kJT0dWS04dN6lKAXvaNF0aWcng==} + engines: {node: '>=18'} '@cspell/dict-ada@4.0.2': resolution: {integrity: sha512-0kENOWQeHjUlfyId/aCM/mKXtkEgV0Zu2RhUXCBr4hHo9F9vph+Uu8Ww2b0i5a4ZixoIkudGA+eJvyxrG1jUpA==} - '@cspell/dict-aws@3.0.0': - resolution: {integrity: sha512-O1W6nd5y3Z00AMXQMzfiYrIJ1sTd9fB1oLr+xf/UD7b3xeHeMeYE2OtcWbt9uyeHim4tk+vkSTcmYEBKJgS5bQ==} + '@cspell/dict-aws@4.0.4': + resolution: {integrity: sha512-6AWI/Kkf+RcX/J81VX8+GKLeTgHWEr/OMhGk3dHQzWK66RaqDJCGDqi7494ghZKcBB7dGa3U5jcKw2FZHL/u3w==} - '@cspell/dict-bash@4.1.2': - resolution: {integrity: sha512-AEBWjbaMaJEyAjOHW0F15P2izBjli2cNerG3NjuVH7xX/HUUeNoTj8FF1nwpMufKwGQCvuyO2hCmkVxhJ0y55Q==} + '@cspell/dict-bash@4.1.5': + resolution: {integrity: sha512-YGim/h7E2U5HCCb2ckNufT6/yyWygt9nSZ5C7qw6oOD3bygbObqD1+rlPor1JW+YyO+3GwTIHE70uKEEU6VZYw==} - '@cspell/dict-companies@3.0.27': - resolution: {integrity: sha512-gaPR/luf+4oKGyxvW4GbxGGPdHiC5kj/QefnmQqrLFrLiCSXMZg5/NL+Lr4E5lcHsd35meX61svITQAvsT7lyQ==} + '@cspell/dict-companies@3.1.4': + resolution: {integrity: sha512-y9e0amzEK36EiiKx3VAA+SHQJPpf2Qv5cCt5eTUSggpTkiFkCh6gRKQ97rVlrKh5GJrqinDwYIJtTsxuh2vy2Q==} - '@cspell/dict-cpp@5.0.9': - resolution: {integrity: sha512-ql9WPNp8c+fhdpVpjpZEUWmxBHJXs9CJuiVVfW/iwv5AX7VuMHyEwid+9/6nA8qnCxkUQ5pW83Ums1lLjn8ScA==} + '@cspell/dict-cpp@5.1.19': + resolution: {integrity: sha512-i/odUPNFLdqWisOktu6c4qjUR4k+P9Al2RCri3Wso9EFblp53xt/5jIUdGMdDDVQGqX7s/KLtdqNxNKqP3/d+w==} - '@cspell/dict-cryptocurrencies@3.0.1': - resolution: {integrity: sha512-Tdlr0Ahpp5yxtwM0ukC13V6+uYCI0p9fCRGMGZt36rWv8JQZHIuHfehNl7FB/Qc09NCF7p5ep0GXbL+sVTd/+w==} + '@cspell/dict-cryptocurrencies@5.0.0': + resolution: {integrity: sha512-Z4ARIw5+bvmShL+4ZrhDzGhnc9znaAGHOEMaB/GURdS/jdoreEDY34wdN0NtdLHDO5KO7GduZnZyqGdRoiSmYA==} '@cspell/dict-csharp@4.0.2': resolution: {integrity: sha512-1JMofhLK+4p4KairF75D3A924m5ERMgd1GvzhwK2geuYgd2ZKuGW72gvXpIV7aGf52E3Uu1kDXxxGAiZ5uVG7g==} - '@cspell/dict-css@4.0.12': - resolution: {integrity: sha512-vGBgPM92MkHQF5/2jsWcnaahOZ+C6OE/fPvd5ScBP72oFY9tn5GLuomcyO0z8vWCr2e0nUSX1OGimPtcQAlvSw==} + '@cspell/dict-css@4.0.13': + resolution: {integrity: sha512-WfOQkqlAJTo8eIQeztaH0N0P+iF5hsJVKFuhy4jmARPISy8Efcv8QXk2/IVbmjJH0/ZV7dKRdnY5JFVXuVz37g==} '@cspell/dict-dart@2.0.3': resolution: {integrity: sha512-cLkwo1KT5CJY5N5RJVHks2genFkNCl/WLfj+0fFjqNR+tk3tBI1LY7ldr9piCtSFSm4x9pO1x6IV3kRUY1lLiw==} - '@cspell/dict-data-science@1.0.11': - resolution: {integrity: sha512-TaHAZRVe0Zlcc3C23StZqqbzC0NrodRwoSAc8dis+5qLeLLnOCtagYQeROQvDlcDg3X/VVEO9Whh4W/z4PAmYQ==} + '@cspell/dict-data-science@2.0.2': + resolution: {integrity: sha512-VwAck6OZQVqrscKyOrvllixIugIPF+Q6YoFNvXZCPhHGtNyOAVraD3S7kOgPYBdUjgno4QbdMWm92BUPqL1QjQ==} '@cspell/dict-django@4.1.0': resolution: {integrity: sha512-bKJ4gPyrf+1c78Z0Oc4trEB9MuhcB+Yg+uTTWsvhY6O2ncFYbB/LbEZfqhfmmuK/XJJixXfI1laF2zicyf+l0w==} @@ -3669,38 +4515,44 @@ packages: '@cspell/dict-docker@1.1.7': resolution: {integrity: sha512-XlXHAr822euV36GGsl2J1CkBIVg3fZ6879ZOg5dxTIssuhUOCiV2BuzKZmt6aIFmcdPmR14+9i9Xq+3zuxeX0A==} - '@cspell/dict-dotnet@5.0.0': - resolution: {integrity: sha512-EOwGd533v47aP5QYV8GlSSKkmM9Eq8P3G/eBzSpH3Nl2+IneDOYOBLEUraHuiCtnOkNsz0xtZHArYhAB2bHWAw==} + '@cspell/dict-dotnet@5.0.5': + resolution: {integrity: sha512-gjg0L97ee146wX47dnA698cHm85e7EOpf9mVrJD8DmEaqoo/k1oPy2g7c7LgKxK9XnqwoXxhLNnngPrwXOoEtQ==} '@cspell/dict-elixir@4.0.3': resolution: {integrity: sha512-g+uKLWvOp9IEZvrIvBPTr/oaO6619uH/wyqypqvwpmnmpjcfi8+/hqZH8YNKt15oviK8k4CkINIqNhyndG9d9Q==} - '@cspell/dict-en-common-misspellings@1.0.2': - resolution: {integrity: sha512-jg7ZQZpZH7+aAxNBlcAG4tGhYF6Ksy+QS5Df73Oo+XyckBjC9QS+PrRwLTeYoFIgXy5j3ICParK5r3MSSoL4gw==} + '@cspell/dict-en-common-misspellings@2.0.4': + resolution: {integrity: sha512-lvOiRjV/FG4pAGZL3PN2GCVHSTCE92cwhfLGGkOsQtxSmef6WCHfHwp9auafkBlX0yFQSKDfq6/TlpQbjbJBtQ==} '@cspell/dict-en-gb@1.1.33': resolution: {integrity: sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g==} - '@cspell/dict-en_us@4.3.11': - resolution: {integrity: sha512-GhdavZFlS2YbUNcRtPbgJ9j6aUyq116LmDQ2/Q5SpQxJ5/6vVs8Yj5WxV1JD+Zh/Zim1NJDcneTOuLsUGi+Czw==} + '@cspell/dict-en_us@4.3.23': + resolution: {integrity: sha512-l0SoEQBsi3zDSl3OuL4/apBkxjuj4hLIg/oy6+gZ7LWh03rKdF6VNtSZNXWAmMY+pmb1cGA3ouleTiJIglbsIg==} + + '@cspell/dict-filetypes@3.0.4': + resolution: {integrity: sha512-IBi8eIVdykoGgIv5wQhOURi5lmCNJq0we6DvqKoPQJHthXbgsuO1qrHSiUVydMiQl/XvcnUWTMeAlVUlUClnVg==} - '@cspell/dict-filetypes@3.0.2': - resolution: {integrity: sha512-StoC0wPmFNav6F6P8/FYFN1BpZfPgOmktb8gQ9wTauelWofPeBW+A0t5ncZt9hXHtnbGDA98v4ukacV+ucbnUg==} + '@cspell/dict-fonts@4.0.0': + resolution: {integrity: sha512-t9V4GeN/m517UZn63kZPUYP3OQg5f0OBLSd3Md5CU3eH1IFogSvTzHHnz4Wqqbv8NNRiBZ3HfdY/pqREZ6br3Q==} - '@cspell/dict-fonts@3.0.2': - resolution: {integrity: sha512-Z5QdbgEI7DV+KPXrAeDA6dDm/vTzyaW53SGlKqz6PI5VhkOjgkBXv3YtZjnxMZ4dY2ZIqq+RUK6qa9Pi8rQdGQ==} + '@cspell/dict-fsharp@1.0.1': + resolution: {integrity: sha512-23xyPcD+j+NnqOjRHgW3IU7Li912SX9wmeefcY0QxukbAxJ/vAN4rBpjSwwYZeQPAn3fxdfdNZs03fg+UM+4yQ==} - '@cspell/dict-fullstack@3.1.5': - resolution: {integrity: sha512-6ppvo1dkXUZ3fbYn/wwzERxCa76RtDDl5Afzv2lijLoijGGUw5yYdLBKJnx8PJBGNLh829X352ftE7BElG4leA==} + '@cspell/dict-fullstack@3.2.0': + resolution: {integrity: sha512-sIGQwU6G3rLTo+nx0GKyirR5dQSFeTIzFTOrURw51ISf+jKG9a3OmvsVtc2OANfvEAOLOC9Wfd8WYhmsO8KRDQ==} - '@cspell/dict-gaming-terms@1.0.4': - resolution: {integrity: sha512-hbDduNXlk4AOY0wFxcDMWBPpm34rpqJBeqaySeoUH70eKxpxm+dvjpoRLJgyu0TmymEICCQSl6lAHTHSDiWKZg==} + '@cspell/dict-gaming-terms@1.0.5': + resolution: {integrity: sha512-C3riccZDD3d9caJQQs1+MPfrUrQ+0KHdlj9iUR1QD92FgTOF6UxoBpvHUUZ9YSezslcmpFQK4xQQ5FUGS7uWfw==} - '@cspell/dict-git@2.0.0': - resolution: {integrity: sha512-n1AxyX5Kgxij/sZFkxFJlzn3K9y/sCcgVPg/vz4WNJ4K9YeTsUmyGLA2OQI7d10GJeiuAo2AP1iZf2A8j9aj2w==} + '@cspell/dict-git@3.0.0': + resolution: {integrity: sha512-simGS/lIiXbEaqJu9E2VPoYW1OTC2xrwPPXNXFMa2uo/50av56qOuaxDrZ5eH1LidFXwoc8HROCHYeKoNrDLSw==} - '@cspell/dict-golang@6.0.4': - resolution: {integrity: sha512-jOfewPEyN6U9Q80okE3b1PTYBfqZgHh7w4o271GSuAX+VKJ1lUDhdR4bPKRxSDdO5jHArw2u5C8nH2CWGuygbQ==} + '@cspell/dict-golang@6.0.13': + resolution: {integrity: sha512-uBUWi+AjFpluB6qF0rsC1gGyooqXeKPUdWHSmSXW/DCnS5PBSjRW6VWWp8efc1Fanob0QJxiZiYlc4U7oxuG6Q==} + + '@cspell/dict-google@1.0.1': + resolution: {integrity: sha512-dQr4M3n95uOhtloNSgB9tYYGXGGEGEykkFyRtfcp5pFuEecYUa0BSgtlGKx9RXVtJtKgR+yFT/a5uQSlt8WjqQ==} '@cspell/dict-haskell@4.0.1': resolution: {integrity: sha512-uRrl65mGrOmwT7NxspB4xKXFUenNC7IikmpRZW8Uzqbqcu7ZRCUfstuVH7T1rmjRgRkjcIjE4PC11luDou4wEQ==} @@ -3711,56 +4563,65 @@ packages: '@cspell/dict-html@4.0.5': resolution: {integrity: sha512-p0brEnRybzSSWi8sGbuVEf7jSTDmXPx7XhQUb5bgG6b54uj+Z0Qf0V2n8b/LWwIPJNd1GygaO9l8k3HTCy1h4w==} - '@cspell/dict-java@5.0.6': - resolution: {integrity: sha512-kdE4AHHHrixyZ5p6zyms1SLoYpaJarPxrz8Tveo6gddszBVVwIUZ+JkQE1bWNLK740GWzIXdkznpUfw1hP9nXw==} + '@cspell/dict-java@5.0.7': + resolution: {integrity: sha512-ejQ9iJXYIq7R09BScU2y5OUGrSqwcD+J5mHFOKbduuQ5s/Eh/duz45KOzykeMLI6KHPVxhBKpUPBWIsfewECpQ==} + + '@cspell/dict-julia@1.0.1': + resolution: {integrity: sha512-4JsCLCRhhLMLiaHpmR7zHFjj1qOauzDI5ZzCNQS31TUMfsOo26jAKDfo0jljFAKgw5M2fEG7sKr8IlPpQAYrmQ==} - '@cspell/dict-k8s@1.0.2': - resolution: {integrity: sha512-tLT7gZpNPnGa+IIFvK9SP1LrSpPpJ94a/DulzAPOb1Q2UBFwdpFd82UWhio0RNShduvKG/WiMZf/wGl98pn+VQ==} + '@cspell/dict-k8s@1.0.6': + resolution: {integrity: sha512-srhVDtwrd799uxMpsPOQqeDJY+gEocgZpoK06EFrb4GRYGhv7lXo9Fb+xQMyQytzOW9dw4DNOEck++nacDuymg==} '@cspell/dict-latex@4.0.0': resolution: {integrity: sha512-LPY4y6D5oI7D3d+5JMJHK/wxYTQa2lJMSNxps2JtuF8hbAnBQb3igoWEjEbIbRRH1XBM0X8dQqemnjQNCiAtxQ==} - '@cspell/dict-lorem-ipsum@3.0.0': - resolution: {integrity: sha512-msEV24qEpzWZs2kcEicqYlhyBpR0amfDkJOs+iffC07si9ftqtQ+yP3lf1VFLpgqw3SQh1M1vtU7RD4sPrNlcQ==} + '@cspell/dict-lorem-ipsum@4.0.0': + resolution: {integrity: sha512-1l3yjfNvMzZPibW8A7mQU4kTozwVZVw0AvFEdy+NcqtbxH+TvbSkNMqROOFWrkD2PjnKG0+Ea0tHI2Pi6Gchnw==} - '@cspell/dict-lua@4.0.2': - resolution: {integrity: sha512-eeC20Q+UnHcTVBK6pgwhSjGIVugO2XqU7hv4ZfXp2F9DxGx1RME0+1sKX4qAGhdFGwOBsEzb2fwUsAEP6Mibpg==} + '@cspell/dict-lua@4.0.3': + resolution: {integrity: sha512-lDHKjsrrbqPaea13+G9s0rtXjMO06gPXPYRjRYawbNmo4E/e3XFfVzeci3OQDQNDmf2cPOwt9Ef5lu2lDmwfJg==} - '@cspell/dict-node@4.0.3': - resolution: {integrity: sha512-sFlUNI5kOogy49KtPg8SMQYirDGIAoKBO3+cDLIwD4MLdsWy1q0upc7pzGht3mrjuyMiPRUV14Bb0rkVLrxOhg==} + '@cspell/dict-makefile@1.0.0': + resolution: {integrity: sha512-3W9tHPcSbJa6s0bcqWo6VisEDTSN5zOtDbnPabF7rbyjRpNo0uHXHRJQF8gAbFzoTzBBhgkTmrfSiuyQm7vBUQ==} - '@cspell/dict-npm@5.0.12': - resolution: {integrity: sha512-T/+WeQmtbxo7ad6hrdI8URptYstKJP+kXyWJZfuVJJGWJQ7yubxrI5Z5AfM+Dh/ff4xHmdzapxD9adaEQ727uw==} + '@cspell/dict-monkeyc@1.0.6': + resolution: {integrity: sha512-oO8ZDu/FtZ55aq9Mb67HtaCnsLn59xvhO/t2mLLTHAp667hJFxpp7bCtr2zOrR1NELzFXmKln/2lw/PvxMSvrA==} - '@cspell/dict-php@4.0.4': - resolution: {integrity: sha512-fRlLV730fJbulDsLIouZxXoxHt3KIH6hcLFwxaupHL+iTXDg0lo7neRpbqD5MScr/J3idEr7i9G8XWzIikKFug==} + '@cspell/dict-node@5.0.1': + resolution: {integrity: sha512-lax/jGz9h3Dv83v8LHa5G0bf6wm8YVRMzbjJPG/9rp7cAGPtdrga+XANFq+B7bY5+jiSA3zvj10LUFCFjnnCCg==} - '@cspell/dict-powershell@5.0.2': - resolution: {integrity: sha512-IHfWLme3FXE7vnOmMncSBxOsMTdNWd1Vcyhag03WS8oANSgX8IZ+4lMI00mF0ptlgchf16/OU8WsV4pZfikEFw==} + '@cspell/dict-npm@5.1.5': + resolution: {integrity: sha512-oAOGWuJYU3DlO+cAsStKMWN8YEkBue25cRC9EwdiL5Z84nchU20UIoYrLfIQejMlZca+1GyrNeyxRAgn4KiivA==} - '@cspell/dict-public-licenses@2.0.5': - resolution: {integrity: sha512-91HK4dSRri/HqzAypHgduRMarJAleOX5NugoI8SjDLPzWYkwZ1ftuCXSk+fy8DLc3wK7iOaFcZAvbjmnLhVs4A==} + '@cspell/dict-php@4.0.10': + resolution: {integrity: sha512-NfTZdp6kcZDF1PvgQ6cY0zE4FUO5rSwNmBH/iwCBuaLfJAFQ97rgjxo+D2bic4CFwNjyHutnHPtjJBRANO5XQw==} - '@cspell/dict-python@4.1.10': - resolution: {integrity: sha512-ErF/Ohcu6Xk4QVNzFgo8p7CxkxvAKAmFszvso41qOOhu8CVpB35ikBRpGVDw9gsCUtZzi15Yl0izi4do6WcLkA==} + '@cspell/dict-powershell@5.0.10': + resolution: {integrity: sha512-U4H0zm94sNK+YP7jSFb7xb160XLf2dKIPVt5sOYctKlEyR9M16sP8FHbyWV2Yp1YtxXugoNdeCm2vwGEDAd8sg==} + + '@cspell/dict-public-licenses@2.0.8': + resolution: {integrity: sha512-Sup+tFS7cDV0fgpoKtUqEZ6+fA/H+XUgBiqQ/Fbs6vUE3WCjJHOIVsP+udHuyMH7iBfJ4UFYOYeORcY4EaKdMg==} + + '@cspell/dict-python@4.2.8': + resolution: {integrity: sha512-4y5dynLiajvowhB3PqlcwJ2C4okK1y2Hombec1+TGcV9sUBfo8FYNw6VRFUUrpsxO+Ut/3ncIifdZS5/zAWi5w==} '@cspell/dict-r@2.0.1': resolution: {integrity: sha512-KCmKaeYMLm2Ip79mlYPc8p+B2uzwBp4KMkzeLd5E6jUlCL93Y5Nvq68wV5fRLDRTf7N1LvofkVFWfDcednFOgA==} - '@cspell/dict-ruby@5.0.1': - resolution: {integrity: sha512-rruTm7Emhty/BSYavSm8ZxRuVw0OBqzJkwIFXcV0cX7To8D1qbmS9HFHRuRg8IL11+/nJvtdDz+lMFBSmPUagQ==} + '@cspell/dict-ruby@5.0.4': + resolution: {integrity: sha512-URw0jScj5pv8sKCVLNnde11qVCQR442rUpSd12u46Swl+5qBaSdnOUoCWQk419kd9/dpC6bB/3l4kOSY2fdYHw==} - '@cspell/dict-rust@4.0.1': - resolution: {integrity: sha512-xJSSzHDK2z6lSVaOmMxl3PTOtfoffaxMo7fTcbZUF+SCJzfKbO6vnN9TCGX2sx1RHFDz66Js6goz6SAZQdOwaw==} + '@cspell/dict-rust@4.0.6': + resolution: {integrity: sha512-Buzy9PfLbdRPibSth8CV1D8ZsYqybo26yNIlAN+8ehU0pSBss0Jv4aleL4vKQ3FjouXeAC27rtEsLd7yaMZTog==} - '@cspell/dict-scala@5.0.0': - resolution: {integrity: sha512-ph0twaRoV+ylui022clEO1dZ35QbeEQaKTaV2sPOsdwIokABPIiK09oWwGK9qg7jRGQwVaRPEq0Vp+IG1GpqSQ==} + '@cspell/dict-scala@5.0.3': + resolution: {integrity: sha512-4yGb4AInT99rqprxVNT9TYb1YSpq58Owzq7zi3ZS5T0u899Y4VsxsBiOgHnQ/4W+ygi+sp+oqef8w8nABR2lkg==} - '@cspell/dict-software-terms@3.3.9': - resolution: {integrity: sha512-/O3EWe0SIznx18S7J3GAXPDe7sexn3uTsf4IlnGYK9WY6ZRuEywkXCB+5/USLTGf4+QC05pkHofphdvVSifDyA==} + '@cspell/dict-software-terms@4.1.7': + resolution: {integrity: sha512-+fFTALseXszDN8/khonF1DpTcYzwyNqYxhATLakr7CUPtUCO1fCH4lidMtBN4UtPVpE6tbjc5D8tj51PJxEOcw==} - '@cspell/dict-sql@2.1.2': - resolution: {integrity: sha512-Pi0hAcvsSGtZZeyyAN1VfGtQJbrXos5x2QjJU0niAQKhmITSOrXU/1II1Gogk+FYDjWyV9wP2De0U2f7EWs6oQ==} + '@cspell/dict-sql@2.1.5': + resolution: {integrity: sha512-FmxanytHXss7GAWAXmgaxl3icTCW7YxlimyOSPNfm+njqeUDjw3kEv4mFNDDObBJv8Ec5AWCbUDkWIpkE3IpKg==} '@cspell/dict-svelte@1.0.2': resolution: {integrity: sha512-rPJmnn/GsDs0btNvrRBciOhngKV98yZ9SHmg8qI6HLS8hZKvcXc0LMsf9LLuMK1TmS2+WQFAan6qeqg6bBxL2Q==} @@ -3768,19 +4629,30 @@ packages: '@cspell/dict-swift@2.0.1': resolution: {integrity: sha512-gxrCMUOndOk7xZFmXNtkCEeroZRnS2VbeaIPiymGRHj5H+qfTAzAKxtv7jJbVA3YYvEzWcVE2oKDP4wcbhIERw==} - '@cspell/dict-typescript@3.1.2': - resolution: {integrity: sha512-lcNOYWjLUvDZdLa0UMNd/LwfVdxhE9rKA+agZBGjL3lTA3uNvH7IUqSJM/IXhJoBpLLMVEOk8v1N9xi+vDuCdA==} + '@cspell/dict-terraform@1.0.2': + resolution: {integrity: sha512-UZdJwWIpib2Rx02w6vtXTU3z+M/VMZU0F1dhSL3Ab9otQsFntT8U1CX7wBSqQCLg8bJiCfnUyVvMK3UBm3SR8A==} + + '@cspell/dict-typescript@3.1.6': + resolution: {integrity: sha512-1beC6O4P/j23VuxX+i0+F7XqPVc3hhiAzGJHEKqnWf5cWAXQtg0xz3xQJ5MvYx2a7iLaSa+lu7+05vG9UHyu9Q==} '@cspell/dict-vue@3.0.0': resolution: {integrity: sha512-niiEMPWPV9IeRBRzZ0TBZmNnkK3olkOPYxC1Ny2AX4TGlYRajcW0WUtoSHmvvjZNfWLSg2L6ruiBeuPSbjnG6A==} - '@cspell/dynamic-import@6.31.3': - resolution: {integrity: sha512-A6sT00+6UNGFksQ5SxW2ohNl6vUutai8F4jwJMHTjZL/9vivQpU7y5V4PpsfoPZtx3WZcbrzuTvJ+tLfdbWc4A==} - engines: {node: '>=14'} + '@cspell/dynamic-import@8.14.2': + resolution: {integrity: sha512-5MbqtIligU7yPwHWU/5yFCgMvur4i1bRAF1Cy8y2dDtHsa204S/w/SaXs+51EFLp2eNbCiBisCBrwJFT7R1RxA==} + engines: {node: '>=18.0'} + + '@cspell/filetypes@8.14.2': + resolution: {integrity: sha512-ZevArA0mWeVTTqHicxCPZIAeCibpY3NwWK/x6d1Lgu7RPk/daoGAM546Q2SLChFu+r10tIH7pRG212A6Q9ihPA==} + engines: {node: '>=18'} + + '@cspell/strong-weak-map@8.14.2': + resolution: {integrity: sha512-7sRzJc392CQYNNrtdPEfOHJdRqsqf6nASCtbS5A9hL2UrdWQ4uN7r/D+Y1HpuizwY9eOkZvarcFfsYt5wE0Pug==} + engines: {node: '>=18'} - '@cspell/strong-weak-map@6.31.3': - resolution: {integrity: sha512-znwc9IlgGUPioHGshP/zyM8HsuYg1OY5S7HSiVXARh5H8RqcyBsnyn8abc0PPhqPrfDy9Fh5xHsAEPZ55dl1vQ==} - engines: {node: '>=14.6'} + '@cspell/url@8.14.2': + resolution: {integrity: sha512-YmWW+B/2XQcCynLpiAQF77Bitm5Cynw3/BICZkbdveKjJkUzEmXB+U2qWuwXOyU8xUYuwkP63YM8McnI567rUA==} + engines: {node: '>=18.0'} '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} @@ -3796,18 +4668,258 @@ packages: peerDependencies: vue: ^3.0.11 + '@csstools/cascade-layer-name-parser@2.0.1': + resolution: {integrity: sha512-G9ZYN5+yr/E6xYSiy1BwOEFP5p88ZtWo8sL4NztKBkRRAwRkzVGa70M+D+fYHugMID5jkLeNt5X9jYd5EaVuyg==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.1 + '@csstools/css-tokenizer': ^3.0.1 + + '@csstools/color-helpers@5.0.1': + resolution: {integrity: sha512-MKtmkA0BX87PKaO1NFRTFH+UnkgnmySQOvNxJubsadusqPEC2aJ9MOQiMceZJJ6oitUl/i0L6u0M1IrmAOmgBA==} + engines: {node: '>=18'} + + '@csstools/css-calc@2.0.1': + resolution: {integrity: sha512-e59V+sNp6e5m+9WnTUydA1DQO70WuKUdseflRpWmXxocF/h5wWGIxUjxfvLtajcmwstH0vm6l0reKMzcyI757Q==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.1 + '@csstools/css-tokenizer': ^3.0.1 + + '@csstools/css-color-parser@3.0.2': + resolution: {integrity: sha512-mNg7A6HnNjlm0we/pDS9dUafOuBxcanN0TBhEGeIk6zZincuk0+mAbnBqfVs29NlvWHZ8diwTG6g5FeU8246sA==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.1 + '@csstools/css-tokenizer': ^3.0.1 + + '@csstools/css-parser-algorithms@3.0.1': + resolution: {integrity: sha512-lSquqZCHxDfuTg/Sk2hiS0mcSFCEBuj49JfzPHJogDBT0mGCyY5A1AQzBWngitrp7i1/HAZpIgzF/VjhOEIJIg==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-tokenizer': ^3.0.1 + + '@csstools/css-tokenizer@3.0.1': + resolution: {integrity: sha512-UBqaiu7kU0lfvaP982/o3khfXccVlHPWp0/vwwiIgDF0GmqqqxoiXC/6FCjlS9u92f7CoEz6nXKQnrn1kIAkOw==} + engines: {node: '>=18'} + + '@csstools/media-query-list-parser@3.0.1': + resolution: {integrity: sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.1 + '@csstools/css-tokenizer': ^3.0.1 + '@csstools/postcss-cascade-layers@4.0.6': resolution: {integrity: sha512-Xt00qGAQyqAODFiFEJNkTpSUz5VfYqnDLECdlA/Vv17nl/OIV5QfTRHGAXrBGG5YcJyHpJ+GF9gF/RZvOQz4oA==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 + '@csstools/postcss-cascade-layers@5.0.0': + resolution: {integrity: sha512-h+VunB3KXaoWTWEPBcdVk8Kz1eZ/CtDD+HXgKw5JLdbsViLEQdKUtFYH73VIQigdodng8s5DCrrwNQY7pnuWBA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-color-function@4.0.2': + resolution: {integrity: sha512-q/W3RXh66SM7WqxW3/KU6koL8nOgqyB/wrcU3+ThXnNtXY2+k8UgdE301ISJpMt6PDyYgC7eMaIBo535RvFIgw==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-color-mix-function@3.0.2': + resolution: {integrity: sha512-zG9PHNzZVCRk6eprm+T/ybrnuiwLdO+RR7+GCtNut+NZJGtPJj6bfPOEX23aOlMslLcRAlN6QOpxH3tovn+WpA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-content-alt-text@2.0.1': + resolution: {integrity: sha512-TWjjewVZqdkjavsi8a2THuXgkhUum1k/m4QJpZpzOv72q6WnaoQZGSj5t5uCs7ymJr0H3qj6JcXMwMApSWUOGQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-exponential-functions@2.0.1': + resolution: {integrity: sha512-A/MG8es3ylFzZ30oYIQUyJcMOfTfCs0dqqBMzeuzaPRlx4q/72WG+BbKe/pL9BUNIWsM0Q8jn3e3la8enjHJJA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-font-format-keywords@4.0.0': + resolution: {integrity: sha512-usBzw9aCRDvchpok6C+4TXC57btc4bJtmKQWOHQxOVKen1ZfVqBUuCZ/wuqdX5GHsD0NRSr9XTP+5ID1ZZQBXw==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-gamut-mapping@2.0.2': + resolution: {integrity: sha512-/1ur3ca9RWg/KnbLlxaDswyjLSGoaHNDruAzrVhkn5axgd7LOH6JHCBRhrKDafdMw9bf4MQrYFoaLfHAPekLFg==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-gradients-interpolation-method@5.0.2': + resolution: {integrity: sha512-qRpvA4sduAfiV9yZG4OM7q/h2Qhr3lg+GrHe9NZwuzWnfSDLGh+Dh4Ea6fQ+1++jdKXW/Cb4/vHRp0ssQYra4w==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-hwb-function@4.0.2': + resolution: {integrity: sha512-RUBVCyJE1hTsf9vGp3zrALeMollkAlHRFKm+T36y67nLfOOf+6GNQsdTGFAyLrY65skcm8ddC26Jp1n9ZIauEA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-ic-unit@4.0.0': + resolution: {integrity: sha512-9QT5TDGgx7wD3EEMN3BSUG6ckb6Eh5gSPT5kZoVtUuAonfPmLDJyPhqR4ntPpMYhUKAMVKAg3I/AgzqHMSeLhA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-initial@2.0.0': + resolution: {integrity: sha512-dv2lNUKR+JV+OOhZm9paWzYBXOCi+rJPqJ2cJuhh9xd8USVrd0cBEPczla81HNOyThMQWeCcdln3gZkQV2kYxA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-is-pseudo-class@5.0.0': + resolution: {integrity: sha512-E/CjrT03BL06WmrjupnrT0VUBTvxJdoW1hRVeXFa9qatWtvcLLw0j8hP372G4A9PpSGEMXi3/AoHzPf7DNryCQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-light-dark-function@2.0.4': + resolution: {integrity: sha512-yHUt5DZ61Irvp72notmAl3Zt4Me50EWToWNocazyIFTVYFwwo/EucmV3hWi9zJehu3rOSvMclL7DzvRDfbak/A==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-logical-float-and-clear@3.0.0': + resolution: {integrity: sha512-SEmaHMszwakI2rqKRJgE+8rpotFfne1ZS6bZqBoQIicFyV+xT1UF42eORPxJkVJVrH9C0ctUgwMSn3BLOIZldQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-logical-overflow@2.0.0': + resolution: {integrity: sha512-spzR1MInxPuXKEX2csMamshR4LRaSZ3UXVaRGjeQxl70ySxOhMpP2252RAFsg8QyyBXBzuVOOdx1+bVO5bPIzA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-logical-overscroll-behavior@2.0.0': + resolution: {integrity: sha512-e/webMjoGOSYfqLunyzByZj5KKe5oyVg/YSbie99VEaSDE2kimFm0q1f6t/6Jo+VVCQ/jbe2Xy+uX+C4xzWs4w==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-logical-resize@3.0.0': + resolution: {integrity: sha512-DFbHQOFW/+I+MY4Ycd/QN6Dg4Hcbb50elIJCfnwkRTCX05G11SwViI5BbBlg9iHRl4ytB7pmY5ieAFk3ws7yyg==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-logical-viewport-units@3.0.1': + resolution: {integrity: sha512-JsfaoTiBqIuRE+CYL4ZpYKOqJ965GyiMH4b8UrY0Z7i5GfMiHZrK7xtTB29piuyKQzrW+Z8w3PAExhwND9cuAQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-media-minmax@2.0.1': + resolution: {integrity: sha512-EMa3IgUip+F/MwH4r2KfIA9ym9hQkT2PpR9MOukdomfGGCFuw9V3n/iIOBKziN1qfeddsYoOvtYOKQcHU2yIjg==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-media-queries-aspect-ratio-number-values@3.0.1': + resolution: {integrity: sha512-JTzMQz//INahTALkvXnC5lC2fJKzwb5PY443T2zaM9hAzM7nzHMLIlEfFgdtBahVIBtBSalMefdxNr99LGW1lQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-nested-calc@4.0.0': + resolution: {integrity: sha512-jMYDdqrQQxE7k9+KjstC3NbsmC063n1FTPLCgCRS2/qHUbHM0mNy9pIn4QIiQGs9I/Bg98vMqw7mJXBxa0N88A==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-normalize-display-values@4.0.0': + resolution: {integrity: sha512-HlEoG0IDRoHXzXnkV4in47dzsxdsjdz6+j7MLjaACABX2NfvjFS6XVAnpaDyGesz9gK2SC7MbNwdCHusObKJ9Q==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-oklab-function@4.0.2': + resolution: {integrity: sha512-2iSK/T77PHMeorakBAk/WLxSodfIJ/lmi6nxEkuruXfhGH7fByZim4Fw6ZJf4B73SVieRSH2ep8zvYkA2ZfRtA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-progressive-custom-properties@4.0.0': + resolution: {integrity: sha512-XQPtROaQjomnvLUSy/bALTR5VCtTVUFwYs1SblvYgLSeTo2a/bMNwUwo2piXw5rTv/FEYiy5yPSXBqg9OKUx7Q==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-relative-color-syntax@3.0.2': + resolution: {integrity: sha512-aBpuUdpJBswNGfw6lOkhown2cZ0YXrMjASye56nkoRpgRe9yDF4BM1fvEuakrCDiaeoUzVaI4SF6+344BflXfQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-scope-pseudo-class@4.0.0': + resolution: {integrity: sha512-+ZUOBtVMDcmHZcZqsP/jcNRriEILfWQflTI3tCTA+/RheXAg57VkFGyPDAilpQSqlCpxWLWG8VUFKFtZJPwuOg==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-stepped-value-functions@4.0.1': + resolution: {integrity: sha512-dk3KqVcIEYzy9Mvx8amoBbk123BWgd5DfjXDiPrEqxGma37PG7m/MoMmHQhuVHIjvPDHoJwyIZi2yy7j0RA5fw==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-text-decoration-shorthand@4.0.1': + resolution: {integrity: sha512-xPZIikbx6jyzWvhms27uugIc0I4ykH4keRvoa3rxX5K7lEhkbd54rjj/dv60qOCTisoS+3bmwJTeyV1VNBrXaw==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-trigonometric-functions@4.0.1': + resolution: {integrity: sha512-QHOYuN3bzS/rcpAygFhJxJUtD8GuJEWF6f9Zm518Tq/cSMlcTgU+v0geyi5EqbmYxKMig2oKCKUSGqOj9gehkg==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/postcss-unset-value@4.0.0': + resolution: {integrity: sha512-cBz3tOCI5Fw6NIFEwU3RiwK6mn3nKegjpJuzCndoGq3BZPkUjnsq7uQmIeMNeMbMk7YD2MfKcgCpZwX5jyXqCA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + '@csstools/selector-resolve-nested@2.0.0': + resolution: {integrity: sha512-oklSrRvOxNeeOW1yARd4WNCs/D09cQjunGZUgSq6vM8GpzFswN+8rBZyJA29YFZhOTQ6GFzxgLDNtVbt9wPZMA==} + engines: {node: '>=18'} + peerDependencies: + postcss-selector-parser: ^6.1.0 + '@csstools/selector-specificity@3.1.1': resolution: {integrity: sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss-selector-parser: ^6.0.13 + '@csstools/selector-specificity@4.0.0': + resolution: {integrity: sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ==} + engines: {node: '>=18'} + peerDependencies: + postcss-selector-parser: ^6.1.0 + + '@csstools/utilities@2.0.0': + resolution: {integrity: sha512-5VdOr0Z71u+Yp3ozOx8T11N703wIFGVRgOWbOZMKgglPJsWA54MRIoMNVMa7shUToIhx5J8vX4sOZgD2XiihiQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + '@ctrl/tinycolor@3.6.1': resolution: {integrity: sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==} engines: {node: '>=10'} @@ -3816,6 +4928,10 @@ packages: resolution: {integrity: sha512-0cp4PsWQ/9avqTVMCtZ+GirikIA36ikvjtHweU4/j8yLtgObI0+JUPhYFScgwlteveGB1rt3Cm8UhN04XayDig==} engines: {node: '>= 8.9.0'} + '@discoveryjs/json-ext@0.5.7': + resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} + engines: {node: '>=10.0.0'} + '@dnd-kit/accessibility@3.1.0': resolution: {integrity: sha512-ea7IkhKvlJUv9iSHJOnxinBcoOI3ppGnnL+VDJ75O45Nss6HtZd8IdN8touXPDtASfeI2T2LImb8VOZcL47wjQ==} peerDependencies: @@ -3844,6 +4960,206 @@ packages: peerDependencies: react: '>=16.8.0' + '@docsearch/css@3.6.2': + resolution: {integrity: sha512-vKNZepO2j7MrYBTZIGXvlUOIR+v9KRf70FApRgovWrj3GTs1EITz/Xb0AOlm1xsQBp16clVZj1SY/qaOJbQtZw==} + + '@docsearch/react@3.6.2': + resolution: {integrity: sha512-rtZce46OOkVflCQH71IdbXSFK+S8iJZlUF56XBW5rIgx/eG5qoomC7Ag3anZson1bBac/JFQn7XOBfved/IMRA==} + 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 + + '@docusaurus/core@3.5.2': + resolution: {integrity: sha512-4Z1WkhCSkX4KO0Fw5m/Vuc7Q3NxBG53NE5u59Rs96fWkMPZVSrzEPP16/Nk6cWb/shK7xXPndTmalJtw7twL/w==} + engines: {node: '>=18.0'} + hasBin: true + peerDependencies: + '@mdx-js/react': ^3.0.0 + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/cssnano-preset@3.5.2': + resolution: {integrity: sha512-D3KiQXOMA8+O0tqORBrTOEQyQxNIfPm9jEaJoALjjSjc2M/ZAWcUfPQEnwr2JB2TadHw2gqWgpZckQmrVWkytA==} + engines: {node: '>=18.0'} + + '@docusaurus/logger@3.5.2': + resolution: {integrity: sha512-LHC540SGkeLfyT3RHK3gAMK6aS5TRqOD4R72BEU/DE2M/TY8WwEUAMY576UUc/oNJXv8pGhBmQB6N9p3pt8LQw==} + engines: {node: '>=18.0'} + + '@docusaurus/lqip-loader@3.5.2': + resolution: {integrity: sha512-yUD90PgwbGciCHHiQTWXZvpLv9nVTpXrX8Ilz5Sl6oJ1bwnLgGsbl7h+EseVbwBnKhVCoujW/EKRU6+3HqeeXQ==} + engines: {node: '>=18.0'} + + '@docusaurus/mdx-loader@3.5.2': + resolution: {integrity: sha512-ku3xO9vZdwpiMIVd8BzWV0DCqGEbCP5zs1iHfKX50vw6jX8vQo0ylYo1YJMZyz6e+JFJ17HYHT5FzVidz2IflA==} + engines: {node: '>=18.0'} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/module-type-aliases@3.5.2': + resolution: {integrity: sha512-Z+Xu3+2rvKef/YKTMxZHsEXp1y92ac0ngjDiExRdqGTmEKtCUpkbNYH8v5eXo5Ls+dnW88n6WTa+Q54kLOkwPg==} + peerDependencies: + react: '*' + react-dom: '*' + + '@docusaurus/plugin-content-blog@3.5.2': + resolution: {integrity: sha512-R7ghWnMvjSf+aeNDH0K4fjyQnt5L0KzUEnUhmf1e3jZrv3wogeytZNN6n7X8yHcMsuZHPOrctQhXWnmxu+IRRg==} + engines: {node: '>=18.0'} + peerDependencies: + '@docusaurus/plugin-content-docs': '*' + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/plugin-content-docs@3.5.2': + resolution: {integrity: sha512-Bt+OXn/CPtVqM3Di44vHjE7rPCEsRCB/DMo2qoOuozB9f7+lsdrHvD0QCHdBs0uhz6deYJDppAr2VgqybKPlVQ==} + engines: {node: '>=18.0'} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/plugin-content-pages@3.5.2': + resolution: {integrity: sha512-WzhHjNpoQAUz/ueO10cnundRz+VUtkjFhhaQ9jApyv1a46FPURO4cef89pyNIOMny1fjDz/NUN2z6Yi+5WUrCw==} + engines: {node: '>=18.0'} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/plugin-debug@3.5.2': + resolution: {integrity: sha512-kBK6GlN0itCkrmHuCS6aX1wmoWc5wpd5KJlqQ1FyrF0cLDnvsYSnh7+ftdwzt7G6lGBho8lrVwkkL9/iQvaSOA==} + engines: {node: '>=18.0'} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/plugin-google-analytics@3.5.2': + resolution: {integrity: sha512-rjEkJH/tJ8OXRE9bwhV2mb/WP93V441rD6XnM6MIluu7rk8qg38iSxS43ga2V2Q/2ib53PcqbDEJDG/yWQRJhQ==} + engines: {node: '>=18.0'} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/plugin-google-gtag@3.5.2': + resolution: {integrity: sha512-lm8XL3xLkTPHFKKjLjEEAHUrW0SZBSHBE1I+i/tmYMBsjCcUB5UJ52geS5PSiOCFVR74tbPGcPHEV/gaaxFeSA==} + engines: {node: '>=18.0'} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/plugin-google-tag-manager@3.5.2': + resolution: {integrity: sha512-QkpX68PMOMu10Mvgvr5CfZAzZQFx8WLlOiUQ/Qmmcl6mjGK6H21WLT5x7xDmcpCoKA/3CegsqIqBR+nA137lQg==} + engines: {node: '>=18.0'} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/plugin-ideal-image@3.5.2': + resolution: {integrity: sha512-FnHi3a5DjYRvjN1XbXRe1Cmiqfc+tAI2VmThN1Mr9teLB0ibuRi++P98q6+KyamBWKrJmuskWLMdr71acwHM8Q==} + engines: {node: '>=18.0'} + peerDependencies: + jimp: '*' + react: ^18.0.0 + react-dom: ^18.0.0 + peerDependenciesMeta: + jimp: + optional: true + + '@docusaurus/plugin-sitemap@3.5.2': + resolution: {integrity: sha512-DnlqYyRAdQ4NHY28TfHuVk414ft2uruP4QWCH//jzpHjqvKyXjj2fmDtI8RPUBh9K8iZKFMHRnLtzJKySPWvFA==} + engines: {node: '>=18.0'} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/preset-classic@3.5.2': + resolution: {integrity: sha512-3ihfXQ95aOHiLB5uCu+9PRy2gZCeSZoDcqpnDvf3B+sTrMvMTr8qRUzBvWkoIqc82yG5prCboRjk1SVILKx6sg==} + engines: {node: '>=18.0'} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/react-loadable@6.0.0': + resolution: {integrity: sha512-YMMxTUQV/QFSnbgrP3tjDzLHRg7vsbMn8e9HAa8o/1iXoiomo48b7sk/kkmWEuWNDPJVlKSJRB6Y2fHqdJk+SQ==} + peerDependencies: + react: '*' + + '@docusaurus/responsive-loader@1.7.0': + resolution: {integrity: sha512-N0cWuVqTRXRvkBxeMQcy/OF2l7GN8rmni5EzR3HpwR+iU2ckYPnziceojcxvvxQ5NqZg1QfEW0tycQgHp+e+Nw==} + engines: {node: '>=12'} + peerDependencies: + jimp: '*' + sharp: '*' + peerDependenciesMeta: + jimp: + optional: true + sharp: + optional: true + + '@docusaurus/theme-classic@3.5.2': + resolution: {integrity: sha512-XRpinSix3NBv95Rk7xeMF9k4safMkwnpSgThn0UNQNumKvmcIYjfkwfh2BhwYh/BxMXQHJ/PdmNh22TQFpIaYg==} + engines: {node: '>=18.0'} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/theme-common@3.5.2': + resolution: {integrity: sha512-QXqlm9S6x9Ibwjs7I2yEDgsCocp708DrCrgHgKwg2n2AY0YQ6IjU0gAK35lHRLOvAoJUfCKpQAwUykB0R7+Eew==} + engines: {node: '>=18.0'} + peerDependencies: + '@docusaurus/plugin-content-docs': '*' + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/theme-search-algolia@3.5.2': + resolution: {integrity: sha512-qW53kp3VzMnEqZGjakaV90sst3iN1o32PH+nawv1uepROO8aEGxptcq2R5rsv7aBShSRbZwIobdvSYKsZ5pqvA==} + engines: {node: '>=18.0'} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/theme-translations@3.5.2': + resolution: {integrity: sha512-GPZLcu4aT1EmqSTmbdpVrDENGR2yObFEX8ssEFYTCiAIVc0EihNSdOIBTazUvgNqwvnoU1A8vIs1xyzc3LITTw==} + engines: {node: '>=18.0'} + + '@docusaurus/types@3.5.2': + resolution: {integrity: sha512-N6GntLXoLVUwkZw7zCxwy9QiuEXIcTVzA9AkmNw16oc0AP3SXLrMmDMMBIfgqwuKWa6Ox6epHol9kMtJqekACw==} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + + '@docusaurus/utils-common@3.5.2': + resolution: {integrity: sha512-i0AZjHiRgJU6d7faQngIhuHKNrszpL/SHQPgF1zH4H+Ij6E9NBYGy6pkcGWToIv7IVPbs+pQLh1P3whn0gWXVg==} + engines: {node: '>=18.0'} + peerDependencies: + '@docusaurus/types': '*' + peerDependenciesMeta: + '@docusaurus/types': + optional: true + + '@docusaurus/utils-validation@3.5.2': + resolution: {integrity: sha512-m+Foq7augzXqB6HufdS139PFxDC5d5q2QKZy8q0qYYvGdI6nnlNsGH4cIGsgBnV7smz+mopl3g4asbSDvMV0jA==} + engines: {node: '>=18.0'} + + '@docusaurus/utils@3.5.2': + resolution: {integrity: sha512-33QvcNFh+Gv+C2dP9Y9xWEzMgf3JzrpL2nW9PopidiohS1nDcyknKRx2DWaFvyVTTYIkkABVSr073VTj/NITNA==} + engines: {node: '>=18.0'} + peerDependencies: + '@docusaurus/types': '*' + peerDependenciesMeta: + '@docusaurus/types': + optional: true + '@electron-forge/cli@7.4.0': resolution: {integrity: sha512-a+zZv3ja/IxkJzNyx4sOHSZv6DPV85S0PEVF6pcRjUpbDL5r+DxjRFsNc0Nq4UIWyFm1nw7RWoPdd9uDst4Tvg==} engines: {node: '>= 16.4.0'} @@ -4444,6 +5760,12 @@ packages: '@vue/composition-api': optional: true + '@hapi/hoek@9.3.0': + resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} + + '@hapi/topo@5.1.0': + resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} + '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} @@ -4590,9 +5912,8 @@ packages: '@juggle/resize-observer@3.4.0': resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==} - '@koa/cors@5.0.0': - resolution: {integrity: sha512-x/iUDjcS90W69PryLDIMgFyV21YLTnG9zOpPXS7Bkt2b8AsY3zZsIpOLBkYr9fBcF3HbkKaER5hOBZLfpLgYNw==} - engines: {node: '>= 14.0.0'} + '@leichtgewicht/ip-codec@2.0.5': + resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==} '@lit-labs/ssr-dom-shim@1.2.1': resolution: {integrity: sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ==} @@ -4643,11 +5964,37 @@ packages: '@mdn/browser-compat-data@5.5.7': resolution: {integrity: sha512-DoHTZ/TjtNfUu9eiqJd+x3IcCQrhS+yOYU436TKUnlE36jZwNbK535D1CmTsSYdi/UcdCWNm5KRQZ9g1tlZCPw==} + '@mdx-js/mdx@3.0.1': + resolution: {integrity: sha512-eIQ4QTrOWyL3LWEe/bu6Taqzq2HQvHcyTMaOrI95P2/LmJE7AsfPfgJGuFLPVqBUE1BC1rik3VIhU+s9u72arA==} + + '@mdx-js/react@3.0.1': + resolution: {integrity: sha512-9ZrPIU4MGf6et1m1ov3zKf+q9+deetI51zprKB1D/z3NOb+rUxxtEl3mCjW5wTGh6VhRdwPueh1oRzi6ezkA8A==} + peerDependencies: + '@types/react': '>=16' + react: '>=16' + + '@mediapipe/tasks-vision@0.10.8': + resolution: {integrity: sha512-Rp7ll8BHrKB3wXaRFKhrltwZl1CiXGdibPxuWXvqGnKTnv8fqa/nvftYNuSbf+pbJWKYCXdBtYTITdAUTGGh0Q==} + + '@module-federation/runtime@0.6.9': + resolution: {integrity: sha512-G1x+6jyW5sW1X+TtWaKigGhwqiHE8MESvi3ntE9ICxwELAGBonmsqDqnLSrdEy6poBKslvPANPJr0Nn9pvW9lg==} + + '@module-federation/sdk@0.6.9': + resolution: {integrity: sha512-xmTxb9LgncxPGsBrN6AT/+aHnFGv8swbeNl0PcSeVbXTGLu3Gp7j+5J+AhJoWNB++SLguRwBd8LjB1d8mNKLDg==} + + '@module-federation/vite@1.1.1': + resolution: {integrity: sha512-LHYtrQ5ysUQoJQzhq/NIbiAET/2ONGmd2y9kKETAhsaXlLJEmjGOw6TkmSVKUtlz9EqtCfSbFTPQ23DcmE+mjA==} + '@monaco-editor/loader@1.4.0': resolution: {integrity: sha512-00ioBig0x642hytVspPl7DbQyaSWRaolYie/UFNjoTdvoKPzo6xrXLhTk9ixgIKcLH5b5vDOjVNiGyY+uDCUlg==} peerDependencies: monaco-editor: '>= 0.21.0 < 1' + '@monogrid/gainmap-js@3.0.6': + resolution: {integrity: sha512-ireqJg7cw0tUn/JePDG8rAL7RyXgUKSDbjYdiygkrnye1WuKGLAWDBwF/ICwCwJ9iZBAF5caU8gSu+c34HLGdQ==} + peerDependencies: + three: '>= 0.159.0' + '@napi-rs/cli@2.18.4': resolution: {integrity: sha512-SgJeA4df9DE2iAEpr3M2H0OKl/yjtg1BnRI5/JyowS71tUWhrfSu2LT0V3vlHET+g1hBVlrO60PmEXwUEKp8Mg==} engines: {node: '>= 10'} @@ -4746,6 +6093,58 @@ packages: engines: {node: '>=8.0.0', npm: '>=5.0.0'} hasBin: true + '@octokit/auth-token@4.0.0': + resolution: {integrity: sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==} + engines: {node: '>= 18'} + + '@octokit/core@5.2.0': + resolution: {integrity: sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==} + engines: {node: '>= 18'} + + '@octokit/endpoint@9.0.5': + resolution: {integrity: sha512-ekqR4/+PCLkEBF6qgj8WqJfvDq65RH85OAgrtnVp1mSxaXF03u2xW/hUdweGS5654IlC0wkNYC18Z50tSYTAFw==} + engines: {node: '>= 18'} + + '@octokit/graphql@7.1.0': + resolution: {integrity: sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ==} + engines: {node: '>= 18'} + + '@octokit/openapi-types@22.2.0': + resolution: {integrity: sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg==} + + '@octokit/plugin-paginate-rest@11.3.1': + resolution: {integrity: sha512-ryqobs26cLtM1kQxqeZui4v8FeznirUsksiA+RYemMPJ7Micju0WSkv50dBksTuZks9O5cg4wp+t8fZ/cLY56g==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '5' + + '@octokit/plugin-request-log@4.0.1': + resolution: {integrity: sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '5' + + '@octokit/plugin-rest-endpoint-methods@13.2.2': + resolution: {integrity: sha512-EI7kXWidkt3Xlok5uN43suK99VWqc8OaIMktY9d9+RNKl69juoTyxmLoWPIZgJYzi41qj/9zU7G/ljnNOJ5AFA==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': ^5 + + '@octokit/request-error@5.1.0': + resolution: {integrity: sha512-GETXfE05J0+7H2STzekpKObFe765O5dlAKUTLNGeH+x47z7JjXHfsHKo5z21D/o/IOZTUEI6nyWyR+bZVP/n5Q==} + engines: {node: '>= 18'} + + '@octokit/request@8.4.0': + resolution: {integrity: sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==} + engines: {node: '>= 18'} + + '@octokit/rest@20.1.1': + resolution: {integrity: sha512-MB4AYDsM5jhIHro/dq4ix1iWTLGToIGk6cWF5L6vanFaMble5jTX/UBQyiv05HsWnwUtY8JrfHy2LWfKwihqMw==} + engines: {node: '>= 18'} + + '@octokit/types@13.6.1': + resolution: {integrity: sha512-PHZE9Z+kWXb23Ndik8MKPirBPziOc0D2/3KH1P+6jK5nGWe96kadZuE4jev2/Jq7FvIfTlT2Ltg8Fv2x1v0a5g==} + '@open-wc/dedupe-mixin@1.4.0': resolution: {integrity: sha512-Sj7gKl1TLcDbF7B6KUhtvr+1UCxdhMbNY5KxdU5IfMFWqL8oy1ZeAcCANjoB1TL0AJTcPmcCFsCbHf8X2jGDUA==} @@ -5523,6 +6922,18 @@ packages: resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@pnpm/config.env-replace@1.1.0': + resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} + engines: {node: '>=12.22.0'} + + '@pnpm/network.ca-file@1.0.2': + resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} + engines: {node: '>=12.22.0'} + + '@pnpm/npm-conf@2.3.1': + resolution: {integrity: sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==} + engines: {node: '>=12'} + '@polka/url@1.0.0-next.23': resolution: {integrity: sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==} @@ -5535,6 +6946,220 @@ packages: '@popperjs/core@2.11.8': resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} + '@radix-ui/primitive@1.1.0': + resolution: {integrity: sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==} + + '@radix-ui/react-arrow@1.1.0': + resolution: {integrity: sha512-FmlW1rCg7hBpEBwFbjHwCW6AmWLQM6g/v0Sn8XbP9NvmSZ2San1FpQeyPtufzOMSIx7Y4dzjlHoifhp+7NkZhw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-compose-refs@1.1.0': + resolution: {integrity: sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-context@1.1.0': + resolution: {integrity: sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-context@1.1.1': + resolution: {integrity: sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-dismissable-layer@1.1.1': + resolution: {integrity: sha512-QSxg29lfr/xcev6kSz7MAlmDnzbP1eI/Dwn3Tp1ip0KT5CUELsxkekFEMVBEoykI3oV39hKT4TKZzBNMbcTZYQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-icons@1.3.0': + resolution: {integrity: sha512-jQxj/0LKgp+j9BiTXz3O3sgs26RNet2iLWmsPyRz2SIcR4q/4SbazXfnYwbAr+vLYKSfc7qxzyGQA1HLlYiuNw==} + peerDependencies: + react: ^16.x || ^17.x || ^18.x + + '@radix-ui/react-id@1.1.0': + resolution: {integrity: sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-popper@1.2.0': + resolution: {integrity: sha512-ZnRMshKF43aBxVWPWvbj21+7TQCvhuULWJ4gNIKYpRlQt5xGRhLx66tMp8pya2UkGHTSlhpXwmjqltDYHhw7Vg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-portal@1.1.2': + resolution: {integrity: sha512-WeDYLGPxJb/5EGBoedyJbT0MpoULmwnIPMJMSldkuiMsBAv7N1cRdsTWZWht9vpPOiN3qyiGAtbK2is47/uMFg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-presence@1.1.1': + resolution: {integrity: sha512-IeFXVi4YS1K0wVZzXNrbaaUvIJ3qdY+/Ih4eHFhWA9SwGR9UDX7Ck8abvL57C4cv3wwMvUE0OG69Qc3NCcTe/A==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-primitive@2.0.0': + resolution: {integrity: sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-slot@1.1.0': + resolution: {integrity: sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-tooltip@1.1.3': + resolution: {integrity: sha512-Z4w1FIS0BqVFI2c1jZvb/uDVJijJjJ2ZMuPV81oVgTZ7g3BZxobplnMVvXtFWgtozdvYJ+MFWtwkM5S2HnAong==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-use-callback-ref@1.1.0': + resolution: {integrity: sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-controllable-state@1.1.0': + resolution: {integrity: sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-escape-keydown@1.1.0': + resolution: {integrity: sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-layout-effect@1.1.0': + resolution: {integrity: sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-rect@1.1.0': + resolution: {integrity: sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-size@1.1.0': + resolution: {integrity: sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-visually-hidden@1.1.0': + resolution: {integrity: sha512-N8MDZqtgCgG5S3aV60INAB475osJousYpZ4cTJ2cFbMpdHS5Y6loLTH8LPtkj2QN0x93J30HT/M3qJXM0+lyeQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/rect@1.1.0': + resolution: {integrity: sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==} + '@rc-component/color-picker@1.4.1': resolution: {integrity: sha512-vh5EWqnsayZa/JwUznqDaPJz39jznx/YDbyBuVJntv735tKXKwEUZZb2jYEldOg+NKWZwtALjGMrNeGBmqFoEw==} peerDependencies: @@ -5579,6 +7204,97 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' + '@react-spring/animated@9.6.1': + resolution: {integrity: sha512-ls/rJBrAqiAYozjLo5EPPLLOb1LM0lNVQcXODTC1SMtS6DbuBCPaKco5svFUQFMP2dso3O+qcC4k9FsKc0KxMQ==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + + '@react-spring/animated@9.7.5': + resolution: {integrity: sha512-Tqrwz7pIlsSDITzxoLS3n/v/YCUHQdOIKtOJf4yL6kYVSDTSmVK1LI1Q3M/uu2Sx4X3pIWF3xLUhlsA6SPNTNg==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + + '@react-spring/core@9.6.1': + resolution: {integrity: sha512-3HAAinAyCPessyQNNXe5W0OHzRfa8Yo5P748paPcmMowZ/4sMfaZ2ZB6e5x5khQI8NusOHj8nquoutd6FRY5WQ==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + + '@react-spring/core@9.7.5': + resolution: {integrity: sha512-rmEqcxRcu7dWh7MnCcMXLvrf6/SDlSokLaLTxiPlAYi11nN3B5oiCUAblO72o+9z/87j2uzxa2Inm8UbLjXA+w==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + + '@react-spring/rafz@9.6.1': + resolution: {integrity: sha512-v6qbgNRpztJFFfSE3e2W1Uz+g8KnIBs6SmzCzcVVF61GdGfGOuBrbjIcp+nUz301awVmREKi4eMQb2Ab2gGgyQ==} + + '@react-spring/rafz@9.7.5': + resolution: {integrity: sha512-5ZenDQMC48wjUzPAm1EtwQ5Ot3bLIAwwqP2w2owG5KoNdNHpEJV263nGhCeKKmuA3vG2zLLOdu3or6kuDjA6Aw==} + + '@react-spring/shared@9.6.1': + resolution: {integrity: sha512-PBFBXabxFEuF8enNLkVqMC9h5uLRBo6GQhRMQT/nRTnemVENimgRd+0ZT4yFnAQ0AxWNiJfX3qux+bW2LbG6Bw==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + + '@react-spring/shared@9.7.5': + resolution: {integrity: sha512-wdtoJrhUeeyD/PP/zo+np2s1Z820Ohr/BbuVYv+3dVLW7WctoiN7std8rISoYoHpUXtbkpesSKuPIw/6U1w1Pw==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + + '@react-spring/three@9.6.1': + resolution: {integrity: sha512-Tyw2YhZPKJAX3t2FcqvpLRb71CyTe1GvT3V+i+xJzfALgpk10uPGdGaQQ5Xrzmok1340DAeg2pR/MCfaW7b8AA==} + peerDependencies: + '@react-three/fiber': '>=6.0' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + three: '>=0.126' + + '@react-spring/types@9.6.1': + resolution: {integrity: sha512-POu8Mk0hIU3lRXB3bGIGe4VHIwwDsQyoD1F394OK7STTiX9w4dG3cTLljjYswkQN+hDSHRrj4O36kuVa7KPU8Q==} + + '@react-spring/types@9.7.5': + resolution: {integrity: sha512-HVj7LrZ4ReHWBimBvu2SKND3cDVUPWKLqRTmWe/fNY6o1owGOX0cAHbdPDTMelgBlVbrTKrre6lFkhqGZErK/g==} + + '@react-spring/web@9.7.5': + resolution: {integrity: sha512-lmvqGwpe+CSttsWNZVr+Dg62adtKhauGwLyGE/RRyZ8AAMLgb9x3NDMA5RMElXo+IMyTkPp7nxTB8ZQlmhb6JQ==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + + '@react-three/drei@9.112.1': + resolution: {integrity: sha512-2DFR7ChdgQTwDacJDmq7Oi4j7szkhHSd3h9Mu1NbJ06YYfBYzyxA/EDgCCWPgAdiV1b8SbrFeXXpJHoD65vC0Q==} + peerDependencies: + '@react-three/fiber': '>=8.0' + react: '>=18.0' + react-dom: '>=18.0' + three: '>=0.137' + peerDependenciesMeta: + react-dom: + optional: true + + '@react-three/fiber@8.17.7': + resolution: {integrity: sha512-52/TZ0pGdEtjs1bSCePrJe8+5hzYzC8/O4bwx0NXc3GZ3uRCr5Eu+CVsr7BUn2uxd825Zjbup0OXKSDRQ70qiQ==} + peerDependencies: + expo: '>=43.0' + expo-asset: '>=8.4' + expo-file-system: '>=11.0' + expo-gl: '>=11.0' + react: '>=18.0' + react-dom: '>=18.0' + react-native: '>=0.64' + three: '>=0.133' + peerDependenciesMeta: + expo: + optional: true + expo-asset: + optional: true + expo-file-system: + optional: true + expo-gl: + optional: true + react-dom: + optional: true + react-native: + optional: true + '@reactflow/background@11.3.14': resolution: {integrity: sha512-Gewd7blEVT5Lh6jqrvOgd4G6Qk17eGKQfsDXgyRSqM+CTwDqRldG2LsWN4sNeno6sbqVIC2fZ+rAUBFA9ZEUDA==} peerDependencies: @@ -5731,46 +7447,73 @@ packages: cpu: [x64] os: [win32] - '@sentry-internal/browser-utils@8.33.1': - resolution: {integrity: sha512-TW6/r+Gl5jiXv54iK1xZ3mlVgTS/jaBp4vcQ0xGMdgiQ3WchEPcFSeYovL+YHT3tSud0GZqVtDQCz+5i76puqA==} + '@sentry-internal/browser-utils@8.34.0': + resolution: {integrity: sha512-4AcYOzPzD1tL5eSRQ/GpKv5enquZf4dMVUez99/Bh3va8qiJrNP55AcM7UzZ7WZLTqKygIYruJTU5Zu2SpEAPQ==} engines: {node: '>=14.18'} - '@sentry-internal/feedback@8.33.1': - resolution: {integrity: sha512-qauMRTm3qDaLqZ3ibI03cj4gLF40y0ij65nj+cns6iWxGCtPrO8tjvXFWuQsE7Aye9dGMnBgmv7uN+NTUtC3RA==} + '@sentry-internal/feedback@8.34.0': + resolution: {integrity: sha512-aYSM2KPUs0FLPxxbJCFSwCYG70VMzlT04xepD1Y/tTlPPOja/02tSv2tyOdZbv8Uw7xslZs3/8Lhj74oYcTBxw==} engines: {node: '>=14.18'} - '@sentry-internal/replay-canvas@8.33.1': - resolution: {integrity: sha512-nsxTFTPCT10Ty/v6+AiST3+yotGP1sUb8xqfKB9fPnS1hZHFryp0NnEls7xFjBsBbZPU1GpFkzrk/E6JFzixDQ==} + '@sentry-internal/replay-canvas@8.34.0': + resolution: {integrity: sha512-x8KhZcCDpbKHqFOykYXiamX6x0LRxv6N1OJHoH+XCrMtiDBZr4Yo30d/MaS6rjmKGMtSRij30v+Uq+YWIgxUrg==} engines: {node: '>=14.18'} - '@sentry-internal/replay@8.33.1': - resolution: {integrity: sha512-fm4coIOjmanU29NOVN9MyaP4fUCOYytbtFqVSKRFNZQ/xAgNeySiBIbUd6IjujMmnOk9bY0WEUMcdm3Uotjdog==} + '@sentry-internal/replay@8.34.0': + resolution: {integrity: sha512-EoMh9NYljNewZK1quY23YILgtNdGgrkzJ9TPsj6jXUG0LZ0Q7N7eFWd0xOEDBvFxrmI3cSXF1i4d1sBb+eyKRw==} engines: {node: '>=14.18'} - '@sentry/browser@8.33.1': - resolution: {integrity: sha512-c6zI/igexkLwZuGk+u8Rj26ChjxGgkhe6ZbKFsXCYaKAp5ep5X7HQRkkqgbxApiqlC0LduHdd/ymzh139JLg8w==} + '@sentry/browser@8.34.0': + resolution: {integrity: sha512-3HHG2NXxzHq1lVmDy2uRjYjGNf9NsJsTPlOC70vbQdOb+S49EdH/XMPy+J3ruIoyv6Cu0LwvA6bMOM6rHZOgNQ==} engines: {node: '>=14.18'} - '@sentry/core@8.33.1': - resolution: {integrity: sha512-3SS41suXLFzxL3OQvTMZ6q92ZapELVq2l2SoWlZopcamWhog2Ru0dp2vkunq97kFHb2TzKRTlFH4+4gbT8SJug==} + '@sentry/core@8.34.0': + resolution: {integrity: sha512-adrXCTK/zsg5pJ67lgtZqdqHvyx6etMjQW3P82NgWdj83c8fb+zH+K79Z47pD4zQjX0ou2Ws5nwwi4wJbz4bfA==} engines: {node: '>=14.18'} - '@sentry/react@8.33.1': - resolution: {integrity: sha512-SsEX05xfcfOvo7/pK1UyeyTAYWH8iSIsXXlsjvnSRsbuJkjb0c+q6yiZpj3A2PRdbcx43nTVE1n0lSpgaqj2HA==} + '@sentry/react@8.34.0': + resolution: {integrity: sha512-gIgzhj7h67C+Sdq2ul4fOSK142Gf0uV99bqHRdtIiUlXw9yjzZQY5TKTtzbOaevn7qBJ0xrRKtIRUbOBMl0clw==} engines: {node: '>=14.18'} peerDependencies: react: ^16.14.0 || 17.x || 18.x || 19.x - '@sentry/types@8.33.1': - resolution: {integrity: sha512-GjoAMvwtpIemoF/IiwZ7A60g4nQv3qwzR21GvJqDVUoKD0e8pv9OLX+HyXoUat4wEDGSuDUcUyUKD2G+od73QA==} + '@sentry/types@8.34.0': + resolution: {integrity: sha512-zLRc60CzohGCo6zNsNeQ9JF3SiEeRE4aDCP9fDDdIVCOKovS+mn1rtSip0qd0Vp2fidOu0+2yY0ALCz1A3PJSQ==} engines: {node: '>=14.18'} - '@sentry/utils@8.33.1': - resolution: {integrity: sha512-uzuYpiiJuFY3N4WNHMBWUQX5oNv2t/TbG0OHRp3Rr7yeu+HSfD542TIp9/gMZ+G0Cxd8AmVO3wkKIFbk0TL4Qg==} + '@sentry/utils@8.34.0': + resolution: {integrity: sha512-W1KoRlFUjprlh3t86DZPFxLfM6mzjRzshVfMY7vRlJFymBelJsnJ3A1lPeBZM9nCraOSiw6GtOWu6k5BAkiGIg==} engines: {node: '>=14.18'} - '@shikijs/core@1.14.1': - resolution: {integrity: sha512-KyHIIpKNaT20FtFPFjCQB5WVSTpLR/n+jQXhWHWVUMm9MaOaG9BGOG0MSyt7yA4+Lm+4c9rTc03tt3nYzeYSfw==} + '@shikijs/core@1.22.0': + resolution: {integrity: sha512-S8sMe4q71TJAW+qG93s5VaiihujRK6rqDFqBnxqvga/3LvqHEnxqBIOPkt//IdXVtHkQWKu4nOQNk0uBGicU7Q==} + + '@shikijs/engine-javascript@1.22.0': + resolution: {integrity: sha512-AeEtF4Gcck2dwBqCFUKYfsCq0s+eEbCEbkUuFou53NZ0sTGnJnJ/05KHQFZxpii5HMXbocV9URYVowOP2wH5kw==} + + '@shikijs/engine-oniguruma@1.22.0': + resolution: {integrity: sha512-5iBVjhu/DYs1HB0BKsRRFipRrD7rqjxlWTj4F2Pf+nQSPqc3kcyqFFeZXnBMzDf0HdqaFVvhDRAGiYNvyLP+Mw==} + + '@shikijs/markdown-it@1.22.0': + resolution: {integrity: sha512-IAWi2pbzYndiuXOWnV5Ll4ULQJeWl45WUACl1Xc2KSiBl0JtQmqKvPOGKN7YSZbyIzkB6bWUItRrv5ucO35U+g==} + + '@shikijs/transformers@1.22.0': + resolution: {integrity: sha512-k7iMOYuGQA62KwAuJOQBgH2IQb5vP8uiB3lMvAMGUgAMMurePOx3Z7oNqJdcpxqZP6I9cc7nc4DNqSKduCxmdg==} + + '@shikijs/types@1.22.0': + resolution: {integrity: sha512-Fw/Nr7FGFhlQqHfxzZY8Cwtwk5E9nKDUgeLjZgt3UuhcM3yJR9xj3ZGNravZZok8XmEZMiYkSMTPlPkULB8nww==} + + '@shikijs/vscode-textmate@9.3.0': + resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==} + + '@sideway/address@4.1.5': + resolution: {integrity: sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==} + + '@sideway/formula@3.0.1': + resolution: {integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==} + + '@sideway/pinpoint@2.0.0': + resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==} '@simonwep/pickr@1.8.2': resolution: {integrity: sha512-/l5w8BIkrpP6n1xsetx9MWPWlU6OblN5YgZZphxan0Tq4BByTCETL6lyIeY8lagalS2Nbt4F2W034KHLIiunKA==} @@ -5785,12 +7528,27 @@ packages: resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} engines: {node: '>=10'} + '@sindresorhus/is@5.6.0': + resolution: {integrity: sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==} + engines: {node: '>=14.16'} + '@sinonjs/commons@3.0.1': resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} '@sinonjs/fake-timers@10.3.0': resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + '@slorber/react-ideal-image@0.0.12': + resolution: {integrity: sha512-u8KiDTEkMA7/KAeA5ywg/P7YG4zuKhWtswfVZDH8R8HXgQsFcHIYU2WaQnGuK/Du7Wdj90I+SdFmajSGFRvoKA==} + engines: {node: '>= 8.9.0', npm: '> 3'} + peerDependencies: + prop-types: '>=15' + react: '>=0.14.x' + react-waypoint: '>=9.0.2' + + '@slorber/remark-comment@1.0.0': + resolution: {integrity: sha512-RCE24n7jsOj1M0UPvIQCHTe7fI0sFL4S2nwKVWwHyVr/wI/H8GosgsJGyhnsZoGFnD/P2hLf1mSbrrgSLN93NA==} + '@solidjs/router@0.10.3': resolution: {integrity: sha512-UZyUcGbMzeJWCJZthWfveFbv9FyMLi62+BHpXyVwAYpowHaUkkV3WVKoYxYF9m47fVG23UfUo2S6GbuyPAyCjw==} peerDependencies: @@ -5806,6 +7564,11 @@ packages: engines: {node: '>=16.0.0', npm: '>=7.10.0'} hasBin: true + '@stitches/react@1.2.8': + resolution: {integrity: sha512-9g9dWI4gsSVe8bNLlb+lMkBYsnIKCZTmvqvDG+Avnn69XfmHZKiaMrx7cgTaddq7aTPPmXiTsbFcUy0xgI4+wA==} + peerDependencies: + react: '>= 16.3.0' + '@sveltejs/vite-plugin-svelte-inspector@2.0.0': resolution: {integrity: sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==} engines: {node: ^18.0.0 || >=20} @@ -5889,6 +7652,85 @@ packages: peerDependencies: '@svgr/core': '*' + '@svgr/plugin-svgo@8.1.0': + resolution: {integrity: sha512-Ywtl837OGO9pTLIN/onoWLmDQ4zFUycI1g76vuKGEz6evR/ZTJlJuz3G/fIkb6OVBJ2g0o6CGJzaEjfmEo3AHA==} + engines: {node: '>=14'} + peerDependencies: + '@svgr/core': '*' + + '@svgr/webpack@8.1.0': + resolution: {integrity: sha512-LnhVjMWyMQV9ZmeEy26maJk+8HTIbd59cH4F2MJ439k9DqejRisfFNGAPvRYlKETuh9LrImlS8aKsBgKjMA8WA==} + engines: {node: '>=14'} + + '@swc/core-darwin-arm64@1.7.26': + resolution: {integrity: sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + + '@swc/core-darwin-x64@1.7.26': + resolution: {integrity: sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + + '@swc/core-linux-arm-gnueabihf@1.7.26': + resolution: {integrity: sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + + '@swc/core-linux-arm64-gnu@1.7.26': + resolution: {integrity: sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + + '@swc/core-linux-arm64-musl@1.7.26': + resolution: {integrity: sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + + '@swc/core-linux-x64-gnu@1.7.26': + resolution: {integrity: sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + + '@swc/core-linux-x64-musl@1.7.26': + resolution: {integrity: sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + + '@swc/core-win32-arm64-msvc@1.7.26': + resolution: {integrity: sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + + '@swc/core-win32-ia32-msvc@1.7.26': + resolution: {integrity: sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + + '@swc/core-win32-x64-msvc@1.7.26': + resolution: {integrity: sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + + '@swc/core@1.7.26': + resolution: {integrity: sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw==} + engines: {node: '>=10'} + peerDependencies: + '@swc/helpers': '*' + peerDependenciesMeta: + '@swc/helpers': + optional: true + '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} @@ -5898,6 +7740,9 @@ packages: '@swc/plugin-emotion@3.0.9': resolution: {integrity: sha512-kPvC306/1FBZ4yiOhjm3EDErI4eWJQrNa8bFCDzmHvFW1zokoyRQazzYVterVPsweepmEdftrPRLoB3pQHfo1A==} + '@swc/types@0.1.12': + resolution: {integrity: sha512-wBJA+SdtkbFhHjTMYH+dEH1y4VpfGdAc2Kw/LK09i9bXd/K6j6PkDcFCEzb6iVfZMkPRrl/q0e3toqTAJdkIVA==} + '@sxzz/popperjs-es@2.11.7': resolution: {integrity: sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==} @@ -5905,6 +7750,18 @@ packages: resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} engines: {node: '>=10'} + '@szmarczak/http-timer@5.0.1': + resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} + engines: {node: '>=14.16'} + + '@tabler/icons-react@3.19.0': + resolution: {integrity: sha512-AqEWGI0tQWgqo6ZjMO5yJ9sYT8oXLuAM/up0hN9iENS6IdtNZryKrkNSiMgpwweNTpl8wFFG/dAZ959S91A/uQ==} + peerDependencies: + react: '>= 16' + + '@tabler/icons@3.19.0': + resolution: {integrity: sha512-A4WEWqpdbTfnpFEtwXqwAe9qf9sp1yRPvzppqAuwcoF0q5YInqB+JkJtSFToCyBpPVeLxJUxxkapLvt2qQgnag==} + '@tanstack/query-core@5.40.0': resolution: {integrity: sha512-eD8K8jsOIq0Z5u/QbvOmfvKKE/XC39jA7yv4hgpl/1SRiU+J8QCIwgM/mEHuunQsL87dcvnHqSVLmf9pD4CiaA==} @@ -6279,9 +8136,15 @@ packages: '@turf/voronoi@6.5.0': resolution: {integrity: sha512-C/xUsywYX+7h1UyNqnydHXiun4UPjK88VDghtoRypR9cLlb7qozkiLRphQxxsCM0KxyxpVPHBVQXdAL3+Yurow==} + '@tweenjs/tween.js@23.1.3': + resolution: {integrity: sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==} + '@types/accepts@1.3.6': resolution: {integrity: sha512-6+qlUg57yfE9OO63wnsJXLeq9cG3gSHBBIxNMOjNrbDRlDnm/NaR7RctfYcVCPq+j7d+MwOxqVEludH5+FKrlg==} + '@types/acorn@4.0.6': + resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} + '@types/babel__core@7.20.3': resolution: {integrity: sha512-54fjTSeSHwfan8AyHWrKbfBWiEUrNTZsUwPTDSNaaP1QDQIZbeNUg3a59E9D+375MzUw/x1vx2/0F5LBz+AeYA==} @@ -6300,6 +8163,9 @@ packages: '@types/body-parser@1.19.4': resolution: {integrity: sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==} + '@types/bonjour@3.5.13': + resolution: {integrity: sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==} + '@types/cacheable-request@6.0.3': resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} @@ -6316,8 +8182,14 @@ packages: '@types/color@3.0.6': resolution: {integrity: sha512-NMiNcZFRUAiUUCCf7zkAelY8eV3aKqfbzyFQlXpPIEeoNDbsEHGpb854V3gzTsGKYj830I5zPuOwU/TP5/cW6A==} - '@types/connect@3.4.37': - resolution: {integrity: sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==} + '@types/compression@1.7.5': + resolution: {integrity: sha512-AAQvK5pxMpaT+nDvhHrsBhLSYG5yQdtkaJE1WYieSNY2mVFKAgmU4ks65rkZD5oqnGCFLyQpUr1CqI4DmUMyDg==} + + '@types/connect-history-api-fallback@1.5.4': + resolution: {integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==} + + '@types/connect@3.4.38': + resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} '@types/content-disposition@0.5.7': resolution: {integrity: sha512-V9/5u21RHFR1zfdm3rQ6pJUKV+zSSVQt+yq16i1YhdivVzWgPEoKedc3GdT8aFjsqQbakdxuy3FnEdePUQOamQ==} @@ -6328,8 +8200,8 @@ packages: '@types/cookies@0.7.9': resolution: {integrity: sha512-SrGYvhKohd/WSOII0WpflC73RgdJhQoqpwq9q+n/qugNGiDSGYXfHy3QvB4+X+J/gYe27j2fSRnK4B+1A3nvsw==} - '@types/cross-spawn@6.0.4': - resolution: {integrity: sha512-GGLpeThc2Bu8FBGmVn76ZU3lix17qZensEI4/MPty0aZpm2CHfgEMis31pf5X5EiudYKcPAsWciAsCALoPo5dw==} + '@types/cors@2.8.17': + resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} '@types/d3-array@3.2.1': resolution: {integrity: sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==} @@ -6424,9 +8296,15 @@ packages: '@types/d3@7.4.3': resolution: {integrity: sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==} + '@types/debounce@1.2.4': + resolution: {integrity: sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw==} + '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/draco3d@1.4.10': + resolution: {integrity: sha512-AX22jp8Y7wwaBgAixaSvkoG4M/+PlAcm3Qs4OW8yT9DM4xUpWKeFhLueTAyZF39pviAdcDdeJoACapiAceqNcw==} + '@types/envinfo@7.8.3': resolution: {integrity: sha512-qzV1XMjmzgmndci6L5HlzExf4w9A5jQPNpW/t4sSljErKbS8y6231ToHO9ir2Xjf+2zG1C540+Wmh0zpUsGu0A==} @@ -6436,18 +8314,27 @@ packages: '@types/eslint@8.56.10': resolution: {integrity: sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==} + '@types/estree-jsx@1.0.5': + resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} + '@types/estree@1.0.4': resolution: {integrity: sha512-2JwWnHK9H+wUZNorf2Zr6ves96WHoWDJIftkcxPKsS7Djta6Zu519LarhRNljPXkpsZR2ZMwNCPeW7omW07BJw==} '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/etag@1.8.3': + resolution: {integrity: sha512-QYHv9Yeh1ZYSMPQOoxY4XC4F1r+xRUiAriB303F4G6uBsT3KKX60DjiogvVv+2VISVDuJhcIzMdbjT+Bm938QQ==} + '@types/express-serve-static-core@4.17.39': resolution: {integrity: sha512-BiEUfAiGCOllomsRAZOiMFP7LAnrifHpt56pc4Z7l9K6ACyN06Ns1JLMBxwkfLOjJRlSf06NwWsT7yzfpaVpyQ==} '@types/express@4.17.21': resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} + '@types/figlet@1.7.0': + resolution: {integrity: sha512-KwrT7p/8Eo3Op/HBSIwGXOsTZKYiM9NpWRBJ5sVjWP/SmlS+oxxRvJht/FNAtliJvja44N3ul1yATgohnVBV0Q==} + '@types/fs-extra@11.0.3': resolution: {integrity: sha512-sF59BlXtUdzEAL1u0MSvuzWd7PdZvZEtnaVkzX5mjpdWTJ8brG0jUqve3jPCzSzvAKKMHTG8F8o/WMQLtleZdQ==} @@ -6463,15 +8350,24 @@ packages: '@types/graceful-fs@4.1.9': resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} + '@types/gtag.js@0.0.12': + resolution: {integrity: sha512-YQV9bUsemkzG81Ea295/nF/5GijnD2Af7QhEofh7xu+kvCN6RdodgNwwGWXB5GMI3NoyvQo0odNctoH/qLMIpg==} + '@types/hast@2.3.10': resolution: {integrity: sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==} '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/history@4.7.11': + resolution: {integrity: sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==} + '@types/hoist-non-react-statics@3.3.4': resolution: {integrity: sha512-ZchYkbieA+7tnxwX/SCBySx9WwvWR8TaP5tb2jRAzwvLb/rWchGw3v0w3pqUbUvj0GCwW2Xz/AVPSk6kUGctXQ==} + '@types/html-minifier-terser@6.1.0': + resolution: {integrity: sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==} + '@types/http-assert@1.5.4': resolution: {integrity: sha512-/6M9aaVk+avzCsrv1lt39AlFw4faCNI6aGll91Rxj38ZE5JI8AxApyQIRy+i1McjiJiuQ0sfuoMLxqq374ZIbA==} @@ -6484,12 +8380,6 @@ packages: '@types/http-proxy@1.17.14': resolution: {integrity: sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==} - '@types/inquirer@9.0.6': - resolution: {integrity: sha512-1Go1AAP/yOy3Pth5Xf1DC3nfZ03cJLCPx6E2YnSN/5I3w1jHBVH4170DkZ+JxfmA7c9kL9+bf9z3FRGa4kNAqg==} - - '@types/is-ci@3.0.3': - resolution: {integrity: sha512-FdHbjLiN2e8fk9QYQyVYZrK8svUDJpxSaSWLUga8EZS1RGAvvrqM9zbVARBtQuYPeLgnJxM2xloOswPwj1o2cQ==} - '@types/istanbul-lib-coverage@2.0.5': resolution: {integrity: sha512-zONci81DZYCZjiLe0r6equvZut0b+dBRPBN5kBDjsONnutYNtJMoWQ9uR2RkL1gLG9NMTzvf+29e5RFfPbeKhQ==} @@ -6529,21 +8419,9 @@ packages: '@types/koa-compose@3.2.7': resolution: {integrity: sha512-smtvSL/oLICPuenxy73OmxKGh42VVfn2o2eutReH1yjij0LmxADBpGcAJbp4N+yJjPapPN7jAX9p7Ue0JMQ/Ag==} - '@types/koa-compress@4.0.5': - resolution: {integrity: sha512-RmBhY5nFRd4R/d/beyQskeL0Gt/N8epJIAKie6nYpRumLXM0bS8J/35TJ5bYAPiwxLCN+xNzlfS2aED3+ifQZg==} - - '@types/koa-send@4.1.5': - resolution: {integrity: sha512-O2qnxAKr7MoAxHHUitJejMWw45b9QtgTra0pnVDl/XoNdYTdZOgwj8wSVDon0qXg/lrcYHye4LFbAaSfSWwnrg==} - - '@types/koa-static@4.0.3': - resolution: {integrity: sha512-4U9uZwXqYAudDLDVkw1prJM5avn9/lHLVEwoyyI/ITZluWkBdmirkj8EsOLG6kLr0XFZdViR0ZBtQ3oetSsr3g==} - '@types/koa@2.13.10': resolution: {integrity: sha512-weKc5IBeORLDGwD1FMgPjaZIg0/mtP7KxXAXEzPRCN78k274D9U2acmccDNPL1MwyV40Jj+hQQ5N2eaV6O0z8g==} - '@types/koa__cors@5.0.0': - resolution: {integrity: sha512-LCk/n25Obq5qlernGOK/2LUwa/2YJb2lxHUkkvYFDOpLXlVI6tKcdfCHRBQnOY4LwH6el5WOLs6PD/a8Uzau6g==} - '@types/less@3.0.5': resolution: {integrity: sha512-OdhItUN0/Cx9+sWumdb3dxASoA0yStnZahvKcaSQmSR5qd7hZ6zhSriSQGUU3F8GkzFpIILKzut4xn9/GvhusA==} @@ -6559,9 +8437,18 @@ packages: '@types/mdast@3.0.15': resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==} + '@types/mdast@4.0.4': + resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + + '@types/mdx@2.0.13': + resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} + '@types/methods@1.1.4': resolution: {integrity: sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==} + '@types/mime-types@2.1.4': + resolution: {integrity: sha512-lfU4b34HOri+kAY5UheuFMWPDOI+OPceBSHZKp69gEyTL/mmJ4cnU6Y/rlme3UL3GyOn6Y42hyIEw0/q8sWx5w==} + '@types/mime@1.3.4': resolution: {integrity: sha512-1Gjee59G25MrQGk8bsNvC6fxNiRgUlGn2wlhGf95a59DrprnnHk80FIMMFG9XHMdrfsuA119ht06QPDXA1Z7tw==} @@ -6577,6 +8464,9 @@ packages: '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} + '@types/node-forge@1.3.11': + resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} + '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} @@ -6595,12 +8485,21 @@ packages: '@types/node@20.5.1': resolution: {integrity: sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==} + '@types/node@22.3.0': + resolution: {integrity: sha512-nrWpWVaDZuaVc5X84xJ0vNrLvomM205oQyLsRt7OHNZbSHslcWsvgFR7O7hire2ZonjLrWBbedmotmIlJDVd6g==} + + '@types/node@22.5.0': + resolution: {integrity: sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==} + '@types/normalize-package-data@2.4.3': resolution: {integrity: sha512-ehPtgRgaULsFG8x0NeYJvmyH1hmlfsNLujHe9dQEia/7MAJYdzMSi19JtchUHjmBA6XC/75dK55mzZH+RyieSg==} '@types/object-path@0.11.4': resolution: {integrity: sha512-4tgJ1Z3elF/tOMpA8JLVuR9spt9Ynsf7+JjqsQ2IqtiPJtcLoHoXcT6qU4E10cPFqyXX5HDm9QwIzZhBSkLxsw==} + '@types/offscreencanvas@2019.7.3': + resolution: {integrity: sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A==} + '@types/parse-json@4.0.1': resolution: {integrity: sha512-3YmXzzPAdOTVljVMkTMBdBEvlOLg2cDQaDhnnhT3nT9uDbnJzjWhKlzb+desT12Y7tGqaN6d+AbozcKzyL36Ng==} @@ -6613,6 +8512,9 @@ packages: '@types/postcss-url@10.0.4': resolution: {integrity: sha512-5QIO9NgbWmAkle65haRqkdgYPCOXheNsaFdbTJJQjT302yK3H49ql4t9a4y0NfpuPtU/UBo15VcV64WCSIMJKg==} + '@types/prismjs@1.26.4': + resolution: {integrity: sha512-rlAnzkW2sZOjbqZ743IHUhFcvzaGbqijwOu8QZnZCjfQzBqFE3s4lOTJEsxikImav9uzz/42I+O7YUs1mWgMlg==} + '@types/prompts@2.4.7': resolution: {integrity: sha512-5zTamE+QQM4nR6Ab3yHK+ovWuhLJXaa2ZLt3mT1en8U3ubWtjVT1vXDaVFC2+cL89uVn7Y+gIq5B3IcVvBl5xQ==} @@ -6634,18 +8536,39 @@ packages: '@types/react-dom@18.2.14': resolution: {integrity: sha512-V835xgdSVmyQmI1KLV2BEIUgqEuinxp9O4G6g3FqO/SqLac049E53aysv0oEFD2kHfejeKU+ZqL2bcFWj9gLAQ==} + '@types/react-reconciler@0.26.7': + resolution: {integrity: sha512-mBDYl8x+oyPX/VBb3E638N0B7xG+SPk/EAMcVPeexqus/5aTpTphQi0curhhshOqRrc9t6OPoJfEUkbymse/lQ==} + + '@types/react-reconciler@0.28.8': + resolution: {integrity: sha512-SN9c4kxXZonFhbX4hJrZy37yw9e7EIxcpHCxQv5JUS18wDE5ovkQKlqQEkufdJCCMfuI9BnjUJvhYeJ9x5Ra7g==} + '@types/react-redux@7.1.33': resolution: {integrity: sha512-NF8m5AjWCkert+fosDsN3hAlHzpjSiXlVy9EgQEmLoBhaNXbmyeGs/aj5dQzKuF+/q+S7JQagorGDW8pJ28Hmg==} + '@types/react-router-config@5.0.11': + resolution: {integrity: sha512-WmSAg7WgqW7m4x8Mt4N6ZyKz0BubSj/2tVUMsAHp+Yd2AMwcSbeFq9WympT19p5heCFmF97R9eD5uUR/t4HEqw==} + + '@types/react-router-dom@5.3.3': + resolution: {integrity: sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==} + + '@types/react-router@5.1.20': + resolution: {integrity: sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==} + '@types/react@18.2.35': resolution: {integrity: sha512-LG3xpFZ++rTndV+/XFyX5vUP7NI9yxyk+MQvBDq+CVs8I9DLSc3Ymwb1Vmw5YDoeNeHN4PDZa3HylMKJYT9PNQ==} '@types/responselike@1.0.3': resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} + '@types/retry@0.12.0': + resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} + '@types/sass@1.43.1': resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==} + '@types/sax@1.2.7': + resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} + '@types/scheduler@0.16.5': resolution: {integrity: sha512-s/FPdYRmZR8SjLWGMCuax7r3qCWQw9QKHzXVukAuuIJkXkDRwp+Pu5LMIVFi0Fxbav35WURicYr8u1QsoybnQw==} @@ -6655,12 +8578,18 @@ packages: '@types/send@0.17.3': resolution: {integrity: sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==} + '@types/serve-index@1.9.4': + resolution: {integrity: sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug==} + '@types/serve-static@1.15.4': resolution: {integrity: sha512-aqqNfs1XTF0HDrFdlY//+SGUxmdSUbjeRXb5iaZc3x0/vMbYmdw9qvOgHWOyyLFxSSRnUuP5+724zBgfw8/WAw==} '@types/sizzle@2.3.8': resolution: {integrity: sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==} + '@types/sockjs@0.3.36': + resolution: {integrity: sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==} + '@types/sortablejs@1.15.7': resolution: {integrity: sha512-PvgWCx1Lbgm88FdQ6S7OGvLIjWS66mudKPlfdrWil0TjsO5zmoZmzoKiiwRShs1dwPgrlkr0N4ewuy0/+QUXYQ==} @@ -6670,6 +8599,9 @@ packages: '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} + '@types/stats.js@0.17.3': + resolution: {integrity: sha512-pXNfAD3KHOdif9EQXZ9deK82HVNaXP5ZIF5RP2QG6OQFNTaY2YIetfrE9t528vEreGQvEPRDDc8muaoYeK0SxQ==} + '@types/stylus@0.48.41': resolution: {integrity: sha512-u0BzfnIgn/0I1YpAJGhkj9lUTLeiuiDXYOagXwe2aAsX8OKDFEWP6vqMMPxy4leQeX45LNDdCEjDJkuRxPCv7A==} @@ -6679,8 +8611,8 @@ packages: '@types/supertest@6.0.2': resolution: {integrity: sha512-137ypx2lk/wTQbW6An6safu9hXmajAifU/s7szAHLN/FeIm5w7yR0Wkl9fdJMRSHwOn4HLAI0DaB2TOORuhPDg==} - '@types/through@0.0.32': - resolution: {integrity: sha512-7XsfXIsjdfJM2wFDRAtEWp3zb2aVPk5QeyZxGlVK57q4u26DczMHhJmlhr0Jqv0THwxam/L8REXkj8M2I/lcvw==} + '@types/three@0.163.0': + resolution: {integrity: sha512-uIdDhsXRpQiBUkflBS/i1l3JX14fW6Ot9csed60nfbZNXHDTRsnV2xnTVwXcgbvTiboAR4IW+t+lTL5f1rqIqA==} '@types/tinycolor2@1.4.5': resolution: {integrity: sha512-uLJijDHN5E6j5n1qefF9oaeplgszXglWXWTviMoFr/YxgvbyrkFil20yDT7ljhCiTQ/BfCYtxfJS81LdTro5DQ==} @@ -6706,6 +8638,9 @@ packages: '@types/web-bluetooth@0.0.16': resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==} + '@types/webxr@0.5.20': + resolution: {integrity: sha512-JGpU6qiIJQKUuVSKx1GtQnHJGxRjtfGIhzO2ilq43VZZS//f1h1Sgexbdk+Lq+7569a6EYhOWrUpIruR/1Enmg==} + '@types/ws@8.5.8': resolution: {integrity: sha512-flUksGIQCnJd6sZ1l5dqCEG/ksaoAg/eUwiLAGTJQcfgvZJKF++Ta4bJA6A5aPSJmsr+xlseHn4KLgVlNnvPTg==} @@ -6776,6 +8711,15 @@ packages: resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} engines: {node: ^16.0.0 || >=18.0.0} + '@typescript/twoslash@3.1.0': + resolution: {integrity: sha512-kTwMUQ8xtAZaC4wb2XuLkPqFVBj2dNBueMQ89NWEuw87k2nLBbuafeG5cob/QEr6YduxIdTVUjix0MtC7mPlmg==} + + '@typescript/vfs@1.3.4': + resolution: {integrity: sha512-RbyJiaAGQPIcAGWFa3jAXSuAexU4BFiDRF1g3hy7LmRqfNpYlTQWGXjcrOaVZjJ8YkkpuwG0FcsYvtWQpd9igQ==} + + '@typescript/vfs@1.3.5': + resolution: {integrity: sha512-pI8Saqjupf9MfLw7w2+og+fmb0fZS0J6vsKXXrp4/PDXEFvntgzXmChCXC/KefZZS0YGS6AT8e0hGAJcTsdJlg==} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -6865,6 +8809,14 @@ packages: peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 + '@use-gesture/core@10.3.1': + resolution: {integrity: sha512-WcINiDt8WjqBdUXye25anHiNxPc0VOrlT8F6LLkU6cycrOGUDyY/yyFmsg3k8i5OLvv25llc0QC45GhR/C8llw==} + + '@use-gesture/react@10.3.1': + resolution: {integrity: sha512-Yy19y6O2GJq8f7CHf7L0nxL8bf4PZCPaVOCgJrusOeFHY1LvHgYXnmnXg6N5iwAnbgbZCDjo60SiM6IPJi9C5g==} + peerDependencies: + react: '>= 16.8.0' + '@vaadin/a11y-base@24.3.22': resolution: {integrity: sha512-QrVsB7R+WGHlwEzVyvhwL6HvAGErF6CHTDBEyvKyt3jmjIqRDiCBGjvq6g/SHYUUNQNH1u892ANXGHLAQGGqLQ==} @@ -6989,21 +8941,50 @@ packages: '@vitest/expect@2.0.4': resolution: {integrity: sha512-39jr5EguIoanChvBqe34I8m1hJFI4+jxvdOpD7gslZrVQBKhh8H9eD7J/LJX4zakrw23W+dITQTDqdt43xVcJw==} + '@vitest/expect@2.1.2': + resolution: {integrity: sha512-FEgtlN8mIUSEAAnlvn7mP8vzaWhEaAEvhSXCqrsijM7K6QqjB11qoRZYEd4AKSCDz8p0/+yH5LzhZ47qt+EyPg==} + + '@vitest/mocker@2.1.2': + resolution: {integrity: sha512-ExElkCGMS13JAJy+812fw1aCv2QO/LBK6CyO4WOPAzLTmve50gydOlWhgdBJPx2ztbADUq3JVI0C5U+bShaeEA==} + peerDependencies: + msw: ^2.3.5 + vite: ^5.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + '@vitest/pretty-format@2.0.4': resolution: {integrity: sha512-RYZl31STbNGqf4l2eQM1nvKPXE0NhC6Eq0suTTePc4mtMQ1Fn8qZmjV4emZdEdG2NOWGKSCrHZjmTqDCDoeFBw==} + '@vitest/pretty-format@2.1.2': + resolution: {integrity: sha512-FIoglbHrSUlOJPDGIrh2bjX1sNars5HbxlcsFKCtKzu4+5lpsRhOCVcuzp0fEhAGHkPZRIXVNzPcpSlkoZ3LuA==} + '@vitest/runner@2.0.4': resolution: {integrity: sha512-Gk+9Su/2H2zNfNdeJR124gZckd5st4YoSuhF1Rebi37qTXKnqYyFCd9KP4vl2cQHbtuVKjfEKrNJxHHCW8thbQ==} + '@vitest/runner@2.1.2': + resolution: {integrity: sha512-UCsPtvluHO3u7jdoONGjOSil+uON5SSvU9buQh3lP7GgUXHp78guN1wRmZDX4wGK6J10f9NUtP6pO+SFquoMlw==} + '@vitest/snapshot@2.0.4': resolution: {integrity: sha512-or6Mzoz/pD7xTvuJMFYEtso1vJo1S5u6zBTinfl+7smGUhqybn6VjzCDMhmTyVOFWwkCMuNjmNNxnyXPgKDoPw==} + '@vitest/snapshot@2.1.2': + resolution: {integrity: sha512-xtAeNsZ++aRIYIUsek7VHzry/9AcxeULlegBvsdLncLmNCR6tR8SRjn8BbDP4naxtccvzTqZ+L1ltZlRCfBZFA==} + '@vitest/spy@2.0.4': resolution: {integrity: sha512-uTXU56TNoYrTohb+6CseP8IqNwlNdtPwEO0AWl+5j7NelS6x0xZZtP0bDWaLvOfUbaYwhhWp1guzXUxkC7mW7Q==} + '@vitest/spy@2.1.2': + resolution: {integrity: sha512-GSUi5zoy+abNRJwmFhBDC0yRuVUn8WMlQscvnbbXdKLXX9dE59YbfwXxuJ/mth6eeqIzofU8BB5XDo/Ns/qK2A==} + '@vitest/utils@2.0.4': resolution: {integrity: sha512-Zc75QuuoJhOBnlo99ZVUkJIuq4Oj0zAkrQ2VzCqNCx6wAwViHEh5Fnp4fiJTE9rA+sAoXRf00Z9xGgfEzV6fzQ==} + '@vitest/utils@2.1.2': + resolution: {integrity: sha512-zMO2KdYy6mx56btx9JvAqAZ6EyS3g49krMPPrgOp1yxGZiA93HumGk+bZ5jIZtOg5/VBYl5eBmGRQHqq4FG6uQ==} + '@vue-macros/common@1.10.0': resolution: {integrity: sha512-4DZsPeQA/nBQDw2RkYAmH7KrFjJVrMdAhJhO1JCl1bbbFXCGeoGjXfkg9wHPppj47s2HpAB3GrqNwqVGbi12NQ==} engines: {node: '>=16.14.0'} @@ -7162,6 +9143,9 @@ packages: '@vue/devtools-api@6.5.1': resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==} + '@vue/devtools-api@6.6.4': + resolution: {integrity: sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==} + '@vue/reactivity-transform@3.3.12': resolution: {integrity: sha512-g5TijmML7FyKkLt6QnpqNmA4KD7K/T5SbXa88Bhq+hydNQEkzA8veVXWAQuNqg9rjaFYD0rPf0a9NofKA0ENgg==} @@ -7368,6 +9352,10 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + address@1.2.2: + resolution: {integrity: sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==} + engines: {node: '>= 10.0.0'} + adler-32@1.2.0: resolution: {integrity: sha512-/vUqU/UY4MVeFsg+SsK6c+/05RZXIHZMGJA+PX5JyWI0ZRcBpupnRuPLU/NXXoFwMYCPCoxIfElM2eS+DUXCqQ==} engines: {node: '>=0.8'} @@ -7406,6 +9394,11 @@ packages: peerDependencies: ajv: ^6.9.1 + ajv-keywords@5.1.0: + resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} + peerDependencies: + ajv: ^8.8.2 + ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} @@ -7415,6 +9408,14 @@ packages: ajv@8.12.0: resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + algoliasearch-helper@3.22.5: + resolution: {integrity: sha512-lWvhdnc+aKOKx8jyA3bsdEgHzm/sglC4cYdMG4xSQyRiPLJVJtH/IVYZG3Hp6PkTEhQqhyVYkeP9z2IlcHJsWw==} + peerDependencies: + algoliasearch: '>= 3.1 < 6' + + algoliasearch@4.24.0: + resolution: {integrity: sha512-bf0QV/9jVejssFBmz2HQLxUadxk574t4iwjCKp5E7NBzwKkrDEhKPISIIjAU/p6K5qDx3qoeh4+26zWN1jmw3g==} + align-text@0.1.4: resolution: {integrity: sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==} engines: {node: '>=0.10.0'} @@ -7442,6 +9443,11 @@ packages: resolution: {integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==} engines: {node: '>=12'} + ansi-html-community@0.0.8: + resolution: {integrity: sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==} + engines: {'0': node >= 0.8.0} + hasBin: true + ansi-regex@2.1.1: resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} engines: {node: '>=0.10.0'} @@ -7645,6 +9651,10 @@ packages: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} + astring@1.9.0: + resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==} + hasBin: true + async-exit-hook@2.0.1: resolution: {integrity: sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==} engines: {node: '>=0.12.0'} @@ -7667,6 +9677,10 @@ packages: engines: {node: '>= 4.5.0'} hasBin: true + attr-accept@2.2.2: + resolution: {integrity: sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg==} + engines: {node: '>=4'} + author-regex@1.0.0: resolution: {integrity: sha512-KbWgR8wOYRAPekEmMXrYYdc7BRyhn2Ftk7KWfMUnQ43hFdojWEFRxhhRUm3/OFEdPa1r0KAvTTg9YQK57xTe0g==} engines: {node: '>=0.8'} @@ -7678,6 +9692,13 @@ packages: peerDependencies: postcss: ^8.1.0 + autoprefixer@10.4.20: + resolution: {integrity: sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} @@ -7694,6 +9715,9 @@ packages: axios@1.7.2: resolution: {integrity: sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==} + axios@1.7.7: + resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} + axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} @@ -7703,12 +9727,25 @@ packages: b-validate@1.5.3: resolution: {integrity: sha512-iCvCkGFskbaYtfQ0a3GmcQCHl/Sv1GufXFGuUQ+FE+WJa7A/espLOuFIn09B944V8/ImPj71T4+rTASxO2PAuA==} + b4a@1.6.7: + resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==} + babel-jest@29.7.0: resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@babel/core': ^7.8.0 + babel-loader@9.2.1: + resolution: {integrity: sha512-fqe8naHt46e0yIdkjUZYqddSXfej3AHajX+CSO5X7oy0EmPc6o5Xh+RClNoHjnieWz9AW4kZxW9yyFMhVB1QLA==} + engines: {node: '>= 14.15.0'} + peerDependencies: + '@babel/core': ^7.12.0 + webpack: '>=5' + + babel-plugin-dynamic-import-node@2.3.3: + resolution: {integrity: sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==} + babel-plugin-istanbul@6.1.1: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} engines: {node: '>=8'} @@ -7726,11 +9763,21 @@ packages: resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} engines: {node: '>=10', npm: '>=6'} + babel-plugin-polyfill-corejs2@0.4.11: + resolution: {integrity: sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==} + peerDependencies: + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 + babel-plugin-polyfill-corejs2@0.4.6: resolution: {integrity: sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 + babel-plugin-polyfill-corejs3@0.10.6: + resolution: {integrity: sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==} + peerDependencies: + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 + babel-plugin-polyfill-corejs3@0.8.6: resolution: {integrity: sha512-leDIc4l4tUgU7str5BWLS2h8q2N4Nf6lGZP6UrNDxdtfF2g69eJ5L0H7S8A5Ln/arfFAfHor5InAdZuIOwZdgQ==} peerDependencies: @@ -7741,6 +9788,11 @@ packages: peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 + babel-plugin-polyfill-regenerator@0.6.2: + resolution: {integrity: sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==} + peerDependencies: + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 + babel-plugin-transform-replace-object-assign@2.0.0: resolution: {integrity: sha512-PMT+dRz6JAHbXIsJB4XjcIstmKK9SFj9MYZGcEWW/1jISiemGz9w6TVLrj4hgpR89X0J9mFuHq61zPvP8lgZZQ==} peerDependencies: @@ -7774,6 +9826,21 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + bare-events@2.5.0: + resolution: {integrity: sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==} + + bare-fs@2.3.5: + resolution: {integrity: sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==} + + bare-os@2.4.4: + resolution: {integrity: sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==} + + bare-path@2.1.3: + resolution: {integrity: sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==} + + bare-stream@2.3.0: + resolution: {integrity: sha512-pVRWciewGUeCyKEuRxwv06M079r+fRjAQjBEK2P6OYGrO43O+Z0LrPZZEjlc4mB6C2RpZ9AxJ1s7NLEtOHO6eA==} + base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -7781,16 +9848,21 @@ packages: resolution: {integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==} engines: {node: '>=0.10.0'} + batch@0.6.1: + resolution: {integrity: sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==} + bcryptjs@2.4.3: resolution: {integrity: sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==} + before-after-hook@2.2.3: + resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} + better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} - big-integer@1.6.51: - resolution: {integrity: sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==} - engines: {node: '>=0.6'} + bidi-js@1.0.3: + resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==} big.js@5.2.2: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} @@ -7819,6 +9891,9 @@ packages: resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + bonjour-service@1.2.1: + resolution: {integrity: sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw==} + boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} @@ -7830,14 +9905,14 @@ packages: peerDependencies: '@popperjs/core': ^2.11.8 + boxen@6.2.1: + resolution: {integrity: sha512-H4PEsJXfFI/Pt8sjDWbHlQPx4zL/bvSQjcilJmaulGt5mLDorHOHpmdXAJcBcmru7PhYSp/cDMWRko4ZUMFkSw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + boxen@7.0.0: resolution: {integrity: sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==} engines: {node: '>=14.16'} - bplist-parser@0.2.0: - resolution: {integrity: sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==} - engines: {node: '>= 5.10.0'} - brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} @@ -7852,14 +9927,13 @@ packages: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + breakword@1.0.6: resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} - browserslist@4.22.1: - resolution: {integrity: sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - browserslist@4.23.0: resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -7870,6 +9944,11 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + browserslist@4.24.0: + resolution: {integrity: sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + bs-logger@0.2.6: resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} engines: {node: '>= 6'} @@ -7896,6 +9975,9 @@ packages: buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + bufferutil@4.0.8: resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} engines: {node: '>=6.14.2'} @@ -7910,9 +9992,9 @@ packages: bundle-n-require@1.1.1: resolution: {integrity: sha512-EB2wFjXF106LQLe/CYnKCMCdLeTW47AtcEtUfiqAOgr2a08k0+YgRklur2aLfEYHlhz6baMskZ8L2U92Hh0vyA==} - bundle-name@3.0.0: - resolution: {integrity: sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==} - engines: {node: '>=12'} + bundle-name@4.1.0: + resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} + engines: {node: '>=18'} bundle-require@5.0.0: resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} @@ -7952,6 +10034,14 @@ packages: resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} engines: {node: '>=10.6.0'} + cacheable-lookup@7.0.0: + resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==} + engines: {node: '>=14.16'} + + cacheable-request@10.2.14: + resolution: {integrity: sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==} + engines: {node: '>=14.16'} + cacheable-request@7.0.4: resolution: {integrity: sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==} engines: {node: '>=8'} @@ -7964,6 +10054,9 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} + camel-case@4.1.2: + resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} + camelcase-css@2.0.1: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} @@ -7988,18 +10081,23 @@ packages: resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==} engines: {node: '>=14.16'} + camera-controls@2.9.0: + resolution: {integrity: sha512-TpCujnP0vqPppTXXJRYpvIy0xq9Tro6jQf2iYUxlDpPCNxkvE/XGaTuwIxnhINOkVP/ob2CRYXtY3iVYXeMEzA==} + peerDependencies: + three: '>=0.126.1' + caniuse-api@3.0.0: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} - caniuse-lite@1.0.30001561: - resolution: {integrity: sha512-NTt0DNoKe958Q0BE0j0c1V9jbUzhBxHIEJy7asmGrpE0yG63KTV7PLHPnK2E1O9RsQrQ081I3NLuXGS6zht3cw==} - caniuse-lite@1.0.30001600: resolution: {integrity: sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==} caniuse-lite@1.0.30001633: resolution: {integrity: sha512-6sT0yf/z5jqf8tISAgpJDrmwOpLsrpnyCdD/lOZKvKkkJK4Dn0X5i7KF7THEZhOq+30bmhwBlNEaqPUiHiKtZg==} + caniuse-lite@1.0.30001667: + resolution: {integrity: sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==} + ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -8019,6 +10117,10 @@ packages: resolution: {integrity: sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==} engines: {node: '>=12'} + chalk-template@1.1.0: + resolution: {integrity: sha512-T2VJbcDuZQ0Tb2EWwSotMPJjgpy1/tGee1BTpUNsGZ/qgNjV2t7Mvu+d4600U564nbLesN1x2dPL+xii174Ekg==} + engines: {node: '>=14.16'} + chalk@1.1.3: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} engines: {node: '>=0.10.0'} @@ -8047,9 +10149,18 @@ packages: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} + character-entities-html4@2.1.0: + resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} + + character-entities-legacy@3.0.0: + resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} + character-entities@2.0.2: resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + character-reference-invalid@2.0.1: + resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} + chardet@0.4.2: resolution: {integrity: sha512-j/Toj7f1z98Hh2cYo2BVr85EpIRWqUi7rtRSGxh/cqUjqrnJe9l9UE7IUGd2vQ2p+kSHLkSzObQPZPLUC6TQwg==} @@ -8060,6 +10171,13 @@ packages: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} + cheerio-select@2.1.0: + resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} + + cheerio@1.0.0-rc.12: + resolution: {integrity: sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==} + engines: {node: '>= 6'} + chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -8068,6 +10186,9 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chownr@1.1.4: + resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -8090,6 +10211,9 @@ packages: resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==} engines: {node: '>=0.10.0'} + class-variance-authority@0.7.0: + resolution: {integrity: sha512-jFI8IQw4hczaL4ALINxqLEXQbWcNjoSkloa4IaufXCJr6QawJyw7tuRysRsrE8w2p/4gGaxKIt/hX3qz/IbD1A==} + classcat@5.0.5: resolution: {integrity: sha512-JhZUT7JFcQy/EzW605k/ktHtncoo9vnyW/2GspNYwFlN1C/WmjuV/xtS04e9SOkL2sTdw0VAZ2UGCcQ9lR6p6w==} @@ -8099,6 +10223,10 @@ packages: classnames@2.5.1: resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} + clean-css@5.3.3: + resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==} + engines: {node: '>= 10.0'} + clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -8170,6 +10298,10 @@ packages: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} + clone-deep@4.0.1: + resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} + engines: {node: '>=6'} + clone-response@1.0.3: resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==} @@ -8185,6 +10317,14 @@ packages: resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} engines: {node: '>=6'} + clsx@2.0.0: + resolution: {integrity: sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==} + engines: {node: '>=6'} + + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + co@4.6.0: resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} @@ -8207,6 +10347,9 @@ packages: resolution: {integrity: sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==} engines: {node: '>=0.8'} + collapse-white-space@2.1.0: + resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} + collect-v8-coverage@1.0.2: resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} @@ -8241,9 +10384,16 @@ packages: resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} engines: {node: '>=12.5.0'} + colord@2.9.3: + resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} + colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + combine-promises@1.2.0: + resolution: {integrity: sha512-VcQB1ziGD0NXrhKxiwyNbCDmRzs/OShMs2GqW2DlU2A/Sd0nQxE1oWDAE5O0ygSx5mgQOn9eIFh7yKPgFRVkPQ==} + engines: {node: '>=10'} + combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -8251,6 +10401,10 @@ packages: comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} + command-exists-promise@2.0.2: + resolution: {integrity: sha512-T6PB6vdFrwnHXg/I0kivM3DqaCGZLjjYSOe0a5WgFKcz1sOnmOeIjnhQPXVXX3QjVbLyTJ85lJkX6lUpukTzaA==} + engines: {node: '>=6'} + commander@10.0.1: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} @@ -8263,6 +10417,10 @@ packages: resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} engines: {node: '>=16'} + commander@12.1.0: + resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + engines: {node: '>=18'} + commander@2.14.1: resolution: {integrity: sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==} @@ -8296,6 +10454,13 @@ packages: resolution: {integrity: sha512-SsxdiOf064DWoZLH799Ata6u7iV658A11PlWtZATDlXPpKGJnbJZ5Z24ybixAi+LUUqJ/GKowAejtC5GFUG7Tw==} engines: {node: '>= 6'} + comment-json@4.2.5: + resolution: {integrity: sha512-bKw/r35jR3HGt5PEPm1ljsQQGyCrR8sFGNiN5L+ykDHdpO8Smxkrkla9Yi6NkQyUrb8V54PGhfMs6NrIwtxtdw==} + engines: {node: '>= 6'} + + common-path-prefix@3.0.0: + resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} + compare-func@2.0.0: resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} @@ -8350,12 +10515,27 @@ packages: confbox@0.1.7: resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} + config-chain@1.1.13: + resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + config-file-ts@0.2.6: resolution: {integrity: sha512-6boGVaglwblBgJqGyxm4+xCmEGcWgnWHSWHY5jad58awQhB6gftq0G8HbzU39YqCIYHMLAiL1yjwiZ36m/CL8w==} - configstore@5.0.1: - resolution: {integrity: sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==} - engines: {node: '>=8'} + configstore@6.0.0: + resolution: {integrity: sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==} + engines: {node: '>=12'} + + connect-history-api-fallback@1.6.0: + resolution: {integrity: sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==} + engines: {node: '>=0.8'} + + connect-history-api-fallback@2.0.0: + resolution: {integrity: sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==} + engines: {node: '>=0.8'} + + connect@3.7.0: + resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} + engines: {node: '>= 0.10.0'} consola@2.15.3: resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} @@ -8699,6 +10879,9 @@ packages: whiskers: optional: true + consolidated-events@2.0.2: + resolution: {integrity: sha512-2/uRVMdRypf5z/TW/ncD/66l75P5hH2vM/GR8Jf8HLc2xnfJtmina6F6du8+v4Z2vTrMo7jC+W1tmEEuuELgkQ==} + content-disposition@0.5.2: resolution: {integrity: sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==} engines: {node: '>= 0.6'} @@ -8758,12 +10941,28 @@ packages: resolution: {integrity: sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==} engines: {node: '>=0.10.0'} + copy-text-to-clipboard@3.2.0: + resolution: {integrity: sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==} + engines: {node: '>=12'} + copy-to-clipboard@3.3.3: resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} + copy-webpack-plugin@11.0.0: + resolution: {integrity: sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==} + engines: {node: '>= 14.15.0'} + peerDependencies: + webpack: ^5.1.0 + core-js-compat@3.33.2: resolution: {integrity: sha512-axfo+wxFVxnqf8RvxTzoAlzW4gRoacrHeoFlc9n0x50+7BEyZL/Rt3hicaED1/CEd7I6tPCPVUYcJwCMO5XUYw==} + core-js-compat@3.38.1: + resolution: {integrity: sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==} + + core-js-pure@3.38.1: + resolution: {integrity: sha512-BY8Etc1FZqdw1glX0XNOq2FDwfrg/VGqoZOZCdaL+UmdaqDwQwYXkMJT4t6In+zfEfOJDcM9T0KdbBeJg8KKCQ==} + core-js@2.6.12: resolution: {integrity: sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==} deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. @@ -8808,14 +11007,14 @@ packages: ts-node: '>=10' typescript: '>=4' + cosmiconfig@6.0.0: + resolution: {integrity: sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==} + engines: {node: '>=8'} + cosmiconfig@7.1.0: resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} engines: {node: '>=10'} - cosmiconfig@8.0.0: - resolution: {integrity: sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==} - engines: {node: '>=14'} - cosmiconfig@8.3.6: resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} engines: {node: '>=14'} @@ -8874,48 +11073,116 @@ packages: crypto-js@4.2.0: resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} - crypto-random-string@2.0.0: - resolution: {integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==} - engines: {node: '>=8'} + crypto-random-string@4.0.0: + resolution: {integrity: sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==} + engines: {node: '>=12'} - cspell-dictionary@6.31.3: - resolution: {integrity: sha512-3w5P3Md/tbHLVGPKVL0ePl1ObmNwhdDiEuZ2TXfm2oAIwg4aqeIrw42A2qmhaKLcuAIywpqGZsrGg8TviNNhig==} - engines: {node: '>=14'} + cspell-config-lib@8.14.2: + resolution: {integrity: sha512-yHP1BdcH5dbjb8qiZr6+bxEnJ+rxTULQ00wBz3eBPWCghJywEAYYvMWoYuxVtPpndlkKYC1wJAHsyNkweQyepA==} + engines: {node: '>=18'} - cspell-gitignore@6.31.3: - resolution: {integrity: sha512-vCfVG4ZrdwJnsZHl/cdp8AY+YNPL3Ga+0KR9XJsaz69EkQpgI6porEqehuwle7hiXw5e3L7xFwNEbpCBlxgLRA==} - engines: {node: '>=14'} + cspell-dictionary@8.14.2: + resolution: {integrity: sha512-gWuAvf6queGGUvGbfAxxUq55cZ0OevWPbjnCrSB0PpJ4tqdFd8dLcvVrIKzoE2sBXKPw2NDkmoEngs6iGavC0w==} + engines: {node: '>=18'} + + cspell-gitignore@8.14.2: + resolution: {integrity: sha512-lrO/49NaKBpkR7vFxv4OOY+oHmsG5+gNQejrBBWD9Nv9vvjJtz/G36X/rcN6M6tFcQQMWwa01kf04nxz8Ejuhg==} + engines: {node: '>=18'} hasBin: true - cspell-glob@6.31.3: - resolution: {integrity: sha512-+koUJPSCOittQwhR0T1mj4xXT3N+ZnY2qQ53W6Gz9HY3hVfEEy0NpbwE/Uy7sIvFMbc426fK0tGXjXyIj72uhQ==} - engines: {node: '>=14'} + cspell-glob@8.14.2: + resolution: {integrity: sha512-9Q1Kgoo1ev3fKTpp9y5n8M4RLxd8B0f5o4y5FQe4dBU0j/bt+/YDrLZNWDm77JViV606XQ6fimG1FTTq6pT9/g==} + engines: {node: '>=18'} - cspell-grammar@6.31.3: - resolution: {integrity: sha512-TZYaOLIGAumyHlm4w7HYKKKcR1ZgEMKt7WNjCFqq7yGVW7U+qyjQqR8jqnLiUTZl7c2Tque4mca7n0CFsjVv5A==} - engines: {node: '>=14'} + cspell-grammar@8.14.2: + resolution: {integrity: sha512-eYwceVP80FGYVJenE42ALnvEKOXaXjq4yVbb1Ni1umO/9qamLWNCQ1RP6rRACy5e/cXviAbhrQ5Mtw6n+pyPEQ==} + engines: {node: '>=18'} hasBin: true - cspell-io@6.31.3: - resolution: {integrity: sha512-yCnnQ5bTbngUuIAaT5yNSdI1P0Kc38uvC8aynNi7tfrCYOQbDu1F9/DcTpbdhrsCv+xUn2TB1YjuCmm0STfJlA==} - engines: {node: '>=14'} + cspell-io@8.14.2: + resolution: {integrity: sha512-uaKpHiY3DAgfdzgKMQml6U8F8o9udMuYxGqYa5FVfN7D5Ap7B2edQzSLTUYwxrFEn4skSfp6XY73+nzJvxzH4Q==} + engines: {node: '>=18'} - cspell-lib@6.31.3: - resolution: {integrity: sha512-Dv55aecaMvT/5VbNryKo0Zos8dtHon7e1K0z8DR4/kGZdQVT0bOFWeotSLhuaIqoNFdEt8ypfKbrIHIdbgt1Hg==} - engines: {node: '>=14.6'} + cspell-lib@8.14.2: + resolution: {integrity: sha512-d2oiIXHXnADmnhIuFLOdNE63L7OUfzgpLbYaqAWbkImCUDkevfGrOgnX8TJ03fUgZID4nvQ+3kgu/n2j4eLZjQ==} + engines: {node: '>=18'} - cspell-trie-lib@6.31.3: - resolution: {integrity: sha512-HNUcLWOZAvtM3E34U+7/mSSpO0F6nLd/kFlRIcvSvPb9taqKe8bnSa0Yyb3dsdMq9rMxUmuDQtF+J6arZK343g==} - engines: {node: '>=14'} + cspell-trie-lib@8.14.2: + resolution: {integrity: sha512-rZMbaEBGoyy4/zxKECaMyVyGLbuUxYmZ5jlEgiA3xPtEdWwJ4iWRTo5G6dWbQsXoxPYdAXXZ0/q0GQ2y6Jt0kw==} + engines: {node: '>=18'} - cspell@6.31.3: - resolution: {integrity: sha512-VeeShDLWVM6YPiU/imeGy0lmg6ki63tbLEa6hz20BExhzzpmINOP5nSTYtpY0H9zX9TrF/dLbI38TuuYnyG3Uw==} - engines: {node: '>=14'} + cspell@8.14.2: + resolution: {integrity: sha512-ii/W7fwO4chNQVYl1C/8k7RW8EXzLb69rvg08p8mSJx8B2UasVJ9tuJpTH2Spo1jX6N3H0dKPWUbd1fAmdAhPg==} + engines: {node: '>=18'} hasBin: true + css-blank-pseudo@7.0.0: + resolution: {integrity: sha512-v9xXYGdm6LIn4iHEfu3egk/PM1g/yJr8uwTIj6E44kurv5dE/4y3QW7WdVmZ0PVnqfTuK+C0ClZcEEiaKWBL9Q==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + css-declaration-sorter@7.2.0: + resolution: {integrity: sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==} + engines: {node: ^14 || ^16 || >=18} + peerDependencies: + postcss: ^8.0.9 + + css-has-pseudo@7.0.0: + resolution: {integrity: sha512-vO6k9bBt4/eEZ2PeHmS2VXjJga5SBy6O1ESyaOkse5/lvp6piFqg8Sh5KTU7X33M7Uh/oqo+M3EeMktQrZoTCQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + css-loader@6.11.0: + resolution: {integrity: sha512-CTJ+AEQJjq5NzLga5pE39qdiSV56F8ywCIsqNIRF0r7BDgWsN25aazToqAFg7ZrtA/U016xudB3ffgweORxX7g==} + engines: {node: '>= 12.13.0'} + peerDependencies: + '@rspack/core': 0.x || 1.x + webpack: ^5.0.0 + peerDependenciesMeta: + '@rspack/core': + optional: true + webpack: + optional: true + + css-minimizer-webpack-plugin@5.0.1: + resolution: {integrity: sha512-3caImjKFQkS+ws1TGcFn0V1HyDJFq1Euy589JlD6/3rV2kj+w7r5G9WDMgSHvpvXHNZ2calVypZWuEDQd9wfLg==} + engines: {node: '>= 14.15.0'} + peerDependencies: + '@parcel/css': '*' + '@swc/css': '*' + clean-css: '*' + csso: '*' + esbuild: '*' + lightningcss: '*' + webpack: ^5.0.0 + peerDependenciesMeta: + '@parcel/css': + optional: true + '@swc/css': + optional: true + clean-css: + optional: true + csso: + optional: true + esbuild: + optional: true + lightningcss: + optional: true + + css-prefers-color-scheme@10.0.0: + resolution: {integrity: sha512-VCtXZAWivRglTZditUfB4StnsWr6YVZ2PRtuxQLKTNRdtAf8tpzaVPE9zXIF3VaSc7O70iK/j1+NXxyQCqdPjQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + css-render@0.15.14: resolution: {integrity: sha512-9nF4PdUle+5ta4W5SyZdLCCmFd37uVimSjg1evcTqKJCyvCEEj12WKzOSBNak6r4im4J4iYXKH1OWpUV5LBYFg==} + css-select@4.3.0: + resolution: {integrity: sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==} + css-select@5.1.0: resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==} @@ -8934,6 +11201,9 @@ packages: css.escape@1.5.1: resolution: {integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==} + cssdb@8.1.1: + resolution: {integrity: sha512-kRbSRgZoxtZNl5snb3nOzBkFOt5AwnephcUTIEFc2DebKG9PN50/cHarlwOooTxYQ/gxsnKs3BxykhNLmfvyLg==} + cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} @@ -8942,12 +11212,36 @@ packages: cssfilter@0.0.10: resolution: {integrity: sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==} + cssnano-preset-advanced@6.1.2: + resolution: {integrity: sha512-Nhao7eD8ph2DoHolEzQs5CfRpiEP0xa1HBdnFZ82kvqdmbwVBUr2r1QuQ4t1pi+D1ZpqpcO4T+wy/7RxzJ/WPQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + cssnano-preset-default@6.1.2: + resolution: {integrity: sha512-1C0C+eNaeN8OcHQa193aRgYexyJtU8XwbdieEjClw+J9d94E41LwT6ivKH0WT+fYwYWB0Zp3I3IZ7tI/BbUbrg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + cssnano-utils@4.0.2: + resolution: {integrity: sha512-ZR1jHg+wZ8o4c3zqf1SIUSTIvm/9mU343FMR6Obe/unskbvpGhZOo1J6d/r8D1pzkRQYuwbcH3hToOuoA2G7oQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + cssnano-utils@5.0.0: resolution: {integrity: sha512-Uij0Xdxc24L6SirFr25MlwC2rCFX6scyUmuKpzI+JQ7cyqDEwD42fJ0xfB3yLfOnRDU5LKGgjQ9FA6LYh76GWQ==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 + cssnano@6.1.2: + resolution: {integrity: sha512-rYk5UeX7VAM/u0lNqewCdasdtPK81CgX8wJFLEIXHbV2oldWRgJAsZrdhRXkV1NJzA2g850KiFm9mMU2HxNxMA==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + csso@5.0.5: resolution: {integrity: sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} @@ -9097,6 +11391,9 @@ packages: de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} + debounce@1.2.1: + resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} + debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: @@ -9122,15 +11419,6 @@ packages: supports-color: optional: true - debug@4.3.5: - resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@4.3.6: resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} engines: {node: '>=6.0'} @@ -9195,13 +11483,17 @@ packages: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} - default-browser-id@3.0.0: - resolution: {integrity: sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==} - engines: {node: '>=12'} + default-browser-id@5.0.0: + resolution: {integrity: sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==} + engines: {node: '>=18'} - default-browser@4.0.0: - resolution: {integrity: sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==} - engines: {node: '>=14.16'} + default-browser@5.2.1: + resolution: {integrity: sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==} + engines: {node: '>=18'} + + default-gateway@6.0.3: + resolution: {integrity: sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==} + engines: {node: '>= 10'} defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} @@ -9214,6 +11506,10 @@ packages: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} + define-lazy-prop@2.0.0: + resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} + engines: {node: '>=8'} + define-lazy-prop@3.0.0: resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} engines: {node: '>=12'} @@ -9240,6 +11536,10 @@ packages: defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + del@6.1.1: + resolution: {integrity: sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==} + engines: {node: '>=10'} + delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} @@ -9261,6 +11561,9 @@ packages: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} + deprecation@2.3.1: + resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} + dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -9275,6 +11578,9 @@ packages: detect-browser@5.3.0: resolution: {integrity: sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==} + detect-gpu@5.0.51: + resolution: {integrity: sha512-7P+5KDthVGXXWS06EuqBIq7YBijxfaNfm+BSFNTRAkZP26J97ASssh5KoR53diWNcBNOEb1ILfdsz2pzesSgYw==} + detect-indent@6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} @@ -9298,6 +11604,19 @@ packages: detect-node@2.1.0: resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} + detect-port-alt@1.1.6: + resolution: {integrity: sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==} + engines: {node: '>= 4.2.1'} + hasBin: true + + detect-port@1.6.1: + resolution: {integrity: sha512-CmnVc+Hek2egPx1PeTFVta2W78xy2K/9Rkf6cC4T59S50tVnzKj+tnx5mmx5lwvCkujZ4uRrpRSuV+IVs3f90Q==} + engines: {node: '>= 4.0.0'} + hasBin: true + + devlop@1.1.0: + resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + dezalgo@1.0.4: resolution: {integrity: sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==} @@ -9344,16 +11663,32 @@ packages: os: [darwin] hasBin: true + dns-packet@5.6.1: + resolution: {integrity: sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==} + engines: {node: '>=6'} + doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} + docusaurus-plugin-sass@0.2.5: + resolution: {integrity: sha512-Z+D0fLFUKcFpM+bqSUmqKIU+vO+YF1xoEQh5hoFreg2eMf722+siwXDD+sqtwU8E4MvVpuvsQfaHwODNlxJAEg==} + peerDependencies: + '@docusaurus/core': ^2.0.0-beta || ^3.0.0-alpha + sass: ^1.30.0 + + docusaurus-preset-shiki-twoslash@1.1.41: + resolution: {integrity: sha512-Ny5Ot+r7dMnfkcD+YcdtSmM4LVWoLRGWe/A6AqzcN4h6mqE82EU6KMA53wVI50YqgTOIIrNNI6QJr70rPWebcw==} + dom-accessibility-api@0.6.3: resolution: {integrity: sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==} dom-align@1.12.4: resolution: {integrity: sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==} + dom-converter@0.2.0: + resolution: {integrity: sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==} + dom-helpers@5.2.1: resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} @@ -9363,6 +11698,9 @@ packages: dom-serializer@0.2.2: resolution: {integrity: sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==} + dom-serializer@1.4.1: + resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==} + dom-serializer@2.0.0: resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} @@ -9375,6 +11713,10 @@ packages: domhandler@2.4.2: resolution: {integrity: sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==} + domhandler@4.3.1: + resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==} + engines: {node: '>= 4'} + domhandler@5.0.3: resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} engines: {node: '>= 4'} @@ -9385,6 +11727,9 @@ packages: domutils@1.7.0: resolution: {integrity: sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==} + domutils@2.8.0: + resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==} + domutils@3.1.0: resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} @@ -9395,6 +11740,10 @@ packages: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} + dot-prop@6.0.1: + resolution: {integrity: sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==} + engines: {node: '>=10'} + dotenv-expand@11.0.6: resolution: {integrity: sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g==} engines: {node: '>=12'} @@ -9402,6 +11751,10 @@ packages: dotenv-expand@5.1.0: resolution: {integrity: sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==} + dotenv-expand@8.0.3: + resolution: {integrity: sha512-SErOMvge0ZUyWd5B0NXMQlDkN+8r+HhVUsxgOO7IoPDOdDRD2JjExpN6y3KnFR66jsJMwSn1pqIivhU5rcJiNg==} + engines: {node: '>=12'} + dotenv@16.4.5: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} @@ -9414,6 +11767,9 @@ packages: resolution: {integrity: sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==} hasBin: true + draco3d@1.5.7: + resolution: {integrity: sha512-m6WCKt/erDXcw+70IJXnG7M3awwQPAsZvJGX5zY7beBqpELw6RDGkYVU0W43AFxye4pDZ5i2Lbyc/NNGqwjUVQ==} + duplexer2@0.1.4: resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==} @@ -9471,15 +11827,15 @@ packages: electron-publish@24.13.1: resolution: {integrity: sha512-2ZgdEqJ8e9D17Hwp5LEq5mLQPjqU3lv/IALvgp+4W8VeNhryfGhYEQC/PgDPMrnWUp+l60Ou5SJLsu+k4mhQ8A==} - electron-to-chromium@1.4.576: - resolution: {integrity: sha512-yXsZyXJfAqzWk1WKryr0Wl0MN2D47xodPvEEwlVePBnhU5E7raevLQR+E6b9JAD3GfL/7MbAL9ZtWQQPcLx7wA==} - electron-to-chromium@1.4.721: resolution: {integrity: sha512-k1x2r6foI8iJOp+1qTxbbrrWMsOiHkzGBYwYigaq+apO1FSqtn44KTo3Sy69qt7CRr7149zTcsDvH7MUKsOuIQ==} electron-to-chromium@1.4.832: resolution: {integrity: sha512-cTen3SB0H2SGU7x467NRe1eVcQgcuS6jckKfWJHia2eo0cHIGOqHoAxevIYZD4eRHcWjkvFzo93bi3vJ9W+1lA==} + electron-to-chromium@1.5.33: + resolution: {integrity: sha512-+cYTcFB1QqD4j4LegwLfpCNxifb6dDFUAwk6RsLusCwIaZI6or2f+q8rs5tTB2YC53HhOlIbEaqHMAAC8IOIwA==} + electron-winstaller@5.3.1: resolution: {integrity: sha512-oM8BW3a8NEqG0XW+Vx3xywhk0DyDV4T0jT0zZfWt0IczNT3jHAAvQWBorF8osQDplSsCyXXyxrsrQ8cY0Slb/A==} engines: {node: '>=8.0.0'} @@ -9507,10 +11863,16 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + emojilib@2.4.0: + resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} + emojis-list@3.0.0: resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} engines: {node: '>= 4'} + emoticon@4.1.0: + resolution: {integrity: sha512-VWZfnxqwNcc51hIy/sbOdEem6D+cVtpPzEEtVAFdaas30+1dgkyaOQ4sQ6Bp0tOMqWO1v+HQfYaoodOkdhK6SQ==} + encode-utf8@1.0.3: resolution: {integrity: sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==} @@ -9546,6 +11908,10 @@ packages: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} + env-paths@3.0.0: + resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + envinfo@7.11.1: resolution: {integrity: sha512-8PiZgZNIB4q/Lw4AhOvAfB/ityHAd2bli3lESSWmWSzSsl5dKpy5N1d1Rfkd2teq/g9xN90lc6o98DOjMeYHpg==} engines: {node: '>=4'} @@ -9561,6 +11927,9 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + error-stack-parser-es@0.1.5: + resolution: {integrity: sha512-xHku1X40RO+fO8yJ8Wh2f2rZWVjqyhb1zgq1yZ8aZRQkv6OOKhKWRUaht3eSCUbAOBaKIgM+ykwFLE+QUxgGeg==} + es-abstract@1.22.3: resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} engines: {node: '>= 0.4'} @@ -9614,6 +11983,10 @@ packages: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} + escape-goat@4.0.0: + resolution: {integrity: sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==} + engines: {node: '>=12'} + escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} @@ -9699,6 +12072,24 @@ packages: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} + estree-util-attach-comments@3.0.0: + resolution: {integrity: sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==} + + estree-util-build-jsx@3.0.1: + resolution: {integrity: sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ==} + + estree-util-is-identifier-name@3.0.0: + resolution: {integrity: sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==} + + estree-util-to-js@2.0.0: + resolution: {integrity: sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg==} + + estree-util-value-to-estree@3.1.2: + resolution: {integrity: sha512-S0gW2+XZkmsx00tU2uJ4L9hUT7IFabbml9pHh2WQqFmAbxit++YGZne0sKJbNwkj9Wvg9E4uqWl4nCIFQMmfag==} + + estree-util-visit@2.0.0: + resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==} + estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} @@ -9709,6 +12100,10 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + eta@2.2.0: + resolution: {integrity: sha512-UVQ72Rqjy/ZKQalzV5dCCJP80GrmPrMxh6NlNf+erV6ObL0ZFkhCstWRawS85z3smdr3d2wXPsZEY7rDPfGd2g==} + engines: {node: '>=6.0.0'} + etag@1.8.1: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} @@ -9742,6 +12137,10 @@ packages: resolution: {integrity: sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==} engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0} + execa@8.0.0: + resolution: {integrity: sha512-CTNS0BcKBcoOsawKBlpcKNmK4Kjuyz5jVLhf+PUsHGMqiKMVTa4cN3U7r7bRY8KTpfOGpXMo27fdy0dYVg2pqA==} + engines: {node: '>=16.17'} + execa@8.0.1: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} @@ -9758,6 +12157,10 @@ packages: resolution: {integrity: sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==} engines: {node: '>=0.10.0'} + expand-template@2.0.3: + resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} + engines: {node: '>=6'} + expand-tilde@2.0.2: resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==} engines: {node: '>=0.10.0'} @@ -9816,8 +12219,8 @@ packages: resolution: {integrity: sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==} engines: {'0': node >=0.6.0} - farm-browserslist-generator@1.0.0: - resolution: {integrity: sha512-UGd1eWtSLOqxl0tlexRwpsy1JbHdO39iCDZKzdr7khBKYFXL5PDjjcyj1xelt5YUnLNB2vPAb8P+uD8IqRnBJQ==} + farm-browserslist-generator@1.0.5: + resolution: {integrity: sha512-igffWSQATGV2ZJEvDBIB9Q2QfVOr+vv/JTZaaNoYfW/nrCGZ58zyJ0kSkFQEvptGUWf6idECqj82ykli4Ueplw==} engines: {node: '>=16.15.1', npm: '>=7.0.0', pnpm: '>=3.2.0', yarn: '>=1.13'} farm-plugin-remove-console-darwin-arm64@0.1.8: @@ -9877,65 +12280,8 @@ packages: farm-plugin-remove-console@0.1.8: resolution: {integrity: sha512-t/QH2N97w2/VM4tj/hmnceU/95yYeORR5BnlWP91PherULRFhTVctECcC0JI33Psvyk06uSW4BuKgBPtktM5+w==} - farm-plugin-replace-dirname-darwin-arm64@0.2.1: - resolution: {integrity: sha512-9FThv/qoFuj3cJjv9P6YnXbBwPQ5TwGjnr50ejXdZn13Ehz0+7w7EscbRsZHNvT7p24p6i0Y9NUSallcWc2syw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - - farm-plugin-replace-dirname-darwin-x64@0.2.1: - resolution: {integrity: sha512-Msqrh8mAPBbEpANpa0z9uQBr1/MO+PaHgBxym/aNs1vpxB4KAs6JQWYKtO+Ob7JzFyV6d9lIRhpnpxzxTqSIfA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - - farm-plugin-replace-dirname-linux-arm64-gnu@0.2.1: - resolution: {integrity: sha512-ZKuxGu9G01CW521uTQHh+IP8pcT/NolGQfcQuEmBpD8epJ8per8Ps52fS05u5TGniaOg+ySZpt7HxbX+++k1YQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - farm-plugin-replace-dirname-linux-arm64-musl@0.2.1: - resolution: {integrity: sha512-m3gH8ggczbRYTHZSNp3LjIQIcqhvDO4O78bxXc8O1ozKD8M47/YfQLyQV06M7H4rZ8s6XV3Bb1kAcRAASp3M5A==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - farm-plugin-replace-dirname-linux-x64-gnu@0.2.1: - resolution: {integrity: sha512-MehKkoM2RFw3sCnEu9nCbXKjxtC3hfTad0h/dC+Z8iEBcLEReVLoNzHWWUa6BxkxqDtB82/BWO/ObSUj/VUnwQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - farm-plugin-replace-dirname-linux-x64-musl@0.2.1: - resolution: {integrity: sha512-o1qPZi16N/sHOteZYJVv6UmZFK3QKpVQrywk/4spJI0mPH9A9Y+G6iBE2Tqjb3d+1Hb6phr++EBJHZ2x1ajtGQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - farm-plugin-replace-dirname-win32-arm64-msvc@0.2.1: - resolution: {integrity: sha512-Xn/wYFkgb7SsTlSaefFtvxNbXEVdvZB854b/rBZu47+MRQpSnBIPwnTGcqo8eNTMjtnY4beGGtcd78iqMVAHFQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - - farm-plugin-replace-dirname-win32-ia32-msvc@0.2.1: - resolution: {integrity: sha512-YtIu5CS/BSgbQZb1qjaBg0cEKvB4vCIbBxNn64H468zwliPbE93SAIyiwu6cL3la59cjBP4sEbz4ZAWyY9GoMQ==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - - farm-plugin-replace-dirname-win32-x64-msvc@0.2.1: - resolution: {integrity: sha512-KUAf4rcv3Nz+CpGs4zr+ZRu4hWRp7SHQBgpX+mb0hhMjRvn+LoWm2qCL2q9Gp3jsTDVmzjPbyZxp/9UJKx13lQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - - farm-plugin-replace-dirname@0.2.1: - resolution: {integrity: sha512-aJ4euQzxoq0sVu4AwXrNQflHJrSZdrdApGEyVRtN6KiCop3CHXnTg9ydlyCNXN2unQB283aNjojvCd5E/32KgA==} - - farmup@0.1.0: - resolution: {integrity: sha512-+xQuuQFGmHZsy9p/vDDwKOepdD7id4/THKorHmzvX3AeescqFQGJenksyhZab3cMJMYSqfJ8vbr1RkLIKgs7mg==} + farmup@0.1.4: + resolution: {integrity: sha512-zOr66ynrL9F3WmfuhkwQ73wg1IBBdDAEAJBw3MuOfKRdpKzqyn2T5dVBvVqE4YAIF7GnDyBrw1f/V2Z94+9WNw==} hasBin: true fast-deep-equal@3.1.3: @@ -9944,8 +12290,12 @@ packages: fast-diff@1.3.0: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - fast-equals@4.0.3: - resolution: {integrity: sha512-G3BSX9cfKttjr+2o1O22tYMLq0DPluZnYtq1rXumE1SpL/F/SLIfHx08WYQoWSIpeMYf8sRbJ8++71+v6Pnxfg==} + fast-equals@5.0.1: + resolution: {integrity: sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==} + engines: {node: '>=6.0.0'} + + fast-fifo@1.3.2: + resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} fast-glob@3.3.1: resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} @@ -9970,6 +12320,13 @@ packages: fastq@1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} + fault@2.0.1: + resolution: {integrity: sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==} + + faye-websocket@0.11.4: + resolution: {integrity: sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==} + engines: {node: '>=0.8.0'} + fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} @@ -9987,9 +12344,23 @@ packages: fecha@4.2.3: resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} + feed@4.2.2: + resolution: {integrity: sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ==} + engines: {node: '>=0.4.0'} + + fenceparser@1.1.1: + resolution: {integrity: sha512-VdkTsK7GWLT0VWMK5S5WTAPn61wJ98WPFwJiRHumhg4ESNUO/tnkU8bzzzc62o6Uk1SVhuZFLnakmDA4SGV7wA==} + engines: {node: '>=12'} + fflate@0.3.11: resolution: {integrity: sha512-Rr5QlUeGN1mbOHlaqcSYMKVpPbgLy0AWT/W0EHxA6NGI12yO1jpoui2zBBvU2G824ltM6Ut8BFgfHSBGfkmS0A==} + fflate@0.6.10: + resolution: {integrity: sha512-IQrh3lEPM93wVCEczc9SaAOvkmcoQn/G8Bo1e8ZPlY3X3bnAxWaBdvTdvM1hP62iZp0BXWDy4vTAy4fF0+Dlpg==} + + fflate@0.8.2: + resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} + figures@2.0.0: resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} engines: {node: '>=4'} @@ -9998,14 +12369,24 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - figures@5.0.0: - resolution: {integrity: sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==} - engines: {node: '>=14'} - file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@9.1.0: + resolution: {integrity: sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==} + engines: {node: '>=18'} + + file-loader@6.2.0: + resolution: {integrity: sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==} + engines: {node: '>= 10.13.0'} + peerDependencies: + webpack: ^4.0.0 || ^5.0.0 + + file-selector@0.5.0: + resolution: {integrity: sha512-s8KNnmIDTBoD0p9uJ9uD0XY38SCeBOtj0UMXyQSLg1Ypfrfj8+dAvwsLjYQkQ2GjhVtp2HrnF5cJzMhBjfD8HA==} + engines: {node: '>= 10'} + file-size@1.0.0: resolution: {integrity: sha512-tLIdonWTpABkU6Axg2yGChYdrOsy4V8xcm0IcyAP8fSsu6jiXLm5pgs083e4sq5fzNRZuAYolUbZyYmPvCKfwQ==} @@ -10024,6 +12405,10 @@ packages: resolution: {integrity: sha512-Dx770ai81ohflojxhU+oG+Z2QGvKdYxgEr9OSA8UVrqhwNHjfH9A8f5NKfg83fEH8ZFA5N5llJo5T3PIoZ4CRA==} engines: {node: '>= 10.4.0'} + filesize@8.0.7: + resolution: {integrity: sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ==} + engines: {node: '>= 0.4.0'} + fill-range@4.0.0: resolution: {integrity: sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==} engines: {node: '>=0.10.0'} @@ -10032,21 +12417,41 @@ packages: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + filter-obj@1.1.0: resolution: {integrity: sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==} engines: {node: '>=0.10.0'} + finalhandler@1.1.2: + resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} + engines: {node: '>= 0.8'} + finalhandler@1.2.0: resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} engines: {node: '>= 0.8'} + find-cache-dir@4.0.0: + resolution: {integrity: sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==} + engines: {node: '>=14.16'} + find-root@1.1.0: resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} + find-up-simple@1.0.0: + resolution: {integrity: sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==} + engines: {node: '>=18'} + find-up@2.1.0: resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} engines: {node: '>=4'} + find-up@3.0.0: + resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} + engines: {node: '>=6'} + find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -10066,9 +12471,20 @@ packages: resolution: {integrity: sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==} engines: {node: '>=12.0.0'} + flat-cache@5.0.0: + resolution: {integrity: sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==} + engines: {node: '>=18'} + + flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + flatted@3.2.9: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} + flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + flora-colossus@2.0.0: resolution: {integrity: sha512-dz4HxH6pOvbUzZpZ/yXhafjbR2I8cenK5xL0KtBFb7U2ADsR+OwXifnxZjij/pZWF775uSCMzWVd+jDik2H2IA==} engines: {node: '>= 12'} @@ -10121,6 +12537,20 @@ packages: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} + fork-ts-checker-webpack-plugin@6.5.3: + resolution: {integrity: sha512-SbH/l9ikmMWycd5puHJKTkZJKddF4iRLyW3DeZ08HTI7NGyLS38MXd/KGgeWumQO7YNQbW2u/NtPT2YowbPaGQ==} + engines: {node: '>=10', yarn: '>=1.0.0'} + peerDependencies: + eslint: '>= 6' + typescript: '>= 2.7' + vue-template-compiler: '*' + webpack: '>= 4' + peerDependenciesMeta: + eslint: + optional: true + vue-template-compiler: + optional: true + fork-ts-checker-webpack-plugin@9.0.2: resolution: {integrity: sha512-Uochze2R8peoN1XqlSi/rGUkDQpRogtLFocP9+PGu68zk1BDAKXfdeCdyVZpgTk8V8WFVQXdEz426VKjXLO1Gg==} engines: {node: '>=12.13.0', yarn: '>=1.0.0'} @@ -10128,10 +12558,18 @@ packages: typescript: '>3.6.0' webpack: ^5.11.0 + form-data-encoder@2.1.4: + resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==} + engines: {node: '>= 14.17'} + form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} + format@0.2.2: + resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} + engines: {node: '>=0.4.x'} + formidable@2.1.2: resolution: {integrity: sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==} @@ -10150,10 +12588,27 @@ packages: resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} engines: {node: '>=0.10.0'} + framer-motion@11.11.1: + resolution: {integrity: sha512-Ucr9eHSrk0d+l6vyl9fvq6omh/PAWHjS+PlczpsoUdhJo1TuF3ULWJNuAMnpWQ1dGyPOyoUVuYlUKjE/s8dyCA==} + peerDependencies: + '@emotion/is-prop-valid': '*' + react: ^18.0.0 + react-dom: ^18.0.0 + peerDependenciesMeta: + '@emotion/is-prop-valid': + optional: true + react: + optional: true + react-dom: + optional: true + fresh@0.5.2: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} + fs-constants@1.0.0: + resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + fs-extra@10.1.0: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} engines: {node: '>=12'} @@ -10216,9 +12671,9 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} deprecated: This package is no longer supported. - gensequence@5.0.2: - resolution: {integrity: sha512-JlKEZnFc6neaeSVlkzBGGgkIoIaSxMgvdamRoPN8r3ozm2r9dusqxeKqYQ7lhzmj2UhFQP8nkyfCaiLQxiLrDA==} - engines: {node: '>=14'} + gensequence@7.0.0: + resolution: {integrity: sha512-47Frx13aZh01afHJTB3zTtKIlFI6vWY+MYCN9Qpew6i52rfKjnhCF/l1YlC8UmEMvvntZZ6z4PiCcmyuedR2aQ==} + engines: {node: '>=18'} gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} @@ -10248,6 +12703,9 @@ packages: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} + get-own-enumerable-property-symbols@3.0.2: + resolution: {integrity: sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==} + get-package-info@1.0.0: resolution: {integrity: sha512-SCbprXGAPdIhKAXiG+Mk6yeoFH61JlYunqdFQFHDtLjJlDjFf6x07dsS8acO+xWt52jpdVo49AlVDnUVK1sDNw==} engines: {node: '>= 4.0'} @@ -10256,9 +12714,9 @@ packages: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} - get-stdin@8.0.0: - resolution: {integrity: sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==} - engines: {node: '>=10'} + get-stdin@9.0.0: + resolution: {integrity: sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==} + engines: {node: '>=12'} get-stream@4.1.0: resolution: {integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==} @@ -10292,6 +12750,12 @@ packages: engines: {node: '>=10'} hasBin: true + github-from-package@0.0.0: + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} + + github-slugger@1.5.0: + resolution: {integrity: sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==} + gl-matrix@3.4.3: resolution: {integrity: sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==} @@ -10316,6 +12780,11 @@ packages: engines: {node: '>=16 || 14 >=14.18'} hasBin: true + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} + hasBin: true + glob@7.1.6: resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} deprecated: Glob versions prior to v9 are no longer supported @@ -10333,18 +12802,34 @@ packages: resolution: {integrity: sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==} engines: {node: '>=10.0'} + global-directory@4.0.1: + resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} + engines: {node: '>=18'} + global-dirs@0.1.1: resolution: {integrity: sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==} engines: {node: '>=4'} + global-dirs@3.0.1: + resolution: {integrity: sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==} + engines: {node: '>=10'} + global-modules@1.0.0: resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==} engines: {node: '>=0.10.0'} + global-modules@2.0.0: + resolution: {integrity: sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==} + engines: {node: '>=6'} + global-prefix@1.0.2: resolution: {integrity: sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==} engines: {node: '>=0.10.0'} + global-prefix@3.0.0: + resolution: {integrity: sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==} + engines: {node: '>=6'} + globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -10361,9 +12846,16 @@ packages: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} + globby@13.2.2: + resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} + glsl-noise@0.0.0: + resolution: {integrity: sha512-b/ZCF6amfAUb7dJM/MxRs7AetQEahYzJ8PtgfrmEdtw6uyGOr+ZSGtgjFm6mfsBkxJ4d2W7kg+Nlqzqvn3Bc0w==} + good-listener@1.2.2: resolution: {integrity: sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==} @@ -10374,6 +12866,13 @@ packages: resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} engines: {node: '>=10.19.0'} + got@12.6.1: + resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==} + engines: {node: '>=14.16'} + + graceful-fs@4.2.10: + resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -10390,10 +12889,17 @@ packages: graphlib@2.1.8: resolution: {integrity: sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==} + gray-matter@4.0.3: + resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} + engines: {node: '>=6.0'} + gzip-size@6.0.0: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} engines: {node: '>=10'} + handle-thing@2.0.1: + resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==} + hard-rejection@2.1.0: resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} engines: {node: '>=6'} @@ -10455,6 +12961,10 @@ packages: resolution: {integrity: sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==} engines: {node: '>=0.10.0'} + has-yarn@3.0.0: + resolution: {integrity: sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + has@1.0.4: resolution: {integrity: sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==} engines: {node: '>= 0.4.0'} @@ -10481,21 +12991,48 @@ packages: hast-util-from-parse5@7.1.2: resolution: {integrity: sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==} + hast-util-from-parse5@8.0.1: + resolution: {integrity: sha512-Er/Iixbc7IEa7r/XLtuG52zoqn/b3Xng/w6aZQ0xGVxzhw5xUFxcRqdPzP6yFi/4HBYRaifaI5fQ1RH8n0ZeOQ==} + hast-util-is-element@2.1.3: resolution: {integrity: sha512-O1bKah6mhgEq2WtVMk+Ta5K7pPMqsBBlmzysLdcwKVrqzZQ0CHqUPiIVspNhAG1rvxpvJjtGee17XfauZYKqVA==} hast-util-parse-selector@3.1.1: resolution: {integrity: sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==} + hast-util-parse-selector@4.0.0: + resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==} + + hast-util-raw@9.0.4: + resolution: {integrity: sha512-LHE65TD2YiNsHD3YuXcKPHXPLuYh/gjp12mOfU8jxSrm1f/yJpsb0F/KKljS6U9LJoP0Ux+tCe8iJ2AsPzTdgA==} + + hast-util-to-estree@3.1.0: + resolution: {integrity: sha512-lfX5g6hqVh9kjS/B9E2gSkvHH4SZNiQFiqWS0x9fENzEl+8W12RqdRxX6d/Cwxi30tPQs3bIO+aolQJNp1bIyw==} + + hast-util-to-html@9.0.3: + resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==} + + hast-util-to-jsx-runtime@2.3.0: + resolution: {integrity: sha512-H/y0+IWPdsLLS738P8tDnrQ8Z+dj12zQQ6WC11TIM21C8WFVoIxcqWXf2H3hiTVZjF1AWqoimGwrTWecWrnmRQ==} + + hast-util-to-parse5@8.0.0: + resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==} + hast-util-to-text@3.1.2: resolution: {integrity: sha512-tcllLfp23dJJ+ju5wCCZHVpzsQQ43+moJbqVX3jNWPB7z/KFC4FyZD6R7y94cHL6MQ33YtMZL8Z0aIXXI4XFTw==} hast-util-whitespace@2.0.1: resolution: {integrity: sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==} + hast-util-whitespace@3.0.0: + resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} + hastscript@7.2.0: resolution: {integrity: sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==} + hastscript@8.0.0: + resolution: {integrity: sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw==} + he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true @@ -10517,6 +13054,9 @@ packages: history@4.10.1: resolution: {integrity: sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==} + hls.js@1.3.5: + resolution: {integrity: sha512-uybAvKS6uDe0MnWNEPnO0krWVr+8m2R0hJ/viql8H3MVK+itq8gGQuIYoFHL3rECkIpNH98Lw8YuuWMKZxp3Ew==} + hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} @@ -10534,12 +13074,25 @@ packages: resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} engines: {node: '>=10'} + hpack.js@2.1.6: + resolution: {integrity: sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==} + html-entities@2.3.3: resolution: {integrity: sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==} html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + html-minifier-terser@6.1.0: + resolution: {integrity: sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==} + engines: {node: '>=12'} + hasBin: true + + html-minifier-terser@7.2.0: + resolution: {integrity: sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==} + engines: {node: ^14.13.1 || >=16.0.0} + hasBin: true + html-tags@2.0.0: resolution: {integrity: sha512-+Il6N8cCo2wB/Vd3gqy/8TZhTD3QvcVeQLCnZiGkGCH3JP28IgGAY41giccp2W4R3jfyJPAP318FQTa1yU7K7g==} engines: {node: '>=4'} @@ -10552,9 +13105,30 @@ packages: resolution: {integrity: sha512-QY6S+hZ0f5m1WT8WffYN+Hg+xm/w5I8XeUcAq/ZYP5wVC8xbKi4Whhru3FtrAebD5EhBW8rmFzkDI6eCAuFe2w==} hasBin: true + html-void-elements@3.0.0: + resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + + html-webpack-plugin@5.6.0: + resolution: {integrity: sha512-iwaY4wzbe48AfKLZ/Cc8k0L+FKG6oSNRaZ8x5A/T/IVDGyXcbHncM9TdDa93wn0FsSm82FhTKW7f3vS61thXAw==} + engines: {node: '>=10.13.0'} + peerDependencies: + '@rspack/core': 0.x || 1.x + webpack: ^5.20.0 + peerDependenciesMeta: + '@rspack/core': + optional: true + webpack: + optional: true + htmlparser2@3.10.1: resolution: {integrity: sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==} + htmlparser2@6.1.0: + resolution: {integrity: sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==} + + htmlparser2@8.0.2: + resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} + http-assert@1.5.0: resolution: {integrity: sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==} engines: {node: '>= 0.8'} @@ -10562,6 +13136,9 @@ packages: http-cache-semantics@4.1.1: resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} + http-deceiver@1.2.7: + resolution: {integrity: sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==} + http-errors@1.6.3: resolution: {integrity: sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==} engines: {node: '>= 0.6'} @@ -10574,13 +13151,21 @@ packages: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} + http-parser-js@0.5.8: + resolution: {integrity: sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==} + http-proxy-agent@5.0.0: resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} engines: {node: '>= 6'} - http-proxy-middleware@3.0.0: - resolution: {integrity: sha512-36AV1fIaI2cWRzHo+rbcxhe3M3jUDCNzc4D5zRl57sEWRAxdXYtw7FSQKYY6PDKssiAKjLYypbssHk+xs/kMXw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + http-proxy-middleware@2.0.7: + resolution: {integrity: sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@types/express': ^4.17.13 + peerDependenciesMeta: + '@types/express': + optional: true http-proxy@1.18.1: resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} @@ -10590,6 +13175,10 @@ packages: resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} engines: {node: '>=10.19.0'} + http2-wrapper@2.2.1: + resolution: {integrity: sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==} + engines: {node: '>=10.19.0'} + https-proxy-agent@5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} @@ -10630,6 +13219,12 @@ packages: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + icss-utils@5.1.0: + resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} + engines: {node: ^10 || ^12 || >= 14} + peerDependencies: + postcss: ^8.1.0 + ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -10642,6 +13237,11 @@ packages: engines: {node: '>=0.10.0'} hasBin: true + image-size@1.1.1: + resolution: {integrity: sha512-541xKlUw6jr/6gGuk92F+mYM5zaFAc5ahphvkqvNe2bQ6gVBkd6bfrmVJ2t4KDAfikAYZyIqTnktX3i6/aQDrQ==} + engines: {node: '>=16.x'} + hasBin: true + immediate@3.0.6: resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} @@ -10658,13 +13258,17 @@ packages: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} + import-lazy@4.0.0: + resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} + engines: {node: '>=8'} + import-local@3.1.0: resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} engines: {node: '>=8'} hasBin: true - import-meta-resolve@2.2.2: - resolution: {integrity: sha512-f8KcQ1D80V7RnqVm+/lirO9zkOxjGxhaTC1IPrBGd3MEfNgmNG67tSUO9gTi2F3Blr2Az6g1vocaxzkVnWl9MA==} + import-meta-resolve@4.1.0: + resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} importx@0.4.3: resolution: {integrity: sha512-x6E6OxmWq/SUaj7wDeDeSjyHP+rMUbEaqJ5fw0uEtC/FTX9ocxNMFJ+ONnpJIsRpFz3ya6qJAK4orwSKqw0BSQ==} @@ -10680,6 +13284,10 @@ packages: infer-owner@1.0.4: resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} + infima@0.2.0-alpha.44: + resolution: {integrity: sha512-tuRkUSO/lB3rEhLJk25atwAjgLuzq070+pOW8XcvpHky/YbENnRRdPd85IBkyeTgttmOy5ah+yHYsK1HhUd4lQ==} + engines: {node: '>=12'} + inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. @@ -10693,9 +13301,20 @@ packages: ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + ini@2.0.0: + resolution: {integrity: sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==} + engines: {node: '>=10'} + + ini@4.1.1: + resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + inline-style-parser@0.1.1: resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==} + inline-style-parser@0.2.4: + resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==} + inquirer@3.0.6: resolution: {integrity: sha512-thluxTGBXUGb8DuQcvH9/CM/CrcGyB5xUpWc9x6Slqcq1z/hRr2a6KxUpX4ddRfmbe0hg3E4jTvo5833aWz3BA==} @@ -10703,10 +13322,6 @@ packages: resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} engines: {node: '>=12.0.0'} - inquirer@9.2.12: - resolution: {integrity: sha512-mg3Fh9g2zfuVWJn6lhST0O7x4n03k7G8Tx5nvikJkbq8/CK47WDVm+UznF0G6s5Zi0KcyUisr6DU8T67N5U+1Q==} - engines: {node: '>=14.18.0'} - inquirer@9.2.15: resolution: {integrity: sha512-vI2w4zl/mDluHt9YEQ/543VTCwPKWiHzKtm9dM2V0NdFcqEexDAjUHzO1oA60HRNaVifGXXM1tRRNluLVHa0Kg==} engines: {node: '>=18'} @@ -10721,6 +13336,10 @@ packages: internmap@1.0.1: resolution: {integrity: sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==} + interpret@1.4.0: + resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} + engines: {node: '>= 0.10'} + interpret@3.1.1: resolution: {integrity: sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==} engines: {node: '>=10.13.0'} @@ -10728,6 +13347,9 @@ packages: intersection-observer@0.12.2: resolution: {integrity: sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg==} + invariant@2.2.4: + resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} + ip-address@9.0.5: resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} engines: {node: '>= 12'} @@ -10736,10 +13358,20 @@ packages: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} + ipaddr.js@2.2.0: + resolution: {integrity: sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==} + engines: {node: '>= 10'} + is-accessor-descriptor@1.0.1: resolution: {integrity: sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==} engines: {node: '>= 0.10'} + is-alphabetical@2.0.1: + resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} + + is-alphanumerical@2.0.1: + resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} + is-arguments@1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} @@ -10790,6 +13422,9 @@ packages: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} + is-decimal@2.0.1: + resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} + is-descriptor@0.1.7: resolution: {integrity: sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==} engines: {node: '>= 0.4'} @@ -10844,11 +13479,18 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-hexadecimal@2.0.1: + resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} + is-inside-container@1.0.0: resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} engines: {node: '>=14.16'} hasBin: true + is-installed-globally@0.4.0: + resolution: {integrity: sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==} + engines: {node: '>=10'} + is-interactive@1.0.0: resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} engines: {node: '>=8'} @@ -10864,6 +13506,10 @@ packages: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} + is-npm@6.0.0: + resolution: {integrity: sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-number-object@1.0.7: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} @@ -10876,10 +13522,18 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + is-obj@1.0.1: + resolution: {integrity: sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==} + engines: {node: '>=0.10.0'} + is-obj@2.0.0: resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} engines: {node: '>=8'} + is-path-cwd@2.2.0: + resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==} + engines: {node: '>=6'} + is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} @@ -10912,6 +13566,9 @@ packages: resolution: {integrity: sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-promise@2.2.2: + resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==} + is-reference@3.0.2: resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} @@ -10919,6 +13576,14 @@ packages: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} + is-regexp@1.0.0: + resolution: {integrity: sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==} + engines: {node: '>=0.10.0'} + + is-root@2.1.0: + resolution: {integrity: sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==} + engines: {node: '>=6'} + is-set@2.0.3: resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} engines: {node: '>= 0.4'} @@ -10965,10 +13630,6 @@ packages: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} - is-unicode-supported@1.3.0: - resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} - engines: {node: '>=12'} - is-weakmap@2.0.2: resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} engines: {node: '>= 0.4'} @@ -10995,6 +13656,14 @@ packages: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} + is-wsl@3.1.0: + resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} + engines: {node: '>=16'} + + is-yarn-global@0.4.1: + resolution: {integrity: sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ==} + engines: {node: '>=12'} + isarray@0.0.1: resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} @@ -11070,10 +13739,19 @@ packages: resolution: {integrity: sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==} engines: {node: '>=6'} + its-fine@1.2.5: + resolution: {integrity: sha512-fXtDA0X0t0eBYAGLVM5YsgJGsJ5jEmqZEPrGbzdf5awjv0xE7nqv3TVnvtUF060Tkes15DbDAKW/I48vsb6SyA==} + peerDependencies: + react: '>=18.0' + jackspeak@3.1.2: resolution: {integrity: sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ==} engines: {node: '>=14'} + jackspeak@4.0.2: + resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} + engines: {node: 20 || >=22} + jake@10.9.1: resolution: {integrity: sha512-61btcOHNnLnsOdtLgA5efqQWjnSi/vow5HbI7HMdKKWqvrKR1bLK3BPlJn9gcSaP2ewuamUSMB5XEy76KUIS2w==} engines: {node: '>=10'} @@ -11223,6 +13901,9 @@ packages: resolution: {integrity: sha512-c+PHQZakiQuMKbnhvrjZUvrK6E/AfmTOf4P+E3Y4FNVHcNMX9e/XrnbEvO+m4wS6ZjsvhHh/POQTlfy8uXFc0A==} hasBin: true + joi@17.13.3: + resolution: {integrity: sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==} + jquery@3.7.1: resolution: {integrity: sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==} @@ -11251,6 +13932,11 @@ packages: engines: {node: '>=4'} hasBin: true + jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} @@ -11346,31 +14032,17 @@ packages: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} + klona@2.0.6: + resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==} + engines: {node: '>= 8'} + koa-compose@4.1.0: resolution: {integrity: sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==} - koa-compress@5.1.1: - resolution: {integrity: sha512-UgMIN7ZoEP2DuoSQmD6CYvFSLt0NReGlc2qSY4bO4Oq0L56OiD9pDG41Kj/zFmVY/A3Wvmn4BqKcfq5H30LGIg==} - engines: {node: '>= 12'} - - koa-connect@2.1.0: - resolution: {integrity: sha512-O9pcFafHk0oQsBevlbTBlB9co+2RUQJ4zCzu3qJPmGlGoeEZkne+7gWDkecqDPSbCtED6LmhlQladxs6NjOnMQ==} - koa-convert@2.0.0: resolution: {integrity: sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==} engines: {node: '>= 10'} - koa-is-json@1.0.0: - resolution: {integrity: sha512-+97CtHAlWDx0ndt0J8y3P12EWLwTLMXIfMnYDev3wOTwH/RpBGMlfn4bDXlMEg1u73K6XRE9BbUp+5ZAYoRYWw==} - - koa-send@5.0.1: - resolution: {integrity: sha512-tmcyQ/wXXuxpDxyNXv5yNNkdAMdFRqwtegBXUaowiQzUKqJehttS0x2j0eOZDQAyloAth5w6wwBImnFzkUz3pQ==} - engines: {node: '>= 8'} - - koa-static@5.0.0: - resolution: {integrity: sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ==} - engines: {node: '>= 7.6.0'} - koa@2.14.2: resolution: {integrity: sha512-VFI2bpJaodz6P7x2uyLiX6RLYpZmOJqNmoCst/Yyd7hQlszyPwG/I9CQJ63nOtKSxpt5M7NH67V6nJL2BwCl7g==} engines: {node: ^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4} @@ -11378,6 +14050,13 @@ packages: kolorist@1.8.0: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + latest-version@7.0.0: + resolution: {integrity: sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==} + engines: {node: '>=14.16'} + + launch-editor@2.9.1: + resolution: {integrity: sha512-Gcnl4Bd+hRO9P9icCP/RVVT2o8SFlPXofuCxvA2SaZuH45whSvf5p8x5oih5ftLiVhEI4sp5xDY+R+b3zJBh5w==} + lazy-cache@1.0.4: resolution: {integrity: sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==} engines: {node: '>=0.10.0'} @@ -11390,6 +14069,12 @@ packages: engines: {node: '>=6'} hasBin: true + leva@0.9.35: + resolution: {integrity: sha512-sp/ZbHGrrzM+eq+wIAc9X7C5qFagNERYkwaulKI/xy0XrDPV67jLUSSqTCFSoSc0Uk96j3oephYoO/6I8mZNuw==} + peerDependencies: + react: '>=16.8.0' + react-dom: '>=16.8.0' + leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -11468,9 +14153,16 @@ packages: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} + lilconfig@3.1.2: + resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} + engines: {node: '>=14'} + lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + lint-staged@13.3.0: resolution: {integrity: sha512-mPRtrYnipYYv1FEE134ufbWpeggNTo+O/UPzngoaKzbzHAthvR55am+8GfHTnqNRQVRRrYQLGW9ZyUoD7DsBHQ==} engines: {node: ^16.14.0 || >=18.0.0} @@ -11518,6 +14210,14 @@ packages: resolution: {integrity: sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==} engines: {node: '>=4.0.0'} + loader-utils@2.0.4: + resolution: {integrity: sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==} + engines: {node: '>=8.9.0'} + + loader-utils@3.3.1: + resolution: {integrity: sha512-FMJTLMXfCLMLfJxcX9PFqX5qD88Z5MRGaZCVzfuqeZSPsyiBzs+pahDQjbIWz2QIzPZz0NX9Zy4FX3lmK6YHIg==} + engines: {node: '>= 12.13.0'} + local-pkg@0.4.3: resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} engines: {node: '>=14'} @@ -11533,6 +14233,10 @@ packages: resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} engines: {node: '>=4'} + locate-path@3.0.0: + resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} + engines: {node: '>=6'} + locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -11641,10 +14345,6 @@ packages: resolution: {integrity: sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - loglevel@1.8.1: - resolution: {integrity: sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==} - engines: {node: '>= 0.6.0'} - longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} @@ -11669,10 +14369,18 @@ packages: resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} engines: {node: '>=8'} + lowercase-keys@3.0.0: + resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + lru-cache@10.2.2: resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==} engines: {node: 14 || >=16.14} + lru-cache@11.0.1: + resolution: {integrity: sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==} + engines: {node: 20 || >=22} + lru-cache@4.1.5: resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} @@ -11692,10 +14400,25 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 + lucide-react@0.394.0: + resolution: {integrity: sha512-PzTbJ0bsyXRhH59k5qe7MpTd5MxlpYZUcM9kGSwvPGAfnn0J6FElDwu2EX6Vuh//F7y60rcVJiFQ7EK9DCMgfw==} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 + luxon@3.4.4: resolution: {integrity: sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==} engines: {node: '>=12'} + lz-string@1.5.0: + resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} + hasBin: true + + maath@0.10.8: + resolution: {integrity: sha512-tRvbDF0Pgqz+9XUa4jjfgAQ8/aPKmQdWXilFu2tMy4GWj4NOsx99HlULO4IeREfbO3a0sA145DZYyvXPkybm0g==} + peerDependencies: + '@types/three': '>=0.134.0' + three: '>=0.134.0' + magic-string-ast@0.3.0: resolution: {integrity: sha512-0shqecEPgdFpnI3AP90epXyxZy9g6CRZ+SZ7BcqFwYmtFEnZ1jpevcV5HoyVnlDS9gCnc1UIg3Rsvp3Ci7r8OA==} engines: {node: '>=16.14.0'} @@ -11763,6 +14486,14 @@ packages: resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==} engines: {node: '>=0.10.0'} + markdown-extensions@2.0.0: + resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==} + engines: {node: '>=16'} + + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + hasBin: true + markdown-table@3.0.3: resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==} @@ -11781,51 +14512,108 @@ packages: mdast-util-definitions@5.1.2: resolution: {integrity: sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==} + mdast-util-directive@3.0.0: + resolution: {integrity: sha512-JUpYOqKI4mM3sZcNxmF/ox04XYFFkNwr0CFlrQIkCwbvH0xzMCqkMqAde9wRd80VAhaUrwFwKm2nxretdT1h7Q==} + mdast-util-find-and-replace@2.2.2: resolution: {integrity: sha512-MTtdFRz/eMDHXzeK6W3dO7mXUlF82Gom4y0oOgvHhh/HXZAGvIQDUvQ0SuUx+j2tv44b8xTHOm8K/9OoRFnXKw==} + mdast-util-find-and-replace@3.0.1: + resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==} + mdast-util-from-markdown@1.3.1: resolution: {integrity: sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==} + mdast-util-from-markdown@2.0.1: + resolution: {integrity: sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==} + + mdast-util-frontmatter@2.0.1: + resolution: {integrity: sha512-LRqI9+wdgC25P0URIJY9vwocIzCcksduHQ9OF2joxQoyTNVduwLAFUzjoopuRJbJAReaKrNQKAZKL3uCMugWJA==} + mdast-util-gfm-autolink-literal@1.0.3: resolution: {integrity: sha512-My8KJ57FYEy2W2LyNom4n3E7hKTuQk/0SES0u16tjA9Z3oFkF4RrC/hPAPgjlSpezsOvI8ObcXcElo92wn5IGA==} + mdast-util-gfm-autolink-literal@2.0.1: + resolution: {integrity: sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==} + mdast-util-gfm-footnote@1.0.2: resolution: {integrity: sha512-56D19KOGbE00uKVj3sgIykpwKL179QsVFwx/DCW0u/0+URsryacI4MAdNJl0dh+u2PSsD9FtxPFbHCzJ78qJFQ==} + mdast-util-gfm-footnote@2.0.0: + resolution: {integrity: sha512-5jOT2boTSVkMnQ7LTrd6n/18kqwjmuYqo7JUPe+tRCY6O7dAuTFMtTPauYYrMPpox9hlN0uOx/FL8XvEfG9/mQ==} + mdast-util-gfm-strikethrough@1.0.3: resolution: {integrity: sha512-DAPhYzTYrRcXdMjUtUjKvW9z/FNAMTdU0ORyMcbmkwYNbKocDpdk+PX1L1dQgOID/+vVs1uBQ7ElrBQfZ0cuiQ==} + mdast-util-gfm-strikethrough@2.0.0: + resolution: {integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==} + mdast-util-gfm-table@1.0.7: resolution: {integrity: sha512-jjcpmNnQvrmN5Vx7y7lEc2iIOEytYv7rTvu+MeyAsSHTASGCCRA79Igg2uKssgOs1i1po8s3plW0sTu1wkkLGg==} + mdast-util-gfm-table@2.0.0: + resolution: {integrity: sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==} + mdast-util-gfm-task-list-item@1.0.2: resolution: {integrity: sha512-PFTA1gzfp1B1UaiJVyhJZA1rm0+Tzn690frc/L8vNX1Jop4STZgOE6bxUhnzdVSB+vm2GU1tIsuQcA9bxTQpMQ==} + mdast-util-gfm-task-list-item@2.0.0: + resolution: {integrity: sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==} + mdast-util-gfm@2.0.2: resolution: {integrity: sha512-qvZ608nBppZ4icQlhQQIAdc6S3Ffj9RGmzwUKUWuEICFnd1LVkN3EktF7ZHAgfcEdvZB5owU9tQgt99e2TlLjg==} + mdast-util-gfm@3.0.0: + resolution: {integrity: sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==} + mdast-util-math@2.0.2: resolution: {integrity: sha512-8gmkKVp9v6+Tgjtq6SYx9kGPpTf6FVYRa53/DLh479aldR9AyP48qeVOgNZ5X7QUK7nOy4yw7vg6mbiGcs9jWQ==} + mdast-util-mdx-expression@2.0.1: + resolution: {integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==} + + mdast-util-mdx-jsx@3.1.3: + resolution: {integrity: sha512-bfOjvNt+1AcbPLTFMFWY149nJz0OjmewJs3LQQ5pIyVGxP4CdOqNVJL6kTaM5c68p8q82Xv3nCyFfUnuEcH3UQ==} + + mdast-util-mdx@3.0.0: + resolution: {integrity: sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==} + + mdast-util-mdxjs-esm@2.0.1: + resolution: {integrity: sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==} + mdast-util-phrasing@3.0.1: resolution: {integrity: sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==} + mdast-util-phrasing@4.1.0: + resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} + mdast-util-to-hast@12.3.0: resolution: {integrity: sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==} + mdast-util-to-hast@13.2.0: + resolution: {integrity: sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==} + mdast-util-to-markdown@1.5.0: resolution: {integrity: sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==} + mdast-util-to-markdown@2.1.0: + resolution: {integrity: sha512-SR2VnIEdVNCJbP6y7kVTJgPLifdr8WEU440fQec7qHoHOUz/oJ2jmNRqdDQ3rbiStOXb2mCDGTuwsK5OPUgYlQ==} + mdast-util-to-string@3.2.0: resolution: {integrity: sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==} + mdast-util-to-string@4.0.0: + resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + mdn-data@2.0.28: resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==} mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + media-query-parser@2.0.2: resolution: {integrity: sha512-1N4qp+jE0pL5Xv4uEcwVUhIkwdUO3S/9gML90nqKA7v7FcOS5vUtatfzok9S9U1EJU8dHWlcv95WLnKmmxZI9w==} @@ -11875,10 +14663,22 @@ packages: merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + merge-value@1.0.0: + resolution: {integrity: sha512-fJMmvat4NeKz63Uv9iHWcPDjCWcCkoiRoajRTEO8hlhUC6rwaHg0QCF9hBOTjZmm4JuglPckPSTtcuJL5kp0TQ==} + engines: {node: '>=0.10.0'} + merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} + meshline@3.3.1: + resolution: {integrity: sha512-/TQj+JdZkeSUOl5Mk2J7eLcYTLiQm2IDzmlSvYm7ov15anEcDJ92GHqqazxTSreeNgfnYu24kiEvvv0WlbCdFQ==} + peerDependencies: + three: '>=0.137' + + meshoptimizer@0.18.1: + resolution: {integrity: sha512-ZhoIoL7TNV4s5B6+rx5mC//fw8/POGyNxS/DZyCJeiZ12ScLfVwRE/GfsxwiTkMYYD5DmK2/JXnEVXqL4rF+Sw==} + methods@1.1.2: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} engines: {node: '>= 0.6'} @@ -11889,81 +14689,183 @@ packages: micromark-core-commonmark@1.1.0: resolution: {integrity: sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==} + micromark-core-commonmark@2.0.1: + resolution: {integrity: sha512-CUQyKr1e///ZODyD1U3xit6zXwy1a8q2a1S1HKtIlmgvurrEpaw/Y9y6KSIbF8P59cn/NjzHyO+Q2fAyYLQrAA==} + + micromark-extension-directive@3.0.2: + resolution: {integrity: sha512-wjcXHgk+PPdmvR58Le9d7zQYWy+vKEU9Se44p2CrCDPiLr2FMyiT4Fyb5UFKFC66wGB3kPlgD7q3TnoqPS7SZA==} + + micromark-extension-frontmatter@2.0.0: + resolution: {integrity: sha512-C4AkuM3dA58cgZha7zVnuVxBhDsbttIMiytjgsM2XbHAB2faRVaHRle40558FBN+DJcrLNCoqG5mlrpdU4cRtg==} + micromark-extension-gfm-autolink-literal@1.0.5: resolution: {integrity: sha512-z3wJSLrDf8kRDOh2qBtoTRD53vJ+CWIyo7uyZuxf/JAbNJjiHsOpG1y5wxk8drtv3ETAHutCu6N3thkOOgueWg==} + micromark-extension-gfm-autolink-literal@2.1.0: + resolution: {integrity: sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==} + micromark-extension-gfm-footnote@1.1.2: resolution: {integrity: sha512-Yxn7z7SxgyGWRNa4wzf8AhYYWNrwl5q1Z8ii+CSTTIqVkmGZF1CElX2JI8g5yGoM3GAman9/PVCUFUSJ0kB/8Q==} + micromark-extension-gfm-footnote@2.1.0: + resolution: {integrity: sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==} + micromark-extension-gfm-strikethrough@1.0.7: resolution: {integrity: sha512-sX0FawVE1o3abGk3vRjOH50L5TTLr3b5XMqnP9YDRb34M0v5OoZhG+OHFz1OffZ9dlwgpTBKaT4XW/AsUVnSDw==} + micromark-extension-gfm-strikethrough@2.1.0: + resolution: {integrity: sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==} + micromark-extension-gfm-table@1.0.7: resolution: {integrity: sha512-3ZORTHtcSnMQEKtAOsBQ9/oHp9096pI/UvdPtN7ehKvrmZZ2+bbWhi0ln+I9drmwXMt5boocn6OlwQzNXeVeqw==} + micromark-extension-gfm-table@2.1.0: + resolution: {integrity: sha512-Ub2ncQv+fwD70/l4ou27b4YzfNaCJOvyX4HxXU15m7mpYY+rjuWzsLIPZHJL253Z643RpbcP1oeIJlQ/SKW67g==} + micromark-extension-gfm-tagfilter@1.0.2: resolution: {integrity: sha512-5XWB9GbAUSHTn8VPU8/1DBXMuKYT5uOgEjJb8gN3mW0PNW5OPHpSdojoqf+iq1xo7vWzw/P8bAHY0n6ijpXF7g==} + micromark-extension-gfm-tagfilter@2.0.0: + resolution: {integrity: sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==} + micromark-extension-gfm-task-list-item@1.0.5: resolution: {integrity: sha512-RMFXl2uQ0pNQy6Lun2YBYT9g9INXtWJULgbt01D/x8/6yJ2qpKyzdZD3pi6UIkzF++Da49xAelVKUeUMqd5eIQ==} + micromark-extension-gfm-task-list-item@2.1.0: + resolution: {integrity: sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==} + micromark-extension-gfm@2.0.3: resolution: {integrity: sha512-vb9OoHqrhCmbRidQv/2+Bc6pkP0FrtlhurxZofvOEy5o8RtuuvTq+RQ1Vw5ZDNrVraQZu3HixESqbG+0iKk/MQ==} + micromark-extension-gfm@3.0.0: + resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==} + micromark-extension-math@2.1.2: resolution: {integrity: sha512-es0CcOV89VNS9wFmyn+wyFTKweXGW4CEvdaAca6SWRWPyYCbBisnjaHLjWO4Nszuiud84jCpkHsqAJoa768Pvg==} + micromark-extension-mdx-expression@3.0.0: + resolution: {integrity: sha512-sI0nwhUDz97xyzqJAbHQhp5TfaxEvZZZ2JDqUo+7NvyIYG6BZ5CPPqj2ogUoPJlmXHBnyZUzISg9+oUmU6tUjQ==} + + micromark-extension-mdx-jsx@3.0.1: + resolution: {integrity: sha512-vNuFb9czP8QCtAQcEJn0UJQJZA8Dk6DXKBqx+bg/w0WGuSxDxNr7hErW89tHUY31dUW4NqEOWwmEUNhjTFmHkg==} + + micromark-extension-mdx-md@2.0.0: + resolution: {integrity: sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==} + + micromark-extension-mdxjs-esm@3.0.0: + resolution: {integrity: sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==} + + micromark-extension-mdxjs@3.0.0: + resolution: {integrity: sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==} + micromark-factory-destination@1.1.0: resolution: {integrity: sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==} + micromark-factory-destination@2.0.0: + resolution: {integrity: sha512-j9DGrQLm/Uhl2tCzcbLhy5kXsgkHUrjJHg4fFAeoMRwJmJerT9aw4FEhIbZStWN8A3qMwOp1uzHr4UL8AInxtA==} + micromark-factory-label@1.1.0: resolution: {integrity: sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==} + micromark-factory-label@2.0.0: + resolution: {integrity: sha512-RR3i96ohZGde//4WSe/dJsxOX6vxIg9TimLAS3i4EhBAFx8Sm5SmqVfR8E87DPSR31nEAjZfbt91OMZWcNgdZw==} + + micromark-factory-mdx-expression@2.0.2: + resolution: {integrity: sha512-5E5I2pFzJyg2CtemqAbcyCktpHXuJbABnsb32wX2U8IQKhhVFBqkcZR5LRm1WVoFqa4kTueZK4abep7wdo9nrw==} + micromark-factory-space@1.1.0: resolution: {integrity: sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==} + micromark-factory-space@2.0.0: + resolution: {integrity: sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==} + micromark-factory-title@1.1.0: resolution: {integrity: sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==} + micromark-factory-title@2.0.0: + resolution: {integrity: sha512-jY8CSxmpWLOxS+t8W+FG3Xigc0RDQA9bKMY/EwILvsesiRniiVMejYTE4wumNc2f4UbAa4WsHqe3J1QS1sli+A==} + micromark-factory-whitespace@1.1.0: resolution: {integrity: sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==} + micromark-factory-whitespace@2.0.0: + resolution: {integrity: sha512-28kbwaBjc5yAI1XadbdPYHX/eDnqaUFVikLwrO7FDnKG7lpgxnvk/XGRhX/PN0mOZ+dBSZ+LgunHS+6tYQAzhA==} + micromark-util-character@1.2.0: resolution: {integrity: sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==} + micromark-util-character@2.1.0: + resolution: {integrity: sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==} + micromark-util-chunked@1.1.0: resolution: {integrity: sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==} + micromark-util-chunked@2.0.0: + resolution: {integrity: sha512-anK8SWmNphkXdaKgz5hJvGa7l00qmcaUQoMYsBwDlSKFKjc6gjGXPDw3FNL3Nbwq5L8gE+RCbGqTw49FK5Qyvg==} + micromark-util-classify-character@1.1.0: resolution: {integrity: sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==} + micromark-util-classify-character@2.0.0: + resolution: {integrity: sha512-S0ze2R9GH+fu41FA7pbSqNWObo/kzwf8rN/+IGlW/4tC6oACOs8B++bh+i9bVyNnwCcuksbFwsBme5OCKXCwIw==} + micromark-util-combine-extensions@1.1.0: resolution: {integrity: sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==} + micromark-util-combine-extensions@2.0.0: + resolution: {integrity: sha512-vZZio48k7ON0fVS3CUgFatWHoKbbLTK/rT7pzpJ4Bjp5JjkZeasRfrS9wsBdDJK2cJLHMckXZdzPSSr1B8a4oQ==} + micromark-util-decode-numeric-character-reference@1.1.0: resolution: {integrity: sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==} + micromark-util-decode-numeric-character-reference@2.0.1: + resolution: {integrity: sha512-bmkNc7z8Wn6kgjZmVHOX3SowGmVdhYS7yBpMnuMnPzDq/6xwVA604DuOXMZTO1lvq01g+Adfa0pE2UKGlxL1XQ==} + micromark-util-decode-string@1.1.0: resolution: {integrity: sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==} + micromark-util-decode-string@2.0.0: + resolution: {integrity: sha512-r4Sc6leeUTn3P6gk20aFMj2ntPwn6qpDZqWvYmAG6NgvFTIlj4WtrAudLi65qYoaGdXYViXYw2pkmn7QnIFasA==} + micromark-util-encode@1.1.0: resolution: {integrity: sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==} + micromark-util-encode@2.0.0: + resolution: {integrity: sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==} + + micromark-util-events-to-acorn@2.0.2: + resolution: {integrity: sha512-Fk+xmBrOv9QZnEDguL9OI9/NQQp6Hz4FuQ4YmCb/5V7+9eAh1s6AYSvL20kHkD67YIg7EpE54TiSlcsf3vyZgA==} + micromark-util-html-tag-name@1.2.0: resolution: {integrity: sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==} + micromark-util-html-tag-name@2.0.0: + resolution: {integrity: sha512-xNn4Pqkj2puRhKdKTm8t1YHC/BAjx6CEwRFXntTaRf/x16aqka6ouVoutm+QdkISTlT7e2zU7U4ZdlDLJd2Mcw==} + micromark-util-normalize-identifier@1.1.0: resolution: {integrity: sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==} + micromark-util-normalize-identifier@2.0.0: + resolution: {integrity: sha512-2xhYT0sfo85FMrUPtHcPo2rrp1lwbDEEzpx7jiH2xXJLqBuy4H0GgXk5ToU8IEwoROtXuL8ND0ttVa4rNqYK3w==} + micromark-util-resolve-all@1.1.0: resolution: {integrity: sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==} + micromark-util-resolve-all@2.0.0: + resolution: {integrity: sha512-6KU6qO7DZ7GJkaCgwBNtplXCvGkJToU86ybBAUdavvgsCiG8lSSvYxr9MhwmQ+udpzywHsl4RpGJsYWG1pDOcA==} + micromark-util-sanitize-uri@1.2.0: resolution: {integrity: sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==} + micromark-util-sanitize-uri@2.0.0: + resolution: {integrity: sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==} + micromark-util-subtokenize@1.1.0: resolution: {integrity: sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==} + micromark-util-subtokenize@2.0.1: + resolution: {integrity: sha512-jZNtiFl/1aY73yS3UGQkutD0UbhTt68qnRpw2Pifmz5wV9h8gOVsN70v+Lq/f1rKaU/W8pxRe8y8Q9FX1AOe1Q==} + micromark-util-symbol@1.1.0: resolution: {integrity: sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==} @@ -11973,9 +14875,15 @@ packages: micromark-util-types@1.1.0: resolution: {integrity: sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==} + micromark-util-types@2.0.0: + resolution: {integrity: sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==} + micromark@3.2.0: resolution: {integrity: sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==} + micromark@4.0.0: + resolution: {integrity: sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==} + micromatch@3.1.0: resolution: {integrity: sha512-3StSelAE+hnRvMs8IdVW7Uhk8CVed5tp+kLLGlBP6WiRAXS21GPGu/Nat4WNPXj2Eoc24B02SaeoyozPMfj0/g==} engines: {node: '>=0.10.0'} @@ -11984,6 +14892,10 @@ packages: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + mime-db@1.33.0: resolution: {integrity: sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==} engines: {node: '>= 0.6'} @@ -12015,6 +14927,11 @@ packages: engines: {node: '>=4.0.0'} hasBin: true + mime@4.0.4: + resolution: {integrity: sha512-v8yqInVjhXyqP6+Kw4fV3ZzeMRqEW6FotRsKXjRS5VMTNIuXsdRoAvklpoRgSqXm6o9VNH4/C0mgedko9DdLsQ==} + engines: {node: '>=16'} + hasBin: true + mimic-fn@1.2.0: resolution: {integrity: sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==} engines: {node: '>=4'} @@ -12035,6 +14952,10 @@ packages: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} + mimic-response@4.0.0: + resolution: {integrity: sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -12042,6 +14963,19 @@ packages: mind-elixir@3.3.2: resolution: {integrity: sha512-SHHospQXT7ARaNMMnaZLFzBsOela9tc8rgSYHPhAPrV8Jxh6MCo1X8qQxJAvuqIVvN8uSGnXf+Po4nhzzSmWWQ==} + mini-css-extract-plugin@2.9.1: + resolution: {integrity: sha512-+Vyi+GCCOHnrJ2VPS+6aPoXN2k2jgUzDRhTFLjjTBn23qyXJXkjUWQgTL+mXpF5/A8ixLdCc6kWsoeOjKGejKQ==} + engines: {node: '>= 12.13.0'} + peerDependencies: + webpack: ^5.0.0 + + minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + minimatch@3.0.8: resolution: {integrity: sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==} @@ -12102,10 +15036,6 @@ packages: resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} engines: {node: '>=8'} - minipass@7.1.1: - resolution: {integrity: sha512-UZ7eQ+h8ywIRAW1hIEl2AqdwzJucU/Kp59+8kkZeSvafXhZjul247BvIJjEVFVeON6d7lM46XX1HXCduKAS8VA==} - engines: {node: '>=16 || 14 >=14.17'} - minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} @@ -12125,6 +15055,9 @@ packages: resolution: {integrity: sha512-VC5fg6ySUscaWUpI4gxCBTQMH2RdUpNrk+MsbpCYtIvf9SBJdiUey4qE7BXviJsJR4nDQxCZ+3yaYNW3guz/Pw==} engines: {node: '>= 8.0.0'} + mkdirp-classic@0.5.3: + resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} + mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true @@ -12186,6 +15119,10 @@ packages: resolution: {integrity: sha512-WeSGziVj6+Z2/MwQo3GvqzgR+9Uc+qt8SwHKh3gvNPiISKfsMfG4SvCOFYlxxgkXt7yIV2i1yczehm0EOKIxIg==} engines: {node: '>= 6.0.0'} + multicast-dns@7.2.5: + resolution: {integrity: sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==} + hasBin: true + multipipe@1.0.2: resolution: {integrity: sha512-6uiC9OvY71vzSGX8lZvSqscE7ft9nPupJ8fMjrCNRAUy2LREUW42UL+V/NTrogr6rFgRydUrCX4ZitfpSNkSCQ==} @@ -12232,6 +15169,9 @@ packages: nanospinner@1.1.0: resolution: {integrity: sha512-yFvNYMig4AthKYfHFl1sLj7B2nkHL4lzdig4osvl9/LdGbXwrdFRoqBS98gsEsOakr0yH+r5NZ/1Y9gdVB8trA==} + napi-build-utils@1.0.2: + resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} + natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -12247,6 +15187,12 @@ packages: neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + next-themes@0.3.0: + resolution: {integrity: sha512-/QHIrsYpd6Kfk7xakK4svpDI5mmXP0gfvCoJdGpZQ2TOrQZmsW0QxjaiLn8wbIKjtm4BTSqLoix4lxYYOnLJ/w==} + peerDependencies: + react: ^16.8 || ^17 || ^18 + react-dom: ^16.8 || ^17 || ^18 + nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} @@ -12263,12 +15209,19 @@ packages: node-addon-api@1.7.2: resolution: {integrity: sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==} + node-addon-api@6.1.0: + resolution: {integrity: sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==} + node-api-version@0.2.0: resolution: {integrity: sha512-fthTTsi8CxaBXMaBAD7ST2uylwvsnYxh2PfaScwpMhos6KlSFajXQPcM4ogNE1q2s3Lbz9GCGqeIHC+C6OZnKg==} node-emoji@1.11.0: resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==} + node-emoji@2.1.3: + resolution: {integrity: sha512-E2WEOVsgs7O16zsURJ/eH8BqhF029wGpEOnv7Urwdo2wmQanOACwJQh0devF9D9RhoZru0+9JXIS0dBXIAz+lA==} + engines: {node: '>=18'} + node-eval@2.0.0: resolution: {integrity: sha512-Ap+L9HznXAVeJj3TJ1op6M6bg5xtTq8L5CU/PJxtkhea/DrIxdTknGKIECKd/v/Lgql95iuMAYvIzBNd0pmcMg==} engines: {node: '>= 4'} @@ -12288,6 +15241,10 @@ packages: encoding: optional: true + node-forge@1.3.1: + resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} + engines: {node: '>= 6.13.0'} + node-gyp-build@4.7.1: resolution: {integrity: sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==} hasBin: true @@ -12297,15 +15254,18 @@ packages: engines: {node: ^12.13 || ^14.13 || >=16} hasBin: true + node-html-parser@5.4.2: + resolution: {integrity: sha512-RaBPP3+51hPne/OolXxcz89iYvQvKOydaqoePpOgXcrOKZhjVIzmpKZz+Hd/RBO2/zN2q6CNJhQzucVz+u3Jyw==} + node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} - node-releases@2.0.13: - resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} - node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} + nopt@6.0.0: resolution: {integrity: sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -12330,6 +15290,10 @@ packages: resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} engines: {node: '>=10'} + normalize-url@8.0.1: + resolution: {integrity: sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==} + engines: {node: '>=14.16'} + normalize-wheel-es@1.2.0: resolution: {integrity: sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw==} @@ -12344,8 +15308,8 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} - npm-run-path@5.1.0: - resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} + npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} npmlog@6.0.2: @@ -12407,9 +15371,16 @@ packages: resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} engines: {node: '>=0.10.0'} + obuf@1.1.2: + resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} + ofetch@1.3.4: resolution: {integrity: sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw==} + on-finished@2.3.0: + resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} + engines: {node: '>= 0.8'} + on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} @@ -12433,12 +15404,19 @@ packages: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} + oniguruma-to-js@0.4.3: + resolution: {integrity: sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==} + only@0.0.2: resolution: {integrity: sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==} - open@9.1.0: - resolution: {integrity: sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==} - engines: {node: '>=14.16'} + open@10.1.0: + resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==} + engines: {node: '>=18'} + + open@8.4.2: + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} + engines: {node: '>=12'} opencollective-postinstall@2.0.3: resolution: {integrity: sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==} @@ -12448,6 +15426,10 @@ packages: resolution: {integrity: sha512-YBRI0Qa8+Ui0/STV1qYuPrJm889PT3oCPHMVoL+8Y3nwCffj7PSrB2NlGgrhgBKDujxTjxknHWJ/FiqOsYcIDw==} hasBin: true + opener@1.5.2: + resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} + hasBin: true + opn@4.0.2: resolution: {integrity: sha512-iPBWbPP4OEOzR1xfhpGLDh+ypKBOygunZhM9jBtA7FS5sKjEiMZw0EFb82hnDOmTZX90ZWLoZKUza4cVt8MexA==} engines: {node: '>=0.10.0'} @@ -12474,6 +15456,10 @@ packages: resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} engines: {node: '>=8'} + p-cancelable@3.0.0: + resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} + engines: {node: '>=12.20'} + p-defer@1.0.0: resolution: {integrity: sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==} engines: {node: '>=4'} @@ -12510,6 +15496,10 @@ packages: resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} engines: {node: '>=4'} + p-locate@3.0.0: + resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} + engines: {node: '>=6'} + p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -12530,6 +15520,10 @@ packages: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} + p-retry@4.6.2: + resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==} + engines: {node: '>=8'} + p-try@1.0.0: resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} engines: {node: '>=4'} @@ -12541,12 +15535,22 @@ packages: package-json-from-dist@1.0.0: resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + package-json@8.1.1: + resolution: {integrity: sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==} + engines: {node: '>=14.16'} + package-manager-detector@0.1.2: resolution: {integrity: sha512-iePyefLTOm2gEzbaZKSW+eBMjg+UYsQvUKxmvGXAQ987K16efBg10MxIjZs08iyX+DY2/owKY9DIdu193kX33w==} + package-manager-detector@0.2.2: + resolution: {integrity: sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg==} + pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} + param-case@3.0.4: + resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} + parchment@3.0.0: resolution: {integrity: sha512-HUrJFQ/StvgmXRcQ1ftY6VEZUq3jA2t9ncFN4F84J/vN0/FPpQF+8FKXb3l6fLces6q0uOHj6NJn+2xvZnxO6A==} @@ -12566,6 +15570,9 @@ packages: resolution: {integrity: sha512-OZQaqKaQnR21iqhlnPfVisFjBWjhnMl5J9MgbP8xC+EwoVqbXrq78lp+9Zb3ahmLzrIX5Us/qbvBnaS3hkH6OA==} engines: {node: '>=6'} + parse-entities@4.0.1: + resolution: {integrity: sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==} + parse-json@2.2.0: resolution: {integrity: sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==} engines: {node: '>=0.10.0'} @@ -12578,6 +15585,9 @@ packages: resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==} engines: {node: '>= 0.10'} + parse-numeric-range@1.3.0: + resolution: {integrity: sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==} + parse-passwd@1.0.0: resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==} engines: {node: '>=0.10.0'} @@ -12585,6 +15595,9 @@ packages: parse-svg-path@0.1.2: resolution: {integrity: sha512-JyPSBnkTJ0AI8GGJLfMXvKq42cj5c006fnLz6fXy6zfoVjJizi8BNTpu8on8ziI1cKy9d9DGNuY17Ce7wuejpQ==} + parse5-htmlparser2-tree-adapter@7.0.0: + resolution: {integrity: sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==} + parse5@7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} @@ -12592,6 +15605,9 @@ packages: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} + pascal-case@3.1.2: + resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} + pascalcase@0.1.1: resolution: {integrity: sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==} engines: {node: '>=0.10.0'} @@ -12637,6 +15653,10 @@ packages: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + path-to-regexp@0.1.7: resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} @@ -12657,6 +15677,9 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + pathe@0.2.0: + resolution: {integrity: sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==} + pathe@1.1.1: resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} @@ -12695,6 +15718,9 @@ packages: picocolors@1.0.1: resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picocolors@1.1.0: + resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -12748,12 +15774,20 @@ packages: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} + pkg-dir@7.0.0: + resolution: {integrity: sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==} + engines: {node: '>=14.16'} + pkg-types@1.0.3: resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} pkg-types@1.1.3: resolution: {integrity: sha512-+JrgthZG6m3ckicaOB74TwQ+tBWsFl3qVQg7mN8ulwSOElJ7gBhKzj2VkCPnZ4NlF6kEquYU+RIYNVAvzd54UA==} + pkg-up@3.1.0: + resolution: {integrity: sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==} + engines: {node: '>=8'} + playwright-chromium@1.42.1: resolution: {integrity: sha512-VelpmKJ+3G3QlAFfA9JIuEYyU8b8vQrlIPY3tIaGv+adn7mem56SP04e+zMudcxisfOT3suQOSTD1qs6YErdDg==} engines: {node: '>=16'} @@ -12793,18 +15827,155 @@ packages: resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} engines: {node: '>=0.10.0'} + postcss-attribute-case-insensitive@7.0.0: + resolution: {integrity: sha512-ETMUHIw67Kyv9Q81nden/NuJbRh+4/S963giXpfSLd5eaKK8kd1UdAHMVRV/NG/w/N6Cq8B0qZIZbZZWU/67+A==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-calc@9.0.1: + resolution: {integrity: sha512-TipgjGyzP5QzEhsOZUaIkeO5mKeMFpebWzRogWG/ysonUlnHcq5aJe0jOjpfzUU8PeSaBQnrE8ehR0QA5vs8PQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.2 + + postcss-clamp@4.1.0: + resolution: {integrity: sha512-ry4b1Llo/9zz+PKC+030KUnPITTJAHeOwjfAyyB60eT0AorGLdzp52s31OsPRHRf8NchkgFoG2y6fCfn1IV1Ow==} + engines: {node: '>=7.6.0'} + peerDependencies: + postcss: ^8.4.6 + + postcss-color-functional-notation@7.0.2: + resolution: {integrity: sha512-c2WkR0MS73s+P5SgY1KBaSEE61Rj+miW095rkWDnMQxbTCQkp6y/jft8U0QMxEsI4k1Pd4PdV+TP9/1zIDR6XQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-color-hex-alpha@10.0.0: + resolution: {integrity: sha512-1kervM2cnlgPs2a8Vt/Qbe5cQ++N7rkYo/2rz2BkqJZIHQwaVuJgQH38REHrAi4uM0b1fqxMkWYmese94iMp3w==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-color-rebeccapurple@10.0.0: + resolution: {integrity: sha512-JFta737jSP+hdAIEhk1Vs0q0YF5P8fFcj+09pweS8ktuGuZ8pPlykHsk6mPxZ8awDl4TrcxUqJo9l1IhVr/OjQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-colormin@6.1.0: + resolution: {integrity: sha512-x9yX7DOxeMAR+BgGVnNSAxmAj98NX/YxEMNFP+SDCEeNLb2r3i6Hh1ksMsnW8Ub5SLCpbescQqn9YEbE9554Sw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-convert-values@6.1.0: + resolution: {integrity: sha512-zx8IwP/ts9WvUM6NkVSkiU902QZL1bwPhaVaLynPtCsOTqp+ZKbNi+s6XJg3rfqpKGA/oc7Oxk5t8pOQJcwl/w==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-custom-media@11.0.2: + resolution: {integrity: sha512-IDtxB1VgPayRLjNBMjuf827sn1j2m9EGnhIxpx2coVerbWJF+twt590+PKvdDc4K8QNFqFJh+W/SOiHpasVXsg==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-custom-properties@14.0.1: + resolution: {integrity: sha512-SB4GjuZjIq5GQFNbxFrirQPbkdbJooyNy8bh+fcJ8ZG0oasJTflTTtR4geb56h+FBVDIb9Hx4v/NiG2caOj8nQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-custom-selectors@8.0.1: + resolution: {integrity: sha512-2McIpyhAeKhUzVqrP4ZyMBpK5FuD+Y9tpQwhcof49652s7gez8057cSaOg/epYcKlztSYxb0GHfi7W5h3JoGUg==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-dir-pseudo-class@9.0.0: + resolution: {integrity: sha512-T59BG9lURiXmhcJMyKbyjNAK3KCyEQYEhaz9GAETHXfIy9XbGQeyz+H0zIwRJlrP4KKRPJolNYe3QjQPemMjBA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-discard-comments@6.0.2: + resolution: {integrity: sha512-65w/uIqhSBBfQmYnG92FO1mWZjJ4GL5b8atm5Yw2UgrwD7HiNiSSNwJor1eCFGzUgYnN/iIknhNRVqjrrpuglw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-discard-duplicates@6.0.3: + resolution: {integrity: sha512-+JA0DCvc5XvFAxwx6f/e68gQu/7Z9ud584VLmcgto28eB8FqSFZwtrLwB5Kcp70eIoWP/HXqz4wpo8rD8gpsTw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + postcss-discard-duplicates@7.0.0: resolution: {integrity: sha512-bAnSuBop5LpAIUmmOSsuvtKAAKREB6BBIYStWUTGq8oG5q9fClDMMuY8i4UPI/cEcDx2TN+7PMnXYIId20UVDw==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 + postcss-discard-empty@6.0.3: + resolution: {integrity: sha512-znyno9cHKQsK6PtxL5D19Fj9uwSzC2mB74cpT66fhgOadEUPyXFkbgwm5tvc3bt3NAy8ltE5MrghxovZRVnOjQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + postcss-discard-empty@7.0.0: resolution: {integrity: sha512-e+QzoReTZ8IAwhnSdp/++7gBZ/F+nBq9y6PomfwORfP7q9nBpK5AMP64kOt0bA+lShBFbBDcgpJ3X4etHg4lzA==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 + postcss-discard-overridden@6.0.2: + resolution: {integrity: sha512-j87xzI4LUggC5zND7KdjsI25APtyMuynXZSujByMaav2roV6OZX+8AaCUcZSWqckZpjAjRyFDdpqybgjFO0HJQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-discard-unused@6.0.5: + resolution: {integrity: sha512-wHalBlRHkaNnNwfC8z+ppX57VhvS+HWgjW508esjdaEYr3Mx7Gnn2xA4R/CKf5+Z9S5qsqC+Uzh4ueENWwCVUA==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-double-position-gradients@6.0.0: + resolution: {integrity: sha512-JkIGah3RVbdSEIrcobqj4Gzq0h53GG4uqDPsho88SgY84WnpkTpI0k50MFK/sX7XqVisZ6OqUfFnoUO6m1WWdg==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-focus-visible@10.0.0: + resolution: {integrity: sha512-GJjzvTj7JY+zN7wVBQ4osdKX53QLUdr6r2rSEkBUqrEMDKu3fHMHKOY9rirdirbHCx3IETnK25EtpPARR2KWNw==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-focus-within@9.0.0: + resolution: {integrity: sha512-QwflAWUToNZvQLGbc4qJhrQO8yZ5617L6hSNzNWDoqRX4FoIh9fbJbEjy0nvFPciaaOoCaeqcxBwYPbFU0HvBw==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-font-variant@5.0.0: + resolution: {integrity: sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==} + peerDependencies: + postcss: ^8.1.0 + + postcss-gap-properties@6.0.0: + resolution: {integrity: sha512-Om0WPjEwiM9Ru+VhfEDPZJAKWUd0mV1HmNXqp2C29z80aQ2uP9UVhLc7e3aYMIor/S5cVhoPgYQ7RtfeZpYTRw==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-image-set-function@7.0.0: + resolution: {integrity: sha512-QL7W7QNlZuzOwBTeXEmbVckNt1FSmhQtbMRvGGqqU4Nf4xk6KUEQhAoWuMzwbSv5jxiRiSZ5Tv7eiDB9U87znA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + postcss-import@15.1.0: resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} engines: {node: '>=14.0.0'} @@ -12823,6 +15994,12 @@ packages: peerDependencies: postcss: ^8.4.21 + postcss-lab-function@7.0.2: + resolution: {integrity: sha512-h4ARGLIBtC1PmCHsLgTWWj8j1i1CXoaht4A5RlITDX2z9AeFBak0YlY6sdF4oJGljrep+Dg2SSccIj4QnFbRDg==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + postcss-load-config@4.0.1: resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} engines: {node: '>= 14'} @@ -12835,40 +16012,249 @@ packages: ts-node: optional: true + postcss-loader@7.3.4: + resolution: {integrity: sha512-iW5WTTBSC5BfsBJ9daFMPVrLT36MrNiC6fqOZTTaHjBNX6Pfd5p+hSBqe/fEeNd7pc13QiAyGt7VdGMw4eRC4A==} + engines: {node: '>= 14.15.0'} + peerDependencies: + postcss: ^7.0.0 || ^8.0.1 + webpack: ^5.0.0 + + postcss-logical@8.0.0: + resolution: {integrity: sha512-HpIdsdieClTjXLOyYdUPAX/XQASNIwdKt5hoZW08ZOAiI+tbV0ta1oclkpVkW5ANU+xJvk3KkA0FejkjGLXUkg==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-merge-idents@6.0.3: + resolution: {integrity: sha512-1oIoAsODUs6IHQZkLQGO15uGEbK3EAl5wi9SS8hs45VgsxQfMnxvt+L+zIr7ifZFIH14cfAeVe2uCTa+SPRa3g==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-merge-longhand@6.0.5: + resolution: {integrity: sha512-5LOiordeTfi64QhICp07nzzuTDjNSO8g5Ksdibt44d+uvIIAE1oZdRn8y/W5ZtYgRH/lnLDlvi9F8btZcVzu3w==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-merge-rules@6.1.1: + resolution: {integrity: sha512-KOdWF0gju31AQPZiD+2Ar9Qjowz1LTChSjFFbS+e2sFgc4uHOp3ZvVX4sNeTlk0w2O31ecFGgrFzhO0RSWbWwQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + postcss-merge-rules@7.0.2: resolution: {integrity: sha512-VAR47UNvRsdrTHLe7TV1CeEtF9SJYR5ukIB9U4GZyZOptgtsS20xSxy+k5wMrI3udST6O1XuIn7cjQkg7sDAAw==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 + postcss-minify-font-values@6.1.0: + resolution: {integrity: sha512-gklfI/n+9rTh8nYaSJXlCo3nOKqMNkxuGpTn/Qm0gstL3ywTr9/WRKznE+oy6fvfolH6dF+QM4nCo8yPLdvGJg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-minify-gradients@6.0.3: + resolution: {integrity: sha512-4KXAHrYlzF0Rr7uc4VrfwDJ2ajrtNEpNEuLxFgwkhFZ56/7gaE4Nr49nLsQDZyUe+ds+kEhf+YAUolJiYXF8+Q==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-minify-params@6.1.0: + resolution: {integrity: sha512-bmSKnDtyyE8ujHQK0RQJDIKhQ20Jq1LYiez54WiaOoBtcSuflfK3Nm596LvbtlFcpipMjgClQGyGr7GAs+H1uA==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-minify-selectors@6.0.4: + resolution: {integrity: sha512-L8dZSwNLgK7pjTto9PzWRoMbnLq5vsZSTu8+j1P/2GB8qdtGQfn+K1uSvFgYvgh83cbyxT5m43ZZhUMTJDSClQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + postcss-minify-selectors@7.0.2: resolution: {integrity: sha512-dCzm04wqW1uqLmDZ41XYNBJfjgps3ZugDpogAmJXoCb5oCiTzIX4oPXXKxDpTvWOnKxQKR4EbV4ZawJBLcdXXA==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 + postcss-modules-extract-imports@3.1.0: + resolution: {integrity: sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==} + engines: {node: ^10 || ^12 || >= 14} + peerDependencies: + postcss: ^8.1.0 + + postcss-modules-local-by-default@4.0.5: + resolution: {integrity: sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==} + engines: {node: ^10 || ^12 || >= 14} + peerDependencies: + postcss: ^8.1.0 + + postcss-modules-scope@3.2.0: + resolution: {integrity: sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==} + engines: {node: ^10 || ^12 || >= 14} + peerDependencies: + postcss: ^8.1.0 + + postcss-modules-values@4.0.0: + resolution: {integrity: sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==} + engines: {node: ^10 || ^12 || >= 14} + peerDependencies: + postcss: ^8.1.0 + postcss-nested@6.0.1: resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 + postcss-nesting@13.0.0: + resolution: {integrity: sha512-TCGQOizyqvEkdeTPM+t6NYwJ3EJszYE/8t8ILxw/YoeUvz2rz7aM8XTAmBWh9/DJjfaaabL88fWrsVHSPF2zgA==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-normalize-charset@6.0.2: + resolution: {integrity: sha512-a8N9czmdnrjPHa3DeFlwqst5eaL5W8jYu3EBbTTkI5FHkfMhFZh1EGbku6jhHhIzTA6tquI2P42NtZ59M/H/kQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-normalize-display-values@6.0.2: + resolution: {integrity: sha512-8H04Mxsb82ON/aAkPeq8kcBbAtI5Q2a64X/mnRRfPXBq7XeogoQvReqxEfc0B4WPq1KimjezNC8flUtC3Qz6jg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-normalize-positions@6.0.2: + resolution: {integrity: sha512-/JFzI441OAB9O7VnLA+RtSNZvQ0NCFZDOtp6QPFo1iIyawyXg0YI3CYM9HBy1WvwCRHnPep/BvI1+dGPKoXx/Q==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-normalize-repeat-style@6.0.2: + resolution: {integrity: sha512-YdCgsfHkJ2jEXwR4RR3Tm/iOxSfdRt7jplS6XRh9Js9PyCR/aka/FCb6TuHT2U8gQubbm/mPmF6L7FY9d79VwQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-normalize-string@6.0.2: + resolution: {integrity: sha512-vQZIivlxlfqqMp4L9PZsFE4YUkWniziKjQWUtsxUiVsSSPelQydwS8Wwcuw0+83ZjPWNTl02oxlIvXsmmG+CiQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-normalize-timing-functions@6.0.2: + resolution: {integrity: sha512-a+YrtMox4TBtId/AEwbA03VcJgtyW4dGBizPl7e88cTFULYsprgHWTbfyjSLyHeBcK/Q9JhXkt2ZXiwaVHoMzA==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-normalize-unicode@6.1.0: + resolution: {integrity: sha512-QVC5TQHsVj33otj8/JD869Ndr5Xcc/+fwRh4HAsFsAeygQQXm+0PySrKbr/8tkDKzW+EVT3QkqZMfFrGiossDg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-normalize-url@6.0.2: + resolution: {integrity: sha512-kVNcWhCeKAzZ8B4pv/DnrU1wNh458zBNp8dh4y5hhxih5RZQ12QWMuQrDgPRw3LRl8mN9vOVfHl7uhvHYMoXsQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-normalize-whitespace@6.0.2: + resolution: {integrity: sha512-sXZ2Nj1icbJOKmdjXVT9pnyHQKiSAyuNQHSgRCUgThn2388Y9cGVDR+E9J9iAYbSbLHI+UUwLVl1Wzco/zgv0Q==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + postcss-normalize-whitespace@7.0.0: resolution: {integrity: sha512-37/toN4wwZErqohedXYqWgvcHUGlT8O/m2jVkAfAe9Bd4MzRqlBmXrJRePH0e9Wgnz2X7KymTgTOaaFizQe3AQ==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} peerDependencies: postcss: ^8.4.31 + postcss-opacity-percentage@3.0.0: + resolution: {integrity: sha512-K6HGVzyxUxd/VgZdX04DCtdwWJ4NGLG212US4/LA1TLAbHgmAsTWVR86o+gGIbFtnTkfOpb9sCRBx8K7HO66qQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-ordered-values@6.0.2: + resolution: {integrity: sha512-VRZSOB+JU32RsEAQrO94QPkClGPKJEL/Z9PCBImXMhIeK5KAYo6slP/hBYlLgrCjFxyqvn5VC81tycFEDBLG1Q==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-overflow-shorthand@6.0.0: + resolution: {integrity: sha512-BdDl/AbVkDjoTofzDQnwDdm/Ym6oS9KgmO7Gr+LHYjNWJ6ExORe4+3pcLQsLA9gIROMkiGVjjwZNoL/mpXHd5Q==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-page-break@3.0.4: + resolution: {integrity: sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ==} + peerDependencies: + postcss: ^8 + + postcss-place@10.0.0: + resolution: {integrity: sha512-5EBrMzat2pPAxQNWYavwAfoKfYcTADJ8AXGVPcUZ2UkNloUTWzJQExgrzrDkh3EKzmAx1evfTAzF9I8NGcc+qw==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + postcss-prefix-selector@1.16.0: resolution: {integrity: sha512-rdVMIi7Q4B0XbXqNUEI+Z4E+pueiu/CS5E6vRCQommzdQ/sgsS4dK42U7GX8oJR+TJOtT+Qv3GkNo6iijUMp3Q==} peerDependencies: postcss: '>4 <9' + postcss-preset-env@10.0.6: + resolution: {integrity: sha512-qixfM2wbvKJhUjJELLB8lV2UCsyrMdSXqiXHiNKMgAbNturstc80j/8MsthJeOpxYEekrCrFzcaoOJm8JRSdBg==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + + postcss-pseudo-class-any-link@10.0.0: + resolution: {integrity: sha512-bde8VE08Gq3ekKDq2BQ0ESOjNX54lrFDK3U9zABPINaqHblbZL/4Wfo5Y2vk6U64yVd/sjDwTzuiisFBpGNNIQ==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + postcss-pxtorem@6.0.0: resolution: {integrity: sha512-ZRXrD7MLLjLk2RNGV6UA4f5Y7gy+a/j1EqjAfp9NdcNYVjUMvg5HTYduTjSkKBkRkfqbg/iKrjMO70V4g1LZeg==} peerDependencies: postcss: ^8.0.0 + postcss-reduce-idents@6.0.3: + resolution: {integrity: sha512-G3yCqZDpsNPoQgbDUy3T0E6hqOQ5xigUtBQyrmq3tn2GxlyiL0yyl7H+T8ulQR6kOcHJ9t7/9H4/R2tv8tJbMA==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-reduce-initial@6.1.0: + resolution: {integrity: sha512-RarLgBK/CrL1qZags04oKbVbrrVK2wcxhvta3GCxrZO4zveibqbRPmm2VI8sSgCXwoUHEliRSbOfpR0b/VIoiw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-reduce-transforms@6.0.2: + resolution: {integrity: sha512-sB+Ya++3Xj1WaT9+5LOOdirAxP7dJZms3GRcYheSPi1PiTMigsxHAdkrbItHxwYHr4kt1zL7mmcHstgMYT+aiA==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + + postcss-replace-overflow-wrap@4.0.0: + resolution: {integrity: sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw==} + peerDependencies: + postcss: ^8.0.3 + + postcss-selector-not@8.0.0: + resolution: {integrity: sha512-g/juh7A83GWc3+kWL8BiS3YUIJb3XNqIVKz1kGvgN3OhoGCsPncy1qo/+q61tjy5r87OxBhSY1+hcH3yOhEW+g==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + postcss-selector-parser@6.0.13: resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==} engines: {node: '>=4'} @@ -12877,6 +16263,24 @@ packages: resolution: {integrity: sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==} engines: {node: '>=4'} + postcss-sort-media-queries@5.2.0: + resolution: {integrity: sha512-AZ5fDMLD8SldlAYlvi8NIqo0+Z8xnXU2ia0jxmuhxAU+Lqt9K+AlmLNJ/zWEnE9x+Zx3qL3+1K20ATgNOr3fAA==} + engines: {node: '>=14.0.0'} + peerDependencies: + postcss: ^8.4.23 + + postcss-svgo@6.0.3: + resolution: {integrity: sha512-dlrahRmxP22bX6iKEjOM+c8/1p+81asjKT+V5lrgOH944ryx/OHpclnIbGsKVd3uWOXFLYJwCVf0eEkJGvO96g==} + engines: {node: ^14 || ^16 || >= 18} + peerDependencies: + postcss: ^8.4.31 + + postcss-unique-selectors@6.0.4: + resolution: {integrity: sha512-K38OCaIrO8+PzpArzkLKB42dSARtC2tmG6PvD4b1o1Q2E9Os8jzfWFfSy/rixsHwohtsDdFtAWGjFVFUdwYaMg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + postcss-url@10.1.3: resolution: {integrity: sha512-FUzyxfI5l2tKmXdYc6VTu3TWZsInayEKPbiyW+P6vmmIrrb4I6CGX0BFoewgYHLK+oIL5FECEK02REYRpBvUCw==} engines: {node: '>=10'} @@ -12886,6 +16290,12 @@ packages: postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + postcss-zindex@6.0.2: + resolution: {integrity: sha512-5BxW9l1evPB/4ZIc+2GobEBoKC+h8gPGCMi+jxsYvd2x0mjq7wazk6DrP71pStqxE9Foxh5TVnonbWpFZzXaYg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + postcss@5.2.18: resolution: {integrity: sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==} engines: {node: '>=0.12'} @@ -12914,8 +16324,8 @@ packages: resolution: {integrity: sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==} engines: {node: ^10 || ^12 || >=14} - postcss@8.4.40: - resolution: {integrity: sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==} + postcss@8.4.47: + resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} engines: {node: ^10 || ^12 || >=14} posthtml-parser@0.2.1: @@ -12940,6 +16350,14 @@ packages: engines: {node: '>=14.0.0'} hasBin: true + potpack@1.0.2: + resolution: {integrity: sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ==} + + prebuild-install@7.1.2: + resolution: {integrity: sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==} + engines: {node: '>=10'} + hasBin: true + preferred-pm@3.1.2: resolution: {integrity: sha512-nk7dKrcW8hfCZ4H6klWcdRknBOXWzNQByJ0oJyX97BOupsYD+FzLS4hflgEu/uPUEHZCuRfMxzCBsuWd7OzT8Q==} engines: {node: '>=10'} @@ -12967,10 +16385,17 @@ packages: engines: {node: '>=14'} hasBin: true + pretty-error@4.0.0: + resolution: {integrity: sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==} + pretty-format@29.7.0: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + pretty-time@1.1.0: + resolution: {integrity: sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==} + engines: {node: '>=4'} + primevue@3.52.0: resolution: {integrity: sha512-HLOVP5YI0ArFKUhIyfZsWmTNMaBYNCBWC/3DYvdd/Po4LY5/WXf7yIYvArE2q/3OuwSXJXvjlR8UNQeJYRSQog==} peerDependencies: @@ -12981,6 +16406,15 @@ packages: engines: {node: '>=0.8'} hasBin: true + prism-react-renderer@2.4.0: + resolution: {integrity: sha512-327BsVCD/unU4CNLZTWVHyUHKnsqcvj2qbPlQ8MiBE2eq2rgctjigPA1Gp9HLF83kZ20zNN6jgizHJeEsyFYOw==} + peerDependencies: + react: '>=16.0.0' + + prismjs@1.29.0: + resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==} + engines: {node: '>=6'} + process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} @@ -13000,6 +16434,9 @@ packages: resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} engines: {node: '>=10'} + promise-worker-transferable@1.0.4: + resolution: {integrity: sha512-bN+0ehEnrXfxV2ZQvU2PetO0n4gqBD4ulq3MI1WOPLgr7/Mg9yRQkX5+0v1vagr74ZTsl7XtzlaYDo2EuCeYJw==} + prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} @@ -13010,6 +16447,9 @@ packages: property-information@6.5.0: resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==} + proto-list@1.2.4: + resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -13026,6 +16466,10 @@ packages: pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + punycode@1.4.1: resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} @@ -13033,6 +16477,10 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + pupa@3.1.0: + resolution: {integrity: sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==} + engines: {node: '>=12.20'} + pure-rand@6.1.0: resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} @@ -13071,6 +16519,12 @@ packages: queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + queue-tick@1.0.1: + resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} + + queue@6.0.2: + resolution: {integrity: sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==} + quick-lru@4.0.1: resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} engines: {node: '>=8'} @@ -13375,11 +16829,32 @@ packages: peerDependencies: react: '*' + react-colorful@5.6.1: + resolution: {integrity: sha512-1exovf0uGTGyq5mXQT0zgQ80uvj2PCwvF8zY1RN9/vbJVSjSo3fsB/4L3ObbF7u70NduSiK4xu4Y6q1MHoUGEw==} + peerDependencies: + react: '>=16.8.0' + react-dom: '>=16.8.0' + + react-composer@5.0.3: + resolution: {integrity: sha512-1uWd07EME6XZvMfapwZmc7NgCZqDemcvicRi3wMJzXsQLvZ3L7fTHVyPy1bZdnWXM4iPjYuNE+uJ41MLKeTtnA==} + peerDependencies: + react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + react-copy-to-clipboard@5.1.0: resolution: {integrity: sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==} peerDependencies: react: ^15.3.0 || 16 || 17 || 18 + react-dev-utils@12.0.1: + resolution: {integrity: sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ==} + engines: {node: '>=14'} + peerDependencies: + typescript: '>=2.7' + webpack: '>=4' + peerDependenciesMeta: + typescript: + optional: true + react-dom@17.0.2: resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} peerDependencies: @@ -13396,12 +16871,24 @@ packages: react: '>= 16.3.0' react-dom: '>= 16.3.0' + react-dropzone@12.1.0: + resolution: {integrity: sha512-iBYHA1rbopIvtzokEX4QubO6qk5IF/x3BtKGu74rF2JkQDXnwC4uO/lHKpaw4PJIV6iIAYOlwLv2FpiGyqHNog==} + engines: {node: '>= 10.13'} + peerDependencies: + react: '>= 16.8' + react-error-boundary@3.0.2: resolution: {integrity: sha512-KVzCusRTFpUYG0OFJbzbdRuxNQOBiGXVCqyNpBXM9z5NFsFLzMjUXMjx8gTja6M6WH+D2PvP3yKz4d8gD1PRaA==} engines: {node: '>=10', npm: '>=6'} peerDependencies: react: '>=16.13.1' + react-error-overlay@6.0.11: + resolution: {integrity: sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==} + + react-fast-compare@3.2.2: + resolution: {integrity: sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==} + react-focus-lock@2.9.6: resolution: {integrity: sha512-B7gYnCjHNrNYwY2juS71dHbf0+UpXXojt02svxybj8N5bxceAkzPChKEncHuratjUHkIFNCn06k2qj1DRlzTug==} peerDependencies: @@ -13411,6 +16898,17 @@ packages: '@types/react': optional: true + react-helmet-async@1.3.0: + resolution: {integrity: sha512-9jZ57/dAn9t3q6hneQS0wukqC2ENOBgMNVEhb/ZG9ZSxUetzVIw4iAmEU38IaVg3QGYauQPhSeUTuIUtFglWpg==} + peerDependencies: + react: ^16.6.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.6.0 || ^17.0.0 || ^18.0.0 + + react-helmet-async@2.0.5: + resolution: {integrity: sha512-rYUYHeus+i27MvFE+Jaa4WsyBKGkL6qVgbJvSBoX8mbsWoABJXdEO0bZyi0F6i+4f0NuIb8AvqPMj3iXFHkMwg==} + peerDependencies: + react: ^16.6.0 || ^17.0.0 || ^18.0.0 + react-highlight-words@0.20.0: resolution: {integrity: sha512-asCxy+jCehDVhusNmCBoxDf2mm1AJ//D+EzDx1m5K7EqsMBIHdZ5G4LdwbSEXqZq1Ros0G0UySWmAtntSph7XA==} peerDependencies: @@ -13425,6 +16923,11 @@ packages: react: '>=16.8.1' react-dom: '>=16.8.1' + react-icons@5.3.0: + resolution: {integrity: sha512-DnUk8aFbTyQPSkCfF8dbX6kQjXA9DktMeJqfjrg6cK9vwQVMxmcA3BfP4QoiztVmEHtwlTgLFsPuH2NskKT6eg==} + peerDependencies: + react: '*' + react-intersection-observer@9.13.0: resolution: {integrity: sha512-y0UvBfjDiXqC8h0EWccyaj4dVBWMxgEx0t5RGNzQsvkfvZwugnKwxpu70StY4ivzYuMajavwUDjH4LJyIki9Lw==} peerDependencies: @@ -13443,11 +16946,24 @@ packages: react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + react-json-view-lite@1.5.0: + resolution: {integrity: sha512-nWqA1E4jKPklL2jvHWs6s+7Na0qNgw9HCP6xehdQJeg6nPBTFZgGwyko9Q0oj+jQWKTTVRS30u0toM5wiuL3iw==} + engines: {node: '>=14'} + peerDependencies: + react: ^16.13.1 || ^17.0.0 || ^18.0.0 + react-layout-kit@1.9.0: resolution: {integrity: sha512-YjFXGaWTemwagfdmqz1VxTATXCpQmDfW/giHOSQDrGsddyBC6MEFdj+kNHYY9WpRamQDjyzAIkOQaJ1KxmcC2g==} peerDependencies: react: '>=18' + react-loadable-ssr-addon-v5-slorber@1.0.1: + resolution: {integrity: sha512-lq3Lyw1lGku8zUEJPDxsNm1AfYHBrO9Y1+olAYwpUJ2IGFBskM0DMKok97A6LWUpHm+o7IvQBOWu9MLenp9Z+A==} + engines: {node: '>=10.13.0'} + peerDependencies: + react-loadable: '*' + webpack: '>=4.41.1 || 5.x' + react-markdown@8.0.7: resolution: {integrity: sha512-bvWbzG4MtOU62XqBx3Xx+zB2raaFFsq4mYiAzfjXJMEz2sixgeAfraA3tvzULF02ZdOMUOKTBFFaZJDDrq+BJQ==} peerDependencies: @@ -13460,6 +16976,12 @@ packages: peerDependencies: react: ^16.13.1 + react-reconciler@0.27.0: + resolution: {integrity: sha512-HmMDKciQjYmBRGuuhIaKA1ba/7a+UsM5FzOZsMO2JYHt9Jh8reCb7j1eDC95NOyUlKM9KRyvdx0flBuDvYSBoA==} + engines: {node: '>=0.10.0'} + peerDependencies: + react: ^18.0.0 + react-redux@7.2.9: resolution: {integrity: sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==} peerDependencies: @@ -13486,6 +17008,12 @@ packages: react: '>=16.3.0' react-dom: '>=16.3.0' + react-router-config@5.1.1: + resolution: {integrity: sha512-DuanZjaD8mQp1ppHjgnnUnyOlqYXZVjnov/JzFhjLEwd3Z4dYjMSnqrEzzGThH47vpCOqPPwJM2FtthLeJ8Pbg==} + peerDependencies: + react: '>=15' + react-router: '>=5' + react-router-dom@5.3.4: resolution: {integrity: sha512-m4EqFMHv/Ih4kpcBCONHbkT68KoAeHN4p3lAGoNryfHi0dMy0kCzEZakiKRsvg5wHZ/JLrLW8o8KomWiz/qbYQ==} peerDependencies: @@ -13528,6 +17056,17 @@ packages: react: '>=16.6.0' react-dom: '>=16.6.0' + react-use-measure@2.1.1: + resolution: {integrity: sha512-nocZhN26cproIiIduswYpV5y5lQpSQS1y/4KuvUCjSKmw7ZWIS/+g3aFnX3WdBkyuGUtTLif3UTqnLLhbDoQig==} + peerDependencies: + react: '>=16.13' + react-dom: '>=16.13' + + react-waypoint@10.3.0: + resolution: {integrity: sha512-iF1y2c1BsoXuEGz08NoahaLFIGI9gTUAAOKip96HUmylRT6DUtpgoBPjk/Y8dfcFVmfVDvUzWjNXpZyKTOV0SQ==} + peerDependencies: + react: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + react-window@1.8.10: resolution: {integrity: sha512-Y0Cx+dnU6NLa5/EvoHukUD0BklJ8qITCtVEPY1C/nL8wwoZ0b5aEw8Ff1dOVHw7fCzMt55XfJDd8S8W8LCaUCg==} engines: {node: '>8.0.0'} @@ -13599,10 +17138,21 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + reading-time@1.5.0: + resolution: {integrity: sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==} + + rechoir@0.6.2: + resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} + engines: {node: '>= 0.10'} + rechoir@0.8.0: resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==} engines: {node: '>= 10.13.0'} + recursive-readdir@2.2.3: + resolution: {integrity: sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==} + engines: {node: '>=6.0.0'} + redent@3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} @@ -13624,6 +17174,13 @@ packages: reflect-metadata@0.2.2: resolution: {integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==} + regenerate-unicode-properties@10.2.0: + resolution: {integrity: sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==} + engines: {node: '>=4'} + + regenerate@1.4.2: + resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} + regenerator-runtime@0.10.5: resolution: {integrity: sha512-02YopEIhAgiBHWeoTiA8aitHDt8z6w+rQqNuIftlM+ZtvSl/brTouaU7DW6GO/cHtvxJvS4Hwv2ibKdxIRi24w==} @@ -13636,39 +17193,104 @@ packages: regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} + regenerator-transform@0.15.2: + resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} + regex-not@1.0.2: resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} engines: {node: '>=0.10.0'} + regex@4.3.3: + resolution: {integrity: sha512-r/AadFO7owAq1QJVeZ/nq9jNS1vyZt+6t1p/E59B56Rn2GCya+gr1KSyOzNL/er+r+B7phv5jG2xU2Nz1YkmJg==} + regexp.prototype.flags@1.5.1: resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} engines: {node: '>= 0.4'} + regexpu-core@6.1.1: + resolution: {integrity: sha512-k67Nb9jvwJcJmVpw0jPttR1/zVfnKf8Km0IPatrU/zJ5XeG3+Slx0xLXs9HByJSzXzrlz5EDvN6yLNMDc2qdnw==} + engines: {node: '>=4'} + registry-auth-token@3.3.2: resolution: {integrity: sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==} + registry-auth-token@5.0.2: + resolution: {integrity: sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==} + engines: {node: '>=14'} + registry-url@3.1.0: resolution: {integrity: sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==} engines: {node: '>=0.10.0'} + registry-url@6.0.1: + resolution: {integrity: sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==} + engines: {node: '>=12'} + + regjsgen@0.8.0: + resolution: {integrity: sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==} + + regjsparser@0.11.1: + resolution: {integrity: sha512-1DHODs4B8p/mQHU9kr+jv8+wIC9mtG4eBHxWxIq5mhjE3D5oORhCc6deRKzTjs9DcfRFmj9BHSDguZklqCGFWQ==} + hasBin: true + regression@2.0.1: resolution: {integrity: sha512-A4XYsc37dsBaNOgEjkJKzfJlE394IMmUPlI/p3TTI9u3T+2a+eox5Pr/CPUqF0eszeWZJPAc6QkroAhuUpWDJQ==} rehype-katex@6.0.3: resolution: {integrity: sha512-ByZlRwRUcWegNbF70CVRm2h/7xy7jQ3R9LaY4VVSvjnoVWwWVhNL60DiZsBpC5tSzYQOCvDbzncIpIjPZWodZA==} + rehype-raw@7.0.0: + resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} + + relateurl@0.2.7: + resolution: {integrity: sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==} + engines: {node: '>= 0.10'} + + remark-directive@3.0.0: + resolution: {integrity: sha512-l1UyWJ6Eg1VPU7Hm/9tt0zKtReJQNOA4+iDMAxTyZNWnJnFlbS/7zhiel/rogTLQ2vMYwDzSJa4BiVNqGlqIMA==} + + remark-emoji@4.0.1: + resolution: {integrity: sha512-fHdvsTR1dHkWKev9eNyhTo4EFwbUvJ8ka9SgeWkMPYFX4WoI7ViVBms3PjlQYgw5TLvNQso3GUB/b/8t3yo+dg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + remark-frontmatter@5.0.0: + resolution: {integrity: sha512-XTFYvNASMe5iPN0719nPrdItC9aU0ssC4v14mH1BCi1u0n1gAocqcujWUrByftZTbLhRtiKRyjYTSIOcr69UVQ==} + remark-gfm@3.0.1: resolution: {integrity: sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig==} + remark-gfm@4.0.0: + resolution: {integrity: sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA==} + remark-math@5.1.1: resolution: {integrity: sha512-cE5T2R/xLVtfFI4cCePtiRn+e6jKMtFDR3P8V3qpv8wpKjwvHoBA4eJzvX+nVrnlNy0911bdGmuspCSwetfYHw==} + remark-mdx@3.0.1: + resolution: {integrity: sha512-3Pz3yPQ5Rht2pM5R+0J2MrGoBSrzf+tJG94N+t/ilfdh8YLyyKYtidAYwTveB20BoHAcwIopOUqhcmh2F7hGYA==} + remark-parse@10.0.2: resolution: {integrity: sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==} + remark-parse@11.0.0: + resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==} + remark-rehype@10.1.0: resolution: {integrity: sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw==} + remark-rehype@11.1.1: + resolution: {integrity: sha512-g/osARvjkBXb6Wo0XvAeXQohVta8i84ACbenPpoSsxTOQH/Ae0/RGP4WZgnMH5pMLpsj4FG7OHmcIcXxpza8eQ==} + + remark-shiki-twoslash@3.1.3: + resolution: {integrity: sha512-4e8OH3ySOCw5wUbDcPszokOKjKuebOqlP2WlySvC7ITBOq27BiGsFlq+FNWhxppZ+JzhTWah4gQrnMjX3KDbAQ==} + peerDependencies: + typescript: '>3' + + remark-stringify@11.0.0: + resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} + + renderkid@3.0.0: + resolution: {integrity: sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg==} + repeat-element@1.1.4: resolution: {integrity: sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==} engines: {node: '>=0.10.0'} @@ -13731,10 +17353,6 @@ packages: resolution: {integrity: sha512-rzB7NnQpOkPHBWFPP3prUMqOP6yg3HkRGgcvR+lDyvyHoY3fZLFLYDkPXh78SPVBAE6VTCk/V+j8we4djg6o4g==} engines: {node: '>=4', npm: '>=2'} - resolve-path@1.4.0: - resolution: {integrity: sha512-i1xevIst/Qa+nA9olDxLWnLk8YZbi8R/7JPbCMcgyWaFR6bKWaexgJgEB5oc2PKMjYdrHynyz0NY+if+H98t1w==} - engines: {node: '>= 0.8'} - resolve-pathname@3.0.0: resolution: {integrity: sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==} @@ -13756,6 +17374,10 @@ packages: responselike@2.0.1: resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} + responselike@3.0.0: + resolution: {integrity: sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==} + engines: {node: '>=14.16'} + restore-cursor@2.0.0: resolution: {integrity: sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==} engines: {node: '>=4'} @@ -13776,6 +17398,10 @@ packages: resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} engines: {node: '>= 4'} + retry@0.13.1: + resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} + engines: {node: '>= 4'} + reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -13802,6 +17428,11 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true + rimraf@6.0.1: + resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} + engines: {node: 20 || >=22} + hasBin: true + roarr@2.15.4: resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==} engines: {node: '>=8.0'} @@ -13828,9 +17459,17 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - run-applescript@5.0.0: - resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==} - engines: {node: '>=12'} + rtl-detect@1.1.2: + resolution: {integrity: sha512-PGMBq03+TTG/p/cRB7HCLKJ1MgDIi07+QU1faSjiYRfmY5UsAttV9Hs08jDAHVwcOwmVLcSJkpwyfXszVjWfIQ==} + + rtlcss@4.3.0: + resolution: {integrity: sha512-FI+pHEn7Wc4NqKXMXFM+VAYKEj/mRIcW4h24YVwVtyjI+EqGrLc2Hx/Ny0lrZ21cBWU2goLy36eqMcNj3AQJig==} + engines: {node: '>=12.0.0'} + hasBin: true + + run-applescript@7.0.0: + resolution: {integrity: sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==} + engines: {node: '>=18'} run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} @@ -14042,6 +17681,22 @@ packages: resolution: {integrity: sha512-VnrsLUfLVuLNq8Zrz6oaYmJ+hK5saaOhuwRC58yAcXYM+CRbS+6us3ab2+PE2a94H2V+cPU4XFvqibfz3C/XSw==} engines: {node: '>=16.0.0'} + sass-loader@10.5.2: + resolution: {integrity: sha512-vMUoSNOUKJILHpcNCCyD23X34gve1TS7Rjd9uXHeKqhvBG39x6XbswFDtpbTElj6XdMFezoWhkh5vtKudf2cgQ==} + engines: {node: '>= 10.13.0'} + peerDependencies: + fibers: '>= 3.1.0' + node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + sass: ^1.3.0 + webpack: ^4.36.0 || ^5.0.0 + peerDependenciesMeta: + fibers: + optional: true + node-sass: + optional: true + sass: + optional: true + sass@1.69.5: resolution: {integrity: sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==} engines: {node: '>=14.0.0'} @@ -14061,13 +17716,24 @@ packages: scheduler@0.20.2: resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==} + scheduler@0.21.0: + resolution: {integrity: sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ==} + scheduler@0.23.0: resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} + schema-utils@2.7.0: + resolution: {integrity: sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==} + engines: {node: '>= 8.9.0'} + schema-utils@3.3.0: resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} engines: {node: '>= 10.13.0'} + schema-utils@4.2.0: + resolution: {integrity: sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==} + engines: {node: '>= 12.13.0'} + screenfull@5.2.0: resolution: {integrity: sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==} engines: {node: '>=0.10.0'} @@ -14084,15 +17750,30 @@ packages: scule@1.0.0: resolution: {integrity: sha512-4AsO/FrViE/iDNEPaAQlb77tf0csuq27EsVpy6ett584EcRTp6pTDLoGWVxCD77y5iU5FauOvhsI4o1APwPoSQ==} + section-matter@1.0.0: + resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} + engines: {node: '>=4'} + seemly@0.3.8: resolution: {integrity: sha512-MW8Qs6vbzo0pHmDpFSYPna+lwpZ6Zk1ancbajw/7E8TKtHdV+1DfZZD+kKJEhG/cAoB/i+LiT+5msZOqj0DwRA==} + select-hose@2.0.0: + resolution: {integrity: sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==} + select@1.1.2: resolution: {integrity: sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==} + selfsigned@2.4.1: + resolution: {integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==} + engines: {node: '>=10'} + semver-compare@1.0.0: resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} + semver-diff@4.0.0: + resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==} + engines: {node: '>=12'} + semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true @@ -14106,6 +17787,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + send@0.18.0: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} engines: {node: '>= 0.8.0'} @@ -14124,6 +17810,10 @@ packages: serve-handler@6.1.5: resolution: {integrity: sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==} + serve-index@1.9.1: + resolution: {integrity: sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==} + engines: {node: '>= 0.8.0'} + serve-static@1.15.0: resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} engines: {node: '>= 0.8.0'} @@ -14157,12 +17847,20 @@ packages: setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + shallow-clone@3.0.1: + resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} + engines: {node: '>=8'} + shallow-equal@1.2.1: resolution: {integrity: sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA==} shallowequal@1.1.0: resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} + sharp@0.32.6: + resolution: {integrity: sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==} + engines: {node: '>=14.15.0'} + shebang-command@1.2.0: resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} engines: {node: '>=0.10.0'} @@ -14179,12 +17877,36 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + shell-quote@1.8.1: + resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + + shelljs@0.8.5: + resolution: {integrity: sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==} + engines: {node: '>=4'} + hasBin: true + shepherd.js@11.1.1: resolution: {integrity: sha512-7nVEgLTZUu5qQCKTlzQeKL1AQd2rG9Y9iqzZUgGvCFwMUZZhfwtZ6eEyMWMYw0zl8qKjSrjgzxFOe+SpfO43aA==} engines: {node: 16.* || >= 18} - shiki@1.14.1: - resolution: {integrity: sha512-FujAN40NEejeXdzPt+3sZ3F2dx1U24BY2XTY01+MG8mbxCiA2XukXdcbyMyLAHJ/1AUUnQd1tZlvIjefWWEJeA==} + shiki-twoslash@3.1.2: + resolution: {integrity: sha512-JBcRIIizi+exIA/OUhYkV6jtyeZco0ykCkIRd5sgwIt1Pm4pz+maoaRZpm6SkhPwvif4fCA7xOtJOykhpIV64Q==} + peerDependencies: + typescript: '>3' + + shiki@0.10.1: + resolution: {integrity: sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==} + + shiki@1.22.0: + resolution: {integrity: sha512-/t5LlhNs+UOKQCYBtl5ZsH/Vclz73GIqT2yQsCBygr8L/ppTdmpL4w3kPLoZJbMKVWtoG77Ue1feOjZfDxvMkw==} + + shikiji-core@0.9.10: + resolution: {integrity: sha512-s+aC66Fh343wpm7VyQTg+htdHM/tUb8R+yxdAdUpCtKkRWbSBIpqQ3xTSNjbCTnGv10xsT164SW0r1VV1N6ToA==} + deprecated: Shikiji is merged back to Shiki v1.0, please migrate over to get the latest updates + + shikiji@0.9.10: + resolution: {integrity: sha512-tqnoSWWb7NailWJ/72Bgi8Z5O+ul71SJ5EhXbfHprZg67RGwck5eVyv5Uv4pso06ZuzNpUabRTyyFKHN/Ea9Mw==} + deprecated: Shikiji is merged back to Shiki v1.0, please migrate over to get the latest updates side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} @@ -14199,6 +17921,12 @@ packages: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} + simple-concat@1.0.1: + resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} + + simple-get@4.0.1: + resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} + simple-statistics@6.1.1: resolution: {integrity: sha512-zGwn0DDRa9Zel4H4n2pjTFIyGoAGpnpjrGIctreCxj5XWrcx9v7Xy7270FkC967WMmcvuc8ZU7m0ZG+hGN7gAA==} @@ -14220,9 +17948,18 @@ packages: sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + sitemap@7.1.2: + resolution: {integrity: sha512-ARCqzHJ0p4gWt+j7NlU5eDlIO9+Rkr/JhPFZKKQ1l5GCus7rJH4UdrlVAh0xC/gDS/Qir2UMxqYNHtsKr2rpCw==} + engines: {node: '>=12.0.0', npm: '>=5.6.0'} + hasBin: true + size-sensor@1.0.2: resolution: {integrity: sha512-2NCmWxY7A9pYKGXNBfteo4hy14gWu47rg5692peVMst6lQLPKrVjhY+UTEsPI5ceFRJSl3gVgMYaUi/hKuaiKw==} + skin-tone@2.0.0: + resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==} + engines: {node: '>=8'} + skmeans@0.9.7: resolution: {integrity: sha512-hNj1/oZ7ygsfmPZ7ZfN5MUBRoGg1gtpnImuJBgLO0ljQ67DtJuiQaiYdS4lUA6s0KCwnPhGivtC/WRwIZLkHyg==} @@ -14230,6 +17967,13 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} + slash@4.0.0: + resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} + engines: {node: '>=12'} + + slashes@3.0.12: + resolution: {integrity: sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==} + slice-ansi@3.0.0: resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} engines: {node: '>=8'} @@ -14262,6 +18006,9 @@ packages: resolution: {integrity: sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==} engines: {node: '>=0.10.0'} + sockjs@0.3.24: + resolution: {integrity: sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==} + socks-proxy-agent@7.0.0: resolution: {integrity: sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==} engines: {node: '>= 10'} @@ -14287,6 +18034,10 @@ packages: resolution: {integrity: sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==} hasBin: true + sort-css-media-queries@2.2.0: + resolution: {integrity: sha512-0xtkGhWCC9MGt/EzgnvbbbKhqWjl1+/rncmhTh5qCpbYguXh6S/qwePfv/JQ8jePXXmqingylxoC49pCkSPIbA==} + engines: {node: '>= 6.3.0'} + sortablejs@1.15.1: resolution: {integrity: sha512-P5Cjvb0UG1ZVNiDPj/n4V+DinttXG6K8n7vM/HQf0C25K3YKQTQY6fsr/sEGsJGpQ9exmPxluHxKBc0mLKU1lQ==} @@ -14301,6 +18052,10 @@ packages: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + source-map-resolve@0.5.3: resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} deprecated: See https://github.com/lydell/source-map-resolve#deprecated @@ -14356,6 +18111,13 @@ packages: spdx-license-ids@3.0.16: resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==} + spdy-transport@3.0.0: + resolution: {integrity: sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==} + + spdy@4.0.2: + resolution: {integrity: sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==} + engines: {node: '>=6.0.0'} + splaytree@3.1.2: resolution: {integrity: sha512-4OM2BJgC5UzrhVnnJA4BkHKGtjXNzzUfpQjCO8I05xYPsfS/VuQDwjCGGMi8rYQilHEV4j8NBqTFbls/PZEE7A==} @@ -14376,6 +18138,10 @@ packages: sprintf-js@1.1.3: resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} + srcset@4.0.0: + resolution: {integrity: sha512-wvLeHgcVHKO8Sc/H/5lkGreJQVeYMm9rlmt8PuR1xE31rIuXhuzznUUqAt8MqLhB3MqJdFzlNAfpcWnxiFUcPw==} + engines: {node: '>=12'} + ssf@0.11.2: resolution: {integrity: sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==} engines: {node: '>=0.8'} @@ -14402,6 +18168,12 @@ packages: resolution: {integrity: sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==} engines: {node: '>=0.10.0'} + stats-gl@2.2.8: + resolution: {integrity: sha512-94G5nZvduDmzxBS7K0lYnynYwreZpkknD8g5dZmU6mpwIhy3caCrjAm11Qm1cbyx7mqix7Fp00RkbsonzKWnoQ==} + + stats.js@0.17.0: + resolution: {integrity: sha512-hNKz8phvYLPEcRkeG1rsGmV5ChMjKDAWU7/OJJdDErPBNChQXxCo3WZurGpnWc6gZhAzEPFad1aVgyOANH1sMw==} + statuses@1.5.0: resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} engines: {node: '>= 0.6'} @@ -14427,6 +18199,9 @@ packages: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} + streamx@2.20.1: + resolution: {integrity: sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA==} + strict-uri-encode@1.1.0: resolution: {integrity: sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==} engines: {node: '>=0.10.0'} @@ -14477,6 +18252,13 @@ packages: string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + stringify-entities@4.0.4: + resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} + + stringify-object@3.3.0: + resolution: {integrity: sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==} + engines: {node: '>=4'} + strip-ansi@3.0.1: resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} engines: {node: '>=0.10.0'} @@ -14493,6 +18275,10 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} + strip-bom-string@1.0.0: + resolution: {integrity: sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==} + engines: {node: '>=0.10.0'} + strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -14535,6 +18321,15 @@ packages: style-to-object@0.4.4: resolution: {integrity: sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==} + style-to-object@1.0.8: + resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==} + + stylehacks@6.1.1: + resolution: {integrity: sha512-gSTTEQ670cJNoaeIp9KX6lZmm8LJ3jPB5yJmX8Zq/wQxOsAFXV3qjWzHas3YYk1qesuVIyYWWUpZ0vSE/dTSGg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.4.31 + stylis@4.2.0: resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} @@ -14586,6 +18381,11 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + suspend-react@0.1.3: + resolution: {integrity: sha512-aqldKgX9aZqpoDp3e8/BZ8Dm7x1pJl+qI3ZKxDN0i/IQTWUwBx/ManmlVJ3wowqbno6c2bmiIfs+Um6LbsjJyQ==} + peerDependencies: + react: '>=17.0' + svelte-check@3.6.2: resolution: {integrity: sha512-E6iFh4aUCGJLRz6QZXH3gcN/VFfkzwtruWSRmlKrLWQTiO6VzLsivR6q02WYLGNAGecV3EocqZuCDrC2uttZ0g==} hasBin: true @@ -14653,6 +18453,12 @@ packages: engines: {node: '>=14.0.0'} hasBin: true + swc-loader@0.2.6: + resolution: {integrity: sha512-9Zi9UP2YmDpgmQVbyOPJClY0dwf58JDyDMQ7uRc4krmc72twNI2fvlBWHLqVekBpPc7h5NJkGVT1zNDxFrqhvg==} + peerDependencies: + '@swc/core': ^1.2.147 + webpack: '>=2' + symbol-observable@4.0.0: resolution: {integrity: sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==} engines: {node: '>=0.10'} @@ -14667,11 +18473,28 @@ packages: tailwind-merge@1.14.0: resolution: {integrity: sha512-3mFKyCo/MBcgyOTlrY8T7odzZFx+w+qKSMAmdFzRvqBfLlSigU6TZnlFHK0lkMwj9Bj8OYU+9yW9lmGuS0QEnQ==} + tailwind-merge@2.5.3: + resolution: {integrity: sha512-d9ZolCAIzom1nf/5p4LdD5zvjmgSxY0BGgdSvmXIoMYAiPdAW/dSpP7joCDYFY7r/HkEa2qmPtkgsu0xjQeQtw==} + + tailwindcss-animate@1.0.7: + resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders' + tailwindcss@3.3.5: resolution: {integrity: sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==} engines: {node: '>=14.0.0'} hasBin: true + tailwindcss@3.4.13: + resolution: {integrity: sha512-KqjHOJKogOUt5Bs752ykCeiwvi0fKVkr5oqsFNt/8px/tA8scFPIlkygsf6jXrfCqGHz7VflA6+yytWuM+XhFw==} + engines: {node: '>=14.0.0'} + hasBin: true + + tapable@1.1.3: + resolution: {integrity: sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==} + engines: {node: '>=6'} + tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -14680,17 +18503,30 @@ packages: resolution: {integrity: sha512-KCuXjYxCZ3ru40dmND+oCLsXyuA8hoseu2SS404Px5ouyS0A99v8X/mdiLqsR5MTAyamMBN7PRwt2Dv3+xGIxw==} hasBin: true + tar-fs@2.1.1: + resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} + + tar-fs@3.0.6: + resolution: {integrity: sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==} + + tar-stream@2.2.0: + resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} + engines: {node: '>=6'} + + tar-stream@3.1.7: + resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} + tar@6.2.1: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} - tdesign-icons-vue@0.2.4: - resolution: {integrity: sha512-rgBVBW/Tes+ZFXtmkN0crmQuIszLeL+MqkmDme41dxwObxjFQ+SBkPWn8m+IUrTZ9CX/uNGjFG+QTaC8qcm90g==} + tdesign-icons-vue@0.2.5: + resolution: {integrity: sha512-wKah1jB2JqLf4dj9fyTUrjl+JfdVqP91HiXyE368Nm2VFxbA1HiQcwhnvRixwqTh7S3++/whq3pzV8BLcRtOeA==} peerDependencies: vue: ^2.6.12 - tdesign-vue@1.9.8: - resolution: {integrity: sha512-8kdsbb/AChhpvopfMs9lAK9Uxy8jvxu+ZQk35MjRFuQlZ5PW2CdfctEnsnz7yUGlFBGOJB4+08KxhPi6xDkH6A==} + tdesign-vue@1.10.4: + resolution: {integrity: sha512-ej4QgA/E9DsxlMzr1++pomREgpncniP1llMT2qGIkZ4vtpHJV3CjBIf6eDLtWTUWz3c8B5RM8lAqm2ZxSvGCEg==} peerDependencies: vue: ~2.6.10 @@ -14734,6 +18570,9 @@ packages: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} engines: {node: '>=18'} + text-decoder@1.2.0: + resolution: {integrity: sha512-n1yg1mOj9DNpk3NeZOx7T6jchTbyJS3i3cucbNN6FcdPriMZx7NsgrGpWWdWZZGxD7ES1XB+3uoqHMgOKaN+fg==} + text-extensions@1.9.0: resolution: {integrity: sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==} engines: {node: '>=0.10'} @@ -14748,6 +18587,19 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + three-mesh-bvh@0.7.6: + resolution: {integrity: sha512-rCjsnxEqR9r1/C/lCqzGLS67NDty/S/eT6rAJfDvsanrIctTWdNoR4ZOGWewCB13h1QkVo2BpmC0wakj1+0m8A==} + peerDependencies: + three: '>= 0.151.0' + + three-stdlib@2.33.0: + resolution: {integrity: sha512-V/uycBuqQOP/3Z+FBtpMdj2Ds5PyfJ3VDfMzktEmG4niOIzv7q1y5uMSbMcng0+057m1l0N147FQxsodQo9zBg==} + peerDependencies: + three: '>=0.128.0' + + three@0.168.0: + resolution: {integrity: sha512-6m6jXtDwMJEK/GGMbAOTSAmxNdzKvvBzgd7q8bE/7Tr6m7PaBh5kKLrN7faWtlglXbzj7sVba48Idwx+NRsZXw==} + throttle-debounce@5.0.0: resolution: {integrity: sha512-2iQTSgkkc1Zyk0MeVrt/3BvuOXYPl/R8Z0U2xxo9rjwNciaHDG3R+Lm6dh4EeUci49DanvBnuqI6jshoQQRGEg==} engines: {node: '>=12.22'} @@ -14761,6 +18613,9 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + thunky@1.1.0: + resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==} + timezone-groups@0.9.1: resolution: {integrity: sha512-1+GERLQpmebtCpkroy+AAfN/PZu8drrp4VAX/KSFBWvoaAT+5ANZIMTSn8CDW2uwfrpo1SaxIJ6MqdlACYbq/g==} engines: {node: '>=18.12.0'} @@ -14780,12 +18635,18 @@ packages: tinybench@2.8.0: resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinycolor2@1.6.0: resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} tinyexec@0.2.0: resolution: {integrity: sha512-au8dwv4xKSDR+Fw52csDo3wcDztPdne2oM1o/7LFro4h6bdFmvyUAeAfX40pwDtzHgRFqz1XWaUqgKS2G83/ig==} + tinyexec@0.3.0: + resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + tinyglobby@0.2.2: resolution: {integrity: sha512-mZ2sDMaySvi1PkTp4lTo1In2zjU+cY8OvZsfwrDrx3YGRbXPX1/cbPwCR9zkm3O/Fz9Jo0F1HNgIQ1b8BepqyQ==} engines: {node: '>=12.0.0'} @@ -14808,10 +18669,6 @@ packages: resolution: {integrity: sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==} engines: {node: '>=14.0.0'} - titleize@3.0.0: - resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==} - engines: {node: '>=12'} - tmp-promise@3.0.3: resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==} @@ -14890,6 +18747,19 @@ packages: resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} engines: {node: '>=0.10.0'} + troika-three-text@0.49.1: + resolution: {integrity: sha512-lXGWxgjJP9kw4i4Wh+0k0Q/7cRfS6iOME4knKht/KozPu9GcFA9NnNpRvehIhrUawq9B0ZRw+0oiFHgRO+4Wig==} + peerDependencies: + three: '>=0.125.0' + + troika-three-utils@0.49.0: + resolution: {integrity: sha512-umitFL4cT+Fm/uONmaQEq4oZlyRHWwVClaS6ZrdcueRvwc2w+cpNQ47LlJKJswpqtMFWbEhOLy0TekmcPZOdYA==} + peerDependencies: + three: '>=0.125.0' + + troika-worker-utils@0.49.0: + resolution: {integrity: sha512-1xZHoJrG0HFfCvT/iyN41DvI/nRykiBtHqFkGaGgJwq5iXfIZFBiPPEHFpPpgyKM3Oo5ITHXP5wM2TNQszYdVg==} + trough@2.2.0: resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} @@ -15003,6 +18873,9 @@ packages: tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + tslib@2.1.0: + resolution: {integrity: sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==} + tslib@2.3.0: resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==} @@ -15026,6 +18899,12 @@ packages: engines: {node: '>=8.0.0'} hasBin: true + tunnel-agent@0.6.0: + resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} + + tunnel-rat@0.1.2: + resolution: {integrity: sha512-lR5VHmkPhzdhrM092lI2nACsLO4QubF0/yoOhzX7c+wIpbN1GjHNzCc91QlpxBi+cnx8vVJ+Ur6vL5cEoQPFpQ==} + turf-jsts@1.2.3: resolution: {integrity: sha512-Ja03QIJlPuHt4IQ2FfGex4F4JAr8m3jpaHbFbQrgwr7s7L6U8ocrHiF3J1+wf9jzhGKxvDeaCAnGDot8OjGFyA==} @@ -15102,11 +18981,6 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typescript@4.9.5: - resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} - engines: {node: '>=4.2.0'} - hasBin: true - typescript@5.2.2: resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} engines: {node: '>=14.17'} @@ -15122,9 +18996,22 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + engines: {node: '>=14.17'} + hasBin: true + ua-parser-js@1.0.37: resolution: {integrity: sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==} + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + ufo@1.3.1: resolution: {integrity: sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==} @@ -15152,9 +19039,38 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.18.2: + resolution: {integrity: sha512-5ruQbENj95yDYJNS3TvcaxPMshV7aizdv/hWYjGIKoANWKjhWNBsr2YEuYZKodQulB1b8l7ILOuDQep3afowQQ==} + + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + unicode-canonical-property-names-ecmascript@2.0.1: + resolution: {integrity: sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==} + engines: {node: '>=4'} + + unicode-emoji-modifier-base@1.0.0: + resolution: {integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==} + engines: {node: '>=4'} + + unicode-match-property-ecmascript@2.0.0: + resolution: {integrity: sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==} + engines: {node: '>=4'} + + unicode-match-property-value-ecmascript@2.2.0: + resolution: {integrity: sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==} + engines: {node: '>=4'} + + unicode-property-aliases-ecmascript@2.1.0: + resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} + engines: {node: '>=4'} + unified@10.1.2: resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} + unified@11.0.5: + resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} + unimport@3.4.0: resolution: {integrity: sha512-M/lfFEgufIT156QAr/jWHLUn55kEmxBBiQsMxvRSIbquwmeJEyQYgshHDEvQDWlSJrVOOTAgnJ3FvlsrpGkanA==} @@ -15170,9 +19086,9 @@ packages: resolution: {integrity: sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - unique-string@2.0.0: - resolution: {integrity: sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==} - engines: {node: '>=8'} + unique-string@3.0.0: + resolution: {integrity: sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==} + engines: {node: '>=12'} unist-util-find-after@4.0.1: resolution: {integrity: sha512-QO/PuPMm2ERxC6vFXEPtmAutOopy5PknD+Oq64gGwxKtk4xwo9Z97t9Av1obPmGU0IyTa6EKYUfTrK2QJS3Ozw==} @@ -15180,12 +19096,24 @@ packages: unist-util-generated@2.0.1: resolution: {integrity: sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==} + unist-util-is@4.1.0: + resolution: {integrity: sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==} + unist-util-is@5.2.1: resolution: {integrity: sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==} + unist-util-is@6.0.0: + resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} + + unist-util-position-from-estree@2.0.0: + resolution: {integrity: sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==} + unist-util-position@4.0.4: resolution: {integrity: sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==} + unist-util-position@5.0.0: + resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} + unist-util-remove-position@4.0.2: resolution: {integrity: sha512-TkBb0HABNmxzAcfLf4qsIbFbaPDvMO6wa3b3j4VcEzFVaw1LBKwnW4/sRJ/atSLSzoIg41JWEdnE7N6DIhGDGQ==} @@ -15195,12 +19123,27 @@ packages: unist-util-stringify-position@4.0.0: resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + unist-util-visit-parents@3.1.1: + resolution: {integrity: sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==} + unist-util-visit-parents@5.1.3: resolution: {integrity: sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==} + unist-util-visit-parents@6.0.1: + resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==} + + unist-util-visit@2.0.3: + resolution: {integrity: sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==} + unist-util-visit@4.1.2: resolution: {integrity: sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==} + unist-util-visit@5.0.0: + resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} + + universal-user-agent@6.0.1: + resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==} + universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -15255,6 +19198,9 @@ packages: '@nuxt/kit': optional: true + unplugin-vue-inspector@2.2.0: + resolution: {integrity: sha512-ZJIAHaN6kHBboWU7d0Dmpk1xqabBGx4QUrS8JHB8K1h/i5smp4QyDBAwUAWQXdNdEmaNQzKUMHyCGsI0fWU4Pg==} + unplugin-vue-router@0.7.0: resolution: {integrity: sha512-ddRreGq0t5vlSB7OMy4e4cfU1w2AwBQCwmvW3oP/0IHQiokzbx4hd3TpwBu3eIAFVuhX2cwNQwp1U32UybTVCw==} peerDependencies: @@ -15277,10 +19223,6 @@ packages: resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} engines: {node: '>=0.10.0'} - untildify@4.0.0: - resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} - engines: {node: '>=8'} - update-browserslist-db@1.0.13: resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true @@ -15296,6 +19238,10 @@ packages: update-check@1.5.4: resolution: {integrity: sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==} + update-notifier@6.0.2: + resolution: {integrity: sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==} + engines: {node: '>=14.16'} + uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -15303,6 +19249,16 @@ packages: resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} deprecated: Please see https://github.com/lydell/urix#deprecated + url-loader@4.1.1: + resolution: {integrity: sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==} + engines: {node: '>= 10.13.0'} + peerDependencies: + file-loader: '*' + webpack: ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + file-loader: + optional: true + use-callback-ref@1.3.0: resolution: {integrity: sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==} engines: {node: '>=10'} @@ -15351,10 +19307,25 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + utila@0.4.0: + resolution: {integrity: sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==} + + utility-types@3.11.0: + resolution: {integrity: sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==} + engines: {node: '>= 4'} + utils-merge@1.0.1: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} + uuid@8.3.2: + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + hasBin: true + + uuid@9.0.1: + resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} + hasBin: true + uvu@0.5.6: resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} engines: {node: '>=8'} @@ -15367,6 +19338,9 @@ packages: resolution: {integrity: sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg==} engines: {node: '>=10.12.0'} + v8n@1.5.1: + resolution: {integrity: sha512-LdabyT4OffkyXFCe9UT+uMkxNBs5rcTVuZClvxQr08D5TUgo1OFKkoT65qYRCsiKBl/usHjpXvP4hHMzzDRj3A==} + validate-html-nesting@1.2.2: resolution: {integrity: sha512-hGdgQozCsQJMyfK5urgFcWEqsSSrK63Awe0t/IMR0bZ0QMtnuaiHzThW81guu3qx9abLi99NEuiaN6P9gVYsNg==} @@ -15399,12 +19373,21 @@ packages: vfile-location@4.1.0: resolution: {integrity: sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==} + vfile-location@5.0.3: + resolution: {integrity: sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==} + vfile-message@3.1.4: resolution: {integrity: sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==} + vfile-message@4.0.2: + resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} + vfile@5.3.7: resolution: {integrity: sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==} + vfile@6.0.3: + resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + vite-node@1.4.0: resolution: {integrity: sha512-VZDAseqjrHgNd4Kh8icYHWzTKSCZMhia7GyHfhtzLW33fZlG9SwsB6CEhgyVOWkJfJ2pFLrp/Gj1FSfAiqH9Lw==} engines: {node: ^18.0.0 || >=20.0.0} @@ -15415,6 +19398,37 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true + vite-node@2.1.2: + resolution: {integrity: sha512-HPcGNN5g/7I2OtPjLqgOtCRu/qhVvBxTUD3qzitmL0SrG1cWFzxzhMDWussxSbrRYWqnKf8P2jiNhPMSN+ymsQ==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + + vite-plugin-compression@0.5.1: + resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==} + peerDependencies: + vite: '>=2.0.0' + + vite-plugin-html@3.2.2: + resolution: {integrity: sha512-vb9C9kcdzcIo/Oc3CLZVS03dL5pDlOFuhGlZYDCJ840BhWl/0nGeZWf3Qy7NlOayscY4Cm/QRgULCQkEZige5Q==} + peerDependencies: + vite: '>=2.0.0' + + vite-plugin-inspect@0.8.7: + resolution: {integrity: sha512-/XXou3MVc13A5O9/2Nd6xczjrUwt7ZyI9h8pTnUMkr5SshLcb0PJUOVq2V+XVkdeU4njsqAtmK87THZuO2coGA==} + engines: {node: '>=14'} + peerDependencies: + '@nuxt/kit': '*' + vite: ^3.1.0 || ^4.0.0 || ^5.0.0-0 + peerDependenciesMeta: + '@nuxt/kit': + optional: true + + vite-plugin-mkcert@1.17.6: + resolution: {integrity: sha512-4JR1RN0HEg/w17eRQJ/Ve2pSa6KCVQcQO6yKtIaKQCFDyd63zGfXHWpygBkvvRSpqa0GcqNKf0fjUJ0HiJQXVQ==} + engines: {node: '>=v16.7.0'} + peerDependencies: + vite: '>=3' + vite-plugin-pages@0.32.0: resolution: {integrity: sha512-OxS3n0zUo5wsfgNCAuw2FiG/KD1ipgQV+2Flst4RyeI2iPv+m0YueVq+nx41k5NOWJj/zhqEas6I0b7HXveXjA==} peerDependencies: @@ -15430,6 +19444,11 @@ packages: solid-js: ^1.7.2 vite: ^3.0.0 || ^4.0.0 + vite-plugin-vue-inspector@5.2.0: + resolution: {integrity: sha512-wWxyb9XAtaIvV/Lr7cqB1HIzmHZFVUJsTNm3yAxkS87dgh/Ky4qr2wDEWNxF23fdhVa3jQ8MZREpr4XyiuaRqA==} + peerDependencies: + vite: ^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0 + vite-plugin-vue2-svg@0.4.0: resolution: {integrity: sha512-Z9NT9PTGwEKMSfxruPeBeAgMWAgMz5DiE6u8ZNtkYXODGWceUi6Dhp/f0NFO02sEoDiDxkokzr8u4qK4+9rXJQ==} peerDependencies: @@ -15515,13 +19534,44 @@ packages: jsdom: optional: true + vitest@2.1.2: + resolution: {integrity: sha512-veNjLizOMkRrJ6xxb+pvxN6/QAWg95mzcRjtmkepXdN87FNfxAss9RKe2far/G9cQpipfgP2taqg0KiWsquj8A==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 2.1.2 + '@vitest/ui': 2.1.2 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + vooks@0.2.12: resolution: {integrity: sha512-iox0I3RZzxtKlcgYaStQYKEzWWGAduMmq+jS7OrNdQo1FgGfPMubGL3uGHOU9n97NIvfFDBGnpSvkWyb/NSn/Q==} peerDependencies: vue: ^3.0.0 - vscode-languageserver-textdocument@1.0.11: - resolution: {integrity: sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==} + vscode-languageserver-textdocument@1.0.12: + resolution: {integrity: sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==} + + vscode-oniguruma@1.7.0: + resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} + + vscode-textmate@5.2.0: + resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} vscode-uri@3.0.8: resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==} @@ -15558,6 +19608,11 @@ packages: peerDependencies: vue: ^3.2.0 + vue-router@4.4.5: + resolution: {integrity: sha512-4fKZygS8cH1yCyuabAXGUAsyi1b2/o/OKgu/RUb+znIYOxPRxdkytJEx+0wGcpBE1pX6vUgh5jwWOKRGvuA/7Q==} + peerDependencies: + vue: ^3.2.0 + vue-template-babel-compiler@1.2.0: resolution: {integrity: sha512-CScBSX1/wCdmmZ/Lvj/63p2CCVTS0FMj0F69VRBo73CuJrjvPAPGmeNJ7D/cwt/VS2PduowRWbO8N4Zh4Z3b0g==} engines: {node: '>=12.0.0'} @@ -15636,10 +19691,6 @@ packages: peerDependencies: vue: ^3.0.11 - walkdir@0.4.1: - resolution: {integrity: sha512-3eBwRyEln6E1MSzcxcVpQIhRG8Q1jLvEqRmCZqS3dsfXEDR/AhOF4d+jHg1qvDCpYaVRZjENPQyrVxAkQqxPgQ==} - engines: {node: '>=6.0.0'} - walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} @@ -15650,15 +19701,52 @@ packages: resolution: {integrity: sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==} engines: {node: '>=10.13.0'} + wbuf@1.7.3: + resolution: {integrity: sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==} + wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} + webgl-constants@1.1.1: + resolution: {integrity: sha512-LkBXKjU5r9vAW7Gcu3T5u+5cvSvh5WwINdr0C+9jpzVB41cjQAP5ePArDtk/WHYdVj0GefCgM73BA7FlIiNtdg==} + + webgl-sdf-generator@1.1.1: + resolution: {integrity: sha512-9Z0JcMTFxeE+b2x1LJTdnaT8rT8aEp7MVxkNwoycNmJWwPdzoXzMh0BjJSh/AEFP+KPYZUli814h8bJZFIZ2jA==} + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + webpack-bundle-analyzer@4.10.2: + resolution: {integrity: sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==} + engines: {node: '>= 10.13.0'} + hasBin: true + + webpack-dev-middleware@5.3.4: + resolution: {integrity: sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==} + engines: {node: '>= 12.13.0'} + peerDependencies: + webpack: ^4.0.0 || ^5.0.0 + + webpack-dev-server@4.15.2: + resolution: {integrity: sha512-0XavAZbNJ5sDrCbkpWL8mia0o5WPOd2YGtxrEiZkBK9FjLppIUK2TgxK6qGD2P3hUXTJNNPVibrerKcx5WkR1g==} + engines: {node: '>= 12.13.0'} + hasBin: true + peerDependencies: + webpack: ^4.37.0 || ^5.0.0 + webpack-cli: '*' + peerDependenciesMeta: + webpack: + optional: true + webpack-cli: + optional: true + + webpack-merge@5.10.0: + resolution: {integrity: sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==} + engines: {node: '>=10.0.0'} + webpack-node-externals@3.0.0: resolution: {integrity: sha512-LnL6Z3GGDPht/AigwRh2dvL9PQPFQ8skEpVrWZXLWBYmqcaojHNN0onvHzie6rq7EWKrrBfPYqNEzTJgiwEQDQ==} engines: {node: '>=6'} @@ -15686,6 +19774,20 @@ packages: webpack-cli: optional: true + webpackbar@5.0.2: + resolution: {integrity: sha512-BmFJo7veBDgQzfWXl/wwYXr/VFus0614qZ8i9znqcl9fnEdiVkdbi0TedLQ6xAK92HZHDJ0QmyQ0fmuZPAgCYQ==} + engines: {node: '>=12'} + peerDependencies: + webpack: 3 || 4 || 5 + + websocket-driver@0.7.4: + resolution: {integrity: sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==} + engines: {node: '>=0.8.0'} + + websocket-extensions@0.1.4: + resolution: {integrity: sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==} + engines: {node: '>=0.8.0'} + whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} @@ -15728,6 +19830,9 @@ packages: resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==} engines: {node: '>=12'} + wildcard@2.0.1: + resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==} + window-size@0.1.0: resolution: {integrity: sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==} engines: {node: '>= 0.8.0'} @@ -15773,6 +19878,18 @@ packages: resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + ws@7.5.10: + resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + ws@8.14.2: resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} engines: {node: '>=10.0.0'} @@ -15788,9 +19905,9 @@ packages: x-data-spreadsheet@1.1.9: resolution: {integrity: sha512-wk7knDBYdHjtWiHUVQryZMy00dsGNCF+6wMb5ykwEFcAtBYkYZakJCOCHpEo8onC0Lb/q2gIynWpbQxA4qakyg==} - xdg-basedir@4.0.0: - resolution: {integrity: sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==} - engines: {node: '>=8'} + xdg-basedir@5.1.0: + resolution: {integrity: sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==} + engines: {node: '>=12'} xlsx-js-style@1.2.0: resolution: {integrity: sha512-DDT4FXFSWfT4DXMSok/m3TvmP1gvO3dn0Eu/c+eXHW5Kzmp7IczNkxg/iEPnImbG9X0Vb8QhROda5eatSR/97Q==} @@ -15802,6 +19919,10 @@ packages: engines: {node: '>=0.8'} hasBin: true + xml-js@1.6.11: + resolution: {integrity: sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==} + hasBin: true + xmlbuilder@15.1.1: resolution: {integrity: sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==} engines: {node: '>=8.0'} @@ -15855,6 +19976,11 @@ packages: resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} engines: {node: '>= 14'} + yaml@2.5.1: + resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} + engines: {node: '>= 14'} + hasBin: true + yargs-parser@18.1.3: resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} engines: {node: '>=6'} @@ -15890,6 +20016,10 @@ packages: yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + yauzl@3.1.3: + resolution: {integrity: sha512-JCCdmlJJWv7L0q/KylOekyRaUrdEoUxWkWVcgorosTROCFWiS9p2NNPE9Yb91ak7b1N5SxAZEliWpspbZccivw==} + engines: {node: '>=12'} + yjs@13.6.18: resolution: {integrity: sha512-GBTjO4QCmv2HFKFkYIJl7U77hIB1o22vSCSQD1Ge8ZxWbIbn8AltI4gyXbtL+g5/GJep67HCMq3Y5AmNwDSyEg==} engines: {node: '>=16.0.0', npm: '>=8.0.0'} @@ -15931,6 +20061,15 @@ packages: react: '>=16.8' zustand: '>=4.4.1' + zustand@3.7.2: + resolution: {integrity: sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA==} + engines: {node: '>=12.7.0'} + peerDependencies: + react: '>=16.8' + peerDependenciesMeta: + react: + optional: true + zustand@4.5.5: resolution: {integrity: sha512-+0PALYNJNgK6hldkgDq2vLrw5f6g/jCInz52n9RTpropGgeAf/ioFUCdtsjCqu4gNhW9D01rUQBROoRjdzyn2Q==} engines: {node: '>=12.7.0'} @@ -15955,6 +20094,111 @@ snapshots: '@adobe/css-tools@4.4.0': {} + '@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.24.0)(algoliasearch@4.24.0)': + dependencies: + '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.24.0)(algoliasearch@4.24.0) + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.24.0)(algoliasearch@4.24.0) + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + - search-insights + + '@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.24.0)(algoliasearch@4.24.0)': + dependencies: + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.24.0)(algoliasearch@4.24.0) + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + + '@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.24.0)(algoliasearch@4.24.0)': + dependencies: + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.24.0)(algoliasearch@4.24.0) + '@algolia/client-search': 4.24.0 + algoliasearch: 4.24.0 + + '@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.24.0)(algoliasearch@4.24.0)': + dependencies: + '@algolia/client-search': 4.24.0 + algoliasearch: 4.24.0 + + '@algolia/cache-browser-local-storage@4.24.0': + dependencies: + '@algolia/cache-common': 4.24.0 + + '@algolia/cache-common@4.24.0': {} + + '@algolia/cache-in-memory@4.24.0': + dependencies: + '@algolia/cache-common': 4.24.0 + + '@algolia/client-account@4.24.0': + dependencies: + '@algolia/client-common': 4.24.0 + '@algolia/client-search': 4.24.0 + '@algolia/transporter': 4.24.0 + + '@algolia/client-analytics@4.24.0': + dependencies: + '@algolia/client-common': 4.24.0 + '@algolia/client-search': 4.24.0 + '@algolia/requester-common': 4.24.0 + '@algolia/transporter': 4.24.0 + + '@algolia/client-common@4.24.0': + dependencies: + '@algolia/requester-common': 4.24.0 + '@algolia/transporter': 4.24.0 + + '@algolia/client-personalization@4.24.0': + dependencies: + '@algolia/client-common': 4.24.0 + '@algolia/requester-common': 4.24.0 + '@algolia/transporter': 4.24.0 + + '@algolia/client-search@4.24.0': + dependencies: + '@algolia/client-common': 4.24.0 + '@algolia/requester-common': 4.24.0 + '@algolia/transporter': 4.24.0 + + '@algolia/events@4.0.1': {} + + '@algolia/logger-common@4.24.0': {} + + '@algolia/logger-console@4.24.0': + dependencies: + '@algolia/logger-common': 4.24.0 + + '@algolia/recommend@4.24.0': + dependencies: + '@algolia/cache-browser-local-storage': 4.24.0 + '@algolia/cache-common': 4.24.0 + '@algolia/cache-in-memory': 4.24.0 + '@algolia/client-common': 4.24.0 + '@algolia/client-search': 4.24.0 + '@algolia/logger-common': 4.24.0 + '@algolia/logger-console': 4.24.0 + '@algolia/requester-browser-xhr': 4.24.0 + '@algolia/requester-common': 4.24.0 + '@algolia/requester-node-http': 4.24.0 + '@algolia/transporter': 4.24.0 + + '@algolia/requester-browser-xhr@4.24.0': + dependencies: + '@algolia/requester-common': 4.24.0 + + '@algolia/requester-common@4.24.0': {} + + '@algolia/requester-node-http@4.24.0': + dependencies: + '@algolia/requester-common': 4.24.0 + + '@algolia/transporter@4.24.0': + dependencies: + '@algolia/cache-common': 4.24.0 + '@algolia/logger-common': 4.24.0 + '@algolia/requester-common': 4.24.0 + '@alloc/quick-lru@5.2.0': {} '@ampproject/remapping@2.2.1': @@ -16031,27 +20275,39 @@ snapshots: react-dom: 18.2.0(react@18.2.0) stylis: 4.3.0 + '@ant-design/happy-work-theme@1.0.0(antd@5.11.0(date-fns@2.30.0)(luxon@3.4.4)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@ant-design/cssinjs': 1.21.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@babel/runtime': 7.25.0 + '@ctrl/tinycolor': 3.6.1 + antd: 5.11.0(date-fns@2.30.0)(luxon@3.4.4)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + classnames: 2.5.1 + rc-motion: 2.9.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + rc-util: 5.43.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + '@ant-design/icons-svg@4.3.1': {} '@ant-design/icons-svg@4.4.2': {} - '@ant-design/icons-vue@6.1.0(vue@3.3.7(typescript@5.4.5))': + '@ant-design/icons-vue@6.1.0(vue@3.3.7(typescript@5.6.3))': dependencies: '@ant-design/colors': 6.0.0 '@ant-design/icons-svg': 4.3.1 - vue: 3.3.7(typescript@5.4.5) + vue: 3.3.7(typescript@5.6.3) - '@ant-design/icons-vue@7.0.1(vue@3.3.7(typescript@5.4.5))': + '@ant-design/icons-vue@7.0.1(vue@3.3.7(typescript@5.6.3))': dependencies: '@ant-design/colors': 6.0.0 '@ant-design/icons-svg': 4.3.1 - vue: 3.3.7(typescript@5.4.5) + vue: 3.3.7(typescript@5.6.3) - '@ant-design/icons-vue@7.0.1(vue@3.4.15(typescript@5.4.5))': + '@ant-design/icons-vue@7.0.1(vue@3.4.15(typescript@5.6.3))': dependencies: '@ant-design/colors': 6.0.0 '@ant-design/icons-svg': 4.3.1 - vue: 3.4.15(typescript@5.4.5) + vue: 3.4.15(typescript@5.6.3) '@ant-design/icons@5.2.6(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: @@ -16068,7 +20324,7 @@ snapshots: '@ant-design/colors': 7.0.0 '@ant-design/icons-svg': 4.4.2 '@babel/runtime': 7.25.0 - classnames: 2.3.2 + classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -16153,13 +20409,13 @@ snapshots: remark-gfm: 3.0.1 remark-math: 5.1.1 rxjs: 7.8.1 - shiki: 1.14.1 + shiki: 1.22.0 type-fest: 3.13.1 use-merge-value: 1.2.0(react@18.2.0) yjs: 13.6.18 zustand: 4.5.5(@types/react@18.2.35)(immer@9.0.21)(react@18.2.0) zustand-middleware-yjs: 1.3.1(@types/react@18.2.35)(immer@9.0.21)(react@18.2.0) - zustand-utils: 1.3.2(react@18.2.0)(zustand@4.5.5(@types/react@18.2.35)(immer@9.0.21)(react@18.2.0)) + zustand-utils: 1.3.2(react@18.2.0)(zustand@4.5.5(@types/react@18.2.35)(immer@10.0.3)(react@18.2.0)) transitivePeerDependencies: - '@emotion/react' - '@types/react' @@ -16210,7 +20466,7 @@ snapshots: '@antv/scale': 0.3.18 '@antv/util': 2.0.17 fecha: 4.2.3 - tslib: 2.6.2 + tslib: 2.6.3 '@antv/coord@0.3.1': dependencies: @@ -16296,7 +20552,7 @@ snapshots: '@antv/path-util': 2.0.15 '@antv/scale': 0.3.18 '@antv/util': 2.0.17 - tslib: 2.6.2 + tslib: 2.6.3 '@antv/g2plot@2.3.39': dependencies: @@ -16307,7 +20563,7 @@ snapshots: fmin: 0.0.2 pdfast: 0.2.0 size-sensor: 1.0.2 - tslib: 2.6.2 + tslib: 2.6.3 '@antv/hierarchy@0.6.11': dependencies: @@ -16410,18 +20666,25 @@ snapshots: '@babel/code-frame@7.24.2': dependencies: - '@babel/highlight': 7.24.2 - picocolors: 1.0.0 + '@babel/highlight': 7.25.7 + picocolors: 1.1.0 '@babel/code-frame@7.24.7': dependencies: '@babel/highlight': 7.24.7 - picocolors: 1.0.1 + picocolors: 1.1.0 + + '@babel/code-frame@7.25.7': + dependencies: + '@babel/highlight': 7.25.7 + picocolors: 1.1.0 '@babel/compat-data@7.24.1': {} '@babel/compat-data@7.25.2': {} + '@babel/compat-data@7.25.7': {} + '@babel/core@7.23.2': dependencies: '@ampproject/remapping': 2.2.1 @@ -16455,7 +20718,7 @@ snapshots: '@babel/traverse': 7.24.1 '@babel/types': 7.24.0 convert-source-map: 2.0.0 - debug: 4.3.4 + debug: 4.3.6 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -16491,7 +20754,7 @@ snapshots: '@babel/generator@7.24.1': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.25.7 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 @@ -16503,13 +20766,31 @@ snapshots: '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 + '@babel/generator@7.25.7': + dependencies: + '@babel/types': 7.25.7 + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.0.2 + '@babel/helper-annotate-as-pure@7.22.5': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.25.7 '@babel/helper-annotate-as-pure@7.24.7': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.25.7 + + '@babel/helper-annotate-as-pure@7.25.7': + dependencies: + '@babel/types': 7.25.7 + + '@babel/helper-builder-binary-assignment-operator-visitor@7.25.7': + dependencies: + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 + transitivePeerDependencies: + - supports-color '@babel/helper-compilation-targets@7.22.15': dependencies: @@ -16523,7 +20804,7 @@ snapshots: dependencies: '@babel/compat-data': 7.24.1 '@babel/helper-validator-option': 7.23.5 - browserslist: 4.23.0 + browserslist: 4.23.1 lru-cache: 5.1.1 semver: 6.3.1 @@ -16535,6 +20816,14 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 + '@babel/helper-compilation-targets@7.25.7': + dependencies: + '@babel/compat-data': 7.25.7 + '@babel/helper-validator-option': 7.25.7 + browserslist: 4.24.0 + lru-cache: 5.1.1 + semver: 6.3.1 + '@babel/helper-create-class-features-plugin@7.24.1(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -16561,6 +20850,19 @@ snapshots: '@babel/helper-split-export-declaration': 7.22.6 semver: 6.3.1 + '@babel/helper-create-class-features-plugin@7.24.1(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 + '@babel/helper-member-expression-to-functions': 7.23.0 + '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/helper-replace-supers': 7.24.1(@babel/core@7.25.2) + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + semver: 6.3.1 + '@babel/helper-create-class-features-plugin@7.25.0(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 @@ -16569,16 +20871,47 @@ snapshots: '@babel/helper-optimise-call-expression': 7.24.7 '@babel/helper-replace-supers': 7.25.0(@babel/core@7.25.2) '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 - '@babel/traverse': 7.25.3 + '@babel/traverse': 7.25.7 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/helper-create-class-features-plugin@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-member-expression-to-functions': 7.25.7 + '@babel/helper-optimise-call-expression': 7.25.7 + '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.2) + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/traverse': 7.25.7 semver: 6.3.1 transitivePeerDependencies: - supports-color + '@babel/helper-create-regexp-features-plugin@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-annotate-as-pure': 7.25.7 + regexpu-core: 6.1.1 + semver: 6.3.1 + '@babel/helper-define-polyfill-provider@0.4.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.25.7 + debug: 4.3.6 + lodash.debounce: 4.0.8 + resolve: 1.22.8 + transitivePeerDependencies: + - supports-color + + '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 debug: 4.3.6 lodash.debounce: 4.0.8 resolve: 1.22.8 @@ -16589,36 +20922,43 @@ snapshots: '@babel/helper-function-name@7.23.0': dependencies: - '@babel/template': 7.25.0 - '@babel/types': 7.25.2 + '@babel/template': 7.25.7 + '@babel/types': 7.25.7 '@babel/helper-hoist-variables@7.22.5': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.25.7 '@babel/helper-member-expression-to-functions@7.23.0': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.25.7 '@babel/helper-member-expression-to-functions@7.24.8': dependencies: - '@babel/traverse': 7.25.3 - '@babel/types': 7.25.2 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-member-expression-to-functions@7.25.7': + dependencies: + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color '@babel/helper-module-imports@7.18.6': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.25.7 '@babel/helper-module-imports@7.22.15': dependencies: '@babel/types': 7.23.6 - '@babel/helper-module-imports@7.24.7': + '@babel/helper-module-imports@7.25.7': dependencies: - '@babel/traverse': 7.25.3 - '@babel/types': 7.25.2 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color @@ -16635,41 +20975,53 @@ snapshots: dependencies: '@babel/core': 7.25.2 '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.24.7 + '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 '@babel/helper-validator-identifier': 7.22.20 - transitivePeerDependencies: - - supports-color '@babel/helper-module-transforms@7.23.3(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.24.7 + '@babel/helper-module-imports': 7.25.7 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.25.7 transitivePeerDependencies: - supports-color '@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.24.7 + '@babel/helper-module-imports': 7.25.7 '@babel/helper-simple-access': 7.24.7 '@babel/helper-validator-identifier': 7.24.7 '@babel/traverse': 7.25.3 transitivePeerDependencies: - supports-color + '@babel/helper-module-transforms@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-module-imports': 7.25.7 + '@babel/helper-simple-access': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 + '@babel/traverse': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/helper-optimise-call-expression@7.22.5': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.25.7 '@babel/helper-optimise-call-expression@7.24.7': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.25.7 + + '@babel/helper-optimise-call-expression@7.25.7': + dependencies: + '@babel/types': 7.25.7 '@babel/helper-plugin-utils@7.22.5': {} @@ -16677,6 +21029,17 @@ snapshots: '@babel/helper-plugin-utils@7.24.8': {} + '@babel/helper-plugin-utils@7.25.7': {} + + '@babel/helper-remap-async-to-generator@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-wrap-function': 7.25.7 + '@babel/traverse': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/helper-replace-supers@7.24.1(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -16691,57 +21054,99 @@ snapshots: '@babel/helper-member-expression-to-functions': 7.23.0 '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/helper-replace-supers@7.24.1(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-member-expression-to-functions': 7.23.0 + '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/helper-replace-supers@7.25.0(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-member-expression-to-functions': 7.24.8 '@babel/helper-optimise-call-expression': 7.24.7 - '@babel/traverse': 7.25.3 + '@babel/traverse': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-replace-supers@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-member-expression-to-functions': 7.25.7 + '@babel/helper-optimise-call-expression': 7.25.7 + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color '@babel/helper-simple-access@7.22.5': dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.25.7 '@babel/helper-simple-access@7.24.7': dependencies: - '@babel/traverse': 7.25.3 - '@babel/types': 7.25.2 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-simple-access@7.25.7': + dependencies: + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color '@babel/helper-skip-transparent-expression-wrappers@7.22.5': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.25.7 '@babel/helper-skip-transparent-expression-wrappers@7.24.7': dependencies: - '@babel/traverse': 7.25.3 - '@babel/types': 7.25.2 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-skip-transparent-expression-wrappers@7.25.7': + dependencies: + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color '@babel/helper-split-export-declaration@7.22.6': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.25.7 '@babel/helper-string-parser@7.22.5': {} - '@babel/helper-string-parser@7.23.4': {} - '@babel/helper-string-parser@7.24.8': {} + '@babel/helper-string-parser@7.25.7': {} + '@babel/helper-validator-identifier@7.22.20': {} '@babel/helper-validator-identifier@7.24.7': {} + '@babel/helper-validator-identifier@7.25.7': {} + '@babel/helper-validator-option@7.22.15': {} '@babel/helper-validator-option@7.23.5': {} '@babel/helper-validator-option@7.24.8': {} + '@babel/helper-validator-option@7.25.7': {} + + '@babel/helper-wrap-function@7.25.7': + dependencies: + '@babel/template': 7.25.7 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/helpers@7.23.2': dependencies: '@babel/template': 7.24.0 @@ -16752,9 +21157,9 @@ snapshots: '@babel/helpers@7.24.1': dependencies: - '@babel/template': 7.24.0 - '@babel/traverse': 7.25.3 - '@babel/types': 7.25.2 + '@babel/template': 7.25.7 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color @@ -16765,17 +21170,24 @@ snapshots: '@babel/highlight@7.24.2': dependencies: - '@babel/helper-validator-identifier': 7.24.7 + '@babel/helper-validator-identifier': 7.25.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.0 + picocolors: 1.1.0 '@babel/highlight@7.24.7': dependencies: - '@babel/helper-validator-identifier': 7.24.7 + '@babel/helper-validator-identifier': 7.25.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.1 + picocolors: 1.1.0 + + '@babel/highlight@7.25.7': + dependencies: + '@babel/helper-validator-identifier': 7.25.7 + chalk: 2.4.2 + js-tokens: 4.0.0 + picocolors: 1.1.0 '@babel/parser@7.23.0': dependencies: @@ -16787,12 +21199,51 @@ snapshots: '@babel/parser@7.24.5': dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.25.7 '@babel/parser@7.25.3': dependencies: '@babel/types': 7.25.2 + '@babel/parser@7.25.7': + dependencies: + '@babel/types': 7.25.7 + + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/traverse': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/plugin-transform-optional-chaining': 7.25.7(@babel/core@7.25.2) + transitivePeerDependencies: + - supports-color + + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/traverse': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/plugin-proposal-class-properties@7.18.6(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 @@ -16806,6 +21257,13 @@ snapshots: '@babel/helper-plugin-utils': 7.24.0 '@babel/plugin-syntax-decorators': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-proposal-decorators@7.24.1(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-create-class-features-plugin': 7.24.1(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.0 + '@babel/plugin-syntax-decorators': 7.24.1(@babel/core@7.25.2) + '@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 @@ -16828,65 +21286,69 @@ snapshots: '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.3)': + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.3 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/core': 7.25.2 '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.0 - optional: true - - '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.24.3)': - dependencies: - '@babel/core': 7.24.3 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.0 - optional: true + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.3)': + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.3 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.2)': + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.0 - optional: true + '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-decorators@7.24.1(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.3)': + '@babel/plugin-syntax-decorators@7.24.1(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.25.2)': + '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.0 - optional: true + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.3)': + '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.3 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-syntax-import-assertions@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-syntax-import-attributes@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.0 - optional: true + '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-jsx@7.22.5(@babel/core@7.23.2)': dependencies: @@ -16903,21 +21365,30 @@ snapshots: '@babel/core': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 + '@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.0 + '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.3)': + '@babel/plugin-syntax-jsx@7.25.7(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-syntax-jsx@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.0 - optional: true + '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.3)': dependencies: @@ -16928,18 +21399,11 @@ snapshots: dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.0 - optional: true - - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.3)': - dependencies: - '@babel/core': 7.24.3 - '@babel/helper-plugin-utils': 7.24.0 '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.0 - optional: true + '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.3)': dependencies: @@ -16950,18 +21414,11 @@ snapshots: dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.0 - optional: true - - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.3)': - dependencies: - '@babel/core': 7.24.3 - '@babel/helper-plugin-utils': 7.24.0 '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.0 - optional: true + '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.3)': dependencies: @@ -16972,18 +21429,16 @@ snapshots: dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.0 - optional: true - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.3)': + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.3 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.0 - optional: true + '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-typescript@7.22.5(@babel/core@7.23.2)': dependencies: @@ -16995,32 +21450,201 @@ snapshots: '@babel/core': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 + '@babel/plugin-syntax-typescript@7.24.1(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.0 + '@babel/plugin-syntax-typescript@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-arrow-functions@7.24.1(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 + '@babel/plugin-transform-arrow-functions@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-async-generator-functions@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.2) + '@babel/traverse': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-async-to-generator@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-module-imports': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.2) + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-block-scoped-functions@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-block-scoping@7.24.4(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 + '@babel/plugin-transform-block-scoping@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-class-properties@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-class-static-block@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.2) + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-classes@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.2) + '@babel/traverse': 7.25.7 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-computed-properties@7.24.1(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 '@babel/template': 7.24.0 + '@babel/plugin-transform-computed-properties@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/template': 7.25.7 + '@babel/plugin-transform-destructuring@7.24.1(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 + '@babel/plugin-transform-destructuring@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-dotall-regex@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-duplicate-keys@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-dynamic-import@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.2) + + '@babel/plugin-transform-exponentiation-operator@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-builder-binary-assignment-operator-visitor': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-export-namespace-from@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.2) + + '@babel/plugin-transform-for-of@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-function-name@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/traverse': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-json-strings@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.2) + + '@babel/plugin-transform-literals@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-logical-assignment-operators@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.2) + + '@babel/plugin-transform-member-expression-literals@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-modules-amd@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-modules-commonjs@7.23.0(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -17034,8 +21658,6 @@ snapshots: '@babel/helper-module-transforms': 7.23.0(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-simple-access': 7.22.5 - transitivePeerDependencies: - - supports-color '@babel/plugin-transform-modules-commonjs@7.24.8(@babel/core@7.25.2)': dependencies: @@ -17046,11 +21668,165 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-modules-commonjs@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-simple-access': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-modules-systemjs@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 + '@babel/traverse': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-modules-umd@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-named-capturing-groups-regex@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-new-target@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-nullish-coalescing-operator@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.2) + + '@babel/plugin-transform-numeric-separator@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.2) + + '@babel/plugin-transform-object-rest-spread@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.2) + + '@babel/plugin-transform-object-super@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.2) + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-optional-catch-binding@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) + + '@babel/plugin-transform-optional-chaining@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-parameters@7.24.1(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 + '@babel/plugin-transform-parameters@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-private-methods@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-private-property-in-object@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.2) + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-property-literals@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-react-constant-elements@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-react-display-name@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-react-jsx-development@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/plugin-transform-react-jsx': 7.25.7(@babel/core@7.25.2) + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-module-imports': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.2) + '@babel/types': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-react-pure-annotations@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-regenerator@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + regenerator-transform: 0.15.2 + + '@babel/plugin-transform-reserved-words@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-runtime@7.23.2(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 @@ -17063,12 +21839,40 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-shorthand-properties@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-spread@7.24.1(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/plugin-transform-spread@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-sticky-regex@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-template-literals@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-typeof-symbol@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-typescript@7.22.15(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -17096,6 +21900,137 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-unicode-escapes@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-unicode-property-regex@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-unicode-regex@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-unicode-sets-regex@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/preset-env@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/compat-data': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-validator-option': 7.25.7 + '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.2) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.2) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.2) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.2) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-import-assertions': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-syntax-import-attributes': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.2) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.2) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.2) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.2) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.25.2) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.2) + '@babel/plugin-transform-arrow-functions': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-async-generator-functions': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-async-to-generator': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-block-scoped-functions': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-block-scoping': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-class-properties': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-class-static-block': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-classes': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-computed-properties': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-destructuring': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-dotall-regex': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-duplicate-keys': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-dynamic-import': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-exponentiation-operator': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-export-namespace-from': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-for-of': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-function-name': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-json-strings': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-literals': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-logical-assignment-operators': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-member-expression-literals': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-modules-amd': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-modules-systemjs': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-modules-umd': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-new-target': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-nullish-coalescing-operator': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-numeric-separator': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-object-rest-spread': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-object-super': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-optional-catch-binding': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-optional-chaining': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-private-methods': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-private-property-in-object': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-property-literals': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-regenerator': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-reserved-words': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-shorthand-properties': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-spread': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-sticky-regex': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-template-literals': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-typeof-symbol': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-unicode-escapes': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-unicode-property-regex': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-unicode-regex': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-unicode-sets-regex': 7.25.7(@babel/core@7.25.2) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.25.2) + babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.2) + babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.2) + babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.2) + core-js-compat: 3.38.1 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/types': 7.25.7 + esutils: 2.0.3 + + '@babel/preset-react@7.25.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-validator-option': 7.25.7 + '@babel/plugin-transform-react-display-name': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx-development': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-transform-react-pure-annotations': 7.25.7(@babel/core@7.25.2) + transitivePeerDependencies: + - supports-color + '@babel/preset-typescript@7.23.2(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -17116,6 +22051,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/runtime-corejs3@7.25.7': + dependencies: + core-js-pure: 3.38.1 + regenerator-runtime: 0.14.0 + '@babel/runtime@7.23.2': dependencies: regenerator-runtime: 0.14.0 @@ -17132,9 +22072,9 @@ snapshots: '@babel/template@7.24.0': dependencies: - '@babel/code-frame': 7.24.2 - '@babel/parser': 7.24.1 - '@babel/types': 7.25.2 + '@babel/code-frame': 7.25.7 + '@babel/parser': 7.25.7 + '@babel/types': 7.25.7 '@babel/template@7.25.0': dependencies: @@ -17142,6 +22082,12 @@ snapshots: '@babel/parser': 7.25.3 '@babel/types': 7.25.2 + '@babel/template@7.25.7': + dependencies: + '@babel/code-frame': 7.25.7 + '@babel/parser': 7.25.7 + '@babel/types': 7.25.7 + '@babel/traverse@7.23.2': dependencies: '@babel/code-frame': 7.24.2 @@ -17152,22 +22098,22 @@ snapshots: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.24.1 '@babel/types': 7.24.0 - debug: 4.3.4 + debug: 4.3.6 globals: 11.12.0 transitivePeerDependencies: - supports-color '@babel/traverse@7.24.1': dependencies: - '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.1 + '@babel/code-frame': 7.25.7 + '@babel/generator': 7.25.7 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.24.1 - '@babel/types': 7.25.2 - debug: 4.3.4 + '@babel/parser': 7.25.7 + '@babel/types': 7.25.7 + debug: 4.3.6 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -17184,6 +22130,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/traverse@7.25.7': + dependencies: + '@babel/code-frame': 7.25.7 + '@babel/generator': 7.25.7 + '@babel/parser': 7.25.7 + '@babel/template': 7.25.7 + '@babel/types': 7.25.7 + debug: 4.3.6 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + '@babel/types@7.23.0': dependencies: '@babel/helper-string-parser': 7.22.5 @@ -17192,14 +22150,14 @@ snapshots: '@babel/types@7.23.6': dependencies: - '@babel/helper-string-parser': 7.23.4 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-string-parser': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 to-fast-properties: 2.0.0 '@babel/types@7.24.0': dependencies: - '@babel/helper-string-parser': 7.23.4 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-string-parser': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 to-fast-properties: 2.0.0 '@babel/types@7.25.2': @@ -17208,6 +22166,12 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 + '@babel/types@7.25.7': + dependencies: + '@babel/helper-string-parser': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 + to-fast-properties: 2.0.0 + '@bcoe/v8-coverage@0.2.3': {} '@better-scroll/core@2.5.0': @@ -17257,13 +22221,13 @@ snapshots: '@bufbuild/protobuf@1.4.1': {} - '@changesets/apply-release-plan@6.1.4': + '@changesets/apply-release-plan@7.0.1': dependencies: '@babel/runtime': 7.25.0 - '@changesets/config': 2.3.1 - '@changesets/get-version-range-type': 0.3.2 - '@changesets/git': 2.0.0 - '@changesets/types': 5.2.1 + '@changesets/config': 3.0.0 + '@changesets/get-version-range-type': 0.4.0 + '@changesets/git': 3.0.0 + '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 detect-indent: 6.1.0 fs-extra: 7.0.1 @@ -17271,14 +22235,14 @@ snapshots: outdent: 0.5.0 prettier: 2.8.8 resolve-from: 5.0.0 - semver: 7.5.4 + semver: 7.6.3 - '@changesets/apply-release-plan@7.0.1': + '@changesets/apply-release-plan@7.0.5': dependencies: - '@babel/runtime': 7.25.0 - '@changesets/config': 3.0.0 + '@changesets/config': 3.0.3 '@changesets/get-version-range-type': 0.4.0 - '@changesets/git': 3.0.0 + '@changesets/git': 3.0.1 + '@changesets/should-skip-package': 0.1.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 detect-indent: 6.1.0 @@ -17287,16 +22251,7 @@ snapshots: outdent: 0.5.0 prettier: 2.8.8 resolve-from: 5.0.0 - semver: 7.5.4 - - '@changesets/assemble-release-plan@5.2.4': - dependencies: - '@babel/runtime': 7.25.0 - '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.6 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - semver: 7.5.4 + semver: 7.6.3 '@changesets/assemble-release-plan@6.0.0': dependencies: @@ -17305,55 +22260,24 @@ snapshots: '@changesets/get-dependents-graph': 2.0.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 - semver: 7.5.4 + semver: 7.6.3 - '@changesets/changelog-git@0.1.14': + '@changesets/assemble-release-plan@6.0.4': dependencies: - '@changesets/types': 5.2.1 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/should-skip-package': 0.1.1 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + semver: 7.6.3 '@changesets/changelog-git@0.2.0': dependencies: '@changesets/types': 6.0.0 - '@changesets/cli@2.26.2': - dependencies: - '@babel/runtime': 7.23.2 - '@changesets/apply-release-plan': 6.1.4 - '@changesets/assemble-release-plan': 5.2.4 - '@changesets/changelog-git': 0.1.14 - '@changesets/config': 2.3.1 - '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.6 - '@changesets/get-release-plan': 3.0.17 - '@changesets/git': 2.0.0 - '@changesets/logger': 0.0.5 - '@changesets/pre': 1.0.14 - '@changesets/read': 0.5.9 - '@changesets/types': 5.2.1 - '@changesets/write': 0.2.3 - '@manypkg/get-packages': 1.1.3 - '@types/is-ci': 3.0.3 - '@types/semver': 7.5.4 - ansi-colors: 4.1.3 - chalk: 2.4.2 - enquirer: 2.4.1 - external-editor: 3.1.0 - fs-extra: 7.0.1 - human-id: 1.0.2 - is-ci: 3.0.1 - meow: 6.1.1 - outdent: 0.5.0 - p-limit: 2.3.0 - preferred-pm: 3.1.2 - resolve-from: 5.0.0 - semver: 7.5.4 - spawndamnit: 2.0.0 - term-size: 2.2.1 - tty-table: 4.2.3 - '@changesets/cli@2.27.2': dependencies: - '@babel/runtime': 7.23.2 + '@babel/runtime': 7.25.0 '@changesets/apply-release-plan': 7.0.1 '@changesets/assemble-release-plan': 6.0.0 '@changesets/changelog-git': 0.2.0 @@ -17386,15 +22310,36 @@ snapshots: term-size: 2.2.1 tty-table: 4.2.3 - '@changesets/config@2.3.1': + '@changesets/cli@2.27.9': dependencies: - '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.6 - '@changesets/logger': 0.0.5 - '@changesets/types': 5.2.1 + '@changesets/apply-release-plan': 7.0.5 + '@changesets/assemble-release-plan': 6.0.4 + '@changesets/changelog-git': 0.2.0 + '@changesets/config': 3.0.3 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/get-release-plan': 4.0.4 + '@changesets/git': 3.0.1 + '@changesets/logger': 0.1.1 + '@changesets/pre': 2.0.1 + '@changesets/read': 0.6.1 + '@changesets/should-skip-package': 0.1.1 + '@changesets/types': 6.0.0 + '@changesets/write': 0.3.2 '@manypkg/get-packages': 1.1.3 + ansi-colors: 4.1.3 + ci-info: 3.9.0 + enquirer: 2.4.1 + external-editor: 3.1.0 fs-extra: 7.0.1 - micromatch: 4.0.5 + mri: 1.2.0 + p-limit: 2.3.0 + package-manager-detector: 0.2.2 + picocolors: 1.1.0 + resolve-from: 5.0.0 + semver: 7.6.3 + spawndamnit: 2.0.0 + term-size: 2.2.1 '@changesets/config@3.0.0': dependencies: @@ -17404,41 +22349,36 @@ snapshots: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - micromatch: 4.0.5 + micromatch: 4.0.8 - '@changesets/errors@0.1.4': + '@changesets/config@3.0.3': dependencies: - extendable-error: 0.1.7 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/logger': 0.1.1 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + micromatch: 4.0.8 '@changesets/errors@0.2.0': dependencies: extendable-error: 0.1.7 - '@changesets/get-dependents-graph@1.3.6': - dependencies: - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - chalk: 2.4.2 - fs-extra: 7.0.1 - semver: 7.5.4 - '@changesets/get-dependents-graph@2.0.0': dependencies: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 chalk: 2.4.2 fs-extra: 7.0.1 - semver: 7.5.4 + semver: 7.6.3 - '@changesets/get-release-plan@3.0.17': + '@changesets/get-dependents-graph@2.1.2': dependencies: - '@babel/runtime': 7.25.0 - '@changesets/assemble-release-plan': 5.2.4 - '@changesets/config': 2.3.1 - '@changesets/pre': 1.0.14 - '@changesets/read': 0.5.9 - '@changesets/types': 5.2.1 + '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 + picocolors: 1.1.0 + semver: 7.6.3 '@changesets/get-release-plan@4.0.0': dependencies: @@ -17450,103 +22390,103 @@ snapshots: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 - '@changesets/get-version-range-type@0.3.2': {} + '@changesets/get-release-plan@4.0.4': + dependencies: + '@changesets/assemble-release-plan': 6.0.4 + '@changesets/config': 3.0.3 + '@changesets/pre': 2.0.1 + '@changesets/read': 0.6.1 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 '@changesets/get-version-range-type@0.4.0': {} - '@changesets/git@2.0.0': + '@changesets/git@3.0.0': dependencies: '@babel/runtime': 7.25.0 - '@changesets/errors': 0.1.4 - '@changesets/types': 5.2.1 + '@changesets/errors': 0.2.0 + '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 is-subdir: 1.2.0 - micromatch: 4.0.5 + micromatch: 4.0.8 spawndamnit: 2.0.0 - '@changesets/git@3.0.0': + '@changesets/git@3.0.1': dependencies: - '@babel/runtime': 7.25.0 '@changesets/errors': 0.2.0 - '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 is-subdir: 1.2.0 - micromatch: 4.0.5 + micromatch: 4.0.8 spawndamnit: 2.0.0 - '@changesets/logger@0.0.5': - dependencies: - chalk: 2.4.2 - '@changesets/logger@0.1.0': dependencies: chalk: 2.4.2 - '@changesets/parse@0.3.16': + '@changesets/logger@0.1.1': dependencies: - '@changesets/types': 5.2.1 - js-yaml: 3.14.1 + picocolors: 1.1.0 '@changesets/parse@0.4.0': dependencies: '@changesets/types': 6.0.0 js-yaml: 3.14.1 - '@changesets/pre@1.0.14': + '@changesets/pre@2.0.0': dependencies: '@babel/runtime': 7.25.0 - '@changesets/errors': 0.1.4 - '@changesets/types': 5.2.1 + '@changesets/errors': 0.2.0 + '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - '@changesets/pre@2.0.0': + '@changesets/pre@2.0.1': dependencies: - '@babel/runtime': 7.25.0 '@changesets/errors': 0.2.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - '@changesets/read@0.5.9': + '@changesets/read@0.6.0': dependencies: '@babel/runtime': 7.25.0 - '@changesets/git': 2.0.0 - '@changesets/logger': 0.0.5 - '@changesets/parse': 0.3.16 - '@changesets/types': 5.2.1 + '@changesets/git': 3.0.0 + '@changesets/logger': 0.1.0 + '@changesets/parse': 0.4.0 + '@changesets/types': 6.0.0 chalk: 2.4.2 fs-extra: 7.0.1 p-filter: 2.1.0 - '@changesets/read@0.6.0': + '@changesets/read@0.6.1': dependencies: - '@babel/runtime': 7.25.0 - '@changesets/git': 3.0.0 - '@changesets/logger': 0.1.0 + '@changesets/git': 3.0.1 + '@changesets/logger': 0.1.1 '@changesets/parse': 0.4.0 '@changesets/types': 6.0.0 - chalk: 2.4.2 fs-extra: 7.0.1 p-filter: 2.1.0 + picocolors: 1.1.0 - '@changesets/types@4.1.0': {} + '@changesets/should-skip-package@0.1.1': + dependencies: + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 - '@changesets/types@5.2.1': {} + '@changesets/types@4.1.0': {} '@changesets/types@6.0.0': {} - '@changesets/write@0.2.3': + '@changesets/write@0.3.1': dependencies: '@babel/runtime': 7.25.0 - '@changesets/types': 5.2.1 + '@changesets/types': 6.0.0 fs-extra: 7.0.1 human-id: 1.0.2 prettier: 2.8.8 - '@changesets/write@0.3.1': + '@changesets/write@0.3.2': dependencies: - '@babel/runtime': 7.25.0 '@changesets/types': 6.0.0 fs-extra: 7.0.1 human-id: 1.0.2 @@ -17554,7 +22494,7 @@ snapshots: '@clack/core@0.3.3': dependencies: - picocolors: 1.0.0 + picocolors: 1.0.1 sisteransi: 1.0.5 '@clack/prompts@0.7.0': @@ -17572,22 +22512,22 @@ snapshots: transitivePeerDependencies: - debug - '@codspeed/vitest-plugin@3.1.1(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vitest@2.0.4(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': + '@codspeed/vitest-plugin@3.1.1(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vitest@2.0.4(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': dependencies: '@codspeed/core': 3.1.1 - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vitest: 2.0.4(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vitest: 2.0.4(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) transitivePeerDependencies: - debug '@colors/colors@1.5.0': optional: true - '@commitlint/cli@17.8.1': + '@commitlint/cli@17.8.1(@swc/core@1.7.26(@swc/helpers@0.5.3))': dependencies: '@commitlint/format': 17.8.1 '@commitlint/lint': 17.8.1 - '@commitlint/load': 17.8.1 + '@commitlint/load': 17.8.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) '@commitlint/read': 17.8.1 '@commitlint/types': 17.8.1 execa: 5.1.1 @@ -17636,7 +22576,7 @@ snapshots: '@commitlint/rules': 17.8.1 '@commitlint/types': 17.8.1 - '@commitlint/load@17.8.1': + '@commitlint/load@17.8.1(@swc/core@1.7.26(@swc/helpers@0.5.3))': dependencies: '@commitlint/config-validator': 17.8.1 '@commitlint/execute-rule': 17.8.1 @@ -17644,14 +22584,14 @@ snapshots: '@commitlint/types': 17.8.1 '@types/node': 20.5.1 chalk: 4.1.2 - cosmiconfig: 8.3.6(typescript@5.4.5) - cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.4.5))(ts-node@10.9.1(@types/node@20.5.1)(typescript@5.4.5))(typescript@5.4.5) + cosmiconfig: 8.3.6(typescript@5.6.3) + cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.6.3))(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.5.1)(typescript@5.6.3))(typescript@5.6.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 resolve-from: 5.0.0 - ts-node: 10.9.1(@types/node@20.5.1)(typescript@5.4.5) - typescript: 5.4.5 + ts-node: 10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.5.1)(typescript@5.6.3) + typescript: 5.6.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -17699,110 +22639,140 @@ snapshots: dependencies: chalk: 4.1.2 - '@cspell/cspell-bundled-dicts@6.31.3': + '@crowdin/cli@3.19.4(encoding@0.1.13)': + dependencies: + command-exists-promise: 2.0.2 + node-fetch: 2.7.0(encoding@0.1.13) + shelljs: 0.8.5 + tar: 6.2.1 + yauzl: 3.1.3 + transitivePeerDependencies: + - encoding + + '@crowdin/crowdin-api-client@1.36.0': + dependencies: + axios: 1.7.2 + transitivePeerDependencies: + - debug + + '@cspell/cspell-bundled-dicts@8.14.2': dependencies: '@cspell/dict-ada': 4.0.2 - '@cspell/dict-aws': 3.0.0 - '@cspell/dict-bash': 4.1.2 - '@cspell/dict-companies': 3.0.27 - '@cspell/dict-cpp': 5.0.9 - '@cspell/dict-cryptocurrencies': 3.0.1 + '@cspell/dict-aws': 4.0.4 + '@cspell/dict-bash': 4.1.5 + '@cspell/dict-companies': 3.1.4 + '@cspell/dict-cpp': 5.1.19 + '@cspell/dict-cryptocurrencies': 5.0.0 '@cspell/dict-csharp': 4.0.2 - '@cspell/dict-css': 4.0.12 + '@cspell/dict-css': 4.0.13 '@cspell/dict-dart': 2.0.3 '@cspell/dict-django': 4.1.0 '@cspell/dict-docker': 1.1.7 - '@cspell/dict-dotnet': 5.0.0 + '@cspell/dict-dotnet': 5.0.5 '@cspell/dict-elixir': 4.0.3 - '@cspell/dict-en-common-misspellings': 1.0.2 + '@cspell/dict-en-common-misspellings': 2.0.4 '@cspell/dict-en-gb': 1.1.33 - '@cspell/dict-en_us': 4.3.11 - '@cspell/dict-filetypes': 3.0.2 - '@cspell/dict-fonts': 3.0.2 - '@cspell/dict-fullstack': 3.1.5 - '@cspell/dict-gaming-terms': 1.0.4 - '@cspell/dict-git': 2.0.0 - '@cspell/dict-golang': 6.0.4 + '@cspell/dict-en_us': 4.3.23 + '@cspell/dict-filetypes': 3.0.4 + '@cspell/dict-fonts': 4.0.0 + '@cspell/dict-fsharp': 1.0.1 + '@cspell/dict-fullstack': 3.2.0 + '@cspell/dict-gaming-terms': 1.0.5 + '@cspell/dict-git': 3.0.0 + '@cspell/dict-golang': 6.0.13 + '@cspell/dict-google': 1.0.1 '@cspell/dict-haskell': 4.0.1 '@cspell/dict-html': 4.0.5 '@cspell/dict-html-symbol-entities': 4.0.0 - '@cspell/dict-java': 5.0.6 - '@cspell/dict-k8s': 1.0.2 + '@cspell/dict-java': 5.0.7 + '@cspell/dict-julia': 1.0.1 + '@cspell/dict-k8s': 1.0.6 '@cspell/dict-latex': 4.0.0 - '@cspell/dict-lorem-ipsum': 3.0.0 - '@cspell/dict-lua': 4.0.2 - '@cspell/dict-node': 4.0.3 - '@cspell/dict-npm': 5.0.12 - '@cspell/dict-php': 4.0.4 - '@cspell/dict-powershell': 5.0.2 - '@cspell/dict-public-licenses': 2.0.5 - '@cspell/dict-python': 4.1.10 + '@cspell/dict-lorem-ipsum': 4.0.0 + '@cspell/dict-lua': 4.0.3 + '@cspell/dict-makefile': 1.0.0 + '@cspell/dict-monkeyc': 1.0.6 + '@cspell/dict-node': 5.0.1 + '@cspell/dict-npm': 5.1.5 + '@cspell/dict-php': 4.0.10 + '@cspell/dict-powershell': 5.0.10 + '@cspell/dict-public-licenses': 2.0.8 + '@cspell/dict-python': 4.2.8 '@cspell/dict-r': 2.0.1 - '@cspell/dict-ruby': 5.0.1 - '@cspell/dict-rust': 4.0.1 - '@cspell/dict-scala': 5.0.0 - '@cspell/dict-software-terms': 3.3.9 - '@cspell/dict-sql': 2.1.2 + '@cspell/dict-ruby': 5.0.4 + '@cspell/dict-rust': 4.0.6 + '@cspell/dict-scala': 5.0.3 + '@cspell/dict-software-terms': 4.1.7 + '@cspell/dict-sql': 2.1.5 '@cspell/dict-svelte': 1.0.2 '@cspell/dict-swift': 2.0.1 - '@cspell/dict-typescript': 3.1.2 + '@cspell/dict-terraform': 1.0.2 + '@cspell/dict-typescript': 3.1.6 '@cspell/dict-vue': 3.0.0 - '@cspell/cspell-json-reporter@6.31.3': + '@cspell/cspell-json-reporter@8.14.2': dependencies: - '@cspell/cspell-types': 6.31.3 + '@cspell/cspell-types': 8.14.2 + + '@cspell/cspell-pipe@8.14.2': {} - '@cspell/cspell-pipe@6.31.3': {} + '@cspell/cspell-resolver@8.14.2': + dependencies: + global-directory: 4.0.1 - '@cspell/cspell-service-bus@6.31.3': {} + '@cspell/cspell-service-bus@8.14.2': {} - '@cspell/cspell-types@6.31.3': {} + '@cspell/cspell-types@8.14.2': {} '@cspell/dict-ada@4.0.2': {} - '@cspell/dict-aws@3.0.0': {} + '@cspell/dict-aws@4.0.4': {} - '@cspell/dict-bash@4.1.2': {} + '@cspell/dict-bash@4.1.5': {} - '@cspell/dict-companies@3.0.27': {} + '@cspell/dict-companies@3.1.4': {} - '@cspell/dict-cpp@5.0.9': {} + '@cspell/dict-cpp@5.1.19': {} - '@cspell/dict-cryptocurrencies@3.0.1': {} + '@cspell/dict-cryptocurrencies@5.0.0': {} '@cspell/dict-csharp@4.0.2': {} - '@cspell/dict-css@4.0.12': {} + '@cspell/dict-css@4.0.13': {} '@cspell/dict-dart@2.0.3': {} - '@cspell/dict-data-science@1.0.11': {} + '@cspell/dict-data-science@2.0.2': {} '@cspell/dict-django@4.1.0': {} '@cspell/dict-docker@1.1.7': {} - '@cspell/dict-dotnet@5.0.0': {} + '@cspell/dict-dotnet@5.0.5': {} '@cspell/dict-elixir@4.0.3': {} - '@cspell/dict-en-common-misspellings@1.0.2': {} + '@cspell/dict-en-common-misspellings@2.0.4': {} '@cspell/dict-en-gb@1.1.33': {} - '@cspell/dict-en_us@4.3.11': {} + '@cspell/dict-en_us@4.3.23': {} + + '@cspell/dict-filetypes@3.0.4': {} + + '@cspell/dict-fonts@4.0.0': {} - '@cspell/dict-filetypes@3.0.2': {} + '@cspell/dict-fsharp@1.0.1': {} - '@cspell/dict-fonts@3.0.2': {} + '@cspell/dict-fullstack@3.2.0': {} - '@cspell/dict-fullstack@3.1.5': {} + '@cspell/dict-gaming-terms@1.0.5': {} - '@cspell/dict-gaming-terms@1.0.4': {} + '@cspell/dict-git@3.0.0': {} - '@cspell/dict-git@2.0.0': {} + '@cspell/dict-golang@6.0.13': {} - '@cspell/dict-golang@6.0.4': {} + '@cspell/dict-google@1.0.1': {} '@cspell/dict-haskell@4.0.1': {} @@ -17810,55 +22780,67 @@ snapshots: '@cspell/dict-html@4.0.5': {} - '@cspell/dict-java@5.0.6': {} + '@cspell/dict-java@5.0.7': {} - '@cspell/dict-k8s@1.0.2': {} + '@cspell/dict-julia@1.0.1': {} + + '@cspell/dict-k8s@1.0.6': {} '@cspell/dict-latex@4.0.0': {} - '@cspell/dict-lorem-ipsum@3.0.0': {} + '@cspell/dict-lorem-ipsum@4.0.0': {} + + '@cspell/dict-lua@4.0.3': {} - '@cspell/dict-lua@4.0.2': {} + '@cspell/dict-makefile@1.0.0': {} - '@cspell/dict-node@4.0.3': {} + '@cspell/dict-monkeyc@1.0.6': {} - '@cspell/dict-npm@5.0.12': {} + '@cspell/dict-node@5.0.1': {} - '@cspell/dict-php@4.0.4': {} + '@cspell/dict-npm@5.1.5': {} - '@cspell/dict-powershell@5.0.2': {} + '@cspell/dict-php@4.0.10': {} - '@cspell/dict-public-licenses@2.0.5': {} + '@cspell/dict-powershell@5.0.10': {} - '@cspell/dict-python@4.1.10': + '@cspell/dict-public-licenses@2.0.8': {} + + '@cspell/dict-python@4.2.8': dependencies: - '@cspell/dict-data-science': 1.0.11 + '@cspell/dict-data-science': 2.0.2 '@cspell/dict-r@2.0.1': {} - '@cspell/dict-ruby@5.0.1': {} + '@cspell/dict-ruby@5.0.4': {} - '@cspell/dict-rust@4.0.1': {} + '@cspell/dict-rust@4.0.6': {} - '@cspell/dict-scala@5.0.0': {} + '@cspell/dict-scala@5.0.3': {} - '@cspell/dict-software-terms@3.3.9': {} + '@cspell/dict-software-terms@4.1.7': {} - '@cspell/dict-sql@2.1.2': {} + '@cspell/dict-sql@2.1.5': {} '@cspell/dict-svelte@1.0.2': {} '@cspell/dict-swift@2.0.1': {} - '@cspell/dict-typescript@3.1.2': {} + '@cspell/dict-terraform@1.0.2': {} + + '@cspell/dict-typescript@3.1.6': {} '@cspell/dict-vue@3.0.0': {} - '@cspell/dynamic-import@6.31.3': + '@cspell/dynamic-import@8.14.2': dependencies: - import-meta-resolve: 2.2.2 + import-meta-resolve: 4.1.0 + + '@cspell/filetypes@8.14.2': {} + + '@cspell/strong-weak-map@8.14.2': {} - '@cspell/strong-weak-map@6.31.3': {} + '@cspell/url@8.14.2': {} '@cspotcode/source-map-support@0.8.1': dependencies: @@ -17868,9 +22850,39 @@ snapshots: dependencies: css-render: 0.15.14 - '@css-render/vue3-ssr@0.15.14(vue@3.4.35(typescript@5.4.5))': + '@css-render/vue3-ssr@0.15.14(vue@3.4.35(typescript@5.6.3))': dependencies: - vue: 3.4.35(typescript@5.4.5) + vue: 3.4.35(typescript@5.6.3) + + '@csstools/cascade-layer-name-parser@2.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + + '@csstools/color-helpers@5.0.1': {} + + '@csstools/css-calc@2.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + + '@csstools/css-color-parser@3.0.2(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1)': + dependencies: + '@csstools/color-helpers': 5.0.1 + '@csstools/css-calc': 2.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + + '@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1)': + dependencies: + '@csstools/css-tokenizer': 3.0.1 + + '@csstools/css-tokenizer@3.0.1': {} + + '@csstools/media-query-list-parser@3.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 '@csstools/postcss-cascade-layers@4.0.6(postcss@8.4.39)': dependencies: @@ -17878,10 +22890,218 @@ snapshots: postcss: 8.4.39 postcss-selector-parser: 6.1.0 + '@csstools/postcss-cascade-layers@5.0.0(postcss@8.4.47)': + dependencies: + '@csstools/selector-specificity': 4.0.0(postcss-selector-parser@6.1.0) + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + '@csstools/postcss-color-function@4.0.2(postcss@8.4.47)': + dependencies: + '@csstools/css-color-parser': 3.0.2(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + + '@csstools/postcss-color-mix-function@3.0.2(postcss@8.4.47)': + dependencies: + '@csstools/css-color-parser': 3.0.2(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + + '@csstools/postcss-content-alt-text@2.0.1(postcss@8.4.47)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + + '@csstools/postcss-exponential-functions@2.0.1(postcss@8.4.47)': + dependencies: + '@csstools/css-calc': 2.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + postcss: 8.4.47 + + '@csstools/postcss-font-format-keywords@4.0.0(postcss@8.4.47)': + dependencies: + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + '@csstools/postcss-gamut-mapping@2.0.2(postcss@8.4.47)': + dependencies: + '@csstools/css-color-parser': 3.0.2(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + postcss: 8.4.47 + + '@csstools/postcss-gradients-interpolation-method@5.0.2(postcss@8.4.47)': + dependencies: + '@csstools/css-color-parser': 3.0.2(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + + '@csstools/postcss-hwb-function@4.0.2(postcss@8.4.47)': + dependencies: + '@csstools/css-color-parser': 3.0.2(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + + '@csstools/postcss-ic-unit@4.0.0(postcss@8.4.47)': + dependencies: + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + '@csstools/postcss-initial@2.0.0(postcss@8.4.47)': + dependencies: + postcss: 8.4.47 + + '@csstools/postcss-is-pseudo-class@5.0.0(postcss@8.4.47)': + dependencies: + '@csstools/selector-specificity': 4.0.0(postcss-selector-parser@6.1.0) + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + '@csstools/postcss-light-dark-function@2.0.4(postcss@8.4.47)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + + '@csstools/postcss-logical-float-and-clear@3.0.0(postcss@8.4.47)': + dependencies: + postcss: 8.4.47 + + '@csstools/postcss-logical-overflow@2.0.0(postcss@8.4.47)': + dependencies: + postcss: 8.4.47 + + '@csstools/postcss-logical-overscroll-behavior@2.0.0(postcss@8.4.47)': + dependencies: + postcss: 8.4.47 + + '@csstools/postcss-logical-resize@3.0.0(postcss@8.4.47)': + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + '@csstools/postcss-logical-viewport-units@3.0.1(postcss@8.4.47)': + dependencies: + '@csstools/css-tokenizer': 3.0.1 + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + + '@csstools/postcss-media-minmax@2.0.1(postcss@8.4.47)': + dependencies: + '@csstools/css-calc': 2.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/media-query-list-parser': 3.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + postcss: 8.4.47 + + '@csstools/postcss-media-queries-aspect-ratio-number-values@3.0.1(postcss@8.4.47)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/media-query-list-parser': 3.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + postcss: 8.4.47 + + '@csstools/postcss-nested-calc@4.0.0(postcss@8.4.47)': + dependencies: + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + '@csstools/postcss-normalize-display-values@4.0.0(postcss@8.4.47)': + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + '@csstools/postcss-oklab-function@4.0.2(postcss@8.4.47)': + dependencies: + '@csstools/css-color-parser': 3.0.2(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + + '@csstools/postcss-progressive-custom-properties@4.0.0(postcss@8.4.47)': + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + '@csstools/postcss-relative-color-syntax@3.0.2(postcss@8.4.47)': + dependencies: + '@csstools/css-color-parser': 3.0.2(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + + '@csstools/postcss-scope-pseudo-class@4.0.0(postcss@8.4.47)': + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + '@csstools/postcss-stepped-value-functions@4.0.1(postcss@8.4.47)': + dependencies: + '@csstools/css-calc': 2.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + postcss: 8.4.47 + + '@csstools/postcss-text-decoration-shorthand@4.0.1(postcss@8.4.47)': + dependencies: + '@csstools/color-helpers': 5.0.1 + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + '@csstools/postcss-trigonometric-functions@4.0.1(postcss@8.4.47)': + dependencies: + '@csstools/css-calc': 2.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + postcss: 8.4.47 + + '@csstools/postcss-unset-value@4.0.0(postcss@8.4.47)': + dependencies: + postcss: 8.4.47 + + '@csstools/selector-resolve-nested@2.0.0(postcss-selector-parser@6.1.0)': + dependencies: + postcss-selector-parser: 6.1.0 + '@csstools/selector-specificity@3.1.1(postcss-selector-parser@6.1.0)': dependencies: postcss-selector-parser: 6.1.0 + '@csstools/selector-specificity@4.0.0(postcss-selector-parser@6.1.0)': + dependencies: + postcss-selector-parser: 6.1.0 + + '@csstools/utilities@2.0.0(postcss@8.4.47)': + dependencies: + postcss: 8.4.47 + '@ctrl/tinycolor@3.6.1': {} '@develar/schema-utils@2.6.5': @@ -17889,6 +23109,8 @@ snapshots: ajv: 6.12.6 ajv-keywords: 3.5.2(ajv@6.12.6) + '@discoveryjs/json-ext@0.5.7': {} + '@dnd-kit/accessibility@3.1.0(react@18.2.0)': dependencies: react: 18.2.0 @@ -17921,6 +23143,730 @@ snapshots: react: 18.2.0 tslib: 2.6.3 + '@docsearch/css@3.6.2': {} + + '@docsearch/react@3.6.2(@algolia/client-search@4.24.0)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.24.0)(algoliasearch@4.24.0) + '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.24.0)(algoliasearch@4.24.0) + '@docsearch/css': 3.6.2 + algoliasearch: 4.24.0 + optionalDependencies: + '@types/react': 18.2.35 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + transitivePeerDependencies: + - '@algolia/client-search' + + '@docusaurus/core@3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@babel/core': 7.25.2 + '@babel/generator': 7.25.0 + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-transform-runtime': 7.23.2(@babel/core@7.25.2) + '@babel/preset-env': 7.25.7(@babel/core@7.25.2) + '@babel/preset-react': 7.25.7(@babel/core@7.25.2) + '@babel/preset-typescript': 7.24.7(@babel/core@7.25.2) + '@babel/runtime': 7.25.0 + '@babel/runtime-corejs3': 7.25.7 + '@babel/traverse': 7.25.3 + '@docusaurus/cssnano-preset': 3.5.2 + '@docusaurus/logger': 3.5.2 + '@docusaurus/mdx-loader': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3) + '@docusaurus/utils': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@docusaurus/utils-common': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)) + '@docusaurus/utils-validation': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@mdx-js/react': 3.0.1(@types/react@18.2.35)(react@18.2.0) + autoprefixer: 10.4.16(postcss@8.4.47) + babel-loader: 9.2.1(@babel/core@7.25.2)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + babel-plugin-dynamic-import-node: 2.3.3 + boxen: 6.2.1 + chalk: 4.1.2 + chokidar: 3.6.0 + clean-css: 5.3.3 + cli-table3: 0.6.5 + combine-promises: 1.2.0 + commander: 5.1.0 + copy-webpack-plugin: 11.0.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + core-js: 3.37.1 + css-loader: 6.11.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + css-minimizer-webpack-plugin: 5.0.1(clean-css@5.3.3)(lightningcss@1.25.1)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + cssnano: 6.1.2(postcss@8.4.47) + del: 6.1.1 + detect-port: 1.6.1 + escape-html: 1.0.3 + eta: 2.2.0 + eval: 0.1.8 + file-loader: 6.2.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + fs-extra: 11.2.0 + html-minifier-terser: 7.2.0 + html-tags: 3.3.1 + html-webpack-plugin: 5.6.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + leven: 3.1.0 + lodash: 4.17.21 + mini-css-extract-plugin: 2.9.1(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + p-map: 4.0.0 + postcss: 8.4.47 + postcss-loader: 7.3.4(postcss@8.4.47)(typescript@5.6.3)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + prompts: 2.4.2 + react: 18.2.0 + react-dev-utils: 12.0.1(eslint@8.57.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + react-dom: 18.2.0(react@18.2.0) + react-helmet-async: 1.3.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react-loadable: '@docusaurus/react-loadable@6.0.0(react@18.2.0)' + react-loadable-ssr-addon-v5-slorber: 1.0.1(@docusaurus/react-loadable@6.0.0(react@18.2.0))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + react-router: 5.3.4(react@18.2.0) + react-router-config: 5.1.1(react-router@5.3.4(react@18.2.0))(react@18.2.0) + react-router-dom: 5.3.4(react@18.2.0) + rtl-detect: 1.1.2 + semver: 7.5.4 + serve-handler: 6.1.5 + shelljs: 0.8.5 + terser-webpack-plugin: 5.3.10(@swc/core@1.7.26(@swc/helpers@0.5.3))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + tslib: 2.6.3 + update-notifier: 6.0.2 + url-loader: 4.1.1(file-loader@6.2.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + webpack-bundle-analyzer: 4.10.2(bufferutil@4.0.8) + webpack-dev-server: 4.15.2(bufferutil@4.0.8)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + webpack-merge: 5.10.0 + webpackbar: 5.0.2(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + transitivePeerDependencies: + - '@docusaurus/types' + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/cssnano-preset@3.5.2': + dependencies: + cssnano-preset-advanced: 6.1.2(postcss@8.4.47) + postcss: 8.4.47 + postcss-sort-media-queries: 5.2.0(postcss@8.4.47) + tslib: 2.6.3 + + '@docusaurus/logger@3.5.2': + dependencies: + chalk: 4.1.2 + tslib: 2.6.3 + + '@docusaurus/lqip-loader@3.5.2(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)))': + dependencies: + '@docusaurus/logger': 3.5.2 + file-loader: 6.2.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + lodash: 4.17.21 + sharp: 0.32.6 + tslib: 2.6.3 + transitivePeerDependencies: + - webpack + + '@docusaurus/mdx-loader@3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)': + dependencies: + '@docusaurus/logger': 3.5.2 + '@docusaurus/utils': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@docusaurus/utils-validation': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@mdx-js/mdx': 3.0.1 + '@slorber/remark-comment': 1.0.0 + escape-html: 1.0.3 + estree-util-value-to-estree: 3.1.2 + file-loader: 6.2.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + fs-extra: 11.2.0 + image-size: 1.1.1 + mdast-util-mdx: 3.0.0 + mdast-util-to-string: 4.0.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + rehype-raw: 7.0.0 + remark-directive: 3.0.0 + remark-emoji: 4.0.1 + remark-frontmatter: 5.0.0 + remark-gfm: 4.0.0 + stringify-object: 3.3.0 + tslib: 2.6.3 + unified: 11.0.5 + unist-util-visit: 5.0.0 + url-loader: 4.1.1(file-loader@6.2.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + vfile: 6.0.3 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + transitivePeerDependencies: + - '@docusaurus/types' + - '@swc/core' + - esbuild + - supports-color + - typescript + - uglify-js + - webpack-cli + + '@docusaurus/module-type-aliases@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@types/history': 4.7.11 + '@types/react': 18.2.35 + '@types/react-router-config': 5.0.11 + '@types/react-router-dom': 5.3.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-helmet-async: 2.0.5(react@18.2.0) + react-loadable: '@docusaurus/react-loadable@6.0.0(react@18.2.0)' + transitivePeerDependencies: + - '@swc/core' + - esbuild + - supports-color + - uglify-js + - webpack-cli + + '@docusaurus/plugin-content-blog@3.5.2(@docusaurus/plugin-content-docs@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/logger': 3.5.2 + '@docusaurus/mdx-loader': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3) + '@docusaurus/plugin-content-docs': 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/theme-common': 3.5.2(@docusaurus/plugin-content-docs@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))))(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3) + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/utils': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@docusaurus/utils-common': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)) + '@docusaurus/utils-validation': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + cheerio: 1.0.0-rc.12 + feed: 4.2.2 + fs-extra: 11.2.0 + lodash: 4.17.21 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + reading-time: 1.5.0 + srcset: 4.0.0 + tslib: 2.6.3 + unist-util-visit: 5.0.0 + utility-types: 3.11.0 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + transitivePeerDependencies: + - '@mdx-js/react' + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/plugin-content-docs@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/logger': 3.5.2 + '@docusaurus/mdx-loader': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3) + '@docusaurus/module-type-aliases': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/theme-common': 3.5.2(@docusaurus/plugin-content-docs@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))))(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3) + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/utils': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@docusaurus/utils-common': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)) + '@docusaurus/utils-validation': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@types/react-router-config': 5.0.11 + combine-promises: 1.2.0 + fs-extra: 11.2.0 + js-yaml: 4.1.0 + lodash: 4.17.21 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + tslib: 2.6.3 + utility-types: 3.11.0 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + transitivePeerDependencies: + - '@mdx-js/react' + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/plugin-content-pages@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/mdx-loader': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3) + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/utils': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@docusaurus/utils-validation': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + fs-extra: 11.2.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + tslib: 2.6.3 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + transitivePeerDependencies: + - '@mdx-js/react' + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/plugin-debug@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/utils': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + fs-extra: 11.2.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-json-view-lite: 1.5.0(react@18.2.0) + tslib: 2.6.3 + transitivePeerDependencies: + - '@mdx-js/react' + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/plugin-google-analytics@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/utils-validation': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + tslib: 2.6.3 + transitivePeerDependencies: + - '@mdx-js/react' + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/plugin-google-gtag@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/utils-validation': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@types/gtag.js': 0.0.12 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + tslib: 2.6.3 + transitivePeerDependencies: + - '@mdx-js/react' + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/plugin-google-tag-manager@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/utils-validation': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + tslib: 2.6.3 + transitivePeerDependencies: + - '@mdx-js/react' + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/plugin-ideal-image@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(prop-types@15.8.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/lqip-loader': 3.5.2(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + '@docusaurus/responsive-loader': 1.7.0(sharp@0.32.6) + '@docusaurus/theme-translations': 3.5.2 + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/utils-validation': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@slorber/react-ideal-image': 0.0.12(prop-types@15.8.1)(react-waypoint@10.3.0(react@18.2.0))(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-waypoint: 10.3.0(react@18.2.0) + sharp: 0.32.6 + tslib: 2.6.3 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + transitivePeerDependencies: + - '@mdx-js/react' + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - prop-types + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/plugin-sitemap@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/logger': 3.5.2 + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/utils': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@docusaurus/utils-common': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)) + '@docusaurus/utils-validation': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + fs-extra: 11.2.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + sitemap: 7.1.2 + tslib: 2.6.3 + transitivePeerDependencies: + - '@mdx-js/react' + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/preset-classic@3.5.2(@algolia/client-search@4.24.0)(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/react@18.2.35)(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/plugin-content-blog': 3.5.2(@docusaurus/plugin-content-docs@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/plugin-content-docs': 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/plugin-content-pages': 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/plugin-debug': 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/plugin-google-analytics': 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/plugin-google-gtag': 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/plugin-google-tag-manager': 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/plugin-sitemap': 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/theme-classic': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/react@18.2.35)(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/theme-common': 3.5.2(@docusaurus/plugin-content-docs@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))))(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3) + '@docusaurus/theme-search-algolia': 3.5.2(@algolia/client-search@4.24.0)(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/react@18.2.35)(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + transitivePeerDependencies: + - '@algolia/client-search' + - '@mdx-js/react' + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - '@types/react' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - search-insights + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/react-loadable@6.0.0(react@18.2.0)': + dependencies: + '@types/react': 18.2.35 + react: 18.2.0 + + '@docusaurus/responsive-loader@1.7.0(sharp@0.32.6)': + dependencies: + loader-utils: 2.0.4 + optionalDependencies: + sharp: 0.32.6 + + '@docusaurus/theme-classic@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/react@18.2.35)(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/mdx-loader': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3) + '@docusaurus/module-type-aliases': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/plugin-content-blog': 3.5.2(@docusaurus/plugin-content-docs@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/plugin-content-docs': 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/plugin-content-pages': 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/theme-common': 3.5.2(@docusaurus/plugin-content-docs@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))))(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3) + '@docusaurus/theme-translations': 3.5.2 + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/utils': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@docusaurus/utils-common': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)) + '@docusaurus/utils-validation': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@mdx-js/react': 3.0.1(@types/react@18.2.35)(react@18.2.0) + clsx: 2.1.1 + copy-text-to-clipboard: 3.2.0 + infima: 0.2.0-alpha.44 + lodash: 4.17.21 + nprogress: 0.2.0 + postcss: 8.4.47 + prism-react-renderer: 2.4.0(react@18.2.0) + prismjs: 1.29.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-router-dom: 5.3.4(react@18.2.0) + rtlcss: 4.3.0 + tslib: 2.6.3 + utility-types: 3.11.0 + transitivePeerDependencies: + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - '@types/react' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/theme-common@3.5.2(@docusaurus/plugin-content-docs@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))))(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)': + dependencies: + '@docusaurus/mdx-loader': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3) + '@docusaurus/module-type-aliases': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/plugin-content-docs': 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/utils': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@docusaurus/utils-common': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)) + '@types/history': 4.7.11 + '@types/react': 18.2.35 + '@types/react-router-config': 5.0.11 + clsx: 2.1.1 + parse-numeric-range: 1.3.0 + prism-react-renderer: 2.4.0(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + tslib: 2.6.3 + utility-types: 3.11.0 + transitivePeerDependencies: + - '@docusaurus/types' + - '@swc/core' + - esbuild + - supports-color + - typescript + - uglify-js + - webpack-cli + + '@docusaurus/theme-search-algolia@3.5.2(@algolia/client-search@4.24.0)(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/react@18.2.35)(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))': + dependencies: + '@docsearch/react': 3.6.2(@algolia/client-search@4.24.0)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/logger': 3.5.2 + '@docusaurus/plugin-content-docs': 3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + '@docusaurus/theme-common': 3.5.2(@docusaurus/plugin-content-docs@3.5.2(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))))(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3) + '@docusaurus/theme-translations': 3.5.2 + '@docusaurus/utils': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@docusaurus/utils-validation': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + algoliasearch: 4.24.0 + algoliasearch-helper: 3.22.5(algoliasearch@4.24.0) + clsx: 2.1.1 + eta: 2.2.0 + fs-extra: 11.2.0 + lodash: 4.17.21 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + tslib: 2.6.3 + utility-types: 3.11.0 + transitivePeerDependencies: + - '@algolia/client-search' + - '@docusaurus/types' + - '@mdx-js/react' + - '@parcel/css' + - '@rspack/core' + - '@swc/core' + - '@swc/css' + - '@types/react' + - bufferutil + - csso + - debug + - esbuild + - eslint + - lightningcss + - search-insights + - supports-color + - typescript + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + + '@docusaurus/theme-translations@3.5.2': + dependencies: + fs-extra: 11.2.0 + tslib: 2.6.3 + + '@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@mdx-js/mdx': 3.0.1 + '@types/history': 4.7.11 + '@types/react': 18.2.35 + commander: 5.1.0 + joi: 17.13.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-helmet-async: 1.3.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + utility-types: 3.11.0 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + webpack-merge: 5.10.0 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - supports-color + - uglify-js + - webpack-cli + + '@docusaurus/utils-common@3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))': + dependencies: + tslib: 2.6.3 + optionalDependencies: + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + + '@docusaurus/utils-validation@3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3)': + dependencies: + '@docusaurus/logger': 3.5.2 + '@docusaurus/utils': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3) + '@docusaurus/utils-common': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)) + fs-extra: 11.2.0 + joi: 17.13.3 + js-yaml: 4.1.0 + lodash: 4.17.21 + tslib: 2.6.3 + transitivePeerDependencies: + - '@docusaurus/types' + - '@swc/core' + - esbuild + - supports-color + - typescript + - uglify-js + - webpack-cli + + '@docusaurus/utils@3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(typescript@5.6.3)': + dependencies: + '@docusaurus/logger': 3.5.2 + '@docusaurus/utils-common': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)) + '@svgr/webpack': 8.1.0(typescript@5.6.3) + escape-string-regexp: 4.0.0 + file-loader: 6.2.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + fs-extra: 11.2.0 + github-slugger: 1.5.0 + globby: 11.1.0 + gray-matter: 4.0.3 + jiti: 1.21.0 + js-yaml: 4.1.0 + lodash: 4.17.21 + micromatch: 4.0.5 + prompts: 2.4.2 + resolve-pathname: 3.0.0 + shelljs: 0.8.5 + tslib: 2.6.3 + url-loader: 4.1.1(file-loader@6.2.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + utility-types: 3.11.0 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + optionalDependencies: + '@docusaurus/types': 3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + transitivePeerDependencies: + - '@swc/core' + - esbuild + - supports-color + - typescript + - uglify-js + - webpack-cli + '@electron-forge/cli@7.4.0(encoding@0.1.13)': dependencies: '@electron-forge/core': 7.4.0(encoding@0.1.13) @@ -17928,7 +23874,7 @@ snapshots: '@electron/get': 3.0.0 chalk: 4.1.2 commander: 4.1.1 - debug: 4.3.4 + debug: 4.3.6 fs-extra: 10.1.0 listr2: 7.0.2 semver: 7.5.4 @@ -17947,7 +23893,7 @@ snapshots: find-up: 5.0.0 fs-extra: 10.1.0 log-symbols: 4.1.0 - semver: 7.5.4 + semver: 7.6.3 yarn-or-npm: 3.0.1 transitivePeerDependencies: - bluebird @@ -17971,7 +23917,7 @@ snapshots: '@electron/rebuild': 3.6.0 '@malept/cross-spawn-promise': 2.0.0 chalk: 4.1.2 - debug: 4.3.4 + debug: 4.3.6 fast-glob: 3.3.2 filenamify: 4.3.0 find-up: 5.0.0 @@ -17985,7 +23931,7 @@ snapshots: progress: 2.0.3 rechoir: 0.8.0 resolve-package: 1.0.1 - semver: 7.5.4 + semver: 7.6.3 source-map-support: 0.5.21 sudo-prompt: 9.2.1 username: 5.1.0 @@ -18129,7 +24075,7 @@ snapshots: '@electron/get@2.0.3': dependencies: - debug: 4.3.4 + debug: 4.3.6 env-paths: 2.2.1 fs-extra: 8.1.0 got: 11.8.6 @@ -18143,7 +24089,7 @@ snapshots: '@electron/get@3.0.0': dependencies: - debug: 4.3.4 + debug: 4.3.6 env-paths: 2.2.1 fs-extra: 8.1.0 got: 11.8.6 @@ -18201,7 +24147,7 @@ snapshots: '@electron/osx-sign': 1.3.0 '@electron/universal': 2.0.1 '@electron/windows-sign': 1.1.2 - debug: 4.3.4 + debug: 4.3.6 extract-zip: 2.0.1 filenamify: 4.3.0 fs-extra: 11.2.0 @@ -18212,7 +24158,7 @@ snapshots: plist: 3.1.0 resedit: 2.0.2 resolve: 1.22.8 - semver: 7.5.4 + semver: 7.6.3 yargs-parser: 21.1.1 transitivePeerDependencies: - supports-color @@ -18221,7 +24167,7 @@ snapshots: dependencies: '@malept/cross-spawn-promise': 2.0.0 chalk: 4.1.2 - debug: 4.3.4 + debug: 4.3.6 detect-libc: 2.0.3 fs-extra: 10.1.0 got: 11.8.6 @@ -18230,7 +24176,7 @@ snapshots: node-gyp: 9.4.1 ora: 5.4.1 read-binary-file-arch: 1.0.6 - semver: 7.5.4 + semver: 7.6.3 tar: 6.2.1 yargs: 17.7.2 transitivePeerDependencies: @@ -18271,9 +24217,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@element-plus/icons-vue@2.1.0(vue@3.3.7(typescript@5.4.5))': + '@element-plus/icons-vue@2.1.0(vue@3.3.7(typescript@5.6.3))': dependencies: - vue: 3.3.7(typescript@5.4.5) + vue: 3.3.7(typescript@5.6.3) '@emotion/babel-plugin@11.11.0': dependencies: @@ -18291,7 +24237,7 @@ snapshots: '@emotion/babel-plugin@11.12.0': dependencies: - '@babel/helper-module-imports': 7.24.7 + '@babel/helper-module-imports': 7.25.7 '@babel/runtime': 7.25.0 '@emotion/hash': 0.9.2 '@emotion/memoize': 0.9.0 @@ -18592,7 +24538,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.6 espree: 9.6.1 globals: 13.24.0 ignore: 5.2.4 @@ -18672,18 +24618,24 @@ snapshots: '@gar/promisify@1.1.3': {} - '@guolao/vue-monaco-editor@1.5.1(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.4.5)))(vue@3.4.15(typescript@5.4.5))': + '@guolao/vue-monaco-editor@1.5.1(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.6.3)))(vue@3.4.15(typescript@5.6.3))': dependencies: '@monaco-editor/loader': 1.4.0 - vue: 3.4.15(typescript@5.4.5) - vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.4.5)))(vue@3.4.15(typescript@5.4.5)) + vue: 3.4.15(typescript@5.6.3) + vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.6.3)))(vue@3.4.15(typescript@5.6.3)) optionalDependencies: - '@vue/composition-api': 1.7.2(vue@3.4.15(typescript@5.4.5)) + '@vue/composition-api': 1.7.2(vue@3.4.15(typescript@5.6.3)) + + '@hapi/hoek@9.3.0': {} + + '@hapi/topo@5.1.0': + dependencies: + '@hapi/hoek': 9.3.0 '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.4 + debug: 4.3.6 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -18734,27 +24686,27 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 18.18.8 + '@types/node': 20.14.12 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5))': + '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.18.8 + '@types/node': 20.14.12 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@18.18.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)) + jest-config: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -18779,7 +24731,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.18.8 + '@types/node': 20.14.12 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -18797,7 +24749,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 18.18.8 + '@types/node': 20.14.12 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -18819,7 +24771,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 18.18.8 + '@types/node': 20.14.12 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -18866,7 +24818,7 @@ snapshots: '@jest/transform@29.7.0': dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.25.2 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 babel-plugin-istanbul: 6.1.1 @@ -18877,7 +24829,7 @@ snapshots: jest-haste-map: 29.7.0 jest-regex-util: 29.6.3 jest-util: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 pirates: 4.0.6 slash: 3.0.0 write-file-atomic: 4.0.2 @@ -18889,7 +24841,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.5 '@types/istanbul-reports': 3.0.4 - '@types/node': 18.18.8 + '@types/node': 20.14.12 '@types/yargs': 17.0.32 chalk: 4.1.2 @@ -18933,13 +24885,11 @@ snapshots: '@jridgewell/trace-mapping@0.3.9': dependencies: '@jridgewell/resolve-uri': 3.1.1 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@juggle/resize-observer@3.4.0': {} - '@koa/cors@5.0.0': - dependencies: - vary: 1.1.2 + '@leichtgewicht/ip-codec@2.0.5': {} '@lit-labs/ssr-dom-shim@1.2.1': {} @@ -19003,13 +24953,86 @@ snapshots: '@mdn/browser-compat-data@5.5.7': {} + '@mdx-js/mdx@3.0.1': + dependencies: + '@types/estree': 1.0.5 + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdx': 2.0.13 + collapse-white-space: 2.1.0 + devlop: 1.1.0 + estree-util-build-jsx: 3.0.1 + estree-util-is-identifier-name: 3.0.0 + estree-util-to-js: 2.0.0 + estree-walker: 3.0.3 + hast-util-to-estree: 3.1.0 + hast-util-to-jsx-runtime: 2.3.0 + markdown-extensions: 2.0.0 + periscopic: 3.1.0 + remark-mdx: 3.0.1 + remark-parse: 11.0.0 + remark-rehype: 11.1.1 + source-map: 0.7.4 + unified: 11.0.5 + unist-util-position-from-estree: 2.0.0 + unist-util-stringify-position: 4.0.0 + unist-util-visit: 5.0.0 + vfile: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0)': + dependencies: + '@types/mdx': 2.0.13 + '@types/react': 18.2.35 + react: 18.2.0 + + '@mediapipe/tasks-vision@0.10.8': {} + + '@module-federation/runtime@0.6.9': + dependencies: + '@module-federation/sdk': 0.6.9 + + '@module-federation/sdk@0.6.9': {} + + '@module-federation/vite@1.1.1(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(rollup@4.14.1)(sass@1.74.1)(terser@5.31.1)': + dependencies: + '@module-federation/runtime': 0.6.9 + '@rollup/pluginutils': 5.1.0(rollup@4.14.1) + defu: 6.1.4 + estree-walker: 2.0.2 + magic-string: 0.30.11 + pathe: 1.1.2 + vitest: 2.1.2(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + transitivePeerDependencies: + - '@edge-runtime/vm' + - '@types/node' + - '@vitest/browser' + - '@vitest/ui' + - happy-dom + - jsdom + - less + - lightningcss + - msw + - rollup + - sass + - stylus + - sugarss + - supports-color + - terser + '@monaco-editor/loader@1.4.0': dependencies: state-local: 1.0.7 + '@monogrid/gainmap-js@3.0.6(three@0.168.0)': + dependencies: + promise-worker-transferable: 1.0.4 + three: 0.168.0 + '@napi-rs/cli@2.18.4': {} - '@nestjs/cli@10.4.2': + '@nestjs/cli@10.4.2(@swc/core@1.7.26(@swc/helpers@0.5.3))': dependencies: '@angular-devkit/core': 17.3.8(chokidar@3.6.0) '@angular-devkit/schematics': 17.3.8(chokidar@3.6.0) @@ -19019,7 +25042,7 @@ snapshots: chokidar: 3.6.0 cli-table3: 0.6.5 commander: 4.1.1 - fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.3.3)(webpack@5.92.1) + fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.3.3)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) glob: 10.4.2 inquirer: 8.2.6 node-emoji: 1.11.0 @@ -19028,8 +25051,10 @@ snapshots: tsconfig-paths: 4.2.0 tsconfig-paths-webpack-plugin: 4.1.0 typescript: 5.3.3 - webpack: 5.92.1 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) webpack-node-externals: 3.0.0 + optionalDependencies: + '@swc/core': 1.7.26(@swc/helpers@0.5.3) transitivePeerDependencies: - esbuild - uglify-js @@ -19116,7 +25141,7 @@ snapshots: '@npmcli/fs@2.1.2': dependencies: '@gar/promisify': 1.1.3 - semver: 7.5.4 + semver: 7.6.3 '@npmcli/move-file@2.0.1': dependencies: @@ -19131,6 +25156,69 @@ snapshots: transitivePeerDependencies: - encoding + '@octokit/auth-token@4.0.0': {} + + '@octokit/core@5.2.0': + dependencies: + '@octokit/auth-token': 4.0.0 + '@octokit/graphql': 7.1.0 + '@octokit/request': 8.4.0 + '@octokit/request-error': 5.1.0 + '@octokit/types': 13.6.1 + before-after-hook: 2.2.3 + universal-user-agent: 6.0.1 + + '@octokit/endpoint@9.0.5': + dependencies: + '@octokit/types': 13.6.1 + universal-user-agent: 6.0.1 + + '@octokit/graphql@7.1.0': + dependencies: + '@octokit/request': 8.4.0 + '@octokit/types': 13.6.1 + universal-user-agent: 6.0.1 + + '@octokit/openapi-types@22.2.0': {} + + '@octokit/plugin-paginate-rest@11.3.1(@octokit/core@5.2.0)': + dependencies: + '@octokit/core': 5.2.0 + '@octokit/types': 13.6.1 + + '@octokit/plugin-request-log@4.0.1(@octokit/core@5.2.0)': + dependencies: + '@octokit/core': 5.2.0 + + '@octokit/plugin-rest-endpoint-methods@13.2.2(@octokit/core@5.2.0)': + dependencies: + '@octokit/core': 5.2.0 + '@octokit/types': 13.6.1 + + '@octokit/request-error@5.1.0': + dependencies: + '@octokit/types': 13.6.1 + deprecation: 2.3.1 + once: 1.4.0 + + '@octokit/request@8.4.0': + dependencies: + '@octokit/endpoint': 9.0.5 + '@octokit/request-error': 5.1.0 + '@octokit/types': 13.6.1 + universal-user-agent: 6.0.1 + + '@octokit/rest@20.1.1': + dependencies: + '@octokit/core': 5.2.0 + '@octokit/plugin-paginate-rest': 11.3.1(@octokit/core@5.2.0) + '@octokit/plugin-request-log': 4.0.1(@octokit/core@5.2.0) + '@octokit/plugin-rest-endpoint-methods': 13.2.2(@octokit/core@5.2.0) + + '@octokit/types@13.6.1': + dependencies: + '@octokit/openapi-types': 22.2.0 + '@open-wc/dedupe-mixin@1.4.0': {} '@opentiny/fluent-editor@3.19.4': @@ -21362,13 +27450,13 @@ snapshots: postcss-selector-parser: 6.1.0 ts-pattern: 5.0.8 - '@pandacss/dev@0.42.0(typescript@5.4.5)': + '@pandacss/dev@0.42.0(typescript@5.6.3)': dependencies: '@clack/prompts': 0.7.0 '@pandacss/config': 0.42.0 '@pandacss/logger': 0.42.0 - '@pandacss/node': 0.42.0(typescript@5.4.5) - '@pandacss/postcss': 0.42.0(typescript@5.4.5) + '@pandacss/node': 0.42.0(typescript@5.6.3) + '@pandacss/postcss': 0.42.0(typescript@5.6.3) '@pandacss/preset-panda': 0.42.0 '@pandacss/shared': 0.42.0 '@pandacss/token-dictionary': 0.42.0 @@ -21378,10 +27466,10 @@ snapshots: - jsdom - typescript - '@pandacss/extractor@0.42.0(typescript@5.4.5)': + '@pandacss/extractor@0.42.0(typescript@5.6.3)': dependencies: '@pandacss/shared': 0.42.0 - ts-evaluator: 1.2.0(typescript@5.4.5) + ts-evaluator: 1.2.0(typescript@5.6.3) ts-morph: 21.0.1 transitivePeerDependencies: - jsdom @@ -21408,14 +27496,14 @@ snapshots: '@pandacss/types': 0.42.0 kleur: 4.1.5 - '@pandacss/node@0.42.0(typescript@5.4.5)': + '@pandacss/node@0.42.0(typescript@5.6.3)': dependencies: '@pandacss/config': 0.42.0 '@pandacss/core': 0.42.0 - '@pandacss/extractor': 0.42.0(typescript@5.4.5) + '@pandacss/extractor': 0.42.0(typescript@5.6.3) '@pandacss/generator': 0.42.0 '@pandacss/logger': 0.42.0 - '@pandacss/parser': 0.42.0(typescript@5.4.5) + '@pandacss/parser': 0.42.0(typescript@5.6.3) '@pandacss/shared': 0.42.0 '@pandacss/token-dictionary': 0.42.0 '@pandacss/types': 0.42.0 @@ -21438,16 +27526,16 @@ snapshots: prettier: 3.2.5 ts-morph: 21.0.1 ts-pattern: 5.0.8 - tsconfck: 3.0.2(typescript@5.4.5) + tsconfck: 3.0.2(typescript@5.6.3) transitivePeerDependencies: - jsdom - typescript - '@pandacss/parser@0.42.0(typescript@5.4.5)': + '@pandacss/parser@0.42.0(typescript@5.6.3)': dependencies: '@pandacss/config': 0.42.0 '@pandacss/core': 0.42.0 - '@pandacss/extractor': 0.42.0(typescript@5.4.5) + '@pandacss/extractor': 0.42.0(typescript@5.6.3) '@pandacss/logger': 0.42.0 '@pandacss/shared': 0.42.0 '@pandacss/types': 0.42.0 @@ -21459,9 +27547,9 @@ snapshots: - jsdom - typescript - '@pandacss/postcss@0.42.0(typescript@5.4.5)': + '@pandacss/postcss@0.42.0(typescript@5.6.3)': dependencies: - '@pandacss/node': 0.42.0(typescript@5.4.5) + '@pandacss/node': 0.42.0(typescript@5.6.3) postcss: 8.4.38 transitivePeerDependencies: - jsdom @@ -21491,6 +27579,18 @@ snapshots: '@pkgr/core@0.1.1': {} + '@pnpm/config.env-replace@1.1.0': {} + + '@pnpm/network.ca-file@1.0.2': + dependencies: + graceful-fs: 4.2.10 + + '@pnpm/npm-conf@2.3.1': + dependencies: + '@pnpm/config.env-replace': 1.1.0 + '@pnpm/network.ca-file': 1.0.2 + config-chain: 1.1.13 + '@polka/url@1.0.0-next.23': {} '@polka/url@1.0.0-next.25': {} @@ -21501,6 +27601,184 @@ snapshots: '@popperjs/core@2.11.8': {} + '@radix-ui/primitive@1.1.0': {} + + '@radix-ui/react-arrow@1.1.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.35 + '@types/react-dom': 18.2.14 + + '@radix-ui/react-compose-refs@1.1.0(@types/react@18.2.35)(react@18.2.0)': + dependencies: + react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.35 + + '@radix-ui/react-context@1.1.0(@types/react@18.2.35)(react@18.2.0)': + dependencies: + react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.35 + + '@radix-ui/react-context@1.1.1(@types/react@18.2.35)(react@18.2.0)': + dependencies: + react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.35 + + '@radix-ui/react-dismissable-layer@1.1.1(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@radix-ui/primitive': 1.1.0 + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-use-escape-keydown': 1.1.0(@types/react@18.2.35)(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.35 + '@types/react-dom': 18.2.14 + + '@radix-ui/react-icons@1.3.0(react@18.2.0)': + dependencies: + react: 18.2.0 + + '@radix-ui/react-id@1.1.0(@types/react@18.2.35)(react@18.2.0)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.2.35)(react@18.2.0) + react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.35 + + '@radix-ui/react-popper@1.2.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@floating-ui/react-dom': 2.1.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-arrow': 1.1.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-context': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-use-rect': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-use-size': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/rect': 1.1.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.35 + '@types/react-dom': 18.2.14 + + '@radix-ui/react-portal@1.1.2(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.2.35)(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.35 + '@types/react-dom': 18.2.14 + + '@radix-ui/react-presence@1.1.1(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.2.35)(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.35 + '@types/react-dom': 18.2.14 + + '@radix-ui/react-primitive@2.0.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@radix-ui/react-slot': 1.1.0(@types/react@18.2.35)(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.35 + '@types/react-dom': 18.2.14 + + '@radix-ui/react-slot@1.1.0(@types/react@18.2.35)(react@18.2.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.2.35)(react@18.2.0) + react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.35 + + '@radix-ui/react-tooltip@1.1.3(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@radix-ui/primitive': 1.1.0 + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-context': 1.1.1(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.1.1(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-id': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-popper': 1.2.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-portal': 1.1.2(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-presence': 1.1.1(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-slot': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.2.35)(react@18.2.0) + '@radix-ui/react-visually-hidden': 1.1.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.35 + '@types/react-dom': 18.2.14 + + '@radix-ui/react-use-callback-ref@1.1.0(@types/react@18.2.35)(react@18.2.0)': + dependencies: + react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.35 + + '@radix-ui/react-use-controllable-state@1.1.0(@types/react@18.2.35)(react@18.2.0)': + dependencies: + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.2.35)(react@18.2.0) + react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.35 + + '@radix-ui/react-use-escape-keydown@1.1.0(@types/react@18.2.35)(react@18.2.0)': + dependencies: + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.2.35)(react@18.2.0) + react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.35 + + '@radix-ui/react-use-layout-effect@1.1.0(@types/react@18.2.35)(react@18.2.0)': + dependencies: + react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.35 + + '@radix-ui/react-use-rect@1.1.0(@types/react@18.2.35)(react@18.2.0)': + dependencies: + '@radix-ui/rect': 1.1.0 + react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.35 + + '@radix-ui/react-use-size@1.1.0(@types/react@18.2.35)(react@18.2.0)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.2.35)(react@18.2.0) + react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.35 + + '@radix-ui/react-visually-hidden@1.1.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.35 + '@types/react-dom': 18.2.14 + + '@radix-ui/rect@1.1.0': {} + '@rc-component/color-picker@1.4.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.23.2 @@ -21558,6 +27836,126 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + '@react-spring/animated@9.6.1(react@18.2.0)': + dependencies: + '@react-spring/shared': 9.6.1(react@18.2.0) + '@react-spring/types': 9.6.1 + react: 18.2.0 + + '@react-spring/animated@9.7.5(react@18.2.0)': + dependencies: + '@react-spring/shared': 9.7.5(react@18.2.0) + '@react-spring/types': 9.7.5 + react: 18.2.0 + + '@react-spring/core@9.6.1(react@18.2.0)': + dependencies: + '@react-spring/animated': 9.6.1(react@18.2.0) + '@react-spring/rafz': 9.6.1 + '@react-spring/shared': 9.6.1(react@18.2.0) + '@react-spring/types': 9.6.1 + react: 18.2.0 + + '@react-spring/core@9.7.5(react@18.2.0)': + dependencies: + '@react-spring/animated': 9.7.5(react@18.2.0) + '@react-spring/shared': 9.7.5(react@18.2.0) + '@react-spring/types': 9.7.5 + react: 18.2.0 + + '@react-spring/rafz@9.6.1': {} + + '@react-spring/rafz@9.7.5': {} + + '@react-spring/shared@9.6.1(react@18.2.0)': + dependencies: + '@react-spring/rafz': 9.6.1 + '@react-spring/types': 9.6.1 + react: 18.2.0 + + '@react-spring/shared@9.7.5(react@18.2.0)': + dependencies: + '@react-spring/rafz': 9.7.5 + '@react-spring/types': 9.7.5 + react: 18.2.0 + + '@react-spring/three@9.6.1(@react-three/fiber@8.17.7(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(three@0.168.0))(react@18.2.0)(three@0.168.0)': + dependencies: + '@react-spring/animated': 9.6.1(react@18.2.0) + '@react-spring/core': 9.6.1(react@18.2.0) + '@react-spring/shared': 9.6.1(react@18.2.0) + '@react-spring/types': 9.6.1 + '@react-three/fiber': 8.17.7(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(three@0.168.0) + react: 18.2.0 + three: 0.168.0 + + '@react-spring/types@9.6.1': {} + + '@react-spring/types@9.7.5': {} + + '@react-spring/web@9.7.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + dependencies: + '@react-spring/animated': 9.7.5(react@18.2.0) + '@react-spring/core': 9.7.5(react@18.2.0) + '@react-spring/shared': 9.7.5(react@18.2.0) + '@react-spring/types': 9.7.5 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + + '@react-three/drei@9.112.1(@react-three/fiber@8.17.7(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(three@0.168.0))(@types/react@18.2.35)(@types/three@0.163.0)(immer@10.0.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(three@0.168.0)': + dependencies: + '@babel/runtime': 7.25.0 + '@mediapipe/tasks-vision': 0.10.8 + '@monogrid/gainmap-js': 3.0.6(three@0.168.0) + '@react-spring/three': 9.6.1(@react-three/fiber@8.17.7(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(three@0.168.0))(react@18.2.0)(three@0.168.0) + '@react-three/fiber': 8.17.7(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(three@0.168.0) + '@use-gesture/react': 10.3.1(react@18.2.0) + camera-controls: 2.9.0(three@0.168.0) + cross-env: 7.0.3 + detect-gpu: 5.0.51 + glsl-noise: 0.0.0 + hls.js: 1.3.5 + maath: 0.10.8(@types/three@0.163.0)(three@0.168.0) + meshline: 3.3.1(three@0.168.0) + react: 18.2.0 + react-composer: 5.0.3(react@18.2.0) + stats-gl: 2.2.8 + stats.js: 0.17.0 + suspend-react: 0.1.3(react@18.2.0) + three: 0.168.0 + three-mesh-bvh: 0.7.6(three@0.168.0) + three-stdlib: 2.33.0(three@0.168.0) + troika-three-text: 0.49.1(three@0.168.0) + tunnel-rat: 0.1.2(@types/react@18.2.35)(immer@10.0.3)(react@18.2.0) + utility-types: 3.11.0 + uuid: 9.0.1 + zustand: 3.7.2(react@18.2.0) + optionalDependencies: + react-dom: 18.2.0(react@18.2.0) + transitivePeerDependencies: + - '@types/react' + - '@types/three' + - immer + + '@react-three/fiber@8.17.7(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(three@0.168.0)': + dependencies: + '@babel/runtime': 7.25.0 + '@types/debounce': 1.2.4 + '@types/react-reconciler': 0.26.7 + '@types/webxr': 0.5.20 + base64-js: 1.5.1 + buffer: 6.0.3 + debounce: 1.2.1 + its-fine: 1.2.5(react@18.2.0) + react: 18.2.0 + react-reconciler: 0.27.0(react@18.2.0) + scheduler: 0.21.0 + suspend-react: 0.1.3(react@18.2.0) + three: 0.168.0 + zustand: 3.7.2(react@18.2.0) + optionalDependencies: + react-dom: 18.2.0(react@18.2.0) + '@reactflow/background@11.3.14(@types/react@18.2.35)(immer@9.0.21)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@reactflow/core': 11.11.4(@types/react@18.2.35)(immer@9.0.21)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -21716,65 +28114,105 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.14.1': optional: true - '@sentry-internal/browser-utils@8.33.1': + '@sentry-internal/browser-utils@8.34.0': dependencies: - '@sentry/core': 8.33.1 - '@sentry/types': 8.33.1 - '@sentry/utils': 8.33.1 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 - '@sentry-internal/feedback@8.33.1': + '@sentry-internal/feedback@8.34.0': dependencies: - '@sentry/core': 8.33.1 - '@sentry/types': 8.33.1 - '@sentry/utils': 8.33.1 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 - '@sentry-internal/replay-canvas@8.33.1': + '@sentry-internal/replay-canvas@8.34.0': dependencies: - '@sentry-internal/replay': 8.33.1 - '@sentry/core': 8.33.1 - '@sentry/types': 8.33.1 - '@sentry/utils': 8.33.1 + '@sentry-internal/replay': 8.34.0 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 - '@sentry-internal/replay@8.33.1': + '@sentry-internal/replay@8.34.0': dependencies: - '@sentry-internal/browser-utils': 8.33.1 - '@sentry/core': 8.33.1 - '@sentry/types': 8.33.1 - '@sentry/utils': 8.33.1 + '@sentry-internal/browser-utils': 8.34.0 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 - '@sentry/browser@8.33.1': + '@sentry/browser@8.34.0': dependencies: - '@sentry-internal/browser-utils': 8.33.1 - '@sentry-internal/feedback': 8.33.1 - '@sentry-internal/replay': 8.33.1 - '@sentry-internal/replay-canvas': 8.33.1 - '@sentry/core': 8.33.1 - '@sentry/types': 8.33.1 - '@sentry/utils': 8.33.1 + '@sentry-internal/browser-utils': 8.34.0 + '@sentry-internal/feedback': 8.34.0 + '@sentry-internal/replay': 8.34.0 + '@sentry-internal/replay-canvas': 8.34.0 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 - '@sentry/core@8.33.1': + '@sentry/core@8.34.0': dependencies: - '@sentry/types': 8.33.1 - '@sentry/utils': 8.33.1 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 - '@sentry/react@8.33.1(react@18.2.0)': + '@sentry/react@8.34.0(react@18.2.0)': dependencies: - '@sentry/browser': 8.33.1 - '@sentry/core': 8.33.1 - '@sentry/types': 8.33.1 - '@sentry/utils': 8.33.1 + '@sentry/browser': 8.34.0 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 hoist-non-react-statics: 3.3.2 react: 18.2.0 - '@sentry/types@8.33.1': {} + '@sentry/types@8.34.0': {} - '@sentry/utils@8.33.1': + '@sentry/utils@8.34.0': dependencies: - '@sentry/types': 8.33.1 + '@sentry/types': 8.34.0 - '@shikijs/core@1.14.1': + '@shikijs/core@1.22.0': dependencies: + '@shikijs/engine-javascript': 1.22.0 + '@shikijs/engine-oniguruma': 1.22.0 + '@shikijs/types': 1.22.0 + '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 + hast-util-to-html: 9.0.3 + + '@shikijs/engine-javascript@1.22.0': + dependencies: + '@shikijs/types': 1.22.0 + '@shikijs/vscode-textmate': 9.3.0 + oniguruma-to-js: 0.4.3 + + '@shikijs/engine-oniguruma@1.22.0': + dependencies: + '@shikijs/types': 1.22.0 + '@shikijs/vscode-textmate': 9.3.0 + + '@shikijs/markdown-it@1.22.0': + dependencies: + markdown-it: 14.1.0 + shiki: 1.22.0 + + '@shikijs/transformers@1.22.0': + dependencies: + shiki: 1.22.0 + + '@shikijs/types@1.22.0': + dependencies: + '@shikijs/vscode-textmate': 9.3.0 + '@types/hast': 3.0.4 + + '@shikijs/vscode-textmate@9.3.0': {} + + '@sideway/address@4.1.5': + dependencies: + '@hapi/hoek': 9.3.0 + + '@sideway/formula@3.0.1': {} + + '@sideway/pinpoint@2.0.0': {} '@simonwep/pickr@1.8.2': dependencies: @@ -21787,6 +28225,8 @@ snapshots: '@sindresorhus/is@4.6.0': {} + '@sindresorhus/is@5.6.0': {} + '@sinonjs/commons@3.0.1': dependencies: type-detect: 4.0.8 @@ -21795,6 +28235,18 @@ snapshots: dependencies: '@sinonjs/commons': 3.0.1 + '@slorber/react-ideal-image@0.0.12(prop-types@15.8.1)(react-waypoint@10.3.0(react@18.2.0))(react@18.2.0)': + dependencies: + prop-types: 15.8.1 + react: 18.2.0 + react-waypoint: 10.3.0(react@18.2.0) + + '@slorber/remark-comment@1.0.0': + dependencies: + micromark-factory-space: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + '@solidjs/router@0.10.3(solid-js@1.8.5)': dependencies: solid-js: 1.8.5 @@ -21803,26 +28255,30 @@ snapshots: '@stencil/core@4.20.0': {} - '@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.1(svelte@4.0.0)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)))(svelte@4.0.0)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': + '@stitches/react@1.2.8(react@18.2.0)': dependencies: - '@sveltejs/vite-plugin-svelte': 3.0.1(svelte@4.0.0)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) - debug: 4.3.4 + react: 18.2.0 + + '@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.1(svelte@4.0.0)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)))(svelte@4.0.0)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': + dependencies: + '@sveltejs/vite-plugin-svelte': 3.0.1(svelte@4.0.0)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + debug: 4.3.6 svelte: 4.0.0 - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@3.0.1(svelte@4.0.0)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': + '@sveltejs/vite-plugin-svelte@3.0.1(svelte@4.0.0)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.1(svelte@4.0.0)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)))(svelte@4.0.0)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.1(svelte@4.0.0)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)))(svelte@4.0.0)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) debug: 4.3.4 deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.5 svelte: 4.0.0 svelte-hmr: 0.15.3(svelte@4.0.0) - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vitefu: 0.2.5(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vitefu: 0.2.5(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) transitivePeerDependencies: - supports-color @@ -21870,12 +28326,12 @@ snapshots: '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.23.2) '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.23.2) - '@svgr/core@8.1.0(typescript@5.4.5)': + '@svgr/core@8.1.0(typescript@5.6.3)': dependencies: '@babel/core': 7.23.2 '@svgr/babel-preset': 8.1.0(@babel/core@7.23.2) camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@5.4.5) + cosmiconfig: 8.3.6(typescript@5.6.3) snake-case: 3.0.4 transitivePeerDependencies: - supports-color @@ -21886,16 +28342,86 @@ snapshots: '@babel/types': 7.24.0 entities: 4.5.0 - '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.4.5))': + '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.6.3))': dependencies: '@babel/core': 7.23.2 '@svgr/babel-preset': 8.1.0(@babel/core@7.23.2) - '@svgr/core': 8.1.0(typescript@5.4.5) + '@svgr/core': 8.1.0(typescript@5.6.3) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color + '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.6.3))(typescript@5.6.3)': + dependencies: + '@svgr/core': 8.1.0(typescript@5.6.3) + cosmiconfig: 8.3.6(typescript@5.6.3) + deepmerge: 4.3.1 + svgo: 3.2.0 + transitivePeerDependencies: + - typescript + + '@svgr/webpack@8.1.0(typescript@5.6.3)': + dependencies: + '@babel/core': 7.25.2 + '@babel/plugin-transform-react-constant-elements': 7.25.7(@babel/core@7.25.2) + '@babel/preset-env': 7.25.7(@babel/core@7.25.2) + '@babel/preset-react': 7.25.7(@babel/core@7.25.2) + '@babel/preset-typescript': 7.24.7(@babel/core@7.25.2) + '@svgr/core': 8.1.0(typescript@5.6.3) + '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.6.3)) + '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.6.3))(typescript@5.6.3) + transitivePeerDependencies: + - supports-color + - typescript + + '@swc/core-darwin-arm64@1.7.26': + optional: true + + '@swc/core-darwin-x64@1.7.26': + optional: true + + '@swc/core-linux-arm-gnueabihf@1.7.26': + optional: true + + '@swc/core-linux-arm64-gnu@1.7.26': + optional: true + + '@swc/core-linux-arm64-musl@1.7.26': + optional: true + + '@swc/core-linux-x64-gnu@1.7.26': + optional: true + + '@swc/core-linux-x64-musl@1.7.26': + optional: true + + '@swc/core-win32-arm64-msvc@1.7.26': + optional: true + + '@swc/core-win32-ia32-msvc@1.7.26': + optional: true + + '@swc/core-win32-x64-msvc@1.7.26': + optional: true + + '@swc/core@1.7.26(@swc/helpers@0.5.3)': + dependencies: + '@swc/counter': 0.1.3 + '@swc/types': 0.1.12 + optionalDependencies: + '@swc/core-darwin-arm64': 1.7.26 + '@swc/core-darwin-x64': 1.7.26 + '@swc/core-linux-arm-gnueabihf': 1.7.26 + '@swc/core-linux-arm64-gnu': 1.7.26 + '@swc/core-linux-arm64-musl': 1.7.26 + '@swc/core-linux-x64-gnu': 1.7.26 + '@swc/core-linux-x64-musl': 1.7.26 + '@swc/core-win32-arm64-msvc': 1.7.26 + '@swc/core-win32-ia32-msvc': 1.7.26 + '@swc/core-win32-x64-msvc': 1.7.26 + '@swc/helpers': 0.5.3 + '@swc/counter@0.1.3': {} '@swc/helpers@0.5.3': @@ -21906,12 +28432,27 @@ snapshots: dependencies: '@swc/counter': 0.1.3 + '@swc/types@0.1.12': + dependencies: + '@swc/counter': 0.1.3 + '@sxzz/popperjs-es@2.11.7': {} '@szmarczak/http-timer@4.0.6': dependencies: defer-to-connect: 2.0.1 + '@szmarczak/http-timer@5.0.1': + dependencies: + defer-to-connect: 2.0.1 + + '@tabler/icons-react@3.19.0(react@18.2.0)': + dependencies: + '@tabler/icons': 3.19.0 + react: 18.2.0 + + '@tabler/icons@3.19.0': {} + '@tanstack/query-core@5.40.0': {} '@tanstack/query-devtools@5.37.1': {} @@ -22789,9 +29330,15 @@ snapshots: '@turf/invariant': 6.5.0 d3-voronoi: 1.1.2 + '@tweenjs/tween.js@23.1.3': {} + '@types/accepts@1.3.6': dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 + + '@types/acorn@4.0.6': + dependencies: + '@types/estree': 1.0.5 '@types/babel__core@7.20.3': dependencies: @@ -22818,14 +29365,18 @@ snapshots: '@types/body-parser@1.19.4': dependencies: - '@types/connect': 3.4.37 - '@types/node': 18.18.8 + '@types/connect': 3.4.38 + '@types/node': 20.14.12 + + '@types/bonjour@3.5.13': + dependencies: + '@types/node': 20.14.12 '@types/cacheable-request@6.0.3': dependencies: '@types/http-cache-semantics': 4.0.4 '@types/keyv': 3.1.4 - '@types/node': 18.18.8 + '@types/node': 20.14.12 '@types/responselike': 1.0.3 '@types/clipboard@2.0.7': @@ -22842,9 +29393,18 @@ snapshots: dependencies: '@types/color-convert': 2.0.3 - '@types/connect@3.4.37': + '@types/compression@1.7.5': dependencies: - '@types/node': 18.18.8 + '@types/express': 4.17.21 + + '@types/connect-history-api-fallback@1.5.4': + dependencies: + '@types/express-serve-static-core': 4.17.39 + '@types/node': 20.14.12 + + '@types/connect@3.4.38': + dependencies: + '@types/node': 20.14.12 '@types/content-disposition@0.5.7': {} @@ -22852,14 +29412,14 @@ snapshots: '@types/cookies@0.7.9': dependencies: - '@types/connect': 3.4.37 + '@types/connect': 3.4.38 '@types/express': 4.17.21 '@types/keygrip': 1.0.4 - '@types/node': 18.18.8 + '@types/node': 20.14.12 - '@types/cross-spawn@6.0.4': + '@types/cors@2.8.17': dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 '@types/d3-array@3.2.1': {} @@ -22978,10 +29538,14 @@ snapshots: '@types/d3-transition': 3.0.8 '@types/d3-zoom': 3.0.8 + '@types/debounce@1.2.4': {} + '@types/debug@4.1.12': dependencies: '@types/ms': 0.7.34 + '@types/draco3d@1.4.10': {} + '@types/envinfo@7.8.3': {} '@types/eslint-scope@3.7.7': @@ -22994,13 +29558,21 @@ snapshots: '@types/estree': 1.0.5 '@types/json-schema': 7.0.15 + '@types/estree-jsx@1.0.5': + dependencies: + '@types/estree': 1.0.5 + '@types/estree@1.0.4': {} '@types/estree@1.0.5': {} + '@types/etag@1.8.3': + dependencies: + '@types/node': 20.14.12 + '@types/express-serve-static-core@4.17.39': dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 '@types/qs': 6.9.9 '@types/range-parser': 1.2.6 '@types/send': 0.17.3 @@ -23012,6 +29584,8 @@ snapshots: '@types/qs': 6.9.9 '@types/serve-static': 1.15.4 + '@types/figlet@1.7.0': {} + '@types/fs-extra@11.0.3': dependencies: '@types/jsonfile': 6.1.3 @@ -23019,19 +29593,21 @@ snapshots: '@types/fs-extra@9.0.13': dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 '@types/geojson@7946.0.8': {} '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.18.8 + '@types/node': 20.14.12 optional: true '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 + + '@types/gtag.js@0.0.12': {} '@types/hast@2.3.10': dependencies: @@ -23041,11 +29617,15 @@ snapshots: dependencies: '@types/unist': 3.0.2 + '@types/history@4.7.11': {} + '@types/hoist-non-react-statics@3.3.4': dependencies: '@types/react': 18.2.35 hoist-non-react-statics: 3.3.2 + '@types/html-minifier-terser@6.1.0': {} + '@types/http-assert@1.5.4': {} '@types/http-cache-semantics@4.0.4': {} @@ -23054,16 +29634,7 @@ snapshots: '@types/http-proxy@1.17.14': dependencies: - '@types/node': 18.18.8 - - '@types/inquirer@9.0.6': - dependencies: - '@types/through': 0.0.32 - rxjs: 7.8.1 - - '@types/is-ci@3.0.3': - dependencies: - ci-info: 3.9.0 + '@types/node': 20.14.12 '@types/istanbul-lib-coverage@2.0.5': {} @@ -23090,7 +29661,7 @@ snapshots: '@types/jsonfile@6.1.3': dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 '@types/katex@0.14.0': {} @@ -23100,26 +29671,12 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 '@types/koa-compose@3.2.7': dependencies: '@types/koa': 2.13.10 - '@types/koa-compress@4.0.5': - dependencies: - '@types/koa': 2.13.10 - '@types/node': 18.18.8 - - '@types/koa-send@4.1.5': - dependencies: - '@types/koa': 2.13.10 - - '@types/koa-static@4.0.3': - dependencies: - '@types/koa': 2.13.10 - '@types/koa-send': 4.1.5 - '@types/koa@2.13.10': dependencies: '@types/accepts': 1.3.6 @@ -23131,10 +29688,6 @@ snapshots: '@types/koa-compose': 3.2.7 '@types/node': 18.18.8 - '@types/koa__cors@5.0.0': - dependencies: - '@types/koa': 2.13.10 - '@types/less@3.0.5': {} '@types/lodash-es@4.17.12': @@ -23149,8 +29702,16 @@ snapshots: dependencies: '@types/unist': 2.0.11 + '@types/mdast@4.0.4': + dependencies: + '@types/unist': 3.0.2 + + '@types/mdx@2.0.13': {} + '@types/methods@1.1.4': {} + '@types/mime-types@2.1.4': {} + '@types/mime@1.3.4': {} '@types/mime@3.0.3': {} @@ -23162,6 +29723,10 @@ snapshots: '@types/ms@0.7.34': {} + '@types/node-forge@1.3.11': + dependencies: + '@types/node': 20.14.12 + '@types/node@12.20.55': {} '@types/node@17.0.45': {} @@ -23180,26 +29745,38 @@ snapshots: '@types/node@20.5.1': {} + '@types/node@22.3.0': + dependencies: + undici-types: 6.18.2 + + '@types/node@22.5.0': + dependencies: + undici-types: 6.19.8 + '@types/normalize-package-data@2.4.3': {} '@types/object-path@0.11.4': {} + '@types/offscreencanvas@2019.7.3': {} + '@types/parse-json@4.0.1': {} '@types/plist@3.0.5': dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 xmlbuilder: 15.1.1 optional: true '@types/postcss-import@14.0.3': dependencies: - postcss: 8.4.39 + postcss: 8.4.47 '@types/postcss-url@10.0.4': dependencies: '@types/node': 18.18.8 - postcss: 8.4.39 + postcss: 8.4.47 + + '@types/prismjs@1.26.4': {} '@types/prompts@2.4.7': dependencies: @@ -23220,6 +29797,14 @@ snapshots: dependencies: '@types/react': 18.2.35 + '@types/react-reconciler@0.26.7': + dependencies: + '@types/react': 18.2.35 + + '@types/react-reconciler@0.28.8': + dependencies: + '@types/react': 18.2.35 + '@types/react-redux@7.1.33': dependencies: '@types/hoist-non-react-statics': 3.3.4 @@ -23227,6 +29812,23 @@ snapshots: hoist-non-react-statics: 3.3.2 redux: 4.2.1 + '@types/react-router-config@5.0.11': + dependencies: + '@types/history': 4.7.11 + '@types/react': 18.2.35 + '@types/react-router': 5.1.20 + + '@types/react-router-dom@5.3.3': + dependencies: + '@types/history': 4.7.11 + '@types/react': 18.2.35 + '@types/react-router': 5.1.20 + + '@types/react-router@5.1.20': + dependencies: + '@types/history': 4.7.11 + '@types/react': 18.2.35 + '@types/react@18.2.35': dependencies: '@types/prop-types': 15.7.9 @@ -23235,12 +29837,18 @@ snapshots: '@types/responselike@1.0.3': dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 + + '@types/retry@0.12.0': {} '@types/sass@1.43.1': dependencies: '@types/node': 18.18.8 + '@types/sax@1.2.7': + dependencies: + '@types/node': 20.14.12 + '@types/scheduler@0.16.5': {} '@types/semver@7.5.4': {} @@ -23248,22 +29856,32 @@ snapshots: '@types/send@0.17.3': dependencies: '@types/mime': 1.3.4 - '@types/node': 18.18.8 + '@types/node': 20.14.12 + + '@types/serve-index@1.9.4': + dependencies: + '@types/express': 4.17.21 '@types/serve-static@1.15.4': dependencies: '@types/http-errors': 2.0.3 '@types/mime': 3.0.3 - '@types/node': 18.18.8 + '@types/node': 20.14.12 '@types/sizzle@2.3.8': {} + '@types/sockjs@0.3.36': + dependencies: + '@types/node': 20.14.12 + '@types/sortablejs@1.15.7': {} '@types/sortablejs@1.15.8': {} '@types/stack-utils@2.0.3': {} + '@types/stats.js@0.17.3': {} + '@types/stylus@0.48.41': dependencies: '@types/node': 18.18.8 @@ -23272,16 +29890,20 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 18.18.8 + '@types/node': 20.14.12 '@types/supertest@6.0.2': dependencies: '@types/methods': 1.1.4 '@types/superagent': 8.1.7 - '@types/through@0.0.32': + '@types/three@0.163.0': dependencies: - '@types/node': 18.18.8 + '@tweenjs/tween.js': 23.1.3 + '@types/stats.js': 0.17.3 + '@types/webxr': 0.5.20 + fflate: 0.8.2 + meshoptimizer: 0.18.1 '@types/tinycolor2@1.4.5': {} @@ -23300,9 +29922,11 @@ snapshots: '@types/web-bluetooth@0.0.16': {} + '@types/webxr@0.5.20': {} + '@types/ws@8.5.8': dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 '@types/yargs-parser@21.0.3': {} @@ -23312,7 +29936,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 optional: true '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': @@ -23357,7 +29981,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.5) '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.5) - debug: 4.3.4 + debug: 4.3.6 eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: @@ -23371,7 +29995,7 @@ snapshots: dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.4 + debug: 4.3.6 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -23401,15 +30025,46 @@ snapshots: '@typescript-eslint/types': 6.21.0 eslint-visitor-keys: 3.4.3 + '@typescript/twoslash@3.1.0': + dependencies: + '@typescript/vfs': 1.3.5 + debug: 4.3.6 + lz-string: 1.5.0 + transitivePeerDependencies: + - supports-color + + '@typescript/vfs@1.3.4': + dependencies: + debug: 4.3.6 + transitivePeerDependencies: + - supports-color + + '@typescript/vfs@1.3.5': + dependencies: + debug: 4.3.6 + transitivePeerDependencies: + - supports-color + '@ungap/structured-clone@1.2.0': {} - '@unocss/astro@0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1))': + '@unocss/astro@0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1))': dependencies: '@unocss/core': 0.62.2 '@unocss/reset': 0.62.2 - '@unocss/vite': 0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1)) + '@unocss/vite': 0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1)) optionalDependencies: - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1) + transitivePeerDependencies: + - rollup + - supports-color + + '@unocss/astro@0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': + dependencies: + '@unocss/core': 0.62.2 + '@unocss/reset': 0.62.2 + '@unocss/vite': 0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + optionalDependencies: + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) transitivePeerDependencies: - rollup - supports-color @@ -23465,6 +30120,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@unocss/postcss@0.62.2(postcss@8.4.47)': + dependencies: + '@unocss/config': 0.62.2 + '@unocss/core': 0.62.2 + '@unocss/rule-utils': 0.62.2 + css-tree: 2.3.1 + magic-string: 0.30.11 + postcss: 8.4.47 + tinyglobby: 0.2.2 + transitivePeerDependencies: + - supports-color + '@unocss/preset-attributify@0.62.2': dependencies: '@unocss/core': 0.62.2 @@ -23522,7 +30189,7 @@ snapshots: '@unocss/transformer-attributify-jsx-babel@0.62.2': dependencies: '@babel/core': 7.25.2 - '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.2) '@babel/preset-typescript': 7.24.7(@babel/core@7.25.2) '@unocss/core': 0.62.2 transitivePeerDependencies: @@ -23546,7 +30213,24 @@ snapshots: dependencies: '@unocss/core': 0.62.2 - '@unocss/vite@0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1))': + '@unocss/vite@0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1))': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.0(rollup@4.14.1) + '@unocss/config': 0.62.2 + '@unocss/core': 0.62.2 + '@unocss/inspector': 0.62.2 + '@unocss/scope': 0.62.2 + '@unocss/transformer-directives': 0.62.2 + chokidar: 3.6.0 + magic-string: 0.30.11 + tinyglobby: 0.2.2 + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1) + transitivePeerDependencies: + - rollup + - supports-color + + '@unocss/vite@0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': dependencies: '@ampproject/remapping': 2.3.0 '@rollup/pluginutils': 5.1.0(rollup@4.14.1) @@ -23558,11 +30242,18 @@ snapshots: chokidar: 3.6.0 magic-string: 0.30.11 tinyglobby: 0.2.2 - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) transitivePeerDependencies: - rollup - supports-color + '@use-gesture/core@10.3.1': {} + + '@use-gesture/react@10.3.1(react@18.2.0)': + dependencies: + '@use-gesture/core': 10.3.1 + react: 18.2.0 + '@vaadin/a11y-base@24.3.22': dependencies: '@open-wc/dedupe-mixin': 1.4.0 @@ -23672,7 +30363,7 @@ snapshots: '@vanilla-extract/babel-plugin-debug-ids@1.0.6': dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.25.2 transitivePeerDependencies: - supports-color @@ -23692,7 +30383,7 @@ snapshots: transitivePeerDependencies: - babel-plugin-macros - '@vanilla-extract/integration@7.1.7(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)': + '@vanilla-extract/integration@7.1.7(@types/node@22.5.0)(babel-plugin-macros@3.1.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)': dependencies: '@babel/core': 7.24.3 '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.3) @@ -23704,8 +30395,8 @@ snapshots: find-up: 5.0.0 javascript-stringify: 2.1.0 mlly: 1.4.2 - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vite-node: 1.4.0(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite-node: 1.4.0(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -23719,10 +30410,10 @@ snapshots: '@vanilla-extract/private@1.0.5': {} - '@vanilla-extract/vite-plugin@4.0.13(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': + '@vanilla-extract/vite-plugin@4.0.13(@types/node@22.5.0)(babel-plugin-macros@3.1.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': dependencies: - '@vanilla-extract/integration': 7.1.7(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + '@vanilla-extract/integration': 7.1.7(@types/node@22.5.0)(babel-plugin-macros@3.1.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -23734,81 +30425,86 @@ snapshots: - supports-color - terser - '@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1))(vue@3.3.7(typescript@5.4.5))': + '@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1))(vue@3.3.7(typescript@5.6.3))': dependencies: '@babel/core': 7.24.3 '@babel/plugin-transform-typescript': 7.24.1(@babel/core@7.24.3) '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.3) - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1) - vue: 3.3.7(typescript@5.4.5) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1) + vue: 3.3.7(typescript@5.6.3) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.7(typescript@5.4.5))': + '@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.7(typescript@5.6.3))': dependencies: '@babel/core': 7.24.3 '@babel/plugin-transform-typescript': 7.24.1(@babel/core@7.24.3) '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.3) - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vue: 3.3.7(typescript@5.4.5) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vue: 3.3.7(typescript@5.6.3) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.27(typescript@5.4.5))': + '@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.27(typescript@5.6.3))': dependencies: '@babel/core': 7.24.3 '@babel/plugin-transform-typescript': 7.24.1(@babel/core@7.24.3) '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.3) - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vue: 3.4.27(typescript@5.4.5) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vue: 3.4.27(typescript@5.6.3) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue2@2.3.1(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@2.7.16)': + '@vitejs/plugin-vue2@2.3.1(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@2.7.16)': dependencies: - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) vue: 2.7.16 - '@vitejs/plugin-vue@4.4.0(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.12(typescript@5.4.5))': + '@vitejs/plugin-vue@4.4.0(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.12(typescript@5.6.3))': + dependencies: + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vue: 3.3.12(typescript@5.6.3) + + '@vitejs/plugin-vue@4.6.2(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.15(typescript@5.6.3))': dependencies: - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vue: 3.3.12(typescript@5.4.5) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vue: 3.4.15(typescript@5.6.3) - '@vitejs/plugin-vue@4.6.2(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.15(typescript@5.4.5))': + '@vitejs/plugin-vue@5.0.3(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.15(typescript@5.6.3))': dependencies: - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vue: 3.4.15(typescript@5.4.5) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vue: 3.4.15(typescript@5.6.3) - '@vitejs/plugin-vue@5.0.3(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.15(typescript@5.4.5))': + '@vitejs/plugin-vue@5.0.4(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.7(typescript@5.6.3))': dependencies: - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vue: 3.4.15(typescript@5.4.5) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vue: 3.3.7(typescript@5.6.3) - '@vitejs/plugin-vue@5.0.4(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.3.7(typescript@5.4.5))': + '@vitejs/plugin-vue@5.0.4(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.27(typescript@5.6.3))': dependencies: - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vue: 3.3.7(typescript@5.4.5) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vue: 3.4.27(typescript@5.6.3) - '@vitejs/plugin-vue@5.0.4(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.27(typescript@5.4.5))': + '@vitejs/plugin-vue@5.1.2(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.35(typescript@5.6.3))': dependencies: - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vue: 3.4.27(typescript@5.4.5) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vue: 3.4.35(typescript@5.6.3) - '@vitejs/plugin-vue@5.1.2(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.35(typescript@5.4.5))': + '@vitejs/plugin-vue@5.1.4(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1))(vue@3.3.7(typescript@5.6.3))': dependencies: - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vue: 3.4.35(typescript@5.4.5) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1) + vue: 3.3.7(typescript@5.6.3) - '@vitejs/plugin-vue@5.1.4(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1))(vue@3.3.7(typescript@5.4.5))': + '@vitejs/plugin-vue@5.1.4(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue@3.4.35(typescript@5.6.3))': dependencies: - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1) - vue: 3.3.7(typescript@5.4.5) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vue: 3.4.35(typescript@5.6.3) - '@vitest/coverage-v8@2.0.4(vitest@2.0.4(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': + '@vitest/coverage-v8@2.0.4(vitest@2.0.4(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 - debug: 4.3.5 + debug: 4.3.6 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 5.0.6 @@ -23818,7 +30514,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.4(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vitest: 2.0.4(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) transitivePeerDependencies: - supports-color @@ -23829,25 +30525,59 @@ snapshots: chai: 5.1.1 tinyrainbow: 1.2.0 + '@vitest/expect@2.1.2': + dependencies: + '@vitest/spy': 2.1.2 + '@vitest/utils': 2.1.2 + chai: 5.1.1 + tinyrainbow: 1.2.0 + + '@vitest/mocker@2.1.2(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))': + dependencies: + '@vitest/spy': 2.1.2 + estree-walker: 3.0.3 + magic-string: 0.30.11 + optionalDependencies: + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + '@vitest/pretty-format@2.0.4': dependencies: tinyrainbow: 1.2.0 + '@vitest/pretty-format@2.1.2': + dependencies: + tinyrainbow: 1.2.0 + '@vitest/runner@2.0.4': dependencies: '@vitest/utils': 2.0.4 pathe: 1.1.2 + '@vitest/runner@2.1.2': + dependencies: + '@vitest/utils': 2.1.2 + pathe: 1.1.2 + '@vitest/snapshot@2.0.4': dependencies: '@vitest/pretty-format': 2.0.4 - magic-string: 0.30.10 + magic-string: 0.30.11 + pathe: 1.1.2 + + '@vitest/snapshot@2.1.2': + dependencies: + '@vitest/pretty-format': 2.1.2 + magic-string: 0.30.11 pathe: 1.1.2 '@vitest/spy@2.0.4': dependencies: tinyspy: 3.0.0 + '@vitest/spy@2.1.2': + dependencies: + tinyspy: 3.0.0 + '@vitest/utils@2.0.4': dependencies: '@vitest/pretty-format': 2.0.4 @@ -23855,7 +30585,13 @@ snapshots: loupe: 3.1.1 tinyrainbow: 1.2.0 - '@vue-macros/common@1.10.0(rollup@4.14.1)(vue@3.3.7(typescript@5.4.5))': + '@vitest/utils@2.1.2': + dependencies: + '@vitest/pretty-format': 2.1.2 + loupe: 3.1.1 + tinyrainbow: 1.2.0 + + '@vue-macros/common@1.10.0(rollup@4.14.1)(vue@3.3.7(typescript@5.6.3))': dependencies: '@babel/types': 7.23.6 '@rollup/pluginutils': 5.1.0(rollup@4.14.1) @@ -23864,7 +30600,20 @@ snapshots: local-pkg: 0.5.0 magic-string-ast: 0.3.0 optionalDependencies: - vue: 3.3.7(typescript@5.4.5) + vue: 3.3.7(typescript@5.6.3) + transitivePeerDependencies: + - rollup + + '@vue-macros/common@1.10.0(rollup@4.14.1)(vue@3.4.35(typescript@5.6.3))': + dependencies: + '@babel/types': 7.23.6 + '@rollup/pluginutils': 5.1.0(rollup@4.14.1) + '@vue/compiler-sfc': 3.4.15 + ast-kit: 0.11.3(rollup@4.14.1) + local-pkg: 0.5.0 + magic-string-ast: 0.3.0 + optionalDependencies: + vue: 3.4.35(typescript@5.6.3) transitivePeerDependencies: - rollup @@ -23890,20 +30639,47 @@ snapshots: transitivePeerDependencies: - supports-color + '@vue/babel-plugin-jsx@1.2.2(@babel/core@7.25.2)': + dependencies: + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.25.2) + '@babel/template': 7.24.0 + '@babel/traverse': 7.24.1 + '@babel/types': 7.24.0 + '@vue/babel-helper-vue-transform-on': 1.2.2 + '@vue/babel-plugin-resolve-type': 1.2.2(@babel/core@7.25.2) + camelcase: 6.3.0 + html-tags: 3.3.1 + svg-tags: 1.0.0 + optionalDependencies: + '@babel/core': 7.25.2 + transitivePeerDependencies: + - supports-color + '@vue/babel-plugin-resolve-type@1.2.2(@babel/core@7.24.3)': dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.25.7 '@babel/core': 7.24.3 '@babel/helper-module-imports': 7.22.15 '@babel/helper-plugin-utils': 7.24.0 - '@babel/parser': 7.24.1 + '@babel/parser': 7.25.7 + '@vue/compiler-sfc': 3.4.15 + + '@vue/babel-plugin-resolve-type@1.2.2(@babel/core@7.25.2)': + dependencies: + '@babel/code-frame': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-plugin-utils': 7.24.0 + '@babel/parser': 7.25.7 '@vue/compiler-sfc': 3.4.15 '@vue/babel-plugin-transform-vue-jsx@1.4.0(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 - '@babel/helper-module-imports': 7.24.7 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.3) + '@babel/helper-module-imports': 7.25.7 + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.24.3) '@vue/babel-helper-vue-jsx-merge-props': 1.4.0 html-tags: 2.0.0 lodash.kebabcase: 4.1.1 @@ -23930,27 +30706,27 @@ snapshots: '@vue/babel-sugar-composition-api-inject-h@1.4.0(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.24.3) '@vue/babel-sugar-composition-api-render-instance@1.4.0(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.24.3) '@vue/babel-sugar-functional-vue@1.4.0(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.24.3) '@vue/babel-sugar-inject-h@1.4.0(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.24.3) '@vue/babel-sugar-v-model@1.4.0(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.24.3) '@vue/babel-helper-vue-jsx-merge-props': 1.4.0 '@vue/babel-plugin-transform-vue-jsx': 1.4.0(@babel/core@7.24.3) camelcase: 5.3.1 @@ -23962,7 +30738,7 @@ snapshots: '@vue/babel-sugar-v-on@1.4.0(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.24.3) '@vue/babel-plugin-transform-vue-jsx': 1.4.0(@babel/core@7.24.3) camelcase: 5.3.1 transitivePeerDependencies: @@ -23970,7 +30746,7 @@ snapshots: '@vue/compiler-core@3.3.12': dependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.7 '@vue/shared': 3.3.12 estree-walker: 2.0.2 source-map-js: 1.2.0 @@ -23980,11 +30756,11 @@ snapshots: '@babel/parser': 7.24.1 '@vue/shared': 3.3.7 estree-walker: 2.0.2 - source-map-js: 1.2.0 + source-map-js: 1.2.1 '@vue/compiler-core@3.4.15': dependencies: - '@babel/parser': 7.24.1 + '@babel/parser': 7.25.7 '@vue/shared': 3.4.15 entities: 4.5.0 estree-walker: 2.0.2 @@ -23992,15 +30768,15 @@ snapshots: '@vue/compiler-core@3.4.19': dependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.7 '@vue/shared': 3.4.19 entities: 4.5.0 estree-walker: 2.0.2 - source-map-js: 1.2.0 + source-map-js: 1.2.1 '@vue/compiler-core@3.4.27': dependencies: - '@babel/parser': 7.24.5 + '@babel/parser': 7.25.7 '@vue/shared': 3.4.27 entities: 4.5.0 estree-walker: 2.0.2 @@ -24008,11 +30784,11 @@ snapshots: '@vue/compiler-core@3.4.35': dependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.7 '@vue/shared': 3.4.35 entities: 4.5.0 estree-walker: 2.0.2 - source-map-js: 1.2.0 + source-map-js: 1.2.1 '@vue/compiler-dom@3.3.12': dependencies: @@ -24047,7 +30823,7 @@ snapshots: '@vue/compiler-sfc@2.7.16': dependencies: '@babel/parser': 7.24.1 - postcss: 8.4.39 + postcss: 8.4.47 source-map: 0.6.1 optionalDependencies: prettier: 2.8.8 @@ -24062,8 +30838,8 @@ snapshots: '@vue/shared': 3.3.12 estree-walker: 2.0.2 magic-string: 0.30.10 - postcss: 8.4.39 - source-map-js: 1.0.2 + postcss: 8.4.47 + source-map-js: 1.2.0 '@vue/compiler-sfc@3.3.7': dependencies: @@ -24075,7 +30851,7 @@ snapshots: '@vue/shared': 3.3.7 estree-walker: 2.0.2 magic-string: 0.30.5 - postcss: 8.4.39 + postcss: 8.4.47 source-map-js: 1.0.2 '@vue/compiler-sfc@3.4.15': @@ -24087,20 +30863,20 @@ snapshots: '@vue/shared': 3.4.15 estree-walker: 2.0.2 magic-string: 0.30.10 - postcss: 8.4.39 + postcss: 8.4.47 source-map-js: 1.2.0 '@vue/compiler-sfc@3.4.19': dependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.7 '@vue/compiler-core': 3.4.19 '@vue/compiler-dom': 3.4.19 '@vue/compiler-ssr': 3.4.19 '@vue/shared': 3.4.19 estree-walker: 2.0.2 - magic-string: 0.30.10 - postcss: 8.4.39 - source-map-js: 1.2.0 + magic-string: 0.30.11 + postcss: 8.4.47 + source-map-js: 1.2.1 '@vue/compiler-sfc@3.4.27': dependencies: @@ -24111,7 +30887,7 @@ snapshots: '@vue/shared': 3.4.27 estree-walker: 2.0.2 magic-string: 0.30.10 - postcss: 8.4.39 + postcss: 8.4.47 source-map-js: 1.2.0 '@vue/compiler-sfc@3.4.35': @@ -24122,9 +30898,9 @@ snapshots: '@vue/compiler-ssr': 3.4.35 '@vue/shared': 3.4.35 estree-walker: 2.0.2 - magic-string: 0.30.10 - postcss: 8.4.40 - source-map-js: 1.2.0 + magic-string: 0.30.11 + postcss: 8.4.47 + source-map-js: 1.2.1 '@vue/compiler-ssr@3.3.12': dependencies: @@ -24231,25 +31007,32 @@ snapshots: dependencies: vue: 2.7.16 - '@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5))': + '@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3))': dependencies: - vue: 3.3.7(typescript@5.4.5) + vue: 3.3.7(typescript@5.6.3) optional: true - '@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.4.5))': + '@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.6.3))': dependencies: - vue: 3.4.15(typescript@5.4.5) + vue: 3.4.15(typescript@5.6.3) + optional: true + + '@vue/composition-api@1.7.2(vue@3.4.35(typescript@5.6.3))': + dependencies: + vue: 3.4.35(typescript@5.6.3) optional: true '@vue/devtools-api@6.5.1': {} + '@vue/devtools-api@6.6.4': {} + '@vue/reactivity-transform@3.3.12': dependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.7 '@vue/compiler-core': 3.3.12 '@vue/shared': 3.3.12 estree-walker: 2.0.2 - magic-string: 0.30.10 + magic-string: 0.30.11 '@vue/reactivity-transform@3.3.7': dependencies: @@ -24335,35 +31118,35 @@ snapshots: '@vue/shared': 3.4.35 csstype: 3.1.3 - '@vue/server-renderer@3.3.12(vue@3.3.12(typescript@5.4.5))': + '@vue/server-renderer@3.3.12(vue@3.3.12(typescript@5.6.3))': dependencies: '@vue/compiler-ssr': 3.3.12 '@vue/shared': 3.3.12 - vue: 3.3.12(typescript@5.4.5) + vue: 3.3.12(typescript@5.6.3) - '@vue/server-renderer@3.3.7(vue@3.3.7(typescript@5.4.5))': + '@vue/server-renderer@3.3.7(vue@3.3.7(typescript@5.6.3))': dependencies: '@vue/compiler-ssr': 3.3.7 '@vue/shared': 3.3.7 - vue: 3.3.7(typescript@5.4.5) + vue: 3.3.7(typescript@5.6.3) - '@vue/server-renderer@3.4.15(vue@3.4.15(typescript@5.4.5))': + '@vue/server-renderer@3.4.15(vue@3.4.15(typescript@5.6.3))': dependencies: '@vue/compiler-ssr': 3.4.15 '@vue/shared': 3.4.15 - vue: 3.4.15(typescript@5.4.5) + vue: 3.4.15(typescript@5.6.3) - '@vue/server-renderer@3.4.27(vue@3.4.27(typescript@5.4.5))': + '@vue/server-renderer@3.4.27(vue@3.4.27(typescript@5.6.3))': dependencies: '@vue/compiler-ssr': 3.4.27 '@vue/shared': 3.4.27 - vue: 3.4.27(typescript@5.4.5) + vue: 3.4.27(typescript@5.6.3) - '@vue/server-renderer@3.4.35(vue@3.4.35(typescript@5.4.5))': + '@vue/server-renderer@3.4.35(vue@3.4.35(typescript@5.6.3))': dependencies: '@vue/compiler-ssr': 3.4.35 '@vue/shared': 3.4.35 - vue: 3.4.35(typescript@5.4.5) + vue: 3.4.35(typescript@5.6.3) '@vue/shared@3.3.12': {} @@ -24377,25 +31160,44 @@ snapshots: '@vue/shared@3.4.35': {} - '@vueuse/core@9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5))': + '@vueuse/core@9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3))': + dependencies: + '@types/web-bluetooth': 0.0.16 + '@vueuse/metadata': 9.13.0 + '@vueuse/shared': 9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)) + vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + + '@vueuse/core@9.13.0(@vue/composition-api@1.7.2(vue@3.4.35(typescript@5.6.3)))(vue@3.4.35(typescript@5.6.3))': dependencies: '@types/web-bluetooth': 0.0.16 '@vueuse/metadata': 9.13.0 - '@vueuse/shared': 9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)) - vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)) + '@vueuse/shared': 9.13.0(@vue/composition-api@1.7.2(vue@3.4.35(typescript@5.6.3)))(vue@3.4.35(typescript@5.6.3)) + vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.4.35(typescript@5.6.3)))(vue@3.4.35(typescript@5.6.3)) transitivePeerDependencies: - '@vue/composition-api' - vue + optional: true '@vueuse/metadata@9.13.0': {} - '@vueuse/shared@9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5))': + '@vueuse/shared@9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3))': dependencies: - vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)) + vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)) transitivePeerDependencies: - '@vue/composition-api' - vue + '@vueuse/shared@9.13.0(@vue/composition-api@1.7.2(vue@3.4.35(typescript@5.6.3)))(vue@3.4.35(typescript@5.6.3))': + dependencies: + vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.4.35(typescript@5.6.3)))(vue@3.4.35(typescript@5.6.3)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + optional: true + '@webassemblyjs/ast@1.12.1': dependencies: '@webassemblyjs/helper-numbers': 1.11.6 @@ -24512,6 +31314,8 @@ snapshots: acorn@8.12.0: {} + address@1.2.2: {} + adler-32@1.2.0: dependencies: exit-on-epipe: 1.0.1 @@ -24558,6 +31362,11 @@ snapshots: dependencies: ajv: 6.12.6 + ajv-keywords@5.1.0(ajv@8.12.0): + dependencies: + ajv: 8.12.0 + fast-deep-equal: 3.1.3 + ajv@6.12.6: dependencies: fast-deep-equal: 3.1.3 @@ -24579,6 +31388,29 @@ snapshots: require-from-string: 2.0.2 uri-js: 4.4.1 + algoliasearch-helper@3.22.5(algoliasearch@4.24.0): + dependencies: + '@algolia/events': 4.0.1 + algoliasearch: 4.24.0 + + algoliasearch@4.24.0: + dependencies: + '@algolia/cache-browser-local-storage': 4.24.0 + '@algolia/cache-common': 4.24.0 + '@algolia/cache-in-memory': 4.24.0 + '@algolia/client-account': 4.24.0 + '@algolia/client-analytics': 4.24.0 + '@algolia/client-common': 4.24.0 + '@algolia/client-personalization': 4.24.0 + '@algolia/client-search': 4.24.0 + '@algolia/logger-common': 4.24.0 + '@algolia/logger-console': 4.24.0 + '@algolia/recommend': 4.24.0 + '@algolia/requester-browser-xhr': 4.24.0 + '@algolia/requester-common': 4.24.0 + '@algolia/requester-node-http': 4.24.0 + '@algolia/transporter': 4.24.0 + align-text@0.1.4: dependencies: kind-of: 3.2.2 @@ -24603,6 +31435,8 @@ snapshots: dependencies: type-fest: 1.4.0 + ansi-html-community@0.0.8: {} + ansi-regex@2.1.1: {} ansi-regex@3.0.1: {} @@ -24625,10 +31459,10 @@ snapshots: ansi-styles@6.2.1: {} - ant-design-vue@3.2.20(vue@3.3.7(typescript@5.4.5)): + ant-design-vue@3.2.20(vue@3.3.7(typescript@5.6.3)): dependencies: '@ant-design/colors': 6.0.0 - '@ant-design/icons-vue': 6.1.0(vue@3.3.7(typescript@5.4.5)) + '@ant-design/icons-vue': 6.1.0(vue@3.3.7(typescript@5.6.3)) '@babel/runtime': 7.23.2 '@ctrl/tinycolor': 3.6.1 '@simonwep/pickr': 1.8.2 @@ -24642,14 +31476,14 @@ snapshots: resize-observer-polyfill: 1.5.1 scroll-into-view-if-needed: 2.2.31 shallow-equal: 1.2.1 - vue: 3.3.7(typescript@5.4.5) - vue-types: 3.0.2(vue@3.3.7(typescript@5.4.5)) + vue: 3.3.7(typescript@5.6.3) + vue-types: 3.0.2(vue@3.3.7(typescript@5.6.3)) warning: 4.0.3 - ant-design-vue@4.0.6(vue@3.3.7(typescript@5.4.5)): + ant-design-vue@4.0.6(vue@3.3.7(typescript@5.6.3)): dependencies: '@ant-design/colors': 6.0.0 - '@ant-design/icons-vue': 7.0.1(vue@3.3.7(typescript@5.4.5)) + '@ant-design/icons-vue': 7.0.1(vue@3.3.7(typescript@5.6.3)) '@babel/runtime': 7.23.2 '@ctrl/tinycolor': 3.6.1 '@emotion/hash': 0.9.1 @@ -24668,14 +31502,14 @@ snapshots: shallow-equal: 1.2.1 stylis: 4.3.0 throttle-debounce: 5.0.0 - vue: 3.3.7(typescript@5.4.5) - vue-types: 3.0.2(vue@3.3.7(typescript@5.4.5)) + vue: 3.3.7(typescript@5.6.3) + vue-types: 3.0.2(vue@3.3.7(typescript@5.6.3)) warning: 4.0.3 - ant-design-vue@4.1.2(vue@3.4.15(typescript@5.4.5)): + ant-design-vue@4.1.2(vue@3.4.15(typescript@5.6.3)): dependencies: '@ant-design/colors': 6.0.0 - '@ant-design/icons-vue': 7.0.1(vue@3.4.15(typescript@5.4.5)) + '@ant-design/icons-vue': 7.0.1(vue@3.4.15(typescript@5.6.3)) '@babel/runtime': 7.23.2 '@ctrl/tinycolor': 3.6.1 '@emotion/hash': 0.9.1 @@ -24694,8 +31528,8 @@ snapshots: shallow-equal: 1.2.1 stylis: 4.3.0 throttle-debounce: 5.0.0 - vue: 3.4.15(typescript@5.4.5) - vue-types: 3.0.2(vue@3.4.15(typescript@5.4.5)) + vue: 3.4.15(typescript@5.6.3) + vue-types: 3.0.2(vue@3.4.15(typescript@5.6.3)) warning: 4.0.3 antd-style@3.6.2(@types/react@18.2.35)(antd@5.11.0(date-fns@2.30.0)(luxon@3.4.4)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): @@ -24795,7 +31629,7 @@ snapshots: builder-util: 24.13.1 builder-util-runtime: 9.2.4 chromium-pickle-js: 0.2.0 - debug: 4.3.4 + debug: 4.3.6 dmg-builder: 24.13.3 ejs: 3.1.10 electron-publish: 24.13.1 @@ -24809,7 +31643,7 @@ snapshots: minimatch: 5.1.6 read-config-file: 6.3.2 sanitize-filename: 1.6.3 - semver: 7.5.4 + semver: 7.6.3 tar: 6.2.1 temp-file: 3.4.0 transitivePeerDependencies: @@ -24912,7 +31746,7 @@ snapshots: ast-kit@0.11.3(rollup@4.14.1): dependencies: - '@babel/parser': 7.24.5 + '@babel/parser': 7.25.7 '@rollup/pluginutils': 5.1.0(rollup@4.14.1) pathe: 1.1.1 transitivePeerDependencies: @@ -24920,7 +31754,7 @@ snapshots: ast-kit@0.9.5(rollup@4.14.1): dependencies: - '@babel/parser': 7.24.5 + '@babel/parser': 7.25.7 '@rollup/pluginutils': 5.1.0(rollup@4.14.1) pathe: 1.1.1 transitivePeerDependencies: @@ -24936,6 +31770,8 @@ snapshots: astral-regex@2.0.0: optional: true + astring@1.9.0: {} + async-exit-hook@2.0.1: {} async-validator@4.2.5: {} @@ -24948,26 +31784,38 @@ snapshots: atob@2.1.2: {} + attr-accept@2.2.2: {} + author-regex@1.0.0: {} - autoprefixer@10.4.16(postcss@8.4.31): + autoprefixer@10.4.16(postcss@8.4.35): dependencies: - browserslist: 4.22.1 - caniuse-lite: 1.0.30001561 + browserslist: 4.23.1 + caniuse-lite: 1.0.30001633 fraction.js: 4.3.7 normalize-range: 0.1.2 - picocolors: 1.0.0 - postcss: 8.4.31 + picocolors: 1.1.0 + postcss: 8.4.35 postcss-value-parser: 4.2.0 - autoprefixer@10.4.16(postcss@8.4.35): + autoprefixer@10.4.16(postcss@8.4.47): dependencies: - browserslist: 4.22.1 - caniuse-lite: 1.0.30001561 + browserslist: 4.23.1 + caniuse-lite: 1.0.30001633 fraction.js: 4.3.7 normalize-range: 0.1.2 - picocolors: 1.0.0 - postcss: 8.4.35 + picocolors: 1.1.0 + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + autoprefixer@10.4.20(postcss@8.4.47): + dependencies: + browserslist: 4.24.0 + caniuse-lite: 1.0.30001667 + fraction.js: 4.3.7 + normalize-range: 0.1.2 + picocolors: 1.1.0 + postcss: 8.4.47 postcss-value-parser: 4.2.0 available-typed-arrays@1.0.5: {} @@ -24988,7 +31836,7 @@ snapshots: axios@1.6.5: dependencies: - follow-redirects: 1.15.4(debug@4.3.4) + follow-redirects: 1.15.4 form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -24996,7 +31844,15 @@ snapshots: axios@1.7.2: dependencies: - follow-redirects: 1.15.6 + follow-redirects: 1.15.6(debug@4.3.6) + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + + axios@1.7.7(debug@4.3.6): + dependencies: + follow-redirects: 1.15.6(debug@4.3.6) form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -25010,18 +31866,7 @@ snapshots: b-validate@1.5.3: {} - babel-jest@29.7.0(@babel/core@7.24.3): - dependencies: - '@babel/core': 7.24.3 - '@jest/transform': 29.7.0 - '@types/babel__core': 7.20.3 - babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.6.3(@babel/core@7.24.3) - chalk: 4.1.2 - graceful-fs: 4.2.11 - slash: 3.0.0 - transitivePeerDependencies: - - supports-color + b4a@1.6.7: {} babel-jest@29.7.0(@babel/core@7.25.2): dependencies: @@ -25035,11 +31880,21 @@ snapshots: slash: 3.0.0 transitivePeerDependencies: - supports-color - optional: true + + babel-loader@9.2.1(@babel/core@7.25.2)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + '@babel/core': 7.25.2 + find-cache-dir: 4.0.0 + schema-utils: 4.2.0 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + + babel-plugin-dynamic-import-node@2.3.3: + dependencies: + object.assign: 4.1.4 babel-plugin-istanbul@6.1.1: dependencies: - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.25.7 '@istanbuljs/load-nyc-config': 1.1.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-instrument: 5.2.1 @@ -25049,8 +31904,8 @@ snapshots: babel-plugin-jest-hoist@29.6.3: dependencies: - '@babel/template': 7.25.0 - '@babel/types': 7.25.2 + '@babel/template': 7.25.7 + '@babel/types': 7.25.7 '@types/babel__core': 7.20.3 '@types/babel__traverse': 7.20.3 @@ -25069,6 +31924,15 @@ snapshots: cosmiconfig: 7.1.0 resolve: 1.22.8 + babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.2): + dependencies: + '@babel/compat-data': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.2) + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + babel-plugin-polyfill-corejs2@0.4.6(@babel/core@7.25.2): dependencies: '@babel/compat-data': 7.24.1 @@ -25078,6 +31942,14 @@ snapshots: transitivePeerDependencies: - supports-color + babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.2): + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.2) + core-js-compat: 3.38.1 + transitivePeerDependencies: + - supports-color + babel-plugin-polyfill-corejs3@0.8.6(@babel/core@7.25.2): dependencies: '@babel/core': 7.25.2 @@ -25093,6 +31965,13 @@ snapshots: transitivePeerDependencies: - supports-color + babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.2): + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.2) + transitivePeerDependencies: + - supports-color + babel-plugin-transform-replace-object-assign@2.0.0(@babel/core@7.25.2): dependencies: '@babel/core': 7.25.2 @@ -25104,22 +31983,6 @@ snapshots: core-js: 2.6.12 regenerator-runtime: 0.10.5 - babel-preset-current-node-syntax@1.0.1(@babel/core@7.24.3): - dependencies: - '@babel/core': 7.24.3 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.3) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.24.3) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.3) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.3) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.3) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.24.3) - babel-preset-current-node-syntax@1.0.1(@babel/core@7.25.2): dependencies: '@babel/core': 7.25.2 @@ -25135,20 +31998,12 @@ snapshots: '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.25.2) - optional: true - - babel-preset-jest@29.6.3(@babel/core@7.24.3): - dependencies: - '@babel/core': 7.24.3 - babel-plugin-jest-hoist: 29.6.3 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.24.3) babel-preset-jest@29.6.3(@babel/core@7.25.2): dependencies: '@babel/core': 7.25.2 babel-plugin-jest-hoist: 29.6.3 babel-preset-current-node-syntax: 1.0.1(@babel/core@7.25.2) - optional: true babel-preset-solid@1.8.4(@babel/core@7.23.2): dependencies: @@ -25164,6 +32019,30 @@ snapshots: balanced-match@1.0.2: {} + bare-events@2.5.0: + optional: true + + bare-fs@2.3.5: + dependencies: + bare-events: 2.5.0 + bare-path: 2.1.3 + bare-stream: 2.3.0 + optional: true + + bare-os@2.4.4: + optional: true + + bare-path@2.1.3: + dependencies: + bare-os: 2.4.4 + optional: true + + bare-stream@2.3.0: + dependencies: + b4a: 1.6.7 + streamx: 2.20.1 + optional: true + base64-js@1.5.1: {} base@0.11.2: @@ -25176,13 +32055,19 @@ snapshots: mixin-deep: 1.3.2 pascalcase: 0.1.1 + batch@0.6.1: {} + bcryptjs@2.4.3: {} + before-after-hook@2.2.3: {} + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 - big-integer@1.6.51: {} + bidi-js@1.0.3: + dependencies: + require-from-string: 2.0.2 big.js@5.2.2: {} @@ -25253,6 +32138,11 @@ snapshots: transitivePeerDependencies: - supports-color + bonjour-service@1.2.1: + dependencies: + fast-deep-equal: 3.1.3 + multicast-dns: 7.2.5 + boolbase@1.0.0: {} boolean@3.2.0: @@ -25262,6 +32152,17 @@ snapshots: dependencies: '@popperjs/core': 2.11.8 + boxen@6.2.1: + dependencies: + ansi-align: 3.0.1 + camelcase: 6.3.0 + chalk: 4.1.2 + cli-boxes: 3.0.0 + string-width: 5.1.2 + type-fest: 2.19.0 + widest-line: 4.0.1 + wrap-ansi: 8.1.0 + boxen@7.0.0: dependencies: ansi-align: 3.0.1 @@ -25273,10 +32174,6 @@ snapshots: widest-line: 4.0.1 wrap-ansi: 8.1.0 - bplist-parser@0.2.0: - dependencies: - big-integer: 1.6.51 - brace-expansion@1.1.11: dependencies: balanced-match: 1.0.2 @@ -25305,16 +32202,13 @@ snapshots: dependencies: fill-range: 7.0.1 - breakword@1.0.6: + braces@3.0.3: dependencies: - wcwidth: 1.0.1 + fill-range: 7.1.1 - browserslist@4.22.1: + breakword@1.0.6: dependencies: - caniuse-lite: 1.0.30001561 - electron-to-chromium: 1.4.576 - node-releases: 2.0.13 - update-browserslist-db: 1.0.13(browserslist@4.22.1) + wcwidth: 1.0.1 browserslist@4.23.0: dependencies: @@ -25330,6 +32224,13 @@ snapshots: node-releases: 2.0.14 update-browserslist-db: 1.1.0(browserslist@4.23.1) + browserslist@4.24.0: + dependencies: + caniuse-lite: 1.0.30001667 + electron-to-chromium: 1.5.33 + node-releases: 2.0.18 + update-browserslist-db: 1.1.0(browserslist@4.24.0) + bs-logger@0.2.6: dependencies: fast-json-stable-stringify: 2.1.0 @@ -25353,13 +32254,18 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 + buffer@6.0.3: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + bufferutil@4.0.8: dependencies: node-gyp-build: 4.7.1 builder-util-runtime@9.2.4: dependencies: - debug: 4.3.4 + debug: 4.3.6 sax: 1.3.0 transitivePeerDependencies: - supports-color @@ -25373,7 +32279,7 @@ snapshots: builder-util-runtime: 9.2.4 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.6 fs-extra: 10.1.0 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 @@ -25390,9 +32296,9 @@ snapshots: esbuild: 0.20.2 node-eval: 2.0.0 - bundle-name@3.0.0: + bundle-name@4.1.0: dependencies: - run-applescript: 5.0.0 + run-applescript: 7.0.0 bundle-require@5.0.0(esbuild@0.20.2): dependencies: @@ -25451,6 +32357,18 @@ snapshots: cacheable-lookup@5.0.4: {} + cacheable-lookup@7.0.0: {} + + cacheable-request@10.2.14: + dependencies: + '@types/http-cache-semantics': 4.0.4 + get-stream: 6.0.1 + http-cache-semantics: 4.1.1 + keyv: 4.5.4 + mimic-response: 4.0.0 + normalize-url: 8.0.1 + responselike: 3.0.0 + cacheable-request@7.0.4: dependencies: clone-response: 1.0.3 @@ -25471,6 +32389,11 @@ snapshots: callsites@3.1.0: {} + camel-case@4.1.2: + dependencies: + pascal-case: 3.1.2 + tslib: 2.6.3 + camelcase-css@2.0.1: {} camelcase-keys@6.2.2: @@ -25487,6 +32410,10 @@ snapshots: camelcase@7.0.1: {} + camera-controls@2.9.0(three@0.168.0): + dependencies: + three: 0.168.0 + caniuse-api@3.0.0: dependencies: browserslist: 4.23.1 @@ -25494,12 +32421,12 @@ snapshots: lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 - caniuse-lite@1.0.30001561: {} - caniuse-lite@1.0.30001600: {} caniuse-lite@1.0.30001633: {} + caniuse-lite@1.0.30001667: {} + ccount@2.0.1: {} center-align@0.1.3: @@ -25524,6 +32451,10 @@ snapshots: dependencies: chalk: 4.1.2 + chalk-template@1.1.0: + dependencies: + chalk: 5.3.0 + chalk@1.1.3: dependencies: ansi-styles: 2.2.1 @@ -25554,14 +32485,39 @@ snapshots: char-regex@1.0.2: {} + character-entities-html4@2.1.0: {} + + character-entities-legacy@3.0.0: {} + character-entities@2.0.2: {} + character-reference-invalid@2.0.1: {} + chardet@0.4.2: {} chardet@0.7.0: {} check-error@2.1.1: {} + cheerio-select@2.1.0: + dependencies: + boolbase: 1.0.0 + css-select: 5.1.0 + css-what: 6.1.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.1.0 + + cheerio@1.0.0-rc.12: + dependencies: + cheerio-select: 2.1.0 + dom-serializer: 2.0.0 + domhandler: 5.0.3 + domutils: 3.1.0 + htmlparser2: 8.0.2 + parse5: 7.1.2 + parse5-htmlparser2-tree-adapter: 7.0.0 + chokidar@3.5.3: dependencies: anymatch: 3.1.3 @@ -25586,6 +32542,8 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chownr@1.1.4: {} + chownr@2.0.0: {} chrome-trace-event@1.0.3: {} @@ -25603,12 +32561,20 @@ snapshots: isobject: 3.0.1 static-extend: 0.1.2 + class-variance-authority@0.7.0: + dependencies: + clsx: 2.0.0 + classcat@5.0.5: {} classnames@2.3.2: {} classnames@2.5.1: {} + clean-css@5.3.3: + dependencies: + source-map: 0.6.1 + clean-stack@2.2.0: {} clear-module@4.1.2: @@ -25692,6 +32658,12 @@ snapshots: strip-ansi: 6.0.1 wrap-ansi: 7.0.0 + clone-deep@4.0.1: + dependencies: + is-plain-object: 2.0.4 + kind-of: 6.0.3 + shallow-clone: 3.0.1 + clone-response@1.0.3: dependencies: mimic-response: 1.0.1 @@ -25702,6 +32674,10 @@ snapshots: clsx@1.2.1: {} + clsx@2.0.0: {} + + clsx@2.1.1: {} + co@4.6.0: {} code-block-writer@12.0.0: {} @@ -25723,6 +32699,8 @@ snapshots: codepage@1.15.0: {} + collapse-white-space@2.1.0: {} + collect-v8-coverage@1.0.2: {} collection-visit@1.0.0: @@ -25759,20 +32737,28 @@ snapshots: color-convert: 2.0.1 color-string: 1.9.1 + colord@2.9.3: {} + colorette@2.0.20: {} + combine-promises@1.2.0: {} + combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 comma-separated-tokens@2.0.3: {} + command-exists-promise@2.0.2: {} + commander@10.0.1: {} commander@11.0.0: {} commander@11.1.0: {} + commander@12.1.0: {} + commander@2.14.1: {} commander@2.17.1: {} @@ -25797,6 +32783,16 @@ snapshots: has-own-prop: 2.0.0 repeat-string: 1.6.1 + comment-json@4.2.5: + dependencies: + array-timsort: 1.0.3 + core-util-is: 1.0.3 + esprima: 4.0.1 + has-own-prop: 2.0.0 + repeat-string: 1.6.1 + + common-path-prefix@3.0.0: {} + compare-func@2.0.0: dependencies: array-ify: 1.0.0 @@ -25858,19 +32854,36 @@ snapshots: confbox@0.1.7: {} + config-chain@1.1.13: + dependencies: + ini: 1.3.8 + proto-list: 1.2.4 + config-file-ts@0.2.6: dependencies: glob: 10.3.16 - typescript: 5.4.5 + typescript: 5.6.3 - configstore@5.0.1: + configstore@6.0.0: dependencies: - dot-prop: 5.3.0 + dot-prop: 6.0.1 graceful-fs: 4.2.11 - make-dir: 3.1.0 - unique-string: 2.0.0 + unique-string: 3.0.0 write-file-atomic: 3.0.3 - xdg-basedir: 4.0.0 + xdg-basedir: 5.1.0 + + connect-history-api-fallback@1.6.0: {} + + connect-history-api-fallback@2.0.0: {} + + connect@3.7.0: + dependencies: + debug: 2.6.9 + finalhandler: 1.1.2 + parseurl: 1.3.3 + utils-merge: 1.0.1 + transitivePeerDependencies: + - supports-color consola@2.15.3: {} @@ -25892,6 +32905,8 @@ snapshots: ejs: 3.1.10 lodash: 4.17.21 + consolidated-events@2.0.2: {} + content-disposition@0.5.2: {} content-disposition@0.5.4: @@ -25940,14 +32955,32 @@ snapshots: copy-descriptor@0.1.1: {} + copy-text-to-clipboard@3.2.0: {} + copy-to-clipboard@3.3.3: dependencies: toggle-selection: 1.0.6 + copy-webpack-plugin@11.0.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + fast-glob: 3.3.2 + glob-parent: 6.0.2 + globby: 13.2.2 + normalize-path: 3.0.0 + schema-utils: 4.2.0 + serialize-javascript: 6.0.2 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + core-js-compat@3.33.2: dependencies: browserslist: 4.23.0 + core-js-compat@3.38.1: + dependencies: + browserslist: 4.24.0 + + core-js-pure@3.38.1: {} + core-js@2.6.12: {} core-js@3.30.1: {} @@ -25974,14 +33007,14 @@ snapshots: object-assign: 4.1.1 vary: 1.1.2 - cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.4.5))(ts-node@10.9.1(@types/node@20.5.1)(typescript@5.4.5))(typescript@5.4.5): + cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.6.3))(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.5.1)(typescript@5.6.3))(typescript@5.6.3): dependencies: '@types/node': 20.5.1 - cosmiconfig: 8.3.6(typescript@5.4.5) - ts-node: 10.9.1(@types/node@20.5.1)(typescript@5.4.5) - typescript: 5.4.5 + cosmiconfig: 8.3.6(typescript@5.6.3) + ts-node: 10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.5.1)(typescript@5.6.3) + typescript: 5.6.3 - cosmiconfig@7.1.0: + cosmiconfig@6.0.0: dependencies: '@types/parse-json': 4.0.1 import-fresh: 3.3.0 @@ -25989,12 +33022,13 @@ snapshots: path-type: 4.0.0 yaml: 1.10.2 - cosmiconfig@8.0.0: + cosmiconfig@7.1.0: dependencies: + '@types/parse-json': 4.0.1 import-fresh: 3.3.0 - js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 + yaml: 1.10.2 cosmiconfig@8.3.6(typescript@5.3.3): dependencies: @@ -26005,14 +33039,14 @@ snapshots: optionalDependencies: typescript: 5.3.3 - cosmiconfig@8.3.6(typescript@5.4.5): + cosmiconfig@8.3.6(typescript@5.6.3): dependencies: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: - typescript: 5.4.5 + typescript: 5.6.3 crc-32@1.2.2: {} @@ -26021,13 +33055,13 @@ snapshots: buffer: 5.7.1 optional: true - create-jest@29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)): + create-jest@29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)) + jest-config: 29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -26074,97 +33108,159 @@ snapshots: crypto-js@4.2.0: {} - crypto-random-string@2.0.0: {} + crypto-random-string@4.0.0: + dependencies: + type-fest: 1.4.0 - cspell-dictionary@6.31.3: + cspell-config-lib@8.14.2: dependencies: - '@cspell/cspell-pipe': 6.31.3 - '@cspell/cspell-types': 6.31.3 - cspell-trie-lib: 6.31.3 - fast-equals: 4.0.3 - gensequence: 5.0.2 + '@cspell/cspell-types': 8.14.2 + comment-json: 4.2.5 + yaml: 2.5.1 - cspell-gitignore@6.31.3: + cspell-dictionary@8.14.2: dependencies: - cspell-glob: 6.31.3 - find-up: 5.0.0 + '@cspell/cspell-pipe': 8.14.2 + '@cspell/cspell-types': 8.14.2 + cspell-trie-lib: 8.14.2 + fast-equals: 5.0.1 - cspell-glob@6.31.3: + cspell-gitignore@8.14.2: dependencies: - micromatch: 4.0.5 + '@cspell/url': 8.14.2 + cspell-glob: 8.14.2 + cspell-io: 8.14.2 + find-up-simple: 1.0.0 - cspell-grammar@6.31.3: + cspell-glob@8.14.2: dependencies: - '@cspell/cspell-pipe': 6.31.3 - '@cspell/cspell-types': 6.31.3 + '@cspell/url': 8.14.2 + micromatch: 4.0.8 - cspell-io@6.31.3(encoding@0.1.13): + cspell-grammar@8.14.2: dependencies: - '@cspell/cspell-service-bus': 6.31.3 - node-fetch: 2.7.0(encoding@0.1.13) - transitivePeerDependencies: - - encoding + '@cspell/cspell-pipe': 8.14.2 + '@cspell/cspell-types': 8.14.2 - cspell-lib@6.31.3(encoding@0.1.13): + cspell-io@8.14.2: dependencies: - '@cspell/cspell-bundled-dicts': 6.31.3 - '@cspell/cspell-pipe': 6.31.3 - '@cspell/cspell-types': 6.31.3 - '@cspell/strong-weak-map': 6.31.3 + '@cspell/cspell-service-bus': 8.14.2 + '@cspell/url': 8.14.2 + + cspell-lib@8.14.2: + dependencies: + '@cspell/cspell-bundled-dicts': 8.14.2 + '@cspell/cspell-pipe': 8.14.2 + '@cspell/cspell-resolver': 8.14.2 + '@cspell/cspell-types': 8.14.2 + '@cspell/dynamic-import': 8.14.2 + '@cspell/filetypes': 8.14.2 + '@cspell/strong-weak-map': 8.14.2 + '@cspell/url': 8.14.2 clear-module: 4.1.2 - comment-json: 4.2.3 - configstore: 5.0.1 - cosmiconfig: 8.0.0 - cspell-dictionary: 6.31.3 - cspell-glob: 6.31.3 - cspell-grammar: 6.31.3 - cspell-io: 6.31.3(encoding@0.1.13) - cspell-trie-lib: 6.31.3 - fast-equals: 4.0.3 - find-up: 5.0.0 - gensequence: 5.0.2 + comment-json: 4.2.5 + cspell-config-lib: 8.14.2 + cspell-dictionary: 8.14.2 + cspell-glob: 8.14.2 + cspell-grammar: 8.14.2 + cspell-io: 8.14.2 + cspell-trie-lib: 8.14.2 + env-paths: 3.0.0 + fast-equals: 5.0.1 + gensequence: 7.0.0 import-fresh: 3.3.0 resolve-from: 5.0.0 - resolve-global: 1.0.0 - vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 - transitivePeerDependencies: - - encoding + xdg-basedir: 5.1.0 - cspell-trie-lib@6.31.3: + cspell-trie-lib@8.14.2: dependencies: - '@cspell/cspell-pipe': 6.31.3 - '@cspell/cspell-types': 6.31.3 - gensequence: 5.0.2 + '@cspell/cspell-pipe': 8.14.2 + '@cspell/cspell-types': 8.14.2 + gensequence: 7.0.0 - cspell@6.31.3(encoding@0.1.13): + cspell@8.14.2: dependencies: - '@cspell/cspell-json-reporter': 6.31.3 - '@cspell/cspell-pipe': 6.31.3 - '@cspell/cspell-types': 6.31.3 - '@cspell/dynamic-import': 6.31.3 - chalk: 4.1.2 - commander: 10.0.1 - cspell-gitignore: 6.31.3 - cspell-glob: 6.31.3 - cspell-io: 6.31.3(encoding@0.1.13) - cspell-lib: 6.31.3(encoding@0.1.13) - fast-glob: 3.3.1 + '@cspell/cspell-json-reporter': 8.14.2 + '@cspell/cspell-pipe': 8.14.2 + '@cspell/cspell-types': 8.14.2 + '@cspell/dynamic-import': 8.14.2 + '@cspell/url': 8.14.2 + chalk: 5.3.0 + chalk-template: 1.1.0 + commander: 12.1.0 + cspell-dictionary: 8.14.2 + cspell-gitignore: 8.14.2 + cspell-glob: 8.14.2 + cspell-io: 8.14.2 + cspell-lib: 8.14.2 + fast-glob: 3.3.2 fast-json-stable-stringify: 2.1.0 - file-entry-cache: 6.0.1 - get-stdin: 8.0.0 - imurmurhash: 0.1.4 + file-entry-cache: 9.1.0 + get-stdin: 9.0.0 + semver: 7.6.3 + strip-ansi: 7.1.0 + + css-blank-pseudo@7.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + css-declaration-sorter@7.2.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + + css-has-pseudo@7.0.0(postcss@8.4.47): + dependencies: + '@csstools/selector-specificity': 4.0.0(postcss-selector-parser@6.1.0) + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + postcss-value-parser: 4.2.0 + + css-loader@6.11.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + icss-utils: 5.1.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-modules-extract-imports: 3.1.0(postcss@8.4.47) + postcss-modules-local-by-default: 4.0.5(postcss@8.4.47) + postcss-modules-scope: 3.2.0(postcss@8.4.47) + postcss-modules-values: 4.0.0(postcss@8.4.47) + postcss-value-parser: 4.2.0 semver: 7.5.4 - strip-ansi: 6.0.1 - vscode-uri: 3.0.8 - transitivePeerDependencies: - - encoding + optionalDependencies: + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + + css-minimizer-webpack-plugin@5.0.1(clean-css@5.3.3)(lightningcss@1.25.1)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + cssnano: 6.1.2(postcss@8.4.47) + jest-worker: 29.7.0 + postcss: 8.4.47 + schema-utils: 4.2.0 + serialize-javascript: 6.0.2 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + optionalDependencies: + clean-css: 5.3.3 + lightningcss: 1.25.1 + + css-prefers-color-scheme@10.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 css-render@0.15.14: dependencies: '@emotion/hash': 0.8.0 csstype: 3.0.11 + css-select@4.3.0: + dependencies: + boolbase: 1.0.0 + css-what: 6.1.0 + domhandler: 4.3.1 + domutils: 2.8.0 + nth-check: 2.1.1 + css-select@5.1.0: dependencies: boolbase: 1.0.0 @@ -26176,7 +33272,7 @@ snapshots: css-tree@2.2.1: dependencies: mdn-data: 2.0.28 - source-map-js: 1.2.0 + source-map-js: 1.2.1 css-tree@2.3.1: dependencies: @@ -26187,14 +33283,71 @@ snapshots: css.escape@1.5.1: {} + cssdb@8.1.1: {} + cssesc@3.0.0: {} cssfilter@0.0.10: {} + cssnano-preset-advanced@6.1.2(postcss@8.4.47): + dependencies: + autoprefixer: 10.4.20(postcss@8.4.47) + browserslist: 4.23.1 + cssnano-preset-default: 6.1.2(postcss@8.4.47) + postcss: 8.4.47 + postcss-discard-unused: 6.0.5(postcss@8.4.47) + postcss-merge-idents: 6.0.3(postcss@8.4.47) + postcss-reduce-idents: 6.0.3(postcss@8.4.47) + postcss-zindex: 6.0.2(postcss@8.4.47) + + cssnano-preset-default@6.1.2(postcss@8.4.47): + dependencies: + browserslist: 4.23.1 + css-declaration-sorter: 7.2.0(postcss@8.4.47) + cssnano-utils: 4.0.2(postcss@8.4.47) + postcss: 8.4.47 + postcss-calc: 9.0.1(postcss@8.4.47) + postcss-colormin: 6.1.0(postcss@8.4.47) + postcss-convert-values: 6.1.0(postcss@8.4.47) + postcss-discard-comments: 6.0.2(postcss@8.4.47) + postcss-discard-duplicates: 6.0.3(postcss@8.4.47) + postcss-discard-empty: 6.0.3(postcss@8.4.47) + postcss-discard-overridden: 6.0.2(postcss@8.4.47) + postcss-merge-longhand: 6.0.5(postcss@8.4.47) + postcss-merge-rules: 6.1.1(postcss@8.4.47) + postcss-minify-font-values: 6.1.0(postcss@8.4.47) + postcss-minify-gradients: 6.0.3(postcss@8.4.47) + postcss-minify-params: 6.1.0(postcss@8.4.47) + postcss-minify-selectors: 6.0.4(postcss@8.4.47) + postcss-normalize-charset: 6.0.2(postcss@8.4.47) + postcss-normalize-display-values: 6.0.2(postcss@8.4.47) + postcss-normalize-positions: 6.0.2(postcss@8.4.47) + postcss-normalize-repeat-style: 6.0.2(postcss@8.4.47) + postcss-normalize-string: 6.0.2(postcss@8.4.47) + postcss-normalize-timing-functions: 6.0.2(postcss@8.4.47) + postcss-normalize-unicode: 6.1.0(postcss@8.4.47) + postcss-normalize-url: 6.0.2(postcss@8.4.47) + postcss-normalize-whitespace: 6.0.2(postcss@8.4.47) + postcss-ordered-values: 6.0.2(postcss@8.4.47) + postcss-reduce-initial: 6.1.0(postcss@8.4.47) + postcss-reduce-transforms: 6.0.2(postcss@8.4.47) + postcss-svgo: 6.0.3(postcss@8.4.47) + postcss-unique-selectors: 6.0.4(postcss@8.4.47) + + cssnano-utils@4.0.2(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + cssnano-utils@5.0.0(postcss@8.4.39): dependencies: postcss: 8.4.39 + cssnano@6.1.2(postcss@8.4.47): + dependencies: + cssnano-preset-default: 6.1.2(postcss@8.4.47) + lilconfig: 3.1.2 + postcss: 8.4.47 + csso@5.0.5: dependencies: css-tree: 2.2.1 @@ -26342,6 +33495,8 @@ snapshots: de-indent@1.0.2: {} + debounce@1.2.1: {} + debug@2.6.9: dependencies: ms: 2.0.0 @@ -26349,15 +33504,12 @@ snapshots: debug@3.2.7: dependencies: ms: 2.1.3 + optional: true debug@4.3.4: dependencies: ms: 2.1.2 - debug@4.3.5: - dependencies: - ms: 2.1.2 - debug@4.3.6: dependencies: ms: 2.1.2 @@ -26425,17 +33577,16 @@ snapshots: deepmerge@4.3.1: {} - default-browser-id@3.0.0: + default-browser-id@5.0.0: {} + + default-browser@5.2.1: dependencies: - bplist-parser: 0.2.0 - untildify: 4.0.0 + bundle-name: 4.1.0 + default-browser-id: 5.0.0 - default-browser@4.0.0: + default-gateway@6.0.3: dependencies: - bundle-name: 3.0.0 - default-browser-id: 3.0.0 - execa: 7.2.0 - titleize: 3.0.0 + execa: 5.1.1 defaults@1.0.4: dependencies: @@ -26449,6 +33600,8 @@ snapshots: es-errors: 1.3.0 gopd: 1.0.1 + define-lazy-prop@2.0.0: {} + define-lazy-prop@3.0.0: {} define-properties@1.2.1: @@ -26474,6 +33627,17 @@ snapshots: defu@6.1.4: {} + del@6.1.1: + dependencies: + globby: 11.1.0 + graceful-fs: 4.2.11 + is-glob: 4.0.3 + is-path-cwd: 2.2.0 + is-path-inside: 3.0.3 + p-map: 4.0.0 + rimraf: 3.0.2 + slash: 3.0.0 + delayed-stream@1.0.0: {} delegate@3.2.0: {} @@ -26486,6 +33650,8 @@ snapshots: depd@2.0.0: {} + deprecation@2.3.1: {} + dequal@2.0.3: {} destr@2.0.3: {} @@ -26494,6 +33660,10 @@ snapshots: detect-browser@5.3.0: {} + detect-gpu@5.0.51: + dependencies: + webgl-constants: 1.1.1 + detect-indent@6.1.0: {} detect-libc@1.0.3: {} @@ -26504,8 +33674,25 @@ snapshots: detect-node-es@1.1.0: {} - detect-node@2.1.0: - optional: true + detect-node@2.1.0: {} + + detect-port-alt@1.1.6: + dependencies: + address: 1.2.2 + debug: 2.6.9 + transitivePeerDependencies: + - supports-color + + detect-port@1.6.1: + dependencies: + address: 1.2.2 + debug: 4.3.6 + transitivePeerDependencies: + - supports-color + + devlop@1.1.0: + dependencies: + dequal: 2.0.3 dezalgo@1.0.4: dependencies: @@ -26566,14 +33753,40 @@ snapshots: verror: 1.10.1 optional: true + dns-packet@5.6.1: + dependencies: + '@leichtgewicht/ip-codec': 2.0.5 + doctrine@3.0.0: dependencies: esutils: 2.0.3 + docusaurus-plugin-sass@0.2.5(@docusaurus/core@3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))))(sass@1.74.1)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + '@docusaurus/core': 3.5.2(@docusaurus/types@3.5.2(@swc/core@1.7.26(@swc/helpers@0.5.3))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@mdx-js/react@3.0.1(@types/react@18.2.35)(react@18.2.0))(@swc/core@1.7.26(@swc/helpers@0.5.3))(bufferutil@4.0.8)(eslint@8.57.0)(lightningcss@1.25.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3))) + sass: 1.74.1 + sass-loader: 10.5.2(sass@1.74.1)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + transitivePeerDependencies: + - fibers + - node-sass + - webpack + + docusaurus-preset-shiki-twoslash@1.1.41: + dependencies: + copy-text-to-clipboard: 3.2.0 + remark-shiki-twoslash: 3.1.3(typescript@5.5.4) + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + dom-accessibility-api@0.6.3: {} dom-align@1.12.4: {} + dom-converter@0.2.0: + dependencies: + utila: 0.4.0 + dom-helpers@5.2.1: dependencies: '@babel/runtime': 7.25.0 @@ -26586,6 +33799,12 @@ snapshots: domelementtype: 2.3.0 entities: 2.2.0 + dom-serializer@1.4.1: + dependencies: + domelementtype: 2.3.0 + domhandler: 4.3.1 + entities: 2.2.0 + dom-serializer@2.0.0: dependencies: domelementtype: 2.3.0 @@ -26600,6 +33819,10 @@ snapshots: dependencies: domelementtype: 1.3.1 + domhandler@4.3.1: + dependencies: + domelementtype: 2.3.0 + domhandler@5.0.3: dependencies: domelementtype: 2.3.0 @@ -26611,6 +33834,12 @@ snapshots: dom-serializer: 0.2.2 domelementtype: 1.3.1 + domutils@2.8.0: + dependencies: + dom-serializer: 1.4.1 + domelementtype: 2.3.0 + domhandler: 4.3.1 + domutils@3.1.0: dependencies: dom-serializer: 2.0.0 @@ -26626,12 +33855,18 @@ snapshots: dependencies: is-obj: 2.0.0 + dot-prop@6.0.1: + dependencies: + is-obj: 2.0.0 + dotenv-expand@11.0.6: dependencies: dotenv: 16.4.5 dotenv-expand@5.1.0: {} + dotenv-expand@8.0.3: {} + dotenv@16.4.5: {} dotenv@9.0.2: {} @@ -26640,6 +33875,8 @@ snapshots: dependencies: minimatch: 3.1.2 + draco3d@1.5.7: {} + duplexer2@0.1.4: dependencies: readable-stream: 2.3.8 @@ -26695,7 +33932,7 @@ snapshots: glob: 7.2.3 lodash: 4.17.21 parse-author: 2.0.0 - semver: 7.5.4 + semver: 7.6.3 tmp-promise: 3.0.3 optionalDependencies: '@types/fs-extra': 9.0.13 @@ -26706,7 +33943,7 @@ snapshots: electron-installer-debian@3.2.0: dependencies: '@malept/cross-spawn-promise': 1.1.1 - debug: 4.3.4 + debug: 4.3.6 electron-installer-common: 0.10.3 fs-extra: 9.1.0 get-folder-size: 2.0.1 @@ -26720,7 +33957,7 @@ snapshots: electron-installer-redhat@3.4.0: dependencies: '@malept/cross-spawn-promise': 1.1.1 - debug: 4.3.4 + debug: 4.3.6 electron-installer-common: 0.10.3 fs-extra: 9.1.0 lodash: 4.17.21 @@ -26738,20 +33975,20 @@ snapshots: chalk: 4.1.2 fs-extra: 10.1.0 lazy-val: 1.0.5 - mime: 2.5.2 + mime: 2.6.0 transitivePeerDependencies: - supports-color - electron-to-chromium@1.4.576: {} - electron-to-chromium@1.4.721: {} electron-to-chromium@1.4.832: {} + electron-to-chromium@1.5.33: {} + electron-winstaller@5.3.1: dependencies: '@electron/asar': 3.2.10 - debug: 4.3.4 + debug: 4.3.6 fs-extra: 7.0.1 lodash: 4.17.21 temp: 0.9.4 @@ -26769,15 +34006,15 @@ snapshots: transitivePeerDependencies: - supports-color - element-plus@2.4.2(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)): + element-plus@2.4.2(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)): dependencies: '@ctrl/tinycolor': 3.6.1 - '@element-plus/icons-vue': 2.1.0(vue@3.3.7(typescript@5.4.5)) + '@element-plus/icons-vue': 2.1.0(vue@3.3.7(typescript@5.6.3)) '@floating-ui/dom': 1.5.3 '@popperjs/core': '@sxzz/popperjs-es@2.11.7' '@types/lodash': 4.14.202 '@types/lodash-es': 4.17.12 - '@vueuse/core': 9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)) + '@vueuse/core': 9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)) async-validator: 4.2.5 dayjs: 1.11.10 escape-html: 1.0.3 @@ -26786,7 +34023,7 @@ snapshots: lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21) memoize-one: 6.0.0 normalize-wheel-es: 1.2.0 - vue: 3.3.7(typescript@5.4.5) + vue: 3.3.7(typescript@5.6.3) transitivePeerDependencies: - '@vue/composition-api' @@ -26798,8 +34035,12 @@ snapshots: emoji-regex@9.2.2: {} + emojilib@2.4.0: {} + emojis-list@3.0.0: {} + emoticon@4.1.0: {} + encode-utf8@1.0.3: {} encodeurl@1.0.2: {} @@ -26830,6 +34071,8 @@ snapshots: env-paths@2.2.1: {} + env-paths@3.0.0: {} + envinfo@7.11.1: {} err-code@2.0.3: {} @@ -26843,6 +34086,8 @@ snapshots: dependencies: is-arrayish: 0.2.1 + error-stack-parser-es@0.1.5: {} + es-abstract@1.22.3: dependencies: array-buffer-byte-length: 1.0.0 @@ -26983,6 +34228,8 @@ snapshots: escalade@3.1.2: {} + escape-goat@4.0.0: {} + escape-html@1.0.3: {} escape-string-regexp@1.0.5: {} @@ -27086,6 +34333,34 @@ snapshots: estraverse@5.3.0: {} + estree-util-attach-comments@3.0.0: + dependencies: + '@types/estree': 1.0.5 + + estree-util-build-jsx@3.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + estree-walker: 3.0.3 + + estree-util-is-identifier-name@3.0.0: {} + + estree-util-to-js@2.0.0: + dependencies: + '@types/estree-jsx': 1.0.5 + astring: 1.9.0 + source-map: 0.7.4 + + estree-util-value-to-estree@3.1.2: + dependencies: + '@types/estree': 1.0.5 + + estree-util-visit@2.0.0: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/unist': 3.0.2 + estree-walker@2.0.2: {} estree-walker@3.0.3: @@ -27094,11 +34369,13 @@ snapshots: esutils@2.0.3: {} + eta@2.2.0: {} + etag@1.8.1: {} eval@0.1.8: dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 require-like: 0.1.2 eventemitter3@4.0.7: {} @@ -27138,11 +34415,23 @@ snapshots: human-signals: 4.3.1 is-stream: 3.0.0 merge-stream: 2.0.0 - npm-run-path: 5.1.0 + npm-run-path: 5.3.0 onetime: 6.0.0 signal-exit: 3.0.7 strip-final-newline: 3.0.0 + execa@8.0.0: + 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.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + execa@8.0.1: dependencies: cross-spawn: 7.0.3 @@ -27150,7 +34439,7 @@ snapshots: human-signals: 5.0.0 is-stream: 3.0.0 merge-stream: 2.0.0 - npm-run-path: 5.1.0 + npm-run-path: 5.3.0 onetime: 6.0.0 signal-exit: 4.1.0 strip-final-newline: 3.0.0 @@ -27171,6 +34460,8 @@ snapshots: transitivePeerDependencies: - supports-color + expand-template@2.0.3: {} + expand-tilde@2.0.2: dependencies: homedir-polyfill: 1.0.3 @@ -27302,7 +34593,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.3.6 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -27313,14 +34604,14 @@ snapshots: extsprintf@1.4.1: optional: true - farm-browserslist-generator@1.0.0: + farm-browserslist-generator@1.0.5: dependencies: '@mdn/browser-compat-data': 5.5.7 '@types/object-path': 0.11.4 '@types/semver': 7.5.4 '@types/ua-parser-js': 0.7.39 - browserslist: 4.23.0 - caniuse-lite: 1.0.30001633 + browserslist: 4.23.1 + caniuse-lite: 1.0.30001667 isbot: 3.8.0 object-path: 0.11.8 semver: 7.5.4 @@ -27369,58 +34660,18 @@ snapshots: farm-plugin-remove-console-win32-ia32-msvc: 0.1.8 farm-plugin-remove-console-win32-x64-msvc: 0.1.8 - farm-plugin-replace-dirname-darwin-arm64@0.2.1: - optional: true - - farm-plugin-replace-dirname-darwin-x64@0.2.1: - optional: true - - farm-plugin-replace-dirname-linux-arm64-gnu@0.2.1: - optional: true - - farm-plugin-replace-dirname-linux-arm64-musl@0.2.1: - optional: true - - farm-plugin-replace-dirname-linux-x64-gnu@0.2.1: - optional: true - - farm-plugin-replace-dirname-linux-x64-musl@0.2.1: - optional: true - - farm-plugin-replace-dirname-win32-arm64-msvc@0.2.1: - optional: true - - farm-plugin-replace-dirname-win32-ia32-msvc@0.2.1: - optional: true - - farm-plugin-replace-dirname-win32-x64-msvc@0.2.1: - optional: true - - farm-plugin-replace-dirname@0.2.1: - dependencies: - '@changesets/cli': 2.27.2 - '@farmfe/utils': 0.0.1 - cac: 6.7.14 - optionalDependencies: - farm-plugin-replace-dirname-darwin-arm64: 0.2.1 - farm-plugin-replace-dirname-darwin-x64: 0.2.1 - farm-plugin-replace-dirname-linux-arm64-gnu: 0.2.1 - farm-plugin-replace-dirname-linux-arm64-musl: 0.2.1 - farm-plugin-replace-dirname-linux-x64-gnu: 0.2.1 - farm-plugin-replace-dirname-linux-x64-musl: 0.2.1 - farm-plugin-replace-dirname-win32-arm64-msvc: 0.2.1 - farm-plugin-replace-dirname-win32-ia32-msvc: 0.2.1 - farm-plugin-replace-dirname-win32-x64-msvc: 0.2.1 - - farmup@0.1.0: + farmup@0.1.4: dependencies: '@farmfe/core': link:packages/core + tmp: 0.2.3 fast-deep-equal@3.1.3: {} fast-diff@1.3.0: {} - fast-equals@4.0.3: {} + fast-equals@5.0.1: {} + + fast-fifo@1.3.2: {} fast-glob@3.3.1: dependencies: @@ -27452,6 +34703,14 @@ snapshots: dependencies: reusify: 1.0.4 + fault@2.0.1: + dependencies: + format: 0.2.2 + + faye-websocket@0.11.4: + dependencies: + websocket-driver: 0.7.4 + fb-watchman@2.0.2: dependencies: bser: 2.1.1 @@ -27466,8 +34725,18 @@ snapshots: fecha@4.2.3: {} + feed@4.2.2: + dependencies: + xml-js: 1.6.11 + + fenceparser@1.1.1: {} + fflate@0.3.11: {} + fflate@0.6.10: {} + + fflate@0.8.2: {} + figures@2.0.0: dependencies: escape-string-regexp: 1.0.5 @@ -27476,15 +34745,24 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - figures@5.0.0: - dependencies: - escape-string-regexp: 5.0.0 - is-unicode-supported: 1.3.0 - file-entry-cache@6.0.1: dependencies: flat-cache: 3.1.1 + file-entry-cache@9.1.0: + dependencies: + flat-cache: 5.0.0 + + file-loader@6.2.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + loader-utils: 2.0.4 + schema-utils: 3.3.0 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + + file-selector@0.5.0: + dependencies: + tslib: 2.6.3 + file-size@1.0.0: {} filelist@1.0.4: @@ -27501,6 +34779,8 @@ snapshots: filesize@10.1.2: {} + filesize@8.0.7: {} + fill-range@4.0.0: dependencies: extend-shallow: 2.0.1 @@ -27512,8 +34792,24 @@ snapshots: dependencies: to-regex-range: 5.0.1 + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + filter-obj@1.1.0: {} + finalhandler@1.1.2: + dependencies: + debug: 2.6.9 + encodeurl: 1.0.2 + escape-html: 1.0.3 + on-finished: 2.3.0 + parseurl: 1.3.3 + statuses: 1.5.0 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + finalhandler@1.2.0: dependencies: debug: 2.6.9 @@ -27526,12 +34822,23 @@ snapshots: transitivePeerDependencies: - supports-color + find-cache-dir@4.0.0: + dependencies: + common-path-prefix: 3.0.0 + pkg-dir: 7.0.0 + find-root@1.1.0: {} + find-up-simple@1.0.0: {} + find-up@2.1.0: dependencies: locate-path: 2.0.0 + find-up@3.0.0: + dependencies: + locate-path: 3.0.0 + find-up@4.1.0: dependencies: locate-path: 5.0.0 @@ -27549,7 +34856,7 @@ snapshots: find-yarn-workspace-root2@1.2.16: dependencies: - micromatch: 4.0.5 + micromatch: 4.0.8 pkg-dir: 4.2.0 flat-cache@3.1.1: @@ -27558,8 +34865,17 @@ snapshots: keyv: 4.5.4 rimraf: 3.0.2 + flat-cache@5.0.0: + dependencies: + flatted: 3.3.1 + keyv: 4.5.4 + + flat@5.0.2: {} + flatted@3.2.9: {} + flatted@3.3.1: {} + flora-colossus@2.0.0: dependencies: debug: 4.3.6 @@ -27585,11 +34901,11 @@ snapshots: follow-redirects@1.15.3: {} - follow-redirects@1.15.4(debug@4.3.4): - optionalDependencies: - debug: 4.3.4 + follow-redirects@1.15.4: {} - follow-redirects@1.15.6: {} + follow-redirects@1.15.6(debug@4.3.6): + optionalDependencies: + debug: 4.3.6 for-each@0.3.3: dependencies: @@ -27602,7 +34918,28 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@9.0.2(typescript@5.3.3)(webpack@5.92.1): + fork-ts-checker-webpack-plugin@6.5.3(eslint@8.57.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + '@babel/code-frame': 7.24.7 + '@types/json-schema': 7.0.15 + chalk: 4.1.2 + chokidar: 3.6.0 + cosmiconfig: 6.0.0 + deepmerge: 4.3.1 + fs-extra: 9.1.0 + glob: 7.2.3 + memfs: 3.5.3 + minimatch: 3.1.2 + schema-utils: 2.7.0 + semver: 7.6.3 + tapable: 1.1.3 + typescript: 5.6.3 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + optionalDependencies: + eslint: 8.57.0 + vue-template-compiler: 2.7.16(vue@3.4.35(typescript@5.6.3)) + + fork-ts-checker-webpack-plugin@9.0.2(typescript@5.3.3)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): dependencies: '@babel/code-frame': 7.24.2 chalk: 4.1.2 @@ -27617,7 +34954,9 @@ snapshots: semver: 7.5.4 tapable: 2.2.1 typescript: 5.3.3 - webpack: 5.92.1 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + + form-data-encoder@2.1.4: {} form-data@4.0.0: dependencies: @@ -27625,6 +34964,8 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 + format@0.2.2: {} + formidable@2.1.2: dependencies: dezalgo: 1.0.4 @@ -27642,8 +34983,18 @@ snapshots: dependencies: map-cache: 0.2.2 + framer-motion@11.11.1(@emotion/is-prop-valid@1.3.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + dependencies: + tslib: 2.6.3 + optionalDependencies: + '@emotion/is-prop-valid': 1.3.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + fresh@0.5.2: {} + fs-constants@1.0.0: {} + fs-extra@10.1.0: dependencies: graceful-fs: 4.2.11 @@ -27725,7 +35076,7 @@ snapshots: strip-ansi: 6.0.1 wide-align: 1.1.5 - gensequence@5.0.2: {} + gensequence@7.0.0: {} gensync@1.0.0-beta.2: {} @@ -27763,6 +35114,8 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.0 + get-own-enumerable-property-symbols@3.0.2: {} + get-package-info@1.0.0: dependencies: bluebird: 3.7.2 @@ -27774,7 +35127,7 @@ snapshots: get-package-type@0.1.0: {} - get-stdin@8.0.0: {} + get-stdin@9.0.0: {} get-stream@4.1.0: dependencies: @@ -27807,6 +35160,10 @@ snapshots: split2: 3.2.2 through2: 4.0.2 + github-from-package@0.0.0: {} + + github-slugger@1.5.0: {} + gl-matrix@3.4.3: {} glob-parent@5.1.2: @@ -27824,7 +35181,7 @@ snapshots: foreground-child: 3.1.1 jackspeak: 3.1.2 minimatch: 9.0.5 - minipass: 7.1.1 + minipass: 7.1.2 path-scurry: 1.11.1 glob@10.4.2: @@ -27836,6 +35193,15 @@ snapshots: package-json-from-dist: 1.0.0 path-scurry: 1.11.1 + glob@11.0.0: + dependencies: + foreground-child: 3.1.1 + jackspeak: 4.0.2 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.0 + path-scurry: 2.0.0 + glob@7.1.6: dependencies: fs.realpath: 1.0.0 @@ -27868,20 +35234,32 @@ snapshots: es6-error: 4.1.1 matcher: 3.0.0 roarr: 2.15.4 - semver: 7.5.4 + semver: 7.6.3 serialize-error: 7.0.1 optional: true + global-directory@4.0.1: + dependencies: + ini: 4.1.1 + global-dirs@0.1.1: dependencies: ini: 1.3.8 + global-dirs@3.0.1: + dependencies: + ini: 2.0.0 + global-modules@1.0.0: dependencies: global-prefix: 1.0.2 is-windows: 1.0.2 resolve-dir: 1.0.1 + global-modules@2.0.0: + dependencies: + global-prefix: 3.0.0 + global-prefix@1.0.2: dependencies: expand-tilde: 2.0.2 @@ -27890,6 +35268,12 @@ snapshots: is-windows: 1.0.2 which: 1.3.1 + global-prefix@3.0.0: + dependencies: + ini: 1.3.8 + kind-of: 6.0.3 + which: 1.3.1 + globals@11.12.0: {} globals@13.24.0: @@ -27909,8 +35293,18 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 + globby@13.2.2: + dependencies: + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.2.4 + merge2: 1.4.1 + slash: 4.0.0 + globrex@0.1.2: {} + glsl-noise@0.0.0: {} + good-listener@1.2.2: dependencies: delegate: 3.2.0 @@ -27933,6 +35327,22 @@ snapshots: p-cancelable: 2.1.1 responselike: 2.0.1 + got@12.6.1: + dependencies: + '@sindresorhus/is': 5.6.0 + '@szmarczak/http-timer': 5.0.1 + cacheable-lookup: 7.0.0 + cacheable-request: 10.2.14 + decompress-response: 6.0.0 + form-data-encoder: 2.1.4 + get-stream: 6.0.1 + http2-wrapper: 2.2.1 + lowercase-keys: 3.0.0 + p-cancelable: 3.0.0 + responselike: 3.0.0 + + graceful-fs@4.2.10: {} + graceful-fs@4.2.11: {} gradient-string@2.0.2: @@ -27948,10 +35358,19 @@ snapshots: dependencies: lodash: 4.17.21 + gray-matter@4.0.3: + dependencies: + js-yaml: 3.14.1 + kind-of: 6.0.3 + section-matter: 1.0.0 + strip-bom-string: 1.0.0 + gzip-size@6.0.0: dependencies: duplexer: 0.1.2 + handle-thing@2.0.1: {} + hard-rejection@2.1.0: {} has-ansi@2.0.0: @@ -28001,6 +35420,8 @@ snapshots: is-number: 3.0.0 kind-of: 4.0.0 + has-yarn@3.0.0: {} + has@1.0.4: {} hash-sum@1.0.2: {} @@ -28041,6 +35462,17 @@ snapshots: vfile-location: 4.1.0 web-namespaces: 2.0.1 + hast-util-from-parse5@8.0.1: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.2 + devlop: 1.1.0 + hastscript: 8.0.0 + property-information: 6.5.0 + vfile: 6.0.3 + vfile-location: 5.0.3 + web-namespaces: 2.0.1 + hast-util-is-element@2.1.3: dependencies: '@types/hast': 2.3.10 @@ -28050,6 +35482,91 @@ snapshots: dependencies: '@types/hast': 2.3.10 + hast-util-parse-selector@4.0.0: + dependencies: + '@types/hast': 3.0.4 + + hast-util-raw@9.0.4: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.2 + '@ungap/structured-clone': 1.2.0 + hast-util-from-parse5: 8.0.1 + hast-util-to-parse5: 8.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.0 + parse5: 7.1.2 + unist-util-position: 5.0.0 + unist-util-visit: 5.0.0 + vfile: 6.0.3 + web-namespaces: 2.0.1 + zwitch: 2.0.4 + + hast-util-to-estree@3.1.0: + dependencies: + '@types/estree': 1.0.5 + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + estree-util-attach-comments: 3.0.0 + estree-util-is-identifier-name: 3.0.0 + hast-util-whitespace: 3.0.0 + mdast-util-mdx-expression: 2.0.1 + mdast-util-mdx-jsx: 3.1.3 + mdast-util-mdxjs-esm: 2.0.1 + property-information: 6.5.0 + space-separated-tokens: 2.0.2 + style-to-object: 0.4.4 + unist-util-position: 5.0.0 + zwitch: 2.0.4 + transitivePeerDependencies: + - supports-color + + hast-util-to-html@9.0.3: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.2 + ccount: 2.0.1 + comma-separated-tokens: 2.0.3 + hast-util-whitespace: 3.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.0 + property-information: 6.5.0 + space-separated-tokens: 2.0.2 + stringify-entities: 4.0.4 + zwitch: 2.0.4 + + hast-util-to-jsx-runtime@2.3.0: + dependencies: + '@types/estree': 1.0.5 + '@types/hast': 3.0.4 + '@types/unist': 3.0.2 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + hast-util-whitespace: 3.0.0 + mdast-util-mdx-expression: 2.0.1 + mdast-util-mdx-jsx: 3.1.3 + mdast-util-mdxjs-esm: 2.0.1 + property-information: 6.5.0 + space-separated-tokens: 2.0.2 + style-to-object: 1.0.8 + unist-util-position: 5.0.0 + vfile-message: 4.0.2 + transitivePeerDependencies: + - supports-color + + hast-util-to-parse5@8.0.0: + dependencies: + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + property-information: 6.5.0 + space-separated-tokens: 2.0.2 + web-namespaces: 2.0.1 + zwitch: 2.0.4 + hast-util-to-text@3.1.2: dependencies: '@types/hast': 2.3.10 @@ -28059,6 +35576,10 @@ snapshots: hast-util-whitespace@2.0.1: {} + hast-util-whitespace@3.0.0: + dependencies: + '@types/hast': 3.0.4 + hastscript@7.2.0: dependencies: '@types/hast': 2.3.10 @@ -28067,6 +35588,14 @@ snapshots: property-information: 6.5.0 space-separated-tokens: 2.0.2 + hastscript@8.0.0: + dependencies: + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + hast-util-parse-selector: 4.0.0 + property-information: 6.5.0 + space-separated-tokens: 2.0.2 + he@1.2.0: {} hexoid@1.0.0: {} @@ -28086,6 +35615,8 @@ snapshots: tiny-warning: 1.0.3 value-equal: 1.0.1 + hls.js@1.3.5: {} + hoist-non-react-statics@3.3.2: dependencies: react-is: 16.13.1 @@ -28102,10 +35633,37 @@ snapshots: dependencies: lru-cache: 6.0.0 + hpack.js@2.1.6: + dependencies: + inherits: 2.0.4 + obuf: 1.1.2 + readable-stream: 2.3.8 + wbuf: 1.7.3 + html-entities@2.3.3: {} html-escaper@2.0.2: {} + html-minifier-terser@6.1.0: + dependencies: + camel-case: 4.1.2 + clean-css: 5.3.3 + commander: 8.3.0 + he: 1.2.0 + param-case: 3.0.4 + relateurl: 0.2.7 + terser: 5.31.1 + + html-minifier-terser@7.2.0: + dependencies: + camel-case: 4.1.2 + clean-css: 5.3.3 + commander: 10.0.1 + entities: 4.5.0 + param-case: 3.0.4 + relateurl: 0.2.7 + terser: 5.31.1 + html-tags@2.0.0: {} html-tags@3.3.1: {} @@ -28118,6 +35676,18 @@ snapshots: readable-stream: 1.0.34 through2: 0.4.2 + html-void-elements@3.0.0: {} + + html-webpack-plugin@5.6.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + '@types/html-minifier-terser': 6.1.0 + html-minifier-terser: 6.1.0 + lodash: 4.17.21 + pretty-error: 4.0.0 + tapable: 2.2.1 + optionalDependencies: + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + htmlparser2@3.10.1: dependencies: domelementtype: 1.3.1 @@ -28127,6 +35697,20 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 + htmlparser2@6.1.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 4.3.1 + domutils: 2.8.0 + entities: 2.2.0 + + htmlparser2@8.0.2: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.1.0 + entities: 4.5.0 + http-assert@1.5.0: dependencies: deep-equal: 1.0.1 @@ -28134,6 +35718,8 @@ snapshots: http-cache-semantics@4.1.1: {} + http-deceiver@1.2.7: {} + http-errors@1.6.3: dependencies: depd: 1.1.2 @@ -28157,6 +35743,8 @@ snapshots: statuses: 2.0.1 toidentifier: 1.0.1 + http-parser-js@0.5.8: {} + http-proxy-agent@5.0.0: dependencies: '@tootallnate/once': 2.0.0 @@ -28165,21 +35753,22 @@ snapshots: transitivePeerDependencies: - supports-color - http-proxy-middleware@3.0.0: + http-proxy-middleware@2.0.7(@types/express@4.17.21): dependencies: '@types/http-proxy': 1.17.14 - debug: 4.3.4 - http-proxy: 1.18.1(debug@4.3.4) + http-proxy: 1.18.1(debug@4.3.6) is-glob: 4.0.3 is-plain-obj: 3.0.0 - micromatch: 4.0.5 + micromatch: 4.0.8 + optionalDependencies: + '@types/express': 4.17.21 transitivePeerDependencies: - - supports-color + - debug - http-proxy@1.18.1(debug@4.3.4): + http-proxy@1.18.1(debug@4.3.6): dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.15.4(debug@4.3.4) + follow-redirects: 1.15.6(debug@4.3.6) requires-port: 1.0.0 transitivePeerDependencies: - debug @@ -28189,6 +35778,11 @@ snapshots: quick-lru: 5.1.1 resolve-alpn: 1.2.1 + http2-wrapper@2.2.1: + dependencies: + quick-lru: 5.1.1 + resolve-alpn: 1.2.1 + https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 @@ -28224,12 +35818,20 @@ snapshots: dependencies: safer-buffer: 2.1.2 + icss-utils@5.1.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + ieee754@1.2.1: {} ignore@5.2.4: {} image-size@0.5.5: {} + image-size@1.1.1: + dependencies: + queue: 6.0.2 + immediate@3.0.6: {} immer@10.0.3: {} @@ -28243,12 +35845,14 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 + import-lazy@4.0.0: {} + import-local@3.1.0: dependencies: pkg-dir: 4.2.0 resolve-cwd: 3.0.0 - import-meta-resolve@2.2.2: {} + import-meta-resolve@4.1.0: {} importx@0.4.3: dependencies: @@ -28269,6 +35873,8 @@ snapshots: infer-owner@1.0.4: {} + infima@0.2.0-alpha.44: {} + inflight@1.0.6: dependencies: once: 1.4.0 @@ -28280,8 +35886,14 @@ snapshots: ini@1.3.8: {} + ini@2.0.0: {} + + ini@4.1.1: {} + inline-style-parser@0.1.1: {} + inline-style-parser@0.2.4: {} + inquirer@3.0.6: dependencies: ansi-escapes: 1.4.0 @@ -28316,24 +35928,6 @@ snapshots: through: 2.3.8 wrap-ansi: 6.2.0 - inquirer@9.2.12: - dependencies: - '@ljharb/through': 2.3.13 - ansi-escapes: 4.3.2 - chalk: 5.3.0 - cli-cursor: 3.1.0 - cli-width: 4.1.0 - external-editor: 3.1.0 - figures: 5.0.0 - lodash: 4.17.21 - mute-stream: 1.0.0 - ora: 5.4.1 - run-async: 3.0.0 - rxjs: 7.8.1 - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 6.2.0 - inquirer@9.2.15: dependencies: '@ljharb/through': 2.3.13 @@ -28364,10 +35958,16 @@ snapshots: internmap@1.0.1: {} + interpret@1.4.0: {} + interpret@3.1.1: {} intersection-observer@0.12.2: {} + invariant@2.2.4: + dependencies: + loose-envify: 1.4.0 + ip-address@9.0.5: dependencies: jsbn: 1.1.0 @@ -28375,10 +35975,19 @@ snapshots: ipaddr.js@1.9.1: {} + ipaddr.js@2.2.0: {} + is-accessor-descriptor@1.0.1: dependencies: hasown: 2.0.0 + is-alphabetical@2.0.1: {} + + is-alphanumerical@2.0.1: + dependencies: + is-alphabetical: 2.0.1 + is-decimal: 2.0.1 + is-arguments@1.1.1: dependencies: call-bind: 1.0.7 @@ -28429,6 +36038,8 @@ snapshots: dependencies: has-tostringtag: 1.0.0 + is-decimal@2.0.1: {} + is-descriptor@0.1.7: dependencies: is-accessor-descriptor: 1.0.1 @@ -28467,10 +36078,17 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-hexadecimal@2.0.1: {} + is-inside-container@1.0.0: dependencies: is-docker: 3.0.0 + is-installed-globally@0.4.0: + dependencies: + global-dirs: 3.0.1 + is-path-inside: 3.0.3 + is-interactive@1.0.0: {} is-lambda@1.0.1: {} @@ -28479,6 +36097,8 @@ snapshots: is-negative-zero@2.0.2: {} + is-npm@6.0.0: {} + is-number-object@1.0.7: dependencies: has-tostringtag: 1.0.0 @@ -28489,8 +36109,12 @@ snapshots: is-number@7.0.0: {} + is-obj@1.0.1: {} + is-obj@2.0.0: {} + is-path-cwd@2.2.0: {} + is-path-inside@3.0.3: {} is-plain-obj@1.1.0: {} @@ -28509,6 +36133,8 @@ snapshots: is-port-reachable@4.0.0: {} + is-promise@2.2.2: {} + is-reference@3.0.2: dependencies: '@types/estree': 1.0.5 @@ -28518,6 +36144,10 @@ snapshots: call-bind: 1.0.7 has-tostringtag: 1.0.0 + is-regexp@1.0.0: {} + + is-root@2.1.0: {} + is-set@2.0.3: {} is-shared-array-buffer@1.0.2: @@ -28554,8 +36184,6 @@ snapshots: is-unicode-supported@0.1.0: {} - is-unicode-supported@1.3.0: {} - is-weakmap@2.0.2: {} is-weakref@1.0.2: @@ -28577,6 +36205,12 @@ snapshots: dependencies: is-docker: 2.2.1 + is-wsl@3.1.0: + dependencies: + is-inside-container: 1.0.0 + + is-yarn-global@0.4.1: {} + isarray@0.0.1: {} isarray@1.0.0: {} @@ -28605,8 +36239,8 @@ snapshots: istanbul-lib-instrument@5.2.1: dependencies: - '@babel/core': 7.24.3 - '@babel/parser': 7.25.3 + '@babel/core': 7.25.2 + '@babel/parser': 7.25.7 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 semver: 6.3.1 @@ -28615,11 +36249,11 @@ snapshots: istanbul-lib-instrument@6.0.3: dependencies: - '@babel/core': 7.24.3 - '@babel/parser': 7.25.3 + '@babel/core': 7.25.2 + '@babel/parser': 7.25.7 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 - semver: 7.5.4 + semver: 7.6.3 transitivePeerDependencies: - supports-color @@ -28640,7 +36274,7 @@ snapshots: istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.25 - debug: 4.3.5 + debug: 4.3.6 istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -28657,12 +36291,21 @@ snapshots: iterare@1.2.1: {} + its-fine@1.2.5(react@18.2.0): + dependencies: + '@types/react-reconciler': 0.28.8 + react: 18.2.0 + jackspeak@3.1.2: dependencies: '@isaacs/cliui': 8.0.2 optionalDependencies: '@pkgjs/parseargs': 0.11.0 + jackspeak@4.0.2: + dependencies: + '@isaacs/cliui': 8.0.2 + jake@10.9.1: dependencies: async: 3.2.5 @@ -28684,7 +36327,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.18.8 + '@types/node': 20.14.12 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3(babel-plugin-macros@3.1.0) @@ -28704,16 +36347,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)): + jest-cli@29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)) + create-jest: 29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)) + jest-config: 29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -28723,12 +36366,12 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@18.18.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)): + jest-config@29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)): dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.25.2 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.24.3) + babel-jest: 29.7.0(@babel/core@7.25.2) chalk: 4.1.2 ci-info: 3.9.0 deepmerge: 4.3.1 @@ -28742,24 +36385,24 @@ snapshots: jest-runner: 29.7.0 jest-util: 29.7.0 jest-validate: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 parse-json: 5.2.0 pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 18.18.8 - ts-node: 10.9.1(@types/node@20.12.12)(typescript@5.4.5) + '@types/node': 20.12.12 + ts-node: 10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5) transitivePeerDependencies: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)): + jest-config@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)): dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.25.2 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.24.3) + babel-jest: 29.7.0(@babel/core@7.25.2) chalk: 4.1.2 ci-info: 3.9.0 deepmerge: 4.3.1 @@ -28773,14 +36416,14 @@ snapshots: jest-runner: 29.7.0 jest-util: 29.7.0 jest-validate: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 parse-json: 5.2.0 pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 20.12.12 - ts-node: 10.9.1(@types/node@20.12.12)(typescript@5.4.5) + '@types/node': 20.14.12 + ts-node: 10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -28809,7 +36452,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.18.8 + '@types/node': 20.14.12 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -28819,14 +36462,14 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 18.18.8 + '@types/node': 20.14.12 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 jest-regex-util: 29.6.3 jest-util: 29.7.0 jest-worker: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 walker: 1.0.8 optionalDependencies: fsevents: 2.3.3 @@ -28845,12 +36488,12 @@ snapshots: jest-message-util@29.7.0: dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.25.7 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.3 chalk: 4.1.2 graceful-fs: 4.2.11 - micromatch: 4.0.5 + micromatch: 4.0.8 pretty-format: 29.7.0 slash: 3.0.0 stack-utils: 2.0.6 @@ -28858,7 +36501,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 18.18.8 + '@types/node': 20.14.12 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -28893,7 +36536,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.18.8 + '@types/node': 20.14.12 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -28921,7 +36564,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.18.8 + '@types/node': 20.14.12 chalk: 4.1.2 cjs-module-lexer: 1.3.1 collect-v8-coverage: 1.0.2 @@ -28941,15 +36584,15 @@ snapshots: jest-snapshot@29.7.0: dependencies: - '@babel/core': 7.24.3 - '@babel/generator': 7.24.1 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.3) - '@babel/types': 7.24.0 + '@babel/core': 7.25.2 + '@babel/generator': 7.25.7 + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.25.2) + '@babel/types': 7.25.7 '@jest/expect-utils': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.24.3) + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.25.2) chalk: 4.1.2 expect: 29.7.0 graceful-fs: 4.2.11 @@ -28960,14 +36603,14 @@ snapshots: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.5.4 + semver: 7.6.3 transitivePeerDependencies: - supports-color jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 18.18.8 + '@types/node': 20.14.12 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -28986,7 +36629,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.18.8 + '@types/node': 20.14.12 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -28995,23 +36638,23 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 18.18.8 + '@types/node': 20.14.12 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)): + jest@29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)) + jest-cli: 29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -29022,6 +36665,14 @@ snapshots: jiti@2.0.0-beta.2: {} + joi@17.13.3: + dependencies: + '@hapi/hoek': 9.3.0 + '@hapi/topo': 5.1.0 + '@sideway/address': 4.1.5 + '@sideway/formula': 3.0.1 + '@sideway/pinpoint': 2.0.0 + jquery@3.7.1: {} js-base64@2.6.4: {} @@ -29043,6 +36694,8 @@ snapshots: jsesc@2.5.2: {} + jsesc@3.0.2: {} + json-buffer@3.0.1: {} json-parse-even-better-errors@2.3.1: {} @@ -29125,39 +36778,15 @@ snapshots: kleur@4.1.5: {} - koa-compose@4.1.0: {} - - koa-compress@5.1.1: - dependencies: - bytes: 3.1.2 - compressible: 2.0.18 - http-errors: 1.8.1 - koa-is-json: 1.0.0 + klona@2.0.6: {} - koa-connect@2.1.0: {} + koa-compose@4.1.0: {} koa-convert@2.0.0: dependencies: co: 4.6.0 koa-compose: 4.1.0 - koa-is-json@1.0.0: {} - - koa-send@5.0.1: - dependencies: - debug: 4.3.4 - http-errors: 1.8.1 - resolve-path: 1.4.0 - transitivePeerDependencies: - - supports-color - - koa-static@5.0.0: - dependencies: - debug: 3.2.7 - koa-send: 5.0.1 - transitivePeerDependencies: - - supports-color - koa@2.14.2: dependencies: accepts: 1.3.8 @@ -29188,6 +36817,15 @@ snapshots: kolorist@1.8.0: {} + latest-version@7.0.0: + dependencies: + package-json: 8.1.1 + + launch-editor@2.9.1: + dependencies: + picocolors: 1.1.0 + shell-quote: 1.8.1 + lazy-cache@1.0.4: {} lazy-val@1.0.5: {} @@ -29208,6 +36846,25 @@ snapshots: transitivePeerDependencies: - supports-color + leva@0.9.35(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + dependencies: + '@radix-ui/react-portal': 1.1.2(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-tooltip': 1.1.3(@types/react-dom@18.2.14)(@types/react@18.2.35)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@stitches/react': 1.2.8(react@18.2.0) + '@use-gesture/react': 10.3.1(react@18.2.0) + colord: 2.9.3 + dequal: 2.0.3 + merge-value: 1.0.0 + react: 18.2.0 + react-colorful: 5.6.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react-dom: 18.2.0(react@18.2.0) + react-dropzone: 12.1.0(react@18.2.0) + v8n: 1.5.1 + zustand: 3.7.2(react@18.2.0) + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + leven@3.1.0: {} levn@0.4.1: @@ -29266,8 +36923,14 @@ snapshots: lilconfig@2.1.0: {} + lilconfig@3.1.2: {} + lines-and-columns@1.2.4: {} + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + lint-staged@13.3.0(enquirer@2.4.1): dependencies: chalk: 5.3.0 @@ -29344,6 +37007,14 @@ snapshots: emojis-list: 3.0.0 json5: 1.0.2 + loader-utils@2.0.4: + dependencies: + big.js: 5.2.2 + emojis-list: 3.0.0 + json5: 2.2.3 + + loader-utils@3.3.1: {} + local-pkg@0.4.3: {} local-pkg@0.5.0: @@ -29358,6 +37029,11 @@ snapshots: p-locate: 2.0.0 path-exists: 3.0.0 + locate-path@3.0.0: + dependencies: + p-locate: 3.0.0 + path-exists: 3.0.0 + locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -29448,8 +37124,6 @@ snapshots: strip-ansi: 7.1.0 wrap-ansi: 8.1.0 - loglevel@1.8.1: {} - longest-streak@3.1.0: {} longest@1.0.1: {} @@ -29470,8 +37144,12 @@ snapshots: lowercase-keys@2.0.0: {} + lowercase-keys@3.0.0: {} + lru-cache@10.2.2: {} + lru-cache@11.0.1: {} + lru-cache@4.1.5: dependencies: pseudomap: 1.0.2 @@ -29491,8 +37169,19 @@ snapshots: dependencies: react: 18.2.0 + lucide-react@0.394.0(react@18.2.0): + dependencies: + react: 18.2.0 + luxon@3.4.4: {} + lz-string@1.5.0: {} + + maath@0.10.8(@types/three@0.163.0)(three@0.168.0): + dependencies: + '@types/three': 0.163.0 + three: 0.168.0 + magic-string-ast@0.3.0: dependencies: magic-string: 0.30.10 @@ -29521,7 +37210,7 @@ snapshots: dependencies: '@babel/parser': 7.24.5 '@babel/types': 7.24.0 - source-map-js: 1.2.0 + source-map-js: 1.2.1 make-dir@2.1.0: dependencies: @@ -29535,7 +37224,7 @@ snapshots: make-dir@4.0.0: dependencies: - semver: 7.5.4 + semver: 7.6.3 make-error@1.3.6: {} @@ -29579,6 +37268,17 @@ snapshots: dependencies: object-visit: 1.0.1 + markdown-extensions@2.0.0: {} + + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + markdown-table@3.0.3: {} marked@12.0.2: {} @@ -29596,6 +37296,19 @@ snapshots: '@types/unist': 2.0.11 unist-util-visit: 4.1.2 + mdast-util-directive@3.0.0: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.2 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.1 + mdast-util-to-markdown: 2.1.0 + parse-entities: 4.0.1 + stringify-entities: 4.0.4 + unist-util-visit-parents: 6.0.1 + transitivePeerDependencies: + - supports-color + mdast-util-find-and-replace@2.2.2: dependencies: '@types/mdast': 3.0.15 @@ -29603,6 +37316,13 @@ snapshots: unist-util-is: 5.2.1 unist-util-visit-parents: 5.1.3 + mdast-util-find-and-replace@3.0.1: + dependencies: + '@types/mdast': 4.0.4 + escape-string-regexp: 5.0.0 + unist-util-is: 6.0.0 + unist-util-visit-parents: 6.0.1 + mdast-util-from-markdown@1.3.1: dependencies: '@types/mdast': 3.0.15 @@ -29620,6 +37340,34 @@ snapshots: transitivePeerDependencies: - supports-color + mdast-util-from-markdown@2.0.1: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.2 + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + mdast-util-to-string: 4.0.0 + micromark: 4.0.0 + micromark-util-decode-numeric-character-reference: 2.0.1 + micromark-util-decode-string: 2.0.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + unist-util-stringify-position: 4.0.0 + transitivePeerDependencies: + - supports-color + + mdast-util-frontmatter@2.0.1: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + escape-string-regexp: 5.0.0 + mdast-util-from-markdown: 2.0.1 + mdast-util-to-markdown: 2.1.0 + micromark-extension-frontmatter: 2.0.0 + transitivePeerDependencies: + - supports-color + mdast-util-gfm-autolink-literal@1.0.3: dependencies: '@types/mdast': 3.0.15 @@ -29627,17 +37375,43 @@ snapshots: mdast-util-find-and-replace: 2.2.2 micromark-util-character: 1.2.0 + mdast-util-gfm-autolink-literal@2.0.1: + dependencies: + '@types/mdast': 4.0.4 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-find-and-replace: 3.0.1 + micromark-util-character: 2.1.0 + mdast-util-gfm-footnote@1.0.2: dependencies: '@types/mdast': 3.0.15 mdast-util-to-markdown: 1.5.0 micromark-util-normalize-identifier: 1.1.0 + mdast-util-gfm-footnote@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.1 + mdast-util-to-markdown: 2.1.0 + micromark-util-normalize-identifier: 2.0.0 + transitivePeerDependencies: + - supports-color + mdast-util-gfm-strikethrough@1.0.3: dependencies: '@types/mdast': 3.0.15 mdast-util-to-markdown: 1.5.0 + mdast-util-gfm-strikethrough@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-from-markdown: 2.0.1 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + mdast-util-gfm-table@1.0.7: dependencies: '@types/mdast': 3.0.15 @@ -29647,11 +37421,30 @@ snapshots: transitivePeerDependencies: - supports-color + mdast-util-gfm-table@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + markdown-table: 3.0.3 + mdast-util-from-markdown: 2.0.1 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + mdast-util-gfm-task-list-item@1.0.2: dependencies: '@types/mdast': 3.0.15 mdast-util-to-markdown: 1.5.0 + mdast-util-gfm-task-list-item@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.1 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + mdast-util-gfm@2.0.2: dependencies: mdast-util-from-markdown: 1.3.1 @@ -29664,17 +37457,83 @@ snapshots: transitivePeerDependencies: - supports-color + mdast-util-gfm@3.0.0: + dependencies: + mdast-util-from-markdown: 2.0.1 + mdast-util-gfm-autolink-literal: 2.0.1 + mdast-util-gfm-footnote: 2.0.0 + mdast-util-gfm-strikethrough: 2.0.0 + mdast-util-gfm-table: 2.0.0 + mdast-util-gfm-task-list-item: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + mdast-util-math@2.0.2: dependencies: '@types/mdast': 3.0.15 longest-streak: 3.1.0 mdast-util-to-markdown: 1.5.0 + mdast-util-mdx-expression@2.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.1 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + + mdast-util-mdx-jsx@3.1.3: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@types/unist': 3.0.2 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.1 + mdast-util-to-markdown: 2.1.0 + parse-entities: 4.0.1 + stringify-entities: 4.0.4 + unist-util-stringify-position: 4.0.0 + vfile-message: 4.0.2 + transitivePeerDependencies: + - supports-color + + mdast-util-mdx@3.0.0: + dependencies: + mdast-util-from-markdown: 2.0.1 + mdast-util-mdx-expression: 2.0.1 + mdast-util-mdx-jsx: 3.1.3 + mdast-util-mdxjs-esm: 2.0.1 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + + mdast-util-mdxjs-esm@2.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.1 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + mdast-util-phrasing@3.0.1: dependencies: '@types/mdast': 3.0.15 unist-util-is: 5.2.1 + mdast-util-phrasing@4.1.0: + dependencies: + '@types/mdast': 4.0.4 + unist-util-is: 6.0.0 + mdast-util-to-hast@12.3.0: dependencies: '@types/hast': 2.3.10 @@ -29686,6 +37545,18 @@ snapshots: unist-util-position: 4.0.4 unist-util-visit: 4.1.2 + mdast-util-to-hast@13.2.0: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@ungap/structured-clone': 1.2.0 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.0 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.0.0 + vfile: 6.0.3 + mdast-util-to-markdown@1.5.0: dependencies: '@types/mdast': 3.0.15 @@ -29697,14 +37568,31 @@ snapshots: unist-util-visit: 4.1.2 zwitch: 2.0.4 + mdast-util-to-markdown@2.1.0: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.2 + longest-streak: 3.1.0 + mdast-util-phrasing: 4.1.0 + mdast-util-to-string: 4.0.0 + micromark-util-decode-string: 2.0.0 + unist-util-visit: 5.0.0 + zwitch: 2.0.4 + mdast-util-to-string@3.2.0: dependencies: '@types/mdast': 3.0.15 + mdast-util-to-string@4.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdn-data@2.0.28: {} mdn-data@2.0.30: {} + mdurl@2.0.0: {} + media-query-parser@2.0.2: dependencies: '@babel/runtime': 7.23.2 @@ -29771,8 +37659,21 @@ snapshots: merge-stream@2.0.0: {} + merge-value@1.0.0: + dependencies: + get-value: 2.0.6 + is-extendable: 1.0.1 + mixin-deep: 1.3.2 + set-value: 2.0.1 + merge2@1.4.1: {} + meshline@3.3.1(three@0.168.0): + dependencies: + three: 0.168.0 + + meshoptimizer@0.18.1: {} + methods@1.1.2: {} microdiff@1.3.2: {} @@ -29796,6 +37697,42 @@ snapshots: micromark-util-types: 1.1.0 uvu: 0.5.6 + micromark-core-commonmark@2.0.1: + dependencies: + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + micromark-factory-destination: 2.0.0 + micromark-factory-label: 2.0.0 + micromark-factory-space: 2.0.0 + micromark-factory-title: 2.0.0 + micromark-factory-whitespace: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-classify-character: 2.0.0 + micromark-util-html-tag-name: 2.0.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-resolve-all: 2.0.0 + micromark-util-subtokenize: 2.0.1 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + + micromark-extension-directive@3.0.2: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.0.0 + micromark-factory-whitespace: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + parse-entities: 4.0.1 + + micromark-extension-frontmatter@2.0.0: + dependencies: + fault: 2.0.1 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + micromark-extension-gfm-autolink-literal@1.0.5: dependencies: micromark-util-character: 1.2.0 @@ -29803,6 +37740,13 @@ snapshots: micromark-util-symbol: 1.1.0 micromark-util-types: 1.1.0 + micromark-extension-gfm-autolink-literal@2.1.0: + dependencies: + micromark-util-character: 2.1.0 + micromark-util-sanitize-uri: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + micromark-extension-gfm-footnote@1.1.2: dependencies: micromark-core-commonmark: 1.1.0 @@ -29814,6 +37758,17 @@ snapshots: micromark-util-types: 1.1.0 uvu: 0.5.6 + micromark-extension-gfm-footnote@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-core-commonmark: 2.0.1 + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-sanitize-uri: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + micromark-extension-gfm-strikethrough@1.0.7: dependencies: micromark-util-chunked: 1.1.0 @@ -29823,6 +37778,15 @@ snapshots: micromark-util-types: 1.1.0 uvu: 0.5.6 + micromark-extension-gfm-strikethrough@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-classify-character: 2.0.0 + micromark-util-resolve-all: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + micromark-extension-gfm-table@1.0.7: dependencies: micromark-factory-space: 1.1.0 @@ -29831,10 +37795,22 @@ snapshots: micromark-util-types: 1.1.0 uvu: 0.5.6 + micromark-extension-gfm-table@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + micromark-extension-gfm-tagfilter@1.0.2: dependencies: micromark-util-types: 1.1.0 + micromark-extension-gfm-tagfilter@2.0.0: + dependencies: + micromark-util-types: 2.0.0 + micromark-extension-gfm-task-list-item@1.0.5: dependencies: micromark-factory-space: 1.1.0 @@ -29843,6 +37819,14 @@ snapshots: micromark-util-types: 1.1.0 uvu: 0.5.6 + micromark-extension-gfm-task-list-item@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + micromark-extension-gfm@2.0.3: dependencies: micromark-extension-gfm-autolink-literal: 1.0.5 @@ -29854,6 +37838,17 @@ snapshots: micromark-util-combine-extensions: 1.1.0 micromark-util-types: 1.1.0 + micromark-extension-gfm@3.0.0: + dependencies: + micromark-extension-gfm-autolink-literal: 2.1.0 + micromark-extension-gfm-footnote: 2.1.0 + micromark-extension-gfm-strikethrough: 2.1.0 + micromark-extension-gfm-table: 2.1.0 + micromark-extension-gfm-tagfilter: 2.0.0 + micromark-extension-gfm-task-list-item: 2.1.0 + micromark-util-combine-extensions: 2.0.0 + micromark-util-types: 2.0.0 + micromark-extension-math@2.1.2: dependencies: '@types/katex': 0.16.7 @@ -29864,12 +37859,70 @@ snapshots: micromark-util-types: 1.1.0 uvu: 0.5.6 + micromark-extension-mdx-expression@3.0.0: + dependencies: + '@types/estree': 1.0.5 + devlop: 1.1.0 + micromark-factory-mdx-expression: 2.0.2 + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-events-to-acorn: 2.0.2 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + + micromark-extension-mdx-jsx@3.0.1: + dependencies: + '@types/acorn': 4.0.6 + '@types/estree': 1.0.5 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + micromark-factory-mdx-expression: 2.0.2 + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-events-to-acorn: 2.0.2 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + vfile-message: 4.0.2 + + micromark-extension-mdx-md@2.0.0: + dependencies: + micromark-util-types: 2.0.0 + + micromark-extension-mdxjs-esm@3.0.0: + dependencies: + '@types/estree': 1.0.5 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.1 + micromark-util-character: 2.1.0 + micromark-util-events-to-acorn: 2.0.2 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + unist-util-position-from-estree: 2.0.0 + vfile-message: 4.0.2 + + micromark-extension-mdxjs@3.0.0: + dependencies: + acorn: 8.12.0 + acorn-jsx: 5.3.2(acorn@8.12.0) + micromark-extension-mdx-expression: 3.0.0 + micromark-extension-mdx-jsx: 3.0.1 + micromark-extension-mdx-md: 2.0.0 + micromark-extension-mdxjs-esm: 3.0.0 + micromark-util-combine-extensions: 2.0.0 + micromark-util-types: 2.0.0 + micromark-factory-destination@1.1.0: dependencies: micromark-util-character: 1.2.0 micromark-util-symbol: 1.1.0 micromark-util-types: 1.1.0 + micromark-factory-destination@2.0.0: + dependencies: + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + micromark-factory-label@1.1.0: dependencies: micromark-util-character: 1.2.0 @@ -29877,11 +37930,35 @@ snapshots: micromark-util-types: 1.1.0 uvu: 0.5.6 + micromark-factory-label@2.0.0: + dependencies: + devlop: 1.1.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + + micromark-factory-mdx-expression@2.0.2: + dependencies: + '@types/estree': 1.0.5 + devlop: 1.1.0 + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-events-to-acorn: 2.0.2 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + unist-util-position-from-estree: 2.0.0 + vfile-message: 4.0.2 + micromark-factory-space@1.1.0: dependencies: micromark-util-character: 1.2.0 micromark-util-types: 1.1.0 + micromark-factory-space@2.0.0: + dependencies: + micromark-util-character: 2.1.0 + micromark-util-types: 2.0.0 + micromark-factory-title@1.1.0: dependencies: micromark-factory-space: 1.1.0 @@ -29889,6 +37966,13 @@ snapshots: micromark-util-symbol: 1.1.0 micromark-util-types: 1.1.0 + micromark-factory-title@2.0.0: + dependencies: + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + micromark-factory-whitespace@1.1.0: dependencies: micromark-factory-space: 1.1.0 @@ -29896,30 +37980,61 @@ snapshots: micromark-util-symbol: 1.1.0 micromark-util-types: 1.1.0 + micromark-factory-whitespace@2.0.0: + dependencies: + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + micromark-util-character@1.2.0: dependencies: micromark-util-symbol: 1.1.0 micromark-util-types: 1.1.0 + micromark-util-character@2.1.0: + dependencies: + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + micromark-util-chunked@1.1.0: dependencies: micromark-util-symbol: 1.1.0 + micromark-util-chunked@2.0.0: + dependencies: + micromark-util-symbol: 2.0.0 + micromark-util-classify-character@1.1.0: dependencies: micromark-util-character: 1.2.0 micromark-util-symbol: 1.1.0 micromark-util-types: 1.1.0 + micromark-util-classify-character@2.0.0: + dependencies: + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + micromark-util-combine-extensions@1.1.0: dependencies: micromark-util-chunked: 1.1.0 micromark-util-types: 1.1.0 + micromark-util-combine-extensions@2.0.0: + dependencies: + micromark-util-chunked: 2.0.0 + micromark-util-types: 2.0.0 + micromark-util-decode-numeric-character-reference@1.1.0: dependencies: micromark-util-symbol: 1.1.0 + micromark-util-decode-numeric-character-reference@2.0.1: + dependencies: + micromark-util-symbol: 2.0.0 + micromark-util-decode-string@1.1.0: dependencies: decode-named-character-reference: 1.0.2 @@ -29927,24 +38042,60 @@ snapshots: micromark-util-decode-numeric-character-reference: 1.1.0 micromark-util-symbol: 1.1.0 + micromark-util-decode-string@2.0.0: + dependencies: + decode-named-character-reference: 1.0.2 + micromark-util-character: 2.1.0 + micromark-util-decode-numeric-character-reference: 2.0.1 + micromark-util-symbol: 2.0.0 + micromark-util-encode@1.1.0: {} + micromark-util-encode@2.0.0: {} + + micromark-util-events-to-acorn@2.0.2: + dependencies: + '@types/acorn': 4.0.6 + '@types/estree': 1.0.5 + '@types/unist': 3.0.2 + devlop: 1.1.0 + estree-util-visit: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + vfile-message: 4.0.2 + micromark-util-html-tag-name@1.2.0: {} + micromark-util-html-tag-name@2.0.0: {} + micromark-util-normalize-identifier@1.1.0: dependencies: micromark-util-symbol: 1.1.0 + micromark-util-normalize-identifier@2.0.0: + dependencies: + micromark-util-symbol: 2.0.0 + micromark-util-resolve-all@1.1.0: dependencies: micromark-util-types: 1.1.0 + micromark-util-resolve-all@2.0.0: + dependencies: + micromark-util-types: 2.0.0 + micromark-util-sanitize-uri@1.2.0: dependencies: micromark-util-character: 1.2.0 micromark-util-encode: 1.1.0 micromark-util-symbol: 1.1.0 + micromark-util-sanitize-uri@2.0.0: + dependencies: + micromark-util-character: 2.1.0 + micromark-util-encode: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-subtokenize@1.1.0: dependencies: micromark-util-chunked: 1.1.0 @@ -29952,12 +38103,21 @@ snapshots: micromark-util-types: 1.1.0 uvu: 0.5.6 + micromark-util-subtokenize@2.0.1: + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + micromark-util-symbol@1.1.0: {} micromark-util-symbol@2.0.0: {} micromark-util-types@1.1.0: {} + micromark-util-types@2.0.0: {} + micromark@3.2.0: dependencies: '@types/debug': 4.1.12 @@ -29980,6 +38140,28 @@ snapshots: transitivePeerDependencies: - supports-color + micromark@4.0.0: + dependencies: + '@types/debug': 4.1.12 + debug: 4.3.6 + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.1 + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-combine-extensions: 2.0.0 + micromark-util-decode-numeric-character-reference: 2.0.1 + micromark-util-encode: 2.0.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-resolve-all: 2.0.0 + micromark-util-sanitize-uri: 2.0.0 + micromark-util-subtokenize: 2.0.1 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + transitivePeerDependencies: + - supports-color + micromatch@3.1.0: dependencies: arr-diff: 4.0.0 @@ -30003,6 +38185,11 @@ snapshots: braces: 3.0.2 picomatch: 2.3.1 + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + mime-db@1.33.0: {} mime-db@1.52.0: {} @@ -30021,6 +38208,8 @@ snapshots: mime@2.6.0: {} + mime@4.0.4: {} + mimic-fn@1.2.0: {} mimic-fn@2.1.0: {} @@ -30031,10 +38220,24 @@ snapshots: mimic-response@3.1.0: {} + mimic-response@4.0.0: {} + min-indent@1.0.1: {} mind-elixir@3.3.2: {} + mini-css-extract-plugin@2.9.1(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + schema-utils: 4.2.0 + tapable: 2.2.1 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + + minimalistic-assert@1.0.1: {} + + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + minimatch@3.0.8: dependencies: brace-expansion: 1.1.11 @@ -30099,8 +38302,6 @@ snapshots: minipass@5.0.0: {} - minipass@7.1.1: {} - minipass@7.1.2: {} minizlib@2.1.2: @@ -30117,6 +38318,8 @@ snapshots: mixme@0.5.9: {} + mkdirp-classic@0.5.3: {} + mkdirp@0.5.6: dependencies: minimist: 1.2.8 @@ -30178,6 +38381,11 @@ snapshots: type-is: 1.6.18 xtend: 4.0.2 + multicast-dns@7.2.5: + dependencies: + dns-packet: 5.6.1 + thunky: 1.1.0 + multipipe@1.0.2: dependencies: duplexer2: 0.1.4 @@ -30195,10 +38403,10 @@ snapshots: object-assign: 4.1.1 thenify-all: 1.6.0 - naive-ui@2.39.0(vue@3.4.35(typescript@5.4.5)): + naive-ui@2.39.0(vue@3.4.35(typescript@5.6.3)): dependencies: '@css-render/plugin-bem': 0.15.14(css-render@0.15.14) - '@css-render/vue3-ssr': 0.15.14(vue@3.4.35(typescript@5.4.5)) + '@css-render/vue3-ssr': 0.15.14(vue@3.4.35(typescript@5.6.3)) '@types/katex': 0.16.7 '@types/lodash': 4.14.202 '@types/lodash-es': 4.17.12 @@ -30213,10 +38421,10 @@ snapshots: lodash-es: 4.17.21 seemly: 0.3.8 treemate: 0.3.11 - vdirs: 0.1.8(vue@3.4.35(typescript@5.4.5)) - vooks: 0.2.12(vue@3.4.35(typescript@5.4.5)) - vue: 3.4.35(typescript@5.4.5) - vueuc: 0.4.58(vue@3.4.35(typescript@5.4.5)) + vdirs: 0.1.8(vue@3.4.35(typescript@5.6.3)) + vooks: 0.2.12(vue@3.4.35(typescript@5.6.3)) + vue: 3.4.35(typescript@5.6.3) + vueuc: 0.4.58(vue@3.4.35(typescript@5.6.3)) nanoid@3.3.6: {} @@ -30246,6 +38454,8 @@ snapshots: dependencies: picocolors: 1.0.0 + napi-build-utils@1.0.2: {} + natural-compare@1.4.0: {} needle@3.2.0: @@ -30261,6 +38471,11 @@ snapshots: neo-async@2.6.2: {} + next-themes@0.3.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + dependencies: + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + nice-try@1.0.5: {} no-case@3.0.4: @@ -30270,21 +38485,30 @@ snapshots: node-abi@3.62.0: dependencies: - semver: 7.5.4 + semver: 7.6.3 node-abort-controller@3.1.1: {} node-addon-api@1.7.2: optional: true + node-addon-api@6.1.0: {} + node-api-version@0.2.0: dependencies: - semver: 7.5.4 + semver: 7.6.3 node-emoji@1.11.0: dependencies: lodash: 4.17.21 + node-emoji@2.1.3: + dependencies: + '@sindresorhus/is': 4.6.0 + char-regex: 1.0.2 + emojilib: 2.4.0 + skin-tone: 2.0.0 + node-eval@2.0.0: dependencies: path-is-absolute: 1.0.1 @@ -30302,6 +38526,8 @@ snapshots: optionalDependencies: encoding: 0.1.13 + node-forge@1.3.1: {} + node-gyp-build@4.7.1: {} node-gyp@9.4.1: @@ -30314,19 +38540,24 @@ snapshots: nopt: 6.0.0 npmlog: 6.0.2 rimraf: 3.0.2 - semver: 7.5.4 + semver: 7.6.3 tar: 6.2.1 which: 2.0.2 transitivePeerDependencies: - bluebird - supports-color - node-int64@0.4.0: {} + node-html-parser@5.4.2: + dependencies: + css-select: 4.3.0 + he: 1.2.0 - node-releases@2.0.13: {} + node-int64@0.4.0: {} node-releases@2.0.14: {} + node-releases@2.0.18: {} + nopt@6.0.0: dependencies: abbrev: 1.1.1 @@ -30342,7 +38573,7 @@ snapshots: dependencies: hosted-git-info: 4.1.0 is-core-module: 2.13.1 - semver: 7.5.4 + semver: 7.6.3 validate-npm-package-license: 3.0.4 normalize-path@3.0.0: {} @@ -30351,6 +38582,8 @@ snapshots: normalize-url@6.1.0: {} + normalize-url@8.0.1: {} + normalize-wheel-es@1.2.0: {} normalize.css@8.0.1: {} @@ -30363,7 +38596,7 @@ snapshots: dependencies: path-key: 3.1.1 - npm-run-path@5.1.0: + npm-run-path@5.3.0: dependencies: path-key: 4.0.0 @@ -30422,12 +38655,18 @@ snapshots: dependencies: isobject: 3.0.1 + obuf@1.1.2: {} + ofetch@1.3.4: dependencies: destr: 2.0.3 node-fetch-native: 1.6.4 ufo: 1.5.4 + on-finished@2.3.0: + dependencies: + ee-first: 1.1.1 + on-finished@2.4.1: dependencies: ee-first: 1.1.1 @@ -30450,13 +38689,23 @@ snapshots: dependencies: mimic-fn: 4.0.0 + oniguruma-to-js@0.4.3: + dependencies: + regex: 4.3.3 + only@0.0.2: {} - open@9.1.0: + open@10.1.0: dependencies: - default-browser: 4.0.0 + default-browser: 5.2.1 define-lazy-prop: 3.0.0 is-inside-container: 1.0.0 + is-wsl: 3.1.0 + + open@8.4.2: + dependencies: + define-lazy-prop: 2.0.0 + is-docker: 2.2.1 is-wsl: 2.2.0 opencollective-postinstall@2.0.3: {} @@ -30470,6 +38719,8 @@ snapshots: node-fetch: 1.6.3 opn: 4.0.2 + opener@1.5.2: {} + opn@4.0.2: dependencies: object-assign: 4.1.1 @@ -30504,6 +38755,8 @@ snapshots: p-cancelable@2.1.1: {} + p-cancelable@3.0.0: {} + p-defer@1.0.0: {} p-filter@2.1.0: @@ -30534,6 +38787,10 @@ snapshots: dependencies: p-limit: 1.3.0 + p-locate@3.0.0: + dependencies: + p-limit: 2.3.0 + p-locate@4.1.0: dependencies: p-limit: 2.3.0 @@ -30552,16 +38809,35 @@ snapshots: dependencies: aggregate-error: 3.1.0 + p-retry@4.6.2: + dependencies: + '@types/retry': 0.12.0 + retry: 0.13.1 + p-try@1.0.0: {} p-try@2.2.0: {} package-json-from-dist@1.0.0: {} + package-json@8.1.1: + dependencies: + got: 12.6.1 + registry-auth-token: 5.0.2 + registry-url: 6.0.1 + semver: 7.6.3 + package-manager-detector@0.1.2: {} + package-manager-detector@0.2.2: {} + pako@1.0.11: {} + param-case@3.0.4: + dependencies: + dot-case: 3.0.4 + tslib: 2.6.3 + parchment@3.0.0: {} parent-module@1.0.1: @@ -30578,29 +38854,52 @@ snapshots: parse-code-context@1.0.0: {} + parse-entities@4.0.1: + dependencies: + '@types/unist': 2.0.11 + 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 + parse-json@2.2.0: dependencies: error-ex: 1.3.2 parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.25.7 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 parse-node-version@1.0.1: {} + parse-numeric-range@1.3.0: {} + parse-passwd@1.0.0: {} parse-svg-path@0.1.2: {} + parse5-htmlparser2-tree-adapter@7.0.0: + dependencies: + domhandler: 5.0.3 + parse5: 7.1.2 + parse5@7.1.2: dependencies: entities: 4.5.0 parseurl@1.3.3: {} + pascal-case@3.1.2: + dependencies: + no-case: 3.0.4 + tslib: 2.6.3 + pascalcase@0.1.1: {} path-browserify@1.0.1: {} @@ -30628,6 +38927,11 @@ snapshots: lru-cache: 10.2.2 minipass: 7.1.2 + path-scurry@2.0.0: + dependencies: + lru-cache: 11.0.1 + minipass: 7.1.2 + path-to-regexp@0.1.7: {} path-to-regexp@1.8.0: @@ -30644,6 +38948,8 @@ snapshots: path-type@4.0.0: {} + pathe@0.2.0: {} + pathe@1.1.1: {} pathe@1.1.2: {} @@ -30672,6 +38978,8 @@ snapshots: picocolors@1.0.1: {} + picocolors@1.1.0: {} + picomatch@2.3.1: {} picomatch@4.0.1: {} @@ -30684,14 +38992,14 @@ snapshots: pify@4.0.1: {} - pinia@2.1.7(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.4.5)))(typescript@5.4.5)(vue@3.4.15(typescript@5.4.5)): + pinia@2.1.7(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.6.3)))(typescript@5.6.3)(vue@3.4.15(typescript@5.6.3)): dependencies: '@vue/devtools-api': 6.5.1 - vue: 3.4.15(typescript@5.4.5) - vue-demi: 0.14.7(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.4.5)))(vue@3.4.15(typescript@5.4.5)) + vue: 3.4.15(typescript@5.6.3) + vue-demi: 0.14.7(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.6.3)))(vue@3.4.15(typescript@5.6.3)) optionalDependencies: - '@vue/composition-api': 1.7.2(vue@3.4.15(typescript@5.4.5)) - typescript: 5.4.5 + '@vue/composition-api': 1.7.2(vue@3.4.15(typescript@5.6.3)) + typescript: 5.6.3 pinkie-promise@2.0.1: dependencies: @@ -30705,11 +39013,15 @@ snapshots: dependencies: find-up: 4.1.0 + pkg-dir@7.0.0: + dependencies: + find-up: 6.3.0 + pkg-types@1.0.3: dependencies: jsonc-parser: 3.2.0 mlly: 1.4.2 - pathe: 1.1.1 + pathe: 1.1.2 pkg-types@1.1.3: dependencies: @@ -30717,6 +39029,10 @@ snapshots: mlly: 1.7.1 pathe: 1.1.2 + pkg-up@3.1.0: + dependencies: + find-up: 3.0.0 + playwright-chromium@1.42.1: dependencies: playwright-core: 1.42.1 @@ -30751,17 +39067,150 @@ snapshots: posix-character-classes@0.1.1: {} + postcss-attribute-case-insensitive@7.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + postcss-calc@9.0.1(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + postcss-value-parser: 4.2.0 + + postcss-clamp@4.1.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-color-functional-notation@7.0.2(postcss@8.4.47): + dependencies: + '@csstools/css-color-parser': 3.0.2(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + + postcss-color-hex-alpha@10.0.0(postcss@8.4.47): + dependencies: + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-color-rebeccapurple@10.0.0(postcss@8.4.47): + dependencies: + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-colormin@6.1.0(postcss@8.4.47): + dependencies: + browserslist: 4.23.1 + caniuse-api: 3.0.0 + colord: 2.9.3 + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-convert-values@6.1.0(postcss@8.4.47): + dependencies: + browserslist: 4.23.1 + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-custom-media@11.0.2(postcss@8.4.47): + dependencies: + '@csstools/cascade-layer-name-parser': 2.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/media-query-list-parser': 3.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + postcss: 8.4.47 + + postcss-custom-properties@14.0.1(postcss@8.4.47): + dependencies: + '@csstools/cascade-layer-name-parser': 2.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-custom-selectors@8.0.1(postcss@8.4.47): + dependencies: + '@csstools/cascade-layer-name-parser': 2.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + postcss-dir-pseudo-class@9.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + postcss-discard-comments@6.0.2(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + + postcss-discard-duplicates@6.0.3(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-discard-duplicates@7.0.0(postcss@8.4.39): dependencies: postcss: 8.4.39 + postcss-discard-empty@6.0.3(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-discard-empty@7.0.0(postcss@8.4.39): dependencies: postcss: 8.4.39 - postcss-import@15.1.0(postcss@8.4.39): + postcss-discard-overridden@6.0.2(postcss@8.4.47): dependencies: - postcss: 8.4.39 + postcss: 8.4.47 + + postcss-discard-unused@6.0.5(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + postcss-double-position-gradients@6.0.0(postcss@8.4.47): + dependencies: + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-focus-visible@10.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + postcss-focus-within@9.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + postcss-font-variant@5.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + + postcss-gap-properties@6.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + + postcss-image-set-function@7.0.0(postcss@8.4.47): + dependencies: + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-import@15.1.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.8 @@ -30773,42 +39222,79 @@ snapshots: read-cache: 1.0.0 resolve: 1.22.8 - postcss-js@4.0.1(postcss@8.4.39): + postcss-js@4.0.1(postcss@8.4.47): dependencies: camelcase-css: 2.0.1 - postcss: 8.4.39 + postcss: 8.4.47 + + postcss-lab-function@7.0.2(postcss@8.4.47): + dependencies: + '@csstools/css-color-parser': 3.0.2(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/utilities': 2.0.0(postcss@8.4.47) + postcss: 8.4.47 - postcss-load-config@4.0.1(postcss@8.4.31)(ts-node@10.9.1(@types/node@20.14.12)(typescript@4.9.5)): + postcss-load-config@4.0.1(postcss@8.4.31)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3)): dependencies: lilconfig: 2.1.0 yaml: 2.3.4 optionalDependencies: postcss: 8.4.31 - ts-node: 10.9.1(@types/node@20.14.12)(typescript@4.9.5) + ts-node: 10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3) - postcss-load-config@4.0.1(postcss@8.4.39)(ts-node@10.9.1(@types/node@20.14.12)(typescript@4.9.5)): + postcss-load-config@4.0.1(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.2.2)): dependencies: lilconfig: 2.1.0 yaml: 2.3.4 optionalDependencies: - postcss: 8.4.39 - ts-node: 10.9.1(@types/node@20.14.12)(typescript@4.9.5) + postcss: 8.4.47 + ts-node: 10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.2.2) + optional: true - postcss-load-config@4.0.1(postcss@8.4.39)(ts-node@10.9.1(@types/node@20.14.12)(typescript@5.4.5)): + postcss-load-config@4.0.1(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3)): dependencies: lilconfig: 2.1.0 yaml: 2.3.4 optionalDependencies: - postcss: 8.4.39 - ts-node: 10.9.1(@types/node@20.14.12)(typescript@5.4.5) + postcss: 8.4.47 + ts-node: 10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3) - postcss-load-config@4.0.1(postcss@8.4.40): + postcss-loader@7.3.4(postcss@8.4.47)(typescript@5.6.3)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): dependencies: - lilconfig: 2.1.0 - yaml: 2.3.4 - optionalDependencies: - postcss: 8.4.40 - optional: true + cosmiconfig: 8.3.6(typescript@5.6.3) + jiti: 1.21.0 + postcss: 8.4.47 + semver: 7.5.4 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + transitivePeerDependencies: + - typescript + + postcss-logical@8.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-merge-idents@6.0.3(postcss@8.4.47): + dependencies: + cssnano-utils: 4.0.2(postcss@8.4.47) + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-merge-longhand@6.0.5(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + stylehacks: 6.1.1(postcss@8.4.47) + + postcss-merge-rules@6.1.1(postcss@8.4.47): + dependencies: + browserslist: 4.23.1 + caniuse-api: 3.0.0 + cssnano-utils: 4.0.2(postcss@8.4.47) + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 postcss-merge-rules@7.0.2(postcss@8.4.39): dependencies: @@ -30818,26 +39304,222 @@ snapshots: postcss: 8.4.39 postcss-selector-parser: 6.1.0 + postcss-minify-font-values@6.1.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-minify-gradients@6.0.3(postcss@8.4.47): + dependencies: + colord: 2.9.3 + cssnano-utils: 4.0.2(postcss@8.4.47) + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-minify-params@6.1.0(postcss@8.4.47): + dependencies: + browserslist: 4.23.1 + cssnano-utils: 4.0.2(postcss@8.4.47) + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-minify-selectors@6.0.4(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + postcss-minify-selectors@7.0.2(postcss@8.4.39): dependencies: cssesc: 3.0.0 postcss: 8.4.39 postcss-selector-parser: 6.1.0 + postcss-modules-extract-imports@3.1.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + + postcss-modules-local-by-default@4.0.5(postcss@8.4.47): + dependencies: + icss-utils: 5.1.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + postcss-value-parser: 4.2.0 + + postcss-modules-scope@3.2.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + postcss-modules-values@4.0.0(postcss@8.4.47): + dependencies: + icss-utils: 5.1.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-nested@6.0.1(postcss@8.4.39): dependencies: postcss: 8.4.39 - postcss-selector-parser: 6.0.13 + postcss-selector-parser: 6.1.0 + + postcss-nested@6.0.1(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + postcss-nesting@13.0.0(postcss@8.4.47): + dependencies: + '@csstools/selector-resolve-nested': 2.0.0(postcss-selector-parser@6.1.0) + '@csstools/selector-specificity': 4.0.0(postcss-selector-parser@6.1.0) + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + + postcss-normalize-charset@6.0.2(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + + postcss-normalize-display-values@6.0.2(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-normalize-positions@6.0.2(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-normalize-repeat-style@6.0.2(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-normalize-string@6.0.2(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-normalize-timing-functions@6.0.2(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-normalize-unicode@6.1.0(postcss@8.4.47): + dependencies: + browserslist: 4.23.1 + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-normalize-url@6.0.2(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-normalize-whitespace@6.0.2(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 postcss-normalize-whitespace@7.0.0(postcss@8.4.39): dependencies: postcss: 8.4.39 postcss-value-parser: 4.2.0 + postcss-opacity-percentage@3.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + + postcss-ordered-values@6.0.2(postcss@8.4.47): + dependencies: + cssnano-utils: 4.0.2(postcss@8.4.47) + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-overflow-shorthand@6.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-page-break@3.0.4(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + + postcss-place@10.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + postcss-prefix-selector@1.16.0(postcss@5.2.18): dependencies: postcss: 5.2.18 + postcss-preset-env@10.0.6(postcss@8.4.47): + dependencies: + '@csstools/postcss-cascade-layers': 5.0.0(postcss@8.4.47) + '@csstools/postcss-color-function': 4.0.2(postcss@8.4.47) + '@csstools/postcss-color-mix-function': 3.0.2(postcss@8.4.47) + '@csstools/postcss-content-alt-text': 2.0.1(postcss@8.4.47) + '@csstools/postcss-exponential-functions': 2.0.1(postcss@8.4.47) + '@csstools/postcss-font-format-keywords': 4.0.0(postcss@8.4.47) + '@csstools/postcss-gamut-mapping': 2.0.2(postcss@8.4.47) + '@csstools/postcss-gradients-interpolation-method': 5.0.2(postcss@8.4.47) + '@csstools/postcss-hwb-function': 4.0.2(postcss@8.4.47) + '@csstools/postcss-ic-unit': 4.0.0(postcss@8.4.47) + '@csstools/postcss-initial': 2.0.0(postcss@8.4.47) + '@csstools/postcss-is-pseudo-class': 5.0.0(postcss@8.4.47) + '@csstools/postcss-light-dark-function': 2.0.4(postcss@8.4.47) + '@csstools/postcss-logical-float-and-clear': 3.0.0(postcss@8.4.47) + '@csstools/postcss-logical-overflow': 2.0.0(postcss@8.4.47) + '@csstools/postcss-logical-overscroll-behavior': 2.0.0(postcss@8.4.47) + '@csstools/postcss-logical-resize': 3.0.0(postcss@8.4.47) + '@csstools/postcss-logical-viewport-units': 3.0.1(postcss@8.4.47) + '@csstools/postcss-media-minmax': 2.0.1(postcss@8.4.47) + '@csstools/postcss-media-queries-aspect-ratio-number-values': 3.0.1(postcss@8.4.47) + '@csstools/postcss-nested-calc': 4.0.0(postcss@8.4.47) + '@csstools/postcss-normalize-display-values': 4.0.0(postcss@8.4.47) + '@csstools/postcss-oklab-function': 4.0.2(postcss@8.4.47) + '@csstools/postcss-progressive-custom-properties': 4.0.0(postcss@8.4.47) + '@csstools/postcss-relative-color-syntax': 3.0.2(postcss@8.4.47) + '@csstools/postcss-scope-pseudo-class': 4.0.0(postcss@8.4.47) + '@csstools/postcss-stepped-value-functions': 4.0.1(postcss@8.4.47) + '@csstools/postcss-text-decoration-shorthand': 4.0.1(postcss@8.4.47) + '@csstools/postcss-trigonometric-functions': 4.0.1(postcss@8.4.47) + '@csstools/postcss-unset-value': 4.0.0(postcss@8.4.47) + autoprefixer: 10.4.20(postcss@8.4.47) + browserslist: 4.23.1 + css-blank-pseudo: 7.0.0(postcss@8.4.47) + css-has-pseudo: 7.0.0(postcss@8.4.47) + css-prefers-color-scheme: 10.0.0(postcss@8.4.47) + cssdb: 8.1.1 + postcss: 8.4.47 + postcss-attribute-case-insensitive: 7.0.0(postcss@8.4.47) + postcss-clamp: 4.1.0(postcss@8.4.47) + postcss-color-functional-notation: 7.0.2(postcss@8.4.47) + postcss-color-hex-alpha: 10.0.0(postcss@8.4.47) + postcss-color-rebeccapurple: 10.0.0(postcss@8.4.47) + postcss-custom-media: 11.0.2(postcss@8.4.47) + postcss-custom-properties: 14.0.1(postcss@8.4.47) + postcss-custom-selectors: 8.0.1(postcss@8.4.47) + postcss-dir-pseudo-class: 9.0.0(postcss@8.4.47) + postcss-double-position-gradients: 6.0.0(postcss@8.4.47) + postcss-focus-visible: 10.0.0(postcss@8.4.47) + postcss-focus-within: 9.0.0(postcss@8.4.47) + postcss-font-variant: 5.0.0(postcss@8.4.47) + postcss-gap-properties: 6.0.0(postcss@8.4.47) + postcss-image-set-function: 7.0.0(postcss@8.4.47) + postcss-lab-function: 7.0.2(postcss@8.4.47) + postcss-logical: 8.0.0(postcss@8.4.47) + postcss-nesting: 13.0.0(postcss@8.4.47) + postcss-opacity-percentage: 3.0.0(postcss@8.4.47) + postcss-overflow-shorthand: 6.0.0(postcss@8.4.47) + postcss-page-break: 3.0.4(postcss@8.4.47) + postcss-place: 10.0.0(postcss@8.4.47) + postcss-pseudo-class-any-link: 10.0.0(postcss@8.4.47) + postcss-replace-overflow-wrap: 4.0.0(postcss@8.4.47) + postcss-selector-not: 8.0.0(postcss@8.4.47) + + postcss-pseudo-class-any-link@10.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + postcss-pxtorem@6.0.0(postcss@8.4.31): dependencies: postcss: 8.4.31 @@ -30846,9 +39528,34 @@ snapshots: dependencies: postcss: 8.4.32 - postcss-pxtorem@6.0.0(postcss@8.4.40): + postcss-pxtorem@6.0.0(postcss@8.4.47): dependencies: - postcss: 8.4.40 + postcss: 8.4.47 + + postcss-reduce-idents@6.0.3(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-reduce-initial@6.1.0(postcss@8.4.47): + dependencies: + browserslist: 4.23.1 + caniuse-api: 3.0.0 + postcss: 8.4.47 + + postcss-reduce-transforms@6.0.2(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + + postcss-replace-overflow-wrap@4.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + + postcss-selector-not@8.0.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 postcss-selector-parser@6.0.13: dependencies: @@ -30860,6 +39567,22 @@ snapshots: cssesc: 3.0.0 util-deprecate: 1.0.2 + postcss-sort-media-queries@5.2.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + sort-css-media-queries: 2.2.0 + + postcss-svgo@6.0.3(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-value-parser: 4.2.0 + svgo: 3.2.0 + + postcss-unique-selectors@6.0.4(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + postcss-url@10.1.3(postcss@8.4.31): dependencies: make-dir: 3.1.0 @@ -30870,6 +39593,10 @@ snapshots: postcss-value-parser@4.2.0: {} + postcss-zindex@6.0.2(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + postcss@5.2.18: dependencies: chalk: 1.1.3 @@ -30903,8 +39630,8 @@ snapshots: postcss@8.4.38: dependencies: nanoid: 3.3.7 - picocolors: 1.0.0 - source-map-js: 1.2.0 + picocolors: 1.1.0 + source-map-js: 1.2.1 postcss@8.4.39: dependencies: @@ -30912,11 +39639,11 @@ snapshots: picocolors: 1.0.1 source-map-js: 1.2.0 - postcss@8.4.40: + postcss@8.4.47: dependencies: nanoid: 3.3.7 - picocolors: 1.0.1 - source-map-js: 1.2.0 + picocolors: 1.1.0 + source-map-js: 1.2.1 posthtml-parser@0.2.1: dependencies: @@ -30945,6 +39672,23 @@ snapshots: dependencies: commander: 9.5.0 + potpack@1.0.2: {} + + prebuild-install@7.1.2: + dependencies: + detect-libc: 2.0.3 + expand-template: 2.0.3 + github-from-package: 0.0.0 + minimist: 1.2.8 + mkdirp-classic: 0.5.3 + napi-build-utils: 1.0.2 + node-abi: 3.62.0 + pump: 3.0.0 + rc: 1.2.8 + simple-get: 4.0.1 + tar-fs: 2.1.1 + tunnel-agent: 0.6.0 + preferred-pm@3.1.2: dependencies: find-up: 5.0.0 @@ -30964,18 +39708,33 @@ snapshots: prettier@3.3.2: {} + pretty-error@4.0.0: + dependencies: + lodash: 4.17.21 + renderkid: 3.0.0 + pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 react-is: 18.2.0 - primevue@3.52.0(vue@3.3.12(typescript@5.4.5)): + pretty-time@1.1.0: {} + + primevue@3.52.0(vue@3.3.12(typescript@5.6.3)): dependencies: - vue: 3.3.12(typescript@5.4.5) + vue: 3.3.12(typescript@5.6.3) printj@1.1.2: {} + prism-react-renderer@2.4.0(react@18.2.0): + dependencies: + '@types/prismjs': 1.26.4 + clsx: 2.1.1 + react: 18.2.0 + + prismjs@1.29.0: {} + process-nextick-args@2.0.1: {} progress@2.0.3: {} @@ -30987,6 +39746,11 @@ snapshots: err-code: 2.0.3 retry: 0.12.0 + promise-worker-transferable@1.0.4: + dependencies: + is-promise: 2.2.2 + lie: 3.3.0 + prompts@2.4.2: dependencies: kleur: 3.0.3 @@ -31000,6 +39764,8 @@ snapshots: property-information@6.5.0: {} + proto-list@1.2.4: {} + proxy-addr@2.0.7: dependencies: forwarded: 0.2.0 @@ -31017,10 +39783,16 @@ snapshots: end-of-stream: 1.4.4 once: 1.4.0 + punycode.js@2.3.1: {} + punycode@1.4.1: {} punycode@2.3.1: {} + pupa@3.1.0: + dependencies: + escape-goat: 4.0.0 + pure-rand@6.1.0: {} qrcode.react@3.1.0(react@18.2.0): @@ -31061,6 +39833,12 @@ snapshots: queue-microtask@1.2.3: {} + queue-tick@1.0.1: {} + + queue@6.0.2: + dependencies: + inherits: 2.0.4 + quick-lru@4.0.1: {} quick-lru@5.1.1: {} @@ -31298,9 +40076,9 @@ snapshots: rc-resize-observer@1.4.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: - '@babel/runtime': 7.23.2 - classnames: 2.3.2 - rc-util: 5.38.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@babel/runtime': 7.25.0 + classnames: 2.5.1 + rc-util: 5.43.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) resize-observer-polyfill: 1.5.1 @@ -31470,12 +40248,56 @@ snapshots: reactcss: 1.2.3(react@17.0.2) tinycolor2: 1.6.0 + react-colorful@5.6.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + dependencies: + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + + react-composer@5.0.3(react@18.2.0): + dependencies: + prop-types: 15.8.1 + react: 18.2.0 + react-copy-to-clipboard@5.1.0(react@18.2.0): dependencies: copy-to-clipboard: 3.3.3 prop-types: 15.8.1 react: 18.2.0 + react-dev-utils@12.0.1(eslint@8.57.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + '@babel/code-frame': 7.24.7 + address: 1.2.2 + browserslist: 4.23.1 + chalk: 4.1.2 + cross-spawn: 7.0.3 + detect-port-alt: 1.1.6 + escape-string-regexp: 4.0.0 + filesize: 8.0.7 + find-up: 5.0.0 + fork-ts-checker-webpack-plugin: 6.5.3(eslint@8.57.0)(typescript@5.6.3)(vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + global-modules: 2.0.0 + globby: 11.1.0 + gzip-size: 6.0.0 + immer: 9.0.21 + is-root: 2.1.0 + loader-utils: 3.3.1 + open: 8.4.2 + pkg-up: 3.1.0 + prompts: 2.4.2 + react-error-overlay: 6.0.11 + recursive-readdir: 2.2.3 + shell-quote: 1.8.1 + strip-ansi: 6.0.1 + text-table: 0.2.0 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - eslint + - supports-color + - vue-template-compiler + react-dom@17.0.2(react@17.0.2): dependencies: loose-envify: 1.4.0 @@ -31496,11 +40318,22 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + react-dropzone@12.1.0(react@18.2.0): + dependencies: + attr-accept: 2.2.2 + file-selector: 0.5.0 + prop-types: 15.8.1 + react: 18.2.0 + react-error-boundary@3.0.2(react@17.0.2): dependencies: '@babel/runtime': 7.23.2 react: 17.0.2 + react-error-overlay@6.0.11: {} + + react-fast-compare@3.2.2: {} + react-focus-lock@2.9.6(@types/react@18.2.35)(react@17.0.2): dependencies: '@babel/runtime': 7.23.2 @@ -31513,6 +40346,23 @@ snapshots: optionalDependencies: '@types/react': 18.2.35 + react-helmet-async@1.3.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + dependencies: + '@babel/runtime': 7.25.0 + invariant: 2.2.4 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-fast-compare: 3.2.2 + shallowequal: 1.1.0 + + react-helmet-async@2.0.5(react@18.2.0): + dependencies: + invariant: 2.2.4 + react: 18.2.0 + react-fast-compare: 3.2.2 + shallowequal: 1.1.0 + react-highlight-words@0.20.0(react@17.0.2): dependencies: highlight-words-core: 1.2.3 @@ -31529,6 +40379,10 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + react-icons@5.3.0(react@18.2.0): + dependencies: + react: 18.2.0 + react-intersection-observer@9.13.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: react: 18.2.0 @@ -31541,6 +40395,10 @@ snapshots: react-is@18.2.0: {} + react-json-view-lite@1.5.0(react@18.2.0): + dependencies: + react: 18.2.0 + react-layout-kit@1.9.0(react@18.2.0): dependencies: '@babel/runtime': 7.25.0 @@ -31549,6 +40407,12 @@ snapshots: transitivePeerDependencies: - supports-color + react-loadable-ssr-addon-v5-slorber@1.0.1(@docusaurus/react-loadable@6.0.0(react@18.2.0))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + '@babel/runtime': 7.25.0 + react-loadable: '@docusaurus/react-loadable@6.0.0(react@18.2.0)' + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + react-markdown@8.0.7(@types/react@18.2.35)(react@18.2.0): dependencies: '@types/hast': 2.3.10 @@ -31579,6 +40443,12 @@ snapshots: react: 17.0.2 scheduler: 0.19.1 + react-reconciler@0.27.0(react@18.2.0): + dependencies: + loose-envify: 1.4.0 + react: 18.2.0 + scheduler: 0.21.0 + react-redux@7.2.9(react-dom@17.0.2(react@17.0.2))(react@17.0.2): dependencies: '@babel/runtime': 7.23.2 @@ -31615,6 +40485,12 @@ snapshots: react-draggable: 4.4.6(react-dom@18.2.0(react@18.2.0))(react@18.2.0) tslib: 2.6.2 + react-router-config@5.1.1(react-router@5.3.4(react@18.2.0))(react@18.2.0): + dependencies: + '@babel/runtime': 7.25.0 + react: 18.2.0 + react-router: 5.3.4(react@18.2.0) + react-router-dom@5.3.4(react@17.0.2): dependencies: '@babel/runtime': 7.23.2 @@ -31626,6 +40502,17 @@ snapshots: tiny-invariant: 1.3.1 tiny-warning: 1.0.3 + react-router-dom@5.3.4(react@18.2.0): + dependencies: + '@babel/runtime': 7.23.2 + history: 4.10.1 + loose-envify: 1.4.0 + prop-types: 15.8.1 + react: 18.2.0 + react-router: 5.3.4(react@18.2.0) + tiny-invariant: 1.3.1 + tiny-warning: 1.0.3 + react-router-dom@6.18.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: '@remix-run/router': 1.11.0 @@ -31653,6 +40540,19 @@ snapshots: tiny-invariant: 1.3.1 tiny-warning: 1.0.3 + react-router@5.3.4(react@18.2.0): + dependencies: + '@babel/runtime': 7.23.2 + history: 4.10.1 + hoist-non-react-statics: 3.3.2 + loose-envify: 1.4.0 + path-to-regexp: 1.8.0 + prop-types: 15.8.1 + react: 18.2.0 + react-is: 16.13.1 + tiny-invariant: 1.3.1 + tiny-warning: 1.0.3 + react-router@6.18.0(react@18.2.0): dependencies: '@remix-run/router': 1.11.0 @@ -31672,6 +40572,20 @@ snapshots: react: 17.0.2 react-dom: 17.0.2(react@17.0.2) + react-use-measure@2.1.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + dependencies: + debounce: 1.2.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + + react-waypoint@10.3.0(react@18.2.0): + dependencies: + '@babel/runtime': 7.25.0 + consolidated-events: 2.0.2 + prop-types: 15.8.1 + react: 18.2.0 + react-is: 18.2.0 + react-window@1.8.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: '@babel/runtime': 7.25.0 @@ -31784,10 +40698,20 @@ snapshots: dependencies: picomatch: 2.3.1 + reading-time@1.5.0: {} + + rechoir@0.6.2: + dependencies: + resolve: 1.22.8 + rechoir@0.8.0: dependencies: resolve: 1.22.8 + recursive-readdir@2.2.3: + dependencies: + minimatch: 3.1.2 + redent@3.0.0: dependencies: indent-string: 4.0.0 @@ -31807,6 +40731,12 @@ snapshots: reflect-metadata@0.2.2: {} + regenerate-unicode-properties@10.2.0: + dependencies: + regenerate: 1.4.2 + + regenerate@1.4.2: {} + regenerator-runtime@0.10.5: {} regenerator-runtime@0.11.1: {} @@ -31815,26 +40745,55 @@ snapshots: regenerator-runtime@0.14.0: {} + regenerator-transform@0.15.2: + dependencies: + '@babel/runtime': 7.25.0 + regex-not@1.0.2: dependencies: extend-shallow: 3.0.2 safe-regex: 1.1.0 + regex@4.3.3: {} + regexp.prototype.flags@1.5.1: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 set-function-name: 2.0.1 + regexpu-core@6.1.1: + dependencies: + regenerate: 1.4.2 + regenerate-unicode-properties: 10.2.0 + regjsgen: 0.8.0 + regjsparser: 0.11.1 + unicode-match-property-ecmascript: 2.0.0 + unicode-match-property-value-ecmascript: 2.2.0 + registry-auth-token@3.3.2: dependencies: rc: 1.2.8 safe-buffer: 5.2.1 + registry-auth-token@5.0.2: + dependencies: + '@pnpm/npm-conf': 2.3.1 + registry-url@3.1.0: dependencies: rc: 1.2.8 + registry-url@6.0.1: + dependencies: + rc: 1.2.8 + + regjsgen@0.8.0: {} + + regjsparser@0.11.1: + dependencies: + jsesc: 3.0.2 + regression@2.0.1: {} rehype-katex@6.0.3: @@ -31846,6 +40805,40 @@ snapshots: katex: 0.16.11 unist-util-visit: 4.1.2 + rehype-raw@7.0.0: + dependencies: + '@types/hast': 3.0.4 + hast-util-raw: 9.0.4 + vfile: 6.0.3 + + relateurl@0.2.7: {} + + remark-directive@3.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-directive: 3.0.0 + micromark-extension-directive: 3.0.2 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color + + remark-emoji@4.0.1: + dependencies: + '@types/mdast': 4.0.4 + emoticon: 4.1.0 + mdast-util-find-and-replace: 3.0.1 + node-emoji: 2.1.3 + unified: 11.0.5 + + remark-frontmatter@5.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-frontmatter: 2.0.1 + micromark-extension-frontmatter: 2.0.0 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color + remark-gfm@3.0.1: dependencies: '@types/mdast': 3.0.15 @@ -31855,6 +40848,17 @@ snapshots: transitivePeerDependencies: - supports-color + remark-gfm@4.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-gfm: 3.0.0 + micromark-extension-gfm: 3.0.0 + remark-parse: 11.0.0 + remark-stringify: 11.0.0 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color + remark-math@5.1.1: dependencies: '@types/mdast': 3.0.15 @@ -31862,6 +40866,13 @@ snapshots: micromark-extension-math: 2.1.2 unified: 10.1.2 + remark-mdx@3.0.1: + dependencies: + mdast-util-mdx: 3.0.0 + micromark-extension-mdxjs: 3.0.0 + transitivePeerDependencies: + - supports-color + remark-parse@10.0.2: dependencies: '@types/mdast': 3.0.15 @@ -31870,6 +40881,15 @@ snapshots: transitivePeerDependencies: - supports-color + remark-parse@11.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-from-markdown: 2.0.1 + micromark-util-types: 2.0.0 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color + remark-rehype@10.1.0: dependencies: '@types/hast': 2.3.10 @@ -31877,6 +40897,43 @@ snapshots: mdast-util-to-hast: 12.3.0 unified: 10.1.2 + remark-rehype@11.1.1: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + mdast-util-to-hast: 13.2.0 + unified: 11.0.5 + vfile: 6.0.3 + + remark-shiki-twoslash@3.1.3(typescript@5.5.4): + dependencies: + '@types/unist': 2.0.11 + '@typescript/twoslash': 3.1.0 + '@typescript/vfs': 1.3.4 + fenceparser: 1.1.1 + regenerator-runtime: 0.13.9 + shiki: 0.10.1 + shiki-twoslash: 3.1.2(typescript@5.5.4) + tslib: 2.1.0 + typescript: 5.5.4 + unist-util-visit: 2.0.3 + transitivePeerDependencies: + - supports-color + + remark-stringify@11.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-to-markdown: 2.1.0 + unified: 11.0.5 + + renderkid@3.0.0: + dependencies: + css-select: 4.3.0 + dom-converter: 0.2.0 + htmlparser2: 6.1.0 + lodash: 4.17.21 + strip-ansi: 6.0.1 + repeat-element@1.1.4: {} repeat-string@1.6.1: {} @@ -31922,11 +40979,6 @@ snapshots: dependencies: get-installed-path: 2.1.1 - resolve-path@1.4.0: - dependencies: - http-errors: 1.6.3 - path-is-absolute: 1.0.1 - resolve-pathname@3.0.0: {} resolve-pkg-maps@1.0.0: {} @@ -31945,6 +40997,10 @@ snapshots: dependencies: lowercase-keys: 2.0.0 + responselike@3.0.0: + dependencies: + lowercase-keys: 3.0.0 + restore-cursor@2.0.0: dependencies: onetime: 2.0.1 @@ -31964,6 +41020,8 @@ snapshots: retry@0.12.0: {} + retry@0.13.1: {} + reusify@1.0.4: {} rfdc@1.3.0: {} @@ -31985,6 +41043,11 @@ snapshots: dependencies: glob: 7.2.3 + rimraf@6.0.1: + dependencies: + glob: 11.0.0 + package-json-from-dist: 1.0.0 + roarr@2.15.4: dependencies: boolean: 3.2.0 @@ -32032,9 +41095,16 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.14.1 fsevents: 2.3.3 - run-applescript@5.0.0: + rtl-detect@1.1.2: {} + + rtlcss@4.3.0: dependencies: - execa: 5.1.1 + escalade: 3.1.2 + picocolors: 1.1.0 + postcss: 8.4.47 + strip-json-comments: 3.1.1 + + run-applescript@7.0.0: {} run-async@2.4.1: {} @@ -32189,6 +41259,17 @@ snapshots: sass-embedded-win32-ia32: 1.74.1 sass-embedded-win32-x64: 1.74.1 + sass-loader@10.5.2(sass@1.74.1)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + klona: 2.0.6 + loader-utils: 2.0.4 + neo-async: 2.6.2 + schema-utils: 3.3.0 + semver: 7.5.4 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + optionalDependencies: + sass: 1.74.1 + sass@1.69.5: dependencies: chokidar: 3.5.3 @@ -32197,9 +41278,9 @@ snapshots: sass@1.74.1: dependencies: - chokidar: 3.5.3 + chokidar: 3.6.0 immutable: 4.3.4 - source-map-js: 1.0.2 + source-map-js: 1.2.1 sax@1.3.0: {} @@ -32213,16 +41294,33 @@ snapshots: loose-envify: 1.4.0 object-assign: 4.1.1 + scheduler@0.21.0: + dependencies: + loose-envify: 1.4.0 + scheduler@0.23.0: dependencies: loose-envify: 1.4.0 + schema-utils@2.7.0: + dependencies: + '@types/json-schema': 7.0.15 + ajv: 6.12.6 + ajv-keywords: 3.5.2(ajv@6.12.6) + schema-utils@3.3.0: dependencies: '@types/json-schema': 7.0.15 ajv: 6.12.6 ajv-keywords: 3.5.2(ajv@6.12.6) + schema-utils@4.2.0: + dependencies: + '@types/json-schema': 7.0.15 + ajv: 8.12.0 + ajv-formats: 2.1.1 + ajv-keywords: 5.1.0(ajv@8.12.0) + screenfull@5.2.0: {} scroll-into-view-if-needed@2.2.20: @@ -32239,13 +41337,29 @@ snapshots: scule@1.0.0: {} + section-matter@1.0.0: + dependencies: + extend-shallow: 2.0.1 + kind-of: 6.0.3 + seemly@0.3.8: {} + select-hose@2.0.0: {} + select@1.1.2: {} + selfsigned@2.4.1: + dependencies: + '@types/node-forge': 1.3.11 + node-forge: 1.3.1 + semver-compare@1.0.0: optional: true + semver-diff@4.0.0: + dependencies: + semver: 7.6.3 + semver@5.7.2: {} semver@6.3.1: {} @@ -32254,6 +41368,8 @@ snapshots: dependencies: lru-cache: 6.0.0 + semver@7.6.3: {} + send@0.18.0: dependencies: debug: 2.6.9 @@ -32294,6 +41410,18 @@ snapshots: path-to-regexp: 2.2.1 range-parser: 1.2.0 + serve-index@1.9.1: + dependencies: + accepts: 1.3.8 + batch: 0.6.1 + debug: 2.6.9 + escape-html: 1.0.3 + http-errors: 1.6.3 + mime-types: 2.1.35 + parseurl: 1.3.3 + transitivePeerDependencies: + - supports-color + serve-static@1.15.0: dependencies: encodeurl: 1.0.2 @@ -32349,10 +41477,25 @@ snapshots: setprototypeof@1.2.0: {} + shallow-clone@3.0.1: + dependencies: + kind-of: 6.0.3 + shallow-equal@1.2.1: {} shallowequal@1.1.0: {} + sharp@0.32.6: + dependencies: + color: 4.2.3 + detect-libc: 2.0.3 + node-addon-api: 6.1.0 + prebuild-install: 7.1.2 + semver: 7.5.4 + simple-get: 4.0.1 + tar-fs: 3.0.6 + tunnel-agent: 0.6.0 + shebang-command@1.2.0: dependencies: shebang-regex: 1.0.0 @@ -32365,16 +41508,50 @@ snapshots: shebang-regex@3.0.0: {} + shell-quote@1.8.1: {} + + shelljs@0.8.5: + dependencies: + glob: 7.2.3 + interpret: 1.4.0 + rechoir: 0.6.2 + shepherd.js@11.1.1: dependencies: '@floating-ui/dom': 1.6.10 deepmerge: 4.3.1 - shiki@1.14.1: + shiki-twoslash@3.1.2(typescript@5.5.4): + dependencies: + '@typescript/twoslash': 3.1.0 + '@typescript/vfs': 1.3.4 + fenceparser: 1.1.1 + shiki: 0.10.1 + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + shiki@0.10.1: dependencies: - '@shikijs/core': 1.14.1 + jsonc-parser: 3.3.1 + vscode-oniguruma: 1.7.0 + vscode-textmate: 5.2.0 + + shiki@1.22.0: + dependencies: + '@shikijs/core': 1.22.0 + '@shikijs/engine-javascript': 1.22.0 + '@shikijs/engine-oniguruma': 1.22.0 + '@shikijs/types': 1.22.0 + '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 + shikiji-core@0.9.10: {} + + shikiji@0.9.10: + dependencies: + shikiji-core: 0.9.10 + side-channel@1.0.4: dependencies: call-bind: 1.0.7 @@ -32387,6 +41564,14 @@ snapshots: signal-exit@4.1.0: {} + simple-concat@1.0.1: {} + + simple-get@4.0.1: + dependencies: + decompress-response: 6.0.0 + once: 1.4.0 + simple-concat: 1.0.1 + simple-statistics@6.1.1: {} simple-swizzle@0.2.2: @@ -32395,7 +41580,7 @@ snapshots: simple-update-notifier@2.0.0: dependencies: - semver: 7.5.4 + semver: 7.6.3 sirv@2.0.3: dependencies: @@ -32411,12 +41596,27 @@ snapshots: sisteransi@1.0.5: {} + sitemap@7.1.2: + dependencies: + '@types/node': 17.0.45 + '@types/sax': 1.2.7 + arg: 5.0.2 + sax: 1.3.0 + size-sensor@1.0.2: {} + skin-tone@2.0.0: + dependencies: + unicode-emoji-modifier-base: 1.0.0 + skmeans@0.9.7: {} slash@3.0.0: {} + slash@4.0.0: {} + + slashes@3.0.12: {} + slice-ansi@3.0.0: dependencies: ansi-styles: 4.3.0 @@ -32443,7 +41643,7 @@ snapshots: snake-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.6.3 snapdragon-node@2.1.1: dependencies: @@ -32468,6 +41668,12 @@ snapshots: transitivePeerDependencies: - supports-color + sockjs@0.3.24: + dependencies: + faye-websocket: 0.11.4 + uuid: 8.3.2 + websocket-driver: 0.7.4 + socks-proxy-agent@7.0.0: dependencies: agent-base: 6.0.2 @@ -32505,6 +41711,8 @@ snapshots: minimist: 1.2.8 sander: 0.5.1 + sort-css-media-queries@2.2.0: {} + sortablejs@1.15.1: {} sortablejs@1.15.2: {} @@ -32513,6 +41721,8 @@ snapshots: source-map-js@1.2.0: {} + source-map-js@1.2.1: {} + source-map-resolve@0.5.3: dependencies: atob: 2.1.2 @@ -32570,6 +41780,27 @@ snapshots: spdx-license-ids@3.0.16: {} + spdy-transport@3.0.0: + dependencies: + debug: 4.3.6 + detect-node: 2.1.0 + hpack.js: 2.1.6 + obuf: 1.1.2 + readable-stream: 3.6.2 + wbuf: 1.7.3 + transitivePeerDependencies: + - supports-color + + spdy@4.0.2: + dependencies: + debug: 4.3.6 + handle-thing: 2.0.1 + http-deceiver: 1.2.7 + select-hose: 2.0.0 + spdy-transport: 3.0.0 + transitivePeerDependencies: + - supports-color + splaytree@3.1.2: {} split-on-first@1.1.0: {} @@ -32586,6 +41817,8 @@ snapshots: sprintf-js@1.1.3: {} + srcset@4.0.0: {} + ssf@0.11.2: dependencies: frac: 1.1.2 @@ -32609,6 +41842,12 @@ snapshots: define-property: 0.2.5 object-copy: 0.1.0 + stats-gl@2.2.8: + dependencies: + '@types/three': 0.163.0 + + stats.js@0.17.0: {} + statuses@1.5.0: {} statuses@2.0.1: {} @@ -32627,6 +41866,14 @@ snapshots: streamsearch@1.1.0: {} + streamx@2.20.1: + dependencies: + fast-fifo: 1.3.2 + queue-tick: 1.0.1 + text-decoder: 1.2.0 + optionalDependencies: + bare-events: 2.5.0 + strict-uri-encode@1.1.0: {} strict-uri-encode@2.0.0: {} @@ -32685,6 +41932,17 @@ snapshots: dependencies: safe-buffer: 5.2.1 + stringify-entities@4.0.4: + dependencies: + character-entities-html4: 2.1.0 + character-entities-legacy: 3.0.0 + + stringify-object@3.3.0: + dependencies: + get-own-enumerable-property-symbols: 3.0.2 + is-obj: 1.0.1 + is-regexp: 1.0.0 + strip-ansi@3.0.1: dependencies: ansi-regex: 2.1.1 @@ -32701,6 +41959,8 @@ snapshots: dependencies: ansi-regex: 6.0.1 + strip-bom-string@1.0.0: {} + strip-bom@3.0.0: {} strip-bom@4.0.0: {} @@ -32721,7 +41981,7 @@ snapshots: strip-literal@1.3.0: dependencies: - acorn: 8.11.2 + acorn: 8.12.0 strip-outer@1.0.1: dependencies: @@ -32731,13 +41991,23 @@ snapshots: dependencies: inline-style-parser: 0.1.1 + style-to-object@1.0.8: + dependencies: + inline-style-parser: 0.2.4 + + stylehacks@6.1.1(postcss@8.4.47): + dependencies: + browserslist: 4.23.1 + postcss: 8.4.47 + postcss-selector-parser: 6.1.0 + stylis@4.2.0: {} stylis@4.3.0: {} sucrase@3.34.0: dependencies: - '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/gen-mapping': 0.3.5 commander: 4.1.1 glob: 7.1.6 lines-and-columns: 1.2.4 @@ -32757,7 +42027,7 @@ snapshots: dependencies: component-emitter: 1.3.1 cookiejar: 2.1.4 - debug: 4.3.4 + debug: 4.3.6 fast-safe-stringify: 2.1.1 form-data: 4.0.0 formidable: 2.1.2 @@ -32795,7 +42065,11 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte-check@3.6.2(@babel/core@7.25.2)(less@4.2.0)(postcss-load-config@4.0.1(postcss@8.4.40))(postcss@8.4.40)(sass@1.74.1)(svelte@4.0.0): + suspend-react@0.1.3(react@18.2.0): + dependencies: + react: 18.2.0 + + svelte-check@3.6.2(@babel/core@7.25.2)(less@4.2.0)(postcss-load-config@4.0.1(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.2.2)))(postcss@8.4.47)(sass@1.74.1)(svelte@4.0.0): dependencies: '@jridgewell/trace-mapping': 0.3.20 chokidar: 3.5.3 @@ -32804,7 +42078,7 @@ snapshots: picocolors: 1.0.0 sade: 1.8.1 svelte: 4.0.0 - svelte-preprocess: 5.1.3(@babel/core@7.25.2)(less@4.2.0)(postcss-load-config@4.0.1(postcss@8.4.40))(postcss@8.4.40)(sass@1.74.1)(svelte@4.0.0)(typescript@5.4.5) + svelte-preprocess: 5.1.3(@babel/core@7.25.2)(less@4.2.0)(postcss-load-config@4.0.1(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.2.2)))(postcss@8.4.47)(sass@1.74.1)(svelte@4.0.0)(typescript@5.4.5) typescript: 5.4.5 transitivePeerDependencies: - '@babel/core' @@ -32821,7 +42095,7 @@ snapshots: dependencies: svelte: 4.0.0 - svelte-preprocess@5.1.3(@babel/core@7.25.2)(less@4.2.0)(postcss-load-config@4.0.1(postcss@8.4.40))(postcss@8.4.40)(sass@1.74.1)(svelte@4.0.0)(typescript@5.4.5): + svelte-preprocess@5.1.3(@babel/core@7.25.2)(less@4.2.0)(postcss-load-config@4.0.1(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.2.2)))(postcss@8.4.47)(sass@1.74.1)(svelte@4.0.0)(typescript@5.4.5): dependencies: '@types/pug': 2.0.10 detect-indent: 6.1.0 @@ -32832,8 +42106,8 @@ snapshots: optionalDependencies: '@babel/core': 7.25.2 less: 4.2.0 - postcss: 8.4.40 - postcss-load-config: 4.0.1(postcss@8.4.40) + postcss: 8.4.47 + postcss-load-config: 4.0.1(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.2.2)) sass: 1.74.1 typescript: 5.4.5 @@ -32883,20 +42157,32 @@ snapshots: css-tree: 2.3.1 css-what: 6.1.0 csso: 5.0.5 - picocolors: 1.0.0 + picocolors: 1.1.0 + + swc-loader@0.2.6(@swc/core@1.7.26(@swc/helpers@0.5.3))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + '@swc/core': 1.7.26(@swc/helpers@0.5.3) + '@swc/counter': 0.1.3 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) symbol-observable@4.0.0: {} synckit@0.8.8: dependencies: '@pkgr/core': 0.1.1 - tslib: 2.6.2 + tslib: 2.6.3 tabbable@6.2.0: {} tailwind-merge@1.14.0: {} - tailwindcss@3.3.5(ts-node@10.9.1(@types/node@20.14.12)(typescript@4.9.5)): + tailwind-merge@2.5.3: {} + + tailwindcss-animate@1.0.7(tailwindcss@3.4.13(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3))): + dependencies: + tailwindcss: 3.4.13(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3)) + + tailwindcss@3.3.5(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -32912,25 +42198,25 @@ snapshots: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.39 - postcss-import: 15.1.0(postcss@8.4.39) - postcss-js: 4.0.1(postcss@8.4.39) - postcss-load-config: 4.0.1(postcss@8.4.39)(ts-node@10.9.1(@types/node@20.14.12)(typescript@4.9.5)) - postcss-nested: 6.0.1(postcss@8.4.39) + postcss: 8.4.47 + postcss-import: 15.1.0(postcss@8.4.47) + postcss-js: 4.0.1(postcss@8.4.47) + postcss-load-config: 4.0.1(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3)) + postcss-nested: 6.0.1(postcss@8.4.47) postcss-selector-parser: 6.0.13 resolve: 1.22.8 sucrase: 3.34.0 transitivePeerDependencies: - ts-node - tailwindcss@3.3.5(ts-node@10.9.1(@types/node@20.14.12)(typescript@5.4.5)): + tailwindcss@3.4.13(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 - chokidar: 3.5.3 + chokidar: 3.6.0 didyoumean: 1.2.2 dlv: 1.1.3 - fast-glob: 3.3.1 + fast-glob: 3.3.2 glob-parent: 6.0.2 is-glob: 4.0.3 jiti: 1.21.0 @@ -32938,18 +42224,20 @@ snapshots: micromatch: 4.0.5 normalize-path: 3.0.0 object-hash: 3.0.0 - picocolors: 1.0.0 - postcss: 8.4.39 - postcss-import: 15.1.0(postcss@8.4.39) - postcss-js: 4.0.1(postcss@8.4.39) - postcss-load-config: 4.0.1(postcss@8.4.39)(ts-node@10.9.1(@types/node@20.14.12)(typescript@5.4.5)) - postcss-nested: 6.0.1(postcss@8.4.39) - postcss-selector-parser: 6.0.13 + picocolors: 1.1.0 + postcss: 8.4.47 + postcss-import: 15.1.0(postcss@8.4.47) + postcss-js: 4.0.1(postcss@8.4.47) + postcss-load-config: 4.0.1(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3)) + postcss-nested: 6.0.1(postcss@8.4.47) + postcss-selector-parser: 6.1.0 resolve: 1.22.8 sucrase: 3.34.0 transitivePeerDependencies: - ts-node + tapable@1.1.3: {} + tapable@2.2.1: {} tape@4.17.0: @@ -32971,6 +42259,35 @@ snapshots: resolve: 1.22.8 string.prototype.trim: 1.2.8 + tar-fs@2.1.1: + dependencies: + chownr: 1.1.4 + mkdirp-classic: 0.5.3 + pump: 3.0.0 + tar-stream: 2.2.0 + + tar-fs@3.0.6: + dependencies: + pump: 3.0.0 + tar-stream: 3.1.7 + optionalDependencies: + bare-fs: 2.3.5 + bare-path: 2.1.3 + + tar-stream@2.2.0: + dependencies: + bl: 4.1.0 + end-of-stream: 1.4.4 + fs-constants: 1.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + + tar-stream@3.1.7: + dependencies: + b4a: 1.6.7 + fast-fifo: 1.3.2 + streamx: 2.20.1 + tar@6.2.1: dependencies: chownr: 2.0.0 @@ -32980,19 +42297,19 @@ snapshots: mkdirp: 1.0.4 yallist: 4.0.0 - tdesign-icons-vue@0.2.4(vue@2.6.14): + tdesign-icons-vue@0.2.5(vue@2.6.14): dependencies: '@babel/runtime': 7.23.2 classnames: 2.3.2 vue: 2.6.14 - tdesign-icons-vue@0.2.4(vue@2.7.16): + tdesign-icons-vue@0.2.5(vue@2.7.16): dependencies: '@babel/runtime': 7.23.2 classnames: 2.3.2 vue: 2.7.16 - tdesign-vue@1.9.8(vue@2.6.14): + tdesign-vue@1.10.4(vue@2.6.14): dependencies: '@babel/runtime': 7.23.2 '@popperjs/core': 2.11.8 @@ -33009,12 +42326,12 @@ snapshots: mitt: 3.0.1 raf: 3.4.1 sortablejs: 1.15.2 - tdesign-icons-vue: 0.2.4(vue@2.6.14) + tdesign-icons-vue: 0.2.5(vue@2.6.14) tinycolor2: 1.6.0 validator: 13.11.0 vue: 2.6.14 - tdesign-vue@1.9.8(vue@2.7.16): + tdesign-vue@1.10.4(vue@2.7.16): dependencies: '@babel/runtime': 7.23.2 '@popperjs/core': 2.11.8 @@ -33031,7 +42348,7 @@ snapshots: mitt: 3.0.1 raf: 3.4.1 sortablejs: 1.15.2 - tdesign-icons-vue: 0.2.4(vue@2.7.16) + tdesign-icons-vue: 0.2.5(vue@2.7.16) tinycolor2: 1.6.0 validator: 13.11.0 vue: 2.7.16 @@ -33049,14 +42366,16 @@ snapshots: term-size@2.2.1: {} - terser-webpack-plugin@5.3.10(webpack@5.92.1): + terser-webpack-plugin@5.3.10(@swc/core@1.7.26(@swc/helpers@0.5.3))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.31.1 - webpack: 5.92.1 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + optionalDependencies: + '@swc/core': 1.7.26(@swc/helpers@0.5.3) terser@5.31.1: dependencies: @@ -33077,6 +42396,10 @@ snapshots: glob: 10.4.2 minimatch: 9.0.5 + text-decoder@1.2.0: + dependencies: + b4a: 1.6.7 + text-extensions@1.9.0: {} text-table@0.2.0: {} @@ -33089,6 +42412,22 @@ snapshots: dependencies: any-promise: 1.3.0 + three-mesh-bvh@0.7.6(three@0.168.0): + dependencies: + three: 0.168.0 + + three-stdlib@2.33.0(three@0.168.0): + dependencies: + '@types/draco3d': 1.4.10 + '@types/offscreencanvas': 2019.7.3 + '@types/webxr': 0.5.20 + draco3d: 1.5.7 + fflate: 0.6.10 + potpack: 1.0.2 + three: 0.168.0 + + three@0.168.0: {} + throttle-debounce@5.0.0: {} through2@0.4.2: @@ -33102,6 +42441,8 @@ snapshots: through@2.3.8: {} + thunky@1.1.0: {} + timezone-groups@0.9.1: {} tiny-each-async@2.0.3: @@ -33115,10 +42456,14 @@ snapshots: tinybench@2.8.0: {} + tinybench@2.9.0: {} + tinycolor2@1.6.0: {} tinyexec@0.2.0: {} + tinyexec@0.3.0: {} + tinyglobby@0.2.2: dependencies: fdir: 6.2.0(picomatch@4.0.2) @@ -33137,8 +42482,6 @@ snapshots: tinyspy@3.0.0: {} - titleize@3.0.0: {} - tmp-promise@3.0.3: dependencies: tmp: 0.2.3 @@ -33203,6 +42546,20 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 + troika-three-text@0.49.1(three@0.168.0): + dependencies: + bidi-js: 1.0.3 + three: 0.168.0 + troika-three-utils: 0.49.0(three@0.168.0) + troika-worker-utils: 0.49.0 + webgl-sdf-generator: 1.1.1 + + troika-three-utils@0.49.0(three@0.168.0): + dependencies: + three: 0.168.0 + + troika-worker-utils@0.49.0: {} + trough@2.2.0: {} truncate-utf8-bytes@1.0.2: @@ -33213,20 +42570,20 @@ snapshots: dependencies: typescript: 5.4.5 - ts-evaluator@1.2.0(typescript@5.4.5): + ts-evaluator@1.2.0(typescript@5.6.3): dependencies: ansi-colors: 4.1.3 crosspath: 2.0.0 object-path: 0.11.8 - typescript: 5.4.5 + typescript: 5.6.3 ts-interface-checker@0.1.13: {} - ts-jest@29.1.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)))(typescript@5.4.5): + ts-jest@29.1.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)))(typescript@5.4.5): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5)) + jest: 29.7.0(@types/node@20.12.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -33240,7 +42597,7 @@ snapshots: '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.25.2) - ts-loader@9.5.1(typescript@5.4.5)(webpack@5.92.1): + ts-loader@9.5.1(typescript@5.4.5)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): dependencies: chalk: 4.1.2 enhanced-resolve: 5.17.0 @@ -33248,7 +42605,7 @@ snapshots: semver: 7.5.4 source-map: 0.7.4 typescript: 5.4.5 - webpack: 5.92.1 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) ts-morph@18.0.0: dependencies: @@ -33265,7 +42622,7 @@ snapshots: '@ts-morph/common': 0.24.0 code-block-writer: 13.0.1 - ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5): + ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.12.12)(typescript@5.4.5): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 @@ -33282,72 +42639,79 @@ snapshots: typescript: 5.4.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.7.26(@swc/helpers@0.5.3) - ts-node@10.9.1(@types/node@20.14.12)(typescript@4.9.5): + ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@20.5.1)(typescript@5.6.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.14.12 + '@types/node': 20.5.1 acorn: 8.12.0 acorn-walk: 8.3.2 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.9.5 + typescript: 5.6.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - optional: true + optionalDependencies: + '@swc/core': 1.7.26(@swc/helpers@0.5.3) - ts-node@10.9.1(@types/node@20.14.12)(typescript@5.4.5): + ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.2.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.14.12 + '@types/node': 22.5.0 acorn: 8.12.0 acorn-walk: 8.3.2 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.4.5 + typescript: 5.2.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.7.26(@swc/helpers@0.5.3) optional: true - ts-node@10.9.1(@types/node@20.5.1)(typescript@5.4.5): + ts-node@10.9.1(@swc/core@1.7.26(@swc/helpers@0.5.3))(@types/node@22.5.0)(typescript@5.6.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.5.1 + '@types/node': 22.5.0 acorn: 8.12.0 acorn-walk: 8.3.2 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.4.5 + typescript: 5.6.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.7.26(@swc/helpers@0.5.3) ts-pattern@5.0.8: {} - tsconfck@3.0.1(typescript@5.4.5): + tsconfck@3.0.1(typescript@5.6.3): optionalDependencies: - typescript: 5.4.5 + typescript: 5.6.3 - tsconfck@3.0.2(typescript@5.4.5): + tsconfck@3.0.2(typescript@5.6.3): optionalDependencies: - typescript: 5.4.5 + typescript: 5.6.3 tsconfig-paths-webpack-plugin@4.1.0: dependencies: @@ -33363,6 +42727,8 @@ snapshots: tslib@1.14.1: {} + tslib@2.1.0: {} + tslib@2.3.0: {} tslib@2.6.2: {} @@ -33388,6 +42754,18 @@ snapshots: wcwidth: 1.0.1 yargs: 17.7.2 + tunnel-agent@0.6.0: + dependencies: + safe-buffer: 5.2.1 + + tunnel-rat@0.1.2(@types/react@18.2.35)(immer@10.0.3)(react@18.2.0): + dependencies: + zustand: 4.5.5(@types/react@18.2.35)(immer@10.0.3)(react@18.2.0) + transitivePeerDependencies: + - '@types/react' + - immer + - react + turf-jsts@1.2.3: {} type-check@0.4.0: @@ -33454,16 +42832,20 @@ snapshots: typedarray@0.0.6: {} - typescript@4.9.5: {} - typescript@5.2.2: {} typescript@5.3.3: {} typescript@5.4.5: {} + typescript@5.5.4: {} + + typescript@5.6.3: {} + ua-parser-js@1.0.37: {} + uc.micro@2.1.0: {} + ufo@1.3.1: {} ufo@1.5.4: {} @@ -33499,6 +42881,23 @@ snapshots: undici-types@5.26.5: {} + undici-types@6.18.2: {} + + undici-types@6.19.8: {} + + unicode-canonical-property-names-ecmascript@2.0.1: {} + + unicode-emoji-modifier-base@1.0.0: {} + + unicode-match-property-ecmascript@2.0.0: + dependencies: + unicode-canonical-property-names-ecmascript: 2.0.1 + unicode-property-aliases-ecmascript: 2.1.0 + + unicode-match-property-value-ecmascript@2.2.0: {} + + unicode-property-aliases-ecmascript@2.1.0: {} + unified@10.1.2: dependencies: '@types/unist': 2.0.11 @@ -33509,6 +42908,16 @@ snapshots: trough: 2.2.0 vfile: 5.3.7 + unified@11.0.5: + dependencies: + '@types/unist': 3.0.2 + bail: 2.0.2 + devlop: 1.1.0 + extend: 3.0.2 + is-plain-obj: 4.1.0 + trough: 2.2.0 + vfile: 6.0.3 + unimport@3.4.0(rollup@4.14.1): dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.14.1) @@ -33540,9 +42949,9 @@ snapshots: dependencies: imurmurhash: 0.1.4 - unique-string@2.0.0: + unique-string@3.0.0: dependencies: - crypto-random-string: 2.0.0 + crypto-random-string: 4.0.0 unist-util-find-after@4.0.1: dependencies: @@ -33551,14 +42960,28 @@ snapshots: unist-util-generated@2.0.1: {} + unist-util-is@4.1.0: {} + unist-util-is@5.2.1: dependencies: '@types/unist': 2.0.11 + unist-util-is@6.0.0: + dependencies: + '@types/unist': 3.0.2 + + unist-util-position-from-estree@2.0.0: + dependencies: + '@types/unist': 3.0.2 + unist-util-position@4.0.4: dependencies: '@types/unist': 2.0.11 + unist-util-position@5.0.0: + dependencies: + '@types/unist': 3.0.2 + unist-util-remove-position@4.0.2: dependencies: '@types/unist': 2.0.11 @@ -33572,24 +42995,48 @@ snapshots: dependencies: '@types/unist': 3.0.2 + unist-util-visit-parents@3.1.1: + dependencies: + '@types/unist': 2.0.11 + unist-util-is: 4.1.0 + unist-util-visit-parents@5.1.3: dependencies: '@types/unist': 2.0.11 unist-util-is: 5.2.1 + unist-util-visit-parents@6.0.1: + dependencies: + '@types/unist': 3.0.2 + unist-util-is: 6.0.0 + + unist-util-visit@2.0.3: + dependencies: + '@types/unist': 2.0.11 + unist-util-is: 4.1.0 + unist-util-visit-parents: 3.1.1 + unist-util-visit@4.1.2: dependencies: '@types/unist': 2.0.11 unist-util-is: 5.2.1 unist-util-visit-parents: 5.1.3 + unist-util-visit@5.0.0: + dependencies: + '@types/unist': 3.0.2 + unist-util-is: 6.0.0 + unist-util-visit-parents: 6.0.1 + + universal-user-agent@6.0.1: {} + universalify@0.1.2: {} universalify@2.0.1: {} - unocss@0.62.2(postcss@8.4.32)(rollup@4.14.1)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1)): + unocss@0.62.2(postcss@8.4.32)(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1)): dependencies: - '@unocss/astro': 0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1)) + '@unocss/astro': 0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1)) '@unocss/cli': 0.62.2(rollup@4.14.1) '@unocss/core': 0.62.2 '@unocss/extractor-arbitrary-variants': 0.62.2 @@ -33608,9 +43055,38 @@ snapshots: '@unocss/transformer-compile-class': 0.62.2 '@unocss/transformer-directives': 0.62.2 '@unocss/transformer-variant-group': 0.62.2 - '@unocss/vite': 0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1)) + '@unocss/vite': 0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1)) optionalDependencies: - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1) + transitivePeerDependencies: + - postcss + - rollup + - supports-color + + unocss@0.62.2(postcss@8.4.47)(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): + dependencies: + '@unocss/astro': 0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + '@unocss/cli': 0.62.2(rollup@4.14.1) + '@unocss/core': 0.62.2 + '@unocss/extractor-arbitrary-variants': 0.62.2 + '@unocss/postcss': 0.62.2(postcss@8.4.47) + '@unocss/preset-attributify': 0.62.2 + '@unocss/preset-icons': 0.62.2 + '@unocss/preset-mini': 0.62.2 + '@unocss/preset-tagify': 0.62.2 + '@unocss/preset-typography': 0.62.2 + '@unocss/preset-uno': 0.62.2 + '@unocss/preset-web-fonts': 0.62.2 + '@unocss/preset-wind': 0.62.2 + '@unocss/reset': 0.62.2 + '@unocss/transformer-attributify-jsx': 0.62.2 + '@unocss/transformer-attributify-jsx-babel': 0.62.2 + '@unocss/transformer-compile-class': 0.62.2 + '@unocss/transformer-directives': 0.62.2 + '@unocss/transformer-variant-group': 0.62.2 + '@unocss/vite': 0.62.2(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + optionalDependencies: + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) transitivePeerDependencies: - postcss - rollup @@ -33618,7 +43094,22 @@ snapshots: unpipe@1.0.0: {} - unplugin-auto-import@0.16.7(@vueuse/core@9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)))(rollup@4.14.1): + unplugin-auto-import@0.16.7(@vueuse/core@9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)))(rollup@4.14.1): + dependencies: + '@antfu/utils': 0.7.6 + '@rollup/pluginutils': 5.0.5(rollup@4.14.1) + fast-glob: 3.3.1 + local-pkg: 0.5.0 + magic-string: 0.30.5 + minimatch: 9.0.3 + unimport: 3.4.0(rollup@4.14.1) + unplugin: 1.5.0 + optionalDependencies: + '@vueuse/core': 9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)) + transitivePeerDependencies: + - rollup + + unplugin-auto-import@0.16.7(@vueuse/core@9.13.0(@vue/composition-api@1.7.2(vue@3.4.35(typescript@5.6.3)))(vue@3.4.35(typescript@5.6.3)))(rollup@4.14.1): dependencies: '@antfu/utils': 0.7.6 '@rollup/pluginutils': 5.0.5(rollup@4.14.1) @@ -33629,7 +43120,7 @@ snapshots: unimport: 3.4.0(rollup@4.14.1) unplugin: 1.5.0 optionalDependencies: - '@vueuse/core': 9.13.0(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)) + '@vueuse/core': 9.13.0(@vue/composition-api@1.7.2(vue@3.4.35(typescript@5.6.3)))(vue@3.4.35(typescript@5.6.3)) transitivePeerDependencies: - rollup @@ -33646,7 +43137,7 @@ snapshots: transitivePeerDependencies: - supports-color - unplugin-vue-components@0.25.2(@babel/parser@7.25.3)(rollup@4.14.1)(vue@3.3.7(typescript@5.4.5)): + unplugin-vue-components@0.25.2(@babel/parser@7.25.7)(rollup@4.14.1)(vue@3.3.7(typescript@5.6.3)): dependencies: '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.1.0(rollup@4.14.1) @@ -33658,18 +43149,48 @@ snapshots: minimatch: 9.0.5 resolve: 1.22.8 unplugin: 1.10.1 - vue: 3.3.7(typescript@5.4.5) + vue: 3.3.7(typescript@5.6.3) optionalDependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.7 transitivePeerDependencies: - rollup - supports-color - unplugin-vue-router@0.7.0(rollup@4.14.1)(vue-router@4.2.5(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)): + unplugin-vue-inspector@2.2.0(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): + dependencies: + kolorist: 1.8.0 + unplugin: 1.10.1 + vite-plugin-vue-inspector: 5.2.0(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + transitivePeerDependencies: + - supports-color + - vite + + unplugin-vue-router@0.7.0(rollup@4.14.1)(vue-router@4.2.5(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)): + dependencies: + '@babel/types': 7.23.0 + '@rollup/pluginutils': 5.0.5(rollup@4.14.1) + '@vue-macros/common': 1.10.0(rollup@4.14.1)(vue@3.3.7(typescript@5.6.3)) + ast-walker-scope: 0.5.0(rollup@4.14.1) + chokidar: 3.5.3 + fast-glob: 3.3.1 + json5: 2.2.3 + local-pkg: 0.4.3 + mlly: 1.4.2 + pathe: 1.1.1 + scule: 1.0.0 + unplugin: 1.5.0 + yaml: 2.3.4 + optionalDependencies: + vue-router: 4.2.5(vue@3.3.7(typescript@5.6.3)) + transitivePeerDependencies: + - rollup + - vue + + unplugin-vue-router@0.7.0(rollup@4.14.1)(vue-router@4.4.5(vue@3.4.35(typescript@5.6.3)))(vue@3.4.35(typescript@5.6.3)): dependencies: '@babel/types': 7.23.0 '@rollup/pluginutils': 5.0.5(rollup@4.14.1) - '@vue-macros/common': 1.10.0(rollup@4.14.1)(vue@3.3.7(typescript@5.4.5)) + '@vue-macros/common': 1.10.0(rollup@4.14.1)(vue@3.4.35(typescript@5.6.3)) ast-walker-scope: 0.5.0(rollup@4.14.1) chokidar: 3.5.3 fast-glob: 3.3.1 @@ -33681,7 +43202,7 @@ snapshots: unplugin: 1.5.0 yaml: 2.3.4 optionalDependencies: - vue-router: 4.2.5(vue@3.3.7(typescript@5.4.5)) + vue-router: 4.4.5(vue@3.4.35(typescript@5.6.3)) transitivePeerDependencies: - rollup - vue @@ -33712,37 +43233,61 @@ snapshots: has-value: 0.3.1 isobject: 3.0.1 - untildify@4.0.0: {} - - update-browserslist-db@1.0.13(browserslist@4.22.1): - dependencies: - browserslist: 4.22.1 - escalade: 3.1.1 - picocolors: 1.0.0 - update-browserslist-db@1.0.13(browserslist@4.23.0): dependencies: browserslist: 4.23.0 escalade: 3.1.1 - picocolors: 1.0.1 + picocolors: 1.1.0 update-browserslist-db@1.1.0(browserslist@4.23.1): dependencies: browserslist: 4.23.1 escalade: 3.1.2 - picocolors: 1.0.1 + picocolors: 1.1.0 + + update-browserslist-db@1.1.0(browserslist@4.24.0): + dependencies: + browserslist: 4.24.0 + escalade: 3.1.2 + picocolors: 1.1.0 update-check@1.5.4: dependencies: registry-auth-token: 3.3.2 registry-url: 3.1.0 + update-notifier@6.0.2: + dependencies: + boxen: 7.0.0 + chalk: 5.3.0 + configstore: 6.0.0 + has-yarn: 3.0.0 + import-lazy: 4.0.0 + is-ci: 3.0.1 + is-installed-globally: 0.4.0 + is-npm: 6.0.0 + is-yarn-global: 0.4.1 + latest-version: 7.0.0 + pupa: 3.1.0 + semver: 7.5.4 + semver-diff: 4.0.0 + xdg-basedir: 5.1.0 + uri-js@4.4.1: dependencies: punycode: 2.3.1 urix@0.1.0: {} + url-loader@4.1.1(file-loader@6.2.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + loader-utils: 2.0.4 + mime-types: 2.1.35 + schema-utils: 3.3.0 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + optionalDependencies: + file-loader: 6.2.0(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + use-callback-ref@1.3.0(@types/react@18.2.35)(react@17.0.2): dependencies: react: 17.0.2 @@ -33781,8 +43326,16 @@ snapshots: util-deprecate@1.0.2: {} + utila@0.4.0: {} + + utility-types@3.11.0: {} + utils-merge@1.0.1: {} + uuid@8.3.2: {} + + uuid@9.0.1: {} + uvu@0.5.6: dependencies: dequal: 2.0.3 @@ -33798,6 +43351,8 @@ snapshots: '@types/istanbul-lib-coverage': 2.0.5 convert-source-map: 2.0.0 + v8n@1.5.1: {} + validate-html-nesting@1.2.2: {} validate-npm-package-license@3.0.4: @@ -33813,10 +43368,10 @@ snapshots: vary@1.1.2: {} - vdirs@0.1.8(vue@3.4.35(typescript@5.4.5)): + vdirs@0.1.8(vue@3.4.35(typescript@5.6.3)): dependencies: evtd: 0.2.4 - vue: 3.4.35(typescript@5.4.5) + vue: 3.4.35(typescript@5.6.3) verror@1.10.1: dependencies: @@ -33830,11 +43385,21 @@ snapshots: '@types/unist': 2.0.11 vfile: 5.3.7 + vfile-location@5.0.3: + dependencies: + '@types/unist': 3.0.2 + vfile: 6.0.3 + vfile-message@3.1.4: dependencies: '@types/unist': 2.0.11 unist-util-stringify-position: 3.0.3 + vfile-message@4.0.2: + dependencies: + '@types/unist': 3.0.2 + unist-util-stringify-position: 4.0.0 + vfile@5.3.7: dependencies: '@types/unist': 2.0.11 @@ -33842,13 +43407,18 @@ snapshots: unist-util-stringify-position: 3.0.3 vfile-message: 3.1.4 - vite-node@1.4.0(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1): + vfile@6.0.3: + dependencies: + '@types/unist': 3.0.2 + vfile-message: 4.0.2 + + vite-node@1.4.0(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1): dependencies: cac: 6.7.14 - debug: 4.3.4 - pathe: 1.1.1 - picocolors: 1.0.0 - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + debug: 4.3.6 + pathe: 1.1.2 + picocolors: 1.1.0 + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) transitivePeerDependencies: - '@types/node' - less @@ -33859,13 +43429,29 @@ snapshots: - supports-color - terser - vite-node@2.0.4(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1): + vite-node@2.0.4(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1): dependencies: cac: 6.7.14 - debug: 4.3.5 + debug: 4.3.6 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + + vite-node@2.1.2(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1): + dependencies: + cac: 6.7.14 + debug: 4.3.6 + pathe: 1.1.2 + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) transitivePeerDependencies: - '@types/node' - less @@ -33876,7 +43462,58 @@ snapshots: - supports-color - terser - vite-plugin-pages@0.32.0(@vue/compiler-sfc@3.4.35)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): + vite-plugin-compression@0.5.1(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): + dependencies: + chalk: 4.1.2 + debug: 4.3.6 + fs-extra: 10.1.0 + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + transitivePeerDependencies: + - supports-color + + vite-plugin-html@3.2.2(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): + dependencies: + '@rollup/pluginutils': 4.2.1 + colorette: 2.0.20 + connect-history-api-fallback: 1.6.0 + consola: 2.15.3 + dotenv: 16.4.5 + dotenv-expand: 8.0.3 + ejs: 3.1.10 + fast-glob: 3.3.2 + fs-extra: 10.1.0 + html-minifier-terser: 6.1.0 + node-html-parser: 5.4.2 + pathe: 0.2.0 + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + + vite-plugin-inspect@0.8.7(rollup@4.14.1)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): + dependencies: + '@antfu/utils': 0.7.10 + '@rollup/pluginutils': 5.1.0(rollup@4.14.1) + debug: 4.3.6 + error-stack-parser-es: 0.1.5 + fs-extra: 11.2.0 + open: 10.1.0 + perfect-debounce: 1.0.0 + picocolors: 1.1.0 + sirv: 2.0.4 + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + transitivePeerDependencies: + - rollup + - supports-color + + vite-plugin-mkcert@1.17.6(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): + dependencies: + '@octokit/rest': 20.1.1 + axios: 1.7.7(debug@4.3.6) + debug: 4.3.6 + picocolors: 1.1.0 + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + transitivePeerDependencies: + - supports-color + + vite-plugin-pages@0.32.0(@vue/compiler-sfc@3.4.35)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): dependencies: '@types/debug': 4.1.12 debug: 4.3.4 @@ -33886,14 +43523,14 @@ snapshots: json5: 2.2.3 local-pkg: 0.5.0 picocolors: 1.0.0 - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) yaml: 2.3.4 optionalDependencies: '@vue/compiler-sfc': 3.4.35 transitivePeerDependencies: - supports-color - vite-plugin-solid@2.7.2(solid-js@1.8.5)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): + vite-plugin-solid@2.7.2(solid-js@1.8.5)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): dependencies: '@babel/core': 7.23.2 '@babel/preset-typescript': 7.23.2(@babel/core@7.23.2) @@ -33902,8 +43539,23 @@ snapshots: merge-anything: 5.1.7 solid-js: 1.8.5 solid-refresh: 0.5.3(solid-js@1.8.5) - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vitefu: 0.2.5(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vitefu: 0.2.5(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + transitivePeerDependencies: + - supports-color + + vite-plugin-vue-inspector@5.2.0(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): + dependencies: + '@babel/core': 7.25.2 + '@babel/plugin-proposal-decorators': 7.24.1(@babel/core@7.25.2) + '@babel/plugin-syntax-import-attributes': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.2) + '@babel/plugin-transform-typescript': 7.25.2(@babel/core@7.25.2) + '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.25.2) + '@vue/compiler-dom': 3.4.35 + kolorist: 1.8.0 + magic-string: 0.30.11 + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) transitivePeerDependencies: - supports-color @@ -34027,7 +43679,7 @@ snapshots: - walrus - whiskers - vite-plugin-vue2@2.0.3(ejs@3.1.10)(lodash@4.17.21)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue-template-compiler@2.6.14(vue@2.6.14))(vue@2.6.14): + vite-plugin-vue2@2.0.3(ejs@3.1.10)(lodash@4.17.21)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1))(vue-template-compiler@2.6.14(vue@2.6.14))(vue@2.6.14): dependencies: '@babel/core': 7.24.3 '@babel/parser': 7.24.1 @@ -34057,7 +43709,7 @@ snapshots: rollup: 2.79.1 slash: 3.0.0 source-map: 0.7.4 - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) vue-template-babel-compiler: 1.2.0(vue-template-compiler@2.6.14(vue@2.6.14)) vue-template-compiler: 2.6.14(vue@2.6.14) transitivePeerDependencies: @@ -34117,53 +43769,53 @@ snapshots: - walrus - whiskers - vite-svg-loader@5.1.0(vue@3.3.7(typescript@5.4.5)): + vite-svg-loader@5.1.0(vue@3.3.7(typescript@5.6.3)): dependencies: svgo: 3.2.0 - vue: 3.3.7(typescript@5.4.5) + vue: 3.3.7(typescript@5.6.3) - vite-tsconfig-paths@4.3.1(typescript@5.4.5)(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): + vite-tsconfig-paths@4.3.1(typescript@5.6.3)(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): dependencies: debug: 4.3.4 globrex: 0.1.2 - tsconfck: 3.0.1(typescript@5.4.5) + tsconfck: 3.0.1(typescript@5.6.3) optionalDependencies: - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) transitivePeerDependencies: - supports-color - typescript - vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1): + vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.69.5)(terser@5.31.1): dependencies: esbuild: 0.20.2 - postcss: 8.4.39 + postcss: 8.4.47 rollup: 4.14.1 optionalDependencies: - '@types/node': 20.14.12 + '@types/node': 22.5.0 fsevents: 2.3.3 less: 4.2.0 lightningcss: 1.25.1 sass: 1.69.5 terser: 5.31.1 - vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1): + vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1): dependencies: esbuild: 0.20.2 - postcss: 8.4.39 + postcss: 8.4.47 rollup: 4.14.1 optionalDependencies: - '@types/node': 20.14.12 + '@types/node': 22.5.0 fsevents: 2.3.3 less: 4.2.0 lightningcss: 1.25.1 sass: 1.74.1 terser: 5.31.1 - vitefu@0.2.5(vite@5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): + vitefu@0.2.5(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)): optionalDependencies: - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vitest@2.0.4(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1): + vitest@2.0.4(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.4 @@ -34173,7 +43825,7 @@ snapshots: '@vitest/spy': 2.0.4 '@vitest/utils': 2.0.4 chai: 5.1.1 - debug: 4.3.5 + debug: 4.3.6 execa: 8.0.1 magic-string: 0.30.10 pathe: 1.1.2 @@ -34181,66 +43833,115 @@ snapshots: tinybench: 2.8.0 tinypool: 1.0.0 tinyrainbow: 1.2.0 - vite: 5.2.8(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) - vite-node: 2.0.4(@types/node@20.14.12)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite-node: 2.0.4(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 20.14.12 + '@types/node': 22.5.0 + transitivePeerDependencies: + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + + vitest@2.1.2(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1): + dependencies: + '@vitest/expect': 2.1.2 + '@vitest/mocker': 2.1.2(vite@5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1)) + '@vitest/pretty-format': 2.1.2 + '@vitest/runner': 2.1.2 + '@vitest/snapshot': 2.1.2 + '@vitest/spy': 2.1.2 + '@vitest/utils': 2.1.2 + chai: 5.1.1 + debug: 4.3.6 + magic-string: 0.30.11 + pathe: 1.1.2 + std-env: 3.7.0 + tinybench: 2.9.0 + tinyexec: 0.3.0 + tinypool: 1.0.0 + tinyrainbow: 1.2.0 + vite: 5.2.8(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + vite-node: 2.1.2(@types/node@22.5.0)(less@4.2.0)(lightningcss@1.25.1)(sass@1.74.1)(terser@5.31.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.5.0 transitivePeerDependencies: - less - lightningcss + - msw - sass - stylus - sugarss - supports-color - terser - vooks@0.2.12(vue@3.4.35(typescript@5.4.5)): + vooks@0.2.12(vue@3.4.35(typescript@5.6.3)): dependencies: evtd: 0.2.4 - vue: 3.4.35(typescript@5.4.5) + vue: 3.4.35(typescript@5.6.3) + + vscode-languageserver-textdocument@1.0.12: {} - vscode-languageserver-textdocument@1.0.11: {} + vscode-oniguruma@1.7.0: {} + + vscode-textmate@5.2.0: {} vscode-uri@3.0.8: {} - vue-demi@0.14.10(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.4.5)))(vue@3.3.7(typescript@5.4.5)): + vue-demi@0.14.10(@vue/composition-api@1.7.2(vue@3.3.7(typescript@5.6.3)))(vue@3.3.7(typescript@5.6.3)): + dependencies: + vue: 3.3.7(typescript@5.6.3) + optionalDependencies: + '@vue/composition-api': 1.7.2(vue@3.3.7(typescript@5.6.3)) + + vue-demi@0.14.10(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.6.3)))(vue@3.4.15(typescript@5.6.3)): dependencies: - vue: 3.3.7(typescript@5.4.5) + vue: 3.4.15(typescript@5.6.3) optionalDependencies: - '@vue/composition-api': 1.7.2(vue@3.3.7(typescript@5.4.5)) + '@vue/composition-api': 1.7.2(vue@3.4.15(typescript@5.6.3)) - vue-demi@0.14.10(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.4.5)))(vue@3.4.15(typescript@5.4.5)): + vue-demi@0.14.10(@vue/composition-api@1.7.2(vue@3.4.35(typescript@5.6.3)))(vue@3.4.35(typescript@5.6.3)): dependencies: - vue: 3.4.15(typescript@5.4.5) + vue: 3.4.35(typescript@5.6.3) optionalDependencies: - '@vue/composition-api': 1.7.2(vue@3.4.15(typescript@5.4.5)) + '@vue/composition-api': 1.7.2(vue@3.4.35(typescript@5.6.3)) + optional: true - vue-demi@0.14.7(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.4.5)))(vue@3.4.15(typescript@5.4.5)): + vue-demi@0.14.7(@vue/composition-api@1.7.2(vue@3.4.15(typescript@5.6.3)))(vue@3.4.15(typescript@5.6.3)): dependencies: - vue: 3.4.15(typescript@5.4.5) + vue: 3.4.15(typescript@5.6.3) optionalDependencies: - '@vue/composition-api': 1.7.2(vue@3.4.15(typescript@5.4.5)) + '@vue/composition-api': 1.7.2(vue@3.4.15(typescript@5.6.3)) - vue-router@4.2.5(vue@3.3.12(typescript@5.4.5)): + vue-router@4.2.5(vue@3.3.12(typescript@5.6.3)): dependencies: '@vue/devtools-api': 6.5.1 - vue: 3.3.12(typescript@5.4.5) + vue: 3.3.12(typescript@5.6.3) - vue-router@4.2.5(vue@3.3.7(typescript@5.4.5)): + vue-router@4.2.5(vue@3.3.7(typescript@5.6.3)): dependencies: '@vue/devtools-api': 6.5.1 - vue: 3.3.7(typescript@5.4.5) + vue: 3.3.7(typescript@5.6.3) - vue-router@4.2.5(vue@3.4.15(typescript@5.4.5)): + vue-router@4.2.5(vue@3.4.15(typescript@5.6.3)): dependencies: '@vue/devtools-api': 6.5.1 - vue: 3.4.15(typescript@5.4.5) + vue: 3.4.15(typescript@5.6.3) - vue-router@4.3.2(vue@3.4.27(typescript@5.4.5)): + vue-router@4.3.2(vue@3.4.27(typescript@5.6.3)): dependencies: '@vue/devtools-api': 6.5.1 - vue: 3.4.27(typescript@5.4.5) + vue: 3.4.27(typescript@5.6.3) + + vue-router@4.4.5(vue@3.4.35(typescript@5.6.3)): + dependencies: + '@vue/devtools-api': 6.6.4 + vue: 3.4.35(typescript@5.6.3) vue-template-babel-compiler@1.2.0(vue-template-compiler@2.6.14(vue@2.6.14)): dependencies: @@ -34272,17 +43973,24 @@ snapshots: he: 1.2.0 vue: 2.7.16 + vue-template-compiler@2.7.16(vue@3.4.35(typescript@5.6.3)): + dependencies: + de-indent: 1.0.2 + he: 1.2.0 + vue: 3.4.35(typescript@5.6.3) + optional: true + vue-template-es2015-compiler@1.9.1: {} - vue-types@3.0.2(vue@3.3.7(typescript@5.4.5)): + vue-types@3.0.2(vue@3.3.7(typescript@5.6.3)): dependencies: is-plain-object: 3.0.1 - vue: 3.3.7(typescript@5.4.5) + vue: 3.3.7(typescript@5.6.3) - vue-types@3.0.2(vue@3.4.15(typescript@5.4.5)): + vue-types@3.0.2(vue@3.4.15(typescript@5.6.3)): dependencies: is-plain-object: 3.0.1 - vue: 3.4.15(typescript@5.4.5) + vue: 3.4.15(typescript@5.6.3) vue@2.6.14: {} @@ -34291,68 +43999,66 @@ snapshots: '@vue/compiler-sfc': 2.7.16 csstype: 3.1.3 - vue@3.3.12(typescript@5.4.5): + vue@3.3.12(typescript@5.6.3): dependencies: '@vue/compiler-dom': 3.3.12 '@vue/compiler-sfc': 3.3.12 '@vue/runtime-dom': 3.3.12 - '@vue/server-renderer': 3.3.12(vue@3.3.12(typescript@5.4.5)) + '@vue/server-renderer': 3.3.12(vue@3.3.12(typescript@5.6.3)) '@vue/shared': 3.3.12 optionalDependencies: - typescript: 5.4.5 + typescript: 5.6.3 - vue@3.3.7(typescript@5.4.5): + vue@3.3.7(typescript@5.6.3): dependencies: '@vue/compiler-dom': 3.3.7 '@vue/compiler-sfc': 3.3.7 '@vue/runtime-dom': 3.3.7 - '@vue/server-renderer': 3.3.7(vue@3.3.7(typescript@5.4.5)) + '@vue/server-renderer': 3.3.7(vue@3.3.7(typescript@5.6.3)) '@vue/shared': 3.3.7 optionalDependencies: - typescript: 5.4.5 + typescript: 5.6.3 - vue@3.4.15(typescript@5.4.5): + vue@3.4.15(typescript@5.6.3): dependencies: '@vue/compiler-dom': 3.4.15 '@vue/compiler-sfc': 3.4.15 '@vue/runtime-dom': 3.4.15 - '@vue/server-renderer': 3.4.15(vue@3.4.15(typescript@5.4.5)) + '@vue/server-renderer': 3.4.15(vue@3.4.15(typescript@5.6.3)) '@vue/shared': 3.4.15 optionalDependencies: - typescript: 5.4.5 + typescript: 5.6.3 - vue@3.4.27(typescript@5.4.5): + vue@3.4.27(typescript@5.6.3): dependencies: '@vue/compiler-dom': 3.4.27 '@vue/compiler-sfc': 3.4.27 '@vue/runtime-dom': 3.4.27 - '@vue/server-renderer': 3.4.27(vue@3.4.27(typescript@5.4.5)) + '@vue/server-renderer': 3.4.27(vue@3.4.27(typescript@5.6.3)) '@vue/shared': 3.4.27 optionalDependencies: - typescript: 5.4.5 + typescript: 5.6.3 - vue@3.4.35(typescript@5.4.5): + vue@3.4.35(typescript@5.6.3): dependencies: '@vue/compiler-dom': 3.4.35 '@vue/compiler-sfc': 3.4.35 '@vue/runtime-dom': 3.4.35 - '@vue/server-renderer': 3.4.35(vue@3.4.35(typescript@5.4.5)) + '@vue/server-renderer': 3.4.35(vue@3.4.35(typescript@5.6.3)) '@vue/shared': 3.4.35 optionalDependencies: - typescript: 5.4.5 + typescript: 5.6.3 - vueuc@0.4.58(vue@3.4.35(typescript@5.4.5)): + vueuc@0.4.58(vue@3.4.35(typescript@5.6.3)): dependencies: - '@css-render/vue3-ssr': 0.15.14(vue@3.4.35(typescript@5.4.5)) + '@css-render/vue3-ssr': 0.15.14(vue@3.4.35(typescript@5.6.3)) '@juggle/resize-observer': 3.4.0 css-render: 0.15.14 evtd: 0.2.4 seemly: 0.3.8 - vdirs: 0.1.8(vue@3.4.35(typescript@5.4.5)) - vooks: 0.2.12(vue@3.4.35(typescript@5.4.5)) - vue: 3.4.35(typescript@5.4.5) - - walkdir@0.4.1: {} + vdirs: 0.1.8(vue@3.4.35(typescript@5.6.3)) + vooks: 0.2.12(vue@3.4.35(typescript@5.6.3)) + vue: 3.4.35(typescript@5.6.3) walker@1.0.8: dependencies: @@ -34367,14 +44073,95 @@ snapshots: glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 + wbuf@1.7.3: + dependencies: + minimalistic-assert: 1.0.1 + wcwidth@1.0.1: dependencies: defaults: 1.0.4 web-namespaces@2.0.1: {} + webgl-constants@1.1.1: {} + + webgl-sdf-generator@1.1.1: {} + webidl-conversions@3.0.1: {} + webpack-bundle-analyzer@4.10.2(bufferutil@4.0.8): + dependencies: + '@discoveryjs/json-ext': 0.5.7 + acorn: 8.12.0 + acorn-walk: 8.3.2 + commander: 7.2.0 + debounce: 1.2.1 + escape-string-regexp: 4.0.0 + gzip-size: 6.0.0 + html-escaper: 2.0.2 + opener: 1.5.2 + picocolors: 1.1.0 + sirv: 2.0.4 + ws: 7.5.10(bufferutil@4.0.8) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + webpack-dev-middleware@5.3.4(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + colorette: 2.0.20 + memfs: 3.5.3 + mime-types: 2.1.35 + range-parser: 1.2.1 + schema-utils: 4.2.0 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + + webpack-dev-server@4.15.2(bufferutil@4.0.8)(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + '@types/bonjour': 3.5.13 + '@types/connect-history-api-fallback': 1.5.4 + '@types/express': 4.17.21 + '@types/serve-index': 1.9.4 + '@types/serve-static': 1.15.4 + '@types/sockjs': 0.3.36 + '@types/ws': 8.5.8 + ansi-html-community: 0.0.8 + bonjour-service: 1.2.1 + chokidar: 3.6.0 + colorette: 2.0.20 + compression: 1.7.4 + connect-history-api-fallback: 2.0.0 + default-gateway: 6.0.3 + express: 4.19.2 + graceful-fs: 4.2.11 + html-entities: 2.3.3 + http-proxy-middleware: 2.0.7(@types/express@4.17.21) + ipaddr.js: 2.2.0 + launch-editor: 2.9.1 + open: 8.4.2 + p-retry: 4.6.2 + rimraf: 3.0.2 + schema-utils: 4.2.0 + selfsigned: 2.4.1 + serve-index: 1.9.1 + sockjs: 0.3.24 + spdy: 4.0.2 + webpack-dev-middleware: 5.3.4(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) + ws: 8.14.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) + optionalDependencies: + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + transitivePeerDependencies: + - bufferutil + - debug + - supports-color + - utf-8-validate + + webpack-merge@5.10.0: + dependencies: + clone-deep: 4.0.1 + flat: 5.0.2 + wildcard: 2.0.1 + webpack-node-externals@3.0.0: {} webpack-sources@3.2.3: {} @@ -34385,7 +44172,7 @@ snapshots: webpack-virtual-modules@0.6.2: {} - webpack@5.92.1: + webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.5 @@ -34394,7 +44181,7 @@ snapshots: '@webassemblyjs/wasm-parser': 1.12.1 acorn: 8.12.0 acorn-import-attributes: 1.9.5(acorn@8.12.0) - browserslist: 4.23.0 + browserslist: 4.23.1 chrome-trace-event: 1.0.3 enhanced-resolve: 5.17.0 es-module-lexer: 1.5.4 @@ -34408,7 +44195,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(webpack@5.92.1) + terser-webpack-plugin: 5.3.10(@swc/core@1.7.26(@swc/helpers@0.5.3))(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))) watchpack: 2.4.1 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -34416,6 +44203,22 @@ snapshots: - esbuild - uglify-js + webpackbar@5.0.2(webpack@5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3))): + dependencies: + chalk: 4.1.2 + consola: 2.15.3 + pretty-time: 1.1.0 + std-env: 3.7.0 + webpack: 5.92.1(@swc/core@1.7.26(@swc/helpers@0.5.3)) + + websocket-driver@0.7.4: + dependencies: + http-parser-js: 0.5.8 + safe-buffer: 5.2.1 + websocket-extensions: 0.1.4 + + websocket-extensions@0.1.4: {} + whatwg-url@5.0.0: dependencies: tr46: 0.0.3 @@ -34472,6 +44275,8 @@ snapshots: dependencies: string-width: 5.1.2 + wildcard@2.0.1: {} + window-size@0.1.0: {} wmf@1.0.2: {} @@ -34516,6 +44321,10 @@ snapshots: imurmurhash: 0.1.4 signal-exit: 3.0.7 + ws@7.5.10(bufferutil@4.0.8): + optionalDependencies: + bufferutil: 4.0.8 + ws@8.14.2(bufferutil@4.0.8)(utf-8-validate@6.0.3): optionalDependencies: bufferutil: 4.0.8 @@ -34526,7 +44335,7 @@ snapshots: opencollective: 1.0.3 opencollective-postinstall: 2.0.3 - xdg-basedir@4.0.0: {} + xdg-basedir@5.1.0: {} xlsx-js-style@1.2.0: dependencies: @@ -34551,6 +44360,10 @@ snapshots: wmf: 1.0.2 word: 0.3.0 + xml-js@1.6.11: + dependencies: + sax: 1.3.0 + xmlbuilder@15.1.1: {} xss@1.0.11: @@ -34589,6 +44402,8 @@ snapshots: yaml@2.3.4: {} + yaml@2.5.1: {} + yargs-parser@18.1.3: dependencies: camelcase: 5.3.1 @@ -34650,6 +44465,11 @@ snapshots: buffer-crc32: 0.2.13 fd-slicer: 1.1.0 + yauzl@3.1.3: + dependencies: + buffer-crc32: 0.2.13 + pend: 1.2.0 + yjs@13.6.18: dependencies: lib0: 0.2.97 @@ -34688,12 +44508,9 @@ snapshots: react: 18.2.0 zustand: 4.5.5(@types/react@18.2.35)(immer@10.0.3)(react@18.2.0) - zustand-utils@1.3.2(react@18.2.0)(zustand@4.5.5(@types/react@18.2.35)(immer@9.0.21)(react@18.2.0)): - dependencies: - '@babel/runtime': 7.25.0 - fast-deep-equal: 3.1.3 + zustand@3.7.2(react@18.2.0): + optionalDependencies: react: 18.2.0 - zustand: 4.5.5(@types/react@18.2.35)(immer@9.0.21)(react@18.2.0) zustand@4.5.5(@types/react@18.2.35)(immer@10.0.3)(react@18.2.0): dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index a72279fc7..969690c4d 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -5,3 +5,4 @@ packages: - rust-plugins/* - js-plugins/* - bench/ + - docs/ diff --git a/rust-plugins/react/CHANGELOG.md b/rust-plugins/react/CHANGELOG.md index ce2129d3a..f6c6ec5f0 100644 --- a/rust-plugins/react/CHANGELOG.md +++ b/rust-plugins/react/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 2.0.0-nightly-20241022124925 + +### Major Changes + +- 6a1038c: update nightly tag + ## 1.2.4 ### Patch Changes diff --git a/rust-plugins/react/package.json b/rust-plugins/react/package.json index b4ba8952b..acfd00d99 100644 --- a/rust-plugins/react/package.json +++ b/rust-plugins/react/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/plugin-react", - "version": "1.2.4", + "version": "2.0.0-nightly-20241022124925", "main": "index.js", "types": "index.d.ts", "type": "module", diff --git a/rust-plugins/react/src/react_refresh.rs b/rust-plugins/react/src/react_refresh.rs index 5ae6417a6..b96c5a408 100644 --- a/rust-plugins/react/src/react_refresh.rs +++ b/rust-plugins/react/src/react_refresh.rs @@ -75,8 +75,7 @@ fn inject_runtime_import(lib: &Library, ast: &mut SwcModule) { // inject react boundary detection let react_boundary_import = format!("import * as ReactRefreshUtil from '{IS_REACT_REFRESH_BOUNDARY}'"); - let react_boundary_import_decl = - parse_import_decl("ReactRefreshUtil", &react_boundary_import); + let react_boundary_import_decl = parse_import_decl("ReactRefreshUtil", &react_boundary_import); ast.body.insert( 0, diff --git a/rust-plugins/replace-dirname/.gitignore b/rust-plugins/replace-dirname/.gitignore new file mode 100644 index 000000000..c70c11233 --- /dev/null +++ b/rust-plugins/replace-dirname/.gitignore @@ -0,0 +1,2 @@ +*.farm +*.node \ No newline at end of file diff --git a/rust-plugins/replace-dirname/CHANGELOG.md b/rust-plugins/replace-dirname/CHANGELOG.md new file mode 100644 index 000000000..a2f8b37f3 --- /dev/null +++ b/rust-plugins/replace-dirname/CHANGELOG.md @@ -0,0 +1,7 @@ +# @farmfe/plugin-replace-dirname + +## 1.0.0-nightly-20241024075304 + +### Major Changes + +- 9a1b2b9: bump replace-dirname plugin diff --git a/rust-plugins/replace-dirname/Cargo.toml b/rust-plugins/replace-dirname/Cargo.toml new file mode 100644 index 000000000..263af8932 --- /dev/null +++ b/rust-plugins/replace-dirname/Cargo.toml @@ -0,0 +1,17 @@ +[package] +edition = "2021" +name = "farmfe_plugin_replace_dirname" +version = "0.0.0" + +[lib] +crate-type = ["cdylib", "rlib"] + +[dependencies] +farmfe_core = { version = "*", path = "../../crates/core" } +farmfe_macro_plugin = { version = "*", path = "../../crates/macro_plugin" } +farmfe_toolkit_plugin_types = { version = "*", path = "../../crates/toolkit_plugin_types" } +farmfe_toolkit = { version = "*", path = "../../crates/toolkit" } +regex = "1.7.3" +serde = { version = "1.0", features = ["derive", "rc"] } +serde_json = { version = "1.0", features = ["preserve_order"] } +url = "2.3.1" diff --git a/rust-plugins/replace-dirname/index.d.ts b/rust-plugins/replace-dirname/index.d.ts new file mode 100755 index 000000000..299c09ef0 --- /dev/null +++ b/rust-plugins/replace-dirname/index.d.ts @@ -0,0 +1,13 @@ +export interface IOptions { + /** + * The path to the root of the project + */ + include?: string[]; + /** + * exclude the path from the project + */ + exclude?: string[]; +} + +const binPath: string; +export default binPath; diff --git a/rust-plugins/replace-dirname/index.js b/rust-plugins/replace-dirname/index.js new file mode 100755 index 000000000..46ca68e7b --- /dev/null +++ b/rust-plugins/replace-dirname/index.js @@ -0,0 +1,142 @@ +import { existsSync, readFileSync } from "fs"; +import { createRequire } from "module"; +import { dirname, join } from "path"; +import { fileURLToPath } from "url"; + +const { platform, arch } = process; +const currentDir = dirname(fileURLToPath(import.meta.url)); + +let binPath = null; + +const require = createRequire(import.meta.url); + +function isMusl() { + // For Node 10 + if (!process.report || typeof process.report.getReport !== "function") { + try { + return readFileSync("/usr/bin/ldd", "utf8").includes("musl"); + } catch (e) { + return true; + } + } else { + const { glibcVersionRuntime } = process.report.getReport().header; + return !glibcVersionRuntime; + } +} + +switch (platform) { + case "win32": + switch (arch) { + case "x64": + if (existsSync(join(currentDir, "./npm/win32-x64-msvc/index.farm"))) { + binPath = join(currentDir, "./npm/win32-x64-msvc/index.farm"); + } else { + binPath = require.resolve( + "@farmfe/plugin-replace-dirname-win32-x64-msvc", + ); + } + + break; + case "ia32": + if (existsSync(join(currentDir, "./npm/win32-ia32-msvc/index.farm"))) { + binPath = join(currentDir, "./npm/win32-ia32-msvc/index.farm"); + } else { + binPath = require.resolve( + "@farmfe/plugin-replace-dirname-win32-ia32-msvc", + ); + } + + break; + case "arm64": + if (existsSync(join(currentDir, "./npm/win32-arm64-msvc/index.farm"))) { + binPath = join(currentDir, "./npm/win32-arm64-msvc/index.farm"); + } else { + binPath = require.resolve( + "@farmfe/plugin-replace-dirname-win32-arm64-msvc", + ); + } + + break; + default: + throw new Error(`Unsupported architecture on Windows: ${arch}`); + } + break; + case "darwin": + switch (arch) { + case "x64": + if (existsSync(join(currentDir, "./npm/darwin-x64/index.farm"))) { + binPath = join(currentDir, "./npm/darwin-x64/index.farm"); + } else { + binPath = require.resolve( + "@farmfe/plugin-replace-dirname-darwin-x64", + ); + } + break; + case "arm64": + if (existsSync(join(currentDir, "./npm/darwin-arm64/index.farm"))) { + binPath = join(currentDir, "./npm/darwin-arm64/index.farm"); + } else { + binPath = require.resolve( + "@farmfe/plugin-replace-dirname-darwin-arm64", + ); + } + break; + default: + throw new Error(`Unsupported architecture on macOS: ${arch}`); + } + break; + case "linux": + switch (arch) { + case "x64": + if (isMusl()) { + if (existsSync(join(currentDir, "./npm/linux-x64-musl/index.farm"))) { + binPath = join(currentDir, "./npm/linux-x64-musl/index.farm"); + } else { + binPath = require.resolve( + "@farmfe/plugin-replace-dirname-linux-x64-musl", + ); + } + } else { + if (existsSync(join(currentDir, "./npm/linux-x64-gnu/index.farm"))) { + binPath = join(currentDir, "./npm/linux-x64-gnu/index.farm"); + } else { + binPath = require.resolve( + "@farmfe/plugin-replace-dirname-linux-x64-gnu", + ); + } + } + + break; + + case "arm64": + if (isMusl()) { + if ( + existsSync(join(currentDir, "./npm/linux-arm64-musl/index.farm")) + ) { + binPath = join(currentDir, "./npm/linux-arm64-musl/index.farm"); + } else { + binPath = require.resolve( + "@farmfe/plugin-replace-dirname-linux-arm64-musl", + ); + } + } else { + if ( + existsSync(join(currentDir, "./npm/linux-arm64-gnu/index.farm")) + ) { + binPath = join(currentDir, "./npm/linux-arm64-gnu/index.farm"); + } else { + binPath = require.resolve( + "@farmfe/plugin-replace-dirname-linux-arm64-gnu", + ); + } + } + break; + default: + throw new Error(`Unsupported architecture on Linux: ${arch}`); + } + break; + default: + throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`); +} + +export default binPath; diff --git a/rust-plugins/replace-dirname/npm/darwin-arm64/README.md b/rust-plugins/replace-dirname/npm/darwin-arm64/README.md new file mode 100644 index 000000000..a386239f4 --- /dev/null +++ b/rust-plugins/replace-dirname/npm/darwin-arm64/README.md @@ -0,0 +1,3 @@ +# `@farmfe/plugin-replace-dirname-darwin-arm64` + +This is the **aarch64-apple-darwin** binary for `@farmfe/plugin-replace-dirname` diff --git a/rust-plugins/replace-dirname/npm/darwin-arm64/package.json b/rust-plugins/replace-dirname/npm/darwin-arm64/package.json new file mode 100644 index 000000000..5a481bd6e --- /dev/null +++ b/rust-plugins/replace-dirname/npm/darwin-arm64/package.json @@ -0,0 +1,18 @@ +{ + "name": "@farmfe/plugin-replace-dirname-darwin-arm64", + "version": "0.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} diff --git a/rust-plugins/replace-dirname/npm/darwin-x64/README.md b/rust-plugins/replace-dirname/npm/darwin-x64/README.md new file mode 100644 index 000000000..31572db33 --- /dev/null +++ b/rust-plugins/replace-dirname/npm/darwin-x64/README.md @@ -0,0 +1,3 @@ +# `@farmfe/plugin-replace-dirname-darwin-x64` + +This is the **x86_64-apple-darwin** binary for `@farmfe/plugin-replace-dirname` diff --git a/rust-plugins/replace-dirname/npm/darwin-x64/package.json b/rust-plugins/replace-dirname/npm/darwin-x64/package.json new file mode 100644 index 000000000..752bf7950 --- /dev/null +++ b/rust-plugins/replace-dirname/npm/darwin-x64/package.json @@ -0,0 +1,18 @@ +{ + "name": "@farmfe/plugin-replace-dirname-darwin-x64", + "version": "0.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} diff --git a/rust-plugins/replace-dirname/npm/linux-arm64-gnu/README.md b/rust-plugins/replace-dirname/npm/linux-arm64-gnu/README.md new file mode 100644 index 000000000..ddd7dfb9d --- /dev/null +++ b/rust-plugins/replace-dirname/npm/linux-arm64-gnu/README.md @@ -0,0 +1,3 @@ +# `@farmfe/plugin-react-linux-arm64-gnu` + +This is the **aarch64-unknown-linux-gnu** binary for `@farmfe/plugin-react` diff --git a/rust-plugins/replace-dirname/npm/linux-arm64-gnu/package.json b/rust-plugins/replace-dirname/npm/linux-arm64-gnu/package.json new file mode 100644 index 000000000..ccef8ff4a --- /dev/null +++ b/rust-plugins/replace-dirname/npm/linux-arm64-gnu/package.json @@ -0,0 +1,21 @@ +{ + "name": "@farmfe/plugin-replace-dirname-linux-arm64-gnu", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ] +} diff --git a/rust-plugins/replace-dirname/npm/linux-arm64-musl/README.md b/rust-plugins/replace-dirname/npm/linux-arm64-musl/README.md new file mode 100644 index 000000000..a64fd85dd --- /dev/null +++ b/rust-plugins/replace-dirname/npm/linux-arm64-musl/README.md @@ -0,0 +1,3 @@ +# `@farmfe/plugin-replace-dirname-linux-arm64-musl` + +This is the **aarch64-unknown-linux-musl** binary for `@farmfe/plugin-replace-dirname` diff --git a/rust-plugins/replace-dirname/npm/linux-arm64-musl/package.json b/rust-plugins/replace-dirname/npm/linux-arm64-musl/package.json new file mode 100644 index 000000000..c9ea5b92b --- /dev/null +++ b/rust-plugins/replace-dirname/npm/linux-arm64-musl/package.json @@ -0,0 +1,21 @@ +{ + "name": "@farmfe/plugin-replace-dirname-linux-arm64-musl", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ] +} diff --git a/rust-plugins/replace-dirname/npm/linux-x64-gnu/README.md b/rust-plugins/replace-dirname/npm/linux-x64-gnu/README.md new file mode 100644 index 000000000..2c17903a1 --- /dev/null +++ b/rust-plugins/replace-dirname/npm/linux-x64-gnu/README.md @@ -0,0 +1,3 @@ +# `@farmfe/plugin-replace-dirname-linux-x64-gnu` + +This is the **x86_64-unknown-linux-gnu** binary for `@farmfe/plugin-replace-dirname` diff --git a/rust-plugins/replace-dirname/npm/linux-x64-gnu/package.json b/rust-plugins/replace-dirname/npm/linux-x64-gnu/package.json new file mode 100644 index 000000000..5a107f359 --- /dev/null +++ b/rust-plugins/replace-dirname/npm/linux-x64-gnu/package.json @@ -0,0 +1,21 @@ +{ + "name": "@farmfe/plugin-replace-dirname-linux-x64-gnu", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ] +} diff --git a/rust-plugins/replace-dirname/npm/linux-x64-musl/README.md b/rust-plugins/replace-dirname/npm/linux-x64-musl/README.md new file mode 100644 index 000000000..4947d1e79 --- /dev/null +++ b/rust-plugins/replace-dirname/npm/linux-x64-musl/README.md @@ -0,0 +1,3 @@ +# `@farmfe/plugin-replace-dirname-linux-x64-musl` + +This is the **x86_64-unknown-linux-musl** binary for `@farmfe/plugin-replace-dirname` diff --git a/rust-plugins/replace-dirname/npm/linux-x64-musl/package.json b/rust-plugins/replace-dirname/npm/linux-x64-musl/package.json new file mode 100644 index 000000000..e5edcbbed --- /dev/null +++ b/rust-plugins/replace-dirname/npm/linux-x64-musl/package.json @@ -0,0 +1,18 @@ +{ + "name": "@farmfe/plugin-replace-dirname-linux-x64-musl", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} diff --git a/rust-plugins/replace-dirname/npm/win32-arm64-msvc/README.md b/rust-plugins/replace-dirname/npm/win32-arm64-msvc/README.md new file mode 100644 index 000000000..7042e9575 --- /dev/null +++ b/rust-plugins/replace-dirname/npm/win32-arm64-msvc/README.md @@ -0,0 +1,3 @@ +# `@farmfe/plugin-replace-dirname-win32-arm64-msvc` + +This is the aarch64-pc-windows-msvc binary for `@farmfe/plugin-replace-dirname` diff --git a/rust-plugins/replace-dirname/npm/win32-arm64-msvc/package.json b/rust-plugins/replace-dirname/npm/win32-arm64-msvc/package.json new file mode 100644 index 000000000..16c9f7795 --- /dev/null +++ b/rust-plugins/replace-dirname/npm/win32-arm64-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "@farmfe/plugin-replace-dirname-win32-arm64-msvc", + "version": "0.0.0", + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} diff --git a/rust-plugins/replace-dirname/npm/win32-ia32-msvc/README.md b/rust-plugins/replace-dirname/npm/win32-ia32-msvc/README.md new file mode 100644 index 000000000..db8c3d41a --- /dev/null +++ b/rust-plugins/replace-dirname/npm/win32-ia32-msvc/README.md @@ -0,0 +1,3 @@ +# `@farmfe/plugin-replace-dirname-win32-ia32-msvc` + +This is the i686-pc-windows-msvc binary for `@farmfe/plugin-replace-dirname` diff --git a/rust-plugins/replace-dirname/npm/win32-ia32-msvc/package.json b/rust-plugins/replace-dirname/npm/win32-ia32-msvc/package.json new file mode 100644 index 000000000..5d576ee19 --- /dev/null +++ b/rust-plugins/replace-dirname/npm/win32-ia32-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "@farmfe/plugin-replace-dirname-win32-ia32-msvc", + "version": "0.0.0", + "os": [ + "win32" + ], + "cpu": [ + "ia32" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} diff --git a/rust-plugins/replace-dirname/npm/win32-x64-msvc/README.md b/rust-plugins/replace-dirname/npm/win32-x64-msvc/README.md new file mode 100644 index 000000000..3cf9ed74b --- /dev/null +++ b/rust-plugins/replace-dirname/npm/win32-x64-msvc/README.md @@ -0,0 +1,3 @@ +# `@farmfe/plugin-replace-dirname-win32-x64-msvc` + +This is the **x86_64-pc-windows-msvc** binary for `@farmfe/plugin-replace-dirname` diff --git a/rust-plugins/replace-dirname/npm/win32-x64-msvc/package.json b/rust-plugins/replace-dirname/npm/win32-x64-msvc/package.json new file mode 100644 index 000000000..c579d4534 --- /dev/null +++ b/rust-plugins/replace-dirname/npm/win32-x64-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "@farmfe/plugin-replace-dirname-win32-x64-msvc", + "version": "0.0.0", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} diff --git a/rust-plugins/replace-dirname/package.json b/rust-plugins/replace-dirname/package.json new file mode 100755 index 000000000..1a1ed5932 --- /dev/null +++ b/rust-plugins/replace-dirname/package.json @@ -0,0 +1,45 @@ +{ + "name": "@farmfe/plugin-replace-dirname", + "version": "1.0.0-nightly-20241024075304", + "main": "index.js", + "types": "index.d.ts", + "type": "module", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "devDependencies": { + "@farmfe/plugin-tools": "workspace:*" + }, + "napi": { + "name": "farm_plugin_replace_dirname", + "triples": { + "additional": [ + "aarch64-apple-darwin", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", + "x86_64-unknown-linux-musl", + "i686-pc-windows-msvc", + "aarch64-pc-windows-msvc" + ] + } + }, + "exports": { + ".": { + "import": "./index.js", + "types": "./index.d.ts", + "default": "./index.js" + }, + "./package.json": "./package.json" + }, + "scripts": { + "build": "farm-plugin-tools build --platform --cargo-name farmfe_plugin_replace_dirname -p farmfe_plugin_replace_dirname --release", + "build:publish": "cross-env CARGO_PROFILE_RELEASE_LTO=fat CARGO_PROFILE_RELEASE_STRIP=symbols CARGO_PROFILE_RELEASE_PANIC=abort CARGO_PROFILE_RELEASE_OPT_LEVEL=z farm-plugin-tools build --platform --cargo-name farmfe_plugin_replace_dirname -p farmfe_plugin_replace_dirname --release", + "prepublishOnly": "farm-plugin-tools prepublish" + }, + "files": [ + "index.js", + "index.d.ts", + "func.js" + ] +} diff --git a/rust-plugins/replace-dirname/rustfmt.toml b/rust-plugins/replace-dirname/rustfmt.toml new file mode 100755 index 000000000..cab5731ed --- /dev/null +++ b/rust-plugins/replace-dirname/rustfmt.toml @@ -0,0 +1,2 @@ +tab_spaces = 2 +edition = "2021" diff --git a/rust-plugins/replace-dirname/src/lib.rs b/rust-plugins/replace-dirname/src/lib.rs new file mode 100644 index 000000000..ca1bc356e --- /dev/null +++ b/rust-plugins/replace-dirname/src/lib.rs @@ -0,0 +1,134 @@ +// 2024-8-21 farmfe_core: 0.6.4 +#![deny(clippy::all)] + +use farmfe_core::{ + config::{config_regex::ConfigRegex, Config}, + context::CompilationContext, + error::CompilationError, + plugin::{Plugin, PluginProcessModuleHookParam}, + swc_common::DUMMY_SP, + swc_ecma_ast::{self, Expr, Lit, MemberExpr, MemberProp, Module, Str}, +}; +use std::{env, path::Path, sync::Arc}; +use url::Url; + +use farmfe_macro_plugin::farm_plugin; +use farmfe_toolkit::{ + common::PathFilter, + swc_ecma_visit::{VisitMut, VisitMutWith}, +}; +use serde; + +#[farm_plugin] +pub struct FarmPluginReplaceDirname { + options: ReplaceDirnameOptions, +} + +#[derive(serde::Deserialize)] +pub struct ReplaceDirnameOptions { + exclude: Vec, + include: Vec, +} + +impl Default for ReplaceDirnameOptions { + fn default() -> Self { + Self { + exclude: vec![ConfigRegex::new("node_modules/")], + include: vec![], + } + } +} + +impl FarmPluginReplaceDirname { + fn new(_: &Config, options: String) -> Self { + let options: ReplaceDirnameOptions = serde_json::from_str(&options).unwrap_or_default(); + Self { options } + } +} + +impl Plugin for FarmPluginReplaceDirname { + fn name(&self) -> &str { + "FarmPluginReplaceDirname" + } + + fn process_module( + &self, + param: &mut PluginProcessModuleHookParam, + _: &Arc, + ) -> Result, CompilationError> { + let filter = PathFilter::new(&self.options.include, &self.options.exclude); + if !filter.execute(¶m.module_id.relative_path()) { + return Ok(None); + } + + let file_path = env::current_dir() + .unwrap() + .join(param.module_id.relative_path()); + + let dir_path: &str = Path::new(&file_path) + .parent() + .map_or("", |p| p.to_str().unwrap_or("")); + + let ast = &mut param.meta.as_script_mut().ast; + replace_dirname_with_ast(ast, dir_path, file_path.to_str().unwrap()); + Ok(Some(())) + } +} + +pub fn replace_dirname_with_ast(ast: &mut Module, dir_path: &str, file_path: &str) { + struct ReplaceLibVisitor<'a> { + dir_path: &'a str, + file_path: &'a str, + } + + impl<'a> VisitMut for ReplaceLibVisitor<'a> { + fn visit_mut_expr(&mut self, expr: &mut Expr) { + match expr { + Expr::Ident(ident) => match &*ident.sym { + "__dirname" => { + *expr = Expr::Lit(Lit::Str(Str { + value: self.dir_path.into(), + span: DUMMY_SP, + raw: None, + })); + } + "__filename" => { + *expr = Expr::Lit(Lit::Str(Str { + value: self.file_path.into(), + span: DUMMY_SP, + raw: None, + })); + } + _ => {} + }, + Expr::Member(MemberExpr { obj, prop, .. }) => { + if let Expr::MetaProp(meta_prop) = &**obj { + if meta_prop.kind == swc_ecma_ast::MetaPropKind::ImportMeta { + if let MemberProp::Ident(ident) = &prop { + if ident.sym == "url" { + if let Ok(file_path) = Url::from_file_path(&self.file_path) { + *expr = Expr::Lit(Lit::Str(Str { + value: file_path.to_string().into(), + span: DUMMY_SP, + raw: None, + })); + } + } + } + } + } + } + _ => { + expr.visit_mut_children_with(self); + } + } + } + } + + let mut visitor = ReplaceLibVisitor { + dir_path, + file_path, + }; + + ast.visit_mut_with(&mut visitor); +} diff --git a/rust-plugins/sass/CHANGELOG.md b/rust-plugins/sass/CHANGELOG.md index 84f6ce361..09cf0f54b 100755 --- a/rust-plugins/sass/CHANGELOG.md +++ b/rust-plugins/sass/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 2.0.0-nightly-20241022124925 + +### Major Changes + +- 6a1038c: update nightly tag + ## 1.1.0 ### Minor Changes diff --git a/rust-plugins/sass/package.json b/rust-plugins/sass/package.json index 5640bdb0c..c0074279a 100755 --- a/rust-plugins/sass/package.json +++ b/rust-plugins/sass/package.json @@ -1,6 +1,6 @@ { "name": "@farmfe/plugin-sass", - "version": "1.1.0", + "version": "2.0.0-nightly-20241022124925", "main": "index.js", "types": "index.d.ts", "type": "module", diff --git a/rust-plugins/sass/tests/mod.rs b/rust-plugins/sass/tests/mod.rs index c63783aa6..61d42c4bb 100755 --- a/rust-plugins/sass/tests/mod.rs +++ b/rust-plugins/sass/tests/mod.rs @@ -3,8 +3,8 @@ use std::{collections::HashMap, fs, io::Write, path::PathBuf, sync::Arc}; use farmfe_compiler::Compiler; use farmfe_core::{ config::{ - bool_or_obj::BoolOrObj, preset_env::PresetEnvConfig, Config, ResolveConfig, RuntimeConfig, - SourcemapConfig, + bool_or_obj::BoolOrObj, preset_env::PresetEnvConfig, AliasItem, Config, ResolveConfig, + RuntimeConfig, SourcemapConfig, StringOrRegex, }, context::CompilationContext, module::ModuleType, @@ -87,10 +87,10 @@ fn test_with_compiler() { tree_shaking: Box::new(BoolOrObj::Bool(false)), progress: false, resolve: Box::new(ResolveConfig { - alias: std::collections::HashMap::from([( - "@".to_string(), - cwd.to_string_lossy().to_string(), - )]), + alias: vec![AliasItem::Complex { + find: StringOrRegex::String("@".to_string()), + replacement: cwd.to_string_lossy().to_string(), + }], ..Default::default() }), ..Default::default() diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 0eb96b51a..4e5de48e8 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2024-04-16" +channel = "nightly-2024-10-07" components = ["clippy", "rustfmt", "rust-src", "rustc-dev"] diff --git a/scripts/build.mjs b/scripts/build.mjs index d2af534a5..9e73d8d5d 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -27,7 +27,7 @@ const PKG_DTS = resolve(CWD, './js-plugins/dts'); const PKG_RUST_PLUGIN = resolve(CWD, './rust-plugins'); // Build js_plugin_path -export const JS_PLUGINs_DIR = resolve(CWD, './js-plugins'); +export const JS_PLUGINS_DIR = resolve(CWD, './js-plugins'); export const EXAMPLES_DIR = resolve(CWD, './examples'); export const excludedJsPlugin = ['dts']; @@ -119,27 +119,87 @@ export const buildDts = () => // build rust plugins export const rustPlugins = () => batchBuildPlugins(PKG_RUST_PLUGIN); -// // build js plugins -// export const jsPlugins = () => batchBuildPlugins(PKG_JS_PLUGIN); - -// build chain export const buildJsPlugins = async () => { - await execa( - DEFAULT_PACKAGE_MANAGER, - ['--filter', './js-plugins/**', 'build'], - { - cwd: CWD - } - ); - - // // First, build Dts - // await buildDts(); + const jsPluginDirs = fs.readdirSync(JS_PLUGINS_DIR).filter((file) => { + return ( + fs.statSync(join(JS_PLUGINS_DIR, file)).isDirectory() && + !excludedJsPlugin.includes(file) + ); + }); - // // Then, build other js plugins - // await Promise.all(jsPlugins()); + const total = jsPluginDirs.length; + console.log('\n') + logger(`Found ${total} JS plugins to build \n`, { color: 'blue' }); + + for (const pluginDir of jsPluginDirs) { + const pluginPath = resolve(JS_PLUGINS_DIR, pluginDir); + await runTask( + `Built JS Plugin: ${pluginDir}`, + async () => { + const spinner = createSpinner(`Building ${pluginDir}`).start(); + try { + if (!existsSync(join(pluginPath, 'package.json'))) { + spinner.warn({ text: `Skipping ${pluginDir}: No package.json found` }); + return; + } + + await execa(DEFAULT_PACKAGE_MANAGER, ['build'], { + cwd: pluginPath, + stdio: 'pipe', + }); + + spinner.success({ text: `Built JS plugin: ${pluginDir}` }); + } catch (error) { + spinner.error({ text: `Failed to build JS plugin: ${pluginDir}` }); + throw error; + } + }, + 'Building', + 'Build' + ); + } }; -export const buildRustPlugins = () => Promise.all(rustPlugins()); +export const buildRustPlugins = async () => { + const rustPluginDirs = fs.readdirSync(PKG_RUST_PLUGIN).filter((file) => { + return ( + fs.statSync(join(PKG_RUST_PLUGIN, file)).isDirectory() && + !excludedJsPlugin.includes(file) + ); + }); + + const total = rustPluginDirs.length; + console.log('\n') + logger(`Found ${total} Rust plugins to build \n`, { color: 'blue' }); + + for (const pluginDir of rustPluginDirs) { + const pluginPath = resolve(PKG_RUST_PLUGIN, pluginDir); + await runTask( + `Built Rust plugin: ${pluginDir}`, + async () => { + const spinner = createSpinner(`Building ${pluginDir}`).start(); + try { + if (!existsSync(join(pluginPath, 'Cargo.toml'))) { + spinner.warn({ text: `Skipping ${pluginDir}: No Cargo.toml found` }); + return; + } + + await execa('cargo', ['build', '--release'], { + cwd: pluginPath, + stdio: 'pipe', + }); + + spinner.success({ text: `Built Rust plugin: ${pluginDir}` }); + } catch (error) { + spinner.error({ text: `Failed to build Rust plugin: ${pluginDir}` }); + throw error; + } + }, + 'Building', + 'Build' + ); + } +}; export const copyArtifacts = () => batchBuildPlugins(PKG_RUST_PLUGIN, 'copy-artifacts'); diff --git a/scripts/bump-nightly.mjs b/scripts/bump-nightly.mjs new file mode 100644 index 000000000..02b63c473 --- /dev/null +++ b/scripts/bump-nightly.mjs @@ -0,0 +1,7 @@ +import { execSync } from "child_process"; + +execSync(`npx changeset version --snapshot nightly`, { + stdio: "inherit", +}); + +execSync("pnpm install --no-frozen-lockfile", { stdio: "inherit" }); diff --git a/scripts/ready.mjs b/scripts/ready.mjs deleted file mode 100644 index fc2adae2f..000000000 --- a/scripts/ready.mjs +++ /dev/null @@ -1,57 +0,0 @@ -import os from 'node:os'; -import { execa } from 'execa'; -import { - DEFAULT_PACKAGE_MANAGER, - buildCoreCjs, - buildExamples, - runTaskQueue -} from './build.mjs'; - -const cwd = process.cwd(); - -console.log('Installing dependencies...'); -await execa(DEFAULT_PACKAGE_MANAGER, ['install'], { cwd }); - -console.log('Cleaning...'); -await execa('node', ['./scripts/clean.mjs'], { cwd }); - -console.log('Code Spell lint...'); -await execa('npx', ['cspell', '**', '--gitignore'], { cwd }); - -console.log('build core、js/rust plugins、cli ...'); -await runTaskQueue(); - -console.log('Cargo check'); -await execa('cargo', ['check', '--color', 'always', '--all', '--all-targets'], { - cwd -}); - -console.log('Cargo clippy'); -await execa('cargo', ['clippy'], { cwd }); - -console.log('TypeScript check'); -await execa( - DEFAULT_PACKAGE_MANAGER, - ['run', '--filter', '"@farmfe/*"', 'type-check'], - { cwd } -); - -console.log('Unit Test'); -await execa(DEFAULT_PACKAGE_MANAGER, ['run', 'test'], { cwd }); - -console.log('Cargo test'); -await execa( - 'cargo', - // When there are too many jobs, Out of Memory may appear - ['test', '-j', Math.max(Math.floor(os.cpus().length / 4), 1)], - { cwd } -); - -console.log('Building core CJS...'); -await buildCoreCjs(); - -console.log('Building examples'); -await buildExamples(); - -console.log('E2E Test'); -await execa(DEFAULT_PACKAGE_MANAGER, ['run', 'test-e2e'], { cwd }); diff --git a/scripts/release-nightly.mjs b/scripts/release-nightly.mjs new file mode 100644 index 000000000..4b0d638c5 --- /dev/null +++ b/scripts/release-nightly.mjs @@ -0,0 +1,20 @@ +import { execSync } from "child_process"; +import { buildCli, buildCoreCjs, buildJsPlugins } from "./build.mjs"; + +// Build node packages +await buildCli(); +await buildCoreCjs(); +await buildJsPlugins(); + +try { + // Set npm config to public access + execSync("npm config set access public", { stdio: "inherit" }); + + // Publish nightly packages + execSync(`npx changeset publish --no-git-tag --tag nightly`, { + stdio: "inherit", + }); +} catch (error) { + console.error(error); + process.exit(1); +} diff --git a/tsconfig.base.json b/tsconfig.base.json index 2d8c3caf1..eab16b40b 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -5,15 +5,17 @@ "noUnusedParameters": true, "sourceMap": true, "target": "es2020", - "module": "node16", - "moduleResolution": "node16", "declaration": true, "inlineSources": true, "esModuleInterop": true, + "module": "NodeNext", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "noUnusedLocals": true, "skipDefaultLibCheck": true, "skipLibCheck": true, "resolveJsonModule": true, + "allowJs": true, + "checkJs": false } } diff --git a/vitest.workspace.ts b/vitest.workspace.ts new file mode 100644 index 000000000..c2f39de1b --- /dev/null +++ b/vitest.workspace.ts @@ -0,0 +1,7 @@ +import { defineWorkspace } from 'vitest/config' + +export default defineWorkspace([ + "./vitest.config.e2e.ts", + "./vitest.config.ts", + "./examples/vite-adapter-vue-sfc-src/vite.config.ts" +])