diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..0c17df09 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[target.x86_64-pc-windows-msvc] +rustflags = ["-C", "target-feature=+crt-static"] \ No newline at end of file diff --git a/.clang-format b/.clang-format deleted file mode 100644 index 4351ad32..00000000 --- a/.clang-format +++ /dev/null @@ -1,8 +0,0 @@ -BasedOnStyle: Google -IndentWidth: 4 -AlignAfterOpenBracket: AlwaysBreak -AllowAllParametersOfDeclarationOnNextLine: True -AlignEscapedNewlines: Right -BinPackArguments: False -BinPackParameters: False -InsertNewlineAtEOF: True \ No newline at end of file diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index b72ea79e..00000000 --- a/.dockerignore +++ /dev/null @@ -1,13 +0,0 @@ -.nyc_output -coverage -build -release -dist -node_modules -prebuild - -npm-debug.log -yarn-error.log - -# Fuzz Test Meta -fuzz-tests diff --git a/.eslintrc.js b/.eslintrc.js index 86bed2a4..9b0c6081 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -82,17 +82,6 @@ module.exports = { "import/core-modules": ["node:child_process", "node:crypto", "node:fs", "node:os", "node:path", "node:util"], }, overrides: [ - { - files: ["lib/index.mjs"], - parserOptions: { - sourceType: "module" - }, - rules: { - // The imports are all resolved via tsconfig.mjs.json but the root tsconfig that eslint uses - // shows them as unresolved. - "import/no-unresolved": "off", - }, - }, { files: ["test/**/*.ts"], rules: { @@ -101,10 +90,9 @@ module.exports = { }, }, { - // Is a dev file and squacks about chokidar being a devDependency - files: ["scripts/watch.ts"], + files: ["test/utils/testSets.ts"], rules: { - "import/no-extraneous-dependencies": "off" + "no-console": "off", }, }, ], diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 00000000..dfa736c5 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,284 @@ +name: CI +env: + DEBUG: napi:* + APP_NAME: blst + MACOSX_DEPLOYMENT_TARGET: '10.13' +permissions: + contents: write + id-token: write + +on: + pull_request: + push: + branches: + - master + +jobs: + build: + strategy: + fail-fast: false + matrix: + settings: + - host: macos-latest + target: x86_64-apple-darwin + build: yarn build --target x86_64-apple-darwin + - host: windows-latest + build: yarn build --target x86_64-pc-windows-msvc + target: x86_64-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: 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 + name: Build - ${{ matrix.settings.target }} - node@22 + runs-on: ${{ matrix.settings.host }} + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Setup node + uses: actions/setup-node@v4 + if: ${{ !matrix.settings.docker }} + with: + node-version: '22.4.x' + 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: '22.4.x' + 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 + test-macOS-windows-binding: + name: Test - ${{ 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' + - '22.4.x' + 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 + architecture: x64 + - 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:unit + - name: Download spec tests + run: yarn download-spec-tests + - name: Spec tests + run: yarn test:spec + + test-linux-x64-gnu-binding: + name: Test - Linux-x64-gnu - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + node: + - '18' + - '22.4.x' + 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: Lint project + run: yarn lint + - name: Run napi version + run: yarn run version + - name: Ensure there are no unstaged changes + run: git diff --exit-code + - name: Test bindings + run: yarn test:unit + - name: Download spec tests + run: yarn download-spec-tests + - name: Spec tests + run: yarn test:spec + + test-linux-aarch64-gnu-binding: + name: Test - aarch64-unknown-linux-gnu - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + node: + - '18' + - 22.4 + 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:unit + yarn download-spec-tests + yarn test:spec + ls -la + publish: + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master' + name: Publish + runs-on: ubuntu-latest + needs: + - test-macOS-windows-binding + - test-linux-x64-gnu-binding + - test-linux-aarch64-gnu-binding + steps: + - uses: actions/checkout@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: '22.4.x' + cache: yarn + - name: Create tag + id: tag + uses: butlerlogic/action-autotag@1.1.2 + with: + strategy: package + tag_prefix: "v" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Exit if no version change + if: steps.tag.outputs.tagcreated == 'no' + uses: actions/github-script@v3 + with: + script: core.setFailed('The package.json version did not change. Workflow will not create a release.') + - 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 node -e "console.log(require('./package.json').version)" | grep "v[0-9]\+\.[0-9]\+\.[0-9]\+$"; + then + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + npm publish --access public + elif node -e "console.log(require('./package.json').version)" | 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/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 944dc6e4..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,238 +0,0 @@ -name: Main -on: - pull_request: - push: - branches: - - master - -env: - # When building the bundle for npm we only want to include the prebuilds for - # the current node version we are supporting for Lodestar. The makeRelease - # script that builds the release and builds the npm package will select ONLY - # the version of node in this setup for publishing to npm. The rest will be - # added to the release on github and will be downloaded by the install script - # if they are using a version of node that is different then the one in this - # setup action. - NPM_PREBUILT_NODE_VERSION: 20 - -jobs: - build: - strategy: - fail-fast: false - matrix: - node: - - 18 - - 19 - - 20 - - 21 - - 22 - os: - - ubuntu-22.04 # linux x64 - - macos-12 # osx x64 - - macos-14 # osx arm - - windows-latest # windows x64 - runs-on: ${{matrix.os}} - defaults: - run: - shell: bash - - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - - name: Setup Node.js ${{matrix.node}} - uses: actions/setup-node@v4 - with: - node-version: ${{matrix.node}} - - - uses: actions/setup-python@v5 - with: - # More recent versions of python require more recent node-gyp - # See https://github.com/nodejs/node-gyp/issues/2869 - python-version: "3.11" - - - name: Install && Build TS + bindings - run: yarn - - - name: Run Unit Tests - run: yarn test:unit - - - name: Run Memory Tests - run: yarn test:memory - - # Attempt to pull spec-tests from cache - - name: Restore spec tests cache - id: cache-restore - if: matrix.os != 'windows-latest' - uses: actions/cache/restore@v4 - with: - path: spec-tests - key: spec-test-data-${{ hashFiles('test/spec/specTestVersioning.ts') }} - - # Download spec tests if not persisted - - name: Download spec tests - if: matrix.os != 'windows-latest' - run: yarn download-spec-tests - - # Cache Spec Tests if not already cached - - name: Save spec tests to cache - if: matrix.os != 'windows-latest' && steps.cache-restore.outputs.cache-hit != 'true' - uses: actions/cache/save@v4 - with: - path: spec-tests - key: spec-test-data-${{ hashFiles('test/spec/specTestVersioning.ts') }} - - - name: Run spec tests - if: matrix.os != 'windows-latest' - run: yarn test:spec - - - name: Upload binding.node - if: github.repository_owner == 'chainsafe' && github.event_name != 'pull_request' - uses: actions/upload-artifact@v4 - with: - name: binding-${{ matrix.os }}-${{ matrix.node }} - path: prebuild/*.node - if-no-files-found: error - - # Required as current base images do not support arm64 - # https://resources.github.com/devops/accelerate-your-cicd-with-arm-and-gpu-runners-in-github-actions/ - # https://github.com/actions/runner-images/issues/5631 - build-arm: - strategy: - fail-fast: false - matrix: - node: - - 18 - - 19 - - 20 - - 21 - - 22 - runs-on: ubuntu-22.04 - defaults: - run: - shell: bash - - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - # Download spec tests with cache - - name: Restore spec tests cache - uses: actions/cache@v4 - with: - path: spec-tests - key: spec-test-data-${{ hashFiles('test/spec/specTestVersioning.ts') }} - - # https://github.com/docker/setup-qemu-action - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - # https://github.com/docker/setup-buildx-action - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build arm64 Binding, Run Tests and Copy Build Artifact to Host - run: | - docker buildx build --build-arg NODE_VERSION=${{matrix.node}} --platform linux/arm64 -t blst-ts-temp-armbuild:${{matrix.node}} --load --progress=plain . - docker create --name temp-container blst-ts-temp-armbuild:${{matrix.node}} - docker cp temp-container:/usr/src/blst-ts/prebuild ./prebuild - - - name: Upload binding.node - if: github.repository_owner == 'chainsafe' && github.event_name != 'pull_request' - uses: actions/upload-artifact@v4 - with: - name: binding-linux-arm-${{ matrix.node }} - path: prebuild/*.node - if-no-files-found: error - - benchmark: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Install - run: yarn - - - name: Run Perf Tests - run: yarn test:perf - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - publish: - needs: ["build", "build-arm"] - if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master' - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - # When building the bundle for npm we only want to include the prebuilds for - # the current node version we are supporting for Lodestar. The script below - # that builds the release and builds the npm package will select ONLY the - # version of node in this setup for publishing to npm. The rest will be - # added to the release on github and will be downloaded by the install script - # if they are using a version of node that is different then the one in this - # setup action. - - uses: actions/setup-node@v4 - with: - node-version: ${{env.NPM_PREBUILT_NODE_VERSION}} - registry-url: "https://registry.npmjs.org" - - - name: Create tag - id: tag - uses: butlerlogic/action-autotag@1.1.2 - with: - strategy: package - tag_prefix: "v" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Exit if no version change - if: steps.tag.outputs.tagcreated == 'no' - uses: actions/github-script@v3 - with: - script: core.setFailed('The package.json version did not change. Workflow will not create a release.') - - - name: Get pre-built binding.node files - uses: actions/download-artifact@v4 - with: - path: prebuild/ - merge-multiple: true - - - name: Install - run: yarn - - - name: Build TS - run: yarn build:ts - - # Moves all prebuilds to the `release` folder and then only moves the - # prebuilds for the current node version into the `prebuild` folder for - # publishing to npm. Goal is to reduce bundle size and to also provide - # faster install time for the most common version that Lodestar is supporting - - name: Prepare for Release and Publishing - run: yarn ts-node scripts/makeRelease - - - name: Create Github release with prebuilds - if: steps.tag.outputs.tagcreated == 'yes' - uses: softprops/action-gh-release@v2 - with: - files: release/* - tag_name: ${{ steps.tag.outputs.tagname }} - fail_on_unmatched_files: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish to NPM - if: steps.tag.outputs.tagcreated == 'yes' - run: yarn publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 93a8bfa2..443a2da1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.nyc_output coverage build release @@ -15,3 +14,201 @@ spec-tests-bls # Fuzz Test Meta fuzz-tests + +# 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 +Cargo.lock + +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions + +*.node diff --git a/.gitmodules b/.gitmodules index de7d7c0c..7d85e849 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "blst"] path = blst - url = https://github.com/supranational/blst.git + url = https://github.com/wemeetagain/blst.git diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..ec144db2 --- /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/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json deleted file mode 100644 index 56294770..00000000 --- a/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "configurations": [ - { - "name": "OSX - Napi Dependency Configuration", - "includePath": [ - "${workspaceFolder}/**", - "${env:HOME}/.node-gyp/**", - "${env:HOME}/.nvm/versions/node/**" - ], - "defines": [], - "macFrameworkPath": [ - "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks" - ], - "compilerPath": "/usr/bin/clang", - "cStandard": "c17", - "cppStandard": "c++17", - "intelliSenseMode": "macos-clang-arm64" - } - ], - "version": 4 -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..ce6d75ad --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "rust-analyzer.procMacro.ignored": { + "napi-derive": [ + "napi" + ] + } +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83367dfa..6227ca7e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,10 +11,6 @@ yarn ### Scripts -#### `dev` - -Helper function for iterative development. First deletes the `prebuild` folder to make sure the most current version of bindings are being used. Then sets up file watchers to monitor changes in the `src` and `test` folders. For changes in `src` the code is compiled via `node-gyp` and then the unit tests are run against the freshly compiled binary. For `test` changes, only the tests are rerun. - #### `download-spec-tests` Pulls the spec test from the `ethereum/consensus-spec` repo and puts them in the `spec-tests` folder. @@ -34,55 +30,3 @@ Runs a test rig for creating thousands of object instances to get a mean-reversi #### `test:perf` Uses `@dapplion/benchmark` to run the test in `test/perf`. Results from these tests are posted to PR bodies and checked against the values on `master` to make sure there are no regressions and to highlight significant performance increases. - -## Background for Installation and Publishing Workflows - -It is necessary for node-gyp to compile the native code for each combination of os architecture and node version. When compilation happens the file is output to one of a few places depending on what flags are passed to the build process. Generally node-gyp places the build configuration and artifacts in the `build` folder. For release builds the assemblies are output to `build/Release` and for debug builds they go to `build/Debug`. There are lots of intermediate assemblies in those folders but the one that is most important is the final assembled compilation artifact, the `.node` file. This is the one that can be `require()` in a JS file. - -`node-gyp` names the final binary the same as the `target_name` in the `binding.gyp` file. In our case that is `blst_ts_addon.node`. So it will usually be found in `build/Release/blst_ts_addon.node`. This is the default development case. - -There is another case that needs to be handled however. Production. It is not great to rely on consumers to have build tooling on their machines. Even if they are present they can often need to be configured to make `node-gyp` happy. This has been a common issue in our discord previously because the base `supranational/blst` build process has a hard request to `python`, [seen here](https://github.com/supranational/blst/blob/704c7f6d5f99ebb6bda84f635122e449ee51aa48/bindings/node.js/binding.gyp#L37), and not `python3` which is now standard on most computers. While this issue was resolved by building this project there are others that come up. - -To make lives easier it is common for native module developers to include pre-built bindings with the package downloaded from npm. They often include several versions of the bindings and a fall back to building locally if an appropriate version is not in the published module. This package does the same. - -We test the bindings for a number of platforms and node combinations in CI and thus build a number of versions of the bindings. However, if we were to publish all of them in the `prebuild` folder the downloaded tarball from npm will be very big. Ultimately only one version of the bindings will be relevant to any user at a given time because they generally never change their cpu architecture (would be funny to watch this surgery though) nor node version between runs of `npm install`. - -To solve for this inefficiency we only should include some of the compiled binaries. We have selected to include all architectures for the current version of node. As a courtesy, and way to cut down on installation bugs, we publish the rest of the bindings combinations that CI built to a github release. This way the vast majority of os/node combinations will have a binary available and will not need to have build tooling installed (python, gcc, make, etc are used under the hood by node-gyp). - -## How to `require` Bindings - -To accommodate both development and production environments we have built some tooling to help wih `require()`. As mentioned above the build artifacts can be placed in a couple of places and we also want to support `prebuild` of bindings for consumers. To help make sure a binding can be found at runtime we programmatically standardize the name and location of where the bindings are imported from. - -For development we need to look in the `build` folder and for production we need to look in the `prebuild` folder. We also need to handle the case where the file is named by `node-gyp` and where the file is named so the many versions can coexist in a single `prebuild` folder. This is standardized by the `getBindingsPath()` and `getBinaryName()` helper functions. - -## Installation Flow - -When running `npm install` in a consuming library the `node_modules` will first be downloaded, and then the `install` script in the `package.json` is run by npm/yarn. The first thing the install script does is attempt to use a binding in the `prebuild` folder. If one is not available then we attempt to download the correct version from the github release. If a compatible version is not found there then the script falls back to running `node-gyp` and building the binding locally. - -There is a test that we run after each step to check that the binding can successfully be imported/required by node. If the import throws, we go to the next step in the flow. - -For both the download step and the build step, the binary is placed in the `prebuild` folder and renamed accordingly. That way it will be easily accessible at runtime by the `lib` and by the workflow for publishing. - -## Development and Testing - -After cloning the repo, run `yarn install` to install deps and build the bindings for the first time. This will place them in the `prebuild` folder. During iterative development though this may not be ideal because the `getBindingsPath()` resolves the `prebuild` version before the `build` versions (more common case during production). - -For this reason it is important to delete the `prebuild` folder during development so that you are testing against the newly built code. While doing iterative development one can run the `dev` script in the package.json. This will delete `prebuild`, watch the `src` and `test` code and rerun compilation and unit tests on changes. - -Native development is not like JS and segfaults are HARD to find. It's best to run unit tests after each change to help identify problem code EARLY. - -## Publishing - -A github release, and an npm package are prepared and published via our CI workflow. The trigger for publishing is merging a version change in the package.json to `master`. When the CI picks up the change to the package.json `version` it creates a tag, assembles and publishes a release, and assembles and publishes an npm package. - -The CI testing process runs a matrix of os and node versions to ensure broad compatibility. When the job runs `yarn install` the `node_modules` are all downloaded and the `install` script is run. Because the `prebuild` folder is in `.gitignore` the install script will fall back to building the bindings locally (for the job's current architecture and node version) and move it to the `prebuild` folder using the correct naming convention laid out in `getBinaryName()`. The bindings are then tested against the `unit` and `spec` tests. At the end of a run for a given architecture the `prebuild/*.node` is cached for use by the publish job. - -When the trigger condition (merge to `master`) is met the publish flow will restore the `prebuild` folder from cache with the several bindings in it (all named appropriately). At this point, if `npm publish` was run ALL of the pre-build binaries would be included in the npm bundle which is not ideal. - -To avoid this `scripts/makeRelease.ts` copies all of the bindings to the `release` folder and then selectively deletes, from the `prebuild` folder, bindings that are not for the current node versions. At the end of running the script all bindings will be in `release` and only the bindings that will get published to npm are in the `prebuild` folder. - -The workflow then creates the release and includes `release` assets to the release and publishes the npm package with only the `prebuild` bindings that were selected for inclusion. - -The workflow has a variable `env.NPM_PREBUILT_NODE_VERSION` for setting the currently bundled version and this generally should match the currently supported version of node that `@chainsafe/lodestar` uses. - -In the rare instance that the publish job fails but a tag and/or release are created the issue can be resolved via \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..ccb61ec8 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,21 @@ +[package] +edition = "2021" +name = "chainsafe_blst" +version = "0.0.0" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +blst = { path = "blst/bindings/rust" } +hex = "0.4.3" +napi = { version = "2.16.8", default-features = false, features = ["napi8"] } +napi-derive = "2.16.8" +rand = "0.8.5" + +[build-dependencies] +napi-build = "2.1.3" + +[profile.release] +lto = true +strip = "symbols" diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 83213b8f..00000000 --- a/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# This is used to build and test bindings for linux-arm64 - -# The container that this is run FROM is hosted here -# https://hub.docker.com/repository/docker/matthewkeil/blst-ts-armbuild/general -# -# See the notes in Dockerfile.armEnv for more information on how to build and -# publish new versions - -ARG NODE_VERSION -FROM matthewkeil/blst-ts-armbuild:${NODE_VERSION} - -ENV BLST_TS_FORCE_BUILD=true -ENV CI=true - -# NOTE: the artifacts of the build will be placed in /usr/src/blst-ts/prebuild -# and that folder should be mounted as a volume when running the container -WORKDIR /usr/src/blst-ts -COPY . . - -RUN yarn --ignore-optional - -# Test - spec tests data should already be cached -RUN yarn download-spec-tests -RUN yarn test:spec -RUN yarn test:unit diff --git a/Dockerfile.armEnv b/Dockerfile.armEnv deleted file mode 100644 index 6e9ccb88..00000000 --- a/Dockerfile.armEnv +++ /dev/null @@ -1,45 +0,0 @@ -# The containers build from this are hosted here -# https://hub.docker.com/repository/docker/matthewkeil/blst-ts-armbuild/general -# -# To update the containers or build new ones run: -# > docker buildx build --build-arg NODE_VERSION=20 --platform linux/arm64 -t matthewkeil/blst-ts-armbuild:20 -f Dockerfile.armEnv --load . -# > docker push matthewkeil/blst-ts-armbuild:20 -# -# If anyone other than me (@matthewkeil) is publishing this the username will -# need to be changed. -# -# TODO: (@matthewkeil) I will work with Peter to get a token for the chainsafe -# namespace and a workflow setup to build new versions via CI. This will -# probably not be needed though as linux-arm64 hosts will be releases soon by -# GitHub. - -ARG NODE_VERSION -FROM node:${NODE_VERSION} - -# Install 'add-apt-repository'. Only available with apt-get, not apt -RUN apt-get update && apt-get install -y software-properties-common - -# Install deps -RUN apt update && apt install -y \ - build-essential \ - cmake \ - g++ \ - libbz2-dev \ - libffi-dev \ - libgdbm-dev \ - libncurses5-dev \ - libnss3-dev \ - libreadline-dev \ - libssl-dev \ - libsqlite3-dev \ - make \ - zlib1g-dev - -RUN wget https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tgz -RUN tar -xf Python-3.11.4.tgz -RUN cd Python-3.11.4 && ./configure -RUN cd Python-3.11.4 && make install -# From https://askubuntu.com/questions/1296790/python-is-python3-package-in-ubuntu-20-04-what-is-it-and-what-does-it-actually -# Unified way to create reliable symlink across distros -# Only arm arch for NodeJS version >= 18 need this link. Older versions don't have `python-is-python3` -RUN apt install python-is-python3 || echo "Ignore errors" diff --git a/LICENSE b/LICENSE index 261eeb9e..811dbaf4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,192 +1,4 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] + Copyright 2024 ChainSafe Systems Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -198,4 +10,4 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. + limitations under the License. \ No newline at end of file diff --git a/README.md b/README.md index b3d3c693..a14d5a49 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # blst-ts -![ETH2.0_Spec_Version 0.12.0](https://img.shields.io/badge/ETH2.0_Spec_Version-0.12.0-2e86c1.svg) +![ETH2.0_Spec_Version 1.4.0](https://img.shields.io/badge/ETH2.0_Spec_Version-1.4.0-2e86c1.svg) ![ES Version](https://img.shields.io/badge/ES-2017-yellow) ![Node Version](https://img.shields.io/badge/node-16.x-green) @@ -36,6 +36,10 @@ const sig = sk.sign(msg); console.log(verify(msg, pk, sig)); // true ``` +This library exposes a classes for secret keys, public keys and signatures: `SecretKey`, `PublicKey` & `Signature` + +The `PublicKey` and `Signature` contain an affine point (x,y) encoding of P1 in G1 and P2 in G2 respectively. + ## Spec versioning This library has a hardcoded configuration compatible with Eth2.0 spec: @@ -57,8 +61,18 @@ Please check out [CONTRIBUTING.md](./CONTRIBUTING.md) for more info on how to us ## Release/Publishing -The release process is automatically [triggered](.github/workflows/main.yml#L198) when a change to the version in package.json is merged to master. See [CONTRIBUTING.md](./CONTRIBUTING.md) for more specifics about how the release and package are built. +## Release + +The release process is automatically [triggered](.github/workflows/CI.yml#216) when the master branch has the version in package.json updated. + +To create a new release: + +1. Increment the project version in [package.json](package.json#3) + - A pre-release can be published by ensuring that the project version is appended with non-numeric characters, eg: `-beta` +2. run `yarn run version` +3. merge a commit with these changes +4. CI will run and result in a new release being published ## License -Apache-2.0 +Apache-2.0 \ No newline at end of file diff --git a/binding.gyp b/binding.gyp deleted file mode 100644 index 6f8228d3..00000000 --- a/binding.gyp +++ /dev/null @@ -1,92 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'blst_ts_addon', - 'sources': [ - 'blst/src/server.c', - 'src/addon.cc', - 'src/secret_key.cc', - 'src/public_key.cc', - 'src/signature.cc', - 'src/functions.cc', - 'src/aggregate.cc', - 'src/aggregate_verify.cc', - 'src/aggregate_with_randomness.cc', - 'src/verify_multiple_aggregate_signatures.cc', - ], - 'include_dirs': [ - 'blst/bindings', - ", pksValidate?: boolean | undefined | null): PublicKey +/** + * Aggregate multiple signatures into a single signature. + * + * If `sigs_groupcheck` is `true`, the signatures will be group checked. + */ +export declare function aggregateSignatures(sigs: Array, sigsGroupcheck?: boolean | undefined | null): Signature +/** + * Aggregate multiple serialized public keys into a single public key. + * + * If `pks_validate` is `true`, the public keys will be infinity and group checked. + */ +export declare function aggregateSerializedPublicKeys(pks: Array, pksValidate?: boolean | undefined | null): PublicKey +/** + * Aggregate multiple serialized signatures into a single signature. + * + * If `sigs_groupcheck` is `true`, the signatures will be group checked. + */ +export declare function aggregateSerializedSignatures(sigs: Array, sigsGroupcheck?: boolean | undefined | null): Signature +/** + * Aggregate multiple public keys and multiple serialized signatures into a single blinded public key and blinded signature. + * + * Signatures are deserialized and validated with infinity and group checks before aggregation. + */ +export declare function aggregateWithRandomness(sets: Array): PkAndSig +/** + * Verify a signature against a message and public key. + * + * If `pk_validate` is `true`, the public key will be infinity and group checked. + * + * If `sig_groupcheck` is `true`, the signature will be group checked. + */ +export declare function verify(msg: Uint8Array, pk: PublicKey, sig: Signature, pkValidate?: boolean | undefined | null, sigGroupcheck?: boolean | undefined | null): boolean +/** + * Verify an aggregated signature against multiple messages and multiple public keys. + * + * If `pk_validate` is `true`, the public keys will be infinity and group checked. + * + * If `sigs_groupcheck` is `true`, the signatures will be group checked. + */ +export declare function aggregateVerify(msgs: Array, pks: Array, sig: Signature, pkValidate?: boolean | undefined | null, sigsGroupcheck?: boolean | undefined | null): boolean +/** + * Verify an aggregated signature against a single message and multiple public keys. + * + * Proof-of-possession is required for public keys. + * + * If `sigs_groupcheck` is `true`, the signatures will be group checked. + */ +export declare function fastAggregateVerify(msg: Uint8Array, pks: Array, sig: Signature, sigsGroupcheck?: boolean | undefined | null): boolean +/** + * Verify multiple aggregated signatures against multiple messages and multiple public keys. + * + * If `pks_validate` is `true`, the public keys will be infinity and group checked. + * + * If `sigs_groupcheck` is `true`, the signatures will be group checked. + * + * See https://ethresear.ch/t/fast-verification-of-multiple-bls-signatures/5407 + */ +export declare function verifyMultipleAggregateSignatures(sets: Array, pksValidate?: boolean | undefined | null, sigsGroupcheck?: boolean | undefined | null): boolean +export declare class SecretKey { + /** + * Generate a secret key deterministically from a secret byte array `ikm`. + * + * `ikm` must be at least 32 bytes long. + * + * Optionally pass `key_info` bytes to derive multiple independent keys from the same `ikm`. + * By default, the `key_info` is empty. + */ + static fromKeygen(ikm: Uint8Array, keyInfo?: Uint8Array | undefined | null): SecretKey + /** + * Generate a master secret key deterministically from a secret byte array `ikm` based on EIP-2333. + * + * `ikm` must be at least 32 bytes long. + * + * See https://eips.ethereum.org/EIPS/eip-2333 + */ + static deriveMasterEip2333(ikm: Uint8Array): SecretKey + /** + * Derive a child secret key from a parent secret key based on EIP-2333. + * + * See https://eips.ethereum.org/EIPS/eip-2333 + */ + deriveChildEip2333(index: number): SecretKey + /** Deserialize a secret key from a byte array. */ + static fromBytes(bytes: Uint8Array): SecretKey + /** Deserialize a secret key from a hex string. */ + static fromHex(hex: string): SecretKey + /** Serialize a secret key to a byte array. */ + toBytes(): Uint8Array + /** Serialize a secret key to a hex string. */ + toHex(): string + /** Return the corresponding public key */ + toPublicKey(): PublicKey + sign(msg: Uint8Array): Signature +} +export declare class PublicKey { + /** + * Deserialize a public key from a byte array. + * + * If `pk_validate` is `true`, the public key will be infinity and group checked. + */ + static fromBytes(bytes: Uint8Array, pkValidate?: boolean | undefined | null): PublicKey + /** + * Deserialize a public key from a hex string. + * + * If `pk_validate` is `true`, the public key will be infinity and group checked. + */ + static fromHex(hex: string, pkValidate?: boolean | undefined | null): PublicKey + /** Serialize a public key to a byte array. */ + toBytes(compress?: boolean | undefined | null): Uint8Array + /** Serialize a public key to a hex string. */ + toHex(compress?: boolean | undefined | null): string + /** Validate a public key with infinity and group check. */ + keyValidate(): void +} +export declare class Signature { + /** + * Deserialize a signature from a byte array. + * + * If `sig_validate` is `true`, the public key will be infinity and group checked. + * + * If `sig_infcheck` is `false`, the infinity check will be skipped. + */ + static fromBytes(bytes: Uint8Array, sigValidate?: boolean | undefined | null, sigInfcheck?: boolean | undefined | null): Signature + /** + * Deserialize a signature from a hex string. + * + * If `sig_validate` is `true`, the public key will be infinity and group checked. + * + * If `sig_infcheck` is `false`, the infinity check will be skipped. + */ + static fromHex(hex: string, sigValidate?: boolean | undefined | null, sigInfcheck?: boolean | undefined | null): Signature + /** Serialize a signature to a byte array. */ + toBytes(compress?: boolean | undefined | null): Uint8Array + /** Serialize a signature to a hex string. */ + toHex(compress?: boolean | undefined | null): string + /** + * Validate a signature with infinity and group check. + * + * If `sig_infcheck` is `false`, the infinity check will be skipped. + */ + sigValidate(sigInfcheck?: boolean | undefined | null): void +} diff --git a/index.js b/index.js new file mode 100644 index 00000000..66656c2c --- /dev/null +++ b/index.js @@ -0,0 +1,331 @@ +/* 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, 'blst.android-arm64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./blst.android-arm64.node') + } else { + nativeBinding = require('@chainsafe/blst-android-arm64') + } + } catch (e) { + loadError = e + } + break + case 'arm': + localFileExisted = existsSync(join(__dirname, 'blst.android-arm-eabi.node')) + try { + if (localFileExisted) { + nativeBinding = require('./blst.android-arm-eabi.node') + } else { + nativeBinding = require('@chainsafe/blst-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, 'blst.win32-x64-msvc.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.win32-x64-msvc.node') + } else { + nativeBinding = require('@chainsafe/blst-win32-x64-msvc') + } + } catch (e) { + loadError = e + } + break + case 'ia32': + localFileExisted = existsSync( + join(__dirname, 'blst.win32-ia32-msvc.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.win32-ia32-msvc.node') + } else { + nativeBinding = require('@chainsafe/blst-win32-ia32-msvc') + } + } catch (e) { + loadError = e + } + break + case 'arm64': + localFileExisted = existsSync( + join(__dirname, 'blst.win32-arm64-msvc.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.win32-arm64-msvc.node') + } else { + nativeBinding = require('@chainsafe/blst-win32-arm64-msvc') + } + } catch (e) { + loadError = e + } + break + default: + throw new Error(`Unsupported architecture on Windows: ${arch}`) + } + break + case 'darwin': + localFileExisted = existsSync(join(__dirname, 'blst.darwin-universal.node')) + try { + if (localFileExisted) { + nativeBinding = require('./blst.darwin-universal.node') + } else { + nativeBinding = require('@chainsafe/blst-darwin-universal') + } + break + } catch {} + switch (arch) { + case 'x64': + localFileExisted = existsSync(join(__dirname, 'blst.darwin-x64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./blst.darwin-x64.node') + } else { + nativeBinding = require('@chainsafe/blst-darwin-x64') + } + } catch (e) { + loadError = e + } + break + case 'arm64': + localFileExisted = existsSync( + join(__dirname, 'blst.darwin-arm64.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.darwin-arm64.node') + } else { + nativeBinding = require('@chainsafe/blst-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, 'blst.freebsd-x64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./blst.freebsd-x64.node') + } else { + nativeBinding = require('@chainsafe/blst-freebsd-x64') + } + } catch (e) { + loadError = e + } + break + case 'linux': + switch (arch) { + case 'x64': + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, 'blst.linux-x64-musl.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.linux-x64-musl.node') + } else { + nativeBinding = require('@chainsafe/blst-linux-x64-musl') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync( + join(__dirname, 'blst.linux-x64-gnu.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.linux-x64-gnu.node') + } else { + nativeBinding = require('@chainsafe/blst-linux-x64-gnu') + } + } catch (e) { + loadError = e + } + } + break + case 'arm64': + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, 'blst.linux-arm64-musl.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.linux-arm64-musl.node') + } else { + nativeBinding = require('@chainsafe/blst-linux-arm64-musl') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync( + join(__dirname, 'blst.linux-arm64-gnu.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.linux-arm64-gnu.node') + } else { + nativeBinding = require('@chainsafe/blst-linux-arm64-gnu') + } + } catch (e) { + loadError = e + } + } + break + case 'arm': + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, 'blst.linux-arm-musleabihf.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.linux-arm-musleabihf.node') + } else { + nativeBinding = require('@chainsafe/blst-linux-arm-musleabihf') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync( + join(__dirname, 'blst.linux-arm-gnueabihf.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.linux-arm-gnueabihf.node') + } else { + nativeBinding = require('@chainsafe/blst-linux-arm-gnueabihf') + } + } catch (e) { + loadError = e + } + } + break + case 'riscv64': + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, 'blst.linux-riscv64-musl.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.linux-riscv64-musl.node') + } else { + nativeBinding = require('@chainsafe/blst-linux-riscv64-musl') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync( + join(__dirname, 'blst.linux-riscv64-gnu.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.linux-riscv64-gnu.node') + } else { + nativeBinding = require('@chainsafe/blst-linux-riscv64-gnu') + } + } catch (e) { + loadError = e + } + } + break + case 's390x': + localFileExisted = existsSync( + join(__dirname, 'blst.linux-s390x-gnu.node') + ) + try { + if (localFileExisted) { + nativeBinding = require('./blst.linux-s390x-gnu.node') + } else { + nativeBinding = require('@chainsafe/blst-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 { SECRET_KEY_LENGTH, PUBLIC_KEY_LENGTH_COMPRESSED, PUBLIC_KEY_LENGTH_UNCOMPRESSED, SIGNATURE_LENGTH_COMPRESSED, SIGNATURE_LENGTH_UNCOMPRESSED, SecretKey, PublicKey, Signature, aggregatePublicKeys, aggregateSignatures, aggregateSerializedPublicKeys, aggregateSerializedSignatures, aggregateWithRandomness, verify, aggregateVerify, fastAggregateVerify, verifyMultipleAggregateSignatures } = nativeBinding + +module.exports.SECRET_KEY_LENGTH = SECRET_KEY_LENGTH +module.exports.PUBLIC_KEY_LENGTH_COMPRESSED = PUBLIC_KEY_LENGTH_COMPRESSED +module.exports.PUBLIC_KEY_LENGTH_UNCOMPRESSED = PUBLIC_KEY_LENGTH_UNCOMPRESSED +module.exports.SIGNATURE_LENGTH_COMPRESSED = SIGNATURE_LENGTH_COMPRESSED +module.exports.SIGNATURE_LENGTH_UNCOMPRESSED = SIGNATURE_LENGTH_UNCOMPRESSED +module.exports.SecretKey = SecretKey +module.exports.PublicKey = PublicKey +module.exports.Signature = Signature +module.exports.aggregatePublicKeys = aggregatePublicKeys +module.exports.aggregateSignatures = aggregateSignatures +module.exports.aggregateSerializedPublicKeys = aggregateSerializedPublicKeys +module.exports.aggregateSerializedSignatures = aggregateSerializedSignatures +module.exports.aggregateWithRandomness = aggregateWithRandomness +module.exports.verify = verify +module.exports.aggregateVerify = aggregateVerify +module.exports.fastAggregateVerify = fastAggregateVerify +module.exports.verifyMultipleAggregateSignatures = verifyMultipleAggregateSignatures diff --git a/lib/bindings.ts b/lib/bindings.ts deleted file mode 100644 index ccf98d40..00000000 --- a/lib/bindings.ts +++ /dev/null @@ -1,116 +0,0 @@ -import {randomBytes} from "node:crypto"; -import type { - CoordType, - BLST_CONSTANTS, - SecretKey, - PublicKey, - Signature, - aggregatePublicKeys, - aggregateSignatures, - aggregateWithRandomness, - asyncAggregateWithRandomness, - verify, - asyncVerify, - aggregateVerify, - asyncAggregateVerify, - fastAggregateVerify, - asyncFastAggregateVerify, - verifyMultipleAggregateSignatures, - asyncVerifyMultipleAggregateSignatures, - randomBytesNonZero, -} from "./index.d"; - -export interface BlstTsAddon { - BLST_CONSTANTS: typeof BLST_CONSTANTS; - SecretKey: typeof SecretKey; - PublicKey: typeof PublicKey; - Signature: typeof Signature; - aggregatePublicKeys: typeof aggregatePublicKeys; - aggregateSignatures: typeof aggregateSignatures; - aggregateWithRandomness: typeof aggregateWithRandomness; - asyncAggregateWithRandomness: typeof asyncAggregateWithRandomness; - aggregateVerify: typeof aggregateVerify; - asyncAggregateVerify: typeof asyncAggregateVerify; - verifyMultipleAggregateSignatures: typeof verifyMultipleAggregateSignatures; - asyncVerifyMultipleAggregateSignatures: typeof asyncVerifyMultipleAggregateSignatures; -} - -export interface BlstTs { - BLST_CONSTANTS: typeof BLST_CONSTANTS; - CoordType: typeof CoordType; - SecretKey: typeof SecretKey; - PublicKey: typeof PublicKey; - Signature: typeof Signature; - aggregatePublicKeys: typeof aggregatePublicKeys; - aggregateSignatures: typeof aggregateSignatures; - aggregateWithRandomness: typeof aggregateWithRandomness; - asyncAggregateWithRandomness: typeof asyncAggregateWithRandomness; - aggregateVerify: typeof aggregateVerify; - asyncAggregateVerify: typeof asyncAggregateVerify; - verifyMultipleAggregateSignatures: typeof verifyMultipleAggregateSignatures; - asyncVerifyMultipleAggregateSignatures: typeof asyncVerifyMultipleAggregateSignatures; - verify: typeof verify; - asyncVerify: typeof asyncVerify; - fastAggregateVerify: typeof fastAggregateVerify; - asyncFastAggregateVerify: typeof asyncFastAggregateVerify; - randomBytesNonZero: typeof randomBytesNonZero; -} - -export function prepareBindings(bindings: BlstTsAddon): BlstTs { - bindings.SecretKey.prototype.toHex = function toHex() { - const uint8 = this.serialize(); - return `0x${Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength).toString("hex")}`; - }; - - bindings.PublicKey.prototype.toHex = function toHex(compress) { - const uint8 = this.serialize(compress); - return `0x${Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength).toString("hex")}`; - }; - - bindings.Signature.prototype.toHex = function toHex(compress) { - const uint8 = this.serialize(compress); - return `0x${Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength).toString("hex")}`; - }; - - return { - ...bindings, - CoordType: { - affine: 0, - jacobian: 1, - }, - randomBytesNonZero(bytesCount) { - const rand = randomBytes(bytesCount); - for (let i = 0; i < bytesCount; i++) { - if (rand[i] !== 0) return rand; - } - rand[0] = 1; - return rand; - }, - verify(message, publicKey, signature) { - return bindings.aggregateVerify([message], [publicKey], signature); - }, - asyncVerify(message, publicKey, signature) { - return bindings.asyncAggregateVerify([message], [publicKey], signature); - }, - fastAggregateVerify(message, publicKeys, signature) { - let key; - try { - // this throws for invalid key, catch and return false - key = bindings.aggregatePublicKeys(publicKeys); - } catch { - return false; - } - return bindings.aggregateVerify([message], [key], signature); - }, - asyncFastAggregateVerify(message, publicKeys, signature) { - let key; - try { - // this throws for invalid key, catch and return false - key = bindings.aggregatePublicKeys(publicKeys); - } catch { - return Promise.resolve(false); - } - return bindings.asyncAggregateVerify([message], [key], signature); - }, - }; -} diff --git a/lib/index.d.ts b/lib/index.d.ts deleted file mode 100644 index 3da698aa..00000000 --- a/lib/index.d.ts +++ /dev/null @@ -1,323 +0,0 @@ -/** - * Points are represented in two ways in BLST: - * - affine coordinates (x,y) - * - jacobian coordinates (x,y,z) - * - * The jacobian coordinates allow to aggregate points more efficiently, - * so if P1 points are aggregated often (Eth2.0) you want to keep the point - * cached in jacobian coordinates. - */ -export enum CoordType { - affine, - jacobian, -} - -/** - * Critical constants for BLST public key infrastructure. Values are declared - * and used in native C++ code. Exported to ensure consistency between - * environments. - */ -export const BLST_CONSTANTS: { - DST: string; - SECRET_KEY_LENGTH: number; - PUBLIC_KEY_LENGTH_UNCOMPRESSED: number; - PUBLIC_KEY_LENGTH_COMPRESSED: number; - SIGNATURE_LENGTH_UNCOMPRESSED: number; - SIGNATURE_LENGTH_COMPRESSED: number; -}; - -/** - * Buffers in blst-ts should be passed as Uint8Array or a child class like Buffer - */ -export type BlstBuffer = Uint8Array; - -/** - * It is possible to pass PublicKeys to the library as either serialized - * Uint8Array or deserialized PublicKey objects - */ -export type PublicKeyArg = BlstBuffer | PublicKey; - -/** - * It is possible to pass Signatures to the library as either serialized - * Uint8Array or deserialized Signature objects - */ -export type SignatureArg = BlstBuffer | Signature; - -/** - * A set for verification including the message to be verified, in BlstBuffer - * format, the SignatureArg and the corresponding PublicKeyArg for the SecretKey - * that generated the signature - */ -export interface SignatureSet { - message: BlstBuffer; - publicKey: PublicKeyArg; - signature: SignatureArg; -} - -/** - * All BlsTs objects implement the Serializable interface - */ -export interface Serializable { - serialize(): Uint8Array; - toHex(): string; -} - -/* - * Private constructor. Randomly generate ikm when new'ing a key if no - * ikm is provided. - * - * Use static methods `SecretKey.deserialize`, `SecretKey.fromKeygen` or - * `SecretKey.fromKeygenSync` to generate `SecretKey`s from your own material - * (ie serialized key or ikm). See notes on `SecretKey.fromKeygen` for important - * security considerations. - * - * example: - * ```typescript - * const ikm = UintArray8.from(Buffer.from("your very own ikm")); - * const keyInfo = "Some key info"; - * const key: SecretKey = SecretKey.fromKeygen(ikm, keyInfo); - * - * key = SecretKey.fromBytes(key.serialize()); - * ``` - */ -export class SecretKey implements Serializable { - private constructor(); - /** - * Convert a serialized secret key into a SecretKey object. - */ - static deserialize(skBytes: BlstBuffer): SecretKey; - /** - * `fromKeygen` takes two parameters. The first parameter is a salt and is - * required. IKM MUST be at least 32 bytes long, but it MAY be longer. The - * second parameter, info, is optional and may be used to derive multiple - * independent keys from the same IKM. By default, info is the empty string. - */ - static fromKeygen(ikm: BlstBuffer, info?: string): SecretKey; - /** - * Serialize a secret key into a Buffer. - */ - serialize(): Uint8Array; - toHex(): string; - toPublicKey(): PublicKey; - sign(msg: BlstBuffer): Signature; -} - -export class PublicKey implements Serializable { - private constructor(); - /** - * Convert a serialized public key into a PublicKey object. - */ - static deserialize(pkBytes: BlstBuffer, coordType?: CoordType): PublicKey; - serialize(compress?: boolean): Uint8Array; - toHex(compress?: boolean): string; - keyValidate(): void; - isInfinity(): boolean; - multiplyBy(randomBytes: BlstBuffer): PublicKey; -} - -export class Signature implements Serializable { - private constructor(); - /** - * Convert a serialized signature into a Signature object. - */ - static deserialize(sigBytes: BlstBuffer, coordType?: CoordType): Signature; - serialize(compress?: boolean): Uint8Array; - toHex(compress?: boolean): string; - sigValidate(): void; - isInfinity(): boolean; - multiplyBy(randomBytes: BlstBuffer): Signature; -} - -/** - * Aggregates an array of PublicKeyArgs. Can pass mixed deserialized PublicKey - * objects and serialized Uint8Array in the `keys` array. Passing serialized - * objects requires deserialization of the blst::P1 - * - * @param {PublicKeyArg} keys - Array of public keys to aggregate - * - * @return {PublicKey} - Aggregated jacobian public key - * - * @throw {TypeError} - Invalid input - * @throw {Error} - Invalid aggregation - */ -export function aggregatePublicKeys(keys: PublicKeyArg[]): PublicKey; - -/** - * Aggregates an array of SignatureArgs. Can pass mixed deserialized Signature - * objects and serialized Uint8Array in the `signatures` array. Passing serialized - * objects requires deserialization of the blst::P2 - * - * @param {SignatureArg} signatures - Array of signatures to aggregate - * - * @return {Signature} - Aggregated jacobian signature - * - * @throw {TypeError} - Invalid input - * @throw {Error} - Invalid aggregation - */ -export function aggregateSignatures(signatures: SignatureArg[]): Signature; - -/** - * Aggregates an array of signatures and keys with added randomness for security. - * Signatures must all be over the same message for the resulting publicKey and - * signature to pass verification. Allows for the option to validate serialized - * objects that get passed to the aggregation prior to adding the randomness. - * `validateSerialized` defaults to `true` for security reasons. - * - * Note that `validateSerialized` only checks for serialized objects passed in - * the sets. For deserialized you must manually run `key.keyValidate()` or - * `sig.sigValidate()` prior to passing them into the aggregation. - */ -export function aggregateWithRandomness( - sets: {publicKey: PublicKey; signature: Uint8Array}[], - validateSignature?: boolean -): { - publicKey: PublicKey; - signature: Signature; -}; - -/** - * Aggregates an array of signatures and keys with added randomness for security. - * Signatures must all be over the same message for the resulting publicKey and - * signature to pass verification. Allows for the option to validate serialized - * objects that get passed to the aggregation prior to adding the randomness. - * `validateSerialized` defaults to `true` for security reasons. - * - * Note that `validateSerialized` only checks for serialized objects passed in - * the sets. For deserialized you must manually run `key.keyValidate()` or - * `sig.sigValidate()` prior to passing them into the aggregation. - */ -export function asyncAggregateWithRandomness( - sets: {publicKey: PublicKey; signature: Uint8Array}[], - validateSignature?: boolean -): Promise<{ - publicKey: PublicKey; - signature: Signature; -}>; - -/** - * Bls verification of a message against a public key and signature. - * - * @param {BlstBuffer} msg - Message to verify - * @param {PublicKeyArg} publicKey - Public key to verify against - * @param {SignatureArg} signature - Signature of the message - * - * @return {boolean} - True if the signature is valid, false otherwise - * - * @throw {TypeError} - Invalid input - */ -export function verify(message: BlstBuffer, publicKey: PublicKeyArg, signature: SignatureArg): boolean; - -/** - * Bls verification of a message against a public key and signature. - * - * @param {BlstBuffer} msg - Message to verify - * @param {PublicKeyArg} publicKey - Public key to verify against - * @param {SignatureArg} signature - Signature of the message - * - * @return {Promise} - True if the signature is valid, false otherwise - * - * @throw {TypeError} - Invalid input - */ -export function asyncVerify(message: BlstBuffer, publicKey: PublicKeyArg, signature: SignatureArg): Promise; - -/** - * Bls verification of a set of messages, with corresponding public keys, and a single - * aggregated signature. - * - * @param {BlstBuffer} msgs - Messages to verify - * @param {PublicKeyArg} publicKeys - Corresponding public keys to verify against - * @param {SignatureArg} signature - Aggregated signature of the message - * - * @return {boolean} - True if the signature is valid, false otherwise - * - * @throw {TypeError} - Invalid input - * @throw {Error} - Invalid aggregation - */ -export function aggregateVerify(msgs: BlstBuffer[], publicKeys: PublicKeyArg[], signature: SignatureArg): boolean; - -/** - * Bls verification of a set of messages, with corresponding public keys, and a single - * aggregated signature. - * - * @param {BlstBuffer} msgs - Messages to verify - * @param {PublicKeyArg} publicKeys - Corresponding public keys to verify against - * @param {SignatureArg} signature - Aggregated signature of the message - * - * @return {Promise} - True if the signature is valid, false otherwise - * - * @throw {TypeError} - Invalid input - * @throw {Error} - Invalid aggregation - */ -export function asyncAggregateVerify( - msg: BlstBuffer[], - publicKey: PublicKeyArg[], - signature: SignatureArg -): Promise; - -/** - * Bls verification of a message against a set of public keys and an aggregated signature. - * - * @param {BlstBuffer} msg - Message to verify - * @param {PublicKeyArg} publicKeys - Public keys to aggregate and verify against - * @param {SignatureArg} signature - Aggregated signature of the message - * - * @return {boolean} - True if the signature is valid, false otherwise - * - * @throw {TypeError} - Invalid input - * @throw {Error} - Invalid aggregation - */ -export function fastAggregateVerify(message: BlstBuffer, publicKeys: PublicKeyArg[], signature: SignatureArg): boolean; - -/** - * Bls verification of a message against a set of public keys and an aggregated signature. - * - * @param {BlstBuffer} msg - Message to verify - * @param {PublicKeyArg} publicKeys - Public keys to aggregate and verify against - * @param {SignatureArg} signature - Aggregated signature of the message - * - * @return {Promise} - True if the signature is valid, false otherwise - * - * @throw {TypeError} - Invalid input - * @throw {Error} - Invalid aggregation - */ -export function asyncFastAggregateVerify( - message: BlstBuffer, - publicKeys: PublicKeyArg[], - signature: SignatureArg -): Promise; - -/** - * Bls batch verification for groups with a message and corresponding public key - * and signature. Only returns true if all signatures are valid. - * - * @param {SignatureSet} signatureSets - Array of SignatureSet objects to batch verify - * - * @return {boolean} - True if all signatures are valid, false otherwise - * - * @throw {TypeError} - Invalid input - * @throw {Error} - Invalid aggregation - */ -export function verifyMultipleAggregateSignatures(signatureSets: SignatureSet[]): boolean; - -/** - * Bls batch verification for groups with a message and corresponding public key - * and signature. Only returns true if all signatures are valid. - * - * @param {SignatureSet} signatureSets - Array of SignatureSet objects to batch verify - * - * @return {Promise} - True if all signatures are valid, false otherwise - * - * @throw {TypeError} - Invalid input - * @throw {Error} - Invalid aggregation - */ -export function asyncVerifyMultipleAggregateSignatures(signatureSets: SignatureSet[]): Promise; - -/** - * `rand` must not be exactly zero. Otherwise it would allow the verification of invalid signatures - * See https://github.com/ChainSafe/blst-ts/issues/45 - * - * @param {number} bytesCount - Number of bytes to generate - * - * @return {Buffer} - Random bytes - */ -export function randomBytesNonZero(bytesCount: number): Buffer; diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 31f81912..00000000 --- a/lib/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable @typescript-eslint/no-require-imports */ -/* eslint-disable @typescript-eslint/no-var-requires */ -const {resolve} = require("node:path"); -const {prepareBindings} = require("./bindings"); -const {getBindingsPath} = require("../utils"); - -/** - * Need to support testing and productions environments. Prod is the first case - * where the entrance file is PACKAGE_ROOT/dist/cjs/lib/index.js. In the - * bundled case the bindings file is copied/built to PACKAGE_ROOT/prebuild. For - * testing (not fuzz tests) the entrance file is REPO_ROOT/lib/index.js and the - * bindings file is built/copied to REPO_ROOT/prebuild. For fuzz testing the - * entrance file is in REPO_ROOT/fuzz-test/lib/index.js and the bindings file - * does not get copied and is still in REPO_ROOT/prebuild. - */ -const rootDir = __dirname.endsWith("dist/cjs/lib") - ? resolve(__dirname, "..", "..", "..") - : __dirname.includes("fuzz-tests") - ? resolve(__dirname, "..", "..") - : resolve(__dirname, ".."); -const bindingsPath = getBindingsPath(rootDir); - -module.exports = prepareBindings(require(bindingsPath)); diff --git a/lib/index.mjs b/lib/index.mjs deleted file mode 100644 index 578aa859..00000000 --- a/lib/index.mjs +++ /dev/null @@ -1,50 +0,0 @@ -import {fileURLToPath} from "node:url"; -import {createRequire} from "node:module"; -import {resolve, dirname} from "node:path"; -import {prepareBindings} from "./bindings.js"; -import {getBindingsPath} from "../utils/index.js"; - -const require = createRequire(import.meta.url); -const __dirname = dirname(fileURLToPath(import.meta.url)); -const bindingsPath = getBindingsPath(resolve(__dirname, "..", "..", "..")); -const blstTs = prepareBindings(require(bindingsPath)); - -export default blstTs; - -const { - BLST_CONSTANTS, - CoordType, - SecretKey, - PublicKey, - Signature, - aggregatePublicKeys, - aggregateSignatures, - aggregateVerify, - asyncAggregateVerify, - asyncFastAggregateVerify, - asyncVerify, - asyncVerifyMultipleAggregateSignatures, - fastAggregateVerify, - randomBytesNonZero, - verify, - verifyMultipleAggregateSignatures, -} = blstTs; - -export { - BLST_CONSTANTS, - CoordType, - SecretKey, - PublicKey, - Signature, - aggregatePublicKeys, - aggregateSignatures, - aggregateVerify, - asyncAggregateVerify, - asyncFastAggregateVerify, - asyncVerify, - asyncVerifyMultipleAggregateSignatures, - fastAggregateVerify, - randomBytesNonZero, - verify, - verifyMultipleAggregateSignatures, -}; diff --git a/npm/darwin-arm64/README.md b/npm/darwin-arm64/README.md new file mode 100644 index 00000000..2a749054 --- /dev/null +++ b/npm/darwin-arm64/README.md @@ -0,0 +1,3 @@ +# `@chainsafe/blst-darwin-arm64` + +This is the **aarch64-apple-darwin** binary for `@chainsafe/blst` diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json new file mode 100644 index 00000000..d20c9eb1 --- /dev/null +++ b/npm/darwin-arm64/package.json @@ -0,0 +1,18 @@ +{ + "name": "@chainsafe/blst-darwin-arm64", + "version": "2.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "blst.darwin-arm64.node", + "files": [ + "blst.darwin-arm64.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 00000000..bb67c301 --- /dev/null +++ b/npm/darwin-x64/README.md @@ -0,0 +1,3 @@ +# `@chainsafe/blst-darwin-x64` + +This is the **x86_64-apple-darwin** binary for `@chainsafe/blst` diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json new file mode 100644 index 00000000..65effb2e --- /dev/null +++ b/npm/darwin-x64/package.json @@ -0,0 +1,18 @@ +{ + "name": "@chainsafe/blst-darwin-x64", + "version": "2.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "blst.darwin-x64.node", + "files": [ + "blst.darwin-x64.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 00000000..d2d791b7 --- /dev/null +++ b/npm/linux-arm64-gnu/README.md @@ -0,0 +1,3 @@ +# `@chainsafe/blst-linux-arm64-gnu` + +This is the **aarch64-unknown-linux-gnu** binary for `@chainsafe/blst` diff --git a/npm/linux-arm64-gnu/package.json b/npm/linux-arm64-gnu/package.json new file mode 100644 index 00000000..76a5e3db --- /dev/null +++ b/npm/linux-arm64-gnu/package.json @@ -0,0 +1,21 @@ +{ + "name": "@chainsafe/blst-linux-arm64-gnu", + "version": "2.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "blst.linux-arm64-gnu.node", + "files": [ + "blst.linux-arm64-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 00000000..03a17733 --- /dev/null +++ b/npm/linux-x64-gnu/README.md @@ -0,0 +1,3 @@ +# `@chainsafe/blst-linux-x64-gnu` + +This is the **x86_64-unknown-linux-gnu** binary for `@chainsafe/blst` diff --git a/npm/linux-x64-gnu/package.json b/npm/linux-x64-gnu/package.json new file mode 100644 index 00000000..9372c981 --- /dev/null +++ b/npm/linux-x64-gnu/package.json @@ -0,0 +1,21 @@ +{ + "name": "@chainsafe/blst-linux-x64-gnu", + "version": "2.0.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "blst.linux-x64-gnu.node", + "files": [ + "blst.linux-x64-gnu.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ] +} \ 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 00000000..bdfb01de --- /dev/null +++ b/npm/win32-x64-msvc/README.md @@ -0,0 +1,3 @@ +# `@chainsafe/blst-win32-x64-msvc` + +This is the **x86_64-pc-windows-msvc** binary for `@chainsafe/blst` diff --git a/npm/win32-x64-msvc/package.json b/npm/win32-x64-msvc/package.json new file mode 100644 index 00000000..04d1b502 --- /dev/null +++ b/npm/win32-x64-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "@chainsafe/blst-win32-x64-msvc", + "version": "2.0.0", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "blst.win32-x64-msvc.node", + "files": [ + "blst.win32-x64-msvc.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/package.json b/package.json index 38f30bd6..69c204ce 100644 --- a/package.json +++ b/package.json @@ -1,93 +1,77 @@ { "name": "@chainsafe/blst", - "version": "1.1.0", + "version": "2.0.0", "description": "Typescript wrapper for supranational/blst native bindings, a highly performant BLS12-381 signature library", "scripts": { - "install": "ts-node scripts/install", - "clean": "npm run clean:dist && npm run clean:prebuild && npm run clean:gyp", - "clean:dist": "rm -rf dist", - "clean:gyp": "node-gyp clean && node-gyp configure", - "clean:prebuild": "rm -rf prebuild", - "build": "yarn build:gyp && yarn build:ts", - "build:gyp": "node-gyp build", - "build:gyp:debug": "node-gyp build --debug", - "build:ts:cjs": "tsc --project tsconfig.cjs.json", - "build:ts:esm": "tsc --project tsconfig.esm.json", - "build:ts": "yarn build:ts:cjs && yarn build:ts:esm", - "postbuild:ts": "ts-node scripts/prepareDist", + "artifacts": "napi artifacts", + "build": "napi build --platform --release", + "build:debug": "napi build --platform", "build:fuzz": "tsc --project tsconfig.fuzz.json", - "build:clean": "npm run clean && npm run install && npm run build:ts", - "dev": "ts-node scripts/dev", - "lint": "npm run lint:c && npm run lint:ts", - "lint:c": "clang-format -i src/*.cc src/*.h", - "lint:ts": "eslint --color --ext .js,.mjs,.cjs,.ts lib/ scripts/ test/ utils/", - "test": "yarn test:unit && yarn test:spec && yarn test:perf && yarn test:memory", + "postbuild:fuzz": "cp *.node fuzz-tests", + "clean": "rimraf target cargo.lock *.node", + "download-spec-tests": "node -r ts-node/register test/spec/downloadTests.ts", + "lint": "npm run lint:rs && npm run lint:ts", + "lint:rs": "cargo fmt --check", + "lint:ts": "eslint --color --ext .js,.mjs,.cjs,.ts test/", + "prepublishOnly": "napi prepublish -t npm", + "test": "yarn test:unit && yarn test:spec", "test:fuzz": "ts-node test/fuzz/fuzz.test.ts", "test:memory": "node -r ts-node/register --expose-gc test/memory/memory.test.ts", - "test:perf": "UV_THREADPOOL_SIZE=$(node -e 'console.log(require(`os`).availableParallelism())') NODE_OPTIONS='--loader=ts-node/esm' ts-node-esm node_modules/.bin/benchmark --config .benchrc.yaml test/perf/*.test.ts", + "test:perf": "node -r ts-node/register node_modules/.bin/benchmark --config .benchrc.yaml test/perf/*.test.ts", "test:spec": "mocha test/spec/**/*.test.ts", "test:unit": "mocha test/unit/**/*.test.ts", - "download-spec-tests": "node -r ts-node/register test/spec/downloadTests.ts" + "universal": "napi universal", + "version": "napi version" }, - "dependencies": { - "node-addon-api": "^6.1.0", - "node-gyp": "^10.0.1", - "ts-node": "^10.9.2" + "main": "index.js", + "type": "commonjs", + "types": "index.d.ts", + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "bls", + "bls12-381", + "blst", + "crypto", + "ethereum", + "napi" + ], + "napi": { + "name": "blst", + "triples": { + "additional": [ + "aarch64-apple-darwin", + "aarch64-unknown-linux-gnu" + ] + } }, + "license": "Apache-2.0", "devDependencies": { "@dapplion/benchmark": "^0.2.4", - "@types/chai": "^4.2.13", - "@types/js-yaml": "^4.0.5", - "@types/mocha": "^8.0.3", - "@types/node": "^20.10.4", - "@types/tar": "^6.1.4", - "@typescript-eslint/eslint-plugin": "^6.14.0", - "@typescript-eslint/parser": "^6.14.0", - "chai": "^4.2.0", - "eslint": "^8.55.0", - "eslint-plugin-import": "^2.29.0", + "@napi-rs/cli": "^2.18.3", + "@types/chai": "^4.3.16", + "@types/js-yaml": "^4.0.9", + "@types/mocha": "^10.0.7", + "@types/node": "^20.14.9", + "@types/tar": "^6.1.13", + "@typescript-eslint/eslint-plugin": "^7.15.0", + "@typescript-eslint/parser": "^7.15.0", + "chai": "^4.3.4", + "eslint": "^8.57.0", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^5.0.1", + "eslint-plugin-prettier": "^5.1.3", "js-yaml": "^4.1.0", - "mocha": "^8.1.3", - "prettier": "^3.1.1", - "tar": "^6.1.14", - "typescript": "^5.2.2" - }, - "main": "./dist/cjs/lib/index.cjs", - "types": "./dist/cjs/lib/index.d.cts", - "module": "./dist/esm/lib/index.mjs", - "exports": { - "require": "./dist/cjs/lib/index.cjs", - "import": "./dist/esm/lib/index.mjs", - "default": "./dist/cjs/lib/index.cjs", - "types": "./dist/cjs/lib/index.d.cts" - }, - "files": [ - "blst/bindings/blst_aux.h", - "blst/bindings/blst.h", - "blst/bindings/blst.hpp", - "blst/build", - "blst/src", - "dist", - "prebuild", - "scripts/install.ts", - "src", - "utils", - "binding.gyp", - "LICENSE", - "package.json", - "tsconfig.json" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/ChainSafe/blst-ts.git" - }, - "keywords": [], - "author": "ChainSafe Systems", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/ChainSafe/blst-ts/issues" + "mocha": "^8.3.2", + "prettier": "^3.3.2", + "rimraf": "^5.0.8", + "tar": "^7.4.0", + "ts-node": "^9.1.1", + "typescript": "^5.5.3" }, - "homepage": "https://github.com/ChainSafe/blst-ts#readme" + "engines": { + "node": ">= 16" + } } diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 00000000..cab5731e --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,2 @@ +tab_spaces = 2 +edition = "2021" diff --git a/scripts/dev.ts b/scripts/dev.ts deleted file mode 100644 index 0fd7f46e..00000000 --- a/scripts/dev.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* eslint-disable no-console */ -import fs from "fs"; -import {resolve} from "path"; -import {watchWithCallback} from "./watch"; -import {exec} from "../utils"; - -const DEBOUNCE_TIME = 500; -const testCommand = "npm run test:unit && npm run test:spec"; -const buildCommand = "npm run build:gyp:debug"; - -const ROOT_FOLDER = resolve(__dirname, ".."); -const SRC_FOLDER = resolve(ROOT_FOLDER, "src"); -const TESTS_FOLDER = resolve(ROOT_FOLDER, "test"); - -// make sure code is using most recently built bindings -try { - fs.rmdirSync(resolve(ROOT_FOLDER, "prebuild")); -} catch { - /* no-op, doesn't exist */ -} - -/** - * Builds addon and then starts watch. - * Watches src/addon folder and rerun compile on file changes - */ -void watchWithCallback({ - path: SRC_FOLDER, - debounceTime: DEBOUNCE_TIME, - cb: () => - exec(buildCommand, false) - .then(console.log) - // timeout set if undefined behavior creeps in. keeps from hung tests - .then(() => exec(testCommand, false, {timeout: 20 * 1000})) - .then(console.log) - .catch(console.error), -}); - -void watchWithCallback({ - path: TESTS_FOLDER, - debounceTime: DEBOUNCE_TIME, - cb: () => exec(testCommand, false).then(console.log).catch(console.error), -}); diff --git a/scripts/install.ts b/scripts/install.ts deleted file mode 100644 index a0eb529c..00000000 --- a/scripts/install.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* eslint-disable no-extra-boolean-cast */ -/* eslint-disable no-console */ -import {resolve} from "path"; -import {Readable} from "stream"; -import {finished} from "stream/promises"; -import {ReadableStream} from "stream/web"; -import {execSync} from "child_process"; -import {copyFileSync, createWriteStream, existsSync, mkdirSync} from "fs"; -import {getBinaryName, getBindingsPath} from "../utils"; - -const ROOT_DIR = resolve(__dirname, ".."); -const PREBUILD_DIR = resolve(ROOT_DIR, "prebuild"); - -// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -const VERSION: string = require(resolve(ROOT_DIR, "package.json")).version; - -// CLI runner and entrance for this file when called by npm/yarn -install().then( - () => process.exit(0), - (e) => { - console.error(e); - process.exit(1); - } -); - -/** - * Loading prebuilt bindings may fail in any number of unhappy ways, including a - * segfault. We use child processes to catch these unrecoverable process-level - * errors and continue the installation process - */ -async function testBindings(binaryPath: string): Promise { - execSync(`node -e 'require("${binaryPath}")'`); -} - -function getPrebuiltBinaryPath(binaryName: string): string { - return resolve(PREBUILD_DIR, binaryName); -} - -function getReleaseUrl(binaryName: string): string { - return `https://github.com/ChainSafe/blst-ts/releases/download/v${VERSION}/${binaryName}`; -} - -/** - * Download bindings from GitHub release - */ -async function downloadBindings(binaryName: string): Promise { - const {body, status} = await fetch(getReleaseUrl(binaryName)); - - if (!body || status >= 400) { - throw new Error("Failed to download bindings"); - } - - if (!existsSync(PREBUILD_DIR)) { - mkdirSync(PREBUILD_DIR, {recursive: true}); - } - - const outputPath = getPrebuiltBinaryPath(binaryName); - - await finished(Readable.fromWeb(body as ReadableStream).pipe(createWriteStream(outputPath))); - - return outputPath; -} - -async function buildBindings(binaryName: string): Promise { - execSync("npm run clean:gyp", {cwd: ROOT_DIR}); - execSync("npm run build:gyp", {cwd: ROOT_DIR}); - const bindingPath = getBindingsPath(ROOT_DIR); - - if (!existsSync(PREBUILD_DIR)) { - mkdirSync(PREBUILD_DIR, {recursive: true}); - } - - const outputPath = getPrebuiltBinaryPath(binaryName); - copyFileSync(bindingPath, outputPath); - return outputPath; -} - -async function install(): Promise { - const binaryName = getBinaryName(); - let binaryPath: string | undefined = getPrebuiltBinaryPath(binaryName); - - if (!(Boolean(process.env.CI) || Boolean(process.env.BLST_TS_FORCE_BUILD))) { - // Check if bindings already bundled, downloaded or built - if (existsSync(binaryPath)) { - console.log(`Found prebuilt bindings at ${binaryPath}`); - try { - await testBindings(binaryPath); - return; - } catch { - console.log("Prebuilt and bundled bindings failed to load. Attempting to download."); - } - } - - // Fetch pre-built bindings from remote repo - try { - binaryPath = await downloadBindings(binaryName); - } catch { - /* no-op */ - } - - if (existsSync(binaryPath)) { - console.log(`Downloaded github release bindings to ${binaryPath}`); - try { - await testBindings(binaryPath); - return; - } catch { - console.log("Downloaded bindings failed to load. Attempting to build."); - } - } - } - - // Build bindings locally from source - binaryPath = await buildBindings(binaryPath); - if (!existsSync(binaryPath)) { - throw new Error("Error building blst-ts binary. No fallback available"); - } - - try { - await testBindings(binaryPath); - console.log(`Successfully built bindings to ${binaryPath}`); - } catch { - throw new Error("Locally built bindings failed to load. No fallback available"); - } -} diff --git a/scripts/makeRelease.ts b/scripts/makeRelease.ts deleted file mode 100644 index 2bac04a0..00000000 --- a/scripts/makeRelease.ts +++ /dev/null @@ -1,22 +0,0 @@ -import {resolve} from "path"; -import {mkdirSync, cpSync, readdirSync, rmSync} from "fs"; -import {BINDINGS_FILE} from "../utils"; - -const RELEASE_FOLDER = resolve(__dirname, "..", "release"); -const PREBUILD_FOLDER = resolve(__dirname, "..", "prebuild"); - -mkdirSync(RELEASE_FOLDER); -/** - * Reads through the files in the PREBUILD_FOLDER. Copies all to the - * RELEASE_FOLDER and then deletes the ones that are not slated for publishing - * to npm. Only the currently supported version of node that lodestar uses - * is included in the npm tarball. The rest of the consumers will pull from - * ths github release or have to build locally. - */ -for (const binding of readdirSync(PREBUILD_FOLDER)) { - const prebuiltPath = resolve(PREBUILD_FOLDER, binding); - cpSync(prebuiltPath, resolve(RELEASE_FOLDER, binding)); - if (!binding.endsWith(`-${process.versions.modules}-${BINDINGS_FILE}`)) { - rmSync(prebuiltPath, {force: true}); - } -} diff --git a/scripts/prepareDist.ts b/scripts/prepareDist.ts deleted file mode 100644 index 5b78031f..00000000 --- a/scripts/prepareDist.ts +++ /dev/null @@ -1,43 +0,0 @@ -import {resolve} from "node:path"; -import {existsSync, renameSync, cpSync, readFileSync, writeFileSync} from "node:fs"; - -const TYPES = resolve(__dirname, "..", "lib", "index.d.ts"); -const DIST = resolve(__dirname, "..", "dist"); -const ESM_DIST = resolve(DIST, "esm"); -const CJS_DIST = resolve(DIST, "cjs"); - -(function prepareDist(): void { - if (!existsSync(DIST)) { - throw new Error("run yarn build:ts to build dist"); - } - if (!existsSync(ESM_DIST)) { - throw new Error("run yarn build:ts:esm to build dist/esm"); - } - if (!existsSync(CJS_DIST)) { - throw new Error("run yarn build:ts to build dist/cjs"); - } - - cpSync(TYPES, resolve(ESM_DIST, "lib", "index.d.mts")); - cpSync(TYPES, resolve(CJS_DIST, "lib", "index.d.cts")); - - let cjsIndex = resolve(CJS_DIST, "lib", "index.js"); - const newCjsIndex = resolve(CJS_DIST, "lib", "index.cjs"); - if (existsSync(cjsIndex)) { - renameSync(cjsIndex, newCjsIndex); - } - cjsIndex = newCjsIndex; - const cjsIndexData = readFileSync(cjsIndex, "utf8").replace("index.js.map", "index.cjs.map"); - writeFileSync(cjsIndex, cjsIndexData); - - let cjsMapFile = resolve(CJS_DIST, "lib", "index.js.map"); - const newCjsMapFile = resolve(CJS_DIST, "lib", "index.cjs.map"); - if (existsSync(cjsMapFile)) { - renameSync(cjsMapFile, newCjsMapFile); - } - cjsMapFile = newCjsMapFile; - const mapFileData = readFileSync(cjsMapFile, "utf8").replace(/index.js/gi, "index.cjs"); - writeFileSync(cjsMapFile, mapFileData); - - writeFileSync(resolve(CJS_DIST, "package.json"), JSON.stringify({type: "commonjs"})); - writeFileSync(resolve(ESM_DIST, "package.json"), JSON.stringify({type: "module"})); -})(); diff --git a/scripts/watch.ts b/scripts/watch.ts deleted file mode 100644 index c7d2aac6..00000000 --- a/scripts/watch.ts +++ /dev/null @@ -1,146 +0,0 @@ -/* eslint-disable no-console */ -import fs from "fs"; -import {resolve} from "path"; -import {watch, WatchOptions} from "chokidar"; - -type WatchListener = ( - eventName: "add" | "addDir" | "change" | "unlink" | "unlinkDir", - path: string, - stats?: fs.Stats -) => void; - -interface WatchProps { - path: string; - opts?: WatchOptions; - waitUntilRead?: boolean; - consoleOnNoHandler?: boolean; - onAdd?: WatchListener; - onAddDir?: WatchListener; - onChange?: WatchListener; - onUnlink?: WatchListener; - onUnlinkDir?: WatchListener; -} - -export async function watchFolder({ - path, - opts, - consoleOnNoHandler = false, - onAdd, - onAddDir, - onChange, - onUnlink, - onUnlinkDir, -}: WatchProps): Promise { - const defaultHandler = (event: string, filename: string): void => { - if (consoleOnNoHandler) { - console.log(`default handler for ${event} ${filename}`); - } - }; - - const watcher = watch(path, opts); - watcher.on("all", (event, filepath) => { - switch (event) { - case "add": - console.log(`file added: ${filepath}`); - return onAdd ? onAdd(event, filepath) : defaultHandler(event, filepath); - case "addDir": - console.log(`dir added: ${filepath}`); - return onAddDir ? onAddDir(event, filepath) : defaultHandler(event, filepath); - case "change": - console.log(`file changed: ${filepath}`); - return onChange ? onChange(event, filepath) : defaultHandler(event, filepath); - case "unlink": - console.log(`file deleted: ${filepath}`); - return onUnlink ? onUnlink(event, filepath) : defaultHandler(event, filepath); - case "unlinkDir": - console.log(`dir deleted: ${filepath}`); - return onUnlinkDir ? onUnlinkDir(event, filepath) : defaultHandler(event, filepath); - default: - console.log(`watched file triggered event: ${filepath}`); - return defaultHandler(event, filepath); - } - }); -} - -export async function watchCopyFolder(source: string, target: string, opts?: WatchOptions): Promise { - function onChange(_: string, filepath: string): Promise { - const filename = filepath.replace(`${source}/`, ""); - return fs.promises.copyFile(filepath, resolve(target, filename)); - } - - function onAddDir(_: string, filepath: string): Promise { - const filename = filepath.replace(`${source}/`, ""); - return fs.promises.mkdir(resolve(target, filename)); - } - - function onUnlink(_: string, filepath: string): Promise { - const filename = filepath.replace(`${source}/`, ""); - return fs.promises.unlink(resolve(target, filename)).catch(() => { - console.log(`Could not delete ${filename}`); - }); - } - - function onUnlinkDir(_: string, filepath: string): Promise { - const filename = filepath.replace(`${source}/`, ""); - return fs.promises.rmdir(resolve(target, filename), {recursive: true}).catch(() => { - console.log(`Could not delete ${filename}`); - }); - } - - return watchFolder({ - path: source, - opts, - consoleOnNoHandler: true, - onChange, - onAdd: onChange, - onAddDir: onAddDir, - onUnlink, - onUnlinkDir, - }); -} - -export function debouncedCallback(timeout: number, cb: () => T): () => T | void { - let debounceTimeout: undefined | NodeJS.Timeout; - return function debounced(): T | void { - if (!debounceTimeout) { - debounceTimeout = setTimeout(() => { - if (debounceTimeout) { - clearTimeout(debounceTimeout); - } - debounceTimeout = undefined; - }, timeout); - return cb(); - } - }; -} - -function defaultOnWatchErr(err: unknown): void { - console.error(err); - process.exit(1); -} - -export function watchWithCallback({ - path, - debounceTime = 300, - cb, - onWatchErr = defaultOnWatchErr, -}: { - path: string; - debounceTime?: number; - cb: () => T; - onWatchErr?: (err: Error) => void; -}): T { - const _cb = debouncedCallback(debounceTime, cb); - const result = _cb() as T; - watchFolder({ - path: path, - onAdd: () => _cb(), - onChange: () => _cb(), - onUnlink: () => _cb(), - onUnlinkDir: () => _cb(), - onAddDir: () => { - /* no-op */ - }, - }).catch(onWatchErr); - return result; -} diff --git a/src/addon.cc b/src/addon.cc deleted file mode 100644 index 1be42ef1..00000000 --- a/src/addon.cc +++ /dev/null @@ -1,102 +0,0 @@ -#include "addon.h" - -namespace blst_ts { -bool is_zero_bytes( - const uint8_t *data, - const size_t starting_index, - const size_t byte_length) noexcept { - if (starting_index < byte_length) { - return std::all_of( - data + starting_index, data + byte_length, [](uint8_t x) { - return x == 0x00; - }); - } - return false; -} - -[[nodiscard]] std::optional is_valid_length( - size_t byte_length, size_t length1, size_t length2) noexcept { - if (byte_length == length1 || (length2 != 0 && byte_length == length2)) { - return std::nullopt; - } - std::string err_msg{" must be "}; - if (length1 != 0) { - err_msg.append(std::to_string(length1)); - }; - if (length2 != 0) { - if (length1 != 0) { - err_msg.append(" or "); - } - err_msg.append(std::to_string(length2)); - }; - err_msg.append(" bytes long"); - return err_msg; -} -} // namespace blst_ts - -BlstTsAddon::BlstTsAddon(Napi::Env env, Napi::Object exports) - : _blst_error_strings{ - "BLST_SUCCESS", - "BLST_ERROR::BLST_BAD_ENCODING", - "BLST_ERROR::BLST_POINT_NOT_ON_CURVE", - "BLST_ERROR::BLST_POINT_NOT_IN_GROUP", - "BLST_ERROR::BLST_AGGR_TYPE_MISMATCH", - "BLST_ERROR::BLST_VERIFY_FAIL", - "BLST_ERROR::BLST_PK_IS_INFINITY", - "BLST_ERROR::BLST_BAD_SCALAR", - }, - dst{"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_"} { - Napi::Object js_constants = Napi::Object::New(env); - js_constants.Set( - Napi::String::New(env, "DST"), Napi::String::New(env, dst)); - DefineAddon( - exports, - { - InstanceValue("BLST_CONSTANTS", js_constants, napi_enumerable), - }); - blst_ts::SecretKey::Init(env, exports, this); - blst_ts::PublicKey::Init(env, exports, this); - blst_ts::Signature::Init(env, exports, this); - blst_ts_functions::init(env, exports); - env.SetInstanceData(this); - - // Check that openssl PRNG is seeded - blst::byte seed{0}; - if (!this->GetRandomNonZeroBytes(&seed, 0)) { - Napi::Error::New( - env, "BLST_ERROR: Error seeding pseudo-random number generator") - .ThrowAsJavaScriptException(); - } -} - -std::string BlstTsAddon::GetBlstErrorString(const blst::BLST_ERROR &err) { - size_t err_index = static_cast(err); - // size of total array divided by size of one element minus 1 for 0 index - // basis - size_t max_index = - sizeof(_blst_error_strings) / sizeof(_blst_error_strings[0]) - 1; - if (err_index > max_index) { - return "BLST_ERROR::UNKNOWN_ERROR_CODE"; - } - return _blst_error_strings[err]; -} - -[[nodiscard]] bool BlstTsAddon::GetRandomNonZeroBytes( - blst::byte *bytes, size_t length) { - // [randomBytes](https://github.com/nodejs/node/blob/4166d40d0873b6d8a0c7291872c8d20dc680b1d7/lib/internal/crypto/random.js#L98) - // [RandomBytesJob](https://github.com/nodejs/node/blob/4166d40d0873b6d8a0c7291872c8d20dc680b1d7/lib/internal/crypto/random.js#L139) - // [RandomBytesTraits::DeriveBits](https://github.com/nodejs/node/blob/4166d40d0873b6d8a0c7291872c8d20dc680b1d7/src/crypto/crypto_random.cc#L65) - // [CSPRNG](https://github.com/nodejs/node/blob/4166d40d0873b6d8a0c7291872c8d20dc680b1d7/src/crypto/crypto_util.cc#L63) - do { - if ((1 == RAND_status()) && (1 == RAND_bytes(bytes, length))) { - if (blst_ts::is_zero_bytes(bytes, 0, length)) { - bytes[0] = 0x01; - } - return true; - } - } while (1 == RAND_poll()); - - return false; -} - -NODE_API_ADDON(BlstTsAddon) diff --git a/src/addon.h b/src/addon.h deleted file mode 100644 index 6b4de3f6..00000000 --- a/src/addon.h +++ /dev/null @@ -1,202 +0,0 @@ -#pragma once - -#include - -#include -#include -#include -#include -#include -#include - -#include "blst.hpp" -#include "napi.h" - -using namespace std::string_literals; - -namespace blst_ts { -#define BLST_TS_RANDOM_BYTES_LENGTH 8U - -#define BLST_TS_FUNCTION_PREAMBLE(info, env, module) \ - Napi::Env env = info.Env(); \ - Napi::EscapableHandleScope scope(env); \ - BlstTsAddon *module = env.GetInstanceData(); - -#define BLST_TS_SERIALIZE_POINT(snake_case_name) \ - Napi::Env env = info.Env(); \ - Napi::EscapableHandleScope scope(env); \ - bool compressed{true}; \ - if (!info[0].IsUndefined()) { \ - compressed = info[0].ToBoolean().Value(); \ - } \ - Napi::Uint8Array serialized = Napi::Uint8Array::New( \ - env, \ - compressed ? snake_case_name##_length_compressed \ - : snake_case_name##_length_uncompressed); \ - point->Serialize(compressed, serialized.Data()); \ - return scope.Escape(serialized); - -#define BLST_TS_UNWRAP_UINT_8_ARRAY(value_name, arr_name, js_name) \ - if (!value_name.IsTypedArray()) { \ - Napi::TypeError::New( \ - env, "BLST_ERROR: " js_name " must be a BlstBuffer") \ - .ThrowAsJavaScriptException(); \ - return env.Undefined(); \ - } \ - Napi::TypedArray arr_name##_array = value_name.As(); \ - if (arr_name##_array.TypedArrayType() != napi_uint8_array) { \ - Napi::TypeError::New( \ - env, "BLST_ERROR: " js_name " must be a BlstBuffer") \ - .ThrowAsJavaScriptException(); \ - return env.Undefined(); \ - } \ - Napi::Uint8Array arr_name = \ - arr_name##_array.As>(); - -#define BLST_TS_FUNCTION_UNWRAP_UINT_8_ARRAY(value_name, arr_name, js_name) \ - if (!value_name.IsTypedArray()) { \ - Napi::TypeError::New( \ - env, "BLST_ERROR: " js_name " must be a BlstBuffer") \ - .ThrowAsJavaScriptException(); \ - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; \ - } \ - Napi::TypedArray arr_name##_array = value_name.As(); \ - if (arr_name##_array.TypedArrayType() != napi_uint8_array) { \ - Napi::TypeError::New( \ - env, "BLST_ERROR: " js_name " must be a BlstBuffer") \ - .ThrowAsJavaScriptException(); \ - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; \ - } \ - Napi::Uint8Array arr_name = \ - arr_name##_array.As>(); - -typedef enum { Affine, Jacobian } CoordType; - -enum class BLST_TS_ERROR { - SUCCESS, - INVALID, - JS_ERROR_THROWN, - HAS_NATIVE_ERROR, -}; - -/** - * Checks if a specified range of bytes within a byte array consists only of - * zeros. - * - * @param data A pointer to the first element of the byte array to be checked. - * @param starting_index The offset (index) from the beginning of the array - * where the check should start. (0 starts at *data) - * @param byte_length The total length of the data array - * - * @return Returns true if all bytes from start_byte to the end of the array are - * zeros. Returns false if the starting offset is beyond the array length or if - * any byte in the specified range is not zero. - */ -bool is_zero_bytes( - const uint8_t *data, - const size_t start_byte, - const size_t byte_length) noexcept; - -/** - * Validates that a given byte length matches one of two specified lengths, - * returning an optional error message if the validation fails. - * - * @param byte_length The length to be validated against length1 and length2. - * @param length1 The first valid length that byte_length can be. A value of 0 - * is considered as not set and thus not compared. - * @param length2 The second valid length that byte_length can be. A value of 0 - * is considered as not set and thus not compared. - * - * @return An std::optional that contains an error message if - * byte_length does not match either length1 or (if length2 is not 0) length2. - * If byte_length is valid, std::nullopt is returned. The error message, if - * returned, specifies the valid lengths byte_length must match. - * - * @note If both length1 and length2 are provided (non-zero), and byte_length - * does not match, the error message indicates that the valid byte_length must - * be either length1 or length2. If only one length is provided (the other being - * 0), the error message will only reference the provided length. This function - * is marked with [[nodiscard]] to ensure that the caller handles the potential - * error message, promoting safer and more intentional error checking. - */ -[[nodiscard]] std::optional is_valid_length( - size_t byte_length, size_t length1, size_t length2 = 0) noexcept; -} // namespace blst_ts - -class BlstTsAddon; -/** - * Circular dependency if these are moved up to the top of the file. - */ -#include "public_key.h" -#include "secret_key.h" -#include "signature.h" - -/** - * Forward declaration of functions init. There is a circular dependency if - * #include "functions.h" - */ -namespace blst_ts_functions { -void init(const Napi::Env &env, Napi::Object &exports); -} - -/** - * BlstTsAddon is the main entry point for the library. It is responsible - * for initialization and holding global values. - */ -class BlstTsAddon : public Napi::Addon { - private: - std::string _blst_error_strings[8]; - - public: - std::string dst; - Napi::FunctionReference secret_key_ctr; - Napi::FunctionReference public_key_ctr; - Napi::FunctionReference signature_ctr; - - /** - * BlstTsAddon::BlstTsAddon constructor used by Node.js to create an - * instance of the addon. - * - * @param env Napi::Env - * @param exports Napi::Object - * - * @return BlstTsAddon - * - * @throws Napi::Error - */ - BlstTsAddon(Napi::Env env, Napi::Object exports); - - /** - * References are by default non-copyable and non-movable. This is just - * to make it explicit that it's not allowed to be copied or moved. - */ - BlstTsAddon(BlstTsAddon &&source) = delete; - BlstTsAddon(const BlstTsAddon &source) = delete; - BlstTsAddon &operator=(BlstTsAddon &&source) = delete; - BlstTsAddon &operator=(const BlstTsAddon &source) = delete; - - /** - * Converts a blst error to an error string - */ - std::string GetBlstErrorString(const blst::BLST_ERROR &err); - - /** - * Uses the same openssl method as node to generate random bytes - * - * Either succeeds with exactly |length| bytes of cryptographically - * strong pseudo-random data, or fails. This function may block. - * Don't assume anything about the contents of |buffer| on error. - * MUST check the return value for success! - * - * As a special case, |length == 0| can be used to check if the - * GetRandomNonZeroBytes is properly seeded without consuming entropy. - * - * @param[out] bytes Output array for generated bytes - * @param[in] length Length of bytes to be generated. Must be less than - * or equal to the length of the output bytes array - * - * @return {bool} True for valid generation, false for error. Must not - * discard return value. - */ - [[nodiscard]] bool GetRandomNonZeroBytes(blst::byte *bytes, size_t length); -}; diff --git a/src/aggregate.cc b/src/aggregate.cc deleted file mode 100644 index c52c5e89..00000000 --- a/src/aggregate.cc +++ /dev/null @@ -1,155 +0,0 @@ -#include "addon.h" - -namespace blst_ts_functions { -Napi::Value AggregatePublicKeys(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - if (!info[0].IsArray()) { - Napi::TypeError::New( - env, "BLST_ERROR: publicKeys must be of type PublicKeyArg[]") - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - Napi::Array arr = info[0].As(); - uint32_t length = arr.Length(); - if (length == 0) { - Napi::TypeError::New( - env, "BLST_ERROR: PublicKeyArg[] must have length > 0") - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - - blst::P1 aggregate{}; - bool has_error = false; - for (uint32_t i = 0; i < length; i++) { - Napi::Value val = arr[i]; - try { - if (val.IsTypedArray()) { - Napi::Uint8Array typed_array = val.As(); - if (std::optional err_msg = - blst_ts::is_valid_length( - typed_array.ByteLength(), - blst_ts::public_key_length_compressed, - blst_ts::public_key_length_uncompressed)) { - Napi::TypeError::New( - env, "BLST_ERROR: PublicKeyArg"s + *err_msg) - .ThrowAsJavaScriptException(); - has_error = true; - } else { - blst::P1 point{ - typed_array.Data(), typed_array.ByteLength()}; - // must not aggregate zero key or will potentially cause - // invalid verifications - if (point.is_inf()) { - Napi::TypeError::New( - env, - "BLST_ERROR: PublicKeyArg must not be zero key") - .ThrowAsJavaScriptException(); - has_error = true; - } - aggregate.add(point); - } - } else { - blst_ts::PublicKey *to_aggregate = - blst_ts::PublicKey::Unwrap(val.As()); - // must not aggregate zero key or will potentially cause invalid - // verifications - if (to_aggregate->point->IsInfinite()) { - Napi::TypeError::New( - env, "BLST_ERROR: PublicKeyArg must not be zero key") - .ThrowAsJavaScriptException(); - has_error = true; - } - to_aggregate->point->AddTo(aggregate); - } - if (has_error) { - return env.Undefined(); - } - } catch (const blst::BLST_ERROR &err) { - Napi::Error::New( - env, - "BLST_ERROR::"s + module->GetBlstErrorString(err) + - ": Invalid key at index "s + std::to_string(i)) - .ThrowAsJavaScriptException(); - return env.Undefined(); - } catch (...) { - Napi::Error::New( - env, - "BLST_ERROR: Invalid PublicKeyArg at index "s + - std::to_string(i)) - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - } - - return scope.Escape( - module->public_key_ctr.New({Napi::External::New( - env, new blst_ts::P1{std::move(aggregate)})})); -} - -Napi::Value AggregateSignatures(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - if (!info[0].IsArray()) { - Napi::TypeError::New( - env, "BLST_ERROR: signatures must be of type SignatureArg[]") - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - Napi::Array arr = info[0].As(); - uint32_t length = arr.Length(); - if (length == 0) { - Napi::TypeError::New( - env, "BLST_ERROR: SignatureArg[] must have length > 0") - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - - blst::P2 aggregate{}; - bool has_error = false; - for (uint32_t i = 0; i < length; i++) { - Napi::Value val = arr[i]; - try { - if (val.IsTypedArray()) { - Napi::Uint8Array typed_array = val.As(); - if (std::optional err_msg = - blst_ts::is_valid_length( - typed_array.ByteLength(), - blst_ts::signature_length_compressed, - blst_ts::signature_length_uncompressed)) { - Napi::TypeError::New( - env, "BLST_ERROR: SignatureArg"s + *err_msg) - .ThrowAsJavaScriptException(); - has_error = true; - } else { - aggregate.add( - blst::P2{typed_array.Data(), typed_array.ByteLength()}); - } - } else { - blst_ts::Signature *to_aggregate = - blst_ts::Signature::Unwrap(val.As()); - to_aggregate->point->AddTo(aggregate); - } - if (has_error) { - return env.Undefined(); - } - } catch (const blst::BLST_ERROR &err) { - Napi::Error::New( - env, - module->GetBlstErrorString(err) + - " - Invalid signature at index "s + std::to_string(i)) - .ThrowAsJavaScriptException(); - return env.Undefined(); - } catch (...) { - Napi::Error::New( - env, - "BLST_ERROR - Invalid SignatureArg at index "s + - std::to_string(i)) - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - } - - return scope.Escape( - module->signature_ctr.New({Napi::External::New( - env, new blst_ts::P2{std::move(aggregate)})})); -} -} // namespace blst_ts_functions diff --git a/src/aggregate_verify.cc b/src/aggregate_verify.cc deleted file mode 100644 index 2c06279e..00000000 --- a/src/aggregate_verify.cc +++ /dev/null @@ -1,224 +0,0 @@ -#include "functions.h" - -namespace blst_ts_functions { -typedef struct { - blst_ts::P1AffineGroup pk_point; - uint8_t *msg; - size_t msg_len; -} AggregateVerifySet; - -/** - * Preparation phase for aggregate_verify. Handles incoming JS arguments and - * prepares them for use by the native layer. Must be run on JS thread! - * - * @param[out] sig_point - P2 point for verification - * @param[out] sets - Sets to be added to pairing - * @param[in] info - JS function context - */ -blst_ts::BLST_TS_ERROR prepare_aggregate_verify( - blst_ts::P2AffineGroup &sig_point, - std::vector &sets, - const Napi::CallbackInfo &info) { - Napi::Env env = info.Env(); - blst_ts::BLST_TS_ERROR err = unwrap_signature(sig_point, env, info[2]); - if (err != blst_ts::BLST_TS_ERROR::SUCCESS) { - return err; - } - - if (!info[1].IsArray()) { - Napi::TypeError::New(env, "publicKeys must be of type PublicKeyArg[]") - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - Napi::Array pk_array = info[1].As(); - uint32_t pk_array_length = pk_array.Length(); - if (pk_array_length == 0) { - if (sig_point.raw_point->is_inf()) { - return blst_ts::BLST_TS_ERROR::INVALID; - } - Napi::TypeError::New(env, "BLST_ERROR: publicKeys must have length > 0") - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - - if (!info[0].IsArray()) { - Napi::TypeError::New( - env, "BLST_ERROR: msgs must be of type BlstBuffer[]") - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - Napi::Array msgs_array = info[0].As(); - uint32_t msgs_array_length = msgs_array.Length(); - if (msgs_array_length == 0) { - Napi::TypeError::New(env, "BLST_ERROR: msgs must have length > 0") - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - - if (msgs_array_length != pk_array_length) { - Napi::TypeError::New( - env, "BLST_ERROR: msgs and publicKeys must be the same length") - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - - sets.reserve(pk_array_length); - for (uint32_t i = 0; i < pk_array_length; i++) { - sets.push_back({blst_ts::P1AffineGroup{}, nullptr, 0}); - - Napi::Value msg_value = msgs_array[i]; - BLST_TS_FUNCTION_UNWRAP_UINT_8_ARRAY(msg_value, msg, "msg"); - sets[i].msg = msg.Data(); - sets[i].msg_len = msg.ByteLength(); - - err = unwrap_public_key(sets[i].pk_point, env, pk_array[i]); - if (err != blst_ts::BLST_TS_ERROR::SUCCESS) { - return err; - } - } - - return blst_ts::BLST_TS_ERROR::SUCCESS; -} - -/** - * Aggregate verify a signature. Consumes sig_point and AggregateVerifySets - * created in preparation phase. Safe to use in libuv thread. - * - * @param[out] result - Result of the verification - * @param[in] module - Addon module - * @param[in] ctx - Pointer to paring for the verification - * @param[in] sig_point - P2 point for verification - * @param[in] sets - Sets to be added to pairing - */ -blst_ts::BLST_TS_ERROR aggregate_verify( - bool &result, - BlstTsAddon *module, - std::unique_ptr &ctx, - blst_ts::P2AffineGroup &sig_point, - std::vector &sets) { - for (uint32_t i = 0; i < sets.size(); i++) { - blst::BLST_ERROR err = ctx->aggregate( - sets[i].pk_point.raw_point, - sig_point.raw_point, - sets[i].msg, - sets[i].msg_len); - if (err != blst::BLST_ERROR::BLST_SUCCESS) { - return blst_ts::BLST_TS_ERROR::INVALID; - } - } - - ctx->commit(); - blst::PT pt{*sig_point.raw_point}; - result = ctx->finalverify(&pt); - - return blst_ts::BLST_TS_ERROR::SUCCESS; -} - -/** - * Synchronous aggregate verification. Implementation is handled the functions - * above (prepare_aggregate_verify and aggregate_verify) - */ -Napi::Value AggregateVerify(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - try { - bool result{false}; - blst_ts::P2AffineGroup sig_point{}; - std::vector sets{}; - blst_ts::BLST_TS_ERROR error = - prepare_aggregate_verify(sig_point, sets, info); - if (error == blst_ts::BLST_TS_ERROR::SUCCESS) { - std::unique_ptr ctx = - std::make_unique(true, module->dst); - error = aggregate_verify(result, module, ctx, sig_point, sets); - } - switch (error) { - case blst_ts::BLST_TS_ERROR::SUCCESS: - return scope.Escape(Napi::Boolean::New(env, result)); - case blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN: - return scope.Escape(env.Undefined()); - default: - case blst_ts::BLST_TS_ERROR::INVALID: - return scope.Escape(Napi::Boolean::New(env, false)); - } - } catch (...) { - return scope.Escape(Napi::Boolean::New(env, false)); - } -} - -class AggregateVerifyWorker : public Napi::AsyncWorker { - public: - AggregateVerifyWorker( - const Napi::CallbackInfo &info, - BlstTsAddon *module, - blst_ts::P2AffineGroup sig_point, - std::vector sets) - : Napi::AsyncWorker{info.Env(), "AggregateVerifyWorker"}, - deferred{Env()}, - _module{std::move(module)}, - _ctx{std::make_unique(true, _module->dst)}, - _sig_point{std::move(sig_point)}, - _sets{std::move(sets)}, - _msgs_ref{Napi::Persistent(info[0])}, - _pks_ref{Napi::Persistent(info[1])}, - _sig_ref{Napi::Persistent(info[2])}, - _result{false} {} - - /** - * GetPromise associated with deferred for return to JS - */ - Napi::Promise GetPromise() { return deferred.Promise(); } - - protected: - void Execute() { - aggregate_verify(_result, _module, _ctx, _sig_point, _sets); - } - void OnOK() { deferred.Resolve(Napi::Boolean::New(Env(), _result)); } - void OnError(const Napi::Error &err) { deferred.Reject(err.Value()); } - - public: - Napi::Promise::Deferred deferred; - - private: - BlstTsAddon *_module; - std::unique_ptr _ctx; - blst_ts::P2AffineGroup _sig_point; - std::vector _sets; - Napi::Reference _msgs_ref; - Napi::Reference _pks_ref; - Napi::Reference _sig_ref; - bool _result; -}; - -/** - * Asynchronous aggregate verification. Implementation is handled the functions - * above (prepare_aggregate_verify and aggregate_verify) - */ -Napi::Value AsyncAggregateVerify(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - blst_ts::P2AffineGroup sig_point{}; - std::vector sets{}; - blst_ts::BLST_TS_ERROR error; - try { - error = prepare_aggregate_verify(sig_point, sets, info); - } catch (...) { - error = blst_ts::BLST_TS_ERROR::INVALID; - } - switch (error) { - case blst_ts::BLST_TS_ERROR::SUCCESS: - break; - case blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN: - return info.Env().Undefined(); - default: - case blst_ts::BLST_TS_ERROR::INVALID: - Napi::Promise::Deferred deferred{env}; - deferred.Resolve(Napi::Boolean::New(env, false)); - return deferred.Promise(); - } - - // gets deleted by Node after async work completes - AggregateVerifyWorker *worker = new AggregateVerifyWorker( - info, module, std::move(sig_point), std::move(sets)); - worker->Queue(); - return worker->GetPromise(); -} -} // namespace blst_ts_functions diff --git a/src/aggregate_with_randomness.cc b/src/aggregate_with_randomness.cc deleted file mode 100644 index 43310937..00000000 --- a/src/aggregate_with_randomness.cc +++ /dev/null @@ -1,239 +0,0 @@ -#include "addon.h" - -namespace blst_ts_functions { - -struct SignatureAndPublicKeySet { - blst_ts::P1Wrapper *pk = nullptr; - uint8_t *sig_data = nullptr; - size_t sig_length = 0; -}; - -blst_ts::BLST_TS_ERROR prepare_aggregate_with_randomness( - std::vector &sets, - bool &validate, - const Napi::CallbackInfo &info) { - Napi::Env env = info.Env(); - Napi::Value array_value = info[0]; - if (!array_value.IsArray()) { - Napi::TypeError::New( - env, "Must pass an array to aggregateWithRandomness") - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - Napi::Array array = array_value.As(); - size_t sets_length = array.Length(); - if (sets_length == 0) { - Napi::TypeError::New( - env, "Empty array passed to aggregateWithRandomness") - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - sets.resize(sets_length); - - Napi::Value validate_value = info[1]; - if (!validate_value.IsUndefined()) { - if (!validate_value.IsBoolean()) { - Napi::TypeError::New( - env, "Must pass a boolean for validateSerialized") - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - validate = validate_value.As().Value(); - } - - auto sets_begin = std::begin(sets); - auto sets_end = std::end(sets); - for (auto it = sets_begin; it != sets_end; ++it) { - size_t i = std::distance(sets_begin, it); - Napi::Value set_value = array[i]; - if (!set_value.IsObject()) { - Napi::TypeError::New( - env, - "Must pass an array of objects to " - "aggregateWithRandomness") - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - Napi::Object set = set_value.As(); - - try { - blst_ts::PublicKey *to_aggregate = blst_ts::PublicKey::Unwrap( - set.Get("publicKey").As()); - it->pk = to_aggregate->point.get(); - } catch (...) { - Napi::Error::New( - env, - "BLST_ERROR: Invalid PublicKey at index "s + std::to_string(i)) - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - - try { - Napi::Value val = set.Get("signature"); - Napi::Uint8Array typed_array = val.As(); - it->sig_data = typed_array.Data(); - it->sig_length = typed_array.ByteLength(); - } catch (...) { - Napi::Error::New( - env, - "BLST_ERROR: Invalid Signature at index "s + std::to_string(i)) - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - } - - return blst_ts::BLST_TS_ERROR::SUCCESS; -} - -blst_ts::BLST_TS_ERROR aggregate_with_randomness( - blst::P1 &aggregate_key, - blst::P2 &aggregate_sig, - std::string &error_msg, - BlstTsAddon *module, - const std::vector &sets, - bool validate) { - auto sets_begin = std::begin(sets); - auto sets_end = std::end(sets); - for (auto it = sets_begin; it != sets_end; ++it) { - size_t i = std::distance(sets_begin, it); - // for (size_t i = 0; i < sets.size(); i++) { - blst::byte randomness[BLST_TS_RANDOM_BYTES_LENGTH]; - if (!module->GetRandomNonZeroBytes( - randomness, BLST_TS_RANDOM_BYTES_LENGTH)) { - error_msg = "BLST_ERROR: Failed to generate random bytes"; - return blst_ts::BLST_TS_ERROR::HAS_NATIVE_ERROR; - } - - aggregate_key.add( - it->pk->MultiplyBy(randomness, BLST_TS_RANDOM_BYTES_LENGTH)); - - blst::P2 sig; - try { - sig = blst::P2{it->sig_data, it->sig_length}; - } catch (...) { - error_msg = - "BLST_ERROR: Invalid Signature at index "s + std::to_string(i); - return blst_ts::BLST_TS_ERROR::HAS_NATIVE_ERROR; - } - - if (validate && (!sig.in_group() || sig.is_inf())) { - error_msg = - "BLST_ERROR: Invalid Signature at index "s + std::to_string(i); - return blst_ts::BLST_TS_ERROR::HAS_NATIVE_ERROR; - } - - sig.mult(randomness, BLST_TS_RANDOM_BYTES_LENGTH * 8); - aggregate_sig.add(sig); - } - - return blst_ts::BLST_TS_ERROR::SUCCESS; -} - -Napi::Value AggregateWithRandomness(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - std::vector sets{}; - bool validate{true}; - - blst_ts::BLST_TS_ERROR err = - prepare_aggregate_with_randomness(sets, validate, info); - if (err == blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN) { - return scope.Escape(env.Undefined()); - } - - blst::P1 aggregate_key{}; - blst::P2 aggregate_sig{}; - std::string error_msg{}; - err = aggregate_with_randomness( - aggregate_key, aggregate_sig, error_msg, module, sets, validate); - if (err == blst_ts::BLST_TS_ERROR::HAS_NATIVE_ERROR) { - Napi::Error::New(env, error_msg).ThrowAsJavaScriptException(); - return scope.Escape(env.Undefined()); - } - - Napi::Object ret_val = Napi::Object::New(env); - ret_val.Set( - Napi::String::New(env, "publicKey"), - module->public_key_ctr.New({Napi::External::New( - env, new blst_ts::P1{std::move(aggregate_key)})})); - ret_val.Set( - Napi::String::New(env, "signature"), - module->signature_ctr.New({Napi::External::New( - env, new blst_ts::P2{std::move(aggregate_sig)})})); - return scope.Escape(ret_val); -} - -class AggregateWithRandomnessWorker : public Napi::AsyncWorker { - public: - AggregateWithRandomnessWorker( - const Napi::CallbackInfo &info, - BlstTsAddon *module, - std::vector sets, - bool validate) - : Napi::AsyncWorker{info.Env(), "AggregateWithRandomnessWorker"}, - deferred{Env()}, - _module{std::move(module)}, - _sets_ref{Napi::Persistent(info[0])}, - _sets{std::move(sets)}, - _validate{std::move(validate)} {} - - /** - * GetPromise associated with deferred for return to JS - */ - Napi::Promise GetPromise() { return deferred.Promise(); } - - protected: - void Execute() { - std::string error_msg{}; - blst_ts::BLST_TS_ERROR err = aggregate_with_randomness( - _aggregate_key, - _aggregate_sig, - error_msg, - _module, - _sets, - _validate); - if (err == blst_ts::BLST_TS_ERROR::HAS_NATIVE_ERROR) { - SetError(error_msg); - } - } - void OnOK() { - Napi::Env env = Env(); - Napi::Object ret_val = Napi::Object::New(env); - ret_val["publicKey"] = _module->public_key_ctr.New( - {Napi::External::New( - env, new blst_ts::P1{std::move(_aggregate_key)})}); - ret_val["signature"] = - _module->signature_ctr.New({Napi::External::New( - env, new blst_ts::P2{std::move(_aggregate_sig)})}); - deferred.Resolve(ret_val); - } - void OnError(const Napi::Error &err) { deferred.Reject(err.Value()); } - - public: - Napi::Promise::Deferred deferred; - - private: - BlstTsAddon *_module; - Napi::Reference _sets_ref; - std::vector _sets; - bool _validate; - blst::P1 _aggregate_key; - blst::P2 _aggregate_sig; -}; - -Napi::Value AsyncAggregateWithRandomness(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - std::vector sets{}; - bool validate{true}; - - blst_ts::BLST_TS_ERROR err = - prepare_aggregate_with_randomness(sets, validate, info); - if (err == blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN) { - return env.Undefined(); - } - - AggregateWithRandomnessWorker *worker = - new AggregateWithRandomnessWorker(info, module, sets, validate); - worker->Queue(); - return worker->GetPromise(); -} -} // namespace blst_ts_functions diff --git a/src/functions.cc b/src/functions.cc deleted file mode 100644 index 5a16886a..00000000 --- a/src/functions.cc +++ /dev/null @@ -1,96 +0,0 @@ -#include "addon.h" - -namespace blst_ts_functions { -blst_ts::BLST_TS_ERROR unwrap_public_key( - blst_ts::P1AffineGroup &pk_point, - const Napi::Env &env, - const Napi::Value &pk_val) { - if (pk_val.IsTypedArray()) { - Napi::Uint8Array typed_array = pk_val.As(); - if (std::optional err_msg = blst_ts::is_valid_length( - typed_array.ByteLength(), - blst_ts::public_key_length_compressed, - blst_ts::public_key_length_uncompressed)) { - return blst_ts::BLST_TS_ERROR::INVALID; - } else { - pk_point.smart_pointer = std::make_unique( - typed_array.Data(), typed_array.ByteLength()); - pk_point.raw_point = pk_point.smart_pointer.get(); - } - } else { - blst_ts::PublicKey *to_verify = - blst_ts::PublicKey::Unwrap(pk_val.As()); - pk_point = to_verify->point->AsAffine(); - } - - if (pk_point.raw_point->is_inf()) { - return blst_ts::BLST_TS_ERROR::INVALID; - } - - return blst_ts::BLST_TS_ERROR::SUCCESS; -} - -blst_ts::BLST_TS_ERROR unwrap_signature( - blst_ts::P2AffineGroup &sig_point, - const Napi::Env &env, - const Napi::Value &sig_val) { - if (sig_val.IsTypedArray()) { - Napi::Uint8Array typed_array = sig_val.As(); - if (std::optional err_msg = blst_ts::is_valid_length( - typed_array.ByteLength(), - blst_ts::signature_length_compressed, - blst_ts::signature_length_uncompressed)) { - return blst_ts::BLST_TS_ERROR::INVALID; - } else { - sig_point.smart_pointer = std::make_unique( - typed_array.Data(), typed_array.ByteLength()); - sig_point.raw_point = sig_point.smart_pointer.get(); - } - } else { - blst_ts::Signature *to_verify = - blst_ts::Signature::Unwrap(sig_val.As()); - sig_point = to_verify->point->AsAffine(); - } - return blst_ts::BLST_TS_ERROR::SUCCESS; -} - -Napi::Value AggregatePublicKeys(const Napi::CallbackInfo &info); -Napi::Value AggregateSignatures(const Napi::CallbackInfo &info); -Napi::Value AggregateWithRandomness(const Napi::CallbackInfo &info); -Napi::Value AsyncAggregateWithRandomness(const Napi::CallbackInfo &info); -Napi::Value AggregateVerify(const Napi::CallbackInfo &info); -Napi::Value AsyncAggregateVerify(const Napi::CallbackInfo &info); -Napi::Value VerifyMultipleAggregateSignatures(const Napi::CallbackInfo &info); -Napi::Value AsyncVerifyMultipleAggregateSignatures( - const Napi::CallbackInfo &info); - -/** - * Exported init function to set functions on exports - */ -void init(const Napi::Env &env, Napi::Object &exports) { - exports.Set( - Napi::String::New(env, "aggregatePublicKeys"), - Napi::Function::New(env, AggregatePublicKeys)); - exports.Set( - Napi::String::New(env, "aggregateSignatures"), - Napi::Function::New(env, AggregateSignatures)); - exports.Set( - Napi::String::New(env, "aggregateWithRandomness"), - Napi::Function::New(env, AggregateWithRandomness)); - exports.Set( - Napi::String::New(env, "asyncAggregateWithRandomness"), - Napi::Function::New(env, AsyncAggregateWithRandomness)); - exports.Set( - Napi::String::New(env, "aggregateVerify"), - Napi::Function::New(env, AggregateVerify)); - exports.Set( - Napi::String::New(env, "asyncAggregateVerify"), - Napi::Function::New(env, AsyncAggregateVerify)); - exports.Set( - Napi::String::New(env, "verifyMultipleAggregateSignatures"), - Napi::Function::New(env, VerifyMultipleAggregateSignatures)); - exports.Set( - Napi::String::New(env, "asyncVerifyMultipleAggregateSignatures"), - Napi::Function::New(env, AsyncVerifyMultipleAggregateSignatures)); -} -} // namespace blst_ts_functions diff --git a/src/functions.h b/src/functions.h deleted file mode 100644 index febaad19..00000000 --- a/src/functions.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once -#include "addon.h" - -namespace blst_ts_functions { -/** - * Unwraps a Napi::Value PublicKeyArg. Can handle serialized Uint8Array and - * deserialized PublicKey objects. Throws JS error for invalid arguments and - * can potentially throw native errors. Should be wrapped in a try/catch - * - * @param pk_point - Struct with native point information for use by blst - * @param env - Napi::Env - * @param pk_val - Napi::Value to be unwrapped into native point - */ -blst_ts::BLST_TS_ERROR unwrap_public_key( - blst_ts::P1AffineGroup &pk_point, - const Napi::Env &env, - const Napi::Value &pk_val); - -/** - * Unwraps a Napi::Value SignatureArg. Can handle serialized Uint8Array and - * deserialized Signature objects. Throws JS error for invalid arguments and - * can potentially throw native errors. Should be wrapped in a try/catch - * - * @param sig_point - Struct with native point information for use by blst - * @param env - Napi::Env - * @param sig_val - Napi::Value to be unwrapped into native point - */ -blst_ts::BLST_TS_ERROR unwrap_signature( - blst_ts::P2AffineGroup &sig_point, - const Napi::Env &env, - const Napi::Value &sig_val); -} // namespace blst_ts_functions diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 00000000..6f85e8db --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,591 @@ +#![deny(clippy::all)] + +use blst::{blst_scalar, blst_scalar_from_uint64, min_pk, MultiPoint, BLST_ERROR}; +use napi::bindgen_prelude::*; +use napi_derive::napi; +use rand::{rngs::ThreadRng, Rng}; + +/// See https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/beacon-chain.md#bls-signatures +const DST: &[u8] = b"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_"; + +/// The length of a secret key. +#[napi] +pub const SECRET_KEY_LENGTH: u32 = 32; + +/// The length of a serialized public key. +#[napi] +pub const PUBLIC_KEY_LENGTH_COMPRESSED: u32 = 48; +#[napi] +pub const PUBLIC_KEY_LENGTH_UNCOMPRESSED: u32 = 96; + +/// The length of a serialized signature. +#[napi] +pub const SIGNATURE_LENGTH_COMPRESSED: u32 = 96; +#[napi] +pub const SIGNATURE_LENGTH_UNCOMPRESSED: u32 = 192; + +/// Custom error status for programmatic error handling. +/// This status will be populated in `Error#code` on the javascript side +pub enum ErrorStatus { + Blst(BLST_ERROR), + InvalidHex, + Other(String), +} + +impl AsRef for ErrorStatus { + fn as_ref(&self) -> &str { + match self { + ErrorStatus::Blst(err) => blst_error_to_str(*err), + ErrorStatus::InvalidHex => "INVALID_HEX", + ErrorStatus::Other(err) => err.as_str(), + } + } +} + +/// BLST_ERROR to human readable string +fn blst_error_to_reason<'a>(error: BLST_ERROR) -> &'a str { + match error { + BLST_ERROR::BLST_SUCCESS => "BLST_SUCCESS", + BLST_ERROR::BLST_BAD_ENCODING => "Invalid encoding", + BLST_ERROR::BLST_POINT_NOT_ON_CURVE => "Point not on curve", + BLST_ERROR::BLST_POINT_NOT_IN_GROUP => "Point not in group", + BLST_ERROR::BLST_AGGR_TYPE_MISMATCH => "Aggregation type mismatch", + BLST_ERROR::BLST_VERIFY_FAIL => "Verification failed", + BLST_ERROR::BLST_PK_IS_INFINITY => "Public key is infinity", + BLST_ERROR::BLST_BAD_SCALAR => "Invalid scalar", + } +} + +/// BLST_ERROR to "error code" +fn blst_error_to_str<'a>(err: BLST_ERROR) -> &'a str { + match err { + BLST_ERROR::BLST_SUCCESS => "BLST_SUCCESS", + BLST_ERROR::BLST_BAD_ENCODING => "BLST_BAD_ENCODING", + BLST_ERROR::BLST_POINT_NOT_ON_CURVE => "BLST_POINT_NOT_ON_CURVE", + BLST_ERROR::BLST_POINT_NOT_IN_GROUP => "BLST_POINT_NOT_IN_GROUP", + BLST_ERROR::BLST_AGGR_TYPE_MISMATCH => "BLST_AGGR_TYPE_MISMATCH", + BLST_ERROR::BLST_VERIFY_FAIL => "BLST_VERIFY_FAIL", + BLST_ERROR::BLST_PK_IS_INFINITY => "BLST_PK_IS_INFINITY", + BLST_ERROR::BLST_BAD_SCALAR => "BLST_BAD_SCALAR", + } +} + +fn from_blst_err(blst_error: BLST_ERROR) -> Error { + Error::new( + ErrorStatus::Blst(blst_error), + blst_error_to_reason(blst_error), + ) +} + +fn from_napi_err(napi_err: Error) -> Error { + Error::new( + ErrorStatus::Other(napi_err.status.to_string()), + napi_err.reason.to_string(), + ) +} + +fn invalid_hex_err(e: hex::FromHexError) -> Error { + Error::new(ErrorStatus::InvalidHex, format!("Invalid hex: {}", e)) +} + +// All errors returned from this module will be of type `napi::Error` +type Result = napi::Result; + +//// Exposed classes / objects + +#[napi] +pub struct SecretKey(min_pk::SecretKey); + +#[napi] +pub struct PublicKey(min_pk::PublicKey); + +#[napi] +pub struct Signature(min_pk::Signature); + +#[napi(object)] +pub struct SignatureSet { + pub msg: Uint8Array, + pub pk: Reference, + pub sig: Reference, +} + +#[napi(object)] +pub struct PkAndSerializedSig { + pub pk: Reference, + pub sig: Uint8Array, +} + +#[napi(object)] +pub struct PkAndSig { + pub pk: Reference, + pub sig: Reference, +} + +#[napi] +impl SecretKey { + #[napi(factory)] + /// Generate a secret key deterministically from a secret byte array `ikm`. + /// + /// `ikm` must be at least 32 bytes long. + /// + /// Optionally pass `key_info` bytes to derive multiple independent keys from the same `ikm`. + /// By default, the `key_info` is empty. + pub fn from_keygen(ikm: Uint8Array, key_info: Option) -> Result { + let key_info = key_info.as_deref().unwrap_or(&[]); + min_pk::SecretKey::key_gen(&ikm, key_info) + .map(Self) + .map_err(from_blst_err) + } + + #[napi(factory)] + /// Generate a master secret key deterministically from a secret byte array `ikm` based on EIP-2333. + /// + /// `ikm` must be at least 32 bytes long. + /// + /// See https://eips.ethereum.org/EIPS/eip-2333 + pub fn derive_master_eip2333(ikm: Uint8Array) -> Result { + min_pk::SecretKey::derive_master_eip2333(&ikm) + .map(Self) + .map_err(from_blst_err) + } + + #[napi] + /// Derive a child secret key from a parent secret key based on EIP-2333. + /// + /// See https://eips.ethereum.org/EIPS/eip-2333 + pub fn derive_child_eip2333(&self, index: u32) -> Self { + Self(self.0.derive_child_eip2333(index)) + } + + #[napi(factory)] + /// Deserialize a secret key from a byte array. + pub fn from_bytes(bytes: Uint8Array) -> Result { + Self::from_slice(&bytes) + } + + #[napi(factory)] + /// Deserialize a secret key from a hex string. + pub fn from_hex(hex: String) -> Result { + let bytes = hex::decode(&hex.trim_start_matches("0x")).map_err(invalid_hex_err)?; + Self::from_slice(&bytes) + } + + fn from_slice(bytes: &[u8]) -> Result { + min_pk::SecretKey::from_bytes(&bytes) + .map(Self) + .map_err(from_blst_err) + } + + #[napi] + /// Serialize a secret key to a byte array. + pub fn to_bytes(&self) -> Uint8Array { + Uint8Array::from(self.0.to_bytes()) + } + + #[napi] + /// Serialize a secret key to a hex string. + pub fn to_hex(&self) -> String { + format!("0x{}", hex::encode(self.0.to_bytes())) + } + + #[napi] + /// Return the corresponding public key + pub fn to_public_key(&self) -> PublicKey { + PublicKey(self.0.sk_to_pk()) + } + + #[napi] + pub fn sign(&self, msg: Uint8Array) -> Signature { + Signature(self.0.sign(&msg, &DST, &[])) + } +} + +#[napi] +impl PublicKey { + #[napi(factory)] + /// Deserialize a public key from a byte array. + /// + /// If `pk_validate` is `true`, the public key will be infinity and group checked. + pub fn from_bytes(bytes: Uint8Array, pk_validate: Option) -> Result { + Self::from_slice(&bytes, pk_validate) + } + + #[napi(factory)] + /// Deserialize a public key from a hex string. + /// + /// If `pk_validate` is `true`, the public key will be infinity and group checked. + pub fn from_hex(hex: String, pk_validate: Option) -> Result { + let bytes = hex::decode(&hex.trim_start_matches("0x")).map_err(invalid_hex_err)?; + Self::from_slice(&bytes, pk_validate) + } + + fn from_slice(bytes: &[u8], pk_validate: Option) -> Result { + let pk = if pk_validate.unwrap_or(false) { + min_pk::PublicKey::key_validate(&bytes) + } else { + min_pk::PublicKey::from_bytes(&bytes) + }; + pk.map(Self).map_err(from_blst_err) + } + + #[napi] + /// Serialize a public key to a byte array. + pub fn to_bytes(&self, compress: Option) -> Uint8Array { + self.to_vec(compress).into() + } + + #[napi] + /// Serialize a public key to a hex string. + pub fn to_hex(&self, compress: Option) -> String { + format!("0x{}", hex::encode(self.to_vec(compress))) + } + + fn to_vec(&self, compress: Option) -> Vec { + if compress.unwrap_or(true) { + return self.0.compress().to_vec(); + } + self.0.serialize().to_vec() + } + + #[napi] + /// Validate a public key with infinity and group check. + pub fn key_validate(&self) -> Result { + self.0.validate().map_err(from_blst_err) + } +} + +#[napi] +impl Signature { + #[napi(factory)] + /// Deserialize a signature from a byte array. + /// + /// If `sig_validate` is `true`, the public key will be infinity and group checked. + /// + /// If `sig_infcheck` is `false`, the infinity check will be skipped. + pub fn from_bytes( + bytes: Uint8Array, + sig_validate: Option, + sig_infcheck: Option, + ) -> Result { + Self::from_slice(&bytes, sig_validate, sig_infcheck) + } + + #[napi(factory)] + /// Deserialize a signature from a hex string. + /// + /// If `sig_validate` is `true`, the public key will be infinity and group checked. + /// + /// If `sig_infcheck` is `false`, the infinity check will be skipped. + pub fn from_hex( + hex: String, + sig_validate: Option, + sig_infcheck: Option, + ) -> Result { + let bytes = hex::decode(&hex.trim_start_matches("0x")).map_err(invalid_hex_err)?; + Self::from_slice(&bytes, sig_validate, sig_infcheck) + } + + fn from_slice( + bytes: &[u8], + sig_validate: Option, + sig_infcheck: Option, + ) -> Result { + let sig = if sig_validate.unwrap_or(false) { + min_pk::Signature::sig_validate(&bytes, sig_infcheck.unwrap_or(true)) + } else { + min_pk::Signature::from_bytes(&bytes) + }; + sig.map(Self).map_err(from_blst_err) + } + + #[napi] + /// Serialize a signature to a byte array. + pub fn to_bytes(&self, compress: Option) -> Uint8Array { + Uint8Array::from(self.to_vec(compress)) + } + + #[napi] + /// Serialize a signature to a hex string. + pub fn to_hex(&self, compress: Option) -> String { + format!("0x{}", hex::encode(self.to_vec(compress))) + } + + fn to_vec(&self, compress: Option) -> Vec { + if compress.unwrap_or(true) { + return self.0.compress().to_vec(); + } + self.0.serialize().to_vec() + } + + #[napi] + /// Validate a signature with infinity and group check. + /// + /// If `sig_infcheck` is `false`, the infinity check will be skipped. + pub fn sig_validate(&self, sig_infcheck: Option) -> Result { + min_pk::Signature::validate(&self.0, sig_infcheck.unwrap_or(true)).map_err(from_blst_err) + } +} + +//// Exposed functions + +#[napi] +/// Aggregate multiple public keys into a single public key. +/// +/// If `pks_validate` is `true`, the public keys will be infinity and group checked. +pub fn aggregate_public_keys( + pks: Vec<&PublicKey>, + pks_validate: Option, +) -> Result { + let pks = pks.iter().map(|pk| &pk.0).collect::>(); + min_pk::AggregatePublicKey::aggregate(&pks, pks_validate.unwrap_or(false)) + .map(|pk| PublicKey(pk.to_public_key())) + .map_err(from_blst_err) +} + +#[napi] +/// Aggregate multiple signatures into a single signature. +/// +/// If `sigs_groupcheck` is `true`, the signatures will be group checked. +pub fn aggregate_signatures( + sigs: Vec<&Signature>, + sigs_groupcheck: Option, +) -> Result { + let sigs = sigs.iter().map(|s| &s.0).collect::>(); + min_pk::AggregateSignature::aggregate(&sigs, sigs_groupcheck.unwrap_or(false)) + .map(|sig| Signature(sig.to_signature())) + .map_err(from_blst_err) +} + +#[napi] +/// Aggregate multiple serialized public keys into a single public key. +/// +/// If `pks_validate` is `true`, the public keys will be infinity and group checked. +pub fn aggregate_serialized_public_keys( + pks: Vec, + pks_validate: Option, +) -> Result { + let pks = pks.iter().map(|pk| pk.as_ref()).collect::>(); + min_pk::AggregatePublicKey::aggregate_serialized(&pks, pks_validate.unwrap_or(false)) + .map(|pk| PublicKey(pk.to_public_key())) + .map_err(from_blst_err) +} + +#[napi] +/// Aggregate multiple serialized signatures into a single signature. +/// +/// If `sigs_groupcheck` is `true`, the signatures will be group checked. +pub fn aggregate_serialized_signatures( + sigs: Vec, + sigs_groupcheck: Option, +) -> Result { + let sigs = sigs.iter().map(|s| s.as_ref()).collect::>(); + min_pk::AggregateSignature::aggregate_serialized(&sigs, sigs_groupcheck.unwrap_or(false)) + .map(|sig| Signature(sig.to_signature())) + .map_err(from_blst_err) +} + +#[napi] +/// Aggregate multiple public keys and multiple serialized signatures into a single blinded public key and blinded signature. +/// +/// Signatures are deserialized and validated with infinity and group checks before aggregation. +pub fn aggregate_with_randomness(env: Env, sets: Vec) -> Result { + if sets.is_empty() { + return Err(from_blst_err(BLST_ERROR::BLST_AGGR_TYPE_MISMATCH)); + } + + let (pks, sigs) = unzip_and_validate_aggregation_sets(&sets)?; + let rands = create_rand_slice(pks.len()); + let (pk, sig) = aggregate_with(pks.as_slice(), sigs.as_slice(), rands.as_slice()); + + Ok(PkAndSig { + pk: PublicKey::into_reference(PublicKey(pk), env).map_err(from_napi_err)?, + sig: Signature::into_reference(Signature(sig), env).map_err(from_napi_err)?, + }) +} + +#[napi] +/// Verify a signature against a message and public key. +/// +/// If `pk_validate` is `true`, the public key will be infinity and group checked. +/// +/// If `sig_groupcheck` is `true`, the signature will be group checked. +pub fn verify( + msg: Uint8Array, + pk: &PublicKey, + sig: &Signature, + pk_validate: Option, + sig_groupcheck: Option, +) -> bool { + sig.0.verify( + sig_groupcheck.unwrap_or(false), + &msg, + &DST, + &[], + &pk.0, + pk_validate.unwrap_or(false), + ) == BLST_ERROR::BLST_SUCCESS +} + +#[napi] +/// Verify an aggregated signature against multiple messages and multiple public keys. +/// +/// If `pk_validate` is `true`, the public keys will be infinity and group checked. +/// +/// If `sigs_groupcheck` is `true`, the signatures will be group checked. +pub fn aggregate_verify( + msgs: Vec, + pks: Vec<&PublicKey>, + sig: &Signature, + pk_validate: Option, + sigs_groupcheck: Option, +) -> bool { + let pks = pks.iter().map(|pk| &pk.0).collect::>(); + let msgs = msgs.iter().map(|msg| msg.as_ref()).collect::>(); + min_pk::Signature::aggregate_verify( + &sig.0, + sigs_groupcheck.unwrap_or(false), + &msgs, + &DST, + &pks, + pk_validate.unwrap_or(false), + ) == BLST_ERROR::BLST_SUCCESS +} + +#[napi] +/// Verify an aggregated signature against a single message and multiple public keys. +/// +/// Proof-of-possession is required for public keys. +/// +/// If `sigs_groupcheck` is `true`, the signatures will be group checked. +pub fn fast_aggregate_verify( + msg: Uint8Array, + pks: Vec<&PublicKey>, + sig: &Signature, + sigs_groupcheck: Option, +) -> bool { + let pks = pks.iter().map(|pk| &pk.0).collect::>(); + min_pk::Signature::fast_aggregate_verify( + &sig.0, + sigs_groupcheck.unwrap_or(false), + &msg, + &DST, + &pks, + ) == BLST_ERROR::BLST_SUCCESS +} + +#[napi] +/// Verify multiple aggregated signatures against multiple messages and multiple public keys. +/// +/// If `pks_validate` is `true`, the public keys will be infinity and group checked. +/// +/// If `sigs_groupcheck` is `true`, the signatures will be group checked. +/// +/// See https://ethresear.ch/t/fast-verification-of-multiple-bls-signatures/5407 +pub fn verify_multiple_aggregate_signatures( + sets: Vec, + pks_validate: Option, + sigs_groupcheck: Option, +) -> bool { + let (msgs, pks, sigs) = unzip_signature_sets(&sets); + let rands = create_rand_scalars(sets.len()); + min_pk::Signature::verify_multiple_aggregate_signatures( + &msgs, + &DST, + &pks, + pks_validate.unwrap_or(false), + &sigs, + sigs_groupcheck.unwrap_or(false), + &rands, + 64, + ) == BLST_ERROR::BLST_SUCCESS +} + +//// Utility functions + +/// Convert a list of tuples into a tuple of lists +fn unzip_signature_sets<'a>( + sets: &'a [SignatureSet], +) -> ( + Vec<&'a [u8]>, + Vec<&'a min_pk::PublicKey>, + Vec<&'a min_pk::Signature>, +) { + let len = sets.len(); + let mut msgs = Vec::with_capacity(len); + let mut pks = Vec::with_capacity(len); + let mut sigs = Vec::with_capacity(len); + + for set in sets { + msgs.push(set.msg.as_ref()); + pks.push(&set.pk.0); + sigs.push(&set.sig.0); + } + + (msgs, pks, sigs) +} + +/// Convert a list of tuples into a tuple of lists (deserializing and validating signatures along the way) +fn unzip_and_validate_aggregation_sets( + sets: &[PkAndSerializedSig], +) -> Result<(Vec, Vec)> { + let len = sets.len(); + let mut pks = Vec::with_capacity(len); + let mut sigs = Vec::with_capacity(len); + + for set in sets { + pks.push(set.pk.0); + sigs.push(min_pk::Signature::sig_validate(set.sig.as_ref(), true).map_err(from_blst_err)?); + } + + Ok((pks, sigs)) +} + +/// randomness used for multiplication (can't be zero) +fn rand_non_zero(rng: &mut ThreadRng) -> u64 { + loop { + let r = rng.gen(); + if r != 0 { + return r; + } + } +} + +/// copied from lighthouse: +/// https://github.com/sigp/lighthouse/blob/9e12c21f268c80a3f002ae0ca27477f9f512eb6f/crypto/bls/src/impls/blst.rs#L52 +fn create_scalar(i: u64) -> blst_scalar { + let vals = [i, 0, 0, 0]; + let mut scalar = std::mem::MaybeUninit::::uninit(); + unsafe { + blst_scalar_from_uint64(scalar.as_mut_ptr(), vals.as_ptr()); + scalar.assume_init() + } +} + +/// Creates a vector of random scalars, each 64 bits +fn create_rand_scalars(len: usize) -> Vec { + let mut rng = rand::thread_rng(); + (0..len) + .map(|_| create_scalar(rand_non_zero(&mut rng))) + .collect() +} + +/// Creates a vector of random bytes, length len * 8 +fn create_rand_slice(len: usize) -> Vec { + let mut rng = rand::thread_rng(); + (0..len) + .map(|_| rand_non_zero(&mut rng).to_ne_bytes()) + .flatten() + .collect() +} + +/// pks.len() == sigs.len() == rands.len() * 8 +fn aggregate_with( + pks: &[min_pk::PublicKey], + sigs: &[min_pk::Signature], + scalars: &[u8], +) -> (min_pk::PublicKey, min_pk::Signature) { + let pk = pks.mult(scalars, 64).to_public_key(); + let sig = sigs.mult(scalars, 64).to_signature(); + + (pk, sig) +} diff --git a/src/public_key.cc b/src/public_key.cc deleted file mode 100644 index 51afd3f2..00000000 --- a/src/public_key.cc +++ /dev/null @@ -1,203 +0,0 @@ -#include "public_key.h" - -namespace blst_ts { - -void P1::Serialize(bool compress, blst::byte *out) const { - compress ? _point.compress(out) : _point.serialize(out); -} - -P1AffineGroup P1::AsAffine() { - P1AffineGroup group{std::make_unique(_point), nullptr}; - group.raw_point = group.smart_pointer.get(); - return group; -} - -blst::P1 P1::MultiplyBy( - const blst::byte *rand_bytes, const size_t rand_bytes_length) const { - blst::byte out[public_key_length_uncompressed]; - _point.serialize(out); - // this should get std::move all the way into the P1 member value - blst::P1 point{out, public_key_length_uncompressed}; - point.mult(rand_bytes, rand_bytes_length * 8); - return point; -} - -void P1Affine::Serialize(bool compress, blst::byte *out) const { - compress ? _point.compress(out) : _point.serialize(out); -} - -P1AffineGroup P1Affine::AsAffine() { - P1AffineGroup group{nullptr, &_point}; - return group; -} - -blst::P1 P1Affine::MultiplyBy( - const blst::byte *rand_bytes, const size_t rand_bytes_length) const { - blst::byte out[public_key_length_uncompressed]; - _point.serialize(out); - // this should get std::move all the way into the P1 member value - blst::P1 point{out, public_key_length_uncompressed}; - point.mult(rand_bytes, rand_bytes_length * 8); - return point; -} - -void PublicKey::Init( - Napi::Env env, Napi::Object &exports, BlstTsAddon *module) { - Napi::HandleScope scope(env); - std::initializer_list> proto = { - StaticMethod( - "deserialize", - &PublicKey::Deserialize, - static_cast( - napi_static | napi_enumerable)), - InstanceMethod( - "serialize", - &PublicKey::Serialize, - static_cast(napi_enumerable)), - InstanceMethod( - "keyValidate", - &PublicKey::KeyValidate, - static_cast(napi_enumerable)), - InstanceMethod( - "isInfinity", - &PublicKey::IsInfinity, - static_cast(napi_enumerable)), - InstanceMethod( - "multiplyBy", - &PublicKey::MultiplyBy, - static_cast(napi_enumerable)), - }; - - Napi::Function ctr = DefineClass(env, "PublicKey", proto, module); - module->public_key_ctr = Napi::Persistent(ctr); - exports.Set(Napi::String::New(env, "PublicKey"), ctr); - - Napi::Object js_exports = exports.Get("BLST_CONSTANTS").As(); - js_exports.Set( - Napi::String::New(env, "PUBLIC_KEY_LENGTH_COMPRESSED"), - Napi::Number::New(env, public_key_length_compressed)); - js_exports.Set( - Napi::String::New(env, "PUBLIC_KEY_LENGTH_UNCOMPRESSED"), - Napi::Number::New(env, public_key_length_uncompressed)); -} - -Napi::Value PublicKey::Deserialize(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - Napi::Value pk_bytes_val = info[0]; - BLST_TS_UNWRAP_UINT_8_ARRAY(pk_bytes_val, pk_bytes, "pkBytes") - - if (std::optional err_msg = blst_ts::is_valid_length( - pk_bytes.ByteLength(), - public_key_length_compressed, - public_key_length_uncompressed)) { - Napi::TypeError::New(env, "BLST_ERROR: pkBytes"s + *err_msg) - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - - bool is_affine = false; - // but figure out if request for affine - if (!info[1].IsUndefined()) { - Napi::Value type_val = info[1].As(); - if (!type_val.IsNumber()) { - Napi::TypeError::New( - env, "BLST_ERROR: type must be of enum CoordType (number)") - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - switch (type_val.As().Uint32Value()) { - case 0: - is_affine = true; - break; - case 1: - is_affine = false; - break; - default: - Napi::TypeError::New( - env, - "BLST_ERROR: must be CoordType.affine or " - "CoordType.jacobian") - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - } - - // try/catch here because using untrusted bytes for point creation and - // blst library will throw for invalid points - try { - if (is_affine) { - return scope.Escape( - module->public_key_ctr.New({Napi::External::New( - env, - new P1Affine{blst::P1_Affine{ - pk_bytes.Data(), pk_bytes.ByteLength()}})})); - } - return scope.Escape( - module->public_key_ctr.New({Napi::External::New( - env, - new P1{blst::P1{pk_bytes.Data(), pk_bytes.ByteLength()}})})); - } catch (const blst::BLST_ERROR &err) { - Napi::RangeError::New(env, module->GetBlstErrorString(err)) - .ThrowAsJavaScriptException(); - return env.Undefined(); - } catch (...) { - Napi::Error::New( - env, "BLST_ERROR: Unknown error deserializing PublicKey") - .ThrowAsJavaScriptException(); - return env.Undefined(); - } -} - -PublicKey::PublicKey(const Napi::CallbackInfo &info) - : Napi::ObjectWrap{info}, point{nullptr} { - Napi::Env env = info.Env(); - Napi::HandleScope scope(env); - // Check that constructor was called from C++ and not JS. Externals can only - // be created natively. - if (!info[0].IsExternal()) { - Napi::Error::New(env, "PublicKey constructor is private") - .ThrowAsJavaScriptException(); - return; - } - point.reset(info[0].As>().Data()); -} - -Napi::Value PublicKey::Serialize(const Napi::CallbackInfo &info){ - BLST_TS_SERIALIZE_POINT(public_key)} - -Napi::Value PublicKey::KeyValidate(const Napi::CallbackInfo &info) { - Napi::Env env = info.Env(); - Napi::HandleScope scope(env); - if (point->IsInfinite()) { - Napi::Error::New(env, "BLST_ERROR::BLST_PK_IS_INFINITY") - .ThrowAsJavaScriptException(); - } - if (!point->InGroup()) { - Napi::Error::New(env, "BLST_ERROR::BLST_POINT_NOT_IN_GROUP") - .ThrowAsJavaScriptException(); - } - return info.Env().Undefined(); -} - -Napi::Value PublicKey::IsInfinity(const Napi::CallbackInfo &info) { - Napi::Env env = info.Env(); - Napi::EscapableHandleScope scope(env); - return scope.Escape(Napi::Boolean::New(env, point->IsInfinite())); -} - -Napi::Value PublicKey::MultiplyBy(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - Napi::Value rand_bytes_value = info[0]; - BLST_TS_UNWRAP_UINT_8_ARRAY(rand_bytes_value, rand_bytes, "randomBytes") - - Napi::Object pk_obj = module->public_key_ctr.New( - // Default to jacobian coordinates - {Napi::External::New( - env, - new P1{point->MultiplyBy( - rand_bytes.Data(), rand_bytes.ByteLength())}), - Napi::Boolean::New(env, false)}); - - return scope.Escape(pk_obj); -} -} // namespace blst_ts diff --git a/src/public_key.h b/src/public_key.h deleted file mode 100644 index 48f8bf0e..00000000 --- a/src/public_key.h +++ /dev/null @@ -1,70 +0,0 @@ -#pragma once - -#include "addon.h" - -namespace blst_ts { -static const size_t public_key_length_compressed = 48; -static const size_t public_key_length_uncompressed = 96; - -typedef struct { - std::unique_ptr smart_pointer; - blst::P1_Affine *raw_point; -} P1AffineGroup; - -class P1Wrapper { - public: - virtual ~P1Wrapper() = default; - virtual bool IsInfinite() const = 0; - virtual bool InGroup() const = 0; - virtual void AddTo(blst::P1 &point) const = 0; - virtual void Serialize(bool compress, blst::byte *out) const = 0; - virtual P1AffineGroup AsAffine() = 0; - virtual blst::P1 MultiplyBy( - const blst::byte *rand_bytes, const size_t rand_bytes_length) const = 0; -}; - -class P1 final : public P1Wrapper { - private: - blst::P1 _point; - - public: - P1(blst::P1 point) : _point(std::move(point)) {} - bool IsInfinite() const final { return _point.is_inf(); } - bool InGroup() const final { return _point.in_group(); } - void AddTo(blst::P1 &point) const final { point.add(_point); }; - void Serialize(bool compress, blst::byte *out) const final; - P1AffineGroup AsAffine() final; - blst::P1 MultiplyBy( - const blst::byte *rand_bytes, - const size_t rand_bytes_length) const final; -}; - -class P1Affine final : public P1Wrapper { - private: - blst::P1_Affine _point; - - public: - P1Affine(blst::P1_Affine point) : _point(std::move(point)) {} - bool IsInfinite() const final { return _point.is_inf(); } - bool InGroup() const final { return _point.in_group(); } - void AddTo(blst::P1 &point) const final { point.add(_point); } - void Serialize(bool compress, blst::byte *out) const final; - P1AffineGroup AsAffine() final; - blst::P1 MultiplyBy( - const blst::byte *rand_bytes, - const size_t rand_bytes_length) const final; -}; - -class PublicKey final : public Napi::ObjectWrap { - public: - std::unique_ptr point; - - static void Init(Napi::Env env, Napi::Object &exports, BlstTsAddon *module); - static Napi::Value Deserialize(const Napi::CallbackInfo &info); - PublicKey(const Napi::CallbackInfo &info); - Napi::Value Serialize(const Napi::CallbackInfo &info); - Napi::Value KeyValidate(const Napi::CallbackInfo &info); - Napi::Value IsInfinity(const Napi::CallbackInfo &info); - Napi::Value MultiplyBy(const Napi::CallbackInfo &info); -}; -} // namespace blst_ts diff --git a/src/secret_key.cc b/src/secret_key.cc deleted file mode 100644 index 55bf12f1..00000000 --- a/src/secret_key.cc +++ /dev/null @@ -1,176 +0,0 @@ -#include "secret_key.h" - -namespace blst_ts { -void SecretKey::Init( - Napi::Env env, Napi::Object &exports, BlstTsAddon *module) { - Napi::HandleScope scope(env); - std::initializer_list> proto = { - StaticMethod( - "fromKeygen", - &SecretKey::FromKeygen, - static_cast( - napi_static | napi_enumerable)), - StaticMethod( - "deserialize", - &SecretKey::Deserialize, - static_cast( - napi_static | napi_enumerable)), - InstanceMethod( - "serialize", - &SecretKey::Serialize, - static_cast(napi_enumerable)), - InstanceMethod( - "toPublicKey", - &SecretKey::ToPublicKey, - static_cast(napi_enumerable)), - InstanceMethod( - "sign", - &SecretKey::Sign, - static_cast(napi_enumerable)), - }; - - Napi::Function ctr = DefineClass(env, "SecretKey", proto, module); - module->secret_key_ctr = Napi::Persistent(ctr); - exports.Set(Napi::String::New(env, "SecretKey"), ctr); - - exports.Get("BLST_CONSTANTS") - .As() - .Set( - Napi::String::New(env, "SECRET_KEY_LENGTH"), - Napi::Number::New(env, secret_key_length)); -} - -Napi::Value SecretKey::FromKeygen(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - Napi::Value ikm_value = info[0]; - Napi::Value info_value = info[1]; - - BLST_TS_UNWRAP_UINT_8_ARRAY(ikm_value, ikm, "ikm") - // Check for less than 32 bytes so consumers don't accidentally create - // zero keys - if (ikm.ByteLength() < secret_key_length) { - Napi::TypeError::New( - env, - "ikm must be greater than or equal to "s + - std::to_string(secret_key_length) + " bytes"s) - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - - // just need to pass some value to the External constructor. debug builds - // have hard crash check for nullptr - bool is_external = true; - Napi::Object wrapped = module->secret_key_ctr.New( - {Napi::External::New(env, &is_external)}); - SecretKey *sk = SecretKey::Unwrap(wrapped); - - // If `info` string is passed use it otherwise use default without - if (!info_value.IsUndefined()) { - if (!info_value.IsString()) { - Napi::TypeError::New(env, "BLST_ERROR: info must be a string") - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - sk->key->keygen( - ikm.Data(), - ikm.ByteLength(), - info_value.As().Utf8Value()); - } else { - sk->key->keygen(ikm.Data(), ikm.ByteLength()); - } - - // Check if key is zero and set flag if so. Several specs depend on this - // check (signing with zero key). Do after building instead of checking - // incoming bytes incase info changes the key - blst::byte key_bytes[secret_key_length]; - - sk->key->to_bendian(key_bytes); - sk->is_zero_key = blst_ts::is_zero_bytes(key_bytes, 0, secret_key_length); - - return scope.Escape(wrapped); -} - -Napi::Value SecretKey::Deserialize(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - - Napi::Value sk_bytes_value = info[0]; - BLST_TS_UNWRAP_UINT_8_ARRAY(sk_bytes_value, sk_bytes, "skBytes") - if (std::optional err_msg = blst_ts::is_valid_length( - sk_bytes.ByteLength(), secret_key_length)) { - Napi::TypeError::New(env, "BLST_ERROR: skBytes"s + *err_msg) - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - - // just need to pass some value to the External constructor. debug builds - // have hard crash check for nullptr - bool is_external = true; - Napi::Object wrapped = module->secret_key_ctr.New( - {Napi::External::New(env, &is_external)}); - SecretKey *sk = SecretKey::Unwrap(wrapped); - - // Check if key is zero and set flag if so. Several specs depend on this - // check (signing with zero key) - sk->is_zero_key = - blst_ts::is_zero_bytes(sk_bytes.Data(), 0, sk_bytes.ByteLength()); - - // Deserialize key - sk->key->from_bendian(sk_bytes.Data()); - - return scope.Escape(wrapped); -} - -SecretKey::SecretKey(const Napi::CallbackInfo &info) - : Napi::ObjectWrap{info}, - key{std::make_unique()}, - is_zero_key{false} { - Napi::Env env = info.Env(); - Napi::HandleScope scope(env); - // Check that constructor was called from C++ and not JS. Externals can only - // be created natively. - if (!info[0].IsExternal()) { - Napi::Error::New(env, "SecretKey constructor is private") - .ThrowAsJavaScriptException(); - } -} - -Napi::Value SecretKey::Serialize(const Napi::CallbackInfo &info) { - Napi::Env env = info.Env(); - Napi::EscapableHandleScope scope(env); - - Napi::Uint8Array serialized = Napi::Uint8Array::New(env, secret_key_length); - key->to_bendian(serialized.Data()); - - return scope.Escape(serialized); -} - -Napi::Value SecretKey::ToPublicKey(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - return scope.Escape(module->public_key_ctr.New( - {Napi::External::New(env, new P1{blst::P1{*key}}), - Napi::Boolean::New(env, false)})); -} - -Napi::Value SecretKey::Sign(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - // Check for zero key and throw error to meet spec requirements - if (is_zero_key) { - Napi::TypeError::New( - env, "BLST_ERROR: cannot sign message with zero private key") - .ThrowAsJavaScriptException(); - return info.Env().Undefined(); - } - - Napi::Value msg_value = info[0]; - BLST_TS_UNWRAP_UINT_8_ARRAY(msg_value, msg, "msg") - - Napi::Object sig_obj = module->signature_ctr.New( - // Default to jacobian coordinates - {Napi::External::New(env, new P2{blst::P2{}}), - Napi::Boolean::New(env, false)}); - Signature *sig = Napi::ObjectWrap::Unwrap(sig_obj); - sig->point->Sign(*key, msg.Data(), msg.ByteLength(), module->dst); - - return scope.Escape(sig_obj); -} -} // namespace blst_ts diff --git a/src/secret_key.h b/src/secret_key.h deleted file mode 100644 index 007dad38..00000000 --- a/src/secret_key.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include "addon.h" - -namespace blst_ts { -static const size_t secret_key_length = 32; - -class SecretKey final : public Napi::ObjectWrap { - public: - std::unique_ptr key; - bool is_zero_key; - - static void Init(Napi::Env env, Napi::Object &exports, BlstTsAddon *module); - static Napi::Value FromKeygen(const Napi::CallbackInfo &info); - static Napi::Value Deserialize(const Napi::CallbackInfo &info); - SecretKey(const Napi::CallbackInfo &info); - Napi::Value Serialize(const Napi::CallbackInfo &info); - Napi::Value ToPublicKey(const Napi::CallbackInfo &info); - Napi::Value Sign(const Napi::CallbackInfo &info); -}; -} // namespace blst_ts diff --git a/src/signature.cc b/src/signature.cc deleted file mode 100644 index 5cfd6ad5..00000000 --- a/src/signature.cc +++ /dev/null @@ -1,219 +0,0 @@ -#include "signature.h" - -namespace blst_ts { -void P2::Serialize(bool compress, blst::byte *out) const { - compress ? _point.compress(out) : _point.serialize(out); -} - -P2AffineGroup P2::AsAffine() { - P2AffineGroup group{std::make_unique(_point), nullptr}; - group.raw_point = group.smart_pointer.get(); - return group; -} - -blst::P2 P2::MultiplyBy( - const blst::byte *rand_bytes, const size_t rand_bytes_length) const { - blst::byte out[signature_length_uncompressed]; - _point.serialize(out); - // this should get std::move all the way into the P2 member value - blst::P2 point{out, signature_length_uncompressed}; - point.mult(rand_bytes, rand_bytes_length * 8); - return point; -} - -void P2::Sign( - const blst::SecretKey &key, - const uint8_t *msg, - const size_t msg_length, - const std::string &dst) { - _point.hash_to(msg, msg_length, dst); - _point.sign_with(key); -} - -void P2Affine::Serialize(bool compress, blst::byte *out) const { - compress ? _point.compress(out) : _point.serialize(out); -} - -P2AffineGroup P2Affine::AsAffine() { - P2AffineGroup group{nullptr, &_point}; - return group; -} - -blst::P2 P2Affine::MultiplyBy( - const blst::byte *rand_bytes, const size_t rand_bytes_length) const { - blst::byte out[signature_length_uncompressed]; - _point.serialize(out); - // this should get std::move all the way into the P2 member value - blst::P2 point{out, signature_length_uncompressed}; - point.mult(rand_bytes, rand_bytes_length * 8); - return point; -} - -void P2Affine::Sign( - const blst::SecretKey &key, - const uint8_t *msg, - const size_t msg_length, - const std::string &dst) { - blst::P2 jacobian{_point}; - jacobian.hash_to(msg, msg_length, dst); - jacobian.sign_with(key); - _point = jacobian.to_affine(); -} - -void Signature::Init( - Napi::Env env, Napi::Object &exports, BlstTsAddon *module) { - Napi::HandleScope scope( - env); // no need to Escape, Persistent will take care of it - std::initializer_list> proto = { - StaticMethod( - "deserialize", - &Signature::Deserialize, - static_cast( - napi_static | napi_enumerable)), - InstanceMethod( - "serialize", - &Signature::Serialize, - static_cast(napi_enumerable)), - InstanceMethod( - "sigValidate", - &Signature::SigValidate, - static_cast(napi_enumerable)), - InstanceMethod( - "isInfinity", - &Signature::IsInfinity, - static_cast(napi_enumerable)), - InstanceMethod( - "multiplyBy", - &Signature::MultiplyBy, - static_cast(napi_enumerable)), - }; - - Napi::Function ctr = DefineClass(env, "Signature", proto, module); - module->signature_ctr = Napi::Persistent(ctr); - exports.Set(Napi::String::New(env, "Signature"), ctr); - - Napi::Object js_exports = exports.Get("BLST_CONSTANTS").As(); - js_exports.Set( - Napi::String::New(env, "SIGNATURE_LENGTH_COMPRESSED"), - Napi::Number::New(env, signature_length_compressed)); - js_exports.Set( - Napi::String::New(env, "SIGNATURE_LENGTH_UNCOMPRESSED"), - Napi::Number::New(env, signature_length_uncompressed)); -} - -Napi::Value Signature::Deserialize(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - Napi::Value sig_bytes_val = info[0]; - BLST_TS_UNWRAP_UINT_8_ARRAY(sig_bytes_val, sig_bytes, "sigBytes") - - if (std::optional err_msg = blst_ts::is_valid_length( - sig_bytes.ByteLength(), - signature_length_compressed, - signature_length_uncompressed)) { - Napi::TypeError::New(env, "BLST_ERROR: sigBytes"s + *err_msg) - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - - bool is_affine = false; - // but figure out if request for affine - if (!info[1].IsUndefined()) { - Napi::Value type_val = info[1].As(); - if (!type_val.IsNumber()) { - Napi::TypeError::New( - env, "BLST_ERROR: type must be of enum CoordType (number)") - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - switch (type_val.As().Uint32Value()) { - case 0: - is_affine = true; - break; - case 1: - // is_affine defaults to false - break; - default: - Napi::TypeError::New( - env, - "BLST_ERROR: must be CoordType.affine or " - "CoordType.jacobian") - .ThrowAsJavaScriptException(); - return env.Undefined(); - } - } - - // try/catch here because using untrusted bytes for point creation and - // blst library will throw for invalid points - try { - if (is_affine) { - return scope.Escape( - module->signature_ctr.New({Napi::External::New( - env, - new P2Affine{blst::P2_Affine{ - sig_bytes.Data(), sig_bytes.ByteLength()}})})); - } - return scope.Escape( - module->signature_ctr.New({Napi::External::New( - env, - new P2{blst::P2{sig_bytes.Data(), sig_bytes.ByteLength()}})})); - } catch (const blst::BLST_ERROR &err) { - Napi::RangeError::New(env, module->GetBlstErrorString(err)) - .ThrowAsJavaScriptException(); - return env.Undefined(); - } catch (...) { - Napi::Error::New( - env, "BLST_ERROR: Unknown error deserializing PublicKey") - .ThrowAsJavaScriptException(); - return env.Undefined(); - } -} - -Signature::Signature(const Napi::CallbackInfo &info) - : Napi::ObjectWrap{info}, point{nullptr} { - Napi::Env env = info.Env(); - Napi::HandleScope scope(env); - // Check that constructor was called from C++ and not JS. Externals can only - // be created natively. - if (!info[0].IsExternal()) { - Napi::Error::New(env, "Signature constructor is private") - .ThrowAsJavaScriptException(); - return; - } - point.reset(info[0].As>().Data()); -} - -Napi::Value Signature::Serialize(const Napi::CallbackInfo &info){ - BLST_TS_SERIALIZE_POINT(signature)} - -Napi::Value Signature::SigValidate(const Napi::CallbackInfo &info) { - Napi::Env env = info.Env(); - Napi::HandleScope scope(env); - if (!point->InGroup()) { - Napi::Error::New(env, "BLST_ERROR::BLST_POINT_NOT_IN_GROUP") - .ThrowAsJavaScriptException(); - } - return env.Undefined(); -} - -Napi::Value Signature::IsInfinity(const Napi::CallbackInfo &info) { - Napi::Env env = info.Env(); - Napi::EscapableHandleScope scope(env); - return scope.Escape(Napi::Boolean::New(env, point->IsInfinite())); -} - -Napi::Value Signature::MultiplyBy(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - Napi::Value rand_bytes_value = info[0]; - BLST_TS_UNWRAP_UINT_8_ARRAY(rand_bytes_value, rand_bytes, "randomBytes") - - Napi::Object sig_obj = module->signature_ctr.New( - // Default to jacobian coordinates - {Napi::External::New( - env, - new P2{point->MultiplyBy( - rand_bytes.Data(), rand_bytes.ByteLength())}), - Napi::Boolean::New(env, false)}); - - return scope.Escape(sig_obj); -} -} // namespace blst_ts diff --git a/src/signature.h b/src/signature.h deleted file mode 100644 index a54160e7..00000000 --- a/src/signature.h +++ /dev/null @@ -1,85 +0,0 @@ -#pragma once - -#include "addon.h" - -namespace blst_ts { -static const size_t signature_length_compressed = 96; -static const size_t signature_length_uncompressed = 192; - -typedef struct { - std::unique_ptr smart_pointer; - blst::P2_Affine *raw_point; -} P2AffineGroup; - -class P2Wrapper { - public: - virtual ~P2Wrapper() = default; - virtual bool IsInfinite() const = 0; - virtual bool InGroup() const = 0; - virtual void AddTo(blst::P2 &point) const = 0; - virtual void Serialize(bool compress, blst::byte *out) const = 0; - virtual P2AffineGroup AsAffine() = 0; - virtual blst::P2 MultiplyBy( - const blst::byte *rand_bytes, const size_t rand_bytes_length) const = 0; - virtual void Sign( - const blst::SecretKey &key, - const uint8_t *msg, - const size_t msg_length, - const std::string &dst) = 0; -}; - -class P2 final : public P2Wrapper { - private: - blst::P2 _point; - - public: - P2(blst::P2 point) : _point(std::move(point)) {} - bool IsInfinite() const final { return _point.is_inf(); } - bool InGroup() const final { return _point.in_group(); } - void AddTo(blst::P2 &point) const final { point.add(_point); }; - void Serialize(bool compress, blst::byte *out) const final; - P2AffineGroup AsAffine() final; - blst::P2 MultiplyBy( - const blst::byte *rand_bytes, - const size_t rand_bytes_length) const final; - void Sign( - const blst::SecretKey &key, - const uint8_t *msg, - const size_t msg_length, - const std::string &dst) final; -}; - -class P2Affine final : public P2Wrapper { - private: - blst::P2_Affine _point; - - public: - P2Affine(blst::P2_Affine point) : _point(std::move(point)) {} - bool IsInfinite() const final { return _point.is_inf(); } - bool InGroup() const final { return _point.in_group(); } - void AddTo(blst::P2 &point) const final { point.add(_point); }; - void Serialize(bool compress, blst::byte *out) const final; - P2AffineGroup AsAffine() final; - blst::P2 MultiplyBy( - const blst::byte *rand_bytes, - const size_t rand_bytes_length) const final; - void Sign( - const blst::SecretKey &key, - const uint8_t *msg, - const size_t msg_length, - const std::string &dst) final; -}; - -class Signature final : public Napi::ObjectWrap { - public: - std::unique_ptr point; - - static void Init(Napi::Env env, Napi::Object &exports, BlstTsAddon *module); - static Napi::Value Deserialize(const Napi::CallbackInfo &info); - Signature(const Napi::CallbackInfo &info); - Napi::Value Serialize(const Napi::CallbackInfo &info); - Napi::Value SigValidate(const Napi::CallbackInfo &info); - Napi::Value IsInfinity(const Napi::CallbackInfo &info); - Napi::Value MultiplyBy(const Napi::CallbackInfo &info); -}; -} // namespace blst_ts diff --git a/src/verify_multiple_aggregate_signatures.cc b/src/verify_multiple_aggregate_signatures.cc deleted file mode 100644 index bf9a0571..00000000 --- a/src/verify_multiple_aggregate_signatures.cc +++ /dev/null @@ -1,218 +0,0 @@ -#include "functions.h" - -namespace blst_ts_functions { -typedef struct { - blst_ts::P1AffineGroup pk_point; - blst_ts::P2AffineGroup sig_point; - uint8_t *msg; - size_t msg_len; -} SignatureSet; - -/** - * Preparation phase for multiple aggregate verification. Handles incoming JS - * arguments and prepares them for use by the native layer. Must be run on JS - * thread! - * - * @param[out] sets - Sets to be added to pairing - * @param[in] info - JS function context - */ -blst_ts::BLST_TS_ERROR prepare_verify_multiple_aggregate_signatures( - std::vector &sets, const Napi::CallbackInfo &info) { - Napi::Env env = info.Env(); - if (!info[0].IsArray()) { - Napi::Error::New( - env, "BLST_ERROR: signatureSets must be of type SignatureSet[]") - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - Napi::Array sets_array = info[0].As(); - uint32_t sets_array_length = sets_array.Length(); - - sets.reserve(sets_array_length); - - for (uint32_t i = 0; i < sets_array_length; i++) { - Napi::Value set_value = sets_array[i]; - if (!set_value.IsObject()) { - Napi::Error::New(env, "BLST_ERROR: signatureSet must be an object") - .ThrowAsJavaScriptException(); - return blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN; - } - Napi::Object set = set_value.As(); - - Napi::Value msg_value = set.Get("message"); - BLST_TS_FUNCTION_UNWRAP_UINT_8_ARRAY(msg_value, msg, "message") - - sets.push_back( - {blst_ts::P1AffineGroup{}, - blst_ts::P2AffineGroup{}, - msg.Data(), - msg.ByteLength()}); - - blst_ts::BLST_TS_ERROR err = - unwrap_public_key(sets[i].pk_point, env, set.Get("publicKey")); - if (err != blst_ts::BLST_TS_ERROR::SUCCESS) { - return err; - } - - err = unwrap_signature(sets[i].sig_point, env, set.Get("signature")); - if (err != blst_ts::BLST_TS_ERROR::SUCCESS) { - return err; - } - } - - return blst_ts::BLST_TS_ERROR::SUCCESS; -} - -/** - * Aggregate verify multiple signatures. Consumes SignatureSets created in - * preparation phase. Safe to use in libuv thread. - * - * @param[out] result - Result of the verification - * @param[out] error_msg - Error message for invalid aggregate - * @param[in] module - Addon module - * @param[in] ctx - Pointer to paring for the verification - * @param[in] sets - Sets to be added to pairing - */ -blst_ts::BLST_TS_ERROR verify_multiple_aggregate_signatures( - bool &result, - std::string &error_msg, - BlstTsAddon *module, - std::unique_ptr &ctx, - std::vector &sets) { - for (uint32_t i = 0; i < sets.size(); i++) { - blst::byte rand[BLST_TS_RANDOM_BYTES_LENGTH]; - if (!module->GetRandomNonZeroBytes(rand, BLST_TS_RANDOM_BYTES_LENGTH)) { - error_msg = "BLST_ERROR: Failed to generate random bytes"; - return blst_ts::BLST_TS_ERROR::HAS_NATIVE_ERROR; - } - - blst::BLST_ERROR err = ctx->mul_n_aggregate( - sets[i].pk_point.raw_point, - sets[i].sig_point.raw_point, - rand, - BLST_TS_RANDOM_BYTES_LENGTH * 8, - sets[i].msg, - sets[i].msg_len); - if (err != blst::BLST_ERROR::BLST_SUCCESS) { - return blst_ts::BLST_TS_ERROR::INVALID; - } - } - ctx->commit(); - result = ctx->finalverify(); - return blst_ts::BLST_TS_ERROR::SUCCESS; -} - -/** - * Synchronous multiple aggregate verification. Implementation is handled the - * functions above (prepare_verify_multiple_aggregate_signatures and - * verify_multiple_aggregate_signatures) - */ -Napi::Value VerifyMultipleAggregateSignatures(const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - try { - bool result{false}; - std::string error_msg{}; - std::vector sets{}; - blst_ts::BLST_TS_ERROR error = - prepare_verify_multiple_aggregate_signatures(sets, info); - if (error == blst_ts::BLST_TS_ERROR::SUCCESS) { - std::unique_ptr ctx = - std::make_unique(true, module->dst); - error = verify_multiple_aggregate_signatures( - result, error_msg, module, ctx, sets); - } - switch (error) { - case blst_ts::BLST_TS_ERROR::SUCCESS: - return scope.Escape(Napi::Boolean::New(env, result)); - case blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN: - return scope.Escape(env.Undefined()); - case blst_ts::BLST_TS_ERROR::HAS_NATIVE_ERROR: - Napi::Error::New(env, error_msg).ThrowAsJavaScriptException(); - return scope.Escape(env.Undefined()); - default: - case blst_ts::BLST_TS_ERROR::INVALID: - return scope.Escape(Napi::Boolean::New(env, false)); - } - } catch (...) { - return Napi::Boolean::New(env, false); - } -} - -class VerifyMultipleAggregateSignaturesWorker : public Napi::AsyncWorker { - public: - VerifyMultipleAggregateSignaturesWorker( - const Napi::CallbackInfo &info, - BlstTsAddon *module, - std::vector sets) - : Napi:: - AsyncWorker{info.Env(), "VerifyMultipleAggregateSignaturesWorker"}, - deferred{Env()}, - _module{std::move(module)}, - _ctx{std::make_unique(true, _module->dst)}, - _sets{std::move(sets)}, - _sets_ref{Napi::Persistent(info[0])}, - _result{false} {} - - /** - * GetPromise associated with deferred for return to JS - */ - Napi::Promise GetPromise() { return deferred.Promise(); } - - protected: - void Execute() { - std::string error_msg{}; - blst_ts::BLST_TS_ERROR error = verify_multiple_aggregate_signatures( - _result, error_msg, _module, _ctx, _sets); - if (error == blst_ts::BLST_TS_ERROR::HAS_NATIVE_ERROR) { - SetError(error_msg); - } - } - void OnOK() { deferred.Resolve(Napi::Boolean::New(Env(), _result)); } - void OnError(const Napi::Error &err) { deferred.Reject(err.Value()); } - - public: - Napi::Promise::Deferred deferred; - - private: - BlstTsAddon *_module; - std::unique_ptr _ctx; - std::vector _sets; - Napi::Reference _sets_ref; - bool _result; -}; - -/** - * Asynchronous multiple aggregate verification. Implementation is handled the - * functions above (prepare_verify_multiple_aggregate_signatures and - * verify_multiple_aggregate_signatures) - */ -Napi::Value AsyncVerifyMultipleAggregateSignatures( - const Napi::CallbackInfo &info) { - BLST_TS_FUNCTION_PREAMBLE(info, env, module) - std::vector sets{}; - blst_ts::BLST_TS_ERROR error; - try { - error = prepare_verify_multiple_aggregate_signatures(sets, info); - } catch (...) { - error = blst_ts::BLST_TS_ERROR::INVALID; - } - switch (error) { - case blst_ts::BLST_TS_ERROR::SUCCESS: - break; - case blst_ts::BLST_TS_ERROR::JS_ERROR_THROWN: - return info.Env().Undefined(); - default: - case blst_ts::BLST_TS_ERROR::INVALID: - Napi::Promise::Deferred deferred{env}; - deferred.Resolve(Napi::Boolean::New(env, false)); - return deferred.Promise(); - } - - // gets deleted by Node after async work completes - VerifyMultipleAggregateSignaturesWorker *worker = - new VerifyMultipleAggregateSignaturesWorker( - info, module, std::move(sets)); - worker->Queue(); - return worker->GetPromise(); -} -} // namespace blst_ts_functions diff --git a/test/__fixtures__/index.ts b/test/__fixtures__/index.ts index f4b3eda1..83138e5e 100644 --- a/test/__fixtures__/index.ts +++ b/test/__fixtures__/index.ts @@ -40,7 +40,7 @@ export const validPublicKey = { }; export const badPublicKey = Uint8Array.from( Buffer.from([ - ...Uint8Array.prototype.slice.call(getTestSet().publicKey.serialize(false), 8), + ...Uint8Array.prototype.slice.call(getTestSet().pk.toBytes(false), 8), ...Buffer.from("0123456789abcdef", "hex"), ]) ); @@ -65,4 +65,4 @@ export const validSignature = { ), }; -export const badSignature = sullyUint8Array(getTestSet().signature.serialize(false)); +export const badSignature = sullyUint8Array(getTestSet().sig.toBytes(false)); diff --git a/test/fuzz/exec.ts b/test/fuzz/exec.ts new file mode 100644 index 00000000..28b6b2dd --- /dev/null +++ b/test/fuzz/exec.ts @@ -0,0 +1,56 @@ +import {exec as EXEC, ExecOptions, ChildProcess, PromiseWithChild} from "node:child_process"; + +export interface ExecPromiseOptions extends ExecOptions { + pipeInput?: boolean; +} + +const defaultOptions: ExecPromiseOptions = { + timeout: 3 * 60 * 1000, // ms + maxBuffer: 10e6, // bytes + pipeInput: false, +}; + +export function exec( + command: string, + logToConsole = true, + execOptions: ExecPromiseOptions = {} +): PromiseWithChild { + const options = {...defaultOptions, ...execOptions}; + + let child!: ChildProcess; + const promise = new Promise((resolve, reject) => { + const chunks: Buffer[] = []; + function bufferOutput(data: string): void { + chunks.push(Buffer.from(data)); + } + function stdoutHandler(data: string): void { + process.stdout.write(data); + } + function stderrHandler(data: string): void { + process.stderr.write(data); + } + + child = EXEC(command, options, (err) => { + child.stdout?.removeAllListeners("data"); + child.stderr?.removeAllListeners("data"); + const output = Buffer.concat(chunks).toString("utf8"); + if (err) { + return reject(err); + } + return resolve(output); + }); + + if (child.stdin && options.pipeInput) { + process.stdin.pipe(child.stdin); + } + child.stdout?.on("data", logToConsole ? stdoutHandler : bufferOutput); + child.stderr?.on("data", logToConsole ? stderrHandler : bufferOutput); + + child.on("exit", () => { + return resolve(Buffer.concat(chunks).toString("utf8")); + }); + }) as PromiseWithChild; + + promise.child = child; + return promise; +} diff --git a/test/fuzz/fuzz.test.ts b/test/fuzz/fuzz.test.ts index 2b113407..5305271c 100644 --- a/test/fuzz/fuzz.test.ts +++ b/test/fuzz/fuzz.test.ts @@ -3,7 +3,7 @@ import fs from "fs"; import {resolve} from "path"; import {PromiseWithChild, execSync} from "child_process"; import {testCases} from "./testCases"; -import {exec} from "../../utils"; +import {exec} from "./exec"; /** * Fuzz testing framework diff --git a/test/fuzz/fuzzTarget.ts b/test/fuzz/fuzzTarget.ts index 2a8c4d41..c81c812b 100644 --- a/test/fuzz/fuzzTarget.ts +++ b/test/fuzz/fuzzTarget.ts @@ -18,6 +18,6 @@ export async function fuzz(data: Buffer): Promise { if (e instanceof Error && testCase?.expectedErrors.includes(e.message)) { return; } - throw e; + throw new Error(`in ${testCase?.name}: ${(e as Error).message}`); } } diff --git a/test/fuzz/testCases.ts b/test/fuzz/testCases.ts index 3de8fdd8..7d4326df 100644 --- a/test/fuzz/testCases.ts +++ b/test/fuzz/testCases.ts @@ -1,4 +1,4 @@ -import {verify, SecretKey, PublicKey, Signature} from "../../lib"; +import {verify, SecretKey, PublicKey, Signature} from "../../index.js"; export interface FuzzTestCase { name: string; @@ -12,46 +12,35 @@ export const testCases: FuzzTestCase[] = [ target: (data: Buffer) => { return SecretKey.fromKeygen(data); }, - expectedErrors: ["ikm must be greater than or equal to 32 bytes"], + expectedErrors: ["Invalid encoding"], }, { name: "SecretKey.deserialize", target: (data: Buffer) => { - return SecretKey.deserialize(data); + return SecretKey.fromBytes(data); }, - expectedErrors: ["BLST_ERROR: skBytes must be 32 bytes long"], + expectedErrors: ["Invalid encoding"], }, { name: "secretKey.sign", target: (data: Buffer) => { - return SecretKey.fromKeygen(Buffer.alloc(32), "*").sign(data); + return SecretKey.fromKeygen(Buffer.alloc(32), Buffer.from("*")).sign(data); }, expectedErrors: [], }, { name: "PublicKey.deserialize", target: (data: Buffer) => { - return PublicKey.deserialize(data); + return PublicKey.fromBytes(data); }, - expectedErrors: [ - "BLST_ERROR::BLST_PK_IS_INFINITY", - "BLST_ERROR::BLST_POINT_NOT_IN_GROUP", - "BLST_ERROR::BLST_POINT_NOT_ON_CURVE", - "BLST_ERROR::BLST_BAD_ENCODING", - "BLST_ERROR: pkBytes must be 48 or 96 bytes long", - ], + expectedErrors: ["Invalid encoding", "Point not on curve", "Point not in group", "Public key is infinity"], }, { name: "Signature.deserialize", target: (data: Buffer) => { - return Signature.deserialize(data); + return Signature.fromBytes(data); }, - expectedErrors: [ - "BLST_ERROR::BLST_POINT_NOT_IN_GROUP", - "BLST_ERROR::BLST_POINT_NOT_ON_CURVE", - "BLST_ERROR::BLST_BAD_ENCODING", - "BLST_ERROR: sigBytes must be 96 or 192 bytes long", - ], + expectedErrors: ["Invalid encoding", "Point not on curve", "Point not in group"], }, { name: "verify", diff --git a/test/memory/memory.test.ts b/test/memory/memory.test.ts index c4cf69ba..864742b2 100644 --- a/test/memory/memory.test.ts +++ b/test/memory/memory.test.ts @@ -1,10 +1,10 @@ import {memoryTest} from "../utils/memory/testRunner"; -import * as napi from "../../lib"; +import * as napi from "../../index.js"; const sk = napi.SecretKey.fromKeygen(Buffer.alloc(32, "*&@#")); -const skBytes = sk.serialize(); -const pk = sk.toPublicKey().serialize(); -const sig = sk.sign(Buffer.alloc(32, "*&@#")).serialize(); +const skBytes = sk.toBytes(); +const pk = sk.toPublicKey().toBytes(); +const sig = sk.sign(Buffer.alloc(32, "*&@#")).toBytes(); // eslint-disable-next-line @typescript-eslint/no-floating-promises (async function runMemoryTests() { @@ -12,15 +12,15 @@ const sig = sk.sign(Buffer.alloc(32, "*&@#")).serialize(); [ { id: "Napi SecretKey", - getInstance: () => napi.SecretKey.deserialize(skBytes), + getInstance: () => napi.SecretKey.fromBytes(skBytes), }, { id: "Napi PublicKey", - getInstance: () => napi.PublicKey.deserialize(pk), + getInstance: () => napi.PublicKey.fromBytes(pk), }, { id: "Napi Signature", - getInstance: () => napi.Signature.deserialize(sig), + getInstance: () => napi.Signature.fromBytes(sig), }, ], { diff --git a/test/perf/PublicKey.test.ts b/test/perf/PublicKey.test.ts index e5c40214..35e3c002 100644 --- a/test/perf/PublicKey.test.ts +++ b/test/perf/PublicKey.test.ts @@ -1,30 +1,29 @@ import {itBench} from "@dapplion/benchmark"; -import * as blst from "../../lib"; +import * as blst from "../../index.js"; import {arrayOfIndexes, getTestSet, getSerializedTestSet} from "../utils"; -const napiTestKey = getTestSet(0).publicKey; +const napiTestKey = getTestSet(0).pk; describe("PublicKey", () => { itBench("PublicKey serialization", () => { - napiTestKey.serialize(); + napiTestKey.toBytes(); }); itBench({ id: "PublicKey deserialize", - beforeEach: () => napiTestKey.serialize(), + beforeEach: () => napiTestKey.toBytes(), fn: (serialized) => { - blst.PublicKey.deserialize(serialized, blst.CoordType.jacobian); + blst.PublicKey.fromBytes(serialized, false); }, }); for (const count of [1, 100, 10_000]) { itBench({ id: `PublicKey deserialize and validate - ${count} keys`, - beforeEach: () => arrayOfIndexes(0, count - 1).map((i) => getSerializedTestSet(i % 256).publicKey), + beforeEach: () => arrayOfIndexes(0, count - 1).map((i) => getSerializedTestSet(i % 256).pk), fn: (publicKeys) => { for (const publicKey of publicKeys) { - const key = blst.PublicKey.deserialize(publicKey, blst.CoordType.affine); - key.keyValidate(); + blst.PublicKey.fromBytes(publicKey, true); } }, }); diff --git a/test/perf/SecretKey.test.ts b/test/perf/SecretKey.test.ts index 907c6b97..e19f59df 100644 --- a/test/perf/SecretKey.test.ts +++ b/test/perf/SecretKey.test.ts @@ -1,23 +1,24 @@ import {itBench} from "@dapplion/benchmark"; -import * as blst from "../../lib"; -import {keygenMaterial, commonMessage, getTestSet} from "../utils"; +import * as blst from "../../index.js"; +import {commonMessage, getTestSet} from "../utils"; -const napiTestKey = getTestSet(0).secretKey; +const napiTestKey = getTestSet(0).sk; describe("SecretKey", () => { + const ikm = Buffer.alloc(32, 1); itBench("SecretKey.fromKeygen", () => { - blst.SecretKey.fromKeygen(keygenMaterial); + blst.SecretKey.fromKeygen(ikm); }); itBench("SecretKey serialization", () => { - napiTestKey.serialize(); + napiTestKey.toBytes(); }); itBench({ id: "SecretKey deserialization", - beforeEach: () => napiTestKey.serialize(), + beforeEach: () => napiTestKey.toBytes(), fn: (serialized) => { - blst.SecretKey.deserialize(serialized); + blst.SecretKey.fromBytes(serialized); }, }); diff --git a/test/perf/Signature.test.ts b/test/perf/Signature.test.ts index cf109b0b..49481e51 100644 --- a/test/perf/Signature.test.ts +++ b/test/perf/Signature.test.ts @@ -1,30 +1,32 @@ import {itBench} from "@dapplion/benchmark"; -import * as blst from "../../lib"; +import * as blst from "../../index.js"; import {arrayOfIndexes, getTestSet, getSerializedTestSet} from "../utils"; -const napiTestSignature = getTestSet(0).signature; +const napiTestSignature = getTestSet(0).sig; describe("Signature", () => { itBench("Signature serialization", () => { - napiTestSignature.serialize(); + napiTestSignature.toBytes(); }); itBench({ id: "Signature deserialize", - beforeEach: () => napiTestSignature.serialize(), + beforeEach: () => napiTestSignature.toBytes(), fn: (serialized) => { - blst.Signature.deserialize(serialized, blst.CoordType.jacobian); + blst.Signature.fromBytes(serialized); }, }); for (const count of [1, 100, 10_000]) { itBench({ id: `Signatures deserialize and validate - ${count} sets`, - beforeEach: () => arrayOfIndexes(0, count - 1).map((i) => getSerializedTestSet(i % 256).signature), + before() { + return arrayOfIndexes(0, count - 1).map((i) => getSerializedTestSet(i % 256).sig); + }, + beforeEach: (sigs) => sigs, fn: (signatures) => { for (const signature of signatures) { - const sig = blst.Signature.deserialize(signature, blst.CoordType.affine); - sig.sigValidate(); + blst.Signature.fromBytes(signature, true); } }, }); diff --git a/test/perf/functions.test.ts b/test/perf/functions.test.ts index 4897d321..cd674e16 100644 --- a/test/perf/functions.test.ts +++ b/test/perf/functions.test.ts @@ -1,5 +1,5 @@ import {itBench} from "@dapplion/benchmark"; -import * as blst from "../../lib"; +import * as blst from "../../index.js"; import {arrayOfIndexes, getTestSet, getTestSetSameMessage, getTestSetsSameMessage} from "../utils"; describe("functions", () => { @@ -7,7 +7,7 @@ describe("functions", () => { for (const count of [1, 8, 32, 128, 256]) { itBench({ id: `aggregatePublicKeys - ${count} sets`, - beforeEach: () => arrayOfIndexes(0, count - 1).map((i) => getTestSet(i).publicKey), + beforeEach: () => arrayOfIndexes(0, count - 1).map((i) => getTestSet(i).pk), fn: (publicKeys) => { blst.aggregatePublicKeys(publicKeys); }, @@ -18,7 +18,7 @@ describe("functions", () => { for (const count of [1, 8, 32, 128, 256]) { itBench({ id: `aggregateSignatures - ${count} sets`, - beforeEach: () => arrayOfIndexes(0, count - 1).map((i) => getTestSet(i).signature), + beforeEach: () => arrayOfIndexes(0, count - 1).map((i) => getTestSet(i).sig), fn: (signatures) => { blst.aggregateSignatures(signatures); }, @@ -26,43 +26,22 @@ describe("functions", () => { } }); describe("aggregateWithRandomness", () => { - const SAME_MESSAGE_SET_COUNT = 1024; - itBench({ - id: "JS version of aggregateWithRandomness", - beforeEach: () => { - const {sets} = getTestSetsSameMessage(SAME_MESSAGE_SET_COUNT); - return sets.map((s) => ({ - publicKey: s.publicKey, - signature: s.signature.serialize(), - })); - }, - fn: (sets) => { - const signatures = sets.map((set) => { - const sig = blst.Signature.deserialize(set.signature, blst.CoordType.jacobian); - sig.sigValidate(); - return sig; - }); - const randomness: Uint8Array[] = []; - for (let i = 0; i < sets.length; i++) { - randomness.push(blst.randomBytesNonZero(8)); - } - blst.aggregatePublicKeys(sets.map((set, i) => set.publicKey.multiplyBy(randomness[i]))); - blst.aggregateSignatures(signatures.map((sig, i) => sig.multiplyBy(randomness[i]))); - }, - }); - itBench({ - id: "native version of aggregateWithRandomness", - beforeEach: () => { - const {sets} = getTestSetsSameMessage(SAME_MESSAGE_SET_COUNT); - return sets.map((s) => ({ - publicKey: s.publicKey, - signature: s.signature.serialize(), - })); - }, - fn: (sets) => { - blst.aggregateWithRandomness(sets, true); - }, - }); + for (const count of [1, 16, 128, 256, 512, 1024]) { + itBench({ + id: `aggregateWithRandomness - ${count} sets`, + before: () => { + const {sets} = getTestSetsSameMessage(count); + return sets.map((s) => ({ + pk: s.pk, + sig: s.sig.toBytes(), + })); + }, + beforeEach: (sets) => sets, + fn: (sets) => { + blst.aggregateWithRandomness(sets); + }, + }); + } }); describe("aggregateVerify", () => { for (const count of [1, 8, 32, 128, 256]) { @@ -73,14 +52,14 @@ describe("functions", () => { .map((i) => getTestSet(i)) .reduce( (sets, set) => ({ - messages: [...sets.messages, set.message], - publicKeys: [...sets.publicKeys, set.publicKey], - signatures: [...sets.signatures, set.signature], + messages: [...sets.messages, set.msg], + publicKeys: [...sets.publicKeys, set.pk], + signatures: [...sets.signatures, set.sig], }), { messages: [] as Uint8Array[], - publicKeys: [] as blst.PublicKeyArg[], - signatures: [] as blst.SignatureArg[], + publicKeys: [] as blst.PublicKey[], + signatures: [] as blst.Signature[], } ); return { @@ -115,18 +94,17 @@ describe("functions", () => { .map((i) => getTestSetSameMessage(i)) .map((set) => { return { - message: set.message, - secretKey: set.secretKey, - publicKey: set.publicKey, - signature: set.signature.serialize(), + message: set.msg, + secretKey: set.sk, + publicKey: set.pk, + signature: set.sig.toBytes(), }; }), fn: (sets) => { const aggregatedPubkey = blst.aggregatePublicKeys(sets.map((set) => set.publicKey)); const aggregatedSignature = blst.aggregateSignatures( sets.map((set) => { - const sig = blst.Signature.deserialize(set.signature, blst.CoordType.affine); - sig.sigValidate(); + const sig = blst.Signature.fromBytes(set.signature, true, true); return sig; }) ); diff --git a/test/perf/multithreading.test.ts b/test/perf/multithreading.test.ts deleted file mode 100644 index 789f7df1..00000000 --- a/test/perf/multithreading.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {itBench} from "@dapplion/benchmark"; -import {expect} from "chai"; -import {BlsMultiThreading, getGroupsOfBatchesOfSignatureSets} from "../utils"; - -const minutes = 10; -const groupsInfo: Parameters = [16, 128, 256, 256]; - -for (const addVerificationRandomness of [true, false]) { - describe(`multithreading perf - addVerificationRandomness ${addVerificationRandomness}`, function () { - this.timeout(minutes * 60 * 1000); - let blsPool: BlsMultiThreading; - let signatureGroups: ReturnType; - - before(async () => { - blsPool = new BlsMultiThreading({addVerificationRandomness}); - signatureGroups = getGroupsOfBatchesOfSignatureSets(...groupsInfo); - }); - - itBench({ - id: `libuv multithreading - addVerificationRandomness ${addVerificationRandomness}`, - fn: async () => { - const responses = [] as Promise[]; - for (const sets of signatureGroups) { - responses.push(blsPool.verifySignatureSets(sets, {batchable: true})); - } - const results = await Promise.all(responses); - expect(results.every((r) => r)).to.be.true; - }, - }); - - after(async () => { - // eslint-disable-next-line no-console - console.log({ - blsPoolSize: blsPool.blsPoolSize, - }); - await blsPool.close(); - }); - }); -} diff --git a/test/spec/functions.ts b/test/spec/functions.ts index 4248bf6f..5d058b1f 100644 --- a/test/spec/functions.ts +++ b/test/spec/functions.ts @@ -9,8 +9,8 @@ import { fastAggregateVerify, verifyMultipleAggregateSignatures, SignatureSet, -} from "../../lib"; -import {fromHex, toHex} from "../utils"; +} from "../../index.js"; +import {CodeError, fromHex} from "../utils"; import {G2_POINT_AT_INFINITY} from "./utils"; export const testFnByName: Record any> = { @@ -26,6 +26,11 @@ export const testFnByName: Record any> = { deserialization_G2, }; +function catchBLSTError(e: unknown): boolean { + if ((e as CodeError).code?.startsWith("BLST")) return false; + throw e; +} + /** * ``` * input: List[BLS Signature] -- list of input BLS signatures @@ -33,8 +38,7 @@ export const testFnByName: Record any> = { * ``` */ function aggregate(input: string[]): string | null { - const agg = aggregateSignatures(input.map(fromHex)); - return toHex(agg.serialize()); + return aggregateSignatures(input.map((hex) => Signature.fromHex(hex))).toHex(); } /** @@ -48,7 +52,15 @@ function aggregate(input: string[]): string | null { */ function aggregate_verify(input: {pubkeys: string[]; messages: string[]; signature: string}): boolean { const {pubkeys, messages, signature} = input; - return aggregateVerify(messages.map(fromHex), pubkeys.map(fromHex), fromHex(signature)); + try { + return aggregateVerify( + messages.map(fromHex), + pubkeys.map((hex) => PublicKey.fromHex(hex)), + Signature.fromHex(signature) + ); + } catch (e) { + return catchBLSTError(e); + } } /** @@ -58,8 +70,7 @@ function aggregate_verify(input: {pubkeys: string[]; messages: string[]; signatu * ``` */ function eth_aggregate_pubkeys(input: string[]): string | null { - const agg = aggregatePublicKeys(input.map(fromHex)); - return toHex(agg.serialize()); + return aggregatePublicKeys(input.map((hex) => PublicKey.fromHex(hex, true))).toHex(); } /** @@ -78,7 +89,15 @@ function eth_fast_aggregate_verify(input: {pubkeys: string[]; message: string; s return true; } - return fastAggregateVerify(fromHex(message), pubkeys.map(fromHex), fromHex(signature)); + try { + return fastAggregateVerify( + fromHex(message), + pubkeys.map((hex) => PublicKey.fromHex(hex, true)), + Signature.fromHex(signature) + ); + } catch (e) { + return catchBLSTError(e); + } } /** @@ -90,10 +109,18 @@ function eth_fast_aggregate_verify(input: {pubkeys: string[]; message: string; s * output: bool -- true (VALID) or false (INVALID) * ``` */ -function fast_aggregate_verify(input: {pubkeys: string[]; message: string; signature: string}): boolean | null { +function fast_aggregate_verify(input: {pubkeys: string[]; message: string; signature: string}): boolean { const {pubkeys, message, signature} = input; - return fastAggregateVerify(fromHex(message), pubkeys.map(fromHex), fromHex(signature)); + try { + return fastAggregateVerify( + fromHex(message), + pubkeys.map((hex) => PublicKey.fromHex(hex, true)), + Signature.fromHex(signature) + ); + } catch (e) { + return catchBLSTError(e); + } } /** @@ -104,9 +131,7 @@ function fast_aggregate_verify(input: {pubkeys: string[]; message: string; signa */ function sign(input: {privkey: string; message: string}): string | null { const {privkey, message} = input; - const sk = SecretKey.deserialize(fromHex(privkey)); - const signature = sk.sign(fromHex(message)); - return toHex(signature.serialize()); + return SecretKey.fromHex(privkey).sign(fromHex(message)).toHex(); } /** @@ -118,7 +143,11 @@ function sign(input: {privkey: string; message: string}): string | null { */ function verify(input: {pubkey: string; message: string; signature: string}): boolean { const {pubkey, message, signature} = input; - return VERIFY(fromHex(message), fromHex(pubkey), fromHex(signature)); + try { + return VERIFY(fromHex(message), PublicKey.fromHex(pubkey), Signature.fromHex(signature)); + } catch (e) { + return catchBLSTError(e); + } } /** @@ -137,14 +166,18 @@ function batch_verify(input: {pubkeys: string[]; messages: string[]; signatures: throw new Error("Invalid spec test. Must have same number in each array. Check spec yaml file"); } const sets: SignatureSet[] = []; - for (let i = 0; i < length; i++) { - sets.push({ - message: fromHex(input.messages[i]), - publicKey: fromHex(input.pubkeys[i]), - signature: fromHex(input.signatures[i]), - }); + try { + for (let i = 0; i < length; i++) { + sets.push({ + msg: fromHex(input.messages[i]), + pk: PublicKey.fromHex(input.pubkeys[i]), + sig: Signature.fromHex(input.signatures[i]), + }); + } + return verifyMultipleAggregateSignatures(sets); + } catch (e) { + return catchBLSTError(e); } - return verifyMultipleAggregateSignatures(sets); } /** @@ -156,11 +189,10 @@ function batch_verify(input: {pubkeys: string[]; messages: string[]; signatures: */ function deserialization_G1(input: {pubkey: string}): boolean { try { - const pk = PublicKey.deserialize(fromHex(input.pubkey)); - pk.keyValidate(); + PublicKey.fromHex(input.pubkey, true); return true; - } catch { - return false; + } catch (e) { + return catchBLSTError(e); } } @@ -173,10 +205,9 @@ function deserialization_G1(input: {pubkey: string}): boolean { */ function deserialization_G2(input: {signature: string}): boolean { try { - const sig = Signature.deserialize(fromHex(input.signature)); - sig.sigValidate(); + Signature.fromHex(input.signature, true); return true; - } catch { - return false; + } catch (e) { + return catchBLSTError(e); } } diff --git a/test/spec/specTestVersioning.ts b/test/spec/specTestVersioning.ts index 8199172e..0ee39ca5 100644 --- a/test/spec/specTestVersioning.ts +++ b/test/spec/specTestVersioning.ts @@ -1,4 +1,4 @@ -import {join} from "path"; +import {join} from "node:path"; import {DownloadTestsOptions} from "./utils"; // WARNING! Don't move or rename this file !!! diff --git a/test/spec/utils.ts b/test/spec/utils.ts index 686347be..6a49d03f 100644 --- a/test/spec/utils.ts +++ b/test/spec/utils.ts @@ -2,7 +2,7 @@ import fs from "node:fs"; import path from "node:path"; import stream from "node:stream"; import type {ReadableStream} from "node:stream/web"; -import tar from "tar"; +import * as tar from "tar"; import jsYaml from "js-yaml"; const REPO_ROOT = path.resolve(__dirname, "..", ".."); diff --git a/test/unit/PublicKey.test.ts b/test/unit/PublicKey.test.ts index 00c9b4b6..2dfa69ea 100644 --- a/test/unit/PublicKey.test.ts +++ b/test/unit/PublicKey.test.ts @@ -1,6 +1,6 @@ import {expect} from "chai"; -import {BLST_CONSTANTS, CoordType, PublicKey, SecretKey} from "../../lib"; -import {expectEqualHex, expectNotEqualHex, sullyUint8Array} from "../utils"; +import {PUBLIC_KEY_LENGTH_COMPRESSED, PUBLIC_KEY_LENGTH_UNCOMPRESSED, PublicKey, SecretKey} from "../../index.js"; +import {CodeError, expectEqualHex, expectNotEqualHex, sullyUint8Array} from "../utils"; import {validPublicKey, SECRET_KEY_BYTES, invalidInputs, G1_POINT_AT_INFINITY} from "../__fixtures__"; describe("PublicKey", () => { @@ -11,95 +11,72 @@ describe("PublicKey", () => { describe("new PublicKey()", () => { it("should have a private constructor", () => { // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return - expect(() => new (PublicKey as any)("foo-bar-baz")).to.throw("PublicKey constructor is private"); + expect(() => new (PublicKey as any)("foo-bar-baz")).to.throw( + "Class contains no `constructor`, can not new it!" + ); }); }); describe("deserialize", () => { it("should only take 48 or 96 bytes", () => { - expect(() => PublicKey.deserialize(Buffer.alloc(32, "*"))).to.throw( - "BLST_ERROR: pkBytes must be 48 or 96 bytes long" - ); + expect(() => PublicKey.fromBytes(Buffer.alloc(32, "*"))).to.throw("Invalid encoding"); }); it("should take uncompressed byte arrays", () => { - expectEqualHex( - PublicKey.deserialize(validPublicKey.uncompressed).serialize(false), - validPublicKey.uncompressed - ); + expectEqualHex(PublicKey.fromBytes(validPublicKey.uncompressed).toBytes(), validPublicKey.compressed); }); it("should take compressed byte arrays", () => { - expectEqualHex(PublicKey.deserialize(validPublicKey.compressed).serialize(), validPublicKey.compressed); - }); - it("should create jacobian or affine points", () => { - expectEqualHex( - PublicKey.deserialize(validPublicKey.compressed, CoordType.affine).serialize(), - validPublicKey.compressed - ); - expectEqualHex( - PublicKey.deserialize(validPublicKey.compressed, CoordType.jacobian).serialize(), - validPublicKey.compressed - ); + expectEqualHex(PublicKey.fromBytes(validPublicKey.compressed).toBytes(), validPublicKey.compressed); }); describe("argument validation", () => { for (const [type, invalid] of invalidInputs) { it(`should throw on invalid pkBytes type: ${type}`, () => { - expect(() => PublicKey.deserialize(invalid)).to.throw("pkBytes must be a BlstBuffer"); + expect(() => PublicKey.fromBytes(invalid)).to.throw(); }); } it("should throw incorrect length pkBytes", () => { - expect(() => PublicKey.deserialize(Buffer.alloc(12, "*"))).to.throw( - "BLST_ERROR: pkBytes must be 48 or 96 bytes long" - ); + expect(() => PublicKey.fromBytes(Buffer.alloc(12, "*"))).to.throw("Invalid encoding"); }); }); it("should throw on invalid key", () => { try { - PublicKey.deserialize(sullyUint8Array(validPublicKey.compressed)); + PublicKey.fromBytes(sullyUint8Array(validPublicKey.compressed), true); expect.fail("Did not throw error for badPublicKey"); } catch (e) { - expect( - (e as Error).message === "BLST_ERROR::BLST_POINT_NOT_ON_CURVE" || - (e as Error).message === "BLST_ERROR::BLST_BAD_ENCODING" - ).to.be.true; + expect((e as CodeError).code === "BLST_POINT_NOT_ON_CURVE" || (e as CodeError).code === "BLST_BAD_ENCODING") + .to.be.true; } }); it("should throw on zero key", () => { - expect(() => PublicKey.deserialize(Buffer.from(G1_POINT_AT_INFINITY))).to.throw("BLST_BAD_ENCODING"); + expect(() => PublicKey.fromBytes(Buffer.from(G1_POINT_AT_INFINITY))).to.throw("Invalid encoding"); }); }); }); describe("methods", () => { - describe("serialize", () => { - const sk = SecretKey.deserialize(SECRET_KEY_BYTES); + describe("toBytes", () => { + const sk = SecretKey.fromBytes(SECRET_KEY_BYTES); const pk = sk.toPublicKey(); - it("should serialize the key to Uint8Array", () => { - expect(pk.serialize()).to.be.instanceof(Uint8Array); + it("should toBytes the key to Uint8Array", () => { + expect(pk.toBytes()).to.be.instanceof(Uint8Array); }); it("should default to compressed serialization", () => { - expectEqualHex(pk.serialize(), pk.serialize(true)); - expectNotEqualHex(pk.serialize(), pk.serialize(false)); + expectEqualHex(pk.toBytes(), pk.toBytes(true)); + expectNotEqualHex(pk.toBytes(), pk.toBytes(false)); }); it("should serialize compressed to the correct length", () => { - expect(pk.serialize(true)).to.have.lengthOf(BLST_CONSTANTS.PUBLIC_KEY_LENGTH_COMPRESSED); + expect(pk.toBytes(true)).to.have.lengthOf(PUBLIC_KEY_LENGTH_COMPRESSED); }); it("should serialize uncompressed to the correct length", () => { - expect(pk.serialize(false)).to.have.lengthOf(BLST_CONSTANTS.PUBLIC_KEY_LENGTH_UNCOMPRESSED); - }); - it("should serialize affine and jacobian points to the same value", () => { - const jacobian = PublicKey.deserialize(pk.serialize(), CoordType.jacobian); - const affine = PublicKey.deserialize(pk.serialize(), CoordType.affine); - expectEqualHex(jacobian.serialize(true), affine.serialize(true)); - expectEqualHex(jacobian.serialize(false), affine.serialize(false)); + expect(pk.toBytes(false)).to.have.lengthOf(PUBLIC_KEY_LENGTH_UNCOMPRESSED); }); }); describe("toHex", () => { it("should toHex string correctly", () => { - const key = PublicKey.deserialize(validPublicKey.compressed); + const key = PublicKey.fromBytes(validPublicKey.compressed); expectEqualHex(key.toHex(true), validPublicKey.compressed); }); }); describe("keyValidate()", () => { it("should not throw on valid public key", () => { - const pk = PublicKey.deserialize(validPublicKey.uncompressed); + const pk = PublicKey.fromBytes(validPublicKey.uncompressed); expect(pk.keyValidate()).to.be.undefined; }); }); diff --git a/test/unit/SecretKey.test.ts b/test/unit/SecretKey.test.ts index 2ab018ca..c38908d9 100644 --- a/test/unit/SecretKey.test.ts +++ b/test/unit/SecretKey.test.ts @@ -1,5 +1,5 @@ import {expect} from "chai"; -import {PublicKey, SecretKey, Signature, BLST_CONSTANTS} from "../../lib"; +import {PublicKey, SECRET_KEY_LENGTH, SecretKey, Signature} from "../../index.js"; import {KEY_MATERIAL, SECRET_KEY_BYTES, invalidInputs} from "../__fixtures__"; import {expectEqualHex, expectNotEqualHex} from "../utils"; @@ -11,7 +11,9 @@ describe("SecretKey", () => { describe("new SecretKey()", () => { it("should have a private constructor", () => { // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return - expect(() => new (SecretKey as any)("foo-bar-baz")).to.throw("SecretKey constructor is private"); + expect(() => new (SecretKey as any)("foo-bar-baz")).to.throw( + "Class contains no `constructor`, can not new it!" + ); }); }); describe("SecretKey.fromKeygen", () => { @@ -19,46 +21,43 @@ describe("SecretKey", () => { expect(SecretKey.fromKeygen(KEY_MATERIAL)).to.be.instanceOf(SecretKey); }); it("should create the same key from the same ikm", () => { - expectEqualHex(SecretKey.fromKeygen(KEY_MATERIAL).serialize(), SecretKey.fromKeygen(KEY_MATERIAL).serialize()); + expectEqualHex(SecretKey.fromKeygen(KEY_MATERIAL).toBytes(), SecretKey.fromKeygen(KEY_MATERIAL).toBytes()); }); it("should take a second 'info' argument", () => { expectNotEqualHex( - SecretKey.fromKeygen(KEY_MATERIAL, "some fancy info").serialize(), - SecretKey.fromKeygen(KEY_MATERIAL).serialize() + SecretKey.fromKeygen(KEY_MATERIAL, Buffer.from("some fancy info")).toBytes(), + SecretKey.fromKeygen(KEY_MATERIAL).toBytes() ); }); describe("argument validation", () => { + const validInfoTypes = ["undefined", "null", "string"]; for (const [type, invalid] of invalidInputs) { it(`should throw on invalid ikm type: ${type}`, () => { - expect(() => SecretKey.fromKeygen(invalid)).to.throw("ikm must be a BlstBuffer"); + expect(() => SecretKey.fromKeygen(invalid)).to.throw(); }); - if (type !== "undefined" && type !== "string") { + if (!validInfoTypes.includes(type)) { it(`should throw on invalid info type: ${type}`, () => { - expect(() => SecretKey.fromKeygen(KEY_MATERIAL, invalid)).to.throw("info must be a string"); + expect(() => SecretKey.fromKeygen(KEY_MATERIAL, invalid)).to.throw(); }); } } it("should throw incorrect length ikm", () => { - expect(() => SecretKey.fromKeygen(Buffer.alloc(12, "*"))).to.throw( - "ikm must be greater than or equal to 32 bytes" - ); + expect(() => SecretKey.fromKeygen(Buffer.alloc(12, "*"))).to.throw("Invalid encoding"); }); }); }); - describe("SecretKey.deserialize", () => { + describe("SecretKey.fromBytes", () => { it("should create an instance", () => { - expect(SecretKey.deserialize(SECRET_KEY_BYTES)).to.be.instanceOf(SecretKey); + expect(SecretKey.fromBytes(SECRET_KEY_BYTES)).to.be.instanceOf(SecretKey); }); describe("argument validation", () => { for (const [type, invalid] of invalidInputs) { it(`should throw on invalid ikm type: ${type}`, () => { - expect(() => SecretKey.deserialize(invalid)).to.throw("skBytes must be a BlstBuffer"); + expect(() => SecretKey.fromBytes(invalid)).to.throw(); }); } it("should throw incorrect length ikm", () => { - expect(() => SecretKey.deserialize(Buffer.alloc(12, "*"))).to.throw( - "BLST_ERROR: skBytes must be 32 bytes long" - ); + expect(() => SecretKey.fromBytes(Buffer.alloc(12, "*"))).to.throw("Invalid encoding"); }); }); }); @@ -68,21 +67,21 @@ describe("SecretKey", () => { beforeEach(() => { key = SecretKey.fromKeygen(KEY_MATERIAL); }); - describe("serialize", () => { - it("should serialize the key to Uint8Array", () => { - expect(key.serialize()).to.be.instanceof(Uint8Array); + describe("toBytes", () => { + it("should toBytes the key to Uint8Array", () => { + expect(key.toBytes()).to.be.instanceof(Uint8Array); }); it("should be the correct length", () => { - expect(key.serialize().length).to.equal(BLST_CONSTANTS.SECRET_KEY_LENGTH); + expect(key.toBytes().length).to.equal(SECRET_KEY_LENGTH); }); it("should reconstruct the same key", () => { - const serialized = key.serialize(); - expectEqualHex(SecretKey.deserialize(serialized).serialize(), serialized); + const serialized = key.toBytes(); + expectEqualHex(SecretKey.fromBytes(serialized).toBytes(), serialized); }); }); describe("toHex", () => { it("should toHex string correctly", () => { - const key = SecretKey.deserialize(SECRET_KEY_BYTES); + const key = SecretKey.fromBytes(SECRET_KEY_BYTES); expectEqualHex(key.toHex(), SECRET_KEY_BYTES); }); }); @@ -93,9 +92,9 @@ describe("SecretKey", () => { expect(pk.keyValidate()).to.be.undefined; }); it("should return the same PublicKey from the same SecretKey", () => { - const sk = SecretKey.deserialize(SECRET_KEY_BYTES); - const pk1 = sk.toPublicKey().serialize(); - const pk2 = sk.toPublicKey().serialize(); + const sk = SecretKey.fromBytes(SECRET_KEY_BYTES); + const pk1 = sk.toPublicKey().toBytes(); + const pk2 = sk.toPublicKey().toBytes(); expectEqualHex(pk1, pk2); }); }); diff --git a/test/unit/Signature.test.ts b/test/unit/Signature.test.ts index 664138d1..4c0ee5b1 100644 --- a/test/unit/Signature.test.ts +++ b/test/unit/Signature.test.ts @@ -1,7 +1,7 @@ import {expect} from "chai"; -import {BLST_CONSTANTS, CoordType, SecretKey, Signature} from "../../lib"; +import {SIGNATURE_LENGTH_COMPRESSED, SIGNATURE_LENGTH_UNCOMPRESSED, SecretKey, Signature} from "../../"; import {expectEqualHex, expectNotEqualHex, sullyUint8Array} from "../utils"; -import {G2_POINT_AT_INFINITY, KEY_MATERIAL, invalidInputs, validSignature} from "../__fixtures__"; +import {KEY_MATERIAL, invalidInputs, validSignature} from "../__fixtures__"; describe("Signature", () => { it("should exist", () => { @@ -10,91 +10,62 @@ describe("Signature", () => { describe("constructor", () => { it("should have a private new Signature()", () => { // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return - expect(() => new (Signature as any)()).to.throw("Signature constructor is private"); + expect(() => new (Signature as any)()).to.throw("Class contains no `constructor`, can not new it!"); }); - describe("Signature.deserialize()", () => { + describe("Signature.fromBytes()", () => { it("should take uncompressed byte arrays", () => { - expectEqualHex( - Signature.deserialize(validSignature.uncompressed).serialize(false), - validSignature.uncompressed - ); + expectEqualHex(Signature.fromBytes(validSignature.uncompressed).toBytes(), validSignature.compressed); }); it("should take compressed byte arrays", () => { - expectEqualHex(Signature.deserialize(validSignature.compressed).serialize(), validSignature.compressed); - }); - it("should create jacobian or affine points", () => { - expectEqualHex( - Signature.deserialize(validSignature.compressed, CoordType.affine).serialize(), - validSignature.compressed - ); - expectEqualHex( - Signature.deserialize(validSignature.compressed, CoordType.jacobian).serialize(), - validSignature.compressed - ); + expectEqualHex(Signature.fromBytes(validSignature.compressed).toBytes(), validSignature.compressed); }); describe("argument validation", () => { for (const [type, invalid] of invalidInputs) { it(`should throw on invalid pkBytes type: ${type}`, () => { - expect(() => Signature.deserialize(invalid)).to.throw("sigBytes must be a BlstBuffer"); + expect(() => Signature.fromBytes(invalid)).to.throw(); }); } it("should only take 96 or 192 bytes", () => { - expect(() => Signature.deserialize(Buffer.alloc(32, "*"))).to.throw( - "BLST_ERROR: sigBytes must be 96 or 192 bytes long" - ); + expect(() => Signature.fromBytes(Buffer.alloc(32, "*"))).to.throw("Invalid encoding"); }); }); it("should throw on invalid key", () => { - expect(() => Signature.deserialize(sullyUint8Array(validSignature.compressed))).to.throw("BLST_BAD_ENCODING"); + expect(() => Signature.fromBytes(sullyUint8Array(validSignature.compressed))).to.throw("Invalid encoding"); }); }); }); describe("methods", () => { - describe("serialize", () => { + describe("toBytes", () => { const sig = SecretKey.fromKeygen(KEY_MATERIAL).sign(Buffer.from("some fancy message")); - it("should serialize the signature to Uint8Array", () => { - expect(sig.serialize()).to.be.instanceof(Uint8Array); + it("should toBytes the signature to Uint8Array", () => { + expect(sig.toBytes()).to.be.instanceof(Uint8Array); }); it("should default to compressed serialization", () => { - expectEqualHex(sig.serialize(), sig.serialize(true)); - expectNotEqualHex(sig.serialize(), sig.serialize(false)); + expectEqualHex(sig.toBytes(), sig.toBytes(true)); + expectNotEqualHex(sig.toBytes(), sig.toBytes(false)); }); it("should serialize compressed to the correct length", () => { - expect(sig.serialize(true)).to.have.lengthOf(BLST_CONSTANTS.SIGNATURE_LENGTH_COMPRESSED); + expect(sig.toBytes(true)).to.have.lengthOf(SIGNATURE_LENGTH_COMPRESSED); }); it("should serialize uncompressed to the correct length", () => { - expect(sig.serialize(false)).to.have.lengthOf(BLST_CONSTANTS.SIGNATURE_LENGTH_UNCOMPRESSED); - }); - it("should serialize affine and jacobian points to the same value", () => { - const jacobian = Signature.deserialize(sig.serialize(), CoordType.jacobian); - const affine = Signature.deserialize(sig.serialize(), CoordType.affine); - expectEqualHex(jacobian.serialize(true), affine.serialize(true)); - expectEqualHex(jacobian.serialize(false), affine.serialize(false)); + expect(sig.toBytes(false)).to.have.lengthOf(SIGNATURE_LENGTH_UNCOMPRESSED); }); }); describe("toHex", () => { it("should toHex string correctly", () => { - const key = Signature.deserialize(validSignature.compressed); + const key = Signature.fromBytes(validSignature.compressed); expectEqualHex(key.toHex(true), validSignature.compressed); }); }); describe("sigValidate()", () => { it("should return undefined for valid", () => { - const sig = Signature.deserialize(validSignature.compressed); + const sig = Signature.fromBytes(validSignature.compressed); expect(sig.sigValidate()).to.be.undefined; }); it("should throw for invalid", () => { - const pkSeed = Signature.deserialize(validSignature.compressed); - const sig = Signature.deserialize( - Uint8Array.from([...pkSeed.serialize().subarray(0, 94), ...Buffer.from("a1")]) - ); - expect(() => sig.sigValidate()).to.throw("BLST_ERROR::BLST_POINT_NOT_IN_GROUP"); - }); - }); - describe("signature.IsInfinity()", () => { - it("G2_POINT_AT_INFINITY", () => { - const sig = Signature.deserialize(G2_POINT_AT_INFINITY); - expect(sig.isInfinity()).to.be.true; + const pkSeed = Signature.fromBytes(validSignature.compressed); + const sig = Signature.fromBytes(Uint8Array.from([...pkSeed.toBytes().subarray(0, 94), ...Buffer.from("a1")])); + expect(() => sig.sigValidate()).to.throw("Point not in group"); }); }); }); diff --git a/test/unit/aggregatePublicKeys.test.ts b/test/unit/aggregatePublicKeys.test.ts index a89cb0b5..4a290f17 100644 --- a/test/unit/aggregatePublicKeys.test.ts +++ b/test/unit/aggregatePublicKeys.test.ts @@ -1,14 +1,14 @@ import {expect} from "chai"; -import {aggregatePublicKeys, PublicKey} from "../../lib"; -import {isEqualBytes, getTestSets} from "../utils"; +import {aggregatePublicKeys, PublicKey} from "../../index.js"; +import {isEqualBytes, getTestSets, CodeError} from "../utils"; import {badPublicKey} from "../__fixtures__"; describe("Aggregate Public Keys", () => { const sets = getTestSets(10); - const keys = sets.map(({publicKey}) => publicKey); + const keys = sets.map(({pk}) => pk); describe("aggregatePublicKeys()", () => { - it("should return the promise of a PublicKey", () => { + it("should return a PublicKey", () => { const agg = aggregatePublicKeys(keys); expect(agg).to.be.instanceOf(PublicKey); }); @@ -18,20 +18,23 @@ describe("Aggregate Public Keys", () => { }); it("should throw for invalid PublicKey", function () { try { - aggregatePublicKeys(keys.concat(badPublicKey as unknown as PublicKey)); + aggregatePublicKeys(keys.concat(PublicKey.fromBytes(badPublicKey)), true); expect.fail("Did not throw error for badPublicKey"); } catch (e) { - expect((e as Error).message.startsWith("BLST_ERROR")).to.be.true; + const code = (e as CodeError).code ?? ""; + expect(code.includes("BLST"), `${e}`).to.be.true; expect( - (e as Error).message.includes("BLST_POINT_NOT_ON_CURVE") || (e as Error).message.includes("BLST_BAD_ENCODING") + code.includes("BLST_POINT_NOT_ON_CURVE") || + code.includes("BLST_POINT_NOT_IN_GROUP") || + code.includes("BLST_BAD_ENCODING") ).to.be.true; - expect((e as Error).message.endsWith("Invalid key at index 10")).to.be.true; + // expect((e as Error).message.endsWith("Invalid key at index 10")).to.be.true; } }); it("should return a key that is not in the keys array", () => { const agg = aggregatePublicKeys(keys); - const serialized = agg.serialize(); - expect(keys.find((key) => isEqualBytes(key.serialize(), serialized))).to.be.undefined; + const serialized = agg.toBytes(); + expect(keys.find((key) => isEqualBytes(key.toBytes(), serialized))).to.be.undefined; }); }); }); diff --git a/test/unit/aggregateSignatures.test.ts b/test/unit/aggregateSignatures.test.ts index c670607f..275cba87 100644 --- a/test/unit/aggregateSignatures.test.ts +++ b/test/unit/aggregateSignatures.test.ts @@ -1,11 +1,11 @@ import {expect} from "chai"; -import {aggregateSignatures, Signature} from "../../lib"; -import {isEqualBytes, getTestSets} from "../utils"; +import {aggregateSignatures, Signature} from "../../index.js"; +import {isEqualBytes, getTestSets, CodeError} from "../utils"; import {badSignature} from "../__fixtures__"; describe("Aggregate Signatures", () => { const sets = getTestSets(10); - const signatures = sets.map(({signature}) => signature); + const signatures = sets.map(({sig}) => sig); describe("aggregateSignatures()", () => { it("should return a Signature", () => { @@ -17,14 +17,21 @@ describe("Aggregate Signatures", () => { expect(agg.sigValidate()).to.be.undefined; }); it("should throw for invalid Signature", () => { - expect(() => aggregateSignatures(signatures.concat(badSignature as unknown as Signature))).to.throw( - "BLST_ERROR::BLST_BAD_ENCODING - Invalid signature at index 10" - ); + try { + aggregateSignatures(signatures.concat(Signature.fromBytes(badSignature)), true); + } catch (e) { + expect((e as CodeError).code.startsWith("BLST")).to.be.true; + expect( + (e as CodeError).code.includes("BLST_POINT_NOT_ON_CURVE") || + (e as CodeError).code.includes("BLST_BAD_ENCODING") + ).to.be.true; + // expect((e as Error).message.endsWith("Invalid signature at index 10")).to.be.true; + } }); it("should return a key that is not in the keys array", () => { const agg = aggregateSignatures(signatures); - const serialized = agg.serialize(); - expect(signatures.find((sig) => isEqualBytes(sig.serialize(), serialized))).to.be.undefined; + const serialized = agg.toBytes(); + expect(signatures.find((sig) => isEqualBytes(sig.toBytes(), serialized))).to.be.undefined; }); }); }); diff --git a/test/unit/aggregateWithRandomness.test.ts b/test/unit/aggregateWithRandomness.test.ts index 0e2773ec..05f78d80 100644 --- a/test/unit/aggregateWithRandomness.test.ts +++ b/test/unit/aggregateWithRandomness.test.ts @@ -1,237 +1,104 @@ import {expect} from "chai"; import { aggregatePublicKeys, - aggregateSignatures, + aggregateSerializedSignatures, aggregateWithRandomness, - asyncAggregateWithRandomness, PublicKey, Signature, verify, verifyMultipleAggregateSignatures, -} from "../../lib"; +} from "../../index.js"; import {expectNotEqualHex, getTestSet, getTestSetsSameMessage} from "../utils"; import {G1_POINT_AT_INFINITY, G2_POINT_AT_INFINITY} from "../__fixtures__"; describe("Aggregate With Randomness", () => { const sameMessageSets = getTestSetsSameMessage(10); - const message = sameMessageSets.message; + const msg = sameMessageSets.msg; const sets = sameMessageSets.sets.map((s) => ({ - publicKey: s.publicKey, - signature: s.signature.serialize(), + pk: s.pk, + sig: s.sig.toBytes(), })); const randomSet = getTestSet(20); const infinityPublicKey = Buffer.from(G1_POINT_AT_INFINITY, "hex"); - const infinitySignature = G2_POINT_AT_INFINITY; before(() => { // make sure sets are valid before starting - expect(() => PublicKey.deserialize(infinityPublicKey).keyValidate()).to.throw("BLST_ERROR::BLST_PK_IS_INFINITY"); - expect(Signature.deserialize(infinitySignature).isInfinity()).to.be.true; - expect(verify(message, sets[0].publicKey, sets[0].signature)).to.be.true; - expect(verifyMultipleAggregateSignatures(sets.map((s) => ({...s, message})))).to.be.true; - expectNotEqualHex(message, randomSet.message); - expect(verify(randomSet.message, randomSet.publicKey, randomSet.signature)).to.be.true; + expect(() => PublicKey.fromBytes(infinityPublicKey).keyValidate()).to.throw("Public key is infinity"); + expect(verify(msg, sets[0].pk, Signature.fromBytes(sets[0].sig))).to.be.true; + expect(verifyMultipleAggregateSignatures(sets.map((s) => ({msg, pk: s.pk, sig: Signature.fromBytes(s.sig)})))).to.be + .true; + expectNotEqualHex(msg, randomSet.msg); + expect(verify(randomSet.msg, randomSet.pk, randomSet.sig)).to.be.true; expect(verifyMultipleAggregateSignatures([randomSet])).to.be.true; }); describe("aggregateWithRandomness()", () => { it("should not accept an empty array argument", () => { - expect(() => aggregateWithRandomness([])).to.throw("Empty array passed to aggregateWithRandomness"); + try { + aggregateWithRandomness([]); + expect.fail("aggregateWithRandomness with empty list should throw"); + } catch (e) { + expect((e as any).code).to.equal("BLST_AGGR_TYPE_MISMATCH"); + } }); - it("should accept an array of {publicKey: PublicKey, signature: Signature}", () => { - expect(() => - aggregateWithRandomness([{publicKey: sets[0].publicKey, signature: sets[0].signature}]) - ).not.to.throw(); + it("should accept an array of {pk: PublicKey, sig: Uint8Array}", () => { + expect(() => aggregateWithRandomness([{pk: sets[0].pk, sig: sets[0].sig}])).not.to.throw(); // invalid publicKey property name - expect(() => - aggregateWithRandomness([{pubkey: sets[0].publicKey, signature: sets[0].signature} as any]) - ).to.throw("BLST_ERROR: Invalid PublicKey at index 0"); + expect(() => aggregateWithRandomness([{publicKey: sets[0].pk, sig: sets[0].sig} as any])).to.throw( + "Missing field `pk`" + ); // // invalid signature property name - expect(() => aggregateWithRandomness([{publicKey: sets[0].publicKey, sig: sets[0].signature} as any])).to.throw( - "BLST_ERROR: Invalid Signature at index 0" + expect(() => aggregateWithRandomness([{pk: sets[0].pk, signature: sets[0].sig} as any])).to.throw( + "Missing field `sig`" ); // // invalid publicKey property value - expect(() => aggregateWithRandomness([{publicKey: 1 as any, signature: sets[0].signature}])).to.throw( - "BLST_ERROR: Invalid PublicKey at index 0" - ); + expect(() => aggregateWithRandomness([{pk: 1 as any, sig: sets[0].sig}])).to.throw(); // // invalid signature property value - expect(() => aggregateWithRandomness([{publicKey: sets[0].publicKey, signature: "bar" as any}])).to.throw( - "BLST_ERROR: Invalid Signature at index 0" - ); - }); - it("should accept a boolean for validateSerialized", () => { - expect(() => aggregateWithRandomness(sets, true)).not.to.throw(); - expect(() => aggregateWithRandomness(sets, false)).not.to.throw(); - expect(() => aggregateWithRandomness(sets, "false" as any)).to.throw( - "Must pass a boolean for validateSerialized" - ); + expect(() => aggregateWithRandomness([{pk: sets[0].pk, sig: "bar" as any}])).to.throw(); }); it("should throw for invalid serialized", () => { expect(() => aggregateWithRandomness( sets.concat({ - publicKey: sets[0].publicKey, - signature: G2_POINT_AT_INFINITY, - } as any), - true - ) - ).to.throw("BLST_ERROR: Invalid Signature at index 10"); - }); - it("should not throw for invalid serialized if false passed", () => { - expect(() => - aggregateWithRandomness( - sets.concat({ - publicKey: sets[0].publicKey, - signature: G2_POINT_AT_INFINITY, - } as any), - false + pk: sets[0].pk, + sig: G2_POINT_AT_INFINITY, //TODO: (@matthewkeil) this throws error "Public key is infinity" not signature + } as any) ) - ).not.to.throw(); + ).to.throw(); }); - it("should return an object", () => { + it("should return a {pk: PublicKey, sig: Signature} object", () => { const agg = aggregateWithRandomness(sets); expect(agg).to.be.instanceOf(Object); - }); - it("should return a {publicKey: PublicKey} property", () => { - const agg = aggregateWithRandomness(sets); - expect(agg).to.haveOwnProperty("publicKey"); - expect(agg.publicKey).to.be.instanceOf(PublicKey); - expect(() => agg.publicKey.keyValidate()).not.to.throw(); - }); - it("should return a valid {signature: Signature} property", () => { - const agg = aggregateWithRandomness(sets); - expect(agg).to.haveOwnProperty("signature"); - expect(agg.signature).to.be.instanceOf(Signature); - expect(() => agg.signature.sigValidate()).not.to.throw(); + + expect(agg).to.haveOwnProperty("pk"); + expect(agg.pk).to.be.instanceOf(PublicKey); + expect(() => agg.pk.keyValidate()).not.to.throw(); + + expect(agg).to.haveOwnProperty("sig"); + expect(agg.sig).to.be.instanceOf(Signature); + expect(() => agg.sig.sigValidate()).not.to.throw(); }); it("should add randomness to aggregated publicKey", () => { - const withoutRandomness = aggregatePublicKeys(sets.map(({publicKey}) => publicKey)); - const withRandomness = aggregateWithRandomness(sets).publicKey; + const withoutRandomness = aggregatePublicKeys(sets.map(({pk}) => pk)); + const withRandomness = aggregateWithRandomness(sets).pk; expectNotEqualHex(withRandomness, withoutRandomness); }); it("should add randomness to aggregated signature", () => { - const withoutRandomness = aggregateSignatures(sets.map(({signature}) => signature)); - const withRandomness = aggregateWithRandomness(sets).signature; + const withoutRandomness = aggregateSerializedSignatures(sets.map(({sig}) => sig)); + const withRandomness = aggregateWithRandomness(sets).sig; expectNotEqualHex(withRandomness, withoutRandomness); }); it("should produce verifiable set", () => { - const {publicKey, signature} = aggregateWithRandomness(sets); - expect(verify(message, publicKey, signature)); - }); - it("should not validate for different message", async () => { - const {publicKey, signature} = aggregateWithRandomness(sets); - expect(verify(randomSet.message, publicKey, signature)).to.be.false; - }); - it("should not validate included key/sig for different message", async () => { - const {publicKey, signature} = aggregateWithRandomness([ - ...sets, - {publicKey: randomSet.publicKey, signature: randomSet.signature.serialize()}, - ]); - expect(verify(message, publicKey, signature)).to.be.false; - }); - }); - describe("asyncAggregateWithRandomness()", () => { - it("should not accept an empty array argument", async () => { - try { - await asyncAggregateWithRandomness([]); - } catch (e) { - expect((e as Error).message).to.equal("Empty array passed to aggregateWithRandomness"); - } - }); - it("should accept an array of {publicKey: PublicKey, signature: Signature}", async () => { - expect(() => - asyncAggregateWithRandomness([{publicKey: sets[0].publicKey, signature: sets[0].signature}]) - ).not.to.throw(); - // invalid publicKey property name - expect(() => - asyncAggregateWithRandomness([{pubkey: sets[0].publicKey, signature: sets[0].signature} as any]) - ).to.throw("BLST_ERROR: Invalid PublicKey at index 0"); - // invalid publicKey property value - expect(() => asyncAggregateWithRandomness([{publicKey: 1 as any, signature: sets[0].signature}])).to.throw( - "BLST_ERROR: Invalid PublicKey at index 0" - ); - // invalid signature property name - expect(() => - asyncAggregateWithRandomness([{publicKey: sets[0].publicKey, sig: sets[0].signature} as any]) - ).to.throw("BLST_ERROR: Invalid Signature at index 0"); - // invalid signature property value - expect(() => asyncAggregateWithRandomness([{publicKey: sets[0].publicKey, signature: "bar" as any}])).to.throw( - "BLST_ERROR: Invalid Signature at index 0" - ); - }); - it("should accept a boolean for validateSerialized", () => { - expect(() => asyncAggregateWithRandomness(sets, true)).not.to.throw(); - expect(() => asyncAggregateWithRandomness(sets, false)).not.to.throw(); - expect(() => asyncAggregateWithRandomness(sets, "false" as any)).to.throw( - "Must pass a boolean for validateSerialized" - ); - }); - it("should throw for invalid serialized", async () => { - try { - await asyncAggregateWithRandomness( - sets.concat({ - publicKey: sets[0].publicKey, - signature: G2_POINT_AT_INFINITY, - } as any), - true - ); - } catch (e) { - expect((e as Error).message).to.equal("BLST_ERROR: Invalid Signature at index 10"); - } - }); - it("should not throw for invalid serialized if false passed", async () => { - try { - await asyncAggregateWithRandomness( - sets.concat({ - publicKey: sets[0].publicKey, - signature: G2_POINT_AT_INFINITY, - } as any), - false - ); - } catch (e) { - expect.fail("Should not throw an error"); - } - }); - it("should return an object", async () => { - const agg = await asyncAggregateWithRandomness(sets); - expect(agg).to.be.instanceOf(Object); - }); - it("should return a {publicKey: PublicKey} property", async () => { - const agg = await asyncAggregateWithRandomness(sets); - expect(agg).to.haveOwnProperty("publicKey"); - expect(agg.publicKey).to.be.instanceOf(PublicKey); - expect(() => agg.publicKey.keyValidate()).not.to.throw(); - }); - it("should return a valid {signature: Signature} property", async () => { - const agg = await asyncAggregateWithRandomness(sets); - expect(agg).to.haveOwnProperty("signature"); - expect(agg.signature).to.be.instanceOf(Signature); - expect(() => agg.signature.sigValidate()).not.to.throw(); - }); - it("should add randomness to aggregated publicKey", async () => { - const withoutRandomness = aggregatePublicKeys(sets.map(({publicKey}) => publicKey)); - const {publicKey: withRandomness} = await asyncAggregateWithRandomness(sets); - expectNotEqualHex(withRandomness, withoutRandomness); - }); - it("should add randomness to aggregated signature", async () => { - const withoutRandomness = aggregateSignatures(sets.map(({signature}) => signature)); - const {signature: withRandomness} = await asyncAggregateWithRandomness(sets); - expectNotEqualHex(withRandomness, withoutRandomness); - }); - it("should produce verifiable set", async () => { - const {publicKey, signature} = await asyncAggregateWithRandomness(sets); - expect(verify(message, publicKey, signature)); + const {pk, sig} = aggregateWithRandomness(sets); + expect(verify(msg, pk, sig)); }); it("should not validate for different message", async () => { - const {publicKey, signature} = await asyncAggregateWithRandomness(sets); - expect(verify(randomSet.message, publicKey, signature)).to.be.false; + const {pk, sig} = aggregateWithRandomness(sets); + expect(verify(randomSet.msg, pk, sig)).to.be.false; }); it("should not validate included key/sig for different message", async () => { - const {publicKey, signature} = await asyncAggregateWithRandomness([ - ...sets, - {publicKey: randomSet.publicKey, signature: randomSet.signature.serialize()}, - ]); - expect(verify(message, publicKey, signature)).to.be.false; + const {pk, sig} = aggregateWithRandomness([...sets, {pk: randomSet.pk, sig: randomSet.sig.toBytes()}]); + expect(verify(msg, pk, sig)).to.be.false; }); }); }); diff --git a/test/unit/bindings.test.ts b/test/unit/bindings.test.ts index 806b1cfa..7b649020 100644 --- a/test/unit/bindings.test.ts +++ b/test/unit/bindings.test.ts @@ -1,5 +1,5 @@ import {expect} from "chai"; -import * as bindings from "../../lib"; +import * as bindings from "../.."; describe("bindings", () => { describe("exports", () => { @@ -8,22 +8,24 @@ describe("bindings", () => { exports.delete("default"); const expectedFunctions = [ - "randomBytesNonZero", "aggregatePublicKeys", "aggregateSignatures", + "aggregateSerializedPublicKeys", + "aggregateSerializedSignatures", "aggregateWithRandomness", - "asyncAggregateWithRandomness", "verify", - "asyncVerify", - "fastAggregateVerify", - "asyncFastAggregateVerify", "aggregateVerify", - "asyncAggregateVerify", + "fastAggregateVerify", "verifyMultipleAggregateSignatures", - "asyncVerifyMultipleAggregateSignatures", ]; const expectedClasses = ["PublicKey", "SecretKey", "Signature"]; - const expectedConstants = ["CoordType", "BLST_CONSTANTS"]; + const expectedConstants = [ + "SECRET_KEY_LENGTH", + "PUBLIC_KEY_LENGTH_COMPRESSED", + "PUBLIC_KEY_LENGTH_UNCOMPRESSED", + "SIGNATURE_LENGTH_COMPRESSED", + "SIGNATURE_LENGTH_UNCOMPRESSED", + ]; after(() => { expect(exports.size).to.equal(0); }); @@ -54,16 +56,12 @@ describe("bindings", () => { }); describe("constants", () => { const { - DST, - PUBLIC_KEY_LENGTH_UNCOMPRESSED, SECRET_KEY_LENGTH, PUBLIC_KEY_LENGTH_COMPRESSED, + PUBLIC_KEY_LENGTH_UNCOMPRESSED, SIGNATURE_LENGTH_COMPRESSED, SIGNATURE_LENGTH_UNCOMPRESSED, - } = bindings.BLST_CONSTANTS; - it("DST", () => { - expect(DST).to.be.a("string"); - }); + } = bindings; it("SECRET_KEY_LENGTH", () => { expect(SECRET_KEY_LENGTH).to.be.a("number"); }); diff --git a/test/unit/utils.test.ts b/test/unit/utils.test.ts index 9aced7fc..3b8bc2c6 100644 --- a/test/unit/utils.test.ts +++ b/test/unit/utils.test.ts @@ -1,24 +1,12 @@ import {expect} from "chai"; -import {aggregateSignatures, fastAggregateVerify, verify, verifyMultipleAggregateSignatures} from "../../lib"; -import { - BlsMultiThreading, - arrayOfIndexes, - chunkifyMaximizeChunkSize, - expectEqualHex, - getBatchesOfAggregatedSignatureSets, - getBatchesOfSameMessageSignatureSets, - getBatchesOfSingleSignatureSets, - getGroupsOfBatchesOfAggregatedSignatureSets, - getGroupsOfBatchesOfSignatureSets, - getGroupsOfBatchesOfSingleSignatureSets, - getTestSet, -} from "../utils"; +import {verify} from "../../index.js"; +import {arrayOfIndexes, chunkifyMaximizeChunkSize, getTestSet} from "../utils"; describe("utils", () => { describe("helpers", () => { it("should build valid test sets", () => { const set = getTestSet(); - expect(verify(set.message, set.publicKey, set.signature)).to.be.true; + expect(verify(set.msg, set.pk, set.sig)).to.be.true; }); }); describe("chunkifyMaximizeChunkSize", () => { @@ -51,73 +39,4 @@ describe("utils", () => { }); } }); - describe("multithreading helpers", () => { - it("should build napi same message sets", () => { - const sets = getBatchesOfSameMessageSignatureSets(4, 2); - expect(sets.length).to.equal(2); - expect(sets[0].sets.length).to.equal(4); - expectEqualHex(sets[0].message, sets[1].message); - expect( - verifyMultipleAggregateSignatures( - sets[0].sets.map(({publicKey, signature}) => ({message: sets[0].message, publicKey, signature})) - ) - ).to.be.true; - expect( - verifyMultipleAggregateSignatures( - sets[1].sets.map(({publicKey, signature}) => ({message: sets[1].message, publicKey, signature})) - ) - ).to.be.true; - }); - it("should build aggregated signature sets", () => { - const sameMessageSets = getBatchesOfSameMessageSignatureSets(4, 2); - const aggregatedSigSets = getBatchesOfAggregatedSignatureSets(4, 2); - expect(aggregatedSigSets.length).to.equal(2); - expect(aggregatedSigSets[0].pubkeys.length).to.equal(4); - const aggregated = aggregateSignatures(sameMessageSets[0].sets.map(({signature}) => signature)); - expectEqualHex(aggregatedSigSets[0].signature, aggregated); - for (const set of aggregatedSigSets) { - expect(fastAggregateVerify(set.signingRoot, set.pubkeys, set.signature)).to.be.true; - } - }); - it("should build batches of single signature sets", () => { - const singleSets = getBatchesOfSingleSignatureSets(4); - expect(singleSets.length).to.equal(4); - for (const set of singleSets) { - expect(verify(set.signingRoot, set.pubkey, set.signature)).to.be.true; - } - }); - it("should build groups correctly", () => { - const batchesGroups = getGroupsOfBatchesOfSingleSignatureSets(2, 4); - expect(batchesGroups.length).to.equal(4); - expect(batchesGroups[0].length).to.equal(2); - const singleGroups = getGroupsOfBatchesOfAggregatedSignatureSets(2, 4, 6); - expect(singleGroups.length).to.equal(6); - expect(singleGroups[0].length).to.equal(4); - expect(singleGroups[0][0].pubkeys.length).to.equal(2); - }); - }); - describe("multithreading verification", function () { - this.timeout(20 * 1000); - let libuvPool: BlsMultiThreading; - let napiGroups: ReturnType; - before(() => { - libuvPool = new BlsMultiThreading({}); - napiGroups = getGroupsOfBatchesOfSignatureSets(12, 32, 4, 4); - }); - after(async () => { - await libuvPool.close(); - }); - it("should verify one test set", async () => { - const response = await libuvPool.verifySignatureSets(napiGroups[0], {batchable: true}); - expect(response).to.be.true; - }); - it("should verify multiple test sets", async () => { - const responses = [] as Promise[]; - for (const sets of napiGroups) { - responses.push(libuvPool.verifySignatureSets(sets, {batchable: true})); - } - const results = await Promise.all(responses); - expect(results.every((r) => r)).to.be.true; - }); - }); }); diff --git a/test/unit/verify.test.ts b/test/unit/verify.test.ts index d44a0192..4470f06c 100644 --- a/test/unit/verify.test.ts +++ b/test/unit/verify.test.ts @@ -1,12 +1,5 @@ import {expect} from "chai"; -import { - aggregateVerify, - asyncAggregateVerify, - asyncFastAggregateVerify, - asyncVerify, - fastAggregateVerify, - verify, -} from "../../lib"; +import {aggregateVerify, fastAggregateVerify, verify} from "../../index.js"; import {sullyUint8Array, getTestSet} from "../utils"; import {TestSet} from "../utils/types"; @@ -17,45 +10,15 @@ describe("Verify", () => { }); describe("verify", () => { it("should return a boolean", () => { - expect(verify(testSet.message, testSet.publicKey, testSet.signature)).to.be.a("boolean"); + expect(verify(testSet.msg, testSet.pk, testSet.sig)).to.be.a("boolean"); }); describe("should default to false", () => { it("should handle invalid message", () => { - expect(verify(sullyUint8Array(testSet.message), testSet.publicKey, testSet.signature)).to.be.false; - }); - it("should handle invalid publicKey", () => { - expect(verify(testSet.message, sullyUint8Array(testSet.publicKey.serialize()), testSet.signature)).to.be.false; - }); - it("should handle invalid signature", () => { - expect(verify(testSet.message, testSet.publicKey, sullyUint8Array(testSet.signature.serialize()))).to.be.false; + expect(verify(sullyUint8Array(testSet.msg), testSet.pk, testSet.sig)).to.be.false; }); }); it("should return true for valid sets", () => { - expect(verify(testSet.message, testSet.publicKey, testSet.signature)).to.be.true; - }); - }); - describe("asyncVerify", () => { - it("should return Promise", async () => { - const resPromise = asyncVerify(testSet.message, testSet.publicKey, testSet.signature); - expect(resPromise).to.be.instanceOf(Promise); - const res = await resPromise; - expect(res).to.be.a("boolean"); - }); - describe("should default to Promise", () => { - it("should handle invalid message", async () => { - expect(await asyncVerify(sullyUint8Array(testSet.message), testSet.publicKey, testSet.signature)).to.be.false; - }); - it("should handle invalid publicKey", async () => { - expect(await asyncVerify(testSet.message, sullyUint8Array(testSet.publicKey.serialize()), testSet.signature)).to - .be.false; - }); - it("should handle invalid signature", async () => { - expect(await asyncVerify(testSet.message, testSet.publicKey, sullyUint8Array(testSet.signature.serialize()))).to - .be.false; - }); - }); - it("should return true for valid sets", async () => { - expect(await asyncVerify(testSet.message, testSet.publicKey, testSet.signature)).to.be.true; + expect(verify(testSet.msg, testSet.pk, testSet.sig)).to.be.true; }); }); }); @@ -67,58 +30,15 @@ describe("Aggregate Verify", () => { }); describe("aggregateVerify", () => { it("should return a boolean", () => { - expect(aggregateVerify([testSet.message], [testSet.publicKey], testSet.signature)).to.be.a("boolean"); + expect(aggregateVerify([testSet.msg], [testSet.pk], testSet.sig)).to.be.a("boolean"); }); describe("should default to false", () => { it("should handle invalid message", () => { - expect(aggregateVerify([sullyUint8Array(testSet.message)], [testSet.publicKey], testSet.signature)).to.be.false; - }); - it("should handle invalid publicKey", () => { - expect(aggregateVerify([testSet.message], [sullyUint8Array(testSet.publicKey.serialize())], testSet.signature)) - .to.be.false; - }); - it("should handle invalid signature", () => { - expect(aggregateVerify([testSet.message], [testSet.publicKey], sullyUint8Array(testSet.signature.serialize()))) - .to.be.false; + expect(aggregateVerify([sullyUint8Array(testSet.msg)], [testSet.pk], testSet.sig)).to.be.false; }); }); it("should return true for valid sets", () => { - expect(aggregateVerify([testSet.message], [testSet.publicKey], testSet.signature)).to.be.true; - }); - }); - describe("asyncAggregateVerify", () => { - it("should return Promise", async () => { - const resPromise = asyncAggregateVerify([testSet.message], [testSet.publicKey], testSet.signature); - expect(resPromise).to.be.instanceOf(Promise); - const res = await resPromise; - expect(res).to.be.a("boolean"); - }); - describe("should default to Promise", () => { - it("should handle invalid message", async () => { - expect(await asyncAggregateVerify([sullyUint8Array(testSet.message)], [testSet.publicKey], testSet.signature)) - .to.be.false; - }); - it("should handle invalid publicKey", async () => { - expect( - await asyncAggregateVerify( - [testSet.message], - [sullyUint8Array(testSet.publicKey.serialize())], - testSet.signature - ) - ).to.be.false; - }); - it("should handle invalid signature", async () => { - expect( - await asyncAggregateVerify( - [testSet.message], - [testSet.publicKey], - sullyUint8Array(testSet.signature.serialize()) - ) - ).to.be.false; - }); - }); - it("should return true for valid sets", async () => { - expect(await asyncAggregateVerify([testSet.message], [testSet.publicKey], testSet.signature)).to.be.true; + expect(aggregateVerify([testSet.msg], [testSet.pk], testSet.sig)).to.be.true; }); }); }); @@ -130,61 +50,15 @@ describe("Fast Aggregate Verify", () => { }); describe("fastAggregateVerify", () => { it("should return a boolean", () => { - expect(fastAggregateVerify(testSet.message, [testSet.publicKey], testSet.signature)).to.be.a("boolean"); + expect(fastAggregateVerify(testSet.msg, [testSet.pk], testSet.sig)).to.be.a("boolean"); }); describe("should default to false", () => { it("should handle invalid message", () => { - expect(fastAggregateVerify(sullyUint8Array(testSet.message), [testSet.publicKey], testSet.signature)).to.be - .false; - }); - it("should handle invalid publicKey", () => { - expect( - fastAggregateVerify(testSet.message, [sullyUint8Array(testSet.publicKey.serialize())], testSet.signature) - ).to.be.false; - }); - it("should handle invalid signature", () => { - expect( - fastAggregateVerify(testSet.message, [testSet.publicKey], sullyUint8Array(testSet.signature.serialize())) - ).to.be.false; + expect(fastAggregateVerify(sullyUint8Array(testSet.msg), [testSet.pk], testSet.sig)).to.be.false; }); }); it("should return true for valid sets", () => { - expect(fastAggregateVerify(testSet.message, [testSet.publicKey], testSet.signature)).to.be.true; - }); - }); - describe("asyncFastAggregateVerify", () => { - it("should return Promise", async () => { - const resPromise = asyncFastAggregateVerify(testSet.message, [testSet.publicKey], testSet.signature); - expect(resPromise).to.be.instanceOf(Promise); - const res = await resPromise; - expect(res).to.be.a("boolean"); - }); - describe("should default to Promise", () => { - it("should handle invalid message", async () => { - expect(await asyncFastAggregateVerify(sullyUint8Array(testSet.message), [testSet.publicKey], testSet.signature)) - .to.be.false; - }); - it("should handle invalid publicKey", async () => { - expect( - await asyncFastAggregateVerify( - testSet.message, - [sullyUint8Array(testSet.publicKey.serialize())], - testSet.signature - ) - ).to.be.false; - }); - it("should handle invalid signature", async () => { - expect( - await asyncFastAggregateVerify( - testSet.message, - [testSet.publicKey], - sullyUint8Array(testSet.signature.serialize()) - ) - ).to.be.false; - }); - }); - it("should return true for valid sets", async () => { - expect(await asyncFastAggregateVerify(testSet.message, [testSet.publicKey], testSet.signature)).to.be.true; + expect(fastAggregateVerify(testSet.msg, [testSet.pk], testSet.sig)).to.be.true; }); }); }); diff --git a/test/unit/verifyMultipleAggregateSignatures.test.ts b/test/unit/verifyMultipleAggregateSignatures.test.ts index 08d04e9d..523e1a96 100644 --- a/test/unit/verifyMultipleAggregateSignatures.test.ts +++ b/test/unit/verifyMultipleAggregateSignatures.test.ts @@ -1,6 +1,6 @@ import {expect} from "chai"; -import {asyncVerifyMultipleAggregateSignatures, verifyMultipleAggregateSignatures} from "../../lib"; -import {getTestSets} from "../utils"; +import {verifyMultipleAggregateSignatures} from "../../index.js"; +import {getTestSet, getTestSets} from "../utils"; describe("Verify Multiple Aggregate Signatures", () => { describe("verifyMultipleAggregateSignatures", () => { @@ -13,19 +13,11 @@ describe("Verify Multiple Aggregate Signatures", () => { it("should return true for valid sets", () => { expect(verifyMultipleAggregateSignatures(getTestSets(6))).to.be.true; }); - }); - describe("asyncVerifyMultipleAggregateSignatures", () => { - it("should return Promise", async () => { - const resPromise = asyncVerifyMultipleAggregateSignatures([]); - expect(resPromise).to.be.instanceOf(Promise); - const res = await resPromise; - expect(res).to.be.a("boolean"); - }); - it("should default to Promise", async () => { - expect(await asyncVerifyMultipleAggregateSignatures([])).to.be.false; - }); - it("should return true for valid sets", async () => { - expect(await asyncVerifyMultipleAggregateSignatures(getTestSets(6))).to.be.true; + it("should return false for invalid sets", () => { + const sets = getTestSets(6); + const randomSet = getTestSet(20); + sets[0].sig = randomSet.sig; + expect(verifyMultipleAggregateSignatures(sets)).to.be.false; }); }); }); diff --git a/test/utils/helpers.ts b/test/utils/helpers.ts index 3a6dc950..4db2e445 100644 --- a/test/utils/helpers.ts +++ b/test/utils/helpers.ts @@ -5,7 +5,7 @@ function toHexString(bytes: BufferLike): string { if (typeof bytes === "string") return bytes; if (bytes instanceof Buffer) return bytes.toString("hex"); if (bytes instanceof Uint8Array) return Buffer.from(bytes).toString("hex"); - if (typeof bytes.serialize === "function") return Buffer.from(bytes.serialize()).toString("hex"); + if (typeof bytes.toBytes === "function") return Buffer.from(bytes.toBytes()).toString("hex"); throw Error("toHexString only accepts BufferLike types"); } diff --git a/test/utils/index.ts b/test/utils/index.ts index bc3d0549..8e396cfd 100644 --- a/test/utils/index.ts +++ b/test/utils/index.ts @@ -1,5 +1,4 @@ export * from "./memory"; -export * from "./multithreading"; export * from "./helpers"; export * from "./testSets"; export * from "./types"; diff --git a/test/utils/multithreading/array.ts b/test/utils/multithreading/array.ts deleted file mode 100644 index 72f81fbe..00000000 --- a/test/utils/multithreading/array.ts +++ /dev/null @@ -1,225 +0,0 @@ -/** - * Return the last index in the array that matches the predicate - */ -export function findLastIndex(array: T[], predicate: (value: T) => boolean): number { - let i = array.length; - while (i--) { - if (predicate(array[i])) { - return i; - } - } - return -1; -} - -/** - * The node for LinkedList below - */ -class Node { - data: T; - next: Node | null = null; - prev: Node | null = null; - - constructor(data: T) { - this.data = data; - } -} - -/** - * We want to use this if we only need push/pop/shift method - * without random access. - * The shift() method should be cheaper than regular array. - */ -export class LinkedList { - private _length: number; - private head: Node | null; - private tail: Node | null; - private pointer: Node | null = null; - - constructor() { - this._length = 0; - this.head = null; - this.tail = null; - } - - get length(): number { - return this._length; - } - - push(data: T): void { - if (this._length === 0) { - this.tail = this.head = new Node(data); - this._length++; - return; - } - - if (!this.head || !this.tail) { - // should not happen - throw Error("No head or tail"); - } - - const newTail = new Node(data); - this.tail.next = newTail; - newTail.prev = this.tail; - this.tail = newTail; - this._length++; - } - - unshift(data: T): void { - if (this._length === 0) { - this.tail = this.head = new Node(data); - this._length++; - return; - } - - if (!this.head || !this.tail) { - // should not happen - throw Error("No head or tail"); - } - - const newHead = new Node(data); - newHead.next = this.head; - this.head.prev = newHead; - this.head = newHead; - this._length++; - } - - pop(): T | null { - const oldTail = this.tail; - if (!oldTail) return null; - this._length = Math.max(0, this._length - 1); - - if (this._length === 0) { - this.head = this.tail = null; - } else { - this.tail = oldTail.prev; - if (this.tail) this.tail.next = null; - oldTail.prev = oldTail.next = null; - } - - return oldTail.data; - } - - shift(): T | null { - const oldHead = this.head; - if (!oldHead) return null; - this._length = Math.max(0, this._length - 1); - - if (this._length === 0) { - this.head = this.tail = null; - } else { - this.head = oldHead.next; - if (this.head) this.head.prev = null; - oldHead.prev = oldHead.next = null; - } - - return oldHead.data; - } - - first(): T | null { - return this.head?.data ?? null; - } - - last(): T | null { - return this.tail?.data ?? null; - } - - /** - * Delete the first item thats search from head - */ - deleteFirst(item: T): boolean { - if (item === this.head?.data) { - this.shift(); - return true; - } - - let node = this.head; - while (node) { - if (node.data === item) { - if (node === this.tail) this.tail = node.prev; - if (node.prev) node.prev.next = node.next; - if (node.next) node.next.prev = node.prev; - node.prev = node.next = null; - this._length--; - return true; - } - node = node.next; - } - - return false; - } - - /** - * Delete the first item search from tail. - */ - deleteLast(item: T): boolean { - if (item === this.tail?.data) { - this.pop(); - return true; - } - - let node = this.tail; - while (node) { - if (node.data === item) { - if (node === this.head) this.head = node.next; - if (node.prev) node.prev.next = node.next; - if (node.next) node.next.prev = node.prev; - node.prev = node.next = null; - this._length--; - return true; - } - node = node.prev; - } - - return false; - } - - next(): IteratorResult { - if (!this.pointer) { - return {done: true, value: undefined}; - } - const value = this.pointer.data; - this.pointer = this.pointer.next; - return {done: false, value}; - } - - [Symbol.iterator](): IterableIterator { - this.pointer = this.head; - return this; - } - - values(): IterableIterator { - this.pointer = this.head; - return this; - } - - clear(): void { - this.head = this.tail = null; - this._length = 0; - } - - toArray(): T[] { - let node = this.head; - if (!node) return []; - - const arr: T[] = []; - while (node) { - arr.push(node.data); - node = node.next; - } - - return arr; - } - - map(fn: (t: T) => U): U[] { - let node = this.head; - if (!node) return []; - - const arr: U[] = []; - while (node) { - arr.push(fn(node.data)); - node = node.next; - } - - return arr; - } -} diff --git a/test/utils/multithreading/blsMultiThreading.ts b/test/utils/multithreading/blsMultiThreading.ts deleted file mode 100644 index d5e8c3d1..00000000 --- a/test/utils/multithreading/blsMultiThreading.ts +++ /dev/null @@ -1,275 +0,0 @@ -import {PublicKey} from "../../../lib"; -import {chunkifyMaximizeChunkSize} from "../../utils"; -import { - BlsMultiThreadWorkerPoolOptions, - BlsWorkRequest, - VerifySignatureOpts, - WorkResultCode, - ISignatureSet, -} from "./types"; -import {LinkedList} from "./array"; -import { - prepareWorkReqFromJob, - QueuedJob, - QueuedJobType, - QueuedJobSameMessage, - jobItemSameMessageToMultiSet, -} from "./queuedJob"; -import {runWorkRequests} from "./runWorkRequests"; -import {countSignatures, getJobResultError} from "./helpers"; -import {verifySignatureSets} from "./verify"; - -const MAX_SIGNATURE_SETS_PER_JOB = 128; -const MAX_BUFFERED_SIGS = 32; -const MAX_BUFFER_WAIT_MS = 100; -const MAX_JOBS_CAN_ACCEPT_WORK = 512; - -export class BlsMultiThreading { - readonly blsPoolSize: number; - - private readonly addVerificationRandomness: boolean; - private readonly blsVerifyAllInQueue: boolean; - - private readonly jobsForNextRun = new LinkedList(); - private buffer: { - jobs: LinkedList; - prioritizedJobs: LinkedList; - sigCount: number; - firstPush: number; - timeout: NodeJS.Timeout; - } | null = null; - - private closed = false; - private workersBusy = 0; - - constructor(options: BlsMultiThreadWorkerPoolOptions /*, modules: BlsMultiThreadWorkerPoolModules */) { - this.addVerificationRandomness = options.addVerificationRandomness ?? false; - this.blsVerifyAllInQueue = options.blsVerifyAllInQueue ?? false; - const uvThreadPoolSize = Number(process.env.UV_THREADPOOL_SIZE); - this.blsPoolSize = isNaN(uvThreadPoolSize) ? 4 : uvThreadPoolSize; - } - - canAcceptWork(): boolean { - return this.workersBusy < this.blsPoolSize && this.jobsForNextRun.length < MAX_JOBS_CAN_ACCEPT_WORK; - } - - async verifySignatureSets(sets: ISignatureSet[], opts: VerifySignatureOpts = {}): Promise { - if (opts.verifyOnMainThread && !this.blsVerifyAllInQueue) { - return verifySignatureSets(sets); - } - - const results = await Promise.all( - chunkifyMaximizeChunkSize(sets, MAX_SIGNATURE_SETS_PER_JOB).map( - (setsChunk) => - new Promise((resolve, reject) => { - return this.queueWork({ - type: QueuedJobType.default, - resolve, - reject, - addedTimeMs: Date.now(), - opts, - sets: setsChunk, - }); - }) - ) - ); - - // .every on an empty array returns true - if (results.length === 0) { - throw Error("Empty results array"); - } - - return results.every((isValid) => isValid === true); - } - - async verifySignatureSetsSameMessage( - sets: {publicKey: PublicKey; signature: Uint8Array}[], - message: Uint8Array, - opts: Omit = {} - ): Promise { - const results = await Promise.all( - chunkifyMaximizeChunkSize(sets, MAX_SIGNATURE_SETS_PER_JOB).map( - (setsChunk) => - new Promise((resolve, reject) => { - this.queueWork({ - type: QueuedJobType.sameMessage, - resolve, - reject, - addedTimeMs: Date.now(), - opts: {...opts, addVerificationRandomness: this.addVerificationRandomness}, - sets: setsChunk, - message, - }); - }) - ) - ); - - return results.flat(); - } - - async close(): Promise { - if (this.buffer) { - clearTimeout(this.buffer.timeout); - } - - // Abort all jobs - for (const job of this.jobsForNextRun) { - job.reject(new Error("QUEUE_ABORTED")); - } - this.jobsForNextRun.clear(); - - // TODO: (matthewkeil) make sure clearing jobs doesn't cause issue when libuv is used - // and the jobs resolve/reject again at task completion - } - - private queueWork(job: QueuedJob): void { - if (this.closed) { - throw new Error("QUEUE_ABORTED"); - } - - if (job.opts.batchable) { - if (!this.buffer) { - this.buffer = { - jobs: new LinkedList(), - prioritizedJobs: new LinkedList(), - sigCount: 0, - firstPush: Date.now(), - timeout: setTimeout(this.runBufferedJobs, MAX_BUFFER_WAIT_MS), - }; - } - - job.opts.priority ? this.buffer.prioritizedJobs.push(job) : this.buffer.jobs.push(job); - this.buffer.sigCount += countSignatures(job); - - if (this.buffer.sigCount > MAX_BUFFERED_SIGS) { - clearTimeout(this.buffer.timeout); - this.runBufferedJobs(); - } - } else { - if (job.opts.priority) { - this.jobsForNextRun.unshift(job); - } else { - this.jobsForNextRun.push(job); - } - setTimeout(this.runJob, 0); - } - } - - private prepareWork(): QueuedJob[] { - const jobs: QueuedJob[] = []; - let totalSigs = 0; - - while (totalSigs < MAX_SIGNATURE_SETS_PER_JOB) { - const job = this.jobsForNextRun.shift(); - if (!job) { - // TODO: (matthewkeil) should this pull from buffer.prioritizedJobs and - // then buffer.jobs until full run? - break; - } - - jobs.push(job); - totalSigs += countSignatures(job); - } - - return jobs; - } - - private runBufferedJobs = (): void => { - if (this.buffer) { - for (const job of this.buffer.jobs) { - this.jobsForNextRun.push(job); - } - for (const job of this.buffer.prioritizedJobs) { - this.jobsForNextRun.unshift(job); - } - this.buffer = null; - setTimeout(this.runJob.bind(this), 0); - } - }; - - private runJob = async (): Promise => { - if (this.closed) { - return; - } - const prepared = this.prepareWork(); - if (prepared.length === 0) { - return; - } - - await this._runJob(prepared); - - setTimeout(this.runJob, 0); - }; - - private _runJob = async (jobs: QueuedJob[]): Promise => { - try { - const workReqs: BlsWorkRequest[] = []; - const jobsStarted: QueuedJob[] = []; - - for (const job of jobs) { - let workReq: BlsWorkRequest; - try { - workReq = prepareWorkReqFromJob(job); - } catch (e) { - switch (job.type) { - case QueuedJobType.default: - job.reject(e as Error); - break; - - case QueuedJobType.sameMessage: - this.retryJobItemSameMessage(job); - break; - } - - continue; - } - workReqs.push(workReq); - jobsStarted.push(job); - } - - const workResult = await runWorkRequests(workReqs); - const {results} = workResult; - - for (let i = 0; i < jobsStarted.length; i++) { - const job = jobsStarted[i]; - const jobResult = results[i]; - - switch (job.type) { - case QueuedJobType.default: - if (!jobResult || jobResult.code !== WorkResultCode.success) { - job.reject(getJobResultError(jobResult, i)); - } else { - job.resolve(jobResult.result); - } - break; - - case QueuedJobType.sameMessage: - if (!jobResult || jobResult.code !== WorkResultCode.success) { - job.reject(getJobResultError(jobResult, i)); - } else { - if (jobResult.result) { - job.resolve(job.sets.map(() => true)); - } else { - this.retryJobItemSameMessage(job); - } - } - break; - } - } - } catch (e) { - for (const job of jobs) { - job.reject(e as Error); - } - } - }; - - private retryJobItemSameMessage(job: QueuedJobSameMessage): void { - for (const j of jobItemSameMessageToMultiSet(job)) { - if (j.opts.priority) { - this.jobsForNextRun.unshift(j); - } else { - this.jobsForNextRun.push(j); - } - } - } -} diff --git a/test/utils/multithreading/helpers.ts b/test/utils/multithreading/helpers.ts deleted file mode 100644 index 464dd9d8..00000000 --- a/test/utils/multithreading/helpers.ts +++ /dev/null @@ -1,174 +0,0 @@ -import crypto from "crypto"; -import {aggregateSignatures} from "../../../lib"; -import {getTestSet, getTestSetSameMessage} from "../testSets"; -import {shuffle} from "../helpers"; -import { - AggregatedSignatureSet, - SameMessagePair, - SignatureSetGroups, - SingleSignatureSet, - SameMessageSetArray, - SignatureSetType, - WorkResultError, -} from "./types"; -import {QueuedJob, QueuedJobType} from "./queuedJob"; - -/** - * `rand` must not be exactly zero. Otherwise it would allow the verification of invalid signatures - * See https://github.com/ChainSafe/blst-ts/issues/45 - */ -export function randomBytesNonZero(bytesCount: number): Buffer { - const rand = crypto.randomBytes(bytesCount); - for (let i = 0; i < bytesCount; i++) { - if (rand[i] !== 0) return rand; - } - rand[0] = 1; - return rand; -} - -export function countSignatures(job: QueuedJob): number { - switch (job.type) { - case QueuedJobType.default: - return job.sets.length; - case QueuedJobType.sameMessage: - return 1; - } -} - -export function getJobResultError(jobResult: WorkResultError | null, i: number): Error { - const workerError = jobResult ? Error(jobResult.error.message) : Error(`No jobResult for index ${i}`); - if (jobResult?.error?.stack) workerError.stack = jobResult.error.stack; - return workerError; -} - -export const keygenMaterial = crypto.randomBytes(32); - -/** - * Gets batches of signature sets. - * - * @param batchSize - number of sets to generate - */ -export function getBatchesOfSingleSignatureSets(batchSize: number): SingleSignatureSet[] { - const sets: SingleSignatureSet[] = []; - - for (let i = 0; i < batchSize; i++) { - const set = getTestSet(i); - sets.push({ - type: SignatureSetType.single, - pubkey: set.publicKey, - signingRoot: set.message, - signature: set.signature.serialize(), - }); - } - - return sets; -} - -/** - * Gets groups of batches of signature sets - * - * @param batchSize - number of sets in each group, each with a single signature and message - * @param numGroups - number of groups to generate - * @returns - */ -export function getGroupsOfBatchesOfSingleSignatureSets(batchSize: number, numGroups: number): SingleSignatureSet[][] { - const groups = [] as SingleSignatureSet[][]; - for (let i = 0; i < numGroups; i++) { - groups.push(getBatchesOfSingleSignatureSets(batchSize)); - } - return groups; -} - -/** - * Gets batches of signature sets where the signature is aggregated from - * multiple public keys signing the same message. - * - * @param setCount - number of public key/signature pairs - * @param batchSize - number of sets to generate - */ -export function getBatchesOfSameMessageSignatureSets(setCount: number, batchSize: number): SameMessageSetArray { - const aggregatedSets: SameMessageSetArray = []; - for (let i = 0; i < batchSize; i++) { - let message: Uint8Array; - const sets: SameMessagePair[] = []; - for (let j = 0; j < setCount; j++) { - const set = getTestSetSameMessage(i + j); - if (j === 0) { - message = set.message; - } - sets.push({publicKey: set.publicKey, signature: set.signature}); - } - - aggregatedSets.push({ - sets: sets as any, - message: message!, - }); - } - return aggregatedSets; -} - -/** - * Gets batches of signature sets where the signature is aggregated from - * multiple public keys signing the same message. - * - * @param pubKeyCount - number of public key/signature pairs to aggregate - * @param batchSize - number of sets to generate - */ -export function getBatchesOfAggregatedSignatureSets(pubKeyCount: number, batchSize: number): AggregatedSignatureSet[] { - const aggregatedSets: AggregatedSignatureSet[] = []; - const sameMessageSets = getBatchesOfSameMessageSignatureSets(pubKeyCount, batchSize); - for (const {sets, message} of sameMessageSets) { - const sigs = sets.map((set) => set.signature); - const signature = aggregateSignatures(sigs).serialize(); - - aggregatedSets.push({ - type: SignatureSetType.aggregate, - pubkeys: sets.map((set) => set.publicKey) as any, - signingRoot: message, - signature, - }); - } - return aggregatedSets; -} - -/** - * Gets groups of batches of sets where the signature is aggregated from - * multiple public keys signing the same message. - * - * @param pubKeyCount - number of public key/signature pairs to aggregate - * @param batchSize - number of sets in each group, each with a single signature and message - * @param numGroups - number of groups to generate - * @returns - */ -export function getGroupsOfBatchesOfAggregatedSignatureSets( - pubKeyCount: number, - batchSize: number, - numGroups: number -): AggregatedSignatureSet[][] { - const groups = [] as AggregatedSignatureSet[][]; - for (let i = 0; i < numGroups; i++) { - groups.push(getBatchesOfAggregatedSignatureSets(pubKeyCount, batchSize)); - } - return groups; -} - -/** - * Gets groups of batches of signature sets. Gets both single and aggregated and - * shuffles them together as would be expected in a real-world scenario. - * - * @param pubKeyCount - number of public key/signature pairs in a batch - * @param batchSize - number of batches in each group - * @param singleGroupsCount - number of groups of single signature sets - * @param aggregatedGroupsCount - number of groups of aggregated signature sets - * @returns - */ -export function getGroupsOfBatchesOfSignatureSets( - pubKeyCount: number, - batchSize: number, - singleGroupsCount: number, - aggregatedGroupsCount: number -): SignatureSetGroups { - const single = getGroupsOfBatchesOfSingleSignatureSets(batchSize, singleGroupsCount); - const aggregated = getGroupsOfBatchesOfAggregatedSignatureSets(pubKeyCount, batchSize, aggregatedGroupsCount); - return shuffle([...single, ...aggregated]); -} diff --git a/test/utils/multithreading/index.ts b/test/utils/multithreading/index.ts deleted file mode 100644 index 204915cf..00000000 --- a/test/utils/multithreading/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./types"; -export * from "./blsMultiThreading"; -export * from "./helpers"; diff --git a/test/utils/multithreading/poolSize.ts b/test/utils/multithreading/poolSize.ts deleted file mode 100644 index 56fa21d8..00000000 --- a/test/utils/multithreading/poolSize.ts +++ /dev/null @@ -1,17 +0,0 @@ -import os from "os"; -let defaultPoolSize: number; - -try { - if (typeof navigator !== "undefined") { - defaultPoolSize = navigator.hardwareConcurrency ?? 4; - } else { - defaultPoolSize = os.availableParallelism(); - } -} catch (e) { - defaultPoolSize = 8; -} - -/** - * Cross-platform aprox number of logical cores - */ -export {defaultPoolSize}; diff --git a/test/utils/multithreading/queuedJob.ts b/test/utils/multithreading/queuedJob.ts deleted file mode 100644 index 2fda62b7..00000000 --- a/test/utils/multithreading/queuedJob.ts +++ /dev/null @@ -1,115 +0,0 @@ -import {CoordType, PublicKey, Signature, aggregatePublicKeys, aggregateSignatures} from "../../../lib"; -import {BlsWorkRequest, ISignatureSet, SignatureSetType, VerifySignatureOpts} from "./types"; -import {LinkedList} from "./array"; -import {getAggregatePublicKey} from "./verify"; -import {randomBytesNonZero} from "./helpers"; - -export enum QueuedJobType { - default = "default", - sameMessage = "same_message", -} - -export type QueuedJobDefault = { - type: QueuedJobType.default; - resolve: (result: boolean) => void; - reject: (error?: Error) => void; - addedTimeMs: number; - opts: VerifySignatureOpts; - sets: ISignatureSet[]; -}; - -export type QueuedJobSameMessage = { - type: QueuedJobType.sameMessage; - resolve: (result: boolean[]) => void; - reject: (error?: Error) => void; - addedTimeMs: number; - opts: VerifySignatureOpts; - sets: {publicKey: PublicKey; signature: Uint8Array}[]; - message: Uint8Array; -}; - -export type QueuedJob = QueuedJobDefault | QueuedJobSameMessage; - -export function prepareWorkReqFromJob(job: QueuedJob): BlsWorkRequest { - if (job.type === QueuedJobType.default) { - return { - opts: job.opts, - sets: job.sets.map((set) => { - return { - signature: set.signature, - message: set.signingRoot, - publicKey: getAggregatePublicKey(set), - }; - }), - }; - } - - const randomness: Uint8Array[] = []; - if (job.opts.addVerificationRandomness) { - for (let i = 0; i < job.sets.length; i++) { - randomness.push(randomBytesNonZero(8)); - } - } - - const publicKey = aggregatePublicKeys( - job.sets.map((set, i) => { - if (job.opts.addVerificationRandomness) { - return (set.publicKey as PublicKey).multiplyBy(randomness[i]); - } - return set.publicKey as PublicKey; - }) - ); - const signature = aggregateSignatures( - job.sets.map((set, i) => { - const sig = Signature.deserialize(set.signature, CoordType.affine); - sig.sigValidate(); - if (job.opts.addVerificationRandomness) { - return sig.multiplyBy(randomness[i]); - } - return sig; - }) - ); - - return { - opts: job.opts, - sets: [ - { - publicKey, - signature, - message: job.message, - }, - ], - }; -} - -export function jobItemSameMessageToMultiSet(job: QueuedJobSameMessage): LinkedList { - const promises: Promise[] = []; - const jobs = new LinkedList(); - - for (const set of job.sets) { - promises.push( - new Promise((resolve, reject) => { - jobs.push({ - type: QueuedJobType.default, - resolve, - reject, - addedTimeMs: job.addedTimeMs, - opts: {batchable: false, priority: job.opts.priority}, - sets: [ - { - type: SignatureSetType.single, - pubkey: set.publicKey, - signature: set.signature, - signingRoot: job.message, - }, - ], - }); - }) - ); - } - - // Connect jobs to main job - Promise.all(promises).then(job.resolve, job.reject); - - return jobs; -} diff --git a/test/utils/multithreading/runWorkRequests.ts b/test/utils/multithreading/runWorkRequests.ts deleted file mode 100644 index 9dc85d77..00000000 --- a/test/utils/multithreading/runWorkRequests.ts +++ /dev/null @@ -1,83 +0,0 @@ -import {SignatureSet} from "../../../lib"; -import {chunkifyMaximizeChunkSize} from "../../utils"; -import {WorkResult, WorkResultCode, BlsWorkResult, BlsWorkRequest} from "./types"; -import {asyncVerifyNapiSignatureSets} from "./verify"; - -const BATCHABLE_MIN_PER_CHUNK = 16; - -export async function runWorkRequests(workReqArr: BlsWorkRequest[]): Promise { - const results: WorkResult[] = []; - let batchRetries = 0; - let batchSigsSuccess = 0; - - // If there are multiple batchable sets attempt batch verification with them - const batchableSets: {idx: number; sets: SignatureSet[]}[] = []; - const nonBatchableSets: {idx: number; sets: SignatureSet[]}[] = []; - - // Split sets between batchable and non-batchable preserving their original index in the req array - for (let i = 0; i < workReqArr.length; i++) { - const workReq = workReqArr[i]; - if (workReq.opts.batchable) { - batchableSets.push({idx: i, sets: workReq.sets as SignatureSet[]}); - } else { - nonBatchableSets.push({idx: i, sets: workReq.sets as SignatureSet[]}); - } - } - - if (batchableSets.length > 0) { - // Split batchable into chunks of max size ~ 32 to minimize cost if a sig is wrong - const batchableChunks = chunkifyMaximizeChunkSize(batchableSets, BATCHABLE_MIN_PER_CHUNK); - - for (const batchableChunk of batchableChunks) { - // flatten all sets into a single array for batch verification - const allSets: SignatureSet[] = []; - for (const {sets} of batchableChunk) { - // TODO: speed test in perf for potential switch to allSets.push(...sets); - for (const set of sets) { - allSets.push(set); - } - } - - try { - // Attempt to verify multiple sets at once - const isValid = await asyncVerifyNapiSignatureSets(allSets); - - if (isValid) { - // The entire batch is valid, return success to all - for (const {idx, sets} of batchableChunk) { - batchSigsSuccess += sets.length; - results[idx] = {code: WorkResultCode.success, result: isValid}; - } - } else { - batchRetries++; - // Re-verify all sigs individually - nonBatchableSets.push(...batchableChunk); - } - } catch (e) { - // TODO: Ignore this error expecting that the same error will happen when re-verifying the set individually - // It's not ideal but '@chainsafe/blst' may throw errors on some conditions - batchRetries++; - // Re-verify all sigs - nonBatchableSets.push(...batchableChunk); - } - } - } - - await Promise.all( - nonBatchableSets.map(({idx, sets}) => - asyncVerifyNapiSignatureSets(sets) - .then((isValid) => { - results[idx] = {code: WorkResultCode.success, result: isValid}; - }) - .catch((e) => { - results[idx] = {code: WorkResultCode.error, error: e as Error}; - }) - ) - ); - - return { - batchRetries, - batchSigsSuccess, - results, - }; -} diff --git a/test/utils/multithreading/types.ts b/test/utils/multithreading/types.ts deleted file mode 100644 index bc295e33..00000000 --- a/test/utils/multithreading/types.ts +++ /dev/null @@ -1,71 +0,0 @@ -import {PublicKey, Signature} from "../../../lib"; -import {SignatureSetArray} from "../types"; - -export enum SignatureSetType { - single = "single", - aggregate = "aggregate", -} - -export type SingleSignatureSet = { - type: SignatureSetType.single; - pubkey: PublicKey; - signingRoot: Uint8Array; - signature: Uint8Array; -}; - -export type AggregatedSignatureSet = { - type: SignatureSetType.aggregate; - pubkeys: PublicKey[]; - signingRoot: Uint8Array; - signature: Uint8Array; -}; - -export type SignatureSetGroups = (SingleSignatureSet[] | AggregatedSignatureSet[])[]; - -export type ISignatureSet = SingleSignatureSet | AggregatedSignatureSet; - -export interface SameMessagePair { - publicKey: PublicKey; - signature: Signature; -} -export interface SameMessageSet { - sets: SameMessagePair[]; - message: Uint8Array; -} - -export type SameMessageSetArray = SameMessageSet[]; - -export type BlsMultiThreadWorkerPoolOptions = { - blsVerifyAllInQueue?: boolean; - addVerificationRandomness?: boolean; -}; - -export type BlsMultiThreadWorkerPoolModules = Record; - -export interface VerifySignatureOpts { - batchable?: boolean; - verifyOnMainThread?: boolean; - priority?: boolean; - addVerificationRandomness?: boolean; -} - -export interface BlsWorkRequest { - opts: VerifySignatureOpts; - sets: SignatureSetArray; -} - -export enum WorkResultCode { - success = "success", - error = "error", -} - -export type WorkResultError = {code: WorkResultCode.error; error: Error}; -export type WorkResult = {code: WorkResultCode.success; result: R} | WorkResultError; - -export interface BlsWorkResult { - /** Total num of batches that had to be retried */ - batchRetries: number; - /** Total num of sigs that have been successfully verified with batching */ - batchSigsSuccess: number; - results: WorkResult[]; -} diff --git a/test/utils/multithreading/verify.ts b/test/utils/multithreading/verify.ts deleted file mode 100644 index 0c6345bb..00000000 --- a/test/utils/multithreading/verify.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { - PublicKey, - Signature, - SignatureSet, - aggregatePublicKeys, - asyncVerify, - asyncVerifyMultipleAggregateSignatures, - verify, - verifyMultipleAggregateSignatures, -} from "../../../lib"; -import {ISignatureSet, SignatureSetType} from "./types"; - -const MIN_SET_COUNT_TO_BATCH = 2; - -export function getAggregatePublicKey(set: ISignatureSet): PublicKey { - switch (set.type) { - case SignatureSetType.single: - return set.pubkey; - - case SignatureSetType.aggregate: - return aggregatePublicKeys(set.pubkeys); - - default: - throw Error("Unknown signature set type"); - } -} - -export function verifySignatureSets(sets: ISignatureSet[]): boolean { - try { - const aggregatedSets = sets.map((set) => ({ - publicKey: getAggregatePublicKey(set), - message: set.signingRoot.valueOf(), - signature: Signature.deserialize(set.signature), - })); - - if (sets.length >= MIN_SET_COUNT_TO_BATCH) { - return verifyMultipleAggregateSignatures(aggregatedSets); - } - - if (sets.length === 0) { - throw Error("Empty signature set"); - } - - return aggregatedSets.every((set) => verify(set.message, set.publicKey, set.signature)); - } catch { - return false; - } -} - -export async function asyncVerifyNapiSignatureSets(sets: SignatureSet[]): Promise { - try { - if (sets.length >= MIN_SET_COUNT_TO_BATCH) { - return await asyncVerifyMultipleAggregateSignatures(sets); - } - - if (sets.length === 0) { - throw Error("Empty signature set"); - } - - const verifications = await Promise.all( - sets.map((set) => asyncVerify(set.message, set.publicKey, set.signature).catch(() => false)) - ); - - return verifications.every((v) => v); - } catch { - return false; - } -} diff --git a/test/utils/testSets.ts b/test/utils/testSets.ts index 13544593..18a3e9ad 100644 --- a/test/utils/testSets.ts +++ b/test/utils/testSets.ts @@ -1,31 +1,31 @@ import crypto from "crypto"; -import {SecretKey, Signature, BLST_CONSTANTS} from "../../lib"; +import {SECRET_KEY_LENGTH, SecretKey, Signature} from "../../index.js"; import {TestSet, SerializedSet, SameMessageTestSets} from "./types"; import {arrayOfIndexes} from "./helpers"; const DEFAULT_TEST_MESSAGE = Uint8Array.from(Buffer.from("test-message")); -export function buildTestSetFromMessage(message: Uint8Array = DEFAULT_TEST_MESSAGE): TestSet { - const secretKey = SecretKey.fromKeygen(crypto.randomBytes(BLST_CONSTANTS.SECRET_KEY_LENGTH)); - const publicKey = secretKey.toPublicKey(); - const signature = secretKey.sign(message); +export function buildTestSetFromMessage(msg: Uint8Array = DEFAULT_TEST_MESSAGE): TestSet { + const sk = SecretKey.fromKeygen(crypto.randomBytes(SECRET_KEY_LENGTH)); + const pk = sk.toPublicKey(); + const sig = sk.sign(msg); try { - publicKey.keyValidate(); + pk.keyValidate(); } catch { console.log(">>>\n>>>\n>>> Invalid Key Found in a TestSet\n>>>\n>>>"); - return buildTestSetFromMessage(message); + return buildTestSetFromMessage(msg); } try { - signature.sigValidate(); + sig.sigValidate(); } catch { console.log(">>>\n>>>\n>>> Invalid Signature Found in a TestSet\n>>>\n>>>"); - return buildTestSetFromMessage(message); + return buildTestSetFromMessage(msg); } return { - message, - secretKey, - publicKey, - signature, + msg, + sk, + pk, + sig, }; } @@ -54,24 +54,24 @@ export const commonMessage = crypto.randomBytes(32); const commonMessageSignatures = new Map(); export function getTestSetSameMessage(i: number = 1): TestSet { const set = getTestSet(i); - let signature = commonMessageSignatures.get(i); - if (!signature) { - signature = set.secretKey.sign(commonMessage); - commonMessageSignatures.set(i, signature); + let sig = commonMessageSignatures.get(i); + if (!sig) { + sig = set.sk.sign(commonMessage); + commonMessageSignatures.set(i, sig); } return { - message: commonMessage, - secretKey: set.secretKey, - publicKey: set.publicKey, - signature, + msg: commonMessage, + sk: set.sk, + pk: set.pk, + sig, }; } export function getTestSetsSameMessage(count: number): SameMessageTestSets { const sets = arrayOfIndexes(0, count - 1).map(getTestSetSameMessage); return { - message: sets[0].message, - sets: sets.map(({secretKey, publicKey, signature}) => ({secretKey, publicKey, signature})), + msg: sets[0].msg, + sets: sets.map(({sk, pk, sig}) => ({sk, pk, sig})), }; } @@ -83,10 +83,10 @@ export function getSerializedTestSet(i: number = 1): SerializedSet { } const deserialized = getTestSet(i); const serialized = { - message: deserialized.message, - secretKey: deserialized.secretKey.serialize(), - publicKey: deserialized.publicKey.serialize(), - signature: deserialized.signature.serialize(), + msg: deserialized.msg, + sk: deserialized.sk.toBytes(), + pk: deserialized.pk.toBytes(), + sig: deserialized.sig.toBytes(), }; serializedSets.set(i, serialized); return serialized; diff --git a/test/utils/types.ts b/test/utils/types.ts index 134addf2..9e7c0bef 100644 --- a/test/utils/types.ts +++ b/test/utils/types.ts @@ -1,19 +1,20 @@ -import * as bindings from "../../lib"; +import * as bindings from "../../index.js"; -export type BufferLike = string | Uint8Array | Buffer | bindings.Serializable; +export type BufferLike = string | Uint8Array | Buffer | bindings.PublicKey | bindings.Signature; export interface TestSet { - message: Uint8Array; - secretKey: bindings.SecretKey; - publicKey: bindings.PublicKey; - signature: bindings.Signature; + msg: Uint8Array; + sk: bindings.SecretKey; + pk: bindings.PublicKey; + sig: bindings.Signature; } + export interface SameMessageTestSets { - message: Uint8Array; + msg: Uint8Array; sets: { - secretKey: bindings.SecretKey; - publicKey: bindings.PublicKey; - signature: bindings.Signature; + sk: bindings.SecretKey; + pk: bindings.PublicKey; + sig: bindings.Signature; }[]; } @@ -32,3 +33,8 @@ export type InstanceTestCases = { res?: ReturnType; }[]; }; + +export type CodeError = { + code: string; + message: string; +}; diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json deleted file mode 100644 index f83a0ca4..00000000 --- a/tsconfig.cjs.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "./tsconfig", - "include": [ - "utils", - "lib/index.js", - "lib/bindings.ts", - ], - "exclude": [ - "scripts", - "test", - ], - "compilerOptions": { - "noEmit": false, - "sourceMap": true, - "declaration": false, - "declarationMap": false, - "module": "CommonJS", - "moduleResolution": "Node", - "outDir": "./dist/cjs" - } -} diff --git a/tsconfig.esm.json b/tsconfig.esm.json deleted file mode 100644 index 9b2e7689..00000000 --- a/tsconfig.esm.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "./tsconfig", - "include": [ - "utils", - "lib/index.mjs", - "lib/bindings.ts" - ], - "exclude": [ - "scripts", - "test", - ], - "compilerOptions": { - "noEmit": false, - "sourceMap": true, - "declaration": false, - "declarationMap": false, - "module": "ESNext", - "moduleResolution": "Node", - "outDir": "./dist/esm" - } -} diff --git a/tsconfig.fuzz.json b/tsconfig.fuzz.json index d1bc16f4..ffff679e 100644 --- a/tsconfig.fuzz.json +++ b/tsconfig.fuzz.json @@ -1,9 +1,7 @@ { "extends": "./tsconfig", "include": [ - "utils", - "lib/index.js", - "lib/bindings.ts", + "index.js", "test/fuzz" ], "compilerOptions": { diff --git a/tsconfig.json b/tsconfig.json index 214fc31c..0547f9ec 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,25 +1,9 @@ { - "exclude": [ - "blst", - "dist", - "doc", - "fuzz-tests", - "node_modules", - "spec-tests", - "src", - ], "compilerOptions": { "target": "ESNext", - "moduleResolution": "Node", - "lib": [ - "ESNext", - "ESNext.BigInt" - ], - "noEmit": true, - "pretty": true, - "allowJs": true, - "checkJs": true, + "module": "CommonJS", "esModuleInterop": true, + "strict": true, "alwaysStrict": true, "strictNullChecks": true, @@ -29,5 +13,14 @@ "noImplicitAny": true, "noImplicitThis": true, "noImplicitReturns": true, - } -} + "noImplicitOverride": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + + "pretty": true, + "sourceMap": true, + "declaration": true, + "declarationMap": true, + }, +} \ No newline at end of file diff --git a/utils/index.ts b/utils/index.ts deleted file mode 100644 index 96e9c4f0..00000000 --- a/utils/index.ts +++ /dev/null @@ -1,111 +0,0 @@ -import {resolve} from "node:path"; -import {existsSync} from "node:fs"; -import {exec as EXEC, ExecOptions, ChildProcess, PromiseWithChild} from "node:child_process"; - -export const BINDINGS_NAME = "blst_ts_addon"; -export const BINDINGS_FILE = `${BINDINGS_NAME}.node`; - -class NotNodeJsError extends Error { - constructor(missingItem: string) { - super(`blst-ts bindings only run in a NodeJS context. No ${missingItem} found.`); - } -} - -/** - * Get binary name. - * name: {platform}-{arch}-{v8 version}-blst_ts_addon.node - */ -export function getBinaryName(): string { - if (!process) throw new NotNodeJsError("global object"); - const platform = process.platform; - if (!platform) throw new NotNodeJsError("process.platform"); - const arch = process.arch; - if (!arch) throw new NotNodeJsError("process.arch"); - const nodeApiVersion = process.versions.modules; - if (!nodeApiVersion) throw new NotNodeJsError("process.versions.modules"); - - return [platform, arch, nodeApiVersion, BINDINGS_FILE].join("-"); -} - -/** - * Builds a list of search paths to look for the bindings file - */ -function buildSearchPaths(rootDir: string): string[] { - const searchLocations: string[][] = [ - [rootDir, "prebuild", getBinaryName()], - [rootDir, "build", "Debug", BINDINGS_FILE], - [rootDir, "build", "Release", BINDINGS_FILE], - ]; - - return searchLocations.map((location) => resolve(...location)); -} - -/** - * Locates the bindings file using the blst-ts naming convention for prebuilt - * bindings. Falls back to node-gyp naming if not found. - */ -export function getBindingsPath(rootDir: string): string { - const searchLocations = buildSearchPaths(rootDir); - for (const filepath of searchLocations) { - if (existsSync(filepath)) { - return filepath; - } - } - - throw Error(`Could not find bindings file. Tried:\n${searchLocations.join("\n")}`); -} - -export interface ExecPromiseOptions extends ExecOptions { - pipeInput?: boolean; -} - -const defaultOptions: ExecPromiseOptions = { - timeout: 3 * 60 * 1000, // ms - maxBuffer: 10e6, // bytes - pipeInput: false, -}; - -export function exec( - command: string, - logToConsole = true, - execOptions: ExecPromiseOptions = {} -): PromiseWithChild { - const options = {...defaultOptions, ...execOptions}; - - let child!: ChildProcess; - const promise = new Promise((resolve, reject) => { - const chunks: Buffer[] = []; - function bufferOutput(data: string): void { - chunks.push(Buffer.from(data)); - } - function stdoutHandler(data: string): void { - process.stdout.write(data); - } - function stderrHandler(data: string): void { - process.stderr.write(data); - } - - child = EXEC(command, options, (err) => { - child.stdout?.removeAllListeners("data"); - child.stderr?.removeAllListeners("data"); - const output = Buffer.concat(chunks).toString("utf8"); - if (err) { - return reject(err); - } - return resolve(output); - }); - - if (child.stdin && options.pipeInput) { - process.stdin.pipe(child.stdin); - } - child.stdout?.on("data", logToConsole ? stdoutHandler : bufferOutput); - child.stderr?.on("data", logToConsole ? stderrHandler : bufferOutput); - - child.on("exit", () => { - return resolve(Buffer.concat(chunks).toString("utf8")); - }); - }) as PromiseWithChild; - - promise.child = child; - return promise; -} diff --git a/yarn.lock b/yarn.lock index c2bdb57b..80a22060 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,11 +2,6 @@ # yarn lockfile v1 -"@aashutoshrathi/word-wrap@^1.2.3": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" - integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== - "@actions/cache@^1.0.7": version "1.0.11" resolved "https://registry.yarnpkg.com/@actions/cache/-/cache-1.0.11.tgz#db7909ba7f7e7bc9bd1a761c172c48807586b996" @@ -63,9 +58,9 @@ tunnel "0.0.6" "@actions/http-client@^2.0.1": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.2.0.tgz#f8239f375be6185fcd07765efdcf0031ad5df1a0" - integrity sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg== + version "2.2.1" + resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.2.1.tgz#ed3fe7a5a6d317ac1d39886b0bb999ded229bb38" + integrity sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw== dependencies: tunnel "^0.0.6" undici "^5.25.4" @@ -82,74 +77,104 @@ dependencies: tslib "^2.2.0" -"@azure/core-auth@^1.1.4", "@azure/core-auth@^1.3.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.5.0.tgz#a41848c5c31cb3b7c84c409885267d55a2c92e44" - integrity sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw== +"@azure/abort-controller@^2.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@azure/abort-controller/-/abort-controller-2.1.2.tgz#42fe0ccab23841d9905812c58f1082d27784566d" + integrity sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA== dependencies: - "@azure/abort-controller" "^1.0.0" + tslib "^2.6.2" + +"@azure/core-auth@^1.1.4", "@azure/core-auth@^1.4.0": + version "1.7.2" + resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.7.2.tgz#558b7cb7dd12b00beec07ae5df5907d74df1ebd9" + integrity sha512-Igm/S3fDYmnMq1uKS38Ae1/m37B3zigdlZw+kocwEhh5GjyKjPrXKO2J6rzpC1wAxrNil/jX9BJRqBshyjnF3g== + dependencies: + "@azure/abort-controller" "^2.0.0" "@azure/core-util" "^1.1.0" - tslib "^2.2.0" + tslib "^2.6.2" -"@azure/core-http@^3.0.0": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@azure/core-http/-/core-http-3.0.4.tgz#024b2909bbc0f2fce08c74f97a21312c4f42e922" - integrity sha512-Fok9VVhMdxAFOtqiiAtg74fL0UJkt0z3D+ouUUxcRLzZNBioPRAMJFVxiWoJljYpXsRi4GDQHzQHDc9AiYaIUQ== +"@azure/core-client@^1.3.0", "@azure/core-client@^1.6.2": + version "1.9.2" + resolved "https://registry.yarnpkg.com/@azure/core-client/-/core-client-1.9.2.tgz#6fc69cee2816883ab6c5cdd653ee4f2ff9774f74" + integrity sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w== dependencies: - "@azure/abort-controller" "^1.0.0" - "@azure/core-auth" "^1.3.0" - "@azure/core-tracing" "1.0.0-preview.13" - "@azure/core-util" "^1.1.1" + "@azure/abort-controller" "^2.0.0" + "@azure/core-auth" "^1.4.0" + "@azure/core-rest-pipeline" "^1.9.1" + "@azure/core-tracing" "^1.0.0" + "@azure/core-util" "^1.6.1" "@azure/logger" "^1.0.0" - "@types/node-fetch" "^2.5.0" - "@types/tunnel" "^0.0.3" - form-data "^4.0.0" - node-fetch "^2.6.7" - process "^0.11.10" - tslib "^2.2.0" - tunnel "^0.0.6" - uuid "^8.3.0" - xml2js "^0.5.0" + tslib "^2.6.2" + +"@azure/core-http-compat@^2.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@azure/core-http-compat/-/core-http-compat-2.1.2.tgz#d1585ada24ba750dc161d816169b33b35f762f0d" + integrity sha512-5MnV1yqzZwgNLLjlizsU3QqOeQChkIXw781Fwh1xdAqJR5AA32IUaq6xv1BICJvfbHoa+JYcaij2HFkhLbNTJQ== + dependencies: + "@azure/abort-controller" "^2.0.0" + "@azure/core-client" "^1.3.0" + "@azure/core-rest-pipeline" "^1.3.0" "@azure/core-lro@^2.2.0": - version "2.5.4" - resolved "https://registry.yarnpkg.com/@azure/core-lro/-/core-lro-2.5.4.tgz#b21e2bcb8bd9a8a652ff85b61adeea51a8055f90" - integrity sha512-3GJiMVH7/10bulzOKGrrLeG/uCBH/9VtxqaMcB9lIqAeamI/xYQSHJL/KcsLDuH+yTjYpro/u6D/MuRe4dN70Q== + version "2.7.2" + resolved "https://registry.yarnpkg.com/@azure/core-lro/-/core-lro-2.7.2.tgz#787105027a20e45c77651a98b01a4d3b01b75a08" + integrity sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw== dependencies: - "@azure/abort-controller" "^1.0.0" + "@azure/abort-controller" "^2.0.0" "@azure/core-util" "^1.2.0" "@azure/logger" "^1.0.0" - tslib "^2.2.0" + tslib "^2.6.2" "@azure/core-paging@^1.1.1": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@azure/core-paging/-/core-paging-1.5.0.tgz#5a5b09353e636072e6a7fc38f7879e11d0afb15f" - integrity sha512-zqWdVIt+2Z+3wqxEOGzR5hXFZ8MGKK52x4vFLw8n58pR6ZfKRx3EXYTxTaYxYHc/PexPUTyimcTWFJbji9Z6Iw== + version "1.6.2" + resolved "https://registry.yarnpkg.com/@azure/core-paging/-/core-paging-1.6.2.tgz#40d3860dc2df7f291d66350b2cfd9171526433e7" + integrity sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA== dependencies: - tslib "^2.2.0" + tslib "^2.6.2" -"@azure/core-tracing@1.0.0-preview.13": - version "1.0.0-preview.13" - resolved "https://registry.yarnpkg.com/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz#55883d40ae2042f6f1e12b17dd0c0d34c536d644" - integrity sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ== +"@azure/core-rest-pipeline@^1.10.1", "@azure/core-rest-pipeline@^1.3.0", "@azure/core-rest-pipeline@^1.9.1": + version "1.16.1" + resolved "https://registry.yarnpkg.com/@azure/core-rest-pipeline/-/core-rest-pipeline-1.16.1.tgz#069caf02ca283027dd0a3cf37817e674ebf130c8" + integrity sha512-ExPSbgjwCoht6kB7B4MeZoBAxcQSIl29r/bPeazZJx50ej4JJCByimLOrZoIsurISNyJQQHf30b3JfqC3Hb88A== dependencies: - "@opentelemetry/api" "^1.0.1" - tslib "^2.2.0" + "@azure/abort-controller" "^2.0.0" + "@azure/core-auth" "^1.4.0" + "@azure/core-tracing" "^1.0.1" + "@azure/core-util" "^1.9.0" + "@azure/logger" "^1.0.0" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.0" + tslib "^2.6.2" -"@azure/core-util@^1.1.0", "@azure/core-util@^1.1.1", "@azure/core-util@^1.2.0": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.6.1.tgz#fea221c4fa43c26543bccf799beb30c1c7878f5a" - integrity sha512-h5taHeySlsV9qxuK64KZxy4iln1BtMYlNt5jbuEFN3UFSAd1EwKg/Gjl5a6tZ/W8t6li3xPnutOx7zbDyXnPmQ== +"@azure/core-tracing@^1.0.0", "@azure/core-tracing@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@azure/core-tracing/-/core-tracing-1.1.2.tgz#065dab4e093fb61899988a1cdbc827d9ad90b4ee" + integrity sha512-dawW9ifvWAWmUm9/h+/UQ2jrdvjCJ7VJEuCJ6XVNudzcOwm53BFZH4Q845vjfgoUAM8ZxokvVNxNxAITc502YA== dependencies: - "@azure/abort-controller" "^1.0.0" - tslib "^2.2.0" + tslib "^2.6.2" + +"@azure/core-util@^1.1.0", "@azure/core-util@^1.2.0", "@azure/core-util@^1.6.1", "@azure/core-util@^1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.9.0.tgz#469afd7e6452d5388b189f90d33f7756b0b210d1" + integrity sha512-AfalUQ1ZppaKuxPPMsFEUdX6GZPB3d9paR9d/TTL7Ow2De8cJaC7ibi7kWVlFAVPCYo31OcnGymc0R89DX8Oaw== + dependencies: + "@azure/abort-controller" "^2.0.0" + tslib "^2.6.2" + +"@azure/core-xml@^1.3.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@azure/core-xml/-/core-xml-1.4.2.tgz#9ce65e9520ebafc7b0c1f7115596282bfc7b32f3" + integrity sha512-CW3MZhApe/S4iikbYKE7s83fjDBPIr2kpidX+hlGRwh7N4o1nIpQ/PfJTeioqhfqdMvRtheEl+ft64fyTaLNaA== + dependencies: + fast-xml-parser "^4.3.2" + tslib "^2.6.2" "@azure/logger@^1.0.0": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@azure/logger/-/logger-1.0.4.tgz#28bc6d0e5b3c38ef29296b32d35da4e483593fa1" - integrity sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg== + version "1.1.2" + resolved "https://registry.yarnpkg.com/@azure/logger/-/logger-1.1.2.tgz#3f4b876cefad328dc14aff8b850d63b611e249dc" + integrity sha512-l170uE7bsKpIU6B/giRc9i4NI0Mj+tANMMMxf7Zi/5cKzEqPayP7+X1WPrG7e+91JgY8N+7K7nF2WOi7iVhXvg== dependencies: - tslib "^2.2.0" + tslib "^2.6.2" "@azure/ms-rest-js@^2.6.0": version "2.7.0" @@ -166,26 +191,24 @@ xml2js "^0.5.0" "@azure/storage-blob@^12.8.0": - version "12.17.0" - resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.17.0.tgz#04aad7f59cb08dbbe5b1b672a9f5b6256c8c9006" - integrity sha512-sM4vpsCpcCApagRW5UIjQNlNylo02my2opgp0Emi8x888hZUvJ3dN69Oq20cEGXkMUWnoCrBaB0zyS3yeB87sQ== + version "12.23.0" + resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.23.0.tgz#36969427d1e4f961304278e980c50613f440b194" + integrity sha512-c1KJ5R5hqR/HtvmFtTn/Y1BNMq45NUBp0LZH7yF8WFMET+wmESgEr0FVTu/Z5NonmfUjbgJZG5Nh8xHc5RdWGQ== dependencies: "@azure/abort-controller" "^1.0.0" - "@azure/core-http" "^3.0.0" + "@azure/core-auth" "^1.4.0" + "@azure/core-client" "^1.6.2" + "@azure/core-http-compat" "^2.0.0" "@azure/core-lro" "^2.2.0" "@azure/core-paging" "^1.1.1" - "@azure/core-tracing" "1.0.0-preview.13" + "@azure/core-rest-pipeline" "^1.10.1" + "@azure/core-tracing" "^1.0.0" + "@azure/core-util" "^1.6.1" + "@azure/core-xml" "^1.3.2" "@azure/logger" "^1.0.0" events "^3.0.0" tslib "^2.2.0" -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - "@dapplion/benchmark@^0.2.4": version "0.2.4" resolved "https://registry.yarnpkg.com/@dapplion/benchmark/-/benchmark-0.2.4.tgz#e75443a067af4c923c5c32c932750d297b3a34c0" @@ -206,10 +229,10 @@ dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": - version "4.10.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" - integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": + version "4.11.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" + integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== "@eslint/eslintrc@^2.1.4": version "2.1.4" @@ -226,23 +249,23 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.56.0": - version "8.56.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b" - integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A== +"@eslint/js@8.57.0": + version "8.57.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" + integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== "@fastify/busboy@^2.0.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.0.tgz#0709e9f4cb252351c609c6e6d8d6779a8d25edff" - integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA== + version "2.1.1" + resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d" + integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA== -"@humanwhocodes/config-array@^0.11.13": - version "0.11.13" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" - integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== +"@humanwhocodes/config-array@^0.11.14": + version "0.11.14" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" + integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== dependencies: - "@humanwhocodes/object-schema" "^2.0.1" - debug "^4.1.1" + "@humanwhocodes/object-schema" "^2.0.2" + debug "^4.3.1" minimatch "^3.0.5" "@humanwhocodes/module-importer@^1.0.1": @@ -250,10 +273,10 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" - integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== +"@humanwhocodes/object-schema@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" + integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== "@isaacs/cliui@^8.0.2": version "8.0.2" @@ -267,31 +290,17 @@ wrap-ansi "^8.1.0" wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" -"@jridgewell/resolve-uri@^3.0.3": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" - integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== +"@isaacs/fs-minipass@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz#2d59ae3ab4b38fb4270bfa23d30f8e2e86c7fe32" + integrity sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w== dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" + minipass "^7.0.4" -"@nodelib/fs.scandir@2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" - integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== - dependencies: - "@nodelib/fs.stat" "2.0.4" - run-parallel "^1.1.9" +"@napi-rs/cli@^2.18.3": + version "2.18.4" + resolved "https://registry.yarnpkg.com/@napi-rs/cli/-/cli-2.18.4.tgz#12bebfb7995902fa7ab43cc0b155a7f5a2caa873" + integrity sha512-SgJeA4df9DE2iAEpr3M2H0OKl/yjtg1BnRI5/JyowS71tUWhrfSu2LT0V3vlHET+g1hBVlrO60PmEXwUEKp8Mg== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -301,25 +310,12 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" - integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== - -"@nodelib/fs.stat@2.0.5": +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" - integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== - dependencies: - "@nodelib/fs.scandir" "2.1.4" - fastq "^1.6.0" - -"@nodelib/fs.walk@^1.2.8": +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -327,24 +323,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@npmcli/agent@^2.0.0": - version "2.2.2" - resolved "https://registry.yarnpkg.com/@npmcli/agent/-/agent-2.2.2.tgz#967604918e62f620a648c7975461c9c9e74fc5d5" - integrity sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og== - dependencies: - agent-base "^7.1.0" - http-proxy-agent "^7.0.0" - https-proxy-agent "^7.0.1" - lru-cache "^10.0.1" - socks-proxy-agent "^8.0.3" - -"@npmcli/fs@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.0.tgz#233d43a25a91d68c3a863ba0da6a3f00924a173e" - integrity sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w== - dependencies: - semver "^7.3.5" - "@octokit/auth-token@^2.4.4": version "2.5.0" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" @@ -431,202 +409,142 @@ dependencies: "@octokit/openapi-types" "^12.11.0" -"@opentelemetry/api@^1.0.1": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.7.0.tgz#b139c81999c23e3c8d3c0a7234480e945920fc40" - integrity sha512-AdY5wvN0P2vXBi3b29hxZgSFvdhdxPB9+f0B6s//P9Q8nibRWeA3cHm8UmLpio9ABigkVHJ5NMPk+Mz8VCCyrw== - "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== "@pkgr/core@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.0.tgz#7d8dacb7fdef0e4387caf7396cbd77f179867d06" - integrity sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ== - -"@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" - integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + version "0.1.1" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" + integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== -"@types/chai@^4.2.13": - version "4.2.13" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.13.tgz#8a3801f6655179d1803d81e94a2e4aaf317abd16" - integrity sha512-o3SGYRlOpvLFpwJA6Sl1UPOwKFEvE4FxTEB/c9XHI2whdnd4kmPVkNLL8gY4vWGBxWWDumzLbKsAhEH5SKn37Q== +"@types/chai@^4.3.16": + version "4.3.16" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.16.tgz#b1572967f0b8b60bf3f87fe1d854a5604ea70c82" + integrity sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ== -"@types/js-yaml@^4.0.5": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.5.tgz#738dd390a6ecc5442f35e7f03fa1431353f7e138" - integrity sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA== - -"@types/json-schema@^7.0.12": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" - integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== +"@types/js-yaml@^4.0.9": + version "4.0.9" + resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.9.tgz#cd82382c4f902fed9691a2ed79ec68c5898af4c2" + integrity sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg== "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= - -"@types/mocha@^8.0.3": - version "8.0.3" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.0.3.tgz#51b21b6acb6d1b923bbdc7725c38f9f455166402" - integrity sha512-vyxR57nv8NfcU0GZu8EUXZLTbCMupIUwy95LJ6lllN+JRPG25CwMHoB1q5xKh8YKhQnHYRAn4yW2yuHbf/5xgg== - -"@types/node-fetch@^2.5.0": - version "2.6.10" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.10.tgz#ff5c1ceacab782f2b7ce69957d38c1c27b0dc469" - integrity sha512-PPpPK6F9ALFTn59Ka3BaL+qGuipRfxNE8qVgkp0bVixeiR2c2/L+IVOiBdu9JhhT22sWnQEp6YyHGI2b2+CMcA== - dependencies: - "@types/node" "*" - form-data "^4.0.0" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/node@*": - version "14.14.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.8.tgz#2127bd81949a95c8b7d3240f3254352d72563aec" - integrity sha512-z/5Yd59dCKI5kbxauAJgw6dLPzW+TNOItNE00PkpzNwUIEwdj/Lsqwq94H5DdYBX7C13aRA0CY32BK76+neEUA== +"@types/mocha@^10.0.7": + version "10.0.7" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.7.tgz#4c620090f28ca7f905a94b706f74dc5b57b44f2f" + integrity sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw== -"@types/node@^20.10.4": - version "20.10.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.6.tgz#a3ec84c22965802bf763da55b2394424f22bfbb5" - integrity sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw== +"@types/node@*", "@types/node@^20.14.9": + version "20.14.10" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.10.tgz#a1a218290f1b6428682e3af044785e5874db469a" + integrity sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ== dependencies: undici-types "~5.26.4" -"@types/semver@^7.5.0": - version "7.5.6" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" - integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== - -"@types/tar@^6.1.4": - version "6.1.4" - resolved "https://registry.yarnpkg.com/@types/tar/-/tar-6.1.4.tgz#cf8497e1ebdc09212fd51625cd2eb5ca18365ad1" - integrity sha512-Cp4oxpfIzWt7mr2pbhHT2OTXGMAL0szYCzuf8lRWyIMCgsx6/Hfc3ubztuhvzXHXgraTQxyOCmmg7TDGIMIJJQ== +"@types/tar@^6.1.13": + version "6.1.13" + resolved "https://registry.yarnpkg.com/@types/tar/-/tar-6.1.13.tgz#9b5801c02175344101b4b91086ab2bbc8e93a9b6" + integrity sha512-IznnlmU5f4WcGTh2ltRu/Ijpmk8wiWXfF0VA4s+HPjHZgvFggk1YaIkbo5krX/zUCzWF8N/l4+W/LNxnvAJ8nw== dependencies: "@types/node" "*" minipass "^4.0.0" -"@types/tunnel@^0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@types/tunnel/-/tunnel-0.0.3.tgz#f109e730b072b3136347561fc558c9358bb8c6e9" - integrity sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA== - dependencies: - "@types/node" "*" - -"@typescript-eslint/eslint-plugin@^6.14.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.17.0.tgz#dfc38f790704ba8a54a1277c51efdb489f6ecf9f" - integrity sha512-Vih/4xLXmY7V490dGwBQJTpIZxH4ZFH6eCVmQ4RFkB+wmaCTDAx4dtgoWwMNGKLkqRY1L6rPqzEbjorRnDo4rQ== +"@typescript-eslint/eslint-plugin@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.15.0.tgz#8eaf396ac2992d2b8f874b68eb3fcd6b179cb7f3" + integrity sha512-uiNHpyjZtFrLwLDpHnzaDlP3Tt6sGMqTCiqmxaN4n4RP0EfYZDODJyddiFDF44Hjwxr5xAcaYxVKm9QKQFJFLA== dependencies: - "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.17.0" - "@typescript-eslint/type-utils" "6.17.0" - "@typescript-eslint/utils" "6.17.0" - "@typescript-eslint/visitor-keys" "6.17.0" - debug "^4.3.4" + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "7.15.0" + "@typescript-eslint/type-utils" "7.15.0" + "@typescript-eslint/utils" "7.15.0" + "@typescript-eslint/visitor-keys" "7.15.0" graphemer "^1.4.0" - ignore "^5.2.4" + ignore "^5.3.1" natural-compare "^1.4.0" - semver "^7.5.4" - ts-api-utils "^1.0.1" - -"@typescript-eslint/parser@^6.14.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.17.0.tgz#8cd7a0599888ca6056082225b2fdf9a635bf32a1" - integrity sha512-C4bBaX2orvhK+LlwrY8oWGmSl4WolCfYm513gEccdWZj0CwGadbIADb0FtVEcI+WzUyjyoBj2JRP8g25E6IB8A== - dependencies: - "@typescript-eslint/scope-manager" "6.17.0" - "@typescript-eslint/types" "6.17.0" - "@typescript-eslint/typescript-estree" "6.17.0" - "@typescript-eslint/visitor-keys" "6.17.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/parser@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.15.0.tgz#f4a536e5fc6a1c05c82c4d263a2bfad2da235c80" + integrity sha512-k9fYuQNnypLFcqORNClRykkGOMOj+pV6V91R4GO/l1FDGwpqmSwoOQrOHo3cGaH63e+D3ZiCAOsuS/D2c99j/A== + dependencies: + "@typescript-eslint/scope-manager" "7.15.0" + "@typescript-eslint/types" "7.15.0" + "@typescript-eslint/typescript-estree" "7.15.0" + "@typescript-eslint/visitor-keys" "7.15.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.17.0.tgz#70e6c1334d0d76562dfa61aed9009c140a7601b4" - integrity sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA== +"@typescript-eslint/scope-manager@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.15.0.tgz#201b34b0720be8b1447df17b963941bf044999b2" + integrity sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw== dependencies: - "@typescript-eslint/types" "6.17.0" - "@typescript-eslint/visitor-keys" "6.17.0" + "@typescript-eslint/types" "7.15.0" + "@typescript-eslint/visitor-keys" "7.15.0" -"@typescript-eslint/type-utils@6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.17.0.tgz#5febad3f523e393006614cbda28b826925b728d5" - integrity sha512-hDXcWmnbtn4P2B37ka3nil3yi3VCQO2QEB9gBiHJmQp5wmyQWqnjA85+ZcE8c4FqnaB6lBwMrPkgd4aBYz3iNg== +"@typescript-eslint/type-utils@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.15.0.tgz#5b83c904c6de91802fb399305a50a56d10472c39" + integrity sha512-SkgriaeV6PDvpA6253PDVep0qCqgbO1IOBiycjnXsszNTVQe5flN5wR5jiczoEoDEnAqYFSFFc9al9BSGVltkg== dependencies: - "@typescript-eslint/typescript-estree" "6.17.0" - "@typescript-eslint/utils" "6.17.0" + "@typescript-eslint/typescript-estree" "7.15.0" + "@typescript-eslint/utils" "7.15.0" debug "^4.3.4" - ts-api-utils "^1.0.1" + ts-api-utils "^1.3.0" -"@typescript-eslint/types@6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.17.0.tgz#844a92eb7c527110bf9a7d177e3f22bd5a2f40cb" - integrity sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A== +"@typescript-eslint/types@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.15.0.tgz#fb894373a6e3882cbb37671ffddce44f934f62fc" + integrity sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw== -"@typescript-eslint/typescript-estree@6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.17.0.tgz#b913d19886c52d8dc3db856903a36c6c64fd62aa" - integrity sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg== +"@typescript-eslint/typescript-estree@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.15.0.tgz#e323bfa3966e1485b638ce751f219fc1f31eba37" + integrity sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ== dependencies: - "@typescript-eslint/types" "6.17.0" - "@typescript-eslint/visitor-keys" "6.17.0" + "@typescript-eslint/types" "7.15.0" + "@typescript-eslint/visitor-keys" "7.15.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" - minimatch "9.0.3" - semver "^7.5.4" - ts-api-utils "^1.0.1" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" -"@typescript-eslint/utils@6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.17.0.tgz#f2b16d4c9984474656c420438cdede7eccd4079e" - integrity sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ== +"@typescript-eslint/utils@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.15.0.tgz#9e6253c4599b6e7da2fb64ba3f549c73eb8c1960" + integrity sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.12" - "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.17.0" - "@typescript-eslint/types" "6.17.0" - "@typescript-eslint/typescript-estree" "6.17.0" - semver "^7.5.4" - -"@typescript-eslint/visitor-keys@6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.17.0.tgz#3ed043709c39b43ec1e58694f329e0b0430c26b6" - integrity sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg== - dependencies: - "@typescript-eslint/types" "6.17.0" - eslint-visitor-keys "^3.4.1" + "@typescript-eslint/scope-manager" "7.15.0" + "@typescript-eslint/types" "7.15.0" + "@typescript-eslint/typescript-estree" "7.15.0" + +"@typescript-eslint/visitor-keys@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.15.0.tgz#1da0726201a859343fe6a05742a7c1792fff5b66" + integrity sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw== + dependencies: + "@typescript-eslint/types" "7.15.0" + eslint-visitor-keys "^3.4.3" + +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -abbrev@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf" - integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ== - abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -639,31 +557,18 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^8.1.1: - version "8.3.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.1.tgz#2f10f5b69329d90ae18c58bf1fa8fccd8b959a43" - integrity sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw== - -acorn@^8.4.1, acorn@^8.9.0: - version "8.11.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== +acorn@^8.9.0: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== -agent-base@^7.0.2, agent-base@^7.1.0, agent-base@^7.1.1: +agent-base@^7.0.2, agent-base@^7.1.0: version "7.1.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== dependencies: debug "^4.3.4" -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -675,14 +580,14 @@ ajv@^6.12.4: uri-js "^4.2.2" ajv@^8.6.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + version "8.16.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.16.0.tgz#22e2a92b94f005f7e0f9c9d39652ef0b8f6f0cb4" + integrity sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw== dependencies: - fast-deep-equal "^3.1.1" + fast-deep-equal "^3.1.3" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.2.2" + uri-js "^4.4.1" ansi-colors@4.1.1: version "4.1.1" @@ -690,19 +595,9 @@ ansi-colors@4.1.1: integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" + integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== ansi-regex@^5.0.1: version "5.0.1" @@ -714,13 +609,6 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== -ansi-styles@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" @@ -734,9 +622,9 @@ ansi-styles@^6.1.0: integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== anymatch@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" @@ -746,35 +634,29 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -array-buffer-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" - integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== +array-buffer-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== dependencies: - call-bind "^1.0.2" - is-array-buffer "^3.0.1" + call-bind "^1.0.5" + is-array-buffer "^3.0.4" array-includes@^3.1.7: - version "3.1.7" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.7.tgz#8cd2e01b26f7a3086cbc87271593fe921c62abda" - integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ== + version "3.1.8" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" + integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - get-intrinsic "^1.2.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.4" is-string "^1.0.7" array-union@^2.1.0: @@ -783,15 +665,16 @@ array-union@^2.1.0: integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== array.prototype.findlastindex@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207" - integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA== + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" + integrity sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-shim-unscopables "^1.0.0" - get-intrinsic "^1.2.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" array.prototype.flat@^1.3.2: version "1.3.2" @@ -813,27 +696,18 @@ array.prototype.flatmap@^1.3.2: es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" -array.prototype.map@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array.prototype.map/-/array.prototype.map-1.0.2.tgz#9a4159f416458a23e9483078de1106b2ef68f8ec" - integrity sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.4" - -arraybuffer.prototype.slice@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" - integrity sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw== +arraybuffer.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" + integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== dependencies: - array-buffer-byte-length "^1.0.0" - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - get-intrinsic "^1.2.1" - is-array-buffer "^3.0.2" + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.2.1" + get-intrinsic "^1.2.3" + is-array-buffer "^3.0.4" is-shared-array-buffer "^1.0.2" assertion-error@^1.1.0: @@ -844,17 +718,19 @@ assertion-error@^1.1.0: asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" aws-sdk@^2.932.0: - version "2.1531.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1531.0.tgz#75601dbe9f6b8ee22cef5bd0f6a25522aa87ca42" - integrity sha512-BnZcutxV8aplvyCQDUxOlHkrqqqmWl1hgY1sq8umP6bcSEknjH+mrBB6e0XyLQY4ParC0Oyw/8IbDWwc+LsDqw== + version "2.1655.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1655.0.tgz#62bbc96bb8057876e41e280604c5bcdde9d48dc4" + integrity sha512-Tec0/ZHK8ES6NvAEJhgEm3znyoPb4QUuyQZ2RdvbNTbpJDbeeDuu4BaCAR5HbEVXREVk1/8OBDMsWW1B5lkcww== dependencies: buffer "4.9.2" events "1.1.1" @@ -865,12 +741,12 @@ aws-sdk@^2.932.0: url "0.10.3" util "^0.12.4" uuid "8.0.0" - xml2js "0.5.0" + xml2js "0.6.2" balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base64-js@^1.0.2: version "1.5.1" @@ -883,9 +759,9 @@ before-after-hook@^2.2.0: integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== binary-extensions@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" - integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== + version "2.3.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== brace-expansion@^1.1.7: version "1.1.11" @@ -902,18 +778,23 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== +braces@^3.0.3, braces@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: - fill-range "^7.0.1" + fill-range "^7.1.1" browser-stdout@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + buffer@4.9.2: version "4.9.2" resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" @@ -923,80 +804,59 @@ buffer@4.9.2: ieee754 "^1.1.4" isarray "^1.0.0" -cacache@^18.0.0: - version "18.0.2" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-18.0.2.tgz#fd527ea0f03a603be5c0da5805635f8eef00c60c" - integrity sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw== - dependencies: - "@npmcli/fs" "^3.1.0" - fs-minipass "^3.0.0" - glob "^10.2.2" - lru-cache "^10.0.1" - minipass "^7.0.3" - minipass-collect "^2.0.1" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - p-map "^4.0.0" - ssri "^10.0.0" - tar "^6.1.11" - unique-filename "^3.0.0" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -call-bind@^1.0.4, call-bind@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" - integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ== +call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" function-bind "^1.1.2" - get-intrinsic "^1.2.1" - set-function-length "^1.1.1" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camelcase@^5.0.0, camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -chai@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" - integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== +chai@^4.3.4: + version "4.4.1" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1" + integrity sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g== dependencies: assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - pathval "^1.1.0" - type-detect "^4.0.5" + check-error "^1.0.3" + deep-eql "^4.1.3" + get-func-name "^2.0.2" + loupe "^2.3.6" + pathval "^1.1.1" + type-detect "^4.0.8" chalk@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= +check-error@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== + dependencies: + get-func-name "^2.0.2" -chokidar@3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.2.tgz#38dc8e658dec3809741eb3ef7bb0a47fe424232d" - integrity sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A== +chokidar@3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" + integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -1004,28 +864,23 @@ chokidar@3.4.2: is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.4.0" + readdirp "~3.5.0" optionalDependencies: - fsevents "~2.1.2" - -chownr@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" - integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + fsevents "~2.3.1" -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +chownr@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-3.0.0.tgz#9855e64ecd240a9cc4267ce8a4aa5d24a1da15e4" + integrity sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g== -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" cliui@^8.0.1: version "8.0.1" @@ -1036,13 +891,6 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -1050,17 +898,12 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -combined-stream@^1.0.6, combined-stream@^1.0.8: +combined-stream@^1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -1070,7 +913,7 @@ combined-stream@^1.0.6, combined-stream@^1.0.8: concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== create-require@^1.1.0: version "1.1.1" @@ -1096,73 +939,79 @@ csv-stringify@^5.6.2: resolved "https://registry.yarnpkg.com/csv-stringify/-/csv-stringify-5.6.5.tgz#c6d74badda4b49a79bf4e72f91cce1e33b94de00" integrity sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A== -debug@4: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== +data-view-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== dependencies: - ms "2.1.2" + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" -debug@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== +data-view-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== dependencies: - ms "^2.1.1" + call-bind "^1.0.7" + es-errors "^1.3.0" + is-data-view "^1.0.1" -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== +data-view-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" + integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== dependencies: - ms "^2.1.1" + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" -debug@^4.1.1: +debug@4, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: + version "4.3.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + +debug@4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== dependencies: ms "2.1.2" -debug@^4.3.2, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: - ms "2.1.2" + ms "^2.1.1" -decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== -deep-eql@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== +deep-eql@^4.1.3: + version "4.1.4" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7" + integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== dependencies: type-detect "^4.0.0" deep-is@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -define-data-property@^1.0.1, define-data-property@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" - integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== +define-data-property@^1.0.1, define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== dependencies: - get-intrinsic "^1.2.1" + es-define-property "^1.0.0" + es-errors "^1.3.0" gopd "^1.0.1" - has-property-descriptors "^1.0.0" - -define-properties@^1.1.2, define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" @@ -1176,14 +1025,19 @@ define-properties@^1.2.0, define-properties@^1.2.1: delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== deprecation@^2.0.0, deprecation@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== -diff@4.0.2, diff@^4.0.1: +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== @@ -1214,11 +1068,6 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -1229,131 +1078,87 @@ emoji-regex@^9.2.2: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== -encoding@^0.1.13: - version "0.1.13" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - -env-paths@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" - integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== - -err-code@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" - integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== - -es-abstract@^1.17.0-next.1, es-abstract@^1.17.4, es-abstract@^1.17.5: - version "1.17.7" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c" - integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.18.0-next.0: - version "1.18.0-next.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68" - integrity sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-negative-zero "^2.0.0" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.22.1: - version "1.22.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.3.tgz#48e79f5573198de6dee3589195727f4f74bc4f32" - integrity sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA== - dependencies: - array-buffer-byte-length "^1.0.0" - arraybuffer.prototype.slice "^1.0.2" - available-typed-arrays "^1.0.5" - call-bind "^1.0.5" - es-set-tostringtag "^2.0.1" +es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2: + version "1.23.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" + integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + data-view-buffer "^1.0.1" + data-view-byte-length "^1.0.1" + data-view-byte-offset "^1.0.0" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.0.3" es-to-primitive "^1.2.1" function.prototype.name "^1.1.6" - get-intrinsic "^1.2.2" - get-symbol-description "^1.0.0" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" globalthis "^1.0.3" gopd "^1.0.1" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" has-symbols "^1.0.3" - hasown "^2.0.0" - internal-slot "^1.0.5" - is-array-buffer "^3.0.2" + hasown "^2.0.2" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" is-callable "^1.2.7" - is-negative-zero "^2.0.2" + is-data-view "^1.0.1" + is-negative-zero "^2.0.3" is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" + is-shared-array-buffer "^1.0.3" is-string "^1.0.7" - is-typed-array "^1.1.12" + is-typed-array "^1.1.13" is-weakref "^1.0.2" object-inspect "^1.13.1" object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.5.1" - safe-array-concat "^1.0.1" - safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.8" - string.prototype.trimend "^1.0.7" - string.prototype.trimstart "^1.0.7" - typed-array-buffer "^1.0.0" - typed-array-byte-length "^1.0.0" - typed-array-byte-offset "^1.0.0" - typed-array-length "^1.0.4" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.2" + safe-array-concat "^1.1.2" + safe-regex-test "^1.0.3" + string.prototype.trim "^1.2.9" + string.prototype.trimend "^1.0.8" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.2" + typed-array-length "^1.0.6" unbox-primitive "^1.0.2" - which-typed-array "^1.1.13" + which-typed-array "^1.1.15" -es-array-method-boxes-properly@^1.0.0: +es-define-property@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" - integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" -es-get-iterator@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8" - integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ== +es-errors@^1.2.1, es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== dependencies: - es-abstract "^1.17.4" - has-symbols "^1.0.1" - is-arguments "^1.0.4" - is-map "^2.0.1" - is-set "^2.0.1" - is-string "^1.0.5" - isarray "^2.0.5" + es-errors "^1.3.0" -es-set-tostringtag@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz#11f7cc9f63376930a5f20be4915834f4bc74f9c9" - integrity sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q== +es-set-tostringtag@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== dependencies: - get-intrinsic "^1.2.2" - has-tostringtag "^1.0.0" - hasown "^2.0.0" + get-intrinsic "^1.2.4" + has-tostringtag "^1.0.2" + hasown "^2.0.1" -es-shim-unscopables@^1.0.0: +es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== @@ -1370,9 +1175,9 @@ es-to-primitive@^1.2.1: is-symbol "^1.0.2" escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: version "4.0.0" @@ -1389,9 +1194,9 @@ eslint-import-resolver-node@^0.3.9: resolve "^1.22.4" eslint-module-utils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" - integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== + version "2.8.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz#52f2404300c3bd33deece9d7372fb337cc1d7c34" + integrity sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q== dependencies: debug "^3.2.7" @@ -1403,7 +1208,7 @@ eslint-plugin-es@^3.0.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-import@^2.29.0: +eslint-plugin-import@^2.29.1: version "2.29.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== @@ -1438,10 +1243,10 @@ eslint-plugin-node@^11.1.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-prettier@^5.0.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.2.tgz#584c94d4bf31329b2d4cbeb10fd600d17d6de742" - integrity sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg== +eslint-plugin-prettier@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz#17cfade9e732cef32b5f5be53bd4e07afd8e67e1" + integrity sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw== dependencies: prettier-linter-helpers "^1.0.0" synckit "^0.8.6" @@ -1471,16 +1276,16 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.55.0: - version "8.56.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.56.0.tgz#4957ce8da409dc0809f99ab07a1b94832ab74b15" - integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ== +eslint@^8.57.0: + version "8.57.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" + integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.56.0" - "@humanwhocodes/config-array" "^0.11.13" + "@eslint/js" "8.57.0" + "@humanwhocodes/config-array" "^0.11.14" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" "@ungap/structured-clone" "^1.2.0" @@ -1524,11 +1329,6 @@ espree@^9.6.0, espree@^9.6.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - esquery@^1.4.2: version "1.5.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" @@ -1544,9 +1344,9 @@ esrecurse@^4.3.0: estraverse "^5.2.0" estraverse@^5.1.0, estraverse@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== esutils@^2.0.2: version "2.0.3" @@ -1568,20 +1368,15 @@ events@^3.0.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -exponential-backoff@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" - integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== fast-glob@^3.2.9: version "3.3.2" @@ -1602,12 +1397,19 @@ fast-json-stable-stringify@^2.0.0: fast-levenshtein@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fast-xml-parser@^4.3.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.4.0.tgz#341cc98de71e9ba9e651a67f41f1752d1441a501" + integrity sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg== + dependencies: + strnum "^1.0.5" fastq@^1.6.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858" - integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g== + version "1.17.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" + integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== dependencies: reusify "^1.0.4" @@ -1618,10 +1420,10 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" @@ -1633,32 +1435,24 @@ find-up@5.0.0, find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== dependencies: - flatted "^3.1.0" + flatted "^3.2.9" + keyv "^4.5.3" rimraf "^3.0.2" -flat@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" - integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== - dependencies: - is-buffer "~2.0.3" +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== -flatted@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" - integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== +flatted@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== for-each@^0.3.3: version "0.3.3" @@ -1668,9 +1462,9 @@ for-each@^0.3.3: is-callable "^1.1.3" foreground-child@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" - integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + version "3.2.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.2.1.tgz#767004ccf3a5b30df39bed90718bab43fe0a59f7" + integrity sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA== dependencies: cross-spawn "^7.0.0" signal-exit "^4.0.1" @@ -1684,43 +1478,15 @@ form-data@^2.5.0: combined-stream "^1.0.6" mime-types "^2.1.12" -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -fs-minipass@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" - integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - dependencies: - minipass "^3.0.0" - -fs-minipass@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-3.0.3.tgz#79a85981c4dc120065e96f62086bf6f9dc26cc54" - integrity sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw== - dependencies: - minipass "^7.0.3" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@~2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +fsevents@~2.3.1: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== function-bind@^1.1.2: version "1.1.2" @@ -1742,44 +1508,37 @@ functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -get-caller-file@^2.0.1, get-caller-file@^2.0.5: +get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" - integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" +get-func-name@^2.0.1, get-func-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== -get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b" - integrity sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA== +get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== dependencies: + es-errors "^1.3.0" function-bind "^1.1.2" has-proto "^1.0.1" has-symbols "^1.0.3" hasown "^2.0.0" -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== +get-symbol-description@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" + call-bind "^1.0.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" -glob-parent@^5.1.2: +glob-parent@^5.1.2, glob-parent@~5.1.0: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -1793,14 +1552,7 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob-parent@~5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" - integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== - dependencies: - is-glob "^4.0.1" - -glob@7.1.6, glob@^7.1.3: +glob@7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -1812,16 +1564,29 @@ glob@7.1.6, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^10.2.2, glob@^10.3.10: - version "10.3.12" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.12.tgz#3a65c363c2e9998d220338e88a5f6ac97302960b" - integrity sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg== +glob@^10.3.7: + version "10.4.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.3.tgz#e0ba2253dd21b3d0acdfb5d507c59a29f513fc7a" + integrity sha512-Q38SGlYRpVtDBPSWEylRyctn7uDeTp4NQERTLiCT1FqA9JXPYWqAVmQU6qh4r/zMM5ehxTcbaO8EjhWnvEhmyg== dependencies: foreground-child "^3.1.0" - jackspeak "^2.3.6" - minimatch "^9.0.1" - minipass "^7.0.4" - path-scurry "^1.10.2" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^1.11.1" + +glob@^7.1.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" globals@^13.19.0: version "13.24.0" @@ -1831,11 +1596,12 @@ globals@^13.19.0: type-fest "^0.20.2" globalthis@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + version "1.0.4" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" + integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== dependencies: - define-properties "^1.1.3" + define-properties "^1.2.1" + gopd "^1.0.1" globby@^11.1.0: version "11.1.0" @@ -1856,11 +1622,6 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.2.6: - version "4.2.9" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" - integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== - graphemer@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" @@ -1871,7 +1632,7 @@ growl@1.10.5: resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== -has-bigints@^1.0.2: +has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== @@ -1881,51 +1642,34 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz#52ba30b6c5ec87fd89fa574bc1c39125c6f65340" - integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg== +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== dependencies: - get-intrinsic "^1.2.2" - -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + es-define-property "^1.0.0" -has-symbols@^1.0.0, has-symbols@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== - -has-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" - integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== +has-proto@^1.0.1, has-proto@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== -has-symbols@^1.0.3: +has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== +has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== dependencies: - function-bind "^1.1.1" + has-symbols "^1.0.3" -hasown@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" - integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== +hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== dependencies: function-bind "^1.1.2" @@ -1934,11 +1678,6 @@ he@1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -http-cache-semantics@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" - integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== - http-proxy-agent@^7.0.0: version "7.0.2" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" @@ -1947,21 +1686,14 @@ http-proxy-agent@^7.0.0: agent-base "^7.1.0" debug "^4.3.4" -https-proxy-agent@^7.0.1: - version "7.0.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" - integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== +https-proxy-agent@^7.0.0: + version "7.0.5" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" + integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== dependencies: agent-base "^7.0.2" debug "4" -iconv-lite@^0.6.2: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - ieee754@1.1.13: version "1.1.13" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" @@ -1972,15 +1704,10 @@ ieee754@^1.1.4: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^5.1.1: - version "5.1.8" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" - integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== - -ignore@^5.2.0, ignore@^5.2.4: - version "5.3.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" - integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== +ignore@^5.1.1, ignore@^5.2.0, ignore@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== import-fresh@^3.2.1: version "3.3.0" @@ -1993,17 +1720,12 @@ import-fresh@^3.2.1: imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" @@ -2013,41 +1735,37 @@ inherits@2, inherits@^2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -internal-slot@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.6.tgz#37e756098c4911c5e912b8edbf71ed3aa116f930" - integrity sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg== +internal-slot@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" + integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== dependencies: - get-intrinsic "^1.2.2" + es-errors "^1.3.0" hasown "^2.0.0" side-channel "^1.0.4" -ip-address@^9.0.5: - version "9.0.5" - resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" - integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== - dependencies: - jsbn "1.1.0" - sprintf-js "^1.1.3" - is-arguments@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" - integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" -is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== +is-array-buffer@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" + integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== dependencies: call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" + get-intrinsic "^1.2.1" is-bigint@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.1.tgz#6923051dfcbc764278540b9ce0e6b3213aa5ebc2" - integrity sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg== + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" is-binary-path@~2.1.0: version "2.1.0" @@ -2057,55 +1775,48 @@ is-binary-path@~2.1.0: binary-extensions "^2.0.0" is-boolean-object@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.0.tgz#e2aaad3a3a8fca34c28f6eee135b156ed2587ff0" - integrity sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA== + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== dependencies: - call-bind "^1.0.0" - -is-buffer@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" - integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== + call-bind "^1.0.2" + has-tostringtag "^1.0.0" -is-callable@^1.1.3, is-callable@^1.2.7: +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-callable@^1.1.4, is-callable@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" - integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== - is-core-module@^2.13.0, is-core-module@^2.13.1: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + version "2.14.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.14.0.tgz#43b8ef9f46a6a08888db67b1ffd4ec9e3dfd59d1" + integrity sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A== dependencies: - hasown "^2.0.0" + hasown "^2.0.2" -is-core-module@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" - integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== +is-data-view@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" + integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== dependencies: - has "^1.0.3" + is-typed-array "^1.1.13" is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== is-fullwidth-code-point@^3.0.0: version "3.0.0" @@ -2119,44 +1830,24 @@ is-generator-function@^1.0.7: dependencies: has-tostringtag "^1.0.0" -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-glob@^4.0.3: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" -is-lambda@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" - integrity sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU= - -is-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1" - integrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw== - -is-negative-zero@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" - integrity sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE= - -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== is-number-object@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" - integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" is-number@^7.0.0: version "7.0.0" @@ -2168,23 +1859,16 @@ is-path-inside@^3.0.3: resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== -is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== is-plain-object@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== -is-regex@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== - dependencies: - has-symbols "^1.0.1" - is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -2193,24 +1877,14 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-set@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43" - integrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA== - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== +is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" + integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== dependencies: - call-bind "^1.0.2" - -is-string@^1.0.4, is-string@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" - integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + call-bind "^1.0.7" -is-string@^1.0.7: +is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== @@ -2218,18 +1892,18 @@ is-string@^1.0.7: has-tostringtag "^1.0.0" is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== dependencies: - has-symbols "^1.0.1" + has-symbols "^1.0.2" -is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.3, is-typed-array@^1.1.9: - version "1.1.12" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" - integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== +is-typed-array@^1.1.13, is-typed-array@^1.1.3: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== dependencies: - which-typed-array "^1.1.11" + which-typed-array "^1.1.14" is-weakref@^1.0.2: version "1.0.2" @@ -2241,7 +1915,7 @@ is-weakref@^1.0.2: isarray@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== isarray@^2.0.5: version "2.0.5" @@ -2251,30 +1925,12 @@ isarray@^2.0.5: isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isexe@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d" - integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ== - -iterate-iterator@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/iterate-iterator/-/iterate-iterator-1.0.1.tgz#1693a768c1ddd79c969051459453f082fe82e9f6" - integrity sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw== - -iterate-value@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/iterate-value/-/iterate-value-1.0.2.tgz#935115bd37d006a52046535ebc8d07e9c9337f57" - integrity sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ== - dependencies: - es-get-iterator "^1.0.2" - iterate-iterator "^1.0.1" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -jackspeak@^2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" - integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== +jackspeak@^3.1.2: + version "3.4.1" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.1.tgz#145422416740568e9fc357bf60c844b3c1585f09" + integrity sha512-U23pQPDnmYybVkYjObcuYMk43VRlMLLqLI+RdZy8s8WV8WsxO9SnqSroKaluuvcNOdCAlauKszDwd+umbot5Mg== dependencies: "@isaacs/cliui" "^8.0.2" optionalDependencies: @@ -2285,13 +1941,12 @@ jmespath@0.16.0: resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.16.0.tgz#b15b0a85dfd4d930d43e69ed605943c802785076" integrity sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw== -js-yaml@3.14.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== +js-yaml@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" + integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== dependencies: - argparse "^1.0.7" - esprima "^4.0.0" + argparse "^2.0.1" js-yaml@^4.1.0: version "4.1.0" @@ -2300,10 +1955,10 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -jsbn@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" - integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== json-schema-traverse@^0.4.1: version "0.4.1" @@ -2318,7 +1973,7 @@ json-schema-traverse@^1.0.0: json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== json5@^1.0.2: version "1.0.2" @@ -2327,6 +1982,13 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -2335,14 +1997,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - locate-path@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" @@ -2362,227 +2016,147 @@ log-symbols@4.0.0: dependencies: chalk "^4.0.0" -lru-cache@^10.0.1, lru-cache@^10.2.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" - integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== +loupe@^2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" + integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== dependencies: - yallist "^4.0.0" + get-func-name "^2.0.1" + +lru-cache@^10.2.0: + version "10.3.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.3.1.tgz#a37050586f84ccfdb570148a253bf1632a29ef44" + integrity sha512-9/8QXrtbGeMB6LxwQd4x1tIMnsmUxMvIH/qWGsccz6bt9Uln3S+sgAaqfQNhbGA8ufzs2fHuP/yqapGgP9Hh2g== make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -make-fetch-happen@^13.0.0: - version "13.0.0" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.0.tgz#705d6f6cbd7faecb8eac2432f551e49475bfedf0" - integrity sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A== - dependencies: - "@npmcli/agent" "^2.0.0" - cacache "^18.0.0" - http-cache-semantics "^4.1.1" - is-lambda "^1.0.1" - minipass "^7.0.2" - minipass-fetch "^3.0.0" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.3" - promise-retry "^2.0.1" - ssri "^10.0.0" - merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + version "4.0.7" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" + integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== dependencies: - braces "^3.0.2" + braces "^3.0.3" picomatch "^2.3.1" -mime-db@1.44.0: - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: - mime-db "1.44.0" + mime-db "1.52.0" -minimatch@3.0.4, minimatch@^3.0.4: +minimatch@3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" -minimatch@9.0.3: - version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^3.0.5, minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimatch@^9.0.1: - version "9.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" - integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== +minimatch@^9.0.4: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== dependencies: brace-expansion "^2.0.1" -minimist@^1.2.0: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -minimist@^1.2.6: +minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -minipass-collect@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-2.0.1.tgz#1621bc77e12258a12c60d34e2276ec5c20680863" - integrity sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw== - dependencies: - minipass "^7.0.3" - -minipass-fetch@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.4.tgz#4d4d9b9f34053af6c6e597a64be8e66e42bf45b7" - integrity sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg== - dependencies: - minipass "^7.0.3" - minipass-sized "^1.0.3" - minizlib "^2.1.2" - optionalDependencies: - encoding "^0.1.13" - -minipass-flush@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" - integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== - dependencies: - minipass "^3.0.0" - -minipass-pipeline@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" - integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== - dependencies: - minipass "^3.0.0" - -minipass-sized@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" - integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== - dependencies: - minipass "^3.0.0" - -minipass@^3.0.0: - version "3.1.3" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" - integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== - dependencies: - yallist "^4.0.0" - minipass@^4.0.0: - version "4.2.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.4.tgz#7d0d97434b6a19f59c5c3221698b48bbf3b2cd06" - integrity sha512-lwycX3cBMTvcejsHITUgYj6Gy6A7Nh4Q6h9NP4sTHY1ccJlC7yKzDmiShEHsJ16Jf1nKGDEaiHxiltsJEvk0nQ== + version "4.2.8" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.8.tgz#f0010f64393ecfc1d1ccb5f582bcaf45f48e1a3a" + integrity sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ== -minipass@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" - integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== - -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3, minipass@^7.0.4: - version "7.0.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" - integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.4, minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -minizlib@^2.1.1, minizlib@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" - integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== +minizlib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-3.0.1.tgz#46d5329d1eb3c83924eff1d3b858ca0a31581012" + integrity sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg== dependencies: - minipass "^3.0.0" - yallist "^4.0.0" + minipass "^7.0.4" + rimraf "^5.0.5" -mkdirp@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +mkdirp@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" + integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== -mocha@^8.1.3: - version "8.1.3" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.1.3.tgz#5e93f873e35dfdd69617ea75f9c68c2ca61c2ac5" - integrity sha512-ZbaYib4hT4PpF4bdSO2DohooKXIn4lDeiYqB+vTmCdr6l2woW0b6H3pf5x4sM5nwQMru9RvjjHYWVGltR50ZBw== +mocha@^8.3.2: + version "8.4.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.4.0.tgz#677be88bf15980a3cae03a73e10a0fc3997f0cff" + integrity sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ== dependencies: + "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" browser-stdout "1.3.1" - chokidar "3.4.2" - debug "4.1.1" - diff "4.0.2" + chokidar "3.5.1" + debug "4.3.1" + diff "5.0.0" escape-string-regexp "4.0.0" find-up "5.0.0" glob "7.1.6" growl "1.10.5" he "1.2.0" - js-yaml "3.14.0" + js-yaml "4.0.0" log-symbols "4.0.0" minimatch "3.0.4" - ms "2.1.2" - object.assign "4.1.0" - promise.allsettled "1.0.2" - serialize-javascript "4.0.0" - strip-json-comments "3.0.1" - supports-color "7.1.0" + ms "2.1.3" + nanoid "3.1.20" + serialize-javascript "5.0.1" + strip-json-comments "3.1.1" + supports-color "8.1.1" which "2.0.2" wide-align "1.1.3" - workerpool "6.0.0" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.1" + workerpool "6.1.0" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" -ms@2.1.2, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@2.1.3, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoid@3.1.20: + version "3.1.20" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" + integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - -negotiator@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -node-addon-api@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-6.1.0.tgz#ac8470034e58e67d0c6f1204a18ae6995d9c0d76" - integrity sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA== + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== node-fetch@^2.6.7: version "2.7.0" @@ -2591,75 +2165,22 @@ node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" -node-gyp@^10.0.1: - version "10.1.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.1.0.tgz#75e6f223f2acb4026866c26a2ead6aab75a8ca7e" - integrity sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA== - dependencies: - env-paths "^2.2.0" - exponential-backoff "^3.1.1" - glob "^10.3.10" - graceful-fs "^4.2.6" - make-fetch-happen "^13.0.0" - nopt "^7.0.0" - proc-log "^3.0.0" - semver "^7.3.5" - tar "^6.1.2" - which "^4.0.0" - -nopt@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.0.tgz#067378c68116f602f552876194fd11f1292503d7" - integrity sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA== - dependencies: - abbrev "^2.0.0" - normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== object-inspect@^1.13.1: - version "1.13.1" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" - integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== - -object-inspect@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== - -object-inspect@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" - integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: +object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - -object.assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.1.tgz#303867a666cdd41936ecdedfb1f8f3e32a478cdd" - integrity sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.18.0-next.0" - has-symbols "^1.0.1" - object-keys "^1.1.1" - -object.assign@^4.1.4: +object.assign@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== @@ -2670,72 +2191,58 @@ object.assign@^4.1.4: object-keys "^1.1.1" object.fromentries@^2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" - integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== + version "2.0.8" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" + integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" object.groupby@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" - integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ== + version "1.0.3" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" + integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - get-intrinsic "^1.2.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" object.values@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" - integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== + version "1.2.0" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" + integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" optionator@^0.9.3: - version "0.9.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" - integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== + version "0.9.4" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== dependencies: - "@aashutoshrathi/word-wrap" "^1.2.3" deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" - -p-limit@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" + word-wrap "^1.2.5" p-limit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.2.tgz#1664e010af3cadc681baafd3e2a437be7b0fb5fe" - integrity sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg== - dependencies: - p-try "^2.0.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: - p-limit "^2.0.0" + yocto-queue "^0.1.0" p-locate@^5.0.0: version "5.0.0" @@ -2744,17 +2251,10 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +package-json-from-dist@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" + integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== parent-module@^1.0.0: version "1.0.1" @@ -2763,11 +2263,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -2776,27 +2271,22 @@ path-exists@^4.0.0: path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.2.tgz#8f6357eb1239d5fa1da8b9f70e9c080675458ba7" - integrity sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA== +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== dependencies: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -2806,21 +2296,21 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathval@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -2833,39 +2323,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" - integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== - -proc-log@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8" - integrity sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A== - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - -promise-retry@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" - integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== - dependencies: - err-code "^2.0.2" - retry "^0.12.0" - -promise.allsettled@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/promise.allsettled/-/promise.allsettled-1.0.2.tgz#d66f78fbb600e83e863d893e98b3d4376a9c47c9" - integrity sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg== - dependencies: - array.prototype.map "^1.0.1" - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" - iterate-value "^1.0.0" +prettier@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" + integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA== punycode@1.3.2: version "1.3.2" @@ -2873,9 +2334,9 @@ punycode@1.3.2: integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw== punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== querystring@0.2.0: version "0.2.0" @@ -2894,56 +2355,44 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -readdirp@~3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" - integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== +readdirp@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" + integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== dependencies: picomatch "^2.2.1" -regexp.prototype.flags@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" - integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== +regexp.prototype.flags@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" + integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - set-function-name "^2.0.0" + call-bind "^1.0.6" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.1" regexpp@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" - integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve@^1.10.1: - version "1.20.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" - integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== - dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" - -resolve@^1.22.4: +resolve@^1.10.1, resolve@^1.22.4: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -2952,11 +2401,6 @@ resolve@^1.22.4: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -2969,6 +2413,20 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" +rimraf@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.8.tgz#9d4d0ef5106817102b14fdbbf01cf29545e99a6c" + integrity sha512-XSh0V2/yNhDEi8HwdIefD8MLgs4LQXPag/nEJWs3YUc3Upn+UHa1GyIkEg9xSSNt7HnkO5FjTvmcRzgf+8UZuw== + dependencies: + glob "^10.3.7" + +rimraf@^5.0.8: + version "5.0.9" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.9.tgz#c3baa1b886eadc2ec7981a06a593c3d01134ffe9" + integrity sha512-3i7b8OcswU6CpU8Ej89quJD4O98id7TtVM5U4Mybh84zQXdrFmDLouWBEEaD/QfO3gDDfH+AGFCGsR7kngzQnA== + dependencies: + glob "^10.3.7" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -2976,13 +2434,13 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-array-concat@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" - integrity sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q== +safe-array-concat@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.1" + call-bind "^1.0.7" + get-intrinsic "^1.2.4" has-symbols "^1.0.3" isarray "^2.0.5" @@ -2991,84 +2449,63 @@ safe-buffer@^5.1.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== +safe-regex-test@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" + integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" + call-bind "^1.0.6" + es-errors "^1.3.0" is-regex "^1.1.4" -"safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - sax@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" integrity sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA== sax@>=0.6.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.3.0.tgz#a5dbe77db3be05c9d1ee7785dbd3ea9de51593d0" - integrity sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA== - -semver@^6.1.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + version "1.4.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.4.1.tgz#44cc8988377f126304d3b3fc1010c733b929ef0f" + integrity sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg== -semver@^6.3.1: +semver@^6.1.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== - dependencies: - lru-cache "^6.0.0" - -semver@^7.5.4: - version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" +semver@^7.6.0: + version "7.6.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== -serialize-javascript@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" - integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== +serialize-javascript@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== dependencies: randombytes "^2.1.0" -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -set-function-length@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.1.1.tgz#4bc39fafb0307224a33e106a7d35ca1218d659ed" - integrity sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ== +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== dependencies: - define-data-property "^1.1.1" - get-intrinsic "^1.2.1" + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" gopd "^1.0.1" - has-property-descriptors "^1.0.0" + has-property-descriptors "^1.0.2" -set-function-name@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" - integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== +set-function-name@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== dependencies: - define-data-property "^1.0.1" + define-data-property "^1.1.4" + es-errors "^1.3.0" functions-have-names "^1.2.3" - has-property-descriptors "^1.0.0" + has-property-descriptors "^1.0.2" shebang-command@^2.0.0: version "2.0.0" @@ -3083,13 +2520,14 @@ shebang-regex@^3.0.0: integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" signal-exit@^4.0.1: version "4.1.0" @@ -3101,47 +2539,20 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -smart-buffer@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" - integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== - -socks-proxy-agent@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz#6b2da3d77364fde6292e810b496cb70440b9b89d" - integrity sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A== +source-map-support@^0.5.17: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: - agent-base "^7.1.1" - debug "^4.3.4" - socks "^2.7.1" - -socks@^2.7.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.1.tgz#22c7d9dd7882649043cba0eafb49ae144e3457af" - integrity sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ== - dependencies: - ip-address "^9.0.5" - smart-buffer "^4.2.0" - -sprintf-js@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" - integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + buffer-from "^1.0.0" + source-map "^0.6.0" -ssri@^10.0.0: - version "10.0.5" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.5.tgz#e49efcd6e36385196cb515d3a2ad6c3f0265ef8c" - integrity sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A== - dependencies: - minipass "^7.0.3" +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.3: - name string-width-cjs +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -3158,23 +2569,14 @@ ssri@^10.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - -string-width@^4.2.0: - version "4.2.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" - integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" + strip-ansi "^6.0.1" string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" @@ -3185,51 +2587,35 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string.prototype.trim@^1.2.8: - version "1.2.8" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" - integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - -string.prototype.trimend@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" - integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -string.prototype.trimend@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" - integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== +string.prototype.trim@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" + integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-object-atoms "^1.0.0" -string.prototype.trimstart@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" - integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== +string.prototype.trimend@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" + integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" -string.prototype.trimstart@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" - integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.1: - name strip-ansi-cjs +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -3239,23 +2625,16 @@ string.prototype.trimstart@^1.0.7: strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: - ansi-regex "^5.0.0" + ansi-regex "^5.0.1" strip-ansi@^7.0.1: version "7.1.0" @@ -3267,22 +2646,22 @@ strip-ansi@^7.0.1: strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -strip-json-comments@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" - integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== -strip-json-comments@^3.1.1: +strip-json-comments@3.1.1, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" - integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== +strnum@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" + integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" @@ -3306,34 +2685,22 @@ synckit@^0.8.6: "@pkgr/core" "^0.1.0" tslib "^2.6.2" -tar@^6.1.11, tar@^6.1.14: - version "6.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" - integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^5.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" - -tar@^6.1.2: - version "6.1.11" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" - integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^3.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" +tar@^7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/tar/-/tar-7.4.0.tgz#e513afef5ba20ce250fd99397b4599db07d06443" + integrity sha512-XQs0S8fuAkQWuqhDeCdMlJXDX80D7EOVLDPVFkna9yQfzS+PHKgfxcei0jf6/+QAWcjqrnC8uM3fSAnrQl+XYg== + dependencies: + "@isaacs/fs-minipass" "^4.0.0" + chownr "^3.0.0" + minipass "^7.1.2" + minizlib "^3.0.1" + mkdirp "^3.0.1" + yallist "^5.0.0" text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== to-regex-range@^5.0.1: version "5.0.1" @@ -3347,28 +2714,21 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -ts-api-utils@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" - integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== - -ts-node@^10.9.2: - version "10.9.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" - integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" +ts-api-utils@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" + integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== + +ts-node@^9.1.1: + version "9.1.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" + integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== + dependencies: arg "^4.1.0" create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" + source-map-support "^0.5.17" yn "3.1.1" tsconfig-paths@^3.15.0: @@ -3387,9 +2747,9 @@ tslib@^1.10.0: integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.2.0, tslib@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== tunnel@0.0.6, tunnel@^0.0.6: version "0.0.6" @@ -3403,7 +2763,7 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-detect@^4.0.0, type-detect@^4.0.5: +type-detect@^4.0.0, type-detect@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== @@ -3413,49 +2773,54 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -typed-array-buffer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" - integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== +typed-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" + integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.1" - is-typed-array "^1.1.10" + call-bind "^1.0.7" + es-errors "^1.3.0" + is-typed-array "^1.1.13" -typed-array-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" - integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== +typed-array-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" + integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== dependencies: - call-bind "^1.0.2" + call-bind "^1.0.7" for-each "^0.3.3" - has-proto "^1.0.1" - is-typed-array "^1.1.10" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" -typed-array-byte-offset@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" - integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== +typed-array-byte-offset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" + integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" for-each "^0.3.3" - has-proto "^1.0.1" - is-typed-array "^1.1.10" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== +typed-array-length@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" + integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== dependencies: - call-bind "^1.0.2" + call-bind "^1.0.7" for-each "^0.3.3" - is-typed-array "^1.1.9" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" -typescript@^5.2.2: - version "5.3.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" - integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== +typescript@^5.5.3: + version "5.5.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.3.tgz#e1b0a3c394190838a0b168e771b0ad56a0af0faa" + integrity sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ== unbox-primitive@^1.0.2: version "1.0.2" @@ -3473,35 +2838,21 @@ undici-types@~5.26.4: integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== undici@^5.25.4: - version "5.28.2" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.2.tgz#fea200eac65fc7ecaff80a023d1a0543423b4c91" - integrity sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w== + version "5.28.4" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.4.tgz#6b280408edb6a1a604a9b20340f45b422e373068" + integrity sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g== dependencies: "@fastify/busboy" "^2.0.0" -unique-filename@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" - integrity sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g== - dependencies: - unique-slug "^4.0.0" - -unique-slug@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3" - integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== - dependencies: - imurmurhash "^0.1.4" - universal-user-agent@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.1.tgz#15f20f55da3c930c57bddbf1734c6654d5fd35aa" integrity sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ== -uri-js@^4.2.2: - version "4.4.0" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602" - integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g== +uri-js@^4.2.2, uri-js@^4.4.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" @@ -3534,16 +2885,11 @@ uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.3.0, uuid@^8.3.2: +uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -3568,21 +2914,16 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which-typed-array@^1.1.11, which-typed-array@^1.1.13, which-typed-array@^1.1.2: - version "1.1.13" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.13.tgz#870cd5be06ddb616f504e7b039c4c24898184d36" - integrity sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow== +which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.2: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.4" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" for-each "^0.3.3" gopd "^1.0.1" - has-tostringtag "^1.0.0" + has-tostringtag "^1.0.2" which@2.0.2, which@^2.0.1: version "2.0.2" @@ -3591,13 +2932,6 @@ which@2.0.2, which@^2.0.1: dependencies: isexe "^2.0.0" -which@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a" - integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg== - dependencies: - isexe "^3.1.1" - wide-align@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" @@ -3605,13 +2939,17 @@ wide-align@1.1.3: dependencies: string-width "^1.0.2 || 2" -workerpool@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.0.tgz#85aad67fa1a2c8ef9386a1b43539900f61d03d58" - integrity sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA== +word-wrap@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== + +workerpool@6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" + integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: - name wrap-ansi-cjs +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -3620,14 +2958,14 @@ workerpool@6.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" wrap-ansi@^8.1.0: version "8.1.0" @@ -3641,9 +2979,17 @@ wrap-ansi@^8.1.0: wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +xml2js@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.6.2.tgz#dd0b630083aa09c161e25a4d0901e2b2a929b499" + integrity sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA== + dependencies: + sax ">=0.6.0" + xmlbuilder "~11.0.0" -xml2js@0.5.0, xml2js@^0.5.0: +xml2js@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.5.0.tgz#d9440631fbb2ed800203fad106f2724f62c493b7" integrity sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA== @@ -3656,85 +3002,53 @@ xmlbuilder@~11.0.0: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== -y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== - y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yallist@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-5.0.0.tgz#00e2de443639ed0d78fd87de0d27469fbcffb533" + integrity sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw== -yargs-parser@13.1.2, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== -yargs-parser@^15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3" - integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs-unparser@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.1.tgz#bd4b0ee05b4c94d058929c32cb09e3fce71d3c5f" - integrity sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA== - dependencies: - camelcase "^5.3.1" - decamelize "^1.2.0" - flat "^4.1.0" - is-plain-obj "^1.1.0" - yargs "^14.2.3" - -yargs@13.3.2: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yargs@^14.2.3: - version "14.2.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" - integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== - dependencies: - cliui "^5.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^15.0.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" yargs@^17.1.1: version "17.7.2" @@ -3753,3 +3067,8 @@ yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==