diff --git a/.eslintrc.js b/.eslintrc.js index f46a64bcbf2acd..8b462e0777c5d4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -361,5 +361,6 @@ module.exports = { WritableStream: 'readable', WritableStreamDefaultWriter: 'readable', WritableStreamDefaultController: 'readable', + WebSocket: 'readable', }, }; diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1a62e3560a23ef..3e7c3f62aa752f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -20,10 +20,10 @@ /LICENSE @nodejs/tsc /onboarding.md @nodejs/tsc -# website -/doc/api_assets @nodejs/website -/doc/template.html @nodejs/website -/tools/doc @nodejs/website +# nodejs.org website +/doc/api_assets @nodejs/nodejs-website +/doc/template.html @nodejs/nodejs-website +/tools/doc @nodejs/web-infra # streams diff --git a/.github/label-pr-config.yml b/.github/label-pr-config.yml index 622d3332899213..3961cda0e38724 100644 --- a/.github/label-pr-config.yml +++ b/.github/label-pr-config.yml @@ -47,7 +47,7 @@ subSystemLabels: /^\w+\.md$/: doc # Different variants of Makefile and build files /^(?:tools\/)?(?:Makefile|BSDmakefile|create_android_makefiles)$/: build, needs-ci - /^tools\/(?:install\.py|genv8constants\.py|getnodeversion\.py|js2c\.py|utils\.py|configure\.d\/.*)$/: build, python, needs-ci + /^tools\/(?:install\.py|getnodeversion\.py|js2c\.py|utils\.py|configure\.d\/.*)$/: build, python, needs-ci /^vcbuild\.bat$/: build, windows, needs-ci /^(?:android-)?configure|node\.gyp|common\.gypi$/: build, needs-ci # More specific tools diff --git a/.github/workflows/auto-start-ci.yml b/.github/workflows/auto-start-ci.yml index ecc7f6d2e7dbe3..262c39dc4d3525 100644 --- a/.github/workflows/auto-start-ci.yml +++ b/.github/workflows/auto-start-ci.yml @@ -46,7 +46,7 @@ jobs: if: needs.get-prs-for-ci.outputs.numbers != '' runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index 7a1789a2f5fa20..56236ced367c19 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -39,7 +39,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} @@ -57,7 +57,7 @@ jobs: mkdir tarballs mv *.tar.gz tarballs - name: Upload tarball artifact - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: tarballs path: tarballs @@ -65,7 +65,7 @@ jobs: needs: build-tarball runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 36205e56752d0f..3c7012017df7d9 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -34,11 +34,11 @@ jobs: if: github.event.pull_request.draft == false strategy: matrix: - windows: [windows-2019, windows-2022] + windows: [windows-2022] fail-fast: false runs-on: ${{ matrix.windows }} steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml index c4836d505804a6..444725e9fe3d53 100644 --- a/.github/workflows/commit-lint.yml +++ b/.github/workflows/commit-lint.yml @@ -17,7 +17,7 @@ jobs: run: | echo "plusOne=$((${{ github.event.pull_request.commits }} + 1))" >> $GITHUB_OUTPUT echo "minusOne=$((${{ github.event.pull_request.commits }} - 1))" >> $GITHUB_OUTPUT - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: fetch-depth: ${{ steps.nb-of-commits.outputs.plusOne }} persist-credentials: false diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml index 322d483d6fff7a..e5f73519f16a99 100644 --- a/.github/workflows/commit-queue.yml +++ b/.github/workflows/commit-queue.yml @@ -58,7 +58,7 @@ jobs: if: needs.get_mergeable_prs.outputs.numbers != '' runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: # Needs the whole git history for ncu to work # See https://github.com/nodejs/node-core-utils/pull/486 diff --git a/.github/workflows/coverage-linux-without-intl.yml b/.github/workflows/coverage-linux-without-intl.yml index a11350f2377d93..7cb41bbb3f6fbe 100644 --- a/.github/workflows/coverage-linux-without-intl.yml +++ b/.github/workflows/coverage-linux-without-intl.yml @@ -37,7 +37,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml index 03300a334eb05f..12ce0ccc262ade 100644 --- a/.github/workflows/coverage-linux.yml +++ b/.github/workflows/coverage-linux.yml @@ -37,7 +37,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/coverage-windows.yml b/.github/workflows/coverage-windows.yml index 0045010df812d5..164e30ab035d7a 100644 --- a/.github/workflows/coverage-windows.yml +++ b/.github/workflows/coverage-windows.yml @@ -39,7 +39,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: windows-2022 steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/daily-wpt-fyi.yml b/.github/workflows/daily-wpt-fyi.yml index 37a67296964b46..0fa94da4b015fb 100644 --- a/.github/workflows/daily-wpt-fyi.yml +++ b/.github/workflows/daily-wpt-fyi.yml @@ -57,7 +57,7 @@ jobs: SHORT_SHA=$(node -p 'process.version.split(/-nightly\d{8}/)[1]') echo "NIGHTLY_REF=$(gh api /repos/nodejs/node/commits/$SHORT_SHA --jq '.sha')" >> $GITHUB_ENV - name: Checkout ${{ steps.setup-node.outputs.node-version }} - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false ref: ${{ env.NIGHTLY_REF || steps.setup-node.outputs.node-version }} @@ -73,7 +73,7 @@ jobs: run: rm -rf wpt working-directory: test/fixtures - name: Checkout epochs/daily WPT - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: repository: web-platform-tests/wpt persist-credentials: false @@ -98,7 +98,7 @@ jobs: run: rm -rf deps/undici - name: Checkout undici if: ${{ env.WPT_REPORT != '' }} - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: repository: nodejs/undici persist-credentials: false @@ -121,7 +121,7 @@ jobs: run: cp wptreport.json wptreport-${{ steps.setup-node.outputs.node-version }}.json - name: Upload GitHub Actions artifact if: ${{ env.WPT_REPORT != '' }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: path: out/wpt/wptreport-*.json name: WPT Reports diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index d7c688db158a08..df11560e737837 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -17,7 +17,7 @@ jobs: # not working on gcc-8 and gcc-9 see https://github.com/nodejs/node/issues/38570 container: gcc:11 steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 0efc8cda7ce386..36715798829efb 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -24,7 +24,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} @@ -35,7 +35,7 @@ jobs: run: npx envinfo - name: Build run: NODE=$(command -v node) make doc-only - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: docs path: out/doc diff --git a/.github/workflows/find-inactive-collaborators.yml b/.github/workflows/find-inactive-collaborators.yml index e5b6f2d5d2ffde..3b11b3347aabcd 100644 --- a/.github/workflows/find-inactive-collaborators.yml +++ b/.github/workflows/find-inactive-collaborators.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: fetch-depth: 0 persist-credentials: false diff --git a/.github/workflows/find-inactive-tsc.yml b/.github/workflows/find-inactive-tsc.yml index b6c1b990041de8..0a14599e776d56 100644 --- a/.github/workflows/find-inactive-tsc.yml +++ b/.github/workflows/find-inactive-tsc.yml @@ -20,13 +20,13 @@ jobs: steps: - name: Checkout the repo - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: fetch-depth: 0 persist-credentials: false - name: Clone nodejs/TSC repository - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: fetch-depth: 0 path: .tmp diff --git a/.github/workflows/license-builder.yml b/.github/workflows/license-builder.yml index 28429d3fcff96e..724572c044d0c1 100644 --- a/.github/workflows/license-builder.yml +++ b/.github/workflows/license-builder.yml @@ -17,7 +17,7 @@ jobs: if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - run: ./tools/license-builder.sh # Run the license builder tool diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 4770dca2f2834b..ff01e442990582 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -25,7 +25,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} @@ -40,7 +40,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} @@ -55,7 +55,7 @@ jobs: if: ${{ github.event.pull_request && github.event.pull_request.draft == false && github.base_ref == github.event.repository.default_branch }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: fetch-depth: 0 persist-credentials: false @@ -93,7 +93,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} @@ -118,7 +118,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} @@ -135,7 +135,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Use Python ${{ env.PYTHON_VERSION }} @@ -153,7 +153,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - run: shellcheck -V @@ -163,7 +163,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - uses: mszostok/codeowners-validator@7f3f5e28c6d7b8dfae5731e54ce2272ca384592f @@ -173,7 +173,7 @@ jobs: if: ${{ github.event.pull_request }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: fetch-depth: 2 persist-credentials: false diff --git a/.github/workflows/notify-on-push.yml b/.github/workflows/notify-on-push.yml index 99b0d4938f32cd..45ed957c0acefa 100644 --- a/.github/workflows/notify-on-push.yml +++ b/.github/workflows/notify-on-push.yml @@ -34,7 +34,7 @@ jobs: permissions: pull-requests: write steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Check commit message diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 64da158ac15173..804b95cb64683c 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -38,7 +38,7 @@ jobs: egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs - name: Checkout code - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false @@ -65,7 +65,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: Upload artifact - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: SARIF file path: results.sarif @@ -73,6 +73,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5 + uses: github/codeql-action/upload-sarif@ddccb873888234080b77e9bc2d4764d5ccaaccf9 # v2.21.9 with: sarif_file: results.sarif diff --git a/.github/workflows/test-asan.yml b/.github/workflows/test-asan.yml index 1336abbbdca070..3b869140e39317 100644 --- a/.github/workflows/test-asan.yml +++ b/.github/workflows/test-asan.yml @@ -47,7 +47,7 @@ jobs: CONFIG_FLAGS: --enable-asan ASAN: true steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/test-internet.yml b/.github/workflows/test-internet.yml index 7f10457e3ad5f6..20a3beb5367e7e 100644 --- a/.github/workflows/test-internet.yml +++ b/.github/workflows/test-internet.yml @@ -40,7 +40,7 @@ jobs: if: github.repository == 'nodejs/node' || github.event_name != 'schedule' runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 76330f37d05ad7..c5838f316c9662 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -34,7 +34,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index c74d3d193bfe4d..d0d9d846156dee 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -40,7 +40,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: macos-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/timezone-update.yml b/.github/workflows/timezone-update.yml index f48dd8ad0eb3ed..0b1eecde618c7e 100644 --- a/.github/workflows/timezone-update.yml +++ b/.github/workflows/timezone-update.yml @@ -20,12 +20,12 @@ jobs: steps: - name: Checkout nodejs/node - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Checkout unicode-org/icu-data - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: path: icu-data persist-credentials: false diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 880586e2879cbe..852097fa5626cf 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -23,6 +23,7 @@ on: - corepack - doc - eslint + - github_reporter - googletest - histogram - icu @@ -284,7 +285,7 @@ jobs: tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true rm temp-output steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 if: github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id with: persist-credentials: false diff --git a/.github/workflows/update-openssl.yml b/.github/workflows/update-openssl.yml index 0586e0b7d5595d..5fdc7ac22a8778 100644 --- a/.github/workflows/update-openssl.yml +++ b/.github/workflows/update-openssl.yml @@ -14,7 +14,7 @@ jobs: if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Check and download new OpenSSL version @@ -62,7 +62,7 @@ jobs: if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false ref: v16.x-staging diff --git a/.github/workflows/update-v8.yml b/.github/workflows/update-v8.yml index 1a6c87aa528d33..8fe51b944da264 100644 --- a/.github/workflows/update-v8.yml +++ b/.github/workflows/update-v8.yml @@ -16,11 +16,11 @@ jobs: if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: persist-credentials: false - name: Cache node modules and update-v8 - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 id: cache-v8-npm env: cache-name: cache-v8-npm diff --git a/BUILDING.md b/BUILDING.md index f95c7637673dc1..d5d26733c6db37 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -153,7 +153,7 @@ Depending on the host platform, the selection of toolchains may vary. | Operating System | Compiler Versions | | ---------------- | -------------------------------------------------------------- | | Linux | GCC >= 10.1 | -| Windows | Visual Studio >= 2019 with the Windows 10 SDK on a 64-bit host | +| Windows | Visual Studio >= 2022 with the Windows 10 SDK on a 64-bit host | | macOS | Xcode >= 13 (Apple LLVM >= 12) | ### Official binary platforms and toolchains @@ -170,7 +170,7 @@ Binaries at are produced on: | linux-ppc64le | RHEL 8 with gcc-toolset-10[^6] | | linux-s390x | RHEL 8 with gcc-toolset-10[^6] | | linux-x64 | RHEL 8 with gcc-toolset-10[^6] | -| win-x64 and win-x86 | Windows 2012 R2 (x64) with Visual Studio 2019 | +| win-x64 and win-x86 | Windows Server 2022 (x64) with Visual Studio 2022 | [^6]: Binaries produced on these systems are compatible with glibc >= 2.28 and libstdc++ >= 6.0.25 (`GLIBCXX_3.4.25`). These are available on @@ -576,9 +576,9 @@ to run it again before invoking `make -j4`. * [Python 3.11](https://apps.microsoft.com/store/detail/python-311/9NRWMJP3717K) * The "Desktop development with C++" workload from - [Visual Studio 2019](https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2019-and-other-products) or + [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) or the "C++ build tools" workload from the - [Build Tools](https://aka.ms/vs/16/release/vs_buildtools.exe), + [Build Tools](https://aka.ms/vs/17/release/vs_buildtools.exe), with the default optional components * Basic Unix tools required for some tests, [Git for Windows](https://git-scm.com/download/win) includes Git Bash @@ -590,11 +590,12 @@ to run it again before invoking `make -j4`. Optional requirements to build the MSI installer package: -* The .NET SDK component from [Visual Studio 2019](https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2019-and-other-products) +* The .NET SDK component from [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) + * This component can be installed via the Visual Studio Installer Application Optional requirements for compiling for Windows 10 on ARM (ARM64): -* Visual Studio 15.9.0 or newer +* Visual Studio 17.6.0 or newer * Visual Studio optional components * Visual C++ compilers and libraries for ARM64 * Visual C++ ATL for ARM64 @@ -610,8 +611,8 @@ packages: * [Git for Windows](https://chocolatey.org/packages/git) with the `git` and Unix tools added to the `PATH` * [Python 3.x](https://chocolatey.org/packages/python) -* [Visual Studio 2019 Build Tools](https://chocolatey.org/packages/visualstudio2019buildtools) - with [Visual C++ workload](https://chocolatey.org/packages/visualstudio2019-workload-vctools) +* [Visual Studio 2022 Build Tools](https://chocolatey.org/packages/visualstudio2022buildtools) + with [Visual C++ workload](https://chocolatey.org/packages/visualstudio2022-workload-vctools) * [NetWide Assembler](https://chocolatey.org/packages/nasm) To install Node.js prerequisites using @@ -619,8 +620,8 @@ To install Node.js prerequisites using with Internet Explorer or Edge browser on the target machine. -Alternatively, you can use PowerShell. Run those commands from an elevated -PowerShell terminal: +Alternatively, you can use PowerShell. Run those commands from +an elevated (Administrator) PowerShell terminal: ```powershell Set-ExecutionPolicy Unrestricted -Force @@ -635,8 +636,16 @@ disk space. #### Building Node.js -If the path to your build directory contains a space or a non-ASCII character, -the build will likely fail. +* Remember to first clone the Node.js repository with the Git command + and head to the directory that Git created; If you haven't already + ```powershell + git clone https://github.com/nodejs/node.git + cd node + ``` +* If the path to your build directory contains a space or a non-ASCII character, + the build will likely fail + +To start the build process: ```powershell .\vcbuild @@ -697,7 +706,7 @@ This is the default option. ### Trimmed: `small-icu` (English only) support In this configuration, only English data is included, but -the full `Intl` (ECMA-402) APIs. It does not need to download +the full `Intl` (ECMA-402) APIs. It does not need to download any dependencies to function. You can add full data at runtime. #### Unix/macOS diff --git a/CHANGELOG.md b/CHANGELOG.md index d730e6feeff82e..bfc496f8038e5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,8 @@ release. -20.7.0
+20.8.0
+20.7.0
20.6.1
20.6.0
20.5.1
@@ -47,7 +48,8 @@ release. 20.0.0
-18.18.0
+18.18.1
+18.18.0
18.17.1
18.17.0
18.16.1
diff --git a/README.md b/README.md index a9eafa7595ef93..46f118d31c4cfa 100644 --- a/README.md +++ b/README.md @@ -174,8 +174,6 @@ For information about the governance of the Node.js project, see **Ruben Bridgewater** <> (he/him) * [cjihrig](https://github.com/cjihrig) - **Colin Ihrig** <> (he/him) -* [danielleadams](https://github.com/danielleadams) - - **Danielle Adams** <> (she/her) * [GeoffreyBooth](https://github.com/geoffreybooth) - **Geoffrey Booth** <> (he/him) * [gireeshpunathil](https://github.com/gireeshpunathil) - @@ -221,6 +219,8 @@ For information about the governance of the Node.js project, see **Shelley Vohr** <> (she/her) * [danbev](https://github.com/danbev) - **Daniel Bevenius** <> (he/him) +* [danielleadams](https://github.com/danielleadams) - + **Danielle Adams** <> (she/her) * [fhinkel](https://github.com/fhinkel) - **Franziska Hinkelmann** <> (she/her) * [gabrielschulhof](https://github.com/gabrielschulhof) - @@ -308,7 +308,7 @@ For information about the governance of the Node.js project, see * [bmeck](https://github.com/bmeck) - **Bradley Farias** <> * [bnb](https://github.com/bnb) - - **Tierney Cyren** <> (they/he) + **Tierney Cyren** <> (they/them) * [bnoordhuis](https://github.com/bnoordhuis) - **Ben Noordhuis** <> * [BridgeAR](https://github.com/BridgeAR) - diff --git a/android_configure.py b/android_configure.py index 57d940239150df..a82bb56bc5f5b6 100644 --- a/android_configure.py +++ b/android_configure.py @@ -70,6 +70,7 @@ def patch_android(): GYP_DEFINES += " v8_target_arch=" + arch GYP_DEFINES += " android_target_arch=" + arch GYP_DEFINES += " host_os=" + host_os + " OS=android" +GYP_DEFINES += " android_ndk_path=" + android_ndk_path os.environ['GYP_DEFINES'] = GYP_DEFINES if os.path.exists("./configure"): diff --git a/benchmark/blob/blob.js b/benchmark/blob/blob.js index 7e5ea5d7cc2fae..4a79a87d27deba 100644 --- a/benchmark/blob/blob.js +++ b/benchmark/blob/blob.js @@ -4,7 +4,7 @@ const { Blob } = require('buffer'); const bench = common.createBenchmark(main, { bytes: [128, 1024, 1024 ** 2], - n: [1e6], + n: [1e3], operation: ['text', 'arrayBuffer'], }); diff --git a/benchmark/blob/clone.js b/benchmark/blob/clone.js new file mode 100644 index 00000000000000..7f66255ad9da0c --- /dev/null +++ b/benchmark/blob/clone.js @@ -0,0 +1,22 @@ +'use strict'; +const common = require('../common.js'); +const { + Blob, +} = require('node:buffer'); +const assert = require('assert'); + +const bench = common.createBenchmark(main, { + n: [50e3], +}); + +let _cloneResult; + +function main({ n }) { + bench.start(); + for (let i = 0; i < n; ++i) + _cloneResult = structuredClone(new Blob(['hello'])); + bench.end(n); + + // Avoid V8 deadcode (elimination) + assert.ok(_cloneResult); +} diff --git a/benchmark/blob/creation.js b/benchmark/blob/creation.js new file mode 100644 index 00000000000000..906d301bca850a --- /dev/null +++ b/benchmark/blob/creation.js @@ -0,0 +1,48 @@ +'use strict'; +const common = require('../common.js'); +const { + Blob, +} = require('node:buffer'); +const assert = require('assert'); + +const options = { + flags: ['--expose-internals'], +}; + +const bench = common.createBenchmark(main, { + n: [50e3], + kind: [ + 'Blob', + 'createBlob', + ], +}, options); + +let _blob; +let _createBlob; + +function main({ n, kind }) { + switch (kind) { + case 'Blob': { + bench.start(); + for (let i = 0; i < n; ++i) + _blob = new Blob(['hello']); + bench.end(n); + + // Avoid V8 deadcode (elimination) + assert.ok(_blob); + break; + } case 'createBlob': { + const { createBlob } = require('internal/blob'); + const reusableBlob = new Blob(['hello']); + bench.start(); + for (let i = 0; i < n; ++i) + _createBlob = createBlob(reusableBlob, reusableBlob.size); + bench.end(n); + + // Avoid V8 deadcode (elimination) + assert.ok(_createBlob); + break; + } default: + throw new Error('Invalid kind'); + } +} diff --git a/benchmark/blob/file.js b/benchmark/blob/file.js index 001de1be1157f9..39596f91e397e8 100644 --- a/benchmark/blob/file.js +++ b/benchmark/blob/file.js @@ -3,8 +3,8 @@ const common = require('../common.js'); const { File } = require('buffer'); const bench = common.createBenchmark(main, { - bytes: [128, 1024, 1024 ** 2], - n: [1e6], + bytes: [128, 1024], + n: [1e3], operation: ['text', 'arrayBuffer'], }); diff --git a/benchmark/blob/resolveObjectURL.js b/benchmark/blob/resolveObjectURL.js new file mode 100644 index 00000000000000..3b70c69f66dea6 --- /dev/null +++ b/benchmark/blob/resolveObjectURL.js @@ -0,0 +1,22 @@ +'use strict'; +const common = require('../common.js'); +const { Blob, resolveObjectURL } = require('node:buffer'); +const assert = require('assert'); + +const bench = common.createBenchmark(main, { + n: [50e3], +}); + +let _resolveObjectURL; + +function main({ n }) { + const blob = new Blob(['hello']); + const id = URL.createObjectURL(blob); + bench.start(); + for (let i = 0; i < n; ++i) + _resolveObjectURL = resolveObjectURL(id); + bench.end(n); + + // Avoid V8 deadcode (elimination) + assert.ok(_resolveObjectURL); +} diff --git a/benchmark/blob/slice.js b/benchmark/blob/slice.js new file mode 100644 index 00000000000000..fcad0d68584353 --- /dev/null +++ b/benchmark/blob/slice.js @@ -0,0 +1,27 @@ +'use strict'; +const common = require('../common.js'); +const { Blob } = require('node:buffer'); +const assert = require('assert'); + +const bench = common.createBenchmark(main, { + n: [50e3], + dataSize: [ + 5, + 30 * 1024, + ], +}); + +let _sliceResult; + +function main({ n, dataSize }) { + const data = 'a'.repeat(dataSize); + const reusableBlob = new Blob([data]); + + bench.start(); + for (let i = 0; i < n; ++i) + _sliceResult = reusableBlob.slice(0, Math.floor(data.length / 2)); + bench.end(n); + + // Avoid V8 deadcode (elimination) + assert.ok(_sliceResult); +} diff --git a/benchmark/error/determine-specific-type.js b/benchmark/error/determine-specific-type.js new file mode 100644 index 00000000000000..12acab267b725e --- /dev/null +++ b/benchmark/error/determine-specific-type.js @@ -0,0 +1,58 @@ +'use strict'; + +const common = require('../common'); + +const bench = common.createBenchmark(main, { + n: [1e6], + v: [ + '() => 1n', + '() => true', + '() => false', + '() => 2', + '() => +0', + '() => -0', + '() => NaN', + '() => Infinity', + '() => ""', + '() => "\'"', + '() => Symbol("foo")', + '() => function foo() {}', + '() => null', + '() => undefined', + '() => new Array()', + '() => new BigInt64Array()', + '() => new BigUint64Array()', + '() => new Int8Array()', + '() => new Int16Array()', + '() => new Int32Array()', + '() => new Float32Array()', + '() => new Float64Array()', + '() => new Uint8Array()', + '() => new Uint8ClampedArray()', + '() => new Uint16Array()', + '() => new Uint32Array()', + '() => new Date()', + '() => new Map()', + '() => new WeakMap()', + '() => new Object()', + '() => Promise.resolve("foo")', + '() => new Set()', + '() => new WeakSet()', + '() => ({ __proto__: null })', + ], +}, { + flags: ['--expose-internals'], +}); + +function main({ n, v }) { + const { + determineSpecificType, + } = require('internal/errors'); + + const value = eval(v)(); + + bench.start(); + for (let i = 0; i < n; ++i) + determineSpecificType(value); + bench.end(n); +} diff --git a/benchmark/error/format-list.js b/benchmark/error/format-list.js new file mode 100644 index 00000000000000..f35ca3593a743c --- /dev/null +++ b/benchmark/error/format-list.js @@ -0,0 +1,44 @@ +'use strict'; + +const common = require('../common.js'); + +const bench = common.createBenchmark(main, { + n: [1e7], + input: [ + '', + 'a', + 'a,b', + 'a,b,c', + 'a,b,c,d', + ], + type: [ + 'undefined', + 'and', + 'or', + ], +}, { + flags: ['--expose-internals'], +}); + +function main({ n, input, type }) { + const { + formatList, + } = require('internal/errors'); + + const list = input.split(','); + + if (type === 'undefined') { + bench.start(); + for (let i = 0; i < n; ++i) { + formatList(list); + } + bench.end(n); + return; + } + + bench.start(); + for (let i = 0; i < n; ++i) { + formatList(list, type); + } + bench.end(n); +} diff --git a/benchmark/misc/hidestackframes.js b/benchmark/error/hidestackframes.js similarity index 100% rename from benchmark/misc/hidestackframes.js rename to benchmark/error/hidestackframes.js diff --git a/benchmark/error/node-error-instantiation.js b/benchmark/error/node-error-instantiation.js new file mode 100644 index 00000000000000..333087b9195894 --- /dev/null +++ b/benchmark/error/node-error-instantiation.js @@ -0,0 +1,66 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +const bench = common.createBenchmark(main, { + n: [1e6], + code: [ + 'built-in', + 'ERR_HTTP2_STREAM_SELF_DEPENDENCY', + 'ERR_INVALID_STATE', + 'ERR_INVALID_URL', + ], + stackTraceLimit: [0, 10], +}, { + flags: ['--expose-internals'], +}); + +function getErrorFactory(code) { + const { + ERR_HTTP2_STREAM_SELF_DEPENDENCY, + ERR_INVALID_STATE, + ERR_INVALID_URL, + } = require('internal/errors').codes; + + switch (code) { + case 'built-in': + return (n) => new Error(); + case 'ERR_HTTP2_STREAM_SELF_DEPENDENCY': + return (n) => new ERR_HTTP2_STREAM_SELF_DEPENDENCY(); + case 'ERR_INVALID_STATE': + return (n) => new ERR_INVALID_STATE(n + ''); + case 'ERR_INVALID_URL': + return (n) => new ERR_INVALID_URL({ input: n + '' }); + default: + throw new Error(`${code} not supported`); + } +} + +function main({ n, code, stackTraceLimit }) { + const getError = getErrorFactory(code); + + Error.stackTraceLimit = stackTraceLimit; + + // Warm up. + const length = 1024; + const array = []; + for (let i = 0; i < length; ++i) { + array.push(getError(i)); + } + + bench.start(); + + for (let i = 0; i < n; ++i) { + const index = i % length; + array[index] = getError(index); + } + + bench.end(n); + + // Verify the entries to prevent dead code elimination from making + // the benchmark invalid. + for (let i = 0; i < length; ++i) { + assert.strictEqual(typeof array[i], 'object'); + } +} diff --git a/benchmark/error/node-error-stack.js b/benchmark/error/node-error-stack.js new file mode 100644 index 00000000000000..06319ccd17105f --- /dev/null +++ b/benchmark/error/node-error-stack.js @@ -0,0 +1,62 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +const bench = common.createBenchmark(main, { + n: [1e6], + code: [ + 'built-in', + 'ERR_HTTP2_STREAM_SELF_DEPENDENCY', + 'ERR_INVALID_STATE', + ], + stackTraceLimit: [0, 10], +}, { + flags: ['--expose-internals'], +}); + +function getErrorStackFactory(code) { + const { + ERR_INVALID_STATE, + ERR_HTTP2_STREAM_SELF_DEPENDENCY, + } = require('internal/errors').codes; + + switch (code) { + case 'built-in': + return (n) => new Error().stack; + case 'ERR_HTTP2_STREAM_SELF_DEPENDENCY': + return (n) => new ERR_HTTP2_STREAM_SELF_DEPENDENCY().stack; + case 'ERR_INVALID_STATE': + return (n) => new ERR_INVALID_STATE(n + '').stack; + default: + throw new Error(`${code} not supported`); + } +} + +function main({ n, code, stackTraceLimit }) { + const getStack = getErrorStackFactory(code); + + Error.stackTraceLimit = stackTraceLimit; + + // Warm up. + const length = 1024; + const array = []; + for (let i = 0; i < length; ++i) { + array.push(getStack(i)); + } + + bench.start(); + + for (let i = 0; i < n; ++i) { + const index = i % length; + array[index] = getStack(index); + } + + bench.end(n); + + // Verify the entries to prevent dead code elimination from making + // the benchmark invalid. + for (let i = 0; i < length; ++i) { + assert.strictEqual(typeof array[i], 'string'); + } +} diff --git a/benchmark/error/node-error.js b/benchmark/error/node-error.js deleted file mode 100644 index 3a0aef91f04a06..00000000000000 --- a/benchmark/error/node-error.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const common = require('../common'); - -const bench = common.createBenchmark(main, { - n: [1e7], -}, { - flags: ['--expose-internals'], -}); - -function main({ n }) { - const { - codes: { - ERR_INVALID_STATE, - }, - } = require('internal/errors'); - bench.start(); - for (let i = 0; i < n; ++i) - new ERR_INVALID_STATE.TypeError('test'); - bench.end(n); -} diff --git a/benchmark/fs/bench-ftruncateSync.js b/benchmark/fs/bench-ftruncateSync.js new file mode 100644 index 00000000000000..a02686ffd901b3 --- /dev/null +++ b/benchmark/fs/bench-ftruncateSync.js @@ -0,0 +1,40 @@ +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const tmpdir = require('../../test/common/tmpdir'); +tmpdir.refresh(); + +const path = tmpdir.resolve(`new-file-${process.pid}`); +fs.appendFileSync(path, 'Some content.'); + +const bench = common.createBenchmark(main, { + type: ['invalid', 'valid'], + n: [1e4], +}); + +function main({ n, type }) { + let fd; + + switch (type) { + case 'invalid': + fd = 1 << 30; + break; + case 'valid': + fd = fs.openSync(path, 'r+'); + break; + default: + throw new Error('Invalid type'); + } + + bench.start(); + for (let i = 0; i < n; i++) { + try { + fs.ftruncateSync(fd, 4); + } catch { + // do nothing + } + } + bench.end(n); + if (type === 'valid') fs.closeSync(fd); +} diff --git a/benchmark/fs/bench-unlinkSync.js b/benchmark/fs/bench-unlinkSync.js new file mode 100644 index 00000000000000..8b992198c8d368 --- /dev/null +++ b/benchmark/fs/bench-unlinkSync.js @@ -0,0 +1,43 @@ +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const tmpdir = require('../../test/common/tmpdir'); +tmpdir.refresh(); + +const bench = common.createBenchmark(main, { + type: ['existing', 'non-existing'], + n: [1e3], +}); + +function main({ n, type }) { + let files; + + switch (type) { + case 'existing': + files = []; + + // Populate tmpdir with mock files + for (let i = 0; i < n; i++) { + const path = tmpdir.resolve(`unlinksync-bench-file-${i}`); + fs.writeFileSync(path, 'bench'); + files.push(path); + } + break; + case 'non-existing': + files = new Array(n).fill(tmpdir.resolve(`.non-existing-file-${Date.now()}`)); + break; + default: + new Error('Invalid type'); + } + + bench.start(); + for (let i = 0; i < n; i++) { + try { + fs.unlinkSync(files[i]); + } catch { + // do nothing + } + } + bench.end(n); +} diff --git a/benchmark/fs/bench-writevSync.js b/benchmark/fs/bench-writevSync.js new file mode 100644 index 00000000000000..596359c6750011 --- /dev/null +++ b/benchmark/fs/bench-writevSync.js @@ -0,0 +1,55 @@ +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const assert = require('assert'); +const tmpdir = require('../../test/common/tmpdir'); +tmpdir.refresh(); + +const path = tmpdir.resolve(`new-file-${process.pid}`); +fs.writeFileSync(path, 'Some content.'); + +const bench = common.createBenchmark(main, { + type: ['valid', 'invalid'], + n: [1e5], +}); + +const buffer = Buffer.from('Benchmark data.'); + +function main({ n, type }) { + let fd; + let result; + + switch (type) { + case 'valid': + fd = fs.openSync(path, 'r+'); + + bench.start(); + for (let i = 0; i < n; i++) { + result = fs.writevSync(fd, [buffer]); + } + + bench.end(n); + assert(result); + fs.closeSync(fd); + break; + case 'invalid': { + fd = 1 << 30; + let hasError = false; + bench.start(); + for (let i = 0; i < n; i++) { + try { + result = fs.writevSync(fd, [buffer]); + } catch { + hasError = true; + } + } + + bench.end(n); + assert(hasError); + break; + } + default: + throw new Error('Invalid type'); + } +} diff --git a/benchmark/fs/bench_fdatasyncSync.js b/benchmark/fs/bench_fdatasyncSync.js new file mode 100644 index 00000000000000..9aedb0a314fb24 --- /dev/null +++ b/benchmark/fs/bench_fdatasyncSync.js @@ -0,0 +1,42 @@ +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const tmpdir = require('../../test/common/tmpdir'); +tmpdir.refresh(); + +const tmpfile = tmpdir.resolve(`.existing-file-${process.pid}`); +fs.writeFileSync(tmpfile, 'this-is-for-a-benchmark', 'utf8'); + +const bench = common.createBenchmark(main, { + type: ['existing', 'non-existing'], + n: [1e4], +}); + +function main({ n, type }) { + let fd; + + switch (type) { + case 'existing': + fd = fs.openSync(tmpfile, 'r', 0o666); + break; + case 'non-existing': + fd = 1 << 30; + break; + default: + new Error('Invalid type'); + } + + bench.start(); + for (let i = 0; i < n; i++) { + try { + fs.fdatasyncSync(fd); + } catch { + // do nothing + } + } + + bench.end(n); + + if (type === 'existing') fs.closeSync(fd); +} diff --git a/benchmark/mime/mimetype-instantiation.js b/benchmark/mime/mimetype-instantiation.js new file mode 100644 index 00000000000000..ec0f68e819a753 --- /dev/null +++ b/benchmark/mime/mimetype-instantiation.js @@ -0,0 +1,53 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const { MIMEType } = require('util'); + +const bench = common.createBenchmark(main, { + n: [1e5], + value: [ + 'application/ecmascript; ', + 'text/html;charset=gbk', + `text/html;${'0123456789'.repeat(12)}=x;charset=gbk`, + 'text/html;test=\u00FF;charset=gbk', + 'x/x;\n\r\t x=x\n\r\t ;x=y', + ], +}, { +}); + +function main({ n, value }) { + // Warm up. + const length = 1024; + const array = []; + let errCase = false; + + for (let i = 0; i < length; ++i) { + try { + array.push(new MIMEType(value)); + } catch (e) { + errCase = true; + array.push(e); + } + } + + // console.log(`errCase: ${errCase}`); + bench.start(); + + for (let i = 0; i < n; ++i) { + const index = i % length; + try { + array[index] = new MIMEType(value); + } catch (e) { + array[index] = e; + } + } + + bench.end(n); + + // Verify the entries to prevent dead code elimination from making + // the benchmark invalid. + for (let i = 0; i < length; ++i) { + assert.strictEqual(typeof array[i], errCase ? 'object' : 'object'); + } +} diff --git a/benchmark/mime/mimetype-to-string.js b/benchmark/mime/mimetype-to-string.js new file mode 100644 index 00000000000000..e5cb8d6fae2e60 --- /dev/null +++ b/benchmark/mime/mimetype-to-string.js @@ -0,0 +1,55 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const { MIMEType } = require('util'); + +const bench = common.createBenchmark(main, { + n: [1e5], + value: [ + 'application/ecmascript; ', + 'text/html;charset=gbk', + `text/html;${'0123456789'.repeat(12)}=x;charset=gbk`, + 'text/html;test=\u00FF;charset=gbk', + 'x/x;\n\r\t x=x\n\r\t ;x=y', + ], +}, { +}); + +function main({ n, value }) { + // Warm up. + const length = 1024; + const array = []; + let errCase = false; + + const mime = new MIMEType(value); + + for (let i = 0; i < length; ++i) { + try { + array.push(mime.toString()); + } catch (e) { + errCase = true; + array.push(e); + } + } + + // console.log(`errCase: ${errCase}`); + bench.start(); + + for (let i = 0; i < n; ++i) { + const index = i % length; + try { + array[index] = mime.toString(); + } catch (e) { + array[index] = e; + } + } + + bench.end(n); + + // Verify the entries to prevent dead code elimination from making + // the benchmark invalid. + for (let i = 0; i < length; ++i) { + assert.strictEqual(typeof array[i], errCase ? 'object' : 'string'); + } +} diff --git a/benchmark/mime/parse-type-and-subtype.js b/benchmark/mime/parse-type-and-subtype.js new file mode 100644 index 00000000000000..4b91dc1db6ab24 --- /dev/null +++ b/benchmark/mime/parse-type-and-subtype.js @@ -0,0 +1,53 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +const bench = common.createBenchmark(main, { + n: [1e7], + value: [ + 'application/ecmascript; ', + 'text/html;charset=gbk', + // eslint-disable-next-line max-len + 'text/html;0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789=x;charset=gbk', + ], +}, { + flags: ['--expose-internals'], +}); + +function main({ n, value }) { + + const parseTypeAndSubtype = require('internal/mime').parseTypeAndSubtype; + // Warm up. + const length = 1024; + const array = []; + let errCase = false; + + for (let i = 0; i < length; ++i) { + try { + array.push(parseTypeAndSubtype(value)); + } catch (e) { + errCase = true; + array.push(e); + } + } + + // console.log(`errCase: ${errCase}`); + bench.start(); + for (let i = 0; i < n; ++i) { + const index = i % length; + try { + array[index] = parseTypeAndSubtype(value); + } catch (e) { + array[index] = e; + } + } + + bench.end(n); + + // Verify the entries to prevent dead code elimination from making + // the benchmark invalid. + for (let i = 0; i < length; ++i) { + assert.strictEqual(typeof array[i], errCase ? 'object' : 'object'); + } +} diff --git a/benchmark/mime/to-ascii-lower.js b/benchmark/mime/to-ascii-lower.js new file mode 100644 index 00000000000000..93a4a14dc6d96b --- /dev/null +++ b/benchmark/mime/to-ascii-lower.js @@ -0,0 +1,54 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +const bench = common.createBenchmark(main, { + n: [1e7], + value: [ + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + 'UPPERCASE', + 'lowercase', + 'mixedCase', + ], +}, { + flags: ['--expose-internals'], +}); + +function main({ n, value }) { + + const toASCIILower = require('internal/mime').toASCIILower; + // Warm up. + const length = 1024; + const array = []; + let errCase = false; + + for (let i = 0; i < length; ++i) { + try { + array.push(toASCIILower(value)); + } catch (e) { + errCase = true; + array.push(e); + } + } + + // console.log(`errCase: ${errCase}`); + bench.start(); + + for (let i = 0; i < n; ++i) { + const index = i % length; + try { + array[index] = toASCIILower(value); + } catch (e) { + array[index] = e; + } + } + + bench.end(n); + + // Verify the entries to prevent dead code elimination from making + // the benchmark invalid. + for (let i = 0; i < length; ++i) { + assert.strictEqual(typeof array[i], errCase ? 'object' : 'string'); + } +} diff --git a/benchmark/perf_hooks/performance-observer.js b/benchmark/perf_hooks/performance-observer.js new file mode 100644 index 00000000000000..42a94932860c38 --- /dev/null +++ b/benchmark/perf_hooks/performance-observer.js @@ -0,0 +1,49 @@ +'use strict'; + +const assert = require('assert'); +const common = require('../common.js'); + +const { + PerformanceObserver, + performance, +} = require('perf_hooks'); + +function randomFn() { + return Math.random(); +} + +const bench = common.createBenchmark(main, { + n: [1e5], + pending: [1, 10], +}, { + options: ['--expose-internals'], +}); + +let _result; + +function fillQueue(timerfied, pending) { + for (let i = 0; i < pending; i++) { + _result = timerfied(); + } + // Avoid V8 deadcode (elimination) + assert.ok(_result); +} + +function main({ n, pending }) { + const timerfied = performance.timerify(randomFn); + + let count = 0; + const obs = new PerformanceObserver((entries) => { + count += entries.getEntries().length; + + if (count >= n) { + bench.end(count); + } else { + fillQueue(timerfied, pending); + } + }); + obs.observe({ entryTypes: ['function'], buffered: true }); + + bench.start(); + fillQueue(timerfied, pending); +} diff --git a/benchmark/perf_hooks/resourcetiming.js b/benchmark/perf_hooks/resourcetiming.js index ddc40767b16196..51c4778d20065f 100644 --- a/benchmark/perf_hooks/resourcetiming.js +++ b/benchmark/perf_hooks/resourcetiming.js @@ -72,6 +72,6 @@ function main({ n, observe }) { obs.observe({ entryTypes: [observe], buffered: true }); bench.start(); - for (let i = 0; i < 1e5; i++) + for (let i = 0; i < n; i++) test(); } diff --git a/benchmark/perf_hooks/timerfied.js b/benchmark/perf_hooks/timerfied.js new file mode 100644 index 00000000000000..50be0a47fc1b5a --- /dev/null +++ b/benchmark/perf_hooks/timerfied.js @@ -0,0 +1,36 @@ +'use strict'; + +const assert = require('assert'); +const common = require('../common.js'); + +const { + PerformanceObserver, + performance, +} = require('perf_hooks'); + +function randomFn() { + return Math.random(); +} + +const bench = common.createBenchmark(main, { + n: [1e5], + observe: ['function'], +}); + +let _result; + +function main({ n, observe }) { + const obs = new PerformanceObserver(() => { + bench.end(n); + }); + obs.observe({ entryTypes: [observe], buffered: true }); + + const timerfied = performance.timerify(randomFn); + + bench.start(); + for (let i = 0; i < n; i++) + _result = timerfied(); + + // Avoid V8 deadcode (elimination) + assert.ok(_result); +} diff --git a/benchmark/streams/writable-manywrites.js b/benchmark/streams/writable-manywrites.js index e6ab65162c366c..d244c7d606479e 100644 --- a/benchmark/streams/writable-manywrites.js +++ b/benchmark/streams/writable-manywrites.js @@ -4,7 +4,7 @@ const common = require('../common'); const Writable = require('stream').Writable; const bench = common.createBenchmark(main, { - n: [2e6], + n: [1e5], sync: ['yes', 'no'], writev: ['yes', 'no'], callback: ['yes', 'no'], @@ -13,7 +13,7 @@ const bench = common.createBenchmark(main, { function main({ n, sync, writev, callback, len }) { const b = Buffer.allocUnsafe(len); - const s = new Writable(); + const s = new Writable({ highWaterMark: 16 * 1024 }); sync = sync === 'yes'; const writecb = (cb) => { diff --git a/benchmark/url/whatwg-url-validity.js b/benchmark/url/whatwg-url-validity.js new file mode 100644 index 00000000000000..6ba22336408fa1 --- /dev/null +++ b/benchmark/url/whatwg-url-validity.js @@ -0,0 +1,23 @@ +'use strict'; +const common = require('../common.js'); +const url = require('url'); +const URL = url.URL; + +const bench = common.createBenchmark(main, { + type: ['valid', 'invalid'], + e: [1e5], +}); + +// This benchmark is used to compare the `Invalid URL` path of the URL parser +function main({ type, e }) { + const url = type === 'valid' ? 'https://www.nodejs.org' : 'www.nodejs.org'; + bench.start(); + for (let i = 0; i < e; i++) { + try { + new URL(url); + } catch { + // do nothing + } + } + bench.end(e); +} diff --git a/benchmark/validators/validate-object.js b/benchmark/validators/validate-object.js new file mode 100644 index 00000000000000..50e722c52426a4 --- /dev/null +++ b/benchmark/validators/validate-object.js @@ -0,0 +1,75 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +const bench = common.createBenchmark(main, { + n: [1e5], + objectToTest: [ + 'object', + 'null', + 'array', + 'function', + ], +}, { + flags: ['--expose-internals'], +}); + +function getObjectToTest(objectToTest) { + switch (objectToTest) { + case 'object': + return { foo: 'bar' }; + case 'null': + return null; + case 'array': + return ['foo', 'bar']; + case 'function': + return () => 'foo'; + default: + throw new Error(`Value ${objectToTest} is not a valid objectToTest.`); + } +} + +function getOptions(objectToTest) { + const { + kValidateObjectAllowNullable, + kValidateObjectAllowArray, + kValidateObjectAllowFunction, + } = require('internal/validators'); + + switch (objectToTest) { + case 'object': + return 0; + case 'null': + return kValidateObjectAllowNullable; + case 'array': + return kValidateObjectAllowArray; + case 'function': + return kValidateObjectAllowFunction; + default: + throw new Error(`Value ${objectToTest} is not a valid objectToTest.`); + } +} + +let _validateResult; + +function main({ n, objectToTest }) { + const { + validateObject, + } = require('internal/validators'); + + const value = getObjectToTest(objectToTest); + const options = getOptions(objectToTest); + + bench.start(); + for (let i = 0; i < n; ++i) { + try { + _validateResult = validateObject(value, 'Object', options); + } catch { + _validateResult = undefined; + } + } + bench.end(n); + + assert.ok(!_validateResult); +} diff --git a/benchmark/vm/compile-script-in-isolate-cache.js b/benchmark/vm/compile-script-in-isolate-cache.js new file mode 100644 index 00000000000000..7eceb0eba0d215 --- /dev/null +++ b/benchmark/vm/compile-script-in-isolate-cache.js @@ -0,0 +1,35 @@ +'use strict'; + +// This benchmarks compiling scripts that hit the in-isolate compilation +// cache (by having the same source). +const common = require('../common.js'); +const fs = require('fs'); +const vm = require('vm'); +const fixtures = require('../../test/common/fixtures.js'); +const scriptPath = fixtures.path('snapshot', 'typescript.js'); + +const bench = common.createBenchmark(main, { + type: ['with-dynamic-import-callback', 'without-dynamic-import-callback'], + n: [100], +}); + +const scriptSource = fs.readFileSync(scriptPath, 'utf8'); + +function main({ n, type }) { + let script; + bench.start(); + const options = {}; + switch (type) { + case 'with-dynamic-import-callback': + // Use a dummy callback for now until we really need to benchmark it. + options.importModuleDynamically = async () => {}; + break; + case 'without-dynamic-import-callback': + break; + } + for (let i = 0; i < n; i++) { + script = new vm.Script(scriptSource, options); + } + bench.end(n); + script.runInThisContext(); +} diff --git a/benchmark/worker/atomics-wait.js b/benchmark/worker/atomics-wait.js index 2e6e01f881c66a..53d71ff9224a11 100644 --- a/benchmark/worker/atomics-wait.js +++ b/benchmark/worker/atomics-wait.js @@ -4,10 +4,6 @@ if (typeof SharedArrayBuffer === 'undefined') { throw new Error('SharedArrayBuffers must be enabled to run this benchmark'); } -if (typeof Atomics === 'undefined') { - throw new Error('Atomics must be enabled to run this benchmark'); -} - const common = require('../common.js'); const bench = common.createBenchmark(main, { n: [1e7], diff --git a/common.gypi b/common.gypi index 14f05fcf9ccb8d..071a27afc2fd59 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.18', + 'v8_embedder_string': '-node.12', ##### V8 defaults for Node.js ##### @@ -230,7 +230,7 @@ ], },], ['OS == "android"', { - 'cflags': [ '-fPIC' ], + 'cflags': [ '-fPIC', '-I<(android_ndk_path)/sources/android/cpufeatures' ], 'ldflags': [ '-fPIC' ] }], ], diff --git a/configure.py b/configure.py index 62f041ce52bf85..8be9e9ca5c4af8 100755 --- a/configure.py +++ b/configure.py @@ -1498,6 +1498,7 @@ def configure_v8(o): o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0 o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0 o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression or options.disable_shared_ro_heap else 1 + o['variables']['v8_enable_extensible_ro_snapshot'] = 0 o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0 o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform) o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8) diff --git a/deps/ada/ada.cpp b/deps/ada/ada.cpp index ce4e6302acbe87..1175b114d8addd 100644 --- a/deps/ada/ada.cpp +++ b/deps/ada/ada.cpp @@ -1,4 +1,4 @@ -/* auto-generated on 2023-07-23 15:03:22 -0400. Do not edit! */ +/* auto-generated on 2023-09-30 20:34:30 -0400. Do not edit! */ /* begin file src/ada.cpp */ #include "ada.h" /* begin file src/checkers.cpp */ @@ -116,10 +116,11 @@ ada_really_inline constexpr bool verify_dns_length( ADA_PUSH_DISABLE_ALL_WARNINGS /* begin file src/ada_idna.cpp */ -/* auto-generated on 2023-05-07 19:12:14 -0400. Do not edit! */ +/* auto-generated on 2023-09-19 15:58:51 -0400. Do not edit! */ /* begin file src/idna.cpp */ /* begin file src/unicode_transcoding.cpp */ +#include #include #include @@ -226,38 +227,22 @@ size_t utf8_length_from_utf32(const char32_t* buf, size_t len) { // We are not BOM aware. const uint32_t* p = reinterpret_cast(buf); size_t counter{0}; - for (size_t i = 0; i < len; i++) { - /** ASCII **/ - if (p[i] <= 0x7F) { - counter++; - } - /** two-byte **/ - else if (p[i] <= 0x7FF) { - counter += 2; - } - /** three-byte **/ - else if (p[i] <= 0xFFFF) { - counter += 3; - } - /** four-bytes **/ - else { - counter += 4; - } + for (size_t i = 0; i != len; ++i) { + ++counter; // ASCII + counter += static_cast(p[i] > 0x7F); // two-byte + counter += static_cast(p[i] > 0x7FF); // three-byte + counter += static_cast(p[i] > 0xFFFF); // four-bytes } return counter; } size_t utf32_length_from_utf8(const char* buf, size_t len) { const int8_t* p = reinterpret_cast(buf); - size_t counter{0}; - for (size_t i = 0; i < len; i++) { + return std::count_if(p, std::next(p, len), [](int8_t c) { // -65 is 0b10111111, anything larger in two-complement's // should start a new code point. - if (p[i] > -65) { - counter++; - } - } - return counter; + return c > -65; + }); } size_t utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) { @@ -9520,19 +9505,20 @@ bool is_label_valid(const std::u32string_view label) { namespace ada::idna { -bool constexpr begins_with(std::u32string_view view, - std::u32string_view prefix) { +bool begins_with(std::u32string_view view, std::u32string_view prefix) { if (view.size() < prefix.size()) { return false; } - return view.substr(0, prefix.size()) == prefix; + // constexpr as of C++20 + return std::equal(prefix.begin(), prefix.end(), view.begin()); } -bool constexpr begins_with(std::string_view view, std::string_view prefix) { +bool begins_with(std::string_view view, std::string_view prefix) { if (view.size() < prefix.size()) { return false; } - return view.substr(0, prefix.size()) == prefix; + // constexpr as of C++20 + return std::equal(prefix.begin(), prefix.end(), view.begin()); } bool constexpr is_ascii(std::u32string_view view) { @@ -9824,6 +9810,17 @@ constexpr bool to_lower_ascii(char* input, size_t length) noexcept { #if ADA_NEON ada_really_inline bool has_tabs_or_newline( std::string_view user_input) noexcept { + // first check for short strings in which case we do it naively. + if (user_input.size() < 16) { // slow path + for (size_t i = 0; i < user_input.size(); i++) { + if (user_input[i] == '\r' || user_input[i] == '\n' || + user_input[i] == '\t') { + return true; + } + } + return false; + } + // fast path for long strings (expected to be common) size_t i = 0; const uint8x16_t mask1 = vmovq_n_u8('\r'); const uint8x16_t mask2 = vmovq_n_u8('\n'); @@ -9836,9 +9833,8 @@ ada_really_inline bool has_tabs_or_newline( vceqq_u8(word, mask3)); } if (i < user_input.size()) { - uint8_t buffer[16]{}; - memcpy(buffer, user_input.data() + i, user_input.size() - i); - uint8x16_t word = vld1q_u8((const uint8_t*)user_input.data() + i); + uint8x16_t word = + vld1q_u8((const uint8_t*)user_input.data() + user_input.length() - 16); running = vorrq_u8(vorrq_u8(running, vorrq_u8(vceqq_u8(word, mask1), vceqq_u8(word, mask2))), vceqq_u8(word, mask3)); @@ -9848,6 +9844,17 @@ ada_really_inline bool has_tabs_or_newline( #elif ADA_SSE2 ada_really_inline bool has_tabs_or_newline( std::string_view user_input) noexcept { + // first check for short strings in which case we do it naively. + if (user_input.size() < 16) { // slow path + for (size_t i = 0; i < user_input.size(); i++) { + if (user_input[i] == '\r' || user_input[i] == '\n' || + user_input[i] == '\t') { + return true; + } + } + return false; + } + // fast path for long strings (expected to be common) size_t i = 0; const __m128i mask1 = _mm_set1_epi8('\r'); const __m128i mask2 = _mm_set1_epi8('\n'); @@ -9861,9 +9868,8 @@ ada_really_inline bool has_tabs_or_newline( _mm_cmpeq_epi8(word, mask3)); } if (i < user_input.size()) { - alignas(16) uint8_t buffer[16]{}; - memcpy(buffer, user_input.data() + i, user_input.size() - i); - __m128i word = _mm_load_si128((const __m128i*)buffer); + __m128i word = _mm_loadu_si128( + (const __m128i*)(user_input.data() + user_input.length() - 16)); running = _mm_or_si128( _mm_or_si128(running, _mm_or_si128(_mm_cmpeq_epi8(word, mask1), _mm_cmpeq_epi8(word, mask2))), @@ -10144,13 +10150,12 @@ ada_really_inline constexpr bool is_lowercase_hex(const char c) noexcept { return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f'); } +constexpr static char hex_to_binary_table[] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 10, 11, + 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15}; unsigned constexpr convert_hex_to_binary(const char c) noexcept { - // this code can be optimized. - if (c <= '9') { - return c - '0'; - } - char del = c >= 'a' ? 'a' : 'A'; - return 10 + (c - del); + return hex_to_binary_table[c - '0']; } std::string percent_decode(const std::string_view input, size_t first_percent) { @@ -10159,8 +10164,9 @@ std::string percent_decode(const std::string_view input, size_t first_percent) { if (first_percent == std::string_view::npos) { return std::string(input); } - std::string dest(input.substr(0, first_percent)); + std::string dest; dest.reserve(input.length()); + dest.append(input.substr(0, first_percent)); const char* pointer = input.data() + first_percent; const char* end = input.data() + input.size(); // Optimization opportunity: if the following code gets @@ -10197,9 +10203,10 @@ std::string percent_encode(const std::string_view input, return std::string(input); } - std::string result(input.substr(0, std::distance(input.begin(), pointer))); + std::string result; result.reserve(input.length()); // in the worst case, percent encoding might // produce 3 characters. + result.append(input.substr(0, std::distance(input.begin(), pointer))); for (; pointer != input.end(); pointer++) { if (character_sets::bit_at(character_set, *pointer)) { @@ -11231,6 +11238,7 @@ bool url::parse_ipv4(std::string_view input) { } else { host = ada::serializers::ipv4(ipv4); // We have to reserialize the address. } + host_type = IPV4; return true; } @@ -11460,6 +11468,7 @@ bool url::parse_ipv6(std::string_view input) { } host = ada::serializers::ipv6(address); ada_log("parse_ipv6 ", *host); + host_type = IPV6; return true; } @@ -11876,7 +11885,7 @@ bool url::set_host_or_hostname(const std::string_view input) { } // Let host be the result of host parsing host_view with url is not special. - if (host_view.empty()) { + if (host_view.empty() && !is_special()) { host = ""; return true; } @@ -12569,7 +12578,6 @@ result_type parse_url(std::string_view user_input, // If c is U+002F (/) and remaining starts with U+002F (/), // then set state to special authority ignore slashes state and increase // pointer by 1. - state = ada::state::SPECIAL_AUTHORITY_IGNORE_SLASHES; std::string_view view = helpers::substring(url_data, input_position); if (ada::checkers::begins_with(view, "//")) { input_position += 2; @@ -13638,13 +13646,12 @@ bool url_aggregator::set_host_or_hostname(const std::string_view input) { // empty string, and either url includes credentials or url's port is // non-null, return. else if (host_view.empty() && - (is_special() || has_credentials() || - components.port != url_components::omitted)) { + (is_special() || has_credentials() || has_port())) { return false; } // Let host be the result of host parsing host_view with url is not special. - if (host_view.empty()) { + if (host_view.empty() && !is_special()) { if (has_hostname()) { clear_hostname(); // easy! } else if (has_dash_dot()) { @@ -14021,6 +14028,7 @@ bool url_aggregator::parse_ipv4(std::string_view input) { update_base_hostname( ada::serializers::ipv4(ipv4)); // We have to reserialize the address. } + host_type = IPV4; ADA_ASSERT_TRUE(validate()); return true; } @@ -14256,6 +14264,7 @@ bool url_aggregator::parse_ipv6(std::string_view input) { update_base_hostname(ada::serializers::ipv6(address)); ada_log("parse_ipv6 ", get_hostname()); ADA_ASSERT_TRUE(validate()); + host_type = IPV6; return true; } @@ -14890,6 +14899,11 @@ void ada_free(ada_url result) noexcept { delete r; } +ada_url ada_copy(ada_url input) noexcept { + ada::result& r = get_instance(input); + return new ada::result(r); +} + bool ada_is_valid(ada_url result) noexcept { ada::result& r = get_instance(result); return r.has_value(); @@ -15007,6 +15021,22 @@ ada_string ada_get_protocol(ada_url result) noexcept { return ada_string_create(out.data(), out.length()); } +uint8_t ada_get_host_type(ada_url result) noexcept { + ada::result& r = get_instance(result); + if (!r) { + return 0; + } + return r->host_type; +} + +uint8_t ada_get_scheme_type(ada_url result) noexcept { + ada::result& r = get_instance(result); + if (!r) { + return 0; + } + return r->type; +} + bool ada_set_href(ada_url result, const char* input, size_t length) noexcept { ada::result& r = get_instance(result); if (!r) { @@ -15076,6 +15106,13 @@ bool ada_set_pathname(ada_url result, const char* input, return r->set_pathname(std::string_view(input, length)); } +/** + * Update the search/query of the URL. + * + * If a URL has `?` as the search value, passing empty string to this function + * does not remove the attribute. If you need to remove it, please use + * `ada_clear_search` method. + */ void ada_set_search(ada_url result, const char* input, size_t length) noexcept { ada::result& r = get_instance(result); if (r) { @@ -15083,6 +15120,13 @@ void ada_set_search(ada_url result, const char* input, size_t length) noexcept { } } +/** + * Update the hash/fragment of the URL. + * + * If a URL has `#` as the hash value, passing empty string to this function + * does not remove the attribute. If you need to remove it, please use + * `ada_clear_hash` method. + */ void ada_set_hash(ada_url result, const char* input, size_t length) noexcept { ada::result& r = get_instance(result); if (r) { @@ -15090,6 +15134,39 @@ void ada_set_hash(ada_url result, const char* input, size_t length) noexcept { } } +void ada_clear_port(ada_url result) noexcept { + ada::result& r = get_instance(result); + if (r) { + r->clear_port(); + } +} + +/** + * Removes the hash of the URL. + * + * Despite `ada_set_hash` method, this function allows the complete + * removal of the hash attribute, even if it has a value of `#`. + */ +void ada_clear_hash(ada_url result) noexcept { + ada::result& r = get_instance(result); + if (r) { + r->clear_hash(); + } +} + +/** + * Removes the search of the URL. + * + * Despite `ada_set_search` method, this function allows the complete + * removal of the search attribute, even if it has a value of `?`. + */ +void ada_clear_search(ada_url result) noexcept { + ada::result& r = get_instance(result); + if (r) { + r->clear_search(); + } +} + bool ada_has_credentials(ada_url result) noexcept { ada::result& r = get_instance(result); if (!r) { diff --git a/deps/ada/ada.h b/deps/ada/ada.h index 3f1531944e96e7..d6f705a5d6db67 100644 --- a/deps/ada/ada.h +++ b/deps/ada/ada.h @@ -1,4 +1,4 @@ -/* auto-generated on 2023-07-23 15:03:22 -0400. Do not edit! */ +/* auto-generated on 2023-09-30 20:34:30 -0400. Do not edit! */ /* begin file include/ada.h */ /** * @file ada.h @@ -8,7 +8,7 @@ #define ADA_H /* begin file include/ada/ada_idna.h */ -/* auto-generated on 2023-05-07 19:12:14 -0400. Do not edit! */ +/* auto-generated on 2023-09-19 15:58:51 -0400. Do not edit! */ /* begin file include/idna.h */ #ifndef ADA_IDNA_H #define ADA_IDNA_H @@ -129,9 +129,8 @@ std::string to_ascii(std::string_view ut8_string); // https://url.spec.whatwg.org/#forbidden-domain-code-point bool contains_forbidden_domain_code_point(std::string_view ascii_string); -bool constexpr begins_with(std::u32string_view view, - std::u32string_view prefix); -bool constexpr begins_with(std::string_view view, std::string_view prefix); +bool begins_with(std::u32string_view view, std::u32string_view prefix); +bool begins_with(std::string_view view, std::string_view prefix); bool constexpr is_ascii(std::u32string_view view); bool constexpr is_ascii(std::string_view view); @@ -1008,6 +1007,7 @@ ada_really_inline bool bit_at(const uint8_t a[], const uint8_t i) { #define ADA_CHECKERS_INL_H +#include #include #include @@ -1054,11 +1054,12 @@ inline constexpr bool is_normalized_windows_drive_letter( return input.size() >= 2 && (is_alpha(input[0]) && (input[1] == ':')); } -ada_really_inline constexpr bool begins_with(std::string_view view, - std::string_view prefix) { +ada_really_inline bool begins_with(std::string_view view, + std::string_view prefix) { // in C++20, you have view.begins_with(prefix) + // std::equal is constexpr in C++20 return view.size() >= prefix.size() && - (view.substr(0, prefix.size()) == prefix); + std::equal(prefix.begin(), prefix.end(), view.begin()); } } // namespace ada::checkers @@ -1406,6 +1407,25 @@ constexpr ada::scheme::type get_scheme_type(std::string_view scheme) noexcept; namespace ada { +/** + * Type of URL host as an enum. + */ +enum url_host_type : uint8_t { + /** + * Represents common URLs such as "https://www.google.com" + */ + DEFAULT = 0, + /** + * Represents ipv4 addresses such as "http://127.0.0.1" + */ + IPV4 = 1, + /** + * Represents ipv6 addresses such as + * "http://[2001:db8:3333:4444:5555:6666:7777:8888]" + */ + IPV6 = 2, +}; + /** * @brief Base class of URL implementations * @@ -1428,6 +1448,11 @@ struct url_base { */ bool has_opaque_path{false}; + /** + * URL hosts type + */ + url_host_type host_type = url_host_type::DEFAULT; + /** * @private */ @@ -1768,8 +1793,8 @@ inline int fast_digit_count(uint32_t x) noexcept { #define TL_EXPECTED_HPP #define TL_EXPECTED_VERSION_MAJOR 1 -#define TL_EXPECTED_VERSION_MINOR 0 -#define TL_EXPECTED_VERSION_PATCH 1 +#define TL_EXPECTED_VERSION_MINOR 1 +#define TL_EXPECTED_VERSION_PATCH 0 #include #include @@ -1802,6 +1827,16 @@ inline int fast_digit_count(uint32_t x) noexcept { #define TL_EXPECTED_GCC55 #endif +#if !defined(TL_ASSERT) +// can't have assert in constexpr in C++11 and GCC 4.9 has a compiler bug +#if (__cplusplus > 201103L) && !defined(TL_EXPECTED_GCC49) +#include +#define TL_ASSERT(x) assert(x) +#else +#define TL_ASSERT(x) +#endif +#endif + #if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 9 && \ !defined(__clang__)) // GCC < 5 doesn't support overloading on const&& for member functions @@ -1957,6 +1992,7 @@ template #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED throw std::forward(e); #else + (void)e; #ifdef _MSC_VER __assume(0); #else @@ -2597,7 +2633,7 @@ struct expected_operations_base : expected_storage_base { geterr().~unexpected(); construct(std::move(rhs).get()); } else { - assign_common(rhs); + assign_common(std::move(rhs)); } } @@ -2960,7 +2996,7 @@ struct default_constructor_tag { }; // expected_default_ctor_base will ensure that expected has a deleted default -// constructor if T is not default constructible. +// consturctor if T is not default constructible. // This specialization is for when T is default constructible template , return map_error_impl(std::move(*this), std::forward(f)); } #endif +#endif +#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \ + !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55) + template + TL_EXPECTED_11_CONSTEXPR auto transform_error(F &&f) & { + return map_error_impl(*this, std::forward(f)); + } + template + TL_EXPECTED_11_CONSTEXPR auto transform_error(F &&f) && { + return map_error_impl(std::move(*this), std::forward(f)); + } + template + constexpr auto transform_error(F &&f) const & { + return map_error_impl(*this, std::forward(f)); + } + template + constexpr auto transform_error(F &&f) const && { + return map_error_impl(std::move(*this), std::forward(f)); + } +#else + template + TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval(), + std::declval())) + transform_error(F &&f) & { + return map_error_impl(*this, std::forward(f)); + } + template + TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval(), + std::declval())) + transform_error(F &&f) && { + return map_error_impl(std::move(*this), std::forward(f)); + } + template + constexpr decltype(map_error_impl(std::declval(), + std::declval())) + transform_error(F &&f) const & { + return map_error_impl(*this, std::forward(f)); + } + +#ifndef TL_EXPECTED_NO_CONSTRR + template + constexpr decltype(map_error_impl(std::declval(), + std::declval())) + transform_error(F &&f) const && { + return map_error_impl(std::move(*this), std::forward(f)); + } +#endif #endif template expected TL_EXPECTED_11_CONSTEXPR or_else(F &&f) & { @@ -3697,27 +3780,37 @@ class expected : private detail::expected_move_assign_base, } } - constexpr const T *operator->() const { return valptr(); } - TL_EXPECTED_11_CONSTEXPR T *operator->() { return valptr(); } + constexpr const T *operator->() const { + TL_ASSERT(has_value()); + return valptr(); + } + TL_EXPECTED_11_CONSTEXPR T *operator->() { + TL_ASSERT(has_value()); + return valptr(); + } template ::value> * = nullptr> constexpr const U &operator*() const & { + TL_ASSERT(has_value()); return val(); } template ::value> * = nullptr> TL_EXPECTED_11_CONSTEXPR U &operator*() & { + TL_ASSERT(has_value()); return val(); } template ::value> * = nullptr> constexpr const U &&operator*() const && { + TL_ASSERT(has_value()); return std::move(val()); } template ::value> * = nullptr> TL_EXPECTED_11_CONSTEXPR U &&operator*() && { + TL_ASSERT(has_value()); return std::move(val()); } @@ -3753,10 +3846,22 @@ class expected : private detail::expected_move_assign_base, return std::move(val()); } - constexpr const E &error() const & { return err().value(); } - TL_EXPECTED_11_CONSTEXPR E &error() & { return err().value(); } - constexpr const E &&error() const && { return std::move(err().value()); } - TL_EXPECTED_11_CONSTEXPR E &&error() && { return std::move(err().value()); } + constexpr const E &error() const & { + TL_ASSERT(!has_value()); + return err().value(); + } + TL_EXPECTED_11_CONSTEXPR E &error() & { + TL_ASSERT(!has_value()); + return err().value(); + } + constexpr const E &&error() const && { + TL_ASSERT(!has_value()); + return std::move(err().value()); + } + TL_EXPECTED_11_CONSTEXPR E &&error() && { + TL_ASSERT(!has_value()); + return std::move(err().value()); + } template constexpr T value_or(U &&v) const & { @@ -4479,9 +4584,10 @@ ada_really_inline constexpr bool is_single_dot_path_segment( ada_really_inline constexpr bool is_lowercase_hex(const char c) noexcept; /** - * @details Convert hex to binary. + * @details Convert hex to binary. Caller is responsible to ensure that + * the parameter is an hexadecimal digit (0-9, A-F, a-f). */ -unsigned constexpr convert_hex_to_binary(char c) noexcept; +ada_really_inline unsigned constexpr convert_hex_to_binary(char c) noexcept; /** * first_percent should be = input.find('%') @@ -4735,6 +4841,10 @@ struct url_aggregator : url_base { /** @return true if the URL has a search component */ [[nodiscard]] inline bool has_search() const noexcept override; + inline void clear_port(); + inline void clear_hash(); + inline void clear_search() override; + private: friend ada::url_aggregator ada::parser::parse_url( std::string_view, const ada::url_aggregator *); @@ -4809,12 +4919,9 @@ struct url_aggregator : url_base { inline void update_base_port(uint32_t input); inline void append_base_pathname(const std::string_view input); inline uint32_t retrieve_base_port() const; - inline void clear_port(); inline void clear_hostname(); - inline void clear_hash(); - inline void clear_pathname() override; - inline void clear_search() override; inline void clear_password(); + inline void clear_pathname() override; inline bool has_dash_dot() const noexcept; void delete_dash_dot(); inline void consume_prepared_path(std::string_view input); @@ -4913,10 +5020,10 @@ inline constexpr bool is_normalized_windows_drive_letter( std::string_view input) noexcept; /** - * @warning Will be removed when Ada supports C++20. + * @warning Will be removed when Ada requires C++20. */ -ada_really_inline constexpr bool begins_with(std::string_view view, - std::string_view prefix); +ada_really_inline bool begins_with(std::string_view view, + std::string_view prefix); /** * Returns true if an input is an ipv4 address. @@ -6343,7 +6450,9 @@ inline void url_aggregator::clear_hostname() { " with " + components.to_string() + "\n" + to_diagram()); #endif ADA_ASSERT_TRUE(has_authority()); - ADA_ASSERT_TRUE(has_empty_hostname()); + ADA_ASSERT_EQUAL(has_empty_hostname(), true, + "hostname should have been cleared on buffer=" + buffer + + " with " + components.to_string() + "\n" + to_diagram()); ADA_ASSERT_TRUE(validate()); } @@ -6448,7 +6557,9 @@ inline bool url_aggregator::has_hostname() const noexcept { inline bool url_aggregator::has_port() const noexcept { ada_log("url_aggregator::has_port"); - return components.pathname_start != components.host_end; + // A URL cannot have a username/password/port if its host is null or the empty + // string, or its scheme is "file". + return has_hostname() && components.pathname_start != components.host_end; } inline bool url_aggregator::has_dash_dot() const noexcept { @@ -6609,6 +6720,7 @@ struct url_search_params { * @see https://url.spec.whatwg.org/#dom-urlsearchparams-has */ inline bool has(std::string_view key) noexcept; + inline bool has(std::string_view key, std::string_view value) noexcept; /** * @see https://url.spec.whatwg.org/#dom-urlsearchparams-set @@ -6733,6 +6845,15 @@ inline bool url_search_params::has(const std::string_view key) noexcept { return entry != params.end(); } +inline bool url_search_params::has(std::string_view key, + std::string_view value) noexcept { + auto entry = + std::find_if(params.begin(), params.end(), [&key, &value](auto ¶m) { + return param.first == key && param.second == value; + }); + return entry != params.end(); +} + inline std::string url_search_params::to_string() { auto character_set = ada::character_sets::WWW_FORM_URLENCODED_PERCENT_ENCODE; std::string out{}; @@ -6807,14 +6928,14 @@ inline void url_search_params::sort() { #ifndef ADA_ADA_VERSION_H #define ADA_ADA_VERSION_H -#define ADA_VERSION "2.6.0" +#define ADA_VERSION "2.6.10" namespace ada { enum { ADA_VERSION_MAJOR = 2, ADA_VERSION_MINOR = 6, - ADA_VERSION_REVISION = 0, + ADA_VERSION_REVISION = 10, }; } // namespace ada diff --git a/deps/ada/ada_c.h b/deps/ada/ada_c.h index 6e22584f612a75..040915518f32a0 100644 --- a/deps/ada/ada_c.h +++ b/deps/ada/ada_c.h @@ -51,6 +51,7 @@ bool ada_can_parse_with_base(const char* input, size_t input_length, void ada_free(ada_url result); void ada_free_owned_string(ada_owned_string owned); +ada_url ada_copy(ada_url input); bool ada_is_valid(ada_url result); @@ -67,6 +68,8 @@ ada_string ada_get_hostname(ada_url result); ada_string ada_get_pathname(ada_url result); ada_string ada_get_search(ada_url result); ada_string ada_get_protocol(ada_url result); +uint8_t ada_get_host_type(ada_url result); +uint8_t ada_get_scheme_type(ada_url result); // url_aggregator setters // if ada_is_valid(result)) is false, the setters have no effect @@ -82,6 +85,11 @@ bool ada_set_pathname(ada_url result, const char* input, size_t length); void ada_set_search(ada_url result, const char* input, size_t length); void ada_set_hash(ada_url result, const char* input, size_t length); +// url_aggregator clear methods +void ada_clear_port(ada_url result); +void ada_clear_hash(ada_url result); +void ada_clear_search(ada_url result); + // url_aggregator functions // if ada_is_valid(result) is false, functions below will return false bool ada_has_credentials(ada_url result); diff --git a/deps/corepack/CHANGELOG.md b/deps/corepack/CHANGELOG.md index 45b5d182594b6e..4c94877b3e6a97 100644 --- a/deps/corepack/CHANGELOG.md +++ b/deps/corepack/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [0.21.0](https://github.com/nodejs/corepack/compare/v0.20.0...v0.21.0) (2023-10-08) + + +### ⚠ BREAKING CHANGES + +* remove support for Node.js 16.x + +### Features + +* update package manager versions ([#297](https://github.com/nodejs/corepack/issues/297)) ([503e135](https://github.com/nodejs/corepack/commit/503e135878935cc881ebd94b48d5eca94ec4c27b)) + + +### Miscellaneous Chores + +* update supported Node.js versions ([#309](https://github.com/nodejs/corepack/issues/309)) ([787e24d](https://github.com/nodejs/corepack/commit/787e24df609513702eafcd8c6a5f03544d7d45cc)) + ## [0.20.0](https://github.com/nodejs/corepack/compare/v0.19.0...v0.20.0) (2023-08-29) diff --git a/deps/corepack/dist/lib/corepack.cjs b/deps/corepack/dist/lib/corepack.cjs index 69e50a97cccec4..b3c0aae570d24b 100644 --- a/deps/corepack/dist/lib/corepack.cjs +++ b/deps/corepack/dist/lib/corepack.cjs @@ -5,6 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __esm = (fn2, res) => function __init() { return fn2 && (res = (0, fn2[__getOwnPropNames(fn2)[0]])(fn2 = 0)), res; }; @@ -32,8 +33,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __publicField = (obj, key, value) => { + __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + return value; +}; -// .yarn/cache/typanion-npm-3.12.1-788497c54f-492540c6ac.zip/node_modules/typanion/lib/index.mjs +// .yarn/cache/typanion-npm-3.12.1-788497c54f-90cf558a34.zip/node_modules/typanion/lib/index.mjs var lib_exports = {}; __export(lib_exports, { KeyRelationship: () => KeyRelationship, @@ -919,7 +924,7 @@ function hasKeyRelationship(subject, relationship, others, { ignore = [] } = {}) } var simpleKeyRegExp, colorStringRegExp, colorStringAlphaRegExp, base64RegExp, uuid4RegExp, iso8601RegExp, BOOLEAN_COERCIONS, isInstanceOf, isOneOf, TypeAssertionError, checks, KeyRelationship, keyRelationships; var init_lib = __esm({ - ".yarn/cache/typanion-npm-3.12.1-788497c54f-492540c6ac.zip/node_modules/typanion/lib/index.mjs"() { + ".yarn/cache/typanion-npm-3.12.1-788497c54f-90cf558a34.zip/node_modules/typanion/lib/index.mjs"() { simpleKeyRegExp = /^[a-zA-Z_][a-zA-Z0-9_]*$/; colorStringRegExp = /^#[0-9a-f]{6}$/i; colorStringAlphaRegExp = /^#[0-9a-f]{6}([0-9a-f]{2})?$/i; @@ -1010,9 +1015,9 @@ var init_lib = __esm({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/internal/constants.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/internal/constants.js var require_constants = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/internal/constants.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/internal/constants.js"(exports, module2) { var SEMVER_SPEC_VERSION = "2.0.0"; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ @@ -1041,18 +1046,18 @@ var require_constants = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/internal/debug.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/internal/debug.js var require_debug = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/internal/debug.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/internal/debug.js"(exports, module2) { var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { }; module2.exports = debug2; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/internal/re.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/internal/re.js var require_re = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/internal/re.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/internal/re.js"(exports, module2) { var { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH } = require_constants(); var debug2 = require_debug(); exports = module2.exports = {}; @@ -1128,9 +1133,9 @@ var require_re = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/internal/parse-options.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/internal/parse-options.js var require_parse_options = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/internal/parse-options.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/internal/parse-options.js"(exports, module2) { var looseOption = Object.freeze({ loose: true }); var emptyOpts = Object.freeze({}); var parseOptions = (options) => { @@ -1146,9 +1151,9 @@ var require_parse_options = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/internal/identifiers.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/internal/identifiers.js var require_identifiers = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/internal/identifiers.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/internal/identifiers.js"(exports, module2) { var numeric = /^[0-9]+$/; var compareIdentifiers = (a, b) => { const anum = numeric.test(a); @@ -1167,9 +1172,9 @@ var require_identifiers = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/classes/semver.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/classes/semver.js var require_semver = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/classes/semver.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/classes/semver.js"(exports, module2) { var debug2 = require_debug(); var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); var { safeRe: re, t } = require_re(); @@ -1409,9 +1414,9 @@ var require_semver = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/parse.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/parse.js var require_parse = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/parse.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/parse.js"(exports, module2) { var SemVer = require_semver(); var parse = (version2, options, throwErrors = false) => { if (version2 instanceof SemVer) { @@ -1430,9 +1435,9 @@ var require_parse = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/valid.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/valid.js var require_valid = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/valid.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/valid.js"(exports, module2) { var parse = require_parse(); var valid = (version2, options) => { const v = parse(version2, options); @@ -1442,9 +1447,9 @@ var require_valid = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/clean.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/clean.js var require_clean = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/clean.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/clean.js"(exports, module2) { var parse = require_parse(); var clean = (version2, options) => { const s = parse(version2.trim().replace(/^[=v]+/, ""), options); @@ -1454,9 +1459,9 @@ var require_clean = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/inc.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/inc.js var require_inc = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/inc.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/inc.js"(exports, module2) { var SemVer = require_semver(); var inc = (version2, release, options, identifier, identifierBase) => { if (typeof options === "string") { @@ -1477,9 +1482,9 @@ var require_inc = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/diff.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/diff.js var require_diff = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/diff.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/diff.js"(exports, module2) { var parse = require_parse(); var diff = (version1, version2) => { const v1 = parse(version1, null, true); @@ -1521,36 +1526,36 @@ var require_diff = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/major.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/major.js var require_major = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/major.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/major.js"(exports, module2) { var SemVer = require_semver(); var major = (a, loose) => new SemVer(a, loose).major; module2.exports = major; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/minor.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/minor.js var require_minor = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/minor.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/minor.js"(exports, module2) { var SemVer = require_semver(); var minor = (a, loose) => new SemVer(a, loose).minor; module2.exports = minor; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/patch.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/patch.js var require_patch = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/patch.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/patch.js"(exports, module2) { var SemVer = require_semver(); var patch = (a, loose) => new SemVer(a, loose).patch; module2.exports = patch; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/prerelease.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/prerelease.js var require_prerelease = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/prerelease.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/prerelease.js"(exports, module2) { var parse = require_parse(); var prerelease = (version2, options) => { const parsed = parse(version2, options); @@ -1560,36 +1565,36 @@ var require_prerelease = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/compare.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/compare.js var require_compare = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/compare.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/compare.js"(exports, module2) { var SemVer = require_semver(); var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); module2.exports = compare; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/rcompare.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/rcompare.js var require_rcompare = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/rcompare.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/rcompare.js"(exports, module2) { var compare = require_compare(); var rcompare = (a, b, loose) => compare(b, a, loose); module2.exports = rcompare; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/compare-loose.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/compare-loose.js var require_compare_loose = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/compare-loose.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/compare-loose.js"(exports, module2) { var compare = require_compare(); var compareLoose = (a, b) => compare(a, b, true); module2.exports = compareLoose; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/compare-build.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/compare-build.js var require_compare_build = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/compare-build.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/compare-build.js"(exports, module2) { var SemVer = require_semver(); var compareBuild = (a, b, loose) => { const versionA = new SemVer(a, loose); @@ -1600,81 +1605,81 @@ var require_compare_build = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/sort.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/sort.js var require_sort = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/sort.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/sort.js"(exports, module2) { var compareBuild = require_compare_build(); var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); module2.exports = sort; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/rsort.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/rsort.js var require_rsort = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/rsort.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/rsort.js"(exports, module2) { var compareBuild = require_compare_build(); var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); module2.exports = rsort; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/gt.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/gt.js var require_gt = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/gt.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/gt.js"(exports, module2) { var compare = require_compare(); var gt = (a, b, loose) => compare(a, b, loose) > 0; module2.exports = gt; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/lt.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/lt.js var require_lt = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/lt.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/lt.js"(exports, module2) { var compare = require_compare(); var lt = (a, b, loose) => compare(a, b, loose) < 0; module2.exports = lt; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/eq.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/eq.js var require_eq = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/eq.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/eq.js"(exports, module2) { var compare = require_compare(); var eq = (a, b, loose) => compare(a, b, loose) === 0; module2.exports = eq; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/neq.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/neq.js var require_neq = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/neq.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/neq.js"(exports, module2) { var compare = require_compare(); var neq = (a, b, loose) => compare(a, b, loose) !== 0; module2.exports = neq; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/gte.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/gte.js var require_gte = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/gte.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/gte.js"(exports, module2) { var compare = require_compare(); var gte = (a, b, loose) => compare(a, b, loose) >= 0; module2.exports = gte; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/lte.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/lte.js var require_lte = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/lte.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/lte.js"(exports, module2) { var compare = require_compare(); var lte = (a, b, loose) => compare(a, b, loose) <= 0; module2.exports = lte; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/cmp.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/cmp.js var require_cmp = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/cmp.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/cmp.js"(exports, module2) { var eq = require_eq(); var neq = require_neq(); var gt = require_gt(); @@ -1721,9 +1726,9 @@ var require_cmp = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/coerce.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/coerce.js var require_coerce = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/coerce.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/coerce.js"(exports, module2) { var SemVer = require_semver(); var parse = require_parse(); var { safeRe: re, t } = require_re(); @@ -1760,9 +1765,9 @@ var require_coerce = __commonJS({ } }); -// .yarn/cache/yallist-npm-4.0.0-b493d9e907-cd7fe32508.zip/node_modules/yallist/iterator.js +// .yarn/cache/yallist-npm-4.0.0-b493d9e907-2286b5e8db.zip/node_modules/yallist/iterator.js var require_iterator = __commonJS({ - ".yarn/cache/yallist-npm-4.0.0-b493d9e907-cd7fe32508.zip/node_modules/yallist/iterator.js"(exports, module2) { + ".yarn/cache/yallist-npm-4.0.0-b493d9e907-2286b5e8db.zip/node_modules/yallist/iterator.js"(exports, module2) { "use strict"; module2.exports = function(Yallist) { Yallist.prototype[Symbol.iterator] = function* () { @@ -1774,9 +1779,9 @@ var require_iterator = __commonJS({ } }); -// .yarn/cache/yallist-npm-4.0.0-b493d9e907-cd7fe32508.zip/node_modules/yallist/yallist.js +// .yarn/cache/yallist-npm-4.0.0-b493d9e907-2286b5e8db.zip/node_modules/yallist/yallist.js var require_yallist = __commonJS({ - ".yarn/cache/yallist-npm-4.0.0-b493d9e907-cd7fe32508.zip/node_modules/yallist/yallist.js"(exports, module2) { + ".yarn/cache/yallist-npm-4.0.0-b493d9e907-2286b5e8db.zip/node_modules/yallist/yallist.js"(exports, module2) { "use strict"; module2.exports = Yallist; Yallist.Node = Node; @@ -2143,9 +2148,9 @@ var require_yallist = __commonJS({ } }); -// .yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-b2d72088dd.zip/node_modules/lru-cache/index.js +// .yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-cb53e58278.zip/node_modules/lru-cache/index.js var require_lru_cache = __commonJS({ - ".yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-b2d72088dd.zip/node_modules/lru-cache/index.js"(exports, module2) { + ".yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-cb53e58278.zip/node_modules/lru-cache/index.js"(exports, module2) { "use strict"; var Yallist = require_yallist(); var MAX = Symbol("max"); @@ -2413,9 +2418,9 @@ var require_lru_cache = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/classes/range.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/classes/range.js var require_range = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/classes/range.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/classes/range.js"(exports, module2) { var Range = class { constructor(range, options) { options = parseOptions(options); @@ -2770,9 +2775,9 @@ var require_range = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/classes/comparator.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/classes/comparator.js var require_comparator = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/classes/comparator.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/classes/comparator.js"(exports, module2) { var ANY = Symbol("SemVer ANY"); var Comparator = class { static get ANY() { @@ -2882,9 +2887,9 @@ var require_comparator = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/satisfies.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/satisfies.js var require_satisfies = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/functions/satisfies.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/functions/satisfies.js"(exports, module2) { var Range = require_range(); var satisfies = (version2, range, options) => { try { @@ -2898,18 +2903,18 @@ var require_satisfies = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/to-comparators.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/to-comparators.js var require_to_comparators = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/to-comparators.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/to-comparators.js"(exports, module2) { var Range = require_range(); var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); module2.exports = toComparators; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/max-satisfying.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/max-satisfying.js var require_max_satisfying = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/max-satisfying.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/max-satisfying.js"(exports, module2) { var SemVer = require_semver(); var Range = require_range(); var maxSatisfying = (versions, range, options) => { @@ -2935,9 +2940,9 @@ var require_max_satisfying = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/min-satisfying.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/min-satisfying.js var require_min_satisfying = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/min-satisfying.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/min-satisfying.js"(exports, module2) { var SemVer = require_semver(); var Range = require_range(); var minSatisfying = (versions, range, options) => { @@ -2963,9 +2968,9 @@ var require_min_satisfying = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/min-version.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/min-version.js var require_min_version = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/min-version.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/min-version.js"(exports, module2) { var SemVer = require_semver(); var Range = require_range(); var gt = require_gt(); @@ -3019,9 +3024,9 @@ var require_min_version = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/valid.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/valid.js var require_valid2 = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/valid.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/valid.js"(exports, module2) { var Range = require_range(); var validRange = (range, options) => { try { @@ -3034,9 +3039,9 @@ var require_valid2 = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/outside.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/outside.js var require_outside = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/outside.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/outside.js"(exports, module2) { var SemVer = require_semver(); var Comparator = require_comparator(); var { ANY } = Comparator; @@ -3102,27 +3107,27 @@ var require_outside = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/gtr.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/gtr.js var require_gtr = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/gtr.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/gtr.js"(exports, module2) { var outside = require_outside(); var gtr = (version2, range, options) => outside(version2, range, ">", options); module2.exports = gtr; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/ltr.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/ltr.js var require_ltr = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/ltr.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/ltr.js"(exports, module2) { var outside = require_outside(); var ltr = (version2, range, options) => outside(version2, range, "<", options); module2.exports = ltr; } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/intersects.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/intersects.js var require_intersects = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/intersects.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/intersects.js"(exports, module2) { var Range = require_range(); var intersects = (r1, r2, options) => { r1 = new Range(r1, options); @@ -3133,9 +3138,9 @@ var require_intersects = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/simplify.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/simplify.js var require_simplify = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/simplify.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/simplify.js"(exports, module2) { var satisfies = require_satisfies(); var compare = require_compare(); module2.exports = (versions, range, options) => { @@ -3182,9 +3187,9 @@ var require_simplify = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/subset.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/subset.js var require_subset = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/ranges/subset.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/ranges/subset.js"(exports, module2) { var Range = require_range(); var Comparator = require_comparator(); var { ANY } = Comparator; @@ -3344,9 +3349,9 @@ var require_subset = __commonJS({ } }); -// .yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/index.js +// .yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/index.js var require_semver2 = __commonJS({ - ".yarn/cache/semver-npm-7.5.3-275095dbf3-9e949f7d57.zip/node_modules/semver/index.js"(exports, module2) { + ".yarn/cache/semver-npm-7.5.3-275095dbf3-4cf3bab7e8.zip/node_modules/semver/index.js"(exports, module2) { var internalRe = require_re(); var constants = require_constants(); var SemVer = require_semver(); @@ -3438,9 +3443,9 @@ var require_semver2 = __commonJS({ } }); -// .yarn/cache/ms-npm-2.1.2-ec0c1512ff-3f46af60a0.zip/node_modules/ms/index.js +// .yarn/cache/ms-npm-2.1.2-ec0c1512ff-a437714e2f.zip/node_modules/ms/index.js var require_ms = __commonJS({ - ".yarn/cache/ms-npm-2.1.2-ec0c1512ff-3f46af60a0.zip/node_modules/ms/index.js"(exports, module2) { + ".yarn/cache/ms-npm-2.1.2-ec0c1512ff-a437714e2f.zip/node_modules/ms/index.js"(exports, module2) { var s = 1e3; var m = s * 60; var h = m * 60; @@ -3554,9 +3559,9 @@ var require_ms = __commonJS({ } }); -// .yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/common.js +// .yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/common.js var require_common = __commonJS({ - ".yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/common.js"(exports, module2) { + ".yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/common.js"(exports, module2) { function setup(env2) { createDebug.debug = createDebug; createDebug.default = createDebug; @@ -3717,9 +3722,9 @@ var require_common = __commonJS({ } }); -// .yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/browser.js +// .yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/browser.js var require_browser = __commonJS({ - ".yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/browser.js"(exports, module2) { + ".yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/browser.js"(exports, module2) { exports.formatArgs = formatArgs; exports.save = save; exports.load = load; @@ -3886,7 +3891,7 @@ var require_browser = __commonJS({ } }); -// .yarn/cache/supports-color-npm-9.3.1-08866b3304-4c447d3aff.zip/node_modules/supports-color/index.js +// .yarn/cache/supports-color-npm-9.3.1-08866b3304-cf142b72de.zip/node_modules/supports-color/index.js var supports_color_exports = {}; __export(supports_color_exports, { createSupportsColor: () => createSupportsColor, @@ -4003,7 +4008,7 @@ function createSupportsColor(stream, options = {}) { } var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default; var init_supports_color = __esm({ - ".yarn/cache/supports-color-npm-9.3.1-08866b3304-4c447d3aff.zip/node_modules/supports-color/index.js"() { + ".yarn/cache/supports-color-npm-9.3.1-08866b3304-cf142b72de.zip/node_modules/supports-color/index.js"() { import_node_process = __toESM(require("node:process"), 1); import_node_os = __toESM(require("node:os"), 1); import_node_tty = __toESM(require("node:tty"), 1); @@ -4021,9 +4026,9 @@ var init_supports_color = __esm({ } }); -// .yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/node.js +// .yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/node.js var require_node = __commonJS({ - ".yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/node.js"(exports, module2) { + ".yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/node.js"(exports, module2) { var tty3 = require("tty"); var util = require("util"); exports.init = init; @@ -4195,9 +4200,9 @@ var require_node = __commonJS({ } }); -// .yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/index.js +// .yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/index.js var require_src = __commonJS({ - ".yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/index.js"(exports, module2) { + ".yarn/__virtual__/debug-virtual-80c19f725b/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/index.js"(exports, module2) { if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { module2.exports = require_browser(); } else { @@ -4206,9 +4211,9 @@ var require_src = __commonJS({ } }); -// .yarn/cache/lru-cache-npm-7.18.3-e68be5b11c-884c7cb519.zip/node_modules/lru-cache/index.js +// .yarn/cache/lru-cache-npm-7.18.3-e68be5b11c-b3a452b491.zip/node_modules/lru-cache/index.js var require_lru_cache2 = __commonJS({ - ".yarn/cache/lru-cache-npm-7.18.3-e68be5b11c-884c7cb519.zip/node_modules/lru-cache/index.js"(exports, module2) { + ".yarn/cache/lru-cache-npm-7.18.3-e68be5b11c-b3a452b491.zip/node_modules/lru-cache/index.js"(exports, module2) { var perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date; var hasAbortController = typeof AbortController === "function"; var AC = hasAbortController ? AbortController : class AbortController { @@ -5223,9 +5228,9 @@ var require_lru_cache2 = __commonJS({ } }); -// .yarn/cache/agent-base-npm-7.1.0-4b12ba5111-d1c9dc1b33.zip/node_modules/agent-base/dist/helpers.js +// .yarn/cache/agent-base-npm-7.1.0-4b12ba5111-fc974ab57f.zip/node_modules/agent-base/dist/helpers.js var require_helpers = __commonJS({ - ".yarn/cache/agent-base-npm-7.1.0-4b12ba5111-d1c9dc1b33.zip/node_modules/agent-base/dist/helpers.js"(exports) { + ".yarn/cache/agent-base-npm-7.1.0-4b12ba5111-fc974ab57f.zip/node_modules/agent-base/dist/helpers.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) @@ -5298,9 +5303,9 @@ var require_helpers = __commonJS({ } }); -// .yarn/cache/agent-base-npm-7.1.0-4b12ba5111-d1c9dc1b33.zip/node_modules/agent-base/dist/index.js +// .yarn/cache/agent-base-npm-7.1.0-4b12ba5111-fc974ab57f.zip/node_modules/agent-base/dist/index.js var require_dist = __commonJS({ - ".yarn/cache/agent-base-npm-7.1.0-4b12ba5111-d1c9dc1b33.zip/node_modules/agent-base/dist/index.js"(exports) { + ".yarn/cache/agent-base-npm-7.1.0-4b12ba5111-fc974ab57f.zip/node_modules/agent-base/dist/index.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) @@ -5408,9 +5413,9 @@ var require_dist = __commonJS({ } }); -// .yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/common.js +// .yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/common.js var require_common2 = __commonJS({ - ".yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/common.js"(exports, module2) { + ".yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/common.js"(exports, module2) { function setup(env2) { createDebug.debug = createDebug; createDebug.default = createDebug; @@ -5571,9 +5576,9 @@ var require_common2 = __commonJS({ } }); -// .yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/browser.js +// .yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/browser.js var require_browser2 = __commonJS({ - ".yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/browser.js"(exports, module2) { + ".yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/browser.js"(exports, module2) { exports.formatArgs = formatArgs; exports.save = save; exports.load = load; @@ -5740,9 +5745,9 @@ var require_browser2 = __commonJS({ } }); -// .yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/node.js +// .yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/node.js var require_node2 = __commonJS({ - ".yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/node.js"(exports, module2) { + ".yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/node.js"(exports, module2) { var tty3 = require("tty"); var util = require("util"); exports.init = init; @@ -5914,9 +5919,9 @@ var require_node2 = __commonJS({ } }); -// .yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/index.js +// .yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/index.js var require_src2 = __commonJS({ - ".yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-ab50d98b6f.zip/node_modules/debug/src/index.js"(exports, module2) { + ".yarn/__virtual__/debug-virtual-2eaddcf3b9/0/cache/debug-npm-4.3.4-4513954577-cedbec4529.zip/node_modules/debug/src/index.js"(exports, module2) { if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { module2.exports = require_browser2(); } else { @@ -5925,9 +5930,9 @@ var require_src2 = __commonJS({ } }); -// .yarn/cache/proxy-from-env-npm-1.1.0-c13d07f26b-0bba2ef7c8.zip/node_modules/proxy-from-env/index.js +// .yarn/cache/proxy-from-env-npm-1.1.0-c13d07f26b-fe7dd8b1bd.zip/node_modules/proxy-from-env/index.js var require_proxy_from_env = __commonJS({ - ".yarn/cache/proxy-from-env-npm-1.1.0-c13d07f26b-0bba2ef7c8.zip/node_modules/proxy-from-env/index.js"(exports) { + ".yarn/cache/proxy-from-env-npm-1.1.0-c13d07f26b-fe7dd8b1bd.zip/node_modules/proxy-from-env/index.js"(exports) { "use strict"; var parseUrl = require("url").parse; var DEFAULT_PORTS = { @@ -5995,9 +6000,9 @@ var require_proxy_from_env = __commonJS({ } }); -// .yarn/cache/http-proxy-agent-npm-7.0.0-106a57cc8c-a028878555.zip/node_modules/http-proxy-agent/dist/index.js +// .yarn/cache/http-proxy-agent-npm-7.0.0-106a57cc8c-a11574ff39.zip/node_modules/http-proxy-agent/dist/index.js var require_dist2 = __commonJS({ - ".yarn/cache/http-proxy-agent-npm-7.0.0-106a57cc8c-a028878555.zip/node_modules/http-proxy-agent/dist/index.js"(exports) { + ".yarn/cache/http-proxy-agent-npm-7.0.0-106a57cc8c-a11574ff39.zip/node_modules/http-proxy-agent/dist/index.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) @@ -6129,9 +6134,9 @@ var require_dist2 = __commonJS({ } }); -// .yarn/cache/https-proxy-agent-npm-7.0.1-a2d5d93ee0-4fc3e7f50c.zip/node_modules/https-proxy-agent/dist/parse-proxy-response.js +// .yarn/cache/https-proxy-agent-npm-7.0.1-a2d5d93ee0-f08f646809.zip/node_modules/https-proxy-agent/dist/parse-proxy-response.js var require_parse_proxy_response = __commonJS({ - ".yarn/cache/https-proxy-agent-npm-7.0.1-a2d5d93ee0-4fc3e7f50c.zip/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) { + ".yarn/cache/https-proxy-agent-npm-7.0.1-a2d5d93ee0-f08f646809.zip/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) { "use strict"; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -6225,9 +6230,9 @@ var require_parse_proxy_response = __commonJS({ } }); -// .yarn/cache/https-proxy-agent-npm-7.0.1-a2d5d93ee0-4fc3e7f50c.zip/node_modules/https-proxy-agent/dist/index.js +// .yarn/cache/https-proxy-agent-npm-7.0.1-a2d5d93ee0-f08f646809.zip/node_modules/https-proxy-agent/dist/index.js var require_dist3 = __commonJS({ - ".yarn/cache/https-proxy-agent-npm-7.0.1-a2d5d93ee0-4fc3e7f50c.zip/node_modules/https-proxy-agent/dist/index.js"(exports) { + ".yarn/cache/https-proxy-agent-npm-7.0.1-a2d5d93ee0-f08f646809.zip/node_modules/https-proxy-agent/dist/index.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) @@ -6372,9 +6377,9 @@ var require_dist3 = __commonJS({ } }); -// .yarn/cache/ip-npm-2.0.0-204facb3cc-42a7cf251b.zip/node_modules/ip/lib/ip.js +// .yarn/cache/ip-npm-2.0.0-204facb3cc-8d186cc558.zip/node_modules/ip/lib/ip.js var require_ip = __commonJS({ - ".yarn/cache/ip-npm-2.0.0-204facb3cc-42a7cf251b.zip/node_modules/ip/lib/ip.js"(exports) { + ".yarn/cache/ip-npm-2.0.0-204facb3cc-8d186cc558.zip/node_modules/ip/lib/ip.js"(exports) { var ip = exports; var { Buffer: Buffer2 } = require("buffer"); var os3 = require("os"); @@ -6675,9 +6680,9 @@ var require_ip = __commonJS({ } }); -// .yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-898a5ce465.zip/node_modules/smart-buffer/build/utils.js +// .yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-a16775323e.zip/node_modules/smart-buffer/build/utils.js var require_utils = __commonJS({ - ".yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-898a5ce465.zip/node_modules/smart-buffer/build/utils.js"(exports) { + ".yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-a16775323e.zip/node_modules/smart-buffer/build/utils.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var buffer_1 = require("buffer"); @@ -6744,9 +6749,9 @@ var require_utils = __commonJS({ } }); -// .yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-898a5ce465.zip/node_modules/smart-buffer/build/smartbuffer.js +// .yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-a16775323e.zip/node_modules/smart-buffer/build/smartbuffer.js var require_smartbuffer = __commonJS({ - ".yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-898a5ce465.zip/node_modules/smart-buffer/build/smartbuffer.js"(exports) { + ".yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-a16775323e.zip/node_modules/smart-buffer/build/smartbuffer.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var utils_1 = require_utils(); @@ -7902,9 +7907,9 @@ var require_smartbuffer = __commonJS({ } }); -// .yarn/cache/socks-npm-2.7.1-17f2b53052-a8026d6abf.zip/node_modules/socks/build/common/constants.js +// .yarn/cache/socks-npm-2.7.1-17f2b53052-43f69dbc9f.zip/node_modules/socks/build/common/constants.js var require_constants2 = __commonJS({ - ".yarn/cache/socks-npm-2.7.1-17f2b53052-a8026d6abf.zip/node_modules/socks/build/common/constants.js"(exports) { + ".yarn/cache/socks-npm-2.7.1-17f2b53052-43f69dbc9f.zip/node_modules/socks/build/common/constants.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SOCKS5_NO_ACCEPTABLE_AUTH = exports.SOCKS5_CUSTOM_AUTH_END = exports.SOCKS5_CUSTOM_AUTH_START = exports.SOCKS_INCOMING_PACKET_SIZES = exports.SocksClientState = exports.Socks5Response = exports.Socks5HostType = exports.Socks5Auth = exports.Socks4Response = exports.SocksCommand = exports.ERRORS = exports.DEFAULT_TIMEOUT = void 0; @@ -8021,9 +8026,9 @@ var require_constants2 = __commonJS({ } }); -// .yarn/cache/socks-npm-2.7.1-17f2b53052-a8026d6abf.zip/node_modules/socks/build/common/util.js +// .yarn/cache/socks-npm-2.7.1-17f2b53052-43f69dbc9f.zip/node_modules/socks/build/common/util.js var require_util = __commonJS({ - ".yarn/cache/socks-npm-2.7.1-17f2b53052-a8026d6abf.zip/node_modules/socks/build/common/util.js"(exports) { + ".yarn/cache/socks-npm-2.7.1-17f2b53052-43f69dbc9f.zip/node_modules/socks/build/common/util.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.shuffleArray = exports.SocksClientError = void 0; @@ -8044,9 +8049,9 @@ var require_util = __commonJS({ } }); -// .yarn/cache/socks-npm-2.7.1-17f2b53052-a8026d6abf.zip/node_modules/socks/build/common/helpers.js +// .yarn/cache/socks-npm-2.7.1-17f2b53052-43f69dbc9f.zip/node_modules/socks/build/common/helpers.js var require_helpers2 = __commonJS({ - ".yarn/cache/socks-npm-2.7.1-17f2b53052-a8026d6abf.zip/node_modules/socks/build/common/helpers.js"(exports) { + ".yarn/cache/socks-npm-2.7.1-17f2b53052-43f69dbc9f.zip/node_modules/socks/build/common/helpers.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateSocksClientChainOptions = exports.validateSocksClientOptions = void 0; @@ -8124,9 +8129,9 @@ var require_helpers2 = __commonJS({ } }); -// .yarn/cache/socks-npm-2.7.1-17f2b53052-a8026d6abf.zip/node_modules/socks/build/common/receivebuffer.js +// .yarn/cache/socks-npm-2.7.1-17f2b53052-43f69dbc9f.zip/node_modules/socks/build/common/receivebuffer.js var require_receivebuffer = __commonJS({ - ".yarn/cache/socks-npm-2.7.1-17f2b53052-a8026d6abf.zip/node_modules/socks/build/common/receivebuffer.js"(exports) { + ".yarn/cache/socks-npm-2.7.1-17f2b53052-43f69dbc9f.zip/node_modules/socks/build/common/receivebuffer.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ReceiveBuffer = void 0; @@ -8172,9 +8177,9 @@ var require_receivebuffer = __commonJS({ } }); -// .yarn/cache/socks-npm-2.7.1-17f2b53052-a8026d6abf.zip/node_modules/socks/build/client/socksclient.js +// .yarn/cache/socks-npm-2.7.1-17f2b53052-43f69dbc9f.zip/node_modules/socks/build/client/socksclient.js var require_socksclient = __commonJS({ - ".yarn/cache/socks-npm-2.7.1-17f2b53052-a8026d6abf.zip/node_modules/socks/build/client/socksclient.js"(exports) { + ".yarn/cache/socks-npm-2.7.1-17f2b53052-43f69dbc9f.zip/node_modules/socks/build/client/socksclient.js"(exports) { "use strict"; var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { @@ -8851,9 +8856,9 @@ var require_socksclient = __commonJS({ } }); -// .yarn/cache/socks-npm-2.7.1-17f2b53052-a8026d6abf.zip/node_modules/socks/build/index.js +// .yarn/cache/socks-npm-2.7.1-17f2b53052-43f69dbc9f.zip/node_modules/socks/build/index.js var require_build = __commonJS({ - ".yarn/cache/socks-npm-2.7.1-17f2b53052-a8026d6abf.zip/node_modules/socks/build/index.js"(exports) { + ".yarn/cache/socks-npm-2.7.1-17f2b53052-43f69dbc9f.zip/node_modules/socks/build/index.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) @@ -8880,9 +8885,9 @@ var require_build = __commonJS({ } }); -// .yarn/cache/socks-proxy-agent-npm-8.0.1-646f00d0a1-6df7fae19f.zip/node_modules/socks-proxy-agent/dist/index.js +// .yarn/cache/socks-proxy-agent-npm-8.0.1-646f00d0a1-3971e6af57.zip/node_modules/socks-proxy-agent/dist/index.js var require_dist4 = __commonJS({ - ".yarn/cache/socks-proxy-agent-npm-8.0.1-646f00d0a1-6df7fae19f.zip/node_modules/socks-proxy-agent/dist/index.js"(exports) { + ".yarn/cache/socks-proxy-agent-npm-8.0.1-646f00d0a1-3971e6af57.zip/node_modules/socks-proxy-agent/dist/index.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) @@ -9064,9 +9069,9 @@ var require_dist4 = __commonJS({ } }); -// .yarn/cache/data-uri-to-buffer-npm-5.0.1-a40e5ac026-ffb32d1944.zip/node_modules/data-uri-to-buffer/dist/index.js +// .yarn/cache/data-uri-to-buffer-npm-5.0.1-a40e5ac026-08ad2f2cd5.zip/node_modules/data-uri-to-buffer/dist/index.js var require_dist5 = __commonJS({ - ".yarn/cache/data-uri-to-buffer-npm-5.0.1-a40e5ac026-ffb32d1944.zip/node_modules/data-uri-to-buffer/dist/index.js"(exports) { + ".yarn/cache/data-uri-to-buffer-npm-5.0.1-a40e5ac026-08ad2f2cd5.zip/node_modules/data-uri-to-buffer/dist/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.dataUriToBuffer = void 0; @@ -9111,9 +9116,9 @@ var require_dist5 = __commonJS({ } }); -// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/notmodified.js +// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/notmodified.js var require_notmodified = __commonJS({ - ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/notmodified.js"(exports) { + ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/notmodified.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var NotModifiedError = class extends Error { @@ -9126,9 +9131,9 @@ var require_notmodified = __commonJS({ } }); -// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/data.js +// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/data.js var require_data = __commonJS({ - ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/data.js"(exports) { + ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/data.js"(exports) { "use strict"; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -9167,9 +9172,9 @@ var require_data = __commonJS({ } }); -// .yarn/cache/universalify-npm-0.1.2-9b22d31d2d-056559913f.zip/node_modules/universalify/index.js +// .yarn/cache/universalify-npm-0.1.2-9b22d31d2d-e70e0339f6.zip/node_modules/universalify/index.js var require_universalify = __commonJS({ - ".yarn/cache/universalify-npm-0.1.2-9b22d31d2d-056559913f.zip/node_modules/universalify/index.js"(exports) { + ".yarn/cache/universalify-npm-0.1.2-9b22d31d2d-e70e0339f6.zip/node_modules/universalify/index.js"(exports) { "use strict"; exports.fromCallback = function(fn2) { return Object.defineProperty(function() { @@ -9200,9 +9205,9 @@ var require_universalify = __commonJS({ } }); -// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-0228fc1080.zip/node_modules/graceful-fs/polyfills.js +// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/polyfills.js var require_polyfills = __commonJS({ - ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-0228fc1080.zip/node_modules/graceful-fs/polyfills.js"(exports, module2) { + ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/polyfills.js"(exports, module2) { var constants = require("constants"); var origCwd = process.cwd; var cwd = null; @@ -9516,9 +9521,9 @@ var require_polyfills = __commonJS({ } }); -// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-0228fc1080.zip/node_modules/graceful-fs/legacy-streams.js +// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/legacy-streams.js var require_legacy_streams = __commonJS({ - ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-0228fc1080.zip/node_modules/graceful-fs/legacy-streams.js"(exports, module2) { + ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/legacy-streams.js"(exports, module2) { var Stream = require("stream").Stream; module2.exports = legacy; function legacy(fs8) { @@ -9615,9 +9620,9 @@ var require_legacy_streams = __commonJS({ } }); -// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-0228fc1080.zip/node_modules/graceful-fs/clone.js +// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/clone.js var require_clone = __commonJS({ - ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-0228fc1080.zip/node_modules/graceful-fs/clone.js"(exports, module2) { + ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/clone.js"(exports, module2) { "use strict"; module2.exports = clone; var getPrototypeOf = Object.getPrototypeOf || function(obj) { @@ -9638,9 +9643,9 @@ var require_clone = __commonJS({ } }); -// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-0228fc1080.zip/node_modules/graceful-fs/graceful-fs.js +// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/graceful-fs.js var require_graceful_fs = __commonJS({ - ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-0228fc1080.zip/node_modules/graceful-fs/graceful-fs.js"(exports, module2) { + ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/graceful-fs.js"(exports, module2) { var fs8 = require("fs"); var polyfills = require_polyfills(); var legacy = require_legacy_streams(); @@ -10008,9 +10013,9 @@ var require_graceful_fs = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/fs/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/fs/index.js var require_fs = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/fs/index.js"(exports) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/fs/index.js"(exports) { "use strict"; var u = require_universalify().fromCallback; var fs8 = require_graceful_fs(); @@ -10097,9 +10102,9 @@ var require_fs = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/mkdirs/win32.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/mkdirs/win32.js var require_win32 = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/mkdirs/win32.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/mkdirs/win32.js"(exports, module2) { "use strict"; var path10 = require("path"); function getRootPath(p) { @@ -10121,9 +10126,9 @@ var require_win32 = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/mkdirs/mkdirs.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/mkdirs/mkdirs.js var require_mkdirs = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/mkdirs/mkdirs.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/mkdirs/mkdirs.js"(exports, module2) { "use strict"; var fs8 = require_graceful_fs(); var path10 = require("path"); @@ -10182,9 +10187,9 @@ var require_mkdirs = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js var require_mkdirs_sync = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js"(exports, module2) { "use strict"; var fs8 = require_graceful_fs(); var path10 = require("path"); @@ -10233,9 +10238,9 @@ var require_mkdirs_sync = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/mkdirs/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/mkdirs/index.js var require_mkdirs2 = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) { "use strict"; var u = require_universalify().fromCallback; var mkdirs = u(require_mkdirs()); @@ -10252,9 +10257,9 @@ var require_mkdirs2 = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/util/utimes.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/util/utimes.js var require_utimes = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) { "use strict"; var fs8 = require_graceful_fs(); var os3 = require("os"); @@ -10331,9 +10336,9 @@ var require_utimes = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/util/stat.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/util/stat.js var require_stat = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/util/stat.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/util/stat.js"(exports, module2) { "use strict"; var fs8 = require_graceful_fs(); var path10 = require("path"); @@ -10502,9 +10507,9 @@ var require_stat = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/util/buffer.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/util/buffer.js var require_buffer = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/util/buffer.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/util/buffer.js"(exports, module2) { "use strict"; module2.exports = function(size) { if (typeof Buffer.allocUnsafe === "function") { @@ -10519,9 +10524,9 @@ var require_buffer = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/copy-sync/copy-sync.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/copy-sync/copy-sync.js var require_copy_sync = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/copy-sync/copy-sync.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/copy-sync/copy-sync.js"(exports, module2) { "use strict"; var fs8 = require_graceful_fs(); var path10 = require("path"); @@ -10665,9 +10670,9 @@ var require_copy_sync = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/copy-sync/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/copy-sync/index.js var require_copy_sync2 = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/copy-sync/index.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/copy-sync/index.js"(exports, module2) { "use strict"; module2.exports = { copySync: require_copy_sync() @@ -10675,9 +10680,9 @@ var require_copy_sync2 = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/path-exists/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/path-exists/index.js var require_path_exists = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) { "use strict"; var u = require_universalify().fromPromise; var fs8 = require_fs(); @@ -10691,9 +10696,9 @@ var require_path_exists = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/copy/copy.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/copy/copy.js var require_copy = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) { "use strict"; var fs8 = require_graceful_fs(); var path10 = require("path"); @@ -10901,9 +10906,9 @@ var require_copy = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/copy/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/copy/index.js var require_copy2 = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/copy/index.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/copy/index.js"(exports, module2) { "use strict"; var u = require_universalify().fromCallback; module2.exports = { @@ -10912,9 +10917,9 @@ var require_copy2 = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/remove/rimraf.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/remove/rimraf.js var require_rimraf = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/remove/rimraf.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/remove/rimraf.js"(exports, module2) { "use strict"; var fs8 = require_graceful_fs(); var path10 = require("path"); @@ -11163,9 +11168,9 @@ var require_rimraf = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/remove/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/remove/index.js var require_remove = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/remove/index.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/remove/index.js"(exports, module2) { "use strict"; var u = require_universalify().fromCallback; var rimraf2 = require_rimraf(); @@ -11176,9 +11181,9 @@ var require_remove = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/empty/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/empty/index.js var require_empty = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/empty/index.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/empty/index.js"(exports, module2) { "use strict"; var u = require_universalify().fromCallback; var fs8 = require_graceful_fs(); @@ -11226,9 +11231,9 @@ var require_empty = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/ensure/file.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/ensure/file.js var require_file = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) { "use strict"; var u = require_universalify().fromCallback; var path10 = require("path"); @@ -11281,9 +11286,9 @@ var require_file = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/ensure/link.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/ensure/link.js var require_link = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) { "use strict"; var u = require_universalify().fromCallback; var path10 = require("path"); @@ -11347,9 +11352,9 @@ var require_link = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/ensure/symlink-paths.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/ensure/symlink-paths.js var require_symlink_paths = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) { "use strict"; var path10 = require("path"); var fs8 = require_graceful_fs(); @@ -11429,9 +11434,9 @@ var require_symlink_paths = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/ensure/symlink-type.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/ensure/symlink-type.js var require_symlink_type = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) { "use strict"; var fs8 = require_graceful_fs(); function symlinkType(srcpath, type, callback) { @@ -11464,9 +11469,9 @@ var require_symlink_type = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/ensure/symlink.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/ensure/symlink.js var require_symlink = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) { "use strict"; var u = require_universalify().fromCallback; var path10 = require("path"); @@ -11533,9 +11538,9 @@ var require_symlink = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/ensure/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/ensure/index.js var require_ensure = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) { "use strict"; var file = require_file(); var link = require_link(); @@ -11560,9 +11565,9 @@ var require_ensure = __commonJS({ } }); -// .yarn/cache/jsonfile-npm-4.0.0-10ce3aea15-d85d544514.zip/node_modules/jsonfile/index.js +// .yarn/cache/jsonfile-npm-4.0.0-10ce3aea15-7dc94b628d.zip/node_modules/jsonfile/index.js var require_jsonfile = __commonJS({ - ".yarn/cache/jsonfile-npm-4.0.0-10ce3aea15-d85d544514.zip/node_modules/jsonfile/index.js"(exports, module2) { + ".yarn/cache/jsonfile-npm-4.0.0-10ce3aea15-7dc94b628d.zip/node_modules/jsonfile/index.js"(exports, module2) { var _fs; try { _fs = require_graceful_fs(); @@ -11677,9 +11682,9 @@ var require_jsonfile = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/json/jsonfile.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/json/jsonfile.js var require_jsonfile2 = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) { "use strict"; var u = require_universalify().fromCallback; var jsonFile = require_jsonfile(); @@ -11693,9 +11698,9 @@ var require_jsonfile2 = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/json/output-json.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/json/output-json.js var require_output_json = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) { "use strict"; var path10 = require("path"); var mkdir4 = require_mkdirs2(); @@ -11723,9 +11728,9 @@ var require_output_json = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/json/output-json-sync.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/json/output-json-sync.js var require_output_json_sync = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) { "use strict"; var fs8 = require_graceful_fs(); var path10 = require("path"); @@ -11742,9 +11747,9 @@ var require_output_json_sync = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/json/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/json/index.js var require_json = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/json/index.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/json/index.js"(exports, module2) { "use strict"; var u = require_universalify().fromCallback; var jsonFile = require_jsonfile2(); @@ -11760,9 +11765,9 @@ var require_json = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/move-sync/move-sync.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/move-sync/move-sync.js var require_move_sync = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/move-sync/move-sync.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/move-sync/move-sync.js"(exports, module2) { "use strict"; var fs8 = require_graceful_fs(); var path10 = require("path"); @@ -11808,9 +11813,9 @@ var require_move_sync = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/move-sync/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/move-sync/index.js var require_move_sync2 = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/move-sync/index.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/move-sync/index.js"(exports, module2) { "use strict"; module2.exports = { moveSync: require_move_sync() @@ -11818,9 +11823,9 @@ var require_move_sync2 = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/move/move.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/move/move.js var require_move = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/move/move.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/move/move.js"(exports, module2) { "use strict"; var fs8 = require_graceful_fs(); var path10 = require("path"); @@ -11890,9 +11895,9 @@ var require_move = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/move/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/move/index.js var require_move2 = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/move/index.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/move/index.js"(exports, module2) { "use strict"; var u = require_universalify().fromCallback; module2.exports = { @@ -11901,9 +11906,9 @@ var require_move2 = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/output/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/output/index.js var require_output = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/output/index.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/output/index.js"(exports, module2) { "use strict"; var u = require_universalify().fromCallback; var fs8 = require_graceful_fs(); @@ -11943,9 +11948,9 @@ var require_output = __commonJS({ } }); -// .yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/index.js +// .yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/index.js var require_lib = __commonJS({ - ".yarn/cache/fs-extra-npm-8.1.0-197473387f-cfdc1f2b8d.zip/node_modules/fs-extra/lib/index.js"(exports, module2) { + ".yarn/cache/fs-extra-npm-8.1.0-197473387f-259f7b814d.zip/node_modules/fs-extra/lib/index.js"(exports, module2) { "use strict"; module2.exports = Object.assign( {}, @@ -11975,9 +11980,9 @@ var require_lib = __commonJS({ } }); -// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/notfound.js +// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/notfound.js var require_notfound = __commonJS({ - ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/notfound.js"(exports) { + ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/notfound.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var NotFoundError = class extends Error { @@ -11990,9 +11995,9 @@ var require_notfound = __commonJS({ } }); -// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/file.js +// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/file.js var require_file2 = __commonJS({ - ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/file.js"(exports) { + ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/file.js"(exports) { "use strict"; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -12042,9 +12047,9 @@ var require_file2 = __commonJS({ } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/parseControlResponse.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/parseControlResponse.js var require_parseControlResponse = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/parseControlResponse.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/parseControlResponse.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.positiveIntermediate = exports.positiveCompletion = exports.isMultiline = exports.isSingleLine = exports.parseControlResponse = void 0; @@ -12095,9 +12100,9 @@ var require_parseControlResponse = __commonJS({ } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/FtpContext.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/FtpContext.js var require_FtpContext = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/FtpContext.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/FtpContext.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FTPContext = exports.FTPError = void 0; @@ -12414,9 +12419,9 @@ Closing reason: ${this._closingError.stack}`; } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/FileInfo.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/FileInfo.js var require_FileInfo = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/FileInfo.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/FileInfo.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FileInfo = exports.FileType = void 0; @@ -12471,9 +12476,9 @@ var require_FileInfo = __commonJS({ } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/parseListDOS.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/parseListDOS.js var require_parseListDOS = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/parseListDOS.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/parseListDOS.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.transformList = exports.parseLine = exports.testLine = void 0; @@ -12515,9 +12520,9 @@ var require_parseListDOS = __commonJS({ } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/parseListUnix.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/parseListUnix.js var require_parseListUnix = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/parseListUnix.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/parseListUnix.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.transformList = exports.parseLine = exports.testLine = void 0; @@ -12602,9 +12607,9 @@ var require_parseListUnix = __commonJS({ } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/parseListMLSD.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/parseListMLSD.js var require_parseListMLSD = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/parseListMLSD.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/parseListMLSD.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseMLSxDate = exports.transformList = exports.parseLine = exports.testLine = void 0; @@ -12764,9 +12769,9 @@ var require_parseListMLSD = __commonJS({ } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/parseList.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/parseList.js var require_parseList = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/parseList.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/parseList.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) @@ -12838,9 +12843,9 @@ var require_parseList = __commonJS({ } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/ProgressTracker.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/ProgressTracker.js var require_ProgressTracker = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/ProgressTracker.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/ProgressTracker.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ProgressTracker = void 0; @@ -12909,9 +12914,9 @@ var require_ProgressTracker = __commonJS({ } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/StringWriter.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/StringWriter.js var require_StringWriter = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/StringWriter.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/StringWriter.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StringWriter = void 0; @@ -12937,9 +12942,9 @@ var require_StringWriter = __commonJS({ } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/netUtils.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/netUtils.js var require_netUtils = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/netUtils.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/netUtils.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ipIsPrivateV4Address = exports.upgradeSocket = exports.describeAddress = exports.describeTLS = void 0; @@ -12989,9 +12994,9 @@ var require_netUtils = __commonJS({ } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/transfer.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/transfer.js var require_transfer = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/transfer.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/transfer.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.downloadTo = exports.uploadFrom = exports.connectForPassiveTransfer = exports.parsePasvResponse = exports.enterPassiveModeIPv4 = exports.parseEpsvResponse = exports.enterPassiveModeIPv6 = void 0; @@ -13228,9 +13233,9 @@ var require_transfer = __commonJS({ } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/Client.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/Client.js var require_Client = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/Client.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/Client.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Client = void 0; @@ -13947,17 +13952,17 @@ var require_Client = __commonJS({ } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/StringEncoding.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/StringEncoding.js var require_StringEncoding = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/StringEncoding.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/StringEncoding.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); } }); -// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/index.js +// .yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/index.js var require_dist6 = __commonJS({ - ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-3d085eaea5.zip/node_modules/basic-ftp/dist/index.js"(exports) { + ".yarn/cache/basic-ftp-npm-5.0.3-95a5b33162-2b960ea976.zip/node_modules/basic-ftp/dist/index.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) @@ -13996,9 +14001,9 @@ var require_dist6 = __commonJS({ } }); -// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/ftp.js +// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/ftp.js var require_ftp = __commonJS({ - ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/ftp.js"(exports) { + ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/ftp.js"(exports) { "use strict"; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -14077,9 +14082,9 @@ var require_ftp = __commonJS({ } }); -// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/http-error.js +// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/http-error.js var require_http_error = __commonJS({ - ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/http-error.js"(exports) { + ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/http-error.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var http_1 = require("http"); @@ -14094,9 +14099,9 @@ var require_http_error = __commonJS({ } }); -// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/http.js +// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/http.js var require_http = __commonJS({ - ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/http.js"(exports) { + ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/http.js"(exports) { "use strict"; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -14247,9 +14252,9 @@ var require_http = __commonJS({ } }); -// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/https.js +// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/https.js var require_https = __commonJS({ - ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/https.js"(exports) { + ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/https.js"(exports) { "use strict"; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -14265,9 +14270,9 @@ var require_https = __commonJS({ } }); -// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/index.js +// .yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/index.js var require_dist7 = __commonJS({ - ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-ffa2b3377c.zip/node_modules/get-uri/dist/index.js"(exports) { + ".yarn/cache/get-uri-npm-6.0.1-d4f0bb7365-dde1cd2fa7.zip/node_modules/get-uri/dist/index.js"(exports) { "use strict"; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -14310,9 +14315,9 @@ var require_dist7 = __commonJS({ } }); -// .yarn/cache/estraverse-npm-4.3.0-920a32f3c6-befc0287c3.zip/node_modules/estraverse/package.json +// .yarn/cache/estraverse-npm-4.3.0-920a32f3c6-9cb46463ef.zip/node_modules/estraverse/package.json var require_package = __commonJS({ - ".yarn/cache/estraverse-npm-4.3.0-920a32f3c6-befc0287c3.zip/node_modules/estraverse/package.json"(exports, module2) { + ".yarn/cache/estraverse-npm-4.3.0-920a32f3c6-9cb46463ef.zip/node_modules/estraverse/package.json"(exports, module2) { module2.exports = { name: "estraverse", description: "ECMAScript JS AST traversal functions", @@ -14356,9 +14361,9 @@ var require_package = __commonJS({ } }); -// .yarn/cache/estraverse-npm-4.3.0-920a32f3c6-befc0287c3.zip/node_modules/estraverse/estraverse.js +// .yarn/cache/estraverse-npm-4.3.0-920a32f3c6-9cb46463ef.zip/node_modules/estraverse/estraverse.js var require_estraverse = __commonJS({ - ".yarn/cache/estraverse-npm-4.3.0-920a32f3c6-befc0287c3.zip/node_modules/estraverse/estraverse.js"(exports) { + ".yarn/cache/estraverse-npm-4.3.0-920a32f3c6-9cb46463ef.zip/node_modules/estraverse/estraverse.js"(exports) { (function clone(exports2) { "use strict"; var Syntax, VisitorOption, VisitorKeys, BREAK, SKIP, REMOVE; @@ -14953,9 +14958,9 @@ var require_estraverse = __commonJS({ } }); -// .yarn/cache/esutils-npm-2.0.3-f865beafd5-179e017b58.zip/node_modules/esutils/lib/ast.js +// .yarn/cache/esutils-npm-2.0.3-f865beafd5-9a2fe69a41.zip/node_modules/esutils/lib/ast.js var require_ast = __commonJS({ - ".yarn/cache/esutils-npm-2.0.3-f865beafd5-179e017b58.zip/node_modules/esutils/lib/ast.js"(exports, module2) { + ".yarn/cache/esutils-npm-2.0.3-f865beafd5-9a2fe69a41.zip/node_modules/esutils/lib/ast.js"(exports, module2) { (function() { "use strict"; function isExpression(node) { @@ -15073,9 +15078,9 @@ var require_ast = __commonJS({ } }); -// .yarn/cache/esutils-npm-2.0.3-f865beafd5-179e017b58.zip/node_modules/esutils/lib/code.js +// .yarn/cache/esutils-npm-2.0.3-f865beafd5-9a2fe69a41.zip/node_modules/esutils/lib/code.js var require_code = __commonJS({ - ".yarn/cache/esutils-npm-2.0.3-f865beafd5-179e017b58.zip/node_modules/esutils/lib/code.js"(exports, module2) { + ".yarn/cache/esutils-npm-2.0.3-f865beafd5-9a2fe69a41.zip/node_modules/esutils/lib/code.js"(exports, module2) { (function() { "use strict"; var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; @@ -15174,9 +15179,9 @@ var require_code = __commonJS({ } }); -// .yarn/cache/esutils-npm-2.0.3-f865beafd5-179e017b58.zip/node_modules/esutils/lib/keyword.js +// .yarn/cache/esutils-npm-2.0.3-f865beafd5-9a2fe69a41.zip/node_modules/esutils/lib/keyword.js var require_keyword = __commonJS({ - ".yarn/cache/esutils-npm-2.0.3-f865beafd5-179e017b58.zip/node_modules/esutils/lib/keyword.js"(exports, module2) { + ".yarn/cache/esutils-npm-2.0.3-f865beafd5-9a2fe69a41.zip/node_modules/esutils/lib/keyword.js"(exports, module2) { (function() { "use strict"; var code = require_code(); @@ -15302,9 +15307,9 @@ var require_keyword = __commonJS({ } }); -// .yarn/cache/esutils-npm-2.0.3-f865beafd5-179e017b58.zip/node_modules/esutils/lib/utils.js +// .yarn/cache/esutils-npm-2.0.3-f865beafd5-9a2fe69a41.zip/node_modules/esutils/lib/utils.js var require_utils2 = __commonJS({ - ".yarn/cache/esutils-npm-2.0.3-f865beafd5-179e017b58.zip/node_modules/esutils/lib/utils.js"(exports) { + ".yarn/cache/esutils-npm-2.0.3-f865beafd5-9a2fe69a41.zip/node_modules/esutils/lib/utils.js"(exports) { (function() { "use strict"; exports.ast = require_ast(); @@ -15314,9 +15319,9 @@ var require_utils2 = __commonJS({ } }); -// .yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/base64.js +// .yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/base64.js var require_base64 = __commonJS({ - ".yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/base64.js"(exports) { + ".yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/base64.js"(exports) { var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); exports.encode = function(number) { if (0 <= number && number < intToCharMap.length) { @@ -15355,9 +15360,9 @@ var require_base64 = __commonJS({ } }); -// .yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/base64-vlq.js +// .yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/base64-vlq.js var require_base64_vlq = __commonJS({ - ".yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/base64-vlq.js"(exports) { + ".yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/base64-vlq.js"(exports) { var base64 = require_base64(); var VLQ_BASE_SHIFT = 5; var VLQ_BASE = 1 << VLQ_BASE_SHIFT; @@ -15409,9 +15414,9 @@ var require_base64_vlq = __commonJS({ } }); -// .yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/util.js +// .yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/util.js var require_util2 = __commonJS({ - ".yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/util.js"(exports) { + ".yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/util.js"(exports) { function getArg(aArgs, aName, aDefaultValue) { if (aName in aArgs) { return aArgs[aName]; @@ -15710,9 +15715,9 @@ var require_util2 = __commonJS({ } }); -// .yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/array-set.js +// .yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/array-set.js var require_array_set = __commonJS({ - ".yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/array-set.js"(exports) { + ".yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/array-set.js"(exports) { var util = require_util2(); var has = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; @@ -15780,9 +15785,9 @@ var require_array_set = __commonJS({ } }); -// .yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/mapping-list.js +// .yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/mapping-list.js var require_mapping_list = __commonJS({ - ".yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/mapping-list.js"(exports) { + ".yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/mapping-list.js"(exports) { var util = require_util2(); function generatedPositionAfter(mappingA, mappingB) { var lineA = mappingA.generatedLine; @@ -15819,9 +15824,9 @@ var require_mapping_list = __commonJS({ } }); -// .yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/source-map-generator.js +// .yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/source-map-generator.js var require_source_map_generator = __commonJS({ - ".yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/source-map-generator.js"(exports) { + ".yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/source-map-generator.js"(exports) { var base64VLQ = require_base64_vlq(); var util = require_util2(); var ArraySet = require_array_set().ArraySet; @@ -16095,9 +16100,9 @@ var require_source_map_generator = __commonJS({ } }); -// .yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/binary-search.js +// .yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/binary-search.js var require_binary_search = __commonJS({ - ".yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/binary-search.js"(exports) { + ".yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/binary-search.js"(exports) { exports.GREATEST_LOWER_BOUND = 1; exports.LEAST_UPPER_BOUND = 2; function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { @@ -16151,9 +16156,9 @@ var require_binary_search = __commonJS({ } }); -// .yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/quick-sort.js +// .yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/quick-sort.js var require_quick_sort = __commonJS({ - ".yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/quick-sort.js"(exports) { + ".yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/quick-sort.js"(exports) { function swap(ary, x, y) { var temp = ary[x]; ary[x] = ary[y]; @@ -16186,9 +16191,9 @@ var require_quick_sort = __commonJS({ } }); -// .yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/source-map-consumer.js +// .yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/source-map-consumer.js var require_source_map_consumer = __commonJS({ - ".yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/source-map-consumer.js"(exports) { + ".yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/source-map-consumer.js"(exports) { var util = require_util2(); var binarySearch = require_binary_search(); var ArraySet = require_array_set().ArraySet; @@ -16787,9 +16792,9 @@ var require_source_map_consumer = __commonJS({ } }); -// .yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/source-node.js +// .yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/source-node.js var require_source_node = __commonJS({ - ".yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/lib/source-node.js"(exports) { + ".yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/lib/source-node.js"(exports) { var SourceMapGenerator = require_source_map_generator().SourceMapGenerator; var util = require_util2(); var REGEX_NEWLINE = /(\r?\n)/; @@ -17053,18 +17058,18 @@ var require_source_node = __commonJS({ } }); -// .yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/source-map.js +// .yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/source-map.js var require_source_map = __commonJS({ - ".yarn/cache/source-map-npm-0.6.1-1a3621db16-cba9f44c3a.zip/node_modules/source-map/source-map.js"(exports) { + ".yarn/cache/source-map-npm-0.6.1-1a3621db16-ab55398007.zip/node_modules/source-map/source-map.js"(exports) { exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator; exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer; exports.SourceNode = require_source_node().SourceNode; } }); -// .yarn/cache/escodegen-npm-1.14.3-a4dedc6eeb-14769d3458.zip/node_modules/escodegen/package.json +// .yarn/cache/escodegen-npm-1.14.3-a4dedc6eeb-30d337803e.zip/node_modules/escodegen/package.json var require_package2 = __commonJS({ - ".yarn/cache/escodegen-npm-1.14.3-a4dedc6eeb-14769d3458.zip/node_modules/escodegen/package.json"(exports, module2) { + ".yarn/cache/escodegen-npm-1.14.3-a4dedc6eeb-30d337803e.zip/node_modules/escodegen/package.json"(exports, module2) { module2.exports = { name: "escodegen", description: "ECMAScript code generator", @@ -17129,9 +17134,9 @@ var require_package2 = __commonJS({ } }); -// .yarn/cache/escodegen-npm-1.14.3-a4dedc6eeb-14769d3458.zip/node_modules/escodegen/escodegen.js +// .yarn/cache/escodegen-npm-1.14.3-a4dedc6eeb-30d337803e.zip/node_modules/escodegen/escodegen.js var require_escodegen = __commonJS({ - ".yarn/cache/escodegen-npm-1.14.3-a4dedc6eeb-14769d3458.zip/node_modules/escodegen/escodegen.js"(exports) { + ".yarn/cache/escodegen-npm-1.14.3-a4dedc6eeb-30d337803e.zip/node_modules/escodegen/escodegen.js"(exports) { (function() { "use strict"; var Syntax, Precedence, BinaryPrecedence, SourceNode, estraverse, esutils, base, indent, json, renumber, hexadecimal, quotes, escapeless, newline, space, parentheses, semicolons, safeConcatenation, directive, extra, parse, sourceMap, sourceCode, preserveBlankLines, FORMAT_MINIFY, FORMAT_DEFAULTS; @@ -19185,9 +19190,9 @@ var require_escodegen = __commonJS({ } }); -// .yarn/cache/esprima-npm-4.0.1-1084e98778-08b3015538.zip/node_modules/esprima/dist/esprima.js +// .yarn/cache/esprima-npm-4.0.1-1084e98778-ad4bab9ead.zip/node_modules/esprima/dist/esprima.js var require_esprima = __commonJS({ - ".yarn/cache/esprima-npm-4.0.1-1084e98778-08b3015538.zip/node_modules/esprima/dist/esprima.js"(exports, module2) { + ".yarn/cache/esprima-npm-4.0.1-1084e98778-ad4bab9ead.zip/node_modules/esprima/dist/esprima.js"(exports, module2) { (function webpackUniversalModuleDefinition(root, factory) { if (typeof exports === "object" && typeof module2 === "object") module2.exports = factory(); @@ -25421,7 +25426,7 @@ var require_esprima = __commonJS({ } }); -// .yarn/cache/tslib-npm-2.6.0-4d336a6824-702dfe42c8.zip/node_modules/tslib/tslib.es6.mjs +// .yarn/cache/tslib-npm-2.6.0-4d336a6824-8d18020a8b.zip/node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -25888,7 +25893,7 @@ function __disposeResources(env2) { } var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - ".yarn/cache/tslib-npm-2.6.0-4d336a6824-702dfe42c8.zip/node_modules/tslib/tslib.es6.mjs"() { + ".yarn/cache/tslib-npm-2.6.0-4d336a6824-8d18020a8b.zip/node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -25967,9 +25972,9 @@ var init_tslib_es6 = __esm({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/types.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/types.js var require_types = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/types.js"(exports) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/types.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Def = void 0; @@ -26652,9 +26657,9 @@ var require_types = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/path.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/path.js var require_path = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/path.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/path.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -26955,9 +26960,9 @@ var require_path = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/scope.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/scope.js var require_scope = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/scope.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/scope.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -27217,9 +27222,9 @@ var require_scope = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/node-path.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/node-path.js var require_node_path = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/node-path.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/node-path.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -27572,9 +27577,9 @@ var require_node_path = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/path-visitor.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/path-visitor.js var require_path_visitor = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/path-visitor.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/path-visitor.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -27866,9 +27871,9 @@ var require_path_visitor = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/equiv.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/equiv.js var require_equiv = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/equiv.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/equiv.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28017,9 +28022,9 @@ var require_equiv = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/fork.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/fork.js var require_fork = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/fork.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/fork.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28075,9 +28080,9 @@ var require_fork = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/shared.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/shared.js var require_shared = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/lib/shared.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/lib/shared.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28136,9 +28141,9 @@ var require_shared = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/core.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/core.js var require_core = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/core.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/core.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28266,9 +28271,9 @@ var require_core = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/es6.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/es6.js var require_es6 = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/es6.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/es6.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28331,9 +28336,9 @@ var require_es6 = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/es7.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/es7.js var require_es7 = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/es7.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/es7.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28358,9 +28363,9 @@ var require_es7 = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/es2020.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/es2020.js var require_es2020 = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/es2020.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/es2020.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28377,9 +28382,9 @@ var require_es2020 = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/jsx.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/jsx.js var require_jsx = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/jsx.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/jsx.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28442,9 +28447,9 @@ var require_jsx = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/type-annotations.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/type-annotations.js var require_type_annotations = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/type-annotations.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/type-annotations.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28473,9 +28478,9 @@ var require_type_annotations = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/flow.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/flow.js var require_flow = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/flow.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/flow.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28569,9 +28574,9 @@ var require_flow = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/esprima.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/esprima.js var require_esprima2 = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/esprima.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/esprima.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28628,9 +28633,9 @@ var require_esprima2 = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/babel-core.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/babel-core.js var require_babel_core = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/babel-core.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/babel-core.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28752,9 +28757,9 @@ var require_babel_core = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/babel.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/babel.js var require_babel = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/babel.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/babel.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28769,9 +28774,9 @@ var require_babel = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/typescript.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/typescript.js var require_typescript = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/typescript.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/typescript.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28928,9 +28933,9 @@ var require_typescript = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/es-proposals.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/es-proposals.js var require_es_proposals = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/def/es-proposals.js"(exports, module2) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/def/es-proposals.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); @@ -28955,9 +28960,9 @@ var require_es_proposals = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/gen/namedTypes.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/gen/namedTypes.js var require_namedTypes = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/gen/namedTypes.js"(exports) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/gen/namedTypes.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.namedTypes = void 0; @@ -28967,9 +28972,9 @@ var require_namedTypes = __commonJS({ } }); -// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/main.js +// .yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/main.js var require_main = __commonJS({ - ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-bb0eb8a85e.zip/node_modules/ast-types/main.js"(exports) { + ".yarn/cache/ast-types-npm-0.13.4-69f7e68df8-3a1a409764.zip/node_modules/ast-types/main.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.visit = exports.use = exports.Type = exports.someField = exports.PathVisitor = exports.Path = exports.NodePath = exports.namedTypes = exports.getSupertypeNames = exports.getFieldValue = exports.getFieldNames = exports.getBuilderName = exports.finalize = exports.eachField = exports.defineMethod = exports.builtInTypes = exports.builders = exports.astNodesAreEquivalent = void 0; @@ -29057,9 +29062,9 @@ var require_vm2 = __commonJS({ } }); -// .yarn/cache/degenerator-npm-4.0.4-1f9c4b67eb-105bd28952.zip/node_modules/degenerator/dist/index.js +// .yarn/cache/degenerator-npm-4.0.4-1f9c4b67eb-c859071a75.zip/node_modules/degenerator/dist/index.js var require_dist8 = __commonJS({ - ".yarn/cache/degenerator-npm-4.0.4-1f9c4b67eb-105bd28952.zip/node_modules/degenerator/dist/index.js"(exports) { + ".yarn/cache/degenerator-npm-4.0.4-1f9c4b67eb-c859071a75.zip/node_modules/degenerator/dist/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.compile = exports.degenerator = void 0; @@ -29201,9 +29206,9 @@ var require_dist8 = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/dateRange.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/dateRange.js var require_dateRange = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/dateRange.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/dateRange.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function dateRange() { @@ -29213,9 +29218,9 @@ var require_dateRange = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/dnsDomainIs.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/dnsDomainIs.js var require_dnsDomainIs = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/dnsDomainIs.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/dnsDomainIs.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function dnsDomainIs(host, domain) { @@ -29227,9 +29232,9 @@ var require_dnsDomainIs = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/dnsDomainLevels.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/dnsDomainLevels.js var require_dnsDomainLevels = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/dnsDomainLevels.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/dnsDomainLevels.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function dnsDomainLevels(host) { @@ -29244,9 +29249,9 @@ var require_dnsDomainLevels = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/util.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/util.js var require_util3 = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/util.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/util.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isGMT = exports.dnsLookup = void 0; @@ -29270,9 +29275,9 @@ var require_util3 = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/dnsResolve.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/dnsResolve.js var require_dnsResolve = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/dnsResolve.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/dnsResolve.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = require_util3(); @@ -29291,9 +29296,9 @@ var require_dnsResolve = __commonJS({ } }); -// .yarn/cache/netmask-npm-2.0.2-2299510a4d-ba4edae75a.zip/node_modules/netmask/lib/netmask.js +// .yarn/cache/netmask-npm-2.0.2-2299510a4d-cafd28388e.zip/node_modules/netmask/lib/netmask.js var require_netmask = __commonJS({ - ".yarn/cache/netmask-npm-2.0.2-2299510a4d-ba4edae75a.zip/node_modules/netmask/lib/netmask.js"(exports) { + ".yarn/cache/netmask-npm-2.0.2-2299510a4d-cafd28388e.zip/node_modules/netmask/lib/netmask.js"(exports) { (function() { var Netmask, atob, chr, chr0, chrA, chra, ip2long, long2ip; long2ip = function(long) { @@ -29486,9 +29491,9 @@ var require_netmask = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/isInNet.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/isInNet.js var require_isInNet = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/isInNet.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/isInNet.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var netmask_1 = require_netmask(); @@ -29509,9 +29514,9 @@ var require_isInNet = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/isPlainHostName.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/isPlainHostName.js var require_isPlainHostName = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/isPlainHostName.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/isPlainHostName.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function isPlainHostName(host) { @@ -29521,9 +29526,9 @@ var require_isPlainHostName = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/isResolvable.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/isResolvable.js var require_isResolvable = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/isResolvable.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/isResolvable.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = require_util3(); @@ -29541,9 +29546,9 @@ var require_isResolvable = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/localHostOrDomainIs.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/localHostOrDomainIs.js var require_localHostOrDomainIs = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/localHostOrDomainIs.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/localHostOrDomainIs.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function localHostOrDomainIs(host, hostdom) { @@ -29562,9 +29567,9 @@ var require_localHostOrDomainIs = __commonJS({ } }); -// .yarn/cache/ip-npm-1.1.8-abea558b72-bb1850e7b6.zip/node_modules/ip/lib/ip.js +// .yarn/cache/ip-npm-1.1.8-abea558b72-ab32a5ecfa.zip/node_modules/ip/lib/ip.js var require_ip2 = __commonJS({ - ".yarn/cache/ip-npm-1.1.8-abea558b72-bb1850e7b6.zip/node_modules/ip/lib/ip.js"(exports) { + ".yarn/cache/ip-npm-1.1.8-abea558b72-ab32a5ecfa.zip/node_modules/ip/lib/ip.js"(exports) { var ip = exports; var { Buffer: Buffer2 } = require("buffer"); var os3 = require("os"); @@ -29868,9 +29873,9 @@ var require_ip2 = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/myIpAddress.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/myIpAddress.js var require_myIpAddress = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/myIpAddress.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/myIpAddress.js"(exports) { "use strict"; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -29903,9 +29908,9 @@ var require_myIpAddress = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/shExpMatch.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/shExpMatch.js var require_shExpMatch = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/shExpMatch.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/shExpMatch.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function shExpMatch(str, shexp) { @@ -29920,9 +29925,9 @@ var require_shExpMatch = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/timeRange.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/timeRange.js var require_timeRange = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/timeRange.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/timeRange.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function timeRange() { @@ -29967,9 +29972,9 @@ var require_timeRange = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/weekdayRange.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/weekdayRange.js var require_weekdayRange = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/weekdayRange.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/weekdayRange.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util_1 = require_util3(); @@ -30015,9 +30020,9 @@ var require_weekdayRange = __commonJS({ } }); -// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/index.js +// .yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/index.js var require_dist9 = __commonJS({ - ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-e77d61b35d.zip/node_modules/pac-resolver/dist/index.js"(exports) { + ".yarn/cache/pac-resolver-npm-6.0.2-9e9298321a-7032496b35.zip/node_modules/pac-resolver/dist/index.js"(exports) { "use strict"; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -30092,9 +30097,9 @@ var require_dist9 = __commonJS({ } }); -// .yarn/cache/pac-proxy-agent-npm-6.0.4-fab524db53-26e60ad16f.zip/node_modules/pac-proxy-agent/dist/index.js +// .yarn/cache/pac-proxy-agent-npm-6.0.4-fab524db53-810aaaac1b.zip/node_modules/pac-proxy-agent/dist/index.js var require_dist10 = __commonJS({ - ".yarn/cache/pac-proxy-agent-npm-6.0.4-fab524db53-26e60ad16f.zip/node_modules/pac-proxy-agent/dist/index.js"(exports) { + ".yarn/cache/pac-proxy-agent-npm-6.0.4-fab524db53-810aaaac1b.zip/node_modules/pac-proxy-agent/dist/index.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) @@ -30308,9 +30313,9 @@ var require_dist10 = __commonJS({ } }); -// .yarn/cache/proxy-agent-npm-6.2.2-678133ab7b-481d168121.zip/node_modules/proxy-agent/dist/index.js +// .yarn/cache/proxy-agent-npm-6.2.2-678133ab7b-51121cb190.zip/node_modules/proxy-agent/dist/index.js var require_dist11 = __commonJS({ - ".yarn/cache/proxy-agent-npm-6.2.2-678133ab7b-481d168121.zip/node_modules/proxy-agent/dist/index.js"(exports) { + ".yarn/cache/proxy-agent-npm-6.2.2-678133ab7b-51121cb190.zip/node_modules/proxy-agent/dist/index.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) @@ -30432,9 +30437,9 @@ var require_dist11 = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/high-level-opt.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/high-level-opt.js var require_high_level_opt = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/high-level-opt.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/high-level-opt.js"(exports, module2) { "use strict"; var argmap = /* @__PURE__ */ new Map([ ["C", "cwd"], @@ -30464,9 +30469,9 @@ var require_high_level_opt = __commonJS({ } }); -// .yarn/cache/minipass-npm-5.0.0-c64fb63c92-dac2e19609.zip/node_modules/minipass/index.js +// .yarn/cache/minipass-npm-5.0.0-c64fb63c92-a91d8043f6.zip/node_modules/minipass/index.js var require_minipass = __commonJS({ - ".yarn/cache/minipass-npm-5.0.0-c64fb63c92-dac2e19609.zip/node_modules/minipass/index.js"(exports) { + ".yarn/cache/minipass-npm-5.0.0-c64fb63c92-a91d8043f6.zip/node_modules/minipass/index.js"(exports) { "use strict"; var proc = typeof process === "object" && process ? process : { stdout: null, @@ -31071,9 +31076,9 @@ var require_minipass = __commonJS({ } }); -// .yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-c0071edb24.zip/node_modules/minizlib/constants.js +// .yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-64fae024e1.zip/node_modules/minizlib/constants.js var require_constants3 = __commonJS({ - ".yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-c0071edb24.zip/node_modules/minizlib/constants.js"(exports, module2) { + ".yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-64fae024e1.zip/node_modules/minizlib/constants.js"(exports, module2) { var realZlibConstants = require("zlib").constants || /* istanbul ignore next */ { ZLIB_VERNUM: 4736 }; module2.exports = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { @@ -31187,9 +31192,9 @@ var require_constants3 = __commonJS({ } }); -// .yarn/cache/minipass-npm-3.3.6-b8d93a945b-9704cf677a.zip/node_modules/minipass/index.js +// .yarn/cache/minipass-npm-3.3.6-b8d93a945b-a114746943.zip/node_modules/minipass/index.js var require_minipass2 = __commonJS({ - ".yarn/cache/minipass-npm-3.3.6-b8d93a945b-9704cf677a.zip/node_modules/minipass/index.js"(exports, module2) { + ".yarn/cache/minipass-npm-3.3.6-b8d93a945b-a114746943.zip/node_modules/minipass/index.js"(exports, module2) { "use strict"; var proc = typeof process === "object" && process ? process : { stdout: null, @@ -31711,9 +31716,9 @@ var require_minipass2 = __commonJS({ } }); -// .yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-c0071edb24.zip/node_modules/minizlib/index.js +// .yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-64fae024e1.zip/node_modules/minizlib/index.js var require_minizlib = __commonJS({ - ".yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-c0071edb24.zip/node_modules/minizlib/index.js"(exports) { + ".yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-64fae024e1.zip/node_modules/minizlib/index.js"(exports) { "use strict"; var assert2 = require("assert"); var Buffer2 = require("buffer").Buffer; @@ -31975,17 +31980,17 @@ var require_minizlib = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/normalize-windows-path.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/normalize-windows-path.js var require_normalize_windows_path = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/normalize-windows-path.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/normalize-windows-path.js"(exports, module2) { var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; module2.exports = platform !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/"); } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/read-entry.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/read-entry.js var require_read_entry = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/read-entry.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/read-entry.js"(exports, module2) { "use strict"; var { Minipass } = require_minipass(); var normPath = require_normalize_windows_path(); @@ -32077,9 +32082,9 @@ var require_read_entry = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/types.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/types.js var require_types2 = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/types.js"(exports) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/types.js"(exports) { "use strict"; exports.name = /* @__PURE__ */ new Map([ ["0", "File"], @@ -32124,9 +32129,9 @@ var require_types2 = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/large-numbers.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/large-numbers.js var require_large_numbers = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/large-numbers.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/large-numbers.js"(exports, module2) { "use strict"; var encode = (num, buf) => { if (!Number.isSafeInteger(num)) { @@ -32214,9 +32219,9 @@ var require_large_numbers = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/header.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/header.js var require_header = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/header.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/header.js"(exports, module2) { "use strict"; var types = require_types2(); var pathModule = require("path").posix; @@ -32434,9 +32439,9 @@ var require_header = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/pax.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/pax.js var require_pax = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/pax.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/pax.js"(exports, module2) { "use strict"; var Header = require_header(); var path10 = require("path"); @@ -32535,9 +32540,9 @@ var require_pax = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/strip-trailing-slashes.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/strip-trailing-slashes.js var require_strip_trailing_slashes = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/strip-trailing-slashes.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/strip-trailing-slashes.js"(exports, module2) { module2.exports = (str) => { let i = str.length - 1; let slashesStart = -1; @@ -32550,9 +32555,9 @@ var require_strip_trailing_slashes = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/warn-mixin.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/warn-mixin.js var require_warn_mixin = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/warn-mixin.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/warn-mixin.js"(exports, module2) { "use strict"; module2.exports = (Base) => class extends Base { warn(code, message, data = {}) { @@ -32580,9 +32585,9 @@ var require_warn_mixin = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/winchars.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/winchars.js var require_winchars = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/winchars.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/winchars.js"(exports, module2) { "use strict"; var raw = [ "|", @@ -32601,9 +32606,9 @@ var require_winchars = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/strip-absolute-path.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/strip-absolute-path.js var require_strip_absolute_path = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/strip-absolute-path.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/strip-absolute-path.js"(exports, module2) { var { isAbsolute, parse } = require("path").win32; module2.exports = (path10) => { let r = ""; @@ -32619,9 +32624,9 @@ var require_strip_absolute_path = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/mode-fix.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/mode-fix.js var require_mode_fix = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/mode-fix.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/mode-fix.js"(exports, module2) { "use strict"; module2.exports = (mode, isDir, portable) => { mode &= 4095; @@ -32644,9 +32649,9 @@ var require_mode_fix = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/write-entry.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/write-entry.js var require_write_entry = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/write-entry.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/write-entry.js"(exports, module2) { "use strict"; var { Minipass } = require_minipass(); var Pax = require_pax(); @@ -33109,9 +33114,9 @@ var require_write_entry = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/pack.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/pack.js var require_pack = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/pack.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/pack.js"(exports, module2) { "use strict"; var PackJob = class { constructor(path11, absolute) { @@ -33467,9 +33472,9 @@ var require_pack = __commonJS({ } }); -// .yarn/cache/fs-minipass-npm-2.1.0-501ef87306-56d19f9a03.zip/node_modules/fs-minipass/index.js +// .yarn/cache/fs-minipass-npm-2.1.0-501ef87306-703d16522b.zip/node_modules/fs-minipass/index.js var require_fs_minipass = __commonJS({ - ".yarn/cache/fs-minipass-npm-2.1.0-501ef87306-56d19f9a03.zip/node_modules/fs-minipass/index.js"(exports) { + ".yarn/cache/fs-minipass-npm-2.1.0-501ef87306-703d16522b.zip/node_modules/fs-minipass/index.js"(exports) { "use strict"; var MiniPass = require_minipass2(); var EE = require("events").EventEmitter; @@ -33842,9 +33847,9 @@ var require_fs_minipass = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/parse.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/parse.js var require_parse2 = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/parse.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/parse.js"(exports, module2) { "use strict"; var warner = require_warn_mixin(); var Header = require_header(); @@ -34243,9 +34248,9 @@ var require_parse2 = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/list.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/list.js var require_list = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/list.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/list.js"(exports, module2) { "use strict"; var hlo = require_high_level_opt(); var Parser = require_parse2(); @@ -34357,9 +34362,9 @@ var require_list = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/create.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/create.js var require_create = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/create.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/create.js"(exports, module2) { "use strict"; var hlo = require_high_level_opt(); var Pack = require_pack(); @@ -34451,9 +34456,9 @@ var require_create = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/replace.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/replace.js var require_replace = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/replace.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/replace.js"(exports, module2) { "use strict"; var hlo = require_high_level_opt(); var Pack = require_pack(); @@ -34667,9 +34672,9 @@ var require_replace = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/update.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/update.js var require_update = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/update.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/update.js"(exports, module2) { "use strict"; var hlo = require_high_level_opt(); var r = require_replace(); @@ -34698,9 +34703,9 @@ var require_update = __commonJS({ } }); -// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/lib/opts-arg.js +// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/lib/opts-arg.js var require_opts_arg = __commonJS({ - ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/lib/opts-arg.js"(exports, module2) { + ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/lib/opts-arg.js"(exports, module2) { var { promisify } = require("util"); var fs8 = require("fs"); var optsArg = (opts) => { @@ -34726,9 +34731,9 @@ var require_opts_arg = __commonJS({ } }); -// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/lib/path-arg.js +// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/lib/path-arg.js var require_path_arg = __commonJS({ - ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/lib/path-arg.js"(exports, module2) { + ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/lib/path-arg.js"(exports, module2) { var platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform; var { resolve, parse } = require("path"); var pathArg = (path10) => { @@ -34758,9 +34763,9 @@ var require_path_arg = __commonJS({ } }); -// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/lib/find-made.js +// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/lib/find-made.js var require_find_made = __commonJS({ - ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/lib/find-made.js"(exports, module2) { + ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/lib/find-made.js"(exports, module2) { var { dirname } = require("path"); var findMade = (opts, parent, path10 = void 0) => { if (path10 === parent) @@ -34784,9 +34789,9 @@ var require_find_made = __commonJS({ } }); -// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/lib/mkdirp-manual.js +// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/lib/mkdirp-manual.js var require_mkdirp_manual = __commonJS({ - ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/lib/mkdirp-manual.js"(exports, module2) { + ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/lib/mkdirp-manual.js"(exports, module2) { var { dirname } = require("path"); var mkdirpManual = (path10, opts, made) => { opts.recursive = false; @@ -34845,9 +34850,9 @@ var require_mkdirp_manual = __commonJS({ } }); -// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/lib/mkdirp-native.js +// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/lib/mkdirp-native.js var require_mkdirp_native = __commonJS({ - ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/lib/mkdirp-native.js"(exports, module2) { + ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/lib/mkdirp-native.js"(exports, module2) { var { dirname } = require("path"); var { findMade, findMadeSync } = require_find_made(); var { mkdirpManual, mkdirpManualSync } = require_mkdirp_manual(); @@ -34883,9 +34888,9 @@ var require_mkdirp_native = __commonJS({ } }); -// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/lib/use-native.js +// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/lib/use-native.js var require_use_native = __commonJS({ - ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/lib/use-native.js"(exports, module2) { + ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/lib/use-native.js"(exports, module2) { var fs8 = require("fs"); var version2 = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version; var versArr = version2.replace(/^v/, "").split("."); @@ -34896,9 +34901,9 @@ var require_use_native = __commonJS({ } }); -// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/index.js +// .yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/index.js var require_mkdirp = __commonJS({ - ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-1233611198.zip/node_modules/mkdirp/index.js"(exports, module2) { + ".yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-46ea0f3ffa.zip/node_modules/mkdirp/index.js"(exports, module2) { var optsArg = require_opts_arg(); var pathArg = require_path_arg(); var { mkdirpNative, mkdirpNativeSync } = require_mkdirp_native(); @@ -34923,9 +34928,9 @@ var require_mkdirp = __commonJS({ } }); -// .yarn/cache/chownr-npm-2.0.0-638f1c9c61-7b240ff920.zip/node_modules/chownr/chownr.js +// .yarn/cache/chownr-npm-2.0.0-638f1c9c61-594754e130.zip/node_modules/chownr/chownr.js var require_chownr = __commonJS({ - ".yarn/cache/chownr-npm-2.0.0-638f1c9c61-7b240ff920.zip/node_modules/chownr/chownr.js"(exports, module2) { + ".yarn/cache/chownr-npm-2.0.0-638f1c9c61-594754e130.zip/node_modules/chownr/chownr.js"(exports, module2) { "use strict"; var fs8 = require("fs"); var path10 = require("path"); @@ -35054,9 +35059,9 @@ var require_chownr = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/mkdir.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/mkdir.js var require_mkdir = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/mkdir.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/mkdir.js"(exports, module2) { "use strict"; var mkdirp = require_mkdirp(); var fs8 = require("fs"); @@ -35246,9 +35251,9 @@ var require_mkdir = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/normalize-unicode.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/normalize-unicode.js var require_normalize_unicode = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/normalize-unicode.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/normalize-unicode.js"(exports, module2) { var normalizeCache = /* @__PURE__ */ Object.create(null); var { hasOwnProperty } = Object.prototype; module2.exports = (s) => { @@ -35260,9 +35265,9 @@ var require_normalize_unicode = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/path-reservations.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/path-reservations.js var require_path_reservations = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/path-reservations.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/path-reservations.js"(exports, module2) { var assert2 = require("assert"); var normalize = require_normalize_unicode(); var stripSlashes = require_strip_trailing_slashes(); @@ -35374,9 +35379,9 @@ var require_path_reservations = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/get-write-flag.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/get-write-flag.js var require_get_write_flag = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/get-write-flag.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/get-write-flag.js"(exports, module2) { var platform = process.env.__FAKE_PLATFORM__ || process.platform; var isWindows = platform === "win32"; var fs8 = global.__FAKE_TESTING_FS__ || require("fs"); @@ -35388,9 +35393,9 @@ var require_get_write_flag = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/unpack.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/unpack.js var require_unpack = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/unpack.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/unpack.js"(exports, module2) { "use strict"; var assert2 = require("assert"); var Parser = require_parse2(); @@ -36070,9 +36075,9 @@ var require_unpack = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/extract.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/extract.js var require_extract = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/lib/extract.js"(exports, module2) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/lib/extract.js"(exports, module2) { "use strict"; var hlo = require_high_level_opt(); var Unpack = require_unpack(); @@ -36155,9 +36160,9 @@ var require_extract = __commonJS({ } }); -// .yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/index.js +// .yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/index.js var require_tar = __commonJS({ - ".yarn/cache/tar-npm-6.1.15-44c3e71720-815c25f881.zip/node_modules/tar/index.js"(exports) { + ".yarn/cache/tar-npm-6.1.15-44c3e71720-bb2babe7b1.zip/node_modules/tar/index.js"(exports) { "use strict"; exports.c = exports.create = require_create(); exports.r = exports.replace = require_replace(); @@ -36175,9 +36180,9 @@ var require_tar = __commonJS({ } }); -// .yarn/cache/v8-compile-cache-npm-2.3.0-961375f150-757e7df6b1.zip/node_modules/v8-compile-cache/v8-compile-cache.js +// .yarn/cache/v8-compile-cache-npm-2.3.0-961375f150-b2d866febf.zip/node_modules/v8-compile-cache/v8-compile-cache.js var require_v8_compile_cache = __commonJS({ - ".yarn/cache/v8-compile-cache-npm-2.3.0-961375f150-757e7df6b1.zip/node_modules/v8-compile-cache/v8-compile-cache.js"(exports, module2) { + ".yarn/cache/v8-compile-cache-npm-2.3.0-961375f150-b2d866febf.zip/node_modules/v8-compile-cache/v8-compile-cache.js"(exports, module2) { "use strict"; var Module2 = require("module"); var crypto = require("crypto"); @@ -36451,9 +36456,9 @@ var require_v8_compile_cache = __commonJS({ } }); -// .yarn/cache/isexe-npm-2.0.0-b58870bd2e-b37fe0a798.zip/node_modules/isexe/windows.js +// .yarn/cache/isexe-npm-2.0.0-b58870bd2e-228cfa503f.zip/node_modules/isexe/windows.js var require_windows = __commonJS({ - ".yarn/cache/isexe-npm-2.0.0-b58870bd2e-b37fe0a798.zip/node_modules/isexe/windows.js"(exports, module2) { + ".yarn/cache/isexe-npm-2.0.0-b58870bd2e-228cfa503f.zip/node_modules/isexe/windows.js"(exports, module2) { module2.exports = isexe; isexe.sync = sync; var fs8 = require("fs"); @@ -36491,9 +36496,9 @@ var require_windows = __commonJS({ } }); -// .yarn/cache/isexe-npm-2.0.0-b58870bd2e-b37fe0a798.zip/node_modules/isexe/mode.js +// .yarn/cache/isexe-npm-2.0.0-b58870bd2e-228cfa503f.zip/node_modules/isexe/mode.js var require_mode = __commonJS({ - ".yarn/cache/isexe-npm-2.0.0-b58870bd2e-b37fe0a798.zip/node_modules/isexe/mode.js"(exports, module2) { + ".yarn/cache/isexe-npm-2.0.0-b58870bd2e-228cfa503f.zip/node_modules/isexe/mode.js"(exports, module2) { module2.exports = isexe; isexe.sync = sync; var fs8 = require("fs"); @@ -36524,9 +36529,9 @@ var require_mode = __commonJS({ } }); -// .yarn/cache/isexe-npm-2.0.0-b58870bd2e-b37fe0a798.zip/node_modules/isexe/index.js +// .yarn/cache/isexe-npm-2.0.0-b58870bd2e-228cfa503f.zip/node_modules/isexe/index.js var require_isexe = __commonJS({ - ".yarn/cache/isexe-npm-2.0.0-b58870bd2e-b37fe0a798.zip/node_modules/isexe/index.js"(exports, module2) { + ".yarn/cache/isexe-npm-2.0.0-b58870bd2e-228cfa503f.zip/node_modules/isexe/index.js"(exports, module2) { var fs8 = require("fs"); var core; if (process.platform === "win32" || global.TESTING_WINDOWS) { @@ -36579,9 +36584,9 @@ var require_isexe = __commonJS({ } }); -// .yarn/cache/which-npm-3.0.1-b2b0f09ace-5c5f879943.zip/node_modules/which/lib/index.js +// .yarn/cache/which-npm-3.0.1-b2b0f09ace-15263b0616.zip/node_modules/which/lib/index.js var require_lib2 = __commonJS({ - ".yarn/cache/which-npm-3.0.1-b2b0f09ace-5c5f879943.zip/node_modules/which/lib/index.js"(exports, module2) { + ".yarn/cache/which-npm-3.0.1-b2b0f09ace-15263b0616.zip/node_modules/which/lib/index.js"(exports, module2) { var isexe = require_isexe(); var { join: join2, delimiter, sep, posix } = require("path"); var isWindows = process.platform === "win32"; @@ -36671,9 +36676,9 @@ var require_lib2 = __commonJS({ } }); -// .yarn/cache/is-windows-npm-1.0.2-898cd6f3d7-ba7ae056a6.zip/node_modules/is-windows/index.js +// .yarn/cache/is-windows-npm-1.0.2-898cd6f3d7-b32f418ab3.zip/node_modules/is-windows/index.js var require_is_windows = __commonJS({ - ".yarn/cache/is-windows-npm-1.0.2-898cd6f3d7-ba7ae056a6.zip/node_modules/is-windows/index.js"(exports, module2) { + ".yarn/cache/is-windows-npm-1.0.2-898cd6f3d7-b32f418ab3.zip/node_modules/is-windows/index.js"(exports, module2) { (function(factory) { if (exports && typeof exports === "object" && typeof module2 !== "undefined") { module2.exports = factory(); @@ -36697,9 +36702,9 @@ var require_is_windows = __commonJS({ } }); -// .yarn/cache/cmd-extension-npm-1.0.2-11aa204c4b-c0f4db69b5.zip/node_modules/cmd-extension/index.js +// .yarn/cache/cmd-extension-npm-1.0.2-11aa204c4b-acdb425d51.zip/node_modules/cmd-extension/index.js var require_cmd_extension = __commonJS({ - ".yarn/cache/cmd-extension-npm-1.0.2-11aa204c4b-c0f4db69b5.zip/node_modules/cmd-extension/index.js"(exports, module2) { + ".yarn/cache/cmd-extension-npm-1.0.2-11aa204c4b-acdb425d51.zip/node_modules/cmd-extension/index.js"(exports, module2) { "use strict"; var path10 = require("path"); var cmdExtension; @@ -36710,9 +36715,9 @@ var require_cmd_extension = __commonJS({ } }); -// .yarn/cache/@zkochan-cmd-shim-npm-6.0.0-97792a7373-bd05b9c123.zip/node_modules/@zkochan/cmd-shim/index.js +// .yarn/cache/@zkochan-cmd-shim-npm-6.0.0-97792a7373-ba1442ba1e.zip/node_modules/@zkochan/cmd-shim/index.js var require_cmd_shim = __commonJS({ - ".yarn/cache/@zkochan-cmd-shim-npm-6.0.0-97792a7373-bd05b9c123.zip/node_modules/@zkochan/cmd-shim/index.js"(exports, module2) { + ".yarn/cache/@zkochan-cmd-shim-npm-6.0.0-97792a7373-ba1442ba1e.zip/node_modules/@zkochan/cmd-shim/index.js"(exports, module2) { "use strict"; cmdShim2.ifExists = cmdShimIfExists; var util_1 = require("util"); @@ -37061,7 +37066,7 @@ __export(lib_exports2, { }); module.exports = __toCommonJS(lib_exports2); -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/constants.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/constants.mjs var NODE_INITIAL = 0; var NODE_SUCCESS = 1; var NODE_ERRORED = 2; @@ -37074,7 +37079,7 @@ var BATCH_REGEX = /^-[a-zA-Z]{2,}$/; var BINDING_REGEX = /^([^=]+)=([\s\S]*)$/; var DEBUG = process.env.DEBUG_CLI === `1`; -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/errors.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/errors.mjs var UsageError = class extends Error { constructor(message) { super(message); @@ -37143,7 +37148,7 @@ var whileRunning = (input) => `While running ${input.filter((token) => { } }).join(` `)}`; -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/format.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/format.mjs var MAX_LINE_LENGTH = 80; var richLine = Array(MAX_LINE_LENGTH).fill(`\u2501`); for (let t = 0; t <= 24; ++t) @@ -37202,7 +37207,7 @@ function formatMarkdownish(text, { format, paragraphs }) { ` : ``; } -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/options/utils.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/options/utils.mjs var isOptionSymbol = Symbol(`clipanion/isOption`); function makeCommandOption(spec) { return { ...spec, [isOptionSymbol]: true }; @@ -37253,7 +37258,7 @@ function applyValidator(name, value, validator) { return value; } -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/Command.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/Command.mjs var Command = class { constructor() { this.help = false; @@ -37300,7 +37305,7 @@ var Command = class { Command.isOption = isOptionSymbol; Command.Default = []; -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/core.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/core.mjs function debug(str) { if (DEBUG) { console.log(str); @@ -38049,7 +38054,7 @@ var CliBuilder = class { } }; -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/platform/node.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/platform/node.mjs var import_tty = __toESM(require("tty"), 1); function getDefaultColorDepth() { if (import_tty.default && `getColorDepth` in import_tty.default.WriteStream.prototype) @@ -38090,7 +38095,7 @@ function getCaptureActivator(context) { }; } -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/HelpCommand.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/HelpCommand.mjs var HelpCommand = class extends Command { constructor(contexts) { super(); @@ -38140,7 +38145,7 @@ var HelpCommand = class extends Command { } }; -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/Cli.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/Cli.mjs var errorCommandSymbol = Symbol(`clipanion/errorCommand`); var Cli = class { constructor({ binaryLabel, binaryName: binaryNameOpt = `...`, binaryVersion, enableCapture = false, enableColors } = {}) { @@ -38492,7 +38497,7 @@ function noopCaptureActivator(fn2) { return fn2(); } -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/builtins/index.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/builtins/index.mjs var builtins_exports = {}; __export(builtins_exports, { DefinitionsCommand: () => DefinitionsCommand, @@ -38500,7 +38505,7 @@ __export(builtins_exports, { VersionCommand: () => VersionCommand }); -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/builtins/definitions.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/builtins/definitions.mjs var DefinitionsCommand = class extends Command { async execute() { this.context.stdout.write(`${JSON.stringify(this.cli.definitions(), null, 2)} @@ -38509,7 +38514,7 @@ var DefinitionsCommand = class extends Command { }; DefinitionsCommand.paths = [[`--clipanion=definitions`]]; -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/builtins/help.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/builtins/help.mjs var HelpCommand2 = class extends Command { async execute() { this.context.stdout.write(this.cli.usage()); @@ -38517,7 +38522,7 @@ var HelpCommand2 = class extends Command { }; HelpCommand2.paths = [[`-h`], [`--help`]]; -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/builtins/version.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/builtins/version.mjs var VersionCommand = class extends Command { async execute() { var _a; @@ -38527,7 +38532,7 @@ var VersionCommand = class extends Command { }; VersionCommand.paths = [[`-v`], [`--version`]]; -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/options/index.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/options/index.mjs var options_exports = {}; __export(options_exports, { Array: () => Array2, @@ -38544,7 +38549,7 @@ __export(options_exports, { rerouteArguments: () => rerouteArguments }); -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/options/Array.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/options/Array.mjs function Array2(descriptor, initialValueBase, optsBase) { const [initialValue, opts] = rerouteArguments(initialValueBase, optsBase !== null && optsBase !== void 0 ? optsBase : {}); const { arity = 1 } = opts; @@ -38579,7 +38584,7 @@ function Array2(descriptor, initialValueBase, optsBase) { }); } -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/options/Boolean.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/options/Boolean.mjs function Boolean2(descriptor, initialValueBase, optsBase) { const [initialValue, opts] = rerouteArguments(initialValueBase, optsBase !== null && optsBase !== void 0 ? optsBase : {}); const optNames = descriptor.split(`,`); @@ -38607,7 +38612,7 @@ function Boolean2(descriptor, initialValueBase, optsBase) { }); } -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/options/Counter.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/options/Counter.mjs function Counter(descriptor, initialValueBase, optsBase) { const [initialValue, opts] = rerouteArguments(initialValueBase, optsBase !== null && optsBase !== void 0 ? optsBase : {}); const optNames = descriptor.split(`,`); @@ -38640,7 +38645,7 @@ function Counter(descriptor, initialValueBase, optsBase) { }); } -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/options/Proxy.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/options/Proxy.mjs function Proxy2(opts = {}) { return makeCommandOption({ definition(builder, key) { @@ -38656,7 +38661,7 @@ function Proxy2(opts = {}) { }); } -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/options/Rest.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/options/Rest.mjs function Rest(opts = {}) { return makeCommandOption({ definition(builder, key) { @@ -38683,7 +38688,7 @@ function Rest(opts = {}) { }); } -// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fb3428b745.zip/node_modules/clipanion/lib/advanced/options/String.mjs +// .yarn/__virtual__/clipanion-virtual-cc0a4bf4ff/0/cache/clipanion-npm-3.2.0-8b68f8056b-fcc3d44145.zip/node_modules/clipanion/lib/advanced/options/String.mjs function StringOption(descriptor, initialValueBase, optsBase) { const [initialValue, opts] = rerouteArguments(initialValueBase, optsBase !== null && optsBase !== void 0 ? optsBase : {}); const { arity = 1 } = opts; @@ -38755,7 +38760,7 @@ function String2(descriptor, ...args) { } // package.json -var version = "0.20.0"; +var version = "0.21.0"; // sources/Engine.ts var import_fs3 = __toESM(require("fs")); @@ -38767,7 +38772,7 @@ var import_semver3 = __toESM(require_semver2()); var config_default = { definitions: { npm: { - default: "9.8.1+sha1.b8f070cc770128b38017160491504184863329f0", + default: "10.2.0+sha1.2e4f7aba9cd913de8747d45b3dd5fb43615a4139", fetchLatestFrom: { type: "npm", package: "npm" @@ -38795,13 +38800,16 @@ var config_default = { package: "npm" }, commands: { - use: ["npm", "install"] + use: [ + "npm", + "install" + ] } } } }, pnpm: { - default: "8.6.12+sha1.a2f983fbf8f2531dc85db2a5d7f398063d51a6f3", + default: "8.8.0+sha1.9922e8b650d393700209ccd81e0ebdbcbe43b0d3", fetchLatestFrom: { type: "npm", package: "pnpm" @@ -38833,7 +38841,10 @@ var config_default = { package: "pnpm" }, commands: { - use: ["pnpm", "install"] + use: [ + "pnpm", + "install" + ] } }, ">=6.0.0": { @@ -38847,7 +38858,10 @@ var config_default = { package: "pnpm" }, commands: { - use: ["pnpm", "install"] + use: [ + "pnpm", + "install" + ] } } } @@ -38859,7 +38873,7 @@ var config_default = { package: "yarn" }, transparent: { - default: "3.6.3+sha224.524038cfca4ec8b2d45164c9c13f05e57a7d762f30542a8d647f69e3", + default: "3.6.4+sha224.4b0b0a9cf41b177779b701850108387d3189ba7c93bd1a535fafbf72", commands: [ [ "yarn", @@ -38879,7 +38893,10 @@ var config_default = { package: "yarn" }, commands: { - use: ["yarn", "install"] + use: [ + "yarn", + "install" + ] } }, ">=2.0.0": { @@ -38898,7 +38915,10 @@ var config_default = { } }, commands: { - use: ["yarn", "install"] + use: [ + "yarn", + "install" + ] } } } @@ -39400,13 +39420,10 @@ var import_fs4 = __toESM(require("fs")); var import_path4 = __toESM(require("path")); var import_which = __toESM(require_lib2()); var DisableCommand = class extends Command { - constructor() { - super(...arguments); - this.installDirectory = options_exports.String(`--install-directory`, { - description: `Where the shims are located` - }); - this.names = options_exports.Rest(); - } + installDirectory = options_exports.String(`--install-directory`, { + description: `Where the shims are located` + }); + names = options_exports.Rest(); async execute() { let installDirectory = this.installDirectory; if (typeof installDirectory === `undefined`) @@ -39447,10 +39464,10 @@ var DisableCommand = class extends Command { } } }; -DisableCommand.paths = [ +__publicField(DisableCommand, "paths", [ [`disable`] -]; -DisableCommand.usage = Command.Usage({ +]); +__publicField(DisableCommand, "usage", Command.Usage({ description: `Remove the Corepack shims from the install directory`, details: ` When run, this command will remove the shims for the specified package managers from the install directory, or all shims if no parameters are passed. @@ -39467,7 +39484,7 @@ DisableCommand.usage = Command.Usage({ `Disable the Yarn shim only`, `$0 disable yarn` ]] -}); +})); // sources/commands/Enable.ts var import_cmd_shim = __toESM(require_cmd_shim()); @@ -39475,13 +39492,10 @@ var import_fs5 = __toESM(require("fs")); var import_path5 = __toESM(require("path")); var import_which2 = __toESM(require_lib2()); var EnableCommand = class extends Command { - constructor() { - super(...arguments); - this.installDirectory = options_exports.String(`--install-directory`, { - description: `Where the shims are to be installed` - }); - this.names = options_exports.Rest(); - } + installDirectory = options_exports.String(`--install-directory`, { + description: `Where the shims are to be installed` + }); + names = options_exports.Rest(); async execute() { let installDirectory = this.installDirectory; if (typeof installDirectory === `undefined`) @@ -39524,10 +39538,10 @@ var EnableCommand = class extends Command { }); } }; -EnableCommand.paths = [ +__publicField(EnableCommand, "paths", [ [`enable`] -]; -EnableCommand.usage = Command.Usage({ +]); +__publicField(EnableCommand, "usage", Command.Usage({ description: `Add the Corepack shims to the install directories`, details: ` When run, this commmand will check whether the shims for the specified package managers can be found with the correct values inside the install directory. If not, or if they don't exist, they will be created. @@ -39544,7 +39558,7 @@ EnableCommand.usage = Command.Usage({ `Enable the Yarn shim only`, `$0 enable yarn` ]] -}); +})); // sources/commands/InstallGlobal.ts var import_fs8 = __toESM(require("fs")); @@ -39716,19 +39730,16 @@ var BaseCommand = class extends Command { // sources/commands/InstallGlobal.ts var InstallGlobalCommand = class extends BaseCommand { - constructor() { - super(...arguments); - this.global = options_exports.Boolean(`-g,--global`, { - required: true - }); - this.all = options_exports.Boolean(`--all`, false, { - description: `If true, all available default package managers will be installed` - }); - this.cacheOnly = options_exports.Boolean(`--cache-only`, false, { - description: `If true, the package managers will only be cached, not set as new defaults` - }); - this.args = options_exports.Rest(); - } + global = options_exports.Boolean(`-g,--global`, { + required: true + }); + all = options_exports.Boolean(`--all`, false, { + description: `If true, all available default package managers will be installed` + }); + cacheOnly = options_exports.Boolean(`--cache-only`, false, { + description: `If true, the package managers will only be cached, not set as new defaults` + }); + args = options_exports.Rest(); async execute() { if (this.args.length === 0 && !this.all) throw new UsageError(`No package managers specified; use --all to install all available package managers, or specify one or more package managers to proceed`); @@ -39799,10 +39810,10 @@ var InstallGlobalCommand = class extends BaseCommand { } } }; -InstallGlobalCommand.paths = [ +__publicField(InstallGlobalCommand, "paths", [ [`install`] -]; -InstallGlobalCommand.usage = Command.Usage({ +]); +__publicField(InstallGlobalCommand, "usage", Command.Usage({ description: `Install package managers on the system`, details: ` Download the selected package managers and install them on the system. @@ -39816,7 +39827,7 @@ InstallGlobalCommand.usage = Command.Usage({ `Install the latest version of all available package managers, and make them globally available`, `corepack install -g --all` ]] -}); +})); // sources/commands/InstallLocal.ts var InstallLocalCommand = class extends BaseCommand { @@ -39833,10 +39844,10 @@ var InstallLocalCommand = class extends BaseCommand { await this.context.engine.ensurePackageManager(resolved); } }; -InstallLocalCommand.paths = [ +__publicField(InstallLocalCommand, "paths", [ [`install`] -]; -InstallLocalCommand.usage = Command.Usage({ +]); +__publicField(InstallLocalCommand, "usage", Command.Usage({ description: `Install the package manager configured in the local project`, details: ` Download and install the package manager configured in the local project. This command doesn't change the global version used when running the package manager from outside the project (use the \`-g,--global\` flag if you wish to do this). @@ -39845,25 +39856,22 @@ InstallLocalCommand.usage = Command.Usage({ `Install the project's package manager in the cache`, `corepack install` ]] -}); +})); // sources/commands/Pack.ts var import_promises2 = require("fs/promises"); var import_path8 = __toESM(require("path")); var PackCommand = class extends BaseCommand { - constructor() { - super(...arguments); - this.all = options_exports.Boolean(`--all`, false, { - description: `If true, all available default package managers will be installed` - }); - this.json = options_exports.Boolean(`--json`, false, { - description: `If true, the path to the generated tarball will be printed on stdout` - }); - this.output = options_exports.String(`-o,--output`, { - description: `Where the tarball should be generated; by default "corepack.tgz"` - }); - this.patterns = options_exports.Rest(); - } + all = options_exports.Boolean(`--all`, false, { + description: `If true, all available default package managers will be installed` + }); + json = options_exports.Boolean(`--json`, false, { + description: `If true, the path to the generated tarball will be printed on stdout` + }); + output = options_exports.String(`-o,--output`, { + description: `Where the tarball should be generated; by default "corepack.tgz"` + }); + patterns = options_exports.Rest(); async execute() { const descriptors = await this.resolvePatternsToDescriptors({ all: this.all, @@ -39902,10 +39910,10 @@ var PackCommand = class extends BaseCommand { } } }; -PackCommand.paths = [ +__publicField(PackCommand, "paths", [ [`pack`] -]; -PackCommand.usage = Command.Usage({ +]); +__publicField(PackCommand, "usage", Command.Usage({ description: `Store package managers in a tarball`, details: ` Download the selected package managers and store them inside a tarball suitable for use with \`corepack install -g\`. @@ -39920,7 +39928,7 @@ PackCommand.usage = Command.Usage({ `Pack the latest versions of all supported package managers inside a file named everything.tgz`, `corepack pack --all -o everything.tgz` ]] -}); +})); // sources/commands/Up.ts var import_semver5 = __toESM(require_semver2()); @@ -39946,10 +39954,10 @@ var UpCommand = class extends BaseCommand { await this.setLocalPackageManager(packageManagerInfo); } }; -UpCommand.paths = [ +__publicField(UpCommand, "paths", [ [`up`] -]; -UpCommand.usage = Command.Usage({ +]); +__publicField(UpCommand, "usage", Command.Usage({ description: `Update the package manager used in the current project`, details: ` Retrieve the latest available version for the current major release line @@ -39965,14 +39973,11 @@ UpCommand.usage = Command.Usage({ `Configure the project to use the latest Yarn release`, `corepack up` ]] -}); +})); // sources/commands/Use.ts var UseCommand = class extends BaseCommand { - constructor() { - super(...arguments); - this.pattern = options_exports.String(); - } + pattern = options_exports.String(); async execute() { const [descriptor] = await this.resolvePatternsToDescriptors({ all: false, @@ -39987,10 +39992,10 @@ var UseCommand = class extends BaseCommand { await this.setLocalPackageManager(packageManagerInfo); } }; -UseCommand.paths = [ +__publicField(UseCommand, "paths", [ [`use`] -]; -UseCommand.usage = Command.Usage({ +]); +__publicField(UseCommand, "usage", Command.Usage({ description: `Define the package manager to use for the current project`, details: ` When run, this command will retrieve the latest release matching the @@ -40001,19 +40006,16 @@ UseCommand.usage = Command.Usage({ `Configure the project to use the latest Yarn release`, `corepack use 'yarn@*'` ]] -}); +})); // sources/commands/deprecated/Hydrate.ts var import_promises3 = require("fs/promises"); var import_path9 = __toESM(require("path")); var HydrateCommand = class extends Command { - constructor() { - super(...arguments); - this.activate = options_exports.Boolean(`--activate`, false, { - description: `If true, this release will become the default one for this package manager` - }); - this.fileName = options_exports.String(); - } + activate = options_exports.Boolean(`--activate`, false, { + description: `If true, this release will become the default one for this package manager` + }); + fileName = options_exports.String(); async execute() { const installFolder = getInstallFolder(); const fileName = import_path9.default.resolve(this.context.cwd, this.fileName); @@ -40054,31 +40056,28 @@ var HydrateCommand = class extends Command { `); } }; -HydrateCommand.paths = [ +__publicField(HydrateCommand, "paths", [ [`hydrate`] -]; +]); // sources/commands/deprecated/Prepare.ts var import_promises4 = require("fs/promises"); var import_path10 = __toESM(require("path")); var PrepareCommand = class extends Command { - constructor() { - super(...arguments); - this.activate = options_exports.Boolean(`--activate`, false, { - description: `If true, this release will become the default one for this package manager` - }); - this.all = options_exports.Boolean(`--all`, false, { - description: `If true, all available default package managers will be installed` - }); - this.json = options_exports.Boolean(`--json`, false, { - description: `If true, the output will be the path of the generated tarball` - }); - this.output = options_exports.String(`-o,--output`, { - description: `If true, the installed package managers will also be stored in a tarball`, - tolerateBoolean: true - }); - this.specs = options_exports.Rest(); - } + activate = options_exports.Boolean(`--activate`, false, { + description: `If true, this release will become the default one for this package manager` + }); + all = options_exports.Boolean(`--all`, false, { + description: `If true, all available default package managers will be installed` + }); + json = options_exports.Boolean(`--json`, false, { + description: `If true, the output will be the path of the generated tarball` + }); + output = options_exports.String(`-o,--output`, { + description: `If true, the installed package managers will also be stored in a tarball`, + tolerateBoolean: true + }); + specs = options_exports.Rest(); async execute() { if (this.all && this.specs.length > 0) throw new UsageError(`The --all option cannot be used along with an explicit package manager specification`); @@ -40138,9 +40137,9 @@ var PrepareCommand = class extends Command { } } }; -PrepareCommand.paths = [ +__publicField(PrepareCommand, "paths", [ [`prepare`] -]; +]); // sources/miscUtils.ts var Cancellation = class extends Error { @@ -40233,10 +40232,7 @@ async function runMain(argv) { binaryVersion: `corepack/${version}` }); cli.register(class BinaryCommand extends Command { - constructor() { - super(...arguments); - this.proxy = options_exports.Proxy(); - } + proxy = options_exports.Proxy(); async execute() { return executePackageManagerRequest(request, this.proxy, this.context); } diff --git a/deps/corepack/package.json b/deps/corepack/package.json index dc168d9389b1aa..8ffbde7ca15efa 100644 --- a/deps/corepack/package.json +++ b/deps/corepack/package.json @@ -1,6 +1,6 @@ { "name": "corepack", - "version": "0.20.0", + "version": "0.21.0", "homepage": "https://github.com/nodejs/corepack#readme", "bugs": { "url": "https://github.com/nodejs/corepack/issues" @@ -10,13 +10,13 @@ "url": "https://github.com/nodejs/corepack.git" }, "engines": { - "node": ">=16.20.0" + "node": ">=18.17.1" }, "exports": { "./package.json": "./package.json" }, "license": "MIT", - "packageManager": "yarn@4.0.0-rc.44+sha224.6526204ca38ed0105e81ba52d83dc0c7b8ee63600a13dc332914fde0", + "packageManager": "yarn@4.0.0-rc.50+sha256.6663791fa05e15176880da500c334caf1699541f834302e6df085d20ef06069d", "devDependencies": { "@babel/core": "^7.14.3", "@babel/plugin-transform-modules-commonjs": "^7.14.0", @@ -52,7 +52,7 @@ }, "scripts": { "build": "rm -rf dist shims && run build:bundle && ts-node ./mkshims.ts", - "build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node16.20.0 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'", + "build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node18.17.0 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'", "corepack": "ts-node ./sources/_cli.ts", "lint": "eslint .", "prepack": "yarn build", diff --git a/deps/googletest/include/gtest/gtest-message.h b/deps/googletest/include/gtest/gtest-message.h index 59b805e4e4622c..448ac6b7ee2e09 100644 --- a/deps/googletest/include/gtest/gtest-message.h +++ b/deps/googletest/include/gtest/gtest-message.h @@ -59,7 +59,7 @@ #ifdef GTEST_HAS_ABSL #include -#include "absl/strings/internal/has_absl_stringify.h" +#include "absl/strings/has_absl_stringify.h" #include "absl/strings/str_cat.h" #endif // GTEST_HAS_ABSL @@ -121,14 +121,14 @@ class GTEST_API_ Message { // Streams a non-pointer value to this object. If building a version of // GoogleTest with ABSL, this overload is only enabled if the value does not // have an AbslStringify definition. - template ::value, // NOLINT - int>::type = 0 + , + typename std::enable_if::value, // NOLINT + int>::type = 0 #endif // GTEST_HAS_ABSL - > + > inline Message& operator<<(const T& val) { // Some libraries overload << for STL containers. These // overloads are defined in the global namespace instead of ::std. @@ -153,9 +153,8 @@ class GTEST_API_ Message { // Streams a non-pointer value with an AbslStringify definition to this // object. template ::value, // NOLINT - int>::type = 0> + typename std::enable_if::value, // NOLINT + int>::type = 0> inline Message& operator<<(const T& val) { // ::operator<< is needed here for a similar reason as with the non-Abseil // version above diff --git a/deps/googletest/include/gtest/gtest-printers.h b/deps/googletest/include/gtest/gtest-printers.h index 9ccbff7da454b5..1b12ef683c13bd 100644 --- a/deps/googletest/include/gtest/gtest-printers.h +++ b/deps/googletest/include/gtest/gtest-printers.h @@ -116,7 +116,7 @@ #include #ifdef GTEST_HAS_ABSL -#include "absl/strings/internal/has_absl_stringify.h" +#include "absl/strings/has_absl_stringify.h" #include "absl/strings/str_cat.h" #endif // GTEST_HAS_ABSL #include "gtest/internal/gtest-internal.h" @@ -292,10 +292,9 @@ struct ConvertibleToStringViewPrinter { #ifdef GTEST_HAS_ABSL struct ConvertibleToAbslStringifyPrinter { - template < - typename T, - typename = typename std::enable_if< - absl::strings_internal::HasAbslStringify::value>::type> // NOLINT + template ::value>::type> // NOLINT static void PrintValue(const T& value, ::std::ostream* os) { *os << absl::StrCat(value); } diff --git a/deps/googletest/include/gtest/internal/gtest-port.h b/deps/googletest/include/gtest/internal/gtest-port.h index 35544a08a65aae..d061a49b9f411b 100644 --- a/deps/googletest/include/gtest/internal/gtest-port.h +++ b/deps/googletest/include/gtest/internal/gtest-port.h @@ -281,6 +281,22 @@ #error C++ versions less than C++14 are not supported. #endif +// MSVC >= 19.11 (VS 2017 Update 3) supports __has_include. +#ifdef __has_include +#define GTEST_INTERNAL_HAS_INCLUDE __has_include +#else +#define GTEST_INTERNAL_HAS_INCLUDE(...) 0 +#endif + +// Detect C++ feature test macros as gracefully as possible. +// MSVC >= 19.15, Clang >= 3.4.1, and GCC >= 4.1.2 support feature test macros. +#if GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L && \ + (!defined(__has_include) || GTEST_INTERNAL_HAS_INCLUDE()) +#include // C++20 and later +#elif (!defined(__has_include) || GTEST_INTERNAL_HAS_INCLUDE()) +#include // Pre-C++20 +#endif + #include // for isspace, etc #include // for ptrdiff_t #include @@ -829,9 +845,9 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; #ifndef GTEST_API_ #ifdef _MSC_VER -#if GTEST_LINKED_AS_SHARED_LIBRARY +#if defined(GTEST_LINKED_AS_SHARED_LIBRARY) && GTEST_LINKED_AS_SHARED_LIBRARY #define GTEST_API_ __declspec(dllimport) -#elif GTEST_CREATE_SHARED_LIBRARY +#elif defined(GTEST_CREATE_SHARED_LIBRARY) && GTEST_CREATE_SHARED_LIBRARY #define GTEST_API_ __declspec(dllexport) #endif #elif GTEST_HAVE_ATTRIBUTE_(visibility) @@ -2351,9 +2367,9 @@ using Any = ::absl::any; } // namespace internal } // namespace testing #else -#ifdef __has_include -#if __has_include() && GTEST_INTERNAL_CPLUSPLUS_LANG >= 201703L && \ - (!defined(_MSC_VER) || GTEST_HAS_RTTI) +#if defined(__cpp_lib_any) || (GTEST_INTERNAL_HAS_INCLUDE() && \ + GTEST_INTERNAL_CPLUSPLUS_LANG >= 201703L && \ + (!defined(_MSC_VER) || GTEST_HAS_RTTI)) // Otherwise for C++17 and higher use std::any for UniversalPrinter<> // specializations. #define GTEST_INTERNAL_HAS_ANY 1 @@ -2365,8 +2381,7 @@ using Any = ::std::any; } // namespace testing // The case where absl is configured NOT to alias std::any is not // supported. -#endif // __has_include() && GTEST_INTERNAL_CPLUSPLUS_LANG >= 201703L -#endif // __has_include +#endif // __cpp_lib_any #endif // GTEST_HAS_ABSL #ifndef GTEST_INTERNAL_HAS_ANY @@ -2386,8 +2401,8 @@ inline ::absl::nullopt_t Nullopt() { return ::absl::nullopt; } } // namespace internal } // namespace testing #else -#ifdef __has_include -#if __has_include() && GTEST_INTERNAL_CPLUSPLUS_LANG >= 201703L +#if defined(__cpp_lib_optional) || (GTEST_INTERNAL_HAS_INCLUDE() && \ + GTEST_INTERNAL_CPLUSPLUS_LANG >= 201703L) // Otherwise for C++17 and higher use std::optional for UniversalPrinter<> // specializations. #define GTEST_INTERNAL_HAS_OPTIONAL 1 @@ -2401,19 +2416,17 @@ inline ::std::nullopt_t Nullopt() { return ::std::nullopt; } } // namespace testing // The case where absl is configured NOT to alias std::optional is not // supported. -#endif // __has_include() && GTEST_INTERNAL_CPLUSPLUS_LANG >= 201703L -#endif // __has_include +#endif // __cpp_lib_optional #endif // GTEST_HAS_ABSL #ifndef GTEST_INTERNAL_HAS_OPTIONAL #define GTEST_INTERNAL_HAS_OPTIONAL 0 #endif -#ifdef __has_include -#if __has_include() && GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L +#if defined(__cpp_lib_span) || (GTEST_INTERNAL_HAS_INCLUDE() && \ + GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L) #define GTEST_INTERNAL_HAS_STD_SPAN 1 -#endif // __has_include() && GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L -#endif // __has_include +#endif // __cpp_lib_span #ifndef GTEST_INTERNAL_HAS_STD_SPAN #define GTEST_INTERNAL_HAS_STD_SPAN 0 @@ -2430,8 +2443,9 @@ using StringView = ::absl::string_view; } // namespace internal } // namespace testing #else -#ifdef __has_include -#if __has_include() && GTEST_INTERNAL_CPLUSPLUS_LANG >= 201703L +#if defined(__cpp_lib_string_view) || \ + (GTEST_INTERNAL_HAS_INCLUDE() && \ + GTEST_INTERNAL_CPLUSPLUS_LANG >= 201703L) // Otherwise for C++17 and higher use std::string_view for Matcher<> // specializations. #define GTEST_INTERNAL_HAS_STRING_VIEW 1 @@ -2443,9 +2457,7 @@ using StringView = ::std::string_view; } // namespace testing // The case where absl is configured NOT to alias std::string_view is not // supported. -#endif // __has_include() && GTEST_INTERNAL_CPLUSPLUS_LANG >= - // 201703L -#endif // __has_include +#endif // __cpp_lib_string_view #endif // GTEST_HAS_ABSL #ifndef GTEST_INTERNAL_HAS_STRING_VIEW @@ -2464,8 +2476,8 @@ using Variant = ::absl::variant; } // namespace internal } // namespace testing #else -#ifdef __has_include -#if __has_include() && GTEST_INTERNAL_CPLUSPLUS_LANG >= 201703L +#if defined(__cpp_lib_variant) || (GTEST_INTERNAL_HAS_INCLUDE() && \ + GTEST_INTERNAL_CPLUSPLUS_LANG >= 201703L) // Otherwise for C++17 and higher use std::variant for UniversalPrinter<> // specializations. #define GTEST_INTERNAL_HAS_VARIANT 1 @@ -2477,16 +2489,16 @@ using Variant = ::std::variant; } // namespace internal } // namespace testing // The case where absl is configured NOT to alias std::variant is not supported. -#endif // __has_include() && GTEST_INTERNAL_CPLUSPLUS_LANG >= 201703L -#endif // __has_include +#endif // __cpp_lib_variant #endif // GTEST_HAS_ABSL #ifndef GTEST_INTERNAL_HAS_VARIANT #define GTEST_INTERNAL_HAS_VARIANT 0 #endif -#if defined(GTEST_INTERNAL_CPLUSPLUS_LANG) && \ - GTEST_INTERNAL_CPLUSPLUS_LANG < 201703L +#if (defined(__cpp_constexpr) && !defined(__cpp_inline_variables)) || \ + (defined(GTEST_INTERNAL_CPLUSPLUS_LANG) && \ + GTEST_INTERNAL_CPLUSPLUS_LANG < 201703L) #define GTEST_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL 1 #endif diff --git a/deps/googletest/src/gtest-filepath.cc b/deps/googletest/src/gtest-filepath.cc index 513e947f5703ea..902d8c7f64b7c4 100644 --- a/deps/googletest/src/gtest-filepath.cc +++ b/deps/googletest/src/gtest-filepath.cc @@ -336,7 +336,7 @@ bool FilePath::CreateDirectoriesRecursively() const { return false; } - if (pathname_.length() == 0 || this->DirectoryExists()) { + if (pathname_.empty() || this->DirectoryExists()) { return true; } diff --git a/deps/googletest/src/gtest-port.cc b/deps/googletest/src/gtest-port.cc index e9d12d92e7cb5a..3bb7dd450812d5 100644 --- a/deps/googletest/src/gtest-port.cc +++ b/deps/googletest/src/gtest-port.cc @@ -697,13 +697,24 @@ bool RE::PartialMatch(const char* str, const RE& re) { void RE::Init(const char* regex) { pattern_ = regex; + // NetBSD (and Android, which takes its regex implemntation from NetBSD) does + // not include the GNU regex extensions (such as Perl style character classes + // like \w) in REG_EXTENDED. REG_EXTENDED is only specified to include the + // [[:alpha:]] style character classes. Enable REG_GNU wherever it is defined + // so users can use those extensions. +#if defined(REG_GNU) + constexpr int reg_flags = REG_EXTENDED | REG_GNU; +#else + constexpr int reg_flags = REG_EXTENDED; +#endif + // Reserves enough bytes to hold the regular expression used for a // full match. const size_t full_regex_len = strlen(regex) + 10; char* const full_pattern = new char[full_regex_len]; snprintf(full_pattern, full_regex_len, "^(%s)$", regex); - is_valid_ = regcomp(&full_regex_, full_pattern, REG_EXTENDED) == 0; + is_valid_ = regcomp(&full_regex_, full_pattern, reg_flags) == 0; // We want to call regcomp(&partial_regex_, ...) even if the // previous expression returns false. Otherwise partial_regex_ may // not be properly initialized can may cause trouble when it's @@ -714,7 +725,7 @@ void RE::Init(const char* regex) { // regex. We change it to an equivalent form "()" to be safe. if (is_valid_) { const char* const partial_regex = (*regex == '\0') ? "()" : regex; - is_valid_ = regcomp(&partial_regex_, partial_regex, REG_EXTENDED) == 0; + is_valid_ = regcomp(&partial_regex_, partial_regex, reg_flags) == 0; } EXPECT_TRUE(is_valid_) << "Regular expression \"" << regex diff --git a/deps/googletest/src/gtest.cc b/deps/googletest/src/gtest.cc index 62dfef664e6836..99b22ed327fd91 100644 --- a/deps/googletest/src/gtest.cc +++ b/deps/googletest/src/gtest.cc @@ -5400,7 +5400,7 @@ void UnitTest::RecordProperty(const std::string& key, int UnitTest::Run() { #ifdef GTEST_HAS_DEATH_TEST const bool in_death_test_child_process = - GTEST_FLAG_GET(internal_run_death_test).length() > 0; + !GTEST_FLAG_GET(internal_run_death_test).empty(); // Google Test implements this protocol for catching that a test // program exits before returning control to Google Test: diff --git a/deps/nghttp2/lib/CMakeLists.txt b/deps/nghttp2/lib/CMakeLists.txt index fad04716ffafb7..7adba3a3ffa2da 100644 --- a/deps/nghttp2/lib/CMakeLists.txt +++ b/deps/nghttp2/lib/CMakeLists.txt @@ -24,6 +24,8 @@ set(NGHTTP2_SOURCES nghttp2_http.c nghttp2_rcbuf.c nghttp2_extpri.c + nghttp2_ratelim.c + nghttp2_time.c nghttp2_debug.c sfparse.c ) diff --git a/deps/nghttp2/lib/Makefile.am b/deps/nghttp2/lib/Makefile.am index cd928ae465501f..c3ace4029a69b8 100644 --- a/deps/nghttp2/lib/Makefile.am +++ b/deps/nghttp2/lib/Makefile.am @@ -51,6 +51,8 @@ OBJECTS = nghttp2_pq.c nghttp2_map.c nghttp2_queue.c \ nghttp2_http.c \ nghttp2_rcbuf.c \ nghttp2_extpri.c \ + nghttp2_ratelim.c \ + nghttp2_time.c \ nghttp2_debug.c \ sfparse.c @@ -69,6 +71,8 @@ HFILES = nghttp2_pq.h nghttp2_int.h nghttp2_map.h nghttp2_queue.h \ nghttp2_http.h \ nghttp2_rcbuf.h \ nghttp2_extpri.h \ + nghttp2_ratelim.h \ + nghttp2_time.h \ nghttp2_debug.h \ sfparse.h diff --git a/deps/nghttp2/lib/Makefile.in b/deps/nghttp2/lib/Makefile.in index 24a6cc468ed773..0b95613bc21808 100644 --- a/deps/nghttp2/lib/Makefile.in +++ b/deps/nghttp2/lib/Makefile.in @@ -157,7 +157,8 @@ am__objects_2 = nghttp2_pq.lo nghttp2_map.lo nghttp2_queue.lo \ nghttp2_hd_huffman.lo nghttp2_hd_huffman_data.lo \ nghttp2_version.lo nghttp2_priority_spec.lo nghttp2_option.lo \ nghttp2_callbacks.lo nghttp2_mem.lo nghttp2_http.lo \ - nghttp2_rcbuf.lo nghttp2_extpri.lo nghttp2_debug.lo sfparse.lo + nghttp2_rcbuf.lo nghttp2_extpri.lo nghttp2_ratelim.lo \ + nghttp2_time.lo nghttp2_debug.lo sfparse.lo am_libnghttp2_la_OBJECTS = $(am__objects_1) $(am__objects_2) libnghttp2_la_OBJECTS = $(am_libnghttp2_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -194,9 +195,10 @@ am__depfiles_remade = ./$(DEPDIR)/nghttp2_buf.Plo \ ./$(DEPDIR)/nghttp2_outbound_item.Plo \ ./$(DEPDIR)/nghttp2_pq.Plo \ ./$(DEPDIR)/nghttp2_priority_spec.Plo \ - ./$(DEPDIR)/nghttp2_queue.Plo ./$(DEPDIR)/nghttp2_rcbuf.Plo \ - ./$(DEPDIR)/nghttp2_session.Plo ./$(DEPDIR)/nghttp2_stream.Plo \ - ./$(DEPDIR)/nghttp2_submit.Plo ./$(DEPDIR)/nghttp2_version.Plo \ + ./$(DEPDIR)/nghttp2_queue.Plo ./$(DEPDIR)/nghttp2_ratelim.Plo \ + ./$(DEPDIR)/nghttp2_rcbuf.Plo ./$(DEPDIR)/nghttp2_session.Plo \ + ./$(DEPDIR)/nghttp2_stream.Plo ./$(DEPDIR)/nghttp2_submit.Plo \ + ./$(DEPDIR)/nghttp2_time.Plo ./$(DEPDIR)/nghttp2_version.Plo \ ./$(DEPDIR)/sfparse.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -510,6 +512,8 @@ OBJECTS = nghttp2_pq.c nghttp2_map.c nghttp2_queue.c \ nghttp2_http.c \ nghttp2_rcbuf.c \ nghttp2_extpri.c \ + nghttp2_ratelim.c \ + nghttp2_time.c \ nghttp2_debug.c \ sfparse.c @@ -528,6 +532,8 @@ HFILES = nghttp2_pq.h nghttp2_int.h nghttp2_map.h nghttp2_queue.h \ nghttp2_http.h \ nghttp2_rcbuf.h \ nghttp2_extpri.h \ + nghttp2_ratelim.h \ + nghttp2_time.h \ nghttp2_debug.h \ sfparse.h @@ -633,10 +639,12 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_pq.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_priority_spec.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_queue.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_ratelim.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_rcbuf.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_session.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_submit.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_time.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghttp2_version.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfparse.Plo@am__quote@ # am--include-marker @@ -916,10 +924,12 @@ distclean: distclean-recursive -rm -f ./$(DEPDIR)/nghttp2_pq.Plo -rm -f ./$(DEPDIR)/nghttp2_priority_spec.Plo -rm -f ./$(DEPDIR)/nghttp2_queue.Plo + -rm -f ./$(DEPDIR)/nghttp2_ratelim.Plo -rm -f ./$(DEPDIR)/nghttp2_rcbuf.Plo -rm -f ./$(DEPDIR)/nghttp2_session.Plo -rm -f ./$(DEPDIR)/nghttp2_stream.Plo -rm -f ./$(DEPDIR)/nghttp2_submit.Plo + -rm -f ./$(DEPDIR)/nghttp2_time.Plo -rm -f ./$(DEPDIR)/nghttp2_version.Plo -rm -f ./$(DEPDIR)/sfparse.Plo -rm -f Makefile @@ -985,10 +995,12 @@ maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/nghttp2_pq.Plo -rm -f ./$(DEPDIR)/nghttp2_priority_spec.Plo -rm -f ./$(DEPDIR)/nghttp2_queue.Plo + -rm -f ./$(DEPDIR)/nghttp2_ratelim.Plo -rm -f ./$(DEPDIR)/nghttp2_rcbuf.Plo -rm -f ./$(DEPDIR)/nghttp2_session.Plo -rm -f ./$(DEPDIR)/nghttp2_stream.Plo -rm -f ./$(DEPDIR)/nghttp2_submit.Plo + -rm -f ./$(DEPDIR)/nghttp2_time.Plo -rm -f ./$(DEPDIR)/nghttp2_version.Plo -rm -f ./$(DEPDIR)/sfparse.Plo -rm -f Makefile diff --git a/deps/nghttp2/lib/includes/nghttp2/nghttp2.h b/deps/nghttp2/lib/includes/nghttp2/nghttp2.h index 65077dd51613c1..fa22081c517497 100644 --- a/deps/nghttp2/lib/includes/nghttp2/nghttp2.h +++ b/deps/nghttp2/lib/includes/nghttp2/nghttp2.h @@ -2756,6 +2756,23 @@ NGHTTP2_EXTERN void nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation( nghttp2_option *option, int val); +/** + * @function + * + * This function sets the rate limit for the incoming stream reset + * (RST_STREAM frame). It is server use only. It is a token-bucket + * based rate limiter. |burst| specifies the number of tokens that is + * initially available. The maximum number of tokens is capped to + * this value. |rate| specifies the number of tokens that are + * regenerated per second. An incoming RST_STREAM consumes one token. + * If there is no token available, GOAWAY is sent to tear down the + * connection. |burst| and |rate| default to 1000 and 33 + * respectively. + */ +NGHTTP2_EXTERN void +nghttp2_option_set_stream_reset_rate_limit(nghttp2_option *option, + uint64_t burst, uint64_t rate); + /** * @function * diff --git a/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h b/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h index 7f5251a6243e41..f56954e7fded45 100644 --- a/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h +++ b/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h @@ -29,7 +29,7 @@ * @macro * Version number of the nghttp2 library release */ -#define NGHTTP2_VERSION "1.56.0" +#define NGHTTP2_VERSION "1.57.0" /** * @macro @@ -37,6 +37,6 @@ * release. This is a 24 bit number with 8 bits for major number, 8 bits * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203. */ -#define NGHTTP2_VERSION_NUM 0x013800 +#define NGHTTP2_VERSION_NUM 0x013900 #endif /* NGHTTP2VER_H */ diff --git a/deps/nghttp2/lib/nghttp2_option.c b/deps/nghttp2/lib/nghttp2_option.c index ee0cd0f0226db9..43d4e952291ba4 100644 --- a/deps/nghttp2/lib/nghttp2_option.c +++ b/deps/nghttp2/lib/nghttp2_option.c @@ -143,3 +143,10 @@ void nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation( NGHTTP2_OPT_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION; option->no_rfc9113_leading_and_trailing_ws_validation = val; } + +void nghttp2_option_set_stream_reset_rate_limit(nghttp2_option *option, + uint64_t burst, uint64_t rate) { + option->opt_set_mask |= NGHTTP2_OPT_STREAM_RESET_RATE_LIMIT; + option->stream_reset_burst = burst; + option->stream_reset_rate = rate; +} diff --git a/deps/nghttp2/lib/nghttp2_option.h b/deps/nghttp2/lib/nghttp2_option.h index b228a0754c989e..2259e1849d810f 100644 --- a/deps/nghttp2/lib/nghttp2_option.h +++ b/deps/nghttp2/lib/nghttp2_option.h @@ -70,12 +70,18 @@ typedef enum { NGHTTP2_OPT_MAX_SETTINGS = 1 << 12, NGHTTP2_OPT_SERVER_FALLBACK_RFC7540_PRIORITIES = 1 << 13, NGHTTP2_OPT_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION = 1 << 14, + NGHTTP2_OPT_STREAM_RESET_RATE_LIMIT = 1 << 15, } nghttp2_option_flag; /** * Struct to store option values for nghttp2_session. */ struct nghttp2_option { + /** + * NGHTTP2_OPT_STREAM_RESET_RATE_LIMIT + */ + uint64_t stream_reset_burst; + uint64_t stream_reset_rate; /** * NGHTTP2_OPT_MAX_SEND_HEADER_BLOCK_LENGTH */ diff --git a/deps/nghttp2/lib/nghttp2_ratelim.c b/deps/nghttp2/lib/nghttp2_ratelim.c new file mode 100644 index 00000000000000..7011655b006f7c --- /dev/null +++ b/deps/nghttp2/lib/nghttp2_ratelim.c @@ -0,0 +1,75 @@ +/* + * nghttp2 - HTTP/2 C Library + * + * Copyright (c) 2023 nghttp2 contributors + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include "nghttp2_ratelim.h" +#include "nghttp2_helper.h" + +void nghttp2_ratelim_init(nghttp2_ratelim *rl, uint64_t burst, uint64_t rate) { + rl->val = rl->burst = burst; + rl->rate = rate; + rl->tstamp = 0; +} + +void nghttp2_ratelim_update(nghttp2_ratelim *rl, uint64_t tstamp) { + uint64_t d, gain; + + if (tstamp == rl->tstamp) { + return; + } + + if (tstamp > rl->tstamp) { + d = tstamp - rl->tstamp; + } else { + d = 1; + } + + rl->tstamp = tstamp; + + if (UINT64_MAX / d < rl->rate) { + rl->val = rl->burst; + + return; + } + + gain = rl->rate * d; + + if (UINT64_MAX - gain < rl->val) { + rl->val = rl->burst; + + return; + } + + rl->val += gain; + rl->val = nghttp2_min(rl->val, rl->burst); +} + +int nghttp2_ratelim_drain(nghttp2_ratelim *rl, uint64_t n) { + if (rl->val < n) { + return -1; + } + + rl->val -= n; + + return 0; +} diff --git a/deps/nghttp2/lib/nghttp2_ratelim.h b/deps/nghttp2/lib/nghttp2_ratelim.h new file mode 100644 index 00000000000000..866ed3f00aed4c --- /dev/null +++ b/deps/nghttp2/lib/nghttp2_ratelim.h @@ -0,0 +1,57 @@ +/* + * nghttp2 - HTTP/2 C Library + * + * Copyright (c) 2023 nghttp2 contributors + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#ifndef NGHTTP2_RATELIM_H +#define NGHTTP2_RATELIM_H + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ + +#include + +typedef struct nghttp2_ratelim { + /* burst is the maximum value of val. */ + uint64_t burst; + /* rate is the amount of value that is regenerated per 1 tstamp. */ + uint64_t rate; + /* val is the amount of value available to drain. */ + uint64_t val; + /* tstamp is the last timestamp in second resolution that is known + to this object. */ + uint64_t tstamp; +} nghttp2_ratelim; + +/* nghttp2_ratelim_init initializes |rl| with the given parameters. */ +void nghttp2_ratelim_init(nghttp2_ratelim *rl, uint64_t burst, uint64_t rate); + +/* nghttp2_ratelim_update updates rl->val with the current |tstamp| + given in second resolution. */ +void nghttp2_ratelim_update(nghttp2_ratelim *rl, uint64_t tstamp); + +/* nghttp2_ratelim_drain drains |n| from rl->val. It returns 0 if it + succeeds, or -1. */ +int nghttp2_ratelim_drain(nghttp2_ratelim *rl, uint64_t n); + +#endif /* NGHTTP2_RATELIM_H */ diff --git a/deps/nghttp2/lib/nghttp2_session.c b/deps/nghttp2/lib/nghttp2_session.c index a45cbeef673108..ec5024d0f2168e 100644 --- a/deps/nghttp2/lib/nghttp2_session.c +++ b/deps/nghttp2/lib/nghttp2_session.c @@ -37,6 +37,7 @@ #include "nghttp2_http.h" #include "nghttp2_pq.h" #include "nghttp2_extpri.h" +#include "nghttp2_time.h" #include "nghttp2_debug.h" /* @@ -475,6 +476,10 @@ static int session_new(nghttp2_session **session_ptr, (*session_ptr)->pending_enable_push = 1; (*session_ptr)->pending_no_rfc7540_priorities = UINT8_MAX; + nghttp2_ratelim_init(&(*session_ptr)->stream_reset_ratelim, + NGHTTP2_DEFAULT_STREAM_RESET_BURST, + NGHTTP2_DEFAULT_STREAM_RESET_RATE); + if (server) { (*session_ptr)->server = 1; } @@ -573,6 +578,12 @@ static int session_new(nghttp2_session **session_ptr, (*session_ptr)->opt_flags |= NGHTTP2_OPTMASK_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION; } + + if (option->opt_set_mask & NGHTTP2_OPT_STREAM_RESET_RATE_LIMIT) { + nghttp2_ratelim_init(&(*session_ptr)->stream_reset_ratelim, + option->stream_reset_burst, + option->stream_reset_rate); + } } rv = nghttp2_hd_deflate_init2(&(*session_ptr)->hd_deflater, @@ -4449,6 +4460,23 @@ static int session_process_priority_frame(nghttp2_session *session) { return nghttp2_session_on_priority_received(session, frame); } +static int session_update_stream_reset_ratelim(nghttp2_session *session) { + if (!session->server || (session->goaway_flags & NGHTTP2_GOAWAY_SUBMITTED)) { + return 0; + } + + nghttp2_ratelim_update(&session->stream_reset_ratelim, + nghttp2_time_now_sec()); + + if (nghttp2_ratelim_drain(&session->stream_reset_ratelim, 1) == 0) { + return 0; + } + + return nghttp2_session_add_goaway(session, session->last_recv_stream_id, + NGHTTP2_INTERNAL_ERROR, NULL, 0, + NGHTTP2_GOAWAY_AUX_NONE); +} + int nghttp2_session_on_rst_stream_received(nghttp2_session *session, nghttp2_frame *frame) { int rv; @@ -4478,7 +4506,8 @@ int nghttp2_session_on_rst_stream_received(nghttp2_session *session, if (nghttp2_is_fatal(rv)) { return rv; } - return 0; + + return session_update_stream_reset_ratelim(session); } static int session_process_rst_stream_frame(nghttp2_session *session) { @@ -7434,6 +7463,9 @@ int nghttp2_session_add_goaway(nghttp2_session *session, int32_t last_stream_id, nghttp2_mem_free(mem, item); return rv; } + + session->goaway_flags |= NGHTTP2_GOAWAY_SUBMITTED; + return 0; } diff --git a/deps/nghttp2/lib/nghttp2_session.h b/deps/nghttp2/lib/nghttp2_session.h index 34d2d58528a796..b119329a04da45 100644 --- a/deps/nghttp2/lib/nghttp2_session.h +++ b/deps/nghttp2/lib/nghttp2_session.h @@ -39,6 +39,7 @@ #include "nghttp2_buf.h" #include "nghttp2_callbacks.h" #include "nghttp2_mem.h" +#include "nghttp2_ratelim.h" /* The global variable for tests where we want to disable strict preface handling. */ @@ -105,6 +106,10 @@ typedef struct { /* The default value of maximum number of concurrent streams. */ #define NGHTTP2_DEFAULT_MAX_CONCURRENT_STREAMS 0xffffffffu +/* The default values for stream reset rate limiter. */ +#define NGHTTP2_DEFAULT_STREAM_RESET_BURST 1000 +#define NGHTTP2_DEFAULT_STREAM_RESET_RATE 33 + /* Internal state when receiving incoming frame */ typedef enum { /* Receiving frame header */ @@ -178,7 +183,9 @@ typedef enum { /* Flag means GOAWAY was sent */ NGHTTP2_GOAWAY_SENT = 0x4, /* Flag means GOAWAY was received */ - NGHTTP2_GOAWAY_RECV = 0x8 + NGHTTP2_GOAWAY_RECV = 0x8, + /* Flag means GOAWAY has been submitted at least once */ + NGHTTP2_GOAWAY_SUBMITTED = 0x10 } nghttp2_goaway_flag; /* nghttp2_inflight_settings stores the SETTINGS entries which local @@ -235,6 +242,9 @@ struct nghttp2_session { /* Queue of In-flight SETTINGS values. SETTINGS bearing ACK is not considered as in-flight. */ nghttp2_inflight_settings *inflight_settings_head; + /* Stream reset rate limiter. If receiving excessive amount of + stream resets, GOAWAY will be sent. */ + nghttp2_ratelim stream_reset_ratelim; /* Sequential number across all streams to process streams in FIFO. */ uint64_t stream_seq; diff --git a/deps/nghttp2/lib/nghttp2_time.c b/deps/nghttp2/lib/nghttp2_time.c new file mode 100644 index 00000000000000..2a5f1a6ff524df --- /dev/null +++ b/deps/nghttp2/lib/nghttp2_time.c @@ -0,0 +1,62 @@ +/* + * nghttp2 - HTTP/2 C Library + * + * Copyright (c) 2023 nghttp2 contributors + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include "nghttp2_time.h" + +#ifdef HAVE_TIME_H +# include +#endif /* HAVE_TIME_H */ + +#ifdef HAVE_SYSINFOAPI_H +# include +#endif /* HAVE_SYSINFOAPI_H */ + +#ifndef HAVE_GETTICKCOUNT64 +static uint64_t time_now_sec(void) { + time_t t = time(NULL); + + if (t == -1) { + return 0; + } + + return (uint64_t)t; +} +#endif /* HAVE_GETTICKCOUNT64 */ + +#ifdef HAVE_CLOCK_GETTIME +uint64_t nghttp2_time_now_sec(void) { + struct timespec tp; + int rv = clock_gettime(CLOCK_MONOTONIC, &tp); + + if (rv == -1) { + return time_now_sec(); + } + + return (uint64_t)tp.tv_sec; +} +#elif defined(HAVE_GETTICKCOUNT64) +uint64_t nghttp2_time_now_sec(void) { return GetTickCount64() / 1000; } +#else /* !HAVE_CLOCK_GETTIME && !HAVE_GETTICKCOUNT64 */ +uint64_t nghttp2_time_now_sec(void) { return time_now_sec(); } +#endif /* !HAVE_CLOCK_GETTIME && !HAVE_GETTICKCOUNT64 */ diff --git a/deps/nghttp2/lib/nghttp2_time.h b/deps/nghttp2/lib/nghttp2_time.h new file mode 100644 index 00000000000000..03c0bbe944ee3b --- /dev/null +++ b/deps/nghttp2/lib/nghttp2_time.h @@ -0,0 +1,38 @@ +/* + * nghttp2 - HTTP/2 C Library + * + * Copyright (c) 2023 nghttp2 contributors + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#ifndef NGHTTP2_TIME_H +#define NGHTTP2_TIME_H + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ + +#include + +/* nghttp2_time_now_sec returns seconds from implementation-specific + timepoint. If it is unable to get seconds, it returns 0. */ +uint64_t nghttp2_time_now_sec(void); + +#endif /* NGHTTP2_TIME_H */ diff --git a/deps/nghttp2/nghttp2.gyp b/deps/nghttp2/nghttp2.gyp index 8a3ee0dbc4e2ee..87909c5f296a2c 100644 --- a/deps/nghttp2/nghttp2.gyp +++ b/deps/nghttp2/nghttp2.gyp @@ -19,10 +19,12 @@ 'lib/nghttp2_pq.c', 'lib/nghttp2_priority_spec.c', 'lib/nghttp2_queue.c', + 'lib/nghttp2_ratelim.c', 'lib/nghttp2_rcbuf.c', 'lib/nghttp2_session.c', 'lib/nghttp2_stream.c', 'lib/nghttp2_submit.c', + 'lib/nghttp2_time.c', 'lib/nghttp2_version.c', 'lib/sfparse.c', ] diff --git a/deps/ngtcp2/ngtcp2.gyp b/deps/ngtcp2/ngtcp2.gyp index a47a791610e86a..e53b7f61ea387b 100644 --- a/deps/ngtcp2/ngtcp2.gyp +++ b/deps/ngtcp2/ngtcp2.gyp @@ -112,7 +112,7 @@ }, }, }], - ['OS=="linux"', { + ['OS=="linux" or OS=="android"', { 'defines': [ 'HAVE_ARPA_INET_H', 'HAVE_NETINET_IN_H', @@ -162,7 +162,7 @@ }, }, }], - ['OS=="linux"', { + ['OS=="linux" or OS=="android"', { 'defines': [ 'HAVE_ARPA_INET_H', 'HAVE_NETINET_IN_H', diff --git a/deps/openssl/openssl-cl_asm.gypi b/deps/openssl/openssl-cl_asm.gypi index 8791e005bf0f41..cd10355c171228 100644 --- a/deps/openssl/openssl-cl_asm.gypi +++ b/deps/openssl/openssl-cl_asm.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/asm/openssl-cl.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/asm/openssl-cl.gypi'], diff --git a/deps/openssl/openssl-cl_asm_avx2.gypi b/deps/openssl/openssl-cl_asm_avx2.gypi index 815598676770c6..50b5a9c375bd8d 100644 --- a/deps/openssl/openssl-cl_asm_avx2.gypi +++ b/deps/openssl/openssl-cl_asm_avx2.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/asm_avx2/openssl-cl.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/asm_avx2/openssl-cl.gypi'], diff --git a/deps/openssl/openssl-cl_no_asm.gypi b/deps/openssl/openssl-cl_no_asm.gypi index 22bcf1c3c77d84..0964fb36739b3a 100644 --- a/deps/openssl/openssl-cl_no_asm.gypi +++ b/deps/openssl/openssl-cl_no_asm.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/no-asm/openssl-cl.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/no-asm/openssl-cl.gypi'], diff --git a/deps/openssl/openssl-fips_asm.gypi b/deps/openssl/openssl-fips_asm.gypi index d0717df2a5094f..631df9eb893288 100644 --- a/deps/openssl/openssl-fips_asm.gypi +++ b/deps/openssl/openssl-fips_asm.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/asm/openssl-fips.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/asm/openssl-fips.gypi'], diff --git a/deps/openssl/openssl-fips_asm_avx2.gypi b/deps/openssl/openssl-fips_asm_avx2.gypi index d2a2a4bc11413f..4d63cacf29d040 100644 --- a/deps/openssl/openssl-fips_asm_avx2.gypi +++ b/deps/openssl/openssl-fips_asm_avx2.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/asm_avx2/openssl-fips.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/asm_avx2/openssl-fips.gypi'], diff --git a/deps/openssl/openssl-fips_no_asm.gypi b/deps/openssl/openssl-fips_no_asm.gypi index d598bde68c783d..7fdfd772abbce8 100644 --- a/deps/openssl/openssl-fips_no_asm.gypi +++ b/deps/openssl/openssl-fips_no_asm.gypi @@ -1,7 +1,7 @@ { 'defines': ['OPENSSL_NO_ASM'], 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/no-asm/openssl-fips.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/no-asm/openssl-fips.gypi'], diff --git a/deps/openssl/openssl_asm.gypi b/deps/openssl/openssl_asm.gypi index dbd5a5f69ff8d9..dd7e636eb08893 100644 --- a/deps/openssl/openssl_asm.gypi +++ b/deps/openssl/openssl_asm.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/asm/openssl.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/asm/openssl.gypi'], diff --git a/deps/openssl/openssl_asm_avx2.gypi b/deps/openssl/openssl_asm_avx2.gypi index 2883f83d694394..6a9c56d76a211a 100644 --- a/deps/openssl/openssl_asm_avx2.gypi +++ b/deps/openssl/openssl_asm_avx2.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/asm_avx2/openssl.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/asm_avx2/openssl.gypi'], diff --git a/deps/openssl/openssl_common.gypi b/deps/openssl/openssl_common.gypi index 256eb7d1808db3..1290fff251fc5b 100644 --- a/deps/openssl/openssl_common.gypi +++ b/deps/openssl/openssl_common.gypi @@ -13,7 +13,7 @@ ], # build options specific to OS 'conditions': [ - [ 'OS=="aix"', { + [ 'OS in ("aix", "os400")', { # AIX is missing /usr/include/endian.h 'defines': [ '__LITTLE_ENDIAN=1234', diff --git a/deps/openssl/openssl_no_asm.gypi b/deps/openssl/openssl_no_asm.gypi index de0e486f67e90e..20663decabba23 100644 --- a/deps/openssl/openssl_no_asm.gypi +++ b/deps/openssl/openssl_no_asm.gypi @@ -1,7 +1,7 @@ { 'defines': ['OPENSSL_NO_ASM'], 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/no-asm/openssl.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/no-asm/openssl.gypi'], diff --git a/deps/simdutf/simdutf.cpp b/deps/simdutf/simdutf.cpp index eb3c53ba069ede..70b461ab550b46 100644 --- a/deps/simdutf/simdutf.cpp +++ b/deps/simdutf/simdutf.cpp @@ -1,4 +1,4 @@ -/* auto-generated on 2023-08-11 13:30:54 -0400. Do not edit! */ +/* auto-generated on 2023-10-08 13:48:09 -0400. Do not edit! */ // dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf.cpp /* begin file src/simdutf.cpp */ #include "simdutf.h" @@ -1119,9 +1119,12 @@ simdutf_really_inline simd16::operator simd16() const { retur #endif #ifdef _MSC_VER -#if _MSC_VER >= 1920 -// Visual Studio 2019 and up support VBMI2 under x64 even if the header +#if _MSC_VER >= 1930 +// Visual Studio 2022 and up support VBMI2 under x64 even if the header // avx512vbmi2intrin.h is not found. +// Visual Studio 2019 technically supports VBMI2, but the implementation +// might be unreliable. Search for visualstudio2019icelakeissue in our +// tests. #define SIMDUTF_COMPILER_SUPPORTS_VBMI2 1 #endif #endif diff --git a/deps/simdutf/simdutf.h b/deps/simdutf/simdutf.h index 22a49f48c6bc95..6ab1c34d7b30a7 100644 --- a/deps/simdutf/simdutf.h +++ b/deps/simdutf/simdutf.h @@ -1,4 +1,4 @@ -/* auto-generated on 2023-08-11 13:30:54 -0400. Do not edit! */ +/* auto-generated on 2023-10-08 13:48:09 -0400. Do not edit! */ // dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/include, filename=simdutf.h /* begin file include/simdutf.h */ #ifndef SIMDUTF_H @@ -576,7 +576,7 @@ SIMDUTF_DISABLE_UNDESIRED_WARNINGS #define SIMDUTF_SIMDUTF_VERSION_H /** The version of simdutf being used (major.minor.revision) */ -#define SIMDUTF_VERSION "3.2.17" +#define SIMDUTF_VERSION "3.2.18" namespace simdutf { enum { @@ -591,7 +591,7 @@ enum { /** * The revision (major.minor.REVISION) of simdutf being used. */ - SIMDUTF_VERSION_REVISION = 17 + SIMDUTF_VERSION_REVISION = 18 }; } // namespace simdutf diff --git a/deps/undici/src/lib/compat/dispatcher-weakref.js b/deps/undici/src/lib/compat/dispatcher-weakref.js index dbca8580404ebf..db97e0f6e1eaad 100644 --- a/deps/undici/src/lib/compat/dispatcher-weakref.js +++ b/deps/undici/src/lib/compat/dispatcher-weakref.js @@ -31,6 +31,14 @@ class CompatFinalizer { } module.exports = function () { + // FIXME: remove workaround when the Node bug is fixed + // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 + if (process.env.NODE_V8_COVERAGE) { + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer + } + } return { WeakRef: global.WeakRef || CompatWeakRef, FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer diff --git a/deps/undici/src/lib/core/connect.js b/deps/undici/src/lib/core/connect.js index bb71085a1565fc..33091173fa8dbc 100644 --- a/deps/undici/src/lib/core/connect.js +++ b/deps/undici/src/lib/core/connect.js @@ -13,7 +13,9 @@ let tls // include tls conditionally since it is not always available // re-use is enabled. let SessionCache -if (global.FinalizationRegistry) { +// FIXME: remove workaround when the Node bug is fixed +// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 +if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { SessionCache = class WeakSessionCache { constructor (maxCachedSessions) { this._maxCachedSessions = maxCachedSessions diff --git a/deps/undici/src/lib/core/util.js b/deps/undici/src/lib/core/util.js index 259ba7b38a64e9..769811f57f7b8c 100644 --- a/deps/undici/src/lib/core/util.js +++ b/deps/undici/src/lib/core/util.js @@ -58,31 +58,31 @@ function parseURL (url) { throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') } - if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) { - throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') + if (!/^https?:/.test(url.origin || url.protocol)) { + throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') } - if (url.path != null && typeof url.path !== 'string') { - throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') - } + if (!(url instanceof URL)) { + if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) { + throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') + } - if (url.pathname != null && typeof url.pathname !== 'string') { - throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') - } + if (url.path != null && typeof url.path !== 'string') { + throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') + } - if (url.hostname != null && typeof url.hostname !== 'string') { - throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') - } + if (url.pathname != null && typeof url.pathname !== 'string') { + throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') + } - if (url.origin != null && typeof url.origin !== 'string') { - throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') - } + if (url.hostname != null && typeof url.hostname !== 'string') { + throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') + } - if (!/^https?:/.test(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } + if (url.origin != null && typeof url.origin !== 'string') { + throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') + } - if (!(url instanceof URL)) { const port = url.port != null ? url.port : (url.protocol === 'https:' ? 443 : 80) diff --git a/deps/undici/src/lib/fetch/body.js b/deps/undici/src/lib/fetch/body.js index 105eb553157b06..1d9f17d7e330c6 100644 --- a/deps/undici/src/lib/fetch/body.js +++ b/deps/undici/src/lib/fetch/body.js @@ -1,6 +1,6 @@ 'use strict' -const Busboy = require('busboy') +const Busboy = require('@fastify/busboy') const util = require('../core/util') const { ReadableStreamFrom, @@ -385,10 +385,9 @@ function bodyMixinMethods (instance) { let busboy try { - busboy = Busboy({ + busboy = new Busboy({ headers, - preservePath: true, - defParamCharset: 'utf8' + preservePath: true }) } catch (err) { throw new DOMException(`${err}`, 'AbortError') @@ -397,8 +396,7 @@ function bodyMixinMethods (instance) { busboy.on('field', (name, value) => { responseFormData.append(name, value) }) - busboy.on('file', (name, value, info) => { - const { filename, encoding, mimeType } = info + busboy.on('file', (name, value, filename, encoding, mimeType) => { const chunks = [] if (encoding === 'base64' || encoding.toLowerCase() === 'base64') { diff --git a/deps/undici/src/lib/fetch/global.js b/deps/undici/src/lib/fetch/global.js index 42282acdfe2572..1df6f1227bc265 100644 --- a/deps/undici/src/lib/fetch/global.js +++ b/deps/undici/src/lib/fetch/global.js @@ -9,14 +9,6 @@ function getGlobalOrigin () { } function setGlobalOrigin (newOrigin) { - if ( - newOrigin !== undefined && - typeof newOrigin !== 'string' && - !(newOrigin instanceof URL) - ) { - throw new Error('Invalid base url') - } - if (newOrigin === undefined) { Object.defineProperty(globalThis, globalOrigin, { value: undefined, diff --git a/deps/undici/src/node_modules/busboy/LICENSE b/deps/undici/src/node_modules/@fastify/busboy/LICENSE similarity index 100% rename from deps/undici/src/node_modules/busboy/LICENSE rename to deps/undici/src/node_modules/@fastify/busboy/LICENSE diff --git a/deps/undici/src/node_modules/@fastify/busboy/README.md b/deps/undici/src/node_modules/@fastify/busboy/README.md new file mode 100644 index 00000000000000..c74e618b6d6044 --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/README.md @@ -0,0 +1,271 @@ +# busboy + +
+ +[![Build Status](https://github.com/fastify/busboy/workflows/ci/badge.svg)](https://github.com/fastify/busboy/actions) +[![Coverage Status](https://coveralls.io/repos/fastify/busboy/badge.svg?branch=master)](https://coveralls.io/r/fastify/busboy?branch=master) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) +[![Security Responsible Disclosure](https://img.shields.io/badge/Security-Responsible%20Disclosure-yellow.svg)](https://github.com/nodejs/security-wg/blob/HEAD/processes/responsible_disclosure_template.md) + +
+ +
+ +[![NPM version](https://img.shields.io/npm/v/@fastify/busboy.svg?style=flat)](https://www.npmjs.com/package/@fastify/busboy) +[![NPM downloads](https://img.shields.io/npm/dm/@fastify/busboy.svg?style=flat)](https://www.npmjs.com/package/@fastify/busboy) + +
+ +Description +=========== + +A Node.js module for parsing incoming HTML form data. + +This is an officially supported fork by [fastify](https://github.com/fastify/) organization of the amazing library [originally created](https://github.com/mscdex/busboy) by Brian White, +aimed at addressing long-standing issues with it. + +Benchmark (Mean time for 500 Kb payload, 2000 cycles, 1000 cycle warmup): + +| Library | Version | Mean time in nanoseconds (less is better) | +|-----------------------|---------|-------------------------------------------| +| busboy | 0.3.1 | `340114` | +| @fastify/busboy | 1.0.0 | `270984` | + +[Changelog](https://github.com/fastify/busboy/blob/master/CHANGELOG.md) since busboy 0.31. + +Requirements +============ + +* [Node.js](http://nodejs.org/) 10+ + + +Install +======= + + npm i @fastify/busboy + + +Examples +======== + +* Parsing (multipart) with default options: + +```javascript +const http = require('node:http'); +const { inspect } = require('node:util'); +const Busboy = require('busboy'); + +http.createServer((req, res) => { + if (req.method === 'POST') { + const busboy = new Busboy({ headers: req.headers }); + busboy.on('file', (fieldname, file, filename, encoding, mimetype) => { + console.log(`File [${fieldname}]: filename: ${filename}, encoding: ${encoding}, mimetype: ${mimetype}`); + file.on('data', data => { + console.log(`File [${fieldname}] got ${data.length} bytes`); + }); + file.on('end', () => { + console.log(`File [${fieldname}] Finished`); + }); + }); + busboy.on('field', (fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => { + console.log(`Field [${fieldname}]: value: ${inspect(val)}`); + }); + busboy.on('finish', () => { + console.log('Done parsing form!'); + res.writeHead(303, { Connection: 'close', Location: '/' }); + res.end(); + }); + req.pipe(busboy); + } else if (req.method === 'GET') { + res.writeHead(200, { Connection: 'close' }); + res.end(` +
+
+
+ +
+ `); + } +}).listen(8000, () => { + console.log('Listening for requests'); +}); + +// Example output, using http://nodejs.org/images/ryan-speaker.jpg as the file: +// +// Listening for requests +// File [filefield]: filename: ryan-speaker.jpg, encoding: binary +// File [filefield] got 11971 bytes +// Field [textfield]: value: 'testing! :-)' +// File [filefield] Finished +// Done parsing form! +``` + +* Save all incoming files to disk: + +```javascript +const http = require('node:http'); +const path = require('node:path'); +const os = require('node:os'); +const fs = require('node:fs'); + +const Busboy = require('busboy'); + +http.createServer(function(req, res) { + if (req.method === 'POST') { + const busboy = new Busboy({ headers: req.headers }); + busboy.on('file', function(fieldname, file, filename, encoding, mimetype) { + var saveTo = path.join(os.tmpdir(), path.basename(fieldname)); + file.pipe(fs.createWriteStream(saveTo)); + }); + busboy.on('finish', function() { + res.writeHead(200, { 'Connection': 'close' }); + res.end("That's all folks!"); + }); + return req.pipe(busboy); + } + res.writeHead(404); + res.end(); +}).listen(8000, function() { + console.log('Listening for requests'); +}); +``` + +* Parsing (urlencoded) with default options: + +```javascript +const http = require('node:http'); +const { inspect } = require('node:util'); + +const Busboy = require('busboy'); + +http.createServer(function(req, res) { + if (req.method === 'POST') { + const busboy = new Busboy({ headers: req.headers }); + busboy.on('file', function(fieldname, file, filename, encoding, mimetype) { + console.log('File [' + fieldname + ']: filename: ' + filename); + file.on('data', function(data) { + console.log('File [' + fieldname + '] got ' + data.length + ' bytes'); + }); + file.on('end', function() { + console.log('File [' + fieldname + '] Finished'); + }); + }); + busboy.on('field', function(fieldname, val, fieldnameTruncated, valTruncated) { + console.log('Field [' + fieldname + ']: value: ' + inspect(val)); + }); + busboy.on('finish', function() { + console.log('Done parsing form!'); + res.writeHead(303, { Connection: 'close', Location: '/' }); + res.end(); + }); + req.pipe(busboy); + } else if (req.method === 'GET') { + res.writeHead(200, { Connection: 'close' }); + res.end('\ +
\ +
\ +
\ + Node.js rules!
\ + \ +
\ + '); + } +}).listen(8000, function() { + console.log('Listening for requests'); +}); + +// Example output: +// +// Listening for requests +// Field [textfield]: value: 'testing! :-)' +// Field [selectfield]: value: '9001' +// Field [checkfield]: value: 'on' +// Done parsing form! +``` + + +API +=== + +_Busboy_ is a _Writable_ stream + +Busboy (special) events +----------------------- + +* **file**(< _string_ >fieldname, < _ReadableStream_ >stream, < _string_ >filename, < _string_ >transferEncoding, < _string_ >mimeType) - Emitted for each new file form field found. `transferEncoding` contains the 'Content-Transfer-Encoding' value for the file stream. `mimeType` contains the 'Content-Type' value for the file stream. + * Note: if you listen for this event, you should always handle the `stream` no matter if you care about the file contents or not (e.g. you can simply just do `stream.resume();` if you want to discard the contents), otherwise the 'finish' event will never fire on the Busboy instance. However, if you don't care about **any** incoming files, you can simply not listen for the 'file' event at all and any/all files will be automatically and safely discarded (these discarded files do still count towards `files` and `parts` limits). + * If a configured file size limit was reached, `stream` will both have a boolean property `truncated` (best checked at the end of the stream) and emit a 'limit' event to notify you when this happens. + * The property `bytesRead` informs about the number of bytes that have been read so far. + +* **field**(< _string_ >fieldname, < _string_ >value, < _boolean_ >fieldnameTruncated, < _boolean_ >valueTruncated, < _string_ >transferEncoding, < _string_ >mimeType) - Emitted for each new non-file field found. + +* **partsLimit**() - Emitted when specified `parts` limit has been reached. No more 'file' or 'field' events will be emitted. + +* **filesLimit**() - Emitted when specified `files` limit has been reached. No more 'file' events will be emitted. + +* **fieldsLimit**() - Emitted when specified `fields` limit has been reached. No more 'field' events will be emitted. + + +Busboy methods +-------------- + +* **(constructor)**(< _object_ >config) - Creates and returns a new Busboy instance. + + * The constructor takes the following valid `config` settings: + + * **headers** - _object_ - These are the HTTP headers of the incoming request, which are used by individual parsers. + + * **autoDestroy** - _boolean_ - Whether this stream should automatically call .destroy() on itself after ending. (Default: false). + + * **highWaterMark** - _integer_ - highWaterMark to use for this Busboy instance (Default: WritableStream default). + + * **fileHwm** - _integer_ - highWaterMark to use for file streams (Default: ReadableStream default). + + * **defCharset** - _string_ - Default character set to use when one isn't defined (Default: 'utf8'). + + * **preservePath** - _boolean_ - If paths in the multipart 'filename' field shall be preserved. (Default: false). + + * **isPartAFile** - __function__ - Use this function to override the default file detection functionality. It has following parameters: + + * fieldName - __string__ The name of the field. + + * contentType - __string__ The content-type of the part, e.g. `text/plain`, `image/jpeg`, `application/octet-stream` + + * fileName - __string__ The name of a file supplied by the part. + + (Default: `(fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)`) + + * **limits** - _object_ - Various limits on incoming data. Valid properties are: + + * **fieldNameSize** - _integer_ - Max field name size (in bytes) (Default: 100 bytes). + + * **fieldSize** - _integer_ - Max field value size (in bytes) (Default: 1 MiB, which is 1024 x 1024 bytes). + + * **fields** - _integer_ - Max number of non-file fields (Default: Infinity). + + * **fileSize** - _integer_ - For multipart forms, the max file size (in bytes) (Default: Infinity). + + * **files** - _integer_ - For multipart forms, the max number of file fields (Default: Infinity). + + * **parts** - _integer_ - For multipart forms, the max number of parts (fields + files) (Default: Infinity). + + * **headerPairs** - _integer_ - For multipart forms, the max number of header key=>value pairs to parse **Default:** 2000 + + * **headerSize** - _integer_ - For multipart forms, the max size of a multipart header **Default:** 81920. + + * The constructor can throw errors: + + * **Busboy expected an options-Object.** - Busboy expected an Object as first parameters. + + * **Busboy expected an options-Object with headers-attribute.** - The first parameter is lacking of a headers-attribute. + + * **Limit $limit is not a valid number** - Busboy expected the desired limit to be of type number. Busboy throws this Error to prevent a potential security issue by falling silently back to the Busboy-defaults. Potential source for this Error can be the direct use of environment variables without transforming them to the type number. + + * **Unsupported Content-Type.** - The `Content-Type` isn't one Busboy can parse. + + * **Missing Content-Type-header.** - The provided headers don't include `Content-Type` at all. diff --git a/deps/undici/src/node_modules/streamsearch/LICENSE b/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/LICENSE similarity index 98% rename from deps/undici/src/node_modules/streamsearch/LICENSE rename to deps/undici/src/node_modules/@fastify/busboy/deps/dicer/LICENSE index 9ea90e03922d5e..290762e94f4e2f 100644 --- a/deps/undici/src/node_modules/streamsearch/LICENSE +++ b/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/LICENSE @@ -1,19 +1,19 @@ -Copyright Brian White. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +Copyright Brian White. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js b/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js new file mode 100644 index 00000000000000..79da160c34238f --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js @@ -0,0 +1,207 @@ +'use strict' + +const WritableStream = require('node:stream').Writable +const inherits = require('node:util').inherits + +const StreamSearch = require('../../streamsearch/sbmh') + +const PartStream = require('./PartStream') +const HeaderParser = require('./HeaderParser') + +const DASH = 45 +const B_ONEDASH = Buffer.from('-') +const B_CRLF = Buffer.from('\r\n') +const EMPTY_FN = function () {} + +function Dicer (cfg) { + if (!(this instanceof Dicer)) { return new Dicer(cfg) } + WritableStream.call(this, cfg) + + if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') } + + if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined } + + this._headerFirst = cfg.headerFirst + + this._dashes = 0 + this._parts = 0 + this._finished = false + this._realFinish = false + this._isPreamble = true + this._justMatched = false + this._firstWrite = true + this._inHeader = true + this._part = undefined + this._cb = undefined + this._ignoreData = false + this._partOpts = { highWaterMark: cfg.partHwm } + this._pause = false + + const self = this + this._hparser = new HeaderParser(cfg) + this._hparser.on('header', function (header) { + self._inHeader = false + self._part.emit('header', header) + }) +} +inherits(Dicer, WritableStream) + +Dicer.prototype.emit = function (ev) { + if (ev === 'finish' && !this._realFinish) { + if (!this._finished) { + const self = this + process.nextTick(function () { + self.emit('error', new Error('Unexpected end of multipart data')) + if (self._part && !self._ignoreData) { + const type = (self._isPreamble ? 'Preamble' : 'Part') + self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data')) + self._part.push(null) + process.nextTick(function () { + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + return + } + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + } + } else { WritableStream.prototype.emit.apply(this, arguments) } +} + +Dicer.prototype._write = function (data, encoding, cb) { + // ignore unexpected data (e.g. extra trailer data after finished) + if (!this._hparser && !this._bparser) { return cb() } + + if (this._headerFirst && this._isPreamble) { + if (!this._part) { + this._part = new PartStream(this._partOpts) + if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() } + } + const r = this._hparser.push(data) + if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() } + } + + // allows for "easier" testing + if (this._firstWrite) { + this._bparser.push(B_CRLF) + this._firstWrite = false + } + + this._bparser.push(data) + + if (this._pause) { this._cb = cb } else { cb() } +} + +Dicer.prototype.reset = function () { + this._part = undefined + this._bparser = undefined + this._hparser = undefined +} + +Dicer.prototype.setBoundary = function (boundary) { + const self = this + this._bparser = new StreamSearch('\r\n--' + boundary) + this._bparser.on('info', function (isMatch, data, start, end) { + self._oninfo(isMatch, data, start, end) + }) +} + +Dicer.prototype._ignore = function () { + if (this._part && !this._ignoreData) { + this._ignoreData = true + this._part.on('error', EMPTY_FN) + // we must perform some kind of read on the stream even though we are + // ignoring the data, otherwise node's Readable stream will not emit 'end' + // after pushing null to the stream + this._part.resume() + } +} + +Dicer.prototype._oninfo = function (isMatch, data, start, end) { + let buf; const self = this; let i = 0; let r; let shouldWriteMore = true + + if (!this._part && this._justMatched && data) { + while (this._dashes < 2 && (start + i) < end) { + if (data[start + i] === DASH) { + ++i + ++this._dashes + } else { + if (this._dashes) { buf = B_ONEDASH } + this._dashes = 0 + break + } + } + if (this._dashes === 2) { + if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) } + this.reset() + this._finished = true + // no more parts will be added + if (self._parts === 0) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } + } + if (this._dashes) { return } + } + if (this._justMatched) { this._justMatched = false } + if (!this._part) { + this._part = new PartStream(this._partOpts) + this._part._read = function (n) { + self._unpause() + } + if (this._isPreamble && this._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { this.emit('part', this._part) } else { this._ignore() } + if (!this._isPreamble) { this._inHeader = true } + } + if (data && start < end && !this._ignoreData) { + if (this._isPreamble || !this._inHeader) { + if (buf) { shouldWriteMore = this._part.push(buf) } + shouldWriteMore = this._part.push(data.slice(start, end)) + if (!shouldWriteMore) { this._pause = true } + } else if (!this._isPreamble && this._inHeader) { + if (buf) { this._hparser.push(buf) } + r = this._hparser.push(data.slice(start, end)) + if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) } + } + } + if (isMatch) { + this._hparser.reset() + if (this._isPreamble) { this._isPreamble = false } else { + if (start !== end) { + ++this._parts + this._part.on('end', function () { + if (--self._parts === 0) { + if (self._finished) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } else { + self._unpause() + } + } + }) + } + } + this._part.push(null) + this._part = undefined + this._ignoreData = false + this._justMatched = true + this._dashes = 0 + } +} + +Dicer.prototype._unpause = function () { + if (!this._pause) { return } + + this._pause = false + if (this._cb) { + const cb = this._cb + this._cb = undefined + cb() + } +} + +module.exports = Dicer diff --git a/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js b/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js new file mode 100644 index 00000000000000..65f667b59be8e7 --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js @@ -0,0 +1,100 @@ +'use strict' + +const EventEmitter = require('node:events').EventEmitter +const inherits = require('node:util').inherits +const getLimit = require('../../../lib/utils/getLimit') + +const StreamSearch = require('../../streamsearch/sbmh') + +const B_DCRLF = Buffer.from('\r\n\r\n') +const RE_CRLF = /\r\n/g +const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex + +function HeaderParser (cfg) { + EventEmitter.call(this) + + cfg = cfg || {} + const self = this + this.nread = 0 + this.maxed = false + this.npairs = 0 + this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) + this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) + this.buffer = '' + this.header = {} + this.finished = false + this.ss = new StreamSearch(B_DCRLF) + this.ss.on('info', function (isMatch, data, start, end) { + if (data && !self.maxed) { + if (self.nread + end - start >= self.maxHeaderSize) { + end = self.maxHeaderSize - self.nread + start + self.nread = self.maxHeaderSize + self.maxed = true + } else { self.nread += (end - start) } + + self.buffer += data.toString('binary', start, end) + } + if (isMatch) { self._finish() } + }) +} +inherits(HeaderParser, EventEmitter) + +HeaderParser.prototype.push = function (data) { + const r = this.ss.push(data) + if (this.finished) { return r } +} + +HeaderParser.prototype.reset = function () { + this.finished = false + this.buffer = '' + this.header = {} + this.ss.reset() +} + +HeaderParser.prototype._finish = function () { + if (this.buffer) { this._parseHeader() } + this.ss.matches = this.ss.maxMatches + const header = this.header + this.header = {} + this.buffer = '' + this.finished = true + this.nread = this.npairs = 0 + this.maxed = false + this.emit('header', header) +} + +HeaderParser.prototype._parseHeader = function () { + if (this.npairs === this.maxHeaderPairs) { return } + + const lines = this.buffer.split(RE_CRLF) + const len = lines.length + let m, h + + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (lines[i].length === 0) { continue } + if (lines[i][0] === '\t' || lines[i][0] === ' ') { + // folded header content + // RFC2822 says to just remove the CRLF and not the whitespace following + // it, so we follow the RFC and include the leading whitespace ... + if (h) { + this.header[h][this.header[h].length - 1] += lines[i] + continue + } + } + + const posColon = lines[i].indexOf(':') + if ( + posColon === -1 || + posColon === 0 + ) { + return + } + m = RE_HDR.exec(lines[i]) + h = m[1].toLowerCase() + this.header[h] = this.header[h] || [] + this.header[h].push((m[2] || '')) + if (++this.npairs === this.maxHeaderPairs) { break } + } +} + +module.exports = HeaderParser diff --git a/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js b/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js new file mode 100644 index 00000000000000..c91da1c4132129 --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js @@ -0,0 +1,13 @@ +'use strict' + +const inherits = require('node:util').inherits +const ReadableStream = require('node:stream').Readable + +function PartStream (opts) { + ReadableStream.call(this, opts) +} +inherits(PartStream, ReadableStream) + +PartStream.prototype._read = function (n) {} + +module.exports = PartStream diff --git a/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts b/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts new file mode 100644 index 00000000000000..3c5b8962d99b33 --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts @@ -0,0 +1,164 @@ +// Type definitions for dicer 0.2 +// Project: https://github.com/mscdex/dicer +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 +/// + +import stream = require("stream"); + +// tslint:disable:unified-signatures + +/** + * A very fast streaming multipart parser for node.js. + * Dicer is a WritableStream + * + * Dicer (special) events: + * - on('finish', ()) - Emitted when all parts have been parsed and the Dicer instance has been ended. + * - on('part', (stream: PartStream)) - Emitted when a new part has been found. + * - on('preamble', (stream: PartStream)) - Emitted for preamble if you should happen to need it (can usually be ignored). + * - on('trailer', (data: Buffer)) - Emitted when trailing data was found after the terminating boundary (as with the preamble, this can usually be ignored too). + */ +export class Dicer extends stream.Writable { + /** + * Creates and returns a new Dicer instance with the following valid config settings: + * + * @param config The configuration to use + */ + constructor(config: Dicer.Config); + /** + * Sets the boundary to use for parsing and performs some initialization needed for parsing. + * You should only need to use this if you set headerFirst to true in the constructor and are parsing the boundary from the preamble header. + * + * @param boundary The boundary to use + */ + setBoundary(boundary: string): void; + addListener(event: "finish", listener: () => void): this; + addListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + addListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + addListener(event: "trailer", listener: (data: Buffer) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: string, listener: (...args: any[]) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "part", listener: (stream: Dicer.PartStream) => void): this; + on(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + on(event: "trailer", listener: (data: Buffer) => void): this; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "part", listener: (stream: Dicer.PartStream) => void): this; + once(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + once(event: "trailer", listener: (data: Buffer) => void): this; + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + prependListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + prependListener(event: "trailer", listener: (data: Buffer) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + prependOnceListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + prependOnceListener(event: "trailer", listener: (data: Buffer) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + removeListener(event: "finish", listener: () => void): this; + removeListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + removeListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + removeListener(event: "trailer", listener: (data: Buffer) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "drain", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "pipe", listener: (src: stream.Readable) => void): this; + removeListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + removeListener(event: string, listener: (...args: any[]) => void): this; +} + +declare namespace Dicer { + interface Config { + /** + * This is the boundary used to detect the beginning of a new part. + */ + boundary?: string | undefined; + /** + * If true, preamble header parsing will be performed first. + */ + headerFirst?: boolean | undefined; + /** + * The maximum number of header key=>value pairs to parse Default: 2000 (same as node's http). + */ + maxHeaderPairs?: number | undefined; + } + + /** + * PartStream is a _ReadableStream_ + * + * PartStream (special) events: + * - on('header', (header: object)) - An object containing the header for this particular part. Each property value is an array of one or more string values. + */ + interface PartStream extends stream.Readable { + addListener(event: "header", listener: (header: object) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string, listener: (...args: any[]) => void): this; + on(event: "header", listener: (header: object) => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: "header", listener: (header: object) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "header", listener: (header: object) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "header", listener: (header: object) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + removeListener(event: "header", listener: (header: object) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: string, listener: (...args: any[]) => void): this; + } +} \ No newline at end of file diff --git a/deps/undici/src/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js b/deps/undici/src/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js new file mode 100644 index 00000000000000..b90c0e862b4062 --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js @@ -0,0 +1,228 @@ +'use strict' + +/** + * Copyright Brian White. All rights reserved. + * + * @see https://github.com/mscdex/streamsearch + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation + * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool + */ +const EventEmitter = require('node:events').EventEmitter +const inherits = require('node:util').inherits + +function SBMH (needle) { + if (typeof needle === 'string') { + needle = Buffer.from(needle) + } + + if (!Buffer.isBuffer(needle)) { + throw new TypeError('The needle has to be a String or a Buffer.') + } + + const needleLength = needle.length + + if (needleLength === 0) { + throw new Error('The needle cannot be an empty String/Buffer.') + } + + if (needleLength > 256) { + throw new Error('The needle cannot have a length bigger than 256.') + } + + this.maxMatches = Infinity + this.matches = 0 + + this._occ = new Array(256) + .fill(needleLength) // Initialize occurrence table. + this._lookbehind_size = 0 + this._needle = needle + this._bufpos = 0 + + this._lookbehind = Buffer.alloc(needleLength) + + // Populate occurrence table with analysis of the needle, + // ignoring last letter. + for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var + this._occ[needle[i]] = needleLength - 1 - i + } +} +inherits(SBMH, EventEmitter) + +SBMH.prototype.reset = function () { + this._lookbehind_size = 0 + this.matches = 0 + this._bufpos = 0 +} + +SBMH.prototype.push = function (chunk, pos) { + if (!Buffer.isBuffer(chunk)) { + chunk = Buffer.from(chunk, 'binary') + } + const chlen = chunk.length + this._bufpos = pos || 0 + let r + while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) } + return r +} + +SBMH.prototype._sbmh_feed = function (data) { + const len = data.length + const needle = this._needle + const needleLength = needle.length + const lastNeedleChar = needle[needleLength - 1] + + // Positive: points to a position in `data` + // pos == 3 points to data[3] + // Negative: points to a position in the lookbehind buffer + // pos == -2 points to lookbehind[lookbehind_size - 2] + let pos = -this._lookbehind_size + let ch + + if (pos < 0) { + // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool + // search with character lookup code that considers both the + // lookbehind buffer and the current round's haystack data. + // + // Loop until + // there is a match. + // or until + // we've moved past the position that requires the + // lookbehind buffer. In this case we switch to the + // optimized loop. + // or until + // the character to look at lies outside the haystack. + while (pos < 0 && pos <= len - needleLength) { + ch = this._sbmh_lookup_char(data, pos + needleLength - 1) + + if ( + ch === lastNeedleChar && + this._sbmh_memcmp(data, pos, needleLength - 1) + ) { + this._lookbehind_size = 0 + ++this.matches + this.emit('info', true) + + return (this._bufpos = pos + needleLength) + } + pos += this._occ[ch] + } + + // No match. + + if (pos < 0) { + // There's too few data for Boyer-Moore-Horspool to run, + // so let's use a different algorithm to skip as much as + // we can. + // Forward pos until + // the trailing part of lookbehind + data + // looks like the beginning of the needle + // or until + // pos == 0 + while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos } + } + + if (pos >= 0) { + // Discard lookbehind buffer. + this.emit('info', false, this._lookbehind, 0, this._lookbehind_size) + this._lookbehind_size = 0 + } else { + // Cut off part of the lookbehind buffer that has + // been processed and append the entire haystack + // into it. + const bytesToCutOff = this._lookbehind_size + pos + if (bytesToCutOff > 0) { + // The cut off data is guaranteed not to contain the needle. + this.emit('info', false, this._lookbehind, 0, bytesToCutOff) + } + + this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, + this._lookbehind_size - bytesToCutOff) + this._lookbehind_size -= bytesToCutOff + + data.copy(this._lookbehind, this._lookbehind_size) + this._lookbehind_size += len + + this._bufpos = len + return len + } + } + + pos += (pos >= 0) * this._bufpos + + // Lookbehind buffer is now empty. We only need to check if the + // needle is in the haystack. + if (data.indexOf(needle, pos) !== -1) { + pos = data.indexOf(needle, pos) + ++this.matches + if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) } + + return (this._bufpos = pos + needleLength) + } else { + pos = len - needleLength + } + + // There was no match. If there's trailing haystack data that we cannot + // match yet using the Boyer-Moore-Horspool algorithm (because the trailing + // data is less than the needle size) then match using a modified + // algorithm that starts matching from the beginning instead of the end. + // Whatever trailing data is left after running this algorithm is added to + // the lookbehind buffer. + while ( + pos < len && + ( + data[pos] !== needle[0] || + ( + (Buffer.compare( + data.subarray(pos, pos + len - pos), + needle.subarray(0, len - pos) + ) !== 0) + ) + ) + ) { + ++pos + } + if (pos < len) { + data.copy(this._lookbehind, 0, pos, pos + (len - pos)) + this._lookbehind_size = len - pos + } + + // Everything until pos is guaranteed not to contain needle data. + if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) } + + this._bufpos = len + return len +} + +SBMH.prototype._sbmh_lookup_char = function (data, pos) { + return (pos < 0) + ? this._lookbehind[this._lookbehind_size + pos] + : data[pos] +} + +SBMH.prototype._sbmh_memcmp = function (data, pos, len) { + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } + } + return true +} + +module.exports = SBMH diff --git a/deps/undici/src/node_modules/@fastify/busboy/lib/main.d.ts b/deps/undici/src/node_modules/@fastify/busboy/lib/main.d.ts new file mode 100644 index 00000000000000..91b6448363a712 --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/lib/main.d.ts @@ -0,0 +1,196 @@ +// Definitions by: Jacob Baskin +// BendingBender +// Igor Savin + +/// + +import * as http from 'http'; +import { Readable, Writable } from 'stream'; +export { Dicer } from "../deps/dicer/lib/dicer"; + +export const Busboy: BusboyConstructor; +export default Busboy; + +export interface BusboyConfig { + /** + * These are the HTTP headers of the incoming request, which are used by individual parsers. + */ + headers: BusboyHeaders; + /** + * `highWaterMark` to use for this Busboy instance. + * @default WritableStream default. + */ + highWaterMark?: number | undefined; + /** + * highWaterMark to use for file streams. + * @default ReadableStream default. + */ + fileHwm?: number | undefined; + /** + * Default character set to use when one isn't defined. + * @default 'utf8' + */ + defCharset?: string | undefined; + /** + * Detect if a Part is a file. + * + * By default a file is detected if contentType + * is application/octet-stream or fileName is not + * undefined. + * + * Modify this to handle e.g. Blobs. + */ + isPartAFile?: (fieldName: string | undefined, contentType: string | undefined, fileName: string | undefined) => boolean; + /** + * If paths in the multipart 'filename' field shall be preserved. + * @default false + */ + preservePath?: boolean | undefined; + /** + * Various limits on incoming data. + */ + limits?: + | { + /** + * Max field name size (in bytes) + * @default 100 bytes + */ + fieldNameSize?: number | undefined; + /** + * Max field value size (in bytes) + * @default 1MB + */ + fieldSize?: number | undefined; + /** + * Max number of non-file fields + * @default Infinity + */ + fields?: number | undefined; + /** + * For multipart forms, the max file size (in bytes) + * @default Infinity + */ + fileSize?: number | undefined; + /** + * For multipart forms, the max number of file fields + * @default Infinity + */ + files?: number | undefined; + /** + * For multipart forms, the max number of parts (fields + files) + * @default Infinity + */ + parts?: number | undefined; + /** + * For multipart forms, the max number of header key=>value pairs to parse + * @default 2000 + */ + headerPairs?: number | undefined; + + /** + * For multipart forms, the max size of a header part + * @default 81920 + */ + headerSize?: number | undefined; + } + | undefined; +} + +export type BusboyHeaders = { 'content-type': string } & http.IncomingHttpHeaders; + +export interface BusboyFileStream extends + Readable { + + truncated: boolean; + + /** + * The number of bytes that have been read so far. + */ + bytesRead: number; +} + +export interface Busboy extends Writable { + addListener(event: Event, listener: BusboyEvents[Event]): this; + + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + on(event: Event, listener: BusboyEvents[Event]): this; + + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: Event, listener: BusboyEvents[Event]): this; + + once(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: Event, listener: BusboyEvents[Event]): this; + + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + off(event: Event, listener: BusboyEvents[Event]): this; + + off(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: Event, listener: BusboyEvents[Event]): this; + + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: Event, listener: BusboyEvents[Event]): this; + + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; +} + +export interface BusboyEvents { + /** + * Emitted for each new file form field found. + * + * * Note: if you listen for this event, you should always handle the `stream` no matter if you care about the + * file contents or not (e.g. you can simply just do `stream.resume();` if you want to discard the contents), + * otherwise the 'finish' event will never fire on the Busboy instance. However, if you don't care about **any** + * incoming files, you can simply not listen for the 'file' event at all and any/all files will be automatically + * and safely discarded (these discarded files do still count towards `files` and `parts` limits). + * * If a configured file size limit was reached, `stream` will both have a boolean property `truncated` + * (best checked at the end of the stream) and emit a 'limit' event to notify you when this happens. + * + * @param listener.transferEncoding Contains the 'Content-Transfer-Encoding' value for the file stream. + * @param listener.mimeType Contains the 'Content-Type' value for the file stream. + */ + file: ( + fieldname: string, + stream: BusboyFileStream, + filename: string, + transferEncoding: string, + mimeType: string, + ) => void; + /** + * Emitted for each new non-file field found. + */ + field: ( + fieldname: string, + value: string, + fieldnameTruncated: boolean, + valueTruncated: boolean, + transferEncoding: string, + mimeType: string, + ) => void; + finish: () => void; + /** + * Emitted when specified `parts` limit has been reached. No more 'file' or 'field' events will be emitted. + */ + partsLimit: () => void; + /** + * Emitted when specified `files` limit has been reached. No more 'file' events will be emitted. + */ + filesLimit: () => void; + /** + * Emitted when specified `fields` limit has been reached. No more 'field' events will be emitted. + */ + fieldsLimit: () => void; + error: (error: unknown) => void; +} + +export interface BusboyConstructor { + (options: BusboyConfig): Busboy; + + new(options: BusboyConfig): Busboy; +} + diff --git a/deps/undici/src/node_modules/@fastify/busboy/lib/main.js b/deps/undici/src/node_modules/@fastify/busboy/lib/main.js new file mode 100644 index 00000000000000..8794bebf2296b5 --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/lib/main.js @@ -0,0 +1,85 @@ +'use strict' + +const WritableStream = require('node:stream').Writable +const { inherits } = require('node:util') +const Dicer = require('../deps/dicer/lib/Dicer') + +const MultipartParser = require('./types/multipart') +const UrlencodedParser = require('./types/urlencoded') +const parseParams = require('./utils/parseParams') + +function Busboy (opts) { + if (!(this instanceof Busboy)) { return new Busboy(opts) } + + if (typeof opts !== 'object') { + throw new TypeError('Busboy expected an options-Object.') + } + if (typeof opts.headers !== 'object') { + throw new TypeError('Busboy expected an options-Object with headers-attribute.') + } + if (typeof opts.headers['content-type'] !== 'string') { + throw new TypeError('Missing Content-Type-header.') + } + + const { + headers, + ...streamOptions + } = opts + + this.opts = { + autoDestroy: false, + ...streamOptions + } + WritableStream.call(this, this.opts) + + this._done = false + this._parser = this.getParserByHeaders(headers) + this._finished = false +} +inherits(Busboy, WritableStream) + +Busboy.prototype.emit = function (ev) { + if (ev === 'finish') { + if (!this._done) { + this._parser?.end() + return + } else if (this._finished) { + return + } + this._finished = true + } + WritableStream.prototype.emit.apply(this, arguments) +} + +Busboy.prototype.getParserByHeaders = function (headers) { + const parsed = parseParams(headers['content-type']) + + const cfg = { + defCharset: this.opts.defCharset, + fileHwm: this.opts.fileHwm, + headers, + highWaterMark: this.opts.highWaterMark, + isPartAFile: this.opts.isPartAFile, + limits: this.opts.limits, + parsedConType: parsed, + preservePath: this.opts.preservePath + } + + if (MultipartParser.detect.test(parsed[0])) { + return new MultipartParser(this, cfg) + } + if (UrlencodedParser.detect.test(parsed[0])) { + return new UrlencodedParser(this, cfg) + } + throw new Error('Unsupported Content-Type.') +} + +Busboy.prototype._write = function (chunk, encoding, cb) { + this._parser.write(chunk, cb) +} + +module.exports = Busboy +module.exports.default = Busboy +module.exports.Busboy = Busboy + +module.exports.Dicer = Dicer diff --git a/deps/undici/src/node_modules/@fastify/busboy/lib/types/multipart.js b/deps/undici/src/node_modules/@fastify/busboy/lib/types/multipart.js new file mode 100644 index 00000000000000..ad242db27a78e3 --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/lib/types/multipart.js @@ -0,0 +1,306 @@ +'use strict' + +// TODO: +// * support 1 nested multipart level +// (see second multipart example here: +// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) +// * support limits.fieldNameSize +// -- this will require modifications to utils.parseParams + +const { Readable } = require('node:stream') +const { inherits } = require('node:util') + +const Dicer = require('../../deps/dicer/lib/Dicer') + +const parseParams = require('../utils/parseParams') +const decodeText = require('../utils/decodeText') +const basename = require('../utils/basename') +const getLimit = require('../utils/getLimit') + +const RE_BOUNDARY = /^boundary$/i +const RE_FIELD = /^form-data$/i +const RE_CHARSET = /^charset$/i +const RE_FILENAME = /^filename$/i +const RE_NAME = /^name$/i + +Multipart.detect = /^multipart\/form-data/i +function Multipart (boy, cfg) { + let i + let len + const self = this + let boundary + const limits = cfg.limits + const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)) + const parsedConType = cfg.parsedConType || [] + const defCharset = cfg.defCharset || 'utf8' + const preservePath = cfg.preservePath + const fileOpts = { highWaterMark: cfg.fileHwm } + + for (i = 0, len = parsedConType.length; i < len; ++i) { + if (Array.isArray(parsedConType[i]) && + RE_BOUNDARY.test(parsedConType[i][0])) { + boundary = parsedConType[i][1] + break + } + } + + function checkFinished () { + if (nends === 0 && finished && !boy._done) { + finished = false + self.end() + } + } + + if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } + + const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) + const filesLimit = getLimit(limits, 'files', Infinity) + const fieldsLimit = getLimit(limits, 'fields', Infinity) + const partsLimit = getLimit(limits, 'parts', Infinity) + const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) + const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) + + let nfiles = 0 + let nfields = 0 + let nends = 0 + let curFile + let curField + let finished = false + + this._needDrain = false + this._pause = false + this._cb = undefined + this._nparts = 0 + this._boy = boy + + const parserCfg = { + boundary, + maxHeaderPairs: headerPairsLimit, + maxHeaderSize: headerSizeLimit, + partHwm: fileOpts.highWaterMark, + highWaterMark: cfg.highWaterMark + } + + this.parser = new Dicer(parserCfg) + this.parser.on('drain', function () { + self._needDrain = false + if (self._cb && !self._pause) { + const cb = self._cb + self._cb = undefined + cb() + } + }).on('part', function onPart (part) { + if (++self._nparts > partsLimit) { + self.parser.removeListener('part', onPart) + self.parser.on('part', skipPart) + boy.hitPartsLimit = true + boy.emit('partsLimit') + return skipPart(part) + } + + // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let + // us emit 'end' early since we know the part has ended if we are already + // seeing the next part + if (curField) { + const field = curField + field.emit('end') + field.removeAllListeners('end') + } + + part.on('header', function (header) { + let contype + let fieldname + let parsed + let charset + let encoding + let filename + let nsize = 0 + + if (header['content-type']) { + parsed = parseParams(header['content-type'][0]) + if (parsed[0]) { + contype = parsed[0].toLowerCase() + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_CHARSET.test(parsed[i][0])) { + charset = parsed[i][1].toLowerCase() + break + } + } + } + } + + if (contype === undefined) { contype = 'text/plain' } + if (charset === undefined) { charset = defCharset } + + if (header['content-disposition']) { + parsed = parseParams(header['content-disposition'][0]) + if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_NAME.test(parsed[i][0])) { + fieldname = parsed[i][1] + } else if (RE_FILENAME.test(parsed[i][0])) { + filename = parsed[i][1] + if (!preservePath) { filename = basename(filename) } + } + } + } else { return skipPart(part) } + + if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' } + + let onData, + onEnd + + if (isPartAFile(fieldname, contype, filename)) { + // file/binary field + if (nfiles === filesLimit) { + if (!boy.hitFilesLimit) { + boy.hitFilesLimit = true + boy.emit('filesLimit') + } + return skipPart(part) + } + + ++nfiles + + if (!boy._events.file) { + self.parser._ignore() + return + } + + ++nends + const file = new FileStream(fileOpts) + curFile = file + file.on('end', function () { + --nends + self._pause = false + checkFinished() + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + }) + file._read = function (n) { + if (!self._pause) { return } + self._pause = false + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + } + boy.emit('file', fieldname, file, filename, encoding, contype) + + onData = function (data) { + if ((nsize += data.length) > fileSizeLimit) { + const extralen = fileSizeLimit - nsize + data.length + if (extralen > 0) { file.push(data.slice(0, extralen)) } + file.truncated = true + file.bytesRead = fileSizeLimit + part.removeAllListeners('data') + file.emit('limit') + return + } else if (!file.push(data)) { self._pause = true } + + file.bytesRead = nsize + } + + onEnd = function () { + curFile = undefined + file.push(null) + } + } else { + // non-file field + if (nfields === fieldsLimit) { + if (!boy.hitFieldsLimit) { + boy.hitFieldsLimit = true + boy.emit('fieldsLimit') + } + return skipPart(part) + } + + ++nfields + ++nends + let buffer = '' + let truncated = false + curField = part + + onData = function (data) { + if ((nsize += data.length) > fieldSizeLimit) { + const extralen = (fieldSizeLimit - (nsize - data.length)) + buffer += data.toString('binary', 0, extralen) + truncated = true + part.removeAllListeners('data') + } else { buffer += data.toString('binary') } + } + + onEnd = function () { + curField = undefined + if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) } + boy.emit('field', fieldname, buffer, false, truncated, encoding, contype) + --nends + checkFinished() + } + } + + /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become + broken. Streams2/streams3 is a huge black box of confusion, but + somehow overriding the sync state seems to fix things again (and still + seems to work for previous node versions). + */ + part._readableState.sync = false + + part.on('data', onData) + part.on('end', onEnd) + }).on('error', function (err) { + if (curFile) { curFile.emit('error', err) } + }) + }).on('error', function (err) { + boy.emit('error', err) + }).on('finish', function () { + finished = true + checkFinished() + }) +} + +Multipart.prototype.write = function (chunk, cb) { + const r = this.parser.write(chunk) + if (r && !this._pause) { + cb() + } else { + this._needDrain = !r + this._cb = cb + } +} + +Multipart.prototype.end = function () { + const self = this + + if (self.parser.writable) { + self.parser.end() + } else if (!self._boy._done) { + process.nextTick(function () { + self._boy._done = true + self._boy.emit('finish') + }) + } +} + +function skipPart (part) { + part.resume() +} + +function FileStream (opts) { + Readable.call(this, opts) + + this.bytesRead = 0 + + this.truncated = false +} + +inherits(FileStream, Readable) + +FileStream.prototype._read = function (n) {} + +module.exports = Multipart diff --git a/deps/undici/src/node_modules/@fastify/busboy/lib/types/urlencoded.js b/deps/undici/src/node_modules/@fastify/busboy/lib/types/urlencoded.js new file mode 100644 index 00000000000000..6f5f7846d8b14f --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/lib/types/urlencoded.js @@ -0,0 +1,190 @@ +'use strict' + +const Decoder = require('../utils/Decoder') +const decodeText = require('../utils/decodeText') +const getLimit = require('../utils/getLimit') + +const RE_CHARSET = /^charset$/i + +UrlEncoded.detect = /^application\/x-www-form-urlencoded/i +function UrlEncoded (boy, cfg) { + const limits = cfg.limits + const parsedConType = cfg.parsedConType + this.boy = boy + + this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100) + this.fieldsLimit = getLimit(limits, 'fields', Infinity) + + let charset + for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var + if (Array.isArray(parsedConType[i]) && + RE_CHARSET.test(parsedConType[i][0])) { + charset = parsedConType[i][1].toLowerCase() + break + } + } + + if (charset === undefined) { charset = cfg.defCharset || 'utf8' } + + this.decoder = new Decoder() + this.charset = charset + this._fields = 0 + this._state = 'key' + this._checkingBytes = true + this._bytesKey = 0 + this._bytesVal = 0 + this._key = '' + this._val = '' + this._keyTrunc = false + this._valTrunc = false + this._hitLimit = false +} + +UrlEncoded.prototype.write = function (data, cb) { + if (this._fields === this.fieldsLimit) { + if (!this.boy.hitFieldsLimit) { + this.boy.hitFieldsLimit = true + this.boy.emit('fieldsLimit') + } + return cb() + } + + let idxeq; let idxamp; let i; let p = 0; const len = data.length + + while (p < len) { + if (this._state === 'key') { + idxeq = idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x3D/* = */) { + idxeq = i + break + } else if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesKey } + } + + if (idxeq !== undefined) { + // key with assignment + if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) } + this._state = 'val' + + this._hitLimit = false + this._checkingBytes = true + this._val = '' + this._bytesVal = 0 + this._valTrunc = false + this.decoder.reset() + + p = idxeq + 1 + } else if (idxamp !== undefined) { + // key with no assignment + ++this._fields + let key; const keyTrunc = this._keyTrunc + if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key } + + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() + + if (key.length) { + this.boy.emit('field', decodeText(key, 'binary', this.charset), + '', + keyTrunc, + false) + } + + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._keyTrunc = true + } + } else { + if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } + p = len + } + } else { + idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesVal } + } + + if (idxamp !== undefined) { + ++this._fields + if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) } + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + this._state = 'key' + + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() + + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._val === '' && this.fieldSizeLimit === 0) || + (this._bytesVal = this._val.length) === this.fieldSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._valTrunc = true + } + } else { + if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) } + p = len + } + } + } + cb() +} + +UrlEncoded.prototype.end = function () { + if (this.boy._done) { return } + + if (this._state === 'key' && this._key.length > 0) { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + '', + this._keyTrunc, + false) + } else if (this._state === 'val') { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + } + this.boy._done = true + this.boy.emit('finish') +} + +module.exports = UrlEncoded diff --git a/deps/undici/src/node_modules/@fastify/busboy/lib/utils/Decoder.js b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/Decoder.js new file mode 100644 index 00000000000000..7917678c746538 --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/Decoder.js @@ -0,0 +1,54 @@ +'use strict' + +const RE_PLUS = /\+/g + +const HEX = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +] + +function Decoder () { + this.buffer = undefined +} +Decoder.prototype.write = function (str) { + // Replace '+' with ' ' before decoding + str = str.replace(RE_PLUS, ' ') + let res = '' + let i = 0; let p = 0; const len = str.length + for (; i < len; ++i) { + if (this.buffer !== undefined) { + if (!HEX[str.charCodeAt(i)]) { + res += '%' + this.buffer + this.buffer = undefined + --i // retry character + } else { + this.buffer += str[i] + ++p + if (this.buffer.length === 2) { + res += String.fromCharCode(parseInt(this.buffer, 16)) + this.buffer = undefined + } + } + } else if (str[i] === '%') { + if (i > p) { + res += str.substring(p, i) + p = i + } + this.buffer = '' + ++p + } + } + if (p < len && this.buffer === undefined) { res += str.substring(p) } + return res +} +Decoder.prototype.reset = function () { + this.buffer = undefined +} + +module.exports = Decoder diff --git a/deps/undici/src/node_modules/@fastify/busboy/lib/utils/basename.js b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/basename.js new file mode 100644 index 00000000000000..db588199db051d --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/basename.js @@ -0,0 +1,14 @@ +'use strict' + +module.exports = function basename (path) { + if (typeof path !== 'string') { return '' } + for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var + switch (path.charCodeAt(i)) { + case 0x2F: // '/' + case 0x5C: // '\' + path = path.slice(i + 1) + return (path === '..' || path === '.' ? '' : path) + } + } + return (path === '..' || path === '.' ? '' : path) +} diff --git a/deps/undici/src/node_modules/@fastify/busboy/lib/utils/decodeText.js b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/decodeText.js new file mode 100644 index 00000000000000..ee376062c1843f --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/decodeText.js @@ -0,0 +1,26 @@ +'use strict' + +// Node has always utf-8 +const utf8Decoder = new TextDecoder('utf-8') +const textDecoders = new Map([ + ['utf-8', utf8Decoder], + ['utf8', utf8Decoder] +]) + +function decodeText (text, textEncoding, destEncoding) { + if (text) { + if (textDecoders.has(destEncoding)) { + try { + return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding)) + } catch (e) { } + } else { + try { + textDecoders.set(destEncoding, new TextDecoder(destEncoding)) + return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding)) + } catch (e) { } + } + } + return text +} + +module.exports = decodeText diff --git a/deps/undici/src/node_modules/@fastify/busboy/lib/utils/getLimit.js b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/getLimit.js new file mode 100644 index 00000000000000..cb64fd6721aacc --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/getLimit.js @@ -0,0 +1,16 @@ +'use strict' + +module.exports = function getLimit (limits, name, defaultLimit) { + if ( + !limits || + limits[name] === undefined || + limits[name] === null + ) { return defaultLimit } + + if ( + typeof limits[name] !== 'number' || + isNaN(limits[name]) + ) { throw new TypeError('Limit ' + name + ' is not a valid number') } + + return limits[name] +} diff --git a/deps/undici/src/node_modules/@fastify/busboy/lib/utils/parseParams.js b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/parseParams.js new file mode 100644 index 00000000000000..f9214180fa79d5 --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/parseParams.js @@ -0,0 +1,87 @@ +'use strict' + +const decodeText = require('./decodeText') + +const RE_ENCODED = /%([a-fA-F0-9]{2})/g + +function encodedReplacer (match, byte) { + return String.fromCharCode(parseInt(byte, 16)) +} + +function parseParams (str) { + const res = [] + let state = 'key' + let charset = '' + let inquote = false + let escaping = false + let p = 0 + let tmp = '' + + for (var i = 0, len = str.length; i < len; ++i) { // eslint-disable-line no-var + const char = str[i] + if (char === '\\' && inquote) { + if (escaping) { escaping = false } else { + escaping = true + continue + } + } else if (char === '"') { + if (!escaping) { + if (inquote) { + inquote = false + state = 'key' + } else { inquote = true } + continue + } else { escaping = false } + } else { + if (escaping && inquote) { tmp += '\\' } + escaping = false + if ((state === 'charset' || state === 'lang') && char === "'") { + if (state === 'charset') { + state = 'lang' + charset = tmp.substring(1) + } else { state = 'value' } + tmp = '' + continue + } else if (state === 'key' && + (char === '*' || char === '=') && + res.length) { + if (char === '*') { state = 'charset' } else { state = 'value' } + res[p] = [tmp, undefined] + tmp = '' + continue + } else if (!inquote && char === ';') { + state = 'key' + if (charset) { + if (tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } + charset = '' + } else if (tmp.length) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } + tmp = '' + ++p + continue + } else if (!inquote && (char === ' ' || char === '\t')) { continue } + } + tmp += char + } + if (charset && tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } else if (tmp) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + + if (res[p] === undefined) { + if (tmp) { res[p] = tmp } + } else { res[p][1] = tmp } + + return res +} + +module.exports = parseParams diff --git a/deps/undici/src/node_modules/@fastify/busboy/package.json b/deps/undici/src/node_modules/@fastify/busboy/package.json new file mode 100644 index 00000000000000..3288ee06872612 --- /dev/null +++ b/deps/undici/src/node_modules/@fastify/busboy/package.json @@ -0,0 +1,89 @@ +{ + "name": "@fastify/busboy", + "version": "2.0.0", + "private": false, + "author": "Brian White ", + "contributors": [ + { + "name": "Igor Savin", + "email": "kibertoad@gmail.com", + "url": "https://github.com/kibertoad" + }, + { + "name": "Aras Abbasi", + "email": "aras.abbasi@gmail.com", + "url": "https://github.com/uzlopak" + } + ], + "description": "A streaming parser for HTML form data for node.js", + "main": "lib/main", + "types": "lib/main.d.ts", + "scripts": { + "bench:busboy": "cd benchmarks && npm install && npm run benchmark-fastify", + "bench:dicer": "node bench/dicer/dicer-bench-multipart-parser.js", + "coveralls": "nyc report --reporter=lcov", + "lint": "npm run lint:standard", + "lint:everything": "npm run lint && npm run test:types", + "lint:fix": "standard --fix", + "lint:standard": "standard --verbose | snazzy", + "test:mocha": "mocha test", + "test:types": "tsd", + "test:coverage": "nyc npm run test", + "test": "npm run test:mocha" + }, + "engines": { + "node": ">=14" + }, + "devDependencies": { + "@types/node": "^20.1.0", + "busboy": "^1.0.0", + "chai": "^4.3.6", + "eslint": "^8.23.0", + "eslint-config-standard": "^17.0.0", + "eslint-plugin-n": "^16.0.0", + "mocha": "^10.0.0", + "nyc": "^15.1.0", + "photofinish": "^1.8.0", + "snazzy": "^9.0.0", + "standard": "^17.0.0", + "tsd": "^0.29.0", + "typescript": "^5.0.2" + }, + "keywords": [ + "uploads", + "forms", + "multipart", + "form-data" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/fastify/busboy.git" + }, + "tsd": { + "directory": "test/types", + "compilerOptions": { + "esModuleInterop": false, + "module": "commonjs", + "target": "ES2017" + } + }, + "standard": { + "globals": [ + "describe", + "it" + ], + "ignore": [ + "bench" + ] + }, + "files": [ + "README.md", + "LICENSE", + "lib/*", + "deps/encoding/*", + "deps/dicer/lib", + "deps/streamsearch/", + "deps/dicer/LICENSE" + ] +} diff --git a/deps/undici/src/node_modules/busboy/.eslintrc.js b/deps/undici/src/node_modules/busboy/.eslintrc.js deleted file mode 100644 index be9311d02655a2..00000000000000 --- a/deps/undici/src/node_modules/busboy/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = { - extends: '@mscdex/eslint-config', -}; diff --git a/deps/undici/src/node_modules/busboy/.github/workflows/ci.yml b/deps/undici/src/node_modules/busboy/.github/workflows/ci.yml deleted file mode 100644 index 799bae04adb62a..00000000000000 --- a/deps/undici/src/node_modules/busboy/.github/workflows/ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: CI - -on: - pull_request: - push: - branches: [ master ] - -jobs: - tests-linux: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - node-version: [10.16.0, 10.x, 12.x, 14.x, 16.x] - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install module - run: npm install - - name: Run tests - run: npm test diff --git a/deps/undici/src/node_modules/busboy/.github/workflows/lint.yml b/deps/undici/src/node_modules/busboy/.github/workflows/lint.yml deleted file mode 100644 index 9f9e1f589a30be..00000000000000 --- a/deps/undici/src/node_modules/busboy/.github/workflows/lint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: lint - -on: - pull_request: - push: - branches: [ master ] - -env: - NODE_VERSION: 16.x - -jobs: - lint-js: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v1 - with: - node-version: ${{ env.NODE_VERSION }} - - name: Install ESLint + ESLint configs/plugins - run: npm install --only=dev - - name: Lint files - run: npm run lint diff --git a/deps/undici/src/node_modules/busboy/README.md b/deps/undici/src/node_modules/busboy/README.md deleted file mode 100644 index 654af30455614e..00000000000000 --- a/deps/undici/src/node_modules/busboy/README.md +++ /dev/null @@ -1,191 +0,0 @@ -# Description - -A node.js module for parsing incoming HTML form data. - -Changes (breaking or otherwise) in v1.0.0 can be found [here](https://github.com/mscdex/busboy/issues/266). - -# Requirements - -* [node.js](http://nodejs.org/) -- v10.16.0 or newer - - -# Install - - npm install busboy - - -# Examples - -* Parsing (multipart) with default options: - -```js -const http = require('http'); - -const busboy = require('busboy'); - -http.createServer((req, res) => { - if (req.method === 'POST') { - console.log('POST request'); - const bb = busboy({ headers: req.headers }); - bb.on('file', (name, file, info) => { - const { filename, encoding, mimeType } = info; - console.log( - `File [${name}]: filename: %j, encoding: %j, mimeType: %j`, - filename, - encoding, - mimeType - ); - file.on('data', (data) => { - console.log(`File [${name}] got ${data.length} bytes`); - }).on('close', () => { - console.log(`File [${name}] done`); - }); - }); - bb.on('field', (name, val, info) => { - console.log(`Field [${name}]: value: %j`, val); - }); - bb.on('close', () => { - console.log('Done parsing form!'); - res.writeHead(303, { Connection: 'close', Location: '/' }); - res.end(); - }); - req.pipe(bb); - } else if (req.method === 'GET') { - res.writeHead(200, { Connection: 'close' }); - res.end(` - - - -
-
-
- -
- - - `); - } -}).listen(8000, () => { - console.log('Listening for requests'); -}); - -// Example output: -// -// Listening for requests -// < ... form submitted ... > -// POST request -// File [filefield]: filename: "logo.jpg", encoding: "binary", mime: "image/jpeg" -// File [filefield] got 11912 bytes -// Field [textfield]: value: "testing! :-)" -// File [filefield] done -// Done parsing form! -``` - -* Save all incoming files to disk: - -```js -const { randomFillSync } = require('crypto'); -const fs = require('fs'); -const http = require('http'); -const os = require('os'); -const path = require('path'); - -const busboy = require('busboy'); - -const random = (() => { - const buf = Buffer.alloc(16); - return () => randomFillSync(buf).toString('hex'); -})(); - -http.createServer((req, res) => { - if (req.method === 'POST') { - const bb = busboy({ headers: req.headers }); - bb.on('file', (name, file, info) => { - const saveTo = path.join(os.tmpdir(), `busboy-upload-${random()}`); - file.pipe(fs.createWriteStream(saveTo)); - }); - bb.on('close', () => { - res.writeHead(200, { 'Connection': 'close' }); - res.end(`That's all folks!`); - }); - req.pipe(bb); - return; - } - res.writeHead(404); - res.end(); -}).listen(8000, () => { - console.log('Listening for requests'); -}); -``` - - -# API - -## Exports - -`busboy` exports a single function: - -**( _function_ )**(< _object_ >config) - Creates and returns a new _Writable_ form parser stream. - -* Valid `config` properties: - - * **headers** - _object_ - These are the HTTP headers of the incoming request, which are used by individual parsers. - - * **highWaterMark** - _integer_ - highWaterMark to use for the parser stream. **Default:** node's _stream.Writable_ default. - - * **fileHwm** - _integer_ - highWaterMark to use for individual file streams. **Default:** node's _stream.Readable_ default. - - * **defCharset** - _string_ - Default character set to use when one isn't defined. **Default:** `'utf8'`. - - * **defParamCharset** - _string_ - For multipart forms, the default character set to use for values of part header parameters (e.g. filename) that are not extended parameters (that contain an explicit charset). **Default:** `'latin1'`. - - * **preservePath** - _boolean_ - If paths in filenames from file parts in a `'multipart/form-data'` request shall be preserved. **Default:** `false`. - - * **limits** - _object_ - Various limits on incoming data. Valid properties are: - - * **fieldNameSize** - _integer_ - Max field name size (in bytes). **Default:** `100`. - - * **fieldSize** - _integer_ - Max field value size (in bytes). **Default:** `1048576` (1MB). - - * **fields** - _integer_ - Max number of non-file fields. **Default:** `Infinity`. - - * **fileSize** - _integer_ - For multipart forms, the max file size (in bytes). **Default:** `Infinity`. - - * **files** - _integer_ - For multipart forms, the max number of file fields. **Default:** `Infinity`. - - * **parts** - _integer_ - For multipart forms, the max number of parts (fields + files). **Default:** `Infinity`. - - * **headerPairs** - _integer_ - For multipart forms, the max number of header key-value pairs to parse. **Default:** `2000` (same as node's http module). - -This function can throw exceptions if there is something wrong with the values in `config`. For example, if the Content-Type in `headers` is missing entirely, is not a supported type, or is missing the boundary for `'multipart/form-data'` requests. - -## (Special) Parser stream events - -* **file**(< _string_ >name, < _Readable_ >stream, < _object_ >info) - Emitted for each new file found. `name` contains the form field name. `stream` is a _Readable_ stream containing the file's data. No transformations/conversions (e.g. base64 to raw binary) are done on the file's data. `info` contains the following properties: - - * `filename` - _string_ - If supplied, this contains the file's filename. **WARNING:** You should almost _never_ use this value as-is (especially if you are using `preservePath: true` in your `config`) as it could contain malicious input. You are better off generating your own (safe) filenames, or at the very least using a hash of the filename. - - * `encoding` - _string_ - The file's `'Content-Transfer-Encoding'` value. - - * `mimeType` - _string_ - The file's `'Content-Type'` value. - - **Note:** If you listen for this event, you should always consume the `stream` whether you care about its contents or not (you can simply do `stream.resume();` if you want to discard/skip the contents), otherwise the `'finish'`/`'close'` event will never fire on the busboy parser stream. - However, if you aren't accepting files, you can either simply not listen for the `'file'` event at all or set `limits.files` to `0`, and any/all files will be automatically skipped (these skipped files will still count towards any configured `limits.files` and `limits.parts` limits though). - - **Note:** If a configured `limits.fileSize` limit was reached for a file, `stream` will both have a boolean property `truncated` set to `true` (best checked at the end of the stream) and emit a `'limit'` event to notify you when this happens. - -* **field**(< _string_ >name, < _string_ >value, < _object_ >info) - Emitted for each new non-file field found. `name` contains the form field name. `value` contains the string value of the field. `info` contains the following properties: - - * `nameTruncated` - _boolean_ - Whether `name` was truncated or not (due to a configured `limits.fieldNameSize` limit) - - * `valueTruncated` - _boolean_ - Whether `value` was truncated or not (due to a configured `limits.fieldSize` limit) - - * `encoding` - _string_ - The field's `'Content-Transfer-Encoding'` value. - - * `mimeType` - _string_ - The field's `'Content-Type'` value. - -* **partsLimit**() - Emitted when the configured `limits.parts` limit has been reached. No more `'file'` or `'field'` events will be emitted. - -* **filesLimit**() - Emitted when the configured `limits.files` limit has been reached. No more `'file'` events will be emitted. - -* **fieldsLimit**() - Emitted when the configured `limits.fields` limit has been reached. No more `'field'` events will be emitted. diff --git a/deps/undici/src/node_modules/busboy/bench/bench-multipart-fields-100mb-big.js b/deps/undici/src/node_modules/busboy/bench/bench-multipart-fields-100mb-big.js deleted file mode 100644 index ef15729ea65c38..00000000000000 --- a/deps/undici/src/node_modules/busboy/bench/bench-multipart-fields-100mb-big.js +++ /dev/null @@ -1,149 +0,0 @@ -'use strict'; - -function createMultipartBuffers(boundary, sizes) { - const bufs = []; - for (let i = 0; i < sizes.length; ++i) { - const mb = sizes[i] * 1024 * 1024; - bufs.push(Buffer.from([ - `--${boundary}`, - `content-disposition: form-data; name="field${i + 1}"`, - '', - '0'.repeat(mb), - '', - ].join('\r\n'))); - } - bufs.push(Buffer.from([ - `--${boundary}--`, - '', - ].join('\r\n'))); - return bufs; -} - -const boundary = '-----------------------------168072824752491622650073'; -const buffers = createMultipartBuffers(boundary, [ - 10, - 10, - 10, - 20, - 50, -]); -const calls = { - partBegin: 0, - headerField: 0, - headerValue: 0, - headerEnd: 0, - headersEnd: 0, - partData: 0, - partEnd: 0, - end: 0, -}; - -const moduleName = process.argv[2]; -switch (moduleName) { - case 'busboy': { - const busboy = require('busboy'); - - const parser = busboy({ - limits: { - fieldSizeLimit: Infinity, - }, - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }, - }); - parser.on('field', (name, val, info) => { - ++calls.partBegin; - ++calls.partData; - ++calls.partEnd; - }).on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - break; - } - - case 'formidable': { - const { MultipartParser } = require('formidable'); - - const parser = new MultipartParser(); - parser.initWithBoundary(boundary); - parser.on('data', ({ name }) => { - ++calls[name]; - if (name === 'end') - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - - break; - } - - case 'multiparty': { - const { Readable } = require('stream'); - - const { Form } = require('multiparty'); - - const form = new Form({ - maxFieldsSize: Infinity, - maxFields: Infinity, - maxFilesSize: Infinity, - autoFields: false, - autoFiles: false, - }); - - const req = new Readable({ read: () => {} }); - req.headers = { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }; - - function hijack(name, fn) { - const oldFn = form[name]; - form[name] = function() { - fn(); - return oldFn.apply(this, arguments); - }; - } - - hijack('onParseHeaderField', () => { - ++calls.headerField; - }); - hijack('onParseHeaderValue', () => { - ++calls.headerValue; - }); - hijack('onParsePartBegin', () => { - ++calls.partBegin; - }); - hijack('onParsePartData', () => { - ++calls.partData; - }); - hijack('onParsePartEnd', () => { - ++calls.partEnd; - }); - - form.on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }).on('part', (p) => p.resume()); - - console.time(moduleName); - form.parse(req); - for (const buf of buffers) - req.push(buf); - req.push(null); - - break; - } - - default: - if (moduleName === undefined) - console.error('Missing parser module name'); - else - console.error(`Invalid parser module name: ${moduleName}`); - process.exit(1); -} diff --git a/deps/undici/src/node_modules/busboy/bench/bench-multipart-fields-100mb-small.js b/deps/undici/src/node_modules/busboy/bench/bench-multipart-fields-100mb-small.js deleted file mode 100644 index f32d421c735d32..00000000000000 --- a/deps/undici/src/node_modules/busboy/bench/bench-multipart-fields-100mb-small.js +++ /dev/null @@ -1,143 +0,0 @@ -'use strict'; - -function createMultipartBuffers(boundary, sizes) { - const bufs = []; - for (let i = 0; i < sizes.length; ++i) { - const mb = sizes[i] * 1024 * 1024; - bufs.push(Buffer.from([ - `--${boundary}`, - `content-disposition: form-data; name="field${i + 1}"`, - '', - '0'.repeat(mb), - '', - ].join('\r\n'))); - } - bufs.push(Buffer.from([ - `--${boundary}--`, - '', - ].join('\r\n'))); - return bufs; -} - -const boundary = '-----------------------------168072824752491622650073'; -const buffers = createMultipartBuffers(boundary, (new Array(100)).fill(1)); -const calls = { - partBegin: 0, - headerField: 0, - headerValue: 0, - headerEnd: 0, - headersEnd: 0, - partData: 0, - partEnd: 0, - end: 0, -}; - -const moduleName = process.argv[2]; -switch (moduleName) { - case 'busboy': { - const busboy = require('busboy'); - - const parser = busboy({ - limits: { - fieldSizeLimit: Infinity, - }, - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }, - }); - parser.on('field', (name, val, info) => { - ++calls.partBegin; - ++calls.partData; - ++calls.partEnd; - }).on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - break; - } - - case 'formidable': { - const { MultipartParser } = require('formidable'); - - const parser = new MultipartParser(); - parser.initWithBoundary(boundary); - parser.on('data', ({ name }) => { - ++calls[name]; - if (name === 'end') - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - - break; - } - - case 'multiparty': { - const { Readable } = require('stream'); - - const { Form } = require('multiparty'); - - const form = new Form({ - maxFieldsSize: Infinity, - maxFields: Infinity, - maxFilesSize: Infinity, - autoFields: false, - autoFiles: false, - }); - - const req = new Readable({ read: () => {} }); - req.headers = { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }; - - function hijack(name, fn) { - const oldFn = form[name]; - form[name] = function() { - fn(); - return oldFn.apply(this, arguments); - }; - } - - hijack('onParseHeaderField', () => { - ++calls.headerField; - }); - hijack('onParseHeaderValue', () => { - ++calls.headerValue; - }); - hijack('onParsePartBegin', () => { - ++calls.partBegin; - }); - hijack('onParsePartData', () => { - ++calls.partData; - }); - hijack('onParsePartEnd', () => { - ++calls.partEnd; - }); - - form.on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }).on('part', (p) => p.resume()); - - console.time(moduleName); - form.parse(req); - for (const buf of buffers) - req.push(buf); - req.push(null); - - break; - } - - default: - if (moduleName === undefined) - console.error('Missing parser module name'); - else - console.error(`Invalid parser module name: ${moduleName}`); - process.exit(1); -} diff --git a/deps/undici/src/node_modules/busboy/bench/bench-multipart-files-100mb-big.js b/deps/undici/src/node_modules/busboy/bench/bench-multipart-files-100mb-big.js deleted file mode 100644 index b46bdee02cdded..00000000000000 --- a/deps/undici/src/node_modules/busboy/bench/bench-multipart-files-100mb-big.js +++ /dev/null @@ -1,154 +0,0 @@ -'use strict'; - -function createMultipartBuffers(boundary, sizes) { - const bufs = []; - for (let i = 0; i < sizes.length; ++i) { - const mb = sizes[i] * 1024 * 1024; - bufs.push(Buffer.from([ - `--${boundary}`, - `content-disposition: form-data; name="file${i + 1}"; ` - + `filename="random${i + 1}.bin"`, - 'content-type: application/octet-stream', - '', - '0'.repeat(mb), - '', - ].join('\r\n'))); - } - bufs.push(Buffer.from([ - `--${boundary}--`, - '', - ].join('\r\n'))); - return bufs; -} - -const boundary = '-----------------------------168072824752491622650073'; -const buffers = createMultipartBuffers(boundary, [ - 10, - 10, - 10, - 20, - 50, -]); -const calls = { - partBegin: 0, - headerField: 0, - headerValue: 0, - headerEnd: 0, - headersEnd: 0, - partData: 0, - partEnd: 0, - end: 0, -}; - -const moduleName = process.argv[2]; -switch (moduleName) { - case 'busboy': { - const busboy = require('busboy'); - - const parser = busboy({ - limits: { - fieldSizeLimit: Infinity, - }, - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }, - }); - parser.on('file', (name, stream, info) => { - ++calls.partBegin; - stream.on('data', (chunk) => { - ++calls.partData; - }).on('end', () => { - ++calls.partEnd; - }); - }).on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - break; - } - - case 'formidable': { - const { MultipartParser } = require('formidable'); - - const parser = new MultipartParser(); - parser.initWithBoundary(boundary); - parser.on('data', ({ name }) => { - ++calls[name]; - if (name === 'end') - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - - break; - } - - case 'multiparty': { - const { Readable } = require('stream'); - - const { Form } = require('multiparty'); - - const form = new Form({ - maxFieldsSize: Infinity, - maxFields: Infinity, - maxFilesSize: Infinity, - autoFields: false, - autoFiles: false, - }); - - const req = new Readable({ read: () => {} }); - req.headers = { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }; - - function hijack(name, fn) { - const oldFn = form[name]; - form[name] = function() { - fn(); - return oldFn.apply(this, arguments); - }; - } - - hijack('onParseHeaderField', () => { - ++calls.headerField; - }); - hijack('onParseHeaderValue', () => { - ++calls.headerValue; - }); - hijack('onParsePartBegin', () => { - ++calls.partBegin; - }); - hijack('onParsePartData', () => { - ++calls.partData; - }); - hijack('onParsePartEnd', () => { - ++calls.partEnd; - }); - - form.on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }).on('part', (p) => p.resume()); - - console.time(moduleName); - form.parse(req); - for (const buf of buffers) - req.push(buf); - req.push(null); - - break; - } - - default: - if (moduleName === undefined) - console.error('Missing parser module name'); - else - console.error(`Invalid parser module name: ${moduleName}`); - process.exit(1); -} diff --git a/deps/undici/src/node_modules/busboy/bench/bench-multipart-files-100mb-small.js b/deps/undici/src/node_modules/busboy/bench/bench-multipart-files-100mb-small.js deleted file mode 100644 index 46b5dffb0c74d8..00000000000000 --- a/deps/undici/src/node_modules/busboy/bench/bench-multipart-files-100mb-small.js +++ /dev/null @@ -1,148 +0,0 @@ -'use strict'; - -function createMultipartBuffers(boundary, sizes) { - const bufs = []; - for (let i = 0; i < sizes.length; ++i) { - const mb = sizes[i] * 1024 * 1024; - bufs.push(Buffer.from([ - `--${boundary}`, - `content-disposition: form-data; name="file${i + 1}"; ` - + `filename="random${i + 1}.bin"`, - 'content-type: application/octet-stream', - '', - '0'.repeat(mb), - '', - ].join('\r\n'))); - } - bufs.push(Buffer.from([ - `--${boundary}--`, - '', - ].join('\r\n'))); - return bufs; -} - -const boundary = '-----------------------------168072824752491622650073'; -const buffers = createMultipartBuffers(boundary, (new Array(100)).fill(1)); -const calls = { - partBegin: 0, - headerField: 0, - headerValue: 0, - headerEnd: 0, - headersEnd: 0, - partData: 0, - partEnd: 0, - end: 0, -}; - -const moduleName = process.argv[2]; -switch (moduleName) { - case 'busboy': { - const busboy = require('busboy'); - - const parser = busboy({ - limits: { - fieldSizeLimit: Infinity, - }, - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }, - }); - parser.on('file', (name, stream, info) => { - ++calls.partBegin; - stream.on('data', (chunk) => { - ++calls.partData; - }).on('end', () => { - ++calls.partEnd; - }); - }).on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - break; - } - - case 'formidable': { - const { MultipartParser } = require('formidable'); - - const parser = new MultipartParser(); - parser.initWithBoundary(boundary); - parser.on('data', ({ name }) => { - ++calls[name]; - if (name === 'end') - console.timeEnd(moduleName); - }); - - console.time(moduleName); - for (const buf of buffers) - parser.write(buf); - - break; - } - - case 'multiparty': { - const { Readable } = require('stream'); - - const { Form } = require('multiparty'); - - const form = new Form({ - maxFieldsSize: Infinity, - maxFields: Infinity, - maxFilesSize: Infinity, - autoFields: false, - autoFiles: false, - }); - - const req = new Readable({ read: () => {} }); - req.headers = { - 'content-type': `multipart/form-data; boundary=${boundary}`, - }; - - function hijack(name, fn) { - const oldFn = form[name]; - form[name] = function() { - fn(); - return oldFn.apply(this, arguments); - }; - } - - hijack('onParseHeaderField', () => { - ++calls.headerField; - }); - hijack('onParseHeaderValue', () => { - ++calls.headerValue; - }); - hijack('onParsePartBegin', () => { - ++calls.partBegin; - }); - hijack('onParsePartData', () => { - ++calls.partData; - }); - hijack('onParsePartEnd', () => { - ++calls.partEnd; - }); - - form.on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }).on('part', (p) => p.resume()); - - console.time(moduleName); - form.parse(req); - for (const buf of buffers) - req.push(buf); - req.push(null); - - break; - } - - default: - if (moduleName === undefined) - console.error('Missing parser module name'); - else - console.error(`Invalid parser module name: ${moduleName}`); - process.exit(1); -} diff --git a/deps/undici/src/node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js b/deps/undici/src/node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js deleted file mode 100644 index 5c337df2ef951f..00000000000000 --- a/deps/undici/src/node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict'; - -const buffers = [ - Buffer.from( - (new Array(100)).fill('').map((_, i) => `key${i}=value${i}`).join('&') - ), -]; -const calls = { - field: 0, - end: 0, -}; - -let n = 3e3; - -const moduleName = process.argv[2]; -switch (moduleName) { - case 'busboy': { - const busboy = require('busboy'); - - console.time(moduleName); - (function next() { - const parser = busboy({ - limits: { - fieldSizeLimit: Infinity, - }, - headers: { - 'content-type': 'application/x-www-form-urlencoded; charset=utf-8', - }, - }); - parser.on('field', (name, val, info) => { - ++calls.field; - }).on('close', () => { - ++calls.end; - if (--n === 0) - console.timeEnd(moduleName); - else - process.nextTick(next); - }); - - for (const buf of buffers) - parser.write(buf); - parser.end(); - })(); - break; - } - - case 'formidable': { - const QuerystringParser = - require('formidable/src/parsers/Querystring.js'); - - console.time(moduleName); - (function next() { - const parser = new QuerystringParser(); - parser.on('data', (obj) => { - ++calls.field; - }).on('end', () => { - ++calls.end; - if (--n === 0) - console.timeEnd(moduleName); - else - process.nextTick(next); - }); - - for (const buf of buffers) - parser.write(buf); - parser.end(); - })(); - break; - } - - case 'formidable-streaming': { - const QuerystringParser = - require('formidable/src/parsers/StreamingQuerystring.js'); - - console.time(moduleName); - (function next() { - const parser = new QuerystringParser(); - parser.on('data', (obj) => { - ++calls.field; - }).on('end', () => { - ++calls.end; - if (--n === 0) - console.timeEnd(moduleName); - else - process.nextTick(next); - }); - - for (const buf of buffers) - parser.write(buf); - parser.end(); - })(); - break; - } - - default: - if (moduleName === undefined) - console.error('Missing parser module name'); - else - console.error(`Invalid parser module name: ${moduleName}`); - process.exit(1); -} diff --git a/deps/undici/src/node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js b/deps/undici/src/node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js deleted file mode 100644 index 1f5645cb8cc43f..00000000000000 --- a/deps/undici/src/node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -const buffers = [ - Buffer.from( - (new Array(900)).fill('').map((_, i) => `key${i}=value${i}`).join('&') - ), -]; -const calls = { - field: 0, - end: 0, -}; - -const moduleName = process.argv[2]; -switch (moduleName) { - case 'busboy': { - const busboy = require('busboy'); - - console.time(moduleName); - const parser = busboy({ - limits: { - fieldSizeLimit: Infinity, - }, - headers: { - 'content-type': 'application/x-www-form-urlencoded; charset=utf-8', - }, - }); - parser.on('field', (name, val, info) => { - ++calls.field; - }).on('close', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - for (const buf of buffers) - parser.write(buf); - parser.end(); - break; - } - - case 'formidable': { - const QuerystringParser = - require('formidable/src/parsers/Querystring.js'); - - console.time(moduleName); - const parser = new QuerystringParser(); - parser.on('data', (obj) => { - ++calls.field; - }).on('end', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - for (const buf of buffers) - parser.write(buf); - parser.end(); - break; - } - - case 'formidable-streaming': { - const QuerystringParser = - require('formidable/src/parsers/StreamingQuerystring.js'); - - console.time(moduleName); - const parser = new QuerystringParser(); - parser.on('data', (obj) => { - ++calls.field; - }).on('end', () => { - ++calls.end; - console.timeEnd(moduleName); - }); - - for (const buf of buffers) - parser.write(buf); - parser.end(); - break; - } - - default: - if (moduleName === undefined) - console.error('Missing parser module name'); - else - console.error(`Invalid parser module name: ${moduleName}`); - process.exit(1); -} diff --git a/deps/undici/src/node_modules/busboy/lib/index.js b/deps/undici/src/node_modules/busboy/lib/index.js deleted file mode 100644 index 873272d93cf34c..00000000000000 --- a/deps/undici/src/node_modules/busboy/lib/index.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -const { parseContentType } = require('./utils.js'); - -function getInstance(cfg) { - const headers = cfg.headers; - const conType = parseContentType(headers['content-type']); - if (!conType) - throw new Error('Malformed content type'); - - for (const type of TYPES) { - const matched = type.detect(conType); - if (!matched) - continue; - - const instanceCfg = { - limits: cfg.limits, - headers, - conType, - highWaterMark: undefined, - fileHwm: undefined, - defCharset: undefined, - defParamCharset: undefined, - preservePath: false, - }; - if (cfg.highWaterMark) - instanceCfg.highWaterMark = cfg.highWaterMark; - if (cfg.fileHwm) - instanceCfg.fileHwm = cfg.fileHwm; - instanceCfg.defCharset = cfg.defCharset; - instanceCfg.defParamCharset = cfg.defParamCharset; - instanceCfg.preservePath = cfg.preservePath; - return new type(instanceCfg); - } - - throw new Error(`Unsupported content type: ${headers['content-type']}`); -} - -// Note: types are explicitly listed here for easier bundling -// See: https://github.com/mscdex/busboy/issues/121 -const TYPES = [ - require('./types/multipart'), - require('./types/urlencoded'), -].filter(function(typemod) { return typeof typemod.detect === 'function'; }); - -module.exports = (cfg) => { - if (typeof cfg !== 'object' || cfg === null) - cfg = {}; - - if (typeof cfg.headers !== 'object' - || cfg.headers === null - || typeof cfg.headers['content-type'] !== 'string') { - throw new Error('Missing Content-Type'); - } - - return getInstance(cfg); -}; diff --git a/deps/undici/src/node_modules/busboy/lib/types/multipart.js b/deps/undici/src/node_modules/busboy/lib/types/multipart.js deleted file mode 100644 index cc0d7bb6638a12..00000000000000 --- a/deps/undici/src/node_modules/busboy/lib/types/multipart.js +++ /dev/null @@ -1,653 +0,0 @@ -'use strict'; - -const { Readable, Writable } = require('stream'); - -const StreamSearch = require('streamsearch'); - -const { - basename, - convertToUTF8, - getDecoder, - parseContentType, - parseDisposition, -} = require('../utils.js'); - -const BUF_CRLF = Buffer.from('\r\n'); -const BUF_CR = Buffer.from('\r'); -const BUF_DASH = Buffer.from('-'); - -function noop() {} - -const MAX_HEADER_PAIRS = 2000; // From node -const MAX_HEADER_SIZE = 16 * 1024; // From node (its default value) - -const HPARSER_NAME = 0; -const HPARSER_PRE_OWS = 1; -const HPARSER_VALUE = 2; -class HeaderParser { - constructor(cb) { - this.header = Object.create(null); - this.pairCount = 0; - this.byteCount = 0; - this.state = HPARSER_NAME; - this.name = ''; - this.value = ''; - this.crlf = 0; - this.cb = cb; - } - - reset() { - this.header = Object.create(null); - this.pairCount = 0; - this.byteCount = 0; - this.state = HPARSER_NAME; - this.name = ''; - this.value = ''; - this.crlf = 0; - } - - push(chunk, pos, end) { - let start = pos; - while (pos < end) { - switch (this.state) { - case HPARSER_NAME: { - let done = false; - for (; pos < end; ++pos) { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (TOKEN[code] !== 1) { - if (code !== 58/* ':' */) - return -1; - this.name += chunk.latin1Slice(start, pos); - if (this.name.length === 0) - return -1; - ++pos; - done = true; - this.state = HPARSER_PRE_OWS; - break; - } - } - if (!done) { - this.name += chunk.latin1Slice(start, pos); - break; - } - // FALLTHROUGH - } - case HPARSER_PRE_OWS: { - // Skip optional whitespace - let done = false; - for (; pos < end; ++pos) { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (code !== 32/* ' ' */ && code !== 9/* '\t' */) { - start = pos; - done = true; - this.state = HPARSER_VALUE; - break; - } - } - if (!done) - break; - // FALLTHROUGH - } - case HPARSER_VALUE: - switch (this.crlf) { - case 0: // Nothing yet - for (; pos < end; ++pos) { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (FIELD_VCHAR[code] !== 1) { - if (code !== 13/* '\r' */) - return -1; - ++this.crlf; - break; - } - } - this.value += chunk.latin1Slice(start, pos++); - break; - case 1: // Received CR - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - if (chunk[pos++] !== 10/* '\n' */) - return -1; - ++this.crlf; - break; - case 2: { // Received CR LF - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (code === 32/* ' ' */ || code === 9/* '\t' */) { - // Folded value - start = pos; - this.crlf = 0; - } else { - if (++this.pairCount < MAX_HEADER_PAIRS) { - this.name = this.name.toLowerCase(); - if (this.header[this.name] === undefined) - this.header[this.name] = [this.value]; - else - this.header[this.name].push(this.value); - } - if (code === 13/* '\r' */) { - ++this.crlf; - ++pos; - } else { - // Assume start of next header field name - start = pos; - this.crlf = 0; - this.state = HPARSER_NAME; - this.name = ''; - this.value = ''; - } - } - break; - } - case 3: { // Received CR LF CR - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - if (chunk[pos++] !== 10/* '\n' */) - return -1; - // End of header - const header = this.header; - this.reset(); - this.cb(header); - return pos; - } - } - break; - } - } - - return pos; - } -} - -class FileStream extends Readable { - constructor(opts, owner) { - super(opts); - this.truncated = false; - this._readcb = null; - this.once('end', () => { - // We need to make sure that we call any outstanding _writecb() that is - // associated with this file so that processing of the rest of the form - // can continue. This may not happen if the file stream ends right after - // backpressure kicks in, so we force it here. - this._read(); - if (--owner._fileEndsLeft === 0 && owner._finalcb) { - const cb = owner._finalcb; - owner._finalcb = null; - // Make sure other 'end' event handlers get a chance to be executed - // before busboy's 'finish' event is emitted - process.nextTick(cb); - } - }); - } - _read(n) { - const cb = this._readcb; - if (cb) { - this._readcb = null; - cb(); - } - } -} - -const ignoreData = { - push: (chunk, pos) => {}, - destroy: () => {}, -}; - -function callAndUnsetCb(self, err) { - const cb = self._writecb; - self._writecb = null; - if (err) - self.destroy(err); - else if (cb) - cb(); -} - -function nullDecoder(val, hint) { - return val; -} - -class Multipart extends Writable { - constructor(cfg) { - const streamOpts = { - autoDestroy: true, - emitClose: true, - highWaterMark: (typeof cfg.highWaterMark === 'number' - ? cfg.highWaterMark - : undefined), - }; - super(streamOpts); - - if (!cfg.conType.params || typeof cfg.conType.params.boundary !== 'string') - throw new Error('Multipart: Boundary not found'); - - const boundary = cfg.conType.params.boundary; - const paramDecoder = (typeof cfg.defParamCharset === 'string' - && cfg.defParamCharset - ? getDecoder(cfg.defParamCharset) - : nullDecoder); - const defCharset = (cfg.defCharset || 'utf8'); - const preservePath = cfg.preservePath; - const fileOpts = { - autoDestroy: true, - emitClose: true, - highWaterMark: (typeof cfg.fileHwm === 'number' - ? cfg.fileHwm - : undefined), - }; - - const limits = cfg.limits; - const fieldSizeLimit = (limits && typeof limits.fieldSize === 'number' - ? limits.fieldSize - : 1 * 1024 * 1024); - const fileSizeLimit = (limits && typeof limits.fileSize === 'number' - ? limits.fileSize - : Infinity); - const filesLimit = (limits && typeof limits.files === 'number' - ? limits.files - : Infinity); - const fieldsLimit = (limits && typeof limits.fields === 'number' - ? limits.fields - : Infinity); - const partsLimit = (limits && typeof limits.parts === 'number' - ? limits.parts - : Infinity); - - let parts = -1; // Account for initial boundary - let fields = 0; - let files = 0; - let skipPart = false; - - this._fileEndsLeft = 0; - this._fileStream = undefined; - this._complete = false; - let fileSize = 0; - - let field; - let fieldSize = 0; - let partCharset; - let partEncoding; - let partType; - let partName; - let partTruncated = false; - - let hitFilesLimit = false; - let hitFieldsLimit = false; - - this._hparser = null; - const hparser = new HeaderParser((header) => { - this._hparser = null; - skipPart = false; - - partType = 'text/plain'; - partCharset = defCharset; - partEncoding = '7bit'; - partName = undefined; - partTruncated = false; - - let filename; - if (!header['content-disposition']) { - skipPart = true; - return; - } - - const disp = parseDisposition(header['content-disposition'][0], - paramDecoder); - if (!disp || disp.type !== 'form-data') { - skipPart = true; - return; - } - - if (disp.params) { - if (disp.params.name) - partName = disp.params.name; - - if (disp.params['filename*']) - filename = disp.params['filename*']; - else if (disp.params.filename) - filename = disp.params.filename; - - if (filename !== undefined && !preservePath) - filename = basename(filename); - } - - if (header['content-type']) { - const conType = parseContentType(header['content-type'][0]); - if (conType) { - partType = `${conType.type}/${conType.subtype}`; - if (conType.params && typeof conType.params.charset === 'string') - partCharset = conType.params.charset.toLowerCase(); - } - } - - if (header['content-transfer-encoding']) - partEncoding = header['content-transfer-encoding'][0].toLowerCase(); - - if (partType === 'application/octet-stream' || filename !== undefined) { - // File - - if (files === filesLimit) { - if (!hitFilesLimit) { - hitFilesLimit = true; - this.emit('filesLimit'); - } - skipPart = true; - return; - } - ++files; - - if (this.listenerCount('file') === 0) { - skipPart = true; - return; - } - - fileSize = 0; - this._fileStream = new FileStream(fileOpts, this); - ++this._fileEndsLeft; - this.emit( - 'file', - partName, - this._fileStream, - { filename, - encoding: partEncoding, - mimeType: partType } - ); - } else { - // Non-file - - if (fields === fieldsLimit) { - if (!hitFieldsLimit) { - hitFieldsLimit = true; - this.emit('fieldsLimit'); - } - skipPart = true; - return; - } - ++fields; - - if (this.listenerCount('field') === 0) { - skipPart = true; - return; - } - - field = []; - fieldSize = 0; - } - }); - - let matchPostBoundary = 0; - const ssCb = (isMatch, data, start, end, isDataSafe) => { -retrydata: - while (data) { - if (this._hparser !== null) { - const ret = this._hparser.push(data, start, end); - if (ret === -1) { - this._hparser = null; - hparser.reset(); - this.emit('error', new Error('Malformed part header')); - break; - } - start = ret; - } - - if (start === end) - break; - - if (matchPostBoundary !== 0) { - if (matchPostBoundary === 1) { - switch (data[start]) { - case 45: // '-' - // Try matching '--' after boundary - matchPostBoundary = 2; - ++start; - break; - case 13: // '\r' - // Try matching CR LF before header - matchPostBoundary = 3; - ++start; - break; - default: - matchPostBoundary = 0; - } - if (start === end) - return; - } - - if (matchPostBoundary === 2) { - matchPostBoundary = 0; - if (data[start] === 45/* '-' */) { - // End of multipart data - this._complete = true; - this._bparser = ignoreData; - return; - } - // We saw something other than '-', so put the dash we consumed - // "back" - const writecb = this._writecb; - this._writecb = noop; - ssCb(false, BUF_DASH, 0, 1, false); - this._writecb = writecb; - } else if (matchPostBoundary === 3) { - matchPostBoundary = 0; - if (data[start] === 10/* '\n' */) { - ++start; - if (parts >= partsLimit) - break; - // Prepare the header parser - this._hparser = hparser; - if (start === end) - break; - // Process the remaining data as a header - continue retrydata; - } else { - // We saw something other than LF, so put the CR we consumed - // "back" - const writecb = this._writecb; - this._writecb = noop; - ssCb(false, BUF_CR, 0, 1, false); - this._writecb = writecb; - } - } - } - - if (!skipPart) { - if (this._fileStream) { - let chunk; - const actualLen = Math.min(end - start, fileSizeLimit - fileSize); - if (!isDataSafe) { - chunk = Buffer.allocUnsafe(actualLen); - data.copy(chunk, 0, start, start + actualLen); - } else { - chunk = data.slice(start, start + actualLen); - } - - fileSize += chunk.length; - if (fileSize === fileSizeLimit) { - if (chunk.length > 0) - this._fileStream.push(chunk); - this._fileStream.emit('limit'); - this._fileStream.truncated = true; - skipPart = true; - } else if (!this._fileStream.push(chunk)) { - if (this._writecb) - this._fileStream._readcb = this._writecb; - this._writecb = null; - } - } else if (field !== undefined) { - let chunk; - const actualLen = Math.min( - end - start, - fieldSizeLimit - fieldSize - ); - if (!isDataSafe) { - chunk = Buffer.allocUnsafe(actualLen); - data.copy(chunk, 0, start, start + actualLen); - } else { - chunk = data.slice(start, start + actualLen); - } - - fieldSize += actualLen; - field.push(chunk); - if (fieldSize === fieldSizeLimit) { - skipPart = true; - partTruncated = true; - } - } - } - - break; - } - - if (isMatch) { - matchPostBoundary = 1; - - if (this._fileStream) { - // End the active file stream if the previous part was a file - this._fileStream.push(null); - this._fileStream = null; - } else if (field !== undefined) { - let data; - switch (field.length) { - case 0: - data = ''; - break; - case 1: - data = convertToUTF8(field[0], partCharset, 0); - break; - default: - data = convertToUTF8( - Buffer.concat(field, fieldSize), - partCharset, - 0 - ); - } - field = undefined; - fieldSize = 0; - this.emit( - 'field', - partName, - data, - { nameTruncated: false, - valueTruncated: partTruncated, - encoding: partEncoding, - mimeType: partType } - ); - } - - if (++parts === partsLimit) - this.emit('partsLimit'); - } - }; - this._bparser = new StreamSearch(`\r\n--${boundary}`, ssCb); - - this._writecb = null; - this._finalcb = null; - - // Just in case there is no preamble - this.write(BUF_CRLF); - } - - static detect(conType) { - return (conType.type === 'multipart' && conType.subtype === 'form-data'); - } - - _write(chunk, enc, cb) { - this._writecb = cb; - this._bparser.push(chunk, 0); - if (this._writecb) - callAndUnsetCb(this); - } - - _destroy(err, cb) { - this._hparser = null; - this._bparser = ignoreData; - if (!err) - err = checkEndState(this); - const fileStream = this._fileStream; - if (fileStream) { - this._fileStream = null; - fileStream.destroy(err); - } - cb(err); - } - - _final(cb) { - this._bparser.destroy(); - if (!this._complete) - return cb(new Error('Unexpected end of form')); - if (this._fileEndsLeft) - this._finalcb = finalcb.bind(null, this, cb); - else - finalcb(this, cb); - } -} - -function finalcb(self, cb, err) { - if (err) - return cb(err); - err = checkEndState(self); - cb(err); -} - -function checkEndState(self) { - if (self._hparser) - return new Error('Malformed part header'); - const fileStream = self._fileStream; - if (fileStream) { - self._fileStream = null; - fileStream.destroy(new Error('Unexpected end of file')); - } - if (!self._complete) - return new Error('Unexpected end of form'); -} - -const TOKEN = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -]; - -const FIELD_VCHAR = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -]; - -module.exports = Multipart; diff --git a/deps/undici/src/node_modules/busboy/lib/types/urlencoded.js b/deps/undici/src/node_modules/busboy/lib/types/urlencoded.js deleted file mode 100644 index 5c463a25899a72..00000000000000 --- a/deps/undici/src/node_modules/busboy/lib/types/urlencoded.js +++ /dev/null @@ -1,350 +0,0 @@ -'use strict'; - -const { Writable } = require('stream'); - -const { getDecoder } = require('../utils.js'); - -class URLEncoded extends Writable { - constructor(cfg) { - const streamOpts = { - autoDestroy: true, - emitClose: true, - highWaterMark: (typeof cfg.highWaterMark === 'number' - ? cfg.highWaterMark - : undefined), - }; - super(streamOpts); - - let charset = (cfg.defCharset || 'utf8'); - if (cfg.conType.params && typeof cfg.conType.params.charset === 'string') - charset = cfg.conType.params.charset; - - this.charset = charset; - - const limits = cfg.limits; - this.fieldSizeLimit = (limits && typeof limits.fieldSize === 'number' - ? limits.fieldSize - : 1 * 1024 * 1024); - this.fieldsLimit = (limits && typeof limits.fields === 'number' - ? limits.fields - : Infinity); - this.fieldNameSizeLimit = ( - limits && typeof limits.fieldNameSize === 'number' - ? limits.fieldNameSize - : 100 - ); - - this._inKey = true; - this._keyTrunc = false; - this._valTrunc = false; - this._bytesKey = 0; - this._bytesVal = 0; - this._fields = 0; - this._key = ''; - this._val = ''; - this._byte = -2; - this._lastPos = 0; - this._encode = 0; - this._decoder = getDecoder(charset); - } - - static detect(conType) { - return (conType.type === 'application' - && conType.subtype === 'x-www-form-urlencoded'); - } - - _write(chunk, enc, cb) { - if (this._fields >= this.fieldsLimit) - return cb(); - - let i = 0; - const len = chunk.length; - this._lastPos = 0; - - // Check if we last ended mid-percent-encoded byte - if (this._byte !== -2) { - i = readPctEnc(this, chunk, i, len); - if (i === -1) - return cb(new Error('Malformed urlencoded form')); - if (i >= len) - return cb(); - if (this._inKey) - ++this._bytesKey; - else - ++this._bytesVal; - } - -main: - while (i < len) { - if (this._inKey) { - // Parsing key - - i = skipKeyBytes(this, chunk, i, len); - - while (i < len) { - switch (chunk[i]) { - case 61: // '=' - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._lastPos = ++i; - this._key = this._decoder(this._key, this._encode); - this._encode = 0; - this._inKey = false; - continue main; - case 38: // '&' - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._lastPos = ++i; - this._key = this._decoder(this._key, this._encode); - this._encode = 0; - if (this._bytesKey > 0) { - this.emit( - 'field', - this._key, - '', - { nameTruncated: this._keyTrunc, - valueTruncated: false, - encoding: this.charset, - mimeType: 'text/plain' } - ); - } - this._key = ''; - this._val = ''; - this._keyTrunc = false; - this._valTrunc = false; - this._bytesKey = 0; - this._bytesVal = 0; - if (++this._fields >= this.fieldsLimit) { - this.emit('fieldsLimit'); - return cb(); - } - continue; - case 43: // '+' - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._key += ' '; - this._lastPos = i + 1; - break; - case 37: // '%' - if (this._encode === 0) - this._encode = 1; - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._lastPos = i + 1; - this._byte = -1; - i = readPctEnc(this, chunk, i + 1, len); - if (i === -1) - return cb(new Error('Malformed urlencoded form')); - if (i >= len) - return cb(); - ++this._bytesKey; - i = skipKeyBytes(this, chunk, i, len); - continue; - } - ++i; - ++this._bytesKey; - i = skipKeyBytes(this, chunk, i, len); - } - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - } else { - // Parsing value - - i = skipValBytes(this, chunk, i, len); - - while (i < len) { - switch (chunk[i]) { - case 38: // '&' - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - this._lastPos = ++i; - this._inKey = true; - this._val = this._decoder(this._val, this._encode); - this._encode = 0; - if (this._bytesKey > 0 || this._bytesVal > 0) { - this.emit( - 'field', - this._key, - this._val, - { nameTruncated: this._keyTrunc, - valueTruncated: this._valTrunc, - encoding: this.charset, - mimeType: 'text/plain' } - ); - } - this._key = ''; - this._val = ''; - this._keyTrunc = false; - this._valTrunc = false; - this._bytesKey = 0; - this._bytesVal = 0; - if (++this._fields >= this.fieldsLimit) { - this.emit('fieldsLimit'); - return cb(); - } - continue main; - case 43: // '+' - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - this._val += ' '; - this._lastPos = i + 1; - break; - case 37: // '%' - if (this._encode === 0) - this._encode = 1; - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - this._lastPos = i + 1; - this._byte = -1; - i = readPctEnc(this, chunk, i + 1, len); - if (i === -1) - return cb(new Error('Malformed urlencoded form')); - if (i >= len) - return cb(); - ++this._bytesVal; - i = skipValBytes(this, chunk, i, len); - continue; - } - ++i; - ++this._bytesVal; - i = skipValBytes(this, chunk, i, len); - } - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - } - } - - cb(); - } - - _final(cb) { - if (this._byte !== -2) - return cb(new Error('Malformed urlencoded form')); - if (!this._inKey || this._bytesKey > 0 || this._bytesVal > 0) { - if (this._inKey) - this._key = this._decoder(this._key, this._encode); - else - this._val = this._decoder(this._val, this._encode); - this.emit( - 'field', - this._key, - this._val, - { nameTruncated: this._keyTrunc, - valueTruncated: this._valTrunc, - encoding: this.charset, - mimeType: 'text/plain' } - ); - } - cb(); - } -} - -function readPctEnc(self, chunk, pos, len) { - if (pos >= len) - return len; - - if (self._byte === -1) { - // We saw a '%' but no hex characters yet - const hexUpper = HEX_VALUES[chunk[pos++]]; - if (hexUpper === -1) - return -1; - - if (hexUpper >= 8) - self._encode = 2; // Indicate high bits detected - - if (pos < len) { - // Both hex characters are in this chunk - const hexLower = HEX_VALUES[chunk[pos++]]; - if (hexLower === -1) - return -1; - - if (self._inKey) - self._key += String.fromCharCode((hexUpper << 4) + hexLower); - else - self._val += String.fromCharCode((hexUpper << 4) + hexLower); - - self._byte = -2; - self._lastPos = pos; - } else { - // Only one hex character was available in this chunk - self._byte = hexUpper; - } - } else { - // We saw only one hex character so far - const hexLower = HEX_VALUES[chunk[pos++]]; - if (hexLower === -1) - return -1; - - if (self._inKey) - self._key += String.fromCharCode((self._byte << 4) + hexLower); - else - self._val += String.fromCharCode((self._byte << 4) + hexLower); - - self._byte = -2; - self._lastPos = pos; - } - - return pos; -} - -function skipKeyBytes(self, chunk, pos, len) { - // Skip bytes if we've truncated - if (self._bytesKey > self.fieldNameSizeLimit) { - if (!self._keyTrunc) { - if (self._lastPos < pos) - self._key += chunk.latin1Slice(self._lastPos, pos - 1); - } - self._keyTrunc = true; - for (; pos < len; ++pos) { - const code = chunk[pos]; - if (code === 61/* '=' */ || code === 38/* '&' */) - break; - ++self._bytesKey; - } - self._lastPos = pos; - } - - return pos; -} - -function skipValBytes(self, chunk, pos, len) { - // Skip bytes if we've truncated - if (self._bytesVal > self.fieldSizeLimit) { - if (!self._valTrunc) { - if (self._lastPos < pos) - self._val += chunk.latin1Slice(self._lastPos, pos - 1); - } - self._valTrunc = true; - for (; pos < len; ++pos) { - if (chunk[pos] === 38/* '&' */) - break; - ++self._bytesVal; - } - self._lastPos = pos; - } - - return pos; -} - -/* eslint-disable no-multi-spaces */ -const HEX_VALUES = [ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -]; -/* eslint-enable no-multi-spaces */ - -module.exports = URLEncoded; diff --git a/deps/undici/src/node_modules/busboy/lib/utils.js b/deps/undici/src/node_modules/busboy/lib/utils.js deleted file mode 100644 index 8274f6c3aef47a..00000000000000 --- a/deps/undici/src/node_modules/busboy/lib/utils.js +++ /dev/null @@ -1,596 +0,0 @@ -'use strict'; - -function parseContentType(str) { - if (str.length === 0) - return; - - const params = Object.create(null); - let i = 0; - - // Parse type - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (code !== 47/* '/' */ || i === 0) - return; - break; - } - } - // Check for type without subtype - if (i === str.length) - return; - - const type = str.slice(0, i).toLowerCase(); - - // Parse subtype - const subtypeStart = ++i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - // Make sure we have a subtype - if (i === subtypeStart) - return; - - if (parseContentTypeParams(str, i, params) === undefined) - return; - break; - } - } - // Make sure we have a subtype - if (i === subtypeStart) - return; - - const subtype = str.slice(subtypeStart, i).toLowerCase(); - - return { type, subtype, params }; -} - -function parseContentTypeParams(str, i, params) { - while (i < str.length) { - // Consume whitespace - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32/* ' ' */ && code !== 9/* '\t' */) - break; - } - - // Ended on whitespace - if (i === str.length) - break; - - // Check for malformed parameter - if (str.charCodeAt(i++) !== 59/* ';' */) - return; - - // Consume whitespace - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32/* ' ' */ && code !== 9/* '\t' */) - break; - } - - // Ended on whitespace (malformed) - if (i === str.length) - return; - - let name; - const nameStart = i; - // Parse parameter name - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (code !== 61/* '=' */) - return; - break; - } - } - - // No value (malformed) - if (i === str.length) - return; - - name = str.slice(nameStart, i); - ++i; // Skip over '=' - - // No value (malformed) - if (i === str.length) - return; - - let value = ''; - let valueStart; - if (str.charCodeAt(i) === 34/* '"' */) { - valueStart = ++i; - let escaping = false; - // Parse quoted value - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code === 92/* '\\' */) { - if (escaping) { - valueStart = i; - escaping = false; - } else { - value += str.slice(valueStart, i); - escaping = true; - } - continue; - } - if (code === 34/* '"' */) { - if (escaping) { - valueStart = i; - escaping = false; - continue; - } - value += str.slice(valueStart, i); - break; - } - if (escaping) { - valueStart = i - 1; - escaping = false; - } - // Invalid unescaped quoted character (malformed) - if (QDTEXT[code] !== 1) - return; - } - - // No end quote (malformed) - if (i === str.length) - return; - - ++i; // Skip over double quote - } else { - valueStart = i; - // Parse unquoted value - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - // No value (malformed) - if (i === valueStart) - return; - break; - } - } - value = str.slice(valueStart, i); - } - - name = name.toLowerCase(); - if (params[name] === undefined) - params[name] = value; - } - - return params; -} - -function parseDisposition(str, defDecoder) { - if (str.length === 0) - return; - - const params = Object.create(null); - let i = 0; - - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (parseDispositionParams(str, i, params, defDecoder) === undefined) - return; - break; - } - } - - const type = str.slice(0, i).toLowerCase(); - - return { type, params }; -} - -function parseDispositionParams(str, i, params, defDecoder) { - while (i < str.length) { - // Consume whitespace - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32/* ' ' */ && code !== 9/* '\t' */) - break; - } - - // Ended on whitespace - if (i === str.length) - break; - - // Check for malformed parameter - if (str.charCodeAt(i++) !== 59/* ';' */) - return; - - // Consume whitespace - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32/* ' ' */ && code !== 9/* '\t' */) - break; - } - - // Ended on whitespace (malformed) - if (i === str.length) - return; - - let name; - const nameStart = i; - // Parse parameter name - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (code === 61/* '=' */) - break; - return; - } - } - - // No value (malformed) - if (i === str.length) - return; - - let value = ''; - let valueStart; - let charset; - //~ let lang; - name = str.slice(nameStart, i); - if (name.charCodeAt(name.length - 1) === 42/* '*' */) { - // Extended value - - const charsetStart = ++i; - // Parse charset name - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (CHARSET[code] !== 1) { - if (code !== 39/* '\'' */) - return; - break; - } - } - - // Incomplete charset (malformed) - if (i === str.length) - return; - - charset = str.slice(charsetStart, i); - ++i; // Skip over the '\'' - - //~ const langStart = ++i; - // Parse language name - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code === 39/* '\'' */) - break; - } - - // Incomplete language (malformed) - if (i === str.length) - return; - - //~ lang = str.slice(langStart, i); - ++i; // Skip over the '\'' - - // No value (malformed) - if (i === str.length) - return; - - valueStart = i; - - let encode = 0; - // Parse value - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (EXTENDED_VALUE[code] !== 1) { - if (code === 37/* '%' */) { - let hexUpper; - let hexLower; - if (i + 2 < str.length - && (hexUpper = HEX_VALUES[str.charCodeAt(i + 1)]) !== -1 - && (hexLower = HEX_VALUES[str.charCodeAt(i + 2)]) !== -1) { - const byteVal = (hexUpper << 4) + hexLower; - value += str.slice(valueStart, i); - value += String.fromCharCode(byteVal); - i += 2; - valueStart = i + 1; - if (byteVal >= 128) - encode = 2; - else if (encode === 0) - encode = 1; - continue; - } - // '%' disallowed in non-percent encoded contexts (malformed) - return; - } - break; - } - } - - value += str.slice(valueStart, i); - value = convertToUTF8(value, charset, encode); - if (value === undefined) - return; - } else { - // Non-extended value - - ++i; // Skip over '=' - - // No value (malformed) - if (i === str.length) - return; - - if (str.charCodeAt(i) === 34/* '"' */) { - valueStart = ++i; - let escaping = false; - // Parse quoted value - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code === 92/* '\\' */) { - if (escaping) { - valueStart = i; - escaping = false; - } else { - value += str.slice(valueStart, i); - escaping = true; - } - continue; - } - if (code === 34/* '"' */) { - if (escaping) { - valueStart = i; - escaping = false; - continue; - } - value += str.slice(valueStart, i); - break; - } - if (escaping) { - valueStart = i - 1; - escaping = false; - } - // Invalid unescaped quoted character (malformed) - if (QDTEXT[code] !== 1) - return; - } - - // No end quote (malformed) - if (i === str.length) - return; - - ++i; // Skip over double quote - } else { - valueStart = i; - // Parse unquoted value - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - // No value (malformed) - if (i === valueStart) - return; - break; - } - } - value = str.slice(valueStart, i); - } - - value = defDecoder(value, 2); - if (value === undefined) - return; - } - - name = name.toLowerCase(); - if (params[name] === undefined) - params[name] = value; - } - - return params; -} - -function getDecoder(charset) { - let lc; - while (true) { - switch (charset) { - case 'utf-8': - case 'utf8': - return decoders.utf8; - case 'latin1': - case 'ascii': // TODO: Make these a separate, strict decoder? - case 'us-ascii': - case 'iso-8859-1': - case 'iso8859-1': - case 'iso88591': - case 'iso_8859-1': - case 'windows-1252': - case 'iso_8859-1:1987': - case 'cp1252': - case 'x-cp1252': - return decoders.latin1; - case 'utf16le': - case 'utf-16le': - case 'ucs2': - case 'ucs-2': - return decoders.utf16le; - case 'base64': - return decoders.base64; - default: - if (lc === undefined) { - lc = true; - charset = charset.toLowerCase(); - continue; - } - return decoders.other.bind(charset); - } - } -} - -const decoders = { - utf8: (data, hint) => { - if (data.length === 0) - return ''; - if (typeof data === 'string') { - // If `data` never had any percent-encoded bytes or never had any that - // were outside of the ASCII range, then we can safely just return the - // input since UTF-8 is ASCII compatible - if (hint < 2) - return data; - - data = Buffer.from(data, 'latin1'); - } - return data.utf8Slice(0, data.length); - }, - - latin1: (data, hint) => { - if (data.length === 0) - return ''; - if (typeof data === 'string') - return data; - return data.latin1Slice(0, data.length); - }, - - utf16le: (data, hint) => { - if (data.length === 0) - return ''; - if (typeof data === 'string') - data = Buffer.from(data, 'latin1'); - return data.ucs2Slice(0, data.length); - }, - - base64: (data, hint) => { - if (data.length === 0) - return ''; - if (typeof data === 'string') - data = Buffer.from(data, 'latin1'); - return data.base64Slice(0, data.length); - }, - - other: (data, hint) => { - if (data.length === 0) - return ''; - if (typeof data === 'string') - data = Buffer.from(data, 'latin1'); - try { - const decoder = new TextDecoder(this); - return decoder.decode(data); - } catch {} - }, -}; - -function convertToUTF8(data, charset, hint) { - const decode = getDecoder(charset); - if (decode) - return decode(data, hint); -} - -function basename(path) { - if (typeof path !== 'string') - return ''; - for (let i = path.length - 1; i >= 0; --i) { - switch (path.charCodeAt(i)) { - case 0x2F: // '/' - case 0x5C: // '\' - path = path.slice(i + 1); - return (path === '..' || path === '.' ? '' : path); - } - } - return (path === '..' || path === '.' ? '' : path); -} - -const TOKEN = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -]; - -const QDTEXT = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -]; - -const CHARSET = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -]; - -const EXTENDED_VALUE = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -]; - -/* eslint-disable no-multi-spaces */ -const HEX_VALUES = [ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -]; -/* eslint-enable no-multi-spaces */ - -module.exports = { - basename, - convertToUTF8, - getDecoder, - parseContentType, - parseDisposition, -}; diff --git a/deps/undici/src/node_modules/busboy/package.json b/deps/undici/src/node_modules/busboy/package.json deleted file mode 100644 index ac2577fe2c5873..00000000000000 --- a/deps/undici/src/node_modules/busboy/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ "name": "busboy", - "version": "1.6.0", - "author": "Brian White ", - "description": "A streaming parser for HTML form data for node.js", - "main": "./lib/index.js", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "devDependencies": { - "@mscdex/eslint-config": "^1.1.0", - "eslint": "^7.32.0" - }, - "scripts": { - "test": "node test/test.js", - "lint": "eslint --cache --report-unused-disable-directives --ext=.js .eslintrc.js lib test bench", - "lint:fix": "npm run lint -- --fix" - }, - "engines": { "node": ">=10.16.0" }, - "keywords": [ "uploads", "forms", "multipart", "form-data" ], - "licenses": [ { "type": "MIT", "url": "http://github.com/mscdex/busboy/raw/master/LICENSE" } ], - "repository": { "type": "git", "url": "http://github.com/mscdex/busboy.git" } -} diff --git a/deps/undici/src/node_modules/busboy/test/common.js b/deps/undici/src/node_modules/busboy/test/common.js deleted file mode 100644 index fb82ad81b1b9ef..00000000000000 --- a/deps/undici/src/node_modules/busboy/test/common.js +++ /dev/null @@ -1,109 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const { inspect } = require('util'); - -const mustCallChecks = []; - -function noop() {} - -function runCallChecks(exitCode) { - if (exitCode !== 0) return; - - const failed = mustCallChecks.filter((context) => { - if ('minimum' in context) { - context.messageSegment = `at least ${context.minimum}`; - return context.actual < context.minimum; - } - context.messageSegment = `exactly ${context.exact}`; - return context.actual !== context.exact; - }); - - failed.forEach((context) => { - console.error('Mismatched %s function calls. Expected %s, actual %d.', - context.name, - context.messageSegment, - context.actual); - console.error(context.stack.split('\n').slice(2).join('\n')); - }); - - if (failed.length) - process.exit(1); -} - -function mustCall(fn, exact) { - return _mustCallInner(fn, exact, 'exact'); -} - -function mustCallAtLeast(fn, minimum) { - return _mustCallInner(fn, minimum, 'minimum'); -} - -function _mustCallInner(fn, criteria = 1, field) { - if (process._exiting) - throw new Error('Cannot use common.mustCall*() in process exit handler'); - - if (typeof fn === 'number') { - criteria = fn; - fn = noop; - } else if (fn === undefined) { - fn = noop; - } - - if (typeof criteria !== 'number') - throw new TypeError(`Invalid ${field} value: ${criteria}`); - - const context = { - [field]: criteria, - actual: 0, - stack: inspect(new Error()), - name: fn.name || '' - }; - - // Add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) - process.on('exit', runCallChecks); - - mustCallChecks.push(context); - - function wrapped(...args) { - ++context.actual; - return fn.call(this, ...args); - } - // TODO: remove origFn? - wrapped.origFn = fn; - - return wrapped; -} - -function getCallSite(top) { - const originalStackFormatter = Error.prepareStackTrace; - Error.prepareStackTrace = (err, stack) => - `${stack[0].getFileName()}:${stack[0].getLineNumber()}`; - const err = new Error(); - Error.captureStackTrace(err, top); - // With the V8 Error API, the stack is not formatted until it is accessed - // eslint-disable-next-line no-unused-expressions - err.stack; - Error.prepareStackTrace = originalStackFormatter; - return err.stack; -} - -function mustNotCall(msg) { - const callSite = getCallSite(mustNotCall); - return function mustNotCall(...args) { - args = args.map(inspect).join(', '); - const argsInfo = (args.length > 0 - ? `\ncalled with arguments: ${args}` - : ''); - assert.fail( - `${msg || 'function should not have been called'} at ${callSite}` - + argsInfo); - }; -} - -module.exports = { - mustCall, - mustCallAtLeast, - mustNotCall, -}; diff --git a/deps/undici/src/node_modules/busboy/test/test-types-multipart-charsets.js b/deps/undici/src/node_modules/busboy/test/test-types-multipart-charsets.js deleted file mode 100644 index ed9c38aeb6c1f3..00000000000000 --- a/deps/undici/src/node_modules/busboy/test/test-types-multipart-charsets.js +++ /dev/null @@ -1,94 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const { inspect } = require('util'); - -const { mustCall } = require(`${__dirname}/common.js`); - -const busboy = require('..'); - -const input = Buffer.from([ - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="テスト.dat"', - 'Content-Type: application/octet-stream', - '', - 'A'.repeat(1023), - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' -].join('\r\n')); -const boundary = '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k'; -const expected = [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('A'.repeat(1023)), - info: { - filename: 'テスト.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, -]; -const bb = busboy({ - defParamCharset: 'utf8', - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - } -}); -const results = []; - -bb.on('field', (name, val, info) => { - results.push({ type: 'field', name, val, info }); -}); - -bb.on('file', (name, stream, info) => { - const data = []; - let nb = 0; - const file = { - type: 'file', - name, - data: null, - info, - limited: false, - }; - results.push(file); - stream.on('data', (d) => { - data.push(d); - nb += d.length; - }).on('limit', () => { - file.limited = true; - }).on('close', () => { - file.data = Buffer.concat(data, nb); - assert.strictEqual(stream.truncated, file.limited); - }).once('error', (err) => { - file.err = err.message; - }); -}); - -bb.on('error', (err) => { - results.push({ error: err.message }); -}); - -bb.on('partsLimit', () => { - results.push('partsLimit'); -}); - -bb.on('filesLimit', () => { - results.push('filesLimit'); -}); - -bb.on('fieldsLimit', () => { - results.push('fieldsLimit'); -}); - -bb.on('close', mustCall(() => { - assert.deepStrictEqual( - results, - expected, - 'Results mismatch.\n' - + `Parsed: ${inspect(results)}\n` - + `Expected: ${inspect(expected)}` - ); -})); - -bb.end(input); diff --git a/deps/undici/src/node_modules/busboy/test/test-types-multipart-stream-pause.js b/deps/undici/src/node_modules/busboy/test/test-types-multipart-stream-pause.js deleted file mode 100644 index df7268a4b17f73..00000000000000 --- a/deps/undici/src/node_modules/busboy/test/test-types-multipart-stream-pause.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const { randomFillSync } = require('crypto'); -const { inspect } = require('util'); - -const busboy = require('..'); - -const { mustCall } = require('./common.js'); - -const BOUNDARY = 'u2KxIV5yF1y+xUspOQCCZopaVgeV6Jxihv35XQJmuTx8X3sh'; - -function formDataSection(key, value) { - return Buffer.from( - `\r\n--${BOUNDARY}` - + `\r\nContent-Disposition: form-data; name="${key}"` - + `\r\n\r\n${value}` - ); -} - -function formDataFile(key, filename, contentType) { - const buf = Buffer.allocUnsafe(100000); - return Buffer.concat([ - Buffer.from(`\r\n--${BOUNDARY}\r\n`), - Buffer.from(`Content-Disposition: form-data; name="${key}"` - + `; filename="${filename}"\r\n`), - Buffer.from(`Content-Type: ${contentType}\r\n\r\n`), - randomFillSync(buf) - ]); -} - -const reqChunks = [ - Buffer.concat([ - formDataFile('file', 'file.bin', 'application/octet-stream'), - formDataSection('foo', 'foo value'), - ]), - formDataSection('bar', 'bar value'), - Buffer.from(`\r\n--${BOUNDARY}--\r\n`) -]; -const bb = busboy({ - headers: { - 'content-type': `multipart/form-data; boundary=${BOUNDARY}` - } -}); -const expected = [ - { type: 'file', - name: 'file', - info: { - filename: 'file.bin', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - }, - { type: 'field', - name: 'foo', - val: 'foo value', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'field', - name: 'bar', - val: 'bar value', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, -]; -const results = []; - -bb.on('field', (name, val, info) => { - results.push({ type: 'field', name, val, info }); -}); - -bb.on('file', (name, stream, info) => { - results.push({ type: 'file', name, info }); - // Simulate a pipe where the destination is pausing (perhaps due to waiting - // for file system write to finish) - setTimeout(() => { - stream.resume(); - }, 10); -}); - -bb.on('close', mustCall(() => { - assert.deepStrictEqual( - results, - expected, - 'Results mismatch.\n' - + `Parsed: ${inspect(results)}\n` - + `Expected: ${inspect(expected)}` - ); -})); - -for (const chunk of reqChunks) - bb.write(chunk); -bb.end(); diff --git a/deps/undici/src/node_modules/busboy/test/test-types-multipart.js b/deps/undici/src/node_modules/busboy/test/test-types-multipart.js deleted file mode 100644 index 9755642ad9060c..00000000000000 --- a/deps/undici/src/node_modules/busboy/test/test-types-multipart.js +++ /dev/null @@ -1,1053 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const { inspect } = require('util'); - -const busboy = require('..'); - -const active = new Map(); - -const tests = [ - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'super alpha file', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_1"', - '', - 'super beta file', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'A'.repeat(1023), - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_1"; filename="1k_b.dat"', - 'Content-Type: application/octet-stream', - '', - 'B'.repeat(1023), - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'field', - name: 'file_name_0', - val: 'super alpha file', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'field', - name: 'file_name_1', - val: 'super beta file', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('A'.repeat(1023)), - info: { - filename: '1k_a.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_1', - data: Buffer.from('B'.repeat(1023)), - info: { - filename: '1k_b.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - ], - what: 'Fields and files' - }, - { source: [ - ['------WebKitFormBoundaryTB2MiQ36fnSJlrhY', - 'Content-Disposition: form-data; name="cont"', - '', - 'some random content', - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY', - 'Content-Disposition: form-data; name="pass"', - '', - 'some random pass', - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY', - 'Content-Disposition: form-data; name=bit', - '', - '2', - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--' - ].join('\r\n') - ], - boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', - expected: [ - { type: 'field', - name: 'cont', - val: 'some random content', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'field', - name: 'pass', - val: 'some random pass', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'field', - name: 'bit', - val: '2', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - ], - what: 'Fields only' - }, - { source: [ - '' - ], - boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', - expected: [ - { error: 'Unexpected end of form' }, - ], - what: 'No fields and no files' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'super alpha file', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - limits: { - fileSize: 13, - fieldSize: 5 - }, - expected: [ - { type: 'field', - name: 'file_name_0', - val: 'super', - info: { - nameTruncated: false, - valueTruncated: true, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('ABCDEFGHIJKLM'), - info: { - filename: '1k_a.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: true, - }, - ], - what: 'Fields and files (limits)' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'super alpha file', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - limits: { - files: 0 - }, - expected: [ - { type: 'field', - name: 'file_name_0', - val: 'super alpha file', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - 'filesLimit', - ], - what: 'Fields and files (limits: 0 files)' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'super alpha file', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_1"', - '', - 'super beta file', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'A'.repeat(1023), - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_1"; filename="1k_b.dat"', - 'Content-Type: application/octet-stream', - '', - 'B'.repeat(1023), - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'field', - name: 'file_name_0', - val: 'super alpha file', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - { type: 'field', - name: 'file_name_1', - val: 'super beta file', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - ], - events: ['field'], - what: 'Fields and (ignored) files' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="/tmp/1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_1"; filename="C:\\files\\1k_b.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_2"; filename="relative/1k_c.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: '1k_a.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_1', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: '1k_b.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_2', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: '1k_c.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - ], - what: 'Files with filenames containing paths' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="/absolute/1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_1"; filename="C:\\absolute\\1k_b.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_2"; filename="relative/1k_c.dat"', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - preservePath: true, - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: '/absolute/1k_a.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_1', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: 'C:\\absolute\\1k_b.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_2', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: 'relative/1k_c.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - ], - what: 'Paths to be preserved through the preservePath option' - }, - { source: [ - ['------WebKitFormBoundaryTB2MiQ36fnSJlrhY', - 'Content-Disposition: form-data; name="cont"', - 'Content-Type: ', - '', - 'some random content', - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY', - 'Content-Disposition: ', - '', - 'some random pass', - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--' - ].join('\r\n') - ], - boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', - expected: [ - { type: 'field', - name: 'cont', - val: 'some random content', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - ], - what: 'Empty content-type and empty content-disposition' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="file"; filename*=utf-8\'\'n%C3%A4me.txt', - 'Content-Type: application/octet-stream', - '', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'file', - data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - info: { - filename: 'näme.txt', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - }, - ], - what: 'Unicode filenames' - }, - { source: [ - ['--asdasdasdasd\r\n', - 'Content-Type: text/plain\r\n', - 'Content-Disposition: form-data; name="foo"\r\n', - '\r\n', - 'asd\r\n', - '--asdasdasdasd--' - ].join(':)') - ], - boundary: 'asdasdasdasd', - expected: [ - { error: 'Malformed part header' }, - { error: 'Unexpected end of form' }, - ], - what: 'Stopped mid-header' - }, - { source: [ - ['------WebKitFormBoundaryTB2MiQ36fnSJlrhY', - 'Content-Disposition: form-data; name="cont"', - 'Content-Type: application/json', - '', - '{}', - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--', - ].join('\r\n') - ], - boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', - expected: [ - { type: 'field', - name: 'cont', - val: '{}', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'application/json', - }, - }, - ], - what: 'content-type for fields' - }, - { source: [ - '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--', - ], - boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', - expected: [], - what: 'empty form' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name=upload_file_0; filename="1k_a.dat"', - 'Content-Type: application/octet-stream', - 'Content-Transfer-Encoding: binary', - '', - '', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.alloc(0), - info: { - filename: '1k_a.dat', - encoding: 'binary', - mimeType: 'application/octet-stream', - }, - limited: false, - err: 'Unexpected end of form', - }, - { error: 'Unexpected end of form' }, - ], - what: 'Stopped mid-file #1' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name=upload_file_0; filename="1k_a.dat"', - 'Content-Type: application/octet-stream', - '', - 'a', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('a'), - info: { - filename: '1k_a.dat', - encoding: '7bit', - mimeType: 'application/octet-stream', - }, - limited: false, - err: 'Unexpected end of form', - }, - { error: 'Unexpected end of form' }, - ], - what: 'Stopped mid-file #2' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="notes.txt"', - 'Content-Type: text/plain; charset=utf8', - '', - 'a', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('a'), - info: { - filename: 'notes.txt', - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - ], - what: 'Text file with charset' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="notes.txt"', - 'Content-Type: ', - ' text/plain; charset=utf8', - '', - 'a', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('a'), - info: { - filename: 'notes.txt', - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - ], - what: 'Folded header value' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Type: text/plain; charset=utf8', - '', - 'a', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [], - what: 'No Content-Disposition' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'a'.repeat(64 * 1024), - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="notes.txt"', - 'Content-Type: ', - ' text/plain; charset=utf8', - '', - 'bc', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - limits: { - fieldSize: Infinity, - }, - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('bc'), - info: { - filename: 'notes.txt', - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - ], - events: [ 'file' ], - what: 'Skip field parts if no listener' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'a', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="notes.txt"', - 'Content-Type: ', - ' text/plain; charset=utf8', - '', - 'bc', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - limits: { - parts: 1, - }, - expected: [ - { type: 'field', - name: 'file_name_0', - val: 'a', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - 'partsLimit', - ], - what: 'Parts limit' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_0"', - '', - 'a', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; name="file_name_1"', - '', - 'b', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - limits: { - fields: 1, - }, - expected: [ - { type: 'field', - name: 'file_name_0', - val: 'a', - info: { - nameTruncated: false, - valueTruncated: false, - encoding: '7bit', - mimeType: 'text/plain', - }, - }, - 'fieldsLimit', - ], - what: 'Fields limit' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="notes.txt"', - 'Content-Type: text/plain; charset=utf8', - '', - 'ab', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_1"; filename="notes2.txt"', - 'Content-Type: text/plain; charset=utf8', - '', - 'cd', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - limits: { - files: 1, - }, - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('ab'), - info: { - filename: 'notes.txt', - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - 'filesLimit', - ], - what: 'Files limit' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + `name="upload_file_0"; filename="${'a'.repeat(64 * 1024)}.txt"`, - 'Content-Type: text/plain; charset=utf8', - '', - 'ab', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_1"; filename="notes2.txt"', - 'Content-Type: text/plain; charset=utf8', - '', - 'cd', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { error: 'Malformed part header' }, - { type: 'file', - name: 'upload_file_1', - data: Buffer.from('cd'), - info: { - filename: 'notes2.txt', - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - ], - what: 'Oversized part header' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + 'name="upload_file_0"; filename="notes.txt"', - 'Content-Type: text/plain; charset=utf8', - '', - 'a'.repeat(31) + '\r', - ].join('\r\n'), - 'b'.repeat(40), - '\r\n-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - fileHwm: 32, - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('a'.repeat(31) + '\r' + 'b'.repeat(40)), - info: { - filename: 'notes.txt', - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - ], - what: 'Lookbehind data should not stall file streams' - }, - { source: [ - ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + `name="upload_file_0"; filename="${'a'.repeat(8 * 1024)}.txt"`, - 'Content-Type: text/plain; charset=utf8', - '', - 'ab', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + `name="upload_file_1"; filename="${'b'.repeat(8 * 1024)}.txt"`, - 'Content-Type: text/plain; charset=utf8', - '', - 'cd', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - 'Content-Disposition: form-data; ' - + `name="upload_file_2"; filename="${'c'.repeat(8 * 1024)}.txt"`, - 'Content-Type: text/plain; charset=utf8', - '', - 'ef', - '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', - ].join('\r\n') - ], - boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', - expected: [ - { type: 'file', - name: 'upload_file_0', - data: Buffer.from('ab'), - info: { - filename: `${'a'.repeat(8 * 1024)}.txt`, - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_1', - data: Buffer.from('cd'), - info: { - filename: `${'b'.repeat(8 * 1024)}.txt`, - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - { type: 'file', - name: 'upload_file_2', - data: Buffer.from('ef'), - info: { - filename: `${'c'.repeat(8 * 1024)}.txt`, - encoding: '7bit', - mimeType: 'text/plain', - }, - limited: false, - }, - ], - what: 'Header size limit should be per part' - }, - { source: [ - '\r\n--d1bf46b3-aa33-4061-b28d-6c5ced8b08ee\r\n', - 'Content-Type: application/gzip\r\n' - + 'Content-Encoding: gzip\r\n' - + 'Content-Disposition: form-data; name=batch-1; filename=batch-1' - + '\r\n\r\n', - '\r\n--d1bf46b3-aa33-4061-b28d-6c5ced8b08ee--', - ], - boundary: 'd1bf46b3-aa33-4061-b28d-6c5ced8b08ee', - expected: [ - { type: 'file', - name: 'batch-1', - data: Buffer.alloc(0), - info: { - filename: 'batch-1', - encoding: '7bit', - mimeType: 'application/gzip', - }, - limited: false, - }, - ], - what: 'Empty part' - }, -]; - -for (const test of tests) { - active.set(test, 1); - - const { what, boundary, events, limits, preservePath, fileHwm } = test; - const bb = busboy({ - fileHwm, - limits, - preservePath, - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - } - }); - const results = []; - - if (events === undefined || events.includes('field')) { - bb.on('field', (name, val, info) => { - results.push({ type: 'field', name, val, info }); - }); - } - - if (events === undefined || events.includes('file')) { - bb.on('file', (name, stream, info) => { - const data = []; - let nb = 0; - const file = { - type: 'file', - name, - data: null, - info, - limited: false, - }; - results.push(file); - stream.on('data', (d) => { - data.push(d); - nb += d.length; - }).on('limit', () => { - file.limited = true; - }).on('close', () => { - file.data = Buffer.concat(data, nb); - assert.strictEqual(stream.truncated, file.limited); - }).once('error', (err) => { - file.err = err.message; - }); - }); - } - - bb.on('error', (err) => { - results.push({ error: err.message }); - }); - - bb.on('partsLimit', () => { - results.push('partsLimit'); - }); - - bb.on('filesLimit', () => { - results.push('filesLimit'); - }); - - bb.on('fieldsLimit', () => { - results.push('fieldsLimit'); - }); - - bb.on('close', () => { - active.delete(test); - - assert.deepStrictEqual( - results, - test.expected, - `[${what}] Results mismatch.\n` - + `Parsed: ${inspect(results)}\n` - + `Expected: ${inspect(test.expected)}` - ); - }); - - for (const src of test.source) { - const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src); - bb.write(buf); - } - bb.end(); -} - -// Byte-by-byte versions -for (let test of tests) { - test = { ...test }; - test.what += ' (byte-by-byte)'; - active.set(test, 1); - - const { what, boundary, events, limits, preservePath, fileHwm } = test; - const bb = busboy({ - fileHwm, - limits, - preservePath, - headers: { - 'content-type': `multipart/form-data; boundary=${boundary}`, - } - }); - const results = []; - - if (events === undefined || events.includes('field')) { - bb.on('field', (name, val, info) => { - results.push({ type: 'field', name, val, info }); - }); - } - - if (events === undefined || events.includes('file')) { - bb.on('file', (name, stream, info) => { - const data = []; - let nb = 0; - const file = { - type: 'file', - name, - data: null, - info, - limited: false, - }; - results.push(file); - stream.on('data', (d) => { - data.push(d); - nb += d.length; - }).on('limit', () => { - file.limited = true; - }).on('close', () => { - file.data = Buffer.concat(data, nb); - assert.strictEqual(stream.truncated, file.limited); - }).once('error', (err) => { - file.err = err.message; - }); - }); - } - - bb.on('error', (err) => { - results.push({ error: err.message }); - }); - - bb.on('partsLimit', () => { - results.push('partsLimit'); - }); - - bb.on('filesLimit', () => { - results.push('filesLimit'); - }); - - bb.on('fieldsLimit', () => { - results.push('fieldsLimit'); - }); - - bb.on('close', () => { - active.delete(test); - - assert.deepStrictEqual( - results, - test.expected, - `[${what}] Results mismatch.\n` - + `Parsed: ${inspect(results)}\n` - + `Expected: ${inspect(test.expected)}` - ); - }); - - for (const src of test.source) { - const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src); - for (let i = 0; i < buf.length; ++i) - bb.write(buf.slice(i, i + 1)); - } - bb.end(); -} - -{ - let exception = false; - process.once('uncaughtException', (ex) => { - exception = true; - throw ex; - }); - process.on('exit', () => { - if (exception || active.size === 0) - return; - process.exitCode = 1; - console.error('=========================='); - console.error(`${active.size} test(s) did not finish:`); - console.error('=========================='); - console.error(Array.from(active.keys()).map((v) => v.what).join('\n')); - }); -} diff --git a/deps/undici/src/node_modules/busboy/test/test-types-urlencoded.js b/deps/undici/src/node_modules/busboy/test/test-types-urlencoded.js deleted file mode 100644 index c35962b973f29a..00000000000000 --- a/deps/undici/src/node_modules/busboy/test/test-types-urlencoded.js +++ /dev/null @@ -1,488 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const { transcode } = require('buffer'); -const { inspect } = require('util'); - -const busboy = require('..'); - -const active = new Map(); - -const tests = [ - { source: ['foo'], - expected: [ - ['foo', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Unassigned value' - }, - { source: ['foo=bar'], - expected: [ - ['foo', - 'bar', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Assigned value' - }, - { source: ['foo&bar=baz'], - expected: [ - ['foo', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['bar', - 'baz', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Unassigned and assigned value' - }, - { source: ['foo=bar&baz'], - expected: [ - ['foo', - 'bar', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['baz', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Assigned and unassigned value' - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['foo', - 'bar', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['baz', - 'bla', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Two assigned values' - }, - { source: ['foo&bar'], - expected: [ - ['foo', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['bar', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Two unassigned values' - }, - { source: ['foo&bar&'], - expected: [ - ['foo', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['bar', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Two unassigned values and ampersand' - }, - { source: ['foo+1=bar+baz%2Bquux'], - expected: [ - ['foo 1', - 'bar baz+quux', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Assigned key and value with (plus) space' - }, - { source: ['foo=bar%20baz%21'], - expected: [ - ['foo', - 'bar baz!', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Assigned value with encoded bytes' - }, - { source: ['foo%20bar=baz%20bla%21'], - expected: [ - ['foo bar', - 'baz bla!', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Assigned value with encoded bytes #2' - }, - { source: ['foo=bar%20baz%21&num=1000'], - expected: [ - ['foo', - 'bar baz!', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['num', - '1000', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Two assigned values, one with encoded bytes' - }, - { source: [ - Array.from(transcode(Buffer.from('foo'), 'utf8', 'utf16le')).map( - (n) => `%${n.toString(16).padStart(2, '0')}` - ).join(''), - '=', - Array.from(transcode(Buffer.from('😀!'), 'utf8', 'utf16le')).map( - (n) => `%${n.toString(16).padStart(2, '0')}` - ).join(''), - ], - expected: [ - ['foo', - '😀!', - { nameTruncated: false, - valueTruncated: false, - encoding: 'UTF-16LE', - mimeType: 'text/plain' }, - ], - ], - charset: 'UTF-16LE', - what: 'Encoded value with multi-byte charset' - }, - { source: [ - 'foo=<', - Array.from(transcode(Buffer.from('©:^þ'), 'utf8', 'latin1')).map( - (n) => `%${n.toString(16).padStart(2, '0')}` - ).join(''), - ], - expected: [ - ['foo', - '<©:^þ', - { nameTruncated: false, - valueTruncated: false, - encoding: 'ISO-8859-1', - mimeType: 'text/plain' }, - ], - ], - charset: 'ISO-8859-1', - what: 'Encoded value with single-byte, ASCII-compatible, non-UTF8 charset' - }, - { source: ['foo=bar&baz=bla'], - expected: [], - what: 'Limits: zero fields', - limits: { fields: 0 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['foo', - 'bar', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: one field', - limits: { fields: 1 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['foo', - 'bar', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['baz', - 'bla', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: field part lengths match limits', - limits: { fieldNameSize: 3, fieldSize: 3 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['fo', - 'bar', - { nameTruncated: true, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['ba', - 'bla', - { nameTruncated: true, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: truncated field name', - limits: { fieldNameSize: 2 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['foo', - 'ba', - { nameTruncated: false, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['baz', - 'bl', - { nameTruncated: false, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: truncated field value', - limits: { fieldSize: 2 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['fo', - 'ba', - { nameTruncated: true, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['ba', - 'bl', - { nameTruncated: true, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: truncated field name and value', - limits: { fieldNameSize: 2, fieldSize: 2 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['fo', - '', - { nameTruncated: true, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['ba', - '', - { nameTruncated: true, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: truncated field name and zero value limit', - limits: { fieldNameSize: 2, fieldSize: 0 } - }, - { source: ['foo=bar&baz=bla'], - expected: [ - ['', - '', - { nameTruncated: true, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ['', - '', - { nameTruncated: true, - valueTruncated: true, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Limits: truncated zero field name and zero value limit', - limits: { fieldNameSize: 0, fieldSize: 0 } - }, - { source: ['&'], - expected: [], - what: 'Ampersand' - }, - { source: ['&&&&&'], - expected: [], - what: 'Many ampersands' - }, - { source: ['='], - expected: [ - ['', - '', - { nameTruncated: false, - valueTruncated: false, - encoding: 'utf-8', - mimeType: 'text/plain' }, - ], - ], - what: 'Assigned value, empty name and value' - }, - { source: [''], - expected: [], - what: 'Nothing' - }, -]; - -for (const test of tests) { - active.set(test, 1); - - const { what } = test; - const charset = test.charset || 'utf-8'; - const bb = busboy({ - limits: test.limits, - headers: { - 'content-type': `application/x-www-form-urlencoded; charset=${charset}`, - }, - }); - const results = []; - - bb.on('field', (key, val, info) => { - results.push([key, val, info]); - }); - - bb.on('file', () => { - throw new Error(`[${what}] Unexpected file`); - }); - - bb.on('close', () => { - active.delete(test); - - assert.deepStrictEqual( - results, - test.expected, - `[${what}] Results mismatch.\n` - + `Parsed: ${inspect(results)}\n` - + `Expected: ${inspect(test.expected)}` - ); - }); - - for (const src of test.source) { - const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src); - bb.write(buf); - } - bb.end(); -} - -// Byte-by-byte versions -for (let test of tests) { - test = { ...test }; - test.what += ' (byte-by-byte)'; - active.set(test, 1); - - const { what } = test; - const charset = test.charset || 'utf-8'; - const bb = busboy({ - limits: test.limits, - headers: { - 'content-type': `application/x-www-form-urlencoded; charset="${charset}"`, - }, - }); - const results = []; - - bb.on('field', (key, val, info) => { - results.push([key, val, info]); - }); - - bb.on('file', () => { - throw new Error(`[${what}] Unexpected file`); - }); - - bb.on('close', () => { - active.delete(test); - - assert.deepStrictEqual( - results, - test.expected, - `[${what}] Results mismatch.\n` - + `Parsed: ${inspect(results)}\n` - + `Expected: ${inspect(test.expected)}` - ); - }); - - for (const src of test.source) { - const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src); - for (let i = 0; i < buf.length; ++i) - bb.write(buf.slice(i, i + 1)); - } - bb.end(); -} - -{ - let exception = false; - process.once('uncaughtException', (ex) => { - exception = true; - throw ex; - }); - process.on('exit', () => { - if (exception || active.size === 0) - return; - process.exitCode = 1; - console.error('=========================='); - console.error(`${active.size} test(s) did not finish:`); - console.error('=========================='); - console.error(Array.from(active.keys()).map((v) => v.what).join('\n')); - }); -} diff --git a/deps/undici/src/node_modules/busboy/test/test.js b/deps/undici/src/node_modules/busboy/test/test.js deleted file mode 100644 index d0380f29de7842..00000000000000 --- a/deps/undici/src/node_modules/busboy/test/test.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -const { spawnSync } = require('child_process'); -const { readdirSync } = require('fs'); -const { join } = require('path'); - -const files = readdirSync(__dirname).sort(); -for (const filename of files) { - if (filename.startsWith('test-')) { - const path = join(__dirname, filename); - console.log(`> Running ${filename} ...`); - const result = spawnSync(`${process.argv0} ${path}`, { - shell: true, - stdio: 'inherit', - windowsHide: true - }); - if (result.status !== 0) - process.exitCode = 1; - } -} diff --git a/deps/undici/src/node_modules/streamsearch/.eslintrc.js b/deps/undici/src/node_modules/streamsearch/.eslintrc.js deleted file mode 100644 index be9311d02655a2..00000000000000 --- a/deps/undici/src/node_modules/streamsearch/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = { - extends: '@mscdex/eslint-config', -}; diff --git a/deps/undici/src/node_modules/streamsearch/.github/workflows/ci.yml b/deps/undici/src/node_modules/streamsearch/.github/workflows/ci.yml deleted file mode 100644 index 29d51782c77a93..00000000000000 --- a/deps/undici/src/node_modules/streamsearch/.github/workflows/ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: CI - -on: - pull_request: - push: - branches: [ master ] - -jobs: - tests-linux: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - node-version: [10.x, 12.x, 14.x, 16.x] - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install module - run: npm install - - name: Run tests - run: npm test diff --git a/deps/undici/src/node_modules/streamsearch/.github/workflows/lint.yml b/deps/undici/src/node_modules/streamsearch/.github/workflows/lint.yml deleted file mode 100644 index 9f9e1f589a30be..00000000000000 --- a/deps/undici/src/node_modules/streamsearch/.github/workflows/lint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: lint - -on: - pull_request: - push: - branches: [ master ] - -env: - NODE_VERSION: 16.x - -jobs: - lint-js: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v1 - with: - node-version: ${{ env.NODE_VERSION }} - - name: Install ESLint + ESLint configs/plugins - run: npm install --only=dev - - name: Lint files - run: npm run lint diff --git a/deps/undici/src/node_modules/streamsearch/README.md b/deps/undici/src/node_modules/streamsearch/README.md deleted file mode 100644 index c3934d1c7d5711..00000000000000 --- a/deps/undici/src/node_modules/streamsearch/README.md +++ /dev/null @@ -1,95 +0,0 @@ -Description -=========== - -streamsearch is a module for [node.js](http://nodejs.org/) that allows searching a stream using the Boyer-Moore-Horspool algorithm. - -This module is based heavily on the Streaming Boyer-Moore-Horspool C++ implementation by Hongli Lai [here](https://github.com/FooBarWidget/boyer-moore-horspool). - - -Requirements -============ - -* [node.js](http://nodejs.org/) -- v10.0.0 or newer - - -Installation -============ - - npm install streamsearch - -Example -======= - -```js - const { inspect } = require('util'); - - const StreamSearch = require('streamsearch'); - - const needle = Buffer.from('\r\n'); - const ss = new StreamSearch(needle, (isMatch, data, start, end) => { - if (data) - console.log('data: ' + inspect(data.toString('latin1', start, end))); - if (isMatch) - console.log('match!'); - }); - - const chunks = [ - 'foo', - ' bar', - '\r', - '\n', - 'baz, hello\r', - '\n world.', - '\r\n Node.JS rules!!\r\n\r\n', - ]; - for (const chunk of chunks) - ss.push(Buffer.from(chunk)); - - // output: - // - // data: 'foo' - // data: ' bar' - // match! - // data: 'baz, hello' - // match! - // data: ' world.' - // match! - // data: ' Node.JS rules!!' - // match! - // data: '' - // match! -``` - - -API -=== - -Properties ----------- - -* **maxMatches** - < _integer_ > - The maximum number of matches. Defaults to `Infinity`. - -* **matches** - < _integer_ > - The current match count. - - -Functions ---------- - -* **(constructor)**(< _mixed_ >needle, < _function_ >callback) - Creates and returns a new instance for searching for a _Buffer_ or _string_ `needle`. `callback` is called any time there is non-matching data and/or there is a needle match. `callback` will be called with the following arguments: - - 1. `isMatch` - _boolean_ - Indicates whether a match has been found - - 2. `data` - _mixed_ - If set, this contains data that did not match the needle. - - 3. `start` - _integer_ - The index in `data` where the non-matching data begins (inclusive). - - 4. `end` - _integer_ - The index in `data` where the non-matching data ends (exclusive). - - 5. `isSafeData` - _boolean_ - Indicates if it is safe to store a reference to `data` (e.g. as-is or via `data.slice()`) or not, as in some cases `data` may point to a Buffer whose contents change over time. - -* **destroy**() - _(void)_ - Emits any last remaining unmatched data that may still be buffered and then resets internal state. - -* **push**(< _Buffer_ >chunk) - _integer_ - Processes `chunk`, searching for a match. The return value is the last processed index in `chunk` + 1. - -* **reset**() - _(void)_ - Resets internal state. Useful for when you wish to start searching a new/different stream for example. - diff --git a/deps/undici/src/node_modules/streamsearch/lib/sbmh.js b/deps/undici/src/node_modules/streamsearch/lib/sbmh.js deleted file mode 100644 index 510cae26e67a58..00000000000000 --- a/deps/undici/src/node_modules/streamsearch/lib/sbmh.js +++ /dev/null @@ -1,267 +0,0 @@ -'use strict'; -/* - Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation - by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool -*/ -function memcmp(buf1, pos1, buf2, pos2, num) { - for (let i = 0; i < num; ++i) { - if (buf1[pos1 + i] !== buf2[pos2 + i]) - return false; - } - return true; -} - -class SBMH { - constructor(needle, cb) { - if (typeof cb !== 'function') - throw new Error('Missing match callback'); - - if (typeof needle === 'string') - needle = Buffer.from(needle); - else if (!Buffer.isBuffer(needle)) - throw new Error(`Expected Buffer for needle, got ${typeof needle}`); - - const needleLen = needle.length; - - this.maxMatches = Infinity; - this.matches = 0; - - this._cb = cb; - this._lookbehindSize = 0; - this._needle = needle; - this._bufPos = 0; - - this._lookbehind = Buffer.allocUnsafe(needleLen); - - // Initialize occurrence table. - this._occ = [ - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen, needleLen, needleLen, - needleLen, needleLen, needleLen, needleLen - ]; - - // Populate occurrence table with analysis of the needle, ignoring the last - // letter. - if (needleLen > 1) { - for (let i = 0; i < needleLen - 1; ++i) - this._occ[needle[i]] = needleLen - 1 - i; - } - } - - reset() { - this.matches = 0; - this._lookbehindSize = 0; - this._bufPos = 0; - } - - push(chunk, pos) { - let result; - if (!Buffer.isBuffer(chunk)) - chunk = Buffer.from(chunk, 'latin1'); - const chunkLen = chunk.length; - this._bufPos = pos || 0; - while (result !== chunkLen && this.matches < this.maxMatches) - result = feed(this, chunk); - return result; - } - - destroy() { - const lbSize = this._lookbehindSize; - if (lbSize) - this._cb(false, this._lookbehind, 0, lbSize, false); - this.reset(); - } -} - -function feed(self, data) { - const len = data.length; - const needle = self._needle; - const needleLen = needle.length; - - // Positive: points to a position in `data` - // pos == 3 points to data[3] - // Negative: points to a position in the lookbehind buffer - // pos == -2 points to lookbehind[lookbehindSize - 2] - let pos = -self._lookbehindSize; - const lastNeedleCharPos = needleLen - 1; - const lastNeedleChar = needle[lastNeedleCharPos]; - const end = len - needleLen; - const occ = self._occ; - const lookbehind = self._lookbehind; - - if (pos < 0) { - // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool - // search with character lookup code that considers both the - // lookbehind buffer and the current round's haystack data. - // - // Loop until - // there is a match. - // or until - // we've moved past the position that requires the - // lookbehind buffer. In this case we switch to the - // optimized loop. - // or until - // the character to look at lies outside the haystack. - while (pos < 0 && pos <= end) { - const nextPos = pos + lastNeedleCharPos; - const ch = (nextPos < 0 - ? lookbehind[self._lookbehindSize + nextPos] - : data[nextPos]); - - if (ch === lastNeedleChar - && matchNeedle(self, data, pos, lastNeedleCharPos)) { - self._lookbehindSize = 0; - ++self.matches; - if (pos > -self._lookbehindSize) - self._cb(true, lookbehind, 0, self._lookbehindSize + pos, false); - else - self._cb(true, undefined, 0, 0, true); - - return (self._bufPos = pos + needleLen); - } - - pos += occ[ch]; - } - - // No match. - - // There's too few data for Boyer-Moore-Horspool to run, - // so let's use a different algorithm to skip as much as - // we can. - // Forward pos until - // the trailing part of lookbehind + data - // looks like the beginning of the needle - // or until - // pos == 0 - while (pos < 0 && !matchNeedle(self, data, pos, len - pos)) - ++pos; - - if (pos < 0) { - // Cut off part of the lookbehind buffer that has - // been processed and append the entire haystack - // into it. - const bytesToCutOff = self._lookbehindSize + pos; - - if (bytesToCutOff > 0) { - // The cut off data is guaranteed not to contain the needle. - self._cb(false, lookbehind, 0, bytesToCutOff, false); - } - - self._lookbehindSize -= bytesToCutOff; - lookbehind.copy(lookbehind, 0, bytesToCutOff, self._lookbehindSize); - lookbehind.set(data, self._lookbehindSize); - self._lookbehindSize += len; - - self._bufPos = len; - return len; - } - - // Discard lookbehind buffer. - self._cb(false, lookbehind, 0, self._lookbehindSize, false); - self._lookbehindSize = 0; - } - - pos += self._bufPos; - - const firstNeedleChar = needle[0]; - - // Lookbehind buffer is now empty. Perform Boyer-Moore-Horspool - // search with optimized character lookup code that only considers - // the current round's haystack data. - while (pos <= end) { - const ch = data[pos + lastNeedleCharPos]; - - if (ch === lastNeedleChar - && data[pos] === firstNeedleChar - && memcmp(needle, 0, data, pos, lastNeedleCharPos)) { - ++self.matches; - if (pos > 0) - self._cb(true, data, self._bufPos, pos, true); - else - self._cb(true, undefined, 0, 0, true); - - return (self._bufPos = pos + needleLen); - } - - pos += occ[ch]; - } - - // There was no match. If there's trailing haystack data that we cannot - // match yet using the Boyer-Moore-Horspool algorithm (because the trailing - // data is less than the needle size) then match using a modified - // algorithm that starts matching from the beginning instead of the end. - // Whatever trailing data is left after running this algorithm is added to - // the lookbehind buffer. - while (pos < len) { - if (data[pos] !== firstNeedleChar - || !memcmp(data, pos, needle, 0, len - pos)) { - ++pos; - continue; - } - data.copy(lookbehind, 0, pos, len); - self._lookbehindSize = len - pos; - break; - } - - // Everything until `pos` is guaranteed not to contain needle data. - if (pos > 0) - self._cb(false, data, self._bufPos, pos < len ? pos : len, true); - - self._bufPos = len; - return len; -} - -function matchNeedle(self, data, pos, len) { - const lb = self._lookbehind; - const lbSize = self._lookbehindSize; - const needle = self._needle; - - for (let i = 0; i < len; ++i, ++pos) { - const ch = (pos < 0 ? lb[lbSize + pos] : data[pos]); - if (ch !== needle[i]) - return false; - } - return true; -} - -module.exports = SBMH; diff --git a/deps/undici/src/node_modules/streamsearch/package.json b/deps/undici/src/node_modules/streamsearch/package.json deleted file mode 100644 index 51df8f9707cebd..00000000000000 --- a/deps/undici/src/node_modules/streamsearch/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "streamsearch", - "version": "1.1.0", - "author": "Brian White ", - "description": "Streaming Boyer-Moore-Horspool searching for node.js", - "main": "./lib/sbmh.js", - "engines": { - "node": ">=10.0.0" - }, - "devDependencies": { - "@mscdex/eslint-config": "^1.1.0", - "eslint": "^7.32.0" - }, - "scripts": { - "test": "node test/test.js", - "lint": "eslint --cache --report-unused-disable-directives --ext=.js .eslintrc.js lib test", - "lint:fix": "npm run lint -- --fix" - }, - "keywords": [ - "stream", - "horspool", - "boyer-moore-horspool", - "boyer-moore", - "search" - ], - "licenses": [{ - "type": "MIT", - "url": "http://github.com/mscdex/streamsearch/raw/master/LICENSE" - }], - "repository": { - "type": "git", - "url": "http://github.com/mscdex/streamsearch.git" - } -} diff --git a/deps/undici/src/node_modules/streamsearch/test/test.js b/deps/undici/src/node_modules/streamsearch/test/test.js deleted file mode 100644 index 39a04d7f834bea..00000000000000 --- a/deps/undici/src/node_modules/streamsearch/test/test.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -const assert = require('assert'); - -const StreamSearch = require('../lib/sbmh.js'); - -[ - { - needle: '\r\n', - chunks: [ - 'foo', - ' bar', - '\r', - '\n', - 'baz, hello\r', - '\n world.', - '\r\n Node.JS rules!!\r\n\r\n', - ], - expect: [ - [false, 'foo'], - [false, ' bar'], - [ true, null], - [false, 'baz, hello'], - [ true, null], - [false, ' world.'], - [ true, null], - [ true, ' Node.JS rules!!'], - [ true, ''], - ], - }, - { - needle: '---foobarbaz', - chunks: [ - '---foobarbaz', - 'asdf', - '\r\n', - '---foobarba', - '---foobar', - 'ba', - '\r\n---foobarbaz--\r\n', - ], - expect: [ - [ true, null], - [false, 'asdf'], - [false, '\r\n'], - [false, '---foobarba'], - [false, '---foobarba'], - [ true, '\r\n'], - [false, '--\r\n'], - ], - }, -].forEach((test, i) => { - console.log(`Running test #${i + 1}`); - const { needle, chunks, expect } = test; - - const results = []; - const ss = new StreamSearch(Buffer.from(needle), - (isMatch, data, start, end) => { - if (data) - data = data.toString('latin1', start, end); - else - data = null; - results.push([isMatch, data]); - }); - - for (const chunk of chunks) - ss.push(Buffer.from(chunk)); - - assert.deepStrictEqual(results, expect); -}); diff --git a/deps/undici/src/package.json b/deps/undici/src/package.json index 3846b9dc3988c5..1d2032652aeb4f 100644 --- a/deps/undici/src/package.json +++ b/deps/undici/src/package.json @@ -1,6 +1,6 @@ { "name": "undici", - "version": "5.25.2", + "version": "5.25.4", "description": "An HTTP/1.1 client, written from scratch for Node.js", "homepage": "https://undici.nodejs.org", "bugs": { @@ -93,7 +93,6 @@ "bench:run": "CONNECTIONS=1 node benchmarks/benchmark.js; CONNECTIONS=50 node benchmarks/benchmark.js", "serve:website": "docsify serve .", "prepare": "husky install", - "postpublish": "node scripts/update-undici-types-version.js && cd types && npm publish", "fuzz": "jsfuzz test/fuzzing/fuzz.js corpus" }, "devDependencies": { @@ -161,6 +160,6 @@ ] }, "dependencies": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" } } diff --git a/deps/undici/src/types/package.json b/deps/undici/src/types/package.json deleted file mode 100644 index 16bf97c4ddf83c..00000000000000 --- a/deps/undici/src/types/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "undici-types", - "version": "5.25.1", - "description": "A stand-alone types package for Undici", - "homepage": "https://undici.nodejs.org", - "bugs": { - "url": "https://github.com/nodejs/undici/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/nodejs/undici.git" - }, - "license": "MIT", - "types": "index.d.ts", - "files": [ - "*.d.ts" - ], - "contributors": [ - { - "name": "Daniele Belardi", - "url": "https://github.com/dnlup", - "author": true - }, - { - "name": "Ethan Arrowood", - "url": "https://github.com/ethan-arrowood", - "author": true - }, - { - "name": "Matteo Collina", - "url": "https://github.com/mcollina", - "author": true - }, - { - "name": "Matthew Aitken", - "url": "https://github.com/KhafraDev", - "author": true - }, - { - "name": "Robert Nagy", - "url": "https://github.com/ronag", - "author": true - }, - { - "name": "Szymon Marczak", - "url": "https://github.com/szmarczak", - "author": true - }, - { - "name": "Tomas Della Vedova", - "url": "https://github.com/delvedor", - "author": true - } - ] -} \ No newline at end of file diff --git a/deps/undici/undici.js b/deps/undici/undici.js index cd6308f9f3cc2d..db87da4137a247 100644 --- a/deps/undici/undici.js +++ b/deps/undici/undici.js @@ -331,25 +331,25 @@ var require_util = __commonJS({ if (!url || typeof url !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { - throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); - } - if (url.path != null && typeof url.path !== "string") { - throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); - } - if (url.pathname != null && typeof url.pathname !== "string") { - throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); - } - if (url.hostname != null && typeof url.hostname !== "string") { - throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); - } - if (url.origin != null && typeof url.origin !== "string") { - throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); - } if (!/^https?:/.test(url.origin || url.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } if (!(url instanceof URL)) { + if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { + throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); + } + if (url.path != null && typeof url.path !== "string") { + throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + } + if (url.pathname != null && typeof url.pathname !== "string") { + throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); + } + if (url.hostname != null && typeof url.hostname !== "string") { + throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + } + if (url.origin != null && typeof url.origin !== "string") { + throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); + } const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; let path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; @@ -848,9 +848,6 @@ var require_global = __commonJS({ return globalThis[globalOrigin]; } function setGlobalOrigin(newOrigin) { - if (newOrigin !== void 0 && typeof newOrigin !== "string" && !(newOrigin instanceof URL)) { - throw new Error("Invalid base url"); - } if (newOrigin === void 0) { Object.defineProperty(globalThis, globalOrigin, { value: void 0, @@ -2083,382 +2080,649 @@ var require_headers = __commonJS({ } }); -// node_modules/busboy/lib/utils.js -var require_utils = __commonJS({ - "node_modules/busboy/lib/utils.js"(exports2, module2) { +// node_modules/@fastify/busboy/deps/streamsearch/sbmh.js +var require_sbmh = __commonJS({ + "node_modules/@fastify/busboy/deps/streamsearch/sbmh.js"(exports2, module2) { "use strict"; - function parseContentType(str) { - if (str.length === 0) - return; - const params = /* @__PURE__ */ Object.create(null); - let i = 0; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (code !== 47 || i === 0) - return; - break; - } + var EventEmitter = require("node:events").EventEmitter; + var inherits = require("node:util").inherits; + function SBMH(needle) { + if (typeof needle === "string") { + needle = Buffer.from(needle); + } + if (!Buffer.isBuffer(needle)) { + throw new TypeError("The needle has to be a String or a Buffer."); + } + const needleLength = needle.length; + if (needleLength === 0) { + throw new Error("The needle cannot be an empty String/Buffer."); + } + if (needleLength > 256) { + throw new Error("The needle cannot have a length bigger than 256."); + } + this.maxMatches = Infinity; + this.matches = 0; + this._occ = new Array(256).fill(needleLength); + this._lookbehind_size = 0; + this._needle = needle; + this._bufpos = 0; + this._lookbehind = Buffer.alloc(needleLength); + for (var i = 0; i < needleLength - 1; ++i) { + this._occ[needle[i]] = needleLength - 1 - i; + } + } + inherits(SBMH, EventEmitter); + SBMH.prototype.reset = function() { + this._lookbehind_size = 0; + this.matches = 0; + this._bufpos = 0; + }; + SBMH.prototype.push = function(chunk, pos) { + if (!Buffer.isBuffer(chunk)) { + chunk = Buffer.from(chunk, "binary"); } - if (i === str.length) - return; - const type = str.slice(0, i).toLowerCase(); - const subtypeStart = ++i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (i === subtypeStart) - return; - if (parseContentTypeParams(str, i, params) === void 0) - return; - break; - } + const chlen = chunk.length; + this._bufpos = pos || 0; + let r; + while (r !== chlen && this.matches < this.maxMatches) { + r = this._sbmh_feed(chunk); } - if (i === subtypeStart) - return; - const subtype = str.slice(subtypeStart, i).toLowerCase(); - return { type, subtype, params }; - } - function parseContentTypeParams(str, i, params) { - while (i < str.length) { - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32 && code !== 9) - break; - } - if (i === str.length) - break; - if (str.charCodeAt(i++) !== 59) - return; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32 && code !== 9) - break; - } - if (i === str.length) - return; - let name; - const nameStart = i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (code !== 61) - return; - break; + return r; + }; + SBMH.prototype._sbmh_feed = function(data) { + const len = data.length; + const needle = this._needle; + const needleLength = needle.length; + const lastNeedleChar = needle[needleLength - 1]; + let pos = -this._lookbehind_size; + let ch; + if (pos < 0) { + while (pos < 0 && pos <= len - needleLength) { + ch = this._sbmh_lookup_char(data, pos + needleLength - 1); + if (ch === lastNeedleChar && this._sbmh_memcmp(data, pos, needleLength - 1)) { + this._lookbehind_size = 0; + ++this.matches; + this.emit("info", true); + return this._bufpos = pos + needleLength; } + pos += this._occ[ch]; } - if (i === str.length) - return; - name = str.slice(nameStart, i); - ++i; - if (i === str.length) - return; - let value = ""; - let valueStart; - if (str.charCodeAt(i) === 34) { - valueStart = ++i; - let escaping = false; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code === 92) { - if (escaping) { - valueStart = i; - escaping = false; - } else { - value += str.slice(valueStart, i); - escaping = true; - } - continue; - } - if (code === 34) { - if (escaping) { - valueStart = i; - escaping = false; - continue; - } - value += str.slice(valueStart, i); - break; - } - if (escaping) { - valueStart = i - 1; - escaping = false; - } - if (QDTEXT[code] !== 1) - return; + if (pos < 0) { + while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { + ++pos; } - if (i === str.length) - return; - ++i; + } + if (pos >= 0) { + this.emit("info", false, this._lookbehind, 0, this._lookbehind_size); + this._lookbehind_size = 0; } else { - valueStart = i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (i === valueStart) - return; - break; - } + const bytesToCutOff = this._lookbehind_size + pos; + if (bytesToCutOff > 0) { + this.emit("info", false, this._lookbehind, 0, bytesToCutOff); } - value = str.slice(valueStart, i); + this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, this._lookbehind_size - bytesToCutOff); + this._lookbehind_size -= bytesToCutOff; + data.copy(this._lookbehind, this._lookbehind_size); + this._lookbehind_size += len; + this._bufpos = len; + return len; } - name = name.toLowerCase(); - if (params[name] === void 0) - params[name] = value; } - return params; + pos += (pos >= 0) * this._bufpos; + if (data.indexOf(needle, pos) !== -1) { + pos = data.indexOf(needle, pos); + ++this.matches; + if (pos > 0) { + this.emit("info", true, data, this._bufpos, pos); + } else { + this.emit("info", true); + } + return this._bufpos = pos + needleLength; + } else { + pos = len - needleLength; + } + while (pos < len && (data[pos] !== needle[0] || Buffer.compare(data.subarray(pos, pos + len - pos), needle.subarray(0, len - pos)) !== 0)) { + ++pos; + } + if (pos < len) { + data.copy(this._lookbehind, 0, pos, pos + (len - pos)); + this._lookbehind_size = len - pos; + } + if (pos > 0) { + this.emit("info", false, data, this._bufpos, pos < len ? pos : len); + } + this._bufpos = len; + return len; + }; + SBMH.prototype._sbmh_lookup_char = function(data, pos) { + return pos < 0 ? this._lookbehind[this._lookbehind_size + pos] : data[pos]; + }; + SBMH.prototype._sbmh_memcmp = function(data, pos, len) { + for (var i = 0; i < len; ++i) { + if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { + return false; + } + } + return true; + }; + module2.exports = SBMH; + } +}); + +// node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js +var require_PartStream = __commonJS({ + "node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js"(exports2, module2) { + "use strict"; + var inherits = require("node:util").inherits; + var ReadableStream = require("node:stream").Readable; + function PartStream(opts) { + ReadableStream.call(this, opts); + } + inherits(PartStream, ReadableStream); + PartStream.prototype._read = function(n) { + }; + module2.exports = PartStream; + } +}); + +// node_modules/@fastify/busboy/lib/utils/getLimit.js +var require_getLimit = __commonJS({ + "node_modules/@fastify/busboy/lib/utils/getLimit.js"(exports2, module2) { + "use strict"; + module2.exports = function getLimit(limits, name, defaultLimit) { + if (!limits || limits[name] === void 0 || limits[name] === null) { + return defaultLimit; + } + if (typeof limits[name] !== "number" || isNaN(limits[name])) { + throw new TypeError("Limit " + name + " is not a valid number"); + } + return limits[name]; + }; + } +}); + +// node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js +var require_HeaderParser = __commonJS({ + "node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js"(exports2, module2) { + "use strict"; + var EventEmitter = require("node:events").EventEmitter; + var inherits = require("node:util").inherits; + var getLimit = require_getLimit(); + var StreamSearch = require_sbmh(); + var B_DCRLF = Buffer.from("\r\n\r\n"); + var RE_CRLF = /\r\n/g; + var RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/; + function HeaderParser(cfg) { + EventEmitter.call(this); + cfg = cfg || {}; + const self = this; + this.nread = 0; + this.maxed = false; + this.npairs = 0; + this.maxHeaderPairs = getLimit(cfg, "maxHeaderPairs", 2e3); + this.maxHeaderSize = getLimit(cfg, "maxHeaderSize", 80 * 1024); + this.buffer = ""; + this.header = {}; + this.finished = false; + this.ss = new StreamSearch(B_DCRLF); + this.ss.on("info", function(isMatch, data, start, end) { + if (data && !self.maxed) { + if (self.nread + end - start >= self.maxHeaderSize) { + end = self.maxHeaderSize - self.nread + start; + self.nread = self.maxHeaderSize; + self.maxed = true; + } else { + self.nread += end - start; + } + self.buffer += data.toString("binary", start, end); + } + if (isMatch) { + self._finish(); + } + }); } - function parseDisposition(str, defDecoder) { - if (str.length === 0) + inherits(HeaderParser, EventEmitter); + HeaderParser.prototype.push = function(data) { + const r = this.ss.push(data); + if (this.finished) { + return r; + } + }; + HeaderParser.prototype.reset = function() { + this.finished = false; + this.buffer = ""; + this.header = {}; + this.ss.reset(); + }; + HeaderParser.prototype._finish = function() { + if (this.buffer) { + this._parseHeader(); + } + this.ss.matches = this.ss.maxMatches; + const header = this.header; + this.header = {}; + this.buffer = ""; + this.finished = true; + this.nread = this.npairs = 0; + this.maxed = false; + this.emit("header", header); + }; + HeaderParser.prototype._parseHeader = function() { + if (this.npairs === this.maxHeaderPairs) { return; - const params = /* @__PURE__ */ Object.create(null); - let i = 0; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (parseDispositionParams(str, i, params, defDecoder) === void 0) - return; + } + const lines = this.buffer.split(RE_CRLF); + const len = lines.length; + let m, h; + for (var i = 0; i < len; ++i) { + if (lines[i].length === 0) { + continue; + } + if (lines[i][0] === " " || lines[i][0] === " ") { + if (h) { + this.header[h][this.header[h].length - 1] += lines[i]; + continue; + } + } + const posColon = lines[i].indexOf(":"); + if (posColon === -1 || posColon === 0) { + return; + } + m = RE_HDR.exec(lines[i]); + h = m[1].toLowerCase(); + this.header[h] = this.header[h] || []; + this.header[h].push(m[2] || ""); + if (++this.npairs === this.maxHeaderPairs) { break; } } - const type = str.slice(0, i).toLowerCase(); - return { type, params }; + }; + module2.exports = HeaderParser; + } +}); + +// node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js +var require_Dicer = __commonJS({ + "node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js"(exports2, module2) { + "use strict"; + var WritableStream = require("node:stream").Writable; + var inherits = require("node:util").inherits; + var StreamSearch = require_sbmh(); + var PartStream = require_PartStream(); + var HeaderParser = require_HeaderParser(); + var DASH = 45; + var B_ONEDASH = Buffer.from("-"); + var B_CRLF = Buffer.from("\r\n"); + var EMPTY_FN = function() { + }; + function Dicer(cfg) { + if (!(this instanceof Dicer)) { + return new Dicer(cfg); + } + WritableStream.call(this, cfg); + if (!cfg || !cfg.headerFirst && typeof cfg.boundary !== "string") { + throw new TypeError("Boundary required"); + } + if (typeof cfg.boundary === "string") { + this.setBoundary(cfg.boundary); + } else { + this._bparser = void 0; + } + this._headerFirst = cfg.headerFirst; + this._dashes = 0; + this._parts = 0; + this._finished = false; + this._realFinish = false; + this._isPreamble = true; + this._justMatched = false; + this._firstWrite = true; + this._inHeader = true; + this._part = void 0; + this._cb = void 0; + this._ignoreData = false; + this._partOpts = { highWaterMark: cfg.partHwm }; + this._pause = false; + const self = this; + this._hparser = new HeaderParser(cfg); + this._hparser.on("header", function(header) { + self._inHeader = false; + self._part.emit("header", header); + }); } - function parseDispositionParams(str, i, params, defDecoder) { - while (i < str.length) { - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32 && code !== 9) - break; + inherits(Dicer, WritableStream); + Dicer.prototype.emit = function(ev) { + if (ev === "finish" && !this._realFinish) { + if (!this._finished) { + const self = this; + process.nextTick(function() { + self.emit("error", new Error("Unexpected end of multipart data")); + if (self._part && !self._ignoreData) { + const type = self._isPreamble ? "Preamble" : "Part"; + self._part.emit("error", new Error(type + " terminated early due to unexpected end of multipart data")); + self._part.push(null); + process.nextTick(function() { + self._realFinish = true; + self.emit("finish"); + self._realFinish = false; + }); + return; + } + self._realFinish = true; + self.emit("finish"); + self._realFinish = false; + }); } - if (i === str.length) - break; - if (str.charCodeAt(i++) !== 59) - return; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code !== 32 && code !== 9) + } else { + WritableStream.prototype.emit.apply(this, arguments); + } + }; + Dicer.prototype._write = function(data, encoding, cb) { + if (!this._hparser && !this._bparser) { + return cb(); + } + if (this._headerFirst && this._isPreamble) { + if (!this._part) { + this._part = new PartStream(this._partOpts); + if (this._events.preamble) { + this.emit("preamble", this._part); + } else { + this._ignore(); + } + } + const r = this._hparser.push(data); + if (!this._inHeader && r !== void 0 && r < data.length) { + data = data.slice(r); + } else { + return cb(); + } + } + if (this._firstWrite) { + this._bparser.push(B_CRLF); + this._firstWrite = false; + } + this._bparser.push(data); + if (this._pause) { + this._cb = cb; + } else { + cb(); + } + }; + Dicer.prototype.reset = function() { + this._part = void 0; + this._bparser = void 0; + this._hparser = void 0; + }; + Dicer.prototype.setBoundary = function(boundary) { + const self = this; + this._bparser = new StreamSearch("\r\n--" + boundary); + this._bparser.on("info", function(isMatch, data, start, end) { + self._oninfo(isMatch, data, start, end); + }); + }; + Dicer.prototype._ignore = function() { + if (this._part && !this._ignoreData) { + this._ignoreData = true; + this._part.on("error", EMPTY_FN); + this._part.resume(); + } + }; + Dicer.prototype._oninfo = function(isMatch, data, start, end) { + let buf; + const self = this; + let i = 0; + let r; + let shouldWriteMore = true; + if (!this._part && this._justMatched && data) { + while (this._dashes < 2 && start + i < end) { + if (data[start + i] === DASH) { + ++i; + ++this._dashes; + } else { + if (this._dashes) { + buf = B_ONEDASH; + } + this._dashes = 0; break; + } } - if (i === str.length) - return; - let name; - const nameStart = i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (code === 61) - break; - return; + if (this._dashes === 2) { + if (start + i < end && this._events.trailer) { + this.emit("trailer", data.slice(start + i, end)); + } + this.reset(); + this._finished = true; + if (self._parts === 0) { + self._realFinish = true; + self.emit("finish"); + self._realFinish = false; } } - if (i === str.length) + if (this._dashes) { return; - let value = ""; - let valueStart; - let charset; - name = str.slice(nameStart, i); - if (name.charCodeAt(name.length - 1) === 42) { - const charsetStart = ++i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (CHARSET[code] !== 1) { - if (code !== 39) - return; - break; - } + } + } + if (this._justMatched) { + this._justMatched = false; + } + if (!this._part) { + this._part = new PartStream(this._partOpts); + this._part._read = function(n) { + self._unpause(); + }; + if (this._isPreamble && this._events.preamble) { + this.emit("preamble", this._part); + } else if (this._isPreamble !== true && this._events.part) { + this.emit("part", this._part); + } else { + this._ignore(); + } + if (!this._isPreamble) { + this._inHeader = true; + } + } + if (data && start < end && !this._ignoreData) { + if (this._isPreamble || !this._inHeader) { + if (buf) { + shouldWriteMore = this._part.push(buf); } - if (i === str.length) - return; - charset = str.slice(charsetStart, i); - ++i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code === 39) - break; + shouldWriteMore = this._part.push(data.slice(start, end)); + if (!shouldWriteMore) { + this._pause = true; } - if (i === str.length) - return; - ++i; - if (i === str.length) - return; - valueStart = i; - let encode = 0; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (EXTENDED_VALUE[code] !== 1) { - if (code === 37) { - let hexUpper; - let hexLower; - if (i + 2 < str.length && (hexUpper = HEX_VALUES[str.charCodeAt(i + 1)]) !== -1 && (hexLower = HEX_VALUES[str.charCodeAt(i + 2)]) !== -1) { - const byteVal = (hexUpper << 4) + hexLower; - value += str.slice(valueStart, i); - value += String.fromCharCode(byteVal); - i += 2; - valueStart = i + 1; - if (byteVal >= 128) - encode = 2; - else if (encode === 0) - encode = 1; - continue; - } - return; - } - break; - } + } else if (!this._isPreamble && this._inHeader) { + if (buf) { + this._hparser.push(buf); } - value += str.slice(valueStart, i); - value = convertToUTF8(value, charset, encode); - if (value === void 0) - return; + r = this._hparser.push(data.slice(start, end)); + if (!this._inHeader && r !== void 0 && r < end) { + this._oninfo(false, data, start + r, end); + } + } + } + if (isMatch) { + this._hparser.reset(); + if (this._isPreamble) { + this._isPreamble = false; } else { - ++i; - if (i === str.length) - return; - if (str.charCodeAt(i) === 34) { - valueStart = ++i; - let escaping = false; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (code === 92) { - if (escaping) { - valueStart = i; - escaping = false; + if (start !== end) { + ++this._parts; + this._part.on("end", function() { + if (--self._parts === 0) { + if (self._finished) { + self._realFinish = true; + self.emit("finish"); + self._realFinish = false; } else { - value += str.slice(valueStart, i); - escaping = true; + self._unpause(); } - continue; - } - if (code === 34) { - if (escaping) { - valueStart = i; - escaping = false; - continue; - } - value += str.slice(valueStart, i); - break; - } - if (escaping) { - valueStart = i - 1; - escaping = false; } - if (QDTEXT[code] !== 1) - return; + }); + } + } + this._part.push(null); + this._part = void 0; + this._ignoreData = false; + this._justMatched = true; + this._dashes = 0; + } + }; + Dicer.prototype._unpause = function() { + if (!this._pause) { + return; + } + this._pause = false; + if (this._cb) { + const cb = this._cb; + this._cb = void 0; + cb(); + } + }; + module2.exports = Dicer; + } +}); + +// node_modules/@fastify/busboy/lib/utils/decodeText.js +var require_decodeText = __commonJS({ + "node_modules/@fastify/busboy/lib/utils/decodeText.js"(exports2, module2) { + "use strict"; + var utf8Decoder = new TextDecoder("utf-8"); + var textDecoders = /* @__PURE__ */ new Map([ + ["utf-8", utf8Decoder], + ["utf8", utf8Decoder] + ]); + function decodeText(text, textEncoding, destEncoding) { + if (text) { + if (textDecoders.has(destEncoding)) { + try { + return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding)); + } catch (e) { + } + } else { + try { + textDecoders.set(destEncoding, new TextDecoder(destEncoding)); + return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding)); + } catch (e) { + } + } + } + return text; + } + module2.exports = decodeText; + } +}); + +// node_modules/@fastify/busboy/lib/utils/parseParams.js +var require_parseParams = __commonJS({ + "node_modules/@fastify/busboy/lib/utils/parseParams.js"(exports2, module2) { + "use strict"; + var decodeText = require_decodeText(); + var RE_ENCODED = /%([a-fA-F0-9]{2})/g; + function encodedReplacer(match, byte) { + return String.fromCharCode(parseInt(byte, 16)); + } + function parseParams(str) { + const res = []; + let state = "key"; + let charset = ""; + let inquote = false; + let escaping = false; + let p = 0; + let tmp = ""; + for (var i = 0, len = str.length; i < len; ++i) { + const char = str[i]; + if (char === "\\" && inquote) { + if (escaping) { + escaping = false; + } else { + escaping = true; + continue; + } + } else if (char === '"') { + if (!escaping) { + if (inquote) { + inquote = false; + state = "key"; + } else { + inquote = true; } - if (i === str.length) - return; - ++i; + continue; } else { - valueStart = i; - for (; i < str.length; ++i) { - const code = str.charCodeAt(i); - if (TOKEN[code] !== 1) { - if (i === valueStart) - return; - break; + escaping = false; + } + } else { + if (escaping && inquote) { + tmp += "\\"; + } + escaping = false; + if ((state === "charset" || state === "lang") && char === "'") { + if (state === "charset") { + state = "lang"; + charset = tmp.substring(1); + } else { + state = "value"; + } + tmp = ""; + continue; + } else if (state === "key" && (char === "*" || char === "=") && res.length) { + if (char === "*") { + state = "charset"; + } else { + state = "value"; + } + res[p] = [tmp, void 0]; + tmp = ""; + continue; + } else if (!inquote && char === ";") { + state = "key"; + if (charset) { + if (tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), "binary", charset); } + charset = ""; + } else if (tmp.length) { + tmp = decodeText(tmp, "binary", "utf8"); + } + if (res[p] === void 0) { + res[p] = tmp; + } else { + res[p][1] = tmp; } - value = str.slice(valueStart, i); + tmp = ""; + ++p; + continue; + } else if (!inquote && (char === " " || char === " ")) { + continue; } - value = defDecoder(value, 2); - if (value === void 0) - return; } - name = name.toLowerCase(); - if (params[name] === void 0) - params[name] = value; + tmp += char; } - return params; - } - function getDecoder(charset) { - let lc; - while (true) { - switch (charset) { - case "utf-8": - case "utf8": - return decoders.utf8; - case "latin1": - case "ascii": - case "us-ascii": - case "iso-8859-1": - case "iso8859-1": - case "iso88591": - case "iso_8859-1": - case "windows-1252": - case "iso_8859-1:1987": - case "cp1252": - case "x-cp1252": - return decoders.latin1; - case "utf16le": - case "utf-16le": - case "ucs2": - case "ucs-2": - return decoders.utf16le; - case "base64": - return decoders.base64; - default: - if (lc === void 0) { - lc = true; - charset = charset.toLowerCase(); - continue; - } - return decoders.other.bind(charset); + if (charset && tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), "binary", charset); + } else if (tmp) { + tmp = decodeText(tmp, "binary", "utf8"); + } + if (res[p] === void 0) { + if (tmp) { + res[p] = tmp; } + } else { + res[p][1] = tmp; } + return res; } - var decoders = { - utf8: (data, hint) => { - if (data.length === 0) - return ""; - if (typeof data === "string") { - if (hint < 2) - return data; - data = Buffer.from(data, "latin1"); - } - return data.utf8Slice(0, data.length); - }, - latin1: (data, hint) => { - if (data.length === 0) - return ""; - if (typeof data === "string") - return data; - return data.latin1Slice(0, data.length); - }, - utf16le: (data, hint) => { - if (data.length === 0) - return ""; - if (typeof data === "string") - data = Buffer.from(data, "latin1"); - return data.ucs2Slice(0, data.length); - }, - base64: (data, hint) => { - if (data.length === 0) - return ""; - if (typeof data === "string") - data = Buffer.from(data, "latin1"); - return data.base64Slice(0, data.length); - }, - other: (data, hint) => { - if (data.length === 0) - return ""; - if (typeof data === "string") - data = Buffer.from(data, "latin1"); - try { - const decoder = new TextDecoder(exports2); - return decoder.decode(data); - } catch { - } - } - }; - function convertToUTF8(data, charset, hint) { - const decode = getDecoder(charset); - if (decode) - return decode(data, hint); - } - function basename(path) { - if (typeof path !== "string") + module2.exports = parseParams; + } +}); + +// node_modules/@fastify/busboy/lib/utils/basename.js +var require_basename = __commonJS({ + "node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) { + "use strict"; + module2.exports = function basename(path) { + if (typeof path !== "string") { return ""; - for (let i = path.length - 1; i >= 0; --i) { + } + for (var i = path.length - 1; i >= 0; --i) { switch (path.charCodeAt(i)) { case 47: case 92: @@ -2467,177 +2731,297 @@ var require_utils = __commonJS({ } } return path === ".." || path === "." ? "" : path; + }; + } +}); + +// node_modules/@fastify/busboy/lib/types/multipart.js +var require_multipart = __commonJS({ + "node_modules/@fastify/busboy/lib/types/multipart.js"(exports2, module2) { + "use strict"; + var { Readable } = require("node:stream"); + var { inherits } = require("node:util"); + var Dicer = require_Dicer(); + var parseParams = require_parseParams(); + var decodeText = require_decodeText(); + var basename = require_basename(); + var getLimit = require_getLimit(); + var RE_BOUNDARY = /^boundary$/i; + var RE_FIELD = /^form-data$/i; + var RE_CHARSET = /^charset$/i; + var RE_FILENAME = /^filename$/i; + var RE_NAME = /^name$/i; + Multipart.detect = /^multipart\/form-data/i; + function Multipart(boy, cfg) { + let i; + let len; + const self = this; + let boundary; + const limits = cfg.limits; + const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => contentType === "application/octet-stream" || fileName !== void 0); + const parsedConType = cfg.parsedConType || []; + const defCharset = cfg.defCharset || "utf8"; + const preservePath = cfg.preservePath; + const fileOpts = { highWaterMark: cfg.fileHwm }; + for (i = 0, len = parsedConType.length; i < len; ++i) { + if (Array.isArray(parsedConType[i]) && RE_BOUNDARY.test(parsedConType[i][0])) { + boundary = parsedConType[i][1]; + break; + } + } + function checkFinished() { + if (nends === 0 && finished && !boy._done) { + finished = false; + self.end(); + } + } + if (typeof boundary !== "string") { + throw new Error("Multipart: Boundary not found"); + } + const fieldSizeLimit = getLimit(limits, "fieldSize", 1 * 1024 * 1024); + const fileSizeLimit = getLimit(limits, "fileSize", Infinity); + const filesLimit = getLimit(limits, "files", Infinity); + const fieldsLimit = getLimit(limits, "fields", Infinity); + const partsLimit = getLimit(limits, "parts", Infinity); + const headerPairsLimit = getLimit(limits, "headerPairs", 2e3); + const headerSizeLimit = getLimit(limits, "headerSize", 80 * 1024); + let nfiles = 0; + let nfields = 0; + let nends = 0; + let curFile; + let curField; + let finished = false; + this._needDrain = false; + this._pause = false; + this._cb = void 0; + this._nparts = 0; + this._boy = boy; + const parserCfg = { + boundary, + maxHeaderPairs: headerPairsLimit, + maxHeaderSize: headerSizeLimit, + partHwm: fileOpts.highWaterMark, + highWaterMark: cfg.highWaterMark + }; + this.parser = new Dicer(parserCfg); + this.parser.on("drain", function() { + self._needDrain = false; + if (self._cb && !self._pause) { + const cb = self._cb; + self._cb = void 0; + cb(); + } + }).on("part", function onPart(part) { + if (++self._nparts > partsLimit) { + self.parser.removeListener("part", onPart); + self.parser.on("part", skipPart); + boy.hitPartsLimit = true; + boy.emit("partsLimit"); + return skipPart(part); + } + if (curField) { + const field = curField; + field.emit("end"); + field.removeAllListeners("end"); + } + part.on("header", function(header) { + let contype; + let fieldname; + let parsed; + let charset; + let encoding; + let filename; + let nsize = 0; + if (header["content-type"]) { + parsed = parseParams(header["content-type"][0]); + if (parsed[0]) { + contype = parsed[0].toLowerCase(); + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_CHARSET.test(parsed[i][0])) { + charset = parsed[i][1].toLowerCase(); + break; + } + } + } + } + if (contype === void 0) { + contype = "text/plain"; + } + if (charset === void 0) { + charset = defCharset; + } + if (header["content-disposition"]) { + parsed = parseParams(header["content-disposition"][0]); + if (!RE_FIELD.test(parsed[0])) { + return skipPart(part); + } + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_NAME.test(parsed[i][0])) { + fieldname = parsed[i][1]; + } else if (RE_FILENAME.test(parsed[i][0])) { + filename = parsed[i][1]; + if (!preservePath) { + filename = basename(filename); + } + } + } + } else { + return skipPart(part); + } + if (header["content-transfer-encoding"]) { + encoding = header["content-transfer-encoding"][0].toLowerCase(); + } else { + encoding = "7bit"; + } + let onData, onEnd; + if (isPartAFile(fieldname, contype, filename)) { + if (nfiles === filesLimit) { + if (!boy.hitFilesLimit) { + boy.hitFilesLimit = true; + boy.emit("filesLimit"); + } + return skipPart(part); + } + ++nfiles; + if (!boy._events.file) { + self.parser._ignore(); + return; + } + ++nends; + const file = new FileStream(fileOpts); + curFile = file; + file.on("end", function() { + --nends; + self._pause = false; + checkFinished(); + if (self._cb && !self._needDrain) { + const cb = self._cb; + self._cb = void 0; + cb(); + } + }); + file._read = function(n) { + if (!self._pause) { + return; + } + self._pause = false; + if (self._cb && !self._needDrain) { + const cb = self._cb; + self._cb = void 0; + cb(); + } + }; + boy.emit("file", fieldname, file, filename, encoding, contype); + onData = function(data) { + if ((nsize += data.length) > fileSizeLimit) { + const extralen = fileSizeLimit - nsize + data.length; + if (extralen > 0) { + file.push(data.slice(0, extralen)); + } + file.truncated = true; + file.bytesRead = fileSizeLimit; + part.removeAllListeners("data"); + file.emit("limit"); + return; + } else if (!file.push(data)) { + self._pause = true; + } + file.bytesRead = nsize; + }; + onEnd = function() { + curFile = void 0; + file.push(null); + }; + } else { + if (nfields === fieldsLimit) { + if (!boy.hitFieldsLimit) { + boy.hitFieldsLimit = true; + boy.emit("fieldsLimit"); + } + return skipPart(part); + } + ++nfields; + ++nends; + let buffer = ""; + let truncated = false; + curField = part; + onData = function(data) { + if ((nsize += data.length) > fieldSizeLimit) { + const extralen = fieldSizeLimit - (nsize - data.length); + buffer += data.toString("binary", 0, extralen); + truncated = true; + part.removeAllListeners("data"); + } else { + buffer += data.toString("binary"); + } + }; + onEnd = function() { + curField = void 0; + if (buffer.length) { + buffer = decodeText(buffer, "binary", charset); + } + boy.emit("field", fieldname, buffer, false, truncated, encoding, contype); + --nends; + checkFinished(); + }; + } + part._readableState.sync = false; + part.on("data", onData); + part.on("end", onEnd); + }).on("error", function(err) { + if (curFile) { + curFile.emit("error", err); + } + }); + }).on("error", function(err) { + boy.emit("error", err); + }).on("finish", function() { + finished = true; + checkFinished(); + }); } - var TOKEN = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 1, - 1, - 0, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, + Multipart.prototype.write = function(chunk, cb) { + const r = this.parser.write(chunk); + if (r && !this._pause) { + cb(); + } else { + this._needDrain = !r; + this._cb = cb; + } + }; + Multipart.prototype.end = function() { + const self = this; + if (self.parser.writable) { + self.parser.end(); + } else if (!self._boy._done) { + process.nextTick(function() { + self._boy._done = true; + self._boy.emit("finish"); + }); + } + }; + function skipPart(part) { + part.resume(); + } + function FileStream(opts) { + Readable.call(this, opts); + this.bytesRead = 0; + this.truncated = false; + } + inherits(FileStream, Readable); + FileStream.prototype._read = function(n) { + }; + module2.exports = Multipart; + } +}); + +// node_modules/@fastify/busboy/lib/utils/Decoder.js +var require_Decoder = __commonJS({ + "node_modules/@fastify/busboy/lib/utils/Decoder.js"(exports2, module2) { + "use strict"; + var RE_PLUS = /\+/g; + var HEX = [ + 0, 0, 0, 0, @@ -2685,2485 +3069,6 @@ var require_utils = __commonJS({ 0, 0, 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ]; - var QDTEXT = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1 - ]; - var CHARSET = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ]; - var EXTENDED_VALUE = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 1, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ]; - var HEX_VALUES = [ - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 10, - 11, - 12, - 13, - 14, - 15, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 10, - 11, - 12, - 13, - 14, - 15, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1 - ]; - module2.exports = { - basename, - convertToUTF8, - getDecoder, - parseContentType, - parseDisposition - }; - } -}); - -// node_modules/streamsearch/lib/sbmh.js -var require_sbmh = __commonJS({ - "node_modules/streamsearch/lib/sbmh.js"(exports2, module2) { - "use strict"; - function memcmp(buf1, pos1, buf2, pos2, num) { - for (let i = 0; i < num; ++i) { - if (buf1[pos1 + i] !== buf2[pos2 + i]) - return false; - } - return true; - } - var SBMH = class { - constructor(needle, cb) { - if (typeof cb !== "function") - throw new Error("Missing match callback"); - if (typeof needle === "string") - needle = Buffer.from(needle); - else if (!Buffer.isBuffer(needle)) - throw new Error(`Expected Buffer for needle, got ${typeof needle}`); - const needleLen = needle.length; - this.maxMatches = Infinity; - this.matches = 0; - this._cb = cb; - this._lookbehindSize = 0; - this._needle = needle; - this._bufPos = 0; - this._lookbehind = Buffer.allocUnsafe(needleLen); - this._occ = [ - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen, - needleLen - ]; - if (needleLen > 1) { - for (let i = 0; i < needleLen - 1; ++i) - this._occ[needle[i]] = needleLen - 1 - i; - } - } - reset() { - this.matches = 0; - this._lookbehindSize = 0; - this._bufPos = 0; - } - push(chunk, pos) { - let result; - if (!Buffer.isBuffer(chunk)) - chunk = Buffer.from(chunk, "latin1"); - const chunkLen = chunk.length; - this._bufPos = pos || 0; - while (result !== chunkLen && this.matches < this.maxMatches) - result = feed(this, chunk); - return result; - } - destroy() { - const lbSize = this._lookbehindSize; - if (lbSize) - this._cb(false, this._lookbehind, 0, lbSize, false); - this.reset(); - } - }; - function feed(self, data) { - const len = data.length; - const needle = self._needle; - const needleLen = needle.length; - let pos = -self._lookbehindSize; - const lastNeedleCharPos = needleLen - 1; - const lastNeedleChar = needle[lastNeedleCharPos]; - const end = len - needleLen; - const occ = self._occ; - const lookbehind = self._lookbehind; - if (pos < 0) { - while (pos < 0 && pos <= end) { - const nextPos = pos + lastNeedleCharPos; - const ch = nextPos < 0 ? lookbehind[self._lookbehindSize + nextPos] : data[nextPos]; - if (ch === lastNeedleChar && matchNeedle(self, data, pos, lastNeedleCharPos)) { - self._lookbehindSize = 0; - ++self.matches; - if (pos > -self._lookbehindSize) - self._cb(true, lookbehind, 0, self._lookbehindSize + pos, false); - else - self._cb(true, void 0, 0, 0, true); - return self._bufPos = pos + needleLen; - } - pos += occ[ch]; - } - while (pos < 0 && !matchNeedle(self, data, pos, len - pos)) - ++pos; - if (pos < 0) { - const bytesToCutOff = self._lookbehindSize + pos; - if (bytesToCutOff > 0) { - self._cb(false, lookbehind, 0, bytesToCutOff, false); - } - self._lookbehindSize -= bytesToCutOff; - lookbehind.copy(lookbehind, 0, bytesToCutOff, self._lookbehindSize); - lookbehind.set(data, self._lookbehindSize); - self._lookbehindSize += len; - self._bufPos = len; - return len; - } - self._cb(false, lookbehind, 0, self._lookbehindSize, false); - self._lookbehindSize = 0; - } - pos += self._bufPos; - const firstNeedleChar = needle[0]; - while (pos <= end) { - const ch = data[pos + lastNeedleCharPos]; - if (ch === lastNeedleChar && data[pos] === firstNeedleChar && memcmp(needle, 0, data, pos, lastNeedleCharPos)) { - ++self.matches; - if (pos > 0) - self._cb(true, data, self._bufPos, pos, true); - else - self._cb(true, void 0, 0, 0, true); - return self._bufPos = pos + needleLen; - } - pos += occ[ch]; - } - while (pos < len) { - if (data[pos] !== firstNeedleChar || !memcmp(data, pos, needle, 0, len - pos)) { - ++pos; - continue; - } - data.copy(lookbehind, 0, pos, len); - self._lookbehindSize = len - pos; - break; - } - if (pos > 0) - self._cb(false, data, self._bufPos, pos < len ? pos : len, true); - self._bufPos = len; - return len; - } - function matchNeedle(self, data, pos, len) { - const lb = self._lookbehind; - const lbSize = self._lookbehindSize; - const needle = self._needle; - for (let i = 0; i < len; ++i, ++pos) { - const ch = pos < 0 ? lb[lbSize + pos] : data[pos]; - if (ch !== needle[i]) - return false; - } - return true; - } - module2.exports = SBMH; - } -}); - -// node_modules/busboy/lib/types/multipart.js -var require_multipart = __commonJS({ - "node_modules/busboy/lib/types/multipart.js"(exports2, module2) { - "use strict"; - var { Readable, Writable } = require("stream"); - var StreamSearch = require_sbmh(); - var { - basename, - convertToUTF8, - getDecoder, - parseContentType, - parseDisposition - } = require_utils(); - var BUF_CRLF = Buffer.from("\r\n"); - var BUF_CR = Buffer.from("\r"); - var BUF_DASH = Buffer.from("-"); - function noop() { - } - var MAX_HEADER_PAIRS = 2e3; - var MAX_HEADER_SIZE = 16 * 1024; - var HPARSER_NAME = 0; - var HPARSER_PRE_OWS = 1; - var HPARSER_VALUE = 2; - var HeaderParser = class { - constructor(cb) { - this.header = /* @__PURE__ */ Object.create(null); - this.pairCount = 0; - this.byteCount = 0; - this.state = HPARSER_NAME; - this.name = ""; - this.value = ""; - this.crlf = 0; - this.cb = cb; - } - reset() { - this.header = /* @__PURE__ */ Object.create(null); - this.pairCount = 0; - this.byteCount = 0; - this.state = HPARSER_NAME; - this.name = ""; - this.value = ""; - this.crlf = 0; - } - push(chunk, pos, end) { - let start = pos; - while (pos < end) { - switch (this.state) { - case HPARSER_NAME: { - let done = false; - for (; pos < end; ++pos) { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (TOKEN[code] !== 1) { - if (code !== 58) - return -1; - this.name += chunk.latin1Slice(start, pos); - if (this.name.length === 0) - return -1; - ++pos; - done = true; - this.state = HPARSER_PRE_OWS; - break; - } - } - if (!done) { - this.name += chunk.latin1Slice(start, pos); - break; - } - } - case HPARSER_PRE_OWS: { - let done = false; - for (; pos < end; ++pos) { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (code !== 32 && code !== 9) { - start = pos; - done = true; - this.state = HPARSER_VALUE; - break; - } - } - if (!done) - break; - } - case HPARSER_VALUE: - switch (this.crlf) { - case 0: - for (; pos < end; ++pos) { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (FIELD_VCHAR[code] !== 1) { - if (code !== 13) - return -1; - ++this.crlf; - break; - } - } - this.value += chunk.latin1Slice(start, pos++); - break; - case 1: - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - if (chunk[pos++] !== 10) - return -1; - ++this.crlf; - break; - case 2: { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - const code = chunk[pos]; - if (code === 32 || code === 9) { - start = pos; - this.crlf = 0; - } else { - if (++this.pairCount < MAX_HEADER_PAIRS) { - this.name = this.name.toLowerCase(); - if (this.header[this.name] === void 0) - this.header[this.name] = [this.value]; - else - this.header[this.name].push(this.value); - } - if (code === 13) { - ++this.crlf; - ++pos; - } else { - start = pos; - this.crlf = 0; - this.state = HPARSER_NAME; - this.name = ""; - this.value = ""; - } - } - break; - } - case 3: { - if (this.byteCount === MAX_HEADER_SIZE) - return -1; - ++this.byteCount; - if (chunk[pos++] !== 10) - return -1; - const header = this.header; - this.reset(); - this.cb(header); - return pos; - } - } - break; - } - } - return pos; - } - }; - var FileStream = class extends Readable { - constructor(opts, owner) { - super(opts); - this.truncated = false; - this._readcb = null; - this.once("end", () => { - this._read(); - if (--owner._fileEndsLeft === 0 && owner._finalcb) { - const cb = owner._finalcb; - owner._finalcb = null; - process.nextTick(cb); - } - }); - } - _read(n) { - const cb = this._readcb; - if (cb) { - this._readcb = null; - cb(); - } - } - }; - var ignoreData = { - push: (chunk, pos) => { - }, - destroy: () => { - } - }; - function callAndUnsetCb(self, err) { - const cb = self._writecb; - self._writecb = null; - if (err) - self.destroy(err); - else if (cb) - cb(); - } - function nullDecoder(val, hint) { - return val; - } - var Multipart = class extends Writable { - constructor(cfg) { - const streamOpts = { - autoDestroy: true, - emitClose: true, - highWaterMark: typeof cfg.highWaterMark === "number" ? cfg.highWaterMark : void 0 - }; - super(streamOpts); - if (!cfg.conType.params || typeof cfg.conType.params.boundary !== "string") - throw new Error("Multipart: Boundary not found"); - const boundary = cfg.conType.params.boundary; - const paramDecoder = typeof cfg.defParamCharset === "string" && cfg.defParamCharset ? getDecoder(cfg.defParamCharset) : nullDecoder; - const defCharset = cfg.defCharset || "utf8"; - const preservePath = cfg.preservePath; - const fileOpts = { - autoDestroy: true, - emitClose: true, - highWaterMark: typeof cfg.fileHwm === "number" ? cfg.fileHwm : void 0 - }; - const limits = cfg.limits; - const fieldSizeLimit = limits && typeof limits.fieldSize === "number" ? limits.fieldSize : 1 * 1024 * 1024; - const fileSizeLimit = limits && typeof limits.fileSize === "number" ? limits.fileSize : Infinity; - const filesLimit = limits && typeof limits.files === "number" ? limits.files : Infinity; - const fieldsLimit = limits && typeof limits.fields === "number" ? limits.fields : Infinity; - const partsLimit = limits && typeof limits.parts === "number" ? limits.parts : Infinity; - let parts = -1; - let fields = 0; - let files = 0; - let skipPart = false; - this._fileEndsLeft = 0; - this._fileStream = void 0; - this._complete = false; - let fileSize = 0; - let field; - let fieldSize = 0; - let partCharset; - let partEncoding; - let partType; - let partName; - let partTruncated = false; - let hitFilesLimit = false; - let hitFieldsLimit = false; - this._hparser = null; - const hparser = new HeaderParser((header) => { - this._hparser = null; - skipPart = false; - partType = "text/plain"; - partCharset = defCharset; - partEncoding = "7bit"; - partName = void 0; - partTruncated = false; - let filename; - if (!header["content-disposition"]) { - skipPart = true; - return; - } - const disp = parseDisposition(header["content-disposition"][0], paramDecoder); - if (!disp || disp.type !== "form-data") { - skipPart = true; - return; - } - if (disp.params) { - if (disp.params.name) - partName = disp.params.name; - if (disp.params["filename*"]) - filename = disp.params["filename*"]; - else if (disp.params.filename) - filename = disp.params.filename; - if (filename !== void 0 && !preservePath) - filename = basename(filename); - } - if (header["content-type"]) { - const conType = parseContentType(header["content-type"][0]); - if (conType) { - partType = `${conType.type}/${conType.subtype}`; - if (conType.params && typeof conType.params.charset === "string") - partCharset = conType.params.charset.toLowerCase(); - } - } - if (header["content-transfer-encoding"]) - partEncoding = header["content-transfer-encoding"][0].toLowerCase(); - if (partType === "application/octet-stream" || filename !== void 0) { - if (files === filesLimit) { - if (!hitFilesLimit) { - hitFilesLimit = true; - this.emit("filesLimit"); - } - skipPart = true; - return; - } - ++files; - if (this.listenerCount("file") === 0) { - skipPart = true; - return; - } - fileSize = 0; - this._fileStream = new FileStream(fileOpts, this); - ++this._fileEndsLeft; - this.emit("file", partName, this._fileStream, { - filename, - encoding: partEncoding, - mimeType: partType - }); - } else { - if (fields === fieldsLimit) { - if (!hitFieldsLimit) { - hitFieldsLimit = true; - this.emit("fieldsLimit"); - } - skipPart = true; - return; - } - ++fields; - if (this.listenerCount("field") === 0) { - skipPart = true; - return; - } - field = []; - fieldSize = 0; - } - }); - let matchPostBoundary = 0; - const ssCb = (isMatch, data, start, end, isDataSafe) => { - retrydata: - while (data) { - if (this._hparser !== null) { - const ret = this._hparser.push(data, start, end); - if (ret === -1) { - this._hparser = null; - hparser.reset(); - this.emit("error", new Error("Malformed part header")); - break; - } - start = ret; - } - if (start === end) - break; - if (matchPostBoundary !== 0) { - if (matchPostBoundary === 1) { - switch (data[start]) { - case 45: - matchPostBoundary = 2; - ++start; - break; - case 13: - matchPostBoundary = 3; - ++start; - break; - default: - matchPostBoundary = 0; - } - if (start === end) - return; - } - if (matchPostBoundary === 2) { - matchPostBoundary = 0; - if (data[start] === 45) { - this._complete = true; - this._bparser = ignoreData; - return; - } - const writecb = this._writecb; - this._writecb = noop; - ssCb(false, BUF_DASH, 0, 1, false); - this._writecb = writecb; - } else if (matchPostBoundary === 3) { - matchPostBoundary = 0; - if (data[start] === 10) { - ++start; - if (parts >= partsLimit) - break; - this._hparser = hparser; - if (start === end) - break; - continue retrydata; - } else { - const writecb = this._writecb; - this._writecb = noop; - ssCb(false, BUF_CR, 0, 1, false); - this._writecb = writecb; - } - } - } - if (!skipPart) { - if (this._fileStream) { - let chunk; - const actualLen = Math.min(end - start, fileSizeLimit - fileSize); - if (!isDataSafe) { - chunk = Buffer.allocUnsafe(actualLen); - data.copy(chunk, 0, start, start + actualLen); - } else { - chunk = data.slice(start, start + actualLen); - } - fileSize += chunk.length; - if (fileSize === fileSizeLimit) { - if (chunk.length > 0) - this._fileStream.push(chunk); - this._fileStream.emit("limit"); - this._fileStream.truncated = true; - skipPart = true; - } else if (!this._fileStream.push(chunk)) { - if (this._writecb) - this._fileStream._readcb = this._writecb; - this._writecb = null; - } - } else if (field !== void 0) { - let chunk; - const actualLen = Math.min(end - start, fieldSizeLimit - fieldSize); - if (!isDataSafe) { - chunk = Buffer.allocUnsafe(actualLen); - data.copy(chunk, 0, start, start + actualLen); - } else { - chunk = data.slice(start, start + actualLen); - } - fieldSize += actualLen; - field.push(chunk); - if (fieldSize === fieldSizeLimit) { - skipPart = true; - partTruncated = true; - } - } - } - break; - } - if (isMatch) { - matchPostBoundary = 1; - if (this._fileStream) { - this._fileStream.push(null); - this._fileStream = null; - } else if (field !== void 0) { - let data2; - switch (field.length) { - case 0: - data2 = ""; - break; - case 1: - data2 = convertToUTF8(field[0], partCharset, 0); - break; - default: - data2 = convertToUTF8(Buffer.concat(field, fieldSize), partCharset, 0); - } - field = void 0; - fieldSize = 0; - this.emit("field", partName, data2, { - nameTruncated: false, - valueTruncated: partTruncated, - encoding: partEncoding, - mimeType: partType - }); - } - if (++parts === partsLimit) - this.emit("partsLimit"); - } - }; - this._bparser = new StreamSearch(`\r ---${boundary}`, ssCb); - this._writecb = null; - this._finalcb = null; - this.write(BUF_CRLF); - } - static detect(conType) { - return conType.type === "multipart" && conType.subtype === "form-data"; - } - _write(chunk, enc, cb) { - this._writecb = cb; - this._bparser.push(chunk, 0); - if (this._writecb) - callAndUnsetCb(this); - } - _destroy(err, cb) { - this._hparser = null; - this._bparser = ignoreData; - if (!err) - err = checkEndState(this); - const fileStream = this._fileStream; - if (fileStream) { - this._fileStream = null; - fileStream.destroy(err); - } - cb(err); - } - _final(cb) { - this._bparser.destroy(); - if (!this._complete) - return cb(new Error("Unexpected end of form")); - if (this._fileEndsLeft) - this._finalcb = finalcb.bind(null, this, cb); - else - finalcb(this, cb); - } - }; - function finalcb(self, cb, err) { - if (err) - return cb(err); - err = checkEndState(self); - cb(err); - } - function checkEndState(self) { - if (self._hparser) - return new Error("Malformed part header"); - const fileStream = self._fileStream; - if (fileStream) { - self._fileStream = null; - fileStream.destroy(new Error("Unexpected end of file")); - } - if (!self._complete) - return new Error("Unexpected end of form"); - } - var TOKEN = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 1, - 1, - 0, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ]; - var FIELD_VCHAR = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, 1, 1, 1, @@ -5174,605 +3079,388 @@ var require_multipart = __commonJS({ 1, 1, 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, 1, 1, 1, 1, 1, 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, 1, 1, 1, 1, 1, 1, - 1 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 ]; - module2.exports = Multipart; + function Decoder() { + this.buffer = void 0; + } + Decoder.prototype.write = function(str) { + str = str.replace(RE_PLUS, " "); + let res = ""; + let i = 0; + let p = 0; + const len = str.length; + for (; i < len; ++i) { + if (this.buffer !== void 0) { + if (!HEX[str.charCodeAt(i)]) { + res += "%" + this.buffer; + this.buffer = void 0; + --i; + } else { + this.buffer += str[i]; + ++p; + if (this.buffer.length === 2) { + res += String.fromCharCode(parseInt(this.buffer, 16)); + this.buffer = void 0; + } + } + } else if (str[i] === "%") { + if (i > p) { + res += str.substring(p, i); + p = i; + } + this.buffer = ""; + ++p; + } + } + if (p < len && this.buffer === void 0) { + res += str.substring(p); + } + return res; + }; + Decoder.prototype.reset = function() { + this.buffer = void 0; + }; + module2.exports = Decoder; } }); -// node_modules/busboy/lib/types/urlencoded.js +// node_modules/@fastify/busboy/lib/types/urlencoded.js var require_urlencoded = __commonJS({ - "node_modules/busboy/lib/types/urlencoded.js"(exports2, module2) { + "node_modules/@fastify/busboy/lib/types/urlencoded.js"(exports2, module2) { "use strict"; - var { Writable } = require("stream"); - var { getDecoder } = require_utils(); - var URLEncoded = class extends Writable { - constructor(cfg) { - const streamOpts = { - autoDestroy: true, - emitClose: true, - highWaterMark: typeof cfg.highWaterMark === "number" ? cfg.highWaterMark : void 0 - }; - super(streamOpts); - let charset = cfg.defCharset || "utf8"; - if (cfg.conType.params && typeof cfg.conType.params.charset === "string") - charset = cfg.conType.params.charset; - this.charset = charset; - const limits = cfg.limits; - this.fieldSizeLimit = limits && typeof limits.fieldSize === "number" ? limits.fieldSize : 1 * 1024 * 1024; - this.fieldsLimit = limits && typeof limits.fields === "number" ? limits.fields : Infinity; - this.fieldNameSizeLimit = limits && typeof limits.fieldNameSize === "number" ? limits.fieldNameSize : 100; - this._inKey = true; - this._keyTrunc = false; - this._valTrunc = false; - this._bytesKey = 0; - this._bytesVal = 0; - this._fields = 0; - this._key = ""; - this._val = ""; - this._byte = -2; - this._lastPos = 0; - this._encode = 0; - this._decoder = getDecoder(charset); - } - static detect(conType) { - return conType.type === "application" && conType.subtype === "x-www-form-urlencoded"; - } - _write(chunk, enc, cb) { - if (this._fields >= this.fieldsLimit) - return cb(); - let i = 0; - const len = chunk.length; - this._lastPos = 0; - if (this._byte !== -2) { - i = readPctEnc(this, chunk, i, len); - if (i === -1) - return cb(new Error("Malformed urlencoded form")); - if (i >= len) - return cb(); - if (this._inKey) - ++this._bytesKey; - else - ++this._bytesVal; - } - main: - while (i < len) { - if (this._inKey) { - i = skipKeyBytes(this, chunk, i, len); - while (i < len) { - switch (chunk[i]) { - case 61: - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._lastPos = ++i; - this._key = this._decoder(this._key, this._encode); - this._encode = 0; - this._inKey = false; - continue main; - case 38: - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._lastPos = ++i; - this._key = this._decoder(this._key, this._encode); - this._encode = 0; - if (this._bytesKey > 0) { - this.emit("field", this._key, "", { - nameTruncated: this._keyTrunc, - valueTruncated: false, - encoding: this.charset, - mimeType: "text/plain" - }); - } - this._key = ""; - this._val = ""; - this._keyTrunc = false; - this._valTrunc = false; - this._bytesKey = 0; - this._bytesVal = 0; - if (++this._fields >= this.fieldsLimit) { - this.emit("fieldsLimit"); - return cb(); - } - continue; - case 43: - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._key += " "; - this._lastPos = i + 1; - break; - case 37: - if (this._encode === 0) - this._encode = 1; - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); - this._lastPos = i + 1; - this._byte = -1; - i = readPctEnc(this, chunk, i + 1, len); - if (i === -1) - return cb(new Error("Malformed urlencoded form")); - if (i >= len) - return cb(); - ++this._bytesKey; - i = skipKeyBytes(this, chunk, i, len); - continue; - } - ++i; - ++this._bytesKey; - i = skipKeyBytes(this, chunk, i, len); - } - if (this._lastPos < i) - this._key += chunk.latin1Slice(this._lastPos, i); + var Decoder = require_Decoder(); + var decodeText = require_decodeText(); + var getLimit = require_getLimit(); + var RE_CHARSET = /^charset$/i; + UrlEncoded.detect = /^application\/x-www-form-urlencoded/i; + function UrlEncoded(boy, cfg) { + const limits = cfg.limits; + const parsedConType = cfg.parsedConType; + this.boy = boy; + this.fieldSizeLimit = getLimit(limits, "fieldSize", 1 * 1024 * 1024); + this.fieldNameSizeLimit = getLimit(limits, "fieldNameSize", 100); + this.fieldsLimit = getLimit(limits, "fields", Infinity); + let charset; + for (var i = 0, len = parsedConType.length; i < len; ++i) { + if (Array.isArray(parsedConType[i]) && RE_CHARSET.test(parsedConType[i][0])) { + charset = parsedConType[i][1].toLowerCase(); + break; + } + } + if (charset === void 0) { + charset = cfg.defCharset || "utf8"; + } + this.decoder = new Decoder(); + this.charset = charset; + this._fields = 0; + this._state = "key"; + this._checkingBytes = true; + this._bytesKey = 0; + this._bytesVal = 0; + this._key = ""; + this._val = ""; + this._keyTrunc = false; + this._valTrunc = false; + this._hitLimit = false; + } + UrlEncoded.prototype.write = function(data, cb) { + if (this._fields === this.fieldsLimit) { + if (!this.boy.hitFieldsLimit) { + this.boy.hitFieldsLimit = true; + this.boy.emit("fieldsLimit"); + } + return cb(); + } + let idxeq; + let idxamp; + let i; + let p = 0; + const len = data.length; + while (p < len) { + if (this._state === "key") { + idxeq = idxamp = void 0; + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { + ++p; + } + if (data[i] === 61) { + idxeq = i; + break; + } else if (data[i] === 38) { + idxamp = i; + break; + } + if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { + this._hitLimit = true; + break; + } else if (this._checkingBytes) { + ++this._bytesKey; + } + } + if (idxeq !== void 0) { + if (idxeq > p) { + this._key += this.decoder.write(data.toString("binary", p, idxeq)); + } + this._state = "val"; + this._hitLimit = false; + this._checkingBytes = true; + this._val = ""; + this._bytesVal = 0; + this._valTrunc = false; + this.decoder.reset(); + p = idxeq + 1; + } else if (idxamp !== void 0) { + ++this._fields; + let key; + const keyTrunc = this._keyTrunc; + if (idxamp > p) { + key = this._key += this.decoder.write(data.toString("binary", p, idxamp)); } else { - i = skipValBytes(this, chunk, i, len); - while (i < len) { - switch (chunk[i]) { - case 38: - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - this._lastPos = ++i; - this._inKey = true; - this._val = this._decoder(this._val, this._encode); - this._encode = 0; - if (this._bytesKey > 0 || this._bytesVal > 0) { - this.emit("field", this._key, this._val, { - nameTruncated: this._keyTrunc, - valueTruncated: this._valTrunc, - encoding: this.charset, - mimeType: "text/plain" - }); - } - this._key = ""; - this._val = ""; - this._keyTrunc = false; - this._valTrunc = false; - this._bytesKey = 0; - this._bytesVal = 0; - if (++this._fields >= this.fieldsLimit) { - this.emit("fieldsLimit"); - return cb(); - } - continue main; - case 43: - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - this._val += " "; - this._lastPos = i + 1; - break; - case 37: - if (this._encode === 0) - this._encode = 1; - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); - this._lastPos = i + 1; - this._byte = -1; - i = readPctEnc(this, chunk, i + 1, len); - if (i === -1) - return cb(new Error("Malformed urlencoded form")); - if (i >= len) - return cb(); - ++this._bytesVal; - i = skipValBytes(this, chunk, i, len); - continue; - } - ++i; - ++this._bytesVal; - i = skipValBytes(this, chunk, i, len); - } - if (this._lastPos < i) - this._val += chunk.latin1Slice(this._lastPos, i); + key = this._key; + } + this._hitLimit = false; + this._checkingBytes = true; + this._key = ""; + this._bytesKey = 0; + this._keyTrunc = false; + this.decoder.reset(); + if (key.length) { + this.boy.emit("field", decodeText(key, "binary", this.charset), "", keyTrunc, false); + } + p = idxamp + 1; + if (this._fields === this.fieldsLimit) { + return cb(); + } + } else if (this._hitLimit) { + if (i > p) { + this._key += this.decoder.write(data.toString("binary", p, i)); } + p = i; + if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { + this._checkingBytes = false; + this._keyTrunc = true; + } + } else { + if (p < len) { + this._key += this.decoder.write(data.toString("binary", p)); + } + p = len; + } + } else { + idxamp = void 0; + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { + ++p; + } + if (data[i] === 38) { + idxamp = i; + break; + } + if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { + this._hitLimit = true; + break; + } else if (this._checkingBytes) { + ++this._bytesVal; + } + } + if (idxamp !== void 0) { + ++this._fields; + if (idxamp > p) { + this._val += this.decoder.write(data.toString("binary", p, idxamp)); + } + this.boy.emit("field", decodeText(this._key, "binary", this.charset), decodeText(this._val, "binary", this.charset), this._keyTrunc, this._valTrunc); + this._state = "key"; + this._hitLimit = false; + this._checkingBytes = true; + this._key = ""; + this._bytesKey = 0; + this._keyTrunc = false; + this.decoder.reset(); + p = idxamp + 1; + if (this._fields === this.fieldsLimit) { + return cb(); + } + } else if (this._hitLimit) { + if (i > p) { + this._val += this.decoder.write(data.toString("binary", p, i)); + } + p = i; + if (this._val === "" && this.fieldSizeLimit === 0 || (this._bytesVal = this._val.length) === this.fieldSizeLimit) { + this._checkingBytes = false; + this._valTrunc = true; + } + } else { + if (p < len) { + this._val += this.decoder.write(data.toString("binary", p)); + } + p = len; } - cb(); - } - _final(cb) { - if (this._byte !== -2) - return cb(new Error("Malformed urlencoded form")); - if (!this._inKey || this._bytesKey > 0 || this._bytesVal > 0) { - if (this._inKey) - this._key = this._decoder(this._key, this._encode); - else - this._val = this._decoder(this._val, this._encode); - this.emit("field", this._key, this._val, { - nameTruncated: this._keyTrunc, - valueTruncated: this._valTrunc, - encoding: this.charset, - mimeType: "text/plain" - }); } - cb(); } + cb(); }; - function readPctEnc(self, chunk, pos, len) { - if (pos >= len) - return len; - if (self._byte === -1) { - const hexUpper = HEX_VALUES[chunk[pos++]]; - if (hexUpper === -1) - return -1; - if (hexUpper >= 8) - self._encode = 2; - if (pos < len) { - const hexLower = HEX_VALUES[chunk[pos++]]; - if (hexLower === -1) - return -1; - if (self._inKey) - self._key += String.fromCharCode((hexUpper << 4) + hexLower); - else - self._val += String.fromCharCode((hexUpper << 4) + hexLower); - self._byte = -2; - self._lastPos = pos; - } else { - self._byte = hexUpper; - } - } else { - const hexLower = HEX_VALUES[chunk[pos++]]; - if (hexLower === -1) - return -1; - if (self._inKey) - self._key += String.fromCharCode((self._byte << 4) + hexLower); - else - self._val += String.fromCharCode((self._byte << 4) + hexLower); - self._byte = -2; - self._lastPos = pos; - } - return pos; - } - function skipKeyBytes(self, chunk, pos, len) { - if (self._bytesKey > self.fieldNameSizeLimit) { - if (!self._keyTrunc) { - if (self._lastPos < pos) - self._key += chunk.latin1Slice(self._lastPos, pos - 1); - } - self._keyTrunc = true; - for (; pos < len; ++pos) { - const code = chunk[pos]; - if (code === 61 || code === 38) - break; - ++self._bytesKey; - } - self._lastPos = pos; + UrlEncoded.prototype.end = function() { + if (this.boy._done) { + return; } - return pos; - } - function skipValBytes(self, chunk, pos, len) { - if (self._bytesVal > self.fieldSizeLimit) { - if (!self._valTrunc) { - if (self._lastPos < pos) - self._val += chunk.latin1Slice(self._lastPos, pos - 1); - } - self._valTrunc = true; - for (; pos < len; ++pos) { - if (chunk[pos] === 38) - break; - ++self._bytesVal; - } - self._lastPos = pos; - } - return pos; - } - var HEX_VALUES = [ - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 10, - 11, - 12, - 13, - 14, - 15, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 10, - 11, - 12, - 13, - 14, - 15, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1 - ]; - module2.exports = URLEncoded; + if (this._state === "key" && this._key.length > 0) { + this.boy.emit("field", decodeText(this._key, "binary", this.charset), "", this._keyTrunc, false); + } else if (this._state === "val") { + this.boy.emit("field", decodeText(this._key, "binary", this.charset), decodeText(this._val, "binary", this.charset), this._keyTrunc, this._valTrunc); + } + this.boy._done = true; + this.boy.emit("finish"); + }; + module2.exports = UrlEncoded; } }); -// node_modules/busboy/lib/index.js -var require_lib = __commonJS({ - "node_modules/busboy/lib/index.js"(exports2, module2) { +// node_modules/@fastify/busboy/lib/main.js +var require_main = __commonJS({ + "node_modules/@fastify/busboy/lib/main.js"(exports2, module2) { "use strict"; - var { parseContentType } = require_utils(); - function getInstance(cfg) { - const headers = cfg.headers; - const conType = parseContentType(headers["content-type"]); - if (!conType) - throw new Error("Malformed content type"); - for (const type of TYPES) { - const matched = type.detect(conType); - if (!matched) - continue; - const instanceCfg = { - limits: cfg.limits, - headers, - conType, - highWaterMark: void 0, - fileHwm: void 0, - defCharset: void 0, - defParamCharset: void 0, - preservePath: false - }; - if (cfg.highWaterMark) - instanceCfg.highWaterMark = cfg.highWaterMark; - if (cfg.fileHwm) - instanceCfg.fileHwm = cfg.fileHwm; - instanceCfg.defCharset = cfg.defCharset; - instanceCfg.defParamCharset = cfg.defParamCharset; - instanceCfg.preservePath = cfg.preservePath; - return new type(instanceCfg); - } - throw new Error(`Unsupported content type: ${headers["content-type"]}`); - } - var TYPES = [ - require_multipart(), - require_urlencoded() - ].filter(function(typemod) { - return typeof typemod.detect === "function"; - }); - module2.exports = (cfg) => { - if (typeof cfg !== "object" || cfg === null) - cfg = {}; - if (typeof cfg.headers !== "object" || cfg.headers === null || typeof cfg.headers["content-type"] !== "string") { - throw new Error("Missing Content-Type"); + var WritableStream = require("node:stream").Writable; + var { inherits } = require("node:util"); + var Dicer = require_Dicer(); + var MultipartParser = require_multipart(); + var UrlencodedParser = require_urlencoded(); + var parseParams = require_parseParams(); + function Busboy(opts) { + if (!(this instanceof Busboy)) { + return new Busboy(opts); + } + if (typeof opts !== "object") { + throw new TypeError("Busboy expected an options-Object."); + } + if (typeof opts.headers !== "object") { + throw new TypeError("Busboy expected an options-Object with headers-attribute."); + } + if (typeof opts.headers["content-type"] !== "string") { + throw new TypeError("Missing Content-Type-header."); + } + const { + headers, + ...streamOptions + } = opts; + this.opts = { + autoDestroy: false, + ...streamOptions + }; + WritableStream.call(this, this.opts); + this._done = false; + this._parser = this.getParserByHeaders(headers); + this._finished = false; + } + inherits(Busboy, WritableStream); + Busboy.prototype.emit = function(ev) { + if (ev === "finish") { + if (!this._done) { + this._parser?.end(); + return; + } else if (this._finished) { + return; + } + this._finished = true; + } + WritableStream.prototype.emit.apply(this, arguments); + }; + Busboy.prototype.getParserByHeaders = function(headers) { + const parsed = parseParams(headers["content-type"]); + const cfg = { + defCharset: this.opts.defCharset, + fileHwm: this.opts.fileHwm, + headers, + highWaterMark: this.opts.highWaterMark, + isPartAFile: this.opts.isPartAFile, + limits: this.opts.limits, + parsedConType: parsed, + preservePath: this.opts.preservePath + }; + if (MultipartParser.detect.test(parsed[0])) { + return new MultipartParser(this, cfg); + } + if (UrlencodedParser.detect.test(parsed[0])) { + return new UrlencodedParser(this, cfg); } - return getInstance(cfg); + throw new Error("Unsupported Content-Type."); }; + Busboy.prototype._write = function(chunk, encoding, cb) { + this._parser.write(chunk, cb); + }; + module2.exports = Busboy; + module2.exports.default = Busboy; + module2.exports.Busboy = Busboy; + module2.exports.Dicer = Dicer; } }); @@ -6352,7 +4040,7 @@ var require_formdata = __commonJS({ var require_body = __commonJS({ "lib/fetch/body.js"(exports2, module2) { "use strict"; - var Busboy = require_lib(); + var Busboy = require_main(); var util = require_util(); var { ReadableStreamFrom, @@ -6583,10 +4271,9 @@ Content-Type: ${value.type || "application/octet-stream"}\r const responseFormData = new FormData(); let busboy; try { - busboy = Busboy({ + busboy = new Busboy({ headers, - preservePath: true, - defParamCharset: "utf8" + preservePath: true }); } catch (err) { throw new DOMException(`${err}`, "AbortError"); @@ -6594,8 +4281,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r busboy.on("field", (name, value) => { responseFormData.append(name, value); }); - busboy.on("file", (name, value, info) => { - const { filename, encoding, mimeType } = info; + busboy.on("file", (name, value, filename, encoding, mimeType) => { const chunks = []; if (encoding === "base64" || encoding.toLowerCase() === "base64") { let base64chunk = ""; @@ -7100,6 +4786,12 @@ var require_dispatcher_weakref = __commonJS({ } }; module2.exports = function() { + if (process.env.NODE_V8_COVERAGE) { + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer + }; + } return { WeakRef: global.WeakRef || CompatWeakRef, FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer @@ -8486,7 +6178,7 @@ var require_connect = __commonJS({ var { InvalidArgumentError, ConnectTimeoutError } = require_errors(); var tls; var SessionCache; - if (global.FinalizationRegistry) { + if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { SessionCache = class WeakSessionCache { constructor(maxCachedSessions) { this._maxCachedSessions = maxCachedSessions; @@ -8629,7 +6321,7 @@ var require_connect = __commonJS({ }); // lib/llhttp/utils.js -var require_utils2 = __commonJS({ +var require_utils = __commonJS({ "lib/llhttp/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -8654,7 +6346,7 @@ var require_constants2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SPECIAL_HEADERS = exports2.HEADER_STATE = exports2.MINOR = exports2.MAJOR = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.STRICT_TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.STRICT_URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.FINISH = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = void 0; - var utils_1 = require_utils2(); + var utils_1 = require_utils(); var ERROR; (function(ERROR2) { ERROR2[ERROR2["OK"] = 0] = "OK"; diff --git a/deps/uvwasi/include/uvwasi.h b/deps/uvwasi/include/uvwasi.h index d475d3e67512bf..a458cfe17daaa3 100644 --- a/deps/uvwasi/include/uvwasi.h +++ b/deps/uvwasi/include/uvwasi.h @@ -5,12 +5,13 @@ extern "C" { #endif +#include "uv.h" #include "wasi_serdes.h" #include "wasi_types.h" #define UVWASI_VERSION_MAJOR 0 #define UVWASI_VERSION_MINOR 0 -#define UVWASI_VERSION_PATCH 18 +#define UVWASI_VERSION_PATCH 19 #define UVWASI_VERSION_HEX ((UVWASI_VERSION_MAJOR << 16) | \ (UVWASI_VERSION_MINOR << 8) | \ (UVWASI_VERSION_PATCH)) @@ -47,6 +48,7 @@ typedef struct uvwasi_s { char* env_buf; uvwasi_size_t env_buf_size; const uvwasi_mem_t* allocator; + uv_loop_t* loop; } uvwasi_t; typedef struct uvwasi_preopen_s { @@ -54,10 +56,17 @@ typedef struct uvwasi_preopen_s { const char* real_path; } uvwasi_preopen_t; +typedef struct uvwasi_preopen_socket_s { + const char* address; + int port; +} uvwasi_preopen_socket_t; + typedef struct uvwasi_options_s { uvwasi_size_t fd_table_size; uvwasi_size_t preopenc; uvwasi_preopen_t* preopens; + uvwasi_size_t preopen_socketc; + uvwasi_preopen_socket_t* preopen_sockets; uvwasi_size_t argc; const char** argv; const char** envp; diff --git a/deps/uvwasi/src/fd_table.c b/deps/uvwasi/src/fd_table.c index 7782f1ee43b420..881d192ff3a340 100644 --- a/deps/uvwasi/src/fd_table.c +++ b/deps/uvwasi/src/fd_table.c @@ -37,6 +37,7 @@ static uvwasi_errno_t uvwasi__insert_stdio(uvwasi_t* uvwasi, err = uvwasi_fd_table_insert(uvwasi, table, fd, + NULL, name, name, type, @@ -58,6 +59,7 @@ static uvwasi_errno_t uvwasi__insert_stdio(uvwasi_t* uvwasi, uvwasi_errno_t uvwasi_fd_table_insert(uvwasi_t* uvwasi, struct uvwasi_fd_table_t* table, uv_file fd, + uv_tcp_t* sock, const char* mapped_path, const char* real_path, uvwasi_filetype_t type, @@ -78,29 +80,40 @@ uvwasi_errno_t uvwasi_fd_table_insert(uvwasi_t* uvwasi, char* rp_copy; char* np_copy; - mp_len = strlen(mapped_path); - rp_len = strlen(real_path); + if (type != UVWASI_FILETYPE_SOCKET_STREAM) { + mp_len = strlen(mapped_path); + rp_len = strlen(real_path); + } else { + mp_len = 0; + rp_len = 0; + rp_copy = NULL; + mp_copy = NULL; + np_copy = NULL; + } + /* Reserve room for the mapped path, real path, and normalized mapped path. */ entry = (struct uvwasi_fd_wrap_t*) uvwasi__malloc(uvwasi, sizeof(*entry) + mp_len + mp_len + rp_len + 3); if (entry == NULL) return UVWASI_ENOMEM; - mp_copy = (char*)(entry + 1); - rp_copy = mp_copy + mp_len + 1; - np_copy = rp_copy + rp_len + 1; - memcpy(mp_copy, mapped_path, mp_len); - mp_copy[mp_len] = '\0'; - memcpy(rp_copy, real_path, rp_len); - rp_copy[rp_len] = '\0'; - - /* Calculate the normalized version of the mapped path, as it will be used for - any path calculations on this fd. Use the length of the mapped path as an - upper bound for the normalized path length. */ - err = uvwasi__normalize_path(mp_copy, mp_len, np_copy, mp_len); - if (err) { - uvwasi__free(uvwasi, entry); - goto exit; + if (type != UVWASI_FILETYPE_SOCKET_STREAM) { + mp_copy = (char*)(entry + 1); + rp_copy = mp_copy + mp_len + 1; + np_copy = rp_copy + rp_len + 1; + memcpy(mp_copy, mapped_path, mp_len); + mp_copy[mp_len] = '\0'; + memcpy(rp_copy, real_path, rp_len); + rp_copy[rp_len] = '\0'; + + /* Calculate the normalized version of the mapped path, as it will be used for + any path calculations on this fd. Use the length of the mapped path as an + upper bound for the normalized path length. */ + err = uvwasi__normalize_path(mp_copy, mp_len, np_copy, mp_len); + if (err) { + uvwasi__free(uvwasi, entry); + goto exit; + } } uv_rwlock_wrlock(&table->rwlock); @@ -150,6 +163,7 @@ uvwasi_errno_t uvwasi_fd_table_insert(uvwasi_t* uvwasi, entry->id = index; entry->fd = fd; + entry->sock = sock; entry->path = mp_copy; entry->real_path = rp_copy; entry->normalized_path = np_copy; @@ -280,6 +294,7 @@ uvwasi_errno_t uvwasi_fd_table_insert_preopen(uvwasi_t* uvwasi, return uvwasi_fd_table_insert(uvwasi, table, fd, + NULL, path, real_path, UVWASI_FILETYPE_DIRECTORY, @@ -290,6 +305,26 @@ uvwasi_errno_t uvwasi_fd_table_insert_preopen(uvwasi_t* uvwasi, } +uvwasi_errno_t uvwasi_fd_table_insert_preopen_socket(uvwasi_t* uvwasi, + struct uvwasi_fd_table_t* table, + uv_tcp_t* sock) { + if (table == NULL || sock == NULL) + return UVWASI_EINVAL; + + return uvwasi_fd_table_insert(uvwasi, + table, + -1, + sock, + NULL, + NULL, + UVWASI_FILETYPE_SOCKET_STREAM, + UVWASI__RIGHTS_SOCKET_BASE, + UVWASI__RIGHTS_SOCKET_INHERITING, + 1, + NULL); +} + + uvwasi_errno_t uvwasi_fd_table_get(struct uvwasi_fd_table_t* table, const uvwasi_fd_t id, struct uvwasi_fd_wrap_t** wrap, diff --git a/deps/uvwasi/src/fd_table.h b/deps/uvwasi/src/fd_table.h index 0755c2d17fdec2..9a7a825bc85d4c 100644 --- a/deps/uvwasi/src/fd_table.h +++ b/deps/uvwasi/src/fd_table.h @@ -11,6 +11,7 @@ struct uvwasi_options_s; struct uvwasi_fd_wrap_t { uvwasi_fd_t id; uv_file fd; + uv_tcp_t* sock; char* path; char* real_path; char* normalized_path; @@ -35,6 +36,7 @@ void uvwasi_fd_table_free(struct uvwasi_s* uvwasi, uvwasi_errno_t uvwasi_fd_table_insert(struct uvwasi_s* uvwasi, struct uvwasi_fd_table_t* table, uv_file fd, + uv_tcp_t* sock, const char* mapped_path, const char* real_path, uvwasi_filetype_t type, @@ -47,6 +49,9 @@ uvwasi_errno_t uvwasi_fd_table_insert_preopen(struct uvwasi_s* uvwasi, const uv_file fd, const char* path, const char* real_path); +uvwasi_errno_t uvwasi_fd_table_insert_preopen_socket(struct uvwasi_s* uvwasi, + struct uvwasi_fd_table_t* table, + uv_tcp_t* sock); uvwasi_errno_t uvwasi_fd_table_get(struct uvwasi_fd_table_t* table, const uvwasi_fd_t id, struct uvwasi_fd_wrap_t** wrap, diff --git a/deps/uvwasi/src/sync_helpers.c b/deps/uvwasi/src/sync_helpers.c new file mode 100644 index 00000000000000..c63a62b83d75ed --- /dev/null +++ b/deps/uvwasi/src/sync_helpers.c @@ -0,0 +1,95 @@ +#include "uv.h" +#include "sync_helpers.h" +#include "uv_mapping.h" +#include "uvwasi_alloc.h" + +typedef struct free_handle_data_s { + uvwasi_t* uvwasi; + int done; +} free_handle_data_t; + +static void free_handle_cb(uv_handle_t* handle) { + free_handle_data_t* free_handle_data = uv_handle_get_data((uv_handle_t*) handle); + uvwasi__free(free_handle_data->uvwasi, handle); + free_handle_data->done = 1; +} + +int free_handle_sync(struct uvwasi_s* uvwasi, uv_handle_t* handle) { + free_handle_data_t free_handle_data = { uvwasi, 0 }; + uv_handle_set_data(handle, (void*) &free_handle_data); + uv_close(handle, free_handle_cb); + uv_loop_t* handle_loop = uv_handle_get_loop(handle); + while(!free_handle_data.done) { + if (uv_run(handle_loop, UV_RUN_ONCE) == 0) { + break; + } + } + return UVWASI_ESUCCESS; +} + +static void do_stream_shutdown(uv_shutdown_t* req, int status) { + shutdown_data_t* shutdown_data; + shutdown_data = uv_handle_get_data((uv_handle_t*) req->handle); + shutdown_data->status = status; + shutdown_data->done = 1; + } + +int shutdown_stream_sync(struct uvwasi_s* uvwasi, + uv_stream_t* stream, + shutdown_data_t* shutdown_data) { + uv_shutdown_t req; + uv_loop_t* stream_loop; + + shutdown_data->done = 0; + shutdown_data->status = 0; + stream_loop = uv_handle_get_loop((uv_handle_t*) stream); + + uv_handle_set_data((uv_handle_t*) stream, (void*) shutdown_data); + uv_shutdown(&req, stream, do_stream_shutdown); + while (!shutdown_data->done) { + if (uv_run(stream_loop, UV_RUN_ONCE) == 0) { + return UVWASI_ECANCELED; + } + } + return UVWASI_ESUCCESS; +} + +static void recv_alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { + recv_data_t* recv_data; + recv_data = uv_handle_get_data(handle); + buf->base = recv_data->base; + buf->len = recv_data->len; +} + +void do_stream_recv(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { + recv_data_t* recv_data; + recv_data = uv_handle_get_data((uv_handle_t*) stream); + uv_read_stop(stream); + recv_data->nread = nread; + recv_data->done = 1; +} + +int read_stream_sync(struct uvwasi_s* uvwasi, + uv_stream_t* stream, + recv_data_t* recv_data) { + uv_loop_t* recv_loop; + int r; + + recv_data->nread = 0; + recv_data->done = 0; + recv_loop = uv_handle_get_loop((uv_handle_t*) stream); + + uv_handle_set_data((uv_handle_t*) stream, (void*) recv_data); + r = uv_read_start(stream, recv_alloc_cb, do_stream_recv); + if (r != 0) { + return uvwasi__translate_uv_error(r); + } + + while (!recv_data->done) { + if (uv_run(recv_loop, UV_RUN_ONCE) == 0) { + return UVWASI_ECANCELED; + } + } + + return UVWASI_ESUCCESS; +} diff --git a/deps/uvwasi/src/sync_helpers.h b/deps/uvwasi/src/sync_helpers.h new file mode 100644 index 00000000000000..6ffe2cac133d6c --- /dev/null +++ b/deps/uvwasi/src/sync_helpers.h @@ -0,0 +1,27 @@ +#ifndef __UVWASI_SYNC_HELPERS_H__ +#define __UVWASI_SYNC_HELPERS_H__ + +struct uvwasi_s; + +typedef struct shutdown_data_s { + int status; + int done; +} shutdown_data_t; + +typedef struct recv_data_s { + char* base; + size_t len; + ssize_t nread; + int done; +} recv_data_t; + +int free_handle_sync(struct uvwasi_s* uvwasi, uv_handle_t* handle); + +int shutdown_stream_sync(struct uvwasi_s* uvwasi, + uv_stream_t* stream, + shutdown_data_t* shutdown_data); + +int read_stream_sync(struct uvwasi_s* uvwasi, + uv_stream_t* stream, + recv_data_t* recv_data); +#endif /* __UVWASI_SYNC_HELPERS_H__ */ diff --git a/deps/uvwasi/src/uvwasi.c b/deps/uvwasi/src/uvwasi.c index 9e7fc7681664b8..e904b9f9293864 100644 --- a/deps/uvwasi/src/uvwasi.c +++ b/deps/uvwasi/src/uvwasi.c @@ -25,6 +25,7 @@ #include "clocks.h" #include "path_resolver.h" #include "poll_oneoff.h" +#include "sync_helpers.h" #include "wasi_rights.h" #include "wasi_serdes.h" #include "debug.h" @@ -231,6 +232,13 @@ static uvwasi_errno_t uvwasi__setup_ciovs(const uvwasi_t* uvwasi, return UVWASI_ESUCCESS; } +typedef struct new_connection_data_s { + int done; +} new_connection_data_t; + +void on_new_connection(uv_stream_t *server, int status) { + // just do nothing +} uvwasi_errno_t uvwasi_init(uvwasi_t* uvwasi, const uvwasi_options_t* options) { uv_fs_t realpath_req; @@ -243,11 +251,16 @@ uvwasi_errno_t uvwasi_init(uvwasi_t* uvwasi, const uvwasi_options_t* options) { uvwasi_size_t env_buf_size; uvwasi_size_t i; int r; + struct sockaddr_in addr; if (uvwasi == NULL || options == NULL || options->fd_table_size == 0) return UVWASI_EINVAL; + // loop is only needed if there were pre-open sockets + uvwasi->loop = NULL; + uvwasi->allocator = options->allocator; + if (uvwasi->allocator == NULL) uvwasi->allocator = &default_allocator; @@ -328,6 +341,14 @@ uvwasi_errno_t uvwasi_init(uvwasi_t* uvwasi, const uvwasi_options_t* options) { } } + for (i = 0; i < options->preopen_socketc; ++i) { + if (options->preopen_sockets[i].address == NULL || + options->preopen_sockets[i].port > 65535) { + err = UVWASI_EINVAL; + goto exit; + } + } + err = uvwasi_fd_table_init(uvwasi, options); if (err != UVWASI_ESUCCESS) goto exit; @@ -363,6 +384,36 @@ uvwasi_errno_t uvwasi_init(uvwasi_t* uvwasi, const uvwasi_options_t* options) { goto exit; } + if (options->preopen_socketc > 0) { + uvwasi->loop = uvwasi__malloc(uvwasi, sizeof(uv_loop_t)); + r = uv_loop_init(uvwasi->loop); + if (r != 0) { + err = uvwasi__translate_uv_error(r); + goto exit; + } + } + + for (i = 0; i < options->preopen_socketc; ++i) { + uv_tcp_t* socket = (uv_tcp_t*) malloc(sizeof(uv_tcp_t)); + uv_tcp_init(uvwasi->loop, socket); + + uv_ip4_addr(options->preopen_sockets[i].address, options->preopen_sockets[i].port, &addr); + + uv_tcp_bind(socket, (const struct sockaddr*)&addr, 0); + r = uv_listen((uv_stream_t*) socket, 128, on_new_connection); + if (r != 0) { + err = uvwasi__translate_uv_error(r); + goto exit; + } + + err = uvwasi_fd_table_insert_preopen_socket(uvwasi, + uvwasi->fds, + socket); + + if (err != UVWASI_ESUCCESS) + goto exit; + } + return UVWASI_ESUCCESS; exit: @@ -380,6 +431,12 @@ void uvwasi_destroy(uvwasi_t* uvwasi) { uvwasi__free(uvwasi, uvwasi->argv); uvwasi__free(uvwasi, uvwasi->env_buf); uvwasi__free(uvwasi, uvwasi->env); + if (uvwasi->loop != NULL) { + uv_stop(uvwasi->loop); + uv_loop_close(uvwasi->loop); + uvwasi__free(uvwasi, uvwasi->loop); + uvwasi->loop = NULL; + } uvwasi->fds = NULL; uvwasi->argv_buf = NULL; uvwasi->argv = NULL; @@ -401,6 +458,8 @@ void uvwasi_options_init(uvwasi_options_t* options) { options->envp = NULL; options->preopenc = 0; options->preopens = NULL; + options->preopen_socketc = 0; + options->preopen_sockets = NULL; options->allocator = NULL; } @@ -694,10 +753,9 @@ uvwasi_errno_t uvwasi_fd_allocate(uvwasi_t* uvwasi, return err; } - uvwasi_errno_t uvwasi_fd_close(uvwasi_t* uvwasi, uvwasi_fd_t fd) { struct uvwasi_fd_wrap_t* wrap; - uvwasi_errno_t err; + uvwasi_errno_t err = 0; uv_fs_t req; int r; @@ -712,9 +770,18 @@ uvwasi_errno_t uvwasi_fd_close(uvwasi_t* uvwasi, uvwasi_fd_t fd) { if (err != UVWASI_ESUCCESS) goto exit; - r = uv_fs_close(NULL, &req, wrap->fd, NULL); - uv_mutex_unlock(&wrap->mutex); - uv_fs_req_cleanup(&req); + if (wrap->sock == NULL) { + r = uv_fs_close(NULL, &req, wrap->fd, NULL); + uv_mutex_unlock(&wrap->mutex); + uv_fs_req_cleanup(&req); + } else { + r = 0; + err = free_handle_sync(uvwasi, (uv_handle_t*) wrap->sock); + uv_mutex_unlock(&wrap->mutex); + if (err != UVWASI_ESUCCESS) { + goto exit; + } + } if (r != 0) { err = uvwasi__translate_uv_error(r); @@ -1997,6 +2064,7 @@ uvwasi_errno_t uvwasi_path_open(uvwasi_t* uvwasi, err = uvwasi_fd_table_insert(uvwasi, uvwasi->fds, r, + NULL, resolved_path, resolved_path, filetype, @@ -2520,7 +2588,6 @@ uvwasi_errno_t uvwasi_sched_yield(uvwasi_t* uvwasi) { return UVWASI_ESUCCESS; } - uvwasi_errno_t uvwasi_sock_recv(uvwasi_t* uvwasi, uvwasi_fd_t sock, const uvwasi_iovec_t* ri_data, @@ -2528,10 +2595,50 @@ uvwasi_errno_t uvwasi_sock_recv(uvwasi_t* uvwasi, uvwasi_riflags_t ri_flags, uvwasi_size_t* ro_datalen, uvwasi_roflags_t* ro_flags) { - /* TODO(cjihrig): Waiting to implement, pending - https://github.com/WebAssembly/WASI/issues/4 */ - UVWASI_DEBUG("uvwasi_sock_recv(uvwasi=%p, unimplemented)\n", uvwasi); - return UVWASI_ENOTSUP; + struct uvwasi_fd_wrap_t* wrap; + uvwasi_errno_t err = 0; + recv_data_t recv_data; + + UVWASI_DEBUG("uvwasi_sock_recv(uvwasi=%p, sock=%d, ri_data=%p, " + "ri_data_len=%d, ri_flags=%d, ro_datalen=%p, ro_flags=%p)\n", + uvwasi, + sock, + ri_data, + ri_data_len, + ri_flags, + ro_datalen, + ro_flags); + + if (uvwasi == NULL || ri_data == NULL || ro_datalen == NULL || ro_flags == NULL) + return UVWASI_EINVAL; + + if (ri_flags != 0) + return UVWASI_ENOTSUP; + + err = uvwasi_fd_table_get(uvwasi->fds, + sock, + &wrap, + UVWASI__RIGHTS_SOCKET_BASE, + 0); + if (err != UVWASI_ESUCCESS) + return err; + + recv_data.base = ri_data->buf; + recv_data.len = ri_data->buf_len; + err = read_stream_sync(uvwasi, (uv_stream_t*) wrap->sock, &recv_data); + uv_mutex_unlock(&wrap->mutex); + if (err != 0) { + return err; + } + + if (recv_data.nread == 0) { + return UVWASI_EAGAIN; + } else if (recv_data.nread < 0) { + return uvwasi__translate_uv_error(recv_data.nread); + } + + *ro_datalen = recv_data.nread; + return UVWASI_ESUCCESS; } @@ -2541,30 +2648,195 @@ uvwasi_errno_t uvwasi_sock_send(uvwasi_t* uvwasi, uvwasi_size_t si_data_len, uvwasi_siflags_t si_flags, uvwasi_size_t* so_datalen) { - /* TODO(cjihrig): Waiting to implement, pending - https://github.com/WebAssembly/WASI/issues/4 */ - UVWASI_DEBUG("uvwasi_sock_send(uvwasi=%p, unimplemented)\n", uvwasi); - return UVWASI_ENOTSUP; -} + struct uvwasi_fd_wrap_t* wrap; + uvwasi_errno_t err = 0; + uv_buf_t* bufs; + int r = 0; + + UVWASI_DEBUG("uvwasi_sock_send(uvwasi=%p, sock=%d, si_data=%p, " + "si_data_len=%d, si_flags=%d, so_datalen=%p)\n", + uvwasi, + sock, + si_data, + si_data_len, + si_flags, + so_datalen); + + if (uvwasi == NULL || si_data == NULL || so_datalen == NULL || + si_flags != 0) + return UVWASI_EINVAL; + + err = uvwasi_fd_table_get(uvwasi->fds, + sock, + &wrap, + UVWASI__RIGHTS_SOCKET_BASE, + 0); + if (err != UVWASI_ESUCCESS) + return err; + + err = uvwasi__setup_ciovs(uvwasi, &bufs, si_data, si_data_len); + if (err != UVWASI_ESUCCESS) { + uv_mutex_unlock(&wrap->mutex); + return err; + } + + r = uv_try_write((uv_stream_t*) wrap->sock, bufs, si_data_len); + uvwasi__free(uvwasi, bufs); + uv_mutex_unlock(&wrap->mutex); + if (r < 0) + return uvwasi__translate_uv_error(r); + + *so_datalen = (uvwasi_size_t) r; + return UVWASI_ESUCCESS; +} uvwasi_errno_t uvwasi_sock_shutdown(uvwasi_t* uvwasi, uvwasi_fd_t sock, uvwasi_sdflags_t how) { - /* TODO(cjihrig): Waiting to implement, pending - https://github.com/WebAssembly/WASI/issues/4 */ - UVWASI_DEBUG("uvwasi_sock_shutdown(uvwasi=%p, unimplemented)\n", uvwasi); - return UVWASI_ENOTSUP; + struct uvwasi_fd_wrap_t* wrap; + uvwasi_errno_t err = 0; + shutdown_data_t shutdown_data; + + if (how & ~UVWASI_SHUT_WR) + return UVWASI_ENOTSUP; + + UVWASI_DEBUG("uvwasi_sock_shutdown(uvwasi=%p, sock=%d, how=%d)\n", + uvwasi, + sock, + how); + + if (uvwasi == NULL) + return UVWASI_EINVAL; + + err = uvwasi_fd_table_get(uvwasi->fds, + sock, + &wrap, + UVWASI__RIGHTS_SOCKET_BASE, + 0); + if (err != UVWASI_ESUCCESS) + return err; + + if (how & UVWASI_SHUT_WR) { + err = shutdown_stream_sync(uvwasi, (uv_stream_t*) wrap->sock, &shutdown_data); + if (err != UVWASI_ESUCCESS) { + uv_mutex_unlock(&wrap->mutex); + return err; + } + } + + uv_mutex_unlock(&wrap->mutex); + + if (shutdown_data.status != 0) + return uvwasi__translate_uv_error(shutdown_data.status); + + return UVWASI_ESUCCESS; } uvwasi_errno_t uvwasi_sock_accept(uvwasi_t* uvwasi, uvwasi_fd_t sock, uvwasi_fdflags_t flags, - uvwasi_fd_t* fd) { - /* TODO(mhdawson): Needs implementation */ - UVWASI_DEBUG("uvwasi_sock_accept(uvwasi=%p, unimplemented)\n", uvwasi); - return UVWASI_ENOTSUP; -}; + uvwasi_fd_t* connect_sock) { + struct uvwasi_fd_wrap_t* wrap; + struct uvwasi_fd_wrap_t* connected_wrap; + uvwasi_errno_t err = 0; + uv_loop_t* sock_loop = NULL; + int r = 0; + + UVWASI_DEBUG("uvwasi_sock_accept(uvwasi=%p, sock=%d, flags=%d, " + "connect_sock=%p)\n", + uvwasi, + sock, + flags, + connect_sock); + + if (uvwasi == NULL || connect_sock == NULL) + return UVWASI_EINVAL; + + if (flags & ~UVWASI_FDFLAG_NONBLOCK) + return UVWASI_ENOTSUP; + + err = uvwasi_fd_table_get(uvwasi->fds, + sock, + &wrap, + UVWASI__RIGHTS_SOCKET_BASE, + 0); + if (err != UVWASI_ESUCCESS) + return err; + + sock_loop = uv_handle_get_loop((uv_handle_t*) wrap->sock); + uv_tcp_t* uv_connect_sock = (uv_tcp_t*) uvwasi__malloc(uvwasi, sizeof(uv_tcp_t)); + uv_tcp_init(sock_loop, uv_connect_sock); + + r = uv_accept((uv_stream_t*) wrap->sock, (uv_stream_t*) uv_connect_sock); + if (r != 0) { + if (r == UV_EAGAIN) { + // if not blocking then just return as we have to wait for a connection + if (flags & UVWASI_FDFLAG_NONBLOCK) { + err = free_handle_sync(uvwasi, (uv_handle_t*) uv_connect_sock); + uv_mutex_unlock(&wrap->mutex); + if (err != UVWASI_ESUCCESS) { + return err; + } + return UVWASI_EAGAIN; + } + } else { + err = uvwasi__translate_uv_error(r); + goto close_sock_and_error_exit; + } + + // request was blocking and we have no connection yet. run + // the loop until a connection comes in + while (1) { + err = 0; + if (uv_run(sock_loop, UV_RUN_ONCE) == 0) { + err = UVWASI_ECONNABORTED; + goto close_sock_and_error_exit; + } + + int r = uv_accept((uv_stream_t*) wrap->sock, (uv_stream_t*) uv_connect_sock); + if (r == UV_EAGAIN) { + // still no connection or error so run the loop again + continue; + } + + if (r != 0) { + // An error occurred accepting the connection. Break out of the loop and + // report an error. + err = uvwasi__translate_uv_error(r); + goto close_sock_and_error_exit; + } + + // if we get here a new connection was successfully accepted + break; + } + } + + err = uvwasi_fd_table_insert(uvwasi, + uvwasi->fds, + -1, + uv_connect_sock, + NULL, + NULL, + UVWASI_FILETYPE_SOCKET_STREAM, + UVWASI__RIGHTS_SOCKET_BASE, + UVWASI__RIGHTS_SOCKET_INHERITING, + 1, + &connected_wrap); + + if (err != UVWASI_ESUCCESS) + goto close_sock_and_error_exit; + + *connect_sock = connected_wrap->id; + uv_mutex_unlock(&wrap->mutex); + uv_mutex_unlock(&connected_wrap->mutex); + return UVWASI_ESUCCESS; + +close_sock_and_error_exit: + uvwasi__free(uvwasi, uv_connect_sock); + uv_mutex_unlock(&wrap->mutex); + return err; +} const char* uvwasi_embedder_err_code_to_string(uvwasi_errno_t code) { diff --git a/deps/uvwasi/src/wasi_rights.h b/deps/uvwasi/src/wasi_rights.h index 09009b39889cc0..54ac7d7072b7fe 100644 --- a/deps/uvwasi/src/wasi_rights.h +++ b/deps/uvwasi/src/wasi_rights.h @@ -84,8 +84,9 @@ UVWASI_RIGHT_FD_WRITE | \ UVWASI_RIGHT_FD_FILESTAT_GET | \ UVWASI_RIGHT_POLL_FD_READWRITE | \ - UVWASI_RIGHT_SOCK_SHUTDOWN) -#define UVWASI__RIGHTS_SOCKET_INHERITING UVWASI__RIGHTS_ALL; + UVWASI_RIGHT_SOCK_SHUTDOWN | \ + UVWASI_RIGHT_SOCK_ACCEPT) +#define UVWASI__RIGHTS_SOCKET_INHERITING UVWASI__RIGHTS_ALL #define UVWASI__RIGHTS_TTY_BASE (UVWASI_RIGHT_FD_READ | \ UVWASI_RIGHT_FD_FDSTAT_SET_FLAGS | \ diff --git a/deps/uvwasi/uvwasi.gyp b/deps/uvwasi/uvwasi.gyp index 229dc9f41f8de8..4dfe3c46d51818 100644 --- a/deps/uvwasi/uvwasi.gyp +++ b/deps/uvwasi/uvwasi.gyp @@ -5,6 +5,7 @@ 'src/fd_table.c', 'src/path_resolver.c', 'src/poll_oneoff.c', + 'src/sync_helpers.c', 'src/uv_mapping.c', 'src/uvwasi.c', 'src/wasi_rights.c', diff --git a/deps/v8/.clang-format b/deps/v8/.clang-format index 55479a2f760845..bd7d80dfb7b964 100644 --- a/deps/v8/.clang-format +++ b/deps/v8/.clang-format @@ -3,3 +3,4 @@ BasedOnStyle: Google DerivePointerAlignment: false MaxEmptyLinesToKeep: 1 +IfMacros: ['IF', 'IF_NOT', 'ELSE', 'ELSE_IF'] diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index ed10b522706058..820bac62f897a5 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -63,6 +63,8 @@ /test/wasm-spec-tests/tests.tar.gz /third_party/* !/third_party/antlr4 +!/third_party/cpu_features +/third_party/cpu_features/src !/third_party/inspector_protocol !/third_party/jsoncpp /third_party/jsoncpp/source @@ -94,6 +96,7 @@ /tools/turbolizer/build /tools/turbolizer/.rpt2_cache /tools/turbolizer/deploy +/tools/v8heapconst.py /tools/visual_studio/Debug /tools/visual_studio/Release /v8.log.ll diff --git a/deps/v8/.gn b/deps/v8/.gn index 8edbdf34c51807..1ca4a2e4684b45 100644 --- a/deps/v8/.gn +++ b/deps/v8/.gn @@ -19,8 +19,8 @@ no_check_targets = [ "//:cppgc_base", "//:v8_internal_headers", "//src/inspector:inspector", - "//test/cctest:cctest_sources", # 15 errors - "//test/unittests:inspector_unittests_sources", # 2 errors + "//test/cctest:cctest_sources", # 15 errors + "//test/unittests:inspector_unittests_sources", # 2 errors "//third_party/icu:*", ] @@ -28,6 +28,9 @@ default_args = { # Overwrite default args declared in the Fuchsia sdk # Please maintain this in sync with Chromium version in src/.gn fuchsia_target_api_level = 9 + + # Disable rust dependencies. + enable_rust = false } # These are the list of GN files that run exec_script. This whitelist exists diff --git a/deps/v8/.vpython3 b/deps/v8/.vpython3 index 1187542f5e19a1..c4adffad12ea28 100644 --- a/deps/v8/.vpython3 +++ b/deps/v8/.vpython3 @@ -75,7 +75,24 @@ wheel: < version: "version:3.19.3" > +# requests and its dependencies. wheel: < - name: "infra/python/wheels/requests-py2_py3" - version: "version:2.13.0" + name: "infra/python/wheels/requests-py3" + version: "version:2.31.0" +> +wheel: < + name: "infra/python/wheels/urllib3-py2_py3" + version: "version:1.26.6" +> +wheel: < + name: "infra/python/wheels/idna-py2_py3" + version: "version:2.8" +> +wheel: < + name: "infra/python/wheels/certifi-py2_py3" + version: "version:2020.11.8" +> +wheel: < + name: "infra/python/wheels/charset_normalizer-py3" + version: "version:2.0.4" > diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index d84c722b8dcb7b..b9b702c5d22400 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -69,6 +69,8 @@ Anton Bershanskiy <8knots@protonmail.com> Anton Bikineev Ao Wang Archil Sharashenidze +Arthur Islamov +Aurèle Barrière Bala Avulapati Bangfu Tao Ben Coe @@ -110,6 +112,7 @@ Dominic Farolini Douglas Crosher Dusan Milosavljevic Eden Wang +Elisha Hollander Eric Rannaud Erich Ocean Evan Lucas @@ -133,6 +136,7 @@ Harshil Jain Henrique Ferreiro Hirofumi Mako Hisham Muhammad +Ho Cheung Honggyu Kim Huáng Jùnliàng HyeockJin Kim @@ -149,6 +153,7 @@ Jan de Mooij Janusz Majnert Javad Amiri Jay Freeman +Jérôme Vouillon Jesper van den Ende Ji Qiu Jiawen Geng @@ -167,6 +172,7 @@ Kang-Hao (Kenny) Lu Karl Skomski Keith Smiley Kevin Gibbons +Keyhan Vakil Kris Selden Kyounga Ra Loo Rong Jie @@ -178,6 +184,7 @@ Maciej Małecki Marcel Laverdet Marcin Cieślak Marcin Wiącek +Marisa Kirisame Martin Bidlingmaier Mateusz Czeladka Matheus Marchini @@ -187,6 +194,7 @@ Matt Hanselman Matthew Sporleder Maxim Mazurok Maxim Mossienko +Meir Shpilraien Michael Lutz Michael Mclaughlin Michael Smith @@ -239,16 +247,19 @@ Sakthipriyan Vairamani (thefourtheye) Sander Mathijs van Veen Sandro Santilli Sanjoy Das +Sam James Seo Sanghyeon Shawn Anastasio Shawn Presser Stefan Penner +Stefan Stojanovic Stephan Hartmann Stephen Belanger Sylvestre Ledru Takeshi Yoneda Taketoshi Aono Tao Liqiang +Tao Wang Teddy Katz Thomas Young Tiancheng "Timothy" Gu @@ -265,6 +276,7 @@ Vlad Burlik Vladimir Krivosheev Vladimir Shutoff Wael Almattar +Wang Chen WANG Xuerui Wei Wu Wenlu Wang diff --git a/deps/v8/BUILD.bazel b/deps/v8/BUILD.bazel index 81a9286d2670de..3308433ce78dfe 100644 --- a/deps/v8/BUILD.bazel +++ b/deps/v8/BUILD.bazel @@ -16,8 +16,7 @@ load( "v8_library", "v8_mksnapshot", "v8_string", - "v8_torque_definitions", - "v8_torque_initializers", + "v8_torque_files", ) load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression") @@ -30,7 +29,6 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression # v8_embed_script # v8_embedder_string # v8_promise_internal_field_count -# v8_enable_vtunejit # v8_enable_vtunetracemark # v8_enable_fast_torque # v8_win64_unwinding_info @@ -40,8 +38,10 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression # v8_enable_trace_baseline_exec # v8_enable_trace_feedback_updates # v8_enable_atomic_object_field_writes -# v8_enable_conservative_stack_scanning # v8_enable_concurrent_marking +# v8_enable_conservative_stack_scanning +# v8_enable_direct_handle +# v8_enable_direct_local # v8_enable_ignition_dispatch_counting # v8_enable_builtins_optimization # v8_enable_builtins_profiling @@ -56,7 +56,6 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression # v8_use_mips_abi_hardfloat # v8_enable_gdbjit # v8_check_header_includes -# v8_enable_shared_ro_heap # v8_enable_lazy_source_positions # v8_enable_third_party_heap # v8_third_party_heap_files @@ -227,6 +226,18 @@ v8_flag( default = True, ) +# Shared RO heap. Flag has to be set to false when +# v8_enable_pointer_compression_shared_cage is set to false. +v8_flag( + name = "v8_enable_shared_ro_heap", + default = True, +) + +v8_flag( + name = "v8_enable_extensible_ro_snapshot", + default = True, +) + # Enable shared cage if v8_enable_pointer_compression # and v8_enable_pointer_compression_shared_cage. selects.config_setting_group( @@ -270,6 +281,12 @@ config_setting( }, ) +# Enable VTune jit profiling +v8_flag( + name = "v8_enable_vtunejit", + default = False, +) + # Default setting for v8_enable_short_builtin_calls when target is x64. # Disable short calls when pointer compression is not enabled. selects.config_setting_group( @@ -340,6 +357,7 @@ v8_config( "v8_enable_verify_predictable": "VERIFY_PREDICTABLE", "v8_enable_webassembly": "V8_ENABLE_WEBASSEMBLY", "v8_jitless": "V8_JITLESS", + "v8_enable_vtunejit": "ENABLE_VTUNE_JIT_INTERFACE", }, defines = [ "GOOGLE3", @@ -412,6 +430,14 @@ v8_config( "V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE", ], "//conditions:default": [], + }) + select({ + ":is_v8_enable_shared_ro_heap": [ + "V8_SHARED_RO_HEAP", + ], + }) + select({ + ":is_v8_enable_extensible_ro_snapshot": [ + "V8_ENABLE_EXTENSIBLE_RO_SNAPSHOT", + ], }) + select({ ":is_v8_enable_short_builtin_calls": [ "V8_SHORT_BUILTIN_CALLS", @@ -449,6 +475,7 @@ filegroup( name = "v8_config_headers_files", srcs = [ "include/v8-platform.h", + "include/v8-source-location.h", "include/v8config.h", ], ) @@ -481,8 +508,8 @@ filegroup( "include/cppgc/internal/api-constants.h", "include/cppgc/internal/atomic-entry-flag.h", "include/cppgc/internal/base-page-handle.h", - "include/cppgc/internal/caged-heap-local-data.h", "include/cppgc/internal/caged-heap.h", + "include/cppgc/internal/caged-heap-local-data.h", "include/cppgc/internal/compiler-specific.h", "include/cppgc/internal/finalizer-trait.h", "include/cppgc/internal/gc-info.h", @@ -530,6 +557,7 @@ filegroup( "include/v8-forward.h", "include/v8-function.h", "include/v8-function-callback.h", + "include/v8-handle-base.h", "include/v8-initialization.h", "include/v8-internal.h", "include/v8-isolate.h", @@ -594,18 +622,14 @@ filegroup( filegroup( name = "v8_libbase_files", srcs = [ - ":v8_flags", - ":v8_config_headers_files", - ":v8_headers_files", - "src/base/vlq.h", "src/base/address-region.h", "src/base/atomic-utils.h", "src/base/atomicops.h", "src/base/base-export.h", "src/base/bit-field.h", - "src/base/bits-iterator.h", "src/base/bits.cc", "src/base/bits.h", + "src/base/bits-iterator.h", "src/base/bounded-page-allocator.cc", "src/base/bounded-page-allocator.h", "src/base/bounds.h", @@ -617,6 +641,7 @@ filegroup( "src/base/cpu.h", "src/base/debug/stack_trace.cc", "src/base/debug/stack_trace.h", + "src/base/discriminated-union.h", "src/base/division-by-constant.cc", "src/base/division-by-constant.h", "src/base/emulated-virtual-address-subspace.cc", @@ -628,21 +653,22 @@ filegroup( "src/base/flags.h", "src/base/free_deleter.h", "src/base/functional.h", - "src/base/hashmap-entry.h", "src/base/hashmap.h", + "src/base/hashmap-entry.h", "src/base/ieee754.cc", "src/base/ieee754.h", "src/base/immediate-crash.h", + "src/base/intrusive-set.h", "src/base/iterator.h", "src/base/lazy-instance.h", "src/base/logging.cc", "src/base/logging.h", "src/base/macros.h", "src/base/memory.h", - "src/base/numbers/bignum-dtoa.cc", - "src/base/numbers/bignum-dtoa.h", "src/base/numbers/bignum.cc", "src/base/numbers/bignum.h", + "src/base/numbers/bignum-dtoa.cc", + "src/base/numbers/bignum-dtoa.h", "src/base/numbers/cached-powers.cc", "src/base/numbers/cached-powers.h", "src/base/numbers/diy-fp.cc", @@ -670,20 +696,22 @@ filegroup( "src/base/platform/memory-protection-key.h", "src/base/platform/mutex.cc", "src/base/platform/mutex.h", - "src/base/platform/platform.h", "src/base/platform/platform.cc", + "src/base/platform/platform.h", "src/base/platform/semaphore.cc", "src/base/platform/semaphore.h", "src/base/platform/time.cc", "src/base/platform/time.h", - "src/base/pointer-with-payload.h", "src/base/platform/wrappers.h", + "src/base/platform/yield-processor.h", + "src/base/pointer-with-payload.h", "src/base/region-allocator.cc", "src/base/region-allocator.h", "src/base/ring-buffer.h", "src/base/safe_conversions.h", "src/base/safe_conversions_arm_impl.h", "src/base/safe_conversions_impl.h", + "src/base/small-map.h", "src/base/small-vector.h", "src/base/string-format.h", "src/base/strings.cc", @@ -691,19 +719,22 @@ filegroup( "src/base/sys-info.cc", "src/base/sys-info.h", "src/base/template-utils.h", - "src/base/timezone-cache.h", "src/base/threaded-list.h", + "src/base/timezone-cache.h", "src/base/utils/random-number-generator.cc", "src/base/utils/random-number-generator.h", + "src/base/v8-fallthrough.h", "src/base/vector.h", - "src/base/virtual-address-space-page-allocator.cc", - "src/base/virtual-address-space-page-allocator.h", "src/base/virtual-address-space.cc", "src/base/virtual-address-space.h", - "src/base/v8-fallthrough.h", + "src/base/virtual-address-space-page-allocator.cc", + "src/base/virtual-address-space-page-allocator.h", + "src/base/vlq.h", "src/base/vlq-base64.cc", "src/base/vlq-base64.h", - "src/base/platform/yield-processor.h", + ":v8_config_headers_files", + ":v8_flags", + ":v8_headers_files", ] + select({ "@v8//bazel/config:is_posix": [ "src/base/platform/platform-posix.cc", @@ -721,15 +752,16 @@ filegroup( "@v8//bazel/config:is_android": [ "src/base/debug/stack_trace_android.cc", "src/base/platform/platform-linux.cc", + "src/base/platform/platform-linux.h", ], "@v8//bazel/config:is_macos": [ "src/base/debug/stack_trace_posix.cc", "src/base/platform/platform-darwin.cc", ], "@v8//bazel/config:is_windows": [ - "src/base/win32-headers.h", "src/base/debug/stack_trace_win.cc", "src/base/platform/platform-win32.cc", + "src/base/win32-headers.h", ], }), visibility = ["//visibility:public"], @@ -747,6 +779,8 @@ filegroup( "src/libplatform/default-job.h", "src/libplatform/default-platform.cc", "src/libplatform/default-platform.h", + "src/libplatform/default-thread-isolated-allocator.cc", + "src/libplatform/default-thread-isolated-allocator.h", "src/libplatform/default-worker-threads-task-runner.cc", "src/libplatform/default-worker-threads-task-runner.h", "src/libplatform/delayed-task-queue.cc", @@ -783,6 +817,7 @@ filegroup( name = "noicu/torque_files", srcs = [ "src/builtins/aggregate-error.tq", + "src/builtins/array.tq", "src/builtins/array-at.tq", "src/builtins/array-concat.tq", "src/builtins/array-copywithin.tq", @@ -799,8 +834,8 @@ filegroup( "src/builtins/array-lastindexof.tq", "src/builtins/array-map.tq", "src/builtins/array-of.tq", - "src/builtins/array-reduce-right.tq", "src/builtins/array-reduce.tq", + "src/builtins/array-reduce-right.tq", "src/builtins/array-reverse.tq", "src/builtins/array-shift.tq", "src/builtins/array-slice.tq", @@ -811,7 +846,6 @@ filegroup( "src/builtins/array-to-spliced.tq", "src/builtins/array-unshift.tq", "src/builtins/array-with.tq", - "src/builtins/array.tq", "src/builtins/arraybuffer.tq", "src/builtins/base.tq", "src/builtins/boolean.tq", @@ -819,39 +853,43 @@ filegroup( "src/builtins/builtins-string.tq", "src/builtins/cast.tq", "src/builtins/collections.tq", + "src/builtins/console.tq", "src/builtins/constructor.tq", "src/builtins/conversion.tq", "src/builtins/convert.tq", - "src/builtins/console.tq", "src/builtins/data-view.tq", "src/builtins/finalization-registry.tq", - "src/builtins/frames.tq", "src/builtins/frame-arguments.tq", + "src/builtins/frames.tq", "src/builtins/function.tq", "src/builtins/growable-fixed-array.tq", - "src/builtins/ic-callable.tq", "src/builtins/ic.tq", - "src/builtins/internal-coverage.tq", + "src/builtins/ic-callable.tq", "src/builtins/internal.tq", + "src/builtins/internal-coverage.tq", "src/builtins/iterator.tq", "src/builtins/iterator-from.tq", "src/builtins/iterator-helpers.tq", + "src/builtins/map-groupby.tq", "src/builtins/math.tq", "src/builtins/number.tq", - "src/builtins/object-fromentries.tq", "src/builtins/object.tq", + "src/builtins/object-fromentries.tq", + "src/builtins/object-groupby.tq", "src/builtins/promise-abstract-operations.tq", "src/builtins/promise-all.tq", "src/builtins/promise-all-element-closure.tq", "src/builtins/promise-any.tq", "src/builtins/promise-constructor.tq", "src/builtins/promise-finally.tq", + "src/builtins/promise-jobs.tq", "src/builtins/promise-misc.tq", "src/builtins/promise-race.tq", "src/builtins/promise-reaction-job.tq", "src/builtins/promise-resolve.tq", "src/builtins/promise-then.tq", - "src/builtins/promise-jobs.tq", + "src/builtins/promise-withresolvers.tq", + "src/builtins/proxy.tq", "src/builtins/proxy-constructor.tq", "src/builtins/proxy-delete-property.tq", "src/builtins/proxy-get-property.tq", @@ -863,17 +901,23 @@ filegroup( "src/builtins/proxy-revoke.tq", "src/builtins/proxy-set-property.tq", "src/builtins/proxy-set-prototype-of.tq", - "src/builtins/proxy.tq", "src/builtins/reflect.tq", + "src/builtins/regexp.tq", "src/builtins/regexp-exec.tq", - "src/builtins/regexp-match-all.tq", "src/builtins/regexp-match.tq", + "src/builtins/regexp-match-all.tq", "src/builtins/regexp-replace.tq", "src/builtins/regexp-search.tq", "src/builtins/regexp-source.tq", "src/builtins/regexp-split.tq", "src/builtins/regexp-test.tq", - "src/builtins/regexp.tq", + "src/builtins/set-difference.tq", + "src/builtins/set-intersection.tq", + "src/builtins/set-is-disjoint-from.tq", + "src/builtins/set-is-subset-of.tq", + "src/builtins/set-is-superset-of.tq", + "src/builtins/set-symmetric-difference.tq", + "src/builtins/set-union.tq", "src/builtins/string-at.tq", "src/builtins/string-endswith.tq", "src/builtins/string-html.tq", @@ -893,10 +937,11 @@ filegroup( "src/builtins/string-trim.tq", "src/builtins/symbol.tq", "src/builtins/torque-internal.tq", + "src/builtins/typed-array.tq", "src/builtins/typed-array-at.tq", "src/builtins/typed-array-createtypedarray.tq", - "src/builtins/typed-array-every.tq", "src/builtins/typed-array-entries.tq", + "src/builtins/typed-array-every.tq", "src/builtins/typed-array-filter.tq", "src/builtins/typed-array-find.tq", "src/builtins/typed-array-findindex.tq", @@ -917,16 +962,15 @@ filegroup( "src/builtins/typed-array-to-sorted.tq", "src/builtins/typed-array-values.tq", "src/builtins/typed-array-with.tq", - "src/builtins/typed-array.tq", "src/builtins/weak-ref.tq", "src/ic/handler-configuration.tq", "src/objects/allocation-site.tq", "src/objects/api-callbacks.tq", "src/objects/arguments.tq", "src/objects/bigint.tq", + "src/objects/bytecode-array.tq", "src/objects/call-site-info.tq", "src/objects/cell.tq", - "src/objects/code.tq", "src/objects/contexts.tq", "src/objects/data-handler.tq", "src/objects/debug-objects.tq", @@ -939,11 +983,11 @@ filegroup( "src/objects/free-space.tq", "src/objects/heap-number.tq", "src/objects/heap-object.tq", - "src/objects/js-array-buffer.tq", "src/objects/js-array.tq", + "src/objects/js-array-buffer.tq", "src/objects/js-atomics-synchronization.tq", - "src/objects/js-collection-iterator.tq", "src/objects/js-collection.tq", + "src/objects/js-collection-iterator.tq", "src/objects/js-function.tq", "src/objects/js-generator.tq", "src/objects/js-iterator-helpers.tq", @@ -951,8 +995,8 @@ filegroup( "src/objects/js-promise.tq", "src/objects/js-proxy.tq", "src/objects/js-raw-json.tq", - "src/objects/js-regexp-string-iterator.tq", "src/objects/js-regexp.tq", + "src/objects/js-regexp-string-iterator.tq", "src/objects/js-shadow-realm.tq", "src/objects/js-shared-array.tq", "src/objects/js-struct.tq", @@ -965,6 +1009,7 @@ filegroup( "src/objects/module.tq", "src/objects/name.tq", "src/objects/oddball.tq", + "src/objects/hole.tq", "src/objects/ordered-hash-table.tq", "src/objects/primitive-heap-object.tq", "src/objects/promise.tq", @@ -991,7 +1036,10 @@ filegroup( "third_party/v8/builtins/array-sort.tq", ] + select({ ":is_v8_enable_webassembly": [ + "src/builtins/js-to-wasm.tq", "src/builtins/wasm.tq", + "src/builtins/wasm-strings.tq", + "src/builtins/wasm-to-js.tq", "src/debug/debug-wasm-objects.tq", "src/wasm/wasm-objects.tq", ], @@ -1023,8 +1071,8 @@ filegroup( filegroup( name = "torque_base_files", srcs = [ - "src/numbers/integer-literal-inl.h", "src/numbers/integer-literal.h", + "src/numbers/integer-literal-inl.h", "src/torque/ast.h", "src/torque/cc-generator.cc", "src/torque/cc-generator.h", @@ -1089,34 +1137,31 @@ selects.config_setting_group( filegroup( name = "v8_base_without_compiler_files", srcs = [ - ":cppgc_base_files", - ":v8_heap_base_files", - ":v8_bigint", - ":generated_bytecode_builtins_list", "include/cppgc/common.h", - "include/v8-inspector-protocol.h", "include/v8-inspector.h", + "include/v8-inspector-protocol.h", "include/v8-metrics.h", "include/v8-unwinder-state.h", "include/v8-wasm-trap-handler-posix.h", - "src/api/api-arguments-inl.h", + "src/api/api.cc", + "src/api/api.h", "src/api/api-arguments.cc", "src/api/api-arguments.h", + "src/api/api-arguments-inl.h", "src/api/api-inl.h", "src/api/api-macros.h", "src/api/api-macros-undef.h", "src/api/api-natives.cc", "src/api/api-natives.h", - "src/api/api.cc", - "src/api/api.h", + "src/asmjs/asm-js.h", + "src/ast/ast.cc", + "src/ast/ast.h", "src/ast/ast-function-literal-id-reindexer.cc", "src/ast/ast-function-literal-id-reindexer.h", "src/ast/ast-source-ranges.h", "src/ast/ast-traversal-visitor.h", "src/ast/ast-value-factory.cc", "src/ast/ast-value-factory.h", - "src/ast/ast.cc", - "src/ast/ast.h", "src/ast/modules.cc", "src/ast/modules.h", "src/ast/prettyprinter.cc", @@ -1127,18 +1172,27 @@ filegroup( "src/ast/source-range-ast-visitor.h", "src/ast/variables.cc", "src/ast/variables.h", - "src/baseline/baseline-assembler-inl.h", - "src/baseline/baseline-assembler.h", - "src/baseline/baseline-compiler.cc", - "src/baseline/baseline-compiler.h", + "src/base/sanitizer/asan.h", + "src/base/sanitizer/lsan-page-allocator.cc", + "src/base/sanitizer/lsan-page-allocator.h", + "src/base/sanitizer/lsan-virtual-address-space.cc", + "src/base/sanitizer/lsan-virtual-address-space.h", + "src/base/sanitizer/msan.h", + "src/base/sanitizer/tsan.h", "src/baseline/baseline.cc", "src/baseline/baseline.h", - "src/baseline/baseline-batch-compiler.h", + "src/baseline/baseline-assembler.h", + "src/baseline/baseline-assembler-inl.h", "src/baseline/baseline-batch-compiler.cc", - "src/baseline/bytecode-offset-iterator.h", + "src/baseline/baseline-batch-compiler.h", + "src/baseline/baseline-compiler.cc", + "src/baseline/baseline-compiler.h", "src/baseline/bytecode-offset-iterator.cc", + "src/baseline/bytecode-offset-iterator.h", "src/builtins/accessors.cc", "src/builtins/accessors.h", + "src/builtins/builtins.cc", + "src/builtins/builtins.h", "src/builtins/builtins-api.cc", "src/builtins/builtins-array.cc", "src/builtins/builtins-arraybuffer.cc", @@ -1164,28 +1218,26 @@ filegroup( "src/builtins/builtins-reflect.cc", "src/builtins/builtins-regexp.cc", "src/builtins/builtins-shadow-realm.cc", - "src/builtins/builtins-sharedarraybuffer.cc", "src/builtins/builtins-shared-array.cc", + "src/builtins/builtins-sharedarraybuffer.cc", "src/builtins/builtins-string.cc", "src/builtins/builtins-struct.cc", "src/builtins/builtins-symbol.cc", "src/builtins/builtins-temporal.cc", "src/builtins/builtins-trace.cc", "src/builtins/builtins-typed-array.cc", - "src/builtins/builtins-utils-inl.h", "src/builtins/builtins-utils.h", + "src/builtins/builtins-utils-inl.h", "src/builtins/builtins-weak-refs.cc", - "src/builtins/builtins.cc", - "src/builtins/builtins.h", "src/builtins/constants-table-builder.cc", "src/builtins/constants-table-builder.h", "src/builtins/profile-data-reader.h", - "src/codegen/aligned-slot-allocator.h", "src/codegen/aligned-slot-allocator.cc", - "src/codegen/assembler-arch.h", - "src/codegen/assembler-inl.h", + "src/codegen/aligned-slot-allocator.h", "src/codegen/assembler.cc", "src/codegen/assembler.h", + "src/codegen/assembler-arch.h", + "src/codegen/assembler-inl.h", "src/codegen/atomic-memory-order.h", "src/codegen/background-merge-task.h", "src/codegen/bailout-reason.cc", @@ -1207,68 +1259,70 @@ filegroup( "src/codegen/constant-pool.h", "src/codegen/constants-arch.h", "src/codegen/cpu-features.h", + "src/codegen/external-reference.cc", + "src/codegen/external-reference.h", "src/codegen/external-reference-encoder.cc", "src/codegen/external-reference-encoder.h", "src/codegen/external-reference-table.cc", "src/codegen/external-reference-table.h", - "src/codegen/external-reference.cc", - "src/codegen/external-reference.h", "src/codegen/flush-instruction-cache.cc", "src/codegen/flush-instruction-cache.h", "src/codegen/handler-table.cc", "src/codegen/handler-table.h", "src/codegen/interface-descriptors.cc", - "src/codegen/interface-descriptors-inl.h", "src/codegen/interface-descriptors.h", + "src/codegen/interface-descriptors-inl.h", "src/codegen/label.h", + "src/codegen/linkage-location.h", "src/codegen/machine-type.cc", "src/codegen/machine-type.h", - "src/codegen/macro-assembler-inl.h", "src/codegen/macro-assembler.h", + "src/codegen/macro-assembler-base.cc", + "src/codegen/macro-assembler-base.h", + "src/codegen/macro-assembler-inl.h", "src/codegen/maglev-safepoint-table.cc", "src/codegen/maglev-safepoint-table.h", "src/codegen/optimized-compilation-info.cc", "src/codegen/optimized-compilation-info.h", "src/codegen/pending-optimization-table.cc", "src/codegen/pending-optimization-table.h", + "src/codegen/register.h", "src/codegen/register-arch.h", "src/codegen/register-base.h", "src/codegen/register-configuration.cc", "src/codegen/register-configuration.h", - "src/codegen/register.h", - "src/codegen/reglist-base.h", "src/codegen/reglist.h", + "src/codegen/reglist-base.h", "src/codegen/reloc-info.cc", "src/codegen/reloc-info.h", - "src/codegen/safepoint-table-base.h", + "src/codegen/reloc-info-inl.h", "src/codegen/safepoint-table.cc", "src/codegen/safepoint-table.h", + "src/codegen/safepoint-table-base.h", "src/codegen/script-details.h", "src/codegen/signature.h", - "src/codegen/source-position-table.cc", - "src/codegen/source-position-table.h", "src/codegen/source-position.cc", "src/codegen/source-position.h", + "src/codegen/source-position-table.cc", + "src/codegen/source-position-table.h", "src/codegen/tick-counter.cc", "src/codegen/tick-counter.h", "src/codegen/tnode.cc", "src/codegen/tnode.h", - "src/codegen/macro-assembler-base.cc", - "src/codegen/macro-assembler-base.h", "src/codegen/unoptimized-compilation-info.cc", "src/codegen/unoptimized-compilation-info.h", "src/common/assert-scope.cc", "src/common/assert-scope.h", "src/common/checks.h", - "src/common/code-memory-access-inl.h", "src/common/code-memory-access.cc", "src/common/code-memory-access.h", + "src/common/code-memory-access-inl.h", "src/common/high-allocation-throughput-scope.h", "src/common/message-template.h", "src/common/operation.h", - "src/common/ptr-compr-inl.h", "src/common/ptr-compr.cc", "src/common/ptr-compr.h", + "src/common/ptr-compr-inl.h", "src/compiler-dispatcher/lazy-compile-dispatcher.cc", "src/compiler-dispatcher/lazy-compile-dispatcher.h", "src/compiler-dispatcher/optimizing-compile-dispatcher.cc", @@ -1276,9 +1330,11 @@ filegroup( "src/compiler/turbofan.h", "src/date/date.cc", "src/date/date.h", - "src/date/dateparser-inl.h", "src/date/dateparser.cc", "src/date/dateparser.h", + "src/date/dateparser-inl.h", + "src/debug/debug.cc", + "src/debug/debug.h", "src/debug/debug-coverage.cc", "src/debug/debug-coverage.h", "src/debug/debug-evaluate.cc", @@ -1295,13 +1351,11 @@ filegroup( "src/debug/debug-scopes.h", "src/debug/debug-stack-trace-iterator.cc", "src/debug/debug-stack-trace-iterator.h", - "src/debug/debug.cc", - "src/debug/debug.h", "src/debug/interface-types.h", - "src/debug/liveedit-diff.cc", - "src/debug/liveedit-diff.h", "src/debug/liveedit.cc", "src/debug/liveedit.h", + "src/debug/liveedit-diff.cc", + "src/debug/liveedit-diff.h", "src/deoptimizer/deoptimize-reason.cc", "src/deoptimizer/deoptimize-reason.h", "src/deoptimizer/deoptimized-frame-info.cc", @@ -1309,12 +1363,12 @@ filegroup( "src/deoptimizer/deoptimizer.cc", "src/deoptimizer/deoptimizer.h", "src/deoptimizer/frame-description.h", + "src/deoptimizer/frame-translation-builder.cc", + "src/deoptimizer/frame-translation-builder.h", "src/deoptimizer/materialized-object-store.cc", "src/deoptimizer/materialized-object-store.h", "src/deoptimizer/translated-state.cc", "src/deoptimizer/translated-state.h", - "src/deoptimizer/translation-array.cc", - "src/deoptimizer/translation-array.h", "src/deoptimizer/translation-opcode.h", "src/diagnostics/basic-block-profiler.cc", "src/diagnostics/basic-block-profiler.h", @@ -1334,48 +1388,47 @@ filegroup( "src/diagnostics/perf-jit.h", "src/diagnostics/unwinder.cc", "src/diagnostics/unwinder.h", - "src/execution/arguments-inl.h", "src/execution/arguments.cc", "src/execution/arguments.h", + "src/execution/arguments-inl.h", "src/execution/clobber-registers.cc", "src/execution/clobber-registers.h", + "src/execution/embedder-state.cc", + "src/execution/embedder-state.h", "src/execution/encoded-c-signature.cc", "src/execution/encoded-c-signature.h", - "src/execution/embedder-state.h", - "src/execution/embedder-state.cc", "src/execution/execution.cc", "src/execution/execution.h", "src/execution/frame-constants.h", - "src/execution/frames-inl.h", "src/execution/frames.cc", "src/execution/frames.h", + "src/execution/frames-inl.h", "src/execution/futex-emulation.cc", "src/execution/futex-emulation.h", "src/execution/interrupts-scope.cc", "src/execution/interrupts-scope.h", + "src/execution/isolate.cc", + "src/execution/isolate.h", "src/execution/isolate-data.h", "src/execution/isolate-inl.h", "src/execution/isolate-utils.h", "src/execution/isolate-utils-inl.h", - "src/snapshot/embedded/platform-embedded-file-writer-base.h", - "src/snapshot/embedded/embedded-file-writer.h", - "src/execution/isolate.cc", - "src/execution/isolate.h", - "src/execution/local-isolate-inl.h", "src/execution/local-isolate.cc", "src/execution/local-isolate.h", + "src/execution/local-isolate-inl.h", "src/execution/messages.cc", "src/execution/messages.h", "src/execution/microtask-queue.cc", "src/execution/microtask-queue.h", "src/execution/pointer-authentication.h", - "src/execution/protectors-inl.h", + "src/execution/pointer-authentication-dummy.h", "src/execution/protectors.cc", "src/execution/protectors.h", + "src/execution/protectors-inl.h", "src/execution/shared-mutex-guard-if-off-thread.h", + "src/execution/simulator.h", "src/execution/simulator-base.cc", "src/execution/simulator-base.h", - "src/execution/simulator.h", "src/execution/stack-guard.cc", "src/execution/stack-guard.h", "src/execution/thread-id.cc", @@ -1386,8 +1439,8 @@ filegroup( "src/execution/tiering-manager.h", "src/execution/v8threads.cc", "src/execution/v8threads.h", - "src/execution/vm-state-inl.h", "src/execution/vm-state.h", + "src/execution/vm-state-inl.h", "src/extensions/cputracemark-extension.cc", "src/extensions/cputracemark-extension.h", "src/extensions/externalize-string-extension.cc", @@ -1403,48 +1456,45 @@ filegroup( "src/flags/flag-definitions.h", "src/flags/flags.cc", "src/flags/flags.h", - "src/handles/global-handles-inl.h", "src/handles/global-handles.cc", "src/handles/global-handles.h", - "src/handles/traced-handles.cc", - "src/handles/traced-handles.h", - "src/handles/handles-inl.h", + "src/handles/global-handles-inl.h", "src/handles/handles.cc", "src/handles/handles.h", - "src/handles/local-handles-inl.h", + "src/handles/handles-inl.h", "src/handles/local-handles.cc", "src/handles/local-handles.h", - "src/handles/maybe-handles-inl.h", + "src/handles/local-handles-inl.h", "src/handles/maybe-handles.h", + "src/handles/maybe-handles-inl.h", "src/handles/persistent-handles.cc", "src/handles/persistent-handles.h", "src/handles/shared-object-conveyor-handles.cc", "src/handles/shared-object-conveyor-handles.h", - "src/heap/base/active-system-pages.cc", - "src/heap/base/active-system-pages.h", + "src/handles/traced-handles.cc", + "src/handles/traced-handles.h", "src/heap/allocation-observer.cc", "src/heap/allocation-observer.h", "src/heap/allocation-result.h", "src/heap/allocation-stats.h", "src/heap/array-buffer-sweeper.cc", "src/heap/array-buffer-sweeper.h", - "src/heap/base-space.cc", "src/heap/base-space.h", + "src/heap/base/active-system-pages.cc", + "src/heap/base/active-system-pages.h", "src/heap/basic-memory-chunk.cc", "src/heap/basic-memory-chunk.h", - "src/heap/code-object-registry.cc", - "src/heap/code-object-registry.h", - "src/heap/code-range.h", "src/heap/code-range.cc", + "src/heap/code-range.h", "src/heap/code-stats.cc", "src/heap/code-stats.h", "src/heap/collection-barrier.cc", "src/heap/collection-barrier.h", "src/heap/combined-heap.cc", "src/heap/combined-heap.h", - "src/heap/concurrent-allocator-inl.h", "src/heap/concurrent-allocator.cc", "src/heap/concurrent-allocator.h", + "src/heap/concurrent-allocator-inl.h", "src/heap/concurrent-marking.cc", "src/heap/concurrent-marking.h", "src/heap/cppgc-js/cpp-heap.cc", @@ -1464,29 +1514,35 @@ filegroup( "src/heap/cppgc-js/unified-heap-marking-visitor.h", "src/heap/cppgc-js/wrappable-info.h", "src/heap/cppgc-js/wrappable-info-inl.h", + "src/heap/ephemeron-remembered-set.h", + "src/heap/ephemeron-remembered-set.cc", + "src/heap/evacuation-allocator.h", + "src/heap/evacuation-allocator-inl.h", "src/heap/evacuation-verifier.cc", "src/heap/evacuation-verifier.h", "src/heap/evacuation-verifier-inl.h", + "src/heap/factory.cc", + "src/heap/factory.h", "src/heap/factory-base.cc", "src/heap/factory-base.h", "src/heap/factory-base-inl.h", "src/heap/factory-inl.h", - "src/heap/factory.cc", - "src/heap/factory.h", "src/heap/finalization-registry-cleanup-task.cc", "src/heap/finalization-registry-cleanup-task.h", - "src/heap/free-list-inl.h", "src/heap/free-list.cc", "src/heap/free-list.h", + "src/heap/free-list-inl.h", "src/heap/gc-callbacks.h", "src/heap/gc-idle-time-handler.cc", "src/heap/gc-idle-time-handler.h", "src/heap/gc-tracer.cc", - "src/heap/gc-tracer-inl.h", "src/heap/gc-tracer.h", - "src/heap/heap-allocator-inl.h", + "src/heap/gc-tracer-inl.h", + "src/heap/heap.cc", + "src/heap/heap.h", "src/heap/heap-allocator.cc", "src/heap/heap-allocator.h", + "src/heap/heap-allocator-inl.h", "src/heap/heap-controller.cc", "src/heap/heap-controller.h", "src/heap/heap-inl.h", @@ -1494,115 +1550,130 @@ filegroup( "src/heap/heap-layout-tracer.h", "src/heap/heap-verifier.cc", "src/heap/heap-verifier.h", - "src/heap/heap-write-barrier-inl.h", "src/heap/heap-write-barrier.cc", "src/heap/heap-write-barrier.h", - "src/heap/heap.cc", - "src/heap/heap.h", + "src/heap/heap-write-barrier-inl.h", + "src/heap/incremental-marking.cc", + "src/heap/incremental-marking.h", "src/heap/incremental-marking-inl.h", "src/heap/incremental-marking-job.cc", "src/heap/incremental-marking-job.h", - "src/heap/incremental-marking.cc", - "src/heap/incremental-marking.h", "src/heap/index-generator.cc", "src/heap/index-generator.h", - "src/heap/invalidated-slots-inl.h", - "src/heap/invalidated-slots.cc", - "src/heap/invalidated-slots.h", + "src/heap/large-page.cc", + "src/heap/large-page.h", "src/heap/large-spaces.cc", "src/heap/large-spaces.h", "src/heap/linear-allocation-area.h", "src/heap/list.h", - "src/heap/evacuation-allocator-inl.h", - "src/heap/evacuation-allocator.h", "src/heap/local-factory.cc", "src/heap/local-factory.h", "src/heap/local-factory-inl.h", - "src/heap/local-heap-inl.h", "src/heap/local-heap.cc", "src/heap/local-heap.h", - "src/heap/mark-compact-inl.h", + "src/heap/local-heap-inl.h", "src/heap/mark-compact.cc", "src/heap/mark-compact.h", + "src/heap/mark-compact-inl.h", + "src/heap/mark-sweep-utilities.cc", + "src/heap/mark-sweep-utilities.h", + "src/heap/minor-mark-sweep.cc", + "src/heap/minor-mark-sweep.h", + "src/heap/minor-mark-sweep-inl.h", + "src/heap/marking.cc", + "src/heap/marking.h", + "src/heap/marking-inl.h", "src/heap/marking-barrier.cc", "src/heap/marking-barrier.h", "src/heap/marking-barrier-inl.h", "src/heap/marking-state.h", "src/heap/marking-state-inl.h", - "src/heap/marking-visitor-inl.h", "src/heap/marking-visitor.h", - "src/heap/marking-worklist-inl.h", + "src/heap/marking-visitor-inl.h", "src/heap/marking-worklist.cc", "src/heap/marking-worklist.h", - "src/heap/marking.cc", - "src/heap/marking.h", + "src/heap/marking-worklist-inl.h", "src/heap/memory-allocator.cc", "src/heap/memory-allocator.h", + "src/heap/memory-balancer.cc", + "src/heap/memory-balancer.h", + "src/heap/memory-chunk.cc", + "src/heap/memory-chunk.h", "src/heap/memory-chunk-inl.h", "src/heap/memory-chunk-layout.cc", "src/heap/memory-chunk-layout.h", - "src/heap/memory-chunk.cc", - "src/heap/memory-chunk.h", - "src/heap/memory-measurement-inl.h", "src/heap/memory-measurement.cc", "src/heap/memory-measurement.h", + "src/heap/memory-measurement-inl.h", "src/heap/memory-reducer.cc", "src/heap/memory-reducer.h", - "src/heap/new-spaces-inl.h", + "src/heap/minor-gc-job.cc", + "src/heap/minor-gc-job.h", "src/heap/new-spaces.cc", "src/heap/new-spaces.h", + "src/heap/new-spaces-inl.h", "src/heap/object-lock.h", "src/heap/object-stats.cc", "src/heap/object-stats.h", - "src/heap/objects-visiting-inl.h", "src/heap/objects-visiting.cc", "src/heap/objects-visiting.h", - "src/heap/paged-spaces-inl.h", + "src/heap/objects-visiting-inl.h", + "src/heap/page.cc", + "src/heap/page.h", + "src/heap/page-inl.h", "src/heap/paged-spaces.cc", "src/heap/paged-spaces.h", + "src/heap/paged-spaces-inl.h", "src/heap/parallel-work-item.h", + "src/heap/parked-scope-inl.h", "src/heap/parked-scope.h", - "src/heap/pretenuring-handler-inl.h", "src/heap/pretenuring-handler.cc", "src/heap/pretenuring-handler.h", + "src/heap/pretenuring-handler-inl.h", "src/heap/progress-bar.h", - "src/heap/read-only-heap-inl.h", "src/heap/read-only-heap.cc", "src/heap/read-only-heap.h", + "src/heap/read-only-heap-inl.h", + "src/heap/read-only-promotion.cc", + "src/heap/read-only-promotion.h", "src/heap/read-only-spaces.cc", "src/heap/read-only-spaces.h", - "src/heap/remembered-set-inl.h", "src/heap/remembered-set.h", + "src/heap/remembered-set-inl.h", "src/heap/safepoint.cc", "src/heap/safepoint.h", - "src/heap/minor-gc-job.cc", - "src/heap/minor-gc-job.h", - "src/heap/scavenger-inl.h", "src/heap/scavenger.cc", "src/heap/scavenger.h", + "src/heap/scavenger-inl.h", "src/heap/slot-set.cc", "src/heap/slot-set.h", - "src/heap/spaces-inl.h", "src/heap/spaces.cc", "src/heap/spaces.h", + "src/heap/spaces-inl.h", "src/heap/stress-scavenge-observer.cc", "src/heap/stress-scavenge-observer.h", "src/heap/sweeper.cc", "src/heap/sweeper.h", + "src/heap/third-party/heap-api.h", + "src/heap/third-party/heap-api-stub.cc", "src/heap/traced-handles-marking-visitor.cc", "src/heap/traced-handles-marking-visitor.h", "src/heap/weak-object-worklists.cc", "src/heap/weak-object-worklists.h", + "src/heap/young-generation-marking-visitor.h", + "src/heap/young-generation-marking-visitor-inl.h", + "src/heap/zapping.cc", + "src/heap/zapping.h", "src/ic/call-optimization.cc", "src/ic/call-optimization.h", - "src/ic/handler-configuration-inl.h", "src/ic/handler-configuration.cc", "src/ic/handler-configuration.h", + "src/ic/handler-configuration-inl.h", + "src/ic/ic.cc", + "src/ic/ic.h", "src/ic/ic-inl.h", "src/ic/ic-stats.cc", "src/ic/ic-stats.h", - "src/ic/ic.cc", - "src/ic/ic.h", "src/ic/stub-cache.cc", "src/ic/stub-cache.h", "src/init/bootstrapper.cc", @@ -1639,11 +1710,11 @@ filegroup( "src/interpreter/bytecode-node.h", "src/interpreter/bytecode-operands.cc", "src/interpreter/bytecode-operands.h", + "src/interpreter/bytecode-register.cc", + "src/interpreter/bytecode-register.h", "src/interpreter/bytecode-register-allocator.h", "src/interpreter/bytecode-register-optimizer.cc", "src/interpreter/bytecode-register-optimizer.h", - "src/interpreter/bytecode-register.cc", - "src/interpreter/bytecode-register.h", "src/interpreter/bytecode-source-info.cc", "src/interpreter/bytecode-source-info.h", "src/interpreter/bytecode-traits.h", @@ -1655,152 +1726,169 @@ filegroup( "src/interpreter/control-flow-builders.h", "src/interpreter/handler-table-builder.cc", "src/interpreter/handler-table-builder.h", + "src/interpreter/interpreter.cc", + "src/interpreter/interpreter.h", "src/interpreter/interpreter-generator.h", "src/interpreter/interpreter-intrinsics.cc", "src/interpreter/interpreter-intrinsics.h", - "src/interpreter/interpreter.cc", - "src/interpreter/interpreter.h", "src/json/json-parser.cc", "src/json/json-parser.h", "src/json/json-stringifier.cc", "src/json/json-stringifier.h", "src/logging/code-events.h", - "src/logging/counters-definitions.h", "src/logging/counters.cc", "src/logging/counters.h", + "src/logging/counters-definitions.h", "src/logging/counters-scopes.h", "src/logging/local-logger.cc", "src/logging/local-logger.h", - "src/logging/log-inl.h", - "src/logging/log-file.cc", - "src/logging/log-file.h", "src/logging/log.cc", "src/logging/log.h", + "src/logging/log-file.cc", + "src/logging/log-file.h", + "src/logging/log-inl.h", "src/logging/metrics.cc", "src/logging/metrics.h", - "src/logging/tracing-flags.cc", - "src/logging/tracing-flags.h", "src/logging/runtime-call-stats.h", "src/logging/runtime-call-stats-scope.h", - "src/numbers/conversions-inl.h", + "src/logging/tracing-flags.cc", + "src/logging/tracing-flags.h", "src/numbers/conversions.cc", "src/numbers/conversions.h", + "src/numbers/conversions-inl.h", "src/numbers/hash-seed-inl.h", - "src/numbers/integer-literal-inl.h", "src/numbers/integer-literal.h", + "src/numbers/integer-literal-inl.h", "src/numbers/math-random.cc", "src/numbers/math-random.h", + "src/objects/abstract-code.cc", + "src/objects/abstract-code.h", + "src/objects/abstract-code-inl.h", "src/objects/all-objects-inl.h", + "src/objects/allocation-site.h", "src/objects/allocation-site-inl.h", - "src/objects/allocation-site-scopes-inl.h", "src/objects/allocation-site-scopes.h", - "src/objects/allocation-site.h", - "src/objects/api-callbacks-inl.h", + "src/objects/allocation-site-scopes-inl.h", "src/objects/api-callbacks.h", - "src/objects/arguments-inl.h", + "src/objects/api-callbacks-inl.h", "src/objects/arguments.h", + "src/objects/arguments-inl.h", "src/objects/backing-store.cc", "src/objects/backing-store.h", - "src/objects/bigint-inl.h", "src/objects/bigint.cc", "src/objects/bigint.h", - "src/objects/call-site-info-inl.h", + "src/objects/bigint-inl.h", + "src/objects/bytecode-array.cc", + "src/objects/bytecode-array.h", + "src/objects/bytecode-array-inl.h", "src/objects/call-site-info.cc", "src/objects/call-site-info.h", - "src/objects/cell-inl.h", + "src/objects/call-site-info-inl.h", "src/objects/cell.h", + "src/objects/cell-inl.h", + "src/objects/code.cc", + "src/objects/code.h", "src/objects/code-inl.h", "src/objects/code-kind.cc", "src/objects/code-kind.h", - "src/objects/code.cc", - "src/objects/code.h", - "src/objects/compilation-cache-table-inl.h", "src/objects/compilation-cache-table.cc", "src/objects/compilation-cache-table.h", - "src/objects/compressed-slots-inl.h", + "src/objects/compilation-cache-table-inl.h", "src/objects/compressed-slots.h", - "src/objects/contexts-inl.h", + "src/objects/compressed-slots-inl.h", "src/objects/contexts.cc", "src/objects/contexts.h", - "src/objects/data-handler-inl.h", + "src/objects/contexts-inl.h", "src/objects/data-handler.h", - "src/objects/debug-objects-inl.h", + "src/objects/data-handler-inl.h", "src/objects/debug-objects.cc", "src/objects/debug-objects.h", - "src/objects/descriptor-array-inl.h", + "src/objects/debug-objects-inl.h", + "src/objects/deoptimization-data.cc", + "src/objects/deoptimization-data.h", + "src/objects/deoptimization-data-inl.h", + "src/objects/dependent-code.cc", + "src/objects/dependent-code.h", + "src/objects/dependent-code-inl.h", "src/objects/descriptor-array.h", - "src/objects/dictionary-inl.h", + "src/objects/descriptor-array-inl.h", "src/objects/dictionary.h", + "src/objects/dictionary-inl.h", + "src/objects/elements.cc", + "src/objects/elements.h", "src/objects/elements-inl.h", "src/objects/elements-kind.cc", "src/objects/elements-kind.h", - "src/objects/elements.cc", - "src/objects/elements.h", - "src/objects/embedder-data-array-inl.h", "src/objects/embedder-data-array.cc", "src/objects/embedder-data-array.h", - "src/objects/embedder-data-slot-inl.h", + "src/objects/embedder-data-array-inl.h", "src/objects/embedder-data-slot.h", - "src/objects/feedback-cell-inl.h", + "src/objects/embedder-data-slot-inl.h", "src/objects/feedback-cell.h", - "src/objects/feedback-vector-inl.h", + "src/objects/feedback-cell-inl.h", "src/objects/feedback-vector.cc", "src/objects/feedback-vector.h", - "src/objects/field-index-inl.h", + "src/objects/feedback-vector-inl.h", "src/objects/field-index.h", + "src/objects/field-index-inl.h", "src/objects/field-type.cc", "src/objects/field-type.h", - "src/objects/fixed-array-inl.h", + "src/objects/fixed-array.cc", "src/objects/fixed-array.h", - "src/objects/foreign-inl.h", + "src/objects/fixed-array-inl.h", "src/objects/foreign.h", - "src/objects/free-space-inl.h", + "src/objects/foreign-inl.h", "src/objects/free-space.h", + "src/objects/free-space-inl.h", "src/objects/function-kind.h", "src/objects/function-syntax-kind.h", - "src/objects/hash-table-inl.h", "src/objects/hash-table.h", - "src/objects/heap-number-inl.h", + "src/objects/hash-table-inl.h", "src/objects/heap-number.h", - "src/objects/heap-object-inl.h", + "src/objects/heap-number-inl.h", "src/objects/heap-object.h", - "src/objects/instance-type-inl.h", + "src/objects/heap-object-inl.h", "src/objects/instance-type.h", + "src/objects/instance-type-checker.h", + "src/objects/instance-type-inl.h", "src/objects/internal-index.h", - "src/objects/js-array-buffer-inl.h", + "src/objects/instruction-stream.cc", + "src/objects/instruction-stream.h", + "src/objects/instruction-stream-inl.h", + "src/objects/js-array.h", "src/objects/js-array-buffer.cc", "src/objects/js-array-buffer.h", + "src/objects/js-array-buffer-inl.h", "src/objects/js-array-inl.h", - "src/objects/js-array.h", - "src/objects/js-atomics-synchronization-inl.h", - "src/objects/js-atomics-synchronization.h", "src/objects/js-atomics-synchronization.cc", + "src/objects/js-atomics-synchronization.h", + "src/objects/js-atomics-synchronization-inl.h", + "src/objects/js-collection.h", "src/objects/js-collection-inl.h", "src/objects/js-collection-iterator.h", "src/objects/js-collection-iterator-inl.h", - "src/objects/js-collection.h", - "src/objects/js-function-inl.h", "src/objects/js-function.cc", "src/objects/js-function.h", - "src/objects/js-generator-inl.h", + "src/objects/js-function-inl.h", "src/objects/js-generator.h", - "src/objects/js-iterator-helpers-inl.h", + "src/objects/js-generator-inl.h", "src/objects/js-iterator-helpers.h", - "src/objects/js-objects-inl.h", + "src/objects/js-iterator-helpers-inl.h", "src/objects/js-objects.cc", "src/objects/js-objects.h", - "src/objects/js-promise-inl.h", + "src/objects/js-objects-inl.h", "src/objects/js-promise.h", - "src/objects/js-proxy-inl.h", + "src/objects/js-promise-inl.h", "src/objects/js-proxy.h", - "src/objects/js-raw-json-inl.h", - "src/objects/js-raw-json.h", + "src/objects/js-proxy-inl.h", "src/objects/js-raw-json.cc", - "src/objects/js-regexp-inl.h", - "src/objects/js-regexp-string-iterator-inl.h", - "src/objects/js-regexp-string-iterator.h", + "src/objects/js-raw-json.h", + "src/objects/js-raw-json-inl.h", "src/objects/js-regexp.cc", "src/objects/js-regexp.h", + "src/objects/js-regexp-inl.h", + "src/objects/js-regexp-string-iterator.h", + "src/objects/js-regexp-string-iterator-inl.h", "src/objects/js-shadow-realm.h", "src/objects/js-shadow-realm-inl.h", "src/objects/js-shared-array.h", @@ -1808,151 +1896,154 @@ filegroup( "src/objects/js-struct.cc", "src/objects/js-struct.h", "src/objects/js-struct-inl.h", + "src/objects/js-temporal-objects.cc", "src/objects/js-temporal-objects.h", "src/objects/js-temporal-objects-inl.h", - "src/objects/js-temporal-objects.cc", "src/objects/js-weak-refs.h", "src/objects/js-weak-refs-inl.h", "src/objects/keys.cc", "src/objects/keys.h", - "src/objects/literal-objects-inl.h", "src/objects/literal-objects.cc", "src/objects/literal-objects.h", - "src/objects/lookup-cache-inl.h", + "src/objects/literal-objects-inl.h", + "src/objects/lookup.cc", + "src/objects/lookup.h", "src/objects/lookup-cache.cc", "src/objects/lookup-cache.h", + "src/objects/lookup-cache-inl.h", "src/objects/lookup-inl.h", - "src/objects/lookup.cc", - "src/objects/lookup.h", - "src/objects/managed-inl.h", "src/objects/managed.cc", "src/objects/managed.h", + "src/objects/managed-inl.h", + "src/objects/map.cc", + "src/objects/map.h", "src/objects/map-inl.h", "src/objects/map-updater.cc", "src/objects/map-updater.h", - "src/objects/map.cc", - "src/objects/map.h", - "src/objects/maybe-object-inl.h", "src/objects/maybe-object.h", - "src/objects/megadom-handler-inl.h", + "src/objects/maybe-object-inl.h", "src/objects/megadom-handler.h", - "src/objects/microtask-inl.h", + "src/objects/megadom-handler-inl.h", "src/objects/microtask.h", - "src/objects/module-inl.h", + "src/objects/microtask-inl.h", "src/objects/module.cc", "src/objects/module.h", - "src/objects/name-inl.h", + "src/objects/module-inl.h", "src/objects/name.h", + "src/objects/name-inl.h", "src/objects/object-list-macros.h", - "src/objects/object-macros-undef.h", "src/objects/object-macros.h", + "src/objects/object-macros-undef.h", "src/objects/object-type.cc", "src/objects/object-type.h", - "src/objects/objects-body-descriptors-inl.h", - "src/objects/objects-body-descriptors.h", - "src/objects/objects-inl.h", "src/objects/objects.cc", "src/objects/objects.h", + "src/objects/objects-body-descriptors.h", + "src/objects/objects-body-descriptors-inl.h", "src/objects/objects-definitions.h", - "src/objects/oddball-inl.h", + "src/objects/objects-inl.h", "src/objects/oddball.h", - "src/objects/option-utils.h", + "src/objects/oddball-inl.h", + "src/objects/hole.h", + "src/objects/hole-inl.h", "src/objects/option-utils.cc", - "src/objects/ordered-hash-table-inl.h", + "src/objects/option-utils.h", "src/objects/ordered-hash-table.cc", "src/objects/ordered-hash-table.h", - "src/objects/primitive-heap-object-inl.h", + "src/objects/ordered-hash-table-inl.h", "src/objects/primitive-heap-object.h", - "src/objects/promise-inl.h", + "src/objects/primitive-heap-object-inl.h", "src/objects/promise.h", - "src/objects/property-array-inl.h", + "src/objects/promise-inl.h", + "src/objects/property.cc", + "src/objects/property.h", "src/objects/property-array.h", - "src/objects/property-cell-inl.h", + "src/objects/property-array-inl.h", "src/objects/property-cell.h", - "src/objects/property-descriptor-object-inl.h", - "src/objects/property-descriptor-object.h", + "src/objects/property-cell-inl.h", "src/objects/property-descriptor.cc", "src/objects/property-descriptor.h", + "src/objects/property-descriptor-object.h", + "src/objects/property-descriptor-object-inl.h", "src/objects/property-details.h", - "src/objects/property.cc", - "src/objects/property.h", - "src/objects/prototype-info-inl.h", - "src/objects/prototype-info.h", "src/objects/prototype.h", + "src/objects/prototype-info.h", + "src/objects/prototype-info-inl.h", "src/objects/prototype-inl.h", - "src/objects/regexp-match-info-inl.h", "src/objects/regexp-match-info.h", - "src/objects/scope-info-inl.h", + "src/objects/regexp-match-info-inl.h", "src/objects/scope-info.cc", "src/objects/scope-info.h", - "src/objects/script-inl.h", + "src/objects/scope-info-inl.h", "src/objects/script.h", - "src/objects/shared-function-info-inl.h", + "src/objects/script-inl.h", "src/objects/shared-function-info.cc", "src/objects/shared-function-info.h", + "src/objects/shared-function-info-inl.h", "src/objects/simd.cc", "src/objects/simd.h", + "src/objects/slots.h", "src/objects/slots-atomic-inl.h", "src/objects/slots-inl.h", - "src/objects/slots.h", - "src/objects/smi-inl.h", "src/objects/smi.h", + "src/objects/smi-inl.h", "src/objects/source-text-module.cc", "src/objects/source-text-module.h", "src/objects/source-text-module-inl.h", + "src/objects/string.cc", + "src/objects/string.h", "src/objects/string-comparator.cc", "src/objects/string-comparator.h", - "src/objects/string-inl.h", - "src/objects/string-set-inl.h", - "src/objects/string-set.h", - "src/objects/string-forwarding-table-inl.h", "src/objects/string-forwarding-table.cc", "src/objects/string-forwarding-table.h", - "src/objects/string-table-inl.h", + "src/objects/string-forwarding-table-inl.h", + "src/objects/string-inl.h", + "src/objects/string-set.h", + "src/objects/string-set-inl.h", "src/objects/string-table.cc", - "src/objects/symbol-table.cc", "src/objects/string-table.h", - "src/objects/string.cc", - "src/objects/string.h", - "src/objects/struct-inl.h", + "src/objects/string-table-inl.h", "src/objects/struct.h", + "src/objects/struct-inl.h", "src/objects/swiss-hash-table-helpers.h", - "src/objects/swiss-name-dictionary-inl.h", "src/objects/swiss-name-dictionary.cc", "src/objects/swiss-name-dictionary.h", - "src/objects/synthetic-module-inl.h", + "src/objects/swiss-name-dictionary-inl.h", + "src/objects/symbol-table.cc", "src/objects/synthetic-module.cc", "src/objects/synthetic-module.h", - "src/objects/tagged-field-inl.h", + "src/objects/synthetic-module-inl.h", + "src/objects/tagged.h", "src/objects/tagged-field.h", - "src/objects/tagged-impl-inl.h", + "src/objects/tagged-field-inl.h", "src/objects/tagged-impl.cc", "src/objects/tagged-impl.h", + "src/objects/tagged-impl-inl.h", "src/objects/tagged-index.h", - "src/objects/tagged-value-inl.h", "src/objects/tagged-value.h", - "src/objects/template-objects-inl.h", + "src/objects/tagged-value-inl.h", "src/objects/template-objects.cc", "src/objects/template-objects.h", - "src/objects/templates-inl.h", + "src/objects/template-objects-inl.h", "src/objects/templates.cc", "src/objects/templates.h", - "src/objects/torque-defined-classes-inl.h", + "src/objects/templates-inl.h", "src/objects/torque-defined-classes.h", - "src/objects/transitions-inl.h", + "src/objects/torque-defined-classes-inl.h", "src/objects/transitions.cc", "src/objects/transitions.h", - "src/objects/turbofan-types-inl.h", + "src/objects/transitions-inl.h", "src/objects/turbofan-types.h", - "src/objects/turboshaft-types-inl.h", + "src/objects/turbofan-types-inl.h", "src/objects/turboshaft-types.h", + "src/objects/turboshaft-types-inl.h", "src/objects/type-hints.cc", "src/objects/type-hints.h", "src/objects/value-serializer.cc", "src/objects/value-serializer.h", "src/objects/visitors.cc", - "src/objects/visitors-inl.h", "src/objects/visitors.h", + "src/objects/visitors-inl.h", "src/parsing/expression-scope.h", "src/parsing/func-name-inferrer.cc", "src/parsing/func-name-inferrer.h", @@ -1963,44 +2054,44 @@ filegroup( "src/parsing/literal-buffer.h", "src/parsing/parse-info.cc", "src/parsing/parse-info.h", - "src/parsing/parser-base.h", "src/parsing/parser.cc", "src/parsing/parser.h", + "src/parsing/parser-base.h", "src/parsing/parsing.cc", "src/parsing/parsing.h", "src/parsing/pending-compilation-error-handler.cc", "src/parsing/pending-compilation-error-handler.h", - "src/parsing/preparse-data-impl.h", "src/parsing/preparse-data.cc", "src/parsing/preparse-data.h", - "src/parsing/preparser-logger.h", + "src/parsing/preparse-data-impl.h", "src/parsing/preparser.cc", "src/parsing/preparser.h", + "src/parsing/preparser-logger.h", "src/parsing/rewriter.cc", "src/parsing/rewriter.h", - "src/parsing/scanner-character-streams.cc", - "src/parsing/scanner-character-streams.h", "src/parsing/scanner.cc", "src/parsing/scanner.h", + "src/parsing/scanner-character-streams.cc", + "src/parsing/scanner-character-streams.h", "src/parsing/scanner-inl.h", "src/parsing/token.cc", "src/parsing/token.h", "src/profiler/allocation-tracker.cc", "src/profiler/allocation-tracker.h", - "src/profiler/circular-queue-inl.h", "src/profiler/circular-queue.h", - "src/profiler/cpu-profiler-inl.h", + "src/profiler/circular-queue-inl.h", "src/profiler/cpu-profiler.cc", "src/profiler/cpu-profiler.h", + "src/profiler/cpu-profiler-inl.h", "src/profiler/heap-profiler.cc", "src/profiler/heap-profiler.h", - "src/profiler/heap-snapshot-generator-inl.h", "src/profiler/heap-snapshot-generator.cc", "src/profiler/heap-snapshot-generator.h", + "src/profiler/heap-snapshot-generator-inl.h", "src/profiler/output-stream-writer.h", - "src/profiler/profile-generator-inl.h", "src/profiler/profile-generator.cc", "src/profiler/profile-generator.h", + "src/profiler/profile-generator-inl.h", "src/profiler/profiler-listener.cc", "src/profiler/profiler-listener.h", "src/profiler/profiler-stats.cc", @@ -2015,28 +2106,30 @@ filegroup( "src/profiler/tick-sample.h", "src/profiler/tracing-cpu-profiler.cc", "src/profiler/tracing-cpu-profiler.h", - "src/profiler/weak-code-registry.h", "src/profiler/weak-code-registry.cc", + "src/profiler/weak-code-registry.h", + "src/regexp/experimental/experimental.cc", + "src/regexp/experimental/experimental.h", "src/regexp/experimental/experimental-bytecode.cc", "src/regexp/experimental/experimental-bytecode.h", "src/regexp/experimental/experimental-compiler.cc", "src/regexp/experimental/experimental-compiler.h", "src/regexp/experimental/experimental-interpreter.cc", "src/regexp/experimental/experimental-interpreter.h", - "src/regexp/experimental/experimental.cc", - "src/regexp/experimental/experimental.h", + "src/regexp/regexp.cc", + "src/regexp/regexp.h", "src/regexp/regexp-ast.cc", "src/regexp/regexp-ast.h", - "src/regexp/regexp-bytecode-generator-inl.h", "src/regexp/regexp-bytecode-generator.cc", "src/regexp/regexp-bytecode-generator.h", + "src/regexp/regexp-bytecode-generator-inl.h", "src/regexp/regexp-bytecode-peephole.cc", "src/regexp/regexp-bytecode-peephole.h", "src/regexp/regexp-bytecodes.cc", "src/regexp/regexp-bytecodes.h", - "src/regexp/regexp-compiler-tonode.cc", "src/regexp/regexp-compiler.cc", "src/regexp/regexp-compiler.h", + "src/regexp/regexp-compiler-tonode.cc", "src/regexp/regexp-dotprinter.cc", "src/regexp/regexp-dotprinter.h", "src/regexp/regexp-error.cc", @@ -2044,11 +2137,11 @@ filegroup( "src/regexp/regexp-flags.h", "src/regexp/regexp-interpreter.cc", "src/regexp/regexp-interpreter.h", + "src/regexp/regexp-macro-assembler.cc", + "src/regexp/regexp-macro-assembler.h", "src/regexp/regexp-macro-assembler-arch.h", "src/regexp/regexp-macro-assembler-tracer.cc", "src/regexp/regexp-macro-assembler-tracer.h", - "src/regexp/regexp-macro-assembler.cc", - "src/regexp/regexp-macro-assembler.h", "src/regexp/regexp-nodes.h", "src/regexp/regexp-parser.cc", "src/regexp/regexp-parser.h", @@ -2056,13 +2149,13 @@ filegroup( "src/regexp/regexp-stack.h", "src/regexp/regexp-utils.cc", "src/regexp/regexp-utils.h", - "src/regexp/regexp.cc", - "src/regexp/regexp.h", "src/regexp/special-case.h", - "src/roots/roots-inl.h", "src/roots/roots.cc", "src/roots/roots.h", + "src/roots/roots-inl.h", "src/roots/static-roots.h", + "src/runtime/runtime.cc", + "src/runtime/runtime.h", "src/runtime/runtime-array.cc", "src/runtime/runtime-atomics.cc", "src/runtime/runtime-bigint.cc", @@ -2094,28 +2187,28 @@ filegroup( "src/runtime/runtime-typedarray.cc", "src/runtime/runtime-utils.h", "src/runtime/runtime-weak-refs.cc", - "src/runtime/runtime.cc", - "src/runtime/runtime.h", - "src/sandbox/external-pointer-inl.h", + "src/sandbox/bounded-size.h", + "src/sandbox/bounded-size-inl.h", "src/sandbox/external-pointer.h", + "src/sandbox/external-pointer-inl.h", "src/sandbox/external-pointer-table.cc", - "src/sandbox/external-pointer-table-inl.h", "src/sandbox/external-pointer-table.h", - "src/sandbox/testing.cc", - "src/sandbox/testing.h", + "src/sandbox/external-pointer-table-inl.h", + "src/sandbox/code-pointer-table.cc", + "src/sandbox/code-pointer-table.h", + "src/sandbox/code-pointer-table-inl.h", + "src/sandbox/code-pointer.h", + "src/sandbox/code-pointer-inl.h", + "src/sandbox/indirect-pointer.h", + "src/sandbox/indirect-pointer-inl.h", + "src/sandbox/external-entity-table.h", + "src/sandbox/external-entity-table-inl.h", "src/sandbox/sandbox.cc", "src/sandbox/sandbox.h", - "src/sandbox/sandboxed-pointer-inl.h", "src/sandbox/sandboxed-pointer.h", - "src/sandbox/bounded-size-inl.h", - "src/sandbox/bounded-size.h", - "src/base/sanitizer/asan.h", - "src/base/sanitizer/lsan-page-allocator.cc", - "src/base/sanitizer/lsan-page-allocator.h", - "src/base/sanitizer/lsan-virtual-address-space.cc", - "src/base/sanitizer/lsan-virtual-address-space.h", - "src/base/sanitizer/msan.h", - "src/base/sanitizer/tsan.h", + "src/sandbox/sandboxed-pointer-inl.h", + "src/sandbox/testing.cc", + "src/sandbox/testing.h", "src/snapshot/code-serializer.cc", "src/snapshot/code-serializer.h", "src/snapshot/context-deserializer.cc", @@ -2125,55 +2218,60 @@ filegroup( "src/snapshot/deserializer.cc", "src/snapshot/deserializer.h", "src/snapshot/embedded/embedded-data.cc", - "src/snapshot/embedded/embedded-data-inl.h", "src/snapshot/embedded/embedded-data.h", + "src/snapshot/embedded/embedded-data-inl.h", + "src/snapshot/embedded/embedded-file-writer.h", "src/snapshot/embedded/embedded-file-writer-interface.h", + "src/snapshot/embedded/platform-embedded-file-writer-base.h", "src/snapshot/object-deserializer.cc", "src/snapshot/object-deserializer.h", "src/snapshot/read-only-deserializer.cc", "src/snapshot/read-only-deserializer.h", "src/snapshot/read-only-serializer.cc", "src/snapshot/read-only-serializer.h", + "src/snapshot/read-only-serializer-deserializer.h", "src/snapshot/references.h", "src/snapshot/roots-serializer.cc", "src/snapshot/roots-serializer.h", + "src/snapshot/serializer.cc", + "src/snapshot/serializer.h", "src/snapshot/serializer-deserializer.cc", "src/snapshot/serializer-deserializer.h", - "src/snapshot/serializer.cc", "src/snapshot/serializer-inl.h", - "src/snapshot/serializer.h", - "src/snapshot/shared-heap-deserializer.h", "src/snapshot/shared-heap-deserializer.cc", - "src/snapshot/shared-heap-serializer.h", + "src/snapshot/shared-heap-deserializer.h", "src/snapshot/shared-heap-serializer.cc", + "src/snapshot/shared-heap-serializer.h", + "src/snapshot/snapshot.cc", + "src/snapshot/snapshot.h", "src/snapshot/snapshot-data.cc", "src/snapshot/snapshot-data.h", "src/snapshot/snapshot-source-sink.cc", "src/snapshot/snapshot-source-sink.h", "src/snapshot/snapshot-utils.cc", "src/snapshot/snapshot-utils.h", - "src/snapshot/snapshot.cc", - "src/snapshot/snapshot.h", + "src/snapshot/sort-builtins.cc", + "src/snapshot/sort-builtins.h", "src/snapshot/startup-deserializer.cc", "src/snapshot/startup-deserializer.h", "src/snapshot/startup-serializer.cc", "src/snapshot/startup-serializer.h", - "src/strings/char-predicates-inl.h", "src/strings/char-predicates.h", - "src/strings/string-builder-inl.h", + "src/strings/char-predicates-inl.h", "src/strings/string-builder.cc", + "src/strings/string-builder-inl.h", "src/strings/string-case.cc", "src/strings/string-case.h", - "src/strings/string-hasher-inl.h", "src/strings/string-hasher.h", + "src/strings/string-hasher-inl.h", "src/strings/string-search.h", "src/strings/string-stream.cc", "src/strings/string-stream.h", + "src/strings/unicode.cc", + "src/strings/unicode.h", "src/strings/unicode-decoder.cc", "src/strings/unicode-decoder.h", "src/strings/unicode-inl.h", - "src/strings/unicode.cc", - "src/strings/unicode.h", "src/strings/uri.cc", "src/strings/uri.h", "src/tasks/cancelable-task.cc", @@ -2184,10 +2282,10 @@ filegroup( "src/tasks/task-utils.h", "src/temporal/temporal-parser.cc", "src/temporal/temporal-parser.h", - "src/torque/runtime-macro-shims.h", "src/third_party/siphash/halfsiphash.cc", "src/third_party/siphash/halfsiphash.h", "src/third_party/utf8-decoder/utf8-decoder.h", + "src/torque/runtime-macro-shims.h", "src/tracing/trace-event.cc", "src/tracing/trace-event.h", "src/tracing/traced-value.cc", @@ -2207,8 +2305,8 @@ filegroup( "src/utils/hex-format.h", "src/utils/identity-map.cc", "src/utils/identity-map.h", - "src/utils/locked-queue-inl.h", "src/utils/locked-queue.h", + "src/utils/locked-queue-inl.h", "src/utils/memcopy.cc", "src/utils/memcopy.h", "src/utils/ostreams.cc", @@ -2217,9 +2315,9 @@ filegroup( "src/utils/sha-256.cc", "src/utils/sha-256.h", "src/utils/sparse-bit-vector.h", - "src/utils/utils-inl.h", "src/utils/utils.cc", "src/utils/utils.h", + "src/utils/utils-inl.h", "src/utils/version.cc", "src/utils/version.h", "src/zone/accounting-allocator.cc", @@ -2227,42 +2325,42 @@ filegroup( "src/zone/compressed-zone-ptr.h", "src/zone/type-stats.cc", "src/zone/type-stats.h", + "src/zone/zone.cc", + "src/zone/zone.h", "src/zone/zone-allocator.h", "src/zone/zone-chunk-list.h", + "src/zone/zone-compact-set.h", "src/zone/zone-compression.h", "src/zone/zone-containers.h", - "src/zone/zone-handle-set.h", "src/zone/zone-hashmap.h", - "src/zone/zone-list-inl.h", "src/zone/zone-list.h", + "src/zone/zone-list-inl.h", "src/zone/zone-segment.cc", "src/zone/zone-segment.h", "src/zone/zone-type-traits.h", "src/zone/zone-utils.h", - "src/zone/zone.cc", - "src/zone/zone.h", - "src/asmjs/asm-js.h", - "src/execution/pointer-authentication-dummy.h", - "src/heap/third-party/heap-api.h", - "src/heap/third-party/heap-api-stub.cc", + ":cppgc_base_files", + ":generated_bytecode_builtins_list", + ":v8_bigint", + ":v8_heap_base_files", ] + select({ "@v8//bazel/config:v8_target_ia32": [ "src/baseline/ia32/baseline-assembler-ia32-inl.h", "src/baseline/ia32/baseline-compiler-ia32-inl.h", - "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", - "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc", - "src/codegen/ia32/cpu-ia32.cc", - "src/codegen/ia32/assembler-ia32-inl.h", "src/codegen/ia32/assembler-ia32.cc", "src/codegen/ia32/assembler-ia32.h", + "src/codegen/ia32/assembler-ia32-inl.h", "src/codegen/ia32/constants-ia32.h", + "src/codegen/ia32/cpu-ia32.cc", "src/codegen/ia32/fma-instr.h", "src/codegen/ia32/interface-descriptors-ia32-inl.h", - "src/codegen/ia32/sse-instr.h", "src/codegen/ia32/macro-assembler-ia32.cc", "src/codegen/ia32/macro-assembler-ia32.h", "src/codegen/ia32/register-ia32.h", "src/codegen/ia32/reglist-ia32.h", + "src/codegen/ia32/sse-instr.h", + "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc", + "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", "src/deoptimizer/ia32/deoptimizer-ia32.cc", "src/diagnostics/ia32/disasm-ia32.cc", "src/diagnostics/ia32/unwinder-ia32.cc", @@ -2275,20 +2373,20 @@ filegroup( "@v8//bazel/config:v8_target_x64": [ "src/baseline/x64/baseline-assembler-x64-inl.h", "src/baseline/x64/baseline-compiler-x64-inl.h", - "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc", - "src/codegen/x64/cpu-x64.cc", - "src/codegen/x64/assembler-x64-inl.h", + "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", "src/codegen/x64/assembler-x64.cc", "src/codegen/x64/assembler-x64.h", + "src/codegen/x64/assembler-x64-inl.h", "src/codegen/x64/constants-x64.h", + "src/codegen/x64/cpu-x64.cc", "src/codegen/x64/fma-instr.h", "src/codegen/x64/interface-descriptors-x64-inl.h", - "src/codegen/x64/sse-instr.h", "src/codegen/x64/macro-assembler-x64.cc", "src/codegen/x64/macro-assembler-x64.h", "src/codegen/x64/register-x64.h", "src/codegen/x64/reglist-x64.h", + "src/codegen/x64/sse-instr.h", "src/deoptimizer/x64/deoptimizer-x64.cc", "src/diagnostics/x64/disasm-x64.cc", "src/diagnostics/x64/eh-frame-x64.cc", @@ -2302,9 +2400,9 @@ filegroup( "@v8//bazel/config:v8_target_arm": [ "src/baseline/arm/baseline-assembler-arm-inl.h", "src/baseline/arm/baseline-compiler-arm-inl.h", - "src/codegen/arm/assembler-arm-inl.h", "src/codegen/arm/assembler-arm.cc", "src/codegen/arm/assembler-arm.h", + "src/codegen/arm/assembler-arm-inl.h", "src/codegen/arm/constants-arm.cc", "src/codegen/arm/constants-arm.h", "src/codegen/arm/cpu-arm.cc", @@ -2328,21 +2426,21 @@ filegroup( "@v8//bazel/config:v8_target_arm64": [ "src/baseline/arm64/baseline-assembler-arm64-inl.h", "src/baseline/arm64/baseline-compiler-arm64-inl.h", - "src/codegen/arm64/assembler-arm64-inl.h", "src/codegen/arm64/assembler-arm64.cc", "src/codegen/arm64/assembler-arm64.h", + "src/codegen/arm64/assembler-arm64-inl.h", "src/codegen/arm64/constants-arm64.h", "src/codegen/arm64/cpu-arm64.cc", - "src/codegen/arm64/decoder-arm64-inl.h", "src/codegen/arm64/decoder-arm64.cc", "src/codegen/arm64/decoder-arm64.h", - "src/codegen/arm64/interface-descriptors-arm64-inl.h", - "src/codegen/arm64/instructions-arm64-constants.cc", + "src/codegen/arm64/decoder-arm64-inl.h", "src/codegen/arm64/instructions-arm64.cc", "src/codegen/arm64/instructions-arm64.h", - "src/codegen/arm64/macro-assembler-arm64-inl.h", + "src/codegen/arm64/instructions-arm64-constants.cc", + "src/codegen/arm64/interface-descriptors-arm64-inl.h", "src/codegen/arm64/macro-assembler-arm64.cc", "src/codegen/arm64/macro-assembler-arm64.h", + "src/codegen/arm64/macro-assembler-arm64-inl.h", "src/codegen/arm64/register-arm64.cc", "src/codegen/arm64/register-arm64.h", "src/codegen/arm64/reglist-arm64.h", @@ -2453,8 +2551,8 @@ filegroup( "//conditions:default": [], }) + select({ "@v8//bazel/config:v8_arm64_simulator": [ - "src/trap-handler/trap-handler-simulator.h", "src/trap-handler/handler-outside-simulator.cc", + "src/trap-handler/trap-handler-simulator.h", ], "//conditions:default": [], }) + select({ @@ -2486,17 +2584,15 @@ filegroup( "src/runtime/runtime-test-wasm.cc", "src/runtime/runtime-wasm.cc", "src/third_party/utf8-decoder/generalized-utf8-decoder.h", - "src/trap-handler/handler-inside-posix.h", "src/trap-handler/handler-inside.cc", + "src/trap-handler/handler-inside-posix.h", "src/trap-handler/handler-outside.cc", "src/trap-handler/handler-shared.cc", - "src/trap-handler/trap-handler-internal.h", "src/trap-handler/trap-handler.h", - "src/wasm/assembler-buffer-cache.cc", - "src/wasm/assembler-buffer-cache.h", + "src/trap-handler/trap-handler-internal.h", "src/wasm/baseline/liftoff-assembler.cc", - "src/wasm/baseline/liftoff-assembler-defs.h", "src/wasm/baseline/liftoff-assembler.h", + "src/wasm/baseline/liftoff-assembler-defs.h", "src/wasm/baseline/liftoff-compiler.cc", "src/wasm/baseline/liftoff-compiler.h", "src/wasm/baseline/liftoff-register.h", @@ -2537,16 +2633,20 @@ filegroup( "src/wasm/object-access.h", "src/wasm/pgo.cc", "src/wasm/pgo.h", + "src/wasm/serialized-signature-inl.h", "src/wasm/simd-shuffle.cc", "src/wasm/simd-shuffle.h", "src/wasm/stacks.cc", "src/wasm/stacks.h", + "src/wasm/std-object-sizes.h", "src/wasm/streaming-decoder.cc", "src/wasm/streaming-decoder.h", "src/wasm/string-builder.h", "src/wasm/string-builder-multiline.h", "src/wasm/struct-types.h", "src/wasm/sync-streaming-decoder.cc", + "src/wasm/turboshaft-graph-interface.cc", + "src/wasm/turboshaft-graph-interface.h", "src/wasm/value-type.cc", "src/wasm/value-type.h", "src/wasm/wasm-arguments.h", @@ -2565,15 +2665,14 @@ filegroup( "src/wasm/wasm-features.h", "src/wasm/wasm-import-wrapper-cache.cc", "src/wasm/wasm-import-wrapper-cache.h", - "src/wasm/wasm-init-expr.cc", "src/wasm/wasm-init-expr.h", "src/wasm/wasm-js.cc", "src/wasm/wasm-js.h", "src/wasm/wasm-linkage.h", - "src/wasm/wasm-module-builder.cc", - "src/wasm/wasm-module-builder.h", "src/wasm/wasm-module.cc", "src/wasm/wasm-module.h", + "src/wasm/wasm-module-builder.cc", + "src/wasm/wasm-module-builder.h", "src/wasm/wasm-module-sourcemap.cc", "src/wasm/wasm-module-sourcemap.h", "src/wasm/wasm-objects.cc", @@ -2677,6 +2776,7 @@ filegroup( "src/compiler/backend/instruction-scheduler.h", "src/compiler/backend/instruction-selector.cc", "src/compiler/backend/instruction-selector.h", + "src/compiler/backend/instruction-selector-adapter.h", "src/compiler/backend/instruction-selector-impl.h", "src/compiler/backend/jump-threading.cc", "src/compiler/backend/jump-threading.h", @@ -2774,6 +2874,7 @@ filegroup( "src/compiler/js-graph.h", "src/compiler/js-heap-broker.cc", "src/compiler/js-heap-broker.h", + "src/compiler/js-heap-broker-inl.h", "src/compiler/js-inlining.cc", "src/compiler/js-inlining.h", "src/compiler/js-inlining-heuristic.cc", @@ -2840,6 +2941,8 @@ filegroup( "src/compiler/operator-properties.h", "src/compiler/osr.cc", "src/compiler/osr.h", + "src/compiler/pair-load-store-reducer.cc", + "src/compiler/pair-load-store-reducer.h", "src/compiler/per-isolate-compiler-cache.h", "src/compiler/persistent-map.h", "src/compiler/phase.h", @@ -2875,11 +2978,11 @@ filegroup( "src/compiler/state-values-utils.cc", "src/compiler/state-values-utils.h", "src/compiler/store-store-elimination.cc", + "src/compiler/store-store-elimination.h", "src/compiler/string-builder-optimizer.cc", "src/compiler/string-builder-optimizer.h", - "src/compiler/store-store-elimination.h", - "src/compiler/turbofan-enabled.cc", "src/compiler/turbofan.h", + "src/compiler/turbofan-enabled.cc", "src/compiler/turboshaft/assembler.cc", "src/compiler/turboshaft/assembler.h", "src/compiler/turboshaft/assert-types-reducer.h", @@ -2890,24 +2993,32 @@ filegroup( "src/compiler/turboshaft/dead-code-elimination-phase.cc", "src/compiler/turboshaft/dead-code-elimination-phase.h", "src/compiler/turboshaft/dead-code-elimination-reducer.h", + "src/compiler/turboshaft/debug-feature-lowering-phase.cc", + "src/compiler/turboshaft/debug-feature-lowering-phase.h", + "src/compiler/turboshaft/debug-feature-lowering-reducer.h", "src/compiler/turboshaft/decompression-optimization.cc", "src/compiler/turboshaft/decompression-optimization.h", "src/compiler/turboshaft/decompression-optimization-phase.cc", "src/compiler/turboshaft/decompression-optimization-phase.h", "src/compiler/turboshaft/define-assembler-macros.inc", "src/compiler/turboshaft/deopt-data.h", + "src/compiler/turboshaft/doubly-threaded-list.h", + "src/compiler/turboshaft/explicit-truncation-reducer.h", + "src/compiler/turboshaft/fast-api-call-reducer.h", "src/compiler/turboshaft/fast-hash.h", - "src/compiler/turboshaft/graph-builder.cc", - "src/compiler/turboshaft/graph-builder.h", "src/compiler/turboshaft/graph.cc", "src/compiler/turboshaft/graph.h", - "src/compiler/turboshaft/index.h", + "src/compiler/turboshaft/graph-builder.cc", + "src/compiler/turboshaft/graph-builder.h", "src/compiler/turboshaft/graph-visualizer.cc", "src/compiler/turboshaft/graph-visualizer.h", - "src/compiler/turboshaft/late-escape-analysis-reducer.h", + "src/compiler/turboshaft/index.h", + "src/compiler/turboshaft/instruction-selection-phase.cc", + "src/compiler/turboshaft/instruction-selection-phase.h", "src/compiler/turboshaft/late-escape-analysis-reducer.cc", - "src/compiler/turboshaft/late-optimization-phase.cc", - "src/compiler/turboshaft/late-optimization-phase.h", + "src/compiler/turboshaft/late-escape-analysis-reducer.h", + "src/compiler/turboshaft/late-load-elimination-reducer.cc", + "src/compiler/turboshaft/late-load-elimination-reducer.h", "src/compiler/turboshaft/layered-hash-map.h", "src/compiler/turboshaft/machine-lowering-phase.cc", "src/compiler/turboshaft/machine-lowering-phase.h", @@ -2915,51 +3026,59 @@ filegroup( "src/compiler/turboshaft/machine-optimization-reducer.h", "src/compiler/turboshaft/memory-optimization-reducer.cc", "src/compiler/turboshaft/memory-optimization-reducer.h", + "src/compiler/turboshaft/operation-matcher.h", "src/compiler/turboshaft/operations.cc", "src/compiler/turboshaft/operations.h", - "src/compiler/turboshaft/operation-matching.h", "src/compiler/turboshaft/optimization-phase.cc", "src/compiler/turboshaft/optimization-phase.h", "src/compiler/turboshaft/optimize-phase.cc", "src/compiler/turboshaft/optimize-phase.h", "src/compiler/turboshaft/phase.cc", "src/compiler/turboshaft/phase.h", + "src/compiler/turboshaft/pretenuring-propagation-reducer.cc", + "src/compiler/turboshaft/pretenuring-propagation-reducer.h", "src/compiler/turboshaft/recreate-schedule.cc", "src/compiler/turboshaft/recreate-schedule.h", "src/compiler/turboshaft/recreate-schedule-phase.cc", "src/compiler/turboshaft/recreate-schedule-phase.h", + "src/compiler/turboshaft/reduce-args-helper.h", "src/compiler/turboshaft/reducer-traits.h", "src/compiler/turboshaft/representations.cc", "src/compiler/turboshaft/representations.h", + "src/compiler/turboshaft/required-optimization-reducer.h", "src/compiler/turboshaft/runtime-call-descriptors.h", "src/compiler/turboshaft/select-lowering-reducer.h", "src/compiler/turboshaft/sidetable.h", "src/compiler/turboshaft/simplify-tf-loops.cc", "src/compiler/turboshaft/simplify-tf-loops.h", "src/compiler/turboshaft/snapshot-table.h", - "src/compiler/turboshaft/tag-untag-lowering-phase.cc", - "src/compiler/turboshaft/tag-untag-lowering-phase.h", - "src/compiler/turboshaft/tag-untag-lowering-reducer.h", + "src/compiler/turboshaft/store-store-elimination-phase.cc", + "src/compiler/turboshaft/store-store-elimination-phase.h", + "src/compiler/turboshaft/store-store-elimination-reducer.h", + "src/compiler/turboshaft/structural-optimization-reducer.h", "src/compiler/turboshaft/tracing.h", - "src/compiler/turboshaft/type-inference-analysis.h", - "src/compiler/turboshaft/type-inference-reducer.h", - "src/compiler/turboshaft/typer.cc", - "src/compiler/turboshaft/typer.h", "src/compiler/turboshaft/type-assertions-phase.cc", "src/compiler/turboshaft/type-assertions-phase.h", + "src/compiler/turboshaft/type-inference-analysis.h", + "src/compiler/turboshaft/type-inference-reducer.h", "src/compiler/turboshaft/type-parser.cc", "src/compiler/turboshaft/type-parser.h", "src/compiler/turboshaft/typed-optimizations-phase.cc", "src/compiler/turboshaft/typed-optimizations-phase.h", "src/compiler/turboshaft/typed-optimizations-reducer.h", + "src/compiler/turboshaft/typer.cc", + "src/compiler/turboshaft/typer.h", "src/compiler/turboshaft/types.cc", "src/compiler/turboshaft/types.h", "src/compiler/turboshaft/undef-assembler-macros.inc", "src/compiler/turboshaft/uniform-reducer-adapter.h", + "src/compiler/turboshaft/use-map.cc", + "src/compiler/turboshaft/use-map.h", "src/compiler/turboshaft/utils.cc", "src/compiler/turboshaft/utils.h", "src/compiler/turboshaft/value-numbering-reducer.h", "src/compiler/turboshaft/variable-reducer.h", + "src/compiler/turboshaft/wasm-js-lowering-reducer.h", "src/compiler/type-cache.cc", "src/compiler/type-cache.h", "src/compiler/type-narrowing-reducer.cc", @@ -3035,17 +3154,24 @@ filegroup( ":is_v8_enable_webassembly": [ "src/compiler/int64-lowering.cc", "src/compiler/int64-lowering.h", + "src/compiler/turboshaft/int64-lowering-phase.cc", + "src/compiler/turboshaft/int64-lowering-phase.h", + "src/compiler/turboshaft/int64-lowering-reducer.h", + "src/compiler/turboshaft/wasm-lowering-reducer.h", + "src/compiler/turboshaft/wasm-optimize-phase.cc", + "src/compiler/turboshaft/wasm-optimize-phase.h", + "src/compiler/turboshaft/wasm-turboshaft-compiler.cc", + "src/compiler/turboshaft/wasm-turboshaft-compiler.h", + "src/compiler/wasm-address-reassociation.cc", + "src/compiler/wasm-address-reassociation.h", "src/compiler/wasm-call-descriptors.cc", "src/compiler/wasm-call-descriptors.h", - "src/compiler/wasm-compiler-definitions.h", "src/compiler/wasm-compiler.cc", "src/compiler/wasm-compiler.h", + "src/compiler/wasm-compiler-definitions.cc", + "src/compiler/wasm-compiler-definitions.h", "src/compiler/wasm-escape-analysis.cc", "src/compiler/wasm-escape-analysis.h", - "src/compiler/wasm-load-elimination.cc", - "src/compiler/wasm-load-elimination.h", - "src/compiler/wasm-loop-peeling.cc", - "src/compiler/wasm-loop-peeling.h", "src/compiler/wasm-gc-lowering.cc", "src/compiler/wasm-gc-lowering.h", "src/compiler/wasm-gc-operator-reducer.cc", @@ -3056,6 +3182,12 @@ filegroup( "src/compiler/wasm-inlining.h", "src/compiler/wasm-inlining-into-js.cc", "src/compiler/wasm-inlining-into-js.h", + "src/compiler/wasm-load-elimination.cc", + "src/compiler/wasm-load-elimination.h", + "src/compiler/wasm-loop-peeling.cc", + "src/compiler/wasm-loop-peeling.h", + "src/compiler/wasm-js-lowering.cc", + "src/compiler/wasm-js-lowering.h", "src/compiler/wasm-typer.cc", "src/compiler/wasm-typer.h", ], @@ -3079,9 +3211,9 @@ filegroup( "src/builtins/builtins-call-gen.h", "src/builtins/builtins-collections-gen.cc", "src/builtins/builtins-collections-gen.h", + "src/builtins/builtins-constructor.h", "src/builtins/builtins-constructor-gen.cc", "src/builtins/builtins-constructor-gen.h", - "src/builtins/builtins-constructor.h", "src/builtins/builtins-conversion-gen.cc", "src/builtins/builtins-data-view-gen.h", "src/builtins/builtins-date-gen.cc", @@ -3136,8 +3268,8 @@ filegroup( "src/interpreter/interpreter-generator.h", "src/interpreter/interpreter-intrinsics-generator.cc", "src/interpreter/interpreter-intrinsics-generator.h", - "src/numbers/integer-literal-inl.h", "src/numbers/integer-literal.h", + "src/numbers/integer-literal-inl.h", ] + select({ "@v8//bazel/config:v8_target_ia32": ["src/builtins/ia32/builtins-ia32.cc"], "@v8//bazel/config:v8_target_x64": ["src/builtins/x64/builtins-x64.cc"], @@ -3188,6 +3320,7 @@ filegroup( "src/heap/cppgc/heap.h", "src/heap/cppgc/heap-base.cc", "src/heap/cppgc/heap-base.h", + "src/heap/cppgc/heap-config.h", "src/heap/cppgc/heap-consistency.cc", "src/heap/cppgc/heap-growing.cc", "src/heap/cppgc/heap-growing.h", @@ -3201,8 +3334,6 @@ filegroup( "src/heap/cppgc/heap-statistics-collector.cc", "src/heap/cppgc/heap-statistics-collector.h", "src/heap/cppgc/heap-visitor.h", - "src/heap/cppgc/incremental-marking-schedule.cc", - "src/heap/cppgc/incremental-marking-schedule.h", "src/heap/cppgc/liveness-broker.cc", "src/heap/cppgc/liveness-broker.h", "src/heap/cppgc/logging.cc", @@ -3244,12 +3375,10 @@ filegroup( "src/heap/cppgc/raw-heap.h", "src/heap/cppgc/remembered-set.cc", "src/heap/cppgc/remembered-set.h", - "src/heap/cppgc/source-location.cc", "src/heap/cppgc/stats-collector.cc", "src/heap/cppgc/stats-collector.h", "src/heap/cppgc/sweeper.cc", "src/heap/cppgc/sweeper.h", - "src/heap/cppgc/heap-config.h", "src/heap/cppgc/task-handle.h", "src/heap/cppgc/trace-event.h", "src/heap/cppgc/trace-trait.cc", @@ -3269,6 +3398,9 @@ filegroup( "src/heap/base/active-system-pages.cc", "src/heap/base/active-system-pages.h", "src/heap/base/basic-slot-set.h", + "src/heap/base/bytes.h", + "src/heap/base/incremental-marking-schedule.cc", + "src/heap/base/incremental-marking-schedule.h", "src/heap/base/stack.cc", "src/heap/base/stack.h", "src/heap/base/worklist.cc", @@ -3332,10 +3464,10 @@ filegroup( "src/snapshot/embedded/platform-embedded-file-writer-mac.h", "src/snapshot/embedded/platform-embedded-file-writer-win.cc", "src/snapshot/embedded/platform-embedded-file-writer-win.h", - "src/snapshot/static-roots-gen.cc", - "src/snapshot/static-roots-gen.h", "src/snapshot/mksnapshot.cc", "src/snapshot/snapshot-empty.cc", + "src/snapshot/static-roots-gen.cc", + "src/snapshot/static-roots-gen.h", ], ) @@ -3376,12 +3508,16 @@ filegroup( "src/inspector/v8-debugger-id.h", "src/inspector/v8-debugger-script.cc", "src/inspector/v8-debugger-script.h", + "src/inspector/v8-deep-serializer.cc", + "src/inspector/v8-deep-serializer.h", "src/inspector/v8-heap-profiler-agent-impl.cc", "src/inspector/v8-heap-profiler-agent-impl.h", "src/inspector/v8-inspector-impl.cc", "src/inspector/v8-inspector-impl.h", "src/inspector/v8-inspector-session-impl.cc", "src/inspector/v8-inspector-session-impl.h", + "src/inspector/v8-serialization-duplicate-tracker.cc", + "src/inspector/v8-serialization-duplicate-tracker.h", "src/inspector/v8-profiler-agent-impl.cc", "src/inspector/v8-profiler-agent-impl.h", "src/inspector/v8-regex.cc", @@ -3396,8 +3532,6 @@ filegroup( "src/inspector/v8-string-conversions.h", "src/inspector/v8-value-utils.cc", "src/inspector/v8-value-utils.h", - "src/inspector/v8-webdriver-serializer.cc", - "src/inspector/v8-webdriver-serializer.h", "src/inspector/value-mirror.cc", "src/inspector/value-mirror.h", ":crdtp_platform_files", @@ -3495,10 +3629,36 @@ filegroup( # Generated files # ================================================= +# Define file groups for torque definitions and initializers. Both are +# generated together, but we can use output_group to split them. +filegroup( + name = "icu/generated_torque_definitions", + srcs = [":icu/generated_torque_files"], + output_group = "definitions", +) + +filegroup( + name = "noicu/generated_torque_definitions", + srcs = [":noicu/generated_torque_files"], + output_group = "definitions", +) + +filegroup( + name = "icu/generated_torque_initializers", + srcs = [":icu/generated_torque_files"], + output_group = "initializers", +) + +filegroup( + name = "noicu/generated_torque_initializers", + srcs = [":noicu/generated_torque_files"], + output_group = "initializers", +) + # TODO(victorgomes): Add support to tools/debug_helper, # which needs class-debug-readers and debug-macros. -v8_torque_definitions( - name = "generated_torque_definitions", +v8_torque_files( + name = "generated_torque_files", args = select({ ":is_v8_annotate_torque_ir": ["-annotate-ir"], "//conditions:default": [], @@ -3506,7 +3666,13 @@ v8_torque_definitions( "@v8//bazel/config:v8_target_is_32_bits": ["-m32"], "//conditions:default": [], }), - extras = [ + initializer_extras = [ + "csa-types.h", + "enum-verifiers.cc", + "exported-macros-assembler.cc", + "exported-macros-assembler.h", + ], + definition_extras = [ "bit-fields.h", "builtin-definitions.h", # "class-debug-readers.cc", @@ -3523,25 +3689,7 @@ v8_torque_definitions( "objects-body-descriptors-inl.inc", "objects-printer.cc", "visitor-lists.h", - ], - icu_srcs = [":icu/torque_files"], - noicu_srcs = [":noicu/torque_files"], -) -v8_torque_initializers( - name = "generated_torque_initializers", - args = select({ - ":is_v8_annotate_torque_ir": ["-annotate-ir"], - "//conditions:default": [], - }) + select({ - "@v8//bazel/config:v8_target_is_32_bits": ["-m32"], - "//conditions:default": [], - }), - extras = [ - "csa-types.h", - "enum-verifiers.cc", - "exported-macros-assembler.cc", - "exported-macros-assembler.h", ], icu_srcs = [":icu/torque_files"], noicu_srcs = [":noicu/torque_files"], @@ -3549,7 +3697,6 @@ v8_torque_initializers( py_binary( name = "code_generator", - python_version = "PY3", srcs = [ "third_party/inspector_protocol/code_generator.py", "third_party/inspector_protocol/pdl.py", @@ -3568,6 +3715,8 @@ py_binary( "third_party/inspector_protocol/templates/TypeBuilder_cpp.template", "third_party/inspector_protocol/templates/TypeBuilder_h.template", ], + imports = ["third_party/inspector_protocol/"], + python_version = "PY3", deps = [ requirement("jinja2"), ], @@ -3599,12 +3748,12 @@ genrule( "src/inspector/protocol/Schema.cpp", "src/inspector/protocol/Schema.h", ], - local = 1, cmd = "$(location :code_generator) --jinja_dir . \ --inspector_protocol_dir third_party/inspector_protocol \ --config $(location :src/inspector/inspector_protocol_config.json) \ --config_value protocol.path=$(location :include/js_protocol.pdl) \ --output_base $(@D)/src/inspector", + local = 1, message = "Generating inspector files", tools = [ ":code_generator", @@ -3730,6 +3879,7 @@ cc_library( deps = [ ":torque_base_headers", ":v8_libbase", + "//external:absl_optional", ], ) @@ -3794,7 +3944,12 @@ v8_library( copts = ["-Wno-implicit-fallthrough"], strip_include_prefix = "third_party", visibility = ["//visibility:public"], - deps = [":noicu/v8"], + deps = [":noicu/v8"] + select({ + ":is_v8_enable_vtunejit": [ + ":v8_vtune", + ], + "//conditions:default": [], + }), ) alias( @@ -3807,6 +3962,20 @@ alias( actual = "icu/v8", ) +v8_library( + name = "v8_vtune", + srcs = glob([ + "src/third_party/vtune/v8-vtune.h", + "src/third_party/vtune/vtune-jit.cc", + "src/third_party/vtune/vtune-jit.h", + ]), + copts = ["-I"], + deps = [ + ":core_lib_noicu", + "@intel_ittapi//:lib_ittapi", + ], +) + # ================================================= # Binary rules # ================================================= @@ -3842,6 +4011,7 @@ v8_binary( "UNISTR_FROM_CHAR_EXPLICIT=", ], deps = [ + "//external:absl_optional", "//external:icu", ], ) @@ -3856,8 +4026,8 @@ v8_binary( "@v8//bazel/config:is_posix": ["-fexceptions"], "//conditions:default": [], }), - icu_defines = [ "V8_INTL_SUPPORT" ], features = ["-use_header_modules"], + icu_defines = ["V8_INTL_SUPPORT"], linkopts = select({ "@v8//bazel/config:is_android": ["-llog"], "//conditions:default": [], @@ -3878,14 +4048,14 @@ v8_binary( }), copts = ["-Wno-implicit-fallthrough"], icu_deps = [":icu/v8_libshared"], - linkopts = select({ - "@v8//bazel/config:is_android": ["-llog"], - "//conditions:default": [], - }), icu_srcs = [ ":icu/generated_torque_initializers", ":icu/v8_initializers_files", ], + linkopts = select({ + "@v8//bazel/config:is_android": ["-llog"], + "//conditions:default": [], + }), noicu_deps = [":v8_libshared_noicu"], noicu_srcs = [ ":noicu/generated_torque_initializers", @@ -3943,10 +4113,10 @@ py_test( "mjsunit", ], data = [ - "//testing/pybase", - ":noicu/v8_build_config", - ":noicu/d8", "test", + ":noicu/d8", + ":noicu/v8_build_config", + "//testing/pybase", ] + glob(["test/**"]) + glob(["tools/**/*.js"]) + glob(["tools/**/*.mjs"]), main = "tools/run-tests.py", python_version = "PY3", @@ -3973,10 +4143,10 @@ py_test( "mjsunit", ], data = [ - "//testing/pybase", - ":icu/v8_build_config", - ":icu/d8", "test", + ":icu/d8", + ":icu/v8_build_config", + "//testing/pybase", ] + glob(["test/**"]) + glob(["tools/**/*.js"]) + glob(["tools/**/*.mjs"]), main = "tools/run-tests.py", python_version = "PY3", diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 68d92c3477bc2c..dd97c4f922c81a 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -134,7 +134,7 @@ declare_args() { # Mode used by gen-static-roots.py to have a heap layout which is identical # to when v8_enable_static_roots is enabled. - v8_enable_static_root_generation = false + v8_enable_static_roots_generation = false # Enable code-generation-time checking of types in the CodeStubAssembler. v8_enable_verify_csa = false @@ -189,6 +189,15 @@ declare_args() { # used builtins. v8_enable_builtins_profiling_verbose = false + # This build flag is used to input a builtin pgo file containing raw + # execution counts (as opposed to branch hints), which are embedded into + # the `--trace-turbo` .json file from `mksnapshot`. + v8_log_builtins_block_count_input = "" + + # This build flag is used to control whether reorder builtins acoording to + # the call graph with C3 algorithm based builtin PGO profiling. + v8_enable_builtins_reordering = false + # Provides the given V8 log file as an input to mksnapshot, where it can be # used for profile-guided optimization of builtins. # @@ -284,6 +293,9 @@ declare_args() { # Use switch-based dispatch if this is false v8_enable_regexp_interpreter_threaded_dispatch = true + # Enforce equality of builtins hashes from compatible architectures. + v8_verify_builtins_compatibility = false + # Check mksnapshot determinism by running it multiple times. v8_verify_deterministic_mksnapshot = false @@ -309,7 +321,7 @@ declare_args() { # Enable heap reservation of size 4GB. Only possible for 64bit archs. cppgc_enable_caged_heap = v8_current_cpu == "x64" || v8_current_cpu == "arm64" || - v8_current_cpu == "loong64" + v8_current_cpu == "loong64" || v8_current_cpu == "riscv64" # Enables additional heap verification phases and checks. cppgc_enable_verify_heap = "" @@ -325,6 +337,10 @@ declare_args() { # Sets -DV8_ENABLE_SANDBOX. v8_enable_sandbox = "" + # Enable experimental code pointer sandboxing for the V8 sandbox. + # Sets -DV8_CODE_POINTER_SANDBOXING + v8_code_pointer_sandboxing = "" + # Expose the memory corruption API to JavaScript. Useful for testing the sandbox. # WARNING This will expose builtins that (by design) cause memory corruption. # Sets -DV8_EXPOSE_MEMORY_CORRUPTION_API @@ -370,17 +386,6 @@ declare_args() { # This is only used by nodejs. v8_scriptormodule_legacy_lifetime = false - # Change code emission and runtime features to be CET shadow-stack compliant - # (incomplete and experimental). - v8_enable_cet_shadow_stack = false - - # Get VMEX priviledge at startup. - # It allows to run V8 without "deprecated-ambient-replace-as-executable". - # Sets -DV8_USE_VMEX_RESOURCE. - # TODO(victorgomes): Remove this flag once Chormium no longer needs - # the deprecated feature. - v8_fuchsia_use_vmex_resource = is_fuchsia && !build_with_chromium - # Enables pointer compression for 8GB heaps. # Sets -DV8_COMPRESS_POINTERS_8GB. v8_enable_pointer_compression_8gb = "" @@ -399,6 +404,23 @@ declare_args() { # iOS (non-simulator) does not have executable pages for 3rd party # applications yet so disable jit. v8_jitless = v8_enable_lite_mode || target_is_ios_device + + # Enable Maglev's graph printer. + # Sets -DV8_ENABLE_MAGLEV_GRAPH_PRINTER. + v8_enable_maglev_graph_printer = !build_with_chromium + + # Enable slow tracing, e.g., tracing on every instruction or Turbofan node. + # Sets -DV8_ENABLE_SLOW_TRACING. + v8_enable_slow_tracing = is_debug + + # Enable jump table switch for built-in. + v8_enable_builtin_jump_table_switch = v8_current_cpu == "x64" + + v8_shortcut_strings_in_minor_ms = false + + # Whether custom embedder snapshots may extend (= allocate new objects in) + # ReadOnlySpace. + v8_enable_extensible_ro_snapshot = true } # Derived defaults. @@ -478,13 +500,12 @@ if (v8_enable_short_builtin_calls == "") { if (v8_enable_external_code_space == "") { v8_enable_external_code_space = v8_enable_pointer_compression && - (v8_current_cpu == "x64" || - (target_os != "fuchsia" && v8_current_cpu == "arm64")) + (v8_current_cpu == "x64" || v8_current_cpu == "arm64") } if (v8_enable_maglev == "") { v8_enable_maglev = v8_enable_turbofan && - (v8_current_cpu == "x64" || v8_current_cpu == "arm64") && - v8_enable_pointer_compression + (v8_current_cpu == "arm" || v8_current_cpu == "x64" || + v8_current_cpu == "arm64") } assert(v8_enable_turbofan || !v8_enable_maglev, "Maglev is not available when Turbofan is disabled.") @@ -546,6 +567,11 @@ if (v8_enable_sandbox == "") { v8_enable_external_code_space && target_os != "fuchsia" } +if (v8_code_pointer_sandboxing == "") { + # By default, enable code pointer sandboxing if the sandbox is enabled. + v8_code_pointer_sandboxing = v8_enable_sandbox +} + if (v8_enable_static_roots == "") { # Static roots are only valid for builds with pointer compression and a # shared read-only heap. @@ -569,7 +595,7 @@ assert(!v8_enable_static_roots || "Trying to enable static roots in a configuration that is not supported") assert( - !(v8_enable_static_roots && v8_enable_static_root_generation), + !(v8_enable_static_roots && v8_enable_static_roots_generation), "Static root values must be generated in a build that does not rely on static roots itself") if (v8_builtins_profiling_log_file == "default") { @@ -584,20 +610,30 @@ if (v8_builtins_profiling_log_file == "default") { # are accessed, # * v8_enable_webassembly because it changes the set of opcodes which affects # graphs hashes, - # * !is_clang because it might affect argument evaluation order, which - # makes node IDs not predictable for subgraphs like Op1(Op2(), Op3()) and - # as a result different graph hash. if (v8_enable_builtins_optimization && !v8_enable_builtins_profiling && - is_clang && !is_debug && !dcheck_always_on && v8_enable_webassembly) { + !is_debug && !dcheck_always_on && v8_enable_webassembly) { + # This is about function arguments evaluation order, which makes node IDs + # not predictable for subgraphs like Op1(Op2(), Op3()) and as a result + # different graph hashes. + # Clang uses left-to-right order everywhere except Windows, otherwise the + # order is right-to-left. + # TODO(crbug.com/v8/13647): Remove once this issue is fixed in CSA. + if (!is_clang || is_win) { + pgo_profile_suffix = "-rl" + } else { + pgo_profile_suffix = "" + } if ((v8_current_cpu == "x64" || v8_current_cpu == "arm64") && v8_enable_pointer_compression && v8_enable_external_code_space && v8_enable_sandbox) { # Note, currently x64 profile can be applied to arm64 but not the other # way round. - v8_builtins_profiling_log_file = "tools/builtins-pgo/profiles/x64.profile" + v8_builtins_profiling_log_file = + "tools/builtins-pgo/profiles/x64" + pgo_profile_suffix + ".profile" } else if (v8_current_cpu == "x86" || v8_current_cpu == "arm") { # Note, x86 profile can be applied to arm but not the other way round. - v8_builtins_profiling_log_file = "tools/builtins-pgo/profiles/x86.profile" + v8_builtins_profiling_log_file = + "tools/builtins-pgo/profiles/x86" + pgo_profile_suffix + ".profile" } } } @@ -637,6 +673,9 @@ assert(!v8_enable_sandbox || v8_enable_pointer_compression_shared_cage, assert(!v8_enable_sandbox || v8_enable_external_code_space, "The sandbox requires the external code space") +assert(!v8_code_pointer_sandboxing || v8_enable_sandbox, + "Code pointer sandboxing requires the sandbox") + assert(!v8_expose_memory_corruption_api || v8_enable_sandbox, "The Memory Corruption API requires the sandbox") @@ -647,14 +686,16 @@ assert( assert( !v8_enable_pointer_compression_shared_cage || v8_current_cpu == "x64" || v8_current_cpu == "arm64" || v8_current_cpu == "riscv64" || - v8_current_cpu == "ppc64", - "Sharing a pointer compression cage is only supported on x64,arm64, ppc64 and riscv64") + v8_current_cpu == "ppc64" || v8_current_cpu == "s390x" || + v8_current_cpu == "loong64", + "Sharing a pointer compression cage is only supported on x64, arm64, ppc64, s390x, riscv64 and loong64") assert(!v8_enable_unconditional_write_barriers || !v8_disable_write_barriers, "Write barriers can't be both enabled and disabled") assert(!cppgc_enable_caged_heap || v8_current_cpu == "x64" || - v8_current_cpu == "arm64" || v8_current_cpu == "loong64", + v8_current_cpu == "arm64" || v8_current_cpu == "loong64" || + v8_current_cpu == "riscv64", "CppGC caged heap requires 64bit platforms") assert(!cppgc_enable_young_generation || cppgc_enable_caged_heap, @@ -669,10 +710,6 @@ if (v8_enable_single_generation == true) { "Requires unconditional write barriers or none (which disables incremental marking)") } -if (v8_fuchsia_use_vmex_resource) { - assert(target_os == "fuchsia", "VMEX resource only available on Fuchsia") -} - assert(!v8_enable_snapshot_compression || v8_use_zlib, "Snapshot compression requires zlib") @@ -715,7 +752,9 @@ config("internal_config") { } if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { - libs = [ "atomic" ] + if (!is_clang) { + libs = [ "atomic" ] + } } } @@ -787,7 +826,9 @@ config("external_config") { } if (current_cpu == "riscv64" || current_cpu == "riscv32") { - libs = [ "atomic" ] + if (!is_clang) { + libs = [ "atomic" ] + } } } @@ -816,6 +857,7 @@ external_v8_defines = [ "V8_MAP_PACKING", "V8_IS_TSAN", "V8_ENABLE_CONSERVATIVE_STACK_SCANNING", + "V8_ENABLE_DIRECT_LOCAL", ] enabled_external_v8_defines = [] @@ -858,7 +900,12 @@ if (is_tsan) { if (v8_enable_conservative_stack_scanning) { enabled_external_v8_defines += [ "V8_ENABLE_CONSERVATIVE_STACK_SCANNING" ] } - +if (v8_enable_direct_local) { + enabled_external_v8_defines += [ "V8_ENABLE_DIRECT_LOCAL" ] +} +if (v8_shortcut_strings_in_minor_ms) { + enabled_external_v8_defines += [ "V8_MINORMS_STRING_SHORTCUTTING" ] +} disabled_external_v8_defines = external_v8_defines - enabled_external_v8_defines # Put defines that are used in public headers here; public headers are @@ -881,6 +928,7 @@ external_cppgc_defines = [ "CPPGC_SLIM_WRITE_BARRIER", "CPPGC_YOUNG_GENERATION", "CPPGC_POINTER_COMPRESSION", + "CPPGC_ENABLE_LARGER_CAGE", ] enabled_external_cppgc_defines = [] @@ -908,6 +956,9 @@ if (cppgc_enable_pointer_compression) { if (cppgc_enable_2gb_cage) { enabled_external_cppgc_defines += [ "CPPGC_2GB_CAGE" ] } +if (cppgc_enable_larger_cage) { + enabled_external_cppgc_defines += [ "CPPGC_ENABLE_LARGER_CAGE" ] +} if (cppgc_enable_slim_write_barrier) { enabled_external_cppgc_defines += [ "CPPGC_SLIM_WRITE_BARRIER" ] } @@ -954,9 +1005,12 @@ config("features") { if (v8_embedder_string != "") { defines += [ "V8_EMBEDDER_STRING=\"$v8_embedder_string\"" ] } - if (v8_enable_disassembler) { + if (v8_enable_disassembler || v8_log_builtins_block_count_input != "") { defines += [ "ENABLE_DISASSEMBLER" ] } + if (v8_log_builtins_block_count_input != "") { + defines += [ "LOG_BUILTIN_BLOCK_COUNT" ] + } if (v8_promise_internal_field_count != 0) { defines += [ "V8_PROMISE_INTERNAL_FIELD_COUNT=${v8_promise_internal_field_count}" ] @@ -1125,9 +1179,6 @@ config("features") { if (v8_advanced_bigint_algorithms) { defines += [ "V8_ADVANCED_BIGINT_ALGORITHMS" ] } - if (v8_fuchsia_use_vmex_resource) { - defines += [ "V8_USE_VMEX_RESOURCE" ] - } if (v8_expose_memory_corruption_api) { defines += [ "V8_EXPOSE_MEMORY_CORRUPTION_API" ] } @@ -1137,8 +1188,8 @@ config("features") { if (v8_enable_static_roots) { defines += [ "V8_STATIC_ROOTS" ] } - if (v8_enable_static_root_generation) { - defines += [ "V8_STATIC_ROOT_GENERATION" ] + if (v8_enable_static_roots_generation) { + defines += [ "V8_STATIC_ROOTS_GENERATION" ] } if (v8_use_zlib) { defines += [ "V8_USE_ZLIB" ] @@ -1152,6 +1203,24 @@ config("features") { if (v8_enable_wasm_simd256_revec) { defines += [ "V8_ENABLE_WASM_SIMD256_REVEC" ] } + if (v8_code_pointer_sandboxing) { + defines += [ "V8_CODE_POINTER_SANDBOXING" ] + } + if (v8_enable_maglev_graph_printer) { + defines += [ "V8_ENABLE_MAGLEV_GRAPH_PRINTER" ] + } + if (v8_enable_slow_tracing) { + defines += [ "V8_ENABLE_SLOW_TRACING" ] + } + if (v8_enable_builtin_jump_table_switch) { + defines += [ "V8_ENABLE_BUILTIN_JUMP_TABLE_SWITCH" ] + } + if (v8_enable_direct_handle) { + defines += [ "V8_ENABLE_DIRECT_HANDLE" ] + } + if (v8_enable_extensible_ro_snapshot) { + defines += [ "V8_ENABLE_EXTENSIBLE_RO_SNAPSHOT" ] + } } config("toolchain") { @@ -1296,6 +1365,11 @@ config("toolchain") { defines += [ "V8_TARGET_ARCH_RISCV32" ] defines += [ "__riscv_xlen=32" ] defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] + + if (riscv_use_rvv || target_is_simulator) { + defines += [ "CAN_USE_RVV_INSTRUCTIONS" ] + defines += [ "RVV_VLEN=${riscv_rvv_vlen}" ] + } } if (v8_current_cpu == "x86") { @@ -1384,21 +1458,35 @@ config("toolchain") { "-Wmissing-field-initializers", "-Wunreachable-code", - # Google3 enables this warning, so we should also enable it to find issue - # earlier. See https://reviews.llvm.org/D56731 for details about this - # warning. - "-Wctad-maybe-unsupported", - # TODO(v8:12245): Fix shadowing instances and remove. "-Wno-shadow", ] + # TODO(fuchsia:127411): Re-enable once FIDL bindings are compatible. + if (!is_fuchsia) { + # Google3 enables this warning, so we should also enable it to find issue + # earlier. See https://reviews.llvm.org/D56731 for details about this + # warning. + cflags += [ "-Wctad-maybe-unsupported" ] + } + if (v8_current_cpu == "x64" || v8_current_cpu == "arm64" || v8_current_cpu == "mips64el" || v8_current_cpu == "riscv64") { cflags += [ "-Wshorten-64-to-32" ] } } + if (is_clang || !is_win) { + cflags += [ + # On clang and gcc, disable warnings about offsetof being used on + # non-standard-layout types. offsetof is only specified for + # standard-layout types, but its behaviour on non-standard-layout types is + # implementation defined (rather than UB), and our supported compilers + # have the expected reasonable behaviour. + "-Wno-invalid-offsetof", + ] + } + if (is_win) { cflags += [ "/wd4245", # Conversion with signed/unsigned mismatch. @@ -1560,10 +1648,6 @@ config("toolchain") { "/wd4715", # 'function' : not all control paths return a value' # MSVC does not analyze switch (enum) for completeness. ] - - # TODO(https://crbug.com/1377771): Keep MSVC on C++17 until source code is - # made compatible with C++20. - cflags_cc = [ "/std:c++17" ] } if (!is_clang && !is_win) { @@ -1653,10 +1737,20 @@ if (v8_postmortem_support) { "src/objects/allocation-site-inl.h", "src/objects/cell.h", "src/objects/cell-inl.h", + "src/objects/dependent-code.h", + "src/objects/dependent-code-inl.h", + "src/objects/bytecode-array.h", + "src/objects/bytecode-array-inl.h", + "src/objects/abstract-code.h", + "src/objects/abstract-code-inl.h", + "src/objects/instruction-stream.h", + "src/objects/instruction-stream-inl.h", "src/objects/code.h", "src/objects/code-inl.h", "src/objects/data-handler.h", "src/objects/data-handler-inl.h", + "src/objects/deoptimization-data.h", + "src/objects/deoptimization-data-inl.h", "src/objects/descriptor-array.h", "src/objects/descriptor-array-inl.h", "src/objects/feedback-cell.h", @@ -1668,6 +1762,8 @@ if (v8_postmortem_support) { "src/objects/heap-object.h", "src/objects/heap-object-inl.h", "src/objects/instance-type.h", + "src/objects/instance-type-checker.h", + "src/objects/instance-type-inl.h", "src/objects/js-array-buffer.h", "src/objects/js-array-buffer-inl.h", "src/objects/js-array.h", @@ -1715,6 +1811,7 @@ if (v8_postmortem_support) { "src/objects/string-inl.h", "src/objects/struct.h", "src/objects/struct-inl.h", + "src/objects/tagged.h", ] outputs = [ "$target_gen_dir/debug-support.cc" ] @@ -1781,9 +1878,11 @@ torque_files = [ "src/builtins/iterator.tq", "src/builtins/iterator-from.tq", "src/builtins/iterator-helpers.tq", + "src/builtins/map-groupby.tq", "src/builtins/math.tq", "src/builtins/number.tq", "src/builtins/object-fromentries.tq", + "src/builtins/object-groupby.tq", "src/builtins/object.tq", "src/builtins/promise-abstract-operations.tq", "src/builtins/promise-all.tq", @@ -1791,12 +1890,13 @@ torque_files = [ "src/builtins/promise-any.tq", "src/builtins/promise-constructor.tq", "src/builtins/promise-finally.tq", + "src/builtins/promise-jobs.tq", "src/builtins/promise-misc.tq", "src/builtins/promise-race.tq", "src/builtins/promise-reaction-job.tq", "src/builtins/promise-resolve.tq", "src/builtins/promise-then.tq", - "src/builtins/promise-jobs.tq", + "src/builtins/promise-withresolvers.tq", "src/builtins/proxy-constructor.tq", "src/builtins/proxy-delete-property.tq", "src/builtins/proxy-get-property.tq", @@ -1819,6 +1919,13 @@ torque_files = [ "src/builtins/regexp-split.tq", "src/builtins/regexp-test.tq", "src/builtins/regexp.tq", + "src/builtins/set-difference.tq", + "src/builtins/set-intersection.tq", + "src/builtins/set-is-disjoint-from.tq", + "src/builtins/set-is-subset-of.tq", + "src/builtins/set-is-superset-of.tq", + "src/builtins/set-symmetric-difference.tq", + "src/builtins/set-union.tq", "src/builtins/string-at.tq", "src/builtins/string-endswith.tq", "src/builtins/string-html.tq", @@ -1871,7 +1978,7 @@ torque_files = [ "src/objects/bigint.tq", "src/objects/call-site-info.tq", "src/objects/cell.tq", - "src/objects/code.tq", + "src/objects/bytecode-array.tq", "src/objects/contexts.tq", "src/objects/data-handler.tq", "src/objects/debug-objects.tq", @@ -1910,6 +2017,7 @@ torque_files = [ "src/objects/module.tq", "src/objects/name.tq", "src/objects/oddball.tq", + "src/objects/hole.tq", "src/objects/ordered-hash-table.tq", "src/objects/primitive-heap-object.tq", "src/objects/promise.tq", @@ -1957,7 +2065,10 @@ if (v8_enable_i18n_support) { if (v8_enable_webassembly) { torque_files += [ + "src/builtins/js-to-wasm.tq", "src/builtins/wasm.tq", + "src/builtins/wasm-strings.tq", + "src/builtins/wasm-to-js.tq", "src/debug/debug-wasm-objects.tq", "src/wasm/wasm-objects.tq", ] @@ -2081,6 +2192,15 @@ group("v8_maybe_icu") { } } +group("v8_abseil") { + public_deps = [ "//third_party/abseil-cpp:absl" ] + + public_configs = [ + "//third_party/abseil-cpp:absl_define_config", + "//third_party/abseil-cpp:absl_include_config", + ] +} + v8_header_set("torque_runtime_support") { visibility = [ ":*" ] @@ -2101,6 +2221,7 @@ v8_source_set("torque_generated_initializers") { public_deps = [ ":torque_runtime_support", + ":v8_abseil", ":v8_maybe_icu", ] @@ -2119,6 +2240,18 @@ v8_source_set("torque_generated_initializers") { } configs = [ ":internal_config" ] + + if (v8_symbol_level > 1) { + # Symbols cause huge compile time on some bigger torque files, see + # https://crbug.com/1472715. Thus remove any symbol configs added in v8.gni + # and instead add the "minimal_symbols" config. + v8_add_configs -= + filter_include(v8_add_configs, [ "//build/config/compiler:*symbols" ]) + if (v8_symbol_level == symbol_level) { + v8_remove_configs += [ "//build/config/compiler:default_symbols" ] + } + configs += [ "//build/config/compiler:minimal_symbols" ] + } } v8_source_set("torque_generated_definitions") { @@ -2132,7 +2265,10 @@ v8_source_set("torque_generated_definitions") { ":v8_tracing", ] - public_deps = [ ":v8_maybe_icu" ] + public_deps = [ + ":v8_abseil", + ":v8_maybe_icu", + ] sources = [ "$target_gen_dir/torque-generated/class-forward-declarations.h", @@ -2213,6 +2349,15 @@ template("run_mksnapshot") { rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir), ] + if (v8_log_builtins_block_count_input != "") { + args += [ + "--trace-turbo", + + "--turbo-log-builtins-count-input", + v8_log_builtins_block_count_input, + ] + } + if (v8_enable_builtins_profiling) { args += [ "--turbo-profiling" ] } @@ -2224,13 +2369,15 @@ template("run_mksnapshot") { args += [ "--turbo-profiling-input", rebase_path(v8_builtins_profiling_log_file, root_build_dir), + + # Replace this with --warn-about-builtin-profile-data to see the full + # list of builtins with incompatible profiles. + "--abort-on-bad-builtin-profile-data", ] - # Replace this with --warn-about-builtin-profile-data to see the full - # list of builtins with incompatible profiles. - # TODO(crbug.com/v8/13647): Do not fail for invalid profiles - # args += [ "--abort-on-bad-builtin-profile-data" ] - args += [ "--warn-about-builtin-profile-data" ] + if (!v8_enable_builtins_profiling && v8_enable_builtins_reordering) { + args += [ "--reorder-builtins" ] + } } # This is needed to distinguish between generating code for the simulator @@ -2360,69 +2507,158 @@ if (v8_verify_deterministic_mksnapshot) { } } +if (v8_verify_builtins_compatibility) { + # This specifies a separate mksnapshot target for each of: + # x86, x64, arm, arm64. + hashes = "builtins_hashes_$v8_current_cpu" + run_mksnapshot("dump_$v8_current_cpu") { + args = [ + "--dump-builtins-hashes-to-file", + hashes, + ] + embedded_variant = "Default" + } + + # This template defines a comparison action for the architecture the pgo + # profile is made for (e.g. x64) and the architecture the profile is used + # for (e.g. arm64 with toolchain x64_v8_arm64). + template("verify_builtins_hashes") { + forward_variables_from(invoker, + [ + "profile_arch", + "target_arch", + ]) + profile_toolchain = "//build/toolchain/linux:clang_${profile_arch}" + target_toolchain = + "//build/toolchain/linux:clang_${profile_arch}_v8_${target_arch}" + action("compare_builtins_$target_name") { + deps = [ + ":run_mksnapshot_dump_${profile_arch}($profile_toolchain)", + ":run_mksnapshot_dump_${target_arch}($target_toolchain)", + ] + report_file = "$root_build_dir/builtins_comparison_$target_name" + script = "tools/builtins-pgo/assert_builtins_hashes.py" + args = [ + "builtins_hashes_${profile_arch}", + "builtins_hashes_${target_arch}", + rebase_path(report_file, root_build_dir), + ] + outputs = [ report_file ] + } + } + + verify_builtins_hashes("x86_arm") { + profile_arch = "x86" + target_arch = "arm" + } + + verify_builtins_hashes("x64_arm64") { + profile_arch = "x64" + target_arch = "arm64" + } + + group("verify_all_builtins_hashes") { + deps = [ + ":compare_builtins_x64_arm64", + ":compare_builtins_x86_arm", + ] + } +} + action("v8_dump_build_config") { script = "tools/testrunner/utils/dump_build_config.py" outputs = [ "$root_out_dir/v8_build_config.json" ] is_DEBUG_defined = v8_enable_debugging_features || dcheck_always_on is_full_debug = v8_enable_debugging_features && !v8_optimized_debug + + arch = v8_target_cpu + if (v8_target_cpu == "x86") { + arch = "ia32" + } + + mips_arch_variant_var = "" + mips_use_msa_var = false + if (arch == "mips64" || arch == "mips64el") { + mips_arch_variant_var = mips_arch_variant + mips_use_msa_var = mips_use_msa + } + + js_shared_memory = + v8_enable_shared_ro_heap && (!v8_enable_pointer_compression || + v8_enable_pointer_compression_shared_cage) && + !v8_disable_write_barriers + simd_mips = mips_arch_variant_var == "r6" && mips_use_msa + simulator_run = target_cpu != v8_target_cpu + use_sanitizer = is_asan || is_cfi || is_msan || is_tsan || is_ubsan + + # This lists all build-time switches consumed by the test framework. All + # switches can be used automatically in the status files as is - no + # further files need to be modified. + # + # Naming conventions: Keep switch names short and remove unnecessary + # qualifiers. Drop v8_enable_, v8_, is_ where possible. + # Keep only qualifiers that disambiguate the switches from other things. + # Examples: has_turbofan disambiguates from the turbofan runtime variant, + # is_android disambiguates from the android keyword in status files, + # v8_cfi disambiguates from the global cfi flag. args = [ rebase_path("$root_out_dir/v8_build_config.json", root_build_dir), + "arch=\"$arch\"", + "asan=$is_asan", + "atomic_object_field_writes=$v8_enable_atomic_object_field_writes", + "cet_shadow_stack=$v8_enable_cet_shadow_stack", + "cfi=$is_cfi", + "clang=$is_clang", + "clang_coverage=$use_clang_coverage", + "code_comments=$v8_code_comments", + "component_build=$is_component_build", + "concurrent_marking=$v8_enable_concurrent_marking", + "conservative_stack_scanning=$v8_enable_conservative_stack_scanning", "current_cpu=\"$current_cpu\"", "dcheck_always_on=$dcheck_always_on", + "debug_code=$v8_enable_debug_code", + "DEBUG_defined=$is_DEBUG_defined", + "debugging_features=$v8_enable_debugging_features", + "dict_property_const_tracking=$v8_dict_property_const_tracking", + "direct_handle=$v8_enable_direct_handle", + "direct_local=$v8_enable_direct_local", + "disassembler=$v8_enable_disassembler", + "full_debug=$is_full_debug", + "gdbjit=$v8_enable_gdbjit", + "has_jitless=$v8_jitless", + "has_maglev=$v8_enable_maglev", + "has_turbofan=$v8_enable_turbofan", + "has_webassembly=$v8_enable_webassembly", + "i18n=$v8_enable_i18n_support", "is_android=$is_android", - "is_asan=$is_asan", - "is_cfi=$is_cfi", - "is_clang=$is_clang", - "is_clang_coverage=$use_clang_coverage", - "is_component_build=$is_component_build", - "is_debug=$v8_enable_debugging_features", - "is_DEBUG_defined=$is_DEBUG_defined", - "is_full_debug=$is_full_debug", - "is_msan=$is_msan", - "is_tsan=$is_tsan", - "is_ubsan_vptr=$is_ubsan_vptr", + "is_ios=$is_ios", + "js_shared_memory=$js_shared_memory", + "lite_mode=$v8_enable_lite_mode", + "mips_arch_variant=\"$mips_arch_variant_var\"", + "mips_use_msa=$mips_use_msa_var", + "msan=$is_msan", + "official_build=$is_official_build", + "pointer_compression=$v8_enable_pointer_compression", + "pointer_compression_shared_cage=$v8_enable_pointer_compression_shared_cage", + "runtime_call_stats=$v8_enable_runtime_call_stats", + "sandbox=$v8_enable_sandbox", + "shared_ro_heap=$v8_enable_shared_ro_heap", + "simd_mips=$simd_mips", + "simulator_run=$simulator_run", + "single_generation=$v8_enable_single_generation", + "slow_dchecks=$v8_enable_slow_dchecks", "target_cpu=\"$target_cpu\"", - "v8_code_comments=$v8_code_comments", - "v8_control_flow_integrity=$v8_control_flow_integrity", + "third_party_heap=$v8_enable_third_party_heap", + "tsan=$is_tsan", + "ubsan=$is_ubsan", + "use_sanitizer=$use_sanitizer", + "v8_cfi=$v8_control_flow_integrity", "v8_current_cpu=\"$v8_current_cpu\"", - "v8_dict_property_const_tracking=$v8_dict_property_const_tracking", - "v8_disable_write_barriers=$v8_disable_write_barriers", - "v8_enable_atomic_object_field_writes=" + - "$v8_enable_atomic_object_field_writes", - "v8_enable_cet_shadow_stack=$v8_enable_cet_shadow_stack", - "v8_enable_concurrent_marking=$v8_enable_concurrent_marking", - "v8_enable_conservative_stack_scanning=" + - "$v8_enable_conservative_stack_scanning", - "v8_enable_debug_code=$v8_enable_debug_code", - "v8_enable_disassembler=$v8_enable_disassembler", - "v8_enable_gdbjit=$v8_enable_gdbjit", - "v8_enable_i18n_support=$v8_enable_i18n_support", - "v8_enable_lite_mode=$v8_enable_lite_mode", - "v8_enable_maglev=$v8_enable_maglev", - "v8_enable_pointer_compression=$v8_enable_pointer_compression", - "v8_enable_pointer_compression_shared_cage=" + - "$v8_enable_pointer_compression_shared_cage", - "v8_enable_runtime_call_stats=$v8_enable_runtime_call_stats", - "v8_enable_sandbox=$v8_enable_sandbox", - "v8_enable_shared_ro_heap=$v8_enable_shared_ro_heap", - "v8_enable_single_generation=$v8_enable_single_generation", - "v8_enable_slow_dchecks=$v8_enable_slow_dchecks", - "v8_enable_third_party_heap=$v8_enable_third_party_heap", - "v8_enable_turbofan=$v8_enable_turbofan", - "v8_enable_verify_csa=$v8_enable_verify_csa", - "v8_enable_verify_heap=$v8_enable_verify_heap", - "v8_enable_verify_predictable=$v8_enable_verify_predictable", - "v8_enable_webassembly=$v8_enable_webassembly", - "v8_jitless=$v8_jitless", "v8_target_cpu=\"$v8_target_cpu\"", + "verify_csa=$v8_enable_verify_csa", + "verify_heap=$v8_enable_verify_heap", + "verify_predictable=$v8_enable_verify_predictable", ] - - if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { - args += [ - "mips_arch_variant=\"$mips_arch_variant\"", - "mips_use_msa=$mips_use_msa", - ] - } } ############################################################################### @@ -2467,7 +2703,10 @@ v8_source_set("v8_snapshot") { sources += [ "src/snapshot/snapshot-external.cc" ] } else { - public_deps += [ ":v8_maybe_icu" ] + public_deps += [ + ":v8_abseil", + ":v8_maybe_icu", + ] sources += [ "$target_gen_dir/snapshot.cc" ] } @@ -2650,7 +2889,10 @@ v8_source_set("v8_init") { "src/init/setup-isolate-full.cc", ] - public_deps = [ ":v8_maybe_icu" ] + public_deps = [ + ":v8_abseil", + ":v8_maybe_icu", + ] configs = [ ":internal_config" ] } @@ -2672,6 +2914,7 @@ v8_header_set("v8_config_headers") { sources = [ "include/v8-platform.h", + "include/v8-source-location.h", "include/v8config.h", ] @@ -2707,6 +2950,7 @@ v8_header_set("v8_headers") { "include/v8-forward.h", "include/v8-function-callback.h", "include/v8-function.h", + "include/v8-handle-base.h", "include/v8-initialization.h", "include/v8-internal.h", "include/v8-isolate.h", @@ -2894,6 +3138,7 @@ v8_header_set("v8_internal_headers") { "src/codegen/interface-descriptors-inl.h", "src/codegen/interface-descriptors.h", "src/codegen/label.h", + "src/codegen/linkage-location.h", "src/codegen/machine-type.h", "src/codegen/macro-assembler-base.h", "src/codegen/macro-assembler-inl.h", @@ -2907,6 +3152,7 @@ v8_header_set("v8_internal_headers") { "src/codegen/register.h", "src/codegen/reglist-base.h", "src/codegen/reglist.h", + "src/codegen/reloc-info-inl.h", "src/codegen/reloc-info.h", "src/codegen/safepoint-table-base.h", "src/codegen/safepoint-table.h", @@ -2941,6 +3187,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/backend/gap-resolver.h", "src/compiler/backend/instruction-codes.h", "src/compiler/backend/instruction-scheduler.h", + "src/compiler/backend/instruction-selector-adapter.h", "src/compiler/backend/instruction-selector-impl.h", "src/compiler/backend/instruction-selector.h", "src/compiler/backend/instruction.h", @@ -2994,6 +3241,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/js-create-lowering.h", "src/compiler/js-generic-lowering.h", "src/compiler/js-graph.h", + "src/compiler/js-heap-broker-inl.h", "src/compiler/js-heap-broker.h", "src/compiler/js-inlining-heuristic.h", "src/compiler/js-inlining.h", @@ -3029,6 +3277,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/operator-properties.h", "src/compiler/operator.h", "src/compiler/osr.h", + "src/compiler/pair-load-store-reducer.h", "src/compiler/per-isolate-compiler-cache.h", "src/compiler/persistent-map.h", "src/compiler/phase.h", @@ -3058,38 +3307,48 @@ v8_header_set("v8_internal_headers") { "src/compiler/turboshaft/builtin-call-descriptors.h", "src/compiler/turboshaft/dead-code-elimination-phase.h", "src/compiler/turboshaft/dead-code-elimination-reducer.h", + "src/compiler/turboshaft/debug-feature-lowering-phase.h", + "src/compiler/turboshaft/debug-feature-lowering-reducer.h", "src/compiler/turboshaft/decompression-optimization-phase.h", "src/compiler/turboshaft/decompression-optimization.h", "src/compiler/turboshaft/define-assembler-macros.inc", "src/compiler/turboshaft/deopt-data.h", + "src/compiler/turboshaft/doubly-threaded-list.h", + "src/compiler/turboshaft/explicit-truncation-reducer.h", + "src/compiler/turboshaft/fast-api-call-reducer.h", "src/compiler/turboshaft/fast-hash.h", "src/compiler/turboshaft/graph-builder.h", "src/compiler/turboshaft/graph-visualizer.h", "src/compiler/turboshaft/graph.h", "src/compiler/turboshaft/index.h", + "src/compiler/turboshaft/instruction-selection-phase.h", "src/compiler/turboshaft/late-escape-analysis-reducer.h", - "src/compiler/turboshaft/late-optimization-phase.h", + "src/compiler/turboshaft/late-load-elimination-reducer.h", "src/compiler/turboshaft/layered-hash-map.h", "src/compiler/turboshaft/machine-lowering-phase.h", "src/compiler/turboshaft/machine-lowering-reducer.h", "src/compiler/turboshaft/machine-optimization-reducer.h", "src/compiler/turboshaft/memory-optimization-reducer.h", - "src/compiler/turboshaft/operation-matching.h", + "src/compiler/turboshaft/operation-matcher.h", "src/compiler/turboshaft/operations.h", "src/compiler/turboshaft/optimization-phase.h", "src/compiler/turboshaft/optimize-phase.h", "src/compiler/turboshaft/phase.h", + "src/compiler/turboshaft/pretenuring-propagation-reducer.h", "src/compiler/turboshaft/recreate-schedule-phase.h", "src/compiler/turboshaft/recreate-schedule.h", + "src/compiler/turboshaft/reduce-args-helper.h", "src/compiler/turboshaft/reducer-traits.h", "src/compiler/turboshaft/representations.h", + "src/compiler/turboshaft/required-optimization-reducer.h", "src/compiler/turboshaft/runtime-call-descriptors.h", "src/compiler/turboshaft/select-lowering-reducer.h", "src/compiler/turboshaft/sidetable.h", "src/compiler/turboshaft/simplify-tf-loops.h", "src/compiler/turboshaft/snapshot-table.h", - "src/compiler/turboshaft/tag-untag-lowering-phase.h", - "src/compiler/turboshaft/tag-untag-lowering-reducer.h", + "src/compiler/turboshaft/store-store-elimination-phase.h", + "src/compiler/turboshaft/store-store-elimination-reducer.h", + "src/compiler/turboshaft/structural-optimization-reducer.h", "src/compiler/turboshaft/tracing.h", "src/compiler/turboshaft/type-assertions-phase.h", "src/compiler/turboshaft/type-inference-analysis.h", @@ -3101,6 +3360,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/turboshaft/types.h", "src/compiler/turboshaft/undef-assembler-macros.inc", "src/compiler/turboshaft/uniform-reducer-adapter.h", + "src/compiler/turboshaft/use-map.h", "src/compiler/turboshaft/utils.h", "src/compiler/turboshaft/value-numbering-reducer.h", "src/compiler/turboshaft/variable-reducer.h", @@ -3133,9 +3393,9 @@ v8_header_set("v8_internal_headers") { "src/deoptimizer/deoptimized-frame-info.h", "src/deoptimizer/deoptimizer.h", "src/deoptimizer/frame-description.h", + "src/deoptimizer/frame-translation-builder.h", "src/deoptimizer/materialized-object-store.h", "src/deoptimizer/translated-state.h", - "src/deoptimizer/translation-array.h", "src/deoptimizer/translation-opcode.h", "src/diagnostics/basic-block-profiler.h", "src/diagnostics/code-tracer.h", @@ -3202,7 +3462,6 @@ v8_header_set("v8_internal_headers") { "src/heap/array-buffer-sweeper.h", "src/heap/base-space.h", "src/heap/basic-memory-chunk.h", - "src/heap/code-object-registry.h", "src/heap/code-range.h", "src/heap/code-stats.h", "src/heap/collection-barrier.h", @@ -3221,6 +3480,7 @@ v8_header_set("v8_internal_headers") { "src/heap/cppgc-js/unified-heap-marking-visitor.h", "src/heap/cppgc-js/wrappable-info-inl.h", "src/heap/cppgc-js/wrappable-info.h", + "src/heap/ephemeron-remembered-set.h", "src/heap/evacuation-allocator-inl.h", "src/heap/evacuation-allocator.h", "src/heap/evacuation-verifier-inl.h", @@ -3248,8 +3508,7 @@ v8_header_set("v8_internal_headers") { "src/heap/incremental-marking-job.h", "src/heap/incremental-marking.h", "src/heap/index-generator.h", - "src/heap/invalidated-slots-inl.h", - "src/heap/invalidated-slots.h", + "src/heap/large-page.h", "src/heap/large-spaces.h", "src/heap/linear-allocation-area.h", "src/heap/list.h", @@ -3259,8 +3518,10 @@ v8_header_set("v8_internal_headers") { "src/heap/local-heap.h", "src/heap/mark-compact-inl.h", "src/heap/mark-compact.h", + "src/heap/mark-sweep-utilities.h", "src/heap/marking-barrier-inl.h", "src/heap/marking-barrier.h", + "src/heap/marking-inl.h", "src/heap/marking-state-inl.h", "src/heap/marking-state.h", "src/heap/marking-visitor-inl.h", @@ -3269,6 +3530,7 @@ v8_header_set("v8_internal_headers") { "src/heap/marking-worklist.h", "src/heap/marking.h", "src/heap/memory-allocator.h", + "src/heap/memory-balancer.h", "src/heap/memory-chunk-inl.h", "src/heap/memory-chunk-layout.h", "src/heap/memory-chunk.h", @@ -3276,21 +3538,26 @@ v8_header_set("v8_internal_headers") { "src/heap/memory-measurement.h", "src/heap/memory-reducer.h", "src/heap/minor-gc-job.h", + "src/heap/minor-mark-sweep-inl.h", + "src/heap/minor-mark-sweep.h", "src/heap/new-spaces-inl.h", "src/heap/new-spaces.h", "src/heap/object-lock.h", "src/heap/object-stats.h", "src/heap/objects-visiting-inl.h", "src/heap/objects-visiting.h", + "src/heap/page.h", "src/heap/paged-spaces-inl.h", "src/heap/paged-spaces.h", "src/heap/parallel-work-item.h", + "src/heap/parked-scope-inl.h", "src/heap/parked-scope.h", "src/heap/pretenuring-handler-inl.h", "src/heap/pretenuring-handler.h", "src/heap/progress-bar.h", "src/heap/read-only-heap-inl.h", "src/heap/read-only-heap.h", + "src/heap/read-only-promotion.h", "src/heap/read-only-spaces.h", "src/heap/remembered-set-inl.h", "src/heap/remembered-set.h", @@ -3303,6 +3570,9 @@ v8_header_set("v8_internal_headers") { "src/heap/sweeper.h", "src/heap/traced-handles-marking-visitor.h", "src/heap/weak-object-worklists.h", + "src/heap/young-generation-marking-visitor-inl.h", + "src/heap/young-generation-marking-visitor.h", + "src/heap/zapping.h", "src/ic/call-optimization.h", "src/ic/handler-configuration-inl.h", "src/ic/handler-configuration.h", @@ -3421,6 +3691,9 @@ v8_header_set("v8_internal_headers") { "src/objects/heap-number.h", "src/objects/heap-object-inl.h", "src/objects/heap-object.h", + "src/objects/hole-inl.h", + "src/objects/hole.h", + "src/objects/instance-type-checker.h", "src/objects/instance-type-inl.h", "src/objects/instance-type.h", "src/objects/internal-index.h", @@ -3555,6 +3828,7 @@ v8_header_set("v8_internal_headers") { "src/objects/tagged-index.h", "src/objects/tagged-value-inl.h", "src/objects/tagged-value.h", + "src/objects/tagged.h", "src/objects/template-objects-inl.h", "src/objects/template-objects.h", "src/objects/templates-inl.h", @@ -3639,10 +3913,18 @@ v8_header_set("v8_internal_headers") { "src/runtime/runtime.h", "src/sandbox/bounded-size-inl.h", "src/sandbox/bounded-size.h", + "src/sandbox/code-pointer-inl.h", + "src/sandbox/code-pointer-table-inl.h", + "src/sandbox/code-pointer-table.h", + "src/sandbox/code-pointer.h", + "src/sandbox/external-entity-table-inl.h", + "src/sandbox/external-entity-table.h", "src/sandbox/external-pointer-inl.h", "src/sandbox/external-pointer-table-inl.h", "src/sandbox/external-pointer-table.h", "src/sandbox/external-pointer.h", + "src/sandbox/indirect-pointer-inl.h", + "src/sandbox/indirect-pointer.h", "src/sandbox/sandbox.h", "src/sandbox/sandboxed-pointer-inl.h", "src/sandbox/sandboxed-pointer.h", @@ -3656,6 +3938,7 @@ v8_header_set("v8_internal_headers") { "src/snapshot/embedded/embedded-file-writer-interface.h", "src/snapshot/object-deserializer.h", "src/snapshot/read-only-deserializer.h", + "src/snapshot/read-only-serializer-deserializer.h", "src/snapshot/read-only-serializer.h", "src/snapshot/references.h", "src/snapshot/roots-serializer.h", @@ -3668,6 +3951,7 @@ v8_header_set("v8_internal_headers") { "src/snapshot/snapshot-source-sink.h", "src/snapshot/snapshot-utils.h", "src/snapshot/snapshot.h", + "src/snapshot/sort-builtins.h", "src/snapshot/startup-deserializer.h", "src/snapshot/startup-serializer.h", "src/strings/char-predicates-inl.h", @@ -3714,9 +3998,9 @@ v8_header_set("v8_internal_headers") { "src/zone/type-stats.h", "src/zone/zone-allocator.h", "src/zone/zone-chunk-list.h", + "src/zone/zone-compact-set.h", "src/zone/zone-compression.h", "src/zone/zone-containers.h", - "src/zone/zone-handle-set.h", "src/zone/zone-hashmap.h", "src/zone/zone-list-inl.h", "src/zone/zone-list.h", @@ -3755,12 +4039,15 @@ v8_header_set("v8_internal_headers") { "src/maglev/maglev-ir-inl.h", "src/maglev/maglev-ir.h", "src/maglev/maglev-phi-representation-selector.h", + "src/maglev/maglev-pipeline-statistics.h", "src/maglev/maglev-regalloc-data.h", "src/maglev/maglev-regalloc.h", "src/maglev/maglev-register-frame-array.h", "src/maglev/maglev.h", ] - if (v8_current_cpu == "arm64") { + if (v8_current_cpu == "arm") { + sources += [ "src/maglev/arm/maglev-assembler-arm-inl.h" ] + } else if (v8_current_cpu == "arm64") { sources += [ "src/maglev/arm64/maglev-assembler-arm64-inl.h" ] } else if (v8_current_cpu == "x64") { sources += [ "src/maglev/x64/maglev-assembler-x64-inl.h" ] @@ -3775,6 +4062,13 @@ v8_header_set("v8_internal_headers") { "src/asmjs/asm-scanner.h", "src/asmjs/asm-types.h", "src/compiler/int64-lowering.h", + "src/compiler/turboshaft/int64-lowering-phase.h", + "src/compiler/turboshaft/int64-lowering-reducer.h", + "src/compiler/turboshaft/wasm-js-lowering-reducer.h", + "src/compiler/turboshaft/wasm-lowering-reducer.h", + "src/compiler/turboshaft/wasm-optimize-phase.h", + "src/compiler/turboshaft/wasm-turboshaft-compiler.h", + "src/compiler/wasm-address-reassociation.h", "src/compiler/wasm-call-descriptors.h", "src/compiler/wasm-compiler-definitions.h", "src/compiler/wasm-compiler.h", @@ -3784,6 +4078,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/wasm-graph-assembler.h", "src/compiler/wasm-inlining-into-js.h", "src/compiler/wasm-inlining.h", + "src/compiler/wasm-js-lowering.h", "src/compiler/wasm-load-elimination.h", "src/compiler/wasm-loop-peeling.h", "src/compiler/wasm-typer.h", @@ -3792,7 +4087,6 @@ v8_header_set("v8_internal_headers") { "src/third_party/utf8-decoder/generalized-utf8-decoder.h", "src/trap-handler/trap-handler-internal.h", "src/trap-handler/trap-handler.h", - "src/wasm/assembler-buffer-cache.h", "src/wasm/baseline/liftoff-assembler-defs.h", "src/wasm/baseline/liftoff-assembler.h", "src/wasm/baseline/liftoff-compiler.h", @@ -3818,12 +4112,15 @@ v8_header_set("v8_internal_headers") { "src/wasm/names-provider.h", "src/wasm/object-access.h", "src/wasm/pgo.h", + "src/wasm/serialized-signature-inl.h", "src/wasm/simd-shuffle.h", "src/wasm/stacks.h", + "src/wasm/std-object-sizes.h", "src/wasm/streaming-decoder.h", "src/wasm/string-builder-multiline.h", "src/wasm/string-builder.h", "src/wasm/struct-types.h", + "src/wasm/turboshaft-graph-interface.h", "src/wasm/value-type.h", "src/wasm/wasm-arguments.h", "src/wasm/wasm-code-manager.h", @@ -4026,9 +4323,10 @@ v8_header_set("v8_internal_headers") { sources += [ "src/execution/arm64/pointer-authentication-arm64.h" ] } if (v8_enable_webassembly) { - # Trap handling is enabled on arm64 Mac and in simulators on x64 on Linux - # and Mac. - if ((current_cpu == "arm64" && (is_mac || is_ios)) || + # Trap handling is enabled on arm64 Mac and Linux and in simulators on + # x64 on Linux and Mac. + if ((current_cpu == "arm64" && + (is_linux || is_chromeos || is_mac || is_ios)) || (current_cpu == "x64" && (is_linux || is_chromeos || is_mac))) { sources += [ "src/trap-handler/handler-inside-posix.h" ] } @@ -4315,6 +4613,7 @@ v8_compiler_sources = [ "src/compiler/operator-properties.cc", "src/compiler/operator.cc", "src/compiler/osr.cc", + "src/compiler/pair-load-store-reducer.cc", "src/compiler/pipeline-statistics.cc", "src/compiler/pipeline.cc", "src/compiler/property-access-builder.cc", @@ -4431,7 +4730,12 @@ if (v8_current_cpu == "x86") { if (v8_enable_webassembly) { v8_compiler_sources += [ "src/compiler/int64-lowering.cc", + "src/compiler/turboshaft/int64-lowering-phase.cc", + "src/compiler/turboshaft/wasm-optimize-phase.cc", + "src/compiler/turboshaft/wasm-turboshaft-compiler.cc", + "src/compiler/wasm-address-reassociation.cc", "src/compiler/wasm-call-descriptors.cc", + "src/compiler/wasm-compiler-definitions.cc", "src/compiler/wasm-compiler.cc", "src/compiler/wasm-escape-analysis.cc", "src/compiler/wasm-gc-lowering.cc", @@ -4439,6 +4743,7 @@ if (v8_enable_webassembly) { "src/compiler/wasm-graph-assembler.cc", "src/compiler/wasm-inlining-into-js.cc", "src/compiler/wasm-inlining.cc", + "src/compiler/wasm-js-lowering.cc", "src/compiler/wasm-load-elimination.cc", "src/compiler/wasm-loop-peeling.cc", "src/compiler/wasm-typer.cc", @@ -4465,6 +4770,7 @@ v8_source_set("v8_compiler_for_mksnapshot_source_set") { public_deps = [ ":generate_bytecode_builtins_list", ":run_torque", + ":v8_abseil", ":v8_maybe_icu", ":v8_tracing", ] @@ -4502,6 +4808,7 @@ v8_source_set("v8_compiler") { public_deps = [ ":generate_bytecode_builtins_list", ":run_torque", + ":v8_abseil", ":v8_internal_headers", ":v8_maybe_icu", ":v8_tracing", @@ -4524,29 +4831,33 @@ v8_source_set("v8_turboshaft") { "src/compiler/turboshaft/assembler.cc", "src/compiler/turboshaft/build-graph-phase.cc", "src/compiler/turboshaft/dead-code-elimination-phase.cc", + "src/compiler/turboshaft/debug-feature-lowering-phase.cc", "src/compiler/turboshaft/decompression-optimization-phase.cc", "src/compiler/turboshaft/decompression-optimization.cc", "src/compiler/turboshaft/graph-builder.cc", "src/compiler/turboshaft/graph-visualizer.cc", "src/compiler/turboshaft/graph.cc", + "src/compiler/turboshaft/instruction-selection-phase.cc", "src/compiler/turboshaft/late-escape-analysis-reducer.cc", - "src/compiler/turboshaft/late-optimization-phase.cc", + "src/compiler/turboshaft/late-load-elimination-reducer.cc", "src/compiler/turboshaft/machine-lowering-phase.cc", "src/compiler/turboshaft/memory-optimization-reducer.cc", "src/compiler/turboshaft/operations.cc", "src/compiler/turboshaft/optimization-phase.cc", "src/compiler/turboshaft/optimize-phase.cc", "src/compiler/turboshaft/phase.cc", + "src/compiler/turboshaft/pretenuring-propagation-reducer.cc", "src/compiler/turboshaft/recreate-schedule-phase.cc", "src/compiler/turboshaft/recreate-schedule.cc", "src/compiler/turboshaft/representations.cc", "src/compiler/turboshaft/simplify-tf-loops.cc", - "src/compiler/turboshaft/tag-untag-lowering-phase.cc", + "src/compiler/turboshaft/store-store-elimination-phase.cc", "src/compiler/turboshaft/type-assertions-phase.cc", "src/compiler/turboshaft/type-parser.cc", "src/compiler/turboshaft/typed-optimizations-phase.cc", "src/compiler/turboshaft/typer.cc", "src/compiler/turboshaft/types.cc", + "src/compiler/turboshaft/use-map.cc", "src/compiler/turboshaft/utils.cc", ] @@ -4704,9 +5015,9 @@ v8_source_set("v8_base_without_compiler") { "src/deoptimizer/deoptimize-reason.cc", "src/deoptimizer/deoptimized-frame-info.cc", "src/deoptimizer/deoptimizer.cc", + "src/deoptimizer/frame-translation-builder.cc", "src/deoptimizer/materialized-object-store.cc", "src/deoptimizer/translated-state.cc", - "src/deoptimizer/translation-array.cc", "src/diagnostics/basic-block-profiler.cc", "src/diagnostics/compilation-statistics.cc", "src/diagnostics/disassembler.cc", @@ -4750,9 +5061,7 @@ v8_source_set("v8_base_without_compiler") { "src/handles/traced-handles.cc", "src/heap/allocation-observer.cc", "src/heap/array-buffer-sweeper.cc", - "src/heap/base-space.cc", "src/heap/basic-memory-chunk.cc", - "src/heap/code-object-registry.cc", "src/heap/code-range.cc", "src/heap/code-stats.cc", "src/heap/collection-barrier.cc", @@ -4765,6 +5074,7 @@ v8_source_set("v8_base_without_compiler") { "src/heap/cppgc-js/unified-heap-marking-state.cc", "src/heap/cppgc-js/unified-heap-marking-verifier.cc", "src/heap/cppgc-js/unified-heap-marking-visitor.cc", + "src/heap/ephemeron-remembered-set.cc", "src/heap/evacuation-verifier.cc", "src/heap/factory-base.cc", "src/heap/factory.cc", @@ -4781,26 +5091,31 @@ v8_source_set("v8_base_without_compiler") { "src/heap/incremental-marking-job.cc", "src/heap/incremental-marking.cc", "src/heap/index-generator.cc", - "src/heap/invalidated-slots.cc", + "src/heap/large-page.cc", "src/heap/large-spaces.cc", "src/heap/local-factory.cc", "src/heap/local-heap.cc", "src/heap/mark-compact.cc", + "src/heap/mark-sweep-utilities.cc", "src/heap/marking-barrier.cc", "src/heap/marking-worklist.cc", "src/heap/marking.cc", "src/heap/memory-allocator.cc", + "src/heap/memory-balancer.cc", "src/heap/memory-chunk-layout.cc", "src/heap/memory-chunk.cc", "src/heap/memory-measurement.cc", "src/heap/memory-reducer.cc", "src/heap/minor-gc-job.cc", + "src/heap/minor-mark-sweep.cc", "src/heap/new-spaces.cc", "src/heap/object-stats.cc", "src/heap/objects-visiting.cc", + "src/heap/page.cc", "src/heap/paged-spaces.cc", "src/heap/pretenuring-handler.cc", "src/heap/read-only-heap.cc", + "src/heap/read-only-promotion.cc", "src/heap/read-only-spaces.cc", "src/heap/safepoint.cc", "src/heap/scavenger.cc", @@ -4810,6 +5125,7 @@ v8_source_set("v8_base_without_compiler") { "src/heap/sweeper.cc", "src/heap/traced-handles-marking-visitor.cc", "src/heap/weak-object-worklists.cc", + "src/heap/zapping.cc", "src/ic/call-optimization.cc", "src/ic/handler-configuration.cc", "src/ic/ic-stats.cc", @@ -4851,19 +5167,25 @@ v8_source_set("v8_base_without_compiler") { "src/logging/tracing-flags.cc", "src/numbers/conversions.cc", "src/numbers/math-random.cc", + "src/objects/abstract-code.cc", "src/objects/backing-store.cc", "src/objects/bigint.cc", + "src/objects/bytecode-array.cc", "src/objects/call-site-info.cc", "src/objects/code-kind.cc", "src/objects/code.cc", "src/objects/compilation-cache-table.cc", "src/objects/contexts.cc", "src/objects/debug-objects.cc", + "src/objects/deoptimization-data.cc", + "src/objects/dependent-code.cc", "src/objects/elements-kind.cc", "src/objects/elements.cc", "src/objects/embedder-data-array.cc", "src/objects/feedback-vector.cc", "src/objects/field-type.cc", + "src/objects/fixed-array.cc", + "src/objects/instruction-stream.cc", "src/objects/intl-objects.cc", "src/objects/js-array-buffer.cc", "src/objects/js-atomics-synchronization.cc", @@ -4996,6 +5318,7 @@ v8_source_set("v8_base_without_compiler") { "src/runtime/runtime-typedarray.cc", "src/runtime/runtime-weak-refs.cc", "src/runtime/runtime.cc", + "src/sandbox/code-pointer-table.cc", "src/sandbox/external-pointer-table.cc", "src/sandbox/sandbox.cc", "src/sandbox/testing.cc", @@ -5016,6 +5339,7 @@ v8_source_set("v8_base_without_compiler") { "src/snapshot/snapshot-source-sink.cc", "src/snapshot/snapshot-utils.cc", "src/snapshot/snapshot.cc", + "src/snapshot/sort-builtins.cc", "src/snapshot/startup-deserializer.cc", "src/snapshot/startup-serializer.cc", "src/strings/char-predicates.cc", @@ -5067,10 +5391,16 @@ v8_source_set("v8_base_without_compiler") { "src/maglev/maglev-interpreter-frame-state.cc", "src/maglev/maglev-ir.cc", "src/maglev/maglev-phi-representation-selector.cc", + "src/maglev/maglev-pipeline-statistics.cc", "src/maglev/maglev-regalloc.cc", "src/maglev/maglev.cc", ] - if (v8_current_cpu == "arm64") { + if (v8_current_cpu == "arm") { + sources += [ + "src/maglev/arm/maglev-assembler-arm.cc", + "src/maglev/arm/maglev-ir-arm.cc", + ] + } else if (v8_current_cpu == "arm64") { sources += [ "src/maglev/arm64/maglev-assembler-arm64.cc", "src/maglev/arm64/maglev-ir-arm64.cc", @@ -5096,7 +5426,6 @@ v8_source_set("v8_base_without_compiler") { "src/trap-handler/handler-inside.cc", "src/trap-handler/handler-outside.cc", "src/trap-handler/handler-shared.cc", - "src/wasm/assembler-buffer-cache.cc", "src/wasm/baseline/liftoff-assembler.cc", "src/wasm/baseline/liftoff-compiler.cc", "src/wasm/canonical-types.cc", @@ -5118,6 +5447,7 @@ v8_source_set("v8_base_without_compiler") { "src/wasm/stacks.cc", "src/wasm/streaming-decoder.cc", "src/wasm/sync-streaming-decoder.cc", + "src/wasm/turboshaft-graph-interface.cc", "src/wasm/value-type.cc", "src/wasm/wasm-code-manager.cc", "src/wasm/wasm-debug.cc", @@ -5126,7 +5456,6 @@ v8_source_set("v8_base_without_compiler") { "src/wasm/wasm-external-refs.cc", "src/wasm/wasm-features.cc", "src/wasm/wasm-import-wrapper-cache.cc", - "src/wasm/wasm-init-expr.cc", "src/wasm/wasm-js.cc", "src/wasm/wasm-module-builder.cc", "src/wasm/wasm-module-sourcemap.cc", @@ -5252,9 +5581,9 @@ v8_source_set("v8_base_without_compiler") { "src/regexp/arm64/regexp-macro-assembler-arm64.cc", ] if (v8_enable_webassembly) { - # Trap handling is enabled on arm64 Mac and in simulators on x64 on Linux, - # Mac, and Windows. - if ((current_cpu == "arm64" && is_apple) || + # Trap handling is enabled on arm64 Mac and Linux and in simulators on + # x64 on Linux, Mac, and Windows. + if ((current_cpu == "arm64" && (is_linux || is_chromeos || is_apple)) || (current_cpu == "x64" && (is_linux || is_chromeos || is_mac))) { sources += [ "src/trap-handler/handler-inside-posix.cc", @@ -5430,6 +5759,7 @@ v8_source_set("v8_base_without_compiler") { ":cppgc_base", ":generate_bytecode_builtins_list", ":run_torque", + ":v8_abseil", ":v8_headers", ":v8_internal_headers", ":v8_maybe_icu", @@ -5487,7 +5817,9 @@ v8_source_set("v8_base_without_compiler") { v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" || v8_current_cpu == "s390" || v8_current_cpu == "s390x" || v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { - libs += [ "atomic" ] + if (!is_clang) { + libs += [ "atomic" ] + } } if (v8_enable_vtunetracemark && (is_linux || is_chromeos || is_win)) { @@ -5497,13 +5829,6 @@ v8_source_set("v8_base_without_compiler") { ] deps += [ "src/third_party/vtune:v8_vtune_trace_mark" ] } - - if (v8_use_perfetto) { - sources += [ - "src/tracing/trace-categories.cc", - "src/tracing/trace-categories.h", - ] - } } group("v8_base") { @@ -5595,12 +5920,6 @@ v8_source_set("torque_base") { "//build/config/compiler:no_rtti", ] - if (is_win && is_asan) { - # Due to a bug in ASAN on Windows (chromium:893437), we disable ASAN for - # Torque on Windows. - remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] - } - if (is_debug && !v8_optimized_debug && v8_enable_fast_torque) { # The :no_optimize config is added to v8_add_configs in v8.gni. remove_configs += [ "//build/config/compiler:no_optimize" ] @@ -5637,10 +5956,6 @@ v8_source_set("torque_ls_base") { "//build/config/compiler:no_exceptions", "//build/config/compiler:no_rtti", ] - - if (is_win && is_asan) { - remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] - } } v8_component("v8_libbase") { @@ -5664,6 +5979,7 @@ v8_component("v8_libbase") { "src/base/cpu.h", "src/base/debug/stack_trace.cc", "src/base/debug/stack_trace.h", + "src/base/discriminated-union.h", "src/base/division-by-constant.cc", "src/base/division-by-constant.h", "src/base/emulated-virtual-address-subspace.cc", @@ -5680,6 +5996,7 @@ v8_component("v8_libbase") { "src/base/ieee754.cc", "src/base/ieee754.h", "src/base/immediate-crash.h", + "src/base/intrusive-set.h", "src/base/iterator.h", "src/base/lazy-instance.h", "src/base/logging.cc", @@ -5740,6 +6057,7 @@ v8_component("v8_libbase") { "src/base/sanitizer/lsan.h", "src/base/sanitizer/msan.h", "src/base/sanitizer/tsan.h", + "src/base/small-map.h", "src/base/small-vector.h", "src/base/string-format.h", "src/base/strings.cc", @@ -5768,6 +6086,8 @@ v8_component("v8_libbase") { deps = [ ":v8_config_headers" ] + libs = [] + data = [] data_deps = [] @@ -5838,8 +6158,8 @@ v8_component("v8_libbase") { "src/base/platform/platform-fuchsia.cc", ] deps += [ - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.kernel", - "//third_party/fuchsia-sdk/sdk/pkg/fdio", + "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.kernel:fuchsia.kernel_cpp", + "//third_party/fuchsia-sdk/sdk/pkg/component_incoming_cpp", "//third_party/fuchsia-sdk/sdk/pkg/zx", ] } else if (is_mac) { @@ -5858,6 +6178,7 @@ v8_component("v8_libbase") { sources += [ "src/base/debug/stack_trace_win.cc", "src/base/platform/platform-win32.cc", + "src/base/platform/platform-win32.h", "src/base/win32-headers.h", ] @@ -5890,7 +6211,9 @@ v8_component("v8_libbase") { } if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { - libs += [ "atomic" ] + if (!is_clang) { + libs += [ "atomic" ] + } } if (is_tsan && !build_with_chromium) { @@ -5943,6 +6266,8 @@ v8_component("v8_libplatform") { "src/libplatform/default-job.h", "src/libplatform/default-platform.cc", "src/libplatform/default-platform.h", + "src/libplatform/default-thread-isolated-allocator.cc", + "src/libplatform/default-thread-isolated-allocator.h", "src/libplatform/default-worker-threads-task-runner.cc", "src/libplatform/default-worker-threads-task-runner.h", "src/libplatform/delayed-task-queue.cc", @@ -5985,14 +6310,7 @@ v8_component("v8_libplatform") { "src/libplatform/tracing/trace-writer.cc", "src/libplatform/tracing/trace-writer.h", ] - sources += [ - "src/libplatform/tracing/trace-event-listener.cc", - "src/libplatform/tracing/trace-event-listener.h", - ] - deps += [ - # TODO(skyostil): Switch TraceEventListener to protozero. - "//third_party/perfetto/protos/perfetto/trace:lite", - ] + sources += [ "src/libplatform/tracing/trace-event-listener.h" ] } if (v8_enable_system_instrumentation) { @@ -6005,7 +6323,9 @@ v8_component("v8_libplatform") { } if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { - libs = [ "atomic" ] + if (!is_clang) { + libs = [ "atomic" ] + } } } @@ -6062,6 +6382,8 @@ v8_header_set("v8_heap_base_headers") { sources = [ "src/heap/base/active-system-pages.h", "src/heap/base/basic-slot-set.h", + "src/heap/base/bytes.h", + "src/heap/base/incremental-marking-schedule.h", "src/heap/base/stack.h", "src/heap/base/worklist.h", ] @@ -6074,6 +6396,7 @@ v8_header_set("v8_heap_base_headers") { v8_source_set("v8_heap_base") { sources = [ "src/heap/base/active-system-pages.cc", + "src/heap/base/incremental-marking-schedule.cc", "src/heap/base/stack.cc", "src/heap/base/worklist.cc", ] @@ -6222,8 +6545,6 @@ v8_source_set("cppgc_base") { "src/heap/cppgc/heap-visitor.h", "src/heap/cppgc/heap.cc", "src/heap/cppgc/heap.h", - "src/heap/cppgc/incremental-marking-schedule.cc", - "src/heap/cppgc/incremental-marking-schedule.h", "src/heap/cppgc/liveness-broker.cc", "src/heap/cppgc/liveness-broker.h", "src/heap/cppgc/logging.cc", @@ -6265,7 +6586,6 @@ v8_source_set("cppgc_base") { "src/heap/cppgc/raw-heap.h", "src/heap/cppgc/remembered-set.cc", "src/heap/cppgc/remembered-set.h", - "src/heap/cppgc/source-location.cc", "src/heap/cppgc/stats-collector.cc", "src/heap/cppgc/stats-collector.h", "src/heap/cppgc/sweeper.cc", @@ -6311,6 +6631,13 @@ v8_source_set("cppgc_base") { } else { public_deps += [ ":v8_tracing" ] } + + if (v8_use_perfetto) { + sources += [ + "src/tracing/trace-categories.cc", + "src/tracing/trace-categories.h", + ] + } } if (v8_check_header_includes) { @@ -6377,6 +6704,9 @@ if (v8_enable_webassembly) { ":v8_snapshot", "//build/win:default_exe_manifest", ] + if (v8_enable_vtunejit) { + deps += [ "src/third_party/vtune:v8_vtune" ] + } # TODO: v8dll-main.cc equivalent for shared library builds @@ -6490,10 +6820,6 @@ if (current_toolchain == v8_snapshot_toolchain) { "//build/config/compiler:no_exceptions", "//build/config/compiler:no_rtti", ] - - if (is_win && is_asan) { - remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] - } } } @@ -6521,10 +6847,6 @@ v8_executable("torque-language-server") { "//build/config/compiler:no_exceptions", "//build/config/compiler:no_rtti", ] - - if (is_win && is_asan) { - remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] - } } if (v8_enable_i18n_support) { @@ -6681,7 +7003,6 @@ group("v8_fuzzers") { ":v8_simple_inspector_fuzzer", ":v8_simple_json_fuzzer", ":v8_simple_parser_fuzzer", - ":v8_simple_regexp_builtins_fuzzer", ":v8_simple_regexp_fuzzer", ] @@ -6922,10 +7243,6 @@ if (want_v8_shell) { ":internal_config_base", ] - if (is_win && !v8_enable_cet_shadow_stack) { - v8_remove_configs += [ "//build/config/compiler:cet_shadow_stack" ] - } - deps = [ ":v8", ":v8_libbase", @@ -6939,7 +7256,9 @@ v8_executable("cppgc_hello_world") { sources = [ "samples/cppgc/hello-world.cc" ] if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { - libs = [ "atomic" ] + if (!is_clang) { + libs = [ "atomic" ] + } } configs = [ @@ -7002,23 +7321,6 @@ v8_source_set("parser_fuzzer") { v8_fuzzer("parser_fuzzer") { } -v8_source_set("regexp_builtins_fuzzer") { - sources = [ - "test/fuzzer/regexp-builtins.cc", - "test/fuzzer/regexp_builtins/mjsunit.js.h", - ] - - deps = [ ":fuzzer_support" ] - - configs = [ - ":external_config", - ":internal_config_base", - ] -} - -v8_fuzzer("regexp_builtins_fuzzer") { -} - v8_source_set("regexp_fuzzer") { sources = [ "test/fuzzer/regexp.cc" ] @@ -7052,8 +7354,6 @@ if (v8_enable_webassembly) { sources = [ "test/common/flag-utils.h", "test/common/wasm/flag-utils.h", - "test/common/wasm/wasm-interpreter.cc", - "test/common/wasm/wasm-interpreter.h", "test/common/wasm/wasm-module-runner.cc", "test/common/wasm/wasm-module-runner.h", ] @@ -7067,7 +7367,10 @@ if (v8_enable_webassembly) { ":v8_tracing", ] - public_deps = [ ":v8_maybe_icu" ] + public_deps = [ + ":v8_abseil", + ":v8_maybe_icu", + ] configs = [ ":external_config", @@ -7147,7 +7450,10 @@ if (v8_enable_webassembly) { ":wasm_test_common", ] - public_deps = [ ":v8_maybe_icu" ] + public_deps = [ + ":v8_abseil", + ":v8_maybe_icu", + ] configs = [ ":external_config", diff --git a/deps/v8/COMMON_OWNERS b/deps/v8/COMMON_OWNERS index b7dc8f2147de77..9e9d51d5835a1d 100644 --- a/deps/v8/COMMON_OWNERS +++ b/deps/v8/COMMON_OWNERS @@ -6,6 +6,8 @@ cbruni@chromium.org clemensb@chromium.org danno@chromium.org dinfuehr@chromium.org +dlehmann@chromium.org +dmercadier@chromium.org ecmziegler@chromium.org gdeepti@chromium.org hablich@chromium.org @@ -25,6 +27,7 @@ nicohartmann@chromium.org nikolaos@chromium.org omerkatz@chromium.org pthier@chromium.org +sroettger@google.com syg@chromium.org szuend@chromium.org tebbi@chromium.org diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 05b32b571c84e2..5cffcad442b366 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -14,18 +14,17 @@ vars = { # # Available images: # Emulation: - # - qemu.x64 (pulls terminal.qemu-x64-release) - # - qemu.arm64 (pulls terminal.qemu-arm64-release) + # - terminal.qemu-x64 + # - terminal.qemu-arm64 # - workstation.qemu-x64-release # Hardware: - # - generic.x64 (pulls terminal.x64-debug) - # - generic.arm64 (pulls terminal.arm64-debug) - # - chromebook.x64 (pulls terminal.chromebook-x64-debug) + # - minimal.x64 + # - core.x64-dfv2 # # Since the images are hundreds of MB, default to only downloading the image # most commonly useful for developers. Bots and developers that need to use # other images (e.g., qemu.arm64) can override this with additional images. - 'checkout_fuchsia_boot_images': "qemu.x64", + 'checkout_fuchsia_boot_images': "terminal.qemu-x64", 'checkout_fuchsia_product_bundles': '"{checkout_fuchsia_boot_images}" != ""', 'checkout_instrumented_libraries': False, @@ -50,30 +49,36 @@ vars = { 'check_v8_header_includes': False, # By default, download the fuchsia sdk from the public sdk directory. - 'fuchsia_sdk_cipd_prefix': 'fuchsia/sdk/gn/', + 'fuchsia_sdk_cipd_prefix': 'fuchsia/sdk/core/', + + # Used for downloading the Fuchsia SDK without running hooks. + 'checkout_fuchsia_no_hooks': False, # reclient CIPD package version - 'reclient_version': 're_client_version:0.99.0.3f95625-gomaip', + 'reclient_version': 're_client_version:0.113.0.8b45b89-gomaip', + + # This variable is overrided in Chromium's DEPS file. + 'build_with_chromium': False, # GN CIPD package version. - 'gn_version': 'git_revision:41fef642de70ecdcaaa26be96d56a0398f95abd4', + 'gn_version': 'git_revision:cc56a0f98bb34accd5323316e0292575ff17a5d4', # ninja CIPD package version # https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja 'ninja_version': 'version:2@1.11.1.chromium.6', # luci-go CIPD package version. - 'luci_go': 'git_revision:320bf3ed60cd4d24549d0ea9ee3a94394f2665ce', + 'luci_go': 'git_revision:fe3cfd422b1012c2c8cf00d65cdb11aa2c26cd66', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Fuchsia sdk # and whatever else without interference from each other. - 'fuchsia_version': 'version:12.20230322.3.1', + 'fuchsia_version': 'version:14.20230902.2.1', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_build-tools_version # and whatever else without interference from each other. - 'android_sdk_build-tools_version': '-VRKr36Uw8L_iFqqo9nevIBgNMggND5iWxjidyjnCgsC', + 'android_sdk_build-tools_version': 'YK9Rzw3fDzMHVzatNN6VlyoD_81amLZpN1AbmkdOd6AC', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_emulator_version # and whatever else without interference from each other. @@ -89,11 +94,11 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_platform-tools_version # and whatever else without interference from each other. - 'android_sdk_platform-tools_version': 'RSI3iwryh7URLGRgJHsCvUxj092woTPnKt4pwFcJ6L8C', + 'android_sdk_platform-tools_version': 'HWVsGs2HCKgSVv41FsOcsfJbNcB0UFiNrF6Tc4yRArYC', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_platforms_version # and whatever else without interference from each other. - 'android_sdk_platforms_version': 'eo5KvW6UVor92LwZai8Zulc624BQZoCu-yn7wa1z_YcC', + 'android_sdk_platforms_version': 'u-bhWbTME6u-DjypTgr3ZikCyeAeU6txkR9ET6Uudc8C', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_sources_version # and whatever else without interference from each other. @@ -101,18 +106,16 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_tools-lint_version # and whatever else without interference from each other. - 'android_sdk_cmdline-tools_version': '3Yn5Sn7BMObm8gsoZCF0loJMKg9_PpgU07G9DObCLdQC', + 'android_sdk_cmdline-tools_version': 'Sy00LuyBIUJdRGYKwg0zjWH8eAIUvgnnNiPkI8etaZYC', } deps = { 'base/trace_event/common': Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + '147f65333c38ddd1ebf554e89965c243c8ce50b3', 'build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + '9e9a4341dd24e68cba0f228567a6edbaff1c665b', + Var('chromium_url') + '/chromium/src/build.git' + '@' + 'e14e0cc3b60c6ba8901741da3f9c18b7fa983880', 'buildtools': - Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '0a6c69640f1841d9109eac70a25af310d4c1d8c7', - 'buildtools/clang_format/script': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + 'f97059df7f8b205064625cdb5f97b56668a125ef', + Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + 'b2043d4f435131d0a1bdd5342c17753ef9236572', 'buildtools/linux64': { 'packages': [ { @@ -133,12 +136,6 @@ deps = { 'dep_type': 'cipd', 'condition': 'host_os == "mac"', }, - 'buildtools/third_party/libc++/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + 'e44019bfac2b2d3ebe1618628884f85c8600e322', - 'buildtools/third_party/libc++abi/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '9643f2cf13d6935a84a30b7da7de53327733e190', - 'buildtools/third_party/libunwind/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + '29a6dda8c6588ba4abeafdb21be531e757983e31', 'buildtools/win': { 'packages': [ { @@ -164,19 +161,15 @@ deps = { 'test/mozilla/data': Var('chromium_url') + '/v8/deps/third_party/mozilla-tests.git' + '@' + 'f6c578a10ea707b1a8ab0b88943fe5115ce2b9be', 'test/test262/data': - Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + 'd216cc197269fc41eb6eca14710529c3d6650535', - 'third_party/android_ndk': { - 'url': Var('chromium_url') + '/android_ndk.git' + '@' + '8388a2be5421311dc75c5f937aae13d821a27f3d', - 'condition': 'checkout_android', - }, + Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + '9efb4f8e531efbc297680145a7fa67d7415d0a4a', 'third_party/android_platform': { - 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + '1bf9b932433ebb78828bf3c8cd0ccc86b9ef4787', + 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + '4b4eee2d24ec8002602e1b82d63a586d46507501', 'condition': 'checkout_android', }, 'third_party/android_sdk/public': { 'packages': [ { - 'package': 'chromium/third_party/android_sdk/public/build-tools/33.0.0', + 'package': 'chromium/third_party/android_sdk/public/build-tools/34.0.0', 'version': Var('android_sdk_build-tools_version'), }, { @@ -196,7 +189,7 @@ deps = { 'version': Var('android_sdk_platform-tools_version'), }, { - 'package': 'chromium/third_party/android_sdk/public/platforms/android-33', + 'package': 'chromium/third_party/android_sdk/public/platforms/android-34', 'version': Var('android_sdk_platforms_version'), }, { @@ -211,35 +204,57 @@ deps = { 'condition': 'checkout_android', 'dep_type': 'cipd', }, + 'third_party/android_toolchain/ndk': { + 'packages': [ + { + 'package': 'chromium/third_party/android_toolchain/android_toolchain', + 'version': 'R_8suM8m0oHbZ1awdxGXvKEFpAOETscbfZxkkMthyk8C', + }, + ], + 'condition': 'checkout_android', + 'dep_type': 'cipd', + }, 'third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + '018d397758e54d6a6d3b6ddf28a1784664d63f83', + 'url': Var('chromium_url') + '/catapult.git' + '@' + 'f16ca3c78e46cefa982100444844da3fcb25390e', 'condition': 'checkout_android', }, + 'third_party/clang-format/script': + Var('chromium_url') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + 'e5337933f2951cacd3aeacd238ce4578163ca0b9', 'third_party/colorama/src': { 'url': Var('chromium_url') + '/external/colorama.git' + '@' + '3de9f013df4b470069d03d250224062e8cf15c49', 'condition': 'checkout_android', }, + 'third_party/cpu_features/src': { + 'url': Var('chromium_url') + '/external/github.com/google/cpu_features.git' + '@' + '936b9ab5515dead115606559502e3864958f7f6e', + 'condition': 'checkout_android', + }, 'third_party/depot_tools': - Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '479e1e9055020c8d1351bf2194d0a606aeca93d5', - 'third_party/fuchsia-sdk/sdk': { - 'packages': [ - { - 'package': Var('fuchsia_sdk_cipd_prefix') + '${{platform}}', - 'version': Var('fuchsia_version'), - }, - ], + Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '693e0b312171685d34de77b39bc90b8271ad6541', + 'third_party/fuchsia-gn-sdk': { + 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-gn-sdk.git' + '@' + 'd1e0ff4350f77c7f6b246ff62c232318a73c8176', 'condition': 'checkout_fuchsia', - 'dep_type': 'cipd', + }, + # Exists for rolling the Fuchsia SDK. Check out of the SDK should always + # rely on the hook running |update_sdk.py| script below. + 'third_party/fuchsia-sdk/sdk': { + 'packages': [ + { + 'package': Var('fuchsia_sdk_cipd_prefix') + '${{platform}}', + 'version': Var('fuchsia_version'), + }, + ], + 'condition': 'checkout_fuchsia_no_hooks', + 'dep_type': 'cipd', }, 'third_party/google_benchmark/src': { - 'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + 'e8baf2622591569a27615b31372d1e9cc046af10', + 'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + 'b177433f3ee2513b1075140c723d73ab8901790f', }, 'third_party/googletest/src': Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + 'af29db7ec28d6df1c7f0f745186884091e602e07', 'third_party/icu': - Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '1e49ac26ddc712b1ab702f69023cbc57e9ae6628', + Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '985b9a6f70e13f3db741fed121e4dcc3046ad494', 'third_party/instrumented_libraries': - Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '0f536d22dbed454b1254c7e6d7130eab28fba1fa', + Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '032e9c850ab975f7c088a625dcf2256917dbdfa6', 'third_party/ittapi': { # Force checkout ittapi libraries to pass v8 header includes check on # bots that has check_v8_header_includes enabled. @@ -247,13 +262,19 @@ deps = { 'condition': "checkout_ittapi or check_v8_header_includes", }, 'third_party/jinja2': - Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + '264c07d7e64f2874434a3b8039e101ddf1b01e7e', + Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + '515dd10de9bf63040045902a4a310d2ba25213a0', 'third_party/jsoncpp/source': Var('chromium_url') + '/external/github.com/open-source-parsers/jsoncpp.git'+ '@' + '42e892d96e47b1f6e29844cc705e148ec4856448', + 'third_party/libc++/src': + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '84fb809dd6dae36d556dc0bb702c6cc2ce9d4b80', + 'third_party/libc++abi/src': + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '331847d7a5e6f8706689cf5d468e6e58c868fa10', + 'third_party/libunwind/src': + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'a321409e66c212098e755cfae1a978bbcff1ccbb', 'third_party/logdog/logdog': Var('chromium_url') + '/infra/luci/luci-py/client/libs/logdog' + '@' + '0b2078a90f7a638d576b3a7c407d136f2fb62399', 'third_party/markupsafe': - Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '13f4e8c9e206567eeb13bf585406ddc574005748', + Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '006709ba3ed87660a17bd4548c45663628f5ed85', 'third_party/ninja': { 'packages': [ { @@ -265,17 +286,17 @@ deps = { 'condition': 'host_cpu != "s390" and host_cpu != "ppc"' }, 'third_party/perfetto': - Var('android_url') + '/platform/external/perfetto.git' + '@' + '0d180f46481a96cbe8340734fa5cdce3bba636c8', + Var('android_url') + '/platform/external/perfetto.git' + '@' + '446adf5b7bb431d42838cb0302b27311fa4331cd', 'third_party/protobuf': Var('chromium_url') + '/external/github.com/google/protobuf'+ '@' + '6a59a2ad1f61d9696092f79b6d74368b4d7970a3', 'third_party/requests': { - 'url': Var('chromium_url') + '/external/github.com/kennethreitz/requests.git' + '@' + 'refs/tags/v2.23.0', + 'url': Var('chromium_url') + '/external/github.com/kennethreitz/requests.git' + '@' + 'c7e0fc087ceeadb8b4c84a0953a422c474093d6d', 'condition': 'checkout_android', }, 'third_party/zlib': - Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + '5edb52d4302d7aef232d585ec9ae27ef5c3c5438', + Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + 'f5fd0ad2663e239a31184ad4c9919991dda16f46', 'tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '7a7207a7f2eb0f7f5c9f304a51077a2fd504b3ed', + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '9fc887ccded86c9355f1abbe80c651271c59632f', 'tools/luci-go': { 'packages': [ { @@ -290,6 +311,10 @@ deps = { 'condition': 'host_cpu != "s390" and host_os != "aix"', 'dep_type': 'cipd', }, + 'third_party/abseil-cpp': { + 'url': Var('chromium_url') + '/chromium/src/third_party/abseil-cpp.git' + '@' + '7affa303ea4ebf4d4de65b3f20f230c7bb16a2ed', + 'condition': 'not build_with_chromium', + } } include_rules = [ @@ -589,6 +614,17 @@ hooks = [ 'action': ['python3', 'build/util/lastchange.py', '-o', 'build/util/LASTCHANGE'], }, + { + 'name': 'Download Fuchsia SDK from GCS', + 'pattern': '.', + 'condition': 'checkout_fuchsia', + 'action': [ + 'python3', + 'build/fuchsia/update_sdk.py', + '--cipd-prefix={fuchsia_sdk_cipd_prefix}', + '--version={fuchsia_version}', + ], + }, { 'name': 'Download Fuchsia system images', 'pattern': '.', diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index 5c31d4dfabd776..5d4bf98bcb3ab7 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -433,26 +433,29 @@ def _SkipTreeCheck(input_api, output_api): def _CheckCommitMessageBugEntry(input_api, output_api): """Check that bug entries are well-formed in commit message.""" bogus_bug_msg = ( - 'Bogus BUG entry: {}. Please specify the issue tracker prefix and the ' - 'issue number, separated by a colon, e.g. v8:123 or chromium:12345.') + 'Bogus BUG entry: {}. Please specify prefix:number for v8 or chromium ' + '(e.g. chromium:12345) or b/number for buganizer.') results = [] for bug in (input_api.change.BUG or '').split(','): bug = bug.strip() if 'none'.startswith(bug.lower()): continue - if ':' not in bug: + if ':' not in bug and not bug.startswith('b/'): try: - if int(bug) > 100000: - # Rough indicator for current chromium bugs. - prefix_guess = 'chromium' + if int(bug) > 10000000: + results.append( + 'Buganizer entry requires issue tracker prefix b/{}'.format(bug)) else: - prefix_guess = 'v8' - results.append( - 'BUG entry requires issue tracker prefix, e.g. {}:{}'.format( - prefix_guess, bug)) + if int(bug) > 200000: + prefix_guess = 'chromium' + else: + prefix_guess = 'v8' + results.append( + 'BUG entry requires issue tracker prefix, e.g. {}:{}'.format( + prefix_guess, bug)) except ValueError: results.append(bogus_bug_msg.format(bug)) - elif not re.match(r'\w+:\d+', bug): + elif not re.match(r'\w+[:\/]\d+', bug): results.append(bogus_bug_msg.format(bug)) return [output_api.PresubmitError(r) for r in results] diff --git a/deps/v8/WORKSPACE b/deps/v8/WORKSPACE index 306aff18091e2e..1c9fc1078d4176 100644 --- a/deps/v8/WORKSPACE +++ b/deps/v8/WORKSPACE @@ -34,6 +34,16 @@ pip_install( requirements = "//:bazel/requirements.txt", ) +local_repository( + name = "com_google_absl", + path = "third_party/abseil-cpp", +) + +bind( + name = "absl_optional", + actual = "@com_google_absl//absl/types:optional" +) + new_local_repository( name = "com_googlesource_chromium_icu", build_file = "bazel/BUILD.icu", @@ -55,3 +65,17 @@ bind( name = "base_trace_event_common", actual = "@com_googlesource_chromium_base_trace_event_common//:trace_event_common", ) + +http_archive( + name = "intel_ittapi", + add_prefix = "third_party/ittapi", + build_file = "@//:bazel/BUILD.ittapi", + sha256 = "36c42d3f2446ddfaa2d7dfa02dfaa79615933f1a68a72d7e4f1d70de7b56e2c9", + strip_prefix = "ittapi-3.24.0", + url = "https://github.com/intel/ittapi/archive/refs/tags/v3.24.0.tar.gz", +) + +bind( + name = "ittapi", + actual = "@intel_ittapi//:lib_ittapi", +) diff --git a/deps/v8/bazel/BUILD.ittapi b/deps/v8/bazel/BUILD.ittapi new file mode 100644 index 00000000000000..5bc1d2bd07edce --- /dev/null +++ b/deps/v8/bazel/BUILD.ittapi @@ -0,0 +1,15 @@ +cc_library( + name = "lib_ittapi", + srcs = [ + "third_party/ittapi/include/ittnotify.h", + "third_party/ittapi/include/jitprofiling.h", + "third_party/ittapi/src/ittnotify/ittnotify_config.h", + "third_party/ittapi/src/ittnotify/jitprofiling.c", + ], + hdrs = [ + "third_party/ittapi/include/ittnotify.h", + "third_party/ittapi/src/ittnotify/ittnotify_types.h", + ], + copts = ["-Iexternal/intel_ittapi/third_party/ittapi/include"], + visibility = ["//visibility:public"], +) diff --git a/deps/v8/bazel/defs.bzl b/deps/v8/bazel/defs.bzl index d4ff96887e7ca7..09844919a5b572 100644 --- a/deps/v8/bazel/defs.bzl +++ b/deps/v8/bazel/defs.bzl @@ -308,7 +308,10 @@ def v8_library( **kwargs ) -def _torque_initializers_impl(ctx): +# Use a single generator target for torque definitions and initializers. We can +# split the set of outputs by using OutputGroupInfo, that way we do not need to +# run the torque generator twice. +def _torque_files_impl(ctx): if ctx.workspace_name == "v8": v8root = "." else: @@ -327,7 +330,8 @@ def _torque_initializers_impl(ctx): args += [f.path for f in ctx.files.srcs] # Generate/declare output files - outs = [] + defs = [] + inits = [] for src in ctx.files.srcs: root, _period, _ext = src.path.rpartition(".") @@ -335,107 +339,39 @@ def _torque_initializers_impl(ctx): if root[:len(v8root)] == v8root: root = root[len(v8root):] file = ctx.attr.prefix + "/torque-generated/" + root - outs.append(ctx.actions.declare_file(file + "-tq-csa.cc")) - outs.append(ctx.actions.declare_file(file + "-tq-csa.h")) - outs += [ctx.actions.declare_file(ctx.attr.prefix + "/torque-generated/" + f) for f in ctx.attr.extras] + defs.append(ctx.actions.declare_file(file + "-tq-inl.inc")) + defs.append(ctx.actions.declare_file(file + "-tq.inc")) + defs.append(ctx.actions.declare_file(file + "-tq.cc")) + inits.append(ctx.actions.declare_file(file + "-tq-csa.cc")) + inits.append(ctx.actions.declare_file(file + "-tq-csa.h")) + + defs += [ctx.actions.declare_file(ctx.attr.prefix + "/torque-generated/" + f) for f in ctx.attr.definition_extras] + inits += [ctx.actions.declare_file(ctx.attr.prefix + "/torque-generated/" + f) for f in ctx.attr.initializer_extras] + outs = defs + inits ctx.actions.run( outputs = outs, inputs = ctx.files.srcs, arguments = args, executable = ctx.executable.tool, - mnemonic = "GenTorqueInitializers", - progress_message = "Generating Torque initializers", + mnemonic = "GenTorqueFiles", + progress_message = "Generating Torque files", ) - return [DefaultInfo(files = depset(outs))] - -_v8_torque_initializers = rule( - implementation = _torque_initializers_impl, - # cfg = v8_target_cpu_transition, - attrs = { - "prefix": attr.string(mandatory = True), - "srcs": attr.label_list(allow_files = True, mandatory = True), - "extras": attr.string_list(), - "tool": attr.label( - allow_files = True, - executable = True, - cfg = "exec", + return [ + DefaultInfo(files = depset(outs)), + OutputGroupInfo( + initializers = depset(inits), + definitions = depset(defs), ), - "args": attr.string_list(), - }, -) - -def v8_torque_initializers(name, noicu_srcs, icu_srcs, args, extras): - _v8_torque_initializers( - name = "noicu/" + name, - prefix = "noicu", - srcs = noicu_srcs, - args = args, - extras = extras, - tool = select({ - "@v8//bazel/config:v8_target_is_32_bits": ":noicu/torque_non_pointer_compression", - "//conditions:default": ":noicu/torque", - }), - ) - _v8_torque_initializers( - name = "icu/" + name, - prefix = "icu", - srcs = icu_srcs, - args = args, - extras = extras, - tool = select({ - "@v8//bazel/config:v8_target_is_32_bits": ":icu/torque_non_pointer_compression", - "//conditions:default": ":icu/torque", - }), - ) - -def _torque_definitions_impl(ctx): - if ctx.workspace_name == "v8": - v8root = "." - else: - v8root = "external/v8" - - # Arguments - args = [] - args += ctx.attr.args - args.append("-o") - args.append(ctx.bin_dir.path + "/" + v8root + "/" + ctx.attr.prefix + "/torque-generated") - args.append("-strip-v8-root") - args.append("-v8-root") - args.append(v8root) - - # Sources - args += [f.path for f in ctx.files.srcs] - - # Generate/declare output files - outs = [] - for src in ctx.files.srcs: - root, _period, _ext = src.path.rpartition(".") - - # Strip v8root - if root[:len(v8root)] == v8root: - root = root[len(v8root):] - file = ctx.attr.prefix + "/torque-generated/" + root - outs.append(ctx.actions.declare_file(file + "-tq-inl.inc")) - outs.append(ctx.actions.declare_file(file + "-tq.inc")) - outs.append(ctx.actions.declare_file(file + "-tq.cc")) - outs += [ctx.actions.declare_file(ctx.attr.prefix + "/torque-generated/" + f) for f in ctx.attr.extras] - ctx.actions.run( - outputs = outs, - inputs = ctx.files.srcs, - arguments = args, - executable = ctx.executable.tool, - mnemonic = "GenTorqueDefinitions", - progress_message = "Generating Torque definitions", - ) - return [DefaultInfo(files = depset(outs))] + ] -_v8_torque_definitions = rule( - implementation = _torque_definitions_impl, +_v8_torque_files = rule( + implementation = _torque_files_impl, # cfg = v8_target_cpu_transition, attrs = { "prefix": attr.string(mandatory = True), "srcs": attr.label_list(allow_files = True, mandatory = True), - "extras": attr.string_list(), + "definition_extras": attr.string_list(), + "initializer_extras": attr.string_list(), "tool": attr.label( allow_files = True, executable = True, @@ -445,24 +381,26 @@ _v8_torque_definitions = rule( }, ) -def v8_torque_definitions(name, noicu_srcs, icu_srcs, args, extras): - _v8_torque_definitions( +def v8_torque_files(name, noicu_srcs, icu_srcs, args, definition_extras, initializer_extras): + _v8_torque_files( name = "noicu/" + name, prefix = "noicu", srcs = noicu_srcs, args = args, - extras = extras, + definition_extras = definition_extras, + initializer_extras = initializer_extras, tool = select({ "@v8//bazel/config:v8_target_is_32_bits": ":noicu/torque_non_pointer_compression", "//conditions:default": ":noicu/torque", }), ) - _v8_torque_definitions( + _v8_torque_files( name = "icu/" + name, prefix = "icu", srcs = icu_srcs, args = args, - extras = extras, + definition_extras = definition_extras, + initializer_extras = initializer_extras, tool = select({ "@v8//bazel/config:v8_target_is_32_bits": ":icu/torque_non_pointer_compression", "//conditions:default": ":icu/torque", @@ -592,51 +530,65 @@ def _json(kv_pairs): return content def build_config_content(cpu, icu): + arch = cpu + if cpu == 'x86': + arch = 'ia32' return _json([ + ("arch", arch), + ("asan", "false"), + ("atomic_object_field_writes", "false"), + ("cfi", "false"), + ("clang_coverage", "false"), + ("clang", "true"), + ("code_comments", "false"), + ("component_build", "false"), + ("concurrent_marking", "false"), + ("conservative_stack_scanning", "false"), ("current_cpu", cpu), ("dcheck_always_on", "false"), + ("debug_code", "false"), + ("DEBUG_defined", "false"), + ("debugging_features", "false"), + ("dict_property_const_tracking", "false"), + ("direct_handle", "false"), + ("direct_local", "false"), + ("disassembler", "false"), + ("full_debug", "false"), + ("gdbjit", "false"), + ("has_jitless", "false"), + ("has_maglev", "false"), + ("has_turbofan", "true"), + ("has_webassembly", "false"), + ("i18n", icu), ("is_android", "false"), - ("is_asan", "false"), - ("is_cfi", "false"), - ("is_clang", "true"), - ("is_clang_coverage", "false"), - ("is_component_build", "false"), - ("is_debug", "false"), - ("is_full_debug", "false"), - ("is_msan", "false"), - ("is_tsan", "false"), - ("is_ubsan_vptr", "false"), + ("is_ios", "false"), + ("js_shared_memory", "false"), + ("lite_mode", "false"), + ("mips_arch_variant", '""'), + ("mips_use_msa", "false"), + ("msan", "false"), + ("official_build", "false"), + ("pointer_compression_shared_cage", "false"), + ("pointer_compression", "true"), + ("runtime_call_stats", "false"), + ("sandbox", "false"), + ("shared_ro_heap", "false"), + ("simd_mips", "false"), + ("simulator_run", "false"), + ("single_generation", "false"), + ("slow_dchecks", "false"), ("target_cpu", cpu), + ("third_party_heap", "false"), + ("tsan", "false"), + ("ubsan", "false"), + ("use_sanitizer", "false"), + ("v8_cfi", "false"), ("v8_current_cpu", cpu), - ("v8_dict_property_const_tracking", "false"), - ("v8_enable_atomic_object_field_writes", "false"), - ("v8_enable_conservative_stack_scanning", "false"), - ("v8_enable_concurrent_marking", "false"), - ("v8_enable_i18n_support", icu), - ("v8_enable_verify_predictable", "false"), - ("v8_enable_verify_csa", "false"), - ("v8_enable_lite_mode", "false"), - ("v8_enable_runtime_call_stats", "false"), - ("v8_enable_pointer_compression", "true"), - ("v8_enable_pointer_compression_shared_cage", "false"), - ("v8_enable_third_party_heap", "false"), - ("v8_enable_webassembly", "false"), - ("v8_control_flow_integrity", "false"), - ("v8_enable_single_generation", "false"), - ("v8_enable_sandbox", "false"), - ("v8_enable_shared_ro_heap", "false"), - ("v8_disable_write_barriers", "false"), ("v8_target_cpu", cpu), - ("v8_code_comments", "false"), - ("v8_enable_debug_code", "false"), - ("v8_enable_verify_heap", "false"), - ("v8_enable_slow_dchecks", "false"), - ("v8_enable_maglev", "false"), - ("v8_enable_turbofan", "true"), - ("v8_enable_disassembler", "false"), - ("is_DEBUG_defined", "false"), - ("v8_enable_gdbjit", "false"), - ("v8_jitless", "false"), + ("verify_csa", "false"), + ("verify_heap", "false"), + ("verify_predictable", "false"), + ("write_barriers", "false"), ]) # TODO(victorgomes): Create a rule (instead of a macro), that can diff --git a/deps/v8/gni/Info.plist b/deps/v8/gni/Info.plist new file mode 100644 index 00000000000000..f56ebb9f398942 --- /dev/null +++ b/deps/v8/gni/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UISupportedInterfaceOrientation + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index d38f376b94ae4c..e2505eea24ea52 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/chrome_build.gni") import("//build/config/compiler/pgo/pgo.gni") import("//build/config/gclient_args.gni") import("//build/config/ios/config.gni") @@ -91,12 +92,18 @@ declare_args() { # Scan the call stack conservatively during garbage collection. v8_enable_conservative_stack_scanning = false + # Use direct pointers in internal (direct) handles. + v8_enable_direct_handle = "" + + # Use direct pointers in local handles. + v8_enable_direct_local = false + v8_enable_google_benchmark = false cppgc_is_standalone = false - # Enable object names in cppgc for debug purposes. - cppgc_enable_object_names = false + # Enable object names in cppgc for profiling purposes. + cppgc_enable_object_names = is_chrome_for_testing # Enable young generation in cppgc. cppgc_enable_young_generation = false @@ -114,6 +121,9 @@ declare_args() { # due to an increased number of OOMs. cppgc_enable_2gb_cage = false + # Enable support for larger cages, up to 16GB. + cppgc_enable_larger_cage = false + # Enable advanced BigInt algorithms, costing about 10-30 KB binary size # depending on platform. Disabled on Android to save binary size. v8_advanced_bigint_algorithms = !is_android @@ -131,6 +141,10 @@ declare_args() { # Location of zlib. v8_zlib_path = "//third_party/zlib" + + # Change code emission and runtime features to be CET shadow-stack compliant + # (incomplete and experimental). + v8_enable_cet_shadow_stack = false } if (v8_use_external_startup_data == "") { @@ -179,6 +193,12 @@ if (v8_enable_turbofan == "") { assert(v8_enable_turbofan || !v8_enable_webassembly, "Webassembly is not available when Turbofan is disabled.") +# Direct internal handles are enabled by default if conservative stack scanning +# is enabled. +if (v8_enable_direct_handle == "") { + v8_enable_direct_handle = v8_enable_conservative_stack_scanning +} + # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute # paths for all configs in templates as they are shared in different # subdirectories. @@ -283,24 +303,56 @@ template("v8_header_set") { } template("v8_executable") { - executable(target_name) { - forward_variables_from(invoker, - "*", - [ - "configs", - "remove_configs", - ]) - configs -= v8_remove_configs - configs += v8_add_configs - if (defined(invoker.remove_configs)) { - configs -= invoker.remove_configs + if (is_ios) { + import("//build/config/ios/rules.gni") + + ios_app_bundle(target_name) { + forward_variables_from(invoker, + "*", + [ + "configs", + "remove_configs", + ]) + configs -= v8_remove_configs + configs += v8_add_configs + if (defined(invoker.remove_configs)) { + configs -= invoker.remove_configs + } + configs += invoker.configs + deps += [ v8_path_prefix + ":v8_dump_build_config" ] + + # Provide sensible defaults in case invoker did not define any of those + # required variables. + if (!defined(info_plist) && !defined(info_plist_target)) { + info_plist = v8_path_prefix + "/gni/Info.plist" + } + + bundle_identifier = "$ios_app_bundle_id_prefix.chrome.unittests.dev" } - configs += invoker.configs - if (is_linux || is_chromeos) { - # For enabling ASLR. - ldflags = [ "-pie" ] + } else { + executable(target_name) { + forward_variables_from(invoker, + "*", + [ + "configs", + "remove_configs", + ]) + configs -= v8_remove_configs + configs += v8_add_configs + if (defined(invoker.remove_configs)) { + configs -= invoker.remove_configs + } + configs += invoker.configs + if (is_linux || is_chromeos) { + # For enabling ASLR. + ldflags = [ "-pie" ] + } + deps += [ v8_path_prefix + ":v8_dump_build_config" ] + + if (is_win && !v8_enable_cet_shadow_stack) { + configs -= [ "//build/config/compiler:cet_shadow_stack" ] + } } - deps += [ v8_path_prefix + ":v8_dump_build_config" ] } } diff --git a/deps/v8/include/cppgc/DEPS b/deps/v8/include/cppgc/DEPS index 861d1187ba5501..2ec7ebbd4abd66 100644 --- a/deps/v8/include/cppgc/DEPS +++ b/deps/v8/include/cppgc/DEPS @@ -2,6 +2,7 @@ include_rules = [ "-include", "+v8config.h", "+v8-platform.h", + "+v8-source-location.h", "+cppgc", "-src", "+libplatform/libplatform.h", diff --git a/deps/v8/include/cppgc/internal/api-constants.h b/deps/v8/include/cppgc/internal/api-constants.h index 453ab88b461eb7..4e2a637e420560 100644 --- a/deps/v8/include/cppgc/internal/api-constants.h +++ b/deps/v8/include/cppgc/internal/api-constants.h @@ -40,13 +40,32 @@ constexpr size_t kGuardPageSize = 4096; static constexpr size_t kLargeObjectSizeThreshold = kPageSize / 2; +#if defined(CPPGC_POINTER_COMPRESSION) +#if defined(CPPGC_ENABLE_LARGER_CAGE) +constexpr unsigned kPointerCompressionShift = 3; +#else // !defined(CPPGC_ENABLE_LARGER_CAGE) +constexpr unsigned kPointerCompressionShift = 1; +#endif // !defined(CPPGC_ENABLE_LARGER_CAGE) +#endif // !defined(CPPGC_POINTER_COMPRESSION) + #if defined(CPPGC_CAGED_HEAP) #if defined(CPPGC_2GB_CAGE) -constexpr size_t kCagedHeapReservationSize = static_cast(2) * kGB; -#else // !defined(CPPGC_2GB_CAGE) -constexpr size_t kCagedHeapReservationSize = static_cast(4) * kGB; +constexpr size_t kCagedHeapDefaultReservationSize = + static_cast(2) * kGB; +constexpr size_t kCagedHeapMaxReservationSize = + kCagedHeapDefaultReservationSize; +#else // !defined(CPPGC_2GB_CAGE) +constexpr size_t kCagedHeapDefaultReservationSize = + static_cast(4) * kGB; +#if defined(CPPGC_POINTER_COMPRESSION) +constexpr size_t kCagedHeapMaxReservationSize = + size_t{1} << (31 + kPointerCompressionShift); +#else // !defined(CPPGC_POINTER_COMPRESSION) +constexpr size_t kCagedHeapMaxReservationSize = + kCagedHeapDefaultReservationSize; +#endif // !defined(CPPGC_POINTER_COMPRESSION) #endif // !defined(CPPGC_2GB_CAGE) -constexpr size_t kCagedHeapReservationAlignment = kCagedHeapReservationSize; +constexpr size_t kCagedHeapReservationAlignment = kCagedHeapMaxReservationSize; #endif // defined(CPPGC_CAGED_HEAP) static constexpr size_t kDefaultAlignment = sizeof(void*); diff --git a/deps/v8/include/cppgc/internal/caged-heap-local-data.h b/deps/v8/include/cppgc/internal/caged-heap-local-data.h index 7d689f87e71da1..1eb87dfb538955 100644 --- a/deps/v8/include/cppgc/internal/caged-heap-local-data.h +++ b/deps/v8/include/cppgc/internal/caged-heap-local-data.h @@ -46,7 +46,11 @@ class V8_EXPORT AgeTable final { enum class AdjacentCardsPolicy : uint8_t { kConsider, kIgnore }; static constexpr size_t kCardSizeInBytes = - api_constants::kCagedHeapReservationSize / kRequiredSize; + api_constants::kCagedHeapDefaultReservationSize / kRequiredSize; + + static constexpr size_t CalculateAgeTableSizeForHeapSize(size_t heap_size) { + return heap_size / kCardSizeInBytes; + } void SetAge(uintptr_t cage_offset, Age age) { table_[card(cage_offset)] = age; @@ -81,16 +85,18 @@ class V8_EXPORT AgeTable final { #endif // !V8_HAS_BUILTIN_CTZ static_assert((1 << kGranularityBits) == kCardSizeInBytes); const size_t entry = offset >> kGranularityBits; - CPPGC_DCHECK(table_.size() > entry); + CPPGC_DCHECK(CagedHeapBase::GetAgeTableSize() > entry); return entry; } - std::array table_; +#if defined(V8_CC_GNU) + // gcc disallows flexible arrays in otherwise empty classes. + Age table_[0]; +#else // !defined(V8_CC_GNU) + Age table_[]; +#endif // !defined(V8_CC_GNU) }; -static_assert(sizeof(AgeTable) == 1 * api_constants::kMB, - "Size of AgeTable is 1MB"); - #endif // CPPGC_YOUNG_GENERATION struct CagedHeapLocalData final { @@ -98,6 +104,10 @@ struct CagedHeapLocalData final { return *reinterpret_cast(CagedHeapBase::GetBase()); } + static constexpr size_t CalculateLocalDataSizeForHeapSize(size_t heap_size) { + return AgeTable::CalculateAgeTableSizeForHeapSize(heap_size); + } + #if defined(CPPGC_YOUNG_GENERATION) AgeTable age_table; #endif diff --git a/deps/v8/include/cppgc/internal/caged-heap.h b/deps/v8/include/cppgc/internal/caged-heap.h index 4db42aee089b5d..0c987a95447cc6 100644 --- a/deps/v8/include/cppgc/internal/caged-heap.h +++ b/deps/v8/include/cppgc/internal/caged-heap.h @@ -33,24 +33,31 @@ class V8_EXPORT CagedHeapBase { V8_INLINE static bool AreWithinCage(const void* addr1, const void* addr2) { #if defined(CPPGC_2GB_CAGE) - static constexpr size_t kHalfWordShift = sizeof(uint32_t) * CHAR_BIT - 1; + static constexpr size_t kHeapBaseShift = sizeof(uint32_t) * CHAR_BIT - 1; #else //! defined(CPPGC_2GB_CAGE) - static constexpr size_t kHalfWordShift = sizeof(uint32_t) * CHAR_BIT; +#if defined(CPPGC_POINTER_COMPRESSION) + static constexpr size_t kHeapBaseShift = + 31 + api_constants::kPointerCompressionShift; +#else // !defined(CPPGC_POINTER_COMPRESSION) + static constexpr size_t kHeapBaseShift = sizeof(uint32_t) * CHAR_BIT; +#endif // !defined(CPPGC_POINTER_COMPRESSION) #endif //! defined(CPPGC_2GB_CAGE) - static_assert((static_cast(1) << kHalfWordShift) == - api_constants::kCagedHeapReservationSize); + static_assert((static_cast(1) << kHeapBaseShift) == + api_constants::kCagedHeapMaxReservationSize); CPPGC_DCHECK(g_heap_base_); return !(((reinterpret_cast(addr1) ^ g_heap_base_) | (reinterpret_cast(addr2) ^ g_heap_base_)) >> - kHalfWordShift); + kHeapBaseShift); } V8_INLINE static uintptr_t GetBase() { return g_heap_base_; } + V8_INLINE static size_t GetAgeTableSize() { return g_age_table_size_; } private: friend class CagedHeap; static uintptr_t g_heap_base_; + static size_t g_age_table_size_; }; } // namespace internal diff --git a/deps/v8/include/cppgc/internal/gc-info.h b/deps/v8/include/cppgc/internal/gc-info.h index 08ffd411a8efab..c8cb99acbc0fde 100644 --- a/deps/v8/include/cppgc/internal/gc-info.h +++ b/deps/v8/include/cppgc/internal/gc-info.h @@ -24,89 +24,90 @@ struct V8_EXPORT EnsureGCInfoIndexTrait final { // Acquires a new GC info object and updates `registered_index` with the index // that identifies that new info accordingly. template - V8_INLINE static void EnsureIndex( + V8_INLINE static GCInfoIndex EnsureIndex( std::atomic& registered_index) { - EnsureGCInfoIndexTraitDispatch{}(registered_index); + return EnsureGCInfoIndexTraitDispatch{}(registered_index); } private: - template ::value, - bool = FinalizerTrait::HasFinalizer(), + template ::HasFinalizer(), bool = NameTrait::HasNonHiddenName()> struct EnsureGCInfoIndexTraitDispatch; - static void V8_PRESERVE_MOST - EnsureGCInfoIndexPolymorphic(std::atomic&, TraceCallback, - FinalizationCallback, NameCallback); - static void V8_PRESERVE_MOST EnsureGCInfoIndexPolymorphic( + static GCInfoIndex V8_PRESERVE_MOST + EnsureGCInfoIndex(std::atomic&, TraceCallback, + FinalizationCallback, NameCallback); + static GCInfoIndex V8_PRESERVE_MOST EnsureGCInfoIndex( std::atomic&, TraceCallback, FinalizationCallback); - static void V8_PRESERVE_MOST EnsureGCInfoIndexPolymorphic( - std::atomic&, TraceCallback, NameCallback); - static void V8_PRESERVE_MOST - EnsureGCInfoIndexPolymorphic(std::atomic&, TraceCallback); - static void V8_PRESERVE_MOST - EnsureGCInfoIndexNonPolymorphic(std::atomic&, TraceCallback, - FinalizationCallback, NameCallback); - static void V8_PRESERVE_MOST EnsureGCInfoIndexNonPolymorphic( - std::atomic&, TraceCallback, FinalizationCallback); - static void V8_PRESERVE_MOST EnsureGCInfoIndexNonPolymorphic( - std::atomic&, TraceCallback, NameCallback); - static void V8_PRESERVE_MOST - EnsureGCInfoIndexNonPolymorphic(std::atomic&, TraceCallback); + static GCInfoIndex V8_PRESERVE_MOST + EnsureGCInfoIndex(std::atomic&, TraceCallback, NameCallback); + static GCInfoIndex V8_PRESERVE_MOST + EnsureGCInfoIndex(std::atomic&, TraceCallback); }; -#define DISPATCH(is_polymorphic, has_finalizer, has_non_hidden_name, function) \ - template \ - struct EnsureGCInfoIndexTrait::EnsureGCInfoIndexTraitDispatch< \ - T, is_polymorphic, has_finalizer, has_non_hidden_name> { \ - V8_INLINE void operator()(std::atomic& registered_index) { \ - function; \ - } \ +#define DISPATCH(has_finalizer, has_non_hidden_name, function) \ + template \ + struct EnsureGCInfoIndexTrait::EnsureGCInfoIndexTraitDispatch< \ + T, has_finalizer, has_non_hidden_name> { \ + V8_INLINE GCInfoIndex \ + operator()(std::atomic& registered_index) { \ + return function; \ + } \ }; -// --------------------------------------------------------------------- // -// DISPATCH(is_polymorphic, has_finalizer, has_non_hidden_name, function) -// --------------------------------------------------------------------- // -DISPATCH(true, true, true, // - EnsureGCInfoIndexPolymorphic(registered_index, // - TraceTrait::Trace, // - FinalizerTrait::kCallback, // - NameTrait::GetName)) // -DISPATCH(true, true, false, // - EnsureGCInfoIndexPolymorphic(registered_index, // - TraceTrait::Trace, // - FinalizerTrait::kCallback)) // -DISPATCH(true, false, true, // - EnsureGCInfoIndexPolymorphic(registered_index, // - TraceTrait::Trace, // - NameTrait::GetName)) // -DISPATCH(true, false, false, // - EnsureGCInfoIndexPolymorphic(registered_index, // - TraceTrait::Trace)) // -DISPATCH(false, true, true, // - EnsureGCInfoIndexNonPolymorphic(registered_index, // - TraceTrait::Trace, // - FinalizerTrait::kCallback, // - NameTrait::GetName)) // -DISPATCH(false, true, false, // - EnsureGCInfoIndexNonPolymorphic(registered_index, // - TraceTrait::Trace, // - FinalizerTrait::kCallback)) // -DISPATCH(false, false, true, // - EnsureGCInfoIndexNonPolymorphic(registered_index, // - TraceTrait::Trace, // - NameTrait::GetName)) // -DISPATCH(false, false, false, // - EnsureGCInfoIndexNonPolymorphic(registered_index, // - TraceTrait::Trace)) // +// ------------------------------------------------------- // +// DISPATCH(has_finalizer, has_non_hidden_name, function) // +// ------------------------------------------------------- // +DISPATCH(true, true, // + EnsureGCInfoIndex(registered_index, // + TraceTrait::Trace, // + FinalizerTrait::kCallback, // + NameTrait::GetName)) // +DISPATCH(true, false, // + EnsureGCInfoIndex(registered_index, // + TraceTrait::Trace, // + FinalizerTrait::kCallback)) // +DISPATCH(false, true, // + EnsureGCInfoIndex(registered_index, // + TraceTrait::Trace, // + NameTrait::GetName)) // +DISPATCH(false, false, // + EnsureGCInfoIndex(registered_index, // + TraceTrait::Trace)) // #undef DISPATCH +// Trait determines how the garbage collector treats objects wrt. to traversing, +// finalization, and naming. +template +struct GCInfoTrait final { + V8_INLINE static GCInfoIndex Index() { + static_assert(sizeof(T), "T must be fully defined"); + static std::atomic + registered_index; // Uses zero initialization. + GCInfoIndex index = registered_index.load(std::memory_order_acquire); + if (V8_UNLIKELY(!index)) { + index = EnsureGCInfoIndexTrait::EnsureIndex(registered_index); + CPPGC_DCHECK(index != 0); + CPPGC_DCHECK(index == registered_index.load(std::memory_order_acquire)); + } + return index; + } + + static constexpr bool CheckCallbacksAreDefined() { + // No USE() macro available. + (void)static_cast(TraceTrait::Trace); + (void)static_cast(FinalizerTrait::kCallback); + (void)static_cast(NameTrait::GetName); + return true; + } +}; + // Fold types based on finalizer behavior. Note that finalizer characteristics // align with trace behavior, i.e., destructors are virtual when trace methods // are and vice versa. template -struct GCInfoFolding { +struct GCInfoFolding final { static constexpr bool kHasVirtualDestructorAtBase = std::has_virtual_destructor::value; static constexpr bool kBothTypesAreTriviallyDestructible = @@ -121,34 +122,24 @@ struct GCInfoFolding { static constexpr bool kWantsDetailedObjectNames = false; #endif // !CPPGC_SUPPORTS_OBJECT_NAMES - // Folding would regresses name resolution when deriving names from C++ - // class names as it would just folds a name to the base class name. - using ResultType = std::conditional_t<(kHasVirtualDestructorAtBase || - kBothTypesAreTriviallyDestructible || - kHasCustomFinalizerDispatchAtBase) && - !kWantsDetailedObjectNames, - ParentMostGarbageCollectedType, T>; -}; + // Always true. Forces the compiler to resolve callbacks which ensures that + // both modes don't break without requiring compiling a separate + // configuration. Only a single GCInfo (for `ResultType` below) will actually + // be instantiated but existence (and well-formedness) of all callbacks is + // checked. + static constexpr bool kCheckTypeGuardAlwaysTrue = + GCInfoTrait::CheckCallbacksAreDefined() && + GCInfoTrait::CheckCallbacksAreDefined(); -// Trait determines how the garbage collector treats objects wrt. to traversing, -// finalization, and naming. -template -struct GCInfoTrait final { - V8_INLINE static GCInfoIndex Index() { - static_assert(sizeof(T), "T must be fully defined"); - static std::atomic - registered_index; // Uses zero initialization. - GCInfoIndex index = registered_index.load(std::memory_order_acquire); - if (V8_UNLIKELY(!index)) { - EnsureGCInfoIndexTrait::EnsureIndex(registered_index); - // Slow path call uses V8_PRESERVE_MOST which does not support return - // values (also preserves RAX). Avoid out parameter by just reloading the - // value here which at this point is guaranteed to be set. - index = registered_index.load(std::memory_order_acquire); - CPPGC_DCHECK(index != 0); - } - return index; - } + // Folding would regress name resolution when deriving names from C++ + // class names as it would just folds a name to the base class name. + using ResultType = + std::conditional_t; }; } // namespace internal diff --git a/deps/v8/include/cppgc/internal/member-storage.h b/deps/v8/include/cppgc/internal/member-storage.h index 3dfafc4b08cd11..61b255ba637a92 100644 --- a/deps/v8/include/cppgc/internal/member-storage.h +++ b/deps/v8/include/cppgc/internal/member-storage.h @@ -122,17 +122,22 @@ class V8_TRIVIAL_ABI CompressedPointer final { } static V8_INLINE IntegralType Compress(const void* ptr) { - static_assert( - SentinelPointer::kSentinelValue == 0b10, - "The compression scheme relies on the sentinel encoded as 0b10"); + static_assert(SentinelPointer::kSentinelValue == + 1 << api_constants::kPointerCompressionShift, + "The compression scheme relies on the sentinel encoded as 1 " + "<< kPointerCompressionShift"); static constexpr size_t kGigaCageMask = ~(api_constants::kCagedHeapReservationAlignment - 1); + static constexpr size_t kPointerCompressionShiftMask = + (1 << api_constants::kPointerCompressionShift) - 1; CPPGC_DCHECK(CageBaseGlobal::IsSet()); const uintptr_t base = CageBaseGlobal::Get(); CPPGC_DCHECK(!ptr || ptr == kSentinelPointer || (base & kGigaCageMask) == (reinterpret_cast(ptr) & kGigaCageMask)); + CPPGC_DCHECK( + (reinterpret_cast(ptr) & kPointerCompressionShiftMask) == 0); #if defined(CPPGC_2GB_CAGE) // Truncate the pointer. @@ -140,8 +145,9 @@ class V8_TRIVIAL_ABI CompressedPointer final { static_cast(reinterpret_cast(ptr)); #else // !defined(CPPGC_2GB_CAGE) const auto uptr = reinterpret_cast(ptr); - // Shift the pointer by one and truncate. - auto compressed = static_cast(uptr >> 1); + // Shift the pointer and truncate. + auto compressed = static_cast( + uptr >> api_constants::kPointerCompressionShift); #endif // !defined(CPPGC_2GB_CAGE) // Normal compressed pointers must have the MSB set. CPPGC_DCHECK((!compressed || compressed == kCompressedSentinel) || @@ -157,9 +163,10 @@ class V8_TRIVIAL_ABI CompressedPointer final { #if defined(CPPGC_2GB_CAGE) const uint64_t mask = static_cast(static_cast(ptr)); #else // !defined(CPPGC_2GB_CAGE) - // Then, shift the result by one. It's important to shift the unsigned + // Then, shift the result. It's important to shift the unsigned // value, as otherwise it would result in undefined behavior. - const uint64_t mask = static_cast(static_cast(ptr)) << 1; + const uint64_t mask = static_cast(static_cast(ptr)) + << api_constants::kPointerCompressionShift; #endif // !defined(CPPGC_2GB_CAGE) return reinterpret_cast(mask & base); } @@ -170,7 +177,8 @@ class V8_TRIVIAL_ABI CompressedPointer final { SentinelPointer::kSentinelValue; #else // !defined(CPPGC_2GB_CAGE) static constexpr IntegralType kCompressedSentinel = - SentinelPointer::kSentinelValue >> 1; + SentinelPointer::kSentinelValue >> + api_constants::kPointerCompressionShift; #endif // !defined(CPPGC_2GB_CAGE) // All constructors initialize `value_`. Do not add a default value here as it // results in a non-atomic write on some builds, even when the atomic version diff --git a/deps/v8/include/cppgc/member.h b/deps/v8/include/cppgc/member.h index b6382a02358744..457f163bc78eab 100644 --- a/deps/v8/include/cppgc/member.h +++ b/deps/v8/include/cppgc/member.h @@ -597,8 +597,33 @@ using UncompressedMember = internal::BasicMember< T, internal::StrongMemberTag, internal::DijkstraWriteBarrierPolicy, internal::DefaultMemberCheckingPolicy, internal::RawPointer>; +#if defined(CPPGC_POINTER_COMPRESSION) +/** + * CompressedMember. Default implementation of cppgc::Member on builds with + * pointer compression. + */ +template +using CompressedMember = internal::BasicMember< + T, internal::StrongMemberTag, internal::DijkstraWriteBarrierPolicy, + internal::DefaultMemberCheckingPolicy, internal::CompressedPointer>; +#endif // defined(CPPGC_POINTER_COMPRESSION) + } // namespace subtle +namespace internal { + +struct Dummy; + +static constexpr size_t kSizeOfMember = sizeof(Member); +static constexpr size_t kSizeOfUncompressedMember = + sizeof(subtle::UncompressedMember); +#if defined(CPPGC_POINTER_COMPRESSION) +static constexpr size_t kSizeofCompressedMember = + sizeof(subtle::CompressedMember); +#endif // defined(CPPGC_POINTER_COMPRESSION) + +} // namespace internal + } // namespace cppgc #endif // INCLUDE_CPPGC_MEMBER_H_ diff --git a/deps/v8/include/cppgc/persistent.h b/deps/v8/include/cppgc/persistent.h index 709f3fd6ab0996..6eb1c659267d96 100644 --- a/deps/v8/include/cppgc/persistent.h +++ b/deps/v8/include/cppgc/persistent.h @@ -92,6 +92,7 @@ class BasicPersistent final : public PersistentBase, template ::value>> + // NOLINTNEXTLINE BasicPersistent( const BasicPersistent& other, @@ -116,6 +117,7 @@ class BasicPersistent final : public PersistentBase, typename MemberWeaknessTag, typename MemberCheckingPolicy, typename MemberStorageType, typename = std::enable_if_t::value>> + // NOLINTNEXTLINE BasicPersistent(const internal::BasicMember< U, MemberBarrierPolicy, MemberWeaknessTag, MemberCheckingPolicy, MemberStorageType>& member, @@ -180,6 +182,8 @@ class BasicPersistent final : public PersistentBase, } explicit operator bool() const { return Get(); } + // Historically we allow implicit conversions to T*. + // NOLINTNEXTLINE operator T*() const { return Get(); } T* operator->() const { return Get(); } T& operator*() const { return *Get(); } diff --git a/deps/v8/include/cppgc/platform.h b/deps/v8/include/cppgc/platform.h index 5a0a40ec8c0eb0..ae96579dd64e44 100644 --- a/deps/v8/include/cppgc/platform.h +++ b/deps/v8/include/cppgc/platform.h @@ -136,8 +136,13 @@ class V8_EXPORT Platform { * \param page_allocator The allocator used for maintaining meta data. Must stay * always alive and not change between multiple calls to InitializeProcess. If * no allocator is provided, a default internal version will be used. + * \param desired_heap_size Desired amount of virtual address space to reserve + * for the heap, in bytes. Actual size will be clamped to minimum and maximum + * values based on compile-time settings and may be rounded up. If this + * parameter is zero, a default value will be used. */ -V8_EXPORT void InitializeProcess(PageAllocator* page_allocator = nullptr); +V8_EXPORT void InitializeProcess(PageAllocator* page_allocator = nullptr, + size_t desired_heap_size = 0); /** * Must be called after destroying the last used heap. Some process-global diff --git a/deps/v8/include/cppgc/sentinel-pointer.h b/deps/v8/include/cppgc/sentinel-pointer.h index 8dbbab0ebd1f79..bee96c77607428 100644 --- a/deps/v8/include/cppgc/sentinel-pointer.h +++ b/deps/v8/include/cppgc/sentinel-pointer.h @@ -7,13 +7,20 @@ #include +#include "cppgc/internal/api-constants.h" + namespace cppgc { namespace internal { // Special tag type used to denote some sentinel member. The semantics of the // sentinel is defined by the embedder. struct SentinelPointer { +#if defined(CPPGC_POINTER_COMPRESSION) + static constexpr intptr_t kSentinelValue = + 1 << api_constants::kPointerCompressionShift; +#else // !defined(CPPGC_POINTER_COMPRESSION) static constexpr intptr_t kSentinelValue = 0b10; +#endif // !defined(CPPGC_POINTER_COMPRESSION) template operator T*() const { return reinterpret_cast(kSentinelValue); diff --git a/deps/v8/include/cppgc/source-location.h b/deps/v8/include/cppgc/source-location.h index da5a5ede520138..0dc28aedd9b225 100644 --- a/deps/v8/include/cppgc/source-location.h +++ b/deps/v8/include/cppgc/source-location.h @@ -5,87 +5,11 @@ #ifndef INCLUDE_CPPGC_SOURCE_LOCATION_H_ #define INCLUDE_CPPGC_SOURCE_LOCATION_H_ -#include -#include - -#include "v8config.h" // NOLINT(build/include_directory) - -#if defined(__has_builtin) -#define CPPGC_SUPPORTS_SOURCE_LOCATION \ - (__has_builtin(__builtin_FUNCTION) && __has_builtin(__builtin_FILE) && \ - __has_builtin(__builtin_LINE)) // NOLINT -#elif defined(V8_CC_GNU) && __GNUC__ >= 7 -#define CPPGC_SUPPORTS_SOURCE_LOCATION 1 -#elif defined(V8_CC_INTEL) && __ICC >= 1800 -#define CPPGC_SUPPORTS_SOURCE_LOCATION 1 -#else -#define CPPGC_SUPPORTS_SOURCE_LOCATION 0 -#endif +#include "v8-source-location.h" namespace cppgc { -/** - * Encapsulates source location information. Mimics C++20's - * `std::source_location`. - */ -class V8_EXPORT SourceLocation final { - public: - /** - * Construct source location information corresponding to the location of the - * call site. - */ -#if CPPGC_SUPPORTS_SOURCE_LOCATION - static constexpr SourceLocation Current( - const char* function = __builtin_FUNCTION(), - const char* file = __builtin_FILE(), size_t line = __builtin_LINE()) { - return SourceLocation(function, file, line); - } -#else - static constexpr SourceLocation Current() { return SourceLocation(); } -#endif // CPPGC_SUPPORTS_SOURCE_LOCATION - - /** - * Constructs unspecified source location information. - */ - constexpr SourceLocation() = default; - - /** - * Returns the name of the function associated with the position represented - * by this object, if any. - * - * \returns the function name as cstring. - */ - constexpr const char* Function() const { return function_; } - - /** - * Returns the name of the current source file represented by this object. - * - * \returns the file name as cstring. - */ - constexpr const char* FileName() const { return file_; } - - /** - * Returns the line number represented by this object. - * - * \returns the line number. - */ - constexpr size_t Line() const { return line_; } - - /** - * Returns a human-readable string representing this object. - * - * \returns a human-readable string representing source location information. - */ - std::string ToString() const; - - private: - constexpr SourceLocation(const char* function, const char* file, size_t line) - : function_(function), file_(file), line_(line) {} - - const char* function_ = nullptr; - const char* file_ = nullptr; - size_t line_ = 0u; -}; +using SourceLocation = v8::SourceLocation; } // namespace cppgc diff --git a/deps/v8/include/cppgc/trace-trait.h b/deps/v8/include/cppgc/trace-trait.h index 694fbfdccf4dcb..5fc863d2ebbac5 100644 --- a/deps/v8/include/cppgc/trace-trait.h +++ b/deps/v8/include/cppgc/trace-trait.h @@ -53,6 +53,14 @@ struct TraceDescriptor { TraceCallback callback; }; +/** + * Callback for getting a TraceDescriptor for a given address. + * + * \param address Possibly inner address of an object. + * \returns a TraceDescriptor for the provided address. + */ +using TraceDescriptorCallback = TraceDescriptor (*)(const void* address); + namespace internal { struct V8_EXPORT TraceTraitFromInnerAddressImpl { diff --git a/deps/v8/include/cppgc/visitor.h b/deps/v8/include/cppgc/visitor.h index 9b135e39a0be1c..1d6b39a14fd16a 100644 --- a/deps/v8/include/cppgc/visitor.h +++ b/deps/v8/include/cppgc/visitor.h @@ -5,10 +5,13 @@ #ifndef INCLUDE_CPPGC_VISITOR_H_ #define INCLUDE_CPPGC_VISITOR_H_ +#include + #include "cppgc/custom-space.h" #include "cppgc/ephemeron-pair.h" #include "cppgc/garbage-collected.h" #include "cppgc/internal/logging.h" +#include "cppgc/internal/member-storage.h" #include "cppgc/internal/pointer-policies.h" #include "cppgc/liveness-broker.h" #include "cppgc/member.h" @@ -113,6 +116,30 @@ class V8_EXPORT Visitor { } #endif // defined(CPPGC_POINTER_COMPRESSION) + template + void TraceMultiple(const subtle::UncompressedMember* start, size_t len) { + static_assert(sizeof(T), "Pointee type must be fully defined."); + static_assert(internal::IsGarbageCollectedOrMixinType::value, + "T must be GarbageCollected or GarbageCollectedMixin type"); + VisitMultipleUncompressedMember(start, len, + &TraceTrait::GetTraceDescriptor); + } + + template , subtle::UncompressedMember>>* = nullptr> + void TraceMultiple(const Member* start, size_t len) { + static_assert(sizeof(T), "Pointee type must be fully defined."); + static_assert(internal::IsGarbageCollectedOrMixinType::value, + "T must be GarbageCollected or GarbageCollectedMixin type"); +#if defined(CPPGC_POINTER_COMPRESSION) + static_assert(std::is_same_v, subtle::CompressedMember>, + "Member and CompressedMember must be the same."); + VisitMultipleCompressedMember(start, len, + &TraceTrait::GetTraceDescriptor); +#endif // defined(CPPGC_POINTER_COMPRESSION) + } + /** * Trace method for inlined objects that are not allocated themselves but * otherwise follow managed heap layout and have a Trace() method. @@ -131,6 +158,26 @@ class V8_EXPORT Visitor { TraceTrait::Trace(this, &object); } + template + void TraceMultiple(const T* start, size_t len) { +#if V8_ENABLE_CHECKS + // This object is embedded in potentially multiple nested objects. The + // outermost object must not be in construction as such objects are (a) not + // processed immediately, and (b) only processed conservatively if not + // otherwise possible. + CheckObjectNotInConstruction(start); +#endif // V8_ENABLE_CHECKS + for (size_t i = 0; i < len; ++i) { + const T* object = &start[i]; + if constexpr (std::is_polymorphic_v) { + // The object's vtable may be uninitialized in which case the object is + // not traced. + if (*reinterpret_cast(object) == 0) continue; + } + TraceTrait::Trace(this, object); + } + } + /** * Registers a weak callback method on the object of type T. See * LivenessBroker for an usage example. @@ -314,6 +361,39 @@ class V8_EXPORT Visitor { WeakCallback callback, const void* data) {} virtual void HandleMovableReference(const void**) {} + virtual void VisitMultipleUncompressedMember( + const void* start, size_t len, + TraceDescriptorCallback get_trace_descriptor) { + // Default implementation merely delegates to Visit(). + const char* it = static_cast(start); + const char* end = it + len * internal::kSizeOfUncompressedMember; + for (; it < end; it += internal::kSizeOfUncompressedMember) { + const auto* current = reinterpret_cast(it); + const void* object = current->LoadAtomic(); + if (!object) continue; + + Visit(object, get_trace_descriptor(object)); + } + } + +#if defined(CPPGC_POINTER_COMPRESSION) + virtual void VisitMultipleCompressedMember( + const void* start, size_t len, + TraceDescriptorCallback get_trace_descriptor) { + // Default implementation merely delegates to Visit(). + const char* it = static_cast(start); + const char* end = it + len * internal::kSizeofCompressedMember; + for (; it < end; it += internal::kSizeofCompressedMember) { + const auto* current = + reinterpret_cast(it); + const void* object = current->LoadAtomic(); + if (!object) continue; + + Visit(object, get_trace_descriptor(object)); + } + } +#endif // defined(CPPGC_POINTER_COMPRESSION) + private: template static void WeakCallbackMethodDelegate(const LivenessBroker& info, @@ -326,8 +406,7 @@ class V8_EXPORT Visitor { template static void HandleWeak(const LivenessBroker& info, const void* object) { const PointerType* weak = static_cast(object); - auto* raw_ptr = weak->GetFromGC(); - if (!info.IsHeapObjectAlive(raw_ptr)) { + if (!info.IsHeapObjectAlive(weak->GetFromGC())) { weak->ClearFromGC(); } } @@ -413,8 +492,7 @@ class V8_EXPORT RootVisitor { template static void HandleWeak(const LivenessBroker& info, const void* object) { const PointerType* weak = static_cast(object); - auto* raw_ptr = weak->GetFromGC(); - if (!info.IsHeapObjectAlive(raw_ptr)) { + if (!info.IsHeapObjectAlive(weak->GetFromGC())) { weak->ClearFromGC(); } } diff --git a/deps/v8/include/js_protocol.pdl b/deps/v8/include/js_protocol.pdl index 6285d9b6f24f63..ed6226308c266b 100644 --- a/deps/v8/include/js_protocol.pdl +++ b/deps/v8/include/js_protocol.pdl @@ -580,6 +580,7 @@ domain Debugger other promiseRejection XHR + step # Object containing break-specific auxiliary properties. optional object data # Hit breakpoints IDs @@ -631,7 +632,7 @@ domain Debugger Runtime.ExecutionContextId executionContextId # Content hash of the script, SHA-256. string hash - # Embedder-specific auxiliary data. + # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} optional object executionContextAuxData # URL of source map associated with script (if any). optional string sourceMapURL @@ -670,7 +671,7 @@ domain Debugger Runtime.ExecutionContextId executionContextId # Content hash of the script, SHA-256. string hash - # Embedder-specific auxiliary data. + # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} optional object executionContextAuxData # True, if this script is generated as a result of the live edit operation. experimental optional boolean isLiveEdit @@ -1013,9 +1014,33 @@ domain Runtime # Unique script identifier. type ScriptId extends string - # Represents the value serialiazed by the WebDriver BiDi specification - # https://w3c.github.io/webdriver-bidi. - type WebDriverValue extends object + # Represents options for serialization. Overrides `generatePreview`, `returnByValue` and + # `generateWebDriverValue`. + type SerializationOptions extends object + properties + enum serialization + # Whether the result should be deep-serialized. The result is put into + # `deepSerializedValue` and `ObjectId` is provided. + deep + # Whether the result is expected to be a JSON object which should be sent by value. + # The result is put either into `value` or into `unserializableValue`. Synonym of + # `returnByValue: true`. Overrides `returnByValue`. + json + # Only remote object id is put in the result. Same bahaviour as if no + # `serializationOptions`, `generatePreview`, `returnByValue` nor `generateWebDriverValue` + # are provided. + idOnly + + # Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode. + optional integer maxDepth + + # Embedder-specific parameters. For example if connected to V8 in Chrome these control DOM + # serialization via `maxNodeDepth: integer` and `includeShadowTree: "none" | "open" | "all"`. + # Values can be only of type string or integer. + optional object additionalParameters + + # Represents deep serialized value. + type DeepSerializedValue extends object properties enum type undefined @@ -1043,6 +1068,10 @@ domain Runtime window optional any value optional string objectId + # Set if value reference met more then once during serialization. In such + # case, value is provided only to one of the serialized values. Unique + # per value in the scope of one CDP call. + optional integer weakLocalObjectReference # Unique object identifier. type RemoteObjectId extends string @@ -1096,8 +1125,10 @@ domain Runtime optional UnserializableValue unserializableValue # String representation of the object. optional string description - # WebDriver BiDi representation of the value. - experimental optional WebDriverValue webDriverValue + # Deprecated. Use `deepSerializedValue` instead. WebDriver BiDi representation of the value. + deprecated optional DeepSerializedValue webDriverValue + # Deep serialized value. + experimental optional DeepSerializedValue deepSerializedValue # Unique object identifier (for non-primitive values). optional RemoteObjectId objectId # Preview containing abbreviated property values. Specified for `object` type values only. @@ -1283,7 +1314,7 @@ domain Runtime # multiple processes, so can be reliably used to identify specific context while backend # performs a cross-process navigation. experimental string uniqueId - # Embedder-specific auxiliary data. + # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} optional object auxData # Detailed information about exception (or error) that was thrown during script compilation or @@ -1387,6 +1418,7 @@ domain Runtime # execution. Overrides `setPauseOnException` state. optional boolean silent # Whether the result is expected to be a JSON object which should be sent by value. + # Can be overriden by `serializationOptions`. optional boolean returnByValue # Whether preview should be generated for the result. experimental optional boolean generatePreview @@ -1410,10 +1442,15 @@ domain Runtime # boundaries). # This is mutually exclusive with `executionContextId`. experimental optional string uniqueContextId + # Deprecated. Use `serializationOptions: {serialization:"deep"}` instead. # Whether the result should contain `webDriverValue`, serialized according to # https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but # resulting `objectId` is still provided. - experimental optional boolean generateWebDriverValue + deprecated optional boolean generateWebDriverValue + # Specifies the result serialization. If provided, overrides + # `generatePreview`, `returnByValue` and `generateWebDriverValue`. + experimental optional SerializationOptions serializationOptions + returns # Call result. RemoteObject result @@ -1499,8 +1536,15 @@ domain Runtime # boundaries). # This is mutually exclusive with `contextId`. experimental optional string uniqueContextId - # Whether the result should be serialized according to https://w3c.github.io/webdriver-bidi. - experimental optional boolean generateWebDriverValue + # Deprecated. Use `serializationOptions: {serialization:"deep"}` instead. + # Whether the result should contain `webDriverValue`, serialized + # according to + # https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but + # resulting `objectId` is still provided. + deprecated optional boolean generateWebDriverValue + # Specifies the result serialization. If provided, overrides + # `generatePreview`, `returnByValue` and `generateWebDriverValue`. + experimental optional SerializationOptions serializationOptions returns # Evaluation result. RemoteObject result diff --git a/deps/v8/include/libplatform/libplatform.h b/deps/v8/include/libplatform/libplatform.h index 9ec60c04f9cce6..6a34f4324106c6 100644 --- a/deps/v8/include/libplatform/libplatform.h +++ b/deps/v8/include/libplatform/libplatform.h @@ -23,6 +23,8 @@ enum class MessageLoopBehavior : bool { kWaitForWork = true }; +enum class PriorityMode : bool { kDontApply, kApply }; + /** * Returns a new instance of the default v8::Platform implementation. * @@ -35,13 +37,17 @@ enum class MessageLoopBehavior : bool { * calling v8::platform::RunIdleTasks to process the idle tasks. * If |tracing_controller| is nullptr, the default platform will create a * v8::platform::TracingController instance and use it. + * If |priority_mode| is PriorityMode::kApply, the default platform will use + * multiple task queues executed by threads different system-level priorities + * (where available) to schedule tasks. */ V8_PLATFORM_EXPORT std::unique_ptr NewDefaultPlatform( int thread_pool_size = 0, IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled, InProcessStackDumping in_process_stack_dumping = InProcessStackDumping::kDisabled, - std::unique_ptr tracing_controller = {}); + std::unique_ptr tracing_controller = {}, + PriorityMode priority_mode = PriorityMode::kDontApply); /** * The same as NewDefaultPlatform but disables the worker thread pool. diff --git a/deps/v8/include/v8-callbacks.h b/deps/v8/include/v8-callbacks.h index f0fa561a3d76fb..2a25b9ee04e003 100644 --- a/deps/v8/include/v8-callbacks.h +++ b/deps/v8/include/v8-callbacks.h @@ -147,14 +147,18 @@ using JitCodeEventHandler = void (*)(const JitCodeEvent* event); * the callback functions, you therefore cannot manipulate objects (set or * delete properties for example) since it is possible such operations will * result in the allocation of objects. + * TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink. */ enum GCType { kGCTypeScavenge = 1 << 0, - kGCTypeMinorMarkCompact = 1 << 1, + kGCTypeMinorMarkSweep = 1 << 1, + kGCTypeMinorMarkCompact V8_DEPRECATE_SOON( + "Use kGCTypeMinorMarkSweep instead of kGCTypeMinorMarkCompact.") = + kGCTypeMinorMarkSweep, kGCTypeMarkSweepCompact = 1 << 2, kGCTypeIncrementalMarking = 1 << 3, kGCTypeProcessWeakCallbacks = 1 << 4, - kGCTypeAll = kGCTypeScavenge | kGCTypeMinorMarkCompact | + kGCTypeAll = kGCTypeScavenge | kGCTypeMinorMarkSweep | kGCTypeMarkSweepCompact | kGCTypeIncrementalMarking | kGCTypeProcessWeakCallbacks }; @@ -323,20 +327,21 @@ using WasmAsyncResolvePromiseCallback = void (*)( using WasmLoadSourceMapCallback = Local (*)(Isolate* isolate, const char* name); -// --- Callback for checking if WebAssembly Simd is enabled --- -using WasmSimdEnabledCallback = bool (*)(Local context); - -// --- Callback for checking if WebAssembly exceptions are enabled --- -using WasmExceptionsEnabledCallback = bool (*)(Local context); - // --- Callback for checking if WebAssembly GC is enabled --- // If the callback returns true, it will also enable Wasm stringrefs. using WasmGCEnabledCallback = bool (*)(Local context); +// --- Callback for checking if WebAssembly imported strings are enabled --- +using WasmImportedStringsEnabledCallback = bool (*)(Local context); + // --- Callback for checking if the SharedArrayBuffer constructor is enabled --- using SharedArrayBufferConstructorEnabledCallback = bool (*)(Local context); +// --- Callback for checking if the compile hints magic comments are enabled --- +using JavaScriptCompileHintsMagicEnabledCallback = + bool (*)(Local context); + /** * HostImportModuleDynamicallyCallback is called when we * require the embedder to load a module. This is used as part of the dynamic @@ -419,6 +424,45 @@ using PrepareStackTraceCallback = MaybeLocal (*)(Local context, Local error, Local sites); +#if defined(V8_OS_WIN) +/** + * Callback to selectively enable ETW tracing based on the document URL. + * Implemented by the embedder, it should never call back into V8. + * + * Windows allows passing additional data to the ETW EnableCallback: + * https://learn.microsoft.com/en-us/windows/win32/api/evntprov/nc-evntprov-penablecallback + * + * This data can be configured in a WPR (Windows Performance Recorder) + * profile, adding a CustomFilter to an EventProvider like the following: + * + * + * + * + * + * Where: + * - Name="57277741-3638-4A4B-BDBA-0AC6E45DA56C" is the GUID of the V8 + * ETW provider, (see src/libplatform/etw/etw-provider-win.h), + * - Type="0x80000000" is EVENT_FILTER_TYPE_SCHEMATIZED, + * - Value="AQABAAAAAA..." is a base64-encoded byte array that is + * base64-decoded by Windows and passed to the ETW enable callback in + * the 'PEVENT_FILTER_DESCRIPTOR FilterData' argument; see: + * https://learn.microsoft.com/en-us/windows/win32/api/evntprov/ns-evntprov-event_filter_descriptor. + * + * This array contains a struct EVENT_FILTER_HEADER followed by a + * variable length payload, and as payload we pass a string in JSON format, + * with a list of regular expressions that should match the document URL + * in order to enable ETW tracing: + * { + * "version": "1.0", + * "filtered_urls": [ + * "https:\/\/.*\.chromium\.org\/.*", "https://v8.dev/";, "..." + * ] + * } + */ +using FilterETWSessionByURLCallback = + bool (*)(Local context, const std::string& etw_filter_payload); +#endif // V8_OS_WIN + } // namespace v8 #endif // INCLUDE_V8_ISOLATE_CALLBACKS_H_ diff --git a/deps/v8/include/v8-context.h b/deps/v8/include/v8-context.h index 3589caabd4b7c1..50c7e6f494ce36 100644 --- a/deps/v8/include/v8-context.h +++ b/deps/v8/include/v8-context.h @@ -395,7 +395,7 @@ Local Context::GetEmbedderData(int index) { #ifndef V8_ENABLE_CHECKS using A = internal::Address; using I = internal::Internals; - A ctx = *reinterpret_cast(this); + A ctx = internal::ValueHelper::ValueAsAddress(this); A embedder_data = I::ReadTaggedPointerField(ctx, I::kNativeContextEmbedderDataOffset); int value_offset = @@ -407,15 +407,9 @@ Local Context::GetEmbedderData(int index) { value = I::DecompressTaggedField(embedder_data, static_cast(value)); #endif -#ifdef V8_ENABLE_CONSERVATIVE_STACK_SCANNING - return Local(reinterpret_cast(value)); -#else - internal::Isolate* isolate = internal::IsolateFromNeverReadOnlySpaceObject( - *reinterpret_cast(this)); - A* result = HandleScope::CreateHandle(isolate, value); - return Local(reinterpret_cast(result)); -#endif - + auto isolate = reinterpret_cast( + internal::IsolateFromNeverReadOnlySpaceObject(ctx)); + return Local::New(isolate, value); #else return SlowGetEmbedderData(index); #endif @@ -442,9 +436,12 @@ void* Context::GetAlignedPointerFromEmbedderData(int index) { template MaybeLocal Context::GetDataFromSnapshotOnce(size_t index) { - T* data = reinterpret_cast(GetDataFromSnapshotOnce(index)); - if (data) internal::PerformCastCheck(data); - return Local(data); + auto slot = GetDataFromSnapshotOnce(index); + if (slot) { + internal::PerformCastCheck( + internal::ValueHelper::SlotAsValue(slot)); + } + return Local::FromSlot(slot); } Context* Context::Cast(v8::Data* data) { diff --git a/deps/v8/include/v8-embedder-heap.h b/deps/v8/include/v8-embedder-heap.h index 9e2e3ef58c4341..c37dadf7a39d55 100644 --- a/deps/v8/include/v8-embedder-heap.h +++ b/deps/v8/include/v8-embedder-heap.h @@ -34,6 +34,8 @@ class V8_EXPORT EmbedderRootsHandler { * for retaining the object. The embedder may use |WrapperClassId()| to * distinguish cases where it wants handles to be treated as roots from not * being treated as roots. + * + * The concrete implementations must be thread-safe. */ virtual bool IsRoot(const v8::TracedReference& handle) = 0; @@ -47,6 +49,16 @@ class V8_EXPORT EmbedderRootsHandler { * handle via the object or class id. */ virtual void ResetRoot(const v8::TracedReference& handle) = 0; + + /** + * Similar to |ResetRoot()|, but opportunistic. The function is called in + * parallel for different handles and as such must be thread-safe. In case, + * |false| is returned, |ResetRoot()| will be recalled for the same handle. + */ + virtual bool TryResetRoot(const v8::TracedReference& handle) { + ResetRoot(handle); + return true; + } }; } // namespace v8 diff --git a/deps/v8/include/v8-fast-api-calls.h b/deps/v8/include/v8-fast-api-calls.h index 0fe7cd2489b05e..e40f1068faba99 100644 --- a/deps/v8/include/v8-fast-api-calls.h +++ b/deps/v8/include/v8-fast-api-calls.h @@ -388,13 +388,19 @@ struct FastOneByteString { class V8_EXPORT CFunctionInfo { public: + enum class Int64Representation : uint8_t { + kNumber = 0, // Use numbers to represent 64 bit integers. + kBigInt = 1, // Use BigInts to represent 64 bit integers. + }; + // Construct a struct to hold a CFunction's type information. // |return_info| describes the function's return type. // |arg_info| is an array of |arg_count| CTypeInfos describing the // arguments. Only the last argument may be of the special type // CTypeInfo::kCallbackOptionsType. CFunctionInfo(const CTypeInfo& return_info, unsigned int arg_count, - const CTypeInfo* arg_info); + const CTypeInfo* arg_info, + Int64Representation repr = Int64Representation::kNumber); const CTypeInfo& ReturnInfo() const { return return_info_; } @@ -404,6 +410,8 @@ class V8_EXPORT CFunctionInfo { return HasOptions() ? arg_count_ - 1 : arg_count_; } + Int64Representation GetInt64Representation() const { return repr_; } + // |index| must be less than ArgumentCount(). // Note: if the last argument passed on construction of CFunctionInfo // has type CTypeInfo::kCallbackOptionsType, it is not included in @@ -418,6 +426,7 @@ class V8_EXPORT CFunctionInfo { private: const CTypeInfo return_info_; + const Int64Representation repr_; const unsigned int arg_count_; const CTypeInfo* arg_info_; }; @@ -469,6 +478,9 @@ class V8_EXPORT CFunction { unsigned int ArgumentCount() const { return type_info_->ArgumentCount(); } const void* GetAddress() const { return address_; } + CFunctionInfo::Int64Representation GetInt64Representation() const { + return type_info_->GetInt64Representation(); + } const CFunctionInfo* GetTypeInfo() const { return type_info_; } enum class OverloadResolution { kImpossible, kAtRuntime, kAtCompileTime }; @@ -598,7 +610,8 @@ struct count template struct count : count {}; -template +template class CFunctionInfoImpl : public CFunctionInfo { static constexpr int kOptionsArgCount = count(); @@ -613,18 +626,20 @@ class CFunctionInfoImpl : public CFunctionInfo { public: constexpr CFunctionInfoImpl() : CFunctionInfo(RetBuilder::Build(), sizeof...(ArgBuilders), - arg_info_storage_), + arg_info_storage_, Representation), arg_info_storage_{ArgBuilders::Build()...} { constexpr CTypeInfo::Type kReturnType = RetBuilder::Build().GetType(); static_assert(kReturnType == CTypeInfo::Type::kVoid || kReturnType == CTypeInfo::Type::kBool || kReturnType == CTypeInfo::Type::kInt32 || kReturnType == CTypeInfo::Type::kUint32 || + kReturnType == CTypeInfo::Type::kInt64 || + kReturnType == CTypeInfo::Type::kUint64 || kReturnType == CTypeInfo::Type::kFloat32 || kReturnType == CTypeInfo::Type::kFloat64 || kReturnType == CTypeInfo::Type::kPointer || kReturnType == CTypeInfo::Type::kAny, - "64-bit int, string and api object values are not currently " + "String and api object values are not currently " "supported return types."); } @@ -845,8 +860,11 @@ class CFunctionBuilderWithFunction { return *this; } + template auto Build() { - static CFunctionInfoImpl instance; + static CFunctionInfoImpl + instance; return CFunction(fn_, &instance); } diff --git a/deps/v8/include/v8-function-callback.h b/deps/v8/include/v8-function-callback.h index 60ecca1fd2a34f..17b37cdda1e817 100644 --- a/deps/v8/include/v8-function-callback.h +++ b/deps/v8/include/v8-function-callback.h @@ -78,7 +78,6 @@ class ReturnValue { // See FunctionCallbackInfo. static constexpr int kIsolateValueIndex = -2; - static constexpr int kDefaultValueValueIndex = -1; internal::Address* value_; }; @@ -127,16 +126,16 @@ class FunctionCallbackInfo { friend class internal::FunctionCallbackArguments; friend class internal::CustomArguments; friend class debug::ConsoleCallArguments; - friend class internal::Builtins; + static constexpr int kHolderIndex = 0; static constexpr int kIsolateIndex = 1; - static constexpr int kReturnValueDefaultValueIndex = 2; + static constexpr int kUnusedIndex = 2; static constexpr int kReturnValueIndex = 3; static constexpr int kDataIndex = 4; static constexpr int kNewTargetIndex = 5; - static constexpr int kArgsLength = 6; - static constexpr int kArgsLengthWithReceiver = 7; + + static constexpr int kArgsLengthWithReceiver = kArgsLength + 1; // Codegen constants: static constexpr int kSize = 3 * internal::kApiSystemPointerSize; @@ -147,8 +146,6 @@ class FunctionCallbackInfo { kValuesOffset + internal::kApiSystemPointerSize; static constexpr int kThisValuesIndex = -1; - static_assert(ReturnValue::kDefaultValueValueIndex == - kReturnValueDefaultValueIndex - kReturnValueIndex); static_assert(ReturnValue::kIsolateValueIndex == kIsolateIndex - kReturnValueIndex); @@ -258,17 +255,17 @@ class PropertyCallbackInfo { static constexpr int kShouldThrowOnErrorIndex = 0; static constexpr int kHolderIndex = 1; static constexpr int kIsolateIndex = 2; - static constexpr int kReturnValueDefaultValueIndex = 3; + static constexpr int kUnusedIndex = 3; static constexpr int kReturnValueIndex = 4; static constexpr int kDataIndex = 5; static constexpr int kThisIndex = 6; - static constexpr int kArgsLength = 7; static constexpr int kSize = 1 * internal::kApiSystemPointerSize; V8_INLINE explicit PropertyCallbackInfo(internal::Address* args) : args_(args) {} + internal::Address* args_; }; @@ -286,7 +283,7 @@ void ReturnValue::Set(const Global& handle) { if (V8_UNLIKELY(handle.IsEmpty())) { *value_ = GetDefaultValue(); } else { - *value_ = *reinterpret_cast(*handle); + *value_ = handle.ptr(); } } @@ -297,7 +294,7 @@ void ReturnValue::Set(const BasicTracedReference& handle) { if (V8_UNLIKELY(handle.IsEmpty())) { *value_ = GetDefaultValue(); } else { - *value_ = *reinterpret_cast(handle.val_); + *value_ = handle.ptr(); } } @@ -309,7 +306,7 @@ void ReturnValue::Set(const Local handle) { if (V8_UNLIKELY(handle.IsEmpty())) { *value_ = GetDefaultValue(); } else { - *value_ = internal::ValueHelper::ValueAsAddress(*handle); + *value_ = handle.ptr(); } } @@ -378,7 +375,6 @@ void ReturnValue::SetEmptyString() { template Isolate* ReturnValue::GetIsolate() const { - // Isolate is always the pointer below the default value on the stack. return *reinterpret_cast(&value_[kIsolateValueIndex]); } @@ -403,8 +399,8 @@ void ReturnValue::Set(S* whatever) { template internal::Address ReturnValue::GetDefaultValue() { - // Default value is always the pointer below value_ on the stack. - return value_[kDefaultValueValueIndex]; + using I = internal::Internals; + return I::GetRoot(GetIsolate(), I::kTheHoleValueRootIndex); } template diff --git a/deps/v8/include/v8-function.h b/deps/v8/include/v8-function.h index 1e35bfc8bfa272..30a9fcfe174acb 100644 --- a/deps/v8/include/v8-function.h +++ b/deps/v8/include/v8-function.h @@ -87,6 +87,12 @@ class V8_EXPORT Function : public Object { */ int GetScriptColumnNumber() const; + /** + * Returns zero based start position (character offset) of function body and + * kLineOffsetNotFound if no information available. + */ + int GetScriptStartPosition() const; + /** * Returns scriptId. */ diff --git a/deps/v8/include/v8-handle-base.h b/deps/v8/include/v8-handle-base.h new file mode 100644 index 00000000000000..d346a80de2a147 --- /dev/null +++ b/deps/v8/include/v8-handle-base.h @@ -0,0 +1,185 @@ +// Copyright 2023 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef INCLUDE_V8_HANDLE_BASE_H_ +#define INCLUDE_V8_HANDLE_BASE_H_ + +#include "v8-internal.h" // NOLINT(build/include_directory) + +namespace v8 { + +namespace internal { + +// Helper functions about values contained in handles. +// A value is either an indirect pointer or a direct pointer, depending on +// whether direct local support is enabled. +class ValueHelper final { + public: +#ifdef V8_ENABLE_DIRECT_LOCAL + static constexpr Address kTaggedNullAddress = 1; + static constexpr Address kEmpty = kTaggedNullAddress; +#else + static constexpr Address kEmpty = kNullAddress; +#endif // V8_ENABLE_DIRECT_LOCAL + + template + V8_INLINE static bool IsEmpty(T* value) { + return reinterpret_cast
(value) == kEmpty; + } + + // Returns a handle's "value" for all kinds of abstract handles. For Local, + // it is equivalent to `*handle`. The variadic parameters support handle + // types with extra type parameters, like `Persistent`. + template