mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-06-23 11:50:04 +00:00
Compare commits
3 Commits
v7.0.0
...
x64-on-mac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afa7582669 | ||
|
|
178048426a | ||
|
|
3a905cc320 |
4
.github/actionlint.yaml
vendored
4
.github/actionlint.yaml
vendored
@@ -7,7 +7,3 @@ self-hosted-runner:
|
|||||||
# organization. `null` means disabling configuration variables check.
|
# organization. `null` means disabling configuration variables check.
|
||||||
# Empty array means no configuration variable is allowed.
|
# Empty array means no configuration variable is allowed.
|
||||||
config-variables: null
|
config-variables: null
|
||||||
paths:
|
|
||||||
.github/workflows/test.yml:
|
|
||||||
ignore:
|
|
||||||
- 'invalid runner name.+'
|
|
||||||
|
|||||||
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.30.6
|
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
source-root: src
|
source-root: src
|
||||||
@@ -59,7 +59,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.30.6
|
uses: github/codeql-action/autobuild@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
@@ -73,4 +73,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.30.6
|
uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
|
||||||
|
|||||||
365
.github/workflows/test.yml
vendored
365
.github/workflows/test.yml
vendored
@@ -16,6 +16,19 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
test-x64-on-mac-arm64:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Install uv
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
python-version: cpython-3.9-macos-x86_64
|
||||||
|
activate-environment: true
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__/fixtures/uv-project
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
@@ -27,10 +40,10 @@ jobs:
|
|||||||
- name: Actionlint
|
- name: Actionlint
|
||||||
uses: eifinger/actionlint-action@23c85443d840cd73bbecb9cddfc933cc21649a38 # v1.9.1
|
uses: eifinger/actionlint-action@23c85443d840cd73bbecb9cddfc933cc21649a38 # v1.9.1
|
||||||
- name: Run zizmor
|
- name: Run zizmor
|
||||||
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 # v0.2.0
|
uses: zizmorcore/zizmor-action@5ca5fc7a4779c5263a3ffa0e1f693009994446d1 # v0.1.2
|
||||||
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
node-version: "20"
|
||||||
- run: |
|
- run: |
|
||||||
npm install
|
npm install
|
||||||
- run: |
|
- run: |
|
||||||
@@ -72,138 +85,82 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
UVX_PATH: ${{ steps.setup-uv.outputs.uvx-path }}
|
UVX_PATH: ${{ steps.setup-uv.outputs.uvx-path }}
|
||||||
|
|
||||||
test-uv-no-modify-path:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install with UV_NO_MODIFY_PATH set
|
|
||||||
id: setup-uv
|
|
||||||
uses: ./
|
|
||||||
env:
|
|
||||||
UV_NO_MODIFY_PATH: 1
|
|
||||||
- run: |
|
|
||||||
"${UV_PATH}" sync
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
UV_PATH: ${{ steps.setup-uv.outputs.uv-path }}
|
|
||||||
- name: uv is not on PATH
|
|
||||||
run: |
|
|
||||||
if command -v uv; then
|
|
||||||
echo "uv should not be on PATH"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
test-specific-version:
|
test-specific-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
input:
|
uv-version: ["0.3.0", "0.3.2", "0.3", "0.3.x", ">=0.3.0"]
|
||||||
- version-input: "0.3.0"
|
|
||||||
expected-version: "0.3.0"
|
|
||||||
- version-input: "0.3.2"
|
|
||||||
expected-version: "0.3.2"
|
|
||||||
- version-input: "0.3"
|
|
||||||
expected-version: "0.3.5"
|
|
||||||
- version-input: "0.3.x"
|
|
||||||
expected-version: "0.3.5"
|
|
||||||
- version-input: ">=0.4.25,<0.5"
|
|
||||||
expected-version: "0.4.30"
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install version ${{ matrix.input.version-input }}
|
- name: Install version ${{ matrix.uv-version }}
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.uv-version }}
|
||||||
|
- run: uv sync
|
||||||
|
working-directory: __tests__/fixtures/uv-project
|
||||||
|
|
||||||
|
test-semver-range:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ ubuntu-latest, selfhosted-ubuntu-arm64 ]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Install version 0.3
|
||||||
id: setup-uv
|
id: setup-uv
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.input.version-input }}
|
version: "0.3"
|
||||||
- name: Correct version gets installed
|
- name: Correct version gets installed
|
||||||
run: |
|
run: |
|
||||||
if [ "$(uv --version)" != "uv ${{ matrix.input.expected-version }}" ]; then
|
if [ "$(uv --version)" != "uv 0.3.5" ]; then
|
||||||
echo "Wrong uv version: $(uv --version)"
|
echo "Wrong uv version: $(uv --version)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Output has correct version
|
- name: Output has correct version
|
||||||
run: |
|
run: |
|
||||||
if [ "$UV_VERSION" != "${{ matrix.input.expected-version }}" ]; then
|
if [ "$UV_VERSION" != "0.3.5" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
|
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
|
||||||
|
|
||||||
test-latest-version:
|
test-pep440-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
version-input: ["latest", ">=0.8"]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install version ${{ matrix.version-input }}
|
- name: Install version 0.4.30
|
||||||
|
id: setup-uv
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.version-input }}
|
version: ">=0.4.25,<0.5"
|
||||||
- name: Latest version gets installed
|
|
||||||
run: |
|
|
||||||
LATEST_VERSION=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/astral-sh/uv/releases/latest | jq -r '.tag_name')
|
|
||||||
echo "Latest version is $LATEST_VERSION"
|
|
||||||
if [ "$(uv --version)" != "uv $LATEST_VERSION" ]; then
|
|
||||||
echo "Wrong uv version: $(uv --version)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
|
|
||||||
test-from-working-directory-version:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
input:
|
|
||||||
- working-directory: "__tests__/fixtures/pyproject-toml-project"
|
|
||||||
expected-version: "0.5.14"
|
|
||||||
- working-directory: "__tests__/fixtures/uv-toml-project"
|
|
||||||
expected-version: "0.5.15"
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install version from ${{ matrix.input.working-directory }}
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
working-directory: ${{ matrix.input.working-directory }}
|
|
||||||
- name: Correct version gets installed
|
- name: Correct version gets installed
|
||||||
run: |
|
run: |
|
||||||
if [ "$(uv --version)" != "uv ${{ matrix.input.expected-version }}" ]; then
|
if [ "$(uv --version)" != "uv 0.4.30" ]; then
|
||||||
echo "Wrong uv version: $(uv --version)"
|
echo "Wrong uv version: $(uv --version)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test-version-file-version:
|
test-pyproject-file-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
input:
|
|
||||||
- version-file: "__tests__/fixtures/uv-in-requirements-txt-project/requirements.txt"
|
|
||||||
expected-version: "0.6.17"
|
|
||||||
- version-file: "__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt"
|
|
||||||
expected-version: "0.8.3"
|
|
||||||
- version-file: "__tests__/fixtures/.tool-versions"
|
|
||||||
expected-version: "0.5.15"
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install version from ${{ matrix.input.version-file }}
|
- name: Install version 0.5.14
|
||||||
|
id: setup-uv
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
version-file: ${{ matrix.input.version-file }}
|
working-directory: "__tests__/fixtures/pyproject-toml-project"
|
||||||
- name: Correct version gets installed
|
- name: Correct version gets installed
|
||||||
run: |
|
run: |
|
||||||
if [ "$(uv --version)" != "uv ${{ matrix.input.expected-version }}" ]; then
|
if [ "$(uv --version)" != "uv 0.5.14" ]; then
|
||||||
echo "Wrong uv version: $(uv --version)"
|
echo "Wrong uv version: $(uv --version)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -221,6 +178,78 @@ jobs:
|
|||||||
working-directory: "__tests__/fixtures/malformed-pyproject-toml-project"
|
working-directory: "__tests__/fixtures/malformed-pyproject-toml-project"
|
||||||
- run: uv --help
|
- run: uv --help
|
||||||
|
|
||||||
|
test-uv-file-version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Install version 0.5.15
|
||||||
|
id: setup-uv
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
working-directory: "__tests__/fixtures/uv-toml-project"
|
||||||
|
- name: Correct version gets installed
|
||||||
|
run: |
|
||||||
|
if [ "$(uv --version)" != "uv 0.5.15" ]; then
|
||||||
|
echo "Wrong uv version: $(uv --version)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
test-version-file-version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Install from requirements file
|
||||||
|
id: setup-uv
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
version-file: "__tests__/fixtures/uv-in-requirements-txt-project/requirements.txt"
|
||||||
|
- name: Correct version gets installed
|
||||||
|
run: |
|
||||||
|
if [ "$(uv --version)" != "uv 0.6.17" ]; then
|
||||||
|
echo "Wrong uv version: $(uv --version)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
test-version-file-hash-version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Install from requirements file
|
||||||
|
id: setup-uv
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
version-file: "__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt"
|
||||||
|
- name: Correct version gets installed
|
||||||
|
run: |
|
||||||
|
if [ "$(uv --version)" != "uv 0.8.3" ]; then
|
||||||
|
echo "Wrong uv version: $(uv --version)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
test-tool-versions-file-version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Install from .tools-versions file
|
||||||
|
id: setup-uv
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
version-file: "__tests__/fixtures/.tool-versions"
|
||||||
|
- name: Correct version gets installed
|
||||||
|
run: |
|
||||||
|
if [ "$(uv --version)" != "uv 0.5.15" ]; then
|
||||||
|
echo "Wrong uv version: $(uv --version)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
test-checksum:
|
test-checksum:
|
||||||
runs-on: ${{ matrix.inputs.os }}
|
runs-on: ${{ matrix.inputs.os }}
|
||||||
strategy:
|
strategy:
|
||||||
@@ -441,7 +470,7 @@ jobs:
|
|||||||
working-directory: __tests__/fixtures/requirements-txt-project
|
working-directory: __tests__/fixtures/requirements-txt-project
|
||||||
test-restore-cache-requirements-txt:
|
test-restore-cache-requirements-txt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test-setup-cache-requirements-txt
|
needs: test-setup-cache
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
@@ -509,78 +538,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
||||||
|
|
||||||
test-setup-cache-save-cache-false:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Setup with cache
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
save-cache: false
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-save-cache-false
|
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
shell: bash
|
|
||||||
test-restore-cache-save-cache-false:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: test-setup-cache-save-cache-false
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Restore with cache
|
|
||||||
id: restore
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-save-cache-false
|
|
||||||
- name: Cache was not hit
|
|
||||||
run: |
|
|
||||||
if [ "$CACHE_HIT" == "true" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
|
||||||
|
|
||||||
test-setup-cache-restore-cache-false:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Setup with cache
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-restore-cache-false
|
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
shell: bash
|
|
||||||
test-restore-cache-restore-cache-false:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: test-setup-cache-restore-cache-false
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Restore with cache
|
|
||||||
id: restore
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
restore-cache: false
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-restore-cache-false
|
|
||||||
- name: Cache was not hit
|
|
||||||
run: |
|
|
||||||
if [ "$CACHE_HIT" == "true" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
|
||||||
|
|
||||||
test-cache-local:
|
test-cache-local:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -599,7 +556,6 @@ jobs:
|
|||||||
- name: Setup with cache
|
- name: Setup with cache
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-local
|
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-local
|
||||||
- run: |
|
- run: |
|
||||||
if [ "$UV_CACHE_DIR" != "${{ matrix.inputs.expected-cache-dir }}" ]; then
|
if [ "$UV_CACHE_DIR" != "${{ matrix.inputs.expected-cache-dir }}" ]; then
|
||||||
@@ -608,25 +564,6 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
test-cache-local-cache-disabled:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Setup without cache
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
enable-cache: false
|
|
||||||
|
|
||||||
- name: Check UV_CACHE_DIR is not set
|
|
||||||
run: |
|
|
||||||
if [ -n "$UV_CACHE_DIR" ]; then
|
|
||||||
echo "UV_CACHE_DIR should not be set when cache is disabled: $UV_CACHE_DIR"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
test-setup-cache-local:
|
test-setup-cache-local:
|
||||||
runs-on: selfhosted-ubuntu-arm64
|
runs-on: selfhosted-ubuntu-arm64
|
||||||
steps:
|
steps:
|
||||||
@@ -794,59 +731,20 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test-cache-prune-force:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Setup uv
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-prune-force
|
|
||||||
- name: Create long running python script
|
|
||||||
run: |
|
|
||||||
echo 'import time' > __tests__/fixtures/uv-project/long-running.py
|
|
||||||
echo 'time.sleep(300)' >> __tests__/fixtures/uv-project/long-running.py
|
|
||||||
- run: uv run long-running.py &
|
|
||||||
working-directory: __tests__/fixtures/uv-project
|
|
||||||
|
|
||||||
test-cache-dir-from-file:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Verify uv cache dir is not populated
|
|
||||||
run: |
|
|
||||||
if [ -f "/tmp/pyproject-toml-defined-cache-path/CACHEDIR.TAG" ]; then
|
|
||||||
echo "Cache dir should not exist"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- name: Setup uv
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
working-directory: __tests__/fixtures/cache-dir-defined-project
|
|
||||||
- run: uv sync
|
|
||||||
working-directory: __tests__/fixtures/cache-dir-defined-project
|
|
||||||
- name: Verify uv cache dir is populated
|
|
||||||
run: |
|
|
||||||
if [ ! -f "/tmp/pyproject-toml-defined-cache-path/CACHEDIR.TAG" ]; then
|
|
||||||
echo "Cache dir should exist"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
all-tests-passed:
|
all-tests-passed:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- lint
|
- lint
|
||||||
- test-default-version
|
- test-default-version
|
||||||
- test-uv-no-modify-path
|
|
||||||
- test-specific-version
|
- test-specific-version
|
||||||
- test-latest-version
|
- test-semver-range
|
||||||
- test-from-working-directory-version
|
- test-pep440-version
|
||||||
|
- test-pyproject-file-version
|
||||||
- test-malformed-pyproject-file-fallback
|
- test-malformed-pyproject-file-fallback
|
||||||
|
- test-uv-file-version
|
||||||
- test-version-file-version
|
- test-version-file-version
|
||||||
|
- test-version-file-hash-version
|
||||||
|
- test-tool-versions-file-version
|
||||||
- test-checksum
|
- test-checksum
|
||||||
- test-with-explicit-token
|
- test-with-explicit-token
|
||||||
- test-uvx
|
- test-uvx
|
||||||
@@ -856,17 +754,12 @@ jobs:
|
|||||||
- test-activate-environment
|
- test-activate-environment
|
||||||
- test-musl
|
- test-musl
|
||||||
- test-cache-local
|
- test-cache-local
|
||||||
- test-cache-local-cache-disabled
|
|
||||||
- test-setup-cache
|
- test-setup-cache
|
||||||
- test-restore-cache
|
- test-restore-cache
|
||||||
- test-setup-cache-requirements-txt
|
- test-setup-cache-requirements-txt
|
||||||
- test-restore-cache-requirements-txt
|
- test-restore-cache-requirements-txt
|
||||||
- test-setup-cache-dependency-glob
|
- test-setup-cache-dependency-glob
|
||||||
- test-restore-cache-dependency-glob
|
- test-restore-cache-dependency-glob
|
||||||
- test-setup-cache-save-cache-false
|
|
||||||
- test-restore-cache-save-cache-false
|
|
||||||
- test-setup-cache-restore-cache-false
|
|
||||||
- test-restore-cache-restore-cache-false
|
|
||||||
- test-setup-cache-local
|
- test-setup-cache-local
|
||||||
- test-restore-cache-local
|
- test-restore-cache-local
|
||||||
- test-tilde-expansion-cache-local-path
|
- test-tilde-expansion-cache-local-path
|
||||||
@@ -876,12 +769,10 @@ jobs:
|
|||||||
- test-custom-manifest-file
|
- test-custom-manifest-file
|
||||||
- test-absolute-path
|
- test-absolute-path
|
||||||
- test-relative-path
|
- test-relative-path
|
||||||
- test-cache-prune-force
|
|
||||||
- test-cache-dir-from-file
|
|
||||||
if: always()
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
- name: All tests passed
|
- name: All tests passed
|
||||||
run: |
|
run: |
|
||||||
echo "All jobs passed: ${{ !(contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}"
|
echo "All jobs passed: ${{ !contains(needs.*.result, 'failure') }}"
|
||||||
# shellcheck disable=SC2242
|
# shellcheck disable=SC2242
|
||||||
exit ${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && 1 || 0 }}
|
exit ${{ contains(needs.*.result, 'failure') && 1 || 0 }}
|
||||||
|
|||||||
44
.github/workflows/update-known-versions.yml
vendored
44
.github/workflows/update-known-versions.yml
vendored
@@ -3,8 +3,6 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 4 * * *" # Run every day at 4am UTC
|
- cron: "0 4 * * *" # Run every day at 4am UTC
|
||||||
repository_dispatch:
|
|
||||||
types: [ pypi_release ]
|
|
||||||
|
|
||||||
permissions: {}
|
permissions: {}
|
||||||
|
|
||||||
@@ -13,11 +11,12 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-24.04-arm
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: true
|
persist-credentials: false
|
||||||
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "20"
|
||||||
- name: Update known versions
|
- name: Update known versions
|
||||||
@@ -27,25 +26,18 @@ jobs:
|
|||||||
src/download/checksum/known-checksums.ts
|
src/download/checksum/known-checksums.ts
|
||||||
version-manifest.json
|
version-manifest.json
|
||||||
${{ secrets.GITHUB_TOKEN }}
|
${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Check for changes
|
- run: npm install && npm run all
|
||||||
id: changes_exist
|
- name: Create Pull Request
|
||||||
run: |
|
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||||
git status --porcelain
|
with:
|
||||||
if [ -n "$(git status --porcelain)" ]; then
|
commit-message: "chore: update known versions"
|
||||||
echo "changes_exist=true" >> "$GITHUB_OUTPUT"
|
title:
|
||||||
else
|
"chore: update known versions for ${{
|
||||||
echo "changes_exist=false" >> "$GITHUB_OUTPUT"
|
steps.update-known-versions.outputs.latest-version }}"
|
||||||
fi
|
body:
|
||||||
- name: Compile changes
|
"chore: update known versions for ${{
|
||||||
if: ${{ steps.changes_exist.outputs.changes_exist == 'true' }}
|
steps.update-known-versions.outputs.latest-version }}"
|
||||||
run: npm ci && npm run all
|
base: main
|
||||||
- name: Commit and push changes
|
labels: "automated-pr,update-known-versions"
|
||||||
if: ${{ steps.changes_exist.outputs.changes_exist == 'true' }}
|
branch: update-known-versions-pr
|
||||||
run: |
|
delete-branch: true
|
||||||
git config user.name "$GITHUB_ACTOR"
|
|
||||||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
|
||||||
git add .
|
|
||||||
git commit -m "chore: update known versions for $LATEST_VERSION"
|
|
||||||
git push origin HEAD:refs/heads/main
|
|
||||||
env:
|
|
||||||
LATEST_VERSION: ${{ steps.update-known-versions.outputs.latest-version }}
|
|
||||||
|
|||||||
45
README.md
45
README.md
@@ -22,8 +22,6 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
|
|||||||
- [Validate checksum](#validate-checksum)
|
- [Validate checksum](#validate-checksum)
|
||||||
- [Enable Caching](#enable-caching)
|
- [Enable Caching](#enable-caching)
|
||||||
- [Cache dependency glob](#cache-dependency-glob)
|
- [Cache dependency glob](#cache-dependency-glob)
|
||||||
- [Restore cache](#restore-cache)
|
|
||||||
- [Save cache](#save-cache)
|
|
||||||
- [Local cache path](#local-cache-path)
|
- [Local cache path](#local-cache-path)
|
||||||
- [Disable cache pruning](#disable-cache-pruning)
|
- [Disable cache pruning](#disable-cache-pruning)
|
||||||
- [Ignore nothing to cache](#ignore-nothing-to-cache)
|
- [Ignore nothing to cache](#ignore-nothing-to-cache)
|
||||||
@@ -125,7 +123,7 @@ This will override any python version specifications in `pyproject.toml` and `.p
|
|||||||
- run: uv pip install --python=3.13t pip
|
- run: uv pip install --python=3.13t pip
|
||||||
```
|
```
|
||||||
|
|
||||||
You can combine this with a matrix to test multiple Python versions:
|
You can combine this with a matrix to test multiple python versions:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
@@ -133,9 +131,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Install the latest version of uv and set the python version
|
- name: Install the latest version of uv and set the python version
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v6
|
||||||
with:
|
with:
|
||||||
@@ -250,7 +248,6 @@ changes. If you use relative paths, they are relative to the repository root.
|
|||||||
> **/*constraints*.in
|
> **/*constraints*.in
|
||||||
> **/pyproject.toml
|
> **/pyproject.toml
|
||||||
> **/uv.lock
|
> **/uv.lock
|
||||||
> **/*.py.lock
|
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -287,47 +284,13 @@ changes. If you use relative paths, they are relative to the repository root.
|
|||||||
cache-dependency-glob: ""
|
cache-dependency-glob: ""
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Restore cache
|
|
||||||
|
|
||||||
Restoring an existing cache can be enabled or disabled with the `restore-cache` input.
|
|
||||||
By default, the cache will be restored.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Don't restore an existing cache
|
|
||||||
uses: astral-sh/setup-uv@v6
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
restore-cache: false
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Save cache
|
|
||||||
|
|
||||||
You can also disable saving the cache after the run with the `save-cache` input.
|
|
||||||
This can be useful to save cache storage when you know you will not use the cache of the run again.
|
|
||||||
By default, the cache will be saved.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Don't save the cache after the run
|
|
||||||
uses: astral-sh/setup-uv@v6
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
save-cache: false
|
|
||||||
```
|
|
||||||
|
|
||||||
### Local cache path
|
### Local cache path
|
||||||
|
|
||||||
If caching is enabled, this action controls where uv stores its cache on the runner's filesystem
|
This action controls where uv stores its cache on the runner's filesystem by setting `UV_CACHE_DIR`.
|
||||||
by setting `UV_CACHE_DIR`.
|
|
||||||
|
|
||||||
It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\uv-tool-dir` on Windows and
|
It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\uv-tool-dir` on Windows and
|
||||||
`/tmp/setup-uv-cache` on Linux/macOS. You can change the default by specifying the path with the
|
`/tmp/setup-uv-cache` on Linux/macOS. You can change the default by specifying the path with the
|
||||||
`cache-local-path` input.
|
`cache-local-path` input.
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> If the environment variable `UV_CACHE_DIR` is already set this action will not override it.
|
|
||||||
> If you configured [cache-dir](https://docs.astral.sh/uv/reference/settings/#cache-dir) in your
|
|
||||||
> config file then it is also respected and this action will not set `UV_CACHE_DIR`.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Define a custom uv cache path
|
- name: Define a custom uv cache path
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v6
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
[project]
|
|
||||||
name = "uv-project"
|
|
||||||
version = "0.1.0"
|
|
||||||
description = "Add your description here"
|
|
||||||
readme = "README.md"
|
|
||||||
requires-python = ">=3.12"
|
|
||||||
dependencies = [
|
|
||||||
"ruff>=0.6.2",
|
|
||||||
]
|
|
||||||
|
|
||||||
[build-system]
|
|
||||||
requires = ["hatchling"]
|
|
||||||
build-backend = "hatchling.build"
|
|
||||||
|
|
||||||
[tool.uv]
|
|
||||||
cache-dir = "/tmp/pyproject-toml-defined-cache-path"
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
def hello() -> str:
|
|
||||||
return "Hello from uv-project!"
|
|
||||||
38
__tests__/fixtures/cache-dir-defined-project/uv.lock
generated
38
__tests__/fixtures/cache-dir-defined-project/uv.lock
generated
@@ -1,38 +0,0 @@
|
|||||||
version = 1
|
|
||||||
requires-python = ">=3.12"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ruff"
|
|
||||||
version = "0.6.2"
|
|
||||||
source = { registry = "https://pypi.org/simple" }
|
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/23/f4/279d044f66b79261fd37df76bf72b64471afab5d3b7906a01499c4451910/ruff-0.6.2.tar.gz", hash = "sha256:239ee6beb9e91feb8e0ec384204a763f36cb53fb895a1a364618c6abb076b3be", size = 2460281 }
|
|
||||||
wheels = [
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/72/4b/47dd7a69287afb4069fa42c198e899463605460a58120196711bfcf0446b/ruff-0.6.2-py3-none-linux_armv6l.whl", hash = "sha256:5c8cbc6252deb3ea840ad6a20b0f8583caab0c5ef4f9cca21adc5a92b8f79f3c", size = 9695871 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/ae/c3/8aac62ac4638c14a740ee76a755a925f2d0d04580ab790a9887accb729f6/ruff-0.6.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:17002fe241e76544448a8e1e6118abecbe8cd10cf68fde635dad480dba594570", size = 9459354 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/2f/cf/77fbd8d4617b9b9c503f9bffb8552c4e3ea1a58dc36975e7a9104ffb0f85/ruff-0.6.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3dbeac76ed13456f8158b8f4fe087bf87882e645c8e8b606dd17b0b66c2c1158", size = 9163871 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/05/1c/765192bab32b79efbb498b06f0b9dcb3629112b53b8777ae1d19b8209e09/ruff-0.6.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:094600ee88cda325988d3f54e3588c46de5c18dae09d683ace278b11f9d4d534", size = 10096250 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/08/d0/86f3cb0f6934c99f759c232984a5204d67a26745cad2d9edff6248adf7d2/ruff-0.6.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:316d418fe258c036ba05fbf7dfc1f7d3d4096db63431546163b472285668132b", size = 9475376 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/cd/cc/4c8d0e225b559a3fae6092ec310d7150d3b02b4669e9223f783ef64d82c0/ruff-0.6.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d72b8b3abf8a2d51b7b9944a41307d2f442558ccb3859bbd87e6ae9be1694a5d", size = 10295634 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/db/96/d2699cfb1bb5a01c68122af43454c76c31331e1c8a9bd97d653d7c82524b/ruff-0.6.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:2aed7e243be68487aa8982e91c6e260982d00da3f38955873aecd5a9204b1d66", size = 11024941 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/8b/a9/6ecd66af8929e0f2a1ed308a4137f3521789f28f0eb97d32c2ca3aa7000c/ruff-0.6.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d371f7fc9cec83497fe7cf5eaf5b76e22a8efce463de5f775a1826197feb9df8", size = 10606894 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/e4/73/2ee4cd19f44992fedac1cc6db9e3d825966072f6dcbd4032f21cbd063170/ruff-0.6.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8f310d63af08f583363dfb844ba8f9417b558199c58a5999215082036d795a1", size = 11552886 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/60/4c/c0f1cd35ce4a93c54a6bb1ee6934a3a205fa02198dd076678193853ceea1/ruff-0.6.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7db6880c53c56addb8638fe444818183385ec85eeada1d48fc5abe045301b2f1", size = 10264945 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/c4/89/e45c9359b9cdd4245512ea2b9f2bb128a997feaa5f726fc9e8c7a66afadf/ruff-0.6.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:1175d39faadd9a50718f478d23bfc1d4da5743f1ab56af81a2b6caf0a2394f23", size = 10100007 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/06/74/0bd4e0a7ed5f6908df87892f9bf60a2356c0fd74102d8097298bd9b4f346/ruff-0.6.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:5b939f9c86d51635fe486585389f54582f0d65b8238e08c327c1534844b3bb9a", size = 9559267 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/54/03/3dc6dc9419f276f05805bf888c279e3e0b631284abd548d9e87cebb93aec/ruff-0.6.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d0d62ca91219f906caf9b187dea50d17353f15ec9bb15aae4a606cd697b49b4c", size = 9905304 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/5c/5b/d6a72a6a6bbf097c09de468326ef5fa1c9e7aa5e6e45979bc0d984b0dbe7/ruff-0.6.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:7438a7288f9d67ed3c8ce4d059e67f7ed65e9fe3aa2ab6f5b4b3610e57e3cb56", size = 10341480 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/79/a9/0f2f21fe15ba537c46598f96aa9ae4a3d4b9ec64926664617ca6a8c772f4/ruff-0.6.2-py3-none-win32.whl", hash = "sha256:279d5f7d86696df5f9549b56b9b6a7f6c72961b619022b5b7999b15db392a4da", size = 7961901 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/b0/80/fff12ffe11853d9f4ea3e5221e6dd2e93640a161c05c9579833e09ad40a7/ruff-0.6.2-py3-none-win_amd64.whl", hash = "sha256:d9f3469c7dd43cd22eb1c3fc16926fb8258d50cb1b216658a07be95dd117b0f2", size = 8783320 },
|
|
||||||
{ url = "https://files.pythonhosted.org/packages/56/91/577cdd64cce5e74d3f8b5ecb93f29566def569c741eb008aed4f331ef821/ruff-0.6.2-py3-none-win_arm64.whl", hash = "sha256:f28fcd2cd0e02bdf739297516d5643a945cc7caf09bd9bcb4d932540a5ea4fa9", size = 8225886 },
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "uv-project"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = { editable = "." }
|
|
||||||
dependencies = [
|
|
||||||
{ name = "ruff" },
|
|
||||||
]
|
|
||||||
|
|
||||||
[package.metadata]
|
|
||||||
requires-dist = [{ name = "ruff" }]
|
|
||||||
13
action.yml
13
action.yml
@@ -21,6 +21,10 @@ inputs:
|
|||||||
checksum:
|
checksum:
|
||||||
description: "The checksum of the uv version to install"
|
description: "The checksum of the uv version to install"
|
||||||
required: false
|
required: false
|
||||||
|
server-url:
|
||||||
|
description: "(Deprecated) The server url to use when downloading uv"
|
||||||
|
required: false
|
||||||
|
default: "https://github.com"
|
||||||
github-token:
|
github-token:
|
||||||
description:
|
description:
|
||||||
"Used to increase the rate limit when retrieving versions and downloading uv."
|
"Used to increase the rate limit when retrieving versions and downloading uv."
|
||||||
@@ -40,13 +44,6 @@ inputs:
|
|||||||
**/*constraints*.in
|
**/*constraints*.in
|
||||||
**/pyproject.toml
|
**/pyproject.toml
|
||||||
**/uv.lock
|
**/uv.lock
|
||||||
**/*.py.lock
|
|
||||||
restore-cache:
|
|
||||||
description: "Whether to restore the cache if found."
|
|
||||||
default: "true"
|
|
||||||
save-cache:
|
|
||||||
description: "Whether to save the cache after the run."
|
|
||||||
default: "true"
|
|
||||||
cache-suffix:
|
cache-suffix:
|
||||||
description: "Suffix for the cache key"
|
description: "Suffix for the cache key"
|
||||||
required: false
|
required: false
|
||||||
@@ -84,7 +81,7 @@ outputs:
|
|||||||
cache-hit:
|
cache-hit:
|
||||||
description: "A boolean value to indicate a cache entry was found"
|
description: "A boolean value to indicate a cache entry was found"
|
||||||
runs:
|
runs:
|
||||||
using: "node24"
|
using: "node20"
|
||||||
main: "dist/setup/index.js"
|
main: "dist/setup/index.js"
|
||||||
post: "dist/save-cache/index.js"
|
post: "dist/save-cache/index.js"
|
||||||
post-if: success()
|
post-if: success()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
|
"$schema": "https://biomejs.dev/schemas/2.2.2/schema.json",
|
||||||
"assist": {
|
"assist": {
|
||||||
"actions": {
|
"actions": {
|
||||||
"source": {
|
"source": {
|
||||||
|
|||||||
1832
dist/save-cache/index.js
generated
vendored
1832
dist/save-cache/index.js
generated
vendored
@@ -75775,783 +75775,6 @@ class ReflectionTypeCheck {
|
|||||||
exports.ReflectionTypeCheck = ReflectionTypeCheck;
|
exports.ReflectionTypeCheck = ReflectionTypeCheck;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 3297:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
const { valid, clean, explain, parse } = __nccwpck_require__(9961);
|
|
||||||
|
|
||||||
const { lt, le, eq, ne, ge, gt, compare, rcompare } = __nccwpck_require__(9469);
|
|
||||||
|
|
||||||
const {
|
|
||||||
filter,
|
|
||||||
maxSatisfying,
|
|
||||||
minSatisfying,
|
|
||||||
RANGE_PATTERN,
|
|
||||||
satisfies,
|
|
||||||
validRange,
|
|
||||||
} = __nccwpck_require__(3185);
|
|
||||||
|
|
||||||
const { major, minor, patch, inc } = __nccwpck_require__(6829);
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
// version
|
|
||||||
valid,
|
|
||||||
clean,
|
|
||||||
explain,
|
|
||||||
parse,
|
|
||||||
|
|
||||||
// operator
|
|
||||||
lt,
|
|
||||||
le,
|
|
||||||
lte: le,
|
|
||||||
eq,
|
|
||||||
ne,
|
|
||||||
neq: ne,
|
|
||||||
ge,
|
|
||||||
gte: ge,
|
|
||||||
gt,
|
|
||||||
compare,
|
|
||||||
rcompare,
|
|
||||||
|
|
||||||
// range
|
|
||||||
filter,
|
|
||||||
maxSatisfying,
|
|
||||||
minSatisfying,
|
|
||||||
RANGE_PATTERN,
|
|
||||||
satisfies,
|
|
||||||
validRange,
|
|
||||||
|
|
||||||
// semantic
|
|
||||||
major,
|
|
||||||
minor,
|
|
||||||
patch,
|
|
||||||
inc,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 9469:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
const { parse } = __nccwpck_require__(9961);
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
compare,
|
|
||||||
rcompare,
|
|
||||||
lt,
|
|
||||||
le,
|
|
||||||
eq,
|
|
||||||
ne,
|
|
||||||
ge,
|
|
||||||
gt,
|
|
||||||
'<': lt,
|
|
||||||
'<=': le,
|
|
||||||
'==': eq,
|
|
||||||
'!=': ne,
|
|
||||||
'>=': ge,
|
|
||||||
'>': gt,
|
|
||||||
'===': arbitrary,
|
|
||||||
};
|
|
||||||
|
|
||||||
function lt(version, other) {
|
|
||||||
return compare(version, other) < 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function le(version, other) {
|
|
||||||
return compare(version, other) <= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function eq(version, other) {
|
|
||||||
return compare(version, other) === 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ne(version, other) {
|
|
||||||
return compare(version, other) !== 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ge(version, other) {
|
|
||||||
return compare(version, other) >= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function gt(version, other) {
|
|
||||||
return compare(version, other) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function arbitrary(version, other) {
|
|
||||||
return version.toLowerCase() === other.toLowerCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
function compare(version, other) {
|
|
||||||
const parsedVersion = parse(version);
|
|
||||||
const parsedOther = parse(other);
|
|
||||||
|
|
||||||
const keyVersion = calculateKey(parsedVersion);
|
|
||||||
const keyOther = calculateKey(parsedOther);
|
|
||||||
|
|
||||||
return pyCompare(keyVersion, keyOther);
|
|
||||||
}
|
|
||||||
|
|
||||||
function rcompare(version, other) {
|
|
||||||
return -compare(version, other);
|
|
||||||
}
|
|
||||||
|
|
||||||
// this logic is buitin in python, but we need to port it to js
|
|
||||||
// see https://stackoverflow.com/a/5292332/1438522
|
|
||||||
function pyCompare(elemIn, otherIn) {
|
|
||||||
let elem = elemIn;
|
|
||||||
let other = otherIn;
|
|
||||||
if (elem === other) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (Array.isArray(elem) !== Array.isArray(other)) {
|
|
||||||
elem = Array.isArray(elem) ? elem : [elem];
|
|
||||||
other = Array.isArray(other) ? other : [other];
|
|
||||||
}
|
|
||||||
if (Array.isArray(elem)) {
|
|
||||||
const len = Math.min(elem.length, other.length);
|
|
||||||
for (let i = 0; i < len; i += 1) {
|
|
||||||
const res = pyCompare(elem[i], other[i]);
|
|
||||||
if (res !== 0) {
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return elem.length - other.length;
|
|
||||||
}
|
|
||||||
if (elem === -Infinity || other === Infinity) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (elem === Infinity || other === -Infinity) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return elem < other ? -1 : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function calculateKey(input) {
|
|
||||||
const { epoch } = input;
|
|
||||||
let { release, pre, post, local, dev } = input;
|
|
||||||
// When we compare a release version, we want to compare it with all of the
|
|
||||||
// trailing zeros removed. So we'll use a reverse the list, drop all the now
|
|
||||||
// leading zeros until we come to something non zero, then take the rest
|
|
||||||
// re-reverse it back into the correct order and make it a tuple and use
|
|
||||||
// that for our sorting key.
|
|
||||||
release = release.concat();
|
|
||||||
release.reverse();
|
|
||||||
while (release.length && release[0] === 0) {
|
|
||||||
release.shift();
|
|
||||||
}
|
|
||||||
release.reverse();
|
|
||||||
|
|
||||||
// We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
|
|
||||||
// We'll do this by abusing the pre segment, but we _only_ want to do this
|
|
||||||
// if there is !a pre or a post segment. If we have one of those then
|
|
||||||
// the normal sorting rules will handle this case correctly.
|
|
||||||
if (!pre && !post && dev) pre = -Infinity;
|
|
||||||
// Versions without a pre-release (except as noted above) should sort after
|
|
||||||
// those with one.
|
|
||||||
else if (!pre) pre = Infinity;
|
|
||||||
|
|
||||||
// Versions without a post segment should sort before those with one.
|
|
||||||
if (!post) post = -Infinity;
|
|
||||||
|
|
||||||
// Versions without a development segment should sort after those with one.
|
|
||||||
if (!dev) dev = Infinity;
|
|
||||||
|
|
||||||
if (!local) {
|
|
||||||
// Versions without a local segment should sort before those with one.
|
|
||||||
local = -Infinity;
|
|
||||||
} else {
|
|
||||||
// Versions with a local segment need that segment parsed to implement
|
|
||||||
// the sorting rules in PEP440.
|
|
||||||
// - Alpha numeric segments sort before numeric segments
|
|
||||||
// - Alpha numeric segments sort lexicographically
|
|
||||||
// - Numeric segments sort numerically
|
|
||||||
// - Shorter versions sort before longer versions when the prefixes
|
|
||||||
// match exactly
|
|
||||||
local = local.map((i) =>
|
|
||||||
Number.isNaN(Number(i)) ? [-Infinity, i] : [Number(i), ''],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return [epoch, release, pre, post, dev, local];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 6829:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
const { explain, parse, stringify } = __nccwpck_require__(9961);
|
|
||||||
|
|
||||||
// those notation are borrowed from semver
|
|
||||||
module.exports = {
|
|
||||||
major,
|
|
||||||
minor,
|
|
||||||
patch,
|
|
||||||
inc,
|
|
||||||
};
|
|
||||||
|
|
||||||
function major(input) {
|
|
||||||
const version = explain(input);
|
|
||||||
if (!version) {
|
|
||||||
throw new TypeError('Invalid Version: ' + input);
|
|
||||||
}
|
|
||||||
return version.release[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
function minor(input) {
|
|
||||||
const version = explain(input);
|
|
||||||
if (!version) {
|
|
||||||
throw new TypeError('Invalid Version: ' + input);
|
|
||||||
}
|
|
||||||
if (version.release.length < 2) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return version.release[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
function patch(input) {
|
|
||||||
const version = explain(input);
|
|
||||||
if (!version) {
|
|
||||||
throw new TypeError('Invalid Version: ' + input);
|
|
||||||
}
|
|
||||||
if (version.release.length < 3) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return version.release[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
function inc(input, release, preReleaseIdentifier) {
|
|
||||||
let identifier = preReleaseIdentifier || `a`;
|
|
||||||
const version = parse(input);
|
|
||||||
|
|
||||||
if (!version) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
!['a', 'b', 'c', 'rc', 'alpha', 'beta', 'pre', 'preview'].includes(
|
|
||||||
identifier,
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (release) {
|
|
||||||
case 'premajor':
|
|
||||||
{
|
|
||||||
const [majorVersion] = version.release;
|
|
||||||
version.release.fill(0);
|
|
||||||
version.release[0] = majorVersion + 1;
|
|
||||||
}
|
|
||||||
version.pre = [identifier, 0];
|
|
||||||
delete version.post;
|
|
||||||
delete version.dev;
|
|
||||||
delete version.local;
|
|
||||||
break;
|
|
||||||
case 'preminor':
|
|
||||||
{
|
|
||||||
const [majorVersion, minorVersion = 0] = version.release;
|
|
||||||
version.release.fill(0);
|
|
||||||
version.release[0] = majorVersion;
|
|
||||||
version.release[1] = minorVersion + 1;
|
|
||||||
}
|
|
||||||
version.pre = [identifier, 0];
|
|
||||||
delete version.post;
|
|
||||||
delete version.dev;
|
|
||||||
delete version.local;
|
|
||||||
break;
|
|
||||||
case 'prepatch':
|
|
||||||
{
|
|
||||||
const [majorVersion, minorVersion = 0, patchVersion = 0] =
|
|
||||||
version.release;
|
|
||||||
version.release.fill(0);
|
|
||||||
version.release[0] = majorVersion;
|
|
||||||
version.release[1] = minorVersion;
|
|
||||||
version.release[2] = patchVersion + 1;
|
|
||||||
}
|
|
||||||
version.pre = [identifier, 0];
|
|
||||||
delete version.post;
|
|
||||||
delete version.dev;
|
|
||||||
delete version.local;
|
|
||||||
break;
|
|
||||||
case 'prerelease':
|
|
||||||
if (version.pre === null) {
|
|
||||||
const [majorVersion, minorVersion = 0, patchVersion = 0] =
|
|
||||||
version.release;
|
|
||||||
version.release.fill(0);
|
|
||||||
version.release[0] = majorVersion;
|
|
||||||
version.release[1] = minorVersion;
|
|
||||||
version.release[2] = patchVersion + 1;
|
|
||||||
version.pre = [identifier, 0];
|
|
||||||
} else {
|
|
||||||
if (preReleaseIdentifier === undefined && version.pre !== null) {
|
|
||||||
[identifier] = version.pre;
|
|
||||||
}
|
|
||||||
|
|
||||||
const [letter, number] = version.pre;
|
|
||||||
if (letter === identifier) {
|
|
||||||
version.pre = [letter, number + 1];
|
|
||||||
} else {
|
|
||||||
version.pre = [identifier, 0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
delete version.post;
|
|
||||||
delete version.dev;
|
|
||||||
delete version.local;
|
|
||||||
break;
|
|
||||||
case 'major':
|
|
||||||
if (
|
|
||||||
version.release.slice(1).some((value) => value !== 0) ||
|
|
||||||
version.pre === null
|
|
||||||
) {
|
|
||||||
const [majorVersion] = version.release;
|
|
||||||
version.release.fill(0);
|
|
||||||
version.release[0] = majorVersion + 1;
|
|
||||||
}
|
|
||||||
delete version.pre;
|
|
||||||
delete version.post;
|
|
||||||
delete version.dev;
|
|
||||||
delete version.local;
|
|
||||||
break;
|
|
||||||
case 'minor':
|
|
||||||
if (
|
|
||||||
version.release.slice(2).some((value) => value !== 0) ||
|
|
||||||
version.pre === null
|
|
||||||
) {
|
|
||||||
const [majorVersion, minorVersion = 0] = version.release;
|
|
||||||
version.release.fill(0);
|
|
||||||
version.release[0] = majorVersion;
|
|
||||||
version.release[1] = minorVersion + 1;
|
|
||||||
}
|
|
||||||
delete version.pre;
|
|
||||||
delete version.post;
|
|
||||||
delete version.dev;
|
|
||||||
delete version.local;
|
|
||||||
break;
|
|
||||||
case 'patch':
|
|
||||||
if (
|
|
||||||
version.release.slice(3).some((value) => value !== 0) ||
|
|
||||||
version.pre === null
|
|
||||||
) {
|
|
||||||
const [majorVersion, minorVersion = 0, patchVersion = 0] =
|
|
||||||
version.release;
|
|
||||||
version.release.fill(0);
|
|
||||||
version.release[0] = majorVersion;
|
|
||||||
version.release[1] = minorVersion;
|
|
||||||
version.release[2] = patchVersion + 1;
|
|
||||||
}
|
|
||||||
delete version.pre;
|
|
||||||
delete version.post;
|
|
||||||
delete version.dev;
|
|
||||||
delete version.local;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return stringify(version);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 3185:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
// This file is dual licensed under the terms of the Apache License, Version
|
|
||||||
// 2.0, and the BSD License. See the LICENSE file in the root of this repository
|
|
||||||
// for complete details.
|
|
||||||
|
|
||||||
const { VERSION_PATTERN, explain: explainVersion } = __nccwpck_require__(9961);
|
|
||||||
|
|
||||||
const Operator = __nccwpck_require__(9469);
|
|
||||||
|
|
||||||
const RANGE_PATTERN = [
|
|
||||||
'(?<operator>(===|~=|==|!=|<=|>=|<|>))',
|
|
||||||
'\\s*',
|
|
||||||
'(',
|
|
||||||
/* */ '(?<version>(?:' + VERSION_PATTERN.replace(/\?<\w+>/g, '?:') + '))',
|
|
||||||
/* */ '(?<prefix>\\.\\*)?',
|
|
||||||
/* */ '|',
|
|
||||||
/* */ '(?<legacy>[^,;\\s)]+)',
|
|
||||||
')',
|
|
||||||
].join('');
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
RANGE_PATTERN,
|
|
||||||
parse,
|
|
||||||
satisfies,
|
|
||||||
filter,
|
|
||||||
validRange,
|
|
||||||
maxSatisfying,
|
|
||||||
minSatisfying,
|
|
||||||
};
|
|
||||||
|
|
||||||
const isEqualityOperator = (op) => ['==', '!=', '==='].includes(op);
|
|
||||||
|
|
||||||
const rangeRegex = new RegExp('^' + RANGE_PATTERN + '$', 'i');
|
|
||||||
|
|
||||||
function parse(ranges) {
|
|
||||||
if (!ranges.trim()) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
const specifiers = ranges
|
|
||||||
.split(',')
|
|
||||||
.map((range) => rangeRegex.exec(range.trim()) || {})
|
|
||||||
.map(({ groups }) => {
|
|
||||||
if (!groups) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
let { ...spec } = groups;
|
|
||||||
const { operator, version, prefix, legacy } = groups;
|
|
||||||
|
|
||||||
if (version) {
|
|
||||||
spec = { ...spec, ...explainVersion(version) };
|
|
||||||
if (operator === '~=') {
|
|
||||||
if (spec.release.length < 2) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!isEqualityOperator(operator) && spec.local) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (prefix) {
|
|
||||||
if (!isEqualityOperator(operator) || spec.dev || spec.local) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (legacy && operator !== '===') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return spec;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (specifiers.filter(Boolean).length !== specifiers.length) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return specifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
function filter(versions, specifier, options = {}) {
|
|
||||||
const filtered = pick(versions, specifier, options);
|
|
||||||
if (filtered.length === 0 && options.prereleases === undefined) {
|
|
||||||
return pick(versions, specifier, { prereleases: true });
|
|
||||||
}
|
|
||||||
return filtered;
|
|
||||||
}
|
|
||||||
|
|
||||||
function maxSatisfying(versions, range, options) {
|
|
||||||
const found = filter(versions, range, options).sort(Operator.compare);
|
|
||||||
return found.length === 0 ? null : found[found.length - 1];
|
|
||||||
}
|
|
||||||
|
|
||||||
function minSatisfying(versions, range, options) {
|
|
||||||
const found = filter(versions, range, options).sort(Operator.compare);
|
|
||||||
return found.length === 0 ? null : found[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
function pick(versions, specifier, options) {
|
|
||||||
const parsed = parse(specifier);
|
|
||||||
|
|
||||||
if (!parsed) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
return versions.filter((version) => {
|
|
||||||
const explained = explainVersion(version);
|
|
||||||
|
|
||||||
if (!parsed.length) {
|
|
||||||
return explained && !(explained.is_prerelease && !options.prereleases);
|
|
||||||
}
|
|
||||||
|
|
||||||
return parsed.reduce((pass, spec) => {
|
|
||||||
if (!pass) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return contains({ ...spec, ...options }, { version, explained });
|
|
||||||
}, true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function satisfies(version, specifier, options = {}) {
|
|
||||||
const filtered = pick([version], specifier, options);
|
|
||||||
|
|
||||||
return filtered.length === 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function arrayStartsWith(array, prefix) {
|
|
||||||
if (prefix.length > array.length) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < prefix.length; i += 1) {
|
|
||||||
if (prefix[i] !== array[i]) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function contains(specifier, input) {
|
|
||||||
const { explained } = input;
|
|
||||||
let { version } = input;
|
|
||||||
const { ...spec } = specifier;
|
|
||||||
|
|
||||||
if (spec.prereleases === undefined) {
|
|
||||||
spec.prereleases = spec.is_prerelease;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (explained && explained.is_prerelease && !spec.prereleases) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (spec.operator === '~=') {
|
|
||||||
let compatiblePrefix = spec.release.slice(0, -1).concat('*').join('.');
|
|
||||||
if (spec.epoch) {
|
|
||||||
compatiblePrefix = spec.epoch + '!' + compatiblePrefix;
|
|
||||||
}
|
|
||||||
return satisfies(version, `>=${spec.version}, ==${compatiblePrefix}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (spec.prefix) {
|
|
||||||
const isMatching =
|
|
||||||
explained.epoch === spec.epoch &&
|
|
||||||
arrayStartsWith(explained.release, spec.release);
|
|
||||||
const isEquality = spec.operator !== '!=';
|
|
||||||
return isEquality ? isMatching : !isMatching;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (explained)
|
|
||||||
if (explained.local && spec.version) {
|
|
||||||
version = explained.public;
|
|
||||||
spec.version = explainVersion(spec.version).public;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (spec.operator === '<' || spec.operator === '>') {
|
|
||||||
// simplified version of https://www.python.org/dev/peps/pep-0440/#exclusive-ordered-comparison
|
|
||||||
if (Operator.eq(spec.release.join('.'), explained.release.join('.'))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const op = Operator[spec.operator];
|
|
||||||
return op(version, spec.version || spec.legacy);
|
|
||||||
}
|
|
||||||
|
|
||||||
function validRange(specifier) {
|
|
||||||
return Boolean(parse(specifier));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 9961:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
const VERSION_PATTERN = [
|
|
||||||
'v?',
|
|
||||||
'(?:',
|
|
||||||
/* */ '(?:(?<epoch>[0-9]+)!)?', // epoch
|
|
||||||
/* */ '(?<release>[0-9]+(?:\\.[0-9]+)*)', // release segment
|
|
||||||
/* */ '(?<pre>', // pre-release
|
|
||||||
/* */ '[-_\\.]?',
|
|
||||||
/* */ '(?<pre_l>(a|b|c|rc|alpha|beta|pre|preview))',
|
|
||||||
/* */ '[-_\\.]?',
|
|
||||||
/* */ '(?<pre_n>[0-9]+)?',
|
|
||||||
/* */ ')?',
|
|
||||||
/* */ '(?<post>', // post release
|
|
||||||
/* */ '(?:-(?<post_n1>[0-9]+))',
|
|
||||||
/* */ '|',
|
|
||||||
/* */ '(?:',
|
|
||||||
/* */ '[-_\\.]?',
|
|
||||||
/* */ '(?<post_l>post|rev|r)',
|
|
||||||
/* */ '[-_\\.]?',
|
|
||||||
/* */ '(?<post_n2>[0-9]+)?',
|
|
||||||
/* */ ')',
|
|
||||||
/* */ ')?',
|
|
||||||
/* */ '(?<dev>', // dev release
|
|
||||||
/* */ '[-_\\.]?',
|
|
||||||
/* */ '(?<dev_l>dev)',
|
|
||||||
/* */ '[-_\\.]?',
|
|
||||||
/* */ '(?<dev_n>[0-9]+)?',
|
|
||||||
/* */ ')?',
|
|
||||||
')',
|
|
||||||
'(?:\\+(?<local>[a-z0-9]+(?:[-_\\.][a-z0-9]+)*))?', // local version
|
|
||||||
].join('');
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
VERSION_PATTERN,
|
|
||||||
valid,
|
|
||||||
clean,
|
|
||||||
explain,
|
|
||||||
parse,
|
|
||||||
stringify,
|
|
||||||
};
|
|
||||||
|
|
||||||
const validRegex = new RegExp('^' + VERSION_PATTERN + '$', 'i');
|
|
||||||
|
|
||||||
function valid(version) {
|
|
||||||
return validRegex.test(version) ? version : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const cleanRegex = new RegExp('^\\s*' + VERSION_PATTERN + '\\s*$', 'i');
|
|
||||||
function clean(version) {
|
|
||||||
return stringify(parse(version, cleanRegex));
|
|
||||||
}
|
|
||||||
|
|
||||||
function parse(version, regex) {
|
|
||||||
// Validate the version and parse it into pieces
|
|
||||||
const { groups } = (regex || validRegex).exec(version) || {};
|
|
||||||
if (!groups) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Store the parsed out pieces of the version
|
|
||||||
const parsed = {
|
|
||||||
epoch: Number(groups.epoch ? groups.epoch : 0),
|
|
||||||
release: groups.release.split('.').map(Number),
|
|
||||||
pre: normalize_letter_version(groups.pre_l, groups.pre_n),
|
|
||||||
post: normalize_letter_version(
|
|
||||||
groups.post_l,
|
|
||||||
groups.post_n1 || groups.post_n2,
|
|
||||||
),
|
|
||||||
dev: normalize_letter_version(groups.dev_l, groups.dev_n),
|
|
||||||
local: parse_local_version(groups.local),
|
|
||||||
};
|
|
||||||
|
|
||||||
return parsed;
|
|
||||||
}
|
|
||||||
|
|
||||||
function stringify(parsed) {
|
|
||||||
if (!parsed) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
const { epoch, release, pre, post, dev, local } = parsed;
|
|
||||||
const parts = [];
|
|
||||||
|
|
||||||
// Epoch
|
|
||||||
if (epoch !== 0) {
|
|
||||||
parts.push(`${epoch}!`);
|
|
||||||
}
|
|
||||||
// Release segment
|
|
||||||
parts.push(release.join('.'));
|
|
||||||
|
|
||||||
// Pre-release
|
|
||||||
if (pre) {
|
|
||||||
parts.push(pre.join(''));
|
|
||||||
}
|
|
||||||
// Post-release
|
|
||||||
if (post) {
|
|
||||||
parts.push('.' + post.join(''));
|
|
||||||
}
|
|
||||||
// Development release
|
|
||||||
if (dev) {
|
|
||||||
parts.push('.' + dev.join(''));
|
|
||||||
}
|
|
||||||
// Local version segment
|
|
||||||
if (local) {
|
|
||||||
parts.push(`+${local}`);
|
|
||||||
}
|
|
||||||
return parts.join('');
|
|
||||||
}
|
|
||||||
|
|
||||||
function normalize_letter_version(letterIn, numberIn) {
|
|
||||||
let letter = letterIn;
|
|
||||||
let number = numberIn;
|
|
||||||
if (letter) {
|
|
||||||
// We consider there to be an implicit 0 in a pre-release if there is
|
|
||||||
// not a numeral associated with it.
|
|
||||||
if (!number) {
|
|
||||||
number = 0;
|
|
||||||
}
|
|
||||||
// We normalize any letters to their lower case form
|
|
||||||
letter = letter.toLowerCase();
|
|
||||||
|
|
||||||
// We consider some words to be alternate spellings of other words and
|
|
||||||
// in those cases we want to normalize the spellings to our preferred
|
|
||||||
// spelling.
|
|
||||||
if (letter === 'alpha') {
|
|
||||||
letter = 'a';
|
|
||||||
} else if (letter === 'beta') {
|
|
||||||
letter = 'b';
|
|
||||||
} else if (['c', 'pre', 'preview'].includes(letter)) {
|
|
||||||
letter = 'rc';
|
|
||||||
} else if (['rev', 'r'].includes(letter)) {
|
|
||||||
letter = 'post';
|
|
||||||
}
|
|
||||||
return [letter, Number(number)];
|
|
||||||
}
|
|
||||||
if (!letter && number) {
|
|
||||||
// We assume if we are given a number, but we are not given a letter
|
|
||||||
// then this is using the implicit post release syntax (e.g. 1.0-1)
|
|
||||||
letter = 'post';
|
|
||||||
|
|
||||||
return [letter, Number(number)];
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function parse_local_version(local) {
|
|
||||||
/*
|
|
||||||
Takes a string like abc.1.twelve and turns it into("abc", 1, "twelve").
|
|
||||||
*/
|
|
||||||
if (local) {
|
|
||||||
return local
|
|
||||||
.split(/[._-]/)
|
|
||||||
.map((part) =>
|
|
||||||
Number.isNaN(Number(part)) ? part.toLowerCase() : Number(part),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function explain(version) {
|
|
||||||
const parsed = parse(version);
|
|
||||||
if (!parsed) {
|
|
||||||
return parsed;
|
|
||||||
}
|
|
||||||
const { epoch, release, pre, post, dev, local } = parsed;
|
|
||||||
|
|
||||||
let base_version = '';
|
|
||||||
if (epoch !== 0) {
|
|
||||||
base_version += epoch + '!';
|
|
||||||
}
|
|
||||||
base_version += release.join('.');
|
|
||||||
|
|
||||||
const is_prerelease = Boolean(dev || pre);
|
|
||||||
const is_devrelease = Boolean(dev);
|
|
||||||
const is_postrelease = Boolean(post);
|
|
||||||
|
|
||||||
// return
|
|
||||||
|
|
||||||
return {
|
|
||||||
epoch,
|
|
||||||
release,
|
|
||||||
pre,
|
|
||||||
post: post ? post[1] : post,
|
|
||||||
dev: dev ? dev[1] : dev,
|
|
||||||
local: local ? local.join('.') : local,
|
|
||||||
public: stringify(parsed).split('+', 1)[0],
|
|
||||||
base_version,
|
|
||||||
is_prerelease,
|
|
||||||
is_devrelease,
|
|
||||||
is_postrelease,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 1324:
|
/***/ 1324:
|
||||||
@@ -90586,11 +89809,6 @@ exports.STATE_CACHE_MATCHED_KEY = "cache-matched-key";
|
|||||||
const CACHE_VERSION = "1";
|
const CACHE_VERSION = "1";
|
||||||
async function restoreCache() {
|
async function restoreCache() {
|
||||||
const cacheKey = await computeKeys();
|
const cacheKey = await computeKeys();
|
||||||
core.saveState(exports.STATE_CACHE_KEY, cacheKey);
|
|
||||||
if (!inputs_1.restoreCache) {
|
|
||||||
core.info("restore-cache is false. Skipping restore cache step.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let matchedKey;
|
let matchedKey;
|
||||||
core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`);
|
core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`);
|
||||||
try {
|
try {
|
||||||
@@ -90602,6 +89820,7 @@ async function restoreCache() {
|
|||||||
core.setOutput("cache-hit", false);
|
core.setOutput("cache-hit", false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
core.saveState(exports.STATE_CACHE_KEY, cacheKey);
|
||||||
handleMatchResult(matchedKey, cacheKey);
|
handleMatchResult(matchedKey, cacheKey);
|
||||||
}
|
}
|
||||||
async function computeKeys() {
|
async function computeKeys() {
|
||||||
@@ -90795,19 +90014,12 @@ const fs = __importStar(__nccwpck_require__(3024));
|
|||||||
const cache = __importStar(__nccwpck_require__(5116));
|
const cache = __importStar(__nccwpck_require__(5116));
|
||||||
const core = __importStar(__nccwpck_require__(7484));
|
const core = __importStar(__nccwpck_require__(7484));
|
||||||
const exec = __importStar(__nccwpck_require__(5236));
|
const exec = __importStar(__nccwpck_require__(5236));
|
||||||
const pep440 = __importStar(__nccwpck_require__(3297));
|
|
||||||
const restore_cache_1 = __nccwpck_require__(5391);
|
const restore_cache_1 = __nccwpck_require__(5391);
|
||||||
const constants_1 = __nccwpck_require__(6156);
|
|
||||||
const inputs_1 = __nccwpck_require__(9612);
|
const inputs_1 = __nccwpck_require__(9612);
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
if (inputs_1.enableCache) {
|
if (inputs_1.enableCache) {
|
||||||
if (inputs_1.saveCache) {
|
await saveCache();
|
||||||
await saveCache();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
core.info("save-cache is false. Skipping save cache step.");
|
|
||||||
}
|
|
||||||
// node will stay alive if any promises are not resolved,
|
// node will stay alive if any promises are not resolved,
|
||||||
// which is a possibility if HTTP requests are dangling
|
// which is a possibility if HTTP requests are dangling
|
||||||
// due to retries or timeouts. We know that if we got here
|
// due to retries or timeouts. We know that if we got here
|
||||||
@@ -90835,17 +90047,12 @@ async function saveCache() {
|
|||||||
if (inputs_1.pruneCache) {
|
if (inputs_1.pruneCache) {
|
||||||
await pruneCache();
|
await pruneCache();
|
||||||
}
|
}
|
||||||
let actualCachePath = inputs_1.cacheLocalPath;
|
core.info(`Saving cache path: ${inputs_1.cacheLocalPath}`);
|
||||||
if (process.env.UV_CACHE_DIR && process.env.UV_CACHE_DIR !== inputs_1.cacheLocalPath) {
|
if (!fs.existsSync(inputs_1.cacheLocalPath) && !inputs_1.ignoreNothingToCache) {
|
||||||
core.warning(`The environment variable UV_CACHE_DIR has been changed to "${process.env.UV_CACHE_DIR}", by an action or step running after astral-sh/setup-uv. This can lead to unexpected behavior. If you expected this to happen set the cache-local-path input to "${process.env.UV_CACHE_DIR}" instead of "${inputs_1.cacheLocalPath}".`);
|
throw new Error(`Cache path ${inputs_1.cacheLocalPath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`);
|
||||||
actualCachePath = process.env.UV_CACHE_DIR;
|
|
||||||
}
|
|
||||||
core.info(`Saving cache path: ${actualCachePath}`);
|
|
||||||
if (!fs.existsSync(actualCachePath) && !inputs_1.ignoreNothingToCache) {
|
|
||||||
throw new Error(`Cache path ${actualCachePath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`);
|
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await cache.saveCache([actualCachePath], cacheKey);
|
await cache.saveCache([inputs_1.cacheLocalPath], cacheKey);
|
||||||
core.info(`cache saved with the key: ${cacheKey}`);
|
core.info(`cache saved with the key: ${cacheKey}`);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
@@ -90860,98 +90067,16 @@ async function saveCache() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function pruneCache() {
|
async function pruneCache() {
|
||||||
const forceSupported = pep440.gte(core.getState(constants_1.STATE_UV_VERSION), "0.8.24");
|
|
||||||
const options = {
|
const options = {
|
||||||
silent: false,
|
silent: !core.isDebug(),
|
||||||
};
|
};
|
||||||
const execArgs = ["cache", "prune", "--ci"];
|
const execArgs = ["cache", "prune", "--ci"];
|
||||||
if (forceSupported) {
|
|
||||||
execArgs.push("--force");
|
|
||||||
}
|
|
||||||
core.info("Pruning cache...");
|
core.info("Pruning cache...");
|
||||||
const uvPath = core.getState(constants_1.STATE_UV_PATH);
|
await exec.exec("uv", execArgs, options);
|
||||||
await exec.exec(uvPath, execArgs, options);
|
|
||||||
}
|
}
|
||||||
run();
|
run();
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5465:
|
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
o[k2] = m[k];
|
|
||||||
}));
|
|
||||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
||||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
||||||
}) : function(o, v) {
|
|
||||||
o["default"] = v;
|
|
||||||
});
|
|
||||||
var __importStar = (this && this.__importStar) || (function () {
|
|
||||||
var ownKeys = function(o) {
|
|
||||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
||||||
var ar = [];
|
|
||||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
||||||
return ar;
|
|
||||||
};
|
|
||||||
return ownKeys(o);
|
|
||||||
};
|
|
||||||
return function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.getConfigValueFromTomlFile = getConfigValueFromTomlFile;
|
|
||||||
const node_fs_1 = __importDefault(__nccwpck_require__(3024));
|
|
||||||
const toml = __importStar(__nccwpck_require__(7106));
|
|
||||||
function getConfigValueFromTomlFile(filePath, key) {
|
|
||||||
if (!node_fs_1.default.existsSync(filePath) || !filePath.endsWith(".toml")) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
const fileContent = node_fs_1.default.readFileSync(filePath, "utf-8");
|
|
||||||
if (filePath.endsWith("pyproject.toml")) {
|
|
||||||
const tomlContent = toml.parse(fileContent);
|
|
||||||
return tomlContent?.tool?.uv?.[key];
|
|
||||||
}
|
|
||||||
const tomlContent = toml.parse(fileContent);
|
|
||||||
return tomlContent[key];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 6156:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.STATE_UV_VERSION = exports.STATE_UV_PATH = exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
|
||||||
exports.REPO = "uv";
|
|
||||||
exports.OWNER = "astral-sh";
|
|
||||||
exports.TOOL_CACHE_NAME = "uv";
|
|
||||||
exports.STATE_UV_PATH = "uv-path";
|
|
||||||
exports.STATE_UV_VERSION = "uv-version";
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 9612:
|
/***/ 9612:
|
||||||
@@ -90996,10 +90121,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
|
exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.serverUrl = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
|
||||||
const node_path_1 = __importDefault(__nccwpck_require__(6760));
|
const node_path_1 = __importDefault(__nccwpck_require__(6760));
|
||||||
const core = __importStar(__nccwpck_require__(7484));
|
const core = __importStar(__nccwpck_require__(7484));
|
||||||
const config_file_1 = __nccwpck_require__(5465);
|
|
||||||
exports.workingDirectory = core.getInput("working-directory");
|
exports.workingDirectory = core.getInput("working-directory");
|
||||||
exports.version = core.getInput("version");
|
exports.version = core.getInput("version");
|
||||||
exports.versionFile = getVersionFile();
|
exports.versionFile = getVersionFile();
|
||||||
@@ -91007,8 +90131,6 @@ exports.pythonVersion = core.getInput("python-version");
|
|||||||
exports.activateEnvironment = core.getBooleanInput("activate-environment");
|
exports.activateEnvironment = core.getBooleanInput("activate-environment");
|
||||||
exports.checkSum = core.getInput("checksum");
|
exports.checkSum = core.getInput("checksum");
|
||||||
exports.enableCache = getEnableCache();
|
exports.enableCache = getEnableCache();
|
||||||
exports.restoreCache = core.getInput("restore-cache") === "true";
|
|
||||||
exports.saveCache = core.getInput("save-cache") === "true";
|
|
||||||
exports.cacheSuffix = core.getInput("cache-suffix") || "";
|
exports.cacheSuffix = core.getInput("cache-suffix") || "";
|
||||||
exports.cacheLocalPath = getCacheLocalPath();
|
exports.cacheLocalPath = getCacheLocalPath();
|
||||||
exports.cacheDependencyGlob = getCacheDependencyGlob();
|
exports.cacheDependencyGlob = getCacheDependencyGlob();
|
||||||
@@ -91017,6 +90139,7 @@ exports.ignoreNothingToCache = core.getInput("ignore-nothing-to-cache") === "tru
|
|||||||
exports.ignoreEmptyWorkdir = core.getInput("ignore-empty-workdir") === "true";
|
exports.ignoreEmptyWorkdir = core.getInput("ignore-empty-workdir") === "true";
|
||||||
exports.toolBinDir = getToolBinDir();
|
exports.toolBinDir = getToolBinDir();
|
||||||
exports.toolDir = getToolDir();
|
exports.toolDir = getToolDir();
|
||||||
|
exports.serverUrl = core.getInput("server-url");
|
||||||
exports.githubToken = core.getInput("github-token");
|
exports.githubToken = core.getInput("github-token");
|
||||||
exports.manifestFile = getManifestFile();
|
exports.manifestFile = getManifestFile();
|
||||||
exports.addProblemMatchers = core.getInput("add-problem-matchers") === "true";
|
exports.addProblemMatchers = core.getInput("add-problem-matchers") === "true";
|
||||||
@@ -91069,14 +90192,6 @@ function getCacheLocalPath() {
|
|||||||
const tildeExpanded = expandTilde(cacheLocalPathInput);
|
const tildeExpanded = expandTilde(cacheLocalPathInput);
|
||||||
return resolveRelativePath(tildeExpanded);
|
return resolveRelativePath(tildeExpanded);
|
||||||
}
|
}
|
||||||
const cacheDirFromConfig = getCacheDirFromConfig();
|
|
||||||
if (cacheDirFromConfig !== undefined) {
|
|
||||||
return cacheDirFromConfig;
|
|
||||||
}
|
|
||||||
if (process.env.UV_CACHE_DIR !== undefined) {
|
|
||||||
core.info(`UV_CACHE_DIR is already set to ${process.env.UV_CACHE_DIR}`);
|
|
||||||
return process.env.UV_CACHE_DIR;
|
|
||||||
}
|
|
||||||
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
|
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
|
||||||
if (process.env.RUNNER_TEMP !== undefined) {
|
if (process.env.RUNNER_TEMP !== undefined) {
|
||||||
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}setup-uv-cache`;
|
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}setup-uv-cache`;
|
||||||
@@ -91088,24 +90203,6 @@ function getCacheLocalPath() {
|
|||||||
}
|
}
|
||||||
return `${process.env.HOME}${node_path_1.default.sep}.cache${node_path_1.default.sep}uv`;
|
return `${process.env.HOME}${node_path_1.default.sep}.cache${node_path_1.default.sep}uv`;
|
||||||
}
|
}
|
||||||
function getCacheDirFromConfig() {
|
|
||||||
for (const filePath of [exports.versionFile, "uv.toml", "pyproject.toml"]) {
|
|
||||||
const resolvedPath = resolveRelativePath(filePath);
|
|
||||||
try {
|
|
||||||
const cacheDir = (0, config_file_1.getConfigValueFromTomlFile)(resolvedPath, "cache-dir");
|
|
||||||
if (cacheDir !== undefined) {
|
|
||||||
core.info(`Found cache-dir in ${resolvedPath}: ${cacheDir}`);
|
|
||||||
return cacheDir;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
const message = err.message;
|
|
||||||
core.warning(`Error while parsing ${filePath}: ${message}`);
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
function getCacheDependencyGlob() {
|
function getCacheDependencyGlob() {
|
||||||
const cacheDependencyGlobInput = core.getInput("cache-dependency-glob");
|
const cacheDependencyGlobInput = core.getInput("cache-dependency-glob");
|
||||||
if (cacheDependencyGlobInput !== "") {
|
if (cacheDependencyGlobInput !== "") {
|
||||||
@@ -93147,915 +92244,6 @@ function parseParams (str) {
|
|||||||
module.exports = parseParams
|
module.exports = parseParams
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 7106:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var __defProp = Object.defineProperty;
|
|
||||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
||||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
||||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
||||||
var __export = (target, all) => {
|
|
||||||
for (var name in all)
|
|
||||||
__defProp(target, name, { get: all[name], enumerable: true });
|
|
||||||
};
|
|
||||||
var __copyProps = (to, from, except, desc) => {
|
|
||||||
if (from && typeof from === "object" || typeof from === "function") {
|
|
||||||
for (let key of __getOwnPropNames(from))
|
|
||||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
||||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
||||||
}
|
|
||||||
return to;
|
|
||||||
};
|
|
||||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
||||||
|
|
||||||
// dist/index.js
|
|
||||||
var index_exports = {};
|
|
||||||
__export(index_exports, {
|
|
||||||
TomlDate: () => TomlDate,
|
|
||||||
TomlError: () => TomlError,
|
|
||||||
default: () => index_default,
|
|
||||||
parse: () => parse,
|
|
||||||
stringify: () => stringify
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(index_exports);
|
|
||||||
|
|
||||||
// dist/error.js
|
|
||||||
function getLineColFromPtr(string, ptr) {
|
|
||||||
let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
|
|
||||||
return [lines.length, lines.pop().length + 1];
|
|
||||||
}
|
|
||||||
function makeCodeBlock(string, line, column) {
|
|
||||||
let lines = string.split(/\r\n|\n|\r/g);
|
|
||||||
let codeblock = "";
|
|
||||||
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
|
||||||
for (let i = line - 1; i <= line + 1; i++) {
|
|
||||||
let l = lines[i - 1];
|
|
||||||
if (!l)
|
|
||||||
continue;
|
|
||||||
codeblock += i.toString().padEnd(numberLen, " ");
|
|
||||||
codeblock += ": ";
|
|
||||||
codeblock += l;
|
|
||||||
codeblock += "\n";
|
|
||||||
if (i === line) {
|
|
||||||
codeblock += " ".repeat(numberLen + column + 2);
|
|
||||||
codeblock += "^\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return codeblock;
|
|
||||||
}
|
|
||||||
var TomlError = class extends Error {
|
|
||||||
line;
|
|
||||||
column;
|
|
||||||
codeblock;
|
|
||||||
constructor(message, options) {
|
|
||||||
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
|
||||||
const codeblock = makeCodeBlock(options.toml, line, column);
|
|
||||||
super(`Invalid TOML document: ${message}
|
|
||||||
|
|
||||||
${codeblock}`, options);
|
|
||||||
this.line = line;
|
|
||||||
this.column = column;
|
|
||||||
this.codeblock = codeblock;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// dist/util.js
|
|
||||||
function isEscaped(str, ptr) {
|
|
||||||
let i = 0;
|
|
||||||
while (str[ptr - ++i] === "\\")
|
|
||||||
;
|
|
||||||
return --i && i % 2;
|
|
||||||
}
|
|
||||||
function indexOfNewline(str, start = 0, end = str.length) {
|
|
||||||
let idx = str.indexOf("\n", start);
|
|
||||||
if (str[idx - 1] === "\r")
|
|
||||||
idx--;
|
|
||||||
return idx <= end ? idx : -1;
|
|
||||||
}
|
|
||||||
function skipComment(str, ptr) {
|
|
||||||
for (let i = ptr; i < str.length; i++) {
|
|
||||||
let c = str[i];
|
|
||||||
if (c === "\n")
|
|
||||||
return i;
|
|
||||||
if (c === "\r" && str[i + 1] === "\n")
|
|
||||||
return i + 1;
|
|
||||||
if (c < " " && c !== " " || c === "\x7F") {
|
|
||||||
throw new TomlError("control characters are not allowed in comments", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str.length;
|
|
||||||
}
|
|
||||||
function skipVoid(str, ptr, banNewLines, banComments) {
|
|
||||||
let c;
|
|
||||||
while ((c = str[ptr]) === " " || c === " " || !banNewLines && (c === "\n" || c === "\r" && str[ptr + 1] === "\n"))
|
|
||||||
ptr++;
|
|
||||||
return banComments || c !== "#" ? ptr : skipVoid(str, skipComment(str, ptr), banNewLines);
|
|
||||||
}
|
|
||||||
function skipUntil(str, ptr, sep, end, banNewLines = false) {
|
|
||||||
if (!end) {
|
|
||||||
ptr = indexOfNewline(str, ptr);
|
|
||||||
return ptr < 0 ? str.length : ptr;
|
|
||||||
}
|
|
||||||
for (let i = ptr; i < str.length; i++) {
|
|
||||||
let c = str[i];
|
|
||||||
if (c === "#") {
|
|
||||||
i = indexOfNewline(str, i);
|
|
||||||
} else if (c === sep) {
|
|
||||||
return i + 1;
|
|
||||||
} else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw new TomlError("cannot find end of structure", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function getStringEnd(str, seek) {
|
|
||||||
let first = str[seek];
|
|
||||||
let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
|
|
||||||
seek += target.length - 1;
|
|
||||||
do
|
|
||||||
seek = str.indexOf(target, ++seek);
|
|
||||||
while (seek > -1 && first !== "'" && isEscaped(str, seek));
|
|
||||||
if (seek > -1) {
|
|
||||||
seek += target.length;
|
|
||||||
if (target.length > 1) {
|
|
||||||
if (str[seek] === first)
|
|
||||||
seek++;
|
|
||||||
if (str[seek] === first)
|
|
||||||
seek++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return seek;
|
|
||||||
}
|
|
||||||
|
|
||||||
// dist/date.js
|
|
||||||
var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
||||||
var TomlDate = class _TomlDate extends Date {
|
|
||||||
#hasDate = false;
|
|
||||||
#hasTime = false;
|
|
||||||
#offset = null;
|
|
||||||
constructor(date) {
|
|
||||||
let hasDate = true;
|
|
||||||
let hasTime = true;
|
|
||||||
let offset = "Z";
|
|
||||||
if (typeof date === "string") {
|
|
||||||
let match = date.match(DATE_TIME_RE);
|
|
||||||
if (match) {
|
|
||||||
if (!match[1]) {
|
|
||||||
hasDate = false;
|
|
||||||
date = `0000-01-01T${date}`;
|
|
||||||
}
|
|
||||||
hasTime = !!match[2];
|
|
||||||
hasTime && date[10] === " " && (date = date.replace(" ", "T"));
|
|
||||||
if (match[2] && +match[2] > 23) {
|
|
||||||
date = "";
|
|
||||||
} else {
|
|
||||||
offset = match[3] || null;
|
|
||||||
date = date.toUpperCase();
|
|
||||||
if (!offset && hasTime)
|
|
||||||
date += "Z";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
date = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
super(date);
|
|
||||||
if (!isNaN(this.getTime())) {
|
|
||||||
this.#hasDate = hasDate;
|
|
||||||
this.#hasTime = hasTime;
|
|
||||||
this.#offset = offset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
isDateTime() {
|
|
||||||
return this.#hasDate && this.#hasTime;
|
|
||||||
}
|
|
||||||
isLocal() {
|
|
||||||
return !this.#hasDate || !this.#hasTime || !this.#offset;
|
|
||||||
}
|
|
||||||
isDate() {
|
|
||||||
return this.#hasDate && !this.#hasTime;
|
|
||||||
}
|
|
||||||
isTime() {
|
|
||||||
return this.#hasTime && !this.#hasDate;
|
|
||||||
}
|
|
||||||
isValid() {
|
|
||||||
return this.#hasDate || this.#hasTime;
|
|
||||||
}
|
|
||||||
toISOString() {
|
|
||||||
let iso = super.toISOString();
|
|
||||||
if (this.isDate())
|
|
||||||
return iso.slice(0, 10);
|
|
||||||
if (this.isTime())
|
|
||||||
return iso.slice(11, 23);
|
|
||||||
if (this.#offset === null)
|
|
||||||
return iso.slice(0, -1);
|
|
||||||
if (this.#offset === "Z")
|
|
||||||
return iso;
|
|
||||||
let offset = +this.#offset.slice(1, 3) * 60 + +this.#offset.slice(4, 6);
|
|
||||||
offset = this.#offset[0] === "-" ? offset : -offset;
|
|
||||||
let offsetDate = new Date(this.getTime() - offset * 6e4);
|
|
||||||
return offsetDate.toISOString().slice(0, -1) + this.#offset;
|
|
||||||
}
|
|
||||||
static wrapAsOffsetDateTime(jsDate, offset = "Z") {
|
|
||||||
let date = new _TomlDate(jsDate);
|
|
||||||
date.#offset = offset;
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
static wrapAsLocalDateTime(jsDate) {
|
|
||||||
let date = new _TomlDate(jsDate);
|
|
||||||
date.#offset = null;
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
static wrapAsLocalDate(jsDate) {
|
|
||||||
let date = new _TomlDate(jsDate);
|
|
||||||
date.#hasTime = false;
|
|
||||||
date.#offset = null;
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
static wrapAsLocalTime(jsDate) {
|
|
||||||
let date = new _TomlDate(jsDate);
|
|
||||||
date.#hasDate = false;
|
|
||||||
date.#offset = null;
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// dist/primitive.js
|
|
||||||
var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
|
||||||
var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
|
||||||
var LEADING_ZERO = /^[+-]?0[0-9_]/;
|
|
||||||
var ESCAPE_REGEX = /^[0-9a-f]{4,8}$/i;
|
|
||||||
var ESC_MAP = {
|
|
||||||
b: "\b",
|
|
||||||
t: " ",
|
|
||||||
n: "\n",
|
|
||||||
f: "\f",
|
|
||||||
r: "\r",
|
|
||||||
'"': '"',
|
|
||||||
"\\": "\\"
|
|
||||||
};
|
|
||||||
function parseString(str, ptr = 0, endPtr = str.length) {
|
|
||||||
let isLiteral = str[ptr] === "'";
|
|
||||||
let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
|
|
||||||
if (isMultiline) {
|
|
||||||
endPtr -= 2;
|
|
||||||
if (str[ptr += 2] === "\r")
|
|
||||||
ptr++;
|
|
||||||
if (str[ptr] === "\n")
|
|
||||||
ptr++;
|
|
||||||
}
|
|
||||||
let tmp = 0;
|
|
||||||
let isEscape;
|
|
||||||
let parsed = "";
|
|
||||||
let sliceStart = ptr;
|
|
||||||
while (ptr < endPtr - 1) {
|
|
||||||
let c = str[ptr++];
|
|
||||||
if (c === "\n" || c === "\r" && str[ptr] === "\n") {
|
|
||||||
if (!isMultiline) {
|
|
||||||
throw new TomlError("newlines are not allowed in strings", {
|
|
||||||
toml: str,
|
|
||||||
ptr: ptr - 1
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (c < " " && c !== " " || c === "\x7F") {
|
|
||||||
throw new TomlError("control characters are not allowed in strings", {
|
|
||||||
toml: str,
|
|
||||||
ptr: ptr - 1
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (isEscape) {
|
|
||||||
isEscape = false;
|
|
||||||
if (c === "u" || c === "U") {
|
|
||||||
let code = str.slice(ptr, ptr += c === "u" ? 4 : 8);
|
|
||||||
if (!ESCAPE_REGEX.test(code)) {
|
|
||||||
throw new TomlError("invalid unicode escape", {
|
|
||||||
toml: str,
|
|
||||||
ptr: tmp
|
|
||||||
});
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
parsed += String.fromCodePoint(parseInt(code, 16));
|
|
||||||
} catch {
|
|
||||||
throw new TomlError("invalid unicode escape", {
|
|
||||||
toml: str,
|
|
||||||
ptr: tmp
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (isMultiline && (c === "\n" || c === " " || c === " " || c === "\r")) {
|
|
||||||
ptr = skipVoid(str, ptr - 1, true);
|
|
||||||
if (str[ptr] !== "\n" && str[ptr] !== "\r") {
|
|
||||||
throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
|
|
||||||
toml: str,
|
|
||||||
ptr: tmp
|
|
||||||
});
|
|
||||||
}
|
|
||||||
ptr = skipVoid(str, ptr);
|
|
||||||
} else if (c in ESC_MAP) {
|
|
||||||
parsed += ESC_MAP[c];
|
|
||||||
} else {
|
|
||||||
throw new TomlError("unrecognized escape sequence", {
|
|
||||||
toml: str,
|
|
||||||
ptr: tmp
|
|
||||||
});
|
|
||||||
}
|
|
||||||
sliceStart = ptr;
|
|
||||||
} else if (!isLiteral && c === "\\") {
|
|
||||||
tmp = ptr - 1;
|
|
||||||
isEscape = true;
|
|
||||||
parsed += str.slice(sliceStart, tmp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return parsed + str.slice(sliceStart, endPtr - 1);
|
|
||||||
}
|
|
||||||
function parseValue(value, toml, ptr, integersAsBigInt) {
|
|
||||||
if (value === "true")
|
|
||||||
return true;
|
|
||||||
if (value === "false")
|
|
||||||
return false;
|
|
||||||
if (value === "-inf")
|
|
||||||
return -Infinity;
|
|
||||||
if (value === "inf" || value === "+inf")
|
|
||||||
return Infinity;
|
|
||||||
if (value === "nan" || value === "+nan" || value === "-nan")
|
|
||||||
return NaN;
|
|
||||||
if (value === "-0")
|
|
||||||
return integersAsBigInt ? 0n : 0;
|
|
||||||
let isInt = INT_REGEX.test(value);
|
|
||||||
if (isInt || FLOAT_REGEX.test(value)) {
|
|
||||||
if (LEADING_ZERO.test(value)) {
|
|
||||||
throw new TomlError("leading zeroes are not allowed", {
|
|
||||||
toml,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
value = value.replace(/_/g, "");
|
|
||||||
let numeric = +value;
|
|
||||||
if (isNaN(numeric)) {
|
|
||||||
throw new TomlError("invalid number", {
|
|
||||||
toml,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (isInt) {
|
|
||||||
if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
|
|
||||||
throw new TomlError("integer value cannot be represented losslessly", {
|
|
||||||
toml,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (isInt || integersAsBigInt === true)
|
|
||||||
numeric = BigInt(value);
|
|
||||||
}
|
|
||||||
return numeric;
|
|
||||||
}
|
|
||||||
const date = new TomlDate(value);
|
|
||||||
if (!date.isValid()) {
|
|
||||||
throw new TomlError("invalid value", {
|
|
||||||
toml,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
|
|
||||||
// dist/extract.js
|
|
||||||
function sliceAndTrimEndOf(str, startPtr, endPtr, allowNewLines) {
|
|
||||||
let value = str.slice(startPtr, endPtr);
|
|
||||||
let commentIdx = value.indexOf("#");
|
|
||||||
if (commentIdx > -1) {
|
|
||||||
skipComment(str, commentIdx);
|
|
||||||
value = value.slice(0, commentIdx);
|
|
||||||
}
|
|
||||||
let trimmed = value.trimEnd();
|
|
||||||
if (!allowNewLines) {
|
|
||||||
let newlineIdx = value.indexOf("\n", trimmed.length);
|
|
||||||
if (newlineIdx > -1) {
|
|
||||||
throw new TomlError("newlines are not allowed in inline tables", {
|
|
||||||
toml: str,
|
|
||||||
ptr: startPtr + newlineIdx
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [trimmed, commentIdx];
|
|
||||||
}
|
|
||||||
function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
|
||||||
if (depth === 0) {
|
|
||||||
throw new TomlError("document contains excessively nested structures. aborting.", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let c = str[ptr];
|
|
||||||
if (c === "[" || c === "{") {
|
|
||||||
let [value, endPtr2] = c === "[" ? parseArray(str, ptr, depth, integersAsBigInt) : parseInlineTable(str, ptr, depth, integersAsBigInt);
|
|
||||||
let newPtr = end ? skipUntil(str, endPtr2, ",", end) : endPtr2;
|
|
||||||
if (endPtr2 - newPtr && end === "}") {
|
|
||||||
let nextNewLine = indexOfNewline(str, endPtr2, newPtr);
|
|
||||||
if (nextNewLine > -1) {
|
|
||||||
throw new TomlError("newlines are not allowed in inline tables", {
|
|
||||||
toml: str,
|
|
||||||
ptr: nextNewLine
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [value, newPtr];
|
|
||||||
}
|
|
||||||
let endPtr;
|
|
||||||
if (c === '"' || c === "'") {
|
|
||||||
endPtr = getStringEnd(str, ptr);
|
|
||||||
let parsed = parseString(str, ptr, endPtr);
|
|
||||||
if (end) {
|
|
||||||
endPtr = skipVoid(str, endPtr, end !== "]");
|
|
||||||
if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
|
|
||||||
throw new TomlError("unexpected character encountered", {
|
|
||||||
toml: str,
|
|
||||||
ptr: endPtr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
endPtr += +(str[endPtr] === ",");
|
|
||||||
}
|
|
||||||
return [parsed, endPtr];
|
|
||||||
}
|
|
||||||
endPtr = skipUntil(str, ptr, ",", end);
|
|
||||||
let slice = sliceAndTrimEndOf(str, ptr, endPtr - +(str[endPtr - 1] === ","), end === "]");
|
|
||||||
if (!slice[0]) {
|
|
||||||
throw new TomlError("incomplete key-value declaration: no value specified", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (end && slice[1] > -1) {
|
|
||||||
endPtr = skipVoid(str, ptr + slice[1]);
|
|
||||||
endPtr += +(str[endPtr] === ",");
|
|
||||||
}
|
|
||||||
return [
|
|
||||||
parseValue(slice[0], str, ptr, integersAsBigInt),
|
|
||||||
endPtr
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// dist/struct.js
|
|
||||||
var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
||||||
function parseKey(str, ptr, end = "=") {
|
|
||||||
let dot = ptr - 1;
|
|
||||||
let parsed = [];
|
|
||||||
let endPtr = str.indexOf(end, ptr);
|
|
||||||
if (endPtr < 0) {
|
|
||||||
throw new TomlError("incomplete key-value: cannot find end of key", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
do {
|
|
||||||
let c = str[ptr = ++dot];
|
|
||||||
if (c !== " " && c !== " ") {
|
|
||||||
if (c === '"' || c === "'") {
|
|
||||||
if (c === str[ptr + 1] && c === str[ptr + 2]) {
|
|
||||||
throw new TomlError("multiline strings are not allowed in keys", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let eos = getStringEnd(str, ptr);
|
|
||||||
if (eos < 0) {
|
|
||||||
throw new TomlError("unfinished string encountered", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
dot = str.indexOf(".", eos);
|
|
||||||
let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
||||||
let newLine = indexOfNewline(strEnd);
|
|
||||||
if (newLine > -1) {
|
|
||||||
throw new TomlError("newlines are not allowed in keys", {
|
|
||||||
toml: str,
|
|
||||||
ptr: ptr + dot + newLine
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (strEnd.trimStart()) {
|
|
||||||
throw new TomlError("found extra tokens after the string part", {
|
|
||||||
toml: str,
|
|
||||||
ptr: eos
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (endPtr < eos) {
|
|
||||||
endPtr = str.indexOf(end, eos);
|
|
||||||
if (endPtr < 0) {
|
|
||||||
throw new TomlError("incomplete key-value: cannot find end of key", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
parsed.push(parseString(str, ptr, eos));
|
|
||||||
} else {
|
|
||||||
dot = str.indexOf(".", ptr);
|
|
||||||
let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
||||||
if (!KEY_PART_RE.test(part)) {
|
|
||||||
throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
parsed.push(part.trimEnd());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} while (dot + 1 && dot < endPtr);
|
|
||||||
return [parsed, skipVoid(str, endPtr + 1, true, true)];
|
|
||||||
}
|
|
||||||
function parseInlineTable(str, ptr, depth, integersAsBigInt) {
|
|
||||||
let res = {};
|
|
||||||
let seen = /* @__PURE__ */ new Set();
|
|
||||||
let c;
|
|
||||||
let comma = 0;
|
|
||||||
ptr++;
|
|
||||||
while ((c = str[ptr++]) !== "}" && c) {
|
|
||||||
let err = { toml: str, ptr: ptr - 1 };
|
|
||||||
if (c === "\n") {
|
|
||||||
throw new TomlError("newlines are not allowed in inline tables", err);
|
|
||||||
} else if (c === "#") {
|
|
||||||
throw new TomlError("inline tables cannot contain comments", err);
|
|
||||||
} else if (c === ",") {
|
|
||||||
throw new TomlError("expected key-value, found comma", err);
|
|
||||||
} else if (c !== " " && c !== " ") {
|
|
||||||
let k;
|
|
||||||
let t = res;
|
|
||||||
let hasOwn = false;
|
|
||||||
let [key, keyEndPtr] = parseKey(str, ptr - 1);
|
|
||||||
for (let i = 0; i < key.length; i++) {
|
|
||||||
if (i)
|
|
||||||
t = hasOwn ? t[k] : t[k] = {};
|
|
||||||
k = key[i];
|
|
||||||
if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) {
|
|
||||||
throw new TomlError("trying to redefine an already defined value", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (!hasOwn && k === "__proto__") {
|
|
||||||
Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (hasOwn) {
|
|
||||||
throw new TomlError("trying to redefine an already defined value", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let [value, valueEndPtr] = extractValue(str, keyEndPtr, "}", depth - 1, integersAsBigInt);
|
|
||||||
seen.add(value);
|
|
||||||
t[k] = value;
|
|
||||||
ptr = valueEndPtr;
|
|
||||||
comma = str[ptr - 1] === "," ? ptr - 1 : 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (comma) {
|
|
||||||
throw new TomlError("trailing commas are not allowed in inline tables", {
|
|
||||||
toml: str,
|
|
||||||
ptr: comma
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (!c) {
|
|
||||||
throw new TomlError("unfinished table encountered", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return [res, ptr];
|
|
||||||
}
|
|
||||||
function parseArray(str, ptr, depth, integersAsBigInt) {
|
|
||||||
let res = [];
|
|
||||||
let c;
|
|
||||||
ptr++;
|
|
||||||
while ((c = str[ptr++]) !== "]" && c) {
|
|
||||||
if (c === ",") {
|
|
||||||
throw new TomlError("expected value, found comma", {
|
|
||||||
toml: str,
|
|
||||||
ptr: ptr - 1
|
|
||||||
});
|
|
||||||
} else if (c === "#")
|
|
||||||
ptr = skipComment(str, ptr);
|
|
||||||
else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
|
|
||||||
let e = extractValue(str, ptr - 1, "]", depth - 1, integersAsBigInt);
|
|
||||||
res.push(e[0]);
|
|
||||||
ptr = e[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!c) {
|
|
||||||
throw new TomlError("unfinished array encountered", {
|
|
||||||
toml: str,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return [res, ptr];
|
|
||||||
}
|
|
||||||
|
|
||||||
// dist/parse.js
|
|
||||||
function peekTable(key, table, meta, type) {
|
|
||||||
let t = table;
|
|
||||||
let m = meta;
|
|
||||||
let k;
|
|
||||||
let hasOwn = false;
|
|
||||||
let state;
|
|
||||||
for (let i = 0; i < key.length; i++) {
|
|
||||||
if (i) {
|
|
||||||
t = hasOwn ? t[k] : t[k] = {};
|
|
||||||
m = (state = m[k]).c;
|
|
||||||
if (type === 0 && (state.t === 1 || state.t === 2)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (state.t === 2) {
|
|
||||||
let l = t.length - 1;
|
|
||||||
t = t[l];
|
|
||||||
m = m[l].c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
k = key[i];
|
|
||||||
if ((hasOwn = Object.hasOwn(t, k)) && m[k]?.t === 0 && m[k]?.d) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (!hasOwn) {
|
|
||||||
if (k === "__proto__") {
|
|
||||||
Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
|
|
||||||
Object.defineProperty(m, k, { enumerable: true, configurable: true, writable: true });
|
|
||||||
}
|
|
||||||
m[k] = {
|
|
||||||
t: i < key.length - 1 && type === 2 ? 3 : type,
|
|
||||||
d: false,
|
|
||||||
i: 0,
|
|
||||||
c: {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
state = m[k];
|
|
||||||
if (state.t !== type && !(type === 1 && state.t === 3)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (type === 2) {
|
|
||||||
if (!state.d) {
|
|
||||||
state.d = true;
|
|
||||||
t[k] = [];
|
|
||||||
}
|
|
||||||
t[k].push(t = {});
|
|
||||||
state.c[state.i++] = state = { t: 1, d: false, i: 0, c: {} };
|
|
||||||
}
|
|
||||||
if (state.d) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
state.d = true;
|
|
||||||
if (type === 1) {
|
|
||||||
t = hasOwn ? t[k] : t[k] = {};
|
|
||||||
} else if (type === 0 && hasOwn) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return [k, t, state.c];
|
|
||||||
}
|
|
||||||
function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
||||||
let res = {};
|
|
||||||
let meta = {};
|
|
||||||
let tbl = res;
|
|
||||||
let m = meta;
|
|
||||||
for (let ptr = skipVoid(toml, 0); ptr < toml.length; ) {
|
|
||||||
if (toml[ptr] === "[") {
|
|
||||||
let isTableArray = toml[++ptr] === "[";
|
|
||||||
let k = parseKey(toml, ptr += +isTableArray, "]");
|
|
||||||
if (isTableArray) {
|
|
||||||
if (toml[k[1] - 1] !== "]") {
|
|
||||||
throw new TomlError("expected end of table declaration", {
|
|
||||||
toml,
|
|
||||||
ptr: k[1] - 1
|
|
||||||
});
|
|
||||||
}
|
|
||||||
k[1]++;
|
|
||||||
}
|
|
||||||
let p = peekTable(
|
|
||||||
k[0],
|
|
||||||
res,
|
|
||||||
meta,
|
|
||||||
isTableArray ? 2 : 1
|
|
||||||
/* Type.EXPLICIT */
|
|
||||||
);
|
|
||||||
if (!p) {
|
|
||||||
throw new TomlError("trying to redefine an already defined table or value", {
|
|
||||||
toml,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
m = p[2];
|
|
||||||
tbl = p[1];
|
|
||||||
ptr = k[1];
|
|
||||||
} else {
|
|
||||||
let k = parseKey(toml, ptr);
|
|
||||||
let p = peekTable(
|
|
||||||
k[0],
|
|
||||||
tbl,
|
|
||||||
m,
|
|
||||||
0
|
|
||||||
/* Type.DOTTED */
|
|
||||||
);
|
|
||||||
if (!p) {
|
|
||||||
throw new TomlError("trying to redefine an already defined table or value", {
|
|
||||||
toml,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let v = extractValue(toml, k[1], void 0, maxDepth, integersAsBigInt);
|
|
||||||
p[1][p[0]] = v[0];
|
|
||||||
ptr = v[1];
|
|
||||||
}
|
|
||||||
ptr = skipVoid(toml, ptr, true);
|
|
||||||
if (toml[ptr] && toml[ptr] !== "\n" && toml[ptr] !== "\r") {
|
|
||||||
throw new TomlError("each key-value declaration must be followed by an end-of-line", {
|
|
||||||
toml,
|
|
||||||
ptr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
ptr = skipVoid(toml, ptr);
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
// dist/stringify.js
|
|
||||||
var BARE_KEY = /^[a-z0-9-_]+$/i;
|
|
||||||
function extendedTypeOf(obj) {
|
|
||||||
let type = typeof obj;
|
|
||||||
if (type === "object") {
|
|
||||||
if (Array.isArray(obj))
|
|
||||||
return "array";
|
|
||||||
if (obj instanceof Date)
|
|
||||||
return "date";
|
|
||||||
}
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
function isArrayOfTables(obj) {
|
|
||||||
for (let i = 0; i < obj.length; i++) {
|
|
||||||
if (extendedTypeOf(obj[i]) !== "object")
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return obj.length != 0;
|
|
||||||
}
|
|
||||||
function formatString(s) {
|
|
||||||
return JSON.stringify(s).replace(/\x7f/g, "\\u007f");
|
|
||||||
}
|
|
||||||
function stringifyValue(val, type, depth, numberAsFloat) {
|
|
||||||
if (depth === 0) {
|
|
||||||
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
||||||
}
|
|
||||||
if (type === "number") {
|
|
||||||
if (isNaN(val))
|
|
||||||
return "nan";
|
|
||||||
if (val === Infinity)
|
|
||||||
return "inf";
|
|
||||||
if (val === -Infinity)
|
|
||||||
return "-inf";
|
|
||||||
if (numberAsFloat && Number.isInteger(val))
|
|
||||||
return val.toFixed(1);
|
|
||||||
return val.toString();
|
|
||||||
}
|
|
||||||
if (type === "bigint" || type === "boolean") {
|
|
||||||
return val.toString();
|
|
||||||
}
|
|
||||||
if (type === "string") {
|
|
||||||
return formatString(val);
|
|
||||||
}
|
|
||||||
if (type === "date") {
|
|
||||||
if (isNaN(val.getTime())) {
|
|
||||||
throw new TypeError("cannot serialize invalid date");
|
|
||||||
}
|
|
||||||
return val.toISOString();
|
|
||||||
}
|
|
||||||
if (type === "object") {
|
|
||||||
return stringifyInlineTable(val, depth, numberAsFloat);
|
|
||||||
}
|
|
||||||
if (type === "array") {
|
|
||||||
return stringifyArray(val, depth, numberAsFloat);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function stringifyInlineTable(obj, depth, numberAsFloat) {
|
|
||||||
let keys = Object.keys(obj);
|
|
||||||
if (keys.length === 0)
|
|
||||||
return "{}";
|
|
||||||
let res = "{ ";
|
|
||||||
for (let i = 0; i < keys.length; i++) {
|
|
||||||
let k = keys[i];
|
|
||||||
if (i)
|
|
||||||
res += ", ";
|
|
||||||
res += BARE_KEY.test(k) ? k : formatString(k);
|
|
||||||
res += " = ";
|
|
||||||
res += stringifyValue(obj[k], extendedTypeOf(obj[k]), depth - 1, numberAsFloat);
|
|
||||||
}
|
|
||||||
return res + " }";
|
|
||||||
}
|
|
||||||
function stringifyArray(array, depth, numberAsFloat) {
|
|
||||||
if (array.length === 0)
|
|
||||||
return "[]";
|
|
||||||
let res = "[ ";
|
|
||||||
for (let i = 0; i < array.length; i++) {
|
|
||||||
if (i)
|
|
||||||
res += ", ";
|
|
||||||
if (array[i] === null || array[i] === void 0) {
|
|
||||||
throw new TypeError("arrays cannot contain null or undefined values");
|
|
||||||
}
|
|
||||||
res += stringifyValue(array[i], extendedTypeOf(array[i]), depth - 1, numberAsFloat);
|
|
||||||
}
|
|
||||||
return res + " ]";
|
|
||||||
}
|
|
||||||
function stringifyArrayTable(array, key, depth, numberAsFloat) {
|
|
||||||
if (depth === 0) {
|
|
||||||
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
||||||
}
|
|
||||||
let res = "";
|
|
||||||
for (let i = 0; i < array.length; i++) {
|
|
||||||
res += `[[${key}]]
|
|
||||||
`;
|
|
||||||
res += stringifyTable(array[i], key, depth, numberAsFloat);
|
|
||||||
res += "\n\n";
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
function stringifyTable(obj, prefix, depth, numberAsFloat) {
|
|
||||||
if (depth === 0) {
|
|
||||||
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
||||||
}
|
|
||||||
let preamble = "";
|
|
||||||
let tables = "";
|
|
||||||
let keys = Object.keys(obj);
|
|
||||||
for (let i = 0; i < keys.length; i++) {
|
|
||||||
let k = keys[i];
|
|
||||||
if (obj[k] !== null && obj[k] !== void 0) {
|
|
||||||
let type = extendedTypeOf(obj[k]);
|
|
||||||
if (type === "symbol" || type === "function") {
|
|
||||||
throw new TypeError(`cannot serialize values of type '${type}'`);
|
|
||||||
}
|
|
||||||
let key = BARE_KEY.test(k) ? k : formatString(k);
|
|
||||||
if (type === "array" && isArrayOfTables(obj[k])) {
|
|
||||||
tables += stringifyArrayTable(obj[k], prefix ? `${prefix}.${key}` : key, depth - 1, numberAsFloat);
|
|
||||||
} else if (type === "object") {
|
|
||||||
let tblKey = prefix ? `${prefix}.${key}` : key;
|
|
||||||
tables += `[${tblKey}]
|
|
||||||
`;
|
|
||||||
tables += stringifyTable(obj[k], tblKey, depth - 1, numberAsFloat);
|
|
||||||
tables += "\n\n";
|
|
||||||
} else {
|
|
||||||
preamble += key;
|
|
||||||
preamble += " = ";
|
|
||||||
preamble += stringifyValue(obj[k], type, depth, numberAsFloat);
|
|
||||||
preamble += "\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return `${preamble}
|
|
||||||
${tables}`.trim();
|
|
||||||
}
|
|
||||||
function stringify(obj, { maxDepth = 1e3, numbersAsFloat = false } = {}) {
|
|
||||||
if (extendedTypeOf(obj) !== "object") {
|
|
||||||
throw new TypeError("stringify can only be called with an object");
|
|
||||||
}
|
|
||||||
return stringifyTable(obj, "", maxDepth, numbersAsFloat);
|
|
||||||
}
|
|
||||||
|
|
||||||
// dist/index.js
|
|
||||||
var index_default = { parse, stringify, TomlDate, TomlError };
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (0);
|
|
||||||
/*!
|
|
||||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
* list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
||||||
* may be used to endorse or promote products derived from this software without
|
|
||||||
* specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 4012:
|
/***/ 4012:
|
||||||
|
|||||||
2579
dist/setup/index.js
generated
vendored
2579
dist/setup/index.js
generated
vendored
@@ -84592,14 +84592,16 @@ module.exports.setGlobalDispatcher = setGlobalDispatcher
|
|||||||
module.exports.getGlobalDispatcher = getGlobalDispatcher
|
module.exports.getGlobalDispatcher = getGlobalDispatcher
|
||||||
|
|
||||||
const fetchImpl = (__nccwpck_require__(54398).fetch)
|
const fetchImpl = (__nccwpck_require__(54398).fetch)
|
||||||
|
module.exports.fetch = async function fetch (init, options = undefined) {
|
||||||
module.exports.fetch = function fetch (init, options = undefined) {
|
try {
|
||||||
return fetchImpl(init, options).catch(err => {
|
return await fetchImpl(init, options)
|
||||||
|
} catch (err) {
|
||||||
if (err && typeof err === 'object') {
|
if (err && typeof err === 'object') {
|
||||||
Error.captureStackTrace(err)
|
Error.captureStackTrace(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
throw err
|
throw err
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
module.exports.Headers = __nccwpck_require__(60660).Headers
|
module.exports.Headers = __nccwpck_require__(60660).Headers
|
||||||
module.exports.Response = __nccwpck_require__(99051).Response
|
module.exports.Response = __nccwpck_require__(99051).Response
|
||||||
@@ -84614,6 +84616,8 @@ module.exports.getGlobalOrigin = getGlobalOrigin
|
|||||||
const { CacheStorage } = __nccwpck_require__(3245)
|
const { CacheStorage } = __nccwpck_require__(3245)
|
||||||
const { kConstruct } = __nccwpck_require__(36443)
|
const { kConstruct } = __nccwpck_require__(36443)
|
||||||
|
|
||||||
|
// Cache & CacheStorage are tightly coupled with fetch. Even if it may run
|
||||||
|
// in an older version of Node, it doesn't have any use without fetch.
|
||||||
module.exports.caches = new CacheStorage(kConstruct)
|
module.exports.caches = new CacheStorage(kConstruct)
|
||||||
|
|
||||||
const { deleteCookie, getCookies, getSetCookies, setCookie, parseCookie } = __nccwpck_require__(79061)
|
const { deleteCookie, getCookies, getSetCookies, setCookie, parseCookie } = __nccwpck_require__(79061)
|
||||||
@@ -85245,28 +85249,14 @@ class RequestHandler extends AsyncResource {
|
|||||||
this.callback = null
|
this.callback = null
|
||||||
this.res = res
|
this.res = res
|
||||||
if (callback !== null) {
|
if (callback !== null) {
|
||||||
try {
|
this.runInAsyncScope(callback, null, null, {
|
||||||
this.runInAsyncScope(callback, null, null, {
|
statusCode,
|
||||||
statusCode,
|
headers,
|
||||||
headers,
|
trailers: this.trailers,
|
||||||
trailers: this.trailers,
|
opaque,
|
||||||
opaque,
|
body: res,
|
||||||
body: res,
|
context
|
||||||
context
|
})
|
||||||
})
|
|
||||||
} catch (err) {
|
|
||||||
// If the callback throws synchronously, we need to handle it
|
|
||||||
// Remove reference to res to allow res being garbage collected
|
|
||||||
this.res = null
|
|
||||||
|
|
||||||
// Destroy the response stream
|
|
||||||
util.destroy(res.on('error', noop), err)
|
|
||||||
|
|
||||||
// Use queueMicrotask to re-throw the error so it reaches uncaughtException
|
|
||||||
queueMicrotask(() => {
|
|
||||||
throw err
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85960,26 +85950,24 @@ class BodyReadable extends Readable {
|
|||||||
* @param {AbortSignal} [opts.signal] An AbortSignal to cancel the dump.
|
* @param {AbortSignal} [opts.signal] An AbortSignal to cancel the dump.
|
||||||
* @returns {Promise<null>}
|
* @returns {Promise<null>}
|
||||||
*/
|
*/
|
||||||
dump (opts) {
|
async dump (opts) {
|
||||||
const signal = opts?.signal
|
const signal = opts?.signal
|
||||||
|
|
||||||
if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) {
|
if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) {
|
||||||
return Promise.reject(new InvalidArgumentError('signal must be an AbortSignal'))
|
throw new InvalidArgumentError('signal must be an AbortSignal')
|
||||||
}
|
}
|
||||||
|
|
||||||
const limit = opts?.limit && Number.isFinite(opts.limit)
|
const limit = opts?.limit && Number.isFinite(opts.limit)
|
||||||
? opts.limit
|
? opts.limit
|
||||||
: 128 * 1024
|
: 128 * 1024
|
||||||
|
|
||||||
if (signal?.aborted) {
|
signal?.throwIfAborted()
|
||||||
return Promise.reject(signal.reason ?? new AbortError())
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._readableState.closeEmitted) {
|
if (this._readableState.closeEmitted) {
|
||||||
return Promise.resolve(null)
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return await new Promise((resolve, reject) => {
|
||||||
if (
|
if (
|
||||||
(this[kContentLength] && (this[kContentLength] > limit)) ||
|
(this[kContentLength] && (this[kContentLength] > limit)) ||
|
||||||
this[kBytesRead] > limit
|
this[kBytesRead] > limit
|
||||||
@@ -87496,24 +87484,14 @@ module.exports = {
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
const kUndiciError = Symbol.for('undici.error.UND_ERR')
|
|
||||||
class UndiciError extends Error {
|
class UndiciError extends Error {
|
||||||
constructor (message, options) {
|
constructor (message, options) {
|
||||||
super(message, options)
|
super(message, options)
|
||||||
this.name = 'UndiciError'
|
this.name = 'UndiciError'
|
||||||
this.code = 'UND_ERR'
|
this.code = 'UND_ERR'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kUndiciError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kUndiciError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kConnectTimeoutError = Symbol.for('undici.error.UND_ERR_CONNECT_TIMEOUT')
|
|
||||||
class ConnectTimeoutError extends UndiciError {
|
class ConnectTimeoutError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87521,17 +87499,8 @@ class ConnectTimeoutError extends UndiciError {
|
|||||||
this.message = message || 'Connect Timeout Error'
|
this.message = message || 'Connect Timeout Error'
|
||||||
this.code = 'UND_ERR_CONNECT_TIMEOUT'
|
this.code = 'UND_ERR_CONNECT_TIMEOUT'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kConnectTimeoutError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kConnectTimeoutError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kHeadersTimeoutError = Symbol.for('undici.error.UND_ERR_HEADERS_TIMEOUT')
|
|
||||||
class HeadersTimeoutError extends UndiciError {
|
class HeadersTimeoutError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87539,17 +87508,8 @@ class HeadersTimeoutError extends UndiciError {
|
|||||||
this.message = message || 'Headers Timeout Error'
|
this.message = message || 'Headers Timeout Error'
|
||||||
this.code = 'UND_ERR_HEADERS_TIMEOUT'
|
this.code = 'UND_ERR_HEADERS_TIMEOUT'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kHeadersTimeoutError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kHeadersTimeoutError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kHeadersOverflowError = Symbol.for('undici.error.UND_ERR_HEADERS_OVERFLOW')
|
|
||||||
class HeadersOverflowError extends UndiciError {
|
class HeadersOverflowError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87557,17 +87517,8 @@ class HeadersOverflowError extends UndiciError {
|
|||||||
this.message = message || 'Headers Overflow Error'
|
this.message = message || 'Headers Overflow Error'
|
||||||
this.code = 'UND_ERR_HEADERS_OVERFLOW'
|
this.code = 'UND_ERR_HEADERS_OVERFLOW'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kHeadersOverflowError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kHeadersOverflowError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kBodyTimeoutError = Symbol.for('undici.error.UND_ERR_BODY_TIMEOUT')
|
|
||||||
class BodyTimeoutError extends UndiciError {
|
class BodyTimeoutError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87575,17 +87526,21 @@ class BodyTimeoutError extends UndiciError {
|
|||||||
this.message = message || 'Body Timeout Error'
|
this.message = message || 'Body Timeout Error'
|
||||||
this.code = 'UND_ERR_BODY_TIMEOUT'
|
this.code = 'UND_ERR_BODY_TIMEOUT'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
class ResponseStatusCodeError extends UndiciError {
|
||||||
return instance && instance[kBodyTimeoutError] === true
|
constructor (message, statusCode, headers, body) {
|
||||||
}
|
super(message)
|
||||||
|
this.name = 'ResponseStatusCodeError'
|
||||||
get [kBodyTimeoutError] () {
|
this.message = message || 'Response Status Code Error'
|
||||||
return true
|
this.code = 'UND_ERR_RESPONSE_STATUS_CODE'
|
||||||
|
this.body = body
|
||||||
|
this.status = statusCode
|
||||||
|
this.statusCode = statusCode
|
||||||
|
this.headers = headers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const kInvalidArgumentError = Symbol.for('undici.error.UND_ERR_INVALID_ARG')
|
|
||||||
class InvalidArgumentError extends UndiciError {
|
class InvalidArgumentError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87593,17 +87548,8 @@ class InvalidArgumentError extends UndiciError {
|
|||||||
this.message = message || 'Invalid Argument Error'
|
this.message = message || 'Invalid Argument Error'
|
||||||
this.code = 'UND_ERR_INVALID_ARG'
|
this.code = 'UND_ERR_INVALID_ARG'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kInvalidArgumentError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kInvalidArgumentError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kInvalidReturnValueError = Symbol.for('undici.error.UND_ERR_INVALID_RETURN_VALUE')
|
|
||||||
class InvalidReturnValueError extends UndiciError {
|
class InvalidReturnValueError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87611,35 +87557,16 @@ class InvalidReturnValueError extends UndiciError {
|
|||||||
this.message = message || 'Invalid Return Value Error'
|
this.message = message || 'Invalid Return Value Error'
|
||||||
this.code = 'UND_ERR_INVALID_RETURN_VALUE'
|
this.code = 'UND_ERR_INVALID_RETURN_VALUE'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kInvalidReturnValueError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kInvalidReturnValueError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kAbortError = Symbol.for('undici.error.UND_ERR_ABORT')
|
|
||||||
class AbortError extends UndiciError {
|
class AbortError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
this.name = 'AbortError'
|
this.name = 'AbortError'
|
||||||
this.message = message || 'The operation was aborted'
|
this.message = message || 'The operation was aborted'
|
||||||
this.code = 'UND_ERR_ABORT'
|
|
||||||
}
|
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kAbortError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kAbortError] () {
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const kRequestAbortedError = Symbol.for('undici.error.UND_ERR_ABORTED')
|
|
||||||
class RequestAbortedError extends AbortError {
|
class RequestAbortedError extends AbortError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87647,17 +87574,8 @@ class RequestAbortedError extends AbortError {
|
|||||||
this.message = message || 'Request aborted'
|
this.message = message || 'Request aborted'
|
||||||
this.code = 'UND_ERR_ABORTED'
|
this.code = 'UND_ERR_ABORTED'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kRequestAbortedError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kRequestAbortedError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kInformationalError = Symbol.for('undici.error.UND_ERR_INFO')
|
|
||||||
class InformationalError extends UndiciError {
|
class InformationalError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87665,17 +87583,8 @@ class InformationalError extends UndiciError {
|
|||||||
this.message = message || 'Request information'
|
this.message = message || 'Request information'
|
||||||
this.code = 'UND_ERR_INFO'
|
this.code = 'UND_ERR_INFO'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kInformationalError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kInformationalError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kRequestContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH')
|
|
||||||
class RequestContentLengthMismatchError extends UndiciError {
|
class RequestContentLengthMismatchError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87683,17 +87592,8 @@ class RequestContentLengthMismatchError extends UndiciError {
|
|||||||
this.message = message || 'Request body length does not match content-length header'
|
this.message = message || 'Request body length does not match content-length header'
|
||||||
this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
|
this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kRequestContentLengthMismatchError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kRequestContentLengthMismatchError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kResponseContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH')
|
|
||||||
class ResponseContentLengthMismatchError extends UndiciError {
|
class ResponseContentLengthMismatchError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87701,17 +87601,8 @@ class ResponseContentLengthMismatchError extends UndiciError {
|
|||||||
this.message = message || 'Response body length does not match content-length header'
|
this.message = message || 'Response body length does not match content-length header'
|
||||||
this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'
|
this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kResponseContentLengthMismatchError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kResponseContentLengthMismatchError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kClientDestroyedError = Symbol.for('undici.error.UND_ERR_DESTROYED')
|
|
||||||
class ClientDestroyedError extends UndiciError {
|
class ClientDestroyedError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87719,17 +87610,8 @@ class ClientDestroyedError extends UndiciError {
|
|||||||
this.message = message || 'The client is destroyed'
|
this.message = message || 'The client is destroyed'
|
||||||
this.code = 'UND_ERR_DESTROYED'
|
this.code = 'UND_ERR_DESTROYED'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kClientDestroyedError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kClientDestroyedError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kClientClosedError = Symbol.for('undici.error.UND_ERR_CLOSED')
|
|
||||||
class ClientClosedError extends UndiciError {
|
class ClientClosedError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87737,17 +87619,8 @@ class ClientClosedError extends UndiciError {
|
|||||||
this.message = message || 'The client is closed'
|
this.message = message || 'The client is closed'
|
||||||
this.code = 'UND_ERR_CLOSED'
|
this.code = 'UND_ERR_CLOSED'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kClientClosedError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kClientClosedError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kSocketError = Symbol.for('undici.error.UND_ERR_SOCKET')
|
|
||||||
class SocketError extends UndiciError {
|
class SocketError extends UndiciError {
|
||||||
constructor (message, socket) {
|
constructor (message, socket) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87756,17 +87629,8 @@ class SocketError extends UndiciError {
|
|||||||
this.code = 'UND_ERR_SOCKET'
|
this.code = 'UND_ERR_SOCKET'
|
||||||
this.socket = socket
|
this.socket = socket
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kSocketError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kSocketError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kNotSupportedError = Symbol.for('undici.error.UND_ERR_NOT_SUPPORTED')
|
|
||||||
class NotSupportedError extends UndiciError {
|
class NotSupportedError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87774,17 +87638,8 @@ class NotSupportedError extends UndiciError {
|
|||||||
this.message = message || 'Not supported error'
|
this.message = message || 'Not supported error'
|
||||||
this.code = 'UND_ERR_NOT_SUPPORTED'
|
this.code = 'UND_ERR_NOT_SUPPORTED'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kNotSupportedError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kNotSupportedError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kBalancedPoolMissingUpstreamError = Symbol.for('undici.error.UND_ERR_BPL_MISSING_UPSTREAM')
|
|
||||||
class BalancedPoolMissingUpstreamError extends UndiciError {
|
class BalancedPoolMissingUpstreamError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87792,17 +87647,8 @@ class BalancedPoolMissingUpstreamError extends UndiciError {
|
|||||||
this.message = message || 'No upstream has been added to the BalancedPool'
|
this.message = message || 'No upstream has been added to the BalancedPool'
|
||||||
this.code = 'UND_ERR_BPL_MISSING_UPSTREAM'
|
this.code = 'UND_ERR_BPL_MISSING_UPSTREAM'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kBalancedPoolMissingUpstreamError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kBalancedPoolMissingUpstreamError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kHTTPParserError = Symbol.for('undici.error.UND_ERR_HTTP_PARSER')
|
|
||||||
class HTTPParserError extends Error {
|
class HTTPParserError extends Error {
|
||||||
constructor (message, code, data) {
|
constructor (message, code, data) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87810,17 +87656,8 @@ class HTTPParserError extends Error {
|
|||||||
this.code = code ? `HPE_${code}` : undefined
|
this.code = code ? `HPE_${code}` : undefined
|
||||||
this.data = data ? data.toString() : undefined
|
this.data = data ? data.toString() : undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kHTTPParserError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kHTTPParserError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kResponseExceededMaxSizeError = Symbol.for('undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE')
|
|
||||||
class ResponseExceededMaxSizeError extends UndiciError {
|
class ResponseExceededMaxSizeError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87828,17 +87665,8 @@ class ResponseExceededMaxSizeError extends UndiciError {
|
|||||||
this.message = message || 'Response content exceeded max size'
|
this.message = message || 'Response content exceeded max size'
|
||||||
this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE'
|
this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kResponseExceededMaxSizeError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kResponseExceededMaxSizeError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kRequestRetryError = Symbol.for('undici.error.UND_ERR_REQ_RETRY')
|
|
||||||
class RequestRetryError extends UndiciError {
|
class RequestRetryError extends UndiciError {
|
||||||
constructor (message, code, { headers, data }) {
|
constructor (message, code, { headers, data }) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87849,17 +87677,8 @@ class RequestRetryError extends UndiciError {
|
|||||||
this.data = data
|
this.data = data
|
||||||
this.headers = headers
|
this.headers = headers
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kRequestRetryError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kRequestRetryError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE')
|
|
||||||
class ResponseError extends UndiciError {
|
class ResponseError extends UndiciError {
|
||||||
constructor (message, code, { headers, body }) {
|
constructor (message, code, { headers, body }) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -87870,17 +87689,8 @@ class ResponseError extends UndiciError {
|
|||||||
this.body = body
|
this.body = body
|
||||||
this.headers = headers
|
this.headers = headers
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kResponseError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kResponseError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kSecureProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_TLS')
|
|
||||||
class SecureProxyConnectionError extends UndiciError {
|
class SecureProxyConnectionError extends UndiciError {
|
||||||
constructor (cause, message, options = {}) {
|
constructor (cause, message, options = {}) {
|
||||||
super(message, { cause, ...options })
|
super(message, { cause, ...options })
|
||||||
@@ -87889,32 +87699,6 @@ class SecureProxyConnectionError extends UndiciError {
|
|||||||
this.code = 'UND_ERR_PRX_TLS'
|
this.code = 'UND_ERR_PRX_TLS'
|
||||||
this.cause = cause
|
this.cause = cause
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kSecureProxyConnectionError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kSecureProxyConnectionError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const kMaxOriginsReachedError = Symbol.for('undici.error.UND_ERR_MAX_ORIGINS_REACHED')
|
|
||||||
class MaxOriginsReachedError extends UndiciError {
|
|
||||||
constructor (message) {
|
|
||||||
super(message)
|
|
||||||
this.name = 'MaxOriginsReachedError'
|
|
||||||
this.message = message || 'Maximum allowed origins reached'
|
|
||||||
this.code = 'UND_ERR_MAX_ORIGINS_REACHED'
|
|
||||||
}
|
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kMaxOriginsReachedError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kMaxOriginsReachedError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -87926,6 +87710,7 @@ module.exports = {
|
|||||||
BodyTimeoutError,
|
BodyTimeoutError,
|
||||||
RequestContentLengthMismatchError,
|
RequestContentLengthMismatchError,
|
||||||
ConnectTimeoutError,
|
ConnectTimeoutError,
|
||||||
|
ResponseStatusCodeError,
|
||||||
InvalidArgumentError,
|
InvalidArgumentError,
|
||||||
InvalidReturnValueError,
|
InvalidReturnValueError,
|
||||||
RequestAbortedError,
|
RequestAbortedError,
|
||||||
@@ -87939,8 +87724,7 @@ module.exports = {
|
|||||||
ResponseExceededMaxSizeError,
|
ResponseExceededMaxSizeError,
|
||||||
RequestRetryError,
|
RequestRetryError,
|
||||||
ResponseError,
|
ResponseError,
|
||||||
SecureProxyConnectionError,
|
SecureProxyConnectionError
|
||||||
MaxOriginsReachedError
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -87969,8 +87753,7 @@ const {
|
|||||||
serializePathWithQuery,
|
serializePathWithQuery,
|
||||||
assertRequestHandler,
|
assertRequestHandler,
|
||||||
getServerName,
|
getServerName,
|
||||||
normalizedMethodRecords,
|
normalizedMethodRecords
|
||||||
getProtocolFromUrlString
|
|
||||||
} = __nccwpck_require__(3440)
|
} = __nccwpck_require__(3440)
|
||||||
const { channels } = __nccwpck_require__(42414)
|
const { channels } = __nccwpck_require__(42414)
|
||||||
const { headerNameLowerCasedRecord } = __nccwpck_require__(10735)
|
const { headerNameLowerCasedRecord } = __nccwpck_require__(10735)
|
||||||
@@ -88094,11 +87877,8 @@ class Request {
|
|||||||
|
|
||||||
this.path = query ? serializePathWithQuery(path, query) : path
|
this.path = query ? serializePathWithQuery(path, query) : path
|
||||||
|
|
||||||
// TODO: shall we maybe standardize it to an URL object?
|
|
||||||
this.origin = origin
|
this.origin = origin
|
||||||
|
|
||||||
this.protocol = getProtocolFromUrlString(origin)
|
|
||||||
|
|
||||||
this.idempotent = idempotent == null
|
this.idempotent = idempotent == null
|
||||||
? method === 'HEAD' || method === 'GET'
|
? method === 'HEAD' || method === 'GET'
|
||||||
: idempotent
|
: idempotent
|
||||||
@@ -89225,11 +89005,12 @@ function ReadableStreamFrom (iterable) {
|
|||||||
let iterator
|
let iterator
|
||||||
return new ReadableStream(
|
return new ReadableStream(
|
||||||
{
|
{
|
||||||
start () {
|
async start () {
|
||||||
iterator = iterable[Symbol.asyncIterator]()
|
iterator = iterable[Symbol.asyncIterator]()
|
||||||
},
|
},
|
||||||
pull (controller) {
|
pull (controller) {
|
||||||
return iterator.next().then(({ done, value }) => {
|
async function pull () {
|
||||||
|
const { done, value } = await iterator.next()
|
||||||
if (done) {
|
if (done) {
|
||||||
queueMicrotask(() => {
|
queueMicrotask(() => {
|
||||||
controller.close()
|
controller.close()
|
||||||
@@ -89240,13 +89021,15 @@ function ReadableStreamFrom (iterable) {
|
|||||||
if (buf.byteLength) {
|
if (buf.byteLength) {
|
||||||
controller.enqueue(new Uint8Array(buf))
|
controller.enqueue(new Uint8Array(buf))
|
||||||
} else {
|
} else {
|
||||||
return this.pull(controller)
|
return await pull()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
|
return pull()
|
||||||
},
|
},
|
||||||
cancel () {
|
async cancel () {
|
||||||
return iterator.return()
|
await iterator.return()
|
||||||
},
|
},
|
||||||
type: 'bytes'
|
type: 'bytes'
|
||||||
}
|
}
|
||||||
@@ -89492,30 +89275,6 @@ function onConnectTimeout (socket, opts) {
|
|||||||
destroy(socket, new ConnectTimeoutError(message))
|
destroy(socket, new ConnectTimeoutError(message))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {string} urlString
|
|
||||||
* @returns {string}
|
|
||||||
*/
|
|
||||||
function getProtocolFromUrlString (urlString) {
|
|
||||||
if (
|
|
||||||
urlString[0] === 'h' &&
|
|
||||||
urlString[1] === 't' &&
|
|
||||||
urlString[2] === 't' &&
|
|
||||||
urlString[3] === 'p'
|
|
||||||
) {
|
|
||||||
switch (urlString[4]) {
|
|
||||||
case ':':
|
|
||||||
return 'http:'
|
|
||||||
case 's':
|
|
||||||
if (urlString[5] === ':') {
|
|
||||||
return 'https:'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// fallback if none of the usual suspects
|
|
||||||
return urlString.slice(0, urlString.indexOf(':') + 1)
|
|
||||||
}
|
|
||||||
|
|
||||||
const kEnumerableProperty = Object.create(null)
|
const kEnumerableProperty = Object.create(null)
|
||||||
kEnumerableProperty.enumerable = true
|
kEnumerableProperty.enumerable = true
|
||||||
|
|
||||||
@@ -89587,8 +89346,7 @@ module.exports = {
|
|||||||
nodeMinor,
|
nodeMinor,
|
||||||
safeHTTPMethods: Object.freeze(['GET', 'HEAD', 'OPTIONS', 'TRACE']),
|
safeHTTPMethods: Object.freeze(['GET', 'HEAD', 'OPTIONS', 'TRACE']),
|
||||||
wrapRequestBody,
|
wrapRequestBody,
|
||||||
setupConnectTimeout,
|
setupConnectTimeout
|
||||||
getProtocolFromUrlString
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -89600,7 +89358,7 @@ module.exports = {
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
const { InvalidArgumentError, MaxOriginsReachedError } = __nccwpck_require__(68707)
|
const { InvalidArgumentError } = __nccwpck_require__(68707)
|
||||||
const { kClients, kRunning, kClose, kDestroy, kDispatch, kUrl } = __nccwpck_require__(36443)
|
const { kClients, kRunning, kClose, kDestroy, kDispatch, kUrl } = __nccwpck_require__(36443)
|
||||||
const DispatcherBase = __nccwpck_require__(21841)
|
const DispatcherBase = __nccwpck_require__(21841)
|
||||||
const Pool = __nccwpck_require__(30628)
|
const Pool = __nccwpck_require__(30628)
|
||||||
@@ -89613,7 +89371,6 @@ const kOnConnectionError = Symbol('onConnectionError')
|
|||||||
const kOnDrain = Symbol('onDrain')
|
const kOnDrain = Symbol('onDrain')
|
||||||
const kFactory = Symbol('factory')
|
const kFactory = Symbol('factory')
|
||||||
const kOptions = Symbol('options')
|
const kOptions = Symbol('options')
|
||||||
const kOrigins = Symbol('origins')
|
|
||||||
|
|
||||||
function defaultFactory (origin, opts) {
|
function defaultFactory (origin, opts) {
|
||||||
return opts && opts.connections === 1
|
return opts && opts.connections === 1
|
||||||
@@ -89622,7 +89379,7 @@ function defaultFactory (origin, opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Agent extends DispatcherBase {
|
class Agent extends DispatcherBase {
|
||||||
constructor ({ factory = defaultFactory, maxOrigins = Infinity, connect, ...options } = {}) {
|
constructor ({ factory = defaultFactory, connect, ...options } = {}) {
|
||||||
if (typeof factory !== 'function') {
|
if (typeof factory !== 'function') {
|
||||||
throw new InvalidArgumentError('factory must be a function.')
|
throw new InvalidArgumentError('factory must be a function.')
|
||||||
}
|
}
|
||||||
@@ -89631,20 +89388,15 @@ class Agent extends DispatcherBase {
|
|||||||
throw new InvalidArgumentError('connect must be a function or an object')
|
throw new InvalidArgumentError('connect must be a function or an object')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof maxOrigins !== 'number' || Number.isNaN(maxOrigins) || maxOrigins <= 0) {
|
|
||||||
throw new InvalidArgumentError('maxOrigins must be a number greater than 0')
|
|
||||||
}
|
|
||||||
|
|
||||||
super()
|
super()
|
||||||
|
|
||||||
if (connect && typeof connect !== 'function') {
|
if (connect && typeof connect !== 'function') {
|
||||||
connect = { ...connect }
|
connect = { ...connect }
|
||||||
}
|
}
|
||||||
|
|
||||||
this[kOptions] = { ...util.deepClone(options), maxOrigins, connect }
|
this[kOptions] = { ...util.deepClone(options), connect }
|
||||||
this[kFactory] = factory
|
this[kFactory] = factory
|
||||||
this[kClients] = new Map()
|
this[kClients] = new Map()
|
||||||
this[kOrigins] = new Set()
|
|
||||||
|
|
||||||
this[kOnDrain] = (origin, targets) => {
|
this[kOnDrain] = (origin, targets) => {
|
||||||
this.emit('drain', origin, [this, ...targets])
|
this.emit('drain', origin, [this, ...targets])
|
||||||
@@ -89679,10 +89431,6 @@ class Agent extends DispatcherBase {
|
|||||||
throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.')
|
throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this[kOrigins].size >= this[kOptions].maxOrigins && !this[kOrigins].has(key)) {
|
|
||||||
throw new MaxOriginsReachedError()
|
|
||||||
}
|
|
||||||
|
|
||||||
const result = this[kClients].get(key)
|
const result = this[kClients].get(key)
|
||||||
let dispatcher = result && result.dispatcher
|
let dispatcher = result && result.dispatcher
|
||||||
if (!dispatcher) {
|
if (!dispatcher) {
|
||||||
@@ -89694,7 +89442,6 @@ class Agent extends DispatcherBase {
|
|||||||
this[kClients].delete(key)
|
this[kClients].delete(key)
|
||||||
result.dispatcher.close()
|
result.dispatcher.close()
|
||||||
}
|
}
|
||||||
this[kOrigins].delete(key)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dispatcher = this[kFactory](opts.origin, this[kOptions])
|
dispatcher = this[kFactory](opts.origin, this[kOptions])
|
||||||
@@ -89716,30 +89463,29 @@ class Agent extends DispatcherBase {
|
|||||||
})
|
})
|
||||||
|
|
||||||
this[kClients].set(key, { count: 0, dispatcher })
|
this[kClients].set(key, { count: 0, dispatcher })
|
||||||
this[kOrigins].add(key)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return dispatcher.dispatch(opts, handler)
|
return dispatcher.dispatch(opts, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
const closePromises = []
|
const closePromises = []
|
||||||
for (const { dispatcher } of this[kClients].values()) {
|
for (const { dispatcher } of this[kClients].values()) {
|
||||||
closePromises.push(dispatcher.close())
|
closePromises.push(dispatcher.close())
|
||||||
}
|
}
|
||||||
this[kClients].clear()
|
this[kClients].clear()
|
||||||
|
|
||||||
return Promise.all(closePromises)
|
await Promise.all(closePromises)
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] (err) {
|
async [kDestroy] (err) {
|
||||||
const destroyPromises = []
|
const destroyPromises = []
|
||||||
for (const { dispatcher } of this[kClients].values()) {
|
for (const { dispatcher } of this[kClients].values()) {
|
||||||
destroyPromises.push(dispatcher.destroy(err))
|
destroyPromises.push(dispatcher.destroy(err))
|
||||||
}
|
}
|
||||||
this[kClients].clear()
|
this[kClients].clear()
|
||||||
|
|
||||||
return Promise.all(destroyPromises)
|
await Promise.all(destroyPromises)
|
||||||
}
|
}
|
||||||
|
|
||||||
get stats () {
|
get stats () {
|
||||||
@@ -90042,26 +89788,11 @@ function lazyllhttp () {
|
|||||||
const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(63870) : undefined
|
const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(63870) : undefined
|
||||||
|
|
||||||
let mod
|
let mod
|
||||||
|
try {
|
||||||
|
mod = new WebAssembly.Module(__nccwpck_require__(53434))
|
||||||
|
} catch {
|
||||||
|
/* istanbul ignore next */
|
||||||
|
|
||||||
// We disable wasm SIMD on ppc64 as it seems to be broken on Power 9 architectures.
|
|
||||||
let useWasmSIMD = process.arch !== 'ppc64'
|
|
||||||
// The Env Variable UNDICI_NO_WASM_SIMD allows explicitly overriding the default behavior
|
|
||||||
if (process.env.UNDICI_NO_WASM_SIMD === '1') {
|
|
||||||
useWasmSIMD = true
|
|
||||||
} else if (process.env.UNDICI_NO_WASM_SIMD === '0') {
|
|
||||||
useWasmSIMD = false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (useWasmSIMD) {
|
|
||||||
try {
|
|
||||||
mod = new WebAssembly.Module(__nccwpck_require__(53434))
|
|
||||||
/* istanbul ignore next */
|
|
||||||
} catch {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* istanbul ignore next */
|
|
||||||
if (!mod) {
|
|
||||||
// We could check if the error was caused by the simd option not
|
// We could check if the error was caused by the simd option not
|
||||||
// being enabled, but the occurring of this other error
|
// being enabled, but the occurring of this other error
|
||||||
// * https://github.com/emscripten-core/emscripten/issues/11495
|
// * https://github.com/emscripten-core/emscripten/issues/11495
|
||||||
@@ -90318,6 +90049,10 @@ class Parser {
|
|||||||
currentBufferRef = chunk
|
currentBufferRef = chunk
|
||||||
currentParser = this
|
currentParser = this
|
||||||
ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length)
|
ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length)
|
||||||
|
/* eslint-disable-next-line no-useless-catch */
|
||||||
|
} catch (err) {
|
||||||
|
/* istanbul ignore next: difficult to make a test case for */
|
||||||
|
throw err
|
||||||
} finally {
|
} finally {
|
||||||
currentParser = null
|
currentParser = null
|
||||||
currentBufferRef = null
|
currentBufferRef = null
|
||||||
@@ -90749,7 +90484,7 @@ function onParserTimeout (parser) {
|
|||||||
* @param {import('net').Socket} socket
|
* @param {import('net').Socket} socket
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
function connectH1 (client, socket) {
|
async function connectH1 (client, socket) {
|
||||||
client[kSocket] = socket
|
client[kSocket] = socket
|
||||||
|
|
||||||
if (!llhttpInstance) {
|
if (!llhttpInstance) {
|
||||||
@@ -91680,7 +91415,7 @@ function parseH2Headers (headers) {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
function connectH2 (client, socket) {
|
async function connectH2 (client, socket) {
|
||||||
client[kSocket] = socket
|
client[kSocket] = socket
|
||||||
|
|
||||||
const session = http2.connect(client[kUrl], {
|
const session = http2.connect(client[kUrl], {
|
||||||
@@ -91882,7 +91617,7 @@ function shouldSendContentLength (method) {
|
|||||||
function writeH2 (client, request) {
|
function writeH2 (client, request) {
|
||||||
const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout]
|
const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout]
|
||||||
const session = client[kHTTP2Session]
|
const session = client[kHTTP2Session]
|
||||||
const { method, path, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request
|
const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request
|
||||||
let { body } = request
|
let { body } = request
|
||||||
|
|
||||||
if (upgrade) {
|
if (upgrade) {
|
||||||
@@ -91895,16 +91630,6 @@ function writeH2 (client, request) {
|
|||||||
const key = reqHeaders[n + 0]
|
const key = reqHeaders[n + 0]
|
||||||
const val = reqHeaders[n + 1]
|
const val = reqHeaders[n + 1]
|
||||||
|
|
||||||
if (key === 'cookie') {
|
|
||||||
if (headers[key] != null) {
|
|
||||||
headers[key] = Array.isArray(headers[key]) ? (headers[key].push(val), headers[key]) : [headers[key], val]
|
|
||||||
} else {
|
|
||||||
headers[key] = val
|
|
||||||
}
|
|
||||||
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Array.isArray(val)) {
|
if (Array.isArray(val)) {
|
||||||
for (let i = 0; i < val.length; i++) {
|
for (let i = 0; i < val.length; i++) {
|
||||||
if (headers[key]) {
|
if (headers[key]) {
|
||||||
@@ -92000,7 +91725,7 @@ function writeH2 (client, request) {
|
|||||||
// :path and :scheme headers must be omitted when sending CONNECT
|
// :path and :scheme headers must be omitted when sending CONNECT
|
||||||
|
|
||||||
headers[HTTP2_HEADER_PATH] = path
|
headers[HTTP2_HEADER_PATH] = path
|
||||||
headers[HTTP2_HEADER_SCHEME] = protocol === 'http:' ? 'http' : 'https'
|
headers[HTTP2_HEADER_SCHEME] = 'https'
|
||||||
|
|
||||||
// https://tools.ietf.org/html/rfc7231#section-4.3.1
|
// https://tools.ietf.org/html/rfc7231#section-4.3.1
|
||||||
// https://tools.ietf.org/html/rfc7231#section-4.3.2
|
// https://tools.ietf.org/html/rfc7231#section-4.3.2
|
||||||
@@ -92715,7 +92440,8 @@ class Client extends DispatcherBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[kDispatch] (opts, handler) {
|
[kDispatch] (opts, handler) {
|
||||||
const request = new Request(this[kUrl].origin, opts, handler)
|
const origin = opts.origin || this[kUrl].origin
|
||||||
|
const request = new Request(origin, opts, handler)
|
||||||
|
|
||||||
this[kQueue].push(request)
|
this[kQueue].push(request)
|
||||||
if (this[kResuming]) {
|
if (this[kResuming]) {
|
||||||
@@ -92735,7 +92461,7 @@ class Client extends DispatcherBase {
|
|||||||
return this[kNeedDrain] < 2
|
return this[kNeedDrain] < 2
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
// TODO: for H2 we need to gracefully flush the remaining enqueued
|
// TODO: for H2 we need to gracefully flush the remaining enqueued
|
||||||
// request and close each stream.
|
// request and close each stream.
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
@@ -92747,7 +92473,7 @@ class Client extends DispatcherBase {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] (err) {
|
async [kDestroy] (err) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const requests = this[kQueue].splice(this[kPendingIdx])
|
const requests = this[kQueue].splice(this[kPendingIdx])
|
||||||
for (let i = 0; i < requests.length; i++) {
|
for (let i = 0; i < requests.length; i++) {
|
||||||
@@ -92799,9 +92525,9 @@ function onError (client, err) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Client} client
|
* @param {Client} client
|
||||||
* @returns {void}
|
* @returns
|
||||||
*/
|
*/
|
||||||
function connect (client) {
|
async function connect (client) {
|
||||||
assert(!client[kConnecting])
|
assert(!client[kConnecting])
|
||||||
assert(!client[kHTTPContext])
|
assert(!client[kHTTPContext])
|
||||||
|
|
||||||
@@ -92835,23 +92561,26 @@ function connect (client) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
client[kConnector]({
|
try {
|
||||||
host,
|
const socket = await new Promise((resolve, reject) => {
|
||||||
hostname,
|
client[kConnector]({
|
||||||
protocol,
|
host,
|
||||||
port,
|
hostname,
|
||||||
servername: client[kServerName],
|
protocol,
|
||||||
localAddress: client[kLocalAddress]
|
port,
|
||||||
}, (err, socket) => {
|
servername: client[kServerName],
|
||||||
if (err) {
|
localAddress: client[kLocalAddress]
|
||||||
handleConnectError(client, err, { host, hostname, protocol, port })
|
}, (err, socket) => {
|
||||||
client[kResume]()
|
if (err) {
|
||||||
return
|
reject(err)
|
||||||
}
|
} else {
|
||||||
|
resolve(socket)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
if (client.destroyed) {
|
if (client.destroyed) {
|
||||||
util.destroy(socket.on('error', noop), new ClientDestroyedError())
|
util.destroy(socket.on('error', noop), new ClientDestroyedError())
|
||||||
client[kResume]()
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92859,13 +92588,11 @@ function connect (client) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
client[kHTTPContext] = socket.alpnProtocol === 'h2'
|
client[kHTTPContext] = socket.alpnProtocol === 'h2'
|
||||||
? connectH2(client, socket)
|
? await connectH2(client, socket)
|
||||||
: connectH1(client, socket)
|
: await connectH1(client, socket)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
socket.destroy().on('error', noop)
|
socket.destroy().on('error', noop)
|
||||||
handleConnectError(client, err, { host, hostname, protocol, port })
|
throw err
|
||||||
client[kResume]()
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
client[kConnecting] = false
|
client[kConnecting] = false
|
||||||
@@ -92890,46 +92617,44 @@ function connect (client) {
|
|||||||
socket
|
socket
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
client.emit('connect', client[kUrl], [client])
|
client.emit('connect', client[kUrl], [client])
|
||||||
client[kResume]()
|
} catch (err) {
|
||||||
})
|
if (client.destroyed) {
|
||||||
}
|
return
|
||||||
|
|
||||||
function handleConnectError (client, err, { host, hostname, protocol, port }) {
|
|
||||||
if (client.destroyed) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
client[kConnecting] = false
|
|
||||||
|
|
||||||
if (channels.connectError.hasSubscribers) {
|
|
||||||
channels.connectError.publish({
|
|
||||||
connectParams: {
|
|
||||||
host,
|
|
||||||
hostname,
|
|
||||||
protocol,
|
|
||||||
port,
|
|
||||||
version: client[kHTTPContext]?.version,
|
|
||||||
servername: client[kServerName],
|
|
||||||
localAddress: client[kLocalAddress]
|
|
||||||
},
|
|
||||||
connector: client[kConnector],
|
|
||||||
error: err
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {
|
|
||||||
assert(client[kRunning] === 0)
|
|
||||||
while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {
|
|
||||||
const request = client[kQueue][client[kPendingIdx]++]
|
|
||||||
util.errorRequest(client, request, err)
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
onError(client, err)
|
client[kConnecting] = false
|
||||||
|
|
||||||
|
if (channels.connectError.hasSubscribers) {
|
||||||
|
channels.connectError.publish({
|
||||||
|
connectParams: {
|
||||||
|
host,
|
||||||
|
hostname,
|
||||||
|
protocol,
|
||||||
|
port,
|
||||||
|
version: client[kHTTPContext]?.version,
|
||||||
|
servername: client[kServerName],
|
||||||
|
localAddress: client[kLocalAddress]
|
||||||
|
},
|
||||||
|
connector: client[kConnector],
|
||||||
|
error: err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {
|
||||||
|
assert(client[kRunning] === 0)
|
||||||
|
while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {
|
||||||
|
const request = client[kQueue][client[kPendingIdx]++]
|
||||||
|
util.errorRequest(client, request, err)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
onError(client, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
client.emit('connectionError', client[kUrl], [client], err)
|
||||||
}
|
}
|
||||||
|
|
||||||
client.emit('connectionError', client[kUrl], [client], err)
|
client[kResume]()
|
||||||
}
|
}
|
||||||
|
|
||||||
function emitDrain (client) {
|
function emitDrain (client) {
|
||||||
@@ -93054,24 +92779,19 @@ const kOnDestroyed = Symbol('onDestroyed')
|
|||||||
const kOnClosed = Symbol('onClosed')
|
const kOnClosed = Symbol('onClosed')
|
||||||
|
|
||||||
class DispatcherBase extends Dispatcher {
|
class DispatcherBase extends Dispatcher {
|
||||||
/** @type {boolean} */
|
constructor () {
|
||||||
[kDestroyed] = false;
|
super()
|
||||||
|
|
||||||
/** @type {Array|null} */
|
this[kDestroyed] = false
|
||||||
[kOnDestroyed] = null;
|
this[kOnDestroyed] = null
|
||||||
|
this[kClosed] = false
|
||||||
|
this[kOnClosed] = []
|
||||||
|
}
|
||||||
|
|
||||||
/** @type {boolean} */
|
|
||||||
[kClosed] = false;
|
|
||||||
|
|
||||||
/** @type {Array} */
|
|
||||||
[kOnClosed] = []
|
|
||||||
|
|
||||||
/** @returns {boolean} */
|
|
||||||
get destroyed () {
|
get destroyed () {
|
||||||
return this[kDestroyed]
|
return this[kDestroyed]
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {boolean} */
|
|
||||||
get closed () {
|
get closed () {
|
||||||
return this[kClosed]
|
return this[kClosed]
|
||||||
}
|
}
|
||||||
@@ -93317,20 +93037,24 @@ class EnvHttpProxyAgent extends DispatcherBase {
|
|||||||
return agent.dispatch(opts, handler)
|
return agent.dispatch(opts, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
return Promise.all([
|
await this[kNoProxyAgent].close()
|
||||||
this[kNoProxyAgent].close(),
|
if (!this[kHttpProxyAgent][kClosed]) {
|
||||||
!this[kHttpProxyAgent][kClosed] && this[kHttpProxyAgent].close(),
|
await this[kHttpProxyAgent].close()
|
||||||
!this[kHttpsProxyAgent][kClosed] && this[kHttpsProxyAgent].close()
|
}
|
||||||
])
|
if (!this[kHttpsProxyAgent][kClosed]) {
|
||||||
|
await this[kHttpsProxyAgent].close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] (err) {
|
async [kDestroy] (err) {
|
||||||
return Promise.all([
|
await this[kNoProxyAgent].destroy(err)
|
||||||
this[kNoProxyAgent].destroy(err),
|
if (!this[kHttpProxyAgent][kDestroyed]) {
|
||||||
!this[kHttpProxyAgent][kDestroyed] && this[kHttpProxyAgent].destroy(err),
|
await this[kHttpProxyAgent].destroy(err)
|
||||||
!this[kHttpsProxyAgent][kDestroyed] && this[kHttpsProxyAgent].destroy(err)
|
}
|
||||||
])
|
if (!this[kHttpsProxyAgent][kDestroyed]) {
|
||||||
|
await this[kHttpsProxyAgent].destroy(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#getProxyAgentForUrl (url) {
|
#getProxyAgentForUrl (url) {
|
||||||
@@ -93485,21 +93209,35 @@ const kMask = kSize - 1
|
|||||||
* @template T
|
* @template T
|
||||||
*/
|
*/
|
||||||
class FixedCircularBuffer {
|
class FixedCircularBuffer {
|
||||||
/** @type {number} */
|
constructor () {
|
||||||
bottom = 0
|
/**
|
||||||
/** @type {number} */
|
* @type {number}
|
||||||
top = 0
|
*/
|
||||||
/** @type {Array<T|undefined>} */
|
this.bottom = 0
|
||||||
list = new Array(kSize).fill(undefined)
|
/**
|
||||||
/** @type {T|null} */
|
* @type {number}
|
||||||
next = null
|
*/
|
||||||
|
this.top = 0
|
||||||
|
/**
|
||||||
|
* @type {Array<T|undefined>}
|
||||||
|
*/
|
||||||
|
this.list = new Array(kSize).fill(undefined)
|
||||||
|
/**
|
||||||
|
* @type {T|null}
|
||||||
|
*/
|
||||||
|
this.next = null
|
||||||
|
}
|
||||||
|
|
||||||
/** @returns {boolean} */
|
/**
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
isEmpty () {
|
isEmpty () {
|
||||||
return this.top === this.bottom
|
return this.top === this.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {boolean} */
|
/**
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
isFull () {
|
isFull () {
|
||||||
return ((this.top + 1) & kMask) === this.bottom
|
return ((this.top + 1) & kMask) === this.bottom
|
||||||
}
|
}
|
||||||
@@ -93513,7 +93251,9 @@ class FixedCircularBuffer {
|
|||||||
this.top = (this.top + 1) & kMask
|
this.top = (this.top + 1) & kMask
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {T|null} */
|
/**
|
||||||
|
* @returns {T|null}
|
||||||
|
*/
|
||||||
shift () {
|
shift () {
|
||||||
const nextItem = this.list[this.bottom]
|
const nextItem = this.list[this.bottom]
|
||||||
if (nextItem === undefined) { return null }
|
if (nextItem === undefined) { return null }
|
||||||
@@ -93528,16 +93268,22 @@ class FixedCircularBuffer {
|
|||||||
*/
|
*/
|
||||||
module.exports = class FixedQueue {
|
module.exports = class FixedQueue {
|
||||||
constructor () {
|
constructor () {
|
||||||
/** @type {FixedCircularBuffer<T>} */
|
/**
|
||||||
|
* @type {FixedCircularBuffer<T>}
|
||||||
|
*/
|
||||||
this.head = this.tail = new FixedCircularBuffer()
|
this.head = this.tail = new FixedCircularBuffer()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {boolean} */
|
/**
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
isEmpty () {
|
isEmpty () {
|
||||||
return this.head.isEmpty()
|
return this.head.isEmpty()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @param {T} data */
|
/**
|
||||||
|
* @param {T} data
|
||||||
|
*/
|
||||||
push (data) {
|
push (data) {
|
||||||
if (this.head.isFull()) {
|
if (this.head.isFull()) {
|
||||||
// Head is full: Creates a new queue, sets the old queue's `.next` to it,
|
// Head is full: Creates a new queue, sets the old queue's `.next` to it,
|
||||||
@@ -93547,7 +93293,9 @@ module.exports = class FixedQueue {
|
|||||||
this.head.push(data)
|
this.head.push(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {T|null} */
|
/**
|
||||||
|
* @returns {T|null}
|
||||||
|
*/
|
||||||
shift () {
|
shift () {
|
||||||
const tail = this.tail
|
const tail = this.tail
|
||||||
const next = tail.shift()
|
const next = tail.shift()
|
||||||
@@ -93581,6 +93329,8 @@ class H2CClient extends DispatcherBase {
|
|||||||
#client = null
|
#client = null
|
||||||
|
|
||||||
constructor (origin, clientOpts) {
|
constructor (origin, clientOpts) {
|
||||||
|
super()
|
||||||
|
|
||||||
if (typeof origin === 'string') {
|
if (typeof origin === 'string') {
|
||||||
origin = new URL(origin)
|
origin = new URL(origin)
|
||||||
}
|
}
|
||||||
@@ -93614,8 +93364,6 @@ class H2CClient extends DispatcherBase {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
super()
|
|
||||||
|
|
||||||
this.#client = new Client(origin, {
|
this.#client = new Client(origin, {
|
||||||
...opts,
|
...opts,
|
||||||
connect: this.#buildConnector(connect),
|
connect: this.#buildConnector(connect),
|
||||||
@@ -93679,12 +93427,12 @@ class H2CClient extends DispatcherBase {
|
|||||||
return this.#client.dispatch(opts, handler)
|
return this.#client.dispatch(opts, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
return this.#client.close()
|
await this.#client.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] () {
|
async [kDestroy] () {
|
||||||
return this.#client.destroy()
|
await this.#client.destroy()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93717,55 +93465,54 @@ const kAddClient = Symbol('add client')
|
|||||||
const kRemoveClient = Symbol('remove client')
|
const kRemoveClient = Symbol('remove client')
|
||||||
|
|
||||||
class PoolBase extends DispatcherBase {
|
class PoolBase extends DispatcherBase {
|
||||||
[kQueue] = new FixedQueue();
|
constructor () {
|
||||||
|
super()
|
||||||
|
|
||||||
[kQueued] = 0;
|
this[kQueue] = new FixedQueue()
|
||||||
|
this[kClients] = []
|
||||||
|
this[kQueued] = 0
|
||||||
|
|
||||||
[kClients] = [];
|
const pool = this
|
||||||
|
|
||||||
[kNeedDrain] = false;
|
this[kOnDrain] = function onDrain (origin, targets) {
|
||||||
|
const queue = pool[kQueue]
|
||||||
|
|
||||||
[kOnDrain] (client, origin, targets) {
|
let needDrain = false
|
||||||
const queue = this[kQueue]
|
|
||||||
|
|
||||||
let needDrain = false
|
while (!needDrain) {
|
||||||
|
const item = queue.shift()
|
||||||
while (!needDrain) {
|
if (!item) {
|
||||||
const item = queue.shift()
|
break
|
||||||
if (!item) {
|
}
|
||||||
break
|
pool[kQueued]--
|
||||||
|
needDrain = !this.dispatch(item.opts, item.handler)
|
||||||
}
|
}
|
||||||
this[kQueued]--
|
|
||||||
needDrain = !client.dispatch(item.opts, item.handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
client[kNeedDrain] = needDrain
|
this[kNeedDrain] = needDrain
|
||||||
|
|
||||||
if (!needDrain && this[kNeedDrain]) {
|
if (!this[kNeedDrain] && pool[kNeedDrain]) {
|
||||||
this[kNeedDrain] = false
|
pool[kNeedDrain] = false
|
||||||
this.emit('drain', origin, [this, ...targets])
|
pool.emit('drain', origin, [pool, ...targets])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this[kClosedResolve] && queue.isEmpty()) {
|
if (pool[kClosedResolve] && queue.isEmpty()) {
|
||||||
const closeAll = new Array(this[kClients].length)
|
Promise
|
||||||
for (let i = 0; i < this[kClients].length; i++) {
|
.all(pool[kClients].map(c => c.close()))
|
||||||
closeAll[i] = this[kClients][i].close()
|
.then(pool[kClosedResolve])
|
||||||
}
|
}
|
||||||
Promise.all(closeAll)
|
|
||||||
.then(this[kClosedResolve])
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[kOnConnect] = (origin, targets) => {
|
this[kOnConnect] = (origin, targets) => {
|
||||||
this.emit('connect', origin, [this, ...targets])
|
pool.emit('connect', origin, [pool, ...targets])
|
||||||
};
|
}
|
||||||
|
|
||||||
[kOnDisconnect] = (origin, targets, err) => {
|
this[kOnDisconnect] = (origin, targets, err) => {
|
||||||
this.emit('disconnect', origin, [this, ...targets], err)
|
pool.emit('disconnect', origin, [pool, ...targets], err)
|
||||||
};
|
}
|
||||||
|
|
||||||
[kOnConnectionError] = (origin, targets, err) => {
|
this[kOnConnectionError] = (origin, targets, err) => {
|
||||||
this.emit('connectionError', origin, [this, ...targets], err)
|
pool.emit('connectionError', origin, [pool, ...targets], err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get [kBusy] () {
|
get [kBusy] () {
|
||||||
@@ -93773,19 +93520,11 @@ class PoolBase extends DispatcherBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get [kConnected] () {
|
get [kConnected] () {
|
||||||
let ret = 0
|
return this[kClients].filter(client => client[kConnected]).length
|
||||||
for (const { [kConnected]: connected } of this[kClients]) {
|
|
||||||
ret += connected
|
|
||||||
}
|
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get [kFree] () {
|
get [kFree] () {
|
||||||
let ret = 0
|
return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length
|
||||||
for (const { [kConnected]: connected, [kNeedDrain]: needDrain } of this[kClients]) {
|
|
||||||
ret += connected && !needDrain
|
|
||||||
}
|
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get [kPending] () {
|
get [kPending] () {
|
||||||
@@ -93816,21 +93555,17 @@ class PoolBase extends DispatcherBase {
|
|||||||
return new PoolStats(this)
|
return new PoolStats(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
if (this[kQueue].isEmpty()) {
|
if (this[kQueue].isEmpty()) {
|
||||||
const closeAll = new Array(this[kClients].length)
|
await Promise.all(this[kClients].map(c => c.close()))
|
||||||
for (let i = 0; i < this[kClients].length; i++) {
|
|
||||||
closeAll[i] = this[kClients][i].close()
|
|
||||||
}
|
|
||||||
return Promise.all(closeAll)
|
|
||||||
} else {
|
} else {
|
||||||
return new Promise((resolve) => {
|
await new Promise((resolve) => {
|
||||||
this[kClosedResolve] = resolve
|
this[kClosedResolve] = resolve
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] (err) {
|
async [kDestroy] (err) {
|
||||||
while (true) {
|
while (true) {
|
||||||
const item = this[kQueue].shift()
|
const item = this[kQueue].shift()
|
||||||
if (!item) {
|
if (!item) {
|
||||||
@@ -93839,11 +93574,7 @@ class PoolBase extends DispatcherBase {
|
|||||||
item.handler.onError(err)
|
item.handler.onError(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
const destroyAll = new Array(this[kClients].length)
|
await Promise.all(this[kClients].map(c => c.destroy(err)))
|
||||||
for (let i = 0; i < this[kClients].length; i++) {
|
|
||||||
destroyAll[i] = this[kClients][i].destroy(err)
|
|
||||||
}
|
|
||||||
return Promise.all(destroyAll)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDispatch] (opts, handler) {
|
[kDispatch] (opts, handler) {
|
||||||
@@ -93863,7 +93594,7 @@ class PoolBase extends DispatcherBase {
|
|||||||
|
|
||||||
[kAddClient] (client) {
|
[kAddClient] (client) {
|
||||||
client
|
client
|
||||||
.on('drain', this[kOnDrain].bind(this, client))
|
.on('drain', this[kOnDrain])
|
||||||
.on('connect', this[kOnConnect])
|
.on('connect', this[kOnConnect])
|
||||||
.on('disconnect', this[kOnDisconnect])
|
.on('disconnect', this[kOnDisconnect])
|
||||||
.on('connectionError', this[kOnConnectionError])
|
.on('connectionError', this[kOnConnectionError])
|
||||||
@@ -93873,7 +93604,7 @@ class PoolBase extends DispatcherBase {
|
|||||||
if (this[kNeedDrain]) {
|
if (this[kNeedDrain]) {
|
||||||
queueMicrotask(() => {
|
queueMicrotask(() => {
|
||||||
if (this[kNeedDrain]) {
|
if (this[kNeedDrain]) {
|
||||||
this[kOnDrain](client, client[kUrl], [client, this])
|
this[kOnDrain](client[kUrl], [this, client])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -93966,6 +93697,8 @@ class Pool extends PoolBase {
|
|||||||
throw new InvalidArgumentError('connect must be a function or an object')
|
throw new InvalidArgumentError('connect must be a function or an object')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super()
|
||||||
|
|
||||||
if (typeof connect !== 'function') {
|
if (typeof connect !== 'function') {
|
||||||
connect = buildConnector({
|
connect = buildConnector({
|
||||||
...tls,
|
...tls,
|
||||||
@@ -93978,8 +93711,6 @@ class Pool extends PoolBase {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
super()
|
|
||||||
|
|
||||||
this[kConnections] = connections || null
|
this[kConnections] = connections || null
|
||||||
this[kUrl] = util.parseOrigin(origin)
|
this[kUrl] = util.parseOrigin(origin)
|
||||||
this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl }
|
this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl }
|
||||||
@@ -94078,12 +93809,11 @@ class Http1ProxyWrapper extends DispatcherBase {
|
|||||||
#client
|
#client
|
||||||
|
|
||||||
constructor (proxyUrl, { headers = {}, connect, factory }) {
|
constructor (proxyUrl, { headers = {}, connect, factory }) {
|
||||||
|
super()
|
||||||
if (!proxyUrl) {
|
if (!proxyUrl) {
|
||||||
throw new InvalidArgumentError('Proxy URL is mandatory')
|
throw new InvalidArgumentError('Proxy URL is mandatory')
|
||||||
}
|
}
|
||||||
|
|
||||||
super()
|
|
||||||
|
|
||||||
this[kProxyHeaders] = headers
|
this[kProxyHeaders] = headers
|
||||||
if (factory) {
|
if (factory) {
|
||||||
this.#client = factory(proxyUrl, { connect })
|
this.#client = factory(proxyUrl, { connect })
|
||||||
@@ -94122,11 +93852,11 @@ class Http1ProxyWrapper extends DispatcherBase {
|
|||||||
return this.#client[kDispatch](opts, handler)
|
return this.#client[kDispatch](opts, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
return this.#client.close()
|
return this.#client.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] (err) {
|
async [kDestroy] (err) {
|
||||||
return this.#client.destroy(err)
|
return this.#client.destroy(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -94262,18 +93992,14 @@ class ProxyAgent extends DispatcherBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
return Promise.all([
|
await this[kAgent].close()
|
||||||
this[kAgent].close(),
|
await this[kClient].close()
|
||||||
this[kClient].close()
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] () {
|
async [kDestroy] () {
|
||||||
return Promise.all([
|
await this[kAgent].destroy()
|
||||||
this[kAgent].destroy(),
|
await this[kClient].destroy()
|
||||||
this[kClient].destroy()
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94394,27 +94120,9 @@ function getGlobalDispatcher () {
|
|||||||
return globalThis[globalDispatcher]
|
return globalThis[globalDispatcher]
|
||||||
}
|
}
|
||||||
|
|
||||||
// These are the globals that can be installed by undici.install().
|
|
||||||
// Not exported by index.js to avoid use outside of this module.
|
|
||||||
const installedExports = /** @type {const} */ (
|
|
||||||
[
|
|
||||||
'fetch',
|
|
||||||
'Headers',
|
|
||||||
'Response',
|
|
||||||
'Request',
|
|
||||||
'FormData',
|
|
||||||
'WebSocket',
|
|
||||||
'CloseEvent',
|
|
||||||
'ErrorEvent',
|
|
||||||
'MessageEvent',
|
|
||||||
'EventSource'
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
setGlobalDispatcher,
|
setGlobalDispatcher,
|
||||||
getGlobalDispatcher,
|
getGlobalDispatcher
|
||||||
installedExports
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -96022,22 +95730,6 @@ function needsRevalidation (result, cacheControlDirectives) {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if we're within the stale-while-revalidate window for a stale response
|
|
||||||
* @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result
|
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
|
||||||
function withinStaleWhileRevalidateWindow (result) {
|
|
||||||
const staleWhileRevalidate = result.cacheControlDirectives?.['stale-while-revalidate']
|
|
||||||
if (!staleWhileRevalidate) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
const now = Date.now()
|
|
||||||
const staleWhileRevalidateExpiry = result.staleAt + (staleWhileRevalidate * 1000)
|
|
||||||
return now <= staleWhileRevalidateExpiry
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {DispatchFn} dispatch
|
* @param {DispatchFn} dispatch
|
||||||
* @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts
|
* @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts
|
||||||
@@ -96213,51 +95905,6 @@ function handleResult (
|
|||||||
return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))
|
return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))
|
||||||
}
|
}
|
||||||
|
|
||||||
// RFC 5861: If we're within stale-while-revalidate window, serve stale immediately
|
|
||||||
// and revalidate in background
|
|
||||||
if (withinStaleWhileRevalidateWindow(result)) {
|
|
||||||
// Serve stale response immediately
|
|
||||||
sendCachedValue(handler, opts, result, age, null, true)
|
|
||||||
|
|
||||||
// Start background revalidation (fire-and-forget)
|
|
||||||
queueMicrotask(() => {
|
|
||||||
let headers = {
|
|
||||||
...opts.headers,
|
|
||||||
'if-modified-since': new Date(result.cachedAt).toUTCString()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.etag) {
|
|
||||||
headers['if-none-match'] = result.etag
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.vary) {
|
|
||||||
headers = {
|
|
||||||
...headers,
|
|
||||||
...result.vary
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Background revalidation - update cache if we get new data
|
|
||||||
dispatch(
|
|
||||||
{
|
|
||||||
...opts,
|
|
||||||
headers
|
|
||||||
},
|
|
||||||
new CacheHandler(globalOpts, cacheKey, {
|
|
||||||
// Silent handler that just updates the cache
|
|
||||||
onRequestStart () {},
|
|
||||||
onRequestUpgrade () {},
|
|
||||||
onResponseStart () {},
|
|
||||||
onResponseData () {},
|
|
||||||
onResponseEnd () {},
|
|
||||||
onResponseError () {}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
let withinStaleIfErrorThreshold = false
|
let withinStaleIfErrorThreshold = false
|
||||||
const staleIfErrorExpiry = result.cacheControlDirectives['stale-if-error'] ?? reqCacheControl?.['stale-if-error']
|
const staleIfErrorExpiry = result.cacheControlDirectives['stale-if-error'] ?? reqCacheControl?.['stale-if-error']
|
||||||
if (staleIfErrorExpiry) {
|
if (staleIfErrorExpiry) {
|
||||||
@@ -98023,16 +97670,16 @@ const PendingInterceptorsFormatter = __nccwpck_require__(56142)
|
|||||||
const { MockCallHistory } = __nccwpck_require__(30431)
|
const { MockCallHistory } = __nccwpck_require__(30431)
|
||||||
|
|
||||||
class MockAgent extends Dispatcher {
|
class MockAgent extends Dispatcher {
|
||||||
constructor (opts = {}) {
|
constructor (opts) {
|
||||||
super(opts)
|
super(opts)
|
||||||
|
|
||||||
const mockOptions = buildAndValidateMockOptions(opts)
|
const mockOptions = buildAndValidateMockOptions(opts)
|
||||||
|
|
||||||
this[kNetConnect] = true
|
this[kNetConnect] = true
|
||||||
this[kIsMockActive] = true
|
this[kIsMockActive] = true
|
||||||
this[kMockAgentIsCallHistoryEnabled] = mockOptions.enableCallHistory ?? false
|
this[kMockAgentIsCallHistoryEnabled] = mockOptions?.enableCallHistory ?? false
|
||||||
this[kMockAgentAcceptsNonStandardSearchParameters] = mockOptions.acceptNonStandardSearchParameters ?? false
|
this[kMockAgentAcceptsNonStandardSearchParameters] = mockOptions?.acceptNonStandardSearchParameters ?? false
|
||||||
this[kIgnoreTrailingSlash] = mockOptions.ignoreTrailingSlash ?? false
|
this[kIgnoreTrailingSlash] = mockOptions?.ignoreTrailingSlash ?? false
|
||||||
|
|
||||||
// Instantiate Agent and encapsulate
|
// Instantiate Agent and encapsulate
|
||||||
if (opts?.agent && typeof opts.agent.dispatch !== 'function') {
|
if (opts?.agent && typeof opts.agent.dispatch !== 'function') {
|
||||||
@@ -98566,8 +98213,6 @@ module.exports = MockClient
|
|||||||
|
|
||||||
const { UndiciError } = __nccwpck_require__(68707)
|
const { UndiciError } = __nccwpck_require__(68707)
|
||||||
|
|
||||||
const kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED')
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The request does not match any registered mock dispatches.
|
* The request does not match any registered mock dispatches.
|
||||||
*/
|
*/
|
||||||
@@ -98578,14 +98223,6 @@ class MockNotMatchedError extends UndiciError {
|
|||||||
this.message = message || 'The request does not match any registered mock dispatches'
|
this.message = message || 'The request does not match any registered mock dispatches'
|
||||||
this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'
|
this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kMockNotMatchedError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kMockNotMatchedError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -99300,7 +98937,7 @@ function buildMockDispatch () {
|
|||||||
try {
|
try {
|
||||||
mockDispatch.call(this, opts, handler)
|
mockDispatch.call(this, opts, handler)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code === 'UND_MOCK_ERR_MOCK_NOT_MATCHED') {
|
if (error instanceof MockNotMatchedError) {
|
||||||
const netConnect = agent[kGetNetConnect]()
|
const netConnect = agent[kGetNetConnect]()
|
||||||
if (netConnect === false) {
|
if (netConnect === false) {
|
||||||
throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`)
|
throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`)
|
||||||
@@ -99331,21 +98968,19 @@ function checkNetConnect (netConnect, origin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function buildAndValidateMockOptions (opts) {
|
function buildAndValidateMockOptions (opts) {
|
||||||
const { agent, ...mockOptions } = opts
|
if (opts) {
|
||||||
|
const { agent, ...mockOptions } = opts
|
||||||
|
|
||||||
if ('enableCallHistory' in mockOptions && typeof mockOptions.enableCallHistory !== 'boolean') {
|
if ('enableCallHistory' in mockOptions && typeof mockOptions.enableCallHistory !== 'boolean') {
|
||||||
throw new InvalidArgumentError('options.enableCallHistory must to be a boolean')
|
throw new InvalidArgumentError('options.enableCallHistory must to be a boolean')
|
||||||
|
}
|
||||||
|
|
||||||
|
if ('acceptNonStandardSearchParameters' in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== 'boolean') {
|
||||||
|
throw new InvalidArgumentError('options.acceptNonStandardSearchParameters must to be a boolean')
|
||||||
|
}
|
||||||
|
|
||||||
|
return mockOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('acceptNonStandardSearchParameters' in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== 'boolean') {
|
|
||||||
throw new InvalidArgumentError('options.acceptNonStandardSearchParameters must to be a boolean')
|
|
||||||
}
|
|
||||||
|
|
||||||
if ('ignoreTrailingSlash' in mockOptions && typeof mockOptions.ignoreTrailingSlash !== 'boolean') {
|
|
||||||
throw new InvalidArgumentError('options.ignoreTrailingSlash must to be a boolean')
|
|
||||||
}
|
|
||||||
|
|
||||||
return mockOptions
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -100921,21 +100556,33 @@ module.exports = {
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
const IMF_DAYS = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']
|
||||||
|
const IMF_SPACES = [4, 7, 11, 16, 25]
|
||||||
|
const IMF_MONTHS = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']
|
||||||
|
const IMF_COLONS = [19, 22]
|
||||||
|
|
||||||
|
const ASCTIME_SPACES = [3, 7, 10, 19]
|
||||||
|
|
||||||
|
const RFC850_DAYS = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://www.rfc-editor.org/rfc/rfc9110.html#name-date-time-formats
|
* @see https://www.rfc-editor.org/rfc/rfc9110.html#name-date-time-formats
|
||||||
*
|
*
|
||||||
* @param {string} date
|
* @param {string} date
|
||||||
|
* @param {Date} [now]
|
||||||
* @returns {Date | undefined}
|
* @returns {Date | undefined}
|
||||||
*/
|
*/
|
||||||
function parseHttpDate (date) {
|
function parseHttpDate (date, now) {
|
||||||
// Sun, 06 Nov 1994 08:49:37 GMT ; IMF-fixdate
|
// Sun, 06 Nov 1994 08:49:37 GMT ; IMF-fixdate
|
||||||
// Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
|
// Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
|
||||||
// Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
|
// Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
|
||||||
|
|
||||||
|
date = date.toLowerCase()
|
||||||
|
|
||||||
switch (date[3]) {
|
switch (date[3]) {
|
||||||
case ',': return parseImfDate(date)
|
case ',': return parseImfDate(date)
|
||||||
case ' ': return parseAscTimeDate(date)
|
case ' ': return parseAscTimeDate(date)
|
||||||
default: return parseRfc850Date(date)
|
default: return parseRfc850Date(date, now)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100946,207 +100593,69 @@ function parseHttpDate (date) {
|
|||||||
* @returns {Date | undefined}
|
* @returns {Date | undefined}
|
||||||
*/
|
*/
|
||||||
function parseImfDate (date) {
|
function parseImfDate (date) {
|
||||||
if (
|
if (date.length !== 29) {
|
||||||
date.length !== 29 ||
|
|
||||||
date[4] !== ' ' ||
|
|
||||||
date[7] !== ' ' ||
|
|
||||||
date[11] !== ' ' ||
|
|
||||||
date[16] !== ' ' ||
|
|
||||||
date[19] !== ':' ||
|
|
||||||
date[22] !== ':' ||
|
|
||||||
date[25] !== ' ' ||
|
|
||||||
date[26] !== 'G' ||
|
|
||||||
date[27] !== 'M' ||
|
|
||||||
date[28] !== 'T'
|
|
||||||
) {
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
let weekday = -1
|
if (!date.endsWith('gmt')) {
|
||||||
if (date[0] === 'S' && date[1] === 'u' && date[2] === 'n') { // Sunday
|
// Unsupported timezone
|
||||||
weekday = 0
|
|
||||||
} else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n') { // Monday
|
|
||||||
weekday = 1
|
|
||||||
} else if (date[0] === 'T' && date[1] === 'u' && date[2] === 'e') { // Tuesday
|
|
||||||
weekday = 2
|
|
||||||
} else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd') { // Wednesday
|
|
||||||
weekday = 3
|
|
||||||
} else if (date[0] === 'T' && date[1] === 'h' && date[2] === 'u') { // Thursday
|
|
||||||
weekday = 4
|
|
||||||
} else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i') { // Friday
|
|
||||||
weekday = 5
|
|
||||||
} else if (date[0] === 'S' && date[1] === 'a' && date[2] === 't') { // Saturday
|
|
||||||
weekday = 6
|
|
||||||
} else {
|
|
||||||
return undefined // Not a valid day of the week
|
|
||||||
}
|
|
||||||
|
|
||||||
let day = 0
|
|
||||||
if (date[5] === '0') {
|
|
||||||
// Single digit day, e.g. "Sun Nov 6 08:49:37 1994"
|
|
||||||
const code = date.charCodeAt(6)
|
|
||||||
if (code < 49 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
day = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(5)
|
|
||||||
if (code1 < 49 || code1 > 51) {
|
|
||||||
return undefined // Not a digit between 1 and 3
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(6)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
|
||||||
|
|
||||||
let monthIdx = -1
|
|
||||||
if (
|
|
||||||
(date[8] === 'J' && date[9] === 'a' && date[10] === 'n')
|
|
||||||
) {
|
|
||||||
monthIdx = 0 // Jan
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'F' && date[9] === 'e' && date[10] === 'b')
|
|
||||||
) {
|
|
||||||
monthIdx = 1 // Feb
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'M' && date[9] === 'a')
|
|
||||||
) {
|
|
||||||
if (date[10] === 'r') {
|
|
||||||
monthIdx = 2 // Mar
|
|
||||||
} else if (date[10] === 'y') {
|
|
||||||
monthIdx = 4 // May
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'J')
|
|
||||||
) {
|
|
||||||
if (date[9] === 'a' && date[10] === 'n') {
|
|
||||||
monthIdx = 0 // Jan
|
|
||||||
} else if (date[9] === 'u') {
|
|
||||||
if (date[10] === 'n') {
|
|
||||||
monthIdx = 5 // Jun
|
|
||||||
} else if (date[10] === 'l') {
|
|
||||||
monthIdx = 6 // Jul
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'A')
|
|
||||||
) {
|
|
||||||
if (date[9] === 'p' && date[10] === 'r') {
|
|
||||||
monthIdx = 3 // Apr
|
|
||||||
} else if (date[9] === 'u' && date[10] === 'g') {
|
|
||||||
monthIdx = 7 // Aug
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'S' && date[9] === 'e' && date[10] === 'p')
|
|
||||||
) {
|
|
||||||
monthIdx = 8 // Sep
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'O' && date[9] === 'c' && date[10] === 't')
|
|
||||||
) {
|
|
||||||
monthIdx = 9 // Oct
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'N' && date[9] === 'o' && date[10] === 'v')
|
|
||||||
) {
|
|
||||||
monthIdx = 10 // Nov
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'D' && date[9] === 'e' && date[10] === 'c')
|
|
||||||
) {
|
|
||||||
monthIdx = 11 // Dec
|
|
||||||
} else {
|
|
||||||
// Not a valid month
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const yearDigit1 = date.charCodeAt(12)
|
for (const spaceInx of IMF_SPACES) {
|
||||||
if (yearDigit1 < 48 || yearDigit1 > 57) {
|
if (date[spaceInx] !== ' ') {
|
||||||
return undefined // Not a digit
|
return undefined
|
||||||
}
|
|
||||||
const yearDigit2 = date.charCodeAt(13)
|
|
||||||
if (yearDigit2 < 48 || yearDigit2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
const yearDigit3 = date.charCodeAt(14)
|
|
||||||
if (yearDigit3 < 48 || yearDigit3 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
const yearDigit4 = date.charCodeAt(15)
|
|
||||||
if (yearDigit4 < 48 || yearDigit4 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48)
|
|
||||||
|
|
||||||
let hour = 0
|
|
||||||
if (date[17] === '0') {
|
|
||||||
const code = date.charCodeAt(18)
|
|
||||||
if (code < 48 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
}
|
||||||
hour = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(17)
|
|
||||||
if (code1 < 48 || code1 > 50) {
|
|
||||||
return undefined // Not a digit between 0 and 2
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(18)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
if (code1 === 50 && code2 > 51) {
|
|
||||||
return undefined // Hour cannot be greater than 23
|
|
||||||
}
|
|
||||||
hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let minute = 0
|
for (const colonIdx of IMF_COLONS) {
|
||||||
if (date[20] === '0') {
|
if (date[colonIdx] !== ':') {
|
||||||
const code = date.charCodeAt(21)
|
return undefined
|
||||||
if (code < 48 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
}
|
||||||
minute = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(20)
|
|
||||||
if (code1 < 48 || code1 > 53) {
|
|
||||||
return undefined // Not a digit between 0 and 5
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(21)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let second = 0
|
const dayName = date.substring(0, 3)
|
||||||
if (date[23] === '0') {
|
if (!IMF_DAYS.includes(dayName)) {
|
||||||
const code = date.charCodeAt(24)
|
return undefined
|
||||||
if (code < 48 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
second = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(23)
|
|
||||||
if (code1 < 48 || code1 > 53) {
|
|
||||||
return undefined // Not a digit between 0 and 5
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(24)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
const dayString = date.substring(5, 7)
|
||||||
return result.getUTCDay() === weekday ? result : undefined
|
const day = Number.parseInt(dayString)
|
||||||
|
if (isNaN(day) || (day < 10 && dayString[0] !== '0')) {
|
||||||
|
// Not a number, 0, or it's less than 10 and didn't start with a 0
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const month = date.substring(8, 11)
|
||||||
|
const monthIdx = IMF_MONTHS.indexOf(month)
|
||||||
|
if (monthIdx === -1) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const year = Number.parseInt(date.substring(12, 16))
|
||||||
|
if (isNaN(year)) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const hourString = date.substring(17, 19)
|
||||||
|
const hour = Number.parseInt(hourString)
|
||||||
|
if (isNaN(hour) || (hour < 10 && hourString[0] !== '0')) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const minuteString = date.substring(20, 22)
|
||||||
|
const minute = Number.parseInt(minuteString)
|
||||||
|
if (isNaN(minute) || (minute < 10 && minuteString[0] !== '0')) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const secondString = date.substring(23, 25)
|
||||||
|
const second = Number.parseInt(secondString)
|
||||||
|
if (isNaN(second) || (second < 10 && secondString[0] !== '0')) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -101158,415 +100667,147 @@ function parseImfDate (date) {
|
|||||||
function parseAscTimeDate (date) {
|
function parseAscTimeDate (date) {
|
||||||
// This is assumed to be in UTC
|
// This is assumed to be in UTC
|
||||||
|
|
||||||
if (
|
if (date.length !== 24) {
|
||||||
date.length !== 24 ||
|
|
||||||
date[7] !== ' ' ||
|
|
||||||
date[10] !== ' ' ||
|
|
||||||
date[19] !== ' '
|
|
||||||
) {
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
let weekday = -1
|
for (const spaceIdx of ASCTIME_SPACES) {
|
||||||
if (date[0] === 'S' && date[1] === 'u' && date[2] === 'n') { // Sunday
|
if (date[spaceIdx] !== ' ') {
|
||||||
weekday = 0
|
return undefined
|
||||||
} else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n') { // Monday
|
}
|
||||||
weekday = 1
|
|
||||||
} else if (date[0] === 'T' && date[1] === 'u' && date[2] === 'e') { // Tuesday
|
|
||||||
weekday = 2
|
|
||||||
} else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd') { // Wednesday
|
|
||||||
weekday = 3
|
|
||||||
} else if (date[0] === 'T' && date[1] === 'h' && date[2] === 'u') { // Thursday
|
|
||||||
weekday = 4
|
|
||||||
} else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i') { // Friday
|
|
||||||
weekday = 5
|
|
||||||
} else if (date[0] === 'S' && date[1] === 'a' && date[2] === 't') { // Saturday
|
|
||||||
weekday = 6
|
|
||||||
} else {
|
|
||||||
return undefined // Not a valid day of the week
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let monthIdx = -1
|
const dayName = date.substring(0, 3)
|
||||||
if (
|
if (!IMF_DAYS.includes(dayName)) {
|
||||||
(date[4] === 'J' && date[5] === 'a' && date[6] === 'n')
|
|
||||||
) {
|
|
||||||
monthIdx = 0 // Jan
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'F' && date[5] === 'e' && date[6] === 'b')
|
|
||||||
) {
|
|
||||||
monthIdx = 1 // Feb
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'M' && date[5] === 'a')
|
|
||||||
) {
|
|
||||||
if (date[6] === 'r') {
|
|
||||||
monthIdx = 2 // Mar
|
|
||||||
} else if (date[6] === 'y') {
|
|
||||||
monthIdx = 4 // May
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'J')
|
|
||||||
) {
|
|
||||||
if (date[5] === 'a' && date[6] === 'n') {
|
|
||||||
monthIdx = 0 // Jan
|
|
||||||
} else if (date[5] === 'u') {
|
|
||||||
if (date[6] === 'n') {
|
|
||||||
monthIdx = 5 // Jun
|
|
||||||
} else if (date[6] === 'l') {
|
|
||||||
monthIdx = 6 // Jul
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'A')
|
|
||||||
) {
|
|
||||||
if (date[5] === 'p' && date[6] === 'r') {
|
|
||||||
monthIdx = 3 // Apr
|
|
||||||
} else if (date[5] === 'u' && date[6] === 'g') {
|
|
||||||
monthIdx = 7 // Aug
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'S' && date[5] === 'e' && date[6] === 'p')
|
|
||||||
) {
|
|
||||||
monthIdx = 8 // Sep
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'O' && date[5] === 'c' && date[6] === 't')
|
|
||||||
) {
|
|
||||||
monthIdx = 9 // Oct
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'N' && date[5] === 'o' && date[6] === 'v')
|
|
||||||
) {
|
|
||||||
monthIdx = 10 // Nov
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'D' && date[5] === 'e' && date[6] === 'c')
|
|
||||||
) {
|
|
||||||
monthIdx = 11 // Dec
|
|
||||||
} else {
|
|
||||||
// Not a valid month
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
let day = 0
|
const month = date.substring(4, 7)
|
||||||
if (date[8] === ' ') {
|
const monthIdx = IMF_MONTHS.indexOf(month)
|
||||||
// Single digit day, e.g. "Sun Nov 6 08:49:37 1994"
|
if (monthIdx === -1) {
|
||||||
const code = date.charCodeAt(9)
|
return undefined
|
||||||
if (code < 49 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
day = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(8)
|
|
||||||
if (code1 < 49 || code1 > 51) {
|
|
||||||
return undefined // Not a digit between 1 and 3
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(9)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let hour = 0
|
const dayString = date.substring(8, 10)
|
||||||
if (date[11] === '0') {
|
const day = Number.parseInt(dayString)
|
||||||
const code = date.charCodeAt(12)
|
if (isNaN(day) || (day < 10 && dayString[0] !== ' ')) {
|
||||||
if (code < 48 || code > 57) {
|
return undefined
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
hour = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(11)
|
|
||||||
if (code1 < 48 || code1 > 50) {
|
|
||||||
return undefined // Not a digit between 0 and 2
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(12)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
if (code1 === 50 && code2 > 51) {
|
|
||||||
return undefined // Hour cannot be greater than 23
|
|
||||||
}
|
|
||||||
hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let minute = 0
|
const hourString = date.substring(11, 13)
|
||||||
if (date[14] === '0') {
|
const hour = Number.parseInt(hourString)
|
||||||
const code = date.charCodeAt(15)
|
if (isNaN(hour) || (hour < 10 && hourString[0] !== '0')) {
|
||||||
if (code < 48 || code > 57) {
|
return undefined
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
minute = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(14)
|
|
||||||
if (code1 < 48 || code1 > 53) {
|
|
||||||
return undefined // Not a digit between 0 and 5
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(15)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let second = 0
|
const minuteString = date.substring(14, 16)
|
||||||
if (date[17] === '0') {
|
const minute = Number.parseInt(minuteString)
|
||||||
const code = date.charCodeAt(18)
|
if (isNaN(minute) || (minute < 10 && minuteString[0] !== '0')) {
|
||||||
if (code < 48 || code > 57) {
|
return undefined
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
second = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(17)
|
|
||||||
if (code1 < 48 || code1 > 53) {
|
|
||||||
return undefined // Not a digit between 0 and 5
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(18)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const yearDigit1 = date.charCodeAt(20)
|
const secondString = date.substring(17, 19)
|
||||||
if (yearDigit1 < 48 || yearDigit1 > 57) {
|
const second = Number.parseInt(secondString)
|
||||||
return undefined // Not a digit
|
if (isNaN(second) || (second < 10 && secondString[0] !== '0')) {
|
||||||
|
return undefined
|
||||||
}
|
}
|
||||||
const yearDigit2 = date.charCodeAt(21)
|
|
||||||
if (yearDigit2 < 48 || yearDigit2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
const yearDigit3 = date.charCodeAt(22)
|
|
||||||
if (yearDigit3 < 48 || yearDigit3 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
const yearDigit4 = date.charCodeAt(23)
|
|
||||||
if (yearDigit4 < 48 || yearDigit4 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48)
|
|
||||||
|
|
||||||
const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
const year = Number.parseInt(date.substring(20, 24))
|
||||||
return result.getUTCDay() === weekday ? result : undefined
|
if (isNaN(year)) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats
|
* @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats
|
||||||
*
|
*
|
||||||
* @param {string} date
|
* @param {string} date
|
||||||
|
* @param {Date} [now]
|
||||||
* @returns {Date | undefined}
|
* @returns {Date | undefined}
|
||||||
*/
|
*/
|
||||||
function parseRfc850Date (date) {
|
function parseRfc850Date (date, now = new Date()) {
|
||||||
let commaIndex = -1
|
if (!date.endsWith('gmt')) {
|
||||||
|
// Unsupported timezone
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
let weekday = -1
|
const commaIndex = date.indexOf(',')
|
||||||
if (date[0] === 'S') {
|
if (commaIndex === -1) {
|
||||||
if (date[1] === 'u' && date[2] === 'n' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {
|
return undefined
|
||||||
weekday = 0 // Sunday
|
}
|
||||||
commaIndex = 6
|
|
||||||
} else if (date[1] === 'a' && date[2] === 't' && date[3] === 'u' && date[4] === 'r' && date[5] === 'd' && date[6] === 'a' && date[7] === 'y') {
|
if ((date.length - commaIndex - 1) !== 23) {
|
||||||
weekday = 6 // Saturday
|
return undefined
|
||||||
commaIndex = 8
|
}
|
||||||
}
|
|
||||||
} else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {
|
const dayName = date.substring(0, commaIndex)
|
||||||
weekday = 1 // Monday
|
if (!RFC850_DAYS.includes(dayName)) {
|
||||||
commaIndex = 6
|
|
||||||
} else if (date[0] === 'T') {
|
|
||||||
if (date[1] === 'u' && date[2] === 'e' && date[3] === 's' && date[4] === 'd' && date[5] === 'a' && date[6] === 'y') {
|
|
||||||
weekday = 2 // Tuesday
|
|
||||||
commaIndex = 7
|
|
||||||
} else if (date[1] === 'h' && date[2] === 'u' && date[3] === 'r' && date[4] === 's' && date[5] === 'd' && date[6] === 'a' && date[7] === 'y') {
|
|
||||||
weekday = 4 // Thursday
|
|
||||||
commaIndex = 8
|
|
||||||
}
|
|
||||||
} else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd' && date[3] === 'n' && date[4] === 'e' && date[5] === 's' && date[6] === 'd' && date[7] === 'a' && date[8] === 'y') {
|
|
||||||
weekday = 3 // Wednesday
|
|
||||||
commaIndex = 9
|
|
||||||
} else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {
|
|
||||||
weekday = 5 // Friday
|
|
||||||
commaIndex = 6
|
|
||||||
} else {
|
|
||||||
// Not a valid day name
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
date[commaIndex] !== ',' ||
|
|
||||||
(date.length - commaIndex - 1) !== 23 ||
|
|
||||||
date[commaIndex + 1] !== ' ' ||
|
date[commaIndex + 1] !== ' ' ||
|
||||||
date[commaIndex + 4] !== '-' ||
|
date[commaIndex + 4] !== '-' ||
|
||||||
date[commaIndex + 8] !== '-' ||
|
date[commaIndex + 8] !== '-' ||
|
||||||
date[commaIndex + 11] !== ' ' ||
|
date[commaIndex + 11] !== ' ' ||
|
||||||
date[commaIndex + 14] !== ':' ||
|
date[commaIndex + 14] !== ':' ||
|
||||||
date[commaIndex + 17] !== ':' ||
|
date[commaIndex + 17] !== ':' ||
|
||||||
date[commaIndex + 20] !== ' ' ||
|
date[commaIndex + 20] !== ' '
|
||||||
date[commaIndex + 21] !== 'G' ||
|
|
||||||
date[commaIndex + 22] !== 'M' ||
|
|
||||||
date[commaIndex + 23] !== 'T'
|
|
||||||
) {
|
) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
let day = 0
|
const dayString = date.substring(commaIndex + 2, commaIndex + 4)
|
||||||
if (date[commaIndex + 2] === '0') {
|
const day = Number.parseInt(dayString)
|
||||||
// Single digit day, e.g. "Sun Nov 6 08:49:37 1994"
|
if (isNaN(day) || (day < 10 && dayString[0] !== '0')) {
|
||||||
const code = date.charCodeAt(commaIndex + 3)
|
// Not a number, or it's less than 10 and didn't start with a 0
|
||||||
if (code < 49 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
day = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(commaIndex + 2)
|
|
||||||
if (code1 < 49 || code1 > 51) {
|
|
||||||
return undefined // Not a digit between 1 and 3
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(commaIndex + 3)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
|
||||||
|
|
||||||
let monthIdx = -1
|
|
||||||
if (
|
|
||||||
(date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'n')
|
|
||||||
) {
|
|
||||||
monthIdx = 0 // Jan
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'F' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'b')
|
|
||||||
) {
|
|
||||||
monthIdx = 1 // Feb
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'M' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'r')
|
|
||||||
) {
|
|
||||||
monthIdx = 2 // Mar
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'A' && date[commaIndex + 6] === 'p' && date[commaIndex + 7] === 'r')
|
|
||||||
) {
|
|
||||||
monthIdx = 3 // Apr
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'M' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'y')
|
|
||||||
) {
|
|
||||||
monthIdx = 4 // May
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'n')
|
|
||||||
) {
|
|
||||||
monthIdx = 5 // Jun
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'l')
|
|
||||||
) {
|
|
||||||
monthIdx = 6 // Jul
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'A' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'g')
|
|
||||||
) {
|
|
||||||
monthIdx = 7 // Aug
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'S' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'p')
|
|
||||||
) {
|
|
||||||
monthIdx = 8 // Sep
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'O' && date[commaIndex + 6] === 'c' && date[commaIndex + 7] === 't')
|
|
||||||
) {
|
|
||||||
monthIdx = 9 // Oct
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'N' && date[commaIndex + 6] === 'o' && date[commaIndex + 7] === 'v')
|
|
||||||
) {
|
|
||||||
monthIdx = 10 // Nov
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'D' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'c')
|
|
||||||
) {
|
|
||||||
monthIdx = 11 // Dec
|
|
||||||
} else {
|
|
||||||
// Not a valid month
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const yearDigit1 = date.charCodeAt(commaIndex + 9)
|
const month = date.substring(commaIndex + 5, commaIndex + 8)
|
||||||
if (yearDigit1 < 48 || yearDigit1 > 57) {
|
const monthIdx = IMF_MONTHS.indexOf(month)
|
||||||
return undefined // Not a digit
|
if (monthIdx === -1) {
|
||||||
}
|
return undefined
|
||||||
const yearDigit2 = date.charCodeAt(commaIndex + 10)
|
|
||||||
if (yearDigit2 < 48 || yearDigit2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let year = (yearDigit1 - 48) * 10 + (yearDigit2 - 48) // Convert ASCII codes to number
|
// As of this point year is just the decade (i.e. 94)
|
||||||
|
let year = Number.parseInt(date.substring(commaIndex + 9, commaIndex + 11))
|
||||||
|
if (isNaN(year)) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
// RFC 6265 states that the year is in the range 1970-2069.
|
const currentYear = now.getUTCFullYear()
|
||||||
// @see https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.1
|
const currentDecade = currentYear % 100
|
||||||
//
|
const currentCentury = Math.floor(currentYear / 100)
|
||||||
// 3. If the year-value is greater than or equal to 70 and less than or
|
|
||||||
// equal to 99, increment the year-value by 1900.
|
|
||||||
// 4. If the year-value is greater than or equal to 0 and less than or
|
|
||||||
// equal to 69, increment the year-value by 2000.
|
|
||||||
year += year < 70 ? 2000 : 1900
|
|
||||||
|
|
||||||
let hour = 0
|
if (year > currentDecade && year - currentDecade >= 50) {
|
||||||
if (date[commaIndex + 12] === '0') {
|
// Over 50 years in future, go to previous century
|
||||||
const code = date.charCodeAt(commaIndex + 13)
|
year += (currentCentury - 1) * 100
|
||||||
if (code < 48 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
hour = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
} else {
|
||||||
const code1 = date.charCodeAt(commaIndex + 12)
|
year += currentCentury * 100
|
||||||
if (code1 < 48 || code1 > 50) {
|
|
||||||
return undefined // Not a digit between 0 and 2
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(commaIndex + 13)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
if (code1 === 50 && code2 > 51) {
|
|
||||||
return undefined // Hour cannot be greater than 23
|
|
||||||
}
|
|
||||||
hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let minute = 0
|
const hourString = date.substring(commaIndex + 12, commaIndex + 14)
|
||||||
if (date[commaIndex + 15] === '0') {
|
const hour = Number.parseInt(hourString)
|
||||||
const code = date.charCodeAt(commaIndex + 16)
|
if (isNaN(hour) || (hour < 10 && hourString[0] !== '0')) {
|
||||||
if (code < 48 || code > 57) {
|
return undefined
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
minute = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(commaIndex + 15)
|
|
||||||
if (code1 < 48 || code1 > 53) {
|
|
||||||
return undefined // Not a digit between 0 and 5
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(commaIndex + 16)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let second = 0
|
const minuteString = date.substring(commaIndex + 15, commaIndex + 17)
|
||||||
if (date[commaIndex + 18] === '0') {
|
const minute = Number.parseInt(minuteString)
|
||||||
const code = date.charCodeAt(commaIndex + 19)
|
if (isNaN(minute) || (minute < 10 && minuteString[0] !== '0')) {
|
||||||
if (code < 48 || code > 57) {
|
return undefined
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
second = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(commaIndex + 18)
|
|
||||||
if (code1 < 48 || code1 > 53) {
|
|
||||||
return undefined // Not a digit between 0 and 5
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(commaIndex + 19)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
const secondString = date.substring(commaIndex + 18, commaIndex + 20)
|
||||||
return result.getUTCDay() === weekday ? result : undefined
|
const second = Number.parseInt(secondString)
|
||||||
|
if (isNaN(second) || (second < 10 && secondString[0] !== '0')) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -103382,7 +102623,7 @@ webidl.converters.Cookie = webidl.dictionaryConverter([
|
|||||||
{
|
{
|
||||||
converter: webidl.sequenceConverter(webidl.converters.DOMString),
|
converter: webidl.sequenceConverter(webidl.converters.DOMString),
|
||||||
key: 'unparsed',
|
key: 'unparsed',
|
||||||
defaultValue: () => []
|
defaultValue: () => new Array(0)
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -104259,7 +103500,7 @@ class EventSourceStream extends Transform {
|
|||||||
this.buffer = this.buffer.subarray(this.pos + 1)
|
this.buffer = this.buffer.subarray(this.pos + 1)
|
||||||
this.pos = 0
|
this.pos = 0
|
||||||
if (
|
if (
|
||||||
this.event.data !== undefined || this.event.event || this.event.id !== undefined || this.event.retry) {
|
this.event.data !== undefined || this.event.event || this.event.id || this.event.retry) {
|
||||||
this.processEvent(this.event)
|
this.processEvent(this.event)
|
||||||
}
|
}
|
||||||
this.clearEvent()
|
this.clearEvent()
|
||||||
@@ -104390,7 +103631,7 @@ class EventSourceStream extends Transform {
|
|||||||
this.state.reconnectionTime = parseInt(event.retry, 10)
|
this.state.reconnectionTime = parseInt(event.retry, 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.id !== undefined && isValidLastEventId(event.id)) {
|
if (event.id && isValidLastEventId(event.id)) {
|
||||||
this.state.lastEventId = event.id
|
this.state.lastEventId = event.id
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104438,6 +103679,7 @@ const { EventSourceStream } = __nccwpck_require__(24031)
|
|||||||
const { parseMIMEType } = __nccwpck_require__(51900)
|
const { parseMIMEType } = __nccwpck_require__(51900)
|
||||||
const { createFastMessageEvent } = __nccwpck_require__(15188)
|
const { createFastMessageEvent } = __nccwpck_require__(15188)
|
||||||
const { isNetworkError } = __nccwpck_require__(99051)
|
const { isNetworkError } = __nccwpck_require__(99051)
|
||||||
|
const { delay } = __nccwpck_require__(94811)
|
||||||
const { kEnumerableProperty } = __nccwpck_require__(3440)
|
const { kEnumerableProperty } = __nccwpck_require__(3440)
|
||||||
const { environmentSettingsObject } = __nccwpck_require__(73168)
|
const { environmentSettingsObject } = __nccwpck_require__(73168)
|
||||||
|
|
||||||
@@ -104747,9 +103989,9 @@ class EventSource extends EventTarget {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model
|
* @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model
|
||||||
* @returns {void}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
#reconnect () {
|
async #reconnect () {
|
||||||
// When a user agent is to reestablish the connection, the user agent must
|
// When a user agent is to reestablish the connection, the user agent must
|
||||||
// run the following steps. These steps are run in parallel, not as part of
|
// run the following steps. These steps are run in parallel, not as part of
|
||||||
// a task. (The tasks that it queues, of course, are run like normal tasks
|
// a task. (The tasks that it queues, of course, are run like normal tasks
|
||||||
@@ -104767,27 +104009,27 @@ class EventSource extends EventTarget {
|
|||||||
this.dispatchEvent(new Event('error'))
|
this.dispatchEvent(new Event('error'))
|
||||||
|
|
||||||
// 2. Wait a delay equal to the reconnection time of the event source.
|
// 2. Wait a delay equal to the reconnection time of the event source.
|
||||||
setTimeout(() => {
|
await delay(this.#state.reconnectionTime)
|
||||||
// 5. Queue a task to run the following steps:
|
|
||||||
|
|
||||||
// 1. If the EventSource object's readyState attribute is not set to
|
// 5. Queue a task to run the following steps:
|
||||||
// CONNECTING, then return.
|
|
||||||
if (this.#readyState !== CONNECTING) return
|
|
||||||
|
|
||||||
// 2. Let request be the EventSource object's request.
|
// 1. If the EventSource object's readyState attribute is not set to
|
||||||
// 3. If the EventSource object's last event ID string is not the empty
|
// CONNECTING, then return.
|
||||||
// string, then:
|
if (this.#readyState !== CONNECTING) return
|
||||||
// 1. Let lastEventIDValue be the EventSource object's last event ID
|
|
||||||
// string, encoded as UTF-8.
|
|
||||||
// 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header
|
|
||||||
// list.
|
|
||||||
if (this.#state.lastEventId.length) {
|
|
||||||
this.#request.headersList.set('last-event-id', this.#state.lastEventId, true)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section.
|
// 2. Let request be the EventSource object's request.
|
||||||
this.#connect()
|
// 3. If the EventSource object's last event ID string is not the empty
|
||||||
}, this.#state.reconnectionTime)?.unref()
|
// string, then:
|
||||||
|
// 1. Let lastEventIDValue be the EventSource object's last event ID
|
||||||
|
// string, encoded as UTF-8.
|
||||||
|
// 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header
|
||||||
|
// list.
|
||||||
|
if (this.#state.lastEventId.length) {
|
||||||
|
this.#request.headersList.set('last-event-id', this.#state.lastEventId, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section.
|
||||||
|
this.#connect()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -104812,11 +104054,9 @@ class EventSource extends EventTarget {
|
|||||||
this.removeEventListener('open', this.#events.open)
|
this.removeEventListener('open', this.#events.open)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('open', listener)
|
|
||||||
this.#events.open = fn
|
this.#events.open = fn
|
||||||
|
this.addEventListener('open', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.open = null
|
this.#events.open = null
|
||||||
}
|
}
|
||||||
@@ -104831,11 +104071,9 @@ class EventSource extends EventTarget {
|
|||||||
this.removeEventListener('message', this.#events.message)
|
this.removeEventListener('message', this.#events.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('message', listener)
|
|
||||||
this.#events.message = fn
|
this.#events.message = fn
|
||||||
|
this.addEventListener('message', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.message = null
|
this.#events.message = null
|
||||||
}
|
}
|
||||||
@@ -104850,11 +104088,9 @@ class EventSource extends EventTarget {
|
|||||||
this.removeEventListener('error', this.#events.error)
|
this.removeEventListener('error', this.#events.error)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('error', listener)
|
|
||||||
this.#events.error = fn
|
this.#events.error = fn
|
||||||
|
this.addEventListener('error', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.error = null
|
this.#events.error = null
|
||||||
}
|
}
|
||||||
@@ -104962,9 +104198,17 @@ function isASCIINumber (value) {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/nodejs/undici/issues/2664
|
||||||
|
function delay (ms) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
setTimeout(resolve, ms)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isValidLastEventId,
|
isValidLastEventId,
|
||||||
isASCIINumber
|
isASCIINumber,
|
||||||
|
delay
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -105036,7 +104280,7 @@ function extractBody (object, keepalive = false) {
|
|||||||
// 4. Otherwise, set stream to a new ReadableStream object, and set
|
// 4. Otherwise, set stream to a new ReadableStream object, and set
|
||||||
// up stream with byte reading support.
|
// up stream with byte reading support.
|
||||||
stream = new ReadableStream({
|
stream = new ReadableStream({
|
||||||
pull (controller) {
|
async pull (controller) {
|
||||||
const buffer = typeof source === 'string' ? textEncoder.encode(source) : source
|
const buffer = typeof source === 'string' ? textEncoder.encode(source) : source
|
||||||
|
|
||||||
if (buffer.byteLength) {
|
if (buffer.byteLength) {
|
||||||
@@ -105086,10 +104330,16 @@ function extractBody (object, keepalive = false) {
|
|||||||
|
|
||||||
// Set type to `application/x-www-form-urlencoded;charset=UTF-8`.
|
// Set type to `application/x-www-form-urlencoded;charset=UTF-8`.
|
||||||
type = 'application/x-www-form-urlencoded;charset=UTF-8'
|
type = 'application/x-www-form-urlencoded;charset=UTF-8'
|
||||||
} else if (webidl.is.BufferSource(object)) {
|
} else if (isArrayBuffer(object)) {
|
||||||
source = isArrayBuffer(object)
|
// BufferSource/ArrayBuffer
|
||||||
? new Uint8Array(object.slice())
|
|
||||||
: new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
|
// Set source to a copy of the bytes held by object.
|
||||||
|
source = new Uint8Array(object.slice())
|
||||||
|
} else if (ArrayBuffer.isView(object)) {
|
||||||
|
// BufferSource/ArrayBufferView
|
||||||
|
|
||||||
|
// Set source to a copy of the bytes held by object.
|
||||||
|
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
|
||||||
} else if (webidl.is.FormData(object)) {
|
} else if (webidl.is.FormData(object)) {
|
||||||
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
|
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
|
||||||
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
|
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
|
||||||
@@ -105290,6 +104540,12 @@ function cloneBody (body) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function throwIfAborted (state) {
|
||||||
|
if (state.aborted) {
|
||||||
|
throw new DOMException('The operation was aborted.', 'AbortError')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function bodyMixinMethods (instance, getInternalState) {
|
function bodyMixinMethods (instance, getInternalState) {
|
||||||
const methods = {
|
const methods = {
|
||||||
blob () {
|
blob () {
|
||||||
@@ -105407,30 +104663,24 @@ function mixinBody (prototype, getInternalState) {
|
|||||||
* @param {any} instance
|
* @param {any} instance
|
||||||
* @param {(target: any) => any} getInternalState
|
* @param {(target: any) => any} getInternalState
|
||||||
*/
|
*/
|
||||||
function consumeBody (object, convertBytesToJSValue, instance, getInternalState) {
|
async function consumeBody (object, convertBytesToJSValue, instance, getInternalState) {
|
||||||
try {
|
webidl.brandCheck(object, instance)
|
||||||
webidl.brandCheck(object, instance)
|
|
||||||
} catch (e) {
|
|
||||||
return Promise.reject(e)
|
|
||||||
}
|
|
||||||
|
|
||||||
const state = getInternalState(object)
|
const state = getInternalState(object)
|
||||||
|
|
||||||
// 1. If object is unusable, then return a promise rejected
|
// 1. If object is unusable, then return a promise rejected
|
||||||
// with a TypeError.
|
// with a TypeError.
|
||||||
if (bodyUnusable(state)) {
|
if (bodyUnusable(state)) {
|
||||||
return Promise.reject(new TypeError('Body is unusable: Body has already been read'))
|
throw new TypeError('Body is unusable: Body has already been read')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.aborted) {
|
throwIfAborted(state)
|
||||||
return Promise.reject(new DOMException('The operation was aborted.', 'AbortError'))
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. Let promise be a new promise.
|
// 2. Let promise be a new promise.
|
||||||
const promise = createDeferredPromise()
|
const promise = createDeferredPromise()
|
||||||
|
|
||||||
// 3. Let errorSteps given error be to reject promise with error.
|
// 3. Let errorSteps given error be to reject promise with error.
|
||||||
const errorSteps = promise.reject
|
const errorSteps = (error) => promise.reject(error)
|
||||||
|
|
||||||
// 4. Let successSteps given a byte sequence data be to resolve
|
// 4. Let successSteps given a byte sequence data be to resolve
|
||||||
// promise with the result of running convertBytesToJSValue
|
// promise with the result of running convertBytesToJSValue
|
||||||
@@ -108023,9 +107273,6 @@ const { webidl } = __nccwpck_require__(47879)
|
|||||||
const { STATUS_CODES } = __nccwpck_require__(37067)
|
const { STATUS_CODES } = __nccwpck_require__(37067)
|
||||||
const { bytesMatch } = __nccwpck_require__(45082)
|
const { bytesMatch } = __nccwpck_require__(45082)
|
||||||
const { createDeferredPromise } = __nccwpck_require__(56436)
|
const { createDeferredPromise } = __nccwpck_require__(56436)
|
||||||
|
|
||||||
const hasZstd = typeof zlib.createZstdDecompress === 'function'
|
|
||||||
|
|
||||||
const GET_OR_HEAD = ['GET', 'HEAD']
|
const GET_OR_HEAD = ['GET', 'HEAD']
|
||||||
|
|
||||||
const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined'
|
const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined'
|
||||||
@@ -110067,29 +109314,33 @@ async function httpNetworkFetch (
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @type {string[]} */
|
||||||
|
let codings = []
|
||||||
|
|
||||||
const headersList = new HeadersList()
|
const headersList = new HeadersList()
|
||||||
|
|
||||||
for (let i = 0; i < rawHeaders.length; i += 2) {
|
for (let i = 0; i < rawHeaders.length; i += 2) {
|
||||||
headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true)
|
headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true)
|
||||||
}
|
}
|
||||||
|
const contentEncoding = headersList.get('content-encoding', true)
|
||||||
|
if (contentEncoding) {
|
||||||
|
// https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1
|
||||||
|
// "All content-coding values are case-insensitive..."
|
||||||
|
codings = contentEncoding.toLowerCase().split(',').map((x) => x.trim())
|
||||||
|
}
|
||||||
const location = headersList.get('location', true)
|
const location = headersList.get('location', true)
|
||||||
|
|
||||||
this.body = new Readable({ read: resume })
|
this.body = new Readable({ read: resume })
|
||||||
|
|
||||||
|
const decoders = []
|
||||||
|
|
||||||
const willFollow = location && request.redirect === 'follow' &&
|
const willFollow = location && request.redirect === 'follow' &&
|
||||||
redirectStatusSet.has(status)
|
redirectStatusSet.has(status)
|
||||||
|
|
||||||
const decoders = []
|
|
||||||
|
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding
|
||||||
if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) {
|
if (codings.length !== 0 && request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) {
|
||||||
// https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1
|
|
||||||
const contentEncoding = headersList.get('content-encoding', true)
|
|
||||||
// "All content-coding values are case-insensitive..."
|
|
||||||
/** @type {string[]} */
|
|
||||||
const codings = contentEncoding ? contentEncoding.toLowerCase().split(',') : []
|
|
||||||
for (let i = codings.length - 1; i >= 0; --i) {
|
for (let i = codings.length - 1; i >= 0; --i) {
|
||||||
const coding = codings[i].trim()
|
const coding = codings[i]
|
||||||
// https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2
|
// https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2
|
||||||
if (coding === 'x-gzip' || coding === 'gzip') {
|
if (coding === 'x-gzip' || coding === 'gzip') {
|
||||||
decoders.push(zlib.createGunzip({
|
decoders.push(zlib.createGunzip({
|
||||||
@@ -110110,8 +109361,8 @@ async function httpNetworkFetch (
|
|||||||
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
||||||
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
||||||
}))
|
}))
|
||||||
} else if (coding === 'zstd' && hasZstd) {
|
} else if (coding === 'zstd' && typeof zlib.createZstdDecompress === 'function') {
|
||||||
// Node.js v23.8.0+ and v22.15.0+ supports Zstandard
|
// Node.js v23.8.0+ and v22.15.0+ supports Zstandard
|
||||||
decoders.push(zlib.createZstdDecompress({
|
decoders.push(zlib.createZstdDecompress({
|
||||||
flush: zlib.constants.ZSTD_e_continue,
|
flush: zlib.constants.ZSTD_e_continue,
|
||||||
finishFlush: zlib.constants.ZSTD_e_end
|
finishFlush: zlib.constants.ZSTD_e_end
|
||||||
@@ -111365,6 +110616,8 @@ const { URLSerializer } = __nccwpck_require__(51900)
|
|||||||
const { kConstruct } = __nccwpck_require__(36443)
|
const { kConstruct } = __nccwpck_require__(36443)
|
||||||
const assert = __nccwpck_require__(34589)
|
const assert = __nccwpck_require__(34589)
|
||||||
|
|
||||||
|
const { isArrayBuffer } = nodeUtil.types
|
||||||
|
|
||||||
const textEncoder = new TextEncoder('utf-8')
|
const textEncoder = new TextEncoder('utf-8')
|
||||||
|
|
||||||
// https://fetch.spec.whatwg.org/#response-class
|
// https://fetch.spec.whatwg.org/#response-class
|
||||||
@@ -111460,7 +110713,7 @@ class Response {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (body !== null) {
|
if (body !== null) {
|
||||||
body = webidl.converters.BodyInit(body, 'Response', 'body')
|
body = webidl.converters.BodyInit(body)
|
||||||
}
|
}
|
||||||
|
|
||||||
init = webidl.converters.ResponseInit(init)
|
init = webidl.converters.ResponseInit(init)
|
||||||
@@ -111920,7 +111173,7 @@ webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) {
|
|||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
|
|
||||||
if (webidl.is.BufferSource(V)) {
|
if (ArrayBuffer.isView(V) || isArrayBuffer(V)) {
|
||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112492,8 +111745,8 @@ function determineRequestsReferrer (request) {
|
|||||||
if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {
|
if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {
|
||||||
return 'no-referrer'
|
return 'no-referrer'
|
||||||
}
|
}
|
||||||
// 2. Return referrerURL.
|
// 2. Return referrerOrigin
|
||||||
return referrerURL
|
return referrerOrigin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -112544,11 +111797,17 @@ function stripURLForReferrer (url, originOnly = false) {
|
|||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
|
|
||||||
const isPotentialleTrustworthyIPv4 = RegExp.prototype.test
|
const potentialleTrustworthyIPv4RegExp = new RegExp('^(?:' +
|
||||||
.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/)
|
'(?:127\\.)' +
|
||||||
|
'(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){2}' +
|
||||||
|
'(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9])' +
|
||||||
|
')$')
|
||||||
|
|
||||||
const isPotentiallyTrustworthyIPv6 = RegExp.prototype.test
|
const potentialleTrustworthyIPv6RegExp = new RegExp('^(?:' +
|
||||||
.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/)
|
'(?:(?:0{1,4}):){7}(?:(?:0{0,3}1))|' +
|
||||||
|
'(?:(?:0{1,4}):){1,6}(?::(?:0{0,3}1))|' +
|
||||||
|
'(?:::(?:0{0,3}1))|' +
|
||||||
|
')$')
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if host matches one of the CIDR notations 127.0.0.0/8 or ::1/128.
|
* Check if host matches one of the CIDR notations 127.0.0.0/8 or ::1/128.
|
||||||
@@ -112563,11 +111822,11 @@ function isOriginIPPotentiallyTrustworthy (origin) {
|
|||||||
if (origin[0] === '[' && origin[origin.length - 1] === ']') {
|
if (origin[0] === '[' && origin[origin.length - 1] === ']') {
|
||||||
origin = origin.slice(1, -1)
|
origin = origin.slice(1, -1)
|
||||||
}
|
}
|
||||||
return isPotentiallyTrustworthyIPv6(origin)
|
return potentialleTrustworthyIPv6RegExp.test(origin)
|
||||||
}
|
}
|
||||||
|
|
||||||
// IPv4
|
// IPv4
|
||||||
return isPotentialleTrustworthyIPv4(origin)
|
return potentialleTrustworthyIPv4RegExp.test(origin)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -114030,7 +113289,7 @@ webidl.util.TypeValueToString = function (o) {
|
|||||||
webidl.util.markAsUncloneable = markAsUncloneable || (() => {})
|
webidl.util.markAsUncloneable = markAsUncloneable || (() => {})
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
|
// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
|
||||||
webidl.util.ConvertToInt = function (V, bitLength, signedness, flags) {
|
webidl.util.ConvertToInt = function (V, bitLength, signedness, opts) {
|
||||||
let upperBound
|
let upperBound
|
||||||
let lowerBound
|
let lowerBound
|
||||||
|
|
||||||
@@ -114074,7 +113333,7 @@ webidl.util.ConvertToInt = function (V, bitLength, signedness, flags) {
|
|||||||
|
|
||||||
// 6. If the conversion is to an IDL type associated
|
// 6. If the conversion is to an IDL type associated
|
||||||
// with the [EnforceRange] extended attribute, then:
|
// with the [EnforceRange] extended attribute, then:
|
||||||
if (webidl.util.HasFlag(flags, webidl.attributes.EnforceRange)) {
|
if (opts?.enforceRange === true) {
|
||||||
// 1. If x is NaN, +∞, or −∞, then throw a TypeError.
|
// 1. If x is NaN, +∞, or −∞, then throw a TypeError.
|
||||||
if (
|
if (
|
||||||
Number.isNaN(x) ||
|
Number.isNaN(x) ||
|
||||||
@@ -114106,7 +113365,7 @@ webidl.util.ConvertToInt = function (V, bitLength, signedness, flags) {
|
|||||||
// 7. If x is not NaN and the conversion is to an IDL
|
// 7. If x is not NaN and the conversion is to an IDL
|
||||||
// type associated with the [Clamp] extended
|
// type associated with the [Clamp] extended
|
||||||
// attribute, then:
|
// attribute, then:
|
||||||
if (!Number.isNaN(x) && webidl.util.HasFlag(flags, webidl.attributes.Clamp)) {
|
if (!Number.isNaN(x) && opts?.clamp === true) {
|
||||||
// 1. Set x to min(max(x, lowerBound), upperBound).
|
// 1. Set x to min(max(x, lowerBound), upperBound).
|
||||||
x = Math.min(Math.max(x, lowerBound), upperBound)
|
x = Math.min(Math.max(x, lowerBound), upperBound)
|
||||||
|
|
||||||
@@ -114180,25 +113439,6 @@ webidl.util.Stringify = function (V) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
webidl.util.IsResizableArrayBuffer = function (V) {
|
|
||||||
if (types.isArrayBuffer(V)) {
|
|
||||||
return V.resizable
|
|
||||||
}
|
|
||||||
|
|
||||||
if (types.isSharedArrayBuffer(V)) {
|
|
||||||
return V.growable
|
|
||||||
}
|
|
||||||
|
|
||||||
throw webidl.errors.exception({
|
|
||||||
header: 'IsResizableArrayBuffer',
|
|
||||||
message: `"${webidl.util.Stringify(V)}" is not an array buffer.`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
webidl.util.HasFlag = function (flags, attributes) {
|
|
||||||
return typeof flags === 'number' && (flags & attributes) === attributes
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#es-sequence
|
// https://webidl.spec.whatwg.org/#es-sequence
|
||||||
webidl.sequenceConverter = function (converter) {
|
webidl.sequenceConverter = function (converter) {
|
||||||
return (V, prefix, argument, Iterable) => {
|
return (V, prefix, argument, Iterable) => {
|
||||||
@@ -114403,20 +113643,13 @@ webidl.is.URL = webidl.util.MakeTypeAssertion(URL)
|
|||||||
webidl.is.AbortSignal = webidl.util.MakeTypeAssertion(AbortSignal)
|
webidl.is.AbortSignal = webidl.util.MakeTypeAssertion(AbortSignal)
|
||||||
webidl.is.MessagePort = webidl.util.MakeTypeAssertion(MessagePort)
|
webidl.is.MessagePort = webidl.util.MakeTypeAssertion(MessagePort)
|
||||||
|
|
||||||
webidl.is.BufferSource = function (V) {
|
|
||||||
return types.isArrayBuffer(V) || (
|
|
||||||
ArrayBuffer.isView(V) &&
|
|
||||||
types.isArrayBuffer(V.buffer)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#es-DOMString
|
// https://webidl.spec.whatwg.org/#es-DOMString
|
||||||
webidl.converters.DOMString = function (V, prefix, argument, flags) {
|
webidl.converters.DOMString = function (V, prefix, argument, opts) {
|
||||||
// 1. If V is null and the conversion is to an IDL type
|
// 1. If V is null and the conversion is to an IDL type
|
||||||
// associated with the [LegacyNullToEmptyString]
|
// associated with the [LegacyNullToEmptyString]
|
||||||
// extended attribute, then return the DOMString value
|
// extended attribute, then return the DOMString value
|
||||||
// that represents the empty string.
|
// that represents the empty string.
|
||||||
if (V === null && webidl.util.HasFlag(flags, webidl.attributes.LegacyNullToEmptyString)) {
|
if (V === null && opts?.legacyNullToEmptyString) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114495,7 +113728,7 @@ webidl.converters.any = function (V) {
|
|||||||
// https://webidl.spec.whatwg.org/#es-long-long
|
// https://webidl.spec.whatwg.org/#es-long-long
|
||||||
webidl.converters['long long'] = function (V, prefix, argument) {
|
webidl.converters['long long'] = function (V, prefix, argument) {
|
||||||
// 1. Let x be ? ConvertToInt(V, 64, "signed").
|
// 1. Let x be ? ConvertToInt(V, 64, "signed").
|
||||||
const x = webidl.util.ConvertToInt(V, 64, 'signed', 0, prefix, argument)
|
const x = webidl.util.ConvertToInt(V, 64, 'signed', undefined, prefix, argument)
|
||||||
|
|
||||||
// 2. Return the IDL long long value that represents
|
// 2. Return the IDL long long value that represents
|
||||||
// the same numeric value as x.
|
// the same numeric value as x.
|
||||||
@@ -114505,7 +113738,7 @@ webidl.converters['long long'] = function (V, prefix, argument) {
|
|||||||
// https://webidl.spec.whatwg.org/#es-unsigned-long-long
|
// https://webidl.spec.whatwg.org/#es-unsigned-long-long
|
||||||
webidl.converters['unsigned long long'] = function (V, prefix, argument) {
|
webidl.converters['unsigned long long'] = function (V, prefix, argument) {
|
||||||
// 1. Let x be ? ConvertToInt(V, 64, "unsigned").
|
// 1. Let x be ? ConvertToInt(V, 64, "unsigned").
|
||||||
const x = webidl.util.ConvertToInt(V, 64, 'unsigned', 0, prefix, argument)
|
const x = webidl.util.ConvertToInt(V, 64, 'unsigned', undefined, prefix, argument)
|
||||||
|
|
||||||
// 2. Return the IDL unsigned long long value that
|
// 2. Return the IDL unsigned long long value that
|
||||||
// represents the same numeric value as x.
|
// represents the same numeric value as x.
|
||||||
@@ -114515,7 +113748,7 @@ webidl.converters['unsigned long long'] = function (V, prefix, argument) {
|
|||||||
// https://webidl.spec.whatwg.org/#es-unsigned-long
|
// https://webidl.spec.whatwg.org/#es-unsigned-long
|
||||||
webidl.converters['unsigned long'] = function (V, prefix, argument) {
|
webidl.converters['unsigned long'] = function (V, prefix, argument) {
|
||||||
// 1. Let x be ? ConvertToInt(V, 32, "unsigned").
|
// 1. Let x be ? ConvertToInt(V, 32, "unsigned").
|
||||||
const x = webidl.util.ConvertToInt(V, 32, 'unsigned', 0, prefix, argument)
|
const x = webidl.util.ConvertToInt(V, 32, 'unsigned', undefined, prefix, argument)
|
||||||
|
|
||||||
// 2. Return the IDL unsigned long value that
|
// 2. Return the IDL unsigned long value that
|
||||||
// represents the same numeric value as x.
|
// represents the same numeric value as x.
|
||||||
@@ -114523,9 +113756,9 @@ webidl.converters['unsigned long'] = function (V, prefix, argument) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#es-unsigned-short
|
// https://webidl.spec.whatwg.org/#es-unsigned-short
|
||||||
webidl.converters['unsigned short'] = function (V, prefix, argument, flags) {
|
webidl.converters['unsigned short'] = function (V, prefix, argument, opts) {
|
||||||
// 1. Let x be ? ConvertToInt(V, 16, "unsigned").
|
// 1. Let x be ? ConvertToInt(V, 16, "unsigned").
|
||||||
const x = webidl.util.ConvertToInt(V, 16, 'unsigned', flags, prefix, argument)
|
const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts, prefix, argument)
|
||||||
|
|
||||||
// 2. Return the IDL unsigned short value that represents
|
// 2. Return the IDL unsigned short value that represents
|
||||||
// the same numeric value as x.
|
// the same numeric value as x.
|
||||||
@@ -114533,16 +113766,15 @@ webidl.converters['unsigned short'] = function (V, prefix, argument, flags) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#idl-ArrayBuffer
|
// https://webidl.spec.whatwg.org/#idl-ArrayBuffer
|
||||||
webidl.converters.ArrayBuffer = function (V, prefix, argument, flags) {
|
webidl.converters.ArrayBuffer = function (V, prefix, argument, opts) {
|
||||||
// 1. If V is not an Object, or V does not have an
|
// 1. If Type(V) is not Object, or V does not have an
|
||||||
// [[ArrayBufferData]] internal slot, then throw a
|
// [[ArrayBufferData]] internal slot, then throw a
|
||||||
// TypeError.
|
// TypeError.
|
||||||
// 2. If IsSharedArrayBuffer(V) is true, then throw a
|
|
||||||
// TypeError.
|
|
||||||
// see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances
|
// see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances
|
||||||
|
// see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances
|
||||||
if (
|
if (
|
||||||
webidl.util.Type(V) !== OBJECT ||
|
webidl.util.Type(V) !== OBJECT ||
|
||||||
!types.isArrayBuffer(V)
|
!types.isAnyArrayBuffer(V)
|
||||||
) {
|
) {
|
||||||
throw webidl.errors.conversionFailed({
|
throw webidl.errors.conversionFailed({
|
||||||
prefix,
|
prefix,
|
||||||
@@ -114551,14 +113783,25 @@ webidl.converters.ArrayBuffer = function (V, prefix, argument, flags) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 2. If the conversion is not to an IDL type associated
|
||||||
|
// with the [AllowShared] extended attribute, and
|
||||||
|
// IsSharedArrayBuffer(V) is true, then throw a
|
||||||
|
// TypeError.
|
||||||
|
if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) {
|
||||||
|
throw webidl.errors.exception({
|
||||||
|
header: 'ArrayBuffer',
|
||||||
|
message: 'SharedArrayBuffer is not allowed.'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 3. If the conversion is not to an IDL type associated
|
// 3. If the conversion is not to an IDL type associated
|
||||||
// with the [AllowResizable] extended attribute, and
|
// with the [AllowResizable] extended attribute, and
|
||||||
// IsResizableArrayBuffer(V) is true, then throw a
|
// IsResizableArrayBuffer(V) is true, then throw a
|
||||||
// TypeError.
|
// TypeError.
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) {
|
if (V.resizable || V.growable) {
|
||||||
throw webidl.errors.exception({
|
throw webidl.errors.exception({
|
||||||
header: prefix,
|
header: 'ArrayBuffer',
|
||||||
message: `${argument} cannot be a resizable ArrayBuffer.`
|
message: 'Received a resizable ArrayBuffer.'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114567,43 +113810,7 @@ webidl.converters.ArrayBuffer = function (V, prefix, argument, flags) {
|
|||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer
|
webidl.converters.TypedArray = function (V, T, prefix, name, opts) {
|
||||||
webidl.converters.SharedArrayBuffer = function (V, prefix, argument, flags) {
|
|
||||||
// 1. If V is not an Object, or V does not have an
|
|
||||||
// [[ArrayBufferData]] internal slot, then throw a
|
|
||||||
// TypeError.
|
|
||||||
// 2. If IsSharedArrayBuffer(V) is false, then throw a
|
|
||||||
// TypeError.
|
|
||||||
// see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances
|
|
||||||
if (
|
|
||||||
webidl.util.Type(V) !== OBJECT ||
|
|
||||||
!types.isSharedArrayBuffer(V)
|
|
||||||
) {
|
|
||||||
throw webidl.errors.conversionFailed({
|
|
||||||
prefix,
|
|
||||||
argument: `${argument} ("${webidl.util.Stringify(V)}")`,
|
|
||||||
types: ['SharedArrayBuffer']
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. If the conversion is not to an IDL type associated
|
|
||||||
// with the [AllowResizable] extended attribute, and
|
|
||||||
// IsResizableArrayBuffer(V) is true, then throw a
|
|
||||||
// TypeError.
|
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) {
|
|
||||||
throw webidl.errors.exception({
|
|
||||||
header: prefix,
|
|
||||||
message: `${argument} cannot be a resizable SharedArrayBuffer.`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4. Return the IDL SharedArrayBuffer value that is a
|
|
||||||
// reference to the same object as V.
|
|
||||||
return V
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#dfn-typed-array-type
|
|
||||||
webidl.converters.TypedArray = function (V, T, prefix, argument, flags) {
|
|
||||||
// 1. Let T be the IDL type V is being converted to.
|
// 1. Let T be the IDL type V is being converted to.
|
||||||
|
|
||||||
// 2. If Type(V) is not Object, or V does not have a
|
// 2. If Type(V) is not Object, or V does not have a
|
||||||
@@ -114616,7 +113823,7 @@ webidl.converters.TypedArray = function (V, T, prefix, argument, flags) {
|
|||||||
) {
|
) {
|
||||||
throw webidl.errors.conversionFailed({
|
throw webidl.errors.conversionFailed({
|
||||||
prefix,
|
prefix,
|
||||||
argument: `${argument} ("${webidl.util.Stringify(V)}")`,
|
argument: `${name} ("${webidl.util.Stringify(V)}")`,
|
||||||
types: [T.name]
|
types: [T.name]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -114625,10 +113832,10 @@ webidl.converters.TypedArray = function (V, T, prefix, argument, flags) {
|
|||||||
// with the [AllowShared] extended attribute, and
|
// with the [AllowShared] extended attribute, and
|
||||||
// IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is
|
// IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is
|
||||||
// true, then throw a TypeError.
|
// true, then throw a TypeError.
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) {
|
if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {
|
||||||
throw webidl.errors.exception({
|
throw webidl.errors.exception({
|
||||||
header: prefix,
|
header: 'ArrayBuffer',
|
||||||
message: `${argument} cannot be a view on a shared array buffer.`
|
message: 'SharedArrayBuffer is not allowed.'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114636,10 +113843,10 @@ webidl.converters.TypedArray = function (V, T, prefix, argument, flags) {
|
|||||||
// with the [AllowResizable] extended attribute, and
|
// with the [AllowResizable] extended attribute, and
|
||||||
// IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
|
// IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
|
||||||
// true, then throw a TypeError.
|
// true, then throw a TypeError.
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) {
|
if (V.buffer.resizable || V.buffer.growable) {
|
||||||
throw webidl.errors.exception({
|
throw webidl.errors.exception({
|
||||||
header: prefix,
|
header: 'ArrayBuffer',
|
||||||
message: `${argument} cannot be a view on a resizable array buffer.`
|
message: 'Received a resizable ArrayBuffer.'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114648,15 +113855,13 @@ webidl.converters.TypedArray = function (V, T, prefix, argument, flags) {
|
|||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#idl-DataView
|
webidl.converters.DataView = function (V, prefix, name, opts) {
|
||||||
webidl.converters.DataView = function (V, prefix, argument, flags) {
|
|
||||||
// 1. If Type(V) is not Object, or V does not have a
|
// 1. If Type(V) is not Object, or V does not have a
|
||||||
// [[DataView]] internal slot, then throw a TypeError.
|
// [[DataView]] internal slot, then throw a TypeError.
|
||||||
if (webidl.util.Type(V) !== OBJECT || !types.isDataView(V)) {
|
if (webidl.util.Type(V) !== OBJECT || !types.isDataView(V)) {
|
||||||
throw webidl.errors.conversionFailed({
|
throw webidl.errors.exception({
|
||||||
prefix,
|
header: prefix,
|
||||||
argument: `${argument} ("${webidl.util.Stringify(V)}")`,
|
message: `${name} is not a DataView.`
|
||||||
types: ['DataView']
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114664,10 +113869,10 @@ webidl.converters.DataView = function (V, prefix, argument, flags) {
|
|||||||
// with the [AllowShared] extended attribute, and
|
// with the [AllowShared] extended attribute, and
|
||||||
// IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true,
|
// IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true,
|
||||||
// then throw a TypeError.
|
// then throw a TypeError.
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) {
|
if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {
|
||||||
throw webidl.errors.exception({
|
throw webidl.errors.exception({
|
||||||
header: prefix,
|
header: 'ArrayBuffer',
|
||||||
message: `${argument} cannot be a view on a shared array buffer.`
|
message: 'SharedArrayBuffer is not allowed.'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114675,10 +113880,10 @@ webidl.converters.DataView = function (V, prefix, argument, flags) {
|
|||||||
// with the [AllowResizable] extended attribute, and
|
// with the [AllowResizable] extended attribute, and
|
||||||
// IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
|
// IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
|
||||||
// true, then throw a TypeError.
|
// true, then throw a TypeError.
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) {
|
if (V.buffer.resizable || V.buffer.growable) {
|
||||||
throw webidl.errors.exception({
|
throw webidl.errors.exception({
|
||||||
header: prefix,
|
header: 'ArrayBuffer',
|
||||||
message: `${argument} cannot be a view on a resizable array buffer.`
|
message: 'Received a resizable ArrayBuffer.'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114687,85 +113892,6 @@ webidl.converters.DataView = function (V, prefix, argument, flags) {
|
|||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#ArrayBufferView
|
|
||||||
webidl.converters.ArrayBufferView = function (V, prefix, argument, flags) {
|
|
||||||
if (
|
|
||||||
webidl.util.Type(V) !== OBJECT ||
|
|
||||||
!types.isArrayBufferView(V)
|
|
||||||
) {
|
|
||||||
throw webidl.errors.conversionFailed({
|
|
||||||
prefix,
|
|
||||||
argument: `${argument} ("${webidl.util.Stringify(V)}")`,
|
|
||||||
types: ['ArrayBufferView']
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) {
|
|
||||||
throw webidl.errors.exception({
|
|
||||||
header: prefix,
|
|
||||||
message: `${argument} cannot be a view on a shared array buffer.`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) {
|
|
||||||
throw webidl.errors.exception({
|
|
||||||
header: prefix,
|
|
||||||
message: `${argument} cannot be a view on a resizable array buffer.`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return V
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#BufferSource
|
|
||||||
webidl.converters.BufferSource = function (V, prefix, argument, flags) {
|
|
||||||
if (types.isArrayBuffer(V)) {
|
|
||||||
return webidl.converters.ArrayBuffer(V, prefix, argument, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (types.isArrayBufferView(V)) {
|
|
||||||
flags &= ~webidl.attributes.AllowShared
|
|
||||||
|
|
||||||
return webidl.converters.ArrayBufferView(V, prefix, argument, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make this explicit for easier debugging
|
|
||||||
if (types.isSharedArrayBuffer(V)) {
|
|
||||||
throw webidl.errors.exception({
|
|
||||||
header: prefix,
|
|
||||||
message: `${argument} cannot be a SharedArrayBuffer.`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
throw webidl.errors.conversionFailed({
|
|
||||||
prefix,
|
|
||||||
argument: `${argument} ("${webidl.util.Stringify(V)}")`,
|
|
||||||
types: ['ArrayBuffer', 'ArrayBufferView']
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#AllowSharedBufferSource
|
|
||||||
webidl.converters.AllowSharedBufferSource = function (V, prefix, argument, flags) {
|
|
||||||
if (types.isArrayBuffer(V)) {
|
|
||||||
return webidl.converters.ArrayBuffer(V, prefix, argument, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (types.isSharedArrayBuffer(V)) {
|
|
||||||
return webidl.converters.SharedArrayBuffer(V, prefix, argument, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (types.isArrayBufferView(V)) {
|
|
||||||
flags |= webidl.attributes.AllowShared
|
|
||||||
return webidl.converters.ArrayBufferView(V, prefix, argument, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
throw webidl.errors.conversionFailed({
|
|
||||||
prefix,
|
|
||||||
argument: `${argument} ("${webidl.util.Stringify(V)}")`,
|
|
||||||
types: ['ArrayBuffer', 'SharedArrayBuffer', 'ArrayBufferView']
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
webidl.converters['sequence<ByteString>'] = webidl.sequenceConverter(
|
webidl.converters['sequence<ByteString>'] = webidl.sequenceConverter(
|
||||||
webidl.converters.ByteString
|
webidl.converters.ByteString
|
||||||
)
|
)
|
||||||
@@ -114786,34 +113912,6 @@ webidl.converters.AbortSignal = webidl.interfaceConverter(
|
|||||||
'AbortSignal'
|
'AbortSignal'
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
|
||||||
* [LegacyTreatNonObjectAsNull]
|
|
||||||
* callback EventHandlerNonNull = any (Event event);
|
|
||||||
* typedef EventHandlerNonNull? EventHandler;
|
|
||||||
* @param {*} V
|
|
||||||
*/
|
|
||||||
webidl.converters.EventHandlerNonNull = function (V) {
|
|
||||||
if (webidl.util.Type(V) !== OBJECT) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
// [I]f the value is not an object, it will be converted to null, and if the value is not callable,
|
|
||||||
// it will be converted to a callback function value that does nothing when called.
|
|
||||||
if (typeof V === 'function') {
|
|
||||||
return V
|
|
||||||
}
|
|
||||||
|
|
||||||
return () => {}
|
|
||||||
}
|
|
||||||
|
|
||||||
webidl.attributes = {
|
|
||||||
Clamp: 1 << 0,
|
|
||||||
EnforceRange: 1 << 1,
|
|
||||||
AllowShared: 1 << 2,
|
|
||||||
AllowResizable: 1 << 3,
|
|
||||||
LegacyNullToEmptyString: 1 << 4
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
webidl
|
webidl
|
||||||
}
|
}
|
||||||
@@ -115130,12 +114228,11 @@ function failWebsocketConnection (handler, code, reason, cause) {
|
|||||||
|
|
||||||
handler.controller.abort()
|
handler.controller.abort()
|
||||||
|
|
||||||
if (!handler.socket) {
|
if (handler.socket?.destroyed === false) {
|
||||||
// If the connection was not established, we must still emit an 'error' and 'close' events
|
|
||||||
handler.onSocketClose()
|
|
||||||
} else if (handler.socket.destroyed === false) {
|
|
||||||
handler.socket.destroy()
|
handler.socket.destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handler.onFail(code, reason, cause)
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -115559,7 +114656,7 @@ webidl.converters.MessageEventInit = webidl.dictionaryConverter([
|
|||||||
{
|
{
|
||||||
key: 'ports',
|
key: 'ports',
|
||||||
converter: webidl.converters['sequence<MessagePort>'],
|
converter: webidl.converters['sequence<MessagePort>'],
|
||||||
defaultValue: () => []
|
defaultValue: () => new Array(0)
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -116425,28 +115522,7 @@ const { validateCloseCodeAndReason } = __nccwpck_require__(98625)
|
|||||||
const { kConstruct } = __nccwpck_require__(36443)
|
const { kConstruct } = __nccwpck_require__(36443)
|
||||||
const { kEnumerableProperty } = __nccwpck_require__(3440)
|
const { kEnumerableProperty } = __nccwpck_require__(3440)
|
||||||
|
|
||||||
function createInheritableDOMException () {
|
class WebSocketError extends DOMException {
|
||||||
// https://github.com/nodejs/node/issues/59677
|
|
||||||
class Test extends DOMException {
|
|
||||||
get reason () {
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (new Test().reason !== undefined) {
|
|
||||||
return DOMException
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Proxy(DOMException, {
|
|
||||||
construct (target, args, newTarget) {
|
|
||||||
const instance = Reflect.construct(target, args, target)
|
|
||||||
Object.setPrototypeOf(instance, newTarget.prototype)
|
|
||||||
return instance
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
class WebSocketError extends createInheritableDOMException() {
|
|
||||||
#closeCode
|
#closeCode
|
||||||
#reason
|
#reason
|
||||||
|
|
||||||
@@ -116538,6 +115614,7 @@ const { states, opcodes, sentCloseFrameState } = __nccwpck_require__(20736)
|
|||||||
const { webidl } = __nccwpck_require__(47879)
|
const { webidl } = __nccwpck_require__(47879)
|
||||||
const { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = __nccwpck_require__(98625)
|
const { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = __nccwpck_require__(98625)
|
||||||
const { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = __nccwpck_require__(86897)
|
const { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = __nccwpck_require__(86897)
|
||||||
|
const { isArrayBuffer } = __nccwpck_require__(73429)
|
||||||
const { channels } = __nccwpck_require__(42414)
|
const { channels } = __nccwpck_require__(42414)
|
||||||
const { WebsocketFrameSend } = __nccwpck_require__(3264)
|
const { WebsocketFrameSend } = __nccwpck_require__(3264)
|
||||||
const { ByteParser } = __nccwpck_require__(81652)
|
const { ByteParser } = __nccwpck_require__(81652)
|
||||||
@@ -116577,6 +115654,7 @@ class WebSocketStream {
|
|||||||
#handler = {
|
#handler = {
|
||||||
// https://whatpr.org/websockets/48/7b748d3...d5570f3.html#feedback-to-websocket-stream-from-the-protocol
|
// https://whatpr.org/websockets/48/7b748d3...d5570f3.html#feedback-to-websocket-stream-from-the-protocol
|
||||||
onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),
|
onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),
|
||||||
|
onFail: (_code, _reason) => {},
|
||||||
onMessage: (opcode, data) => this.#onMessage(opcode, data),
|
onMessage: (opcode, data) => this.#onMessage(opcode, data),
|
||||||
onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),
|
onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),
|
||||||
onParserDrain: () => this.#handler.socket.resume(),
|
onParserDrain: () => this.#handler.socket.resume(),
|
||||||
@@ -116730,9 +115808,6 @@ class WebSocketStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#write (chunk) {
|
#write (chunk) {
|
||||||
// See /websockets/stream/tentative/write.any.html
|
|
||||||
chunk = webidl.converters.WebSocketStreamWrite(chunk)
|
|
||||||
|
|
||||||
// 1. Let promise be a new promise created in stream ’s relevant realm .
|
// 1. Let promise be a new promise created in stream ’s relevant realm .
|
||||||
const promise = createDeferredPromise()
|
const promise = createDeferredPromise()
|
||||||
|
|
||||||
@@ -116743,9 +115818,9 @@ class WebSocketStream {
|
|||||||
let opcode = null
|
let opcode = null
|
||||||
|
|
||||||
// 4. If chunk is a BufferSource ,
|
// 4. If chunk is a BufferSource ,
|
||||||
if (webidl.is.BufferSource(chunk)) {
|
if (ArrayBuffer.isView(chunk) || isArrayBuffer(chunk)) {
|
||||||
// 4.1. Set data to a copy of the bytes given chunk .
|
// 4.1. Set data to a copy of the bytes given chunk .
|
||||||
data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk.slice())
|
data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk)
|
||||||
|
|
||||||
// 4.2. Set opcode to a binary frame opcode.
|
// 4.2. Set opcode to a binary frame opcode.
|
||||||
opcode = opcodes.BINARY
|
opcode = opcodes.BINARY
|
||||||
@@ -116760,7 +115835,7 @@ class WebSocketStream {
|
|||||||
string = webidl.converters.DOMString(chunk)
|
string = webidl.converters.DOMString(chunk)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
promise.reject(e)
|
promise.reject(e)
|
||||||
return promise.promise
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 5.2. Set data to the result of UTF-8 encoding string .
|
// 5.2. Set data to the result of UTF-8 encoding string .
|
||||||
@@ -116783,7 +115858,7 @@ class WebSocketStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined.
|
// 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined.
|
||||||
return promise.promise
|
return promise
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @type {import('../websocket').Handler['onConnectionEstablished']} */
|
/** @type {import('../websocket').Handler['onConnectionEstablished']} */
|
||||||
@@ -117009,7 +116084,7 @@ webidl.converters.WebSocketStreamOptions = webidl.dictionaryConverter([
|
|||||||
webidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([
|
webidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([
|
||||||
{
|
{
|
||||||
key: 'closeCode',
|
key: 'closeCode',
|
||||||
converter: (V) => webidl.converters['unsigned short'](V, webidl.attributes.EnforceRange)
|
converter: (V) => webidl.converters['unsigned short'](V, { enforceRange: true })
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'reason',
|
key: 'reason',
|
||||||
@@ -117018,14 +116093,6 @@ webidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
webidl.converters.WebSocketStreamWrite = function (V) {
|
|
||||||
if (typeof V === 'string') {
|
|
||||||
return webidl.converters.USVString(V)
|
|
||||||
}
|
|
||||||
|
|
||||||
return webidl.converters.BufferSource(V)
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = { WebSocketStream }
|
module.exports = { WebSocketStream }
|
||||||
|
|
||||||
|
|
||||||
@@ -117411,6 +116478,7 @@ const { channels } = __nccwpck_require__(42414)
|
|||||||
/**
|
/**
|
||||||
* @typedef {object} Handler
|
* @typedef {object} Handler
|
||||||
* @property {(response: any, extensions?: string[]) => void} onConnectionEstablished
|
* @property {(response: any, extensions?: string[]) => void} onConnectionEstablished
|
||||||
|
* @property {(code: number, reason: any) => void} onFail
|
||||||
* @property {(opcode: number, data: Buffer) => void} onMessage
|
* @property {(opcode: number, data: Buffer) => void} onMessage
|
||||||
* @property {(error: Error) => void} onParserError
|
* @property {(error: Error) => void} onParserError
|
||||||
* @property {() => void} onParserDrain
|
* @property {() => void} onParserDrain
|
||||||
@@ -117446,6 +116514,7 @@ class WebSocket extends EventTarget {
|
|||||||
/** @type {Handler} */
|
/** @type {Handler} */
|
||||||
#handler = {
|
#handler = {
|
||||||
onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),
|
onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),
|
||||||
|
onFail: (code, reason, cause) => this.#onFail(code, reason, cause),
|
||||||
onMessage: (opcode, data) => this.#onMessage(opcode, data),
|
onMessage: (opcode, data) => this.#onMessage(opcode, data),
|
||||||
onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),
|
onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),
|
||||||
onParserDrain: () => this.#onParserDrain(),
|
onParserDrain: () => this.#onParserDrain(),
|
||||||
@@ -117576,7 +116645,7 @@ class WebSocket extends EventTarget {
|
|||||||
const prefix = 'WebSocket.close'
|
const prefix = 'WebSocket.close'
|
||||||
|
|
||||||
if (code !== undefined) {
|
if (code !== undefined) {
|
||||||
code = webidl.converters['unsigned short'](code, prefix, 'code', webidl.attributes.Clamp)
|
code = webidl.converters['unsigned short'](code, prefix, 'code', { clamp: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reason !== undefined) {
|
if (reason !== undefined) {
|
||||||
@@ -117736,11 +116805,9 @@ class WebSocket extends EventTarget {
|
|||||||
this.removeEventListener('open', this.#events.open)
|
this.removeEventListener('open', this.#events.open)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('open', listener)
|
|
||||||
this.#events.open = fn
|
this.#events.open = fn
|
||||||
|
this.addEventListener('open', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.open = null
|
this.#events.open = null
|
||||||
}
|
}
|
||||||
@@ -117759,11 +116826,9 @@ class WebSocket extends EventTarget {
|
|||||||
this.removeEventListener('error', this.#events.error)
|
this.removeEventListener('error', this.#events.error)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('error', listener)
|
|
||||||
this.#events.error = fn
|
this.#events.error = fn
|
||||||
|
this.addEventListener('error', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.error = null
|
this.#events.error = null
|
||||||
}
|
}
|
||||||
@@ -117782,11 +116847,9 @@ class WebSocket extends EventTarget {
|
|||||||
this.removeEventListener('close', this.#events.close)
|
this.removeEventListener('close', this.#events.close)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('close', listener)
|
|
||||||
this.#events.close = fn
|
this.#events.close = fn
|
||||||
|
this.addEventListener('close', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.close = null
|
this.#events.close = null
|
||||||
}
|
}
|
||||||
@@ -117805,11 +116868,9 @@ class WebSocket extends EventTarget {
|
|||||||
this.removeEventListener('message', this.#events.message)
|
this.removeEventListener('message', this.#events.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('message', listener)
|
|
||||||
this.#events.message = fn
|
this.#events.message = fn
|
||||||
|
this.addEventListener('message', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.message = null
|
this.#events.message = null
|
||||||
}
|
}
|
||||||
@@ -117887,6 +116948,26 @@ class WebSocket extends EventTarget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#onFail (code, reason, cause) {
|
||||||
|
if (reason) {
|
||||||
|
// TODO: process.nextTick
|
||||||
|
fireEvent('error', this, (type, init) => new ErrorEvent(type, init), {
|
||||||
|
error: new Error(reason, cause ? { cause } : undefined),
|
||||||
|
message: reason
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.#handler.wasEverConnected) {
|
||||||
|
this.#handler.readyState = states.CLOSED
|
||||||
|
|
||||||
|
// If the WebSocket connection could not be established, it is also said
|
||||||
|
// that _The WebSocket Connection is Closed_, but not _cleanly_.
|
||||||
|
fireEvent('close', this, (type, init) => new CloseEvent(type, init), {
|
||||||
|
wasClean: false, code, reason
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#onMessage (type, data) {
|
#onMessage (type, data) {
|
||||||
// 1. If ready state is not OPEN (1), then return.
|
// 1. If ready state is not OPEN (1), then return.
|
||||||
if (this.#handler.readyState !== states.OPEN) {
|
if (this.#handler.readyState !== states.OPEN) {
|
||||||
@@ -117947,11 +117028,18 @@ class WebSocket extends EventTarget {
|
|||||||
let code = 1005
|
let code = 1005
|
||||||
let reason = ''
|
let reason = ''
|
||||||
|
|
||||||
const result = this.#parser?.closingInfo
|
const result = this.#parser.closingInfo
|
||||||
|
|
||||||
if (result && !result.error) {
|
if (result && !result.error) {
|
||||||
code = result.code ?? 1005
|
code = result.code ?? 1005
|
||||||
reason = result.reason
|
reason = result.reason
|
||||||
|
} else if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
|
||||||
|
// If _The WebSocket
|
||||||
|
// Connection is Closed_ and no Close control frame was received by the
|
||||||
|
// endpoint (such as could occur if the underlying transport connection
|
||||||
|
// is lost), _The WebSocket Connection Close Code_ is considered to be
|
||||||
|
// 1006.
|
||||||
|
code = 1006
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1. Change the ready state to CLOSED (3).
|
// 1. Change the ready state to CLOSED (3).
|
||||||
@@ -117961,18 +117049,7 @@ class WebSocket extends EventTarget {
|
|||||||
// connection, or if the WebSocket connection was closed
|
// connection, or if the WebSocket connection was closed
|
||||||
// after being flagged as full, fire an event named error
|
// after being flagged as full, fire an event named error
|
||||||
// at the WebSocket object.
|
// at the WebSocket object.
|
||||||
if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
|
// TODO
|
||||||
// If _The WebSocket
|
|
||||||
// Connection is Closed_ and no Close control frame was received by the
|
|
||||||
// endpoint (such as could occur if the underlying transport connection
|
|
||||||
// is lost), _The WebSocket Connection Close Code_ is considered to be
|
|
||||||
// 1006.
|
|
||||||
code = 1006
|
|
||||||
|
|
||||||
fireEvent('error', this, (type, init) => new ErrorEvent(type, init), {
|
|
||||||
error: new TypeError(reason)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. Fire an event named close at the WebSocket object,
|
// 3. Fire an event named close at the WebSocket object,
|
||||||
// using CloseEvent, with the wasClean attribute
|
// using CloseEvent, with the wasClean attribute
|
||||||
@@ -118081,7 +117158,7 @@ webidl.converters.WebSocketInit = webidl.dictionaryConverter([
|
|||||||
{
|
{
|
||||||
key: 'protocols',
|
key: 'protocols',
|
||||||
converter: webidl.converters['DOMString or sequence<DOMString>'],
|
converter: webidl.converters['DOMString or sequence<DOMString>'],
|
||||||
defaultValue: () => []
|
defaultValue: () => new Array(0)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'dispatcher',
|
key: 'dispatcher',
|
||||||
@@ -118108,7 +117185,7 @@ webidl.converters.WebSocketSendData = function (V) {
|
|||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
|
|
||||||
if (webidl.is.BufferSource(V)) {
|
if (ArrayBuffer.isView(V) || isArrayBuffer(V)) {
|
||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125144,11 +124221,6 @@ exports.STATE_CACHE_MATCHED_KEY = "cache-matched-key";
|
|||||||
const CACHE_VERSION = "1";
|
const CACHE_VERSION = "1";
|
||||||
async function restoreCache() {
|
async function restoreCache() {
|
||||||
const cacheKey = await computeKeys();
|
const cacheKey = await computeKeys();
|
||||||
core.saveState(exports.STATE_CACHE_KEY, cacheKey);
|
|
||||||
if (!inputs_1.restoreCache) {
|
|
||||||
core.info("restore-cache is false. Skipping restore cache step.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let matchedKey;
|
let matchedKey;
|
||||||
core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`);
|
core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`);
|
||||||
try {
|
try {
|
||||||
@@ -125160,6 +124232,7 @@ async function restoreCache() {
|
|||||||
core.setOutput("cache-hit", false);
|
core.setOutput("cache-hit", false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
core.saveState(exports.STATE_CACHE_KEY, cacheKey);
|
||||||
handleMatchResult(matchedKey, cacheKey);
|
handleMatchResult(matchedKey, cacheKey);
|
||||||
}
|
}
|
||||||
async function computeKeys() {
|
async function computeKeys() {
|
||||||
@@ -125320,98 +124393,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||||||
exports.KNOWN_CHECKSUMS = void 0;
|
exports.KNOWN_CHECKSUMS = void 0;
|
||||||
// AUTOGENERATED_DO_NOT_EDIT
|
// AUTOGENERATED_DO_NOT_EDIT
|
||||||
exports.KNOWN_CHECKSUMS = {
|
exports.KNOWN_CHECKSUMS = {
|
||||||
"aarch64-apple-darwin-0.8.20": "a87008d013efd78d94102e5268a24990c409bfb39b80df4de32d1c97f093e7ef",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.20": "ac33f921e0d48d14a106a6cc84b146da7a1f4a3c329c7fb0e1a8e6ff4cf541e6",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.20": "b434851cd94e9e2083bc9a5851f1d13748771726bd2ac30027f820fc134b2104",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.20": "60ad9b7fb846c2051e0113077b1e9510b4b1a73b9a1816a03e82406deedff08d",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.20": "72fa919115f5a7c4557c1adb55ac77154f3fb0272b95ff0270d4eaf98bc814c2",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.20": "87a993df182a2abb5581421d6c76b0cbccb311cfca625d8c827f2cfcf1c78fed",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.20": "3a3c1b2370824f3129c89bf3def5b2b703813152cf0be0ec3c04dead21077cd0",
|
|
||||||
"i686-pc-windows-msvc-0.8.20": "62fd821f330f469cce6e02eded6f63ba51a9461acc9e0e16794e05da08fe16be",
|
|
||||||
"i686-unknown-linux-gnu-0.8.20": "a7bfa2c07183f2fd44ef4d6c910971796a980ebb3c52e9620e6b741cc6fe45c0",
|
|
||||||
"i686-unknown-linux-musl-0.8.20": "67eec91d7ca5a8dc8d95149be52bcf459efb4caeacbacf8586f371f8192a0ec7",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.20": "b96d6a4907ab4c26d7061e43f6993aa47c76a01af6f3cb871d9c48b7b250fbca",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.20": "1c13fbcd13214e93300749cb14cb5c1425d6a4095f2e406a80b34ab10d269b5b",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.20": "a14f8297bae6dc3993a9367e0fcf6061281f5f3f0da7c46a6a2a5fd47467f56c",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.20": "8e59db8d1cb791897237982e369fea0217a12ffe3527cf6f1d30fea32d20a509",
|
|
||||||
"x86_64-apple-darwin-0.8.20": "ec47686e5e1499b9ea53aa61181fa3f08d4113bc7628105dc299c092d4debf44",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.20": "e2aa89b78f0a0fa7cbf9d42508c7a962bda803425d8ec3e9cf7a69fb00cf6791",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.20": "dc67aa1a5b6b16a8cc4a5fdf5697f354fbf9e45f77a3da6d9e71db6ec213c082",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.20": "a29e1854ee3ce1ccc5ba1d27783c4f34e99605e16c886a71446a90bad40a38c9",
|
|
||||||
"aarch64-apple-darwin-0.8.19": "bb63d43c40a301d889a985223ee8ce540be199e98b3f27ed8477823869a0a605",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.19": "3bfe2db4bccf95e05d2685bcbfad7e49e7cd2177a20aebe81a5e5348cbdfc0a3",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.19": "ffd29feed13cdd30b27def8e80e64223325fbe4f7cfc4d4c906ec2531f746bde",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.19": "87925376fa1e59de23582e1cbd81d6aabd16611e871ad085e09be2c2fa12689d",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.19": "00d4835ba20e2e4a3bfed6fe4f6fbf4982c5a0e6a3105c7bde93fb9377e61dea",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.19": "7a58efdb9c6e3f320759f9f074306e34f03ccfb535b306cbace92e9ad414efd5",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.19": "c8f8a244009f3ad01b23772c936c5c5a95871a87b0add90b85a55d3913d1fae0",
|
|
||||||
"i686-pc-windows-msvc-0.8.19": "32c7176e49f5fa1c7480b32e325a631431212904b1020427e62afef46fddddb9",
|
|
||||||
"i686-unknown-linux-gnu-0.8.19": "94a5f944d1cba4db2e7fc6831bf9c78c291c5c1e5e079b4095e9fcdcbc15bc71",
|
|
||||||
"i686-unknown-linux-musl-0.8.19": "491b282b50e078fac4ced99e69359ac6cecc3f43f585f812d52515e6b081261a",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.19": "3c7c7ecb8d5b61acee3914984f1025af1707a987a51285aba44d968420139f2c",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.19": "711e39050b528b0860d868c98057eebbd181befbe6a6f24e0f6fd571eab5520f",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.19": "5dd8e1ec8bf8722e08d9853953ed0ef12318d0f5e82d06a8dd98815666f99186",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.19": "5b3af341a39364f147d7286e40f55dd92ac8a142110e29ff1b4825afb96e1b27",
|
|
||||||
"x86_64-apple-darwin-0.8.19": "b5f91770e55761b32c9618757ef23ded6671bb9ca0ddf5737eea60dddd493fe9",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.19": "945b07182de7de279ba5ae5c746785dfd55cf9b17481d3535b0b03efd6e64567",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.19": "cfc674e9b83d1becfca4d70386e5f7ace4c1fa8c47c518abeebb8ef2b30da4b8",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.19": "6a37f712ae90c7b8cf364fe751144d7acc2479d6b336378111e74cc7fb14fa7b",
|
|
||||||
"aarch64-apple-darwin-0.8.18": "ce660d5cdf0ed83d1a045bbe9792b93d06725b8c9e9b88960a503d42192be445",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.18": "f49a25f1a89c76d750e2179f40f9302310504f40c89283ca4522b13363c7bdc9",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.18": "164363f88618f4e8e175faf9fcf5172321c221fce93d64cec8e9ab3339511dad",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.18": "1d7e3bfc3b5ec9d747bc3f42a6a3362249f30560966512b172e8967b11046144",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.18": "3c356156c074eb21f731116501992aa6ad6079231f37c75ea7a15c22d1c41cf6",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.18": "15e12cfba5fb7b20b4eb45887b78fe157d29bd28b38bbc03a19224ad6766a641",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.18": "008cd8225fd8b6b4bb3293d1d7520023f8e432141f256320c034dc5a1a15c7ab",
|
|
||||||
"i686-pc-windows-msvc-0.8.18": "55f0d91f766ca141e166fe74b8a81da667b5d703ca1b5f2671677f0b2bfdd901",
|
|
||||||
"i686-unknown-linux-gnu-0.8.18": "3b42e3b58650cde6fa0d03dfdb8528573cf679ac9809191b3976913cdec13b6f",
|
|
||||||
"i686-unknown-linux-musl-0.8.18": "e2dae897955f666eb2f83af12d9a566bc42c26c17413d1480124cef6b30dc0fd",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.18": "88cd4ad593e6dd915c69dee02b56cbf1b6d16cb7c8129a5ad1fa8ac02bd755ab",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.18": "50b418096f4d82df5d22cb23e650754ca92bca7be657113dcd53631f0e0cec77",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.18": "b696be9a2ef0808f230227477b8e23acedba0b90933978c760ea2a748e8c30fa",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.18": "3b106572a8574f58e3df591cdaef915bdb38fdff11e5de0ec53bfe1b857267e8",
|
|
||||||
"x86_64-apple-darwin-0.8.18": "a08c3a6c50f49e68216ac133bd0aaae952db2cd8d19a3cd5be782f8f4becf135",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.18": "3e42d63c8323839d50b11959ec558ad3954a2c16aab1ad52c0521bd055442a3f",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.18": "59ad1a1809fa47019b86cf339fff161cb7b00ad3d8d42354eea57d0d91aeb44c",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.18": "3a93bc3597ab73c9c31d8ad709b4d0b788961cbb508c5a4dcf21636fd7e3e8ce",
|
|
||||||
"aarch64-apple-darwin-0.8.17": "e4d4859d7726298daa4c12e114f269ff282b2cfc2b415dc0b2ca44ae2dbd358e",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.17": "2396749de576e45a40efa35fe94b3f953c3224c21f75c05772593e085d78e77d",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.17": "9a20d65b110770bbaa2ee89ed76eb963d8c6a480b9ebef584ea9df2ae85b4f0f",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.17": "bd141b7e263935d14f5725f2a5c1c942fd89642e37683cb904f1984ce7e365f4",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.17": "9d4ffb6751d65a52f8daf3fd88e331ab989d490a6e336d6a96cac668fce17a65",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.17": "014afffa5621986aefbe8a6d71597eb45b8cd3d4e94f825f34ec49ba4cd0c382",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.17": "fb976e7482c4550f38c51c5c23b9dae0322c3173f56436bf9a81252e4b74fcfb",
|
|
||||||
"i686-pc-windows-msvc-0.8.17": "f528893452ca512b555b63267292977d237bd6fbdd967c9be6941a65ebf256f4",
|
|
||||||
"i686-unknown-linux-gnu-0.8.17": "d52438a1588ea7c2332dc4aa8c93eedae344fc435c95491037237c7b4b36eae4",
|
|
||||||
"i686-unknown-linux-musl-0.8.17": "9e10f4c57034e6e98dea48b0f4250a7eff983f1b2947d99ed6605a4eb0ec8d22",
|
|
||||||
"loongarch64-unknown-linux-gnu-0.8.17": "1d02e45dbbcbbaa867afe59fd62b294cba47abf1a76e151e19db03b5dbf1c9c8",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.17": "6f448735dfd72e2d5c3e3bb541b388c58cdfcf3a562128d5ac1a5f2be47f95d6",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.17": "e4b28cab21eb990e2bea768bc9f43b61e4fd554552cea8868c855027decef69d",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.17": "f653caa34479d405d290b825a2fe782bb26c55a7bfaa870911b4e18792312d45",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.17": "8fae8182704b4b11316c87d897c3e64f2d3f55ac8c58c482d9bbef9ad611f90c",
|
|
||||||
"x86_64-apple-darwin-0.8.17": "31ed353cfd8e6c962e7c60617bd8a9d6b97b704c1ecb5b5eceaff8c6121b54ac",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.17": "0d051779fbcb173b183efeae1c3e96148764fd82709bbbf0966df3efe48b67c5",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.17": "920cbcaad514cc185634f6f0dcd71df5e8f4ee4456d440a22e0f8c0f142a8203",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.17": "4057052999a210fe78d93599d2165da9e24c8bbb23370cdd26b66a98ab479203",
|
|
||||||
"aarch64-apple-darwin-0.8.16": "87e4b51b735e8445f6c445c7b4c0398273e40d34cd192bad8158736653600cd6",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.16": "392acca957d8d7cccafbb68ce6c4ba29b2ff00c8b0d4744a2136918d3a7bf765",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.16": "22a3cbaf87776b73c2657ba5d63f8565c1235b65eaf57dffda66061f7a09913b",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.16": "6bd6a11c384f07353c3c7eec9bde094f89b92a12dc09caea9df40c424afebea5",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.16": "53c31a6559dc4fb22ce8c56640b00a8404b7e4d55f68b6bb3aa188864e2c3084",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.16": "ada6f393d5e5d9cba5445832ba61e8222859e915e5d77a37f5dd35979f3f18e4",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.16": "55690f70f9c61963c0069558e205acda9ff0604a44028226b9a0ec3b847c9125",
|
|
||||||
"i686-pc-windows-msvc-0.8.16": "1e727b8af6c0781bc6eb9a2c34e7ee704070b7a2f122544443418e8be13019ee",
|
|
||||||
"i686-unknown-linux-gnu-0.8.16": "4eaf39134663ef184f684be6f6aa83e971fb36ef7d1c67a5f2196268b61c0579",
|
|
||||||
"i686-unknown-linux-musl-0.8.16": "a179ceba9f2fcca7b46a86b12715e28fb3429ff8193ae839700d534e35e95a45",
|
|
||||||
"loongarch64-unknown-linux-gnu-0.8.16": "600a8be6d2621d654b6665d9a8df9370f4af9c0b6ceb851d1ae0d4b895e8e546",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.16": "c86008ef8a3e3730b0e58a168542331960c90a3b043e3853c1941457748595f3",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.16": "91645092447a14c23b47d0f434a787a9555b29e061607d9e60d2d556b831f5aa",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.16": "dbaeff3f0baad73c264c35abd937a231fb6b9d1201b6763d82e39e7516358115",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.16": "e29c330a8956c13acb0f2af7aa650dd5d9ebba6aefdceaea77f689953d140780",
|
|
||||||
"x86_64-apple-darwin-0.8.16": "07491a998fd741090501df9bbfe538f85568901a3a66c9e0368636509158727a",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.16": "97fb93678eca3b4f731ea3879ae2e78787976e03f38c9c6fb744ab28bc3aec1b",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.16": "fc94e50e8ef93a97d723b83faa42888e7710c4443a5b8a1af3aac2cda5390f3a",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.16": "ee220f112b91b23f641d169ba7a3652c6ab7104e7c666d26104ebd6a2f76be43",
|
|
||||||
"aarch64-apple-darwin-0.8.15": "103367962c5cb00bf7370d84cbaa3fec5a9807be9cc833ea9d8eea400c119fa2",
|
"aarch64-apple-darwin-0.8.15": "103367962c5cb00bf7370d84cbaa3fec5a9807be9cc833ea9d8eea400c119fa2",
|
||||||
"aarch64-pc-windows-msvc-0.8.15": "16d92f21508c5dbd3374466c2cdad2909959a6d3bd06672b9db023f2a5d7a014",
|
"aarch64-pc-windows-msvc-0.8.15": "16d92f21508c5dbd3374466c2cdad2909959a6d3bd06672b9db023f2a5d7a014",
|
||||||
"aarch64-unknown-linux-gnu-0.8.15": "6ede0fefa7db7be3d5d9eda8784a8e43b1cf5410720eb3da60ab1d2f66678e82",
|
"aarch64-unknown-linux-gnu-0.8.15": "6ede0fefa7db7be3d5d9eda8784a8e43b1cf5410720eb3da60ab1d2f66678e82",
|
||||||
@@ -128998,17 +127979,17 @@ function tryGetFromToolCache(arch, version) {
|
|||||||
const installedPath = tc.find(constants_1.TOOL_CACHE_NAME, resolvedVersion, arch);
|
const installedPath = tc.find(constants_1.TOOL_CACHE_NAME, resolvedVersion, arch);
|
||||||
return { installedPath, version: resolvedVersion };
|
return { installedPath, version: resolvedVersion };
|
||||||
}
|
}
|
||||||
async function downloadVersionFromGithub(platform, arch, version, checkSum, githubToken) {
|
async function downloadVersionFromGithub(serverUrl, platform, arch, version, checkSum, githubToken) {
|
||||||
const artifact = `uv-${arch}-${platform}`;
|
const artifact = `uv-${arch}-${platform}`;
|
||||||
const extension = getExtension(platform);
|
const extension = getExtension(platform);
|
||||||
const downloadUrl = `https://github.com/${constants_1.OWNER}/${constants_1.REPO}/releases/download/${version}/${artifact}${extension}`;
|
const downloadUrl = `${serverUrl}/${constants_1.OWNER}/${constants_1.REPO}/releases/download/${version}/${artifact}${extension}`;
|
||||||
return await downloadVersion(downloadUrl, artifact, platform, arch, version, checkSum, githubToken);
|
return await downloadVersion(downloadUrl, artifact, platform, arch, version, checkSum, githubToken);
|
||||||
}
|
}
|
||||||
async function downloadVersionFromManifest(manifestUrl, platform, arch, version, checkSum, githubToken) {
|
async function downloadVersionFromManifest(manifestUrl, platform, arch, version, checkSum, githubToken) {
|
||||||
const downloadUrl = await (0, version_manifest_1.getDownloadUrl)(manifestUrl, version, arch, platform);
|
const downloadUrl = await (0, version_manifest_1.getDownloadUrl)(manifestUrl, version, arch, platform);
|
||||||
if (!downloadUrl) {
|
if (!downloadUrl) {
|
||||||
core.info(`manifest-file does not contain version ${version}, arch ${arch}, platform ${platform}. Falling back to GitHub releases.`);
|
core.info(`manifest-file does not contain version ${version}, arch ${arch}, platform ${platform}. Falling back to GitHub releases.`);
|
||||||
return await downloadVersionFromGithub(platform, arch, version, checkSum, githubToken);
|
return await downloadVersionFromGithub("https://github.com", platform, arch, version, checkSum, githubToken);
|
||||||
}
|
}
|
||||||
return await downloadVersion(downloadUrl, `uv-${arch}-${platform}`, platform, arch, version, checkSum, githubToken);
|
return await downloadVersion(downloadUrl, `uv-${arch}-${platform}`, platform, arch, version, checkSum, githubToken);
|
||||||
}
|
}
|
||||||
@@ -129037,29 +128018,20 @@ function getExtension(platform) {
|
|||||||
async function resolveVersion(versionInput, manifestFile, githubToken) {
|
async function resolveVersion(versionInput, manifestFile, githubToken) {
|
||||||
core.debug(`Resolving version: ${versionInput}`);
|
core.debug(`Resolving version: ${versionInput}`);
|
||||||
let version;
|
let version;
|
||||||
const isSimpleMinimumVersionSpecifier = versionInput.includes(">") && !versionInput.includes(",");
|
|
||||||
if (isSimpleMinimumVersionSpecifier) {
|
|
||||||
core.info("Found minimum version specifier, using latest version");
|
|
||||||
}
|
|
||||||
if (manifestFile) {
|
if (manifestFile) {
|
||||||
version =
|
version =
|
||||||
versionInput === "latest" || isSimpleMinimumVersionSpecifier
|
versionInput === "latest"
|
||||||
? await (0, version_manifest_1.getLatestKnownVersion)(manifestFile)
|
? await (0, version_manifest_1.getLatestKnownVersion)(manifestFile)
|
||||||
: versionInput;
|
: versionInput;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
version =
|
version =
|
||||||
versionInput === "latest" || isSimpleMinimumVersionSpecifier
|
versionInput === "latest"
|
||||||
? await getLatestVersion(githubToken)
|
? await getLatestVersion(githubToken)
|
||||||
: versionInput;
|
: versionInput;
|
||||||
}
|
}
|
||||||
if (tc.isExplicitVersion(version)) {
|
if (tc.isExplicitVersion(version)) {
|
||||||
core.debug(`Version ${version} is an explicit version.`);
|
core.debug(`Version ${version} is an explicit version.`);
|
||||||
if (isSimpleMinimumVersionSpecifier) {
|
|
||||||
if (!pep440.satisfies(version, versionInput)) {
|
|
||||||
throw new Error(`No version found for ${versionInput}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
const availableVersions = await getAvailableVersions(githubToken);
|
const availableVersions = await getAvailableVersions(githubToken);
|
||||||
@@ -129387,8 +128359,6 @@ const core = __importStar(__nccwpck_require__(37484));
|
|||||||
const exec = __importStar(__nccwpck_require__(95236));
|
const exec = __importStar(__nccwpck_require__(95236));
|
||||||
const restore_cache_1 = __nccwpck_require__(95391);
|
const restore_cache_1 = __nccwpck_require__(95391);
|
||||||
const download_version_1 = __nccwpck_require__(28255);
|
const download_version_1 = __nccwpck_require__(28255);
|
||||||
const config_file_1 = __nccwpck_require__(27846);
|
|
||||||
const constants_1 = __nccwpck_require__(56156);
|
|
||||||
const inputs_1 = __nccwpck_require__(9612);
|
const inputs_1 = __nccwpck_require__(9612);
|
||||||
const platforms_1 = __nccwpck_require__(98361);
|
const platforms_1 = __nccwpck_require__(98361);
|
||||||
const resolve_1 = __nccwpck_require__(36772);
|
const resolve_1 = __nccwpck_require__(36772);
|
||||||
@@ -129410,9 +128380,8 @@ async function run() {
|
|||||||
setupPython();
|
setupPython();
|
||||||
await activateEnvironment();
|
await activateEnvironment();
|
||||||
addMatchers();
|
addMatchers();
|
||||||
setCacheDir();
|
setCacheDir(inputs_1.cacheLocalPath);
|
||||||
core.setOutput("uv-version", setupResult.version);
|
core.setOutput("uv-version", setupResult.version);
|
||||||
core.saveState(constants_1.STATE_UV_VERSION, setupResult.version);
|
|
||||||
core.info(`Successfully installed uv version ${setupResult.version}`);
|
core.info(`Successfully installed uv version ${setupResult.version}`);
|
||||||
if (inputs_1.enableCache) {
|
if (inputs_1.enableCache) {
|
||||||
await (0, restore_cache_1.restoreCache)();
|
await (0, restore_cache_1.restoreCache)();
|
||||||
@@ -129443,7 +128412,14 @@ async function setupUv(platform, arch, checkSum, githubToken) {
|
|||||||
version: toolCacheResult.version,
|
version: toolCacheResult.version,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const downloadVersionResult = await (0, download_version_1.downloadVersionFromManifest)(inputs_1.manifestFile, platform, arch, resolvedVersion, checkSum, githubToken);
|
let downloadVersionResult;
|
||||||
|
if (inputs_1.serverUrl !== "https://github.com") {
|
||||||
|
core.warning("The input server-url is deprecated. Please use manifest-file instead.");
|
||||||
|
downloadVersionResult = await (0, download_version_1.downloadVersionFromGithub)(inputs_1.serverUrl, platform, arch, resolvedVersion, checkSum, githubToken);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
downloadVersionResult = await (0, download_version_1.downloadVersionFromManifest)(inputs_1.manifestFile, platform, arch, resolvedVersion, checkSum, githubToken);
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
uvDir: downloadVersionResult.cachedToolDir,
|
uvDir: downloadVersionResult.cachedToolDir,
|
||||||
version: downloadVersionResult.version,
|
version: downloadVersionResult.version,
|
||||||
@@ -129469,33 +128445,18 @@ async function determineVersion(manifestFile) {
|
|||||||
}
|
}
|
||||||
function addUvToPathAndOutput(cachedPath) {
|
function addUvToPathAndOutput(cachedPath) {
|
||||||
core.setOutput("uv-path", `${cachedPath}${path.sep}uv`);
|
core.setOutput("uv-path", `${cachedPath}${path.sep}uv`);
|
||||||
core.saveState(constants_1.STATE_UV_PATH, `${cachedPath}${path.sep}uv`);
|
|
||||||
core.setOutput("uvx-path", `${cachedPath}${path.sep}uvx`);
|
core.setOutput("uvx-path", `${cachedPath}${path.sep}uvx`);
|
||||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
core.addPath(cachedPath);
|
||||||
core.info("UV_NO_MODIFY_PATH is set, not modifying PATH");
|
core.info(`Added ${cachedPath} to the path`);
|
||||||
}
|
|
||||||
else {
|
|
||||||
core.addPath(cachedPath);
|
|
||||||
core.info(`Added ${cachedPath} to the path`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function addToolBinToPath() {
|
function addToolBinToPath() {
|
||||||
if (inputs_1.toolBinDir !== undefined) {
|
if (inputs_1.toolBinDir !== undefined) {
|
||||||
core.exportVariable("UV_TOOL_BIN_DIR", inputs_1.toolBinDir);
|
core.exportVariable("UV_TOOL_BIN_DIR", inputs_1.toolBinDir);
|
||||||
core.info(`Set UV_TOOL_BIN_DIR to ${inputs_1.toolBinDir}`);
|
core.info(`Set UV_TOOL_BIN_DIR to ${inputs_1.toolBinDir}`);
|
||||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
core.addPath(inputs_1.toolBinDir);
|
||||||
core.info(`UV_NO_MODIFY_PATH is set, not adding ${inputs_1.toolBinDir} to path`);
|
core.info(`Added ${inputs_1.toolBinDir} to the path`);
|
||||||
}
|
|
||||||
else {
|
|
||||||
core.addPath(inputs_1.toolBinDir);
|
|
||||||
core.info(`Added ${inputs_1.toolBinDir} to the path`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
|
||||||
core.info("UV_NO_MODIFY_PATH is set, not adding user local bin to path");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (process.env.XDG_BIN_HOME !== undefined) {
|
if (process.env.XDG_BIN_HOME !== undefined) {
|
||||||
core.addPath(process.env.XDG_BIN_HOME);
|
core.addPath(process.env.XDG_BIN_HOME);
|
||||||
core.info(`Added ${process.env.XDG_BIN_HOME} to the path`);
|
core.info(`Added ${process.env.XDG_BIN_HOME} to the path`);
|
||||||
@@ -129524,9 +128485,6 @@ function setupPython() {
|
|||||||
}
|
}
|
||||||
async function activateEnvironment() {
|
async function activateEnvironment() {
|
||||||
if (inputs_1.activateEnvironment) {
|
if (inputs_1.activateEnvironment) {
|
||||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
|
||||||
throw new Error("UV_NO_MODIFY_PATH and activate-environment cannot be used together.");
|
|
||||||
}
|
|
||||||
const execArgs = ["venv", ".venv", "--directory", inputs_1.workingDirectory];
|
const execArgs = ["venv", ".venv", "--directory", inputs_1.workingDirectory];
|
||||||
core.info("Activating python venv...");
|
core.info("Activating python venv...");
|
||||||
await exec.exec("uv", execArgs);
|
await exec.exec("uv", execArgs);
|
||||||
@@ -129538,16 +128496,9 @@ async function activateEnvironment() {
|
|||||||
core.exportVariable("VIRTUAL_ENV", path.resolve(`${inputs_1.workingDirectory}${path.sep}.venv`));
|
core.exportVariable("VIRTUAL_ENV", path.resolve(`${inputs_1.workingDirectory}${path.sep}.venv`));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function setCacheDir() {
|
function setCacheDir(cacheLocalPath) {
|
||||||
if (inputs_1.enableCache) {
|
core.exportVariable("UV_CACHE_DIR", cacheLocalPath);
|
||||||
const cacheDirFromConfig = (0, config_file_1.getConfigValueFromTomlFile)("", "cache-dir");
|
core.info(`Set UV_CACHE_DIR to ${cacheLocalPath}`);
|
||||||
if (cacheDirFromConfig !== undefined) {
|
|
||||||
core.info("Using cache-dir from uv config file, not modifying UV_CACHE_DIR");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
core.exportVariable("UV_CACHE_DIR", inputs_1.cacheLocalPath);
|
|
||||||
core.info(`Set UV_CACHE_DIR to ${inputs_1.cacheLocalPath}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function addMatchers() {
|
function addMatchers() {
|
||||||
if (inputs_1.addProblemMatchers) {
|
if (inputs_1.addProblemMatchers) {
|
||||||
@@ -129558,67 +128509,6 @@ function addMatchers() {
|
|||||||
run();
|
run();
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 27846:
|
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
o[k2] = m[k];
|
|
||||||
}));
|
|
||||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
||||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
||||||
}) : function(o, v) {
|
|
||||||
o["default"] = v;
|
|
||||||
});
|
|
||||||
var __importStar = (this && this.__importStar) || (function () {
|
|
||||||
var ownKeys = function(o) {
|
|
||||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
||||||
var ar = [];
|
|
||||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
||||||
return ar;
|
|
||||||
};
|
|
||||||
return ownKeys(o);
|
|
||||||
};
|
|
||||||
return function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.getConfigValueFromTomlFile = getConfigValueFromTomlFile;
|
|
||||||
const node_fs_1 = __importDefault(__nccwpck_require__(73024));
|
|
||||||
const toml = __importStar(__nccwpck_require__(27106));
|
|
||||||
function getConfigValueFromTomlFile(filePath, key) {
|
|
||||||
if (!node_fs_1.default.existsSync(filePath) || !filePath.endsWith(".toml")) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
const fileContent = node_fs_1.default.readFileSync(filePath, "utf-8");
|
|
||||||
if (filePath.endsWith("pyproject.toml")) {
|
|
||||||
const tomlContent = toml.parse(fileContent);
|
|
||||||
return tomlContent?.tool?.uv?.[key];
|
|
||||||
}
|
|
||||||
const tomlContent = toml.parse(fileContent);
|
|
||||||
return tomlContent[key];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 56156:
|
/***/ 56156:
|
||||||
@@ -129627,12 +128517,10 @@ function getConfigValueFromTomlFile(filePath, key) {
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.STATE_UV_VERSION = exports.STATE_UV_PATH = exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
||||||
exports.REPO = "uv";
|
exports.REPO = "uv";
|
||||||
exports.OWNER = "astral-sh";
|
exports.OWNER = "astral-sh";
|
||||||
exports.TOOL_CACHE_NAME = "uv";
|
exports.TOOL_CACHE_NAME = "uv";
|
||||||
exports.STATE_UV_PATH = "uv-path";
|
|
||||||
exports.STATE_UV_VERSION = "uv-version";
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -129708,10 +128596,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
|
exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.serverUrl = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
|
||||||
const node_path_1 = __importDefault(__nccwpck_require__(76760));
|
const node_path_1 = __importDefault(__nccwpck_require__(76760));
|
||||||
const core = __importStar(__nccwpck_require__(37484));
|
const core = __importStar(__nccwpck_require__(37484));
|
||||||
const config_file_1 = __nccwpck_require__(27846);
|
|
||||||
exports.workingDirectory = core.getInput("working-directory");
|
exports.workingDirectory = core.getInput("working-directory");
|
||||||
exports.version = core.getInput("version");
|
exports.version = core.getInput("version");
|
||||||
exports.versionFile = getVersionFile();
|
exports.versionFile = getVersionFile();
|
||||||
@@ -129719,8 +128606,6 @@ exports.pythonVersion = core.getInput("python-version");
|
|||||||
exports.activateEnvironment = core.getBooleanInput("activate-environment");
|
exports.activateEnvironment = core.getBooleanInput("activate-environment");
|
||||||
exports.checkSum = core.getInput("checksum");
|
exports.checkSum = core.getInput("checksum");
|
||||||
exports.enableCache = getEnableCache();
|
exports.enableCache = getEnableCache();
|
||||||
exports.restoreCache = core.getInput("restore-cache") === "true";
|
|
||||||
exports.saveCache = core.getInput("save-cache") === "true";
|
|
||||||
exports.cacheSuffix = core.getInput("cache-suffix") || "";
|
exports.cacheSuffix = core.getInput("cache-suffix") || "";
|
||||||
exports.cacheLocalPath = getCacheLocalPath();
|
exports.cacheLocalPath = getCacheLocalPath();
|
||||||
exports.cacheDependencyGlob = getCacheDependencyGlob();
|
exports.cacheDependencyGlob = getCacheDependencyGlob();
|
||||||
@@ -129729,6 +128614,7 @@ exports.ignoreNothingToCache = core.getInput("ignore-nothing-to-cache") === "tru
|
|||||||
exports.ignoreEmptyWorkdir = core.getInput("ignore-empty-workdir") === "true";
|
exports.ignoreEmptyWorkdir = core.getInput("ignore-empty-workdir") === "true";
|
||||||
exports.toolBinDir = getToolBinDir();
|
exports.toolBinDir = getToolBinDir();
|
||||||
exports.toolDir = getToolDir();
|
exports.toolDir = getToolDir();
|
||||||
|
exports.serverUrl = core.getInput("server-url");
|
||||||
exports.githubToken = core.getInput("github-token");
|
exports.githubToken = core.getInput("github-token");
|
||||||
exports.manifestFile = getManifestFile();
|
exports.manifestFile = getManifestFile();
|
||||||
exports.addProblemMatchers = core.getInput("add-problem-matchers") === "true";
|
exports.addProblemMatchers = core.getInput("add-problem-matchers") === "true";
|
||||||
@@ -129781,14 +128667,6 @@ function getCacheLocalPath() {
|
|||||||
const tildeExpanded = expandTilde(cacheLocalPathInput);
|
const tildeExpanded = expandTilde(cacheLocalPathInput);
|
||||||
return resolveRelativePath(tildeExpanded);
|
return resolveRelativePath(tildeExpanded);
|
||||||
}
|
}
|
||||||
const cacheDirFromConfig = getCacheDirFromConfig();
|
|
||||||
if (cacheDirFromConfig !== undefined) {
|
|
||||||
return cacheDirFromConfig;
|
|
||||||
}
|
|
||||||
if (process.env.UV_CACHE_DIR !== undefined) {
|
|
||||||
core.info(`UV_CACHE_DIR is already set to ${process.env.UV_CACHE_DIR}`);
|
|
||||||
return process.env.UV_CACHE_DIR;
|
|
||||||
}
|
|
||||||
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
|
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
|
||||||
if (process.env.RUNNER_TEMP !== undefined) {
|
if (process.env.RUNNER_TEMP !== undefined) {
|
||||||
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}setup-uv-cache`;
|
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}setup-uv-cache`;
|
||||||
@@ -129800,24 +128678,6 @@ function getCacheLocalPath() {
|
|||||||
}
|
}
|
||||||
return `${process.env.HOME}${node_path_1.default.sep}.cache${node_path_1.default.sep}uv`;
|
return `${process.env.HOME}${node_path_1.default.sep}.cache${node_path_1.default.sep}uv`;
|
||||||
}
|
}
|
||||||
function getCacheDirFromConfig() {
|
|
||||||
for (const filePath of [exports.versionFile, "uv.toml", "pyproject.toml"]) {
|
|
||||||
const resolvedPath = resolveRelativePath(filePath);
|
|
||||||
try {
|
|
||||||
const cacheDir = (0, config_file_1.getConfigValueFromTomlFile)(resolvedPath, "cache-dir");
|
|
||||||
if (cacheDir !== undefined) {
|
|
||||||
core.info(`Found cache-dir in ${resolvedPath}: ${cacheDir}`);
|
|
||||||
return cacheDir;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
const message = err.message;
|
|
||||||
core.warning(`Error while parsing ${filePath}: ${message}`);
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
function getCacheDependencyGlob() {
|
function getCacheDependencyGlob() {
|
||||||
const cacheDependencyGlobInput = core.getInput("cache-dependency-glob");
|
const cacheDependencyGlobInput = core.getInput("cache-dependency-glob");
|
||||||
if (cacheDependencyGlobInput !== "") {
|
if (cacheDependencyGlobInput !== "") {
|
||||||
@@ -129869,8 +128729,7 @@ const DEFAULTS = {
|
|||||||
baseUrl: "https://api.github.com",
|
baseUrl: "https://api.github.com",
|
||||||
userAgent: "setup-uv",
|
userAgent: "setup-uv",
|
||||||
};
|
};
|
||||||
const OctokitWithPlugins = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.legacyRestEndpointMethods);
|
exports.Octokit = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.legacyRestEndpointMethods).defaults(function buildDefaults(options) {
|
||||||
exports.Octokit = OctokitWithPlugins.defaults(function buildDefaults(options) {
|
|
||||||
return {
|
return {
|
||||||
...DEFAULTS,
|
...DEFAULTS,
|
||||||
...options,
|
...options,
|
||||||
@@ -129984,6 +128843,67 @@ async function isMuslOs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 9931:
|
||||||
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||||
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||||
|
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||||
|
}
|
||||||
|
Object.defineProperty(o, k2, desc);
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
|
var __importStar = (this && this.__importStar) || (function () {
|
||||||
|
var ownKeys = function(o) {
|
||||||
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||||
|
var ar = [];
|
||||||
|
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||||
|
return ar;
|
||||||
|
};
|
||||||
|
return ownKeys(o);
|
||||||
|
};
|
||||||
|
return function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
exports.getRequiredVersionFromConfigFile = getRequiredVersionFromConfigFile;
|
||||||
|
const node_fs_1 = __importDefault(__nccwpck_require__(73024));
|
||||||
|
const toml = __importStar(__nccwpck_require__(27106));
|
||||||
|
function getRequiredVersionFromConfigFile(filePath) {
|
||||||
|
if (!filePath.endsWith(".toml")) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const fileContent = node_fs_1.default.readFileSync(filePath, "utf-8");
|
||||||
|
if (filePath.endsWith("pyproject.toml")) {
|
||||||
|
const tomlContent = toml.parse(fileContent);
|
||||||
|
return tomlContent?.tool?.uv?.["required-version"];
|
||||||
|
}
|
||||||
|
const tomlContent = toml.parse(fileContent);
|
||||||
|
return tomlContent["required-version"];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 4569:
|
/***/ 4569:
|
||||||
@@ -130103,7 +129023,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||||||
exports.getUvVersionFromFile = getUvVersionFromFile;
|
exports.getUvVersionFromFile = getUvVersionFromFile;
|
||||||
const node_fs_1 = __importDefault(__nccwpck_require__(73024));
|
const node_fs_1 = __importDefault(__nccwpck_require__(73024));
|
||||||
const core = __importStar(__nccwpck_require__(37484));
|
const core = __importStar(__nccwpck_require__(37484));
|
||||||
const config_file_1 = __nccwpck_require__(27846);
|
const config_file_1 = __nccwpck_require__(9931);
|
||||||
const requirements_file_1 = __nccwpck_require__(4569);
|
const requirements_file_1 = __nccwpck_require__(4569);
|
||||||
const tool_versions_file_1 = __nccwpck_require__(4895);
|
const tool_versions_file_1 = __nccwpck_require__(4895);
|
||||||
function getUvVersionFromFile(filePath) {
|
function getUvVersionFromFile(filePath) {
|
||||||
@@ -130116,7 +129036,7 @@ function getUvVersionFromFile(filePath) {
|
|||||||
try {
|
try {
|
||||||
uvVersion = (0, tool_versions_file_1.getUvVersionFromToolVersions)(filePath);
|
uvVersion = (0, tool_versions_file_1.getUvVersionFromToolVersions)(filePath);
|
||||||
if (uvVersion === undefined) {
|
if (uvVersion === undefined) {
|
||||||
uvVersion = (0, config_file_1.getConfigValueFromTomlFile)(filePath, "required-version");
|
uvVersion = (0, config_file_1.getRequiredVersionFromConfigFile)(filePath);
|
||||||
}
|
}
|
||||||
if (uvVersion === undefined) {
|
if (uvVersion === undefined) {
|
||||||
uvVersion = (0, requirements_file_1.getUvVersionFromRequirementsFile)(filePath);
|
uvVersion = (0, requirements_file_1.getUvVersionFromRequirementsFile)(filePath);
|
||||||
@@ -133915,7 +132835,7 @@ class RequestError extends Error {
|
|||||||
|
|
||||||
|
|
||||||
// pkg/dist-src/version.js
|
// pkg/dist-src/version.js
|
||||||
var dist_bundle_VERSION = "10.0.5";
|
var dist_bundle_VERSION = "0.0.0-development";
|
||||||
|
|
||||||
// pkg/dist-src/defaults.js
|
// pkg/dist-src/defaults.js
|
||||||
var defaults_default = {
|
var defaults_default = {
|
||||||
@@ -134286,7 +133206,7 @@ var createTokenAuth = function createTokenAuth2(token) {
|
|||||||
|
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js
|
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js
|
||||||
const version_VERSION = "7.0.5";
|
const version_VERSION = "7.0.3";
|
||||||
|
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js
|
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js
|
||||||
@@ -134860,7 +133780,7 @@ __nccwpck_require__.d(__webpack_exports__, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
|
;// CONCATENATED MODULE: ./node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
|
||||||
const VERSION = "16.1.0";
|
const VERSION = "16.0.0";
|
||||||
|
|
||||||
//# sourceMappingURL=version.js.map
|
//# sourceMappingURL=version.js.map
|
||||||
|
|
||||||
@@ -135674,20 +134594,11 @@ const Endpoints = {
|
|||||||
removeSelectedRepoFromOrgSecret: [
|
removeSelectedRepoFromOrgSecret: [
|
||||||
"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"
|
"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"
|
||||||
],
|
],
|
||||||
repositoryAccessForOrg: [
|
|
||||||
"GET /organizations/{org}/dependabot/repository-access"
|
|
||||||
],
|
|
||||||
setRepositoryAccessDefaultLevel: [
|
|
||||||
"PUT /organizations/{org}/dependabot/repository-access/default-level"
|
|
||||||
],
|
|
||||||
setSelectedReposForOrgSecret: [
|
setSelectedReposForOrgSecret: [
|
||||||
"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"
|
"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"
|
||||||
],
|
],
|
||||||
updateAlert: [
|
updateAlert: [
|
||||||
"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"
|
"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"
|
||||||
],
|
|
||||||
updateRepositoryAccessForOrg: [
|
|
||||||
"PATCH /organizations/{org}/dependabot/repository-access"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
dependencyGraph: {
|
dependencyGraph: {
|
||||||
@@ -135793,9 +134704,6 @@ const Endpoints = {
|
|||||||
addAssignees: [
|
addAssignees: [
|
||||||
"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"
|
"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"
|
||||||
],
|
],
|
||||||
addBlockedByDependency: [
|
|
||||||
"POST /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"
|
|
||||||
],
|
|
||||||
addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
||||||
addSubIssue: [
|
addSubIssue: [
|
||||||
"POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"
|
"POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"
|
||||||
@@ -135822,17 +134730,10 @@ const Endpoints = {
|
|||||||
getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"],
|
getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"],
|
||||||
getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"],
|
getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"],
|
||||||
getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],
|
getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],
|
||||||
getParent: ["GET /repos/{owner}/{repo}/issues/{issue_number}/parent"],
|
|
||||||
list: ["GET /issues"],
|
list: ["GET /issues"],
|
||||||
listAssignees: ["GET /repos/{owner}/{repo}/assignees"],
|
listAssignees: ["GET /repos/{owner}/{repo}/assignees"],
|
||||||
listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],
|
listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],
|
||||||
listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"],
|
listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"],
|
||||||
listDependenciesBlockedBy: [
|
|
||||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"
|
|
||||||
],
|
|
||||||
listDependenciesBlocking: [
|
|
||||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking"
|
|
||||||
],
|
|
||||||
listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],
|
listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],
|
||||||
listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"],
|
listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"],
|
||||||
listEventsForTimeline: [
|
listEventsForTimeline: [
|
||||||
@@ -135859,9 +134760,6 @@ const Endpoints = {
|
|||||||
removeAssignees: [
|
removeAssignees: [
|
||||||
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"
|
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"
|
||||||
],
|
],
|
||||||
removeDependencyBlockedBy: [
|
|
||||||
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}"
|
|
||||||
],
|
|
||||||
removeLabel: [
|
removeLabel: [
|
||||||
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"
|
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"
|
||||||
],
|
],
|
||||||
@@ -135964,9 +134862,6 @@ const Endpoints = {
|
|||||||
convertMemberToOutsideCollaborator: [
|
convertMemberToOutsideCollaborator: [
|
||||||
"PUT /orgs/{org}/outside_collaborators/{username}"
|
"PUT /orgs/{org}/outside_collaborators/{username}"
|
||||||
],
|
],
|
||||||
createArtifactStorageRecord: [
|
|
||||||
"POST /orgs/{org}/artifacts/metadata/storage-record"
|
|
||||||
],
|
|
||||||
createInvitation: ["POST /orgs/{org}/invitations"],
|
createInvitation: ["POST /orgs/{org}/invitations"],
|
||||||
createIssueType: ["POST /orgs/{org}/issue-types"],
|
createIssueType: ["POST /orgs/{org}/issue-types"],
|
||||||
createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"],
|
createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"],
|
||||||
@@ -135978,15 +134873,15 @@ const Endpoints = {
|
|||||||
],
|
],
|
||||||
createWebhook: ["POST /orgs/{org}/hooks"],
|
createWebhook: ["POST /orgs/{org}/hooks"],
|
||||||
delete: ["DELETE /orgs/{org}"],
|
delete: ["DELETE /orgs/{org}"],
|
||||||
deleteAttestationsBulk: ["POST /orgs/{org}/attestations/delete-request"],
|
|
||||||
deleteAttestationsById: [
|
|
||||||
"DELETE /orgs/{org}/attestations/{attestation_id}"
|
|
||||||
],
|
|
||||||
deleteAttestationsBySubjectDigest: [
|
|
||||||
"DELETE /orgs/{org}/attestations/digest/{subject_digest}"
|
|
||||||
],
|
|
||||||
deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"],
|
deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"],
|
||||||
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
|
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
|
||||||
|
enableOrDisableSecurityProductOnAllOrgRepos: [
|
||||||
|
"POST /orgs/{org}/{security_product}/{enablement}",
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
deprecated: "octokit.rest.orgs.enableOrDisableSecurityProductOnAllOrgRepos() is deprecated, see https://docs.github.com/rest/orgs/orgs#enable-or-disable-a-security-feature-for-an-organization"
|
||||||
|
}
|
||||||
|
],
|
||||||
get: ["GET /orgs/{org}"],
|
get: ["GET /orgs/{org}"],
|
||||||
getAllCustomProperties: ["GET /orgs/{org}/properties/schema"],
|
getAllCustomProperties: ["GET /orgs/{org}/properties/schema"],
|
||||||
getCustomProperty: [
|
getCustomProperty: [
|
||||||
@@ -136006,13 +134901,7 @@ const Endpoints = {
|
|||||||
],
|
],
|
||||||
list: ["GET /organizations"],
|
list: ["GET /organizations"],
|
||||||
listAppInstallations: ["GET /orgs/{org}/installations"],
|
listAppInstallations: ["GET /orgs/{org}/installations"],
|
||||||
listArtifactStorageRecords: [
|
|
||||||
"GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records"
|
|
||||||
],
|
|
||||||
listAttestations: ["GET /orgs/{org}/attestations/{subject_digest}"],
|
listAttestations: ["GET /orgs/{org}/attestations/{subject_digest}"],
|
||||||
listAttestationsBulk: [
|
|
||||||
"POST /orgs/{org}/attestations/bulk-list{?per_page,before,after}"
|
|
||||||
],
|
|
||||||
listBlockedUsers: ["GET /orgs/{org}/blocks"],
|
listBlockedUsers: ["GET /orgs/{org}/blocks"],
|
||||||
listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"],
|
listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"],
|
||||||
listFailedInvitations: ["GET /orgs/{org}/failed_invitations"],
|
listFailedInvitations: ["GET /orgs/{org}/failed_invitations"],
|
||||||
@@ -136207,44 +135096,6 @@ const Endpoints = {
|
|||||||
"PATCH /orgs/{org}/private-registries/{secret_name}"
|
"PATCH /orgs/{org}/private-registries/{secret_name}"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
projects: {
|
|
||||||
addItemForOrg: ["POST /orgs/{org}/projectsV2/{project_number}/items"],
|
|
||||||
addItemForUser: ["POST /users/{user_id}/projectsV2/{project_number}/items"],
|
|
||||||
deleteItemForOrg: [
|
|
||||||
"DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}"
|
|
||||||
],
|
|
||||||
deleteItemForUser: [
|
|
||||||
"DELETE /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
|
|
||||||
],
|
|
||||||
getFieldForOrg: [
|
|
||||||
"GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id}"
|
|
||||||
],
|
|
||||||
getFieldForUser: [
|
|
||||||
"GET /users/{user_id}/projectsV2/{project_number}/fields/{field_id}"
|
|
||||||
],
|
|
||||||
getForOrg: ["GET /orgs/{org}/projectsV2/{project_number}"],
|
|
||||||
getForUser: ["GET /users/{user_id}/projectsV2/{project_number}"],
|
|
||||||
getOrgItem: ["GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],
|
|
||||||
getUserItem: [
|
|
||||||
"GET /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
|
|
||||||
],
|
|
||||||
listFieldsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/fields"],
|
|
||||||
listFieldsForUser: [
|
|
||||||
"GET /users/{user_id}/projectsV2/{project_number}/fields"
|
|
||||||
],
|
|
||||||
listForOrg: ["GET /orgs/{org}/projectsV2"],
|
|
||||||
listForUser: ["GET /users/{username}/projectsV2"],
|
|
||||||
listItemsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/items"],
|
|
||||||
listItemsForUser: [
|
|
||||||
"GET /users/{user_id}/projectsV2/{project_number}/items"
|
|
||||||
],
|
|
||||||
updateItemForOrg: [
|
|
||||||
"PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}"
|
|
||||||
],
|
|
||||||
updateItemForUser: [
|
|
||||||
"PATCH /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
pulls: {
|
pulls: {
|
||||||
checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
||||||
create: ["POST /repos/{owner}/{repo}/pulls"],
|
create: ["POST /repos/{owner}/{repo}/pulls"],
|
||||||
@@ -136823,14 +135674,8 @@ const Endpoints = {
|
|||||||
listLocationsForAlert: [
|
listLocationsForAlert: [
|
||||||
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"
|
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"
|
||||||
],
|
],
|
||||||
listOrgPatternConfigs: [
|
|
||||||
"GET /orgs/{org}/secret-scanning/pattern-configurations"
|
|
||||||
],
|
|
||||||
updateAlert: [
|
updateAlert: [
|
||||||
"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
|
"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
|
||||||
],
|
|
||||||
updateOrgPatternConfigs: [
|
|
||||||
"PATCH /orgs/{org}/secret-scanning/pattern-configurations"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
securityAdvisories: {
|
securityAdvisories: {
|
||||||
@@ -136940,15 +135785,6 @@ const Endpoints = {
|
|||||||
],
|
],
|
||||||
createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"],
|
createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"],
|
||||||
createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"],
|
createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"],
|
||||||
deleteAttestationsBulk: [
|
|
||||||
"POST /users/{username}/attestations/delete-request"
|
|
||||||
],
|
|
||||||
deleteAttestationsById: [
|
|
||||||
"DELETE /users/{username}/attestations/{attestation_id}"
|
|
||||||
],
|
|
||||||
deleteAttestationsBySubjectDigest: [
|
|
||||||
"DELETE /users/{username}/attestations/digest/{subject_digest}"
|
|
||||||
],
|
|
||||||
deleteEmailForAuthenticated: [
|
deleteEmailForAuthenticated: [
|
||||||
"DELETE /user/emails",
|
"DELETE /user/emails",
|
||||||
{},
|
{},
|
||||||
@@ -136993,9 +135829,6 @@ const Endpoints = {
|
|||||||
],
|
],
|
||||||
list: ["GET /users"],
|
list: ["GET /users"],
|
||||||
listAttestations: ["GET /users/{username}/attestations/{subject_digest}"],
|
listAttestations: ["GET /users/{username}/attestations/{subject_digest}"],
|
||||||
listAttestationsBulk: [
|
|
||||||
"POST /users/{username}/attestations/bulk-list{?per_page,before,after}"
|
|
||||||
],
|
|
||||||
listBlockedByAuthenticated: [
|
listBlockedByAuthenticated: [
|
||||||
"GET /user/blocks",
|
"GET /user/blocks",
|
||||||
{},
|
{},
|
||||||
|
|||||||
2343
dist/update-known-versions/index.js
generated
vendored
2343
dist/update-known-versions/index.js
generated
vendored
@@ -28310,14 +28310,16 @@ module.exports.setGlobalDispatcher = setGlobalDispatcher
|
|||||||
module.exports.getGlobalDispatcher = getGlobalDispatcher
|
module.exports.getGlobalDispatcher = getGlobalDispatcher
|
||||||
|
|
||||||
const fetchImpl = (__nccwpck_require__(4398).fetch)
|
const fetchImpl = (__nccwpck_require__(4398).fetch)
|
||||||
|
module.exports.fetch = async function fetch (init, options = undefined) {
|
||||||
module.exports.fetch = function fetch (init, options = undefined) {
|
try {
|
||||||
return fetchImpl(init, options).catch(err => {
|
return await fetchImpl(init, options)
|
||||||
|
} catch (err) {
|
||||||
if (err && typeof err === 'object') {
|
if (err && typeof err === 'object') {
|
||||||
Error.captureStackTrace(err)
|
Error.captureStackTrace(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
throw err
|
throw err
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
module.exports.Headers = __nccwpck_require__(660).Headers
|
module.exports.Headers = __nccwpck_require__(660).Headers
|
||||||
module.exports.Response = __nccwpck_require__(9051).Response
|
module.exports.Response = __nccwpck_require__(9051).Response
|
||||||
@@ -28332,6 +28334,8 @@ module.exports.getGlobalOrigin = getGlobalOrigin
|
|||||||
const { CacheStorage } = __nccwpck_require__(3245)
|
const { CacheStorage } = __nccwpck_require__(3245)
|
||||||
const { kConstruct } = __nccwpck_require__(6443)
|
const { kConstruct } = __nccwpck_require__(6443)
|
||||||
|
|
||||||
|
// Cache & CacheStorage are tightly coupled with fetch. Even if it may run
|
||||||
|
// in an older version of Node, it doesn't have any use without fetch.
|
||||||
module.exports.caches = new CacheStorage(kConstruct)
|
module.exports.caches = new CacheStorage(kConstruct)
|
||||||
|
|
||||||
const { deleteCookie, getCookies, getSetCookies, setCookie, parseCookie } = __nccwpck_require__(5090)
|
const { deleteCookie, getCookies, getSetCookies, setCookie, parseCookie } = __nccwpck_require__(5090)
|
||||||
@@ -28963,28 +28967,14 @@ class RequestHandler extends AsyncResource {
|
|||||||
this.callback = null
|
this.callback = null
|
||||||
this.res = res
|
this.res = res
|
||||||
if (callback !== null) {
|
if (callback !== null) {
|
||||||
try {
|
this.runInAsyncScope(callback, null, null, {
|
||||||
this.runInAsyncScope(callback, null, null, {
|
statusCode,
|
||||||
statusCode,
|
headers,
|
||||||
headers,
|
trailers: this.trailers,
|
||||||
trailers: this.trailers,
|
opaque,
|
||||||
opaque,
|
body: res,
|
||||||
body: res,
|
context
|
||||||
context
|
})
|
||||||
})
|
|
||||||
} catch (err) {
|
|
||||||
// If the callback throws synchronously, we need to handle it
|
|
||||||
// Remove reference to res to allow res being garbage collected
|
|
||||||
this.res = null
|
|
||||||
|
|
||||||
// Destroy the response stream
|
|
||||||
util.destroy(res.on('error', noop), err)
|
|
||||||
|
|
||||||
// Use queueMicrotask to re-throw the error so it reaches uncaughtException
|
|
||||||
queueMicrotask(() => {
|
|
||||||
throw err
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29678,26 +29668,24 @@ class BodyReadable extends Readable {
|
|||||||
* @param {AbortSignal} [opts.signal] An AbortSignal to cancel the dump.
|
* @param {AbortSignal} [opts.signal] An AbortSignal to cancel the dump.
|
||||||
* @returns {Promise<null>}
|
* @returns {Promise<null>}
|
||||||
*/
|
*/
|
||||||
dump (opts) {
|
async dump (opts) {
|
||||||
const signal = opts?.signal
|
const signal = opts?.signal
|
||||||
|
|
||||||
if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) {
|
if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) {
|
||||||
return Promise.reject(new InvalidArgumentError('signal must be an AbortSignal'))
|
throw new InvalidArgumentError('signal must be an AbortSignal')
|
||||||
}
|
}
|
||||||
|
|
||||||
const limit = opts?.limit && Number.isFinite(opts.limit)
|
const limit = opts?.limit && Number.isFinite(opts.limit)
|
||||||
? opts.limit
|
? opts.limit
|
||||||
: 128 * 1024
|
: 128 * 1024
|
||||||
|
|
||||||
if (signal?.aborted) {
|
signal?.throwIfAborted()
|
||||||
return Promise.reject(signal.reason ?? new AbortError())
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._readableState.closeEmitted) {
|
if (this._readableState.closeEmitted) {
|
||||||
return Promise.resolve(null)
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return await new Promise((resolve, reject) => {
|
||||||
if (
|
if (
|
||||||
(this[kContentLength] && (this[kContentLength] > limit)) ||
|
(this[kContentLength] && (this[kContentLength] > limit)) ||
|
||||||
this[kBytesRead] > limit
|
this[kBytesRead] > limit
|
||||||
@@ -31214,24 +31202,14 @@ module.exports = {
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
const kUndiciError = Symbol.for('undici.error.UND_ERR')
|
|
||||||
class UndiciError extends Error {
|
class UndiciError extends Error {
|
||||||
constructor (message, options) {
|
constructor (message, options) {
|
||||||
super(message, options)
|
super(message, options)
|
||||||
this.name = 'UndiciError'
|
this.name = 'UndiciError'
|
||||||
this.code = 'UND_ERR'
|
this.code = 'UND_ERR'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kUndiciError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kUndiciError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kConnectTimeoutError = Symbol.for('undici.error.UND_ERR_CONNECT_TIMEOUT')
|
|
||||||
class ConnectTimeoutError extends UndiciError {
|
class ConnectTimeoutError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31239,17 +31217,8 @@ class ConnectTimeoutError extends UndiciError {
|
|||||||
this.message = message || 'Connect Timeout Error'
|
this.message = message || 'Connect Timeout Error'
|
||||||
this.code = 'UND_ERR_CONNECT_TIMEOUT'
|
this.code = 'UND_ERR_CONNECT_TIMEOUT'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kConnectTimeoutError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kConnectTimeoutError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kHeadersTimeoutError = Symbol.for('undici.error.UND_ERR_HEADERS_TIMEOUT')
|
|
||||||
class HeadersTimeoutError extends UndiciError {
|
class HeadersTimeoutError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31257,17 +31226,8 @@ class HeadersTimeoutError extends UndiciError {
|
|||||||
this.message = message || 'Headers Timeout Error'
|
this.message = message || 'Headers Timeout Error'
|
||||||
this.code = 'UND_ERR_HEADERS_TIMEOUT'
|
this.code = 'UND_ERR_HEADERS_TIMEOUT'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kHeadersTimeoutError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kHeadersTimeoutError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kHeadersOverflowError = Symbol.for('undici.error.UND_ERR_HEADERS_OVERFLOW')
|
|
||||||
class HeadersOverflowError extends UndiciError {
|
class HeadersOverflowError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31275,17 +31235,8 @@ class HeadersOverflowError extends UndiciError {
|
|||||||
this.message = message || 'Headers Overflow Error'
|
this.message = message || 'Headers Overflow Error'
|
||||||
this.code = 'UND_ERR_HEADERS_OVERFLOW'
|
this.code = 'UND_ERR_HEADERS_OVERFLOW'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kHeadersOverflowError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kHeadersOverflowError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kBodyTimeoutError = Symbol.for('undici.error.UND_ERR_BODY_TIMEOUT')
|
|
||||||
class BodyTimeoutError extends UndiciError {
|
class BodyTimeoutError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31293,17 +31244,21 @@ class BodyTimeoutError extends UndiciError {
|
|||||||
this.message = message || 'Body Timeout Error'
|
this.message = message || 'Body Timeout Error'
|
||||||
this.code = 'UND_ERR_BODY_TIMEOUT'
|
this.code = 'UND_ERR_BODY_TIMEOUT'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
class ResponseStatusCodeError extends UndiciError {
|
||||||
return instance && instance[kBodyTimeoutError] === true
|
constructor (message, statusCode, headers, body) {
|
||||||
}
|
super(message)
|
||||||
|
this.name = 'ResponseStatusCodeError'
|
||||||
get [kBodyTimeoutError] () {
|
this.message = message || 'Response Status Code Error'
|
||||||
return true
|
this.code = 'UND_ERR_RESPONSE_STATUS_CODE'
|
||||||
|
this.body = body
|
||||||
|
this.status = statusCode
|
||||||
|
this.statusCode = statusCode
|
||||||
|
this.headers = headers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const kInvalidArgumentError = Symbol.for('undici.error.UND_ERR_INVALID_ARG')
|
|
||||||
class InvalidArgumentError extends UndiciError {
|
class InvalidArgumentError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31311,17 +31266,8 @@ class InvalidArgumentError extends UndiciError {
|
|||||||
this.message = message || 'Invalid Argument Error'
|
this.message = message || 'Invalid Argument Error'
|
||||||
this.code = 'UND_ERR_INVALID_ARG'
|
this.code = 'UND_ERR_INVALID_ARG'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kInvalidArgumentError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kInvalidArgumentError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kInvalidReturnValueError = Symbol.for('undici.error.UND_ERR_INVALID_RETURN_VALUE')
|
|
||||||
class InvalidReturnValueError extends UndiciError {
|
class InvalidReturnValueError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31329,35 +31275,16 @@ class InvalidReturnValueError extends UndiciError {
|
|||||||
this.message = message || 'Invalid Return Value Error'
|
this.message = message || 'Invalid Return Value Error'
|
||||||
this.code = 'UND_ERR_INVALID_RETURN_VALUE'
|
this.code = 'UND_ERR_INVALID_RETURN_VALUE'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kInvalidReturnValueError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kInvalidReturnValueError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kAbortError = Symbol.for('undici.error.UND_ERR_ABORT')
|
|
||||||
class AbortError extends UndiciError {
|
class AbortError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
this.name = 'AbortError'
|
this.name = 'AbortError'
|
||||||
this.message = message || 'The operation was aborted'
|
this.message = message || 'The operation was aborted'
|
||||||
this.code = 'UND_ERR_ABORT'
|
|
||||||
}
|
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kAbortError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kAbortError] () {
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const kRequestAbortedError = Symbol.for('undici.error.UND_ERR_ABORTED')
|
|
||||||
class RequestAbortedError extends AbortError {
|
class RequestAbortedError extends AbortError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31365,17 +31292,8 @@ class RequestAbortedError extends AbortError {
|
|||||||
this.message = message || 'Request aborted'
|
this.message = message || 'Request aborted'
|
||||||
this.code = 'UND_ERR_ABORTED'
|
this.code = 'UND_ERR_ABORTED'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kRequestAbortedError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kRequestAbortedError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kInformationalError = Symbol.for('undici.error.UND_ERR_INFO')
|
|
||||||
class InformationalError extends UndiciError {
|
class InformationalError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31383,17 +31301,8 @@ class InformationalError extends UndiciError {
|
|||||||
this.message = message || 'Request information'
|
this.message = message || 'Request information'
|
||||||
this.code = 'UND_ERR_INFO'
|
this.code = 'UND_ERR_INFO'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kInformationalError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kInformationalError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kRequestContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH')
|
|
||||||
class RequestContentLengthMismatchError extends UndiciError {
|
class RequestContentLengthMismatchError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31401,17 +31310,8 @@ class RequestContentLengthMismatchError extends UndiciError {
|
|||||||
this.message = message || 'Request body length does not match content-length header'
|
this.message = message || 'Request body length does not match content-length header'
|
||||||
this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
|
this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kRequestContentLengthMismatchError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kRequestContentLengthMismatchError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kResponseContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH')
|
|
||||||
class ResponseContentLengthMismatchError extends UndiciError {
|
class ResponseContentLengthMismatchError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31419,17 +31319,8 @@ class ResponseContentLengthMismatchError extends UndiciError {
|
|||||||
this.message = message || 'Response body length does not match content-length header'
|
this.message = message || 'Response body length does not match content-length header'
|
||||||
this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'
|
this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kResponseContentLengthMismatchError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kResponseContentLengthMismatchError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kClientDestroyedError = Symbol.for('undici.error.UND_ERR_DESTROYED')
|
|
||||||
class ClientDestroyedError extends UndiciError {
|
class ClientDestroyedError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31437,17 +31328,8 @@ class ClientDestroyedError extends UndiciError {
|
|||||||
this.message = message || 'The client is destroyed'
|
this.message = message || 'The client is destroyed'
|
||||||
this.code = 'UND_ERR_DESTROYED'
|
this.code = 'UND_ERR_DESTROYED'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kClientDestroyedError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kClientDestroyedError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kClientClosedError = Symbol.for('undici.error.UND_ERR_CLOSED')
|
|
||||||
class ClientClosedError extends UndiciError {
|
class ClientClosedError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31455,17 +31337,8 @@ class ClientClosedError extends UndiciError {
|
|||||||
this.message = message || 'The client is closed'
|
this.message = message || 'The client is closed'
|
||||||
this.code = 'UND_ERR_CLOSED'
|
this.code = 'UND_ERR_CLOSED'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kClientClosedError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kClientClosedError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kSocketError = Symbol.for('undici.error.UND_ERR_SOCKET')
|
|
||||||
class SocketError extends UndiciError {
|
class SocketError extends UndiciError {
|
||||||
constructor (message, socket) {
|
constructor (message, socket) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31474,17 +31347,8 @@ class SocketError extends UndiciError {
|
|||||||
this.code = 'UND_ERR_SOCKET'
|
this.code = 'UND_ERR_SOCKET'
|
||||||
this.socket = socket
|
this.socket = socket
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kSocketError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kSocketError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kNotSupportedError = Symbol.for('undici.error.UND_ERR_NOT_SUPPORTED')
|
|
||||||
class NotSupportedError extends UndiciError {
|
class NotSupportedError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31492,17 +31356,8 @@ class NotSupportedError extends UndiciError {
|
|||||||
this.message = message || 'Not supported error'
|
this.message = message || 'Not supported error'
|
||||||
this.code = 'UND_ERR_NOT_SUPPORTED'
|
this.code = 'UND_ERR_NOT_SUPPORTED'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kNotSupportedError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kNotSupportedError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kBalancedPoolMissingUpstreamError = Symbol.for('undici.error.UND_ERR_BPL_MISSING_UPSTREAM')
|
|
||||||
class BalancedPoolMissingUpstreamError extends UndiciError {
|
class BalancedPoolMissingUpstreamError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31510,17 +31365,8 @@ class BalancedPoolMissingUpstreamError extends UndiciError {
|
|||||||
this.message = message || 'No upstream has been added to the BalancedPool'
|
this.message = message || 'No upstream has been added to the BalancedPool'
|
||||||
this.code = 'UND_ERR_BPL_MISSING_UPSTREAM'
|
this.code = 'UND_ERR_BPL_MISSING_UPSTREAM'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kBalancedPoolMissingUpstreamError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kBalancedPoolMissingUpstreamError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kHTTPParserError = Symbol.for('undici.error.UND_ERR_HTTP_PARSER')
|
|
||||||
class HTTPParserError extends Error {
|
class HTTPParserError extends Error {
|
||||||
constructor (message, code, data) {
|
constructor (message, code, data) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31528,17 +31374,8 @@ class HTTPParserError extends Error {
|
|||||||
this.code = code ? `HPE_${code}` : undefined
|
this.code = code ? `HPE_${code}` : undefined
|
||||||
this.data = data ? data.toString() : undefined
|
this.data = data ? data.toString() : undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kHTTPParserError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kHTTPParserError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kResponseExceededMaxSizeError = Symbol.for('undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE')
|
|
||||||
class ResponseExceededMaxSizeError extends UndiciError {
|
class ResponseExceededMaxSizeError extends UndiciError {
|
||||||
constructor (message) {
|
constructor (message) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31546,17 +31383,8 @@ class ResponseExceededMaxSizeError extends UndiciError {
|
|||||||
this.message = message || 'Response content exceeded max size'
|
this.message = message || 'Response content exceeded max size'
|
||||||
this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE'
|
this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kResponseExceededMaxSizeError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kResponseExceededMaxSizeError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kRequestRetryError = Symbol.for('undici.error.UND_ERR_REQ_RETRY')
|
|
||||||
class RequestRetryError extends UndiciError {
|
class RequestRetryError extends UndiciError {
|
||||||
constructor (message, code, { headers, data }) {
|
constructor (message, code, { headers, data }) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31567,17 +31395,8 @@ class RequestRetryError extends UndiciError {
|
|||||||
this.data = data
|
this.data = data
|
||||||
this.headers = headers
|
this.headers = headers
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kRequestRetryError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kRequestRetryError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE')
|
|
||||||
class ResponseError extends UndiciError {
|
class ResponseError extends UndiciError {
|
||||||
constructor (message, code, { headers, body }) {
|
constructor (message, code, { headers, body }) {
|
||||||
super(message)
|
super(message)
|
||||||
@@ -31588,17 +31407,8 @@ class ResponseError extends UndiciError {
|
|||||||
this.body = body
|
this.body = body
|
||||||
this.headers = headers
|
this.headers = headers
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kResponseError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kResponseError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const kSecureProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_TLS')
|
|
||||||
class SecureProxyConnectionError extends UndiciError {
|
class SecureProxyConnectionError extends UndiciError {
|
||||||
constructor (cause, message, options = {}) {
|
constructor (cause, message, options = {}) {
|
||||||
super(message, { cause, ...options })
|
super(message, { cause, ...options })
|
||||||
@@ -31607,32 +31417,6 @@ class SecureProxyConnectionError extends UndiciError {
|
|||||||
this.code = 'UND_ERR_PRX_TLS'
|
this.code = 'UND_ERR_PRX_TLS'
|
||||||
this.cause = cause
|
this.cause = cause
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kSecureProxyConnectionError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kSecureProxyConnectionError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const kMaxOriginsReachedError = Symbol.for('undici.error.UND_ERR_MAX_ORIGINS_REACHED')
|
|
||||||
class MaxOriginsReachedError extends UndiciError {
|
|
||||||
constructor (message) {
|
|
||||||
super(message)
|
|
||||||
this.name = 'MaxOriginsReachedError'
|
|
||||||
this.message = message || 'Maximum allowed origins reached'
|
|
||||||
this.code = 'UND_ERR_MAX_ORIGINS_REACHED'
|
|
||||||
}
|
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kMaxOriginsReachedError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kMaxOriginsReachedError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -31644,6 +31428,7 @@ module.exports = {
|
|||||||
BodyTimeoutError,
|
BodyTimeoutError,
|
||||||
RequestContentLengthMismatchError,
|
RequestContentLengthMismatchError,
|
||||||
ConnectTimeoutError,
|
ConnectTimeoutError,
|
||||||
|
ResponseStatusCodeError,
|
||||||
InvalidArgumentError,
|
InvalidArgumentError,
|
||||||
InvalidReturnValueError,
|
InvalidReturnValueError,
|
||||||
RequestAbortedError,
|
RequestAbortedError,
|
||||||
@@ -31657,8 +31442,7 @@ module.exports = {
|
|||||||
ResponseExceededMaxSizeError,
|
ResponseExceededMaxSizeError,
|
||||||
RequestRetryError,
|
RequestRetryError,
|
||||||
ResponseError,
|
ResponseError,
|
||||||
SecureProxyConnectionError,
|
SecureProxyConnectionError
|
||||||
MaxOriginsReachedError
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -31687,8 +31471,7 @@ const {
|
|||||||
serializePathWithQuery,
|
serializePathWithQuery,
|
||||||
assertRequestHandler,
|
assertRequestHandler,
|
||||||
getServerName,
|
getServerName,
|
||||||
normalizedMethodRecords,
|
normalizedMethodRecords
|
||||||
getProtocolFromUrlString
|
|
||||||
} = __nccwpck_require__(3440)
|
} = __nccwpck_require__(3440)
|
||||||
const { channels } = __nccwpck_require__(2414)
|
const { channels } = __nccwpck_require__(2414)
|
||||||
const { headerNameLowerCasedRecord } = __nccwpck_require__(735)
|
const { headerNameLowerCasedRecord } = __nccwpck_require__(735)
|
||||||
@@ -31812,11 +31595,8 @@ class Request {
|
|||||||
|
|
||||||
this.path = query ? serializePathWithQuery(path, query) : path
|
this.path = query ? serializePathWithQuery(path, query) : path
|
||||||
|
|
||||||
// TODO: shall we maybe standardize it to an URL object?
|
|
||||||
this.origin = origin
|
this.origin = origin
|
||||||
|
|
||||||
this.protocol = getProtocolFromUrlString(origin)
|
|
||||||
|
|
||||||
this.idempotent = idempotent == null
|
this.idempotent = idempotent == null
|
||||||
? method === 'HEAD' || method === 'GET'
|
? method === 'HEAD' || method === 'GET'
|
||||||
: idempotent
|
: idempotent
|
||||||
@@ -32943,11 +32723,12 @@ function ReadableStreamFrom (iterable) {
|
|||||||
let iterator
|
let iterator
|
||||||
return new ReadableStream(
|
return new ReadableStream(
|
||||||
{
|
{
|
||||||
start () {
|
async start () {
|
||||||
iterator = iterable[Symbol.asyncIterator]()
|
iterator = iterable[Symbol.asyncIterator]()
|
||||||
},
|
},
|
||||||
pull (controller) {
|
pull (controller) {
|
||||||
return iterator.next().then(({ done, value }) => {
|
async function pull () {
|
||||||
|
const { done, value } = await iterator.next()
|
||||||
if (done) {
|
if (done) {
|
||||||
queueMicrotask(() => {
|
queueMicrotask(() => {
|
||||||
controller.close()
|
controller.close()
|
||||||
@@ -32958,13 +32739,15 @@ function ReadableStreamFrom (iterable) {
|
|||||||
if (buf.byteLength) {
|
if (buf.byteLength) {
|
||||||
controller.enqueue(new Uint8Array(buf))
|
controller.enqueue(new Uint8Array(buf))
|
||||||
} else {
|
} else {
|
||||||
return this.pull(controller)
|
return await pull()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
|
return pull()
|
||||||
},
|
},
|
||||||
cancel () {
|
async cancel () {
|
||||||
return iterator.return()
|
await iterator.return()
|
||||||
},
|
},
|
||||||
type: 'bytes'
|
type: 'bytes'
|
||||||
}
|
}
|
||||||
@@ -33210,30 +32993,6 @@ function onConnectTimeout (socket, opts) {
|
|||||||
destroy(socket, new ConnectTimeoutError(message))
|
destroy(socket, new ConnectTimeoutError(message))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {string} urlString
|
|
||||||
* @returns {string}
|
|
||||||
*/
|
|
||||||
function getProtocolFromUrlString (urlString) {
|
|
||||||
if (
|
|
||||||
urlString[0] === 'h' &&
|
|
||||||
urlString[1] === 't' &&
|
|
||||||
urlString[2] === 't' &&
|
|
||||||
urlString[3] === 'p'
|
|
||||||
) {
|
|
||||||
switch (urlString[4]) {
|
|
||||||
case ':':
|
|
||||||
return 'http:'
|
|
||||||
case 's':
|
|
||||||
if (urlString[5] === ':') {
|
|
||||||
return 'https:'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// fallback if none of the usual suspects
|
|
||||||
return urlString.slice(0, urlString.indexOf(':') + 1)
|
|
||||||
}
|
|
||||||
|
|
||||||
const kEnumerableProperty = Object.create(null)
|
const kEnumerableProperty = Object.create(null)
|
||||||
kEnumerableProperty.enumerable = true
|
kEnumerableProperty.enumerable = true
|
||||||
|
|
||||||
@@ -33305,8 +33064,7 @@ module.exports = {
|
|||||||
nodeMinor,
|
nodeMinor,
|
||||||
safeHTTPMethods: Object.freeze(['GET', 'HEAD', 'OPTIONS', 'TRACE']),
|
safeHTTPMethods: Object.freeze(['GET', 'HEAD', 'OPTIONS', 'TRACE']),
|
||||||
wrapRequestBody,
|
wrapRequestBody,
|
||||||
setupConnectTimeout,
|
setupConnectTimeout
|
||||||
getProtocolFromUrlString
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -33318,7 +33076,7 @@ module.exports = {
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
const { InvalidArgumentError, MaxOriginsReachedError } = __nccwpck_require__(8707)
|
const { InvalidArgumentError } = __nccwpck_require__(8707)
|
||||||
const { kClients, kRunning, kClose, kDestroy, kDispatch, kUrl } = __nccwpck_require__(6443)
|
const { kClients, kRunning, kClose, kDestroy, kDispatch, kUrl } = __nccwpck_require__(6443)
|
||||||
const DispatcherBase = __nccwpck_require__(1841)
|
const DispatcherBase = __nccwpck_require__(1841)
|
||||||
const Pool = __nccwpck_require__(628)
|
const Pool = __nccwpck_require__(628)
|
||||||
@@ -33331,7 +33089,6 @@ const kOnConnectionError = Symbol('onConnectionError')
|
|||||||
const kOnDrain = Symbol('onDrain')
|
const kOnDrain = Symbol('onDrain')
|
||||||
const kFactory = Symbol('factory')
|
const kFactory = Symbol('factory')
|
||||||
const kOptions = Symbol('options')
|
const kOptions = Symbol('options')
|
||||||
const kOrigins = Symbol('origins')
|
|
||||||
|
|
||||||
function defaultFactory (origin, opts) {
|
function defaultFactory (origin, opts) {
|
||||||
return opts && opts.connections === 1
|
return opts && opts.connections === 1
|
||||||
@@ -33340,7 +33097,7 @@ function defaultFactory (origin, opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Agent extends DispatcherBase {
|
class Agent extends DispatcherBase {
|
||||||
constructor ({ factory = defaultFactory, maxOrigins = Infinity, connect, ...options } = {}) {
|
constructor ({ factory = defaultFactory, connect, ...options } = {}) {
|
||||||
if (typeof factory !== 'function') {
|
if (typeof factory !== 'function') {
|
||||||
throw new InvalidArgumentError('factory must be a function.')
|
throw new InvalidArgumentError('factory must be a function.')
|
||||||
}
|
}
|
||||||
@@ -33349,20 +33106,15 @@ class Agent extends DispatcherBase {
|
|||||||
throw new InvalidArgumentError('connect must be a function or an object')
|
throw new InvalidArgumentError('connect must be a function or an object')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof maxOrigins !== 'number' || Number.isNaN(maxOrigins) || maxOrigins <= 0) {
|
|
||||||
throw new InvalidArgumentError('maxOrigins must be a number greater than 0')
|
|
||||||
}
|
|
||||||
|
|
||||||
super()
|
super()
|
||||||
|
|
||||||
if (connect && typeof connect !== 'function') {
|
if (connect && typeof connect !== 'function') {
|
||||||
connect = { ...connect }
|
connect = { ...connect }
|
||||||
}
|
}
|
||||||
|
|
||||||
this[kOptions] = { ...util.deepClone(options), maxOrigins, connect }
|
this[kOptions] = { ...util.deepClone(options), connect }
|
||||||
this[kFactory] = factory
|
this[kFactory] = factory
|
||||||
this[kClients] = new Map()
|
this[kClients] = new Map()
|
||||||
this[kOrigins] = new Set()
|
|
||||||
|
|
||||||
this[kOnDrain] = (origin, targets) => {
|
this[kOnDrain] = (origin, targets) => {
|
||||||
this.emit('drain', origin, [this, ...targets])
|
this.emit('drain', origin, [this, ...targets])
|
||||||
@@ -33397,10 +33149,6 @@ class Agent extends DispatcherBase {
|
|||||||
throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.')
|
throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this[kOrigins].size >= this[kOptions].maxOrigins && !this[kOrigins].has(key)) {
|
|
||||||
throw new MaxOriginsReachedError()
|
|
||||||
}
|
|
||||||
|
|
||||||
const result = this[kClients].get(key)
|
const result = this[kClients].get(key)
|
||||||
let dispatcher = result && result.dispatcher
|
let dispatcher = result && result.dispatcher
|
||||||
if (!dispatcher) {
|
if (!dispatcher) {
|
||||||
@@ -33412,7 +33160,6 @@ class Agent extends DispatcherBase {
|
|||||||
this[kClients].delete(key)
|
this[kClients].delete(key)
|
||||||
result.dispatcher.close()
|
result.dispatcher.close()
|
||||||
}
|
}
|
||||||
this[kOrigins].delete(key)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dispatcher = this[kFactory](opts.origin, this[kOptions])
|
dispatcher = this[kFactory](opts.origin, this[kOptions])
|
||||||
@@ -33434,30 +33181,29 @@ class Agent extends DispatcherBase {
|
|||||||
})
|
})
|
||||||
|
|
||||||
this[kClients].set(key, { count: 0, dispatcher })
|
this[kClients].set(key, { count: 0, dispatcher })
|
||||||
this[kOrigins].add(key)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return dispatcher.dispatch(opts, handler)
|
return dispatcher.dispatch(opts, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
const closePromises = []
|
const closePromises = []
|
||||||
for (const { dispatcher } of this[kClients].values()) {
|
for (const { dispatcher } of this[kClients].values()) {
|
||||||
closePromises.push(dispatcher.close())
|
closePromises.push(dispatcher.close())
|
||||||
}
|
}
|
||||||
this[kClients].clear()
|
this[kClients].clear()
|
||||||
|
|
||||||
return Promise.all(closePromises)
|
await Promise.all(closePromises)
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] (err) {
|
async [kDestroy] (err) {
|
||||||
const destroyPromises = []
|
const destroyPromises = []
|
||||||
for (const { dispatcher } of this[kClients].values()) {
|
for (const { dispatcher } of this[kClients].values()) {
|
||||||
destroyPromises.push(dispatcher.destroy(err))
|
destroyPromises.push(dispatcher.destroy(err))
|
||||||
}
|
}
|
||||||
this[kClients].clear()
|
this[kClients].clear()
|
||||||
|
|
||||||
return Promise.all(destroyPromises)
|
await Promise.all(destroyPromises)
|
||||||
}
|
}
|
||||||
|
|
||||||
get stats () {
|
get stats () {
|
||||||
@@ -33760,26 +33506,11 @@ function lazyllhttp () {
|
|||||||
const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(3870) : undefined
|
const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(3870) : undefined
|
||||||
|
|
||||||
let mod
|
let mod
|
||||||
|
try {
|
||||||
|
mod = new WebAssembly.Module(__nccwpck_require__(3434))
|
||||||
|
} catch {
|
||||||
|
/* istanbul ignore next */
|
||||||
|
|
||||||
// We disable wasm SIMD on ppc64 as it seems to be broken on Power 9 architectures.
|
|
||||||
let useWasmSIMD = process.arch !== 'ppc64'
|
|
||||||
// The Env Variable UNDICI_NO_WASM_SIMD allows explicitly overriding the default behavior
|
|
||||||
if (process.env.UNDICI_NO_WASM_SIMD === '1') {
|
|
||||||
useWasmSIMD = true
|
|
||||||
} else if (process.env.UNDICI_NO_WASM_SIMD === '0') {
|
|
||||||
useWasmSIMD = false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (useWasmSIMD) {
|
|
||||||
try {
|
|
||||||
mod = new WebAssembly.Module(__nccwpck_require__(3434))
|
|
||||||
/* istanbul ignore next */
|
|
||||||
} catch {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* istanbul ignore next */
|
|
||||||
if (!mod) {
|
|
||||||
// We could check if the error was caused by the simd option not
|
// We could check if the error was caused by the simd option not
|
||||||
// being enabled, but the occurring of this other error
|
// being enabled, but the occurring of this other error
|
||||||
// * https://github.com/emscripten-core/emscripten/issues/11495
|
// * https://github.com/emscripten-core/emscripten/issues/11495
|
||||||
@@ -34036,6 +33767,10 @@ class Parser {
|
|||||||
currentBufferRef = chunk
|
currentBufferRef = chunk
|
||||||
currentParser = this
|
currentParser = this
|
||||||
ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length)
|
ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length)
|
||||||
|
/* eslint-disable-next-line no-useless-catch */
|
||||||
|
} catch (err) {
|
||||||
|
/* istanbul ignore next: difficult to make a test case for */
|
||||||
|
throw err
|
||||||
} finally {
|
} finally {
|
||||||
currentParser = null
|
currentParser = null
|
||||||
currentBufferRef = null
|
currentBufferRef = null
|
||||||
@@ -34467,7 +34202,7 @@ function onParserTimeout (parser) {
|
|||||||
* @param {import('net').Socket} socket
|
* @param {import('net').Socket} socket
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
function connectH1 (client, socket) {
|
async function connectH1 (client, socket) {
|
||||||
client[kSocket] = socket
|
client[kSocket] = socket
|
||||||
|
|
||||||
if (!llhttpInstance) {
|
if (!llhttpInstance) {
|
||||||
@@ -35398,7 +35133,7 @@ function parseH2Headers (headers) {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
function connectH2 (client, socket) {
|
async function connectH2 (client, socket) {
|
||||||
client[kSocket] = socket
|
client[kSocket] = socket
|
||||||
|
|
||||||
const session = http2.connect(client[kUrl], {
|
const session = http2.connect(client[kUrl], {
|
||||||
@@ -35600,7 +35335,7 @@ function shouldSendContentLength (method) {
|
|||||||
function writeH2 (client, request) {
|
function writeH2 (client, request) {
|
||||||
const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout]
|
const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout]
|
||||||
const session = client[kHTTP2Session]
|
const session = client[kHTTP2Session]
|
||||||
const { method, path, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request
|
const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request
|
||||||
let { body } = request
|
let { body } = request
|
||||||
|
|
||||||
if (upgrade) {
|
if (upgrade) {
|
||||||
@@ -35613,16 +35348,6 @@ function writeH2 (client, request) {
|
|||||||
const key = reqHeaders[n + 0]
|
const key = reqHeaders[n + 0]
|
||||||
const val = reqHeaders[n + 1]
|
const val = reqHeaders[n + 1]
|
||||||
|
|
||||||
if (key === 'cookie') {
|
|
||||||
if (headers[key] != null) {
|
|
||||||
headers[key] = Array.isArray(headers[key]) ? (headers[key].push(val), headers[key]) : [headers[key], val]
|
|
||||||
} else {
|
|
||||||
headers[key] = val
|
|
||||||
}
|
|
||||||
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Array.isArray(val)) {
|
if (Array.isArray(val)) {
|
||||||
for (let i = 0; i < val.length; i++) {
|
for (let i = 0; i < val.length; i++) {
|
||||||
if (headers[key]) {
|
if (headers[key]) {
|
||||||
@@ -35718,7 +35443,7 @@ function writeH2 (client, request) {
|
|||||||
// :path and :scheme headers must be omitted when sending CONNECT
|
// :path and :scheme headers must be omitted when sending CONNECT
|
||||||
|
|
||||||
headers[HTTP2_HEADER_PATH] = path
|
headers[HTTP2_HEADER_PATH] = path
|
||||||
headers[HTTP2_HEADER_SCHEME] = protocol === 'http:' ? 'http' : 'https'
|
headers[HTTP2_HEADER_SCHEME] = 'https'
|
||||||
|
|
||||||
// https://tools.ietf.org/html/rfc7231#section-4.3.1
|
// https://tools.ietf.org/html/rfc7231#section-4.3.1
|
||||||
// https://tools.ietf.org/html/rfc7231#section-4.3.2
|
// https://tools.ietf.org/html/rfc7231#section-4.3.2
|
||||||
@@ -36433,7 +36158,8 @@ class Client extends DispatcherBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[kDispatch] (opts, handler) {
|
[kDispatch] (opts, handler) {
|
||||||
const request = new Request(this[kUrl].origin, opts, handler)
|
const origin = opts.origin || this[kUrl].origin
|
||||||
|
const request = new Request(origin, opts, handler)
|
||||||
|
|
||||||
this[kQueue].push(request)
|
this[kQueue].push(request)
|
||||||
if (this[kResuming]) {
|
if (this[kResuming]) {
|
||||||
@@ -36453,7 +36179,7 @@ class Client extends DispatcherBase {
|
|||||||
return this[kNeedDrain] < 2
|
return this[kNeedDrain] < 2
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
// TODO: for H2 we need to gracefully flush the remaining enqueued
|
// TODO: for H2 we need to gracefully flush the remaining enqueued
|
||||||
// request and close each stream.
|
// request and close each stream.
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
@@ -36465,7 +36191,7 @@ class Client extends DispatcherBase {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] (err) {
|
async [kDestroy] (err) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const requests = this[kQueue].splice(this[kPendingIdx])
|
const requests = this[kQueue].splice(this[kPendingIdx])
|
||||||
for (let i = 0; i < requests.length; i++) {
|
for (let i = 0; i < requests.length; i++) {
|
||||||
@@ -36517,9 +36243,9 @@ function onError (client, err) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Client} client
|
* @param {Client} client
|
||||||
* @returns {void}
|
* @returns
|
||||||
*/
|
*/
|
||||||
function connect (client) {
|
async function connect (client) {
|
||||||
assert(!client[kConnecting])
|
assert(!client[kConnecting])
|
||||||
assert(!client[kHTTPContext])
|
assert(!client[kHTTPContext])
|
||||||
|
|
||||||
@@ -36553,23 +36279,26 @@ function connect (client) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
client[kConnector]({
|
try {
|
||||||
host,
|
const socket = await new Promise((resolve, reject) => {
|
||||||
hostname,
|
client[kConnector]({
|
||||||
protocol,
|
host,
|
||||||
port,
|
hostname,
|
||||||
servername: client[kServerName],
|
protocol,
|
||||||
localAddress: client[kLocalAddress]
|
port,
|
||||||
}, (err, socket) => {
|
servername: client[kServerName],
|
||||||
if (err) {
|
localAddress: client[kLocalAddress]
|
||||||
handleConnectError(client, err, { host, hostname, protocol, port })
|
}, (err, socket) => {
|
||||||
client[kResume]()
|
if (err) {
|
||||||
return
|
reject(err)
|
||||||
}
|
} else {
|
||||||
|
resolve(socket)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
if (client.destroyed) {
|
if (client.destroyed) {
|
||||||
util.destroy(socket.on('error', noop), new ClientDestroyedError())
|
util.destroy(socket.on('error', noop), new ClientDestroyedError())
|
||||||
client[kResume]()
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36577,13 +36306,11 @@ function connect (client) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
client[kHTTPContext] = socket.alpnProtocol === 'h2'
|
client[kHTTPContext] = socket.alpnProtocol === 'h2'
|
||||||
? connectH2(client, socket)
|
? await connectH2(client, socket)
|
||||||
: connectH1(client, socket)
|
: await connectH1(client, socket)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
socket.destroy().on('error', noop)
|
socket.destroy().on('error', noop)
|
||||||
handleConnectError(client, err, { host, hostname, protocol, port })
|
throw err
|
||||||
client[kResume]()
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
client[kConnecting] = false
|
client[kConnecting] = false
|
||||||
@@ -36608,46 +36335,44 @@ function connect (client) {
|
|||||||
socket
|
socket
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
client.emit('connect', client[kUrl], [client])
|
client.emit('connect', client[kUrl], [client])
|
||||||
client[kResume]()
|
} catch (err) {
|
||||||
})
|
if (client.destroyed) {
|
||||||
}
|
return
|
||||||
|
|
||||||
function handleConnectError (client, err, { host, hostname, protocol, port }) {
|
|
||||||
if (client.destroyed) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
client[kConnecting] = false
|
|
||||||
|
|
||||||
if (channels.connectError.hasSubscribers) {
|
|
||||||
channels.connectError.publish({
|
|
||||||
connectParams: {
|
|
||||||
host,
|
|
||||||
hostname,
|
|
||||||
protocol,
|
|
||||||
port,
|
|
||||||
version: client[kHTTPContext]?.version,
|
|
||||||
servername: client[kServerName],
|
|
||||||
localAddress: client[kLocalAddress]
|
|
||||||
},
|
|
||||||
connector: client[kConnector],
|
|
||||||
error: err
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {
|
|
||||||
assert(client[kRunning] === 0)
|
|
||||||
while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {
|
|
||||||
const request = client[kQueue][client[kPendingIdx]++]
|
|
||||||
util.errorRequest(client, request, err)
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
onError(client, err)
|
client[kConnecting] = false
|
||||||
|
|
||||||
|
if (channels.connectError.hasSubscribers) {
|
||||||
|
channels.connectError.publish({
|
||||||
|
connectParams: {
|
||||||
|
host,
|
||||||
|
hostname,
|
||||||
|
protocol,
|
||||||
|
port,
|
||||||
|
version: client[kHTTPContext]?.version,
|
||||||
|
servername: client[kServerName],
|
||||||
|
localAddress: client[kLocalAddress]
|
||||||
|
},
|
||||||
|
connector: client[kConnector],
|
||||||
|
error: err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {
|
||||||
|
assert(client[kRunning] === 0)
|
||||||
|
while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {
|
||||||
|
const request = client[kQueue][client[kPendingIdx]++]
|
||||||
|
util.errorRequest(client, request, err)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
onError(client, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
client.emit('connectionError', client[kUrl], [client], err)
|
||||||
}
|
}
|
||||||
|
|
||||||
client.emit('connectionError', client[kUrl], [client], err)
|
client[kResume]()
|
||||||
}
|
}
|
||||||
|
|
||||||
function emitDrain (client) {
|
function emitDrain (client) {
|
||||||
@@ -36772,24 +36497,19 @@ const kOnDestroyed = Symbol('onDestroyed')
|
|||||||
const kOnClosed = Symbol('onClosed')
|
const kOnClosed = Symbol('onClosed')
|
||||||
|
|
||||||
class DispatcherBase extends Dispatcher {
|
class DispatcherBase extends Dispatcher {
|
||||||
/** @type {boolean} */
|
constructor () {
|
||||||
[kDestroyed] = false;
|
super()
|
||||||
|
|
||||||
/** @type {Array|null} */
|
this[kDestroyed] = false
|
||||||
[kOnDestroyed] = null;
|
this[kOnDestroyed] = null
|
||||||
|
this[kClosed] = false
|
||||||
|
this[kOnClosed] = []
|
||||||
|
}
|
||||||
|
|
||||||
/** @type {boolean} */
|
|
||||||
[kClosed] = false;
|
|
||||||
|
|
||||||
/** @type {Array} */
|
|
||||||
[kOnClosed] = []
|
|
||||||
|
|
||||||
/** @returns {boolean} */
|
|
||||||
get destroyed () {
|
get destroyed () {
|
||||||
return this[kDestroyed]
|
return this[kDestroyed]
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {boolean} */
|
|
||||||
get closed () {
|
get closed () {
|
||||||
return this[kClosed]
|
return this[kClosed]
|
||||||
}
|
}
|
||||||
@@ -37035,20 +36755,24 @@ class EnvHttpProxyAgent extends DispatcherBase {
|
|||||||
return agent.dispatch(opts, handler)
|
return agent.dispatch(opts, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
return Promise.all([
|
await this[kNoProxyAgent].close()
|
||||||
this[kNoProxyAgent].close(),
|
if (!this[kHttpProxyAgent][kClosed]) {
|
||||||
!this[kHttpProxyAgent][kClosed] && this[kHttpProxyAgent].close(),
|
await this[kHttpProxyAgent].close()
|
||||||
!this[kHttpsProxyAgent][kClosed] && this[kHttpsProxyAgent].close()
|
}
|
||||||
])
|
if (!this[kHttpsProxyAgent][kClosed]) {
|
||||||
|
await this[kHttpsProxyAgent].close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] (err) {
|
async [kDestroy] (err) {
|
||||||
return Promise.all([
|
await this[kNoProxyAgent].destroy(err)
|
||||||
this[kNoProxyAgent].destroy(err),
|
if (!this[kHttpProxyAgent][kDestroyed]) {
|
||||||
!this[kHttpProxyAgent][kDestroyed] && this[kHttpProxyAgent].destroy(err),
|
await this[kHttpProxyAgent].destroy(err)
|
||||||
!this[kHttpsProxyAgent][kDestroyed] && this[kHttpsProxyAgent].destroy(err)
|
}
|
||||||
])
|
if (!this[kHttpsProxyAgent][kDestroyed]) {
|
||||||
|
await this[kHttpsProxyAgent].destroy(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#getProxyAgentForUrl (url) {
|
#getProxyAgentForUrl (url) {
|
||||||
@@ -37203,21 +36927,35 @@ const kMask = kSize - 1
|
|||||||
* @template T
|
* @template T
|
||||||
*/
|
*/
|
||||||
class FixedCircularBuffer {
|
class FixedCircularBuffer {
|
||||||
/** @type {number} */
|
constructor () {
|
||||||
bottom = 0
|
/**
|
||||||
/** @type {number} */
|
* @type {number}
|
||||||
top = 0
|
*/
|
||||||
/** @type {Array<T|undefined>} */
|
this.bottom = 0
|
||||||
list = new Array(kSize).fill(undefined)
|
/**
|
||||||
/** @type {T|null} */
|
* @type {number}
|
||||||
next = null
|
*/
|
||||||
|
this.top = 0
|
||||||
|
/**
|
||||||
|
* @type {Array<T|undefined>}
|
||||||
|
*/
|
||||||
|
this.list = new Array(kSize).fill(undefined)
|
||||||
|
/**
|
||||||
|
* @type {T|null}
|
||||||
|
*/
|
||||||
|
this.next = null
|
||||||
|
}
|
||||||
|
|
||||||
/** @returns {boolean} */
|
/**
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
isEmpty () {
|
isEmpty () {
|
||||||
return this.top === this.bottom
|
return this.top === this.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {boolean} */
|
/**
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
isFull () {
|
isFull () {
|
||||||
return ((this.top + 1) & kMask) === this.bottom
|
return ((this.top + 1) & kMask) === this.bottom
|
||||||
}
|
}
|
||||||
@@ -37231,7 +36969,9 @@ class FixedCircularBuffer {
|
|||||||
this.top = (this.top + 1) & kMask
|
this.top = (this.top + 1) & kMask
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {T|null} */
|
/**
|
||||||
|
* @returns {T|null}
|
||||||
|
*/
|
||||||
shift () {
|
shift () {
|
||||||
const nextItem = this.list[this.bottom]
|
const nextItem = this.list[this.bottom]
|
||||||
if (nextItem === undefined) { return null }
|
if (nextItem === undefined) { return null }
|
||||||
@@ -37246,16 +36986,22 @@ class FixedCircularBuffer {
|
|||||||
*/
|
*/
|
||||||
module.exports = class FixedQueue {
|
module.exports = class FixedQueue {
|
||||||
constructor () {
|
constructor () {
|
||||||
/** @type {FixedCircularBuffer<T>} */
|
/**
|
||||||
|
* @type {FixedCircularBuffer<T>}
|
||||||
|
*/
|
||||||
this.head = this.tail = new FixedCircularBuffer()
|
this.head = this.tail = new FixedCircularBuffer()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {boolean} */
|
/**
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
isEmpty () {
|
isEmpty () {
|
||||||
return this.head.isEmpty()
|
return this.head.isEmpty()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @param {T} data */
|
/**
|
||||||
|
* @param {T} data
|
||||||
|
*/
|
||||||
push (data) {
|
push (data) {
|
||||||
if (this.head.isFull()) {
|
if (this.head.isFull()) {
|
||||||
// Head is full: Creates a new queue, sets the old queue's `.next` to it,
|
// Head is full: Creates a new queue, sets the old queue's `.next` to it,
|
||||||
@@ -37265,7 +37011,9 @@ module.exports = class FixedQueue {
|
|||||||
this.head.push(data)
|
this.head.push(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {T|null} */
|
/**
|
||||||
|
* @returns {T|null}
|
||||||
|
*/
|
||||||
shift () {
|
shift () {
|
||||||
const tail = this.tail
|
const tail = this.tail
|
||||||
const next = tail.shift()
|
const next = tail.shift()
|
||||||
@@ -37299,6 +37047,8 @@ class H2CClient extends DispatcherBase {
|
|||||||
#client = null
|
#client = null
|
||||||
|
|
||||||
constructor (origin, clientOpts) {
|
constructor (origin, clientOpts) {
|
||||||
|
super()
|
||||||
|
|
||||||
if (typeof origin === 'string') {
|
if (typeof origin === 'string') {
|
||||||
origin = new URL(origin)
|
origin = new URL(origin)
|
||||||
}
|
}
|
||||||
@@ -37332,8 +37082,6 @@ class H2CClient extends DispatcherBase {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
super()
|
|
||||||
|
|
||||||
this.#client = new Client(origin, {
|
this.#client = new Client(origin, {
|
||||||
...opts,
|
...opts,
|
||||||
connect: this.#buildConnector(connect),
|
connect: this.#buildConnector(connect),
|
||||||
@@ -37397,12 +37145,12 @@ class H2CClient extends DispatcherBase {
|
|||||||
return this.#client.dispatch(opts, handler)
|
return this.#client.dispatch(opts, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
return this.#client.close()
|
await this.#client.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] () {
|
async [kDestroy] () {
|
||||||
return this.#client.destroy()
|
await this.#client.destroy()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37435,55 +37183,54 @@ const kAddClient = Symbol('add client')
|
|||||||
const kRemoveClient = Symbol('remove client')
|
const kRemoveClient = Symbol('remove client')
|
||||||
|
|
||||||
class PoolBase extends DispatcherBase {
|
class PoolBase extends DispatcherBase {
|
||||||
[kQueue] = new FixedQueue();
|
constructor () {
|
||||||
|
super()
|
||||||
|
|
||||||
[kQueued] = 0;
|
this[kQueue] = new FixedQueue()
|
||||||
|
this[kClients] = []
|
||||||
|
this[kQueued] = 0
|
||||||
|
|
||||||
[kClients] = [];
|
const pool = this
|
||||||
|
|
||||||
[kNeedDrain] = false;
|
this[kOnDrain] = function onDrain (origin, targets) {
|
||||||
|
const queue = pool[kQueue]
|
||||||
|
|
||||||
[kOnDrain] (client, origin, targets) {
|
let needDrain = false
|
||||||
const queue = this[kQueue]
|
|
||||||
|
|
||||||
let needDrain = false
|
while (!needDrain) {
|
||||||
|
const item = queue.shift()
|
||||||
while (!needDrain) {
|
if (!item) {
|
||||||
const item = queue.shift()
|
break
|
||||||
if (!item) {
|
}
|
||||||
break
|
pool[kQueued]--
|
||||||
|
needDrain = !this.dispatch(item.opts, item.handler)
|
||||||
}
|
}
|
||||||
this[kQueued]--
|
|
||||||
needDrain = !client.dispatch(item.opts, item.handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
client[kNeedDrain] = needDrain
|
this[kNeedDrain] = needDrain
|
||||||
|
|
||||||
if (!needDrain && this[kNeedDrain]) {
|
if (!this[kNeedDrain] && pool[kNeedDrain]) {
|
||||||
this[kNeedDrain] = false
|
pool[kNeedDrain] = false
|
||||||
this.emit('drain', origin, [this, ...targets])
|
pool.emit('drain', origin, [pool, ...targets])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this[kClosedResolve] && queue.isEmpty()) {
|
if (pool[kClosedResolve] && queue.isEmpty()) {
|
||||||
const closeAll = new Array(this[kClients].length)
|
Promise
|
||||||
for (let i = 0; i < this[kClients].length; i++) {
|
.all(pool[kClients].map(c => c.close()))
|
||||||
closeAll[i] = this[kClients][i].close()
|
.then(pool[kClosedResolve])
|
||||||
}
|
}
|
||||||
Promise.all(closeAll)
|
|
||||||
.then(this[kClosedResolve])
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[kOnConnect] = (origin, targets) => {
|
this[kOnConnect] = (origin, targets) => {
|
||||||
this.emit('connect', origin, [this, ...targets])
|
pool.emit('connect', origin, [pool, ...targets])
|
||||||
};
|
}
|
||||||
|
|
||||||
[kOnDisconnect] = (origin, targets, err) => {
|
this[kOnDisconnect] = (origin, targets, err) => {
|
||||||
this.emit('disconnect', origin, [this, ...targets], err)
|
pool.emit('disconnect', origin, [pool, ...targets], err)
|
||||||
};
|
}
|
||||||
|
|
||||||
[kOnConnectionError] = (origin, targets, err) => {
|
this[kOnConnectionError] = (origin, targets, err) => {
|
||||||
this.emit('connectionError', origin, [this, ...targets], err)
|
pool.emit('connectionError', origin, [pool, ...targets], err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get [kBusy] () {
|
get [kBusy] () {
|
||||||
@@ -37491,19 +37238,11 @@ class PoolBase extends DispatcherBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get [kConnected] () {
|
get [kConnected] () {
|
||||||
let ret = 0
|
return this[kClients].filter(client => client[kConnected]).length
|
||||||
for (const { [kConnected]: connected } of this[kClients]) {
|
|
||||||
ret += connected
|
|
||||||
}
|
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get [kFree] () {
|
get [kFree] () {
|
||||||
let ret = 0
|
return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length
|
||||||
for (const { [kConnected]: connected, [kNeedDrain]: needDrain } of this[kClients]) {
|
|
||||||
ret += connected && !needDrain
|
|
||||||
}
|
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get [kPending] () {
|
get [kPending] () {
|
||||||
@@ -37534,21 +37273,17 @@ class PoolBase extends DispatcherBase {
|
|||||||
return new PoolStats(this)
|
return new PoolStats(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
if (this[kQueue].isEmpty()) {
|
if (this[kQueue].isEmpty()) {
|
||||||
const closeAll = new Array(this[kClients].length)
|
await Promise.all(this[kClients].map(c => c.close()))
|
||||||
for (let i = 0; i < this[kClients].length; i++) {
|
|
||||||
closeAll[i] = this[kClients][i].close()
|
|
||||||
}
|
|
||||||
return Promise.all(closeAll)
|
|
||||||
} else {
|
} else {
|
||||||
return new Promise((resolve) => {
|
await new Promise((resolve) => {
|
||||||
this[kClosedResolve] = resolve
|
this[kClosedResolve] = resolve
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] (err) {
|
async [kDestroy] (err) {
|
||||||
while (true) {
|
while (true) {
|
||||||
const item = this[kQueue].shift()
|
const item = this[kQueue].shift()
|
||||||
if (!item) {
|
if (!item) {
|
||||||
@@ -37557,11 +37292,7 @@ class PoolBase extends DispatcherBase {
|
|||||||
item.handler.onError(err)
|
item.handler.onError(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
const destroyAll = new Array(this[kClients].length)
|
await Promise.all(this[kClients].map(c => c.destroy(err)))
|
||||||
for (let i = 0; i < this[kClients].length; i++) {
|
|
||||||
destroyAll[i] = this[kClients][i].destroy(err)
|
|
||||||
}
|
|
||||||
return Promise.all(destroyAll)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDispatch] (opts, handler) {
|
[kDispatch] (opts, handler) {
|
||||||
@@ -37581,7 +37312,7 @@ class PoolBase extends DispatcherBase {
|
|||||||
|
|
||||||
[kAddClient] (client) {
|
[kAddClient] (client) {
|
||||||
client
|
client
|
||||||
.on('drain', this[kOnDrain].bind(this, client))
|
.on('drain', this[kOnDrain])
|
||||||
.on('connect', this[kOnConnect])
|
.on('connect', this[kOnConnect])
|
||||||
.on('disconnect', this[kOnDisconnect])
|
.on('disconnect', this[kOnDisconnect])
|
||||||
.on('connectionError', this[kOnConnectionError])
|
.on('connectionError', this[kOnConnectionError])
|
||||||
@@ -37591,7 +37322,7 @@ class PoolBase extends DispatcherBase {
|
|||||||
if (this[kNeedDrain]) {
|
if (this[kNeedDrain]) {
|
||||||
queueMicrotask(() => {
|
queueMicrotask(() => {
|
||||||
if (this[kNeedDrain]) {
|
if (this[kNeedDrain]) {
|
||||||
this[kOnDrain](client, client[kUrl], [client, this])
|
this[kOnDrain](client[kUrl], [this, client])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -37684,6 +37415,8 @@ class Pool extends PoolBase {
|
|||||||
throw new InvalidArgumentError('connect must be a function or an object')
|
throw new InvalidArgumentError('connect must be a function or an object')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super()
|
||||||
|
|
||||||
if (typeof connect !== 'function') {
|
if (typeof connect !== 'function') {
|
||||||
connect = buildConnector({
|
connect = buildConnector({
|
||||||
...tls,
|
...tls,
|
||||||
@@ -37696,8 +37429,6 @@ class Pool extends PoolBase {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
super()
|
|
||||||
|
|
||||||
this[kConnections] = connections || null
|
this[kConnections] = connections || null
|
||||||
this[kUrl] = util.parseOrigin(origin)
|
this[kUrl] = util.parseOrigin(origin)
|
||||||
this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl }
|
this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl }
|
||||||
@@ -37796,12 +37527,11 @@ class Http1ProxyWrapper extends DispatcherBase {
|
|||||||
#client
|
#client
|
||||||
|
|
||||||
constructor (proxyUrl, { headers = {}, connect, factory }) {
|
constructor (proxyUrl, { headers = {}, connect, factory }) {
|
||||||
|
super()
|
||||||
if (!proxyUrl) {
|
if (!proxyUrl) {
|
||||||
throw new InvalidArgumentError('Proxy URL is mandatory')
|
throw new InvalidArgumentError('Proxy URL is mandatory')
|
||||||
}
|
}
|
||||||
|
|
||||||
super()
|
|
||||||
|
|
||||||
this[kProxyHeaders] = headers
|
this[kProxyHeaders] = headers
|
||||||
if (factory) {
|
if (factory) {
|
||||||
this.#client = factory(proxyUrl, { connect })
|
this.#client = factory(proxyUrl, { connect })
|
||||||
@@ -37840,11 +37570,11 @@ class Http1ProxyWrapper extends DispatcherBase {
|
|||||||
return this.#client[kDispatch](opts, handler)
|
return this.#client[kDispatch](opts, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
return this.#client.close()
|
return this.#client.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] (err) {
|
async [kDestroy] (err) {
|
||||||
return this.#client.destroy(err)
|
return this.#client.destroy(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37980,18 +37710,14 @@ class ProxyAgent extends DispatcherBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[kClose] () {
|
async [kClose] () {
|
||||||
return Promise.all([
|
await this[kAgent].close()
|
||||||
this[kAgent].close(),
|
await this[kClient].close()
|
||||||
this[kClient].close()
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[kDestroy] () {
|
async [kDestroy] () {
|
||||||
return Promise.all([
|
await this[kAgent].destroy()
|
||||||
this[kAgent].destroy(),
|
await this[kClient].destroy()
|
||||||
this[kClient].destroy()
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38112,27 +37838,9 @@ function getGlobalDispatcher () {
|
|||||||
return globalThis[globalDispatcher]
|
return globalThis[globalDispatcher]
|
||||||
}
|
}
|
||||||
|
|
||||||
// These are the globals that can be installed by undici.install().
|
|
||||||
// Not exported by index.js to avoid use outside of this module.
|
|
||||||
const installedExports = /** @type {const} */ (
|
|
||||||
[
|
|
||||||
'fetch',
|
|
||||||
'Headers',
|
|
||||||
'Response',
|
|
||||||
'Request',
|
|
||||||
'FormData',
|
|
||||||
'WebSocket',
|
|
||||||
'CloseEvent',
|
|
||||||
'ErrorEvent',
|
|
||||||
'MessageEvent',
|
|
||||||
'EventSource'
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
setGlobalDispatcher,
|
setGlobalDispatcher,
|
||||||
getGlobalDispatcher,
|
getGlobalDispatcher
|
||||||
installedExports
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -39740,22 +39448,6 @@ function needsRevalidation (result, cacheControlDirectives) {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if we're within the stale-while-revalidate window for a stale response
|
|
||||||
* @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result
|
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
|
||||||
function withinStaleWhileRevalidateWindow (result) {
|
|
||||||
const staleWhileRevalidate = result.cacheControlDirectives?.['stale-while-revalidate']
|
|
||||||
if (!staleWhileRevalidate) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
const now = Date.now()
|
|
||||||
const staleWhileRevalidateExpiry = result.staleAt + (staleWhileRevalidate * 1000)
|
|
||||||
return now <= staleWhileRevalidateExpiry
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {DispatchFn} dispatch
|
* @param {DispatchFn} dispatch
|
||||||
* @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts
|
* @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts
|
||||||
@@ -39931,51 +39623,6 @@ function handleResult (
|
|||||||
return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))
|
return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))
|
||||||
}
|
}
|
||||||
|
|
||||||
// RFC 5861: If we're within stale-while-revalidate window, serve stale immediately
|
|
||||||
// and revalidate in background
|
|
||||||
if (withinStaleWhileRevalidateWindow(result)) {
|
|
||||||
// Serve stale response immediately
|
|
||||||
sendCachedValue(handler, opts, result, age, null, true)
|
|
||||||
|
|
||||||
// Start background revalidation (fire-and-forget)
|
|
||||||
queueMicrotask(() => {
|
|
||||||
let headers = {
|
|
||||||
...opts.headers,
|
|
||||||
'if-modified-since': new Date(result.cachedAt).toUTCString()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.etag) {
|
|
||||||
headers['if-none-match'] = result.etag
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.vary) {
|
|
||||||
headers = {
|
|
||||||
...headers,
|
|
||||||
...result.vary
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Background revalidation - update cache if we get new data
|
|
||||||
dispatch(
|
|
||||||
{
|
|
||||||
...opts,
|
|
||||||
headers
|
|
||||||
},
|
|
||||||
new CacheHandler(globalOpts, cacheKey, {
|
|
||||||
// Silent handler that just updates the cache
|
|
||||||
onRequestStart () {},
|
|
||||||
onRequestUpgrade () {},
|
|
||||||
onResponseStart () {},
|
|
||||||
onResponseData () {},
|
|
||||||
onResponseEnd () {},
|
|
||||||
onResponseError () {}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
let withinStaleIfErrorThreshold = false
|
let withinStaleIfErrorThreshold = false
|
||||||
const staleIfErrorExpiry = result.cacheControlDirectives['stale-if-error'] ?? reqCacheControl?.['stale-if-error']
|
const staleIfErrorExpiry = result.cacheControlDirectives['stale-if-error'] ?? reqCacheControl?.['stale-if-error']
|
||||||
if (staleIfErrorExpiry) {
|
if (staleIfErrorExpiry) {
|
||||||
@@ -41741,16 +41388,16 @@ const PendingInterceptorsFormatter = __nccwpck_require__(6142)
|
|||||||
const { MockCallHistory } = __nccwpck_require__(431)
|
const { MockCallHistory } = __nccwpck_require__(431)
|
||||||
|
|
||||||
class MockAgent extends Dispatcher {
|
class MockAgent extends Dispatcher {
|
||||||
constructor (opts = {}) {
|
constructor (opts) {
|
||||||
super(opts)
|
super(opts)
|
||||||
|
|
||||||
const mockOptions = buildAndValidateMockOptions(opts)
|
const mockOptions = buildAndValidateMockOptions(opts)
|
||||||
|
|
||||||
this[kNetConnect] = true
|
this[kNetConnect] = true
|
||||||
this[kIsMockActive] = true
|
this[kIsMockActive] = true
|
||||||
this[kMockAgentIsCallHistoryEnabled] = mockOptions.enableCallHistory ?? false
|
this[kMockAgentIsCallHistoryEnabled] = mockOptions?.enableCallHistory ?? false
|
||||||
this[kMockAgentAcceptsNonStandardSearchParameters] = mockOptions.acceptNonStandardSearchParameters ?? false
|
this[kMockAgentAcceptsNonStandardSearchParameters] = mockOptions?.acceptNonStandardSearchParameters ?? false
|
||||||
this[kIgnoreTrailingSlash] = mockOptions.ignoreTrailingSlash ?? false
|
this[kIgnoreTrailingSlash] = mockOptions?.ignoreTrailingSlash ?? false
|
||||||
|
|
||||||
// Instantiate Agent and encapsulate
|
// Instantiate Agent and encapsulate
|
||||||
if (opts?.agent && typeof opts.agent.dispatch !== 'function') {
|
if (opts?.agent && typeof opts.agent.dispatch !== 'function') {
|
||||||
@@ -42284,8 +41931,6 @@ module.exports = MockClient
|
|||||||
|
|
||||||
const { UndiciError } = __nccwpck_require__(8707)
|
const { UndiciError } = __nccwpck_require__(8707)
|
||||||
|
|
||||||
const kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED')
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The request does not match any registered mock dispatches.
|
* The request does not match any registered mock dispatches.
|
||||||
*/
|
*/
|
||||||
@@ -42296,14 +41941,6 @@ class MockNotMatchedError extends UndiciError {
|
|||||||
this.message = message || 'The request does not match any registered mock dispatches'
|
this.message = message || 'The request does not match any registered mock dispatches'
|
||||||
this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'
|
this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'
|
||||||
}
|
}
|
||||||
|
|
||||||
static [Symbol.hasInstance] (instance) {
|
|
||||||
return instance && instance[kMockNotMatchedError] === true
|
|
||||||
}
|
|
||||||
|
|
||||||
get [kMockNotMatchedError] () {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -43018,7 +42655,7 @@ function buildMockDispatch () {
|
|||||||
try {
|
try {
|
||||||
mockDispatch.call(this, opts, handler)
|
mockDispatch.call(this, opts, handler)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code === 'UND_MOCK_ERR_MOCK_NOT_MATCHED') {
|
if (error instanceof MockNotMatchedError) {
|
||||||
const netConnect = agent[kGetNetConnect]()
|
const netConnect = agent[kGetNetConnect]()
|
||||||
if (netConnect === false) {
|
if (netConnect === false) {
|
||||||
throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`)
|
throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`)
|
||||||
@@ -43049,21 +42686,19 @@ function checkNetConnect (netConnect, origin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function buildAndValidateMockOptions (opts) {
|
function buildAndValidateMockOptions (opts) {
|
||||||
const { agent, ...mockOptions } = opts
|
if (opts) {
|
||||||
|
const { agent, ...mockOptions } = opts
|
||||||
|
|
||||||
if ('enableCallHistory' in mockOptions && typeof mockOptions.enableCallHistory !== 'boolean') {
|
if ('enableCallHistory' in mockOptions && typeof mockOptions.enableCallHistory !== 'boolean') {
|
||||||
throw new InvalidArgumentError('options.enableCallHistory must to be a boolean')
|
throw new InvalidArgumentError('options.enableCallHistory must to be a boolean')
|
||||||
|
}
|
||||||
|
|
||||||
|
if ('acceptNonStandardSearchParameters' in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== 'boolean') {
|
||||||
|
throw new InvalidArgumentError('options.acceptNonStandardSearchParameters must to be a boolean')
|
||||||
|
}
|
||||||
|
|
||||||
|
return mockOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('acceptNonStandardSearchParameters' in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== 'boolean') {
|
|
||||||
throw new InvalidArgumentError('options.acceptNonStandardSearchParameters must to be a boolean')
|
|
||||||
}
|
|
||||||
|
|
||||||
if ('ignoreTrailingSlash' in mockOptions && typeof mockOptions.ignoreTrailingSlash !== 'boolean') {
|
|
||||||
throw new InvalidArgumentError('options.ignoreTrailingSlash must to be a boolean')
|
|
||||||
}
|
|
||||||
|
|
||||||
return mockOptions
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -44639,21 +44274,33 @@ module.exports = {
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
const IMF_DAYS = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']
|
||||||
|
const IMF_SPACES = [4, 7, 11, 16, 25]
|
||||||
|
const IMF_MONTHS = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']
|
||||||
|
const IMF_COLONS = [19, 22]
|
||||||
|
|
||||||
|
const ASCTIME_SPACES = [3, 7, 10, 19]
|
||||||
|
|
||||||
|
const RFC850_DAYS = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://www.rfc-editor.org/rfc/rfc9110.html#name-date-time-formats
|
* @see https://www.rfc-editor.org/rfc/rfc9110.html#name-date-time-formats
|
||||||
*
|
*
|
||||||
* @param {string} date
|
* @param {string} date
|
||||||
|
* @param {Date} [now]
|
||||||
* @returns {Date | undefined}
|
* @returns {Date | undefined}
|
||||||
*/
|
*/
|
||||||
function parseHttpDate (date) {
|
function parseHttpDate (date, now) {
|
||||||
// Sun, 06 Nov 1994 08:49:37 GMT ; IMF-fixdate
|
// Sun, 06 Nov 1994 08:49:37 GMT ; IMF-fixdate
|
||||||
// Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
|
// Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
|
||||||
// Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
|
// Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
|
||||||
|
|
||||||
|
date = date.toLowerCase()
|
||||||
|
|
||||||
switch (date[3]) {
|
switch (date[3]) {
|
||||||
case ',': return parseImfDate(date)
|
case ',': return parseImfDate(date)
|
||||||
case ' ': return parseAscTimeDate(date)
|
case ' ': return parseAscTimeDate(date)
|
||||||
default: return parseRfc850Date(date)
|
default: return parseRfc850Date(date, now)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44664,207 +44311,69 @@ function parseHttpDate (date) {
|
|||||||
* @returns {Date | undefined}
|
* @returns {Date | undefined}
|
||||||
*/
|
*/
|
||||||
function parseImfDate (date) {
|
function parseImfDate (date) {
|
||||||
if (
|
if (date.length !== 29) {
|
||||||
date.length !== 29 ||
|
|
||||||
date[4] !== ' ' ||
|
|
||||||
date[7] !== ' ' ||
|
|
||||||
date[11] !== ' ' ||
|
|
||||||
date[16] !== ' ' ||
|
|
||||||
date[19] !== ':' ||
|
|
||||||
date[22] !== ':' ||
|
|
||||||
date[25] !== ' ' ||
|
|
||||||
date[26] !== 'G' ||
|
|
||||||
date[27] !== 'M' ||
|
|
||||||
date[28] !== 'T'
|
|
||||||
) {
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
let weekday = -1
|
if (!date.endsWith('gmt')) {
|
||||||
if (date[0] === 'S' && date[1] === 'u' && date[2] === 'n') { // Sunday
|
// Unsupported timezone
|
||||||
weekday = 0
|
|
||||||
} else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n') { // Monday
|
|
||||||
weekday = 1
|
|
||||||
} else if (date[0] === 'T' && date[1] === 'u' && date[2] === 'e') { // Tuesday
|
|
||||||
weekday = 2
|
|
||||||
} else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd') { // Wednesday
|
|
||||||
weekday = 3
|
|
||||||
} else if (date[0] === 'T' && date[1] === 'h' && date[2] === 'u') { // Thursday
|
|
||||||
weekday = 4
|
|
||||||
} else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i') { // Friday
|
|
||||||
weekday = 5
|
|
||||||
} else if (date[0] === 'S' && date[1] === 'a' && date[2] === 't') { // Saturday
|
|
||||||
weekday = 6
|
|
||||||
} else {
|
|
||||||
return undefined // Not a valid day of the week
|
|
||||||
}
|
|
||||||
|
|
||||||
let day = 0
|
|
||||||
if (date[5] === '0') {
|
|
||||||
// Single digit day, e.g. "Sun Nov 6 08:49:37 1994"
|
|
||||||
const code = date.charCodeAt(6)
|
|
||||||
if (code < 49 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
day = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(5)
|
|
||||||
if (code1 < 49 || code1 > 51) {
|
|
||||||
return undefined // Not a digit between 1 and 3
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(6)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
|
||||||
|
|
||||||
let monthIdx = -1
|
|
||||||
if (
|
|
||||||
(date[8] === 'J' && date[9] === 'a' && date[10] === 'n')
|
|
||||||
) {
|
|
||||||
monthIdx = 0 // Jan
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'F' && date[9] === 'e' && date[10] === 'b')
|
|
||||||
) {
|
|
||||||
monthIdx = 1 // Feb
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'M' && date[9] === 'a')
|
|
||||||
) {
|
|
||||||
if (date[10] === 'r') {
|
|
||||||
monthIdx = 2 // Mar
|
|
||||||
} else if (date[10] === 'y') {
|
|
||||||
monthIdx = 4 // May
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'J')
|
|
||||||
) {
|
|
||||||
if (date[9] === 'a' && date[10] === 'n') {
|
|
||||||
monthIdx = 0 // Jan
|
|
||||||
} else if (date[9] === 'u') {
|
|
||||||
if (date[10] === 'n') {
|
|
||||||
monthIdx = 5 // Jun
|
|
||||||
} else if (date[10] === 'l') {
|
|
||||||
monthIdx = 6 // Jul
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'A')
|
|
||||||
) {
|
|
||||||
if (date[9] === 'p' && date[10] === 'r') {
|
|
||||||
monthIdx = 3 // Apr
|
|
||||||
} else if (date[9] === 'u' && date[10] === 'g') {
|
|
||||||
monthIdx = 7 // Aug
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'S' && date[9] === 'e' && date[10] === 'p')
|
|
||||||
) {
|
|
||||||
monthIdx = 8 // Sep
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'O' && date[9] === 'c' && date[10] === 't')
|
|
||||||
) {
|
|
||||||
monthIdx = 9 // Oct
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'N' && date[9] === 'o' && date[10] === 'v')
|
|
||||||
) {
|
|
||||||
monthIdx = 10 // Nov
|
|
||||||
} else if (
|
|
||||||
(date[8] === 'D' && date[9] === 'e' && date[10] === 'c')
|
|
||||||
) {
|
|
||||||
monthIdx = 11 // Dec
|
|
||||||
} else {
|
|
||||||
// Not a valid month
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const yearDigit1 = date.charCodeAt(12)
|
for (const spaceInx of IMF_SPACES) {
|
||||||
if (yearDigit1 < 48 || yearDigit1 > 57) {
|
if (date[spaceInx] !== ' ') {
|
||||||
return undefined // Not a digit
|
return undefined
|
||||||
}
|
|
||||||
const yearDigit2 = date.charCodeAt(13)
|
|
||||||
if (yearDigit2 < 48 || yearDigit2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
const yearDigit3 = date.charCodeAt(14)
|
|
||||||
if (yearDigit3 < 48 || yearDigit3 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
const yearDigit4 = date.charCodeAt(15)
|
|
||||||
if (yearDigit4 < 48 || yearDigit4 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48)
|
|
||||||
|
|
||||||
let hour = 0
|
|
||||||
if (date[17] === '0') {
|
|
||||||
const code = date.charCodeAt(18)
|
|
||||||
if (code < 48 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
}
|
||||||
hour = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(17)
|
|
||||||
if (code1 < 48 || code1 > 50) {
|
|
||||||
return undefined // Not a digit between 0 and 2
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(18)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
if (code1 === 50 && code2 > 51) {
|
|
||||||
return undefined // Hour cannot be greater than 23
|
|
||||||
}
|
|
||||||
hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let minute = 0
|
for (const colonIdx of IMF_COLONS) {
|
||||||
if (date[20] === '0') {
|
if (date[colonIdx] !== ':') {
|
||||||
const code = date.charCodeAt(21)
|
return undefined
|
||||||
if (code < 48 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
}
|
||||||
minute = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(20)
|
|
||||||
if (code1 < 48 || code1 > 53) {
|
|
||||||
return undefined // Not a digit between 0 and 5
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(21)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let second = 0
|
const dayName = date.substring(0, 3)
|
||||||
if (date[23] === '0') {
|
if (!IMF_DAYS.includes(dayName)) {
|
||||||
const code = date.charCodeAt(24)
|
return undefined
|
||||||
if (code < 48 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
second = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(23)
|
|
||||||
if (code1 < 48 || code1 > 53) {
|
|
||||||
return undefined // Not a digit between 0 and 5
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(24)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
const dayString = date.substring(5, 7)
|
||||||
return result.getUTCDay() === weekday ? result : undefined
|
const day = Number.parseInt(dayString)
|
||||||
|
if (isNaN(day) || (day < 10 && dayString[0] !== '0')) {
|
||||||
|
// Not a number, 0, or it's less than 10 and didn't start with a 0
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const month = date.substring(8, 11)
|
||||||
|
const monthIdx = IMF_MONTHS.indexOf(month)
|
||||||
|
if (monthIdx === -1) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const year = Number.parseInt(date.substring(12, 16))
|
||||||
|
if (isNaN(year)) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const hourString = date.substring(17, 19)
|
||||||
|
const hour = Number.parseInt(hourString)
|
||||||
|
if (isNaN(hour) || (hour < 10 && hourString[0] !== '0')) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const minuteString = date.substring(20, 22)
|
||||||
|
const minute = Number.parseInt(minuteString)
|
||||||
|
if (isNaN(minute) || (minute < 10 && minuteString[0] !== '0')) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const secondString = date.substring(23, 25)
|
||||||
|
const second = Number.parseInt(secondString)
|
||||||
|
if (isNaN(second) || (second < 10 && secondString[0] !== '0')) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44876,415 +44385,147 @@ function parseImfDate (date) {
|
|||||||
function parseAscTimeDate (date) {
|
function parseAscTimeDate (date) {
|
||||||
// This is assumed to be in UTC
|
// This is assumed to be in UTC
|
||||||
|
|
||||||
if (
|
if (date.length !== 24) {
|
||||||
date.length !== 24 ||
|
|
||||||
date[7] !== ' ' ||
|
|
||||||
date[10] !== ' ' ||
|
|
||||||
date[19] !== ' '
|
|
||||||
) {
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
let weekday = -1
|
for (const spaceIdx of ASCTIME_SPACES) {
|
||||||
if (date[0] === 'S' && date[1] === 'u' && date[2] === 'n') { // Sunday
|
if (date[spaceIdx] !== ' ') {
|
||||||
weekday = 0
|
return undefined
|
||||||
} else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n') { // Monday
|
}
|
||||||
weekday = 1
|
|
||||||
} else if (date[0] === 'T' && date[1] === 'u' && date[2] === 'e') { // Tuesday
|
|
||||||
weekday = 2
|
|
||||||
} else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd') { // Wednesday
|
|
||||||
weekday = 3
|
|
||||||
} else if (date[0] === 'T' && date[1] === 'h' && date[2] === 'u') { // Thursday
|
|
||||||
weekday = 4
|
|
||||||
} else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i') { // Friday
|
|
||||||
weekday = 5
|
|
||||||
} else if (date[0] === 'S' && date[1] === 'a' && date[2] === 't') { // Saturday
|
|
||||||
weekday = 6
|
|
||||||
} else {
|
|
||||||
return undefined // Not a valid day of the week
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let monthIdx = -1
|
const dayName = date.substring(0, 3)
|
||||||
if (
|
if (!IMF_DAYS.includes(dayName)) {
|
||||||
(date[4] === 'J' && date[5] === 'a' && date[6] === 'n')
|
|
||||||
) {
|
|
||||||
monthIdx = 0 // Jan
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'F' && date[5] === 'e' && date[6] === 'b')
|
|
||||||
) {
|
|
||||||
monthIdx = 1 // Feb
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'M' && date[5] === 'a')
|
|
||||||
) {
|
|
||||||
if (date[6] === 'r') {
|
|
||||||
monthIdx = 2 // Mar
|
|
||||||
} else if (date[6] === 'y') {
|
|
||||||
monthIdx = 4 // May
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'J')
|
|
||||||
) {
|
|
||||||
if (date[5] === 'a' && date[6] === 'n') {
|
|
||||||
monthIdx = 0 // Jan
|
|
||||||
} else if (date[5] === 'u') {
|
|
||||||
if (date[6] === 'n') {
|
|
||||||
monthIdx = 5 // Jun
|
|
||||||
} else if (date[6] === 'l') {
|
|
||||||
monthIdx = 6 // Jul
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'A')
|
|
||||||
) {
|
|
||||||
if (date[5] === 'p' && date[6] === 'r') {
|
|
||||||
monthIdx = 3 // Apr
|
|
||||||
} else if (date[5] === 'u' && date[6] === 'g') {
|
|
||||||
monthIdx = 7 // Aug
|
|
||||||
} else {
|
|
||||||
return undefined // Invalid month
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'S' && date[5] === 'e' && date[6] === 'p')
|
|
||||||
) {
|
|
||||||
monthIdx = 8 // Sep
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'O' && date[5] === 'c' && date[6] === 't')
|
|
||||||
) {
|
|
||||||
monthIdx = 9 // Oct
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'N' && date[5] === 'o' && date[6] === 'v')
|
|
||||||
) {
|
|
||||||
monthIdx = 10 // Nov
|
|
||||||
} else if (
|
|
||||||
(date[4] === 'D' && date[5] === 'e' && date[6] === 'c')
|
|
||||||
) {
|
|
||||||
monthIdx = 11 // Dec
|
|
||||||
} else {
|
|
||||||
// Not a valid month
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
let day = 0
|
const month = date.substring(4, 7)
|
||||||
if (date[8] === ' ') {
|
const monthIdx = IMF_MONTHS.indexOf(month)
|
||||||
// Single digit day, e.g. "Sun Nov 6 08:49:37 1994"
|
if (monthIdx === -1) {
|
||||||
const code = date.charCodeAt(9)
|
return undefined
|
||||||
if (code < 49 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
day = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(8)
|
|
||||||
if (code1 < 49 || code1 > 51) {
|
|
||||||
return undefined // Not a digit between 1 and 3
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(9)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let hour = 0
|
const dayString = date.substring(8, 10)
|
||||||
if (date[11] === '0') {
|
const day = Number.parseInt(dayString)
|
||||||
const code = date.charCodeAt(12)
|
if (isNaN(day) || (day < 10 && dayString[0] !== ' ')) {
|
||||||
if (code < 48 || code > 57) {
|
return undefined
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
hour = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(11)
|
|
||||||
if (code1 < 48 || code1 > 50) {
|
|
||||||
return undefined // Not a digit between 0 and 2
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(12)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
if (code1 === 50 && code2 > 51) {
|
|
||||||
return undefined // Hour cannot be greater than 23
|
|
||||||
}
|
|
||||||
hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let minute = 0
|
const hourString = date.substring(11, 13)
|
||||||
if (date[14] === '0') {
|
const hour = Number.parseInt(hourString)
|
||||||
const code = date.charCodeAt(15)
|
if (isNaN(hour) || (hour < 10 && hourString[0] !== '0')) {
|
||||||
if (code < 48 || code > 57) {
|
return undefined
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
minute = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(14)
|
|
||||||
if (code1 < 48 || code1 > 53) {
|
|
||||||
return undefined // Not a digit between 0 and 5
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(15)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let second = 0
|
const minuteString = date.substring(14, 16)
|
||||||
if (date[17] === '0') {
|
const minute = Number.parseInt(minuteString)
|
||||||
const code = date.charCodeAt(18)
|
if (isNaN(minute) || (minute < 10 && minuteString[0] !== '0')) {
|
||||||
if (code < 48 || code > 57) {
|
return undefined
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
second = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(17)
|
|
||||||
if (code1 < 48 || code1 > 53) {
|
|
||||||
return undefined // Not a digit between 0 and 5
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(18)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const yearDigit1 = date.charCodeAt(20)
|
const secondString = date.substring(17, 19)
|
||||||
if (yearDigit1 < 48 || yearDigit1 > 57) {
|
const second = Number.parseInt(secondString)
|
||||||
return undefined // Not a digit
|
if (isNaN(second) || (second < 10 && secondString[0] !== '0')) {
|
||||||
|
return undefined
|
||||||
}
|
}
|
||||||
const yearDigit2 = date.charCodeAt(21)
|
|
||||||
if (yearDigit2 < 48 || yearDigit2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
const yearDigit3 = date.charCodeAt(22)
|
|
||||||
if (yearDigit3 < 48 || yearDigit3 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
const yearDigit4 = date.charCodeAt(23)
|
|
||||||
if (yearDigit4 < 48 || yearDigit4 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48)
|
|
||||||
|
|
||||||
const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
const year = Number.parseInt(date.substring(20, 24))
|
||||||
return result.getUTCDay() === weekday ? result : undefined
|
if (isNaN(year)) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats
|
* @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats
|
||||||
*
|
*
|
||||||
* @param {string} date
|
* @param {string} date
|
||||||
|
* @param {Date} [now]
|
||||||
* @returns {Date | undefined}
|
* @returns {Date | undefined}
|
||||||
*/
|
*/
|
||||||
function parseRfc850Date (date) {
|
function parseRfc850Date (date, now = new Date()) {
|
||||||
let commaIndex = -1
|
if (!date.endsWith('gmt')) {
|
||||||
|
// Unsupported timezone
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
let weekday = -1
|
const commaIndex = date.indexOf(',')
|
||||||
if (date[0] === 'S') {
|
if (commaIndex === -1) {
|
||||||
if (date[1] === 'u' && date[2] === 'n' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {
|
return undefined
|
||||||
weekday = 0 // Sunday
|
}
|
||||||
commaIndex = 6
|
|
||||||
} else if (date[1] === 'a' && date[2] === 't' && date[3] === 'u' && date[4] === 'r' && date[5] === 'd' && date[6] === 'a' && date[7] === 'y') {
|
if ((date.length - commaIndex - 1) !== 23) {
|
||||||
weekday = 6 // Saturday
|
return undefined
|
||||||
commaIndex = 8
|
}
|
||||||
}
|
|
||||||
} else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {
|
const dayName = date.substring(0, commaIndex)
|
||||||
weekday = 1 // Monday
|
if (!RFC850_DAYS.includes(dayName)) {
|
||||||
commaIndex = 6
|
|
||||||
} else if (date[0] === 'T') {
|
|
||||||
if (date[1] === 'u' && date[2] === 'e' && date[3] === 's' && date[4] === 'd' && date[5] === 'a' && date[6] === 'y') {
|
|
||||||
weekday = 2 // Tuesday
|
|
||||||
commaIndex = 7
|
|
||||||
} else if (date[1] === 'h' && date[2] === 'u' && date[3] === 'r' && date[4] === 's' && date[5] === 'd' && date[6] === 'a' && date[7] === 'y') {
|
|
||||||
weekday = 4 // Thursday
|
|
||||||
commaIndex = 8
|
|
||||||
}
|
|
||||||
} else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd' && date[3] === 'n' && date[4] === 'e' && date[5] === 's' && date[6] === 'd' && date[7] === 'a' && date[8] === 'y') {
|
|
||||||
weekday = 3 // Wednesday
|
|
||||||
commaIndex = 9
|
|
||||||
} else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {
|
|
||||||
weekday = 5 // Friday
|
|
||||||
commaIndex = 6
|
|
||||||
} else {
|
|
||||||
// Not a valid day name
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
date[commaIndex] !== ',' ||
|
|
||||||
(date.length - commaIndex - 1) !== 23 ||
|
|
||||||
date[commaIndex + 1] !== ' ' ||
|
date[commaIndex + 1] !== ' ' ||
|
||||||
date[commaIndex + 4] !== '-' ||
|
date[commaIndex + 4] !== '-' ||
|
||||||
date[commaIndex + 8] !== '-' ||
|
date[commaIndex + 8] !== '-' ||
|
||||||
date[commaIndex + 11] !== ' ' ||
|
date[commaIndex + 11] !== ' ' ||
|
||||||
date[commaIndex + 14] !== ':' ||
|
date[commaIndex + 14] !== ':' ||
|
||||||
date[commaIndex + 17] !== ':' ||
|
date[commaIndex + 17] !== ':' ||
|
||||||
date[commaIndex + 20] !== ' ' ||
|
date[commaIndex + 20] !== ' '
|
||||||
date[commaIndex + 21] !== 'G' ||
|
|
||||||
date[commaIndex + 22] !== 'M' ||
|
|
||||||
date[commaIndex + 23] !== 'T'
|
|
||||||
) {
|
) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
let day = 0
|
const dayString = date.substring(commaIndex + 2, commaIndex + 4)
|
||||||
if (date[commaIndex + 2] === '0') {
|
const day = Number.parseInt(dayString)
|
||||||
// Single digit day, e.g. "Sun Nov 6 08:49:37 1994"
|
if (isNaN(day) || (day < 10 && dayString[0] !== '0')) {
|
||||||
const code = date.charCodeAt(commaIndex + 3)
|
// Not a number, or it's less than 10 and didn't start with a 0
|
||||||
if (code < 49 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
day = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(commaIndex + 2)
|
|
||||||
if (code1 < 49 || code1 > 51) {
|
|
||||||
return undefined // Not a digit between 1 and 3
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(commaIndex + 3)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
|
||||||
|
|
||||||
let monthIdx = -1
|
|
||||||
if (
|
|
||||||
(date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'n')
|
|
||||||
) {
|
|
||||||
monthIdx = 0 // Jan
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'F' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'b')
|
|
||||||
) {
|
|
||||||
monthIdx = 1 // Feb
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'M' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'r')
|
|
||||||
) {
|
|
||||||
monthIdx = 2 // Mar
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'A' && date[commaIndex + 6] === 'p' && date[commaIndex + 7] === 'r')
|
|
||||||
) {
|
|
||||||
monthIdx = 3 // Apr
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'M' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'y')
|
|
||||||
) {
|
|
||||||
monthIdx = 4 // May
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'n')
|
|
||||||
) {
|
|
||||||
monthIdx = 5 // Jun
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'l')
|
|
||||||
) {
|
|
||||||
monthIdx = 6 // Jul
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'A' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'g')
|
|
||||||
) {
|
|
||||||
monthIdx = 7 // Aug
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'S' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'p')
|
|
||||||
) {
|
|
||||||
monthIdx = 8 // Sep
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'O' && date[commaIndex + 6] === 'c' && date[commaIndex + 7] === 't')
|
|
||||||
) {
|
|
||||||
monthIdx = 9 // Oct
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'N' && date[commaIndex + 6] === 'o' && date[commaIndex + 7] === 'v')
|
|
||||||
) {
|
|
||||||
monthIdx = 10 // Nov
|
|
||||||
} else if (
|
|
||||||
(date[commaIndex + 5] === 'D' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'c')
|
|
||||||
) {
|
|
||||||
monthIdx = 11 // Dec
|
|
||||||
} else {
|
|
||||||
// Not a valid month
|
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const yearDigit1 = date.charCodeAt(commaIndex + 9)
|
const month = date.substring(commaIndex + 5, commaIndex + 8)
|
||||||
if (yearDigit1 < 48 || yearDigit1 > 57) {
|
const monthIdx = IMF_MONTHS.indexOf(month)
|
||||||
return undefined // Not a digit
|
if (monthIdx === -1) {
|
||||||
}
|
return undefined
|
||||||
const yearDigit2 = date.charCodeAt(commaIndex + 10)
|
|
||||||
if (yearDigit2 < 48 || yearDigit2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let year = (yearDigit1 - 48) * 10 + (yearDigit2 - 48) // Convert ASCII codes to number
|
// As of this point year is just the decade (i.e. 94)
|
||||||
|
let year = Number.parseInt(date.substring(commaIndex + 9, commaIndex + 11))
|
||||||
|
if (isNaN(year)) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
// RFC 6265 states that the year is in the range 1970-2069.
|
const currentYear = now.getUTCFullYear()
|
||||||
// @see https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.1
|
const currentDecade = currentYear % 100
|
||||||
//
|
const currentCentury = Math.floor(currentYear / 100)
|
||||||
// 3. If the year-value is greater than or equal to 70 and less than or
|
|
||||||
// equal to 99, increment the year-value by 1900.
|
|
||||||
// 4. If the year-value is greater than or equal to 0 and less than or
|
|
||||||
// equal to 69, increment the year-value by 2000.
|
|
||||||
year += year < 70 ? 2000 : 1900
|
|
||||||
|
|
||||||
let hour = 0
|
if (year > currentDecade && year - currentDecade >= 50) {
|
||||||
if (date[commaIndex + 12] === '0') {
|
// Over 50 years in future, go to previous century
|
||||||
const code = date.charCodeAt(commaIndex + 13)
|
year += (currentCentury - 1) * 100
|
||||||
if (code < 48 || code > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
hour = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
} else {
|
||||||
const code1 = date.charCodeAt(commaIndex + 12)
|
year += currentCentury * 100
|
||||||
if (code1 < 48 || code1 > 50) {
|
|
||||||
return undefined // Not a digit between 0 and 2
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(commaIndex + 13)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
if (code1 === 50 && code2 > 51) {
|
|
||||||
return undefined // Hour cannot be greater than 23
|
|
||||||
}
|
|
||||||
hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let minute = 0
|
const hourString = date.substring(commaIndex + 12, commaIndex + 14)
|
||||||
if (date[commaIndex + 15] === '0') {
|
const hour = Number.parseInt(hourString)
|
||||||
const code = date.charCodeAt(commaIndex + 16)
|
if (isNaN(hour) || (hour < 10 && hourString[0] !== '0')) {
|
||||||
if (code < 48 || code > 57) {
|
return undefined
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
minute = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(commaIndex + 15)
|
|
||||||
if (code1 < 48 || code1 > 53) {
|
|
||||||
return undefined // Not a digit between 0 and 5
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(commaIndex + 16)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let second = 0
|
const minuteString = date.substring(commaIndex + 15, commaIndex + 17)
|
||||||
if (date[commaIndex + 18] === '0') {
|
const minute = Number.parseInt(minuteString)
|
||||||
const code = date.charCodeAt(commaIndex + 19)
|
if (isNaN(minute) || (minute < 10 && minuteString[0] !== '0')) {
|
||||||
if (code < 48 || code > 57) {
|
return undefined
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
second = code - 48 // Convert ASCII code to number
|
|
||||||
} else {
|
|
||||||
const code1 = date.charCodeAt(commaIndex + 18)
|
|
||||||
if (code1 < 48 || code1 > 53) {
|
|
||||||
return undefined // Not a digit between 0 and 5
|
|
||||||
}
|
|
||||||
const code2 = date.charCodeAt(commaIndex + 19)
|
|
||||||
if (code2 < 48 || code2 > 57) {
|
|
||||||
return undefined // Not a digit
|
|
||||||
}
|
|
||||||
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
const secondString = date.substring(commaIndex + 18, commaIndex + 20)
|
||||||
return result.getUTCDay() === weekday ? result : undefined
|
const second = Number.parseInt(secondString)
|
||||||
|
if (isNaN(second) || (second < 10 && secondString[0] !== '0')) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -47100,7 +46341,7 @@ webidl.converters.Cookie = webidl.dictionaryConverter([
|
|||||||
{
|
{
|
||||||
converter: webidl.sequenceConverter(webidl.converters.DOMString),
|
converter: webidl.sequenceConverter(webidl.converters.DOMString),
|
||||||
key: 'unparsed',
|
key: 'unparsed',
|
||||||
defaultValue: () => []
|
defaultValue: () => new Array(0)
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -47977,7 +47218,7 @@ class EventSourceStream extends Transform {
|
|||||||
this.buffer = this.buffer.subarray(this.pos + 1)
|
this.buffer = this.buffer.subarray(this.pos + 1)
|
||||||
this.pos = 0
|
this.pos = 0
|
||||||
if (
|
if (
|
||||||
this.event.data !== undefined || this.event.event || this.event.id !== undefined || this.event.retry) {
|
this.event.data !== undefined || this.event.event || this.event.id || this.event.retry) {
|
||||||
this.processEvent(this.event)
|
this.processEvent(this.event)
|
||||||
}
|
}
|
||||||
this.clearEvent()
|
this.clearEvent()
|
||||||
@@ -48108,7 +47349,7 @@ class EventSourceStream extends Transform {
|
|||||||
this.state.reconnectionTime = parseInt(event.retry, 10)
|
this.state.reconnectionTime = parseInt(event.retry, 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.id !== undefined && isValidLastEventId(event.id)) {
|
if (event.id && isValidLastEventId(event.id)) {
|
||||||
this.state.lastEventId = event.id
|
this.state.lastEventId = event.id
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48156,6 +47397,7 @@ const { EventSourceStream } = __nccwpck_require__(4031)
|
|||||||
const { parseMIMEType } = __nccwpck_require__(1900)
|
const { parseMIMEType } = __nccwpck_require__(1900)
|
||||||
const { createFastMessageEvent } = __nccwpck_require__(5188)
|
const { createFastMessageEvent } = __nccwpck_require__(5188)
|
||||||
const { isNetworkError } = __nccwpck_require__(9051)
|
const { isNetworkError } = __nccwpck_require__(9051)
|
||||||
|
const { delay } = __nccwpck_require__(4811)
|
||||||
const { kEnumerableProperty } = __nccwpck_require__(3440)
|
const { kEnumerableProperty } = __nccwpck_require__(3440)
|
||||||
const { environmentSettingsObject } = __nccwpck_require__(3168)
|
const { environmentSettingsObject } = __nccwpck_require__(3168)
|
||||||
|
|
||||||
@@ -48465,9 +47707,9 @@ class EventSource extends EventTarget {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model
|
* @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model
|
||||||
* @returns {void}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
#reconnect () {
|
async #reconnect () {
|
||||||
// When a user agent is to reestablish the connection, the user agent must
|
// When a user agent is to reestablish the connection, the user agent must
|
||||||
// run the following steps. These steps are run in parallel, not as part of
|
// run the following steps. These steps are run in parallel, not as part of
|
||||||
// a task. (The tasks that it queues, of course, are run like normal tasks
|
// a task. (The tasks that it queues, of course, are run like normal tasks
|
||||||
@@ -48485,27 +47727,27 @@ class EventSource extends EventTarget {
|
|||||||
this.dispatchEvent(new Event('error'))
|
this.dispatchEvent(new Event('error'))
|
||||||
|
|
||||||
// 2. Wait a delay equal to the reconnection time of the event source.
|
// 2. Wait a delay equal to the reconnection time of the event source.
|
||||||
setTimeout(() => {
|
await delay(this.#state.reconnectionTime)
|
||||||
// 5. Queue a task to run the following steps:
|
|
||||||
|
|
||||||
// 1. If the EventSource object's readyState attribute is not set to
|
// 5. Queue a task to run the following steps:
|
||||||
// CONNECTING, then return.
|
|
||||||
if (this.#readyState !== CONNECTING) return
|
|
||||||
|
|
||||||
// 2. Let request be the EventSource object's request.
|
// 1. If the EventSource object's readyState attribute is not set to
|
||||||
// 3. If the EventSource object's last event ID string is not the empty
|
// CONNECTING, then return.
|
||||||
// string, then:
|
if (this.#readyState !== CONNECTING) return
|
||||||
// 1. Let lastEventIDValue be the EventSource object's last event ID
|
|
||||||
// string, encoded as UTF-8.
|
|
||||||
// 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header
|
|
||||||
// list.
|
|
||||||
if (this.#state.lastEventId.length) {
|
|
||||||
this.#request.headersList.set('last-event-id', this.#state.lastEventId, true)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section.
|
// 2. Let request be the EventSource object's request.
|
||||||
this.#connect()
|
// 3. If the EventSource object's last event ID string is not the empty
|
||||||
}, this.#state.reconnectionTime)?.unref()
|
// string, then:
|
||||||
|
// 1. Let lastEventIDValue be the EventSource object's last event ID
|
||||||
|
// string, encoded as UTF-8.
|
||||||
|
// 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header
|
||||||
|
// list.
|
||||||
|
if (this.#state.lastEventId.length) {
|
||||||
|
this.#request.headersList.set('last-event-id', this.#state.lastEventId, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section.
|
||||||
|
this.#connect()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48530,11 +47772,9 @@ class EventSource extends EventTarget {
|
|||||||
this.removeEventListener('open', this.#events.open)
|
this.removeEventListener('open', this.#events.open)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('open', listener)
|
|
||||||
this.#events.open = fn
|
this.#events.open = fn
|
||||||
|
this.addEventListener('open', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.open = null
|
this.#events.open = null
|
||||||
}
|
}
|
||||||
@@ -48549,11 +47789,9 @@ class EventSource extends EventTarget {
|
|||||||
this.removeEventListener('message', this.#events.message)
|
this.removeEventListener('message', this.#events.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('message', listener)
|
|
||||||
this.#events.message = fn
|
this.#events.message = fn
|
||||||
|
this.addEventListener('message', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.message = null
|
this.#events.message = null
|
||||||
}
|
}
|
||||||
@@ -48568,11 +47806,9 @@ class EventSource extends EventTarget {
|
|||||||
this.removeEventListener('error', this.#events.error)
|
this.removeEventListener('error', this.#events.error)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('error', listener)
|
|
||||||
this.#events.error = fn
|
this.#events.error = fn
|
||||||
|
this.addEventListener('error', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.error = null
|
this.#events.error = null
|
||||||
}
|
}
|
||||||
@@ -48680,9 +47916,17 @@ function isASCIINumber (value) {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/nodejs/undici/issues/2664
|
||||||
|
function delay (ms) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
setTimeout(resolve, ms)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isValidLastEventId,
|
isValidLastEventId,
|
||||||
isASCIINumber
|
isASCIINumber,
|
||||||
|
delay
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -48754,7 +47998,7 @@ function extractBody (object, keepalive = false) {
|
|||||||
// 4. Otherwise, set stream to a new ReadableStream object, and set
|
// 4. Otherwise, set stream to a new ReadableStream object, and set
|
||||||
// up stream with byte reading support.
|
// up stream with byte reading support.
|
||||||
stream = new ReadableStream({
|
stream = new ReadableStream({
|
||||||
pull (controller) {
|
async pull (controller) {
|
||||||
const buffer = typeof source === 'string' ? textEncoder.encode(source) : source
|
const buffer = typeof source === 'string' ? textEncoder.encode(source) : source
|
||||||
|
|
||||||
if (buffer.byteLength) {
|
if (buffer.byteLength) {
|
||||||
@@ -48804,10 +48048,16 @@ function extractBody (object, keepalive = false) {
|
|||||||
|
|
||||||
// Set type to `application/x-www-form-urlencoded;charset=UTF-8`.
|
// Set type to `application/x-www-form-urlencoded;charset=UTF-8`.
|
||||||
type = 'application/x-www-form-urlencoded;charset=UTF-8'
|
type = 'application/x-www-form-urlencoded;charset=UTF-8'
|
||||||
} else if (webidl.is.BufferSource(object)) {
|
} else if (isArrayBuffer(object)) {
|
||||||
source = isArrayBuffer(object)
|
// BufferSource/ArrayBuffer
|
||||||
? new Uint8Array(object.slice())
|
|
||||||
: new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
|
// Set source to a copy of the bytes held by object.
|
||||||
|
source = new Uint8Array(object.slice())
|
||||||
|
} else if (ArrayBuffer.isView(object)) {
|
||||||
|
// BufferSource/ArrayBufferView
|
||||||
|
|
||||||
|
// Set source to a copy of the bytes held by object.
|
||||||
|
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
|
||||||
} else if (webidl.is.FormData(object)) {
|
} else if (webidl.is.FormData(object)) {
|
||||||
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
|
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
|
||||||
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
|
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
|
||||||
@@ -49008,6 +48258,12 @@ function cloneBody (body) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function throwIfAborted (state) {
|
||||||
|
if (state.aborted) {
|
||||||
|
throw new DOMException('The operation was aborted.', 'AbortError')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function bodyMixinMethods (instance, getInternalState) {
|
function bodyMixinMethods (instance, getInternalState) {
|
||||||
const methods = {
|
const methods = {
|
||||||
blob () {
|
blob () {
|
||||||
@@ -49125,30 +48381,24 @@ function mixinBody (prototype, getInternalState) {
|
|||||||
* @param {any} instance
|
* @param {any} instance
|
||||||
* @param {(target: any) => any} getInternalState
|
* @param {(target: any) => any} getInternalState
|
||||||
*/
|
*/
|
||||||
function consumeBody (object, convertBytesToJSValue, instance, getInternalState) {
|
async function consumeBody (object, convertBytesToJSValue, instance, getInternalState) {
|
||||||
try {
|
webidl.brandCheck(object, instance)
|
||||||
webidl.brandCheck(object, instance)
|
|
||||||
} catch (e) {
|
|
||||||
return Promise.reject(e)
|
|
||||||
}
|
|
||||||
|
|
||||||
const state = getInternalState(object)
|
const state = getInternalState(object)
|
||||||
|
|
||||||
// 1. If object is unusable, then return a promise rejected
|
// 1. If object is unusable, then return a promise rejected
|
||||||
// with a TypeError.
|
// with a TypeError.
|
||||||
if (bodyUnusable(state)) {
|
if (bodyUnusable(state)) {
|
||||||
return Promise.reject(new TypeError('Body is unusable: Body has already been read'))
|
throw new TypeError('Body is unusable: Body has already been read')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.aborted) {
|
throwIfAborted(state)
|
||||||
return Promise.reject(new DOMException('The operation was aborted.', 'AbortError'))
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. Let promise be a new promise.
|
// 2. Let promise be a new promise.
|
||||||
const promise = createDeferredPromise()
|
const promise = createDeferredPromise()
|
||||||
|
|
||||||
// 3. Let errorSteps given error be to reject promise with error.
|
// 3. Let errorSteps given error be to reject promise with error.
|
||||||
const errorSteps = promise.reject
|
const errorSteps = (error) => promise.reject(error)
|
||||||
|
|
||||||
// 4. Let successSteps given a byte sequence data be to resolve
|
// 4. Let successSteps given a byte sequence data be to resolve
|
||||||
// promise with the result of running convertBytesToJSValue
|
// promise with the result of running convertBytesToJSValue
|
||||||
@@ -51741,9 +50991,6 @@ const { webidl } = __nccwpck_require__(7879)
|
|||||||
const { STATUS_CODES } = __nccwpck_require__(7067)
|
const { STATUS_CODES } = __nccwpck_require__(7067)
|
||||||
const { bytesMatch } = __nccwpck_require__(5082)
|
const { bytesMatch } = __nccwpck_require__(5082)
|
||||||
const { createDeferredPromise } = __nccwpck_require__(6436)
|
const { createDeferredPromise } = __nccwpck_require__(6436)
|
||||||
|
|
||||||
const hasZstd = typeof zlib.createZstdDecompress === 'function'
|
|
||||||
|
|
||||||
const GET_OR_HEAD = ['GET', 'HEAD']
|
const GET_OR_HEAD = ['GET', 'HEAD']
|
||||||
|
|
||||||
const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined'
|
const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined'
|
||||||
@@ -53785,29 +53032,33 @@ async function httpNetworkFetch (
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @type {string[]} */
|
||||||
|
let codings = []
|
||||||
|
|
||||||
const headersList = new HeadersList()
|
const headersList = new HeadersList()
|
||||||
|
|
||||||
for (let i = 0; i < rawHeaders.length; i += 2) {
|
for (let i = 0; i < rawHeaders.length; i += 2) {
|
||||||
headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true)
|
headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true)
|
||||||
}
|
}
|
||||||
|
const contentEncoding = headersList.get('content-encoding', true)
|
||||||
|
if (contentEncoding) {
|
||||||
|
// https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1
|
||||||
|
// "All content-coding values are case-insensitive..."
|
||||||
|
codings = contentEncoding.toLowerCase().split(',').map((x) => x.trim())
|
||||||
|
}
|
||||||
const location = headersList.get('location', true)
|
const location = headersList.get('location', true)
|
||||||
|
|
||||||
this.body = new Readable({ read: resume })
|
this.body = new Readable({ read: resume })
|
||||||
|
|
||||||
|
const decoders = []
|
||||||
|
|
||||||
const willFollow = location && request.redirect === 'follow' &&
|
const willFollow = location && request.redirect === 'follow' &&
|
||||||
redirectStatusSet.has(status)
|
redirectStatusSet.has(status)
|
||||||
|
|
||||||
const decoders = []
|
|
||||||
|
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding
|
||||||
if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) {
|
if (codings.length !== 0 && request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) {
|
||||||
// https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1
|
|
||||||
const contentEncoding = headersList.get('content-encoding', true)
|
|
||||||
// "All content-coding values are case-insensitive..."
|
|
||||||
/** @type {string[]} */
|
|
||||||
const codings = contentEncoding ? contentEncoding.toLowerCase().split(',') : []
|
|
||||||
for (let i = codings.length - 1; i >= 0; --i) {
|
for (let i = codings.length - 1; i >= 0; --i) {
|
||||||
const coding = codings[i].trim()
|
const coding = codings[i]
|
||||||
// https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2
|
// https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2
|
||||||
if (coding === 'x-gzip' || coding === 'gzip') {
|
if (coding === 'x-gzip' || coding === 'gzip') {
|
||||||
decoders.push(zlib.createGunzip({
|
decoders.push(zlib.createGunzip({
|
||||||
@@ -53828,8 +53079,8 @@ async function httpNetworkFetch (
|
|||||||
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
||||||
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
||||||
}))
|
}))
|
||||||
} else if (coding === 'zstd' && hasZstd) {
|
} else if (coding === 'zstd' && typeof zlib.createZstdDecompress === 'function') {
|
||||||
// Node.js v23.8.0+ and v22.15.0+ supports Zstandard
|
// Node.js v23.8.0+ and v22.15.0+ supports Zstandard
|
||||||
decoders.push(zlib.createZstdDecompress({
|
decoders.push(zlib.createZstdDecompress({
|
||||||
flush: zlib.constants.ZSTD_e_continue,
|
flush: zlib.constants.ZSTD_e_continue,
|
||||||
finishFlush: zlib.constants.ZSTD_e_end
|
finishFlush: zlib.constants.ZSTD_e_end
|
||||||
@@ -55083,6 +54334,8 @@ const { URLSerializer } = __nccwpck_require__(1900)
|
|||||||
const { kConstruct } = __nccwpck_require__(6443)
|
const { kConstruct } = __nccwpck_require__(6443)
|
||||||
const assert = __nccwpck_require__(4589)
|
const assert = __nccwpck_require__(4589)
|
||||||
|
|
||||||
|
const { isArrayBuffer } = nodeUtil.types
|
||||||
|
|
||||||
const textEncoder = new TextEncoder('utf-8')
|
const textEncoder = new TextEncoder('utf-8')
|
||||||
|
|
||||||
// https://fetch.spec.whatwg.org/#response-class
|
// https://fetch.spec.whatwg.org/#response-class
|
||||||
@@ -55178,7 +54431,7 @@ class Response {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (body !== null) {
|
if (body !== null) {
|
||||||
body = webidl.converters.BodyInit(body, 'Response', 'body')
|
body = webidl.converters.BodyInit(body)
|
||||||
}
|
}
|
||||||
|
|
||||||
init = webidl.converters.ResponseInit(init)
|
init = webidl.converters.ResponseInit(init)
|
||||||
@@ -55638,7 +54891,7 @@ webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) {
|
|||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
|
|
||||||
if (webidl.is.BufferSource(V)) {
|
if (ArrayBuffer.isView(V) || isArrayBuffer(V)) {
|
||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56210,8 +55463,8 @@ function determineRequestsReferrer (request) {
|
|||||||
if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {
|
if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {
|
||||||
return 'no-referrer'
|
return 'no-referrer'
|
||||||
}
|
}
|
||||||
// 2. Return referrerURL.
|
// 2. Return referrerOrigin
|
||||||
return referrerURL
|
return referrerOrigin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56262,11 +55515,17 @@ function stripURLForReferrer (url, originOnly = false) {
|
|||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
|
|
||||||
const isPotentialleTrustworthyIPv4 = RegExp.prototype.test
|
const potentialleTrustworthyIPv4RegExp = new RegExp('^(?:' +
|
||||||
.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/)
|
'(?:127\\.)' +
|
||||||
|
'(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){2}' +
|
||||||
|
'(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9])' +
|
||||||
|
')$')
|
||||||
|
|
||||||
const isPotentiallyTrustworthyIPv6 = RegExp.prototype.test
|
const potentialleTrustworthyIPv6RegExp = new RegExp('^(?:' +
|
||||||
.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/)
|
'(?:(?:0{1,4}):){7}(?:(?:0{0,3}1))|' +
|
||||||
|
'(?:(?:0{1,4}):){1,6}(?::(?:0{0,3}1))|' +
|
||||||
|
'(?:::(?:0{0,3}1))|' +
|
||||||
|
')$')
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if host matches one of the CIDR notations 127.0.0.0/8 or ::1/128.
|
* Check if host matches one of the CIDR notations 127.0.0.0/8 or ::1/128.
|
||||||
@@ -56281,11 +55540,11 @@ function isOriginIPPotentiallyTrustworthy (origin) {
|
|||||||
if (origin[0] === '[' && origin[origin.length - 1] === ']') {
|
if (origin[0] === '[' && origin[origin.length - 1] === ']') {
|
||||||
origin = origin.slice(1, -1)
|
origin = origin.slice(1, -1)
|
||||||
}
|
}
|
||||||
return isPotentiallyTrustworthyIPv6(origin)
|
return potentialleTrustworthyIPv6RegExp.test(origin)
|
||||||
}
|
}
|
||||||
|
|
||||||
// IPv4
|
// IPv4
|
||||||
return isPotentialleTrustworthyIPv4(origin)
|
return potentialleTrustworthyIPv4RegExp.test(origin)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57748,7 +57007,7 @@ webidl.util.TypeValueToString = function (o) {
|
|||||||
webidl.util.markAsUncloneable = markAsUncloneable || (() => {})
|
webidl.util.markAsUncloneable = markAsUncloneable || (() => {})
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
|
// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
|
||||||
webidl.util.ConvertToInt = function (V, bitLength, signedness, flags) {
|
webidl.util.ConvertToInt = function (V, bitLength, signedness, opts) {
|
||||||
let upperBound
|
let upperBound
|
||||||
let lowerBound
|
let lowerBound
|
||||||
|
|
||||||
@@ -57792,7 +57051,7 @@ webidl.util.ConvertToInt = function (V, bitLength, signedness, flags) {
|
|||||||
|
|
||||||
// 6. If the conversion is to an IDL type associated
|
// 6. If the conversion is to an IDL type associated
|
||||||
// with the [EnforceRange] extended attribute, then:
|
// with the [EnforceRange] extended attribute, then:
|
||||||
if (webidl.util.HasFlag(flags, webidl.attributes.EnforceRange)) {
|
if (opts?.enforceRange === true) {
|
||||||
// 1. If x is NaN, +∞, or −∞, then throw a TypeError.
|
// 1. If x is NaN, +∞, or −∞, then throw a TypeError.
|
||||||
if (
|
if (
|
||||||
Number.isNaN(x) ||
|
Number.isNaN(x) ||
|
||||||
@@ -57824,7 +57083,7 @@ webidl.util.ConvertToInt = function (V, bitLength, signedness, flags) {
|
|||||||
// 7. If x is not NaN and the conversion is to an IDL
|
// 7. If x is not NaN and the conversion is to an IDL
|
||||||
// type associated with the [Clamp] extended
|
// type associated with the [Clamp] extended
|
||||||
// attribute, then:
|
// attribute, then:
|
||||||
if (!Number.isNaN(x) && webidl.util.HasFlag(flags, webidl.attributes.Clamp)) {
|
if (!Number.isNaN(x) && opts?.clamp === true) {
|
||||||
// 1. Set x to min(max(x, lowerBound), upperBound).
|
// 1. Set x to min(max(x, lowerBound), upperBound).
|
||||||
x = Math.min(Math.max(x, lowerBound), upperBound)
|
x = Math.min(Math.max(x, lowerBound), upperBound)
|
||||||
|
|
||||||
@@ -57898,25 +57157,6 @@ webidl.util.Stringify = function (V) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
webidl.util.IsResizableArrayBuffer = function (V) {
|
|
||||||
if (types.isArrayBuffer(V)) {
|
|
||||||
return V.resizable
|
|
||||||
}
|
|
||||||
|
|
||||||
if (types.isSharedArrayBuffer(V)) {
|
|
||||||
return V.growable
|
|
||||||
}
|
|
||||||
|
|
||||||
throw webidl.errors.exception({
|
|
||||||
header: 'IsResizableArrayBuffer',
|
|
||||||
message: `"${webidl.util.Stringify(V)}" is not an array buffer.`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
webidl.util.HasFlag = function (flags, attributes) {
|
|
||||||
return typeof flags === 'number' && (flags & attributes) === attributes
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#es-sequence
|
// https://webidl.spec.whatwg.org/#es-sequence
|
||||||
webidl.sequenceConverter = function (converter) {
|
webidl.sequenceConverter = function (converter) {
|
||||||
return (V, prefix, argument, Iterable) => {
|
return (V, prefix, argument, Iterable) => {
|
||||||
@@ -58121,20 +57361,13 @@ webidl.is.URL = webidl.util.MakeTypeAssertion(URL)
|
|||||||
webidl.is.AbortSignal = webidl.util.MakeTypeAssertion(AbortSignal)
|
webidl.is.AbortSignal = webidl.util.MakeTypeAssertion(AbortSignal)
|
||||||
webidl.is.MessagePort = webidl.util.MakeTypeAssertion(MessagePort)
|
webidl.is.MessagePort = webidl.util.MakeTypeAssertion(MessagePort)
|
||||||
|
|
||||||
webidl.is.BufferSource = function (V) {
|
|
||||||
return types.isArrayBuffer(V) || (
|
|
||||||
ArrayBuffer.isView(V) &&
|
|
||||||
types.isArrayBuffer(V.buffer)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#es-DOMString
|
// https://webidl.spec.whatwg.org/#es-DOMString
|
||||||
webidl.converters.DOMString = function (V, prefix, argument, flags) {
|
webidl.converters.DOMString = function (V, prefix, argument, opts) {
|
||||||
// 1. If V is null and the conversion is to an IDL type
|
// 1. If V is null and the conversion is to an IDL type
|
||||||
// associated with the [LegacyNullToEmptyString]
|
// associated with the [LegacyNullToEmptyString]
|
||||||
// extended attribute, then return the DOMString value
|
// extended attribute, then return the DOMString value
|
||||||
// that represents the empty string.
|
// that represents the empty string.
|
||||||
if (V === null && webidl.util.HasFlag(flags, webidl.attributes.LegacyNullToEmptyString)) {
|
if (V === null && opts?.legacyNullToEmptyString) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58213,7 +57446,7 @@ webidl.converters.any = function (V) {
|
|||||||
// https://webidl.spec.whatwg.org/#es-long-long
|
// https://webidl.spec.whatwg.org/#es-long-long
|
||||||
webidl.converters['long long'] = function (V, prefix, argument) {
|
webidl.converters['long long'] = function (V, prefix, argument) {
|
||||||
// 1. Let x be ? ConvertToInt(V, 64, "signed").
|
// 1. Let x be ? ConvertToInt(V, 64, "signed").
|
||||||
const x = webidl.util.ConvertToInt(V, 64, 'signed', 0, prefix, argument)
|
const x = webidl.util.ConvertToInt(V, 64, 'signed', undefined, prefix, argument)
|
||||||
|
|
||||||
// 2. Return the IDL long long value that represents
|
// 2. Return the IDL long long value that represents
|
||||||
// the same numeric value as x.
|
// the same numeric value as x.
|
||||||
@@ -58223,7 +57456,7 @@ webidl.converters['long long'] = function (V, prefix, argument) {
|
|||||||
// https://webidl.spec.whatwg.org/#es-unsigned-long-long
|
// https://webidl.spec.whatwg.org/#es-unsigned-long-long
|
||||||
webidl.converters['unsigned long long'] = function (V, prefix, argument) {
|
webidl.converters['unsigned long long'] = function (V, prefix, argument) {
|
||||||
// 1. Let x be ? ConvertToInt(V, 64, "unsigned").
|
// 1. Let x be ? ConvertToInt(V, 64, "unsigned").
|
||||||
const x = webidl.util.ConvertToInt(V, 64, 'unsigned', 0, prefix, argument)
|
const x = webidl.util.ConvertToInt(V, 64, 'unsigned', undefined, prefix, argument)
|
||||||
|
|
||||||
// 2. Return the IDL unsigned long long value that
|
// 2. Return the IDL unsigned long long value that
|
||||||
// represents the same numeric value as x.
|
// represents the same numeric value as x.
|
||||||
@@ -58233,7 +57466,7 @@ webidl.converters['unsigned long long'] = function (V, prefix, argument) {
|
|||||||
// https://webidl.spec.whatwg.org/#es-unsigned-long
|
// https://webidl.spec.whatwg.org/#es-unsigned-long
|
||||||
webidl.converters['unsigned long'] = function (V, prefix, argument) {
|
webidl.converters['unsigned long'] = function (V, prefix, argument) {
|
||||||
// 1. Let x be ? ConvertToInt(V, 32, "unsigned").
|
// 1. Let x be ? ConvertToInt(V, 32, "unsigned").
|
||||||
const x = webidl.util.ConvertToInt(V, 32, 'unsigned', 0, prefix, argument)
|
const x = webidl.util.ConvertToInt(V, 32, 'unsigned', undefined, prefix, argument)
|
||||||
|
|
||||||
// 2. Return the IDL unsigned long value that
|
// 2. Return the IDL unsigned long value that
|
||||||
// represents the same numeric value as x.
|
// represents the same numeric value as x.
|
||||||
@@ -58241,9 +57474,9 @@ webidl.converters['unsigned long'] = function (V, prefix, argument) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#es-unsigned-short
|
// https://webidl.spec.whatwg.org/#es-unsigned-short
|
||||||
webidl.converters['unsigned short'] = function (V, prefix, argument, flags) {
|
webidl.converters['unsigned short'] = function (V, prefix, argument, opts) {
|
||||||
// 1. Let x be ? ConvertToInt(V, 16, "unsigned").
|
// 1. Let x be ? ConvertToInt(V, 16, "unsigned").
|
||||||
const x = webidl.util.ConvertToInt(V, 16, 'unsigned', flags, prefix, argument)
|
const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts, prefix, argument)
|
||||||
|
|
||||||
// 2. Return the IDL unsigned short value that represents
|
// 2. Return the IDL unsigned short value that represents
|
||||||
// the same numeric value as x.
|
// the same numeric value as x.
|
||||||
@@ -58251,16 +57484,15 @@ webidl.converters['unsigned short'] = function (V, prefix, argument, flags) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#idl-ArrayBuffer
|
// https://webidl.spec.whatwg.org/#idl-ArrayBuffer
|
||||||
webidl.converters.ArrayBuffer = function (V, prefix, argument, flags) {
|
webidl.converters.ArrayBuffer = function (V, prefix, argument, opts) {
|
||||||
// 1. If V is not an Object, or V does not have an
|
// 1. If Type(V) is not Object, or V does not have an
|
||||||
// [[ArrayBufferData]] internal slot, then throw a
|
// [[ArrayBufferData]] internal slot, then throw a
|
||||||
// TypeError.
|
// TypeError.
|
||||||
// 2. If IsSharedArrayBuffer(V) is true, then throw a
|
|
||||||
// TypeError.
|
|
||||||
// see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances
|
// see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances
|
||||||
|
// see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances
|
||||||
if (
|
if (
|
||||||
webidl.util.Type(V) !== OBJECT ||
|
webidl.util.Type(V) !== OBJECT ||
|
||||||
!types.isArrayBuffer(V)
|
!types.isAnyArrayBuffer(V)
|
||||||
) {
|
) {
|
||||||
throw webidl.errors.conversionFailed({
|
throw webidl.errors.conversionFailed({
|
||||||
prefix,
|
prefix,
|
||||||
@@ -58269,14 +57501,25 @@ webidl.converters.ArrayBuffer = function (V, prefix, argument, flags) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 2. If the conversion is not to an IDL type associated
|
||||||
|
// with the [AllowShared] extended attribute, and
|
||||||
|
// IsSharedArrayBuffer(V) is true, then throw a
|
||||||
|
// TypeError.
|
||||||
|
if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) {
|
||||||
|
throw webidl.errors.exception({
|
||||||
|
header: 'ArrayBuffer',
|
||||||
|
message: 'SharedArrayBuffer is not allowed.'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 3. If the conversion is not to an IDL type associated
|
// 3. If the conversion is not to an IDL type associated
|
||||||
// with the [AllowResizable] extended attribute, and
|
// with the [AllowResizable] extended attribute, and
|
||||||
// IsResizableArrayBuffer(V) is true, then throw a
|
// IsResizableArrayBuffer(V) is true, then throw a
|
||||||
// TypeError.
|
// TypeError.
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) {
|
if (V.resizable || V.growable) {
|
||||||
throw webidl.errors.exception({
|
throw webidl.errors.exception({
|
||||||
header: prefix,
|
header: 'ArrayBuffer',
|
||||||
message: `${argument} cannot be a resizable ArrayBuffer.`
|
message: 'Received a resizable ArrayBuffer.'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58285,43 +57528,7 @@ webidl.converters.ArrayBuffer = function (V, prefix, argument, flags) {
|
|||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer
|
webidl.converters.TypedArray = function (V, T, prefix, name, opts) {
|
||||||
webidl.converters.SharedArrayBuffer = function (V, prefix, argument, flags) {
|
|
||||||
// 1. If V is not an Object, or V does not have an
|
|
||||||
// [[ArrayBufferData]] internal slot, then throw a
|
|
||||||
// TypeError.
|
|
||||||
// 2. If IsSharedArrayBuffer(V) is false, then throw a
|
|
||||||
// TypeError.
|
|
||||||
// see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances
|
|
||||||
if (
|
|
||||||
webidl.util.Type(V) !== OBJECT ||
|
|
||||||
!types.isSharedArrayBuffer(V)
|
|
||||||
) {
|
|
||||||
throw webidl.errors.conversionFailed({
|
|
||||||
prefix,
|
|
||||||
argument: `${argument} ("${webidl.util.Stringify(V)}")`,
|
|
||||||
types: ['SharedArrayBuffer']
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. If the conversion is not to an IDL type associated
|
|
||||||
// with the [AllowResizable] extended attribute, and
|
|
||||||
// IsResizableArrayBuffer(V) is true, then throw a
|
|
||||||
// TypeError.
|
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) {
|
|
||||||
throw webidl.errors.exception({
|
|
||||||
header: prefix,
|
|
||||||
message: `${argument} cannot be a resizable SharedArrayBuffer.`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4. Return the IDL SharedArrayBuffer value that is a
|
|
||||||
// reference to the same object as V.
|
|
||||||
return V
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#dfn-typed-array-type
|
|
||||||
webidl.converters.TypedArray = function (V, T, prefix, argument, flags) {
|
|
||||||
// 1. Let T be the IDL type V is being converted to.
|
// 1. Let T be the IDL type V is being converted to.
|
||||||
|
|
||||||
// 2. If Type(V) is not Object, or V does not have a
|
// 2. If Type(V) is not Object, or V does not have a
|
||||||
@@ -58334,7 +57541,7 @@ webidl.converters.TypedArray = function (V, T, prefix, argument, flags) {
|
|||||||
) {
|
) {
|
||||||
throw webidl.errors.conversionFailed({
|
throw webidl.errors.conversionFailed({
|
||||||
prefix,
|
prefix,
|
||||||
argument: `${argument} ("${webidl.util.Stringify(V)}")`,
|
argument: `${name} ("${webidl.util.Stringify(V)}")`,
|
||||||
types: [T.name]
|
types: [T.name]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -58343,10 +57550,10 @@ webidl.converters.TypedArray = function (V, T, prefix, argument, flags) {
|
|||||||
// with the [AllowShared] extended attribute, and
|
// with the [AllowShared] extended attribute, and
|
||||||
// IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is
|
// IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is
|
||||||
// true, then throw a TypeError.
|
// true, then throw a TypeError.
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) {
|
if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {
|
||||||
throw webidl.errors.exception({
|
throw webidl.errors.exception({
|
||||||
header: prefix,
|
header: 'ArrayBuffer',
|
||||||
message: `${argument} cannot be a view on a shared array buffer.`
|
message: 'SharedArrayBuffer is not allowed.'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58354,10 +57561,10 @@ webidl.converters.TypedArray = function (V, T, prefix, argument, flags) {
|
|||||||
// with the [AllowResizable] extended attribute, and
|
// with the [AllowResizable] extended attribute, and
|
||||||
// IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
|
// IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
|
||||||
// true, then throw a TypeError.
|
// true, then throw a TypeError.
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) {
|
if (V.buffer.resizable || V.buffer.growable) {
|
||||||
throw webidl.errors.exception({
|
throw webidl.errors.exception({
|
||||||
header: prefix,
|
header: 'ArrayBuffer',
|
||||||
message: `${argument} cannot be a view on a resizable array buffer.`
|
message: 'Received a resizable ArrayBuffer.'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58366,15 +57573,13 @@ webidl.converters.TypedArray = function (V, T, prefix, argument, flags) {
|
|||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#idl-DataView
|
webidl.converters.DataView = function (V, prefix, name, opts) {
|
||||||
webidl.converters.DataView = function (V, prefix, argument, flags) {
|
|
||||||
// 1. If Type(V) is not Object, or V does not have a
|
// 1. If Type(V) is not Object, or V does not have a
|
||||||
// [[DataView]] internal slot, then throw a TypeError.
|
// [[DataView]] internal slot, then throw a TypeError.
|
||||||
if (webidl.util.Type(V) !== OBJECT || !types.isDataView(V)) {
|
if (webidl.util.Type(V) !== OBJECT || !types.isDataView(V)) {
|
||||||
throw webidl.errors.conversionFailed({
|
throw webidl.errors.exception({
|
||||||
prefix,
|
header: prefix,
|
||||||
argument: `${argument} ("${webidl.util.Stringify(V)}")`,
|
message: `${name} is not a DataView.`
|
||||||
types: ['DataView']
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58382,10 +57587,10 @@ webidl.converters.DataView = function (V, prefix, argument, flags) {
|
|||||||
// with the [AllowShared] extended attribute, and
|
// with the [AllowShared] extended attribute, and
|
||||||
// IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true,
|
// IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true,
|
||||||
// then throw a TypeError.
|
// then throw a TypeError.
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) {
|
if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {
|
||||||
throw webidl.errors.exception({
|
throw webidl.errors.exception({
|
||||||
header: prefix,
|
header: 'ArrayBuffer',
|
||||||
message: `${argument} cannot be a view on a shared array buffer.`
|
message: 'SharedArrayBuffer is not allowed.'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58393,10 +57598,10 @@ webidl.converters.DataView = function (V, prefix, argument, flags) {
|
|||||||
// with the [AllowResizable] extended attribute, and
|
// with the [AllowResizable] extended attribute, and
|
||||||
// IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
|
// IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
|
||||||
// true, then throw a TypeError.
|
// true, then throw a TypeError.
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) {
|
if (V.buffer.resizable || V.buffer.growable) {
|
||||||
throw webidl.errors.exception({
|
throw webidl.errors.exception({
|
||||||
header: prefix,
|
header: 'ArrayBuffer',
|
||||||
message: `${argument} cannot be a view on a resizable array buffer.`
|
message: 'Received a resizable ArrayBuffer.'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58405,85 +57610,6 @@ webidl.converters.DataView = function (V, prefix, argument, flags) {
|
|||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#ArrayBufferView
|
|
||||||
webidl.converters.ArrayBufferView = function (V, prefix, argument, flags) {
|
|
||||||
if (
|
|
||||||
webidl.util.Type(V) !== OBJECT ||
|
|
||||||
!types.isArrayBufferView(V)
|
|
||||||
) {
|
|
||||||
throw webidl.errors.conversionFailed({
|
|
||||||
prefix,
|
|
||||||
argument: `${argument} ("${webidl.util.Stringify(V)}")`,
|
|
||||||
types: ['ArrayBufferView']
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) {
|
|
||||||
throw webidl.errors.exception({
|
|
||||||
header: prefix,
|
|
||||||
message: `${argument} cannot be a view on a shared array buffer.`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) {
|
|
||||||
throw webidl.errors.exception({
|
|
||||||
header: prefix,
|
|
||||||
message: `${argument} cannot be a view on a resizable array buffer.`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return V
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#BufferSource
|
|
||||||
webidl.converters.BufferSource = function (V, prefix, argument, flags) {
|
|
||||||
if (types.isArrayBuffer(V)) {
|
|
||||||
return webidl.converters.ArrayBuffer(V, prefix, argument, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (types.isArrayBufferView(V)) {
|
|
||||||
flags &= ~webidl.attributes.AllowShared
|
|
||||||
|
|
||||||
return webidl.converters.ArrayBufferView(V, prefix, argument, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make this explicit for easier debugging
|
|
||||||
if (types.isSharedArrayBuffer(V)) {
|
|
||||||
throw webidl.errors.exception({
|
|
||||||
header: prefix,
|
|
||||||
message: `${argument} cannot be a SharedArrayBuffer.`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
throw webidl.errors.conversionFailed({
|
|
||||||
prefix,
|
|
||||||
argument: `${argument} ("${webidl.util.Stringify(V)}")`,
|
|
||||||
types: ['ArrayBuffer', 'ArrayBufferView']
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://webidl.spec.whatwg.org/#AllowSharedBufferSource
|
|
||||||
webidl.converters.AllowSharedBufferSource = function (V, prefix, argument, flags) {
|
|
||||||
if (types.isArrayBuffer(V)) {
|
|
||||||
return webidl.converters.ArrayBuffer(V, prefix, argument, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (types.isSharedArrayBuffer(V)) {
|
|
||||||
return webidl.converters.SharedArrayBuffer(V, prefix, argument, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (types.isArrayBufferView(V)) {
|
|
||||||
flags |= webidl.attributes.AllowShared
|
|
||||||
return webidl.converters.ArrayBufferView(V, prefix, argument, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
throw webidl.errors.conversionFailed({
|
|
||||||
prefix,
|
|
||||||
argument: `${argument} ("${webidl.util.Stringify(V)}")`,
|
|
||||||
types: ['ArrayBuffer', 'SharedArrayBuffer', 'ArrayBufferView']
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
webidl.converters['sequence<ByteString>'] = webidl.sequenceConverter(
|
webidl.converters['sequence<ByteString>'] = webidl.sequenceConverter(
|
||||||
webidl.converters.ByteString
|
webidl.converters.ByteString
|
||||||
)
|
)
|
||||||
@@ -58504,34 +57630,6 @@ webidl.converters.AbortSignal = webidl.interfaceConverter(
|
|||||||
'AbortSignal'
|
'AbortSignal'
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
|
||||||
* [LegacyTreatNonObjectAsNull]
|
|
||||||
* callback EventHandlerNonNull = any (Event event);
|
|
||||||
* typedef EventHandlerNonNull? EventHandler;
|
|
||||||
* @param {*} V
|
|
||||||
*/
|
|
||||||
webidl.converters.EventHandlerNonNull = function (V) {
|
|
||||||
if (webidl.util.Type(V) !== OBJECT) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
// [I]f the value is not an object, it will be converted to null, and if the value is not callable,
|
|
||||||
// it will be converted to a callback function value that does nothing when called.
|
|
||||||
if (typeof V === 'function') {
|
|
||||||
return V
|
|
||||||
}
|
|
||||||
|
|
||||||
return () => {}
|
|
||||||
}
|
|
||||||
|
|
||||||
webidl.attributes = {
|
|
||||||
Clamp: 1 << 0,
|
|
||||||
EnforceRange: 1 << 1,
|
|
||||||
AllowShared: 1 << 2,
|
|
||||||
AllowResizable: 1 << 3,
|
|
||||||
LegacyNullToEmptyString: 1 << 4
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
webidl
|
webidl
|
||||||
}
|
}
|
||||||
@@ -58848,12 +57946,11 @@ function failWebsocketConnection (handler, code, reason, cause) {
|
|||||||
|
|
||||||
handler.controller.abort()
|
handler.controller.abort()
|
||||||
|
|
||||||
if (!handler.socket) {
|
if (handler.socket?.destroyed === false) {
|
||||||
// If the connection was not established, we must still emit an 'error' and 'close' events
|
|
||||||
handler.onSocketClose()
|
|
||||||
} else if (handler.socket.destroyed === false) {
|
|
||||||
handler.socket.destroy()
|
handler.socket.destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handler.onFail(code, reason, cause)
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -59277,7 +58374,7 @@ webidl.converters.MessageEventInit = webidl.dictionaryConverter([
|
|||||||
{
|
{
|
||||||
key: 'ports',
|
key: 'ports',
|
||||||
converter: webidl.converters['sequence<MessagePort>'],
|
converter: webidl.converters['sequence<MessagePort>'],
|
||||||
defaultValue: () => []
|
defaultValue: () => new Array(0)
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -60143,28 +59240,7 @@ const { validateCloseCodeAndReason } = __nccwpck_require__(8625)
|
|||||||
const { kConstruct } = __nccwpck_require__(6443)
|
const { kConstruct } = __nccwpck_require__(6443)
|
||||||
const { kEnumerableProperty } = __nccwpck_require__(3440)
|
const { kEnumerableProperty } = __nccwpck_require__(3440)
|
||||||
|
|
||||||
function createInheritableDOMException () {
|
class WebSocketError extends DOMException {
|
||||||
// https://github.com/nodejs/node/issues/59677
|
|
||||||
class Test extends DOMException {
|
|
||||||
get reason () {
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (new Test().reason !== undefined) {
|
|
||||||
return DOMException
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Proxy(DOMException, {
|
|
||||||
construct (target, args, newTarget) {
|
|
||||||
const instance = Reflect.construct(target, args, target)
|
|
||||||
Object.setPrototypeOf(instance, newTarget.prototype)
|
|
||||||
return instance
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
class WebSocketError extends createInheritableDOMException() {
|
|
||||||
#closeCode
|
#closeCode
|
||||||
#reason
|
#reason
|
||||||
|
|
||||||
@@ -60256,6 +59332,7 @@ const { states, opcodes, sentCloseFrameState } = __nccwpck_require__(736)
|
|||||||
const { webidl } = __nccwpck_require__(7879)
|
const { webidl } = __nccwpck_require__(7879)
|
||||||
const { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = __nccwpck_require__(8625)
|
const { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = __nccwpck_require__(8625)
|
||||||
const { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = __nccwpck_require__(6897)
|
const { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = __nccwpck_require__(6897)
|
||||||
|
const { isArrayBuffer } = __nccwpck_require__(3429)
|
||||||
const { channels } = __nccwpck_require__(2414)
|
const { channels } = __nccwpck_require__(2414)
|
||||||
const { WebsocketFrameSend } = __nccwpck_require__(3264)
|
const { WebsocketFrameSend } = __nccwpck_require__(3264)
|
||||||
const { ByteParser } = __nccwpck_require__(1652)
|
const { ByteParser } = __nccwpck_require__(1652)
|
||||||
@@ -60295,6 +59372,7 @@ class WebSocketStream {
|
|||||||
#handler = {
|
#handler = {
|
||||||
// https://whatpr.org/websockets/48/7b748d3...d5570f3.html#feedback-to-websocket-stream-from-the-protocol
|
// https://whatpr.org/websockets/48/7b748d3...d5570f3.html#feedback-to-websocket-stream-from-the-protocol
|
||||||
onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),
|
onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),
|
||||||
|
onFail: (_code, _reason) => {},
|
||||||
onMessage: (opcode, data) => this.#onMessage(opcode, data),
|
onMessage: (opcode, data) => this.#onMessage(opcode, data),
|
||||||
onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),
|
onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),
|
||||||
onParserDrain: () => this.#handler.socket.resume(),
|
onParserDrain: () => this.#handler.socket.resume(),
|
||||||
@@ -60448,9 +59526,6 @@ class WebSocketStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#write (chunk) {
|
#write (chunk) {
|
||||||
// See /websockets/stream/tentative/write.any.html
|
|
||||||
chunk = webidl.converters.WebSocketStreamWrite(chunk)
|
|
||||||
|
|
||||||
// 1. Let promise be a new promise created in stream ’s relevant realm .
|
// 1. Let promise be a new promise created in stream ’s relevant realm .
|
||||||
const promise = createDeferredPromise()
|
const promise = createDeferredPromise()
|
||||||
|
|
||||||
@@ -60461,9 +59536,9 @@ class WebSocketStream {
|
|||||||
let opcode = null
|
let opcode = null
|
||||||
|
|
||||||
// 4. If chunk is a BufferSource ,
|
// 4. If chunk is a BufferSource ,
|
||||||
if (webidl.is.BufferSource(chunk)) {
|
if (ArrayBuffer.isView(chunk) || isArrayBuffer(chunk)) {
|
||||||
// 4.1. Set data to a copy of the bytes given chunk .
|
// 4.1. Set data to a copy of the bytes given chunk .
|
||||||
data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk.slice())
|
data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk)
|
||||||
|
|
||||||
// 4.2. Set opcode to a binary frame opcode.
|
// 4.2. Set opcode to a binary frame opcode.
|
||||||
opcode = opcodes.BINARY
|
opcode = opcodes.BINARY
|
||||||
@@ -60478,7 +59553,7 @@ class WebSocketStream {
|
|||||||
string = webidl.converters.DOMString(chunk)
|
string = webidl.converters.DOMString(chunk)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
promise.reject(e)
|
promise.reject(e)
|
||||||
return promise.promise
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 5.2. Set data to the result of UTF-8 encoding string .
|
// 5.2. Set data to the result of UTF-8 encoding string .
|
||||||
@@ -60501,7 +59576,7 @@ class WebSocketStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined.
|
// 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined.
|
||||||
return promise.promise
|
return promise
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @type {import('../websocket').Handler['onConnectionEstablished']} */
|
/** @type {import('../websocket').Handler['onConnectionEstablished']} */
|
||||||
@@ -60727,7 +59802,7 @@ webidl.converters.WebSocketStreamOptions = webidl.dictionaryConverter([
|
|||||||
webidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([
|
webidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([
|
||||||
{
|
{
|
||||||
key: 'closeCode',
|
key: 'closeCode',
|
||||||
converter: (V) => webidl.converters['unsigned short'](V, webidl.attributes.EnforceRange)
|
converter: (V) => webidl.converters['unsigned short'](V, { enforceRange: true })
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'reason',
|
key: 'reason',
|
||||||
@@ -60736,14 +59811,6 @@ webidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
webidl.converters.WebSocketStreamWrite = function (V) {
|
|
||||||
if (typeof V === 'string') {
|
|
||||||
return webidl.converters.USVString(V)
|
|
||||||
}
|
|
||||||
|
|
||||||
return webidl.converters.BufferSource(V)
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = { WebSocketStream }
|
module.exports = { WebSocketStream }
|
||||||
|
|
||||||
|
|
||||||
@@ -61129,6 +60196,7 @@ const { channels } = __nccwpck_require__(2414)
|
|||||||
/**
|
/**
|
||||||
* @typedef {object} Handler
|
* @typedef {object} Handler
|
||||||
* @property {(response: any, extensions?: string[]) => void} onConnectionEstablished
|
* @property {(response: any, extensions?: string[]) => void} onConnectionEstablished
|
||||||
|
* @property {(code: number, reason: any) => void} onFail
|
||||||
* @property {(opcode: number, data: Buffer) => void} onMessage
|
* @property {(opcode: number, data: Buffer) => void} onMessage
|
||||||
* @property {(error: Error) => void} onParserError
|
* @property {(error: Error) => void} onParserError
|
||||||
* @property {() => void} onParserDrain
|
* @property {() => void} onParserDrain
|
||||||
@@ -61164,6 +60232,7 @@ class WebSocket extends EventTarget {
|
|||||||
/** @type {Handler} */
|
/** @type {Handler} */
|
||||||
#handler = {
|
#handler = {
|
||||||
onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),
|
onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),
|
||||||
|
onFail: (code, reason, cause) => this.#onFail(code, reason, cause),
|
||||||
onMessage: (opcode, data) => this.#onMessage(opcode, data),
|
onMessage: (opcode, data) => this.#onMessage(opcode, data),
|
||||||
onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),
|
onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),
|
||||||
onParserDrain: () => this.#onParserDrain(),
|
onParserDrain: () => this.#onParserDrain(),
|
||||||
@@ -61294,7 +60363,7 @@ class WebSocket extends EventTarget {
|
|||||||
const prefix = 'WebSocket.close'
|
const prefix = 'WebSocket.close'
|
||||||
|
|
||||||
if (code !== undefined) {
|
if (code !== undefined) {
|
||||||
code = webidl.converters['unsigned short'](code, prefix, 'code', webidl.attributes.Clamp)
|
code = webidl.converters['unsigned short'](code, prefix, 'code', { clamp: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reason !== undefined) {
|
if (reason !== undefined) {
|
||||||
@@ -61454,11 +60523,9 @@ class WebSocket extends EventTarget {
|
|||||||
this.removeEventListener('open', this.#events.open)
|
this.removeEventListener('open', this.#events.open)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('open', listener)
|
|
||||||
this.#events.open = fn
|
this.#events.open = fn
|
||||||
|
this.addEventListener('open', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.open = null
|
this.#events.open = null
|
||||||
}
|
}
|
||||||
@@ -61477,11 +60544,9 @@ class WebSocket extends EventTarget {
|
|||||||
this.removeEventListener('error', this.#events.error)
|
this.removeEventListener('error', this.#events.error)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('error', listener)
|
|
||||||
this.#events.error = fn
|
this.#events.error = fn
|
||||||
|
this.addEventListener('error', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.error = null
|
this.#events.error = null
|
||||||
}
|
}
|
||||||
@@ -61500,11 +60565,9 @@ class WebSocket extends EventTarget {
|
|||||||
this.removeEventListener('close', this.#events.close)
|
this.removeEventListener('close', this.#events.close)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('close', listener)
|
|
||||||
this.#events.close = fn
|
this.#events.close = fn
|
||||||
|
this.addEventListener('close', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.close = null
|
this.#events.close = null
|
||||||
}
|
}
|
||||||
@@ -61523,11 +60586,9 @@ class WebSocket extends EventTarget {
|
|||||||
this.removeEventListener('message', this.#events.message)
|
this.removeEventListener('message', this.#events.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
const listener = webidl.converters.EventHandlerNonNull(fn)
|
if (typeof fn === 'function') {
|
||||||
|
|
||||||
if (listener !== null) {
|
|
||||||
this.addEventListener('message', listener)
|
|
||||||
this.#events.message = fn
|
this.#events.message = fn
|
||||||
|
this.addEventListener('message', fn)
|
||||||
} else {
|
} else {
|
||||||
this.#events.message = null
|
this.#events.message = null
|
||||||
}
|
}
|
||||||
@@ -61605,6 +60666,26 @@ class WebSocket extends EventTarget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#onFail (code, reason, cause) {
|
||||||
|
if (reason) {
|
||||||
|
// TODO: process.nextTick
|
||||||
|
fireEvent('error', this, (type, init) => new ErrorEvent(type, init), {
|
||||||
|
error: new Error(reason, cause ? { cause } : undefined),
|
||||||
|
message: reason
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.#handler.wasEverConnected) {
|
||||||
|
this.#handler.readyState = states.CLOSED
|
||||||
|
|
||||||
|
// If the WebSocket connection could not be established, it is also said
|
||||||
|
// that _The WebSocket Connection is Closed_, but not _cleanly_.
|
||||||
|
fireEvent('close', this, (type, init) => new CloseEvent(type, init), {
|
||||||
|
wasClean: false, code, reason
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#onMessage (type, data) {
|
#onMessage (type, data) {
|
||||||
// 1. If ready state is not OPEN (1), then return.
|
// 1. If ready state is not OPEN (1), then return.
|
||||||
if (this.#handler.readyState !== states.OPEN) {
|
if (this.#handler.readyState !== states.OPEN) {
|
||||||
@@ -61665,11 +60746,18 @@ class WebSocket extends EventTarget {
|
|||||||
let code = 1005
|
let code = 1005
|
||||||
let reason = ''
|
let reason = ''
|
||||||
|
|
||||||
const result = this.#parser?.closingInfo
|
const result = this.#parser.closingInfo
|
||||||
|
|
||||||
if (result && !result.error) {
|
if (result && !result.error) {
|
||||||
code = result.code ?? 1005
|
code = result.code ?? 1005
|
||||||
reason = result.reason
|
reason = result.reason
|
||||||
|
} else if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
|
||||||
|
// If _The WebSocket
|
||||||
|
// Connection is Closed_ and no Close control frame was received by the
|
||||||
|
// endpoint (such as could occur if the underlying transport connection
|
||||||
|
// is lost), _The WebSocket Connection Close Code_ is considered to be
|
||||||
|
// 1006.
|
||||||
|
code = 1006
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1. Change the ready state to CLOSED (3).
|
// 1. Change the ready state to CLOSED (3).
|
||||||
@@ -61679,18 +60767,7 @@ class WebSocket extends EventTarget {
|
|||||||
// connection, or if the WebSocket connection was closed
|
// connection, or if the WebSocket connection was closed
|
||||||
// after being flagged as full, fire an event named error
|
// after being flagged as full, fire an event named error
|
||||||
// at the WebSocket object.
|
// at the WebSocket object.
|
||||||
if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
|
// TODO
|
||||||
// If _The WebSocket
|
|
||||||
// Connection is Closed_ and no Close control frame was received by the
|
|
||||||
// endpoint (such as could occur if the underlying transport connection
|
|
||||||
// is lost), _The WebSocket Connection Close Code_ is considered to be
|
|
||||||
// 1006.
|
|
||||||
code = 1006
|
|
||||||
|
|
||||||
fireEvent('error', this, (type, init) => new ErrorEvent(type, init), {
|
|
||||||
error: new TypeError(reason)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. Fire an event named close at the WebSocket object,
|
// 3. Fire an event named close at the WebSocket object,
|
||||||
// using CloseEvent, with the wasClean attribute
|
// using CloseEvent, with the wasClean attribute
|
||||||
@@ -61799,7 +60876,7 @@ webidl.converters.WebSocketInit = webidl.dictionaryConverter([
|
|||||||
{
|
{
|
||||||
key: 'protocols',
|
key: 'protocols',
|
||||||
converter: webidl.converters['DOMString or sequence<DOMString>'],
|
converter: webidl.converters['DOMString or sequence<DOMString>'],
|
||||||
defaultValue: () => []
|
defaultValue: () => new Array(0)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'dispatcher',
|
key: 'dispatcher',
|
||||||
@@ -61826,7 +60903,7 @@ webidl.converters.WebSocketSendData = function (V) {
|
|||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
|
|
||||||
if (webidl.is.BufferSource(V)) {
|
if (ArrayBuffer.isView(V) || isArrayBuffer(V)) {
|
||||||
return V
|
return V
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61851,98 +60928,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||||||
exports.KNOWN_CHECKSUMS = void 0;
|
exports.KNOWN_CHECKSUMS = void 0;
|
||||||
// AUTOGENERATED_DO_NOT_EDIT
|
// AUTOGENERATED_DO_NOT_EDIT
|
||||||
exports.KNOWN_CHECKSUMS = {
|
exports.KNOWN_CHECKSUMS = {
|
||||||
"aarch64-apple-darwin-0.8.20": "a87008d013efd78d94102e5268a24990c409bfb39b80df4de32d1c97f093e7ef",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.20": "ac33f921e0d48d14a106a6cc84b146da7a1f4a3c329c7fb0e1a8e6ff4cf541e6",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.20": "b434851cd94e9e2083bc9a5851f1d13748771726bd2ac30027f820fc134b2104",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.20": "60ad9b7fb846c2051e0113077b1e9510b4b1a73b9a1816a03e82406deedff08d",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.20": "72fa919115f5a7c4557c1adb55ac77154f3fb0272b95ff0270d4eaf98bc814c2",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.20": "87a993df182a2abb5581421d6c76b0cbccb311cfca625d8c827f2cfcf1c78fed",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.20": "3a3c1b2370824f3129c89bf3def5b2b703813152cf0be0ec3c04dead21077cd0",
|
|
||||||
"i686-pc-windows-msvc-0.8.20": "62fd821f330f469cce6e02eded6f63ba51a9461acc9e0e16794e05da08fe16be",
|
|
||||||
"i686-unknown-linux-gnu-0.8.20": "a7bfa2c07183f2fd44ef4d6c910971796a980ebb3c52e9620e6b741cc6fe45c0",
|
|
||||||
"i686-unknown-linux-musl-0.8.20": "67eec91d7ca5a8dc8d95149be52bcf459efb4caeacbacf8586f371f8192a0ec7",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.20": "b96d6a4907ab4c26d7061e43f6993aa47c76a01af6f3cb871d9c48b7b250fbca",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.20": "1c13fbcd13214e93300749cb14cb5c1425d6a4095f2e406a80b34ab10d269b5b",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.20": "a14f8297bae6dc3993a9367e0fcf6061281f5f3f0da7c46a6a2a5fd47467f56c",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.20": "8e59db8d1cb791897237982e369fea0217a12ffe3527cf6f1d30fea32d20a509",
|
|
||||||
"x86_64-apple-darwin-0.8.20": "ec47686e5e1499b9ea53aa61181fa3f08d4113bc7628105dc299c092d4debf44",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.20": "e2aa89b78f0a0fa7cbf9d42508c7a962bda803425d8ec3e9cf7a69fb00cf6791",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.20": "dc67aa1a5b6b16a8cc4a5fdf5697f354fbf9e45f77a3da6d9e71db6ec213c082",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.20": "a29e1854ee3ce1ccc5ba1d27783c4f34e99605e16c886a71446a90bad40a38c9",
|
|
||||||
"aarch64-apple-darwin-0.8.19": "bb63d43c40a301d889a985223ee8ce540be199e98b3f27ed8477823869a0a605",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.19": "3bfe2db4bccf95e05d2685bcbfad7e49e7cd2177a20aebe81a5e5348cbdfc0a3",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.19": "ffd29feed13cdd30b27def8e80e64223325fbe4f7cfc4d4c906ec2531f746bde",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.19": "87925376fa1e59de23582e1cbd81d6aabd16611e871ad085e09be2c2fa12689d",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.19": "00d4835ba20e2e4a3bfed6fe4f6fbf4982c5a0e6a3105c7bde93fb9377e61dea",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.19": "7a58efdb9c6e3f320759f9f074306e34f03ccfb535b306cbace92e9ad414efd5",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.19": "c8f8a244009f3ad01b23772c936c5c5a95871a87b0add90b85a55d3913d1fae0",
|
|
||||||
"i686-pc-windows-msvc-0.8.19": "32c7176e49f5fa1c7480b32e325a631431212904b1020427e62afef46fddddb9",
|
|
||||||
"i686-unknown-linux-gnu-0.8.19": "94a5f944d1cba4db2e7fc6831bf9c78c291c5c1e5e079b4095e9fcdcbc15bc71",
|
|
||||||
"i686-unknown-linux-musl-0.8.19": "491b282b50e078fac4ced99e69359ac6cecc3f43f585f812d52515e6b081261a",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.19": "3c7c7ecb8d5b61acee3914984f1025af1707a987a51285aba44d968420139f2c",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.19": "711e39050b528b0860d868c98057eebbd181befbe6a6f24e0f6fd571eab5520f",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.19": "5dd8e1ec8bf8722e08d9853953ed0ef12318d0f5e82d06a8dd98815666f99186",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.19": "5b3af341a39364f147d7286e40f55dd92ac8a142110e29ff1b4825afb96e1b27",
|
|
||||||
"x86_64-apple-darwin-0.8.19": "b5f91770e55761b32c9618757ef23ded6671bb9ca0ddf5737eea60dddd493fe9",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.19": "945b07182de7de279ba5ae5c746785dfd55cf9b17481d3535b0b03efd6e64567",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.19": "cfc674e9b83d1becfca4d70386e5f7ace4c1fa8c47c518abeebb8ef2b30da4b8",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.19": "6a37f712ae90c7b8cf364fe751144d7acc2479d6b336378111e74cc7fb14fa7b",
|
|
||||||
"aarch64-apple-darwin-0.8.18": "ce660d5cdf0ed83d1a045bbe9792b93d06725b8c9e9b88960a503d42192be445",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.18": "f49a25f1a89c76d750e2179f40f9302310504f40c89283ca4522b13363c7bdc9",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.18": "164363f88618f4e8e175faf9fcf5172321c221fce93d64cec8e9ab3339511dad",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.18": "1d7e3bfc3b5ec9d747bc3f42a6a3362249f30560966512b172e8967b11046144",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.18": "3c356156c074eb21f731116501992aa6ad6079231f37c75ea7a15c22d1c41cf6",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.18": "15e12cfba5fb7b20b4eb45887b78fe157d29bd28b38bbc03a19224ad6766a641",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.18": "008cd8225fd8b6b4bb3293d1d7520023f8e432141f256320c034dc5a1a15c7ab",
|
|
||||||
"i686-pc-windows-msvc-0.8.18": "55f0d91f766ca141e166fe74b8a81da667b5d703ca1b5f2671677f0b2bfdd901",
|
|
||||||
"i686-unknown-linux-gnu-0.8.18": "3b42e3b58650cde6fa0d03dfdb8528573cf679ac9809191b3976913cdec13b6f",
|
|
||||||
"i686-unknown-linux-musl-0.8.18": "e2dae897955f666eb2f83af12d9a566bc42c26c17413d1480124cef6b30dc0fd",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.18": "88cd4ad593e6dd915c69dee02b56cbf1b6d16cb7c8129a5ad1fa8ac02bd755ab",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.18": "50b418096f4d82df5d22cb23e650754ca92bca7be657113dcd53631f0e0cec77",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.18": "b696be9a2ef0808f230227477b8e23acedba0b90933978c760ea2a748e8c30fa",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.18": "3b106572a8574f58e3df591cdaef915bdb38fdff11e5de0ec53bfe1b857267e8",
|
|
||||||
"x86_64-apple-darwin-0.8.18": "a08c3a6c50f49e68216ac133bd0aaae952db2cd8d19a3cd5be782f8f4becf135",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.18": "3e42d63c8323839d50b11959ec558ad3954a2c16aab1ad52c0521bd055442a3f",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.18": "59ad1a1809fa47019b86cf339fff161cb7b00ad3d8d42354eea57d0d91aeb44c",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.18": "3a93bc3597ab73c9c31d8ad709b4d0b788961cbb508c5a4dcf21636fd7e3e8ce",
|
|
||||||
"aarch64-apple-darwin-0.8.17": "e4d4859d7726298daa4c12e114f269ff282b2cfc2b415dc0b2ca44ae2dbd358e",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.17": "2396749de576e45a40efa35fe94b3f953c3224c21f75c05772593e085d78e77d",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.17": "9a20d65b110770bbaa2ee89ed76eb963d8c6a480b9ebef584ea9df2ae85b4f0f",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.17": "bd141b7e263935d14f5725f2a5c1c942fd89642e37683cb904f1984ce7e365f4",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.17": "9d4ffb6751d65a52f8daf3fd88e331ab989d490a6e336d6a96cac668fce17a65",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.17": "014afffa5621986aefbe8a6d71597eb45b8cd3d4e94f825f34ec49ba4cd0c382",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.17": "fb976e7482c4550f38c51c5c23b9dae0322c3173f56436bf9a81252e4b74fcfb",
|
|
||||||
"i686-pc-windows-msvc-0.8.17": "f528893452ca512b555b63267292977d237bd6fbdd967c9be6941a65ebf256f4",
|
|
||||||
"i686-unknown-linux-gnu-0.8.17": "d52438a1588ea7c2332dc4aa8c93eedae344fc435c95491037237c7b4b36eae4",
|
|
||||||
"i686-unknown-linux-musl-0.8.17": "9e10f4c57034e6e98dea48b0f4250a7eff983f1b2947d99ed6605a4eb0ec8d22",
|
|
||||||
"loongarch64-unknown-linux-gnu-0.8.17": "1d02e45dbbcbbaa867afe59fd62b294cba47abf1a76e151e19db03b5dbf1c9c8",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.17": "6f448735dfd72e2d5c3e3bb541b388c58cdfcf3a562128d5ac1a5f2be47f95d6",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.17": "e4b28cab21eb990e2bea768bc9f43b61e4fd554552cea8868c855027decef69d",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.17": "f653caa34479d405d290b825a2fe782bb26c55a7bfaa870911b4e18792312d45",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.17": "8fae8182704b4b11316c87d897c3e64f2d3f55ac8c58c482d9bbef9ad611f90c",
|
|
||||||
"x86_64-apple-darwin-0.8.17": "31ed353cfd8e6c962e7c60617bd8a9d6b97b704c1ecb5b5eceaff8c6121b54ac",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.17": "0d051779fbcb173b183efeae1c3e96148764fd82709bbbf0966df3efe48b67c5",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.17": "920cbcaad514cc185634f6f0dcd71df5e8f4ee4456d440a22e0f8c0f142a8203",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.17": "4057052999a210fe78d93599d2165da9e24c8bbb23370cdd26b66a98ab479203",
|
|
||||||
"aarch64-apple-darwin-0.8.16": "87e4b51b735e8445f6c445c7b4c0398273e40d34cd192bad8158736653600cd6",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.16": "392acca957d8d7cccafbb68ce6c4ba29b2ff00c8b0d4744a2136918d3a7bf765",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.16": "22a3cbaf87776b73c2657ba5d63f8565c1235b65eaf57dffda66061f7a09913b",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.16": "6bd6a11c384f07353c3c7eec9bde094f89b92a12dc09caea9df40c424afebea5",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.16": "53c31a6559dc4fb22ce8c56640b00a8404b7e4d55f68b6bb3aa188864e2c3084",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.16": "ada6f393d5e5d9cba5445832ba61e8222859e915e5d77a37f5dd35979f3f18e4",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.16": "55690f70f9c61963c0069558e205acda9ff0604a44028226b9a0ec3b847c9125",
|
|
||||||
"i686-pc-windows-msvc-0.8.16": "1e727b8af6c0781bc6eb9a2c34e7ee704070b7a2f122544443418e8be13019ee",
|
|
||||||
"i686-unknown-linux-gnu-0.8.16": "4eaf39134663ef184f684be6f6aa83e971fb36ef7d1c67a5f2196268b61c0579",
|
|
||||||
"i686-unknown-linux-musl-0.8.16": "a179ceba9f2fcca7b46a86b12715e28fb3429ff8193ae839700d534e35e95a45",
|
|
||||||
"loongarch64-unknown-linux-gnu-0.8.16": "600a8be6d2621d654b6665d9a8df9370f4af9c0b6ceb851d1ae0d4b895e8e546",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.16": "c86008ef8a3e3730b0e58a168542331960c90a3b043e3853c1941457748595f3",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.16": "91645092447a14c23b47d0f434a787a9555b29e061607d9e60d2d556b831f5aa",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.16": "dbaeff3f0baad73c264c35abd937a231fb6b9d1201b6763d82e39e7516358115",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.16": "e29c330a8956c13acb0f2af7aa650dd5d9ebba6aefdceaea77f689953d140780",
|
|
||||||
"x86_64-apple-darwin-0.8.16": "07491a998fd741090501df9bbfe538f85568901a3a66c9e0368636509158727a",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.16": "97fb93678eca3b4f731ea3879ae2e78787976e03f38c9c6fb744ab28bc3aec1b",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.16": "fc94e50e8ef93a97d723b83faa42888e7710c4443a5b8a1af3aac2cda5390f3a",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.16": "ee220f112b91b23f641d169ba7a3652c6ab7104e7c666d26104ebd6a2f76be43",
|
|
||||||
"aarch64-apple-darwin-0.8.15": "103367962c5cb00bf7370d84cbaa3fec5a9807be9cc833ea9d8eea400c119fa2",
|
"aarch64-apple-darwin-0.8.15": "103367962c5cb00bf7370d84cbaa3fec5a9807be9cc833ea9d8eea400c119fa2",
|
||||||
"aarch64-pc-windows-msvc-0.8.15": "16d92f21508c5dbd3374466c2cdad2909959a6d3bd06672b9db023f2a5d7a014",
|
"aarch64-pc-windows-msvc-0.8.15": "16d92f21508c5dbd3374466c2cdad2909959a6d3bd06672b9db023f2a5d7a014",
|
||||||
"aarch64-unknown-linux-gnu-0.8.15": "6ede0fefa7db7be3d5d9eda8784a8e43b1cf5410720eb3da60ab1d2f66678e82",
|
"aarch64-unknown-linux-gnu-0.8.15": "6ede0fefa7db7be3d5d9eda8784a8e43b1cf5410720eb3da60ab1d2f66678e82",
|
||||||
@@ -65748,12 +64733,10 @@ run();
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.STATE_UV_VERSION = exports.STATE_UV_PATH = exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
||||||
exports.REPO = "uv";
|
exports.REPO = "uv";
|
||||||
exports.OWNER = "astral-sh";
|
exports.OWNER = "astral-sh";
|
||||||
exports.TOOL_CACHE_NAME = "uv";
|
exports.TOOL_CACHE_NAME = "uv";
|
||||||
exports.STATE_UV_PATH = "uv-path";
|
|
||||||
exports.STATE_UV_VERSION = "uv-version";
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -65802,8 +64785,7 @@ const DEFAULTS = {
|
|||||||
baseUrl: "https://api.github.com",
|
baseUrl: "https://api.github.com",
|
||||||
userAgent: "setup-uv",
|
userAgent: "setup-uv",
|
||||||
};
|
};
|
||||||
const OctokitWithPlugins = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.legacyRestEndpointMethods);
|
exports.Octokit = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.legacyRestEndpointMethods).defaults(function buildDefaults(options) {
|
||||||
exports.Octokit = OctokitWithPlugins.defaults(function buildDefaults(options) {
|
|
||||||
return {
|
return {
|
||||||
...DEFAULTS,
|
...DEFAULTS,
|
||||||
...options,
|
...options,
|
||||||
@@ -68596,7 +67578,7 @@ class RequestError extends Error {
|
|||||||
|
|
||||||
|
|
||||||
// pkg/dist-src/version.js
|
// pkg/dist-src/version.js
|
||||||
var dist_bundle_VERSION = "10.0.5";
|
var dist_bundle_VERSION = "0.0.0-development";
|
||||||
|
|
||||||
// pkg/dist-src/defaults.js
|
// pkg/dist-src/defaults.js
|
||||||
var defaults_default = {
|
var defaults_default = {
|
||||||
@@ -68967,7 +67949,7 @@ var createTokenAuth = function createTokenAuth2(token) {
|
|||||||
|
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js
|
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js
|
||||||
const version_VERSION = "7.0.5";
|
const version_VERSION = "7.0.3";
|
||||||
|
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js
|
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js
|
||||||
@@ -69541,7 +68523,7 @@ __nccwpck_require__.d(__webpack_exports__, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
|
;// CONCATENATED MODULE: ./node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
|
||||||
const VERSION = "16.1.0";
|
const VERSION = "16.0.0";
|
||||||
|
|
||||||
//# sourceMappingURL=version.js.map
|
//# sourceMappingURL=version.js.map
|
||||||
|
|
||||||
@@ -70355,20 +69337,11 @@ const Endpoints = {
|
|||||||
removeSelectedRepoFromOrgSecret: [
|
removeSelectedRepoFromOrgSecret: [
|
||||||
"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"
|
"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"
|
||||||
],
|
],
|
||||||
repositoryAccessForOrg: [
|
|
||||||
"GET /organizations/{org}/dependabot/repository-access"
|
|
||||||
],
|
|
||||||
setRepositoryAccessDefaultLevel: [
|
|
||||||
"PUT /organizations/{org}/dependabot/repository-access/default-level"
|
|
||||||
],
|
|
||||||
setSelectedReposForOrgSecret: [
|
setSelectedReposForOrgSecret: [
|
||||||
"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"
|
"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"
|
||||||
],
|
],
|
||||||
updateAlert: [
|
updateAlert: [
|
||||||
"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"
|
"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"
|
||||||
],
|
|
||||||
updateRepositoryAccessForOrg: [
|
|
||||||
"PATCH /organizations/{org}/dependabot/repository-access"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
dependencyGraph: {
|
dependencyGraph: {
|
||||||
@@ -70474,9 +69447,6 @@ const Endpoints = {
|
|||||||
addAssignees: [
|
addAssignees: [
|
||||||
"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"
|
"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"
|
||||||
],
|
],
|
||||||
addBlockedByDependency: [
|
|
||||||
"POST /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"
|
|
||||||
],
|
|
||||||
addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
||||||
addSubIssue: [
|
addSubIssue: [
|
||||||
"POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"
|
"POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"
|
||||||
@@ -70503,17 +69473,10 @@ const Endpoints = {
|
|||||||
getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"],
|
getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"],
|
||||||
getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"],
|
getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"],
|
||||||
getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],
|
getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],
|
||||||
getParent: ["GET /repos/{owner}/{repo}/issues/{issue_number}/parent"],
|
|
||||||
list: ["GET /issues"],
|
list: ["GET /issues"],
|
||||||
listAssignees: ["GET /repos/{owner}/{repo}/assignees"],
|
listAssignees: ["GET /repos/{owner}/{repo}/assignees"],
|
||||||
listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],
|
listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],
|
||||||
listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"],
|
listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"],
|
||||||
listDependenciesBlockedBy: [
|
|
||||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"
|
|
||||||
],
|
|
||||||
listDependenciesBlocking: [
|
|
||||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking"
|
|
||||||
],
|
|
||||||
listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],
|
listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],
|
||||||
listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"],
|
listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"],
|
||||||
listEventsForTimeline: [
|
listEventsForTimeline: [
|
||||||
@@ -70540,9 +69503,6 @@ const Endpoints = {
|
|||||||
removeAssignees: [
|
removeAssignees: [
|
||||||
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"
|
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"
|
||||||
],
|
],
|
||||||
removeDependencyBlockedBy: [
|
|
||||||
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}"
|
|
||||||
],
|
|
||||||
removeLabel: [
|
removeLabel: [
|
||||||
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"
|
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"
|
||||||
],
|
],
|
||||||
@@ -70645,9 +69605,6 @@ const Endpoints = {
|
|||||||
convertMemberToOutsideCollaborator: [
|
convertMemberToOutsideCollaborator: [
|
||||||
"PUT /orgs/{org}/outside_collaborators/{username}"
|
"PUT /orgs/{org}/outside_collaborators/{username}"
|
||||||
],
|
],
|
||||||
createArtifactStorageRecord: [
|
|
||||||
"POST /orgs/{org}/artifacts/metadata/storage-record"
|
|
||||||
],
|
|
||||||
createInvitation: ["POST /orgs/{org}/invitations"],
|
createInvitation: ["POST /orgs/{org}/invitations"],
|
||||||
createIssueType: ["POST /orgs/{org}/issue-types"],
|
createIssueType: ["POST /orgs/{org}/issue-types"],
|
||||||
createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"],
|
createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"],
|
||||||
@@ -70659,15 +69616,15 @@ const Endpoints = {
|
|||||||
],
|
],
|
||||||
createWebhook: ["POST /orgs/{org}/hooks"],
|
createWebhook: ["POST /orgs/{org}/hooks"],
|
||||||
delete: ["DELETE /orgs/{org}"],
|
delete: ["DELETE /orgs/{org}"],
|
||||||
deleteAttestationsBulk: ["POST /orgs/{org}/attestations/delete-request"],
|
|
||||||
deleteAttestationsById: [
|
|
||||||
"DELETE /orgs/{org}/attestations/{attestation_id}"
|
|
||||||
],
|
|
||||||
deleteAttestationsBySubjectDigest: [
|
|
||||||
"DELETE /orgs/{org}/attestations/digest/{subject_digest}"
|
|
||||||
],
|
|
||||||
deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"],
|
deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"],
|
||||||
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
|
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
|
||||||
|
enableOrDisableSecurityProductOnAllOrgRepos: [
|
||||||
|
"POST /orgs/{org}/{security_product}/{enablement}",
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
deprecated: "octokit.rest.orgs.enableOrDisableSecurityProductOnAllOrgRepos() is deprecated, see https://docs.github.com/rest/orgs/orgs#enable-or-disable-a-security-feature-for-an-organization"
|
||||||
|
}
|
||||||
|
],
|
||||||
get: ["GET /orgs/{org}"],
|
get: ["GET /orgs/{org}"],
|
||||||
getAllCustomProperties: ["GET /orgs/{org}/properties/schema"],
|
getAllCustomProperties: ["GET /orgs/{org}/properties/schema"],
|
||||||
getCustomProperty: [
|
getCustomProperty: [
|
||||||
@@ -70687,13 +69644,7 @@ const Endpoints = {
|
|||||||
],
|
],
|
||||||
list: ["GET /organizations"],
|
list: ["GET /organizations"],
|
||||||
listAppInstallations: ["GET /orgs/{org}/installations"],
|
listAppInstallations: ["GET /orgs/{org}/installations"],
|
||||||
listArtifactStorageRecords: [
|
|
||||||
"GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records"
|
|
||||||
],
|
|
||||||
listAttestations: ["GET /orgs/{org}/attestations/{subject_digest}"],
|
listAttestations: ["GET /orgs/{org}/attestations/{subject_digest}"],
|
||||||
listAttestationsBulk: [
|
|
||||||
"POST /orgs/{org}/attestations/bulk-list{?per_page,before,after}"
|
|
||||||
],
|
|
||||||
listBlockedUsers: ["GET /orgs/{org}/blocks"],
|
listBlockedUsers: ["GET /orgs/{org}/blocks"],
|
||||||
listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"],
|
listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"],
|
||||||
listFailedInvitations: ["GET /orgs/{org}/failed_invitations"],
|
listFailedInvitations: ["GET /orgs/{org}/failed_invitations"],
|
||||||
@@ -70888,44 +69839,6 @@ const Endpoints = {
|
|||||||
"PATCH /orgs/{org}/private-registries/{secret_name}"
|
"PATCH /orgs/{org}/private-registries/{secret_name}"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
projects: {
|
|
||||||
addItemForOrg: ["POST /orgs/{org}/projectsV2/{project_number}/items"],
|
|
||||||
addItemForUser: ["POST /users/{user_id}/projectsV2/{project_number}/items"],
|
|
||||||
deleteItemForOrg: [
|
|
||||||
"DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}"
|
|
||||||
],
|
|
||||||
deleteItemForUser: [
|
|
||||||
"DELETE /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
|
|
||||||
],
|
|
||||||
getFieldForOrg: [
|
|
||||||
"GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id}"
|
|
||||||
],
|
|
||||||
getFieldForUser: [
|
|
||||||
"GET /users/{user_id}/projectsV2/{project_number}/fields/{field_id}"
|
|
||||||
],
|
|
||||||
getForOrg: ["GET /orgs/{org}/projectsV2/{project_number}"],
|
|
||||||
getForUser: ["GET /users/{user_id}/projectsV2/{project_number}"],
|
|
||||||
getOrgItem: ["GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],
|
|
||||||
getUserItem: [
|
|
||||||
"GET /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
|
|
||||||
],
|
|
||||||
listFieldsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/fields"],
|
|
||||||
listFieldsForUser: [
|
|
||||||
"GET /users/{user_id}/projectsV2/{project_number}/fields"
|
|
||||||
],
|
|
||||||
listForOrg: ["GET /orgs/{org}/projectsV2"],
|
|
||||||
listForUser: ["GET /users/{username}/projectsV2"],
|
|
||||||
listItemsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/items"],
|
|
||||||
listItemsForUser: [
|
|
||||||
"GET /users/{user_id}/projectsV2/{project_number}/items"
|
|
||||||
],
|
|
||||||
updateItemForOrg: [
|
|
||||||
"PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}"
|
|
||||||
],
|
|
||||||
updateItemForUser: [
|
|
||||||
"PATCH /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
pulls: {
|
pulls: {
|
||||||
checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
||||||
create: ["POST /repos/{owner}/{repo}/pulls"],
|
create: ["POST /repos/{owner}/{repo}/pulls"],
|
||||||
@@ -71504,14 +70417,8 @@ const Endpoints = {
|
|||||||
listLocationsForAlert: [
|
listLocationsForAlert: [
|
||||||
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"
|
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"
|
||||||
],
|
],
|
||||||
listOrgPatternConfigs: [
|
|
||||||
"GET /orgs/{org}/secret-scanning/pattern-configurations"
|
|
||||||
],
|
|
||||||
updateAlert: [
|
updateAlert: [
|
||||||
"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
|
"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
|
||||||
],
|
|
||||||
updateOrgPatternConfigs: [
|
|
||||||
"PATCH /orgs/{org}/secret-scanning/pattern-configurations"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
securityAdvisories: {
|
securityAdvisories: {
|
||||||
@@ -71621,15 +70528,6 @@ const Endpoints = {
|
|||||||
],
|
],
|
||||||
createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"],
|
createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"],
|
||||||
createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"],
|
createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"],
|
||||||
deleteAttestationsBulk: [
|
|
||||||
"POST /users/{username}/attestations/delete-request"
|
|
||||||
],
|
|
||||||
deleteAttestationsById: [
|
|
||||||
"DELETE /users/{username}/attestations/{attestation_id}"
|
|
||||||
],
|
|
||||||
deleteAttestationsBySubjectDigest: [
|
|
||||||
"DELETE /users/{username}/attestations/digest/{subject_digest}"
|
|
||||||
],
|
|
||||||
deleteEmailForAuthenticated: [
|
deleteEmailForAuthenticated: [
|
||||||
"DELETE /user/emails",
|
"DELETE /user/emails",
|
||||||
{},
|
{},
|
||||||
@@ -71674,9 +70572,6 @@ const Endpoints = {
|
|||||||
],
|
],
|
||||||
list: ["GET /users"],
|
list: ["GET /users"],
|
||||||
listAttestations: ["GET /users/{username}/attestations/{subject_digest}"],
|
listAttestations: ["GET /users/{username}/attestations/{subject_digest}"],
|
||||||
listAttestationsBulk: [
|
|
||||||
"POST /users/{username}/attestations/bulk-list{?per_page,before,after}"
|
|
||||||
],
|
|
||||||
listBlockedByAuthenticated: [
|
listBlockedByAuthenticated: [
|
||||||
"GET /user/blocks",
|
"GET /user/blocks",
|
||||||
{},
|
{},
|
||||||
|
|||||||
878
package-lock.json
generated
878
package-lock.json
generated
@@ -15,22 +15,22 @@
|
|||||||
"@actions/glob": "^0.5.0",
|
"@actions/glob": "^0.5.0",
|
||||||
"@actions/io": "^1.1.3",
|
"@actions/io": "^1.1.3",
|
||||||
"@actions/tool-cache": "^2.0.2",
|
"@actions/tool-cache": "^2.0.2",
|
||||||
"@octokit/core": "^7.0.5",
|
"@octokit/core": "^7.0.3",
|
||||||
"@octokit/plugin-paginate-rest": "^13.1.1",
|
"@octokit/plugin-paginate-rest": "^13.1.1",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^16.1.0",
|
"@octokit/plugin-rest-endpoint-methods": "^16.0.0",
|
||||||
"@renovatebot/pep440": "^4.2.1",
|
"@renovatebot/pep440": "^4.2.0",
|
||||||
"smol-toml": "^1.4.2",
|
"smol-toml": "^1.4.2",
|
||||||
"undici": "^7.16.0"
|
"undici": "^7.15.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "2.2.4",
|
"@biomejs/biome": "2.2.2",
|
||||||
"@types/js-yaml": "^4.0.9",
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/node": "^24.7.0",
|
"@types/node": "^24.3.0",
|
||||||
"@types/semver": "^7.7.1",
|
"@types/semver": "^7.7.0",
|
||||||
"@vercel/ncc": "^0.38.4",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"jest": "^30.1.3",
|
"jest": "^30.1.1",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"ts-jest": "^29.4.4",
|
"ts-jest": "^29.4.1",
|
||||||
"typescript": "^5.9.2"
|
"typescript": "^5.9.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -901,9 +901,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/biome": {
|
"node_modules/@biomejs/biome": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.2.2.tgz",
|
||||||
"integrity": "sha512-TBHU5bUy/Ok6m8c0y3pZiuO/BZoY/OcGxoLlrfQof5s8ISVwbVBdFINPQZyFfKwil8XibYWb7JMwnT8wT4WVPg==",
|
"integrity": "sha512-j1omAiQWCkhuLgwpMKisNKnsM6W8Xtt1l0WZmqY/dFj8QPNkIoTvk4tSsi40FaAAkBE1PU0AFG2RWFBWenAn+w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -917,20 +917,20 @@
|
|||||||
"url": "https://opencollective.com/biome"
|
"url": "https://opencollective.com/biome"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@biomejs/cli-darwin-arm64": "2.2.4",
|
"@biomejs/cli-darwin-arm64": "2.2.2",
|
||||||
"@biomejs/cli-darwin-x64": "2.2.4",
|
"@biomejs/cli-darwin-x64": "2.2.2",
|
||||||
"@biomejs/cli-linux-arm64": "2.2.4",
|
"@biomejs/cli-linux-arm64": "2.2.2",
|
||||||
"@biomejs/cli-linux-arm64-musl": "2.2.4",
|
"@biomejs/cli-linux-arm64-musl": "2.2.2",
|
||||||
"@biomejs/cli-linux-x64": "2.2.4",
|
"@biomejs/cli-linux-x64": "2.2.2",
|
||||||
"@biomejs/cli-linux-x64-musl": "2.2.4",
|
"@biomejs/cli-linux-x64-musl": "2.2.2",
|
||||||
"@biomejs/cli-win32-arm64": "2.2.4",
|
"@biomejs/cli-win32-arm64": "2.2.2",
|
||||||
"@biomejs/cli-win32-x64": "2.2.4"
|
"@biomejs/cli-win32-x64": "2.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-darwin-arm64": {
|
"node_modules/@biomejs/cli-darwin-arm64": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.2.2.tgz",
|
||||||
"integrity": "sha512-RJe2uiyaloN4hne4d2+qVj3d3gFJFbmrr5PYtkkjei1O9c+BjGXgpUPVbi8Pl8syumhzJjFsSIYkcLt2VlVLMA==",
|
"integrity": "sha512-6ePfbCeCPryWu0CXlzsWNZgVz/kBEvHiPyNpmViSt6A2eoDf4kXs3YnwQPzGjy8oBgQulrHcLnJL0nkCh80mlQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -945,9 +945,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-darwin-x64": {
|
"node_modules/@biomejs/cli-darwin-x64": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.2.2.tgz",
|
||||||
"integrity": "sha512-cFsdB4ePanVWfTnPVaUX+yr8qV8ifxjBKMkZwN7gKb20qXPxd/PmwqUH8mY5wnM9+U0QwM76CxFyBRJhC9tQwg==",
|
"integrity": "sha512-Tn4JmVO+rXsbRslml7FvKaNrlgUeJot++FkvYIhl1OkslVCofAtS35MPlBMhXgKWF9RNr9cwHanrPTUUXcYGag==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -962,9 +962,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-linux-arm64": {
|
"node_modules/@biomejs/cli-linux-arm64": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.2.2.tgz",
|
||||||
"integrity": "sha512-M/Iz48p4NAzMXOuH+tsn5BvG/Jb07KOMTdSVwJpicmhN309BeEyRyQX+n1XDF0JVSlu28+hiTQ2L4rZPvu7nMw==",
|
"integrity": "sha512-JfrK3gdmWWTh2J5tq/rcWCOsImVyzUnOS2fkjhiYKCQ+v8PqM+du5cfB7G1kXas+7KQeKSWALv18iQqdtIMvzw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -979,9 +979,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-linux-arm64-musl": {
|
"node_modules/@biomejs/cli-linux-arm64-musl": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.2.2.tgz",
|
||||||
"integrity": "sha512-7TNPkMQEWfjvJDaZRSkDCPT/2r5ESFPKx+TEev+I2BXDGIjfCZk2+b88FOhnJNHtksbOZv8ZWnxrA5gyTYhSsQ==",
|
"integrity": "sha512-/MhYg+Bd6renn6i1ylGFL5snYUn/Ct7zoGVKhxnro3bwekiZYE8Kl39BSb0MeuqM+72sThkQv4TnNubU9njQRw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -996,9 +996,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-linux-x64": {
|
"node_modules/@biomejs/cli-linux-x64": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.2.2.tgz",
|
||||||
"integrity": "sha512-orr3nnf2Dpb2ssl6aihQtvcKtLySLta4E2UcXdp7+RTa7mfJjBgIsbS0B9GC8gVu0hjOu021aU8b3/I1tn+pVQ==",
|
"integrity": "sha512-Ogb+77edO5LEP/xbNicACOWVLt8mgC+E1wmpUakr+O4nKwLt9vXe74YNuT3T1dUBxC/SnrVmlzZFC7kQJEfquQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1013,9 +1013,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-linux-x64-musl": {
|
"node_modules/@biomejs/cli-linux-x64-musl": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.2.2.tgz",
|
||||||
"integrity": "sha512-m41nFDS0ksXK2gwXL6W6yZTYPMH0LughqbsxInSKetoH6morVj43szqKx79Iudkp8WRT5SxSh7qVb8KCUiewGg==",
|
"integrity": "sha512-ZCLXcZvjZKSiRY/cFANKg+z6Fhsf9MHOzj+NrDQcM+LbqYRT97LyCLWy2AS+W2vP+i89RyRM+kbGpUzbRTYWig==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1030,9 +1030,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-win32-arm64": {
|
"node_modules/@biomejs/cli-win32-arm64": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.2.2.tgz",
|
||||||
"integrity": "sha512-NXnfTeKHDFUWfxAefa57DiGmu9VyKi0cDqFpdI+1hJWQjGJhJutHPX0b5m+eXvTKOaf+brU+P0JrQAZMb5yYaQ==",
|
"integrity": "sha512-wBe2wItayw1zvtXysmHJQoQqXlTzHSpQRyPpJKiNIR21HzH/CrZRDFic1C1jDdp+zAPtqhNExa0owKMbNwW9cQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1047,9 +1047,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-win32-x64": {
|
"node_modules/@biomejs/cli-win32-x64": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.2.2.tgz",
|
||||||
"integrity": "sha512-3Y4V4zVRarVh/B/eSHczR4LYoSVyv3Dfuvm3cWs5w/HScccS0+Wt/lHOcDTRYeHjQmMYVC3rIRWqyN2EI52+zg==",
|
"integrity": "sha512-DAuHhHekGfiGb6lCcsT4UyxQmVwQiBCBUMwVra/dcOSs9q8OhfaZgey51MlekT3p8UwRqtXQfFuEJBhJNdLZwg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1216,16 +1216,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jest/core": {
|
"node_modules/@jest/core": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jest/core/-/core-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@jest/core/-/core-30.1.2.tgz",
|
||||||
"integrity": "sha512-LIQz7NEDDO1+eyOA2ZmkiAyYvZuo6s1UxD/e2IHldR6D7UYogVq3arTmli07MkENLq6/3JEQjp0mA8rrHHJ8KQ==",
|
"integrity": "sha512-iSLOojkYgM7Lw0FF5egecZh+CiLWe4xICM3WOMjFbewhbWn+ixEoPwY7oK9jSCnLLphMFAjussXp7CE3tHa5EA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jest/console": "30.1.2",
|
"@jest/console": "30.1.2",
|
||||||
"@jest/pattern": "30.0.1",
|
"@jest/pattern": "30.0.1",
|
||||||
"@jest/reporters": "30.1.3",
|
"@jest/reporters": "30.1.2",
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/transform": "30.1.2",
|
"@jest/transform": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
@@ -1235,18 +1235,18 @@
|
|||||||
"exit-x": "^0.2.2",
|
"exit-x": "^0.2.2",
|
||||||
"graceful-fs": "^4.2.11",
|
"graceful-fs": "^4.2.11",
|
||||||
"jest-changed-files": "30.0.5",
|
"jest-changed-files": "30.0.5",
|
||||||
"jest-config": "30.1.3",
|
"jest-config": "30.1.2",
|
||||||
"jest-haste-map": "30.1.0",
|
"jest-haste-map": "30.1.0",
|
||||||
"jest-message-util": "30.1.0",
|
"jest-message-util": "30.1.0",
|
||||||
"jest-regex-util": "30.0.1",
|
"jest-regex-util": "30.0.1",
|
||||||
"jest-resolve": "30.1.3",
|
"jest-resolve": "30.1.0",
|
||||||
"jest-resolve-dependencies": "30.1.3",
|
"jest-resolve-dependencies": "30.1.2",
|
||||||
"jest-runner": "30.1.3",
|
"jest-runner": "30.1.2",
|
||||||
"jest-runtime": "30.1.3",
|
"jest-runtime": "30.1.2",
|
||||||
"jest-snapshot": "30.1.2",
|
"jest-snapshot": "30.1.2",
|
||||||
"jest-util": "30.0.5",
|
"jest-util": "30.0.5",
|
||||||
"jest-validate": "30.1.0",
|
"jest-validate": "30.1.0",
|
||||||
"jest-watcher": "30.1.3",
|
"jest-watcher": "30.1.2",
|
||||||
"micromatch": "^4.0.8",
|
"micromatch": "^4.0.8",
|
||||||
"pretty-format": "30.0.5",
|
"pretty-format": "30.0.5",
|
||||||
"slash": "^3.0.0"
|
"slash": "^3.0.0"
|
||||||
@@ -1375,15 +1375,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jest/reporters": {
|
"node_modules/@jest/reporters": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.1.2.tgz",
|
||||||
"integrity": "sha512-VWEQmJWfXMOrzdFEOyGjUEOuVXllgZsoPtEHZzfdNz18RmzJ5nlR6kp8hDdY8dDS1yGOXAY7DHT+AOHIPSBV0w==",
|
"integrity": "sha512-8Jd7y3DUFBn8dG/bNJ2blmaJmT2Up74WAXkUJsbL0OuEZHDRRMnS4JmRtLArW2d0H5k8RDdhNN7j70Ki16Zr5g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bcoe/v8-coverage": "^0.2.3",
|
"@bcoe/v8-coverage": "^0.2.3",
|
||||||
"@jest/console": "30.1.2",
|
"@jest/console": "30.1.2",
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/transform": "30.1.2",
|
"@jest/transform": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"@jridgewell/trace-mapping": "^0.3.25",
|
"@jridgewell/trace-mapping": "^0.3.25",
|
||||||
@@ -1462,9 +1462,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jest/test-result": {
|
"node_modules/@jest/test-result": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.1.2.tgz",
|
||||||
"integrity": "sha512-P9IV8T24D43cNRANPPokn7tZh0FAFnYS2HIfi5vK18CjRkTDR9Y3e1BoEcAJnl4ghZZF4Ecda4M/k41QkvurEQ==",
|
"integrity": "sha512-mpKFr8DEpfG5aAfQYA5+3KneAsRBXhF7zwtwqT4UeYBckoOPD1MzVxU6gDHwx4gRB7I1MKL6owyJzr8QRq402Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -1478,13 +1478,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jest/test-sequencer": {
|
"node_modules/@jest/test-sequencer": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.1.2.tgz",
|
||||||
"integrity": "sha512-82J+hzC0qeQIiiZDThh+YUadvshdBswi5nuyXlEmXzrhw5ZQSRHeQ5LpVMD/xc8B3wPePvs6VMzHnntxL+4E3w==",
|
"integrity": "sha512-v3vawuj2LC0XjpzF4q0pI0ZlQvMBDNqfRZZ2yHqcsGt7JEYsDK2L1WwrybEGlnOaEvnDFML/Y9xWLiW47Dda8A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"graceful-fs": "^4.2.11",
|
"graceful-fs": "^4.2.11",
|
||||||
"jest-haste-map": "30.1.0",
|
"jest-haste-map": "30.1.0",
|
||||||
"slash": "^3.0.0"
|
"slash": "^3.0.0"
|
||||||
@@ -1611,16 +1611,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/core": {
|
"node_modules/@octokit/core": {
|
||||||
"version": "7.0.5",
|
"version": "7.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.3.tgz",
|
||||||
"integrity": "sha512-t54CUOsFMappY1Jbzb7fetWeO0n6K0k/4+/ZpkS+3Joz8I4VcvY9OiEBFRYISqaI2fq5sCiPtAjRDOzVYG8m+Q==",
|
"integrity": "sha512-oNXsh2ywth5aowwIa7RKtawnkdH6LgU1ztfP9AIUCQCvzysB+WeU8o2kyyosDPwBZutPpjZDKPQGIzzrfTWweQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/auth-token": "^6.0.0",
|
"@octokit/auth-token": "^6.0.0",
|
||||||
"@octokit/graphql": "^9.0.2",
|
"@octokit/graphql": "^9.0.1",
|
||||||
"@octokit/request": "^10.0.4",
|
"@octokit/request": "^10.0.2",
|
||||||
"@octokit/request-error": "^7.0.1",
|
"@octokit/request-error": "^7.0.0",
|
||||||
"@octokit/types": "^15.0.0",
|
"@octokit/types": "^14.0.0",
|
||||||
"before-after-hook": "^4.0.0",
|
"before-after-hook": "^4.0.0",
|
||||||
"universal-user-agent": "^7.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
},
|
||||||
@@ -1628,78 +1628,33 @@
|
|||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/core/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "26.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
|
|
||||||
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/core/node_modules/@octokit/types": {
|
|
||||||
"version": "15.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.0.tgz",
|
|
||||||
"integrity": "sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^26.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/endpoint": {
|
"node_modules/@octokit/endpoint": {
|
||||||
"version": "11.0.1",
|
"version": "11.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.0.tgz",
|
||||||
"integrity": "sha512-7P1dRAZxuWAOPI7kXfio88trNi/MegQ0IJD3vfgC3b+LZo1Qe6gRJc2v0mz2USWWJOKrB2h5spXCzGbw+fAdqA==",
|
"integrity": "sha512-hoYicJZaqISMAI3JfaDr1qMNi48OctWuOih1m80bkYow/ayPw6Jj52tqWJ6GEoFTk1gBqfanSoI1iY99Z5+ekQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^15.0.0",
|
"@octokit/types": "^14.0.0",
|
||||||
"universal-user-agent": "^7.0.2"
|
"universal-user-agent": "^7.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/endpoint/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "26.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
|
|
||||||
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/endpoint/node_modules/@octokit/types": {
|
|
||||||
"version": "15.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.0.tgz",
|
|
||||||
"integrity": "sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^26.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/graphql": {
|
"node_modules/@octokit/graphql": {
|
||||||
"version": "9.0.2",
|
"version": "9.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.1.tgz",
|
||||||
"integrity": "sha512-iz6KzZ7u95Fzy9Nt2L8cG88lGRMr/qy1Q36ih/XVzMIlPDMYwaNLE/ENhqmIzgPrlNWiYJkwmveEetvxAgFBJw==",
|
"integrity": "sha512-j1nQNU1ZxNFx2ZtKmL4sMrs4egy5h65OMDmSbVyuCzjOcwsHq6EaYjOTGXPQxgfiN8dJ4CriYHk6zF050WEULg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/request": "^10.0.4",
|
"@octokit/request": "^10.0.2",
|
||||||
"@octokit/types": "^15.0.0",
|
"@octokit/types": "^14.0.0",
|
||||||
"universal-user-agent": "^7.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "26.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
|
|
||||||
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/graphql/node_modules/@octokit/types": {
|
|
||||||
"version": "15.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.0.tgz",
|
|
||||||
"integrity": "sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^26.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/openapi-types": {
|
"node_modules/@octokit/openapi-types": {
|
||||||
"version": "25.1.0",
|
"version": "25.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-25.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-25.1.0.tgz",
|
||||||
@@ -1722,12 +1677,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||||
"version": "16.1.0",
|
"version": "16.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-16.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-16.0.0.tgz",
|
||||||
"integrity": "sha512-nCsyiKoGRnhH5LkH8hJEZb9swpqOcsW+VXv1QoyUNQXJeVODG4+xM6UICEqyqe9XFr6LkL8BIiFCPev8zMDXPw==",
|
"integrity": "sha512-kJVUQk6/dx/gRNLWUnAWKFs1kVPn5O5CYZyssyEoNYaFedqZxsfYs7DwI3d67hGz4qOwaJ1dpm07hOAD1BXx6g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^15.0.0"
|
"@octokit/types": "^14.1.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
@@ -1736,30 +1691,15 @@
|
|||||||
"@octokit/core": ">=6"
|
"@octokit/core": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "26.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
|
|
||||||
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
|
|
||||||
"version": "15.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.0.tgz",
|
|
||||||
"integrity": "sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^26.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request": {
|
"node_modules/@octokit/request": {
|
||||||
"version": "10.0.5",
|
"version": "10.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.2.tgz",
|
||||||
"integrity": "sha512-TXnouHIYLtgDhKo+N6mXATnDBkV05VwbR0TtMWpgTHIoQdRQfCSzmy/LGqR1AbRMbijq/EckC/E3/ZNcU92NaQ==",
|
"integrity": "sha512-iYj4SJG/2bbhh+iIpFmG5u49DtJ4lipQ+aPakjL9OKpsGY93wM8w06gvFbEQxcMsZcCvk5th5KkIm2m8o14aWA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/endpoint": "^11.0.1",
|
"@octokit/endpoint": "^11.0.0",
|
||||||
"@octokit/request-error": "^7.0.1",
|
"@octokit/request-error": "^7.0.0",
|
||||||
"@octokit/types": "^15.0.0",
|
"@octokit/types": "^14.0.0",
|
||||||
"fast-content-type-parse": "^3.0.0",
|
"fast-content-type-parse": "^3.0.0",
|
||||||
"universal-user-agent": "^7.0.2"
|
"universal-user-agent": "^7.0.2"
|
||||||
},
|
},
|
||||||
@@ -1768,47 +1708,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/request-error": {
|
"node_modules/@octokit/request-error": {
|
||||||
"version": "7.0.1",
|
"version": "7.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.0.tgz",
|
||||||
"integrity": "sha512-CZpFwV4+1uBrxu7Cw8E5NCXDWFNf18MSY23TdxCBgjw1tXXHvTrZVsXlW8hgFTOLw8RQR1BBrMvYRtuyaijHMA==",
|
"integrity": "sha512-KRA7VTGdVyJlh0cP5Tf94hTiYVVqmt2f3I6mnimmaVz4UG3gQV/k4mDJlJv3X67iX6rmN7gSHCF8ssqeMnmhZg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^15.0.0"
|
"@octokit/types": "^14.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/request-error/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "26.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
|
|
||||||
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request-error/node_modules/@octokit/types": {
|
|
||||||
"version": "15.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.0.tgz",
|
|
||||||
"integrity": "sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^26.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "26.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
|
|
||||||
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request/node_modules/@octokit/types": {
|
|
||||||
"version": "15.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.0.tgz",
|
|
||||||
"integrity": "sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^26.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/types": {
|
"node_modules/@octokit/types": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-14.1.0.tgz",
|
||||||
@@ -1866,9 +1776,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@renovatebot/pep440": {
|
"node_modules/@renovatebot/pep440": {
|
||||||
"version": "4.2.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@renovatebot/pep440/-/pep440-4.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@renovatebot/pep440/-/pep440-4.2.0.tgz",
|
||||||
"integrity": "sha512-2FK1hF93Fuf1laSdfiEmJvSJPVIDHEUTz68D3Fi9s0IZrrpaEcj6pTFBTbYvsgC5du4ogrtf5re7yMMvrKNgkw==",
|
"integrity": "sha512-hT7WcjHbZdx3U9iRKuGwgm1l2wFS+FrWEdX+EQ5i+VAI6tWdcktFtdwDTNIqSwklOW1Vng55om8c4RrPHCmiIQ==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.9.0 || ^22.11.0 || ^24",
|
"node": "^20.9.0 || ^22.11.0 || ^24",
|
||||||
"pnpm": "^10.0.0"
|
"pnpm": "^10.0.0"
|
||||||
@@ -1902,9 +1813,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tybys/wasm-util": {
|
"node_modules/@tybys/wasm-util": {
|
||||||
"version": "0.10.1",
|
"version": "0.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.0.tgz",
|
||||||
"integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==",
|
"integrity": "sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
@@ -2000,12 +1911,12 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "24.7.0",
|
"version": "24.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz",
|
||||||
"integrity": "sha512-IbKooQVqUBrlzWTi79E8Fw78l8k1RNtlDDNWsFZs7XonuQSJ8oNYfEeclhprUldXISRMLzBpILuKgPlIxm+/Yw==",
|
"integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~7.14.0"
|
"undici-types": "~7.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/node-fetch": {
|
"node_modules/@types/node-fetch": {
|
||||||
@@ -2034,9 +1945,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/semver": {
|
"node_modules/@types/semver": {
|
||||||
"version": "7.7.1",
|
"version": "7.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz",
|
||||||
"integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==",
|
"integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
@@ -2349,11 +2260,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@vercel/ncc": {
|
"node_modules/@vercel/ncc": {
|
||||||
"version": "0.38.4",
|
"version": "0.38.3",
|
||||||
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.4.tgz",
|
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.3.tgz",
|
||||||
"integrity": "sha512-8LwjnlP39s08C08J5NstzriPvW1SP8Zfpp1BvC2sI35kPeZnHfxVkCwu4/+Wodgnd60UtT1n8K8zw+Mp7J9JmQ==",
|
"integrity": "sha512-rnK6hJBS6mwc+Bkab+PGPs9OiS0i/3kdTO+CkI8V0/VrW3vmz7O2Pxjw/owOlmo6PKEIxRSeZKv/kuL9itnpYA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"ncc": "dist/ncc/cli.js"
|
"ncc": "dist/ncc/cli.js"
|
||||||
}
|
}
|
||||||
@@ -2399,9 +2309,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ansi-regex": {
|
"node_modules/ansi-regex": {
|
||||||
"version": "6.2.2",
|
"version": "6.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.0.tgz",
|
||||||
"integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",
|
"integrity": "sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -2914,9 +2824,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/dedent": {
|
"node_modules/dedent": {
|
||||||
"version": "1.7.0",
|
"version": "1.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz",
|
||||||
"integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==",
|
"integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
@@ -3723,16 +3633,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest": {
|
"node_modules/jest": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest/-/jest-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest/-/jest-30.1.2.tgz",
|
||||||
"integrity": "sha512-Ry+p2+NLk6u8Agh5yVqELfUJvRfV51hhVBRIB5yZPY7mU0DGBmOuFG5GebZbMbm86cdQNK0fhJuDX8/1YorISQ==",
|
"integrity": "sha512-iLreJmUWdANLD2UIbebrXxQqU9jIxv2ahvrBNfff55deL9DtVxm8ZJBLk/kmn0AQ+FyCTrNSlGbMdTgSasldYA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jest/core": "30.1.3",
|
"@jest/core": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"import-local": "^3.2.0",
|
"import-local": "^3.2.0",
|
||||||
"jest-cli": "30.1.3"
|
"jest-cli": "30.1.2"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"jest": "bin/jest.js"
|
"jest": "bin/jest.js"
|
||||||
@@ -3765,15 +3675,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-circus": {
|
"node_modules/jest-circus": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.1.2.tgz",
|
||||||
"integrity": "sha512-Yf3dnhRON2GJT4RYzM89t/EXIWNxKTpWTL9BfF3+geFetWP4XSvJjiU1vrWplOiUkmq8cHLiwuhz+XuUp9DscA==",
|
"integrity": "sha512-pyqgRv00fPbU3QBjN9I5QRd77eCWA19NA7BLgI1veFvbUIFpeDCKbnG1oyRr6q5/jPEW2zDfqZ/r6fvfE85vrA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jest/environment": "30.1.2",
|
"@jest/environment": "30.1.2",
|
||||||
"@jest/expect": "30.1.2",
|
"@jest/expect": "30.1.2",
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
@@ -3783,7 +3693,7 @@
|
|||||||
"jest-each": "30.1.0",
|
"jest-each": "30.1.0",
|
||||||
"jest-matcher-utils": "30.1.2",
|
"jest-matcher-utils": "30.1.2",
|
||||||
"jest-message-util": "30.1.0",
|
"jest-message-util": "30.1.0",
|
||||||
"jest-runtime": "30.1.3",
|
"jest-runtime": "30.1.2",
|
||||||
"jest-snapshot": "30.1.2",
|
"jest-snapshot": "30.1.2",
|
||||||
"jest-util": "30.0.5",
|
"jest-util": "30.0.5",
|
||||||
"p-limit": "^3.1.0",
|
"p-limit": "^3.1.0",
|
||||||
@@ -3797,19 +3707,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-cli": {
|
"node_modules/jest-cli": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.1.2.tgz",
|
||||||
"integrity": "sha512-G8E2Ol3OKch1DEeIBl41NP7OiC6LBhfg25Btv+idcusmoUSpqUkbrneMqbW9lVpI/rCKb/uETidb7DNteheuAQ==",
|
"integrity": "sha512-Q7H6GGo/0TBB8Mhm3Ab7KKJHn6GeMVff+/8PVCQ7vXXahvr5sRERnNbxuVJAMiVY2JQm5roA7CHYOYlH+gzmUg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jest/core": "30.1.3",
|
"@jest/core": "30.1.2",
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"exit-x": "^0.2.2",
|
"exit-x": "^0.2.2",
|
||||||
"import-local": "^3.2.0",
|
"import-local": "^3.2.0",
|
||||||
"jest-config": "30.1.3",
|
"jest-config": "30.1.2",
|
||||||
"jest-util": "30.0.5",
|
"jest-util": "30.0.5",
|
||||||
"jest-validate": "30.1.0",
|
"jest-validate": "30.1.0",
|
||||||
"yargs": "^17.7.2"
|
"yargs": "^17.7.2"
|
||||||
@@ -3830,16 +3740,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-config": {
|
"node_modules/jest-config": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.1.2.tgz",
|
||||||
"integrity": "sha512-M/f7gqdQEPgZNA181Myz+GXCe8jXcJsGjCMXUzRj22FIXsZOyHNte84e0exntOvdPaeh9tA0w+B8qlP2fAezfw==",
|
"integrity": "sha512-gCuBeE/cksjQ3e1a8H4YglZJuVPcnLZQK9jC70E6GbkHNQKPasnOO+r9IYdsUbAekb6c7eVRR8laGLMF06gMqg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.27.4",
|
"@babel/core": "^7.27.4",
|
||||||
"@jest/get-type": "30.1.0",
|
"@jest/get-type": "30.1.0",
|
||||||
"@jest/pattern": "30.0.1",
|
"@jest/pattern": "30.0.1",
|
||||||
"@jest/test-sequencer": "30.1.3",
|
"@jest/test-sequencer": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"babel-jest": "30.1.2",
|
"babel-jest": "30.1.2",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
@@ -3847,12 +3757,12 @@
|
|||||||
"deepmerge": "^4.3.1",
|
"deepmerge": "^4.3.1",
|
||||||
"glob": "^10.3.10",
|
"glob": "^10.3.10",
|
||||||
"graceful-fs": "^4.2.11",
|
"graceful-fs": "^4.2.11",
|
||||||
"jest-circus": "30.1.3",
|
"jest-circus": "30.1.2",
|
||||||
"jest-docblock": "30.0.1",
|
"jest-docblock": "30.0.1",
|
||||||
"jest-environment-node": "30.1.2",
|
"jest-environment-node": "30.1.2",
|
||||||
"jest-regex-util": "30.0.1",
|
"jest-regex-util": "30.0.1",
|
||||||
"jest-resolve": "30.1.3",
|
"jest-resolve": "30.1.0",
|
||||||
"jest-runner": "30.1.3",
|
"jest-runner": "30.1.2",
|
||||||
"jest-util": "30.0.5",
|
"jest-util": "30.0.5",
|
||||||
"jest-validate": "30.1.0",
|
"jest-validate": "30.1.0",
|
||||||
"micromatch": "^4.0.8",
|
"micromatch": "^4.0.8",
|
||||||
@@ -4066,9 +3976,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-resolve": {
|
"node_modules/jest-resolve": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.1.0.tgz",
|
||||||
"integrity": "sha512-DI4PtTqzw9GwELFS41sdMK32Ajp3XZQ8iygeDMWkxlRhm7uUTOFSZFVZABFuxr0jvspn8MAYy54NxZCsuCTSOw==",
|
"integrity": "sha512-hASe7D/wRtZw8Cm607NrlF7fi3HWC5wmA5jCVc2QjQAB2pTwP9eVZILGEi6OeSLNUtE1zb04sXRowsdh5CUjwA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -4086,9 +3996,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-resolve-dependencies": {
|
"node_modules/jest-resolve-dependencies": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.1.2.tgz",
|
||||||
"integrity": "sha512-DNfq3WGmuRyHRHfEet+Zm3QOmVFtIarUOQHHryKPc0YL9ROfgWZxl4+aZq/VAzok2SS3gZdniP+dO4zgo59hBg==",
|
"integrity": "sha512-HJjyoaedY4wrwda+eqvgjbwFykrAnQEmhuT0bMyOV3GQIyLPcunZcjfkm77Zr11ujwl34ySdc4qYnm7SG75TjA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -4100,15 +4010,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-runner": {
|
"node_modules/jest-runner": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.1.2.tgz",
|
||||||
"integrity": "sha512-dd1ORcxQraW44Uz029TtXj85W11yvLpDuIzNOlofrC8GN+SgDlgY4BvyxJiVeuabA1t6idjNbX59jLd2oplOGQ==",
|
"integrity": "sha512-eu9AzpDY/QV+7NuMg6fZMpQ7M24cBkl5dyS1Xj7iwDPDriOmLUXR8rLojESibcIX+sCDTO4KvUeaxWCH1fbTvg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jest/console": "30.1.2",
|
"@jest/console": "30.1.2",
|
||||||
"@jest/environment": "30.1.2",
|
"@jest/environment": "30.1.2",
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/transform": "30.1.2",
|
"@jest/transform": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
@@ -4121,10 +4031,10 @@
|
|||||||
"jest-haste-map": "30.1.0",
|
"jest-haste-map": "30.1.0",
|
||||||
"jest-leak-detector": "30.1.0",
|
"jest-leak-detector": "30.1.0",
|
||||||
"jest-message-util": "30.1.0",
|
"jest-message-util": "30.1.0",
|
||||||
"jest-resolve": "30.1.3",
|
"jest-resolve": "30.1.0",
|
||||||
"jest-runtime": "30.1.3",
|
"jest-runtime": "30.1.2",
|
||||||
"jest-util": "30.0.5",
|
"jest-util": "30.0.5",
|
||||||
"jest-watcher": "30.1.3",
|
"jest-watcher": "30.1.2",
|
||||||
"jest-worker": "30.1.0",
|
"jest-worker": "30.1.0",
|
||||||
"p-limit": "^3.1.0",
|
"p-limit": "^3.1.0",
|
||||||
"source-map-support": "0.5.13"
|
"source-map-support": "0.5.13"
|
||||||
@@ -4134,9 +4044,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-runtime": {
|
"node_modules/jest-runtime": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.1.2.tgz",
|
||||||
"integrity": "sha512-WS8xgjuNSphdIGnleQcJ3AKE4tBKOVP+tKhCD0u+Tb2sBmsU8DxfbBpZX7//+XOz81zVs4eFpJQwBNji2Y07DA==",
|
"integrity": "sha512-zU02si+lAITgyRmVRgJn/AB4cnakq8+o7bP+5Z+N1A4r2mq40zGbmrg3UpYQWCkeim17tx8w1Tnmt6tQ6y9PGA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -4144,7 +4054,7 @@
|
|||||||
"@jest/fake-timers": "30.1.2",
|
"@jest/fake-timers": "30.1.2",
|
||||||
"@jest/globals": "30.1.2",
|
"@jest/globals": "30.1.2",
|
||||||
"@jest/source-map": "30.0.1",
|
"@jest/source-map": "30.0.1",
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/transform": "30.1.2",
|
"@jest/transform": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
@@ -4157,7 +4067,7 @@
|
|||||||
"jest-message-util": "30.1.0",
|
"jest-message-util": "30.1.0",
|
||||||
"jest-mock": "30.0.5",
|
"jest-mock": "30.0.5",
|
||||||
"jest-regex-util": "30.0.1",
|
"jest-regex-util": "30.0.1",
|
||||||
"jest-resolve": "30.1.3",
|
"jest-resolve": "30.1.0",
|
||||||
"jest-snapshot": "30.1.2",
|
"jest-snapshot": "30.1.2",
|
||||||
"jest-util": "30.0.5",
|
"jest-util": "30.0.5",
|
||||||
"slash": "^3.0.0",
|
"slash": "^3.0.0",
|
||||||
@@ -4276,13 +4186,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-watcher": {
|
"node_modules/jest-watcher": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.1.2.tgz",
|
||||||
"integrity": "sha512-6jQUZCP1BTL2gvG9E4YF06Ytq4yMb4If6YoQGRR6PpjtqOXSP3sKe2kqwB6SQ+H9DezOfZaSLnmka1NtGm3fCQ==",
|
"integrity": "sha512-MtoGuEgqsBM8Jkn52oEj+mXLtF94+njPlHI5ydfduZL5MHrTFr14ZG1CUX1xAbY23dbSZCCEkEPhBM3cQd12Jg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"ansi-escapes": "^4.3.2",
|
"ansi-escapes": "^4.3.2",
|
||||||
@@ -5157,9 +5067,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/strip-ansi": {
|
"node_modules/strip-ansi": {
|
||||||
"version": "7.1.2",
|
"version": "7.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
|
||||||
"integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==",
|
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -5318,9 +5228,9 @@
|
|||||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||||
},
|
},
|
||||||
"node_modules/ts-jest": {
|
"node_modules/ts-jest": {
|
||||||
"version": "29.4.4",
|
"version": "29.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.4.tgz",
|
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.1.tgz",
|
||||||
"integrity": "sha512-ccVcRABct5ZELCT5U0+DZwkXMCcOCLi2doHRrKy1nK/s7J7bch6TzJMsrY09WxgUUIP/ITfmcDS8D2yl63rnXw==",
|
"integrity": "sha512-SaeUtjfpg9Uqu8IbeDKtdaS0g8lS6FT6OzM3ezrDfErPJPHNDo/Ey+VFGP1bQIDfagYDLyRpd7O15XpG1Es2Uw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -5448,18 +5358,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "7.16.0",
|
"version": "7.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-7.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-7.15.0.tgz",
|
||||||
"integrity": "sha512-QEg3HPMll0o3t2ourKwOeUAZ159Kn9mx5pnzHRQO8+Wixmh88YdZRiIwat0iNzNNXn0yoEtXJqFpyW7eM8BV7g==",
|
"integrity": "sha512-7oZJCPvvMvTd0OlqWsIxTuItTpJBpU1tcbVl24FMn3xt3+VSunwUasmfPJRE57oNO1KsZ4PgA1xTdAX4hq8NyQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.18.1"
|
"node": ">=20.18.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici-types": {
|
"node_modules/undici-types": {
|
||||||
"version": "7.14.0",
|
"version": "7.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz",
|
||||||
"integrity": "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==",
|
"integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/universal-user-agent": {
|
"node_modules/universal-user-agent": {
|
||||||
@@ -5678,9 +5588,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/wrap-ansi/node_modules/ansi-styles": {
|
"node_modules/wrap-ansi/node_modules/ansi-styles": {
|
||||||
"version": "6.2.3",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
|
||||||
"integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
|
"integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -6496,74 +6406,74 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@biomejs/biome": {
|
"@biomejs/biome": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.2.2.tgz",
|
||||||
"integrity": "sha512-TBHU5bUy/Ok6m8c0y3pZiuO/BZoY/OcGxoLlrfQof5s8ISVwbVBdFINPQZyFfKwil8XibYWb7JMwnT8wT4WVPg==",
|
"integrity": "sha512-j1omAiQWCkhuLgwpMKisNKnsM6W8Xtt1l0WZmqY/dFj8QPNkIoTvk4tSsi40FaAAkBE1PU0AFG2RWFBWenAn+w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@biomejs/cli-darwin-arm64": "2.2.4",
|
"@biomejs/cli-darwin-arm64": "2.2.2",
|
||||||
"@biomejs/cli-darwin-x64": "2.2.4",
|
"@biomejs/cli-darwin-x64": "2.2.2",
|
||||||
"@biomejs/cli-linux-arm64": "2.2.4",
|
"@biomejs/cli-linux-arm64": "2.2.2",
|
||||||
"@biomejs/cli-linux-arm64-musl": "2.2.4",
|
"@biomejs/cli-linux-arm64-musl": "2.2.2",
|
||||||
"@biomejs/cli-linux-x64": "2.2.4",
|
"@biomejs/cli-linux-x64": "2.2.2",
|
||||||
"@biomejs/cli-linux-x64-musl": "2.2.4",
|
"@biomejs/cli-linux-x64-musl": "2.2.2",
|
||||||
"@biomejs/cli-win32-arm64": "2.2.4",
|
"@biomejs/cli-win32-arm64": "2.2.2",
|
||||||
"@biomejs/cli-win32-x64": "2.2.4"
|
"@biomejs/cli-win32-x64": "2.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@biomejs/cli-darwin-arm64": {
|
"@biomejs/cli-darwin-arm64": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.2.2.tgz",
|
||||||
"integrity": "sha512-RJe2uiyaloN4hne4d2+qVj3d3gFJFbmrr5PYtkkjei1O9c+BjGXgpUPVbi8Pl8syumhzJjFsSIYkcLt2VlVLMA==",
|
"integrity": "sha512-6ePfbCeCPryWu0CXlzsWNZgVz/kBEvHiPyNpmViSt6A2eoDf4kXs3YnwQPzGjy8oBgQulrHcLnJL0nkCh80mlQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"@biomejs/cli-darwin-x64": {
|
"@biomejs/cli-darwin-x64": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.2.2.tgz",
|
||||||
"integrity": "sha512-cFsdB4ePanVWfTnPVaUX+yr8qV8ifxjBKMkZwN7gKb20qXPxd/PmwqUH8mY5wnM9+U0QwM76CxFyBRJhC9tQwg==",
|
"integrity": "sha512-Tn4JmVO+rXsbRslml7FvKaNrlgUeJot++FkvYIhl1OkslVCofAtS35MPlBMhXgKWF9RNr9cwHanrPTUUXcYGag==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"@biomejs/cli-linux-arm64": {
|
"@biomejs/cli-linux-arm64": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.2.2.tgz",
|
||||||
"integrity": "sha512-M/Iz48p4NAzMXOuH+tsn5BvG/Jb07KOMTdSVwJpicmhN309BeEyRyQX+n1XDF0JVSlu28+hiTQ2L4rZPvu7nMw==",
|
"integrity": "sha512-JfrK3gdmWWTh2J5tq/rcWCOsImVyzUnOS2fkjhiYKCQ+v8PqM+du5cfB7G1kXas+7KQeKSWALv18iQqdtIMvzw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"@biomejs/cli-linux-arm64-musl": {
|
"@biomejs/cli-linux-arm64-musl": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.2.2.tgz",
|
||||||
"integrity": "sha512-7TNPkMQEWfjvJDaZRSkDCPT/2r5ESFPKx+TEev+I2BXDGIjfCZk2+b88FOhnJNHtksbOZv8ZWnxrA5gyTYhSsQ==",
|
"integrity": "sha512-/MhYg+Bd6renn6i1ylGFL5snYUn/Ct7zoGVKhxnro3bwekiZYE8Kl39BSb0MeuqM+72sThkQv4TnNubU9njQRw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"@biomejs/cli-linux-x64": {
|
"@biomejs/cli-linux-x64": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.2.2.tgz",
|
||||||
"integrity": "sha512-orr3nnf2Dpb2ssl6aihQtvcKtLySLta4E2UcXdp7+RTa7mfJjBgIsbS0B9GC8gVu0hjOu021aU8b3/I1tn+pVQ==",
|
"integrity": "sha512-Ogb+77edO5LEP/xbNicACOWVLt8mgC+E1wmpUakr+O4nKwLt9vXe74YNuT3T1dUBxC/SnrVmlzZFC7kQJEfquQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"@biomejs/cli-linux-x64-musl": {
|
"@biomejs/cli-linux-x64-musl": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.2.2.tgz",
|
||||||
"integrity": "sha512-m41nFDS0ksXK2gwXL6W6yZTYPMH0LughqbsxInSKetoH6morVj43szqKx79Iudkp8WRT5SxSh7qVb8KCUiewGg==",
|
"integrity": "sha512-ZCLXcZvjZKSiRY/cFANKg+z6Fhsf9MHOzj+NrDQcM+LbqYRT97LyCLWy2AS+W2vP+i89RyRM+kbGpUzbRTYWig==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"@biomejs/cli-win32-arm64": {
|
"@biomejs/cli-win32-arm64": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.2.2.tgz",
|
||||||
"integrity": "sha512-NXnfTeKHDFUWfxAefa57DiGmu9VyKi0cDqFpdI+1hJWQjGJhJutHPX0b5m+eXvTKOaf+brU+P0JrQAZMb5yYaQ==",
|
"integrity": "sha512-wBe2wItayw1zvtXysmHJQoQqXlTzHSpQRyPpJKiNIR21HzH/CrZRDFic1C1jDdp+zAPtqhNExa0owKMbNwW9cQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"@biomejs/cli-win32-x64": {
|
"@biomejs/cli-win32-x64": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.2.2.tgz",
|
||||||
"integrity": "sha512-3Y4V4zVRarVh/B/eSHczR4LYoSVyv3Dfuvm3cWs5w/HScccS0+Wt/lHOcDTRYeHjQmMYVC3rIRWqyN2EI52+zg==",
|
"integrity": "sha512-DAuHhHekGfiGb6lCcsT4UyxQmVwQiBCBUMwVra/dcOSs9q8OhfaZgey51MlekT3p8UwRqtXQfFuEJBhJNdLZwg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
@@ -6699,15 +6609,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@jest/core": {
|
"@jest/core": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jest/core/-/core-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@jest/core/-/core-30.1.2.tgz",
|
||||||
"integrity": "sha512-LIQz7NEDDO1+eyOA2ZmkiAyYvZuo6s1UxD/e2IHldR6D7UYogVq3arTmli07MkENLq6/3JEQjp0mA8rrHHJ8KQ==",
|
"integrity": "sha512-iSLOojkYgM7Lw0FF5egecZh+CiLWe4xICM3WOMjFbewhbWn+ixEoPwY7oK9jSCnLLphMFAjussXp7CE3tHa5EA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jest/console": "30.1.2",
|
"@jest/console": "30.1.2",
|
||||||
"@jest/pattern": "30.0.1",
|
"@jest/pattern": "30.0.1",
|
||||||
"@jest/reporters": "30.1.3",
|
"@jest/reporters": "30.1.2",
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/transform": "30.1.2",
|
"@jest/transform": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
@@ -6717,18 +6627,18 @@
|
|||||||
"exit-x": "^0.2.2",
|
"exit-x": "^0.2.2",
|
||||||
"graceful-fs": "^4.2.11",
|
"graceful-fs": "^4.2.11",
|
||||||
"jest-changed-files": "30.0.5",
|
"jest-changed-files": "30.0.5",
|
||||||
"jest-config": "30.1.3",
|
"jest-config": "30.1.2",
|
||||||
"jest-haste-map": "30.1.0",
|
"jest-haste-map": "30.1.0",
|
||||||
"jest-message-util": "30.1.0",
|
"jest-message-util": "30.1.0",
|
||||||
"jest-regex-util": "30.0.1",
|
"jest-regex-util": "30.0.1",
|
||||||
"jest-resolve": "30.1.3",
|
"jest-resolve": "30.1.0",
|
||||||
"jest-resolve-dependencies": "30.1.3",
|
"jest-resolve-dependencies": "30.1.2",
|
||||||
"jest-runner": "30.1.3",
|
"jest-runner": "30.1.2",
|
||||||
"jest-runtime": "30.1.3",
|
"jest-runtime": "30.1.2",
|
||||||
"jest-snapshot": "30.1.2",
|
"jest-snapshot": "30.1.2",
|
||||||
"jest-util": "30.0.5",
|
"jest-util": "30.0.5",
|
||||||
"jest-validate": "30.1.0",
|
"jest-validate": "30.1.0",
|
||||||
"jest-watcher": "30.1.3",
|
"jest-watcher": "30.1.2",
|
||||||
"micromatch": "^4.0.8",
|
"micromatch": "^4.0.8",
|
||||||
"pretty-format": "30.0.5",
|
"pretty-format": "30.0.5",
|
||||||
"slash": "^3.0.0"
|
"slash": "^3.0.0"
|
||||||
@@ -6814,14 +6724,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@jest/reporters": {
|
"@jest/reporters": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.1.2.tgz",
|
||||||
"integrity": "sha512-VWEQmJWfXMOrzdFEOyGjUEOuVXllgZsoPtEHZzfdNz18RmzJ5nlR6kp8hDdY8dDS1yGOXAY7DHT+AOHIPSBV0w==",
|
"integrity": "sha512-8Jd7y3DUFBn8dG/bNJ2blmaJmT2Up74WAXkUJsbL0OuEZHDRRMnS4JmRtLArW2d0H5k8RDdhNN7j70Ki16Zr5g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@bcoe/v8-coverage": "^0.2.3",
|
"@bcoe/v8-coverage": "^0.2.3",
|
||||||
"@jest/console": "30.1.2",
|
"@jest/console": "30.1.2",
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/transform": "30.1.2",
|
"@jest/transform": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"@jridgewell/trace-mapping": "^0.3.25",
|
"@jridgewell/trace-mapping": "^0.3.25",
|
||||||
@@ -6877,9 +6787,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@jest/test-result": {
|
"@jest/test-result": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.1.2.tgz",
|
||||||
"integrity": "sha512-P9IV8T24D43cNRANPPokn7tZh0FAFnYS2HIfi5vK18CjRkTDR9Y3e1BoEcAJnl4ghZZF4Ecda4M/k41QkvurEQ==",
|
"integrity": "sha512-mpKFr8DEpfG5aAfQYA5+3KneAsRBXhF7zwtwqT4UeYBckoOPD1MzVxU6gDHwx4gRB7I1MKL6owyJzr8QRq402Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jest/console": "30.1.2",
|
"@jest/console": "30.1.2",
|
||||||
@@ -6889,12 +6799,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@jest/test-sequencer": {
|
"@jest/test-sequencer": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.1.2.tgz",
|
||||||
"integrity": "sha512-82J+hzC0qeQIiiZDThh+YUadvshdBswi5nuyXlEmXzrhw5ZQSRHeQ5LpVMD/xc8B3wPePvs6VMzHnntxL+4E3w==",
|
"integrity": "sha512-v3vawuj2LC0XjpzF4q0pI0ZlQvMBDNqfRZZ2yHqcsGt7JEYsDK2L1WwrybEGlnOaEvnDFML/Y9xWLiW47Dda8A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"graceful-fs": "^4.2.11",
|
"graceful-fs": "^4.2.11",
|
||||||
"jest-haste-map": "30.1.0",
|
"jest-haste-map": "30.1.0",
|
||||||
"slash": "^3.0.0"
|
"slash": "^3.0.0"
|
||||||
@@ -6994,81 +6904,36 @@
|
|||||||
"integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w=="
|
"integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w=="
|
||||||
},
|
},
|
||||||
"@octokit/core": {
|
"@octokit/core": {
|
||||||
"version": "7.0.5",
|
"version": "7.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.3.tgz",
|
||||||
"integrity": "sha512-t54CUOsFMappY1Jbzb7fetWeO0n6K0k/4+/ZpkS+3Joz8I4VcvY9OiEBFRYISqaI2fq5sCiPtAjRDOzVYG8m+Q==",
|
"integrity": "sha512-oNXsh2ywth5aowwIa7RKtawnkdH6LgU1ztfP9AIUCQCvzysB+WeU8o2kyyosDPwBZutPpjZDKPQGIzzrfTWweQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/auth-token": "^6.0.0",
|
"@octokit/auth-token": "^6.0.0",
|
||||||
"@octokit/graphql": "^9.0.2",
|
"@octokit/graphql": "^9.0.1",
|
||||||
"@octokit/request": "^10.0.4",
|
"@octokit/request": "^10.0.2",
|
||||||
"@octokit/request-error": "^7.0.1",
|
"@octokit/request-error": "^7.0.0",
|
||||||
"@octokit/types": "^15.0.0",
|
"@octokit/types": "^14.0.0",
|
||||||
"before-after-hook": "^4.0.0",
|
"before-after-hook": "^4.0.0",
|
||||||
"universal-user-agent": "^7.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": {
|
|
||||||
"version": "26.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
|
|
||||||
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA=="
|
|
||||||
},
|
|
||||||
"@octokit/types": {
|
|
||||||
"version": "15.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.0.tgz",
|
|
||||||
"integrity": "sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==",
|
|
||||||
"requires": {
|
|
||||||
"@octokit/openapi-types": "^26.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/endpoint": {
|
"@octokit/endpoint": {
|
||||||
"version": "11.0.1",
|
"version": "11.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.0.tgz",
|
||||||
"integrity": "sha512-7P1dRAZxuWAOPI7kXfio88trNi/MegQ0IJD3vfgC3b+LZo1Qe6gRJc2v0mz2USWWJOKrB2h5spXCzGbw+fAdqA==",
|
"integrity": "sha512-hoYicJZaqISMAI3JfaDr1qMNi48OctWuOih1m80bkYow/ayPw6Jj52tqWJ6GEoFTk1gBqfanSoI1iY99Z5+ekQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/types": "^15.0.0",
|
"@octokit/types": "^14.0.0",
|
||||||
"universal-user-agent": "^7.0.2"
|
"universal-user-agent": "^7.0.2"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": {
|
|
||||||
"version": "26.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
|
|
||||||
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA=="
|
|
||||||
},
|
|
||||||
"@octokit/types": {
|
|
||||||
"version": "15.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.0.tgz",
|
|
||||||
"integrity": "sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==",
|
|
||||||
"requires": {
|
|
||||||
"@octokit/openapi-types": "^26.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/graphql": {
|
"@octokit/graphql": {
|
||||||
"version": "9.0.2",
|
"version": "9.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.1.tgz",
|
||||||
"integrity": "sha512-iz6KzZ7u95Fzy9Nt2L8cG88lGRMr/qy1Q36ih/XVzMIlPDMYwaNLE/ENhqmIzgPrlNWiYJkwmveEetvxAgFBJw==",
|
"integrity": "sha512-j1nQNU1ZxNFx2ZtKmL4sMrs4egy5h65OMDmSbVyuCzjOcwsHq6EaYjOTGXPQxgfiN8dJ4CriYHk6zF050WEULg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/request": "^10.0.4",
|
"@octokit/request": "^10.0.2",
|
||||||
"@octokit/types": "^15.0.0",
|
"@octokit/types": "^14.0.0",
|
||||||
"universal-user-agent": "^7.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": {
|
|
||||||
"version": "26.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
|
|
||||||
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA=="
|
|
||||||
},
|
|
||||||
"@octokit/types": {
|
|
||||||
"version": "15.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.0.tgz",
|
|
||||||
"integrity": "sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==",
|
|
||||||
"requires": {
|
|
||||||
"@octokit/openapi-types": "^26.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/openapi-types": {
|
"@octokit/openapi-types": {
|
||||||
@@ -7085,76 +6950,31 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/plugin-rest-endpoint-methods": {
|
"@octokit/plugin-rest-endpoint-methods": {
|
||||||
"version": "16.1.0",
|
"version": "16.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-16.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-16.0.0.tgz",
|
||||||
"integrity": "sha512-nCsyiKoGRnhH5LkH8hJEZb9swpqOcsW+VXv1QoyUNQXJeVODG4+xM6UICEqyqe9XFr6LkL8BIiFCPev8zMDXPw==",
|
"integrity": "sha512-kJVUQk6/dx/gRNLWUnAWKFs1kVPn5O5CYZyssyEoNYaFedqZxsfYs7DwI3d67hGz4qOwaJ1dpm07hOAD1BXx6g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/types": "^15.0.0"
|
"@octokit/types": "^14.1.0"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": {
|
|
||||||
"version": "26.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
|
|
||||||
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA=="
|
|
||||||
},
|
|
||||||
"@octokit/types": {
|
|
||||||
"version": "15.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.0.tgz",
|
|
||||||
"integrity": "sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==",
|
|
||||||
"requires": {
|
|
||||||
"@octokit/openapi-types": "^26.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/request": {
|
"@octokit/request": {
|
||||||
"version": "10.0.5",
|
"version": "10.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.2.tgz",
|
||||||
"integrity": "sha512-TXnouHIYLtgDhKo+N6mXATnDBkV05VwbR0TtMWpgTHIoQdRQfCSzmy/LGqR1AbRMbijq/EckC/E3/ZNcU92NaQ==",
|
"integrity": "sha512-iYj4SJG/2bbhh+iIpFmG5u49DtJ4lipQ+aPakjL9OKpsGY93wM8w06gvFbEQxcMsZcCvk5th5KkIm2m8o14aWA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/endpoint": "^11.0.1",
|
"@octokit/endpoint": "^11.0.0",
|
||||||
"@octokit/request-error": "^7.0.1",
|
"@octokit/request-error": "^7.0.0",
|
||||||
"@octokit/types": "^15.0.0",
|
"@octokit/types": "^14.0.0",
|
||||||
"fast-content-type-parse": "^3.0.0",
|
"fast-content-type-parse": "^3.0.0",
|
||||||
"universal-user-agent": "^7.0.2"
|
"universal-user-agent": "^7.0.2"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": {
|
|
||||||
"version": "26.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
|
|
||||||
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA=="
|
|
||||||
},
|
|
||||||
"@octokit/types": {
|
|
||||||
"version": "15.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.0.tgz",
|
|
||||||
"integrity": "sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==",
|
|
||||||
"requires": {
|
|
||||||
"@octokit/openapi-types": "^26.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/request-error": {
|
"@octokit/request-error": {
|
||||||
"version": "7.0.1",
|
"version": "7.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.0.tgz",
|
||||||
"integrity": "sha512-CZpFwV4+1uBrxu7Cw8E5NCXDWFNf18MSY23TdxCBgjw1tXXHvTrZVsXlW8hgFTOLw8RQR1BBrMvYRtuyaijHMA==",
|
"integrity": "sha512-KRA7VTGdVyJlh0cP5Tf94hTiYVVqmt2f3I6mnimmaVz4UG3gQV/k4mDJlJv3X67iX6rmN7gSHCF8ssqeMnmhZg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@octokit/types": "^15.0.0"
|
"@octokit/types": "^14.0.0"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": {
|
|
||||||
"version": "26.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
|
|
||||||
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA=="
|
|
||||||
},
|
|
||||||
"@octokit/types": {
|
|
||||||
"version": "15.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.0.tgz",
|
|
||||||
"integrity": "sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==",
|
|
||||||
"requires": {
|
|
||||||
"@octokit/openapi-types": "^26.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/types": {
|
"@octokit/types": {
|
||||||
@@ -7197,9 +7017,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@renovatebot/pep440": {
|
"@renovatebot/pep440": {
|
||||||
"version": "4.2.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@renovatebot/pep440/-/pep440-4.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@renovatebot/pep440/-/pep440-4.2.0.tgz",
|
||||||
"integrity": "sha512-2FK1hF93Fuf1laSdfiEmJvSJPVIDHEUTz68D3Fi9s0IZrrpaEcj6pTFBTbYvsgC5du4ogrtf5re7yMMvrKNgkw=="
|
"integrity": "sha512-hT7WcjHbZdx3U9iRKuGwgm1l2wFS+FrWEdX+EQ5i+VAI6tWdcktFtdwDTNIqSwklOW1Vng55om8c4RrPHCmiIQ=="
|
||||||
},
|
},
|
||||||
"@sinclair/typebox": {
|
"@sinclair/typebox": {
|
||||||
"version": "0.34.38",
|
"version": "0.34.38",
|
||||||
@@ -7226,9 +7046,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@tybys/wasm-util": {
|
"@tybys/wasm-util": {
|
||||||
"version": "0.10.1",
|
"version": "0.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.0.tgz",
|
||||||
"integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==",
|
"integrity": "sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@@ -7316,11 +7136,11 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "24.7.0",
|
"version": "24.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz",
|
||||||
"integrity": "sha512-IbKooQVqUBrlzWTi79E8Fw78l8k1RNtlDDNWsFZs7XonuQSJ8oNYfEeclhprUldXISRMLzBpILuKgPlIxm+/Yw==",
|
"integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"undici-types": "~7.14.0"
|
"undici-types": "~7.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/node-fetch": {
|
"@types/node-fetch": {
|
||||||
@@ -7347,9 +7167,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/semver": {
|
"@types/semver": {
|
||||||
"version": "7.7.1",
|
"version": "7.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz",
|
||||||
"integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==",
|
"integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/stack-utils": {
|
"@types/stack-utils": {
|
||||||
@@ -7524,9 +7344,9 @@
|
|||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"@vercel/ncc": {
|
"@vercel/ncc": {
|
||||||
"version": "0.38.4",
|
"version": "0.38.3",
|
||||||
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.4.tgz",
|
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.3.tgz",
|
||||||
"integrity": "sha512-8LwjnlP39s08C08J5NstzriPvW1SP8Zfpp1BvC2sI35kPeZnHfxVkCwu4/+Wodgnd60UtT1n8K8zw+Mp7J9JmQ==",
|
"integrity": "sha512-rnK6hJBS6mwc+Bkab+PGPs9OiS0i/3kdTO+CkI8V0/VrW3vmz7O2Pxjw/owOlmo6PKEIxRSeZKv/kuL9itnpYA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"abort-controller": {
|
"abort-controller": {
|
||||||
@@ -7555,9 +7375,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "6.2.2",
|
"version": "6.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.0.tgz",
|
||||||
"integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",
|
"integrity": "sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ansi-styles": {
|
"ansi-styles": {
|
||||||
@@ -7904,9 +7724,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dedent": {
|
"dedent": {
|
||||||
"version": "1.7.0",
|
"version": "1.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz",
|
||||||
"integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==",
|
"integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
@@ -8437,15 +8257,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest/-/jest-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest/-/jest-30.1.2.tgz",
|
||||||
"integrity": "sha512-Ry+p2+NLk6u8Agh5yVqELfUJvRfV51hhVBRIB5yZPY7mU0DGBmOuFG5GebZbMbm86cdQNK0fhJuDX8/1YorISQ==",
|
"integrity": "sha512-iLreJmUWdANLD2UIbebrXxQqU9jIxv2ahvrBNfff55deL9DtVxm8ZJBLk/kmn0AQ+FyCTrNSlGbMdTgSasldYA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jest/core": "30.1.3",
|
"@jest/core": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"import-local": "^3.2.0",
|
"import-local": "^3.2.0",
|
||||||
"jest-cli": "30.1.3"
|
"jest-cli": "30.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-changed-files": {
|
"jest-changed-files": {
|
||||||
@@ -8460,14 +8280,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-circus": {
|
"jest-circus": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.1.2.tgz",
|
||||||
"integrity": "sha512-Yf3dnhRON2GJT4RYzM89t/EXIWNxKTpWTL9BfF3+geFetWP4XSvJjiU1vrWplOiUkmq8cHLiwuhz+XuUp9DscA==",
|
"integrity": "sha512-pyqgRv00fPbU3QBjN9I5QRd77eCWA19NA7BLgI1veFvbUIFpeDCKbnG1oyRr6q5/jPEW2zDfqZ/r6fvfE85vrA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jest/environment": "30.1.2",
|
"@jest/environment": "30.1.2",
|
||||||
"@jest/expect": "30.1.2",
|
"@jest/expect": "30.1.2",
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
@@ -8477,7 +8297,7 @@
|
|||||||
"jest-each": "30.1.0",
|
"jest-each": "30.1.0",
|
||||||
"jest-matcher-utils": "30.1.2",
|
"jest-matcher-utils": "30.1.2",
|
||||||
"jest-message-util": "30.1.0",
|
"jest-message-util": "30.1.0",
|
||||||
"jest-runtime": "30.1.3",
|
"jest-runtime": "30.1.2",
|
||||||
"jest-snapshot": "30.1.2",
|
"jest-snapshot": "30.1.2",
|
||||||
"jest-util": "30.0.5",
|
"jest-util": "30.0.5",
|
||||||
"p-limit": "^3.1.0",
|
"p-limit": "^3.1.0",
|
||||||
@@ -8488,33 +8308,33 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-cli": {
|
"jest-cli": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.1.2.tgz",
|
||||||
"integrity": "sha512-G8E2Ol3OKch1DEeIBl41NP7OiC6LBhfg25Btv+idcusmoUSpqUkbrneMqbW9lVpI/rCKb/uETidb7DNteheuAQ==",
|
"integrity": "sha512-Q7H6GGo/0TBB8Mhm3Ab7KKJHn6GeMVff+/8PVCQ7vXXahvr5sRERnNbxuVJAMiVY2JQm5roA7CHYOYlH+gzmUg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jest/core": "30.1.3",
|
"@jest/core": "30.1.2",
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"exit-x": "^0.2.2",
|
"exit-x": "^0.2.2",
|
||||||
"import-local": "^3.2.0",
|
"import-local": "^3.2.0",
|
||||||
"jest-config": "30.1.3",
|
"jest-config": "30.1.2",
|
||||||
"jest-util": "30.0.5",
|
"jest-util": "30.0.5",
|
||||||
"jest-validate": "30.1.0",
|
"jest-validate": "30.1.0",
|
||||||
"yargs": "^17.7.2"
|
"yargs": "^17.7.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-config": {
|
"jest-config": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.1.2.tgz",
|
||||||
"integrity": "sha512-M/f7gqdQEPgZNA181Myz+GXCe8jXcJsGjCMXUzRj22FIXsZOyHNte84e0exntOvdPaeh9tA0w+B8qlP2fAezfw==",
|
"integrity": "sha512-gCuBeE/cksjQ3e1a8H4YglZJuVPcnLZQK9jC70E6GbkHNQKPasnOO+r9IYdsUbAekb6c7eVRR8laGLMF06gMqg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/core": "^7.27.4",
|
"@babel/core": "^7.27.4",
|
||||||
"@jest/get-type": "30.1.0",
|
"@jest/get-type": "30.1.0",
|
||||||
"@jest/pattern": "30.0.1",
|
"@jest/pattern": "30.0.1",
|
||||||
"@jest/test-sequencer": "30.1.3",
|
"@jest/test-sequencer": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"babel-jest": "30.1.2",
|
"babel-jest": "30.1.2",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
@@ -8522,12 +8342,12 @@
|
|||||||
"deepmerge": "^4.3.1",
|
"deepmerge": "^4.3.1",
|
||||||
"glob": "^10.3.10",
|
"glob": "^10.3.10",
|
||||||
"graceful-fs": "^4.2.11",
|
"graceful-fs": "^4.2.11",
|
||||||
"jest-circus": "30.1.3",
|
"jest-circus": "30.1.2",
|
||||||
"jest-docblock": "30.0.1",
|
"jest-docblock": "30.0.1",
|
||||||
"jest-environment-node": "30.1.2",
|
"jest-environment-node": "30.1.2",
|
||||||
"jest-regex-util": "30.0.1",
|
"jest-regex-util": "30.0.1",
|
||||||
"jest-resolve": "30.1.3",
|
"jest-resolve": "30.1.0",
|
||||||
"jest-runner": "30.1.3",
|
"jest-runner": "30.1.2",
|
||||||
"jest-util": "30.0.5",
|
"jest-util": "30.0.5",
|
||||||
"jest-validate": "30.1.0",
|
"jest-validate": "30.1.0",
|
||||||
"micromatch": "^4.0.8",
|
"micromatch": "^4.0.8",
|
||||||
@@ -8669,9 +8489,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"jest-resolve": {
|
"jest-resolve": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.1.0.tgz",
|
||||||
"integrity": "sha512-DI4PtTqzw9GwELFS41sdMK32Ajp3XZQ8iygeDMWkxlRhm7uUTOFSZFVZABFuxr0jvspn8MAYy54NxZCsuCTSOw==",
|
"integrity": "sha512-hASe7D/wRtZw8Cm607NrlF7fi3HWC5wmA5jCVc2QjQAB2pTwP9eVZILGEi6OeSLNUtE1zb04sXRowsdh5CUjwA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
@@ -8685,9 +8505,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-resolve-dependencies": {
|
"jest-resolve-dependencies": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.1.2.tgz",
|
||||||
"integrity": "sha512-DNfq3WGmuRyHRHfEet+Zm3QOmVFtIarUOQHHryKPc0YL9ROfgWZxl4+aZq/VAzok2SS3gZdniP+dO4zgo59hBg==",
|
"integrity": "sha512-HJjyoaedY4wrwda+eqvgjbwFykrAnQEmhuT0bMyOV3GQIyLPcunZcjfkm77Zr11ujwl34ySdc4qYnm7SG75TjA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"jest-regex-util": "30.0.1",
|
"jest-regex-util": "30.0.1",
|
||||||
@@ -8695,14 +8515,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-runner": {
|
"jest-runner": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.1.2.tgz",
|
||||||
"integrity": "sha512-dd1ORcxQraW44Uz029TtXj85W11yvLpDuIzNOlofrC8GN+SgDlgY4BvyxJiVeuabA1t6idjNbX59jLd2oplOGQ==",
|
"integrity": "sha512-eu9AzpDY/QV+7NuMg6fZMpQ7M24cBkl5dyS1Xj7iwDPDriOmLUXR8rLojESibcIX+sCDTO4KvUeaxWCH1fbTvg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jest/console": "30.1.2",
|
"@jest/console": "30.1.2",
|
||||||
"@jest/environment": "30.1.2",
|
"@jest/environment": "30.1.2",
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/transform": "30.1.2",
|
"@jest/transform": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
@@ -8715,26 +8535,26 @@
|
|||||||
"jest-haste-map": "30.1.0",
|
"jest-haste-map": "30.1.0",
|
||||||
"jest-leak-detector": "30.1.0",
|
"jest-leak-detector": "30.1.0",
|
||||||
"jest-message-util": "30.1.0",
|
"jest-message-util": "30.1.0",
|
||||||
"jest-resolve": "30.1.3",
|
"jest-resolve": "30.1.0",
|
||||||
"jest-runtime": "30.1.3",
|
"jest-runtime": "30.1.2",
|
||||||
"jest-util": "30.0.5",
|
"jest-util": "30.0.5",
|
||||||
"jest-watcher": "30.1.3",
|
"jest-watcher": "30.1.2",
|
||||||
"jest-worker": "30.1.0",
|
"jest-worker": "30.1.0",
|
||||||
"p-limit": "^3.1.0",
|
"p-limit": "^3.1.0",
|
||||||
"source-map-support": "0.5.13"
|
"source-map-support": "0.5.13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-runtime": {
|
"jest-runtime": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.1.2.tgz",
|
||||||
"integrity": "sha512-WS8xgjuNSphdIGnleQcJ3AKE4tBKOVP+tKhCD0u+Tb2sBmsU8DxfbBpZX7//+XOz81zVs4eFpJQwBNji2Y07DA==",
|
"integrity": "sha512-zU02si+lAITgyRmVRgJn/AB4cnakq8+o7bP+5Z+N1A4r2mq40zGbmrg3UpYQWCkeim17tx8w1Tnmt6tQ6y9PGA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jest/environment": "30.1.2",
|
"@jest/environment": "30.1.2",
|
||||||
"@jest/fake-timers": "30.1.2",
|
"@jest/fake-timers": "30.1.2",
|
||||||
"@jest/globals": "30.1.2",
|
"@jest/globals": "30.1.2",
|
||||||
"@jest/source-map": "30.0.1",
|
"@jest/source-map": "30.0.1",
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/transform": "30.1.2",
|
"@jest/transform": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
@@ -8747,7 +8567,7 @@
|
|||||||
"jest-message-util": "30.1.0",
|
"jest-message-util": "30.1.0",
|
||||||
"jest-mock": "30.0.5",
|
"jest-mock": "30.0.5",
|
||||||
"jest-regex-util": "30.0.1",
|
"jest-regex-util": "30.0.1",
|
||||||
"jest-resolve": "30.1.3",
|
"jest-resolve": "30.1.0",
|
||||||
"jest-snapshot": "30.1.2",
|
"jest-snapshot": "30.1.2",
|
||||||
"jest-util": "30.0.5",
|
"jest-util": "30.0.5",
|
||||||
"slash": "^3.0.0",
|
"slash": "^3.0.0",
|
||||||
@@ -8836,12 +8656,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-watcher": {
|
"jest-watcher": {
|
||||||
"version": "30.1.3",
|
"version": "30.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.1.2.tgz",
|
||||||
"integrity": "sha512-6jQUZCP1BTL2gvG9E4YF06Ytq4yMb4If6YoQGRR6PpjtqOXSP3sKe2kqwB6SQ+H9DezOfZaSLnmka1NtGm3fCQ==",
|
"integrity": "sha512-MtoGuEgqsBM8Jkn52oEj+mXLtF94+njPlHI5ydfduZL5MHrTFr14ZG1CUX1xAbY23dbSZCCEkEPhBM3cQd12Jg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jest/test-result": "30.1.3",
|
"@jest/test-result": "30.1.2",
|
||||||
"@jest/types": "30.0.5",
|
"@jest/types": "30.0.5",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"ansi-escapes": "^4.3.2",
|
"ansi-escapes": "^4.3.2",
|
||||||
@@ -9429,9 +9249,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"strip-ansi": {
|
"strip-ansi": {
|
||||||
"version": "7.1.2",
|
"version": "7.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
|
||||||
"integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==",
|
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^6.0.1"
|
"ansi-regex": "^6.0.1"
|
||||||
@@ -9538,9 +9358,9 @@
|
|||||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||||
},
|
},
|
||||||
"ts-jest": {
|
"ts-jest": {
|
||||||
"version": "29.4.4",
|
"version": "29.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.4.tgz",
|
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.1.tgz",
|
||||||
"integrity": "sha512-ccVcRABct5ZELCT5U0+DZwkXMCcOCLi2doHRrKy1nK/s7J7bch6TzJMsrY09WxgUUIP/ITfmcDS8D2yl63rnXw==",
|
"integrity": "sha512-SaeUtjfpg9Uqu8IbeDKtdaS0g8lS6FT6OzM3ezrDfErPJPHNDo/Ey+VFGP1bQIDfagYDLyRpd7O15XpG1Es2Uw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"bs-logger": "^0.2.6",
|
"bs-logger": "^0.2.6",
|
||||||
@@ -9598,14 +9418,14 @@
|
|||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"undici": {
|
"undici": {
|
||||||
"version": "7.16.0",
|
"version": "7.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-7.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-7.15.0.tgz",
|
||||||
"integrity": "sha512-QEg3HPMll0o3t2ourKwOeUAZ159Kn9mx5pnzHRQO8+Wixmh88YdZRiIwat0iNzNNXn0yoEtXJqFpyW7eM8BV7g=="
|
"integrity": "sha512-7oZJCPvvMvTd0OlqWsIxTuItTpJBpU1tcbVl24FMn3xt3+VSunwUasmfPJRE57oNO1KsZ4PgA1xTdAX4hq8NyQ=="
|
||||||
},
|
},
|
||||||
"undici-types": {
|
"undici-types": {
|
||||||
"version": "7.14.0",
|
"version": "7.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz",
|
||||||
"integrity": "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA=="
|
"integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag=="
|
||||||
},
|
},
|
||||||
"universal-user-agent": {
|
"universal-user-agent": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.3",
|
||||||
@@ -9711,9 +9531,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-styles": {
|
"ansi-styles": {
|
||||||
"version": "6.2.3",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
|
||||||
"integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
|
"integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
20
package.json
20
package.json
@@ -27,22 +27,22 @@
|
|||||||
"@actions/glob": "^0.5.0",
|
"@actions/glob": "^0.5.0",
|
||||||
"@actions/io": "^1.1.3",
|
"@actions/io": "^1.1.3",
|
||||||
"@actions/tool-cache": "^2.0.2",
|
"@actions/tool-cache": "^2.0.2",
|
||||||
"@octokit/core": "^7.0.5",
|
"@octokit/core": "^7.0.3",
|
||||||
"@octokit/plugin-paginate-rest": "^13.1.1",
|
"@octokit/plugin-paginate-rest": "^13.1.1",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^16.1.0",
|
"@octokit/plugin-rest-endpoint-methods": "^16.0.0",
|
||||||
"@renovatebot/pep440": "^4.2.1",
|
"@renovatebot/pep440": "^4.2.0",
|
||||||
"smol-toml": "^1.4.2",
|
"smol-toml": "^1.4.2",
|
||||||
"undici": "^7.16.0"
|
"undici": "^7.15.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "2.2.4",
|
"@biomejs/biome": "2.2.2",
|
||||||
"@types/js-yaml": "^4.0.9",
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/node": "^24.7.0",
|
"@types/node": "^24.3.0",
|
||||||
"@types/semver": "^7.7.1",
|
"@types/semver": "^7.7.0",
|
||||||
"@vercel/ncc": "^0.38.4",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"jest": "^30.1.3",
|
"jest": "^30.1.1",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"ts-jest": "^29.4.4",
|
"ts-jest": "^29.4.1",
|
||||||
"typescript": "^5.9.2"
|
"typescript": "^5.9.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
9
src/cache/restore-cache.ts
vendored
9
src/cache/restore-cache.ts
vendored
@@ -8,7 +8,6 @@ import {
|
|||||||
cacheSuffix,
|
cacheSuffix,
|
||||||
pruneCache,
|
pruneCache,
|
||||||
pythonVersion as pythonVersionInput,
|
pythonVersion as pythonVersionInput,
|
||||||
restoreCache as shouldRestoreCache,
|
|
||||||
workingDirectory,
|
workingDirectory,
|
||||||
} from "../utils/inputs";
|
} from "../utils/inputs";
|
||||||
import { getArch, getPlatform } from "../utils/platforms";
|
import { getArch, getPlatform } from "../utils/platforms";
|
||||||
@@ -19,12 +18,6 @@ const CACHE_VERSION = "1";
|
|||||||
|
|
||||||
export async function restoreCache(): Promise<void> {
|
export async function restoreCache(): Promise<void> {
|
||||||
const cacheKey = await computeKeys();
|
const cacheKey = await computeKeys();
|
||||||
core.saveState(STATE_CACHE_KEY, cacheKey);
|
|
||||||
|
|
||||||
if (!shouldRestoreCache) {
|
|
||||||
core.info("restore-cache is false. Skipping restore cache step.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let matchedKey: string | undefined;
|
let matchedKey: string | undefined;
|
||||||
core.info(
|
core.info(
|
||||||
@@ -39,6 +32,8 @@ export async function restoreCache(): Promise<void> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
core.saveState(STATE_CACHE_KEY, cacheKey);
|
||||||
|
|
||||||
handleMatchResult(matchedKey, cacheKey);
|
handleMatchResult(matchedKey, cacheKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,189 +1,5 @@
|
|||||||
// AUTOGENERATED_DO_NOT_EDIT
|
// AUTOGENERATED_DO_NOT_EDIT
|
||||||
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
||||||
"aarch64-apple-darwin-0.8.20":
|
|
||||||
"a87008d013efd78d94102e5268a24990c409bfb39b80df4de32d1c97f093e7ef",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.20":
|
|
||||||
"ac33f921e0d48d14a106a6cc84b146da7a1f4a3c329c7fb0e1a8e6ff4cf541e6",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.20":
|
|
||||||
"b434851cd94e9e2083bc9a5851f1d13748771726bd2ac30027f820fc134b2104",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.20":
|
|
||||||
"60ad9b7fb846c2051e0113077b1e9510b4b1a73b9a1816a03e82406deedff08d",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.20":
|
|
||||||
"72fa919115f5a7c4557c1adb55ac77154f3fb0272b95ff0270d4eaf98bc814c2",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.20":
|
|
||||||
"87a993df182a2abb5581421d6c76b0cbccb311cfca625d8c827f2cfcf1c78fed",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.20":
|
|
||||||
"3a3c1b2370824f3129c89bf3def5b2b703813152cf0be0ec3c04dead21077cd0",
|
|
||||||
"i686-pc-windows-msvc-0.8.20":
|
|
||||||
"62fd821f330f469cce6e02eded6f63ba51a9461acc9e0e16794e05da08fe16be",
|
|
||||||
"i686-unknown-linux-gnu-0.8.20":
|
|
||||||
"a7bfa2c07183f2fd44ef4d6c910971796a980ebb3c52e9620e6b741cc6fe45c0",
|
|
||||||
"i686-unknown-linux-musl-0.8.20":
|
|
||||||
"67eec91d7ca5a8dc8d95149be52bcf459efb4caeacbacf8586f371f8192a0ec7",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.20":
|
|
||||||
"b96d6a4907ab4c26d7061e43f6993aa47c76a01af6f3cb871d9c48b7b250fbca",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.20":
|
|
||||||
"1c13fbcd13214e93300749cb14cb5c1425d6a4095f2e406a80b34ab10d269b5b",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.20":
|
|
||||||
"a14f8297bae6dc3993a9367e0fcf6061281f5f3f0da7c46a6a2a5fd47467f56c",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.20":
|
|
||||||
"8e59db8d1cb791897237982e369fea0217a12ffe3527cf6f1d30fea32d20a509",
|
|
||||||
"x86_64-apple-darwin-0.8.20":
|
|
||||||
"ec47686e5e1499b9ea53aa61181fa3f08d4113bc7628105dc299c092d4debf44",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.20":
|
|
||||||
"e2aa89b78f0a0fa7cbf9d42508c7a962bda803425d8ec3e9cf7a69fb00cf6791",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.20":
|
|
||||||
"dc67aa1a5b6b16a8cc4a5fdf5697f354fbf9e45f77a3da6d9e71db6ec213c082",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.20":
|
|
||||||
"a29e1854ee3ce1ccc5ba1d27783c4f34e99605e16c886a71446a90bad40a38c9",
|
|
||||||
"aarch64-apple-darwin-0.8.19":
|
|
||||||
"bb63d43c40a301d889a985223ee8ce540be199e98b3f27ed8477823869a0a605",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.19":
|
|
||||||
"3bfe2db4bccf95e05d2685bcbfad7e49e7cd2177a20aebe81a5e5348cbdfc0a3",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.19":
|
|
||||||
"ffd29feed13cdd30b27def8e80e64223325fbe4f7cfc4d4c906ec2531f746bde",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.19":
|
|
||||||
"87925376fa1e59de23582e1cbd81d6aabd16611e871ad085e09be2c2fa12689d",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.19":
|
|
||||||
"00d4835ba20e2e4a3bfed6fe4f6fbf4982c5a0e6a3105c7bde93fb9377e61dea",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.19":
|
|
||||||
"7a58efdb9c6e3f320759f9f074306e34f03ccfb535b306cbace92e9ad414efd5",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.19":
|
|
||||||
"c8f8a244009f3ad01b23772c936c5c5a95871a87b0add90b85a55d3913d1fae0",
|
|
||||||
"i686-pc-windows-msvc-0.8.19":
|
|
||||||
"32c7176e49f5fa1c7480b32e325a631431212904b1020427e62afef46fddddb9",
|
|
||||||
"i686-unknown-linux-gnu-0.8.19":
|
|
||||||
"94a5f944d1cba4db2e7fc6831bf9c78c291c5c1e5e079b4095e9fcdcbc15bc71",
|
|
||||||
"i686-unknown-linux-musl-0.8.19":
|
|
||||||
"491b282b50e078fac4ced99e69359ac6cecc3f43f585f812d52515e6b081261a",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.19":
|
|
||||||
"3c7c7ecb8d5b61acee3914984f1025af1707a987a51285aba44d968420139f2c",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.19":
|
|
||||||
"711e39050b528b0860d868c98057eebbd181befbe6a6f24e0f6fd571eab5520f",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.19":
|
|
||||||
"5dd8e1ec8bf8722e08d9853953ed0ef12318d0f5e82d06a8dd98815666f99186",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.19":
|
|
||||||
"5b3af341a39364f147d7286e40f55dd92ac8a142110e29ff1b4825afb96e1b27",
|
|
||||||
"x86_64-apple-darwin-0.8.19":
|
|
||||||
"b5f91770e55761b32c9618757ef23ded6671bb9ca0ddf5737eea60dddd493fe9",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.19":
|
|
||||||
"945b07182de7de279ba5ae5c746785dfd55cf9b17481d3535b0b03efd6e64567",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.19":
|
|
||||||
"cfc674e9b83d1becfca4d70386e5f7ace4c1fa8c47c518abeebb8ef2b30da4b8",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.19":
|
|
||||||
"6a37f712ae90c7b8cf364fe751144d7acc2479d6b336378111e74cc7fb14fa7b",
|
|
||||||
"aarch64-apple-darwin-0.8.18":
|
|
||||||
"ce660d5cdf0ed83d1a045bbe9792b93d06725b8c9e9b88960a503d42192be445",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.18":
|
|
||||||
"f49a25f1a89c76d750e2179f40f9302310504f40c89283ca4522b13363c7bdc9",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.18":
|
|
||||||
"164363f88618f4e8e175faf9fcf5172321c221fce93d64cec8e9ab3339511dad",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.18":
|
|
||||||
"1d7e3bfc3b5ec9d747bc3f42a6a3362249f30560966512b172e8967b11046144",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.18":
|
|
||||||
"3c356156c074eb21f731116501992aa6ad6079231f37c75ea7a15c22d1c41cf6",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.18":
|
|
||||||
"15e12cfba5fb7b20b4eb45887b78fe157d29bd28b38bbc03a19224ad6766a641",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.18":
|
|
||||||
"008cd8225fd8b6b4bb3293d1d7520023f8e432141f256320c034dc5a1a15c7ab",
|
|
||||||
"i686-pc-windows-msvc-0.8.18":
|
|
||||||
"55f0d91f766ca141e166fe74b8a81da667b5d703ca1b5f2671677f0b2bfdd901",
|
|
||||||
"i686-unknown-linux-gnu-0.8.18":
|
|
||||||
"3b42e3b58650cde6fa0d03dfdb8528573cf679ac9809191b3976913cdec13b6f",
|
|
||||||
"i686-unknown-linux-musl-0.8.18":
|
|
||||||
"e2dae897955f666eb2f83af12d9a566bc42c26c17413d1480124cef6b30dc0fd",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.18":
|
|
||||||
"88cd4ad593e6dd915c69dee02b56cbf1b6d16cb7c8129a5ad1fa8ac02bd755ab",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.18":
|
|
||||||
"50b418096f4d82df5d22cb23e650754ca92bca7be657113dcd53631f0e0cec77",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.18":
|
|
||||||
"b696be9a2ef0808f230227477b8e23acedba0b90933978c760ea2a748e8c30fa",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.18":
|
|
||||||
"3b106572a8574f58e3df591cdaef915bdb38fdff11e5de0ec53bfe1b857267e8",
|
|
||||||
"x86_64-apple-darwin-0.8.18":
|
|
||||||
"a08c3a6c50f49e68216ac133bd0aaae952db2cd8d19a3cd5be782f8f4becf135",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.18":
|
|
||||||
"3e42d63c8323839d50b11959ec558ad3954a2c16aab1ad52c0521bd055442a3f",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.18":
|
|
||||||
"59ad1a1809fa47019b86cf339fff161cb7b00ad3d8d42354eea57d0d91aeb44c",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.18":
|
|
||||||
"3a93bc3597ab73c9c31d8ad709b4d0b788961cbb508c5a4dcf21636fd7e3e8ce",
|
|
||||||
"aarch64-apple-darwin-0.8.17":
|
|
||||||
"e4d4859d7726298daa4c12e114f269ff282b2cfc2b415dc0b2ca44ae2dbd358e",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.17":
|
|
||||||
"2396749de576e45a40efa35fe94b3f953c3224c21f75c05772593e085d78e77d",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.17":
|
|
||||||
"9a20d65b110770bbaa2ee89ed76eb963d8c6a480b9ebef584ea9df2ae85b4f0f",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.17":
|
|
||||||
"bd141b7e263935d14f5725f2a5c1c942fd89642e37683cb904f1984ce7e365f4",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.17":
|
|
||||||
"9d4ffb6751d65a52f8daf3fd88e331ab989d490a6e336d6a96cac668fce17a65",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.17":
|
|
||||||
"014afffa5621986aefbe8a6d71597eb45b8cd3d4e94f825f34ec49ba4cd0c382",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.17":
|
|
||||||
"fb976e7482c4550f38c51c5c23b9dae0322c3173f56436bf9a81252e4b74fcfb",
|
|
||||||
"i686-pc-windows-msvc-0.8.17":
|
|
||||||
"f528893452ca512b555b63267292977d237bd6fbdd967c9be6941a65ebf256f4",
|
|
||||||
"i686-unknown-linux-gnu-0.8.17":
|
|
||||||
"d52438a1588ea7c2332dc4aa8c93eedae344fc435c95491037237c7b4b36eae4",
|
|
||||||
"i686-unknown-linux-musl-0.8.17":
|
|
||||||
"9e10f4c57034e6e98dea48b0f4250a7eff983f1b2947d99ed6605a4eb0ec8d22",
|
|
||||||
"loongarch64-unknown-linux-gnu-0.8.17":
|
|
||||||
"1d02e45dbbcbbaa867afe59fd62b294cba47abf1a76e151e19db03b5dbf1c9c8",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.17":
|
|
||||||
"6f448735dfd72e2d5c3e3bb541b388c58cdfcf3a562128d5ac1a5f2be47f95d6",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.17":
|
|
||||||
"e4b28cab21eb990e2bea768bc9f43b61e4fd554552cea8868c855027decef69d",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.17":
|
|
||||||
"f653caa34479d405d290b825a2fe782bb26c55a7bfaa870911b4e18792312d45",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.17":
|
|
||||||
"8fae8182704b4b11316c87d897c3e64f2d3f55ac8c58c482d9bbef9ad611f90c",
|
|
||||||
"x86_64-apple-darwin-0.8.17":
|
|
||||||
"31ed353cfd8e6c962e7c60617bd8a9d6b97b704c1ecb5b5eceaff8c6121b54ac",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.17":
|
|
||||||
"0d051779fbcb173b183efeae1c3e96148764fd82709bbbf0966df3efe48b67c5",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.17":
|
|
||||||
"920cbcaad514cc185634f6f0dcd71df5e8f4ee4456d440a22e0f8c0f142a8203",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.17":
|
|
||||||
"4057052999a210fe78d93599d2165da9e24c8bbb23370cdd26b66a98ab479203",
|
|
||||||
"aarch64-apple-darwin-0.8.16":
|
|
||||||
"87e4b51b735e8445f6c445c7b4c0398273e40d34cd192bad8158736653600cd6",
|
|
||||||
"aarch64-pc-windows-msvc-0.8.16":
|
|
||||||
"392acca957d8d7cccafbb68ce6c4ba29b2ff00c8b0d4744a2136918d3a7bf765",
|
|
||||||
"aarch64-unknown-linux-gnu-0.8.16":
|
|
||||||
"22a3cbaf87776b73c2657ba5d63f8565c1235b65eaf57dffda66061f7a09913b",
|
|
||||||
"aarch64-unknown-linux-musl-0.8.16":
|
|
||||||
"6bd6a11c384f07353c3c7eec9bde094f89b92a12dc09caea9df40c424afebea5",
|
|
||||||
"arm-unknown-linux-musleabihf-0.8.16":
|
|
||||||
"53c31a6559dc4fb22ce8c56640b00a8404b7e4d55f68b6bb3aa188864e2c3084",
|
|
||||||
"armv7-unknown-linux-gnueabihf-0.8.16":
|
|
||||||
"ada6f393d5e5d9cba5445832ba61e8222859e915e5d77a37f5dd35979f3f18e4",
|
|
||||||
"armv7-unknown-linux-musleabihf-0.8.16":
|
|
||||||
"55690f70f9c61963c0069558e205acda9ff0604a44028226b9a0ec3b847c9125",
|
|
||||||
"i686-pc-windows-msvc-0.8.16":
|
|
||||||
"1e727b8af6c0781bc6eb9a2c34e7ee704070b7a2f122544443418e8be13019ee",
|
|
||||||
"i686-unknown-linux-gnu-0.8.16":
|
|
||||||
"4eaf39134663ef184f684be6f6aa83e971fb36ef7d1c67a5f2196268b61c0579",
|
|
||||||
"i686-unknown-linux-musl-0.8.16":
|
|
||||||
"a179ceba9f2fcca7b46a86b12715e28fb3429ff8193ae839700d534e35e95a45",
|
|
||||||
"loongarch64-unknown-linux-gnu-0.8.16":
|
|
||||||
"600a8be6d2621d654b6665d9a8df9370f4af9c0b6ceb851d1ae0d4b895e8e546",
|
|
||||||
"powerpc64-unknown-linux-gnu-0.8.16":
|
|
||||||
"c86008ef8a3e3730b0e58a168542331960c90a3b043e3853c1941457748595f3",
|
|
||||||
"powerpc64le-unknown-linux-gnu-0.8.16":
|
|
||||||
"91645092447a14c23b47d0f434a787a9555b29e061607d9e60d2d556b831f5aa",
|
|
||||||
"riscv64gc-unknown-linux-gnu-0.8.16":
|
|
||||||
"dbaeff3f0baad73c264c35abd937a231fb6b9d1201b6763d82e39e7516358115",
|
|
||||||
"s390x-unknown-linux-gnu-0.8.16":
|
|
||||||
"e29c330a8956c13acb0f2af7aa650dd5d9ebba6aefdceaea77f689953d140780",
|
|
||||||
"x86_64-apple-darwin-0.8.16":
|
|
||||||
"07491a998fd741090501df9bbfe538f85568901a3a66c9e0368636509158727a",
|
|
||||||
"x86_64-pc-windows-msvc-0.8.16":
|
|
||||||
"97fb93678eca3b4f731ea3879ae2e78787976e03f38c9c6fb744ab28bc3aec1b",
|
|
||||||
"x86_64-unknown-linux-gnu-0.8.16":
|
|
||||||
"fc94e50e8ef93a97d723b83faa42888e7710c4443a5b8a1af3aac2cda5390f3a",
|
|
||||||
"x86_64-unknown-linux-musl-0.8.16":
|
|
||||||
"ee220f112b91b23f641d169ba7a3652c6ab7104e7c666d26104ebd6a2f76be43",
|
|
||||||
"aarch64-apple-darwin-0.8.15":
|
"aarch64-apple-darwin-0.8.15":
|
||||||
"103367962c5cb00bf7370d84cbaa3fec5a9807be9cc833ea9d8eea400c119fa2",
|
"103367962c5cb00bf7370d84cbaa3fec5a9807be9cc833ea9d8eea400c119fa2",
|
||||||
"aarch64-pc-windows-msvc-0.8.15":
|
"aarch64-pc-windows-msvc-0.8.15":
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { promises as fs } from "node:fs";
|
|||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import * as tc from "@actions/tool-cache";
|
import * as tc from "@actions/tool-cache";
|
||||||
import type { Endpoints } from "@octokit/types";
|
|
||||||
import * as pep440 from "@renovatebot/pep440";
|
import * as pep440 from "@renovatebot/pep440";
|
||||||
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
||||||
import { Octokit } from "../utils/octokit";
|
import { Octokit } from "../utils/octokit";
|
||||||
@@ -13,9 +12,6 @@ import {
|
|||||||
getLatestKnownVersion as getLatestVersionInManifest,
|
getLatestKnownVersion as getLatestVersionInManifest,
|
||||||
} from "./version-manifest";
|
} from "./version-manifest";
|
||||||
|
|
||||||
type Release =
|
|
||||||
Endpoints["GET /repos/{owner}/{repo}/releases"]["response"]["data"][number];
|
|
||||||
|
|
||||||
export function tryGetFromToolCache(
|
export function tryGetFromToolCache(
|
||||||
arch: Architecture,
|
arch: Architecture,
|
||||||
version: string,
|
version: string,
|
||||||
@@ -32,6 +28,7 @@ export function tryGetFromToolCache(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function downloadVersionFromGithub(
|
export async function downloadVersionFromGithub(
|
||||||
|
serverUrl: string,
|
||||||
platform: Platform,
|
platform: Platform,
|
||||||
arch: Architecture,
|
arch: Architecture,
|
||||||
version: string,
|
version: string,
|
||||||
@@ -40,7 +37,7 @@ export async function downloadVersionFromGithub(
|
|||||||
): Promise<{ version: string; cachedToolDir: string }> {
|
): Promise<{ version: string; cachedToolDir: string }> {
|
||||||
const artifact = `uv-${arch}-${platform}`;
|
const artifact = `uv-${arch}-${platform}`;
|
||||||
const extension = getExtension(platform);
|
const extension = getExtension(platform);
|
||||||
const downloadUrl = `https://github.com/${OWNER}/${REPO}/releases/download/${version}/${artifact}${extension}`;
|
const downloadUrl = `${serverUrl}/${OWNER}/${REPO}/releases/download/${version}/${artifact}${extension}`;
|
||||||
return await downloadVersion(
|
return await downloadVersion(
|
||||||
downloadUrl,
|
downloadUrl,
|
||||||
artifact,
|
artifact,
|
||||||
@@ -71,6 +68,7 @@ export async function downloadVersionFromManifest(
|
|||||||
`manifest-file does not contain version ${version}, arch ${arch}, platform ${platform}. Falling back to GitHub releases.`,
|
`manifest-file does not contain version ${version}, arch ${arch}, platform ${platform}. Falling back to GitHub releases.`,
|
||||||
);
|
);
|
||||||
return await downloadVersionFromGithub(
|
return await downloadVersionFromGithub(
|
||||||
|
"https://github.com",
|
||||||
platform,
|
platform,
|
||||||
arch,
|
arch,
|
||||||
version,
|
version,
|
||||||
@@ -137,29 +135,19 @@ export async function resolveVersion(
|
|||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
core.debug(`Resolving version: ${versionInput}`);
|
core.debug(`Resolving version: ${versionInput}`);
|
||||||
let version: string;
|
let version: string;
|
||||||
const isSimpleMinimumVersionSpecifier =
|
|
||||||
versionInput.includes(">") && !versionInput.includes(",");
|
|
||||||
if (isSimpleMinimumVersionSpecifier) {
|
|
||||||
core.info("Found minimum version specifier, using latest version");
|
|
||||||
}
|
|
||||||
if (manifestFile) {
|
if (manifestFile) {
|
||||||
version =
|
version =
|
||||||
versionInput === "latest" || isSimpleMinimumVersionSpecifier
|
versionInput === "latest"
|
||||||
? await getLatestVersionInManifest(manifestFile)
|
? await getLatestVersionInManifest(manifestFile)
|
||||||
: versionInput;
|
: versionInput;
|
||||||
} else {
|
} else {
|
||||||
version =
|
version =
|
||||||
versionInput === "latest" || isSimpleMinimumVersionSpecifier
|
versionInput === "latest"
|
||||||
? await getLatestVersion(githubToken)
|
? await getLatestVersion(githubToken)
|
||||||
: versionInput;
|
: versionInput;
|
||||||
}
|
}
|
||||||
if (tc.isExplicitVersion(version)) {
|
if (tc.isExplicitVersion(version)) {
|
||||||
core.debug(`Version ${version} is an explicit version.`);
|
core.debug(`Version ${version} is an explicit version.`);
|
||||||
if (isSimpleMinimumVersionSpecifier) {
|
|
||||||
if (!pep440.satisfies(version, versionInput)) {
|
|
||||||
throw new Error(`No version found for ${versionInput}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
const availableVersions = await getAvailableVersions(githubToken);
|
const availableVersions = await getAvailableVersions(githubToken);
|
||||||
@@ -190,14 +178,13 @@ async function getAvailableVersions(githubToken: string): Promise<string[]> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getReleaseTagNames(octokit: Octokit): Promise<string[]> {
|
async function getReleaseTagNames(
|
||||||
const response: Release[] = await octokit.paginate(
|
octokit: InstanceType<typeof Octokit>,
|
||||||
octokit.rest.repos.listReleases,
|
): Promise<string[]> {
|
||||||
{
|
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
|
||||||
owner: OWNER,
|
owner: OWNER,
|
||||||
repo: REPO,
|
repo: REPO,
|
||||||
},
|
});
|
||||||
);
|
|
||||||
const releaseTagNames = response.map((release) => release.tag_name);
|
const releaseTagNames = response.map((release) => release.tag_name);
|
||||||
if (releaseTagNames.length === 0) {
|
if (releaseTagNames.length === 0) {
|
||||||
throw Error(
|
throw Error(
|
||||||
@@ -238,7 +225,7 @@ async function getLatestVersion(githubToken: string) {
|
|||||||
return latestRelease.tag_name;
|
return latestRelease.tag_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getLatestRelease(octokit: Octokit) {
|
async function getLatestRelease(octokit: InstanceType<typeof Octokit>) {
|
||||||
const { data: latestRelease } = await octokit.rest.repos.getLatestRelease({
|
const { data: latestRelease } = await octokit.rest.repos.getLatestRelease({
|
||||||
owner: OWNER,
|
owner: OWNER,
|
||||||
repo: REPO,
|
repo: REPO,
|
||||||
|
|||||||
@@ -2,28 +2,21 @@ import * as fs from "node:fs";
|
|||||||
import * as cache from "@actions/cache";
|
import * as cache from "@actions/cache";
|
||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import * as exec from "@actions/exec";
|
import * as exec from "@actions/exec";
|
||||||
import * as pep440 from "@renovatebot/pep440";
|
|
||||||
import {
|
import {
|
||||||
STATE_CACHE_KEY,
|
STATE_CACHE_KEY,
|
||||||
STATE_CACHE_MATCHED_KEY,
|
STATE_CACHE_MATCHED_KEY,
|
||||||
} from "./cache/restore-cache";
|
} from "./cache/restore-cache";
|
||||||
import { STATE_UV_PATH, STATE_UV_VERSION } from "./utils/constants";
|
|
||||||
import {
|
import {
|
||||||
cacheLocalPath,
|
cacheLocalPath,
|
||||||
enableCache,
|
enableCache,
|
||||||
ignoreNothingToCache,
|
ignoreNothingToCache,
|
||||||
pruneCache as shouldPruneCache,
|
pruneCache as shouldPruneCache,
|
||||||
saveCache as shouldSaveCache,
|
|
||||||
} from "./utils/inputs";
|
} from "./utils/inputs";
|
||||||
|
|
||||||
export async function run(): Promise<void> {
|
export async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
if (enableCache) {
|
if (enableCache) {
|
||||||
if (shouldSaveCache) {
|
await saveCache();
|
||||||
await saveCache();
|
|
||||||
} else {
|
|
||||||
core.info("save-cache is false. Skipping save cache step.");
|
|
||||||
}
|
|
||||||
// node will stay alive if any promises are not resolved,
|
// node will stay alive if any promises are not resolved,
|
||||||
// which is a possibility if HTTP requests are dangling
|
// which is a possibility if HTTP requests are dangling
|
||||||
// due to retries or timeouts. We know that if we got here
|
// due to retries or timeouts. We know that if we got here
|
||||||
@@ -54,22 +47,14 @@ async function saveCache(): Promise<void> {
|
|||||||
await pruneCache();
|
await pruneCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
let actualCachePath = cacheLocalPath;
|
core.info(`Saving cache path: ${cacheLocalPath}`);
|
||||||
if (process.env.UV_CACHE_DIR && process.env.UV_CACHE_DIR !== cacheLocalPath) {
|
if (!fs.existsSync(cacheLocalPath) && !ignoreNothingToCache) {
|
||||||
core.warning(
|
|
||||||
`The environment variable UV_CACHE_DIR has been changed to "${process.env.UV_CACHE_DIR}", by an action or step running after astral-sh/setup-uv. This can lead to unexpected behavior. If you expected this to happen set the cache-local-path input to "${process.env.UV_CACHE_DIR}" instead of "${cacheLocalPath}".`,
|
|
||||||
);
|
|
||||||
actualCachePath = process.env.UV_CACHE_DIR;
|
|
||||||
}
|
|
||||||
|
|
||||||
core.info(`Saving cache path: ${actualCachePath}`);
|
|
||||||
if (!fs.existsSync(actualCachePath) && !ignoreNothingToCache) {
|
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Cache path ${actualCachePath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`,
|
`Cache path ${cacheLocalPath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await cache.saveCache([actualCachePath], cacheKey);
|
await cache.saveCache([cacheLocalPath], cacheKey);
|
||||||
core.info(`cache saved with the key: ${cacheKey}`);
|
core.info(`cache saved with the key: ${cacheKey}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (
|
if (
|
||||||
@@ -87,19 +72,13 @@ async function saveCache(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function pruneCache(): Promise<void> {
|
async function pruneCache(): Promise<void> {
|
||||||
const forceSupported = pep440.gte(core.getState(STATE_UV_VERSION), "0.8.24");
|
|
||||||
|
|
||||||
const options: exec.ExecOptions = {
|
const options: exec.ExecOptions = {
|
||||||
silent: false,
|
silent: !core.isDebug(),
|
||||||
};
|
};
|
||||||
const execArgs = ["cache", "prune", "--ci"];
|
const execArgs = ["cache", "prune", "--ci"];
|
||||||
if (forceSupported) {
|
|
||||||
execArgs.push("--force");
|
|
||||||
}
|
|
||||||
|
|
||||||
core.info("Pruning cache...");
|
core.info("Pruning cache...");
|
||||||
const uvPath = core.getState(STATE_UV_PATH);
|
await exec.exec("uv", execArgs, options);
|
||||||
await exec.exec(uvPath, execArgs, options);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ import * as core from "@actions/core";
|
|||||||
import * as exec from "@actions/exec";
|
import * as exec from "@actions/exec";
|
||||||
import { restoreCache } from "./cache/restore-cache";
|
import { restoreCache } from "./cache/restore-cache";
|
||||||
import {
|
import {
|
||||||
|
downloadVersionFromGithub,
|
||||||
downloadVersionFromManifest,
|
downloadVersionFromManifest,
|
||||||
resolveVersion,
|
resolveVersion,
|
||||||
tryGetFromToolCache,
|
tryGetFromToolCache,
|
||||||
} from "./download/download-version";
|
} from "./download/download-version";
|
||||||
import { getConfigValueFromTomlFile } from "./utils/config-file";
|
|
||||||
import { STATE_UV_PATH, STATE_UV_VERSION } from "./utils/constants";
|
|
||||||
import {
|
import {
|
||||||
activateEnvironment as activateEnvironmentInput,
|
activateEnvironment as activateEnvironmentInput,
|
||||||
addProblemMatchers,
|
addProblemMatchers,
|
||||||
@@ -20,6 +19,7 @@ import {
|
|||||||
ignoreEmptyWorkdir,
|
ignoreEmptyWorkdir,
|
||||||
manifestFile,
|
manifestFile,
|
||||||
pythonVersion,
|
pythonVersion,
|
||||||
|
serverUrl,
|
||||||
toolBinDir,
|
toolBinDir,
|
||||||
toolDir,
|
toolDir,
|
||||||
versionFile as versionFileInput,
|
versionFile as versionFileInput,
|
||||||
@@ -54,10 +54,9 @@ async function run(): Promise<void> {
|
|||||||
setupPython();
|
setupPython();
|
||||||
await activateEnvironment();
|
await activateEnvironment();
|
||||||
addMatchers();
|
addMatchers();
|
||||||
setCacheDir();
|
setCacheDir(cacheLocalPath);
|
||||||
|
|
||||||
core.setOutput("uv-version", setupResult.version);
|
core.setOutput("uv-version", setupResult.version);
|
||||||
core.saveState(STATE_UV_VERSION, setupResult.version);
|
|
||||||
core.info(`Successfully installed uv version ${setupResult.version}`);
|
core.info(`Successfully installed uv version ${setupResult.version}`);
|
||||||
|
|
||||||
if (enableCache) {
|
if (enableCache) {
|
||||||
@@ -99,14 +98,29 @@ async function setupUv(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadVersionResult = await downloadVersionFromManifest(
|
let downloadVersionResult: { version: string; cachedToolDir: string };
|
||||||
manifestFile,
|
if (serverUrl !== "https://github.com") {
|
||||||
platform,
|
core.warning(
|
||||||
arch,
|
"The input server-url is deprecated. Please use manifest-file instead.",
|
||||||
resolvedVersion,
|
);
|
||||||
checkSum,
|
downloadVersionResult = await downloadVersionFromGithub(
|
||||||
githubToken,
|
serverUrl,
|
||||||
);
|
platform,
|
||||||
|
arch,
|
||||||
|
resolvedVersion,
|
||||||
|
checkSum,
|
||||||
|
githubToken,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
downloadVersionResult = await downloadVersionFromManifest(
|
||||||
|
manifestFile,
|
||||||
|
platform,
|
||||||
|
arch,
|
||||||
|
resolvedVersion,
|
||||||
|
checkSum,
|
||||||
|
githubToken,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
uvDir: downloadVersionResult.cachedToolDir,
|
uvDir: downloadVersionResult.cachedToolDir,
|
||||||
@@ -149,31 +163,18 @@ async function determineVersion(
|
|||||||
|
|
||||||
function addUvToPathAndOutput(cachedPath: string): void {
|
function addUvToPathAndOutput(cachedPath: string): void {
|
||||||
core.setOutput("uv-path", `${cachedPath}${path.sep}uv`);
|
core.setOutput("uv-path", `${cachedPath}${path.sep}uv`);
|
||||||
core.saveState(STATE_UV_PATH, `${cachedPath}${path.sep}uv`);
|
|
||||||
core.setOutput("uvx-path", `${cachedPath}${path.sep}uvx`);
|
core.setOutput("uvx-path", `${cachedPath}${path.sep}uvx`);
|
||||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
core.addPath(cachedPath);
|
||||||
core.info("UV_NO_MODIFY_PATH is set, not modifying PATH");
|
core.info(`Added ${cachedPath} to the path`);
|
||||||
} else {
|
|
||||||
core.addPath(cachedPath);
|
|
||||||
core.info(`Added ${cachedPath} to the path`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function addToolBinToPath(): void {
|
function addToolBinToPath(): void {
|
||||||
if (toolBinDir !== undefined) {
|
if (toolBinDir !== undefined) {
|
||||||
core.exportVariable("UV_TOOL_BIN_DIR", toolBinDir);
|
core.exportVariable("UV_TOOL_BIN_DIR", toolBinDir);
|
||||||
core.info(`Set UV_TOOL_BIN_DIR to ${toolBinDir}`);
|
core.info(`Set UV_TOOL_BIN_DIR to ${toolBinDir}`);
|
||||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
core.addPath(toolBinDir);
|
||||||
core.info(`UV_NO_MODIFY_PATH is set, not adding ${toolBinDir} to path`);
|
core.info(`Added ${toolBinDir} to the path`);
|
||||||
} else {
|
|
||||||
core.addPath(toolBinDir);
|
|
||||||
core.info(`Added ${toolBinDir} to the path`);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
|
||||||
core.info("UV_NO_MODIFY_PATH is set, not adding user local bin to path");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (process.env.XDG_BIN_HOME !== undefined) {
|
if (process.env.XDG_BIN_HOME !== undefined) {
|
||||||
core.addPath(process.env.XDG_BIN_HOME);
|
core.addPath(process.env.XDG_BIN_HOME);
|
||||||
core.info(`Added ${process.env.XDG_BIN_HOME} to the path`);
|
core.info(`Added ${process.env.XDG_BIN_HOME} to the path`);
|
||||||
@@ -203,11 +204,6 @@ function setupPython(): void {
|
|||||||
|
|
||||||
async function activateEnvironment(): Promise<void> {
|
async function activateEnvironment(): Promise<void> {
|
||||||
if (activateEnvironmentInput) {
|
if (activateEnvironmentInput) {
|
||||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
|
||||||
throw new Error(
|
|
||||||
"UV_NO_MODIFY_PATH and activate-environment cannot be used together.",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
const execArgs = ["venv", ".venv", "--directory", workingDirectory];
|
const execArgs = ["venv", ".venv", "--directory", workingDirectory];
|
||||||
|
|
||||||
core.info("Activating python venv...");
|
core.info("Activating python venv...");
|
||||||
@@ -225,18 +221,9 @@ async function activateEnvironment(): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setCacheDir(): void {
|
function setCacheDir(cacheLocalPath: string): void {
|
||||||
if (enableCache) {
|
core.exportVariable("UV_CACHE_DIR", cacheLocalPath);
|
||||||
const cacheDirFromConfig = getConfigValueFromTomlFile("", "cache-dir");
|
core.info(`Set UV_CACHE_DIR to ${cacheLocalPath}`);
|
||||||
if (cacheDirFromConfig !== undefined) {
|
|
||||||
core.info(
|
|
||||||
"Using cache-dir from uv config file, not modifying UV_CACHE_DIR",
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
core.exportVariable("UV_CACHE_DIR", cacheLocalPath);
|
|
||||||
core.info(`Set UV_CACHE_DIR to ${cacheLocalPath}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function addMatchers(): void {
|
function addMatchers(): void {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import type { Endpoints } from "@octokit/types";
|
|
||||||
import * as semver from "semver";
|
import * as semver from "semver";
|
||||||
import { updateChecksums } from "./download/checksum/update-known-checksums";
|
import { updateChecksums } from "./download/checksum/update-known-checksums";
|
||||||
import {
|
import {
|
||||||
@@ -9,9 +8,6 @@ import {
|
|||||||
import { OWNER, REPO } from "./utils/constants";
|
import { OWNER, REPO } from "./utils/constants";
|
||||||
import { Octokit } from "./utils/octokit";
|
import { Octokit } from "./utils/octokit";
|
||||||
|
|
||||||
type Release =
|
|
||||||
Endpoints["GET /repos/{owner}/{repo}/releases"]["response"]["data"][number];
|
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
const checksumFilePath = process.argv.slice(2)[0];
|
const checksumFilePath = process.argv.slice(2)[0];
|
||||||
const versionsManifestFile = process.argv.slice(2)[1];
|
const versionsManifestFile = process.argv.slice(2)[1];
|
||||||
@@ -35,13 +31,10 @@ async function run(): Promise<void> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const releases: Release[] = await octokit.paginate(
|
const releases = await octokit.paginate(octokit.rest.repos.listReleases, {
|
||||||
octokit.rest.repos.listReleases,
|
owner: OWNER,
|
||||||
{
|
repo: REPO,
|
||||||
owner: OWNER,
|
});
|
||||||
repo: REPO,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
const checksumDownloadUrls: string[] = releases.flatMap((release) =>
|
const checksumDownloadUrls: string[] = releases.flatMap((release) =>
|
||||||
release.assets
|
release.assets
|
||||||
.filter((asset) => asset.name.endsWith(".sha256"))
|
.filter((asset) => asset.name.endsWith(".sha256"))
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
import fs from "node:fs";
|
|
||||||
import * as toml from "smol-toml";
|
|
||||||
|
|
||||||
export function getConfigValueFromTomlFile(
|
|
||||||
filePath: string,
|
|
||||||
key: string,
|
|
||||||
): string | undefined {
|
|
||||||
if (!fs.existsSync(filePath) || !filePath.endsWith(".toml")) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
const fileContent = fs.readFileSync(filePath, "utf-8");
|
|
||||||
|
|
||||||
if (filePath.endsWith("pyproject.toml")) {
|
|
||||||
const tomlContent = toml.parse(fileContent) as {
|
|
||||||
tool?: { uv?: Record<string, string | undefined> };
|
|
||||||
};
|
|
||||||
return tomlContent?.tool?.uv?.[key];
|
|
||||||
}
|
|
||||||
const tomlContent = toml.parse(fileContent) as Record<
|
|
||||||
string,
|
|
||||||
string | undefined
|
|
||||||
>;
|
|
||||||
return tomlContent[key];
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
export const REPO = "uv";
|
export const REPO = "uv";
|
||||||
export const OWNER = "astral-sh";
|
export const OWNER = "astral-sh";
|
||||||
export const TOOL_CACHE_NAME = "uv";
|
export const TOOL_CACHE_NAME = "uv";
|
||||||
export const STATE_UV_PATH = "uv-path";
|
|
||||||
export const STATE_UV_VERSION = "uv-version";
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import { getConfigValueFromTomlFile } from "./config-file";
|
|
||||||
|
|
||||||
export const workingDirectory = core.getInput("working-directory");
|
export const workingDirectory = core.getInput("working-directory");
|
||||||
export const version = core.getInput("version");
|
export const version = core.getInput("version");
|
||||||
@@ -9,8 +8,6 @@ export const pythonVersion = core.getInput("python-version");
|
|||||||
export const activateEnvironment = core.getBooleanInput("activate-environment");
|
export const activateEnvironment = core.getBooleanInput("activate-environment");
|
||||||
export const checkSum = core.getInput("checksum");
|
export const checkSum = core.getInput("checksum");
|
||||||
export const enableCache = getEnableCache();
|
export const enableCache = getEnableCache();
|
||||||
export const restoreCache = core.getInput("restore-cache") === "true";
|
|
||||||
export const saveCache = core.getInput("save-cache") === "true";
|
|
||||||
export const cacheSuffix = core.getInput("cache-suffix") || "";
|
export const cacheSuffix = core.getInput("cache-suffix") || "";
|
||||||
export const cacheLocalPath = getCacheLocalPath();
|
export const cacheLocalPath = getCacheLocalPath();
|
||||||
export const cacheDependencyGlob = getCacheDependencyGlob();
|
export const cacheDependencyGlob = getCacheDependencyGlob();
|
||||||
@@ -21,6 +18,7 @@ export const ignoreEmptyWorkdir =
|
|||||||
core.getInput("ignore-empty-workdir") === "true";
|
core.getInput("ignore-empty-workdir") === "true";
|
||||||
export const toolBinDir = getToolBinDir();
|
export const toolBinDir = getToolBinDir();
|
||||||
export const toolDir = getToolDir();
|
export const toolDir = getToolDir();
|
||||||
|
export const serverUrl = core.getInput("server-url");
|
||||||
export const githubToken = core.getInput("github-token");
|
export const githubToken = core.getInput("github-token");
|
||||||
export const manifestFile = getManifestFile();
|
export const manifestFile = getManifestFile();
|
||||||
export const addProblemMatchers =
|
export const addProblemMatchers =
|
||||||
@@ -83,14 +81,6 @@ function getCacheLocalPath(): string {
|
|||||||
const tildeExpanded = expandTilde(cacheLocalPathInput);
|
const tildeExpanded = expandTilde(cacheLocalPathInput);
|
||||||
return resolveRelativePath(tildeExpanded);
|
return resolveRelativePath(tildeExpanded);
|
||||||
}
|
}
|
||||||
const cacheDirFromConfig = getCacheDirFromConfig();
|
|
||||||
if (cacheDirFromConfig !== undefined) {
|
|
||||||
return cacheDirFromConfig;
|
|
||||||
}
|
|
||||||
if (process.env.UV_CACHE_DIR !== undefined) {
|
|
||||||
core.info(`UV_CACHE_DIR is already set to ${process.env.UV_CACHE_DIR}`);
|
|
||||||
return process.env.UV_CACHE_DIR;
|
|
||||||
}
|
|
||||||
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
|
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
|
||||||
if (process.env.RUNNER_TEMP !== undefined) {
|
if (process.env.RUNNER_TEMP !== undefined) {
|
||||||
return `${process.env.RUNNER_TEMP}${path.sep}setup-uv-cache`;
|
return `${process.env.RUNNER_TEMP}${path.sep}setup-uv-cache`;
|
||||||
@@ -105,24 +95,6 @@ function getCacheLocalPath(): string {
|
|||||||
return `${process.env.HOME}${path.sep}.cache${path.sep}uv`;
|
return `${process.env.HOME}${path.sep}.cache${path.sep}uv`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCacheDirFromConfig(): string | undefined {
|
|
||||||
for (const filePath of [versionFile, "uv.toml", "pyproject.toml"]) {
|
|
||||||
const resolvedPath = resolveRelativePath(filePath);
|
|
||||||
try {
|
|
||||||
const cacheDir = getConfigValueFromTomlFile(resolvedPath, "cache-dir");
|
|
||||||
if (cacheDir !== undefined) {
|
|
||||||
core.info(`Found cache-dir in ${resolvedPath}: ${cacheDir}`);
|
|
||||||
return cacheDir;
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
const message = (err as Error).message;
|
|
||||||
core.warning(`Error while parsing ${filePath}: ${message}`);
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getCacheDependencyGlob(): string {
|
function getCacheDependencyGlob(): string {
|
||||||
const cacheDependencyGlobInput = core.getInput("cache-dependency-glob");
|
const cacheDependencyGlobInput = core.getInput("cache-dependency-glob");
|
||||||
if (cacheDependencyGlobInput !== "") {
|
if (cacheDependencyGlobInput !== "") {
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
import type { OctokitOptions } from "@octokit/core";
|
|
||||||
import { Octokit as Core } from "@octokit/core";
|
import { Octokit as Core } from "@octokit/core";
|
||||||
|
import type {
|
||||||
|
Constructor,
|
||||||
|
OctokitOptions,
|
||||||
|
} from "@octokit/core/dist-types/types";
|
||||||
import {
|
import {
|
||||||
type PaginateInterface,
|
type PaginateInterface,
|
||||||
paginateRest,
|
paginateRest,
|
||||||
@@ -14,21 +17,22 @@ const DEFAULTS = {
|
|||||||
userAgent: "setup-uv",
|
userAgent: "setup-uv",
|
||||||
};
|
};
|
||||||
|
|
||||||
const OctokitWithPlugins = Core.plugin(paginateRest, legacyRestEndpointMethods);
|
export const Octokit: typeof Core &
|
||||||
|
Constructor<
|
||||||
|
{
|
||||||
|
paginate: PaginateInterface;
|
||||||
|
} & ReturnType<typeof legacyRestEndpointMethods>
|
||||||
|
> = Core.plugin(paginateRest, legacyRestEndpointMethods).defaults(
|
||||||
|
function buildDefaults(options: OctokitOptions): OctokitOptions {
|
||||||
|
return {
|
||||||
|
...DEFAULTS,
|
||||||
|
...options,
|
||||||
|
request: {
|
||||||
|
fetch: customFetch,
|
||||||
|
...options.request,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
export const Octokit = OctokitWithPlugins.defaults(function buildDefaults(
|
export type Octokit = InstanceType<typeof Octokit>;
|
||||||
options: OctokitOptions,
|
|
||||||
): OctokitOptions {
|
|
||||||
return {
|
|
||||||
...DEFAULTS,
|
|
||||||
...options,
|
|
||||||
request: {
|
|
||||||
fetch: customFetch,
|
|
||||||
...options.request,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
export type Octokit = InstanceType<typeof OctokitWithPlugins> & {
|
|
||||||
paginate: PaginateInterface;
|
|
||||||
};
|
|
||||||
|
|||||||
22
src/version/config-file.ts
Normal file
22
src/version/config-file.ts
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import fs from "node:fs";
|
||||||
|
import * as toml from "smol-toml";
|
||||||
|
|
||||||
|
export function getRequiredVersionFromConfigFile(
|
||||||
|
filePath: string,
|
||||||
|
): string | undefined {
|
||||||
|
if (!filePath.endsWith(".toml")) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const fileContent = fs.readFileSync(filePath, "utf-8");
|
||||||
|
|
||||||
|
if (filePath.endsWith("pyproject.toml")) {
|
||||||
|
const tomlContent = toml.parse(fileContent) as {
|
||||||
|
tool?: { uv?: { "required-version"?: string } };
|
||||||
|
};
|
||||||
|
return tomlContent?.tool?.uv?.["required-version"];
|
||||||
|
}
|
||||||
|
const tomlContent = toml.parse(fileContent) as {
|
||||||
|
"required-version"?: string;
|
||||||
|
};
|
||||||
|
return tomlContent["required-version"];
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import { getConfigValueFromTomlFile } from "../utils/config-file";
|
import { getRequiredVersionFromConfigFile } from "./config-file";
|
||||||
import { getUvVersionFromRequirementsFile } from "./requirements-file";
|
import { getUvVersionFromRequirementsFile } from "./requirements-file";
|
||||||
import { getUvVersionFromToolVersions } from "./tool-versions-file";
|
import { getUvVersionFromToolVersions } from "./tool-versions-file";
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ export function getUvVersionFromFile(filePath: string): string | undefined {
|
|||||||
try {
|
try {
|
||||||
uvVersion = getUvVersionFromToolVersions(filePath);
|
uvVersion = getUvVersionFromToolVersions(filePath);
|
||||||
if (uvVersion === undefined) {
|
if (uvVersion === undefined) {
|
||||||
uvVersion = getConfigValueFromTomlFile(filePath, "required-version");
|
uvVersion = getRequiredVersionFromConfigFile(filePath);
|
||||||
}
|
}
|
||||||
if (uvVersion === undefined) {
|
if (uvVersion === undefined) {
|
||||||
uvVersion = getUvVersionFromRequirementsFile(filePath);
|
uvVersion = getUvVersionFromRequirementsFile(filePath);
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
||||||
"module": "nodenext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
||||||
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
||||||
"outDir": "./lib" /* Redirect output structure to the directory. */,
|
"outDir": "./lib" /* Redirect output structure to the directory. */,
|
||||||
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
|
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
|
||||||
"strict": true /* Enable all strict type-checking options. */,
|
"strict": true /* Enable all strict type-checking options. */,
|
||||||
"target": "ES2024" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
"target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules", "**/*.test.ts"]
|
"exclude": ["node_modules", "**/*.test.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,648 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-aarch64-apple-darwin.tar.gz",
|
|
||||||
"platform": "apple-darwin",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-aarch64-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-aarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-aarch64-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "arm",
|
|
||||||
"artifactName": "uv-arm-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-arm-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-musleabihf",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "armv7",
|
|
||||||
"artifactName": "uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnueabihf",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "armv7",
|
|
||||||
"artifactName": "uv-armv7-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-armv7-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-musleabihf",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-i686-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-i686-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-i686-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "powerpc64",
|
|
||||||
"artifactName": "uv-powerpc64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-powerpc64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "powerpc64le",
|
|
||||||
"artifactName": "uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "riscv64gc",
|
|
||||||
"artifactName": "uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "s390x",
|
|
||||||
"artifactName": "uv-s390x-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-s390x-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-apple-darwin.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-x86_64-apple-darwin.tar.gz",
|
|
||||||
"platform": "apple-darwin",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-x86_64-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-x86_64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.20/uv-x86_64-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-aarch64-apple-darwin.tar.gz",
|
|
||||||
"platform": "apple-darwin",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-aarch64-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-aarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-aarch64-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "arm",
|
|
||||||
"artifactName": "uv-arm-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-arm-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-musleabihf",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "armv7",
|
|
||||||
"artifactName": "uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnueabihf",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "armv7",
|
|
||||||
"artifactName": "uv-armv7-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-armv7-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-musleabihf",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-i686-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-i686-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-i686-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "powerpc64",
|
|
||||||
"artifactName": "uv-powerpc64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-powerpc64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "powerpc64le",
|
|
||||||
"artifactName": "uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "riscv64gc",
|
|
||||||
"artifactName": "uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "s390x",
|
|
||||||
"artifactName": "uv-s390x-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-s390x-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-apple-darwin.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-x86_64-apple-darwin.tar.gz",
|
|
||||||
"platform": "apple-darwin",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-x86_64-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-x86_64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.19/uv-x86_64-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.19"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-aarch64-apple-darwin.tar.gz",
|
|
||||||
"platform": "apple-darwin",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-aarch64-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-aarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-aarch64-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "arm",
|
|
||||||
"artifactName": "uv-arm-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-arm-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-musleabihf",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "armv7",
|
|
||||||
"artifactName": "uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnueabihf",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "armv7",
|
|
||||||
"artifactName": "uv-armv7-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-armv7-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-musleabihf",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-i686-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-i686-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-i686-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "powerpc64",
|
|
||||||
"artifactName": "uv-powerpc64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-powerpc64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "powerpc64le",
|
|
||||||
"artifactName": "uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "riscv64gc",
|
|
||||||
"artifactName": "uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "s390x",
|
|
||||||
"artifactName": "uv-s390x-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-s390x-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-apple-darwin.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-x86_64-apple-darwin.tar.gz",
|
|
||||||
"platform": "apple-darwin",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-x86_64-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-x86_64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.18/uv-x86_64-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-aarch64-apple-darwin.tar.gz",
|
|
||||||
"platform": "apple-darwin",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-aarch64-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-aarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-aarch64-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "arm",
|
|
||||||
"artifactName": "uv-arm-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-arm-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-musleabihf",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "armv7",
|
|
||||||
"artifactName": "uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnueabihf",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "armv7",
|
|
||||||
"artifactName": "uv-armv7-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-armv7-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-musleabihf",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-i686-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-i686-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-i686-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "loongarch64",
|
|
||||||
"artifactName": "uv-loongarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-loongarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "powerpc64",
|
|
||||||
"artifactName": "uv-powerpc64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-powerpc64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "powerpc64le",
|
|
||||||
"artifactName": "uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "riscv64gc",
|
|
||||||
"artifactName": "uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "s390x",
|
|
||||||
"artifactName": "uv-s390x-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-s390x-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-apple-darwin.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-x86_64-apple-darwin.tar.gz",
|
|
||||||
"platform": "apple-darwin",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-x86_64-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-x86_64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.17/uv-x86_64-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.17"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-aarch64-apple-darwin.tar.gz",
|
|
||||||
"platform": "apple-darwin",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-aarch64-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-aarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "aarch64",
|
|
||||||
"artifactName": "uv-aarch64-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-aarch64-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "arm",
|
|
||||||
"artifactName": "uv-arm-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-arm-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-musleabihf",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "armv7",
|
|
||||||
"artifactName": "uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-armv7-unknown-linux-gnueabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnueabihf",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "armv7",
|
|
||||||
"artifactName": "uv-armv7-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-armv7-unknown-linux-musleabihf.tar.gz",
|
|
||||||
"platform": "unknown-linux-musleabihf",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-i686-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-i686-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "i686",
|
|
||||||
"artifactName": "uv-i686-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-i686-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "loongarch64",
|
|
||||||
"artifactName": "uv-loongarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-loongarch64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "powerpc64",
|
|
||||||
"artifactName": "uv-powerpc64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-powerpc64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "powerpc64le",
|
|
||||||
"artifactName": "uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-powerpc64le-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "riscv64gc",
|
|
||||||
"artifactName": "uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-riscv64gc-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "s390x",
|
|
||||||
"artifactName": "uv-s390x-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-s390x-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-apple-darwin.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-x86_64-apple-darwin.tar.gz",
|
|
||||||
"platform": "apple-darwin",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-pc-windows-msvc.zip",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-x86_64-pc-windows-msvc.zip",
|
|
||||||
"platform": "pc-windows-msvc",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-unknown-linux-gnu.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-x86_64-unknown-linux-gnu.tar.gz",
|
|
||||||
"platform": "unknown-linux-gnu",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arch": "x86_64",
|
|
||||||
"artifactName": "uv-x86_64-unknown-linux-musl.tar.gz",
|
|
||||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.8.16/uv-x86_64-unknown-linux-musl.tar.gz",
|
|
||||||
"platform": "unknown-linux-musl",
|
|
||||||
"version": "0.8.16"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"arch": "aarch64",
|
"arch": "aarch64",
|
||||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
||||||
|
|||||||
Reference in New Issue
Block a user