diff --git a/.cargo/config b/.cargo/config deleted file mode 100644 index eaa0fee..0000000 --- a/.cargo/config +++ /dev/null @@ -1,5 +0,0 @@ -# These command aliases are not final, may change -[alias] -# Alias to build actual plugin binary for the specified target. -build-wasi = "build --target wasm32-wasi" -build-wasm32 = "build --target wasm32-unknown-unknown" diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..0651654 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,5 @@ +[target.aarch64-unknown-linux-musl] +linker = "aarch64-linux-musl-gcc" +rustflags = ["-C", "target-feature=-crt-static"] +[target.x86_64-pc-windows-msvc] +rustflags = ["-C", "target-feature=+crt-static"] \ No newline at end of file diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..a7923d3 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,485 @@ +name: CI +env: + DEBUG: napi:* + APP_NAME: react-server + MACOSX_DEPLOYMENT_TARGET: '10.13' +permissions: + contents: write + id-token: write +'on': + push: + branches: + - main + tags-ignore: + - '**' + paths-ignore: + - '**/*.md' + - LICENSE + - '**/*.gitignore' + - .editorconfig + - docs/** + pull_request: null +jobs: + build: + strategy: + fail-fast: false + matrix: + settings: + - host: macos-latest + target: x86_64-apple-darwin + build: yarn build + - host: windows-latest + build: yarn build + target: x86_64-pc-windows-msvc + - host: windows-latest + build: | + yarn build --target i686-pc-windows-msvc + yarn test + target: i686-pc-windows-msvc + - host: ubuntu-latest + target: x86_64-unknown-linux-gnu + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian + build: yarn build --target x86_64-unknown-linux-gnu + - host: ubuntu-latest + target: x86_64-unknown-linux-musl + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine + build: yarn build + - host: macos-latest + target: aarch64-apple-darwin + build: yarn build --target aarch64-apple-darwin + - host: ubuntu-latest + target: aarch64-unknown-linux-gnu + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64 + build: yarn build --target aarch64-unknown-linux-gnu + - host: ubuntu-latest + target: armv7-unknown-linux-gnueabihf + setup: | + sudo apt-get update + sudo apt-get install gcc-arm-linux-gnueabihf -y + build: yarn build --target armv7-unknown-linux-gnueabihf + - host: ubuntu-latest + target: armv7-unknown-linux-musleabihf + build: yarn build --target armv7-unknown-linux-musleabihf + - host: ubuntu-latest + target: aarch64-linux-android + build: yarn build --target aarch64-linux-android + - host: ubuntu-latest + target: armv7-linux-androideabi + build: yarn build --target armv7-linux-androideabi + - host: ubuntu-latest + target: aarch64-unknown-linux-musl + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine + build: |- + set -e && + rustup target add aarch64-unknown-linux-musl && + yarn build --target aarch64-unknown-linux-musl + - host: windows-latest + target: aarch64-pc-windows-msvc + build: yarn build --target aarch64-pc-windows-msvc + - host: ubuntu-latest + target: riscv64gc-unknown-linux-gnu + setup: | + sudo apt-get update + sudo apt-get install gcc-riscv64-linux-gnu -y + build: yarn build --target riscv64gc-unknown-linux-gnu + name: stable - ${{ matrix.settings.target }} - node@20 + runs-on: ${{ matrix.settings.host }} + steps: + - uses: actions/checkout@v4 + - run: corepack enable + - name: Setup node + uses: actions/setup-node@v4 + if: ${{ !matrix.settings.docker }} + with: + node-version: 20 + cache: yarn + - name: Install + uses: dtolnay/rust-toolchain@stable + if: ${{ !matrix.settings.docker }} + with: + toolchain: stable + targets: ${{ matrix.settings.target }} + - name: Cache cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + .cargo-cache + target/ + key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} + - uses: goto-bus-stop/setup-zig@v2 + if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' || matrix.settings.target == 'armv7-unknown-linux-musleabihf' }} + with: + version: 0.11.0 + - name: Setup toolchain + run: ${{ matrix.settings.setup }} + if: ${{ matrix.settings.setup }} + shell: bash + - name: Setup node x86 + if: matrix.settings.target == 'i686-pc-windows-msvc' + run: yarn config set supportedArchitectures.cpu "ia32" + shell: bash + - name: Install dependencies + run: yarn install + - name: Setup node x86 + uses: actions/setup-node@v4 + if: matrix.settings.target == 'i686-pc-windows-msvc' + with: + node-version: 20 + cache: yarn + architecture: x86 + - name: Build in docker + uses: addnab/docker-run-action@v3 + if: ${{ matrix.settings.docker }} + with: + image: ${{ matrix.settings.docker }} + options: '--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build' + run: ${{ matrix.settings.build }} + - name: Build + run: ${{ matrix.settings.build }} + if: ${{ !matrix.settings.docker }} + shell: bash + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: bindings-${{ matrix.settings.target }} + path: ${{ env.APP_NAME }}.*.node + if-no-files-found: error + build-freebsd: + runs-on: macos-13 + name: Build FreeBSD + steps: + - uses: actions/checkout@v4 + - name: Build + id: build + uses: cross-platform-actions/action@v0.24.0 + env: + DEBUG: napi:* + RUSTUP_IO_THREADS: 1 + with: + operating_system: freebsd + version: '13.2' + memory: 8G + cpu_count: 3 + environment_variables: DEBUG RUSTUP_IO_THREADS + shell: bash + run: | + sudo pkg install -y -f curl node libnghttp2 npm + sudo npm install -g yarn --ignore-scripts + curl https://sh.rustup.rs -sSf --output rustup.sh + sh rustup.sh -y --profile minimal --default-toolchain stable + source "$HOME/.cargo/env" + echo "~~~~ rustc --version ~~~~" + rustc --version + echo "~~~~ node -v ~~~~" + node -v + echo "~~~~ yarn --version ~~~~" + yarn --version + pwd + ls -lah + whoami + env + freebsd-version + yarn install + yarn build + yarn test + rm -rf node_modules + rm -rf target + rm -rf .yarn/cache + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: bindings-freebsd + path: ${{ env.APP_NAME }}.*.node + if-no-files-found: error + test-macOS-windows-binding: + name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + settings: + - host: macos-latest + target: x86_64-apple-darwin + - host: windows-latest + target: x86_64-pc-windows-msvc + node: + - '18' + - '20' + runs-on: ${{ matrix.settings.host }} + steps: + - uses: actions/checkout@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: yarn + - name: Install dependencies + run: yarn install + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: bindings-${{ matrix.settings.target }} + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Test bindings + run: yarn test + test-linux-x64-gnu-binding: + name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + node: + - '18' + - '20' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: yarn + - name: Install dependencies + run: yarn install + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: bindings-x86_64-unknown-linux-gnu + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Test bindings + run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn test + test-linux-x64-musl-binding: + name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + node: + - '18' + - '20' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: yarn + - name: Install dependencies + run: | + yarn config set supportedArchitectures.libc "musl" + yarn install + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: bindings-x86_64-unknown-linux-musl + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Test bindings + run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine yarn test + test-linux-aarch64-gnu-binding: + name: Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + node: + - '18' + - '20' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: bindings-aarch64-unknown-linux-gnu + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Install dependencies + run: | + yarn config set supportedArchitectures.cpu "arm64" + yarn config set supportedArchitectures.libc "glibc" + yarn install + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - name: Setup and run tests + uses: addnab/docker-run-action@v3 + with: + image: node:${{ matrix.node }}-slim + options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build' + run: | + set -e + yarn test + ls -la + test-linux-aarch64-musl-binding: + name: Test bindings on aarch64-unknown-linux-musl - node@${{ matrix.node }} + needs: + - build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: bindings-aarch64-unknown-linux-musl + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Install dependencies + run: | + yarn config set supportedArchitectures.cpu "arm64" + yarn config set supportedArchitectures.libc "musl" + yarn install + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - name: Setup and run tests + uses: addnab/docker-run-action@v3 + with: + image: node:lts-alpine + options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build' + run: | + set -e + yarn test + test-linux-arm-gnueabihf-binding: + name: Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + node: + - '18' + - '20' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: bindings-armv7-unknown-linux-gnueabihf + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Install dependencies + run: | + yarn config set supportedArchitectures.cpu "arm" + yarn install + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm + - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - name: Setup and run tests + uses: addnab/docker-run-action@v3 + with: + image: node:${{ matrix.node }}-bullseye-slim + options: '--platform linux/arm/v7 -v ${{ github.workspace }}:/build -w /build' + run: | + set -e + yarn test + ls -la + universal-macOS: + name: Build universal macOS binary + needs: + - build + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + - name: Install dependencies + run: yarn install + - name: Download macOS x64 artifact + uses: actions/download-artifact@v4 + with: + name: bindings-x86_64-apple-darwin + path: artifacts + - name: Download macOS arm64 artifact + uses: actions/download-artifact@v4 + with: + name: bindings-aarch64-apple-darwin + path: artifacts + - name: Combine binaries + run: yarn universal + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: bindings-universal-apple-darwin + path: ${{ env.APP_NAME }}.*.node + if-no-files-found: error + publish: + name: Publish + runs-on: ubuntu-latest + needs: + - build-freebsd + - test-macOS-windows-binding + - test-linux-x64-gnu-binding + - test-linux-x64-musl-binding + - test-linux-aarch64-gnu-binding + - test-linux-aarch64-musl-binding + - test-linux-arm-gnueabihf-binding + - universal-macOS + steps: + - uses: actions/checkout@v4 + - run: corepack enable + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + - name: Install dependencies + run: yarn install + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + - name: Move artifacts + run: yarn artifacts + - name: List packages + run: ls -R ./npm + shell: bash + - name: Publish + run: | + npm config set provenance true + if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$"; + then + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + npm publish --access public + elif git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+"; + then + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + npm publish --tag next --access public + else + echo "Not a release, skipping publish" + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 6bdfa85..5e2577b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,197 @@ +# Created by https://www.toptal.com/developers/gitignore/api/node +# Edit at https://www.toptal.com/developers/gitignore?templates=node + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# End of https://www.toptal.com/developers/gitignore/api/node + +# Created by https://www.toptal.com/developers/gitignore/api/macos +# Edit at https://www.toptal.com/developers/gitignore?templates=macos + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +# End of https://www.toptal.com/developers/gitignore/api/macos + +# Created by https://www.toptal.com/developers/gitignore/api/windows +# Edit at https://www.toptal.com/developers/gitignore?templates=windows + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/windows + +#Added by cargo + /target -^target/ -target +Cargo.lock + +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions + +*.node diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..ec144db --- /dev/null +++ b/.npmignore @@ -0,0 +1,13 @@ +target +Cargo.lock +.cargo +.github +npm +.eslintrc +.prettierignore +rustfmt.toml +yarn.lock +*.node +.yarn +__test__ +renovate.json diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 0000000..3186f3f --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index ec575c7..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,2101 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "anyhow" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" - -[[package]] -name = "ast_node" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab31376d309dd3bfc9cfb3c11c93ce0e0741bbe0354b20e7f8c60b044730b79" -dependencies = [ - "proc-macro2", - "quote", - "swc_macros_common", - "syn 2.0.52", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64-simd" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "781dd20c3aff0bd194fe7d2a977dd92f21c173891f3a03b677359e5fa457e5d5" -dependencies = [ - "simd-abstraction", -] - -[[package]] -name = "better_scoped_tls" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794edcc9b3fb07bb4aecaa11f093fd45663b4feadb782d68303a2268bc2701de" -dependencies = [ - "scoped-tls", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-buffer" -version = "0.11.0-pre.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ded684142010808eb980d9974ef794da2bcf97d13396143b1515e9f0fb4a10e" -dependencies = [ - "crypto-common 0.2.0-pre.5", -] - -[[package]] -name = "bytecheck" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" -dependencies = [ - "bytecheck_derive", - "ptr_meta", - "simdutf8", -] - -[[package]] -name = "bytecheck_derive" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "bytes" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" - -[[package]] -name = "camino" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.22", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.22", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "cc" -version = "1.0.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "const-oid" -version = "0.10.0-pre.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e3352a27098ba6b09546e5f13b15165e6a88b5c2723afecb3ea9576b27e3ea" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "crypto-common" -version = "0.2.0-pre.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7aa2ec04f5120b830272a481e8d9d8ba4dda140d2cda59b0f1110d5eb93c38e" -dependencies = [ - "getrandom", - "hybrid-array", - "rand_core", -] - -[[package]] -name = "data-encoding" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" - -[[package]] -name = "debugid" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" -dependencies = [ - "serde", - "uuid", -] - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "difference" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "crypto-common 0.1.6", -] - -[[package]] -name = "digest" -version = "0.11.0-pre.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065d93ead7c220b85d5b4be4795d8398eac4ff68b5ee63895de0a3c1fb6edf25" -dependencies = [ - "block-buffer 0.11.0-pre.5", - "const-oid", - "crypto-common 0.2.0-pre.5", -] - -[[package]] -name = "either" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "from_variant" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc9cc75639b041067353b9bce2450d6847e547276c6fbe4487d7407980e07db" -dependencies = [ - "proc-macro2", - "swc_macros_common", - "syn 2.0.52", -] - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hstr" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96274be293b8877e61974a607105d09c84caebe9620b47774aa8a6b942042dd4" -dependencies = [ - "hashbrown 0.14.3", - "new_debug_unreachable", - "once_cell", - "phf", - "rustc-hash", - "triomphe", -] - -[[package]] -name = "hybrid-array" -version = "0.2.0-rc.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53668f5da5a41d9eaf4bf7064be46d1ebe6a4e1ceed817f387587b18f2b51047" -dependencies = [ - "typenum", -] - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "if_chain" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" - -[[package]] -name = "indexmap" -version = "2.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" -dependencies = [ - "equivalent", - "hashbrown 0.14.3", -] - -[[package]] -name = "is-macro" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a85abdc13717906baccb5a1e435556ce0df215f242892f721dff62bf25288f" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "is_ci" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "miette" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c90329e44f9208b55f45711f9558cec15d7ef8295cc65ecd6d4188ae8edc58c" -dependencies = [ - "atty", - "backtrace", - "miette-derive", - "once_cell", - "owo-colors", - "supports-color", - "supports-hyperlinks", - "supports-unicode", - "terminal_size", - "textwrap", - "thiserror", - "unicode-width", -] - -[[package]] -name = "miette-derive" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b5bc45b761bcf1b5e6e6c4128cd93b84c218721a8d9b894aa0aff4ed180174c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "miniz_oxide" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" -dependencies = [ - "adler", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", - "serde", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "outref" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f222829ae9293e33a9f5e9f440c6760a3d450a64affe1846486b140db81c1f4" - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "owo-colors" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.48.5", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_macros", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared", - "rand", -] - -[[package]] -name = "phf_macros" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" -dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pretty_assertions" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" -dependencies = [ - "diff", - "yansi", -] - -[[package]] -name = "proc-macro2" -version = "1.0.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "psm" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" -dependencies = [ - "cc", -] - -[[package]] -name = "ptr_meta" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "react-server" -version = "0.2.2" -dependencies = [ - "hex", - "serde", - "serde_json", - "sha1", - "swc_core", - "tracing", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "regex" -version = "1.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.5", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "relative-path" -version = "1.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" - -[[package]] -name = "rend" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" -dependencies = [ - "bytecheck", -] - -[[package]] -name = "rkyv" -version = "0.7.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" -dependencies = [ - "bitvec", - "bytecheck", - "bytes", - "hashbrown 0.12.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", - "tinyvec", - "uuid", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" -dependencies = [ - "bitflags 2.5.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "ryu" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" - -[[package]] -name = "ryu-js" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad97d4ce1560a5e27cec89519dc8300d1aa6035b099821261c651486a19e44d5" - -[[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" - -[[package]] -name = "seahash" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" -dependencies = [ - "serde", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "serde" -version = "1.0.197" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.197" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "serde_json" -version = "1.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.11.0-pre.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3885de8cb916f223718c1ccd47a840b91f806333e76002dc5cb3862154b4fed3" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.11.0-pre.8", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "simd-abstraction" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cadb29c57caadc51ff8346233b5cec1d240b68ce55cf1afc764818791876987" -dependencies = [ - "outref", -] - -[[package]] -name = "simdutf8" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" - -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - -[[package]] -name = "smallvec" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" - -[[package]] -name = "smartstring" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" -dependencies = [ - "autocfg", - "static_assertions", - "version_check", -] - -[[package]] -name = "smawk" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" - -[[package]] -name = "sourcemap" -version = "8.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "208d40b9e8cad9f93613778ea295ed8f3c2b1824217c6cfc7219d3f6f45b96d4" -dependencies = [ - "base64-simd", - "bitvec", - "data-encoding", - "debugid", - "if_chain", - "rustc-hash", - "rustc_version", - "serde", - "serde_json", - "unicode-id-start", - "url", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "stacker" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" -dependencies = [ - "cc", - "cfg-if", - "libc", - "psm", - "winapi", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "string_enum" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e383308aebc257e7d7920224fa055c632478d92744eca77f99be8fa1545b90" -dependencies = [ - "proc-macro2", - "quote", - "swc_macros_common", - "syn 2.0.52", -] - -[[package]] -name = "supports-color" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ba6faf2ca7ee42fdd458f4347ae0a9bd6bcc445ad7cb57ad82b383f18870d6f" -dependencies = [ - "atty", - "is_ci", -] - -[[package]] -name = "supports-hyperlinks" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "590b34f7c5f01ecc9d78dba4b3f445f31df750a67621cf31626f3b7441ce6406" -dependencies = [ - "atty", -] - -[[package]] -name = "supports-unicode" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8b945e45b417b125a8ec51f1b7df2f8df7920367700d1f98aedd21e5735f8b2" -dependencies = [ - "atty", -] - -[[package]] -name = "swc_atoms" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6567e4e67485b3e7662b486f1565bdae54bd5b9d6b16b2ba1a9babb1e42125" -dependencies = [ - "bytecheck", - "hstr", - "once_cell", - "rkyv", - "rustc-hash", - "serde", -] - -[[package]] -name = "swc_common" -version = "0.34.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add6efe3f1a2fe9108b27fb6ba94998ab5bfd8696d590033003987c82452b8f9" -dependencies = [ - "anyhow", - "ast_node", - "atty", - "better_scoped_tls", - "bytecheck", - "cfg-if", - "either", - "from_variant", - "new_debug_unreachable", - "num-bigint", - "once_cell", - "parking_lot", - "rkyv", - "rustc-hash", - "serde", - "siphasher", - "sourcemap", - "swc_atoms", - "swc_eq_ignore_macros", - "swc_visit", - "termcolor", - "tracing", - "unicode-width", - "url", -] - -[[package]] -name = "swc_core" -version = "0.95.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91bc4f59fcb3fbaa32355f586baff65396d0b027f0ba6292aee6f5b3326a6b0" -dependencies = [ - "once_cell", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_transforms_base", - "swc_ecma_transforms_testing", - "swc_ecma_utils", - "swc_ecma_visit", - "swc_plugin", - "swc_plugin_macro", - "swc_plugin_proxy", - "vergen", -] - -[[package]] -name = "swc_ecma_ast" -version = "0.115.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be1306930c235435a892104c00c2b5e16231043c085d5a10bd3e7537b15659b" -dependencies = [ - "bitflags 2.5.0", - "bytecheck", - "is-macro", - "num-bigint", - "phf", - "rkyv", - "scoped-tls", - "string_enum", - "swc_atoms", - "swc_common", - "unicode-id-start", -] - -[[package]] -name = "swc_ecma_codegen" -version = "0.151.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6602bcf4fd78b2ef0c7b2abcdbd3e35dfa564a6bcfb0f256e86b41ff3299d7" -dependencies = [ - "memchr", - "num-bigint", - "once_cell", - "rustc-hash", - "serde", - "sourcemap", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_codegen_macros", - "tracing", -] - -[[package]] -name = "swc_ecma_codegen_macros" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090e409af49c8d1a3c13b3aab1ed09dd4eda982207eb3e63c2ad342f072b49c8" -dependencies = [ - "proc-macro2", - "quote", - "swc_macros_common", - "syn 2.0.52", -] - -[[package]] -name = "swc_ecma_parser" -version = "0.146.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f884c766155c58b98503961612d1caced9d50267fcbf7914d9407d6fc5447efe" -dependencies = [ - "either", - "new_debug_unreachable", - "num-bigint", - "num-traits", - "phf", - "serde", - "smallvec", - "smartstring", - "stacker", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "tracing", - "typed-arena", -] - -[[package]] -name = "swc_ecma_testing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f495dae76f1ef3f5be46993b050c3c7f9bf534bcdacf1e40789d32255040776" -dependencies = [ - "anyhow", - "hex", - "sha2", - "testing", - "tracing", -] - -[[package]] -name = "swc_ecma_transforms_base" -version = "0.140.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daee7af0abfccc9855656fc36ac472e1e6a61398a3a1a1b3bf05ef7a7e7af6b0" -dependencies = [ - "better_scoped_tls", - "bitflags 2.5.0", - "indexmap", - "once_cell", - "phf", - "rustc-hash", - "serde", - "smallvec", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_parser", - "swc_ecma_utils", - "swc_ecma_visit", - "tracing", -] - -[[package]] -name = "swc_ecma_transforms_testing" -version = "0.143.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2622a94000bb4e04548afe0540150f616c58296d5485c0653d1fae69c23efd98" -dependencies = [ - "ansi_term", - "anyhow", - "base64", - "hex", - "serde", - "serde_json", - "sha2", - "sourcemap", - "swc_common", - "swc_ecma_ast", - "swc_ecma_codegen", - "swc_ecma_parser", - "swc_ecma_testing", - "swc_ecma_transforms_base", - "swc_ecma_utils", - "swc_ecma_visit", - "tempfile", - "testing", -] - -[[package]] -name = "swc_ecma_utils" -version = "0.130.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831490c6d4a52f06932fa2c3d87fc0d0aa43211a5df6b5e05a1ec2c57a2f2519" -dependencies = [ - "indexmap", - "num_cpus", - "once_cell", - "rustc-hash", - "ryu-js", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_visit", - "tracing", - "unicode-id", -] - -[[package]] -name = "swc_ecma_visit" -version = "0.101.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce0d997f0c9b4e181225f603d161f6757c2a97022258170982cfe005ec69ec92" -dependencies = [ - "num-bigint", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_visit", - "tracing", -] - -[[package]] -name = "swc_eq_ignore_macros" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "695a1d8b461033d32429b5befbf0ad4d7a2c4d6ba9cd5ba4e0645c615839e8e4" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "swc_error_reporters" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd8f9a90efb59dc5d918b4470e5d152f34cac2f8733bfba141a96440cab3eff" -dependencies = [ - "anyhow", - "miette", - "once_cell", - "parking_lot", - "swc_common", -] - -[[package]] -name = "swc_macros_common" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91745f3561057493d2da768437c427c0e979dff7396507ae02f16c981c4a8466" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "swc_plugin" -version = "0.90.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca5df720531bfbd7ceb1139319c39c20c446abfb8f7e0eb47b104205a71152b4" -dependencies = [ - "once_cell", -] - -[[package]] -name = "swc_plugin_macro" -version = "0.9.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3232db481484070637b20a155c064096c0ea1ba04fa2247b89b618661b3574f4" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "swc_plugin_proxy" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98740e5a1ac82ad0de823bcf4aea97a76dce77c1ccff167d148e8a114b2932c0" -dependencies = [ - "better_scoped_tls", - "rkyv", - "swc_common", - "swc_ecma_ast", - "swc_trace_macro", - "tracing", -] - -[[package]] -name = "swc_trace_macro" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff9719b6085dd2824fd61938a881937be14b08f95e2d27c64c825a9f65e052ba" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "swc_visit" -version = "0.5.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043d11fe683dcb934583ead49405c0896a5af5face522e4682c16971ef7871b9" -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.52", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "testing" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27d395aa823f3ad1ad845ed74b96188f493b469794cfbe9ef82f03196064086f" -dependencies = [ - "ansi_term", - "cargo_metadata 0.15.4", - "difference", - "once_cell", - "pretty_assertions", - "regex", - "serde", - "serde_json", - "swc_common", - "swc_error_reporters", - "testing_macros", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "testing_macros" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d3864d4184569c1428645a51a304b3b6e8d3094cd61fb3cce8dfdd9f6d0f72" -dependencies = [ - "anyhow", - "glob", - "once_cell", - "proc-macro2", - "quote", - "regex", - "relative-path", - "syn 2.0.52", -] - -[[package]] -name = "textwrap" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" -dependencies = [ - "smawk", - "unicode-linebreak", - "unicode-width", -] - -[[package]] -name = "thiserror" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "triomphe" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6631e42e10b40c0690bf92f404ebcfe6e1fdb480391d15f17cc8e96eeed5369" -dependencies = [ - "serde", - "stable_deref_trait", -] - -[[package]] -name = "typed-arena" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-id" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" - -[[package]] -name = "unicode-id-start" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02aebfa694eccbbbffdd92922c7de136b9fe764396d2f10e21bce1681477cfc1" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-linebreak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "uuid" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vergen" -version = "8.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" -dependencies = [ - "anyhow", - "cargo_metadata 0.18.1", - "regex", - "rustversion", -] - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.4", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" -dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" diff --git a/Cargo.toml b/Cargo.toml index 578840a..d0d35f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,22 +1,27 @@ [package] -name = "react-server" -version = "0.2.2" edition = "2021" +name = "react-server" +version = "0.0.0" [lib] crate-type = ["cdylib"] -[profile.release] -lto = true - [dependencies] -serde = "1" -swc_core = { version = "0.95.*", features = ["ecma_plugin_transform", "ecma_utils"] } -hex = "0.4.3" -sha1 = "0.11.0-pre.3" -tracing = "0.1.40" -serde_json = "1.0.117" +napi = { version = "2.16.7", default-features = false, features = ["napi9", "async"] } +napi-derive = "2.16.6" +serde_json = "1.0.118" +oxc_allocator = { version = "0.15.0" } +oxc_span = { version = "0.15.0" } +oxc_ast = { version = "0.15.0" } +oxc_syntax = { version = "0.15.0" } +oxc_diagnostics = { version = "0.15.0" } +oxc_parser = { version = "0.15.0" } +futures = "0.3.30" +tokio = { version = "1.38.0", features = ["default", "fs"] } + +[build-dependencies] +napi-build = "2.1.3" -# .cargo/config defines few alias to build plugin. -# cargo build-wasi generates wasm-wasi32 binary -# cargo build-wasm32 generates wasm32-unknown-unknown binary. +[profile.release] +lto = true +strip = "symbols" diff --git a/README.md b/README.md deleted file mode 100644 index 1a57a32..0000000 --- a/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# swc-plugin-react-server - -This is a swc plugin for [react server](https://github.com/reactjs/rfcs/blob/main/text/0188-server-components.md). - -- [x] server action transform (port from [next.js](https://github.com/vercel/next.js/blob/f30e5dbb29e16b652172e92a2691bb6a0a75768d/packages/next-swc/crates/next-custom-transforms/src/lib.rs)) - -## Usage - -```ts -import { transform } from '@swc/core' -import { createRequire } from 'node:module' - -const require = createRequire(import.meta.url) - -const output = await transform(` - async function foo() { - "use server"; - return 0; - } - export async function bar() { - "use server"; - return "Hello world"; - } -`, { - swcrc: false, - jsc: { - target: 'esnext', - experimental: { - plugins: [ - [ - require.resolve('swc-plugin-react-server'), {} - ] - ] - } - } -}) -``` - -## LICENSE - -MIT diff --git a/__test__/fixtures/basic.js b/__test__/fixtures/basic.js new file mode 100644 index 0000000..d5d4202 --- /dev/null +++ b/__test__/fixtures/basic.js @@ -0,0 +1,2 @@ +"use server" +console.log('Hello, World!'); diff --git a/__test__/fixtures/import-client-and-use-server.js b/__test__/fixtures/import-client-and-use-server.js new file mode 100644 index 0000000..7a13716 --- /dev/null +++ b/__test__/fixtures/import-client-and-use-server.js @@ -0,0 +1,2 @@ +"use server"; +import 'client-only'; diff --git a/__test__/fixtures/use-server-and-client.js b/__test__/fixtures/use-server-and-client.js new file mode 100644 index 0000000..34f7d52 --- /dev/null +++ b/__test__/fixtures/use-server-and-client.js @@ -0,0 +1,2 @@ +"use server" +"use client" diff --git a/__test__/index.spec.mjs b/__test__/index.spec.mjs new file mode 100644 index 0000000..61b1dd2 --- /dev/null +++ b/__test__/index.spec.mjs @@ -0,0 +1,29 @@ +import test from 'ava' +import path from 'node:path' +import { fileURLToPath } from 'node:url' + +const fixturesDir = fileURLToPath(new URL('./fixtures', import.meta.url)) + +import { validate, FileType } from '../index.js' + +test('use server basic example', async (t) => { + const { fileType, error } = await validate(path.join(fixturesDir, 'basic.js')) + t.is(fileType, FileType.ServerComponent) + t.falsy(error) +}) + +test('use server with use client', async (t) => { + const { error } = await validate( + path.join(fixturesDir, 'use-server-and-client.js') + ) + t.truthy(error) + t.is(error, 'Cannot use both client and server') +}) + +test('import client and use server', async (t) => { + const { error } = await validate( + path.join(fixturesDir, 'import-client-and-use-server.js') + ) + t.truthy(error) + t.is(error, 'Cannot use both client and server') +}) \ No newline at end of file diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..1f866b6 --- /dev/null +++ b/build.rs @@ -0,0 +1,5 @@ +extern crate napi_build; + +fn main() { + napi_build::setup(); +} diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..2a5f77e --- /dev/null +++ b/index.d.ts @@ -0,0 +1,16 @@ +/* tslint:disable */ +/* eslint-disable */ + +/* auto-generated by NAPI-RS */ + +export function validate(filePath: string): Promise +export const enum FileType { + ServerComponent = 0, + ServerAction = 1, + Client = 2, + Isomorphic = 3 +} +export interface ReactServerComponent { + fileType: FileType + error?: string +} diff --git a/index.js b/index.js new file mode 100644 index 0000000..97162f3 --- /dev/null +++ b/index.js @@ -0,0 +1,316 @@ +/* tslint:disable */ +/* eslint-disable */ +/* prettier-ignore */ + +/* auto-generated by NAPI-RS */ + +const { existsSync, readFileSync } = require('fs') +const { join } = require('path') + +const { platform, arch } = process + +let nativeBinding = null +let localFileExisted = false +let loadError = null + +function isMusl() { + // For Node 10 + if (!process.report || typeof process.report.getReport !== 'function') { + try { + const lddPath = require('child_process').execSync('which ldd').toString().trim() + return readFileSync(lddPath, 'utf8').includes('musl') + } catch (e) { + return true + } + } else { + const { glibcVersionRuntime } = process.report.getReport().header + return !glibcVersionRuntime + } +} + +switch (platform) { + case 'android': + switch (arch) { + case 'arm64': + localFileExisted = existsSync(join(__dirname, 'react-server.android-arm64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.android-arm64.node') + } else { + nativeBinding = require('react-server-android-arm64') + } + } catch (e) { + loadError = e + } + break + case 'arm': + localFileExisted = existsSync(join(__dirname, 'react-server.android-arm-eabi.node')) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.android-arm-eabi.node') + } else { + nativeBinding = require('react-server-android-arm-eabi') + } + } catch (e) { + loadError = e + } + break + default: + throw new Error(`Unsupported architecture on Android ${arch}`) + } + break + case 'win32': + switch (arch) { + case 'x64': + localFileExisted = existsSync( + join(__dirname, 'react-server.win32-x64-msvc.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.win32-x64-msvc.node') + } else { + nativeBinding = require('react-server-win32-x64-msvc') + } + } catch (e) { + loadError = e + } + break + case 'ia32': + localFileExisted = existsSync( + join(__dirname, 'react-server.win32-ia32-msvc.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.win32-ia32-msvc.node') + } else { + nativeBinding = require('react-server-win32-ia32-msvc') + } + } catch (e) { + loadError = e + } + break + case 'arm64': + localFileExisted = existsSync( + join(__dirname, 'react-server.win32-arm64-msvc.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.win32-arm64-msvc.node') + } else { + nativeBinding = require('react-server-win32-arm64-msvc') + } + } catch (e) { + loadError = e + } + break + default: + throw new Error(`Unsupported architecture on Windows: ${arch}`) + } + break + case 'darwin': + localFileExisted = existsSync(join(__dirname, 'react-server.darwin-universal.node')) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.darwin-universal.node') + } else { + nativeBinding = require('react-server-darwin-universal') + } + break + } catch {} + switch (arch) { + case 'x64': + localFileExisted = existsSync(join(__dirname, 'react-server.darwin-x64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.darwin-x64.node') + } else { + nativeBinding = require('react-server-darwin-x64') + } + } catch (e) { + loadError = e + } + break + case 'arm64': + localFileExisted = existsSync( + join(__dirname, 'react-server.darwin-arm64.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.darwin-arm64.node') + } else { + nativeBinding = require('react-server-darwin-arm64') + } + } catch (e) { + loadError = e + } + break + default: + throw new Error(`Unsupported architecture on macOS: ${arch}`) + } + break + case 'freebsd': + if (arch !== 'x64') { + throw new Error(`Unsupported architecture on FreeBSD: ${arch}`) + } + localFileExisted = existsSync(join(__dirname, 'react-server.freebsd-x64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.freebsd-x64.node') + } else { + nativeBinding = require('react-server-freebsd-x64') + } + } catch (e) { + loadError = e + } + break + case 'linux': + switch (arch) { + case 'x64': + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, 'react-server.linux-x64-musl.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.linux-x64-musl.node') + } else { + nativeBinding = require('react-server-linux-x64-musl') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync( + join(__dirname, 'react-server.linux-x64-gnu.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.linux-x64-gnu.node') + } else { + nativeBinding = require('react-server-linux-x64-gnu') + } + } catch (e) { + loadError = e + } + } + break + case 'arm64': + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, 'react-server.linux-arm64-musl.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.linux-arm64-musl.node') + } else { + nativeBinding = require('react-server-linux-arm64-musl') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync( + join(__dirname, 'react-server.linux-arm64-gnu.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.linux-arm64-gnu.node') + } else { + nativeBinding = require('react-server-linux-arm64-gnu') + } + } catch (e) { + loadError = e + } + } + break + case 'arm': + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, 'react-server.linux-arm-musleabihf.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.linux-arm-musleabihf.node') + } else { + nativeBinding = require('react-server-linux-arm-musleabihf') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync( + join(__dirname, 'react-server.linux-arm-gnueabihf.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.linux-arm-gnueabihf.node') + } else { + nativeBinding = require('react-server-linux-arm-gnueabihf') + } + } catch (e) { + loadError = e + } + } + break + case 'riscv64': + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, 'react-server.linux-riscv64-musl.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.linux-riscv64-musl.node') + } else { + nativeBinding = require('react-server-linux-riscv64-musl') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync( + join(__dirname, 'react-server.linux-riscv64-gnu.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.linux-riscv64-gnu.node') + } else { + nativeBinding = require('react-server-linux-riscv64-gnu') + } + } catch (e) { + loadError = e + } + } + break + case 's390x': + localFileExisted = existsSync( + join(__dirname, 'react-server.linux-s390x-gnu.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./react-server.linux-s390x-gnu.node') + } else { + nativeBinding = require('react-server-linux-s390x-gnu') + } + } catch (e) { + loadError = e + } + break + default: + throw new Error(`Unsupported architecture on Linux: ${arch}`) + } + break + default: + throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`) +} + +if (!nativeBinding) { + if (loadError) { + throw loadError + } + throw new Error(`Failed to load native binding`) +} + +const { validate, FileType } = nativeBinding + +module.exports.validate = validate +module.exports.FileType = FileType diff --git a/npm/android-arm-eabi/README.md b/npm/android-arm-eabi/README.md new file mode 100644 index 0000000..0cce567 --- /dev/null +++ b/npm/android-arm-eabi/README.md @@ -0,0 +1,3 @@ +# `react-server-android-arm-eabi` + +This is the **armv7-linux-androideabi** binary for `react-server` diff --git a/npm/android-arm-eabi/package.json b/npm/android-arm-eabi/package.json new file mode 100644 index 0000000..7362f44 --- /dev/null +++ b/npm/android-arm-eabi/package.json @@ -0,0 +1,18 @@ +{ + "name": "react-server-android-arm-eabi", + "version": "0.0.0", + "os": [ + "android" + ], + "cpu": [ + "arm" + ], + "main": "react-server.android-arm-eabi.node", + "files": [ + "react-server.android-arm-eabi.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/npm/android-arm64/README.md b/npm/android-arm64/README.md new file mode 100644 index 0000000..fd70752 --- /dev/null +++ b/npm/android-arm64/README.md @@ -0,0 +1,3 @@ +# `react-server-android-arm64` + +This is the **aarch64-linux-android** binary for `react-server` diff --git a/npm/android-arm64/package.json b/npm/android-arm64/package.json new file mode 100644 index 0000000..b3e4f61 --- /dev/null +++ b/npm/android-arm64/package.json @@ -0,0 +1,18 @@ +{ + "name": "react-server-android-arm64", + "version": "0.0.0", + "os": [ + "android" + ], + "cpu": [ + "arm64" + ], + "main": "react-server.android-arm64.node", + "files": [ + "react-server.android-arm64.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/npm/darwin-arm64/README.md b/npm/darwin-arm64/README.md new file mode 100644 index 0000000..bb05af3 --- /dev/null +++ b/npm/darwin-arm64/README.md @@ -0,0 +1,3 @@ +# `react-server-darwin-arm64` + +This is the **aarch64-apple-darwin** binary for `react-server` diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json new file mode 100644 index 0000000..69a7ce0 --- /dev/null +++ b/npm/darwin-arm64/package.json @@ -0,0 +1,18 @@ +{ + "name": "react-server-darwin-arm64", + "version": "0.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "react-server.darwin-arm64.node", + "files": [ + "react-server.darwin-arm64.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/npm/darwin-universal/README.md b/npm/darwin-universal/README.md new file mode 100644 index 0000000..3098147 --- /dev/null +++ b/npm/darwin-universal/README.md @@ -0,0 +1,3 @@ +# `react-server-darwin-universal` + +This is the **universal-apple-darwin** binary for `react-server` diff --git a/npm/darwin-universal/package.json b/npm/darwin-universal/package.json new file mode 100644 index 0000000..e5e0f16 --- /dev/null +++ b/npm/darwin-universal/package.json @@ -0,0 +1,15 @@ +{ + "name": "react-server-darwin-universal", + "version": "0.0.0", + "os": [ + "darwin" + ], + "main": "react-server.darwin-universal.node", + "files": [ + "react-server.darwin-universal.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/npm/darwin-x64/README.md b/npm/darwin-x64/README.md new file mode 100644 index 0000000..d34e090 --- /dev/null +++ b/npm/darwin-x64/README.md @@ -0,0 +1,3 @@ +# `react-server-darwin-x64` + +This is the **x86_64-apple-darwin** binary for `react-server` diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json new file mode 100644 index 0000000..b068d2e --- /dev/null +++ b/npm/darwin-x64/package.json @@ -0,0 +1,18 @@ +{ + "name": "react-server-darwin-x64", + "version": "0.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "react-server.darwin-x64.node", + "files": [ + "react-server.darwin-x64.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/npm/freebsd-x64/README.md b/npm/freebsd-x64/README.md new file mode 100644 index 0000000..9455d75 --- /dev/null +++ b/npm/freebsd-x64/README.md @@ -0,0 +1,3 @@ +# `react-server-freebsd-x64` + +This is the **x86_64-unknown-freebsd** binary for `react-server` diff --git a/npm/freebsd-x64/package.json b/npm/freebsd-x64/package.json new file mode 100644 index 0000000..f1c14a7 --- /dev/null +++ b/npm/freebsd-x64/package.json @@ -0,0 +1,18 @@ +{ + "name": "react-server-freebsd-x64", + "version": "0.0.0", + "os": [ + "freebsd" + ], + "cpu": [ + "x64" + ], + "main": "react-server.freebsd-x64.node", + "files": [ + "react-server.freebsd-x64.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/npm/linux-arm-gnueabihf/README.md b/npm/linux-arm-gnueabihf/README.md new file mode 100644 index 0000000..b7ab23c --- /dev/null +++ b/npm/linux-arm-gnueabihf/README.md @@ -0,0 +1,3 @@ +# `react-server-linux-arm-gnueabihf` + +This is the **armv7-unknown-linux-gnueabihf** binary for `react-server` diff --git a/npm/linux-arm-gnueabihf/package.json b/npm/linux-arm-gnueabihf/package.json new file mode 100644 index 0000000..dade11f --- /dev/null +++ b/npm/linux-arm-gnueabihf/package.json @@ -0,0 +1,18 @@ +{ + "name": "react-server-linux-arm-gnueabihf", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm" + ], + "main": "react-server.linux-arm-gnueabihf.node", + "files": [ + "react-server.linux-arm-gnueabihf.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/npm/linux-arm-musleabihf/README.md b/npm/linux-arm-musleabihf/README.md new file mode 100644 index 0000000..a7e4b79 --- /dev/null +++ b/npm/linux-arm-musleabihf/README.md @@ -0,0 +1,3 @@ +# `react-server-linux-arm-musleabihf` + +This is the **armv7-unknown-linux-musleabihf** binary for `react-server` diff --git a/npm/linux-arm-musleabihf/package.json b/npm/linux-arm-musleabihf/package.json new file mode 100644 index 0000000..f12454d --- /dev/null +++ b/npm/linux-arm-musleabihf/package.json @@ -0,0 +1,18 @@ +{ + "name": "react-server-linux-arm-musleabihf", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm" + ], + "main": "react-server.linux-arm-musleabihf.node", + "files": [ + "react-server.linux-arm-musleabihf.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/npm/linux-arm64-gnu/README.md b/npm/linux-arm64-gnu/README.md new file mode 100644 index 0000000..5e0c2f4 --- /dev/null +++ b/npm/linux-arm64-gnu/README.md @@ -0,0 +1,3 @@ +# `react-server-linux-arm64-gnu` + +This is the **aarch64-unknown-linux-gnu** binary for `react-server` diff --git a/npm/linux-arm64-gnu/package.json b/npm/linux-arm64-gnu/package.json new file mode 100644 index 0000000..29a6af3 --- /dev/null +++ b/npm/linux-arm64-gnu/package.json @@ -0,0 +1,21 @@ +{ + "name": "react-server-linux-arm64-gnu", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "react-server.linux-arm64-gnu.node", + "files": [ + "react-server.linux-arm64-gnu.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ] +} \ No newline at end of file diff --git a/npm/linux-arm64-musl/README.md b/npm/linux-arm64-musl/README.md new file mode 100644 index 0000000..97fc75a --- /dev/null +++ b/npm/linux-arm64-musl/README.md @@ -0,0 +1,3 @@ +# `react-server-linux-arm64-musl` + +This is the **aarch64-unknown-linux-musl** binary for `react-server` diff --git a/npm/linux-arm64-musl/package.json b/npm/linux-arm64-musl/package.json new file mode 100644 index 0000000..84ee3b0 --- /dev/null +++ b/npm/linux-arm64-musl/package.json @@ -0,0 +1,21 @@ +{ + "name": "react-server-linux-arm64-musl", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "react-server.linux-arm64-musl.node", + "files": [ + "react-server.linux-arm64-musl.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "musl" + ] +} \ No newline at end of file diff --git a/npm/linux-riscv64-gnu/README.md b/npm/linux-riscv64-gnu/README.md new file mode 100644 index 0000000..a0aac16 --- /dev/null +++ b/npm/linux-riscv64-gnu/README.md @@ -0,0 +1,3 @@ +# `react-server-linux-riscv64-gnu` + +This is the **riscv64gc-unknown-linux-gnu** binary for `react-server` diff --git a/npm/linux-riscv64-gnu/package.json b/npm/linux-riscv64-gnu/package.json new file mode 100644 index 0000000..abd0ec1 --- /dev/null +++ b/npm/linux-riscv64-gnu/package.json @@ -0,0 +1,21 @@ +{ + "name": "react-server-linux-riscv64-gnu", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "riscv64" + ], + "main": "react-server.linux-riscv64-gnu.node", + "files": [ + "react-server.linux-riscv64-gnu.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ] +} \ No newline at end of file diff --git a/npm/linux-x64-gnu/README.md b/npm/linux-x64-gnu/README.md new file mode 100644 index 0000000..0b77f15 --- /dev/null +++ b/npm/linux-x64-gnu/README.md @@ -0,0 +1,3 @@ +# `react-server-linux-x64-gnu` + +This is the **x86_64-unknown-linux-gnu** binary for `react-server` diff --git a/npm/linux-x64-gnu/package.json b/npm/linux-x64-gnu/package.json new file mode 100644 index 0000000..73584e9 --- /dev/null +++ b/npm/linux-x64-gnu/package.json @@ -0,0 +1,21 @@ +{ + "name": "react-server-linux-x64-gnu", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "react-server.linux-x64-gnu.node", + "files": [ + "react-server.linux-x64-gnu.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ] +} \ No newline at end of file diff --git a/npm/linux-x64-musl/README.md b/npm/linux-x64-musl/README.md new file mode 100644 index 0000000..eb98162 --- /dev/null +++ b/npm/linux-x64-musl/README.md @@ -0,0 +1,3 @@ +# `react-server-linux-x64-musl` + +This is the **x86_64-unknown-linux-musl** binary for `react-server` diff --git a/npm/linux-x64-musl/package.json b/npm/linux-x64-musl/package.json new file mode 100644 index 0000000..6356d7e --- /dev/null +++ b/npm/linux-x64-musl/package.json @@ -0,0 +1,21 @@ +{ + "name": "react-server-linux-x64-musl", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "react-server.linux-x64-musl.node", + "files": [ + "react-server.linux-x64-musl.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "musl" + ] +} \ No newline at end of file diff --git a/npm/win32-arm64-msvc/README.md b/npm/win32-arm64-msvc/README.md new file mode 100644 index 0000000..fc077a1 --- /dev/null +++ b/npm/win32-arm64-msvc/README.md @@ -0,0 +1,3 @@ +# `react-server-win32-arm64-msvc` + +This is the **aarch64-pc-windows-msvc** binary for `react-server` diff --git a/npm/win32-arm64-msvc/package.json b/npm/win32-arm64-msvc/package.json new file mode 100644 index 0000000..4397eb6 --- /dev/null +++ b/npm/win32-arm64-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "react-server-win32-arm64-msvc", + "version": "0.0.0", + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ], + "main": "react-server.win32-arm64-msvc.node", + "files": [ + "react-server.win32-arm64-msvc.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/npm/win32-ia32-msvc/README.md b/npm/win32-ia32-msvc/README.md new file mode 100644 index 0000000..40f6b9c --- /dev/null +++ b/npm/win32-ia32-msvc/README.md @@ -0,0 +1,3 @@ +# `react-server-win32-ia32-msvc` + +This is the **i686-pc-windows-msvc** binary for `react-server` diff --git a/npm/win32-ia32-msvc/package.json b/npm/win32-ia32-msvc/package.json new file mode 100644 index 0000000..7bc36b8 --- /dev/null +++ b/npm/win32-ia32-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "react-server-win32-ia32-msvc", + "version": "0.0.0", + "os": [ + "win32" + ], + "cpu": [ + "ia32" + ], + "main": "react-server.win32-ia32-msvc.node", + "files": [ + "react-server.win32-ia32-msvc.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/npm/win32-x64-msvc/README.md b/npm/win32-x64-msvc/README.md new file mode 100644 index 0000000..5e73bab --- /dev/null +++ b/npm/win32-x64-msvc/README.md @@ -0,0 +1,3 @@ +# `react-server-win32-x64-msvc` + +This is the **x86_64-pc-windows-msvc** binary for `react-server` diff --git a/npm/win32-x64-msvc/package.json b/npm/win32-x64-msvc/package.json new file mode 100644 index 0000000..b0bdf15 --- /dev/null +++ b/npm/win32-x64-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "react-server-win32-x64-msvc", + "version": "0.0.0", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "react-server.win32-x64-msvc.node", + "files": [ + "react-server.win32-x64-msvc.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/package.json b/package.json index 28fb424..c88f17f 100644 --- a/package.json +++ b/package.json @@ -1,27 +1,47 @@ { - "name": "swc-plugin-react-server", - "version": "0.2.2", - "author": "himself65 ", + "name": "react-server", + "version": "0.2.0", + "main": "index.js", + "types": "index.d.ts", + "napi": { + "name": "react-server", + "triples": { + "additional": [ + "aarch64-apple-darwin", + "aarch64-linux-android", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", + "aarch64-pc-windows-msvc", + "armv7-unknown-linux-gnueabihf", + "armv7-unknown-linux-musleabihf", + "x86_64-unknown-linux-musl", + "x86_64-unknown-freebsd", + "i686-pc-windows-msvc", + "armv7-linux-androideabi", + "universal-apple-darwin", + "riscv64gc-unknown-linux-gnu" + ] + } + }, "license": "MIT", - "type": "module", - "main": "target/wasm32-wasi/release/react_server.wasm", - "exports": { - ".": "./target/wasm32-wasi/release/react_server.wasm" + "devDependencies": { + "@napi-rs/cli": "^2.18.2", + "ava": "^6.0.1" + }, + "ava": { + "timeout": "3m" + }, + "engines": { + "node": ">= 20" }, - "keywords": [ - "swc-plugin", - "react", - "react-server" - ], "scripts": { - "prepublishOnly": "cargo build-wasi --release" + "artifacts": "napi artifacts", + "build": "napi build --platform --release", + "build:debug": "napi build --platform", + "prepublishOnly": "napi prepublish -t npm", + "test": "ava", + "universal": "napi universal", + "version": "napi version" }, - "files": [ - "lib", - "target/wasm32-wasi/release/react_server.wasm" - ], - "preferUnplugged": true, - "devDependencies": { - "@swc/core": "^1.6.1" - } + "packageManager": "yarn@4.3.1" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml deleted file mode 100644 index 71fb493..0000000 --- a/pnpm-lock.yaml +++ /dev/null @@ -1,144 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - '@swc/core': - specifier: ^1.6.1 - version: 1.6.1 - -packages: - - '@swc/core-darwin-arm64@1.6.1': - resolution: {integrity: sha512-u6GdwOXsOEdNAdSI6nWq6G2BQw5HiSNIZVcBaH1iSvBnxZvWbnIKyDiZKaYnDwTLHLzig2GuUjjE2NaCJPy4jg==} - engines: {node: '>=10'} - cpu: [arm64] - os: [darwin] - - '@swc/core-darwin-x64@1.6.1': - resolution: {integrity: sha512-/tXwQibkDNLVbAtr7PUQI0iQjoB708fjhDDDfJ6WILSBVZ3+qs/LHjJ7jHwumEYxVq1XA7Fv2Q7SE/ZSQoWHcQ==} - engines: {node: '>=10'} - cpu: [x64] - os: [darwin] - - '@swc/core-linux-arm-gnueabihf@1.6.1': - resolution: {integrity: sha512-aDgipxhJTms8iH78emHVutFR2c16LNhO+NTRCdYi+X4PyIn58/DyYTH6VDZ0AeEcS5f132ZFldU5AEgExwihXA==} - engines: {node: '>=10'} - cpu: [arm] - os: [linux] - - '@swc/core-linux-arm64-gnu@1.6.1': - resolution: {integrity: sha512-XkJ+eO4zUKG5g458RyhmKPyBGxI0FwfWFgpfIj5eDybxYJ6s4HBT5MoxyBLorB5kMlZ0XoY/usUMobPVY3nL0g==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - - '@swc/core-linux-arm64-musl@1.6.1': - resolution: {integrity: sha512-dr6YbLBg/SsNxs1hDqJhxdcrS8dGMlOXJwXIrUvACiA8jAd6S5BxYCaqsCefLYXtaOmu0bbx1FB/evfodqB70Q==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - - '@swc/core-linux-x64-gnu@1.6.1': - resolution: {integrity: sha512-A0b/3V+yFy4LXh3O9umIE7LXPC7NBWdjl6AQYqymSMcMu0EOb1/iygA6s6uWhz9y3e172Hpb9b/CGsuD8Px/bg==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - - '@swc/core-linux-x64-musl@1.6.1': - resolution: {integrity: sha512-5dJjlzZXhC87nZZZWbpiDP8kBIO0ibis893F/rtPIQBI5poH+iJuA32EU3wN4/WFHeK4et8z6SGSVghPtWyk4g==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - - '@swc/core-win32-arm64-msvc@1.6.1': - resolution: {integrity: sha512-HBi1ZlwvfcUibLtT3g/lP57FaDPC799AD6InolB2KSgkqyBbZJ9wAXM8/CcH67GLIP0tZ7FqblrJTzGXxetTJQ==} - engines: {node: '>=10'} - cpu: [arm64] - os: [win32] - - '@swc/core-win32-ia32-msvc@1.6.1': - resolution: {integrity: sha512-AKqHohlWERclexar5y6ux4sQ8yaMejEXNxeKXm7xPhXrp13/1p4/I3E5bPVX/jMnvpm4HpcKSP0ee2WsqmhhPw==} - engines: {node: '>=10'} - cpu: [ia32] - os: [win32] - - '@swc/core-win32-x64-msvc@1.6.1': - resolution: {integrity: sha512-0dLdTLd+ONve8kgC5T6VQ2Y5G+OZ7y0ujjapnK66wpvCBM6BKYGdT/OKhZKZydrC5gUKaxFN6Y5oOt9JOFUrOQ==} - engines: {node: '>=10'} - cpu: [x64] - os: [win32] - - '@swc/core@1.6.1': - resolution: {integrity: sha512-Yz5uj5hNZpS5brLtBvKY0L4s2tBAbQ4TjmW8xF1EC3YLFxQRrUjMP49Zm1kp/KYyYvTkSaG48Ffj2YWLu9nChw==} - engines: {node: '>=10'} - peerDependencies: - '@swc/helpers': '*' - peerDependenciesMeta: - '@swc/helpers': - optional: true - - '@swc/counter@0.1.3': - resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} - - '@swc/types@0.1.8': - resolution: {integrity: sha512-RNFA3+7OJFNYY78x0FYwi1Ow+iF1eF5WvmfY1nXPOEH4R2p/D4Cr1vzje7dNAI2aLFqpv8Wyz4oKSWqIZArpQA==} - -snapshots: - - '@swc/core-darwin-arm64@1.6.1': - optional: true - - '@swc/core-darwin-x64@1.6.1': - optional: true - - '@swc/core-linux-arm-gnueabihf@1.6.1': - optional: true - - '@swc/core-linux-arm64-gnu@1.6.1': - optional: true - - '@swc/core-linux-arm64-musl@1.6.1': - optional: true - - '@swc/core-linux-x64-gnu@1.6.1': - optional: true - - '@swc/core-linux-x64-musl@1.6.1': - optional: true - - '@swc/core-win32-arm64-msvc@1.6.1': - optional: true - - '@swc/core-win32-ia32-msvc@1.6.1': - optional: true - - '@swc/core-win32-x64-msvc@1.6.1': - optional: true - - '@swc/core@1.6.1': - dependencies: - '@swc/counter': 0.1.3 - '@swc/types': 0.1.8 - optionalDependencies: - '@swc/core-darwin-arm64': 1.6.1 - '@swc/core-darwin-x64': 1.6.1 - '@swc/core-linux-arm-gnueabihf': 1.6.1 - '@swc/core-linux-arm64-gnu': 1.6.1 - '@swc/core-linux-arm64-musl': 1.6.1 - '@swc/core-linux-x64-gnu': 1.6.1 - '@swc/core-linux-x64-musl': 1.6.1 - '@swc/core-win32-arm64-msvc': 1.6.1 - '@swc/core-win32-ia32-msvc': 1.6.1 - '@swc/core-win32-x64-msvc': 1.6.1 - - '@swc/counter@0.1.3': {} - - '@swc/types@0.1.8': - dependencies: - '@swc/counter': 0.1.3 diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..cab5731 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,2 @@ +tab_spaces = 2 +edition = "2021" diff --git a/src/lib.rs b/src/lib.rs index f792ae6..cab28b7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,45 +1,163 @@ -#![recursion_limit = "2048"] -#![feature(box_patterns)] -#![feature(arbitrary_self_types)] +#![deny(clippy::all)] -use swc_core::common::FileName; -use swc_core::ecma::ast::Program; -use swc_core::ecma::visit::{FoldWith}; -use swc_core::plugin::{ - plugin_transform, proxies::TransformPluginProgramMetadata, -}; -use crate::transforms::react_actions::{Config, server_actions}; +#[macro_use] +extern crate napi_derive; -pub mod transforms; +use std::cmp::PartialEq; +use napi::bindgen_prelude::*; +use tokio::fs; -impl Default for Config { +use std::path::Path; +use oxc_allocator::Allocator; +use oxc_ast::{ast::{Function}, visit::walk, Visit}; +use oxc_ast::ast::{Directive, ImportDeclaration}; +use oxc_parser::Parser; +use oxc_span::{SourceType}; +use oxc_syntax::scope::ScopeFlags; + +#[napi] +pub async fn validate( + file_path: String, +) -> Result { + let path = Path::new(&file_path); + let source_text = String::from_utf8( + fs::read(path) + .await + .map_err(|e| Error::new(Status::Unknown, format!("Failed to read file: {}", e)))? + ).unwrap(); + let source_type = SourceType::from_path(path).unwrap(); + validate_string(source_text, source_type) +} + +pub fn validate_string( + source_text: String, + source_type: SourceType, +) -> Result { + let allocator = Allocator::default(); + let ret = Parser::new(&allocator, &source_text, source_type).parse(); + + for error in ret.errors { + let error = error.with_source_code(source_text.clone()); + println!("{error:?}"); + } + + let program = ret.program; + + let mut rsc = ReactServerComponent::default(); + rsc.visit_program(&program); + + Ok(rsc) +} + +#[napi] +#[derive(Debug, PartialEq)] +pub enum FileType { + ServerComponent, + ServerAction, + Client, + Isomorphic, +} + +#[napi(object)] +#[derive(Debug)] +pub struct ReactServerComponent { + pub file_type: FileType, + pub error: Option, +} + +impl Default for ReactServerComponent { fn default() -> Self { - Config { - is_react_server_layer: true, - enabled: true, + ReactServerComponent { + file_type: FileType::Isomorphic, + error: None, + } + } +} + +impl<'a> Visit<'a> for ReactServerComponent { + fn visit_directive(&mut self, directive: &Directive<'a>) { + match directive.expression.value.as_str() { + "use client" => { + if self.file_type == FileType::ServerComponent || + self.file_type == FileType::ServerAction { + self.error = Some("Cannot use both client and server".to_string()); + } + self.file_type = FileType::Client + } + "use server" => { + if self.file_type == FileType::Client { + self.error = Some("Cannot use both client and server".to_string()); + } + self.file_type = FileType::ServerComponent + } + _ => {} + } + walk::walk_directive(self, directive); + } + + fn visit_import_declaration(&mut self, decl: &ImportDeclaration<'a>) { + if decl.source.value == "client-only" { + if self.file_type == FileType::ServerComponent || + self.file_type == FileType::ServerAction { + self.error = Some("Cannot use both client and server".to_string()); + } + self.file_type = FileType::Client + } else if decl.source.value == "server-only" { + if self.file_type == FileType::Client { + self.error = Some("Cannot use both client and server".to_string()); + } + self.file_type = FileType::ServerComponent } + walk::walk_import_declaration(self, decl); + } + + fn visit_function(&mut self, func: &Function<'a>, flags: Option) { + for stmt in &func.body { + stmt.directives.iter().for_each(|d| { + if &d.expression.value == "use server" { + if self.file_type == FileType::Client { + panic!("Cannot use both client and server") + } + self.file_type = FileType::ServerAction + } + }); + } + walk::walk_function(self, func, flags); } } -#[plugin_transform] -pub fn process_transform(program: Program, metadata: TransformPluginProgramMetadata) -> Program { - let plugin_config = metadata.get_transform_plugin_config(); - let config: Config = if let Some(plugin_config) = plugin_config { - serde_json::from_str(&plugin_config).unwrap_or_else(|f| { - println!("Could not deserialize instrumentation option"); - println!("{:#?}", f); - Default::default() - }) - } else { - Default::default() - }; - let mut actions = server_actions( - match metadata.source_map.source_file.get() { - Some(file) => &file.name, - None => &FileName::Anon, - }, - config, - metadata.comments.clone(), - ); - program.fold_with(&mut actions) +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_use_server() { + let source_text = r#" + "use server" + "#; + let rsc = validate_string(source_text.to_string(), SourceType::from_path("test.js").unwrap()).unwrap(); + assert_eq!(rsc.file_type, FileType::ServerComponent); + assert_eq!(rsc.error, None); + } + + #[test] + fn test_use_client() { + let source_text = r#" + "use client" + "#; + let rsc = validate_string(source_text.to_string(), SourceType::from_path("test.js").unwrap()).unwrap(); + assert_eq!(rsc.file_type, FileType::Client); + assert_eq!(rsc.error, None); + } + + #[test] + fn test_use_server_and_client() { + let source_text = r#" + "use server" + "use client" + "#; + let rsc = validate_string(source_text.to_string(), SourceType::from_path("test.js").unwrap()).unwrap(); + assert_eq!(rsc.file_type, FileType::Client); + assert_eq!(rsc.error, Some("Cannot use both client and server".to_string())); + } } \ No newline at end of file diff --git a/src/transforms/mod.rs b/src/transforms/mod.rs deleted file mode 100644 index 8fa804e..0000000 --- a/src/transforms/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod react_actions; diff --git a/src/transforms/react_actions.rs b/src/transforms/react_actions.rs deleted file mode 100644 index 4699a85..0000000 --- a/src/transforms/react_actions.rs +++ /dev/null @@ -1,1767 +0,0 @@ -use std::{ - collections::BTreeMap, - convert::{TryFrom, TryInto}, - mem::take, -}; - -use hex::encode as hex_encode; -use serde::Deserialize; -use sha1::{Digest, Sha1}; -use swc_core::{ - common::{ - comments::{Comment, CommentKind, Comments}, - errors::HANDLER, - util::take::Take, - BytePos, FileName, DUMMY_SP, - }, - ecma::{ - ast::*, - atoms::JsWord, - utils::{private_ident, quote_ident, ExprFactory}, - visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}, - }, -}; -use swc_core::common::Span; - - -#[derive(Clone, Debug, Deserialize)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -pub struct Config { - pub is_react_server_layer: bool, - pub enabled: bool, -} - -/// A mapping of hashed action id to the action's exported function name. -// Using BTreeMap to ensure the order of the actions is deterministic. -pub type ActionsMap = BTreeMap; - -#[tracing::instrument(level = tracing::Level::TRACE, skip_all)] -pub fn server_actions( - file_name: &FileName, - config: Config, - comments: C, -) -> impl VisitMut + Fold { - as_folder(ServerActions { - config, - comments, - file_name: file_name.to_string(), - start_pos: BytePos(0), - in_action_file: false, - in_export_decl: false, - in_default_export_decl: false, - in_callee: false, - has_action: false, - - reference_index: 0, - in_module_level: true, - should_track_names: false, - - names: Default::default(), - declared_idents: Default::default(), - - exported_idents: Default::default(), - - // This flag allows us to rewrite `function foo() {}` to `const foo = createProxy(...)`. - rewrite_fn_decl_to_proxy_decl: None, - rewrite_default_fn_expr_to_proxy_expr: None, - rewrite_expr_to_proxy_expr: None, - - annotations: Default::default(), - extra_items: Default::default(), - export_actions: Default::default(), - }) -} - -/// Serializes the Server Actions into a magic comment prefixed by -/// `__next_internal_action_entry_do_not_use__`. -fn generate_server_actions_comment(actions: ActionsMap) -> String { - format!( - " __next_internal_action_entry_do_not_use__ {} ", - serde_json::to_string(&actions).unwrap() - ) -} - -struct ServerActions { - #[allow(unused)] - config: Config, - file_name: String, - comments: C, - - start_pos: BytePos, - in_action_file: bool, - in_export_decl: bool, - in_default_export_decl: bool, - in_callee: bool, - has_action: bool, - - reference_index: u32, - in_module_level: bool, - should_track_names: bool, - - names: Vec, - declared_idents: Vec, - - // This flag allows us to rewrite `function foo() {}` to `const foo = createProxy(...)`. - rewrite_fn_decl_to_proxy_decl: Option, - rewrite_default_fn_expr_to_proxy_expr: Option>, - rewrite_expr_to_proxy_expr: Option>, - - // (ident, export name) - exported_idents: Vec<(Id, String)>, - - annotations: Vec, - extra_items: Vec, - export_actions: Vec, -} - -impl ServerActions { - // Check if the function or arrow function is an action function - fn get_action_info( - &mut self, - maybe_body: Option<&mut BlockStmt>, - remove_directive: bool, - ) -> bool { - let mut is_action_fn = false; - - if self.in_action_file && self.in_export_decl { - // All export functions in a server file are actions - is_action_fn = true; - } else { - // Check if the function has `"use server"` - if let Some(body) = maybe_body { - let mut action_span = None; - remove_server_directive_index_in_fn( - &mut body.stmts, - remove_directive, - &mut is_action_fn, - &mut action_span, - self.config.enabled, - ); - - if is_action_fn && !self.config.is_react_server_layer && !self.in_action_file { - HANDLER.with(|handler| { - handler - .struct_span_err( - action_span.unwrap_or(body.span), - "It is not allowed to define inline \"use server\" annotated Server Actions in Client Components.\nTo use Server Actions in a Client Component, you can either export them from a separate file with \"use server\" at the top, or pass them down through props from a Server Component.\n\nRead more: https://nextjs.org/docs/app/api-reference/functions/server-actions#with-client-components\n", - ) - .emit() - }); - } - } - } - - is_action_fn - } - - fn maybe_hoist_and_create_proxy( - &mut self, - ids_from_closure: Vec, - function: Option<&mut Box>, - arrow: Option<&mut ArrowExpr>, - ) -> Option> { - let action_name: JsWord = gen_ident(&mut self.reference_index); - let action_ident = private_ident!(action_name.clone()); - let export_name: JsWord = action_name; - - self.has_action = true; - self.export_actions.push(export_name.to_string()); - - if let Some(a) = arrow { - let register_action_expr = annotate_ident_as_action( - action_ident.clone(), - ids_from_closure - .iter() - .cloned() - .map(|id| Some(id.as_arg())) - .collect(), - &self.file_name, - export_name.to_string(), - ); - - if let BlockStmtOrExpr::BlockStmt(block) = &mut *a.body { - block.visit_mut_with(&mut ClosureReplacer { - used_ids: &ids_from_closure, - }); - } - - // export const $ACTION_myAction = async () => {} - let mut new_params: Vec = vec![]; - let mut new_body: BlockStmtOrExpr = *a.body.clone(); - - if !ids_from_closure.is_empty() { - // First argument is the encrypted closure variables - new_params.push(Param { - span: DUMMY_SP, - decorators: vec![], - pat: Pat::Ident(Ident::new("$$ACTION_CLOSURE_BOUND".into(), DUMMY_SP).into()), - }); - - // Also prepend the decryption decl into the body. - // var [arg1, arg2, arg3] = await decryptActionBoundArgs(actionId, - // $$ACTION_CLOSURE_BOUND) - let mut pats = vec![]; - for i in 0..ids_from_closure.len() { - pats.push(Some(Pat::Ident( - Ident::new(format!("$$ACTION_ARG_{}", i).into(), DUMMY_SP).into(), - ))); - } - let decryption_decl = VarDecl { - span: DUMMY_SP, - kind: VarDeclKind::Var, - declare: false, - decls: vec![VarDeclarator { - span: DUMMY_SP, - name: Pat::Array(ArrayPat { - span: DUMMY_SP, - elems: pats, - optional: false, - type_ann: None, - }), - init: Some(Box::new(Expr::Await(AwaitExpr { - span: DUMMY_SP, - arg: Box::new(Expr::Call(CallExpr { - span: DUMMY_SP, - callee: quote_ident!("decryptActionBoundArgs").as_callee(), - args: vec![ - generate_action_id(&self.file_name, &export_name).as_arg(), - quote_ident!("$$ACTION_CLOSURE_BOUND").as_arg(), - ], - type_args: None, - })), - }))), - definite: Default::default(), - }], - }; - - match &mut new_body { - BlockStmtOrExpr::BlockStmt(body) => { - body.stmts.insert(0, decryption_decl.into()); - } - BlockStmtOrExpr::Expr(body_expr) => { - new_body = BlockStmtOrExpr::BlockStmt(BlockStmt { - span: DUMMY_SP, - stmts: vec![ - decryption_decl.into(), - Stmt::Return(ReturnStmt { - span: DUMMY_SP, - arg: Some(body_expr.take()), - }), - ], - }); - } - } - } - - for p in a.params.iter() { - new_params.push(Param { - span: DUMMY_SP, - decorators: vec![], - pat: p.clone(), - }); - } - - // Create the action export decl from the arrow function - self.extra_items - .push(ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl { - span: DUMMY_SP, - decl: FnDecl { - ident: action_ident.clone(), - function: Box::new(Function { - params: new_params, - body: match new_body { - BlockStmtOrExpr::BlockStmt(body) => Some(body), - BlockStmtOrExpr::Expr(expr) => Some(BlockStmt { - span: DUMMY_SP, - stmts: vec![Stmt::Return(ReturnStmt { - span: DUMMY_SP, - arg: Some(expr), - })], - }), - }, - decorators: vec![], - span: DUMMY_SP, - is_generator: false, - is_async: true, - type_params: None, - return_type: None, - }), - declare: Default::default(), - } - .into(), - }))); - - return Some(Box::new(register_action_expr.clone())); - } else if let Some(f) = function { - let register_action_expr = annotate_ident_as_action( - action_ident.clone(), - ids_from_closure - .iter() - .cloned() - .map(|id| Some(id.as_arg())) - .collect(), - &self.file_name, - export_name.to_string(), - ); - - f.body.visit_mut_with(&mut ClosureReplacer { - used_ids: &ids_from_closure, - }); - - // export async function $ACTION_myAction () {} - let mut new_params: Vec = vec![]; - let mut new_body: Option = f.body.clone(); - - // add params from closure collected ids - if !ids_from_closure.is_empty() { - // First argument is the encrypted closure variables - new_params.push(Param { - span: DUMMY_SP, - decorators: vec![], - pat: Pat::Ident(Ident::new("$$ACTION_CLOSURE_BOUND".into(), DUMMY_SP).into()), - }); - - // Also prepend the decryption decl into the body. - // var [arg1, arg2, arg3] = await decryptActionBoundArgs(actionId, - // $$ACTION_CLOSURE_BOUND) - let mut pats = vec![]; - for i in 0..ids_from_closure.len() { - pats.push(Some(Pat::Ident( - Ident::new(format!("$$ACTION_ARG_{}", i).into(), DUMMY_SP).into(), - ))); - } - let decryption_decl = VarDecl { - span: DUMMY_SP, - kind: VarDeclKind::Var, - declare: false, - decls: vec![VarDeclarator { - span: DUMMY_SP, - name: Pat::Array(ArrayPat { - span: DUMMY_SP, - elems: pats, - optional: false, - type_ann: None, - }), - init: Some(Box::new(Expr::Await(AwaitExpr { - span: DUMMY_SP, - arg: Box::new(Expr::Call(CallExpr { - span: DUMMY_SP, - callee: quote_ident!("decryptActionBoundArgs").as_callee(), - args: vec![ - generate_action_id(&self.file_name, &export_name).as_arg(), - quote_ident!("$$ACTION_CLOSURE_BOUND").as_arg(), - ], - type_args: None, - })), - }))), - definite: Default::default(), - }], - }; - - if let Some(body) = &mut new_body { - body.stmts.insert(0, decryption_decl.into()); - } else { - new_body = Some(BlockStmt { - span: DUMMY_SP, - stmts: vec![decryption_decl.into()], - }); - } - } - - for p in f.params.iter() { - new_params.push(p.clone()); - } - - self.extra_items - .push(ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl { - span: DUMMY_SP, - decl: FnDecl { - ident: action_ident.clone(), - function: Box::new(Function { - params: new_params, - body: new_body, - ..*f.take() - }), - declare: Default::default(), - } - .into(), - }))); - - return Some(Box::new(register_action_expr)); - } - - None - } -} - -impl VisitMut for ServerActions { - fn visit_mut_export_decl(&mut self, decl: &mut ExportDecl) { - let old = self.in_export_decl; - self.in_export_decl = true; - decl.decl.visit_mut_with(self); - self.in_export_decl = old; - } - - fn visit_mut_export_default_decl(&mut self, decl: &mut ExportDefaultDecl) { - let old = self.in_export_decl; - let old_default = self.in_default_export_decl; - self.in_export_decl = true; - self.in_default_export_decl = true; - self.rewrite_default_fn_expr_to_proxy_expr = None; - decl.decl.visit_mut_with(self); - self.in_export_decl = old; - self.in_default_export_decl = old_default; - } - - fn visit_mut_export_default_expr(&mut self, expr: &mut ExportDefaultExpr) { - let old = self.in_export_decl; - let old_default = self.in_default_export_decl; - self.in_export_decl = true; - self.in_default_export_decl = true; - expr.expr.visit_mut_with(self); - self.in_export_decl = old; - self.in_default_export_decl = old_default; - } - - fn visit_mut_fn_expr(&mut self, f: &mut FnExpr) { - let is_action_fn = self.get_action_info(f.function.body.as_mut(), true); - - let declared_idents_until = self.declared_idents.len(); - let current_names = take(&mut self.names); - - // Visit children - { - let old_in_module = self.in_module_level; - let old_should_track_names = self.should_track_names; - let old_in_export_decl = self.in_export_decl; - let old_in_default_export_decl = self.in_default_export_decl; - self.in_module_level = false; - self.should_track_names = is_action_fn || self.should_track_names; - self.in_export_decl = false; - self.in_default_export_decl = false; - f.visit_mut_children_with(self); - self.in_module_level = old_in_module; - self.should_track_names = old_should_track_names; - self.in_export_decl = old_in_export_decl; - self.in_default_export_decl = old_in_default_export_decl; - } - - let mut child_names = if self.should_track_names { - let names = take(&mut self.names); - self.names = current_names; - self.names.extend(names.iter().cloned()); - names - } else { - take(&mut self.names) - }; - - if !is_action_fn { - return; - } - - if !f.function.is_async { - HANDLER.with(|handler| { - handler - .struct_span_err(f.function.span, "Server actions must be async functions") - .emit(); - }); - } - - if !(self.in_action_file && self.in_export_decl) { - // It's an action function. If it doesn't have a name, give it one. - match f.ident.as_mut() { - None => { - let action_name = gen_ident(&mut self.reference_index); - let ident = Ident::new(action_name, DUMMY_SP); - f.ident.insert(ident) - } - Some(i) => i, - }; - - // Collect all the identifiers defined inside the closure and used - // in the action function. With deduplication. - retain_names_from_declared_idents( - &mut child_names, - &self.declared_idents[..declared_idents_until], - ); - - let maybe_new_expr = - self.maybe_hoist_and_create_proxy(child_names, Some(&mut f.function), None); - - if self.in_default_export_decl { - // This function expression is also the default export: - // `export default async function() {}` - // This specific case (default export) isn't handled by `visit_mut_expr`. - // Replace the original function expr with a action proxy expr. - self.rewrite_default_fn_expr_to_proxy_expr = maybe_new_expr; - } else { - self.rewrite_expr_to_proxy_expr = maybe_new_expr; - } - } - } - - fn visit_mut_decl(&mut self, d: &mut Decl) { - self.rewrite_fn_decl_to_proxy_decl = None; - d.visit_mut_children_with(self); - - if let Some(decl) = &self.rewrite_fn_decl_to_proxy_decl { - *d = (*decl).clone().into(); - } - - self.rewrite_fn_decl_to_proxy_decl = None; - } - - fn visit_mut_fn_decl(&mut self, f: &mut FnDecl) { - let is_action_fn = self.get_action_info(f.function.body.as_mut(), true); - - let declared_idents_until = self.declared_idents.len(); - let current_names = take(&mut self.names); - - { - // Visit children - let old_in_module = self.in_module_level; - let old_should_track_names = self.should_track_names; - let old_in_export_decl = self.in_export_decl; - let old_in_default_export_decl = self.in_default_export_decl; - self.in_module_level = false; - self.should_track_names = is_action_fn || self.should_track_names; - self.in_export_decl = false; - self.in_default_export_decl = false; - f.visit_mut_children_with(self); - self.in_module_level = old_in_module; - self.should_track_names = old_should_track_names; - self.in_export_decl = old_in_export_decl; - self.in_default_export_decl = old_in_default_export_decl; - } - - let mut child_names = if self.should_track_names { - let names = take(&mut self.names); - self.names = current_names; - self.names.extend(names.iter().cloned()); - names - } else { - take(&mut self.names) - }; - - if !is_action_fn { - return; - } - - if !f.function.is_async { - HANDLER.with(|handler| { - handler - .struct_span_err(f.ident.span, "Server actions must be async functions") - .emit(); - }); - } - - if !(self.in_action_file && self.in_export_decl) { - // Collect all the identifiers defined inside the closure and used - // in the action function. With deduplication. - retain_names_from_declared_idents( - &mut child_names, - &self.declared_idents[..declared_idents_until], - ); - - let maybe_new_expr = - self.maybe_hoist_and_create_proxy(child_names, Some(&mut f.function), None); - - // Replace the original function declaration with a action proxy declaration - // expr. - self.rewrite_fn_decl_to_proxy_decl = Some(VarDecl { - span: DUMMY_SP, - kind: VarDeclKind::Var, - declare: false, - decls: vec![VarDeclarator { - span: DUMMY_SP, - name: Pat::Ident(f.ident.clone().into()), - init: maybe_new_expr, - definite: false, - }], - }); - } - } - - fn visit_mut_method_prop(&mut self, m: &mut MethodProp) { - let old_in_export_decl = self.in_export_decl; - let old_in_default_export_decl = self.in_default_export_decl; - self.in_export_decl = false; - self.in_default_export_decl = false; - m.visit_mut_children_with(self); - self.in_export_decl = old_in_export_decl; - self.in_default_export_decl = old_in_default_export_decl; - } - - fn visit_mut_class_method(&mut self, m: &mut ClassMethod) { - let old_in_export_decl = self.in_export_decl; - let old_in_default_export_decl = self.in_default_export_decl; - self.in_export_decl = false; - self.in_default_export_decl = false; - m.visit_mut_children_with(self); - self.in_export_decl = old_in_export_decl; - self.in_default_export_decl = old_in_default_export_decl; - } - - fn visit_mut_arrow_expr(&mut self, a: &mut ArrowExpr) { - // Arrow expressions need to be visited in prepass to determine if it's - // an action function or not. - let is_action_fn = self.get_action_info( - if let BlockStmtOrExpr::BlockStmt(block) = &mut *a.body { - Some(block) - } else { - None - }, - true, - ); - - let declared_idents_until = self.declared_idents.len(); - let current_names = take(&mut self.names); - - { - // Visit children - let old_in_module = self.in_module_level; - let old_should_track_names = self.should_track_names; - let old_in_export_decl = self.in_export_decl; - let old_in_default_export_decl = self.in_default_export_decl; - self.in_module_level = false; - self.should_track_names = is_action_fn || self.should_track_names; - self.in_export_decl = false; - self.in_default_export_decl = false; - { - for n in &mut a.params { - collect_idents_in_pat(n, &mut self.declared_idents); - } - } - a.visit_mut_children_with(self); - self.in_module_level = old_in_module; - self.should_track_names = old_should_track_names; - self.in_export_decl = old_in_export_decl; - self.in_default_export_decl = old_in_default_export_decl; - } - - let mut child_names = if self.should_track_names { - let names = take(&mut self.names); - self.names = current_names; - self.names.extend(names.iter().cloned()); - names - } else { - take(&mut self.names) - }; - - if !is_action_fn { - return; - } - - if !a.is_async && !self.in_action_file { - HANDLER.with(|handler| { - handler - .struct_span_err(a.span, "Server actions must be async functions") - .emit(); - }); - } - - // Collect all the identifiers defined inside the closure and used - // in the action function. With deduplication. - retain_names_from_declared_idents( - &mut child_names, - &self.declared_idents[..declared_idents_until], - ); - - let maybe_new_expr = self.maybe_hoist_and_create_proxy(child_names, None, Some(a)); - self.rewrite_expr_to_proxy_expr = maybe_new_expr; - } - - fn visit_mut_module(&mut self, m: &mut Module) { - self.start_pos = m.span.lo; - m.visit_mut_children_with(self); - } - - fn visit_mut_stmt(&mut self, n: &mut Stmt) { - n.visit_mut_children_with(self); - - if self.in_module_level { - return; - } - - // If it's a closure (not in the module level), we need to collect - // identifiers defined in the closure. - collect_decl_idents_in_stmt(n, &mut self.declared_idents); - } - - fn visit_mut_param(&mut self, n: &mut Param) { - n.visit_mut_children_with(self); - - if self.in_module_level { - return; - } - - collect_idents_in_pat(&n.pat, &mut self.declared_idents); - } - - fn visit_mut_prop_or_spread(&mut self, n: &mut PropOrSpread) { - if !self.in_module_level && self.should_track_names { - if let PropOrSpread::Prop(box Prop::Shorthand(i)) = n { - self.names.push(Name::from(&*i)); - self.should_track_names = false; - n.visit_mut_children_with(self); - self.should_track_names = true; - return; - } - } - - n.visit_mut_children_with(self); - } - - fn visit_mut_callee(&mut self, n: &mut Callee) { - let old_in_callee = self.in_callee; - self.in_callee = true; - n.visit_mut_children_with(self); - self.in_callee = old_in_callee; - } - - fn visit_mut_expr(&mut self, n: &mut Expr) { - if !self.in_module_level && self.should_track_names { - if let Ok(mut name) = Name::try_from(&*n) { - if self.in_callee { - // This is a callee i.e. `foo.bar()`, - // we need to track the actual value instead of the method name. - if !name.1.is_empty() { - name.1.pop(); - } - } - - self.names.push(name); - self.should_track_names = false; - n.visit_mut_children_with(self); - self.should_track_names = true; - return; - } - } - - self.rewrite_expr_to_proxy_expr = None; - n.visit_mut_children_with(self); - if let Some(expr) = &self.rewrite_expr_to_proxy_expr { - *n = (**expr).clone(); - self.rewrite_expr_to_proxy_expr = None; - } - } - - fn visit_mut_module_items(&mut self, stmts: &mut Vec) { - remove_server_directive_index_in_module( - stmts, - &mut self.in_action_file, - &mut self.has_action, - self.config.enabled, - ); - - let old_annotations = self.annotations.take(); - let mut new = Vec::with_capacity(stmts.len()); - - for mut stmt in stmts.take() { - // For action file, it's not allowed to export things other than async - // functions. - if self.in_action_file { - let mut disallowed_export_span = DUMMY_SP; - - // Currrently only function exports are allowed. - match &mut stmt { - ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl { decl, span })) => { - match decl { - Decl::Fn(f) => { - // export function foo() {} - self.exported_idents - .push((f.ident.to_id(), f.ident.sym.to_string())); - } - Decl::Var(var) => { - // export const foo = 1 - let mut ids: Vec = Vec::new(); - collect_idents_in_var_decls(&var.decls, &mut ids); - self.exported_idents.extend( - ids.into_iter().map(|id| (id.clone(), id.0.to_string())), - ); - - for decl in &mut var.decls { - if let Some(init) = &decl.init { - if let Expr::Lit(_) = &**init { - // It's not allowed to export any literal. - disallowed_export_span = *span; - } - } - } - } - _ => { - disallowed_export_span = *span; - } - } - } - ModuleItem::ModuleDecl(ModuleDecl::ExportNamed(named)) => { - if named.src.is_some() { - disallowed_export_span = named.span; - } else { - for spec in &mut named.specifiers { - if let ExportSpecifier::Named(ExportNamedSpecifier { - orig: ModuleExportName::Ident(ident), - exported, - .. - }) = spec - { - if let Some(export_name) = exported { - if let ModuleExportName::Ident(Ident { sym, .. }) = - export_name - { - // export { foo as bar } - self.exported_idents - .push((ident.to_id(), sym.to_string())); - } else if let ModuleExportName::Str(str) = export_name { - // export { foo as "bar" } - self.exported_idents - .push((ident.to_id(), str.value.to_string())); - } - } else { - // export { foo } - self.exported_idents - .push((ident.to_id(), ident.sym.to_string())); - } - } else { - disallowed_export_span = named.span; - } - } - } - } - ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultDecl(ExportDefaultDecl { - decl, - span, - .. - })) => match decl { - DefaultDecl::Fn(f) => { - if let Some(ident) = &f.ident { - // export default function foo() {} - self.exported_idents.push((ident.to_id(), "default".into())); - } else { - // export default function() {} - let new_ident = - Ident::new(gen_ident(&mut self.reference_index), DUMMY_SP); - f.ident = Some(new_ident.clone()); - self.exported_idents - .push((new_ident.to_id(), "default".into())); - } - } - _ => { - disallowed_export_span = *span; - } - }, - ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultExpr(default_expr)) => { - match &mut *default_expr.expr { - Expr::Fn(_f) => {} - Expr::Arrow(arrow) => { - if !arrow.is_async { - disallowed_export_span = default_expr.span; - } else { - // export default async () => {} - let new_ident = - Ident::new(gen_ident(&mut self.reference_index), DUMMY_SP); - - self.exported_idents - .push((new_ident.to_id(), "default".into())); - - *default_expr.expr = attach_name_to_expr( - new_ident, - Expr::Arrow(arrow.clone()), - &mut self.extra_items, - ); - } - } - Expr::Ident(ident) => { - // export default foo - self.exported_idents.push((ident.to_id(), "default".into())); - } - Expr::Call(call) => { - // export default fn() - let new_ident = - Ident::new(gen_ident(&mut self.reference_index), DUMMY_SP); - - self.exported_idents - .push((new_ident.to_id(), "default".into())); - - *default_expr.expr = attach_name_to_expr( - new_ident, - Expr::Call(call.clone()), - &mut self.extra_items, - ); - } - _ => { - disallowed_export_span = default_expr.span; - } - } - } - ModuleItem::ModuleDecl(ModuleDecl::ExportAll(ExportAll { span, .. })) => { - disallowed_export_span = *span; - } - _ => {} - } - - if disallowed_export_span != DUMMY_SP { - HANDLER.with(|handler| { - handler - .struct_span_err( - disallowed_export_span, - "Only async functions are allowed to be exported in a \"use \ - server\" file.", - ) - .emit(); - }); - } - } - - stmt.visit_mut_with(self); - - let mut new_stmt = stmt; - - if let Some(expr) = &self.rewrite_default_fn_expr_to_proxy_expr { - // If this happens, we need to replace the statement with a default export expr. - new_stmt = - ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultExpr(ExportDefaultExpr { - span: DUMMY_SP, - expr: expr.clone(), - })); - self.rewrite_default_fn_expr_to_proxy_expr = None; - } - - if self.config.is_react_server_layer || !self.in_action_file { - new.push(new_stmt); - new.extend(self.annotations.drain(..).map(ModuleItem::Stmt)); - new.append(&mut self.extra_items); - } - } - - // If it's a "use server" file, all exports need to be annotated as actions. - if self.in_action_file { - // If it's compiled in the client layer, each export field needs to be - // wrapped by a reference creation call. - let create_ref_ident = private_ident!("createServerReference"); - if !self.config.is_react_server_layer { - // import { createServerReference } from - // 'private-next-rsc-action-client-wrapper' - // createServerReference("action_id") - new.push(ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { - span: DUMMY_SP, - specifiers: vec![ImportSpecifier::Named(ImportNamedSpecifier { - span: DUMMY_SP, - local: create_ref_ident.clone(), - imported: None, - is_type_only: false, - })], - src: Box::new(Str { - span: DUMMY_SP, - value: "private-next-rsc-action-client-wrapper".into(), - raw: None, - }), - type_only: false, - with: None, - phase: Default::default(), - }))); - } - - for (id, export_name) in self.exported_idents.iter() { - let ident = Ident::new(id.0.clone(), DUMMY_SP.with_ctxt(id.1)); - - if !self.config.is_react_server_layer { - let action_id = generate_action_id(&self.file_name, export_name); - - if export_name == "default" { - let export_expr = ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultExpr( - ExportDefaultExpr { - span: DUMMY_SP, - expr: Box::new(Expr::Call(CallExpr { - span: DUMMY_SP, - callee: Callee::Expr(Box::new(Expr::Ident( - create_ref_ident.clone(), - ))), - args: vec![action_id.as_arg()], - type_args: None, - })), - }, - )); - new.push(export_expr); - } else { - let export_expr = - ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl { - span: DUMMY_SP, - decl: Decl::Var(Box::new(VarDecl { - span: DUMMY_SP, - kind: VarDeclKind::Var, - declare: false, - decls: vec![VarDeclarator { - span: DUMMY_SP, - name: Pat::Ident( - Ident::new(export_name.clone().into(), DUMMY_SP).into(), - ), - init: Some(Box::new(Expr::Call(CallExpr { - span: DUMMY_SP, - callee: Callee::Expr(Box::new(Expr::Ident( - create_ref_ident.clone(), - ))), - args: vec![action_id.as_arg()], - type_args: None, - }))), - definite: false, - }], - })), - })); - new.push(export_expr); - } - } else { - self.annotations.push(Stmt::Expr(ExprStmt { - span: DUMMY_SP, - expr: Box::new(annotate_ident_as_action( - ident.clone(), - Vec::new(), - &self.file_name, - export_name.to_string(), - )), - })); - } - } - - if self.config.is_react_server_layer { - new.append(&mut self.extra_items); - - // Ensure that the exports are valid by appending a check - // import { ensureServerEntryExports } from 'private-next-rsc-action-validate' - // ensureServerEntryExports([action1, action2, ...]) - let ensure_ident = private_ident!("ensureServerEntryExports"); - new.push(ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { - span: DUMMY_SP, - specifiers: vec![ImportSpecifier::Named(ImportNamedSpecifier { - span: DUMMY_SP, - local: ensure_ident.clone(), - imported: None, - is_type_only: false, - })], - src: Box::new(Str { - span: DUMMY_SP, - value: "swc-plugin-react-server/rsc".into(), - raw: None, - }), - type_only: false, - with: None, - phase: Default::default(), - }))); - new.push(ModuleItem::Stmt(Stmt::Expr(ExprStmt { - span: DUMMY_SP, - expr: Box::new(Expr::Call(CallExpr { - span: DUMMY_SP, - callee: Callee::Expr(Box::new(Expr::Ident(ensure_ident))), - args: vec![ExprOrSpread { - spread: None, - expr: Box::new(Expr::Array(ArrayLit { - span: DUMMY_SP, - elems: self - .exported_idents - .iter() - .map(|e| { - Some(ExprOrSpread { - spread: None, - expr: Box::new(Expr::Ident(Ident::new( - e.0 .0.clone(), - DUMMY_SP.with_ctxt(e.0 .1), - ))), - }) - }) - .collect(), - })), - }], - type_args: None, - })), - }))); - - // Append annotations to the end of the file. - new.extend(self.annotations.drain(..).map(ModuleItem::Stmt)); - } - } - - if self.has_action { - let mut actions = self.export_actions.clone(); - - // All exported values are considered as actions if the file is an action file. - if self.in_action_file { - actions.extend(self.exported_idents.iter().map(|e| e.1.clone())); - }; - - let actions = actions - .into_iter() - .map(|name| (generate_action_id(&self.file_name, &name), name)) - .collect::(); - // Prepend a special comment to the top of the file. - self.comments.add_leading( - self.start_pos, - Comment { - span: DUMMY_SP, - kind: CommentKind::Block, - text: generate_server_actions_comment(actions).into(), - }, - ); - - if self.config.is_react_server_layer { - // Inlined actions are only allowed on the server layer. - // import { registerServerReference } from 'private-next-rsc-server-reference' - // registerServerReference("action_id") - new.push(ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { - span: DUMMY_SP, - specifiers: vec![ImportSpecifier::Named(ImportNamedSpecifier { - span: DUMMY_SP, - local: quote_ident!("registerServerReference"), - imported: None, - is_type_only: false, - })], - src: Box::new(Str { - span: DUMMY_SP, - value: "swc-plugin-react-server/rsc".into(), - raw: None, - }), - type_only: false, - with: None, - phase: Default::default(), - }))); - - // Encryption and decryption only happens on the server layer. - // import { encryptActionBoundArgs, decryptActionBoundArgs } from - // 'private-next-rsc-action-encryption' - new.push(ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { - span: DUMMY_SP, - specifiers: vec![ - ImportSpecifier::Named(ImportNamedSpecifier { - span: DUMMY_SP, - local: quote_ident!("encryptActionBoundArgs"), - imported: None, - is_type_only: false, - }), - ImportSpecifier::Named(ImportNamedSpecifier { - span: DUMMY_SP, - local: quote_ident!("decryptActionBoundArgs"), - imported: None, - is_type_only: false, - }), - ], - src: Box::new(Str { - span: DUMMY_SP, - value: "swc-plugin-react-server/rsc".into(), - raw: None, - }), - type_only: false, - with: None, - phase: Default::default(), - }))); - - // Make it the first item - new.rotate_right(2); - } else { - // Make it the first item - new.rotate_right(1); - } - } - - *stmts = new; - - self.annotations = old_annotations; - } - - fn visit_mut_stmts(&mut self, stmts: &mut Vec) { - let old_annotations = self.annotations.take(); - - let mut new = Vec::with_capacity(stmts.len()); - for mut stmt in stmts.take() { - stmt.visit_mut_with(self); - - new.push(stmt); - new.append(&mut self.annotations); - } - - *stmts = new; - - self.annotations = old_annotations; - } - - noop_visit_mut_type!(); -} - -fn retain_names_from_declared_idents(child_names: &mut Vec, current_declared_idents: &[Id]) { - // Collect the names to retain in a separate vector - let mut retained_names = Vec::new(); - - for name in child_names.iter() { - let mut should_retain = true; - - // Merge child_names. For example if both `foo.bar` and `foo.bar.baz` are used, - // we only need to keep `foo.bar` as it covers the other. - - // Currently this is O(n^2) and we can potentially improve this to O(n log n) - // by sorting or using a hashset. - for another_name in child_names.iter() { - if name != another_name - && name.0 == another_name.0 - && name.1.len() >= another_name.1.len() - { - let mut is_prefix = true; - for i in 0..another_name.1.len() { - if name.1[i] != another_name.1[i] { - is_prefix = false; - break; - } - } - if is_prefix { - should_retain = false; - break; - } - } - } - - if should_retain - && current_declared_idents.contains(&name.0) - && !retained_names.contains(name) - { - retained_names.push(name.clone()); - } - } - - // Replace the original child_names with the retained names - *child_names = retained_names; -} - -fn gen_ident(cnt: &mut u32) -> JsWord { - let id: JsWord = format!("$$ACTION_{}", cnt).into(); - *cnt += 1; - id -} - -fn attach_name_to_expr(ident: Ident, expr: Expr, extra_items: &mut Vec) -> Expr { - // Create the variable `var $$ACTION_0;` - extra_items.push(ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl { - span: DUMMY_SP, - kind: VarDeclKind::Var, - declare: Default::default(), - decls: vec![VarDeclarator { - span: DUMMY_SP, - name: ident.clone().into(), - init: None, - definite: Default::default(), - }], - }))))); - - if let Expr::Paren(_paren) = &expr { - expr - } else { - // Create the assignment `($$ACTION_0 = arrow)` - Expr::Paren(ParenExpr { - span: DUMMY_SP, - expr: Box::new(Expr::Assign(AssignExpr { - span: DUMMY_SP, - left: ident.into(), - op: op!("="), - right: Box::new(expr), - })), - }) - } -} - -fn generate_action_id(file_name: &str, export_name: &str) -> String { - // Attach a checksum to the action using sha1: - // $$id = sha1('file_name' + ':' + 'export_name'); - let mut hasher = Sha1::new(); - hasher.update(file_name.as_bytes()); - hasher.update(b":"); - hasher.update(export_name.as_bytes()); - let result = hasher.finalize(); - - hex_encode(result) -} - -fn annotate_ident_as_action( - ident: Ident, - bound: Vec>, - file_name: &str, - export_name: String, -) -> Expr { - // Add the proxy wrapper call `registerServerReference($$id, $$bound, myAction, - // maybe_orig_action)`. - let action_id = generate_action_id(file_name, &export_name); - - let proxy_expr = Expr::Call(CallExpr { - span: DUMMY_SP, - callee: quote_ident!("registerServerReference").as_callee(), - args: vec![ - // $$id - ExprOrSpread { - spread: None, - expr: Box::new(action_id.clone().into()), - }, - ExprOrSpread { - spread: None, - expr: Box::new(Expr::Ident(ident)), - }, - ], - type_args: Default::default(), - }); - - if bound.is_empty() { - proxy_expr - } else { - // proxy_expr.bind(null, [encryptActionBoundArgs("id", [arg1, ...])]) - Expr::Call(CallExpr { - span: DUMMY_SP, - callee: Expr::Member(MemberExpr { - span: DUMMY_SP, - obj: Box::new(proxy_expr), - prop: MemberProp::Ident(quote_ident!("bind")), - }) - .as_callee(), - args: vec![ - ExprOrSpread { - spread: None, - expr: Box::new(Expr::Lit(Lit::Null(Null { span: DUMMY_SP }))), - }, - ExprOrSpread { - spread: None, - expr: Box::new(Expr::Call(CallExpr { - span: DUMMY_SP, - callee: quote_ident!("encryptActionBoundArgs").as_callee(), - args: vec![ - ExprOrSpread { - spread: None, - expr: Box::new(action_id.into()), - }, - ExprOrSpread { - spread: None, - expr: Box::new(Expr::Array(ArrayLit { - span: DUMMY_SP, - elems: bound, - })), - }, - ], - type_args: None, - })), - }, - ], - type_args: Default::default(), - }) - } -} - -const DIRECTIVE_TYPOS: &[&str] = &[ - "use servers", - "use-server", - "use sevrer", - "use srever", - "use servre", - "user server", -]; - -fn remove_server_directive_index_in_module( - stmts: &mut Vec, - in_action_file: &mut bool, - has_action: &mut bool, - enabled: bool, -) { - let mut is_directive = true; - - stmts.retain(|stmt| { - match stmt { - ModuleItem::Stmt(Stmt::Expr(ExprStmt { - expr: box Expr::Lit(Lit::Str(Str { value, span, .. })), - .. - })) => { - if value == "use server" { - if is_directive { - *in_action_file = true; - *has_action = true; - if !enabled { - HANDLER.with(|handler| { - handler - .struct_span_err( - *span, - "To use Server Actions, please enable the feature flag in your Next.js config. Read more: https://nextjs.org/docs/app/building-your-application/data-fetching/forms-and-mutations#convention", - ) - .emit() - }); - } - return false; - } else { - HANDLER.with(|handler| { - handler - .struct_span_err( - *span, - "The \"use server\" directive must be at the top of the file.", - ) - .emit(); - }); - } - } else { - // Detect typo of "use server" - if DIRECTIVE_TYPOS.iter().any(|&s| s == value) { - HANDLER.with(|handler| { - handler - .struct_span_err( - *span, - format!( - "Did you mean \"use server\"? \"{}\" is not a supported \ - directive name.", - value - ) - .as_str(), - ) - .emit(); - }); - } - } - } - ModuleItem::Stmt(Stmt::Expr(ExprStmt { - expr: - box Expr::Paren(ParenExpr { - expr: box Expr::Lit(Lit::Str(Str { value, .. })), - .. - }), - span, - .. - })) => { - // Match `("use server")`. - if value == "use server" || DIRECTIVE_TYPOS.iter().any(|&s| s == value) { - if is_directive { - HANDLER.with(|handler| { - handler - .struct_span_err( - *span, - "The \"use server\" directive cannot be wrapped in \ - parentheses.", - ) - .emit(); - }) - } else { - HANDLER.with(|handler| { - handler - .struct_span_err( - *span, - "The \"use server\" directive must be at the top of the file, \ - and cannot be wrapped in parentheses.", - ) - .emit(); - }) - } - } - } - _ => { - is_directive = false; - } - } - true - }); -} - -fn remove_server_directive_index_in_fn( - stmts: &mut Vec, - remove_directive: bool, - is_action_fn: &mut bool, - action_span: &mut Option, - enabled: bool, -) { - let mut is_directive = true; - - stmts.retain(|stmt| { - if let Stmt::Expr(ExprStmt { - expr: box Expr::Lit(Lit::Str(Str { value, span, .. })), - .. - }) = stmt - { - if value == "use server" { - *action_span = Some(*span); - - if is_directive { - *is_action_fn = true; - if !enabled { - HANDLER.with(|handler| { - handler - .struct_span_err( - *span, - "To use Server Actions, please enable the feature flag in your Next.js config. Read more: https://nextjs.org/docs/app/building-your-application/data-fetching/forms-and-mutations#convention", - ) - .emit() - }); - } - if remove_directive { - return false; - } - } else { - HANDLER.with(|handler| { - handler - .struct_span_err( - *span, - "The \"use server\" directive must be at the top of the function \ - body.", - ) - .emit(); - }); - } - } else { - // Detect typo of "use server" - if DIRECTIVE_TYPOS.iter().any(|&s| s == value) { - HANDLER.with(|handler| { - handler - .struct_span_err( - *span, - format!( - "Did you mean \"use server\"? \"{}\" is not a supported \ - directive name.", - value - ) - .as_str(), - ) - .emit(); - }); - } - } - } else { - is_directive = false; - } - true - }); -} - -fn collect_idents_in_array_pat(elems: &[Option], ids: &mut Vec) { - for elem in elems.iter().flatten() { - match elem { - Pat::Ident(ident) => { - ids.push(ident.id.to_id()); - } - Pat::Array(array) => { - collect_idents_in_array_pat(&array.elems, ids); - } - Pat::Object(object) => { - collect_idents_in_object_pat(&object.props, ids); - } - Pat::Rest(rest) => { - if let Pat::Ident(ident) = &*rest.arg { - ids.push(ident.id.to_id()); - } - } - Pat::Assign(AssignPat { left, .. }) => { - collect_idents_in_pat(left, ids); - } - Pat::Expr(..) | Pat::Invalid(..) => {} - } - } -} - -fn collect_idents_in_object_pat(props: &[ObjectPatProp], ids: &mut Vec) { - for prop in props { - match prop { - ObjectPatProp::KeyValue(KeyValuePatProp { key, value }) => { - if let PropName::Ident(ident) = key { - ids.push(ident.to_id()); - } - - match &**value { - Pat::Ident(ident) => { - ids.push(ident.id.to_id()); - } - Pat::Array(array) => { - collect_idents_in_array_pat(&array.elems, ids); - } - Pat::Object(object) => { - collect_idents_in_object_pat(&object.props, ids); - } - _ => {} - } - } - ObjectPatProp::Assign(AssignPatProp { key, .. }) => { - ids.push(key.to_id()); - } - ObjectPatProp::Rest(RestPat { arg, .. }) => { - if let Pat::Ident(ident) = &**arg { - ids.push(ident.id.to_id()); - } - } - } - } -} - -fn collect_idents_in_var_decls(decls: &[VarDeclarator], ids: &mut Vec) { - for decl in decls { - collect_idents_in_pat(&decl.name, ids); - } -} - -fn collect_idents_in_pat(pat: &Pat, ids: &mut Vec) { - match pat { - Pat::Ident(ident) => { - ids.push(ident.id.to_id()); - } - Pat::Array(array) => { - collect_idents_in_array_pat(&array.elems, ids); - } - Pat::Object(object) => { - collect_idents_in_object_pat(&object.props, ids); - } - Pat::Assign(AssignPat { left, .. }) => { - collect_idents_in_pat(left, ids); - } - Pat::Rest(RestPat { arg, .. }) => { - if let Pat::Ident(ident) = &**arg { - ids.push(ident.id.to_id()); - } - } - Pat::Expr(..) | Pat::Invalid(..) => {} - } -} - -fn collect_decl_idents_in_stmt(stmt: &Stmt, ids: &mut Vec) { - if let Stmt::Decl(Decl::Var(var)) = &stmt { - collect_idents_in_var_decls(&var.decls, ids); - } -} - -pub(crate) struct ClosureReplacer<'a> { - used_ids: &'a [Name], -} - -impl ClosureReplacer<'_> { - fn index(&self, e: &Expr) -> Option { - let name = Name::try_from(e).ok()?; - self.used_ids.iter().position(|used_id| *used_id == name) - } -} - -impl VisitMut for ClosureReplacer<'_> { - fn visit_mut_expr(&mut self, e: &mut Expr) { - e.visit_mut_children_with(self); - - if let Some(index) = self.index(e) { - *e = Expr::Ident(Ident::new( - // $$ACTION_ARG_0 - format!("$$ACTION_ARG_{}", index).into(), - DUMMY_SP, - )); - } - } - - fn visit_mut_prop_or_spread(&mut self, n: &mut PropOrSpread) { - n.visit_mut_children_with(self); - - if let PropOrSpread::Prop(box Prop::Shorthand(i)) = n { - let name = Name::from(&*i); - if let Some(index) = self.used_ids.iter().position(|used_id| *used_id == name) { - *n = PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { - key: PropName::Ident(i.clone()), - value: Box::new(Expr::Ident(Ident::new( - // $$ACTION_ARG_0 - format!("$$ACTION_ARG_{}", index).into(), - DUMMY_SP, - ))), - }))); - } - } - } - - noop_visit_mut_type!(); -} - -#[derive(Debug, Clone, PartialEq, Eq)] -struct NamePart { - prop: JsWord, - is_member: bool, - optional: bool, -} - -#[derive(Debug, Clone, PartialEq, Eq)] -struct Name(Id, Vec); - -impl From<&'_ Ident> for Name { - fn from(value: &Ident) -> Self { - Name(value.to_id(), vec![]) - } -} - -impl TryFrom<&'_ Expr> for Name { - type Error = (); - - fn try_from(value: &Expr) -> Result { - match value { - Expr::Ident(i) => Ok(Name(i.to_id(), vec![])), - Expr::Member(e) => e.try_into(), - Expr::OptChain(e) => e.try_into(), - _ => Err(()), - } - } -} - -impl TryFrom<&'_ MemberExpr> for Name { - type Error = (); - - fn try_from(value: &MemberExpr) -> Result { - match &value.prop { - MemberProp::Ident(prop) => { - let mut obj: Name = value.obj.as_ref().try_into()?; - obj.1.push(NamePart { - prop: prop.sym.clone(), - is_member: true, - optional: false, - }); - Ok(obj) - } - _ => Err(()), - } - } -} - -impl TryFrom<&'_ OptChainExpr> for Name { - type Error = (); - - fn try_from(value: &OptChainExpr) -> Result { - match &*value.base { - OptChainBase::Member(m) => match &m.prop { - MemberProp::Ident(prop) => { - let mut obj: Name = m.obj.as_ref().try_into()?; - obj.1.push(NamePart { - prop: prop.sym.clone(), - is_member: false, - optional: value.optional, - }); - Ok(obj) - } - _ => Err(()), - }, - OptChainBase::Call(_) => Err(()), - } - } -} - -impl From for Box { - fn from(value: Name) -> Self { - let mut expr = Box::new(Expr::Ident(value.0.into())); - - for NamePart { - prop, - is_member, - optional, - } in value.1.into_iter() - { - if is_member { - expr = Box::new(Expr::Member(MemberExpr { - span: DUMMY_SP, - obj: expr, - prop: MemberProp::Ident(Ident::new(prop, DUMMY_SP)), - })); - } else { - expr = Box::new(Expr::OptChain(OptChainExpr { - span: DUMMY_SP, - base: Box::new(OptChainBase::Member(MemberExpr { - span: DUMMY_SP, - obj: expr, - prop: MemberProp::Ident(Ident::new(prop, DUMMY_SP)), - })), - optional, - })); - } - } - - expr - } -} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..562e7f7 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,1543 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10c0 + +"@mapbox/node-pre-gyp@npm:^1.0.5": + version: 1.0.11 + resolution: "@mapbox/node-pre-gyp@npm:1.0.11" + dependencies: + detect-libc: "npm:^2.0.0" + https-proxy-agent: "npm:^5.0.0" + make-dir: "npm:^3.1.0" + node-fetch: "npm:^2.6.7" + nopt: "npm:^5.0.0" + npmlog: "npm:^5.0.1" + rimraf: "npm:^3.0.2" + semver: "npm:^7.3.5" + tar: "npm:^6.1.11" + bin: + node-pre-gyp: bin/node-pre-gyp + checksum: 10c0/2b24b93c31beca1c91336fa3b3769fda98e202fb7f9771f0f4062588d36dcc30fcf8118c36aa747fa7f7610d8cf601872bdaaf62ce7822bb08b545d1bbe086cc + languageName: node + linkType: hard + +"@napi-rs/cli@npm:^2.18.2": + version: 2.18.3 + resolution: "@napi-rs/cli@npm:2.18.3" + bin: + napi: scripts/index.js + checksum: 10c0/4d91fe84551a3775cbf93f6340c8b6a87dc653248f90c459fb996ea689ff52ba698a7620ad08713b3b97baf0a675fe2d4cac83a9e842e56cdfbf204c7f5f01d5 + languageName: node + linkType: hard + +"@nodelib/fs.scandir@npm:2.1.5": + version: 2.1.5 + resolution: "@nodelib/fs.scandir@npm:2.1.5" + dependencies: + "@nodelib/fs.stat": "npm:2.0.5" + run-parallel: "npm:^1.1.9" + checksum: 10c0/732c3b6d1b1e967440e65f284bd06e5821fedf10a1bea9ed2bb75956ea1f30e08c44d3def9d6a230666574edbaf136f8cfd319c14fd1f87c66e6a44449afb2eb + languageName: node + linkType: hard + +"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": + version: 2.0.5 + resolution: "@nodelib/fs.stat@npm:2.0.5" + checksum: 10c0/88dafe5e3e29a388b07264680dc996c17f4bda48d163a9d4f5c1112979f0ce8ec72aa7116122c350b4e7976bc5566dc3ddb579be1ceaacc727872eb4ed93926d + languageName: node + linkType: hard + +"@nodelib/fs.walk@npm:^1.2.3": + version: 1.2.8 + resolution: "@nodelib/fs.walk@npm:1.2.8" + dependencies: + "@nodelib/fs.scandir": "npm:2.1.5" + fastq: "npm:^1.6.0" + checksum: 10c0/db9de047c3bb9b51f9335a7bb46f4fcfb6829fb628318c12115fbaf7d369bfce71c15b103d1fc3b464812d936220ee9bc1c8f762d032c9f6be9acc99249095b1 + languageName: node + linkType: hard + +"@rollup/pluginutils@npm:^4.0.0": + version: 4.2.1 + resolution: "@rollup/pluginutils@npm:4.2.1" + dependencies: + estree-walker: "npm:^2.0.1" + picomatch: "npm:^2.2.2" + checksum: 10c0/3ee56b2c8f1ed8dfd0a92631da1af3a2dfdd0321948f089b3752b4de1b54dc5076701eadd0e5fc18bd191b77af594ac1db6279e83951238ba16bf8a414c64c48 + languageName: node + linkType: hard + +"@sindresorhus/merge-streams@npm:^2.1.0": + version: 2.3.0 + resolution: "@sindresorhus/merge-streams@npm:2.3.0" + checksum: 10c0/69ee906f3125fb2c6bb6ec5cdd84e8827d93b49b3892bce8b62267116cc7e197b5cccf20c160a1d32c26014ecd14470a72a5e3ee37a58f1d6dadc0db1ccf3894 + languageName: node + linkType: hard + +"@vercel/nft@npm:^0.26.2": + version: 0.26.5 + resolution: "@vercel/nft@npm:0.26.5" + dependencies: + "@mapbox/node-pre-gyp": "npm:^1.0.5" + "@rollup/pluginutils": "npm:^4.0.0" + acorn: "npm:^8.6.0" + acorn-import-attributes: "npm:^1.9.2" + async-sema: "npm:^3.1.1" + bindings: "npm:^1.4.0" + estree-walker: "npm:2.0.2" + glob: "npm:^7.1.3" + graceful-fs: "npm:^4.2.9" + micromatch: "npm:^4.0.2" + node-gyp-build: "npm:^4.2.2" + resolve-from: "npm:^5.0.0" + bin: + nft: out/cli.js + checksum: 10c0/b7034b2f851384f26316c856a731c0973a99bd02f6bb349916a750328a4919944ed6fd12c321b38ec6535d29dfb627d7fa8ab0f1e8c1c3cabd71e3350bd77548 + languageName: node + linkType: hard + +"abbrev@npm:1": + version: 1.1.1 + resolution: "abbrev@npm:1.1.1" + checksum: 10c0/3f762677702acb24f65e813070e306c61fafe25d4b2583f9dfc935131f774863f3addd5741572ed576bd69cabe473c5af18e1e108b829cb7b6b4747884f726e6 + languageName: node + linkType: hard + +"acorn-import-attributes@npm:^1.9.2": + version: 1.9.5 + resolution: "acorn-import-attributes@npm:1.9.5" + peerDependencies: + acorn: ^8 + checksum: 10c0/5926eaaead2326d5a86f322ff1b617b0f698aa61dc719a5baa0e9d955c9885cc71febac3fb5bacff71bbf2c4f9c12db2056883c68c53eb962c048b952e1e013d + languageName: node + linkType: hard + +"acorn-walk@npm:^8.3.2": + version: 8.3.3 + resolution: "acorn-walk@npm:8.3.3" + dependencies: + acorn: "npm:^8.11.0" + checksum: 10c0/4a9e24313e6a0a7b389e712ba69b66b455b4cb25988903506a8d247e7b126f02060b05a8a5b738a9284214e4ca95f383dd93443a4ba84f1af9b528305c7f243b + languageName: node + linkType: hard + +"acorn@npm:^8.11.0, acorn@npm:^8.11.3, acorn@npm:^8.6.0": + version: 8.12.0 + resolution: "acorn@npm:8.12.0" + bin: + acorn: bin/acorn + checksum: 10c0/a19f9dead009d3b430fa3c253710b47778cdaace15b316de6de93a68c355507bc1072a9956372b6c990cbeeb167d4a929249d0faeb8ae4bb6911d68d53299549 + languageName: node + linkType: hard + +"agent-base@npm:6": + version: 6.0.2 + resolution: "agent-base@npm:6.0.2" + dependencies: + debug: "npm:4" + checksum: 10c0/dc4f757e40b5f3e3d674bc9beb4f1048f4ee83af189bae39be99f57bf1f48dde166a8b0a5342a84b5944ee8e6ed1e5a9d801858f4ad44764e84957122fe46261 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10c0/9a64bb8627b434ba9327b60c027742e5d17ac69277960d041898596271d992d4d52ba7267a63ca10232e29f6107fc8a835f6ce8d719b88c5f8493f8254813737 + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 10c0/cbe16dbd2c6b2735d1df7976a7070dd277326434f0212f43abf6d87674095d247968209babdaad31bb00882fa68807256ba9be340eec2f1004de14ca75f52a08 + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10c0/895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041 + languageName: node + linkType: hard + +"ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.2.1": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10c0/5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c + languageName: node + linkType: hard + +"aproba@npm:^1.0.3 || ^2.0.0": + version: 2.0.0 + resolution: "aproba@npm:2.0.0" + checksum: 10c0/d06e26384a8f6245d8c8896e138c0388824e259a329e0c9f196b4fa533c82502a6fd449586e3604950a0c42921832a458bb3aa0aa9f0ba449cfd4f50fd0d09b5 + languageName: node + linkType: hard + +"are-we-there-yet@npm:^2.0.0": + version: 2.0.0 + resolution: "are-we-there-yet@npm:2.0.0" + dependencies: + delegates: "npm:^1.0.0" + readable-stream: "npm:^3.6.0" + checksum: 10c0/375f753c10329153c8d66dc95e8f8b6c7cc2aa66e05cb0960bd69092b10dae22900cacc7d653ad11d26b3ecbdbfe1e8bfb6ccf0265ba8077a7d979970f16b99c + languageName: node + linkType: hard + +"argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: "npm:~1.0.2" + checksum: 10c0/b2972c5c23c63df66bca144dbc65d180efa74f25f8fd9b7d9a0a6c88ae839db32df3d54770dcb6460cf840d232b60695d1a6b1053f599d84e73f7437087712de + languageName: node + linkType: hard + +"array-find-index@npm:^1.0.1": + version: 1.0.2 + resolution: "array-find-index@npm:1.0.2" + checksum: 10c0/86b9485c74ddd324feab807e10a6de3f9c1683856267236fac4bb4d4667ada6463e106db3f6c540ae6b720e0442b590ec701d13676df4c6af30ebf4da09b4f57 + languageName: node + linkType: hard + +"arrgv@npm:^1.0.2": + version: 1.0.2 + resolution: "arrgv@npm:1.0.2" + checksum: 10c0/7e6e782e6b749923ac7cbc4048ef6fe0844c4a59bfc8932fcd4c44566ba25eed46501f94dd7cf3c7297da88f3f599ca056bfb77d0c2484aebc92f04239f69124 + languageName: node + linkType: hard + +"arrify@npm:^3.0.0": + version: 3.0.0 + resolution: "arrify@npm:3.0.0" + checksum: 10c0/2e26601b8486f29780f1f70f7ac05a226755814c2a3ab42e196748f650af1dc310cd575a11dd4b9841c70fd7460b2dd2b8fe6fb7a3375878e2660706efafa58e + languageName: node + linkType: hard + +"async-sema@npm:^3.1.1": + version: 3.1.1 + resolution: "async-sema@npm:3.1.1" + checksum: 10c0/a16da9f7f2dbdd00a969bf264b7ad331b59df3eac2b38f529b881c5cc8662594e68ed096d927ec2aabdc13454379cdc6d677bcdb0a3d2db338fb4be17957832b + languageName: node + linkType: hard + +"ava@npm:^6.0.1": + version: 6.1.3 + resolution: "ava@npm:6.1.3" + dependencies: + "@vercel/nft": "npm:^0.26.2" + acorn: "npm:^8.11.3" + acorn-walk: "npm:^8.3.2" + ansi-styles: "npm:^6.2.1" + arrgv: "npm:^1.0.2" + arrify: "npm:^3.0.0" + callsites: "npm:^4.1.0" + cbor: "npm:^9.0.1" + chalk: "npm:^5.3.0" + chunkd: "npm:^2.0.1" + ci-info: "npm:^4.0.0" + ci-parallel-vars: "npm:^1.0.1" + cli-truncate: "npm:^4.0.0" + code-excerpt: "npm:^4.0.0" + common-path-prefix: "npm:^3.0.0" + concordance: "npm:^5.0.4" + currently-unhandled: "npm:^0.4.1" + debug: "npm:^4.3.4" + emittery: "npm:^1.0.1" + figures: "npm:^6.0.1" + globby: "npm:^14.0.0" + ignore-by-default: "npm:^2.1.0" + indent-string: "npm:^5.0.0" + is-plain-object: "npm:^5.0.0" + is-promise: "npm:^4.0.0" + matcher: "npm:^5.0.0" + memoize: "npm:^10.0.0" + ms: "npm:^2.1.3" + p-map: "npm:^7.0.1" + package-config: "npm:^5.0.0" + picomatch: "npm:^3.0.1" + plur: "npm:^5.1.0" + pretty-ms: "npm:^9.0.0" + resolve-cwd: "npm:^3.0.0" + stack-utils: "npm:^2.0.6" + strip-ansi: "npm:^7.1.0" + supertap: "npm:^3.0.1" + temp-dir: "npm:^3.0.0" + write-file-atomic: "npm:^5.0.1" + yargs: "npm:^17.7.2" + peerDependencies: + "@ava/typescript": "*" + peerDependenciesMeta: + "@ava/typescript": + optional: true + bin: + ava: entrypoints/cli.mjs + checksum: 10c0/108b28aceb0dfdb077bcf4c96109d736667999c2ce9f564489c4747482ea0e0c455d4d96fdfaad610b1125b74129b7b1d2ce570ec4903e767f6950d7f722f2cd + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 10c0/9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee + languageName: node + linkType: hard + +"bindings@npm:^1.4.0": + version: 1.5.0 + resolution: "bindings@npm:1.5.0" + dependencies: + file-uri-to-path: "npm:1.0.0" + checksum: 10c0/3dab2491b4bb24124252a91e656803eac24292473e56554e35bbfe3cc1875332cfa77600c3bac7564049dc95075bf6fcc63a4609920ff2d64d0fe405fcf0d4ba + languageName: node + linkType: hard + +"blueimp-md5@npm:^2.10.0": + version: 2.19.0 + resolution: "blueimp-md5@npm:2.19.0" + checksum: 10c0/85d04343537dd99a288c62450341dcce7380d3454c81f8e5a971ddd80307d6f9ef51b5b92ad7d48aaaa92fd6d3a1f6b2f4fada068faae646887f7bfabc17a346 + languageName: node + linkType: hard + +"brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: "npm:^1.0.0" + concat-map: "npm:0.0.1" + checksum: 10c0/695a56cd058096a7cb71fb09d9d6a7070113c7be516699ed361317aca2ec169f618e28b8af352e02ab4233fb54eb0168460a40dc320bab0034b36ab59aaad668 + languageName: node + linkType: hard + +"braces@npm:^3.0.3": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 + languageName: node + linkType: hard + +"callsites@npm:^4.1.0": + version: 4.1.0 + resolution: "callsites@npm:4.1.0" + checksum: 10c0/91700844127a6dcd4792d231a12dd8e9ec10525eb9962180a8558417d7e3f443e52a4f14746ad2838eaf14f79431ee1539d13bd188da280f720a06a91bd1157a + languageName: node + linkType: hard + +"cbor@npm:^9.0.1": + version: 9.0.2 + resolution: "cbor@npm:9.0.2" + dependencies: + nofilter: "npm:^3.1.0" + checksum: 10c0/709d4378067e663107b3d63a02d123a7b33e28946b4c5cc40c102f2f0ba13b072a79adc4369bb87a4e743399fce45deec30463fc84d363ab7cb39192d0fe5f30 + languageName: node + linkType: hard + +"chalk@npm:^5.3.0": + version: 5.3.0 + resolution: "chalk@npm:5.3.0" + checksum: 10c0/8297d436b2c0f95801103ff2ef67268d362021b8210daf8ddbe349695333eb3610a71122172ff3b0272f1ef2cf7cc2c41fdaa4715f52e49ffe04c56340feed09 + languageName: node + linkType: hard + +"chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: 10c0/594754e1303672171cc04e50f6c398ae16128eb134a88f801bf5354fd96f205320f23536a045d9abd8b51024a149696e51231565891d4efdab8846021ecf88e6 + languageName: node + linkType: hard + +"chunkd@npm:^2.0.1": + version: 2.0.1 + resolution: "chunkd@npm:2.0.1" + checksum: 10c0/4e0c5aac6048ecedfa4cd0a5f6c4f010c70a7b7645aeca7bfeb47cb0733c3463054f0ced3f2667b2e0e67edd75d68a8e05481b01115ba3f8a952a93026254504 + languageName: node + linkType: hard + +"ci-info@npm:^4.0.0": + version: 4.0.0 + resolution: "ci-info@npm:4.0.0" + checksum: 10c0/ecc003e5b60580bd081d83dd61d398ddb8607537f916313e40af4667f9c92a1243bd8e8a591a5aa78e418afec245dbe8e90a0e26e39ca0825129a99b978dd3f9 + languageName: node + linkType: hard + +"ci-parallel-vars@npm:^1.0.1": + version: 1.0.1 + resolution: "ci-parallel-vars@npm:1.0.1" + checksum: 10c0/80952f699cbbc146092b077b4f3e28d085620eb4e6be37f069b4dbb3db0ee70e8eec3beef4ebe70ff60631e9fc743b9d0869678489f167442cac08b260e5ac08 + languageName: node + linkType: hard + +"cli-truncate@npm:^4.0.0": + version: 4.0.0 + resolution: "cli-truncate@npm:4.0.0" + dependencies: + slice-ansi: "npm:^5.0.0" + string-width: "npm:^7.0.0" + checksum: 10c0/d7f0b73e3d9b88cb496e6c086df7410b541b56a43d18ade6a573c9c18bd001b1c3fba1ad578f741a4218fdc794d042385f8ac02c25e1c295a2d8b9f3cb86eb4c + languageName: node + linkType: hard + +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^7.0.0" + checksum: 10c0/4bda0f09c340cbb6dfdc1ed508b3ca080f12992c18d68c6be4d9cf51756033d5266e61ec57529e610dacbf4da1c634423b0c1b11037709cc6b09045cbd815df5 + languageName: node + linkType: hard + +"code-excerpt@npm:^4.0.0": + version: 4.0.0 + resolution: "code-excerpt@npm:4.0.0" + dependencies: + convert-to-spaces: "npm:^2.0.1" + checksum: 10c0/b6c5a06e039cecd2ab6a0e10ee0831de8362107d1f298ca3558b5f9004cb8e0260b02dd6c07f57b9a0e346c76864d2873311ee1989809fdeb05bd5fbbadde773 + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 10c0/37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7 + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10c0/a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95 + languageName: node + linkType: hard + +"color-support@npm:^1.1.2": + version: 1.1.3 + resolution: "color-support@npm:1.1.3" + bin: + color-support: bin.js + checksum: 10c0/8ffeaa270a784dc382f62d9be0a98581db43e11eee301af14734a6d089bd456478b1a8b3e7db7ca7dc5b18a75f828f775c44074020b51c05fc00e6d0992b1cc6 + languageName: node + linkType: hard + +"common-path-prefix@npm:^3.0.0": + version: 3.0.0 + resolution: "common-path-prefix@npm:3.0.0" + checksum: 10c0/c4a74294e1b1570f4a8ab435285d185a03976c323caa16359053e749db4fde44e3e6586c29cd051100335e11895767cbbd27ea389108e327d62f38daf4548fdb + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 10c0/c996b1cfdf95b6c90fee4dae37e332c8b6eb7d106430c17d538034c0ad9a1630cb194d2ab37293b1bdd4d779494beee7786d586a50bd9376fd6f7bcc2bd4c98f + languageName: node + linkType: hard + +"concordance@npm:^5.0.4": + version: 5.0.4 + resolution: "concordance@npm:5.0.4" + dependencies: + date-time: "npm:^3.1.0" + esutils: "npm:^2.0.3" + fast-diff: "npm:^1.2.0" + js-string-escape: "npm:^1.0.1" + lodash: "npm:^4.17.15" + md5-hex: "npm:^3.0.1" + semver: "npm:^7.3.2" + well-known-symbols: "npm:^2.0.0" + checksum: 10c0/59b440f330df3a7c9aa148ba588b3e99aed86acab225b4f01ffcea34ace4cf11f817e31153254e8f38ed48508998dad40b9106951a743c334d751f7ab21afb8a + languageName: node + linkType: hard + +"console-control-strings@npm:^1.0.0, console-control-strings@npm:^1.1.0": + version: 1.1.0 + resolution: "console-control-strings@npm:1.1.0" + checksum: 10c0/7ab51d30b52d461412cd467721bb82afe695da78fff8f29fe6f6b9cbaac9a2328e27a22a966014df9532100f6dd85370460be8130b9c677891ba36d96a343f50 + languageName: node + linkType: hard + +"convert-to-spaces@npm:^2.0.1": + version: 2.0.1 + resolution: "convert-to-spaces@npm:2.0.1" + checksum: 10c0/d90aa0e3b6a27f9d5265a8d32def3c5c855b3e823a9db1f26d772f8146d6b91020a2fdfd905ce8048a73fad3aaf836fef8188c67602c374405e2ae8396c4ac46 + languageName: node + linkType: hard + +"currently-unhandled@npm:^0.4.1": + version: 0.4.1 + resolution: "currently-unhandled@npm:0.4.1" + dependencies: + array-find-index: "npm:^1.0.1" + checksum: 10c0/32d197689ec32f035910202c1abb0dc6424dce01d7b51779c685119b380d98535c110ffff67a262fc7e367612a7dfd30d3d3055f9a6634b5a9dd1302de7ef11c + languageName: node + linkType: hard + +"date-time@npm:^3.1.0": + version: 3.1.0 + resolution: "date-time@npm:3.1.0" + dependencies: + time-zone: "npm:^1.0.0" + checksum: 10c0/aa3e2e930d74b0b9e90f69de7a16d3376e30f21f1f4ce9a2311d8fec32d760e776efea752dafad0ce188187265235229013036202be053fc2d7979813bfb6ded + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.3.4": + version: 4.3.5 + resolution: "debug@npm:4.3.5" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/082c375a2bdc4f4469c99f325ff458adad62a3fc2c482d59923c260cb08152f34e2659f72b3767db8bb2f21ca81a60a42d1019605a412132d7b9f59363a005cc + languageName: node + linkType: hard + +"delegates@npm:^1.0.0": + version: 1.0.0 + resolution: "delegates@npm:1.0.0" + checksum: 10c0/ba05874b91148e1db4bf254750c042bf2215febd23a6d3cda2e64896aef79745fbd4b9996488bd3cafb39ce19dbce0fd6e3b6665275638befffe1c9b312b91b5 + languageName: node + linkType: hard + +"detect-libc@npm:^2.0.0": + version: 2.0.3 + resolution: "detect-libc@npm:2.0.3" + checksum: 10c0/88095bda8f90220c95f162bf92cad70bd0e424913e655c20578600e35b91edc261af27531cf160a331e185c0ced93944bc7e09939143225f56312d7fd800fdb7 + languageName: node + linkType: hard + +"emittery@npm:^1.0.1": + version: 1.0.3 + resolution: "emittery@npm:1.0.3" + checksum: 10c0/91605d044f3891dd1f8ab731aeb94b520488b21e707f7064dcbcf5303bac3b4e7133dfa23c343ede1fc970340bd78a9b1aed522b805bc15104606bba630dd71e + languageName: node + linkType: hard + +"emoji-regex@npm:^10.3.0": + version: 10.3.0 + resolution: "emoji-regex@npm:10.3.0" + checksum: 10c0/b4838e8dcdceb44cf47f59abe352c25ff4fe7857acaf5fb51097c427f6f75b44d052eb907a7a3b86f86bc4eae3a93f5c2b7460abe79c407307e6212d65c91163 + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10c0/b6053ad39951c4cf338f9092d7bfba448cdfd46fe6a2a034700b149ac9ffbc137e361cbd3c442297f86bed2e5f7576c1b54cc0a6bf8ef5106cc62f496af35010 + languageName: node + linkType: hard + +"escalade@npm:^3.1.1": + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 10c0/6b4adafecd0682f3aa1cd1106b8fff30e492c7015b178bc81b2d2f75106dabea6c6d6e8508fc491bd58e597c74abb0e8e2368f943ecb9393d4162e3c2f3cf287 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^2.0.0": + version: 2.0.0 + resolution: "escape-string-regexp@npm:2.0.0" + checksum: 10c0/2530479fe8db57eace5e8646c9c2a9c80fa279614986d16dcc6bcaceb63ae77f05a851ba6c43756d816c61d7f4534baf56e3c705e3e0d884818a46808811c507 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^5.0.0": + version: 5.0.0 + resolution: "escape-string-regexp@npm:5.0.0" + checksum: 10c0/6366f474c6f37a802800a435232395e04e9885919873e382b157ab7e8f0feb8fed71497f84a6f6a81a49aab41815522f5839112bd38026d203aea0c91622df95 + languageName: node + linkType: hard + +"esprima@npm:^4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10c0/ad4bab9ead0808cf56501750fd9d3fb276f6b105f987707d059005d57e182d18a7c9ec7f3a01794ebddcca676773e42ca48a32d67a250c9d35e009ca613caba3 + languageName: node + linkType: hard + +"estree-walker@npm:2.0.2, estree-walker@npm:^2.0.1": + version: 2.0.2 + resolution: "estree-walker@npm:2.0.2" + checksum: 10c0/53a6c54e2019b8c914dc395890153ffdc2322781acf4bd7d1a32d7aedc1710807bdcd866ac133903d5629ec601fbb50abe8c2e5553c7f5a0afdd9b6af6c945af + languageName: node + linkType: hard + +"esutils@npm:^2.0.3": + version: 2.0.3 + resolution: "esutils@npm:2.0.3" + checksum: 10c0/9a2fe69a41bfdade834ba7c42de4723c97ec776e40656919c62cbd13607c45e127a003f05f724a1ea55e5029a4cf2de444b13009f2af71271e42d93a637137c7 + languageName: node + linkType: hard + +"fast-diff@npm:^1.2.0": + version: 1.3.0 + resolution: "fast-diff@npm:1.3.0" + checksum: 10c0/5c19af237edb5d5effda008c891a18a585f74bf12953be57923f17a3a4d0979565fc64dbc73b9e20926b9d895f5b690c618cbb969af0cf022e3222471220ad29 + languageName: node + linkType: hard + +"fast-glob@npm:^3.3.2": + version: 3.3.2 + resolution: "fast-glob@npm:3.3.2" + dependencies: + "@nodelib/fs.stat": "npm:^2.0.2" + "@nodelib/fs.walk": "npm:^1.2.3" + glob-parent: "npm:^5.1.2" + merge2: "npm:^1.3.0" + micromatch: "npm:^4.0.4" + checksum: 10c0/42baad7b9cd40b63e42039132bde27ca2cb3a4950d0a0f9abe4639ea1aa9d3e3b40f98b1fe31cbc0cc17b664c9ea7447d911a152fa34ec5b72977b125a6fc845 + languageName: node + linkType: hard + +"fastq@npm:^1.6.0": + version: 1.17.1 + resolution: "fastq@npm:1.17.1" + dependencies: + reusify: "npm:^1.0.4" + checksum: 10c0/1095f16cea45fb3beff558bb3afa74ca7a9250f5a670b65db7ed585f92b4b48381445cd328b3d87323da81e43232b5d5978a8201bde84e0cd514310f1ea6da34 + languageName: node + linkType: hard + +"figures@npm:^6.0.1": + version: 6.1.0 + resolution: "figures@npm:6.1.0" + dependencies: + is-unicode-supported: "npm:^2.0.0" + checksum: 10c0/9159df4264d62ef447a3931537de92f5012210cf5135c35c010df50a2169377581378149abfe1eb238bd6acbba1c0d547b1f18e0af6eee49e30363cedaffcfe4 + languageName: node + linkType: hard + +"file-uri-to-path@npm:1.0.0": + version: 1.0.0 + resolution: "file-uri-to-path@npm:1.0.0" + checksum: 10c0/3b545e3a341d322d368e880e1c204ef55f1d45cdea65f7efc6c6ce9e0c4d22d802d5629320eb779d006fe59624ac17b0e848d83cc5af7cd101f206cb704f5519 + languageName: node + linkType: hard + +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 + languageName: node + linkType: hard + +"find-up-simple@npm:^1.0.0": + version: 1.0.0 + resolution: "find-up-simple@npm:1.0.0" + checksum: 10c0/de1ad5e55c8c162f5600fe3297bb55a3da5cd9cb8c6755e463ec1d52c4c15a84e312a68397fb5962d13263b3dbd4ea294668c465ccacc41291d7cc97588769f9 + languageName: node + linkType: hard + +"fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10c0/703d16522b8282d7299337539c3ed6edddd1afe82435e4f5b76e34a79cd74e488a8a0e26a636afc2440e1a23b03878e2122e3a2cfe375a5cf63c37d92b86a004 + languageName: node + linkType: hard + +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 10c0/444cf1291d997165dfd4c0d58b69f0e4782bfd9149fd72faa4fe299e68e0e93d6db941660b37dd29153bf7186672ececa3b50b7e7249477b03fdf850f287c948 + languageName: node + linkType: hard + +"gauge@npm:^3.0.0": + version: 3.0.2 + resolution: "gauge@npm:3.0.2" + dependencies: + aproba: "npm:^1.0.3 || ^2.0.0" + color-support: "npm:^1.1.2" + console-control-strings: "npm:^1.0.0" + has-unicode: "npm:^2.0.1" + object-assign: "npm:^4.1.1" + signal-exit: "npm:^3.0.0" + string-width: "npm:^4.2.3" + strip-ansi: "npm:^6.0.1" + wide-align: "npm:^1.1.2" + checksum: 10c0/75230ccaf216471e31025c7d5fcea1629596ca20792de50c596eb18ffb14d8404f927cd55535aab2eeecd18d1e11bd6f23ec3c2e9878d2dda1dc74bccc34b913 + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10c0/c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde + languageName: node + linkType: hard + +"get-east-asian-width@npm:^1.0.0": + version: 1.2.0 + resolution: "get-east-asian-width@npm:1.2.0" + checksum: 10c0/914b1e217cf38436c24b4c60b4c45289e39a45bf9e65ef9fd343c2815a1a02b8a0215aeec8bf9c07c516089004b6e3826332481f40a09529fcadbf6e579f286b + languageName: node + linkType: hard + +"glob-parent@npm:^5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: 10c0/cab87638e2112bee3f839ef5f6e0765057163d39c66be8ec1602f3823da4692297ad4e972de876ea17c44d652978638d2fd583c6713d0eb6591706825020c9ee + languageName: node + linkType: hard + +"glob@npm:^7.1.3": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.1.1" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10c0/65676153e2b0c9095100fe7f25a778bf45608eeb32c6048cf307f579649bcc30353277b3b898a3792602c65764e5baa4f643714dfbdfd64ea271d210c7a425fe + languageName: node + linkType: hard + +"globby@npm:^14.0.0": + version: 14.0.1 + resolution: "globby@npm:14.0.1" + dependencies: + "@sindresorhus/merge-streams": "npm:^2.1.0" + fast-glob: "npm:^3.3.2" + ignore: "npm:^5.2.4" + path-type: "npm:^5.0.0" + slash: "npm:^5.1.0" + unicorn-magic: "npm:^0.1.0" + checksum: 10c0/749a6be91cf455c161ebb5c9130df3991cb9fd7568425db850a8279a6cf45acd031c5069395beb7aeb4dd606b64f0d6ff8116c93726178d8e6182fee58c2736d + languageName: node + linkType: hard + +"graceful-fs@npm:^4.2.9": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 + languageName: node + linkType: hard + +"has-unicode@npm:^2.0.1": + version: 2.0.1 + resolution: "has-unicode@npm:2.0.1" + checksum: 10c0/ebdb2f4895c26bb08a8a100b62d362e49b2190bcfd84b76bc4be1a3bd4d254ec52d0dd9f2fbcc093fc5eb878b20c52146f9dfd33e2686ed28982187be593b47c + languageName: node + linkType: hard + +"https-proxy-agent@npm:^5.0.0": + version: 5.0.1 + resolution: "https-proxy-agent@npm:5.0.1" + dependencies: + agent-base: "npm:6" + debug: "npm:4" + checksum: 10c0/6dd639f03434003577c62b27cafdb864784ef19b2de430d8ae2a1d45e31c4fd60719e5637b44db1a88a046934307da7089e03d6089ec3ddacc1189d8de8897d1 + languageName: node + linkType: hard + +"ignore-by-default@npm:^2.1.0": + version: 2.1.0 + resolution: "ignore-by-default@npm:2.1.0" + checksum: 10c0/3a6040dac25ed9da39dee73bf1634fdd1e15b0eb7cf52a6bdec81c310565782d8811c104ce40acb3d690d61c5fc38a91c78e6baee830a8a2232424dbc6b66981 + languageName: node + linkType: hard + +"ignore@npm:^5.2.4": + version: 5.3.1 + resolution: "ignore@npm:5.3.1" + checksum: 10c0/703f7f45ffb2a27fb2c5a8db0c32e7dee66b33a225d28e8db4e1be6474795f606686a6e3bcc50e1aa12f2042db4c9d4a7d60af3250511de74620fbed052ea4cd + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 10c0/8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6 + languageName: node + linkType: hard + +"indent-string@npm:^5.0.0": + version: 5.0.0 + resolution: "indent-string@npm:5.0.0" + checksum: 10c0/8ee77b57d92e71745e133f6f444d6fa3ed503ad0e1bcd7e80c8da08b42375c07117128d670589725ed07b1978065803fa86318c309ba45415b7fe13e7f170220 + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: "npm:^1.3.0" + wrappy: "npm:1" + checksum: 10c0/7faca22584600a9dc5b9fca2cd5feb7135ac8c935449837b315676b4c90aa4f391ec4f42240178244b5a34e8bede1948627fda392ca3191522fc46b34e985ab2 + languageName: node + linkType: hard + +"inherits@npm:2, inherits@npm:^2.0.3": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 + languageName: node + linkType: hard + +"irregular-plurals@npm:^3.3.0": + version: 3.5.0 + resolution: "irregular-plurals@npm:3.5.0" + checksum: 10c0/7c033bbe7325e5a6e0a26949cc6863b6ce273403d4cd5b93bd99b33fecb6605b0884097c4259c23ed0c52c2133bf7d1cdcdd7a0630e8c325161fe269b3447918 + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10c0/5487da35691fbc339700bbb2730430b07777a3c21b9ebaecb3072512dfd7b4ba78ac2381a87e8d78d20ea08affb3f1971b4af629173a6bf435ff8a4c47747912 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10c0/bb11d825e049f38e04c06373a8d72782eee0205bda9d908cc550ccb3c59b99d750ff9537982e01733c1c94a58e35400661f57042158ff5e8f3e90cf936daf0fc + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^4.0.0": + version: 4.0.0 + resolution: "is-fullwidth-code-point@npm:4.0.0" + checksum: 10c0/df2a717e813567db0f659c306d61f2f804d480752526886954a2a3e2246c7745fd07a52b5fecf2b68caf0a6c79dcdace6166fdf29cc76ed9975cc334f0a018b8 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10c0/17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 + languageName: node + linkType: hard + +"is-plain-object@npm:^5.0.0": + version: 5.0.0 + resolution: "is-plain-object@npm:5.0.0" + checksum: 10c0/893e42bad832aae3511c71fd61c0bf61aa3a6d853061c62a307261842727d0d25f761ce9379f7ba7226d6179db2a3157efa918e7fe26360f3bf0842d9f28942c + languageName: node + linkType: hard + +"is-promise@npm:^4.0.0": + version: 4.0.0 + resolution: "is-promise@npm:4.0.0" + checksum: 10c0/ebd5c672d73db781ab33ccb155fb9969d6028e37414d609b115cc534654c91ccd061821d5b987eefaa97cf4c62f0b909bb2f04db88306de26e91bfe8ddc01503 + languageName: node + linkType: hard + +"is-unicode-supported@npm:^2.0.0": + version: 2.0.0 + resolution: "is-unicode-supported@npm:2.0.0" + checksum: 10c0/3013dfb8265fe9f9a0d1e9433fc4e766595631a8d85d60876c457b4bedc066768dab1477c553d02e2f626d88a4e019162706e04263c94d74994ef636a33b5f94 + languageName: node + linkType: hard + +"js-string-escape@npm:^1.0.1": + version: 1.0.1 + resolution: "js-string-escape@npm:1.0.1" + checksum: 10c0/2c33b9ff1ba6b84681c51ca0997e7d5a1639813c95d5b61cb7ad47e55cc28fa4a0b1935c3d218710d8e6bcee5d0cd8c44755231e3a4e45fc604534d9595a3628 + languageName: node + linkType: hard + +"js-yaml@npm:^3.14.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10c0/6746baaaeac312c4db8e75fa22331d9a04cccb7792d126ed8ce6a0bbcfef0cedaddd0c5098fade53db067c09fe00aa1c957674b4765610a8b06a5a189e46433b + languageName: node + linkType: hard + +"load-json-file@npm:^7.0.1": + version: 7.0.1 + resolution: "load-json-file@npm:7.0.1" + checksum: 10c0/7117459608a0b6329c7f78e6e1f541b3162dd901c29dd5af721fec8b270177d2e3d7999c971f344fff04daac368d052732e2c7146014bc84d15e0b636975e19a + languageName: node + linkType: hard + +"lodash@npm:^4.17.15": + version: 4.17.21 + resolution: "lodash@npm:4.17.21" + checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c + languageName: node + linkType: hard + +"make-dir@npm:^3.1.0": + version: 3.1.0 + resolution: "make-dir@npm:3.1.0" + dependencies: + semver: "npm:^6.0.0" + checksum: 10c0/56aaafefc49c2dfef02c5c95f9b196c4eb6988040cf2c712185c7fe5c99b4091591a7fc4d4eafaaefa70ff763a26f6ab8c3ff60b9e75ea19876f49b18667ecaa + languageName: node + linkType: hard + +"matcher@npm:^5.0.0": + version: 5.0.0 + resolution: "matcher@npm:5.0.0" + dependencies: + escape-string-regexp: "npm:^5.0.0" + checksum: 10c0/eda5471fc9d5b7264d63c81727824adc3585ddb5cfdc5fce5a9b7c86f946ff181610735d330b1c37a84811df872d1290bf4e9401d2be2a414204343701144b18 + languageName: node + linkType: hard + +"md5-hex@npm:^3.0.1": + version: 3.0.1 + resolution: "md5-hex@npm:3.0.1" + dependencies: + blueimp-md5: "npm:^2.10.0" + checksum: 10c0/ee2b4d8da16b527b3a3fe4d7a96720f43afd07b46a82d49421208b5a126235fb75cfb30b80d4029514772c8844273f940bddfbf4155c787f968f3be4060d01e4 + languageName: node + linkType: hard + +"memoize@npm:^10.0.0": + version: 10.0.0 + resolution: "memoize@npm:10.0.0" + dependencies: + mimic-function: "npm:^5.0.0" + checksum: 10c0/1584351834564be66b21d47b7afe495851f622669ad49e2f4fa4f35d5633471b93176cf602130a95f71fa0aee65a20179817ffac2dd11fa354aa19a8109a14e8 + languageName: node + linkType: hard + +"merge2@npm:^1.3.0": + version: 1.4.1 + resolution: "merge2@npm:1.4.1" + checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb + languageName: node + linkType: hard + +"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4": + version: 4.0.7 + resolution: "micromatch@npm:4.0.7" + dependencies: + braces: "npm:^3.0.3" + picomatch: "npm:^2.3.1" + checksum: 10c0/58fa99bc5265edec206e9163a1d2cec5fabc46a5b473c45f4a700adce88c2520456ae35f2b301e4410fb3afb27e9521fb2813f6fc96be0a48a89430e0916a772 + languageName: node + linkType: hard + +"mimic-function@npm:^5.0.0": + version: 5.0.1 + resolution: "mimic-function@npm:5.0.1" + checksum: 10c0/f3d9464dd1816ecf6bdf2aec6ba32c0728022039d992f178237d8e289b48764fee4131319e72eedd4f7f094e22ded0af836c3187a7edc4595d28dd74368fd81d + languageName: node + linkType: hard + +"minimatch@npm:^3.1.1": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10c0/0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311 + languageName: node + linkType: hard + +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10c0/a114746943afa1dbbca8249e706d1d38b85ed1298b530f5808ce51f8e9e941962e2a5ad2e00eae7dd21d8a4aae6586a66d4216d1a259385e9d0358f0c1eba16c + languageName: node + linkType: hard + +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 10c0/a91d8043f691796a8ac88df039da19933ef0f633e3d7f0d35dcd5373af49131cf2399bfc355f41515dc495e3990369c3858cd319e5c2722b4753c90bf3152462 + languageName: node + linkType: hard + +"minizlib@npm:^2.1.1": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: "npm:^3.0.0" + yallist: "npm:^4.0.0" + checksum: 10c0/64fae024e1a7d0346a1102bb670085b17b7f95bf6cfdf5b128772ec8faf9ea211464ea4add406a3a6384a7d87a0cd1a96263692134323477b4fb43659a6cab78 + languageName: node + linkType: hard + +"mkdirp@npm:^1.0.3": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: 10c0/46ea0f3ffa8bc6a5bc0c7081ffc3907777f0ed6516888d40a518c5111f8366d97d2678911ad1a6882bf592fa9de6c784fea32e1687bb94e1f4944170af48a5cf + languageName: node + linkType: hard + +"ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 10c0/a437714e2f90dbf881b5191d35a6db792efbca5badf112f87b9e1c712aace4b4b9b742dd6537f3edf90fd6f684de897cec230abde57e87883766712ddda297cc + languageName: node + linkType: hard + +"ms@npm:^2.1.3": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 + languageName: node + linkType: hard + +"node-fetch@npm:^2.6.7": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" + dependencies: + whatwg-url: "npm:^5.0.0" + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: 10c0/b55786b6028208e6fbe594ccccc213cab67a72899c9234eb59dba51062a299ea853210fcf526998eaa2867b0963ad72338824450905679ff0fa304b8c5093ae8 + languageName: node + linkType: hard + +"node-gyp-build@npm:^4.2.2": + version: 4.8.1 + resolution: "node-gyp-build@npm:4.8.1" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: 10c0/e36ca3d2adf2b9cca316695d7687207c19ac6ed326d6d7c68d7112cebe0de4f82d6733dff139132539fcc01cf5761f6c9082a21864ab9172edf84282bc849ce7 + languageName: node + linkType: hard + +"nofilter@npm:^3.1.0": + version: 3.1.0 + resolution: "nofilter@npm:3.1.0" + checksum: 10c0/92459f3864a067b347032263f0b536223cbfc98153913b5dce350cb39c8470bc1813366e41993f22c33cc6400c0f392aa324a4b51e24c22040635c1cdb046499 + languageName: node + linkType: hard + +"nopt@npm:^5.0.0": + version: 5.0.0 + resolution: "nopt@npm:5.0.0" + dependencies: + abbrev: "npm:1" + bin: + nopt: bin/nopt.js + checksum: 10c0/fc5c4f07155cb455bf5fc3dd149fac421c1a40fd83c6bfe83aa82b52f02c17c5e88301321318adaa27611c8a6811423d51d29deaceab5fa158b585a61a551061 + languageName: node + linkType: hard + +"npmlog@npm:^5.0.1": + version: 5.0.1 + resolution: "npmlog@npm:5.0.1" + dependencies: + are-we-there-yet: "npm:^2.0.0" + console-control-strings: "npm:^1.1.0" + gauge: "npm:^3.0.0" + set-blocking: "npm:^2.0.0" + checksum: 10c0/489ba519031013001135c463406f55491a17fc7da295c18a04937fe3a4d523fd65e88dd418a28b967ab743d913fdeba1e29838ce0ad8c75557057c481f7d49fa + languageName: node + linkType: hard + +"object-assign@npm:^4.1.1": + version: 4.1.1 + resolution: "object-assign@npm:4.1.1" + checksum: 10c0/1f4df9945120325d041ccf7b86f31e8bcc14e73d29171e37a7903050e96b81323784ec59f93f102ec635bcf6fa8034ba3ea0a8c7e69fa202b87ae3b6cec5a414 + languageName: node + linkType: hard + +"once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: "npm:1" + checksum: 10c0/5d48aca287dfefabd756621c5dfce5c91a549a93e9fdb7b8246bc4c4790aa2ec17b34a260530474635147aeb631a2dcc8b32c613df0675f96041cbb8244517d0 + languageName: node + linkType: hard + +"p-map@npm:^7.0.1": + version: 7.0.2 + resolution: "p-map@npm:7.0.2" + checksum: 10c0/e10548036648d1c043153f9997112fe5a7de54a319210238628f8ea22ee36587fd6ee740811f88b60bbf29d932e23ae35df7fced40df477116c84c18e797047e + languageName: node + linkType: hard + +"package-config@npm:^5.0.0": + version: 5.0.0 + resolution: "package-config@npm:5.0.0" + dependencies: + find-up-simple: "npm:^1.0.0" + load-json-file: "npm:^7.0.1" + checksum: 10c0/f6c48930700b73a41d839bf2898b628d23665827488a4f34aed2d05e4a99d7a70a70ada115c3546765947fbc8accff94c0779da21ea084b25df47cb774531eeb + languageName: node + linkType: hard + +"parse-ms@npm:^4.0.0": + version: 4.0.0 + resolution: "parse-ms@npm:4.0.0" + checksum: 10c0/a7900f4f1ebac24cbf5e9708c16fb2fd482517fad353aecd7aefb8c2ba2f85ce017913ccb8925d231770404780df46244ea6fec598b3bde6490882358b4d2d16 + languageName: node + linkType: hard + +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 10c0/127da03c82172a2a50099cddbf02510c1791fc2cc5f7713ddb613a56838db1e8168b121a920079d052e0936c23005562059756d653b7c544c53185efe53be078 + languageName: node + linkType: hard + +"path-type@npm:^5.0.0": + version: 5.0.0 + resolution: "path-type@npm:5.0.0" + checksum: 10c0/e8f4b15111bf483900c75609e5e74e3fcb79f2ddb73e41470028fcd3e4b5162ec65da9907be077ee5012c18801ff7fffb35f9f37a077f3f81d85a0b7d6578efd + languageName: node + linkType: hard + +"picomatch@npm:^2.2.2, picomatch@npm:^2.3.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be + languageName: node + linkType: hard + +"picomatch@npm:^3.0.1": + version: 3.0.1 + resolution: "picomatch@npm:3.0.1" + checksum: 10c0/70ec738569f1864658378b7abdab8939d15dae0718c1df994eae3346fd33daf6a3c1ff4e0c1a0cd1e2c0319130985b63a2cff34d192f2f2acbb78aca76111736 + languageName: node + linkType: hard + +"plur@npm:^5.1.0": + version: 5.1.0 + resolution: "plur@npm:5.1.0" + dependencies: + irregular-plurals: "npm:^3.3.0" + checksum: 10c0/26bb622b8545fcfd47bbf56fbcca66c08693708a232e403fa3589e00003c56c14231ac57c7588ca5db83ef4be1f61383402c4ea954000768f779f8aef6eb6da8 + languageName: node + linkType: hard + +"pretty-ms@npm:^9.0.0": + version: 9.0.0 + resolution: "pretty-ms@npm:9.0.0" + dependencies: + parse-ms: "npm:^4.0.0" + checksum: 10c0/ba4a2acd1fe92a1c629e5cdeb555d7fa344ae9920e20fa00e8ac1db61b8d3dff8638ffc70c7569f681e375df68c9f31291c2c1912cefd02ef1b1bdd0861a4aed + languageName: node + linkType: hard + +"queue-microtask@npm:^1.2.2": + version: 1.2.3 + resolution: "queue-microtask@npm:1.2.3" + checksum: 10c0/900a93d3cdae3acd7d16f642c29a642aea32c2026446151f0778c62ac089d4b8e6c986811076e1ae180a694cedf077d453a11b58ff0a865629a4f82ab558e102 + languageName: node + linkType: hard + +"react-server@workspace:.": + version: 0.0.0-use.local + resolution: "react-server@workspace:." + dependencies: + "@napi-rs/cli": "npm:^2.18.2" + ava: "npm:^6.0.1" + languageName: unknown + linkType: soft + +"readable-stream@npm:^3.6.0": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: 10c0/e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10c0/83aa76a7bc1531f68d92c75a2ca2f54f1b01463cb566cf3fbc787d0de8be30c9dbc211d1d46be3497dac5785fe296f2dd11d531945ac29730643357978966e99 + languageName: node + linkType: hard + +"resolve-cwd@npm:^3.0.0": + version: 3.0.0 + resolution: "resolve-cwd@npm:3.0.0" + dependencies: + resolve-from: "npm:^5.0.0" + checksum: 10c0/e608a3ebd15356264653c32d7ecbc8fd702f94c6703ea4ac2fb81d9c359180cba0ae2e6b71faa446631ed6145454d5a56b227efc33a2d40638ac13f8beb20ee4 + languageName: node + linkType: hard + +"resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 10c0/b21cb7f1fb746de8107b9febab60095187781137fd803e6a59a76d421444b1531b641bba5857f5dc011974d8a5c635d61cec49e6bd3b7fc20e01f0fafc4efbf2 + languageName: node + linkType: hard + +"reusify@npm:^1.0.4": + version: 1.0.4 + resolution: "reusify@npm:1.0.4" + checksum: 10c0/c19ef26e4e188f408922c46f7ff480d38e8dfc55d448310dfb518736b23ed2c4f547fb64a6ed5bdba92cd7e7ddc889d36ff78f794816d5e71498d645ef476107 + languageName: node + linkType: hard + +"rimraf@npm:^3.0.2": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" + dependencies: + glob: "npm:^7.1.3" + bin: + rimraf: bin.js + checksum: 10c0/9cb7757acb489bd83757ba1a274ab545eafd75598a9d817e0c3f8b164238dd90eba50d6b848bd4dcc5f3040912e882dc7ba71653e35af660d77b25c381d402e8 + languageName: node + linkType: hard + +"run-parallel@npm:^1.1.9": + version: 1.2.0 + resolution: "run-parallel@npm:1.2.0" + dependencies: + queue-microtask: "npm:^1.2.2" + checksum: 10c0/200b5ab25b5b8b7113f9901bfe3afc347e19bb7475b267d55ad0eb86a62a46d77510cb0f232507c9e5d497ebda569a08a9867d0d14f57a82ad5564d991588b39 + languageName: node + linkType: hard + +"safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10c0/6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3 + languageName: node + linkType: hard + +"semver@npm:^6.0.0": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: 10c0/e3d79b609071caa78bcb6ce2ad81c7966a46a7431d9d58b8800cfa9cb6a63699b3899a0e4bcce36167a284578212d9ae6942b6929ba4aa5015c079a67751d42d + languageName: node + linkType: hard + +"semver@npm:^7.3.2, semver@npm:^7.3.5": + version: 7.6.2 + resolution: "semver@npm:7.6.2" + bin: + semver: bin/semver.js + checksum: 10c0/97d3441e97ace8be4b1976433d1c32658f6afaff09f143e52c593bae7eef33de19e3e369c88bd985ce1042c6f441c80c6803078d1de2a9988080b66684cbb30c + languageName: node + linkType: hard + +"serialize-error@npm:^7.0.1": + version: 7.0.1 + resolution: "serialize-error@npm:7.0.1" + dependencies: + type-fest: "npm:^0.13.1" + checksum: 10c0/7982937d578cd901276c8ab3e2c6ed8a4c174137730f1fb0402d005af209a0e84d04acc874e317c936724c7b5b26c7a96ff7e4b8d11a469f4924a4b0ea814c05 + languageName: node + linkType: hard + +"set-blocking@npm:^2.0.0": + version: 2.0.0 + resolution: "set-blocking@npm:2.0.0" + checksum: 10c0/9f8c1b2d800800d0b589de1477c753492de5c1548d4ade52f57f1d1f5e04af5481554d75ce5e5c43d4004b80a3eb714398d6907027dc0534177b7539119f4454 + languageName: node + linkType: hard + +"signal-exit@npm:^3.0.0": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 + languageName: node + linkType: hard + +"slash@npm:^5.1.0": + version: 5.1.0 + resolution: "slash@npm:5.1.0" + checksum: 10c0/eb48b815caf0bdc390d0519d41b9e0556a14380f6799c72ba35caf03544d501d18befdeeef074bc9c052acf69654bc9e0d79d7f1de0866284137a40805299eb3 + languageName: node + linkType: hard + +"slice-ansi@npm:^5.0.0": + version: 5.0.0 + resolution: "slice-ansi@npm:5.0.0" + dependencies: + ansi-styles: "npm:^6.0.0" + is-fullwidth-code-point: "npm:^4.0.0" + checksum: 10c0/2d4d40b2a9d5cf4e8caae3f698fe24ae31a4d778701724f578e984dcb485ec8c49f0c04dab59c401821e80fcdfe89cace9c66693b0244e40ec485d72e543914f + languageName: node + linkType: hard + +"sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10c0/ecadcfe4c771890140da5023d43e190b7566d9cf8b2d238600f31bec0fc653f328da4450eb04bd59a431771a8e9cc0e118f0aa3974b683a4981b4e07abc2a5bb + languageName: node + linkType: hard + +"stack-utils@npm:^2.0.6": + version: 2.0.6 + resolution: "stack-utils@npm:2.0.6" + dependencies: + escape-string-regexp: "npm:^2.0.0" + checksum: 10c0/651c9f87667e077584bbe848acaecc6049bc71979f1e9a46c7b920cad4431c388df0f51b8ad7cfd6eed3db97a2878d0fc8b3122979439ea8bac29c61c95eec8a + languageName: node + linkType: hard + +"string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10c0/1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b + languageName: node + linkType: hard + +"string-width@npm:^7.0.0": + version: 7.1.0 + resolution: "string-width@npm:7.1.0" + dependencies: + emoji-regex: "npm:^10.3.0" + get-east-asian-width: "npm:^1.0.0" + strip-ansi: "npm:^7.1.0" + checksum: 10c0/68a99fbc3bd3d8eb42886ff38dce819767dee55f606f74dfa4687a07dfd21262745d9683df0aa53bf81a5dd47c13da921a501925b974bec66a7ddd634fef0634 + languageName: node + linkType: hard + +"string_decoder@npm:^1.1.1": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: "npm:~5.2.0" + checksum: 10c0/810614ddb030e271cd591935dcd5956b2410dd079d64ff92a1844d6b7588bf992b3e1b69b0f4d34a3e06e0bd73046ac646b5264c1987b20d0601f81ef35d731d + languageName: node + linkType: hard + +"strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10c0/1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 + languageName: node + linkType: hard + +"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10c0/a198c3762e8832505328cbf9e8c8381de14a4fa50a4f9b2160138158ea88c0f5549fb50cb13c651c3088f47e63a108b34622ec18c0499b6c8c3a5ddf6b305ac4 + languageName: node + linkType: hard + +"supertap@npm:^3.0.1": + version: 3.0.1 + resolution: "supertap@npm:3.0.1" + dependencies: + indent-string: "npm:^5.0.0" + js-yaml: "npm:^3.14.1" + serialize-error: "npm:^7.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10c0/8164674f2e280cab875f0fef5bb36c15553c13e29697ff92f4e0d6bc62149f0303a89eee47535413ed145ea72e14a24d065bab233059d48a499ec5ebb4566b0f + languageName: node + linkType: hard + +"tar@npm:^6.1.11": + version: 6.2.1 + resolution: "tar@npm:6.2.1" + dependencies: + chownr: "npm:^2.0.0" + fs-minipass: "npm:^2.0.0" + minipass: "npm:^5.0.0" + minizlib: "npm:^2.1.1" + mkdirp: "npm:^1.0.3" + yallist: "npm:^4.0.0" + checksum: 10c0/a5eca3eb50bc11552d453488344e6507156b9193efd7635e98e867fab275d527af53d8866e2370cd09dfe74378a18111622ace35af6a608e5223a7d27fe99537 + languageName: node + linkType: hard + +"temp-dir@npm:^3.0.0": + version: 3.0.0 + resolution: "temp-dir@npm:3.0.0" + checksum: 10c0/a86978a400984cd5f315b77ebf3fe53bb58c61f192278cafcb1f3fb32d584a21dc8e08b93171d7874b7cc972234d3455c467306cc1bfc4524b622e5ad3bfd671 + languageName: node + linkType: hard + +"time-zone@npm:^1.0.0": + version: 1.0.0 + resolution: "time-zone@npm:1.0.0" + checksum: 10c0/d00ebd885039109011b6e2423ebbf225160927333c2ade6d833e9cc4676db20759f1f3855fafde00d1bd668c243a6aa68938ce71fe58aab0d514e820d59c1d81 + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: 10c0/487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 + languageName: node + linkType: hard + +"tr46@npm:~0.0.3": + version: 0.0.3 + resolution: "tr46@npm:0.0.3" + checksum: 10c0/047cb209a6b60c742f05c9d3ace8fa510bff609995c129a37ace03476a9b12db4dbf975e74600830ef0796e18882b2381fb5fb1f6b4f96b832c374de3ab91a11 + languageName: node + linkType: hard + +"type-fest@npm:^0.13.1": + version: 0.13.1 + resolution: "type-fest@npm:0.13.1" + checksum: 10c0/0c0fa07ae53d4e776cf4dac30d25ad799443e9eef9226f9fddbb69242db86b08584084a99885cfa5a9dfe4c063ebdc9aa7b69da348e735baede8d43f1aeae93b + languageName: node + linkType: hard + +"unicorn-magic@npm:^0.1.0": + version: 0.1.0 + resolution: "unicorn-magic@npm:0.1.0" + checksum: 10c0/e4ed0de05b0a05e735c7d8a2930881e5efcfc3ec897204d5d33e7e6247f4c31eac92e383a15d9a6bccb7319b4271ee4bea946e211bf14951fec6ff2cbbb66a92 + languageName: node + linkType: hard + +"util-deprecate@npm:^1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 10c0/41a5bdd214df2f6c3ecf8622745e4a366c4adced864bc3c833739791aeeeb1838119af7daed4ba36428114b5c67dcda034a79c882e97e43c03e66a4dd7389942 + languageName: node + linkType: hard + +"webidl-conversions@npm:^3.0.0": + version: 3.0.1 + resolution: "webidl-conversions@npm:3.0.1" + checksum: 10c0/5612d5f3e54760a797052eb4927f0ddc01383550f542ccd33d5238cfd65aeed392a45ad38364970d0a0f4fea32e1f4d231b3d8dac4a3bdd385e5cf802ae097db + languageName: node + linkType: hard + +"well-known-symbols@npm:^2.0.0": + version: 2.0.0 + resolution: "well-known-symbols@npm:2.0.0" + checksum: 10c0/cb6c12e98877e8952ec28d13ae6f4fdb54ae1cb49b16a728720276dadd76c930e6cb0e174af3a4620054dd2752546f842540122920c6e31410208abd4958ee6b + languageName: node + linkType: hard + +"whatwg-url@npm:^5.0.0": + version: 5.0.0 + resolution: "whatwg-url@npm:5.0.0" + dependencies: + tr46: "npm:~0.0.3" + webidl-conversions: "npm:^3.0.0" + checksum: 10c0/1588bed84d10b72d5eec1d0faa0722ba1962f1821e7539c535558fb5398d223b0c50d8acab950b8c488b4ba69043fd833cc2697056b167d8ad46fac3995a55d5 + languageName: node + linkType: hard + +"wide-align@npm:^1.1.2": + version: 1.1.5 + resolution: "wide-align@npm:1.1.5" + dependencies: + string-width: "npm:^1.0.2 || 2 || 3 || 4" + checksum: 10c0/1d9c2a3e36dfb09832f38e2e699c367ef190f96b82c71f809bc0822c306f5379df87bab47bed27ea99106d86447e50eb972d3c516c2f95782807a9d082fbea95 + languageName: node + linkType: hard + +"wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10c0/d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 10c0/56fece1a4018c6a6c8e28fbc88c87e0fbf4ea8fd64fc6c63b18f4acc4bd13e0ad2515189786dd2c30d3eec9663d70f4ecf699330002f8ccb547e4a18231fc9f0 + languageName: node + linkType: hard + +"write-file-atomic@npm:^5.0.1": + version: 5.0.1 + resolution: "write-file-atomic@npm:5.0.1" + dependencies: + imurmurhash: "npm:^0.1.4" + signal-exit: "npm:^4.0.1" + checksum: 10c0/e8c850a8e3e74eeadadb8ad23c9d9d63e4e792bd10f4836ed74189ef6e996763959f1249c5650e232f3c77c11169d239cbfc8342fc70f3fe401407d23810505d + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10c0/4df2842c36e468590c3691c894bc9cdbac41f520566e76e24f59401ba7d8b4811eb1e34524d57e54bc6d864bcb66baab7ffd9ca42bf1eda596618f9162b91249 + languageName: node + linkType: hard + +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 10c0/2286b5e8dbfe22204ab66e2ef5cc9bbb1e55dfc873bbe0d568aa943eb255d131890dfd5bf243637273d31119b870f49c18fcde2c6ffbb7a7a092b870dc90625a + languageName: node + linkType: hard + +"yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: 10c0/f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2 + languageName: node + linkType: hard + +"yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10c0/ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05 + languageName: node + linkType: hard