Compare commits

..

3 Commits

Author SHA1 Message Date
Kevin Stillhammer
afa7582669 cpython-3.9-macos-x86_64 2025-09-05 16:29:27 +02:00
Kevin Stillhammer
178048426a activate-environment: true 2025-09-05 16:22:08 +02:00
Kevin Stillhammer
3a905cc320 add test-x64-on-mac-arm64 2025-09-05 16:11:09 +02:00
16 changed files with 1535 additions and 4530 deletions

View File

@@ -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@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3 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@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3 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@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3 uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11

View File

@@ -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,8 +40,8 @@ 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: "20" node-version: "20"
- run: | - run: |
@@ -457,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:
@@ -525,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:
@@ -819,10 +760,6 @@ jobs:
- 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

View File

@@ -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 }}

View File

@@ -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,33 +284,6 @@ 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
This action controls where uv stores its cache on the runner's filesystem by setting `UV_CACHE_DIR`. This action controls where uv stores its cache on the runner's filesystem by setting `UV_CACHE_DIR`.

View File

@@ -44,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

View File

@@ -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": {

19
dist/save-cache/index.js generated vendored
View File

@@ -89809,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 {
@@ -89825,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() {
@@ -90023,12 +90019,7 @@ 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
@@ -90077,7 +90068,7 @@ async function saveCache() {
} }
async function pruneCache() { async function pruneCache() {
const options = { const options = {
silent: false, silent: !core.isDebug(),
}; };
const execArgs = ["cache", "prune", "--ci"]; const execArgs = ["cache", "prune", "--ci"];
core.info("Pruning cache..."); core.info("Pruning cache...");
@@ -90130,7 +90121,7 @@ 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.serverUrl = 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));
exports.workingDirectory = core.getInput("working-directory"); exports.workingDirectory = core.getInput("working-directory");
@@ -90140,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();

2239
dist/setup/index.js generated vendored
View File

@@ -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",
@@ -129615,7 +128596,7 @@ 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.serverUrl = 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));
exports.workingDirectory = core.getInput("working-directory"); exports.workingDirectory = core.getInput("working-directory");
@@ -129625,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();

2229
dist/update-known-versions/index.js generated vendored
View File

@@ -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",

530
package-lock.json generated
View File

@@ -20,15 +20,15 @@
"@octokit/plugin-rest-endpoint-methods": "^16.0.0", "@octokit/plugin-rest-endpoint-methods": "^16.0.0",
"@renovatebot/pep440": "^4.2.0", "@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.3.1", "@types/node": "^24.3.0",
"@types/semver": "^7.7.1", "@types/semver": "^7.7.0",
"@vercel/ncc": "^0.38.3", "@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.1", "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"
@@ -1813,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,
@@ -1911,12 +1911,12 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "24.4.0", "version": "24.3.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.4.0.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz",
"integrity": "sha512-gUuVEAK4/u6F9wRLznPUU4WGUacSEBDPoC2TrBkw3GAnOLHBL45QdfHOXp1kJ4ypBGLxTOB+t7NJLpKoC3gznQ==", "integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~7.11.0" "undici-types": "~7.10.0"
} }
}, },
"node_modules/@types/node-fetch": { "node_modules/@types/node-fetch": {
@@ -1945,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"
}, },
@@ -2309,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": {
@@ -2824,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": {
@@ -3633,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"
@@ -3675,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",
@@ -3693,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",
@@ -3707,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"
@@ -3740,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",
@@ -3757,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",
@@ -3976,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": {
@@ -3996,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": {
@@ -4010,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": "*",
@@ -4031,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"
@@ -4044,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": {
@@ -4054,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": "*",
@@ -4067,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",
@@ -4186,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",
@@ -5067,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": {
@@ -5358,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.11.0", "version": "7.10.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.11.0.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz",
"integrity": "sha512-kt1ZriHTi7MU+Z/r9DOdAI3ONdaR3M3csEaRc6ewa4f4dTvX4cQCbJ4NkEn0ohE4hHtq85+PhPSTY+pO/1PwgA==", "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/universal-user-agent": { "node_modules/universal-user-agent": {
@@ -5588,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": {
@@ -6406,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
}, },
@@ -6609,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": "*",
@@ -6627,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"
@@ -6724,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",
@@ -6787,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",
@@ -6799,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"
@@ -7046,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": {
@@ -7136,11 +7136,11 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "24.4.0", "version": "24.3.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.4.0.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz",
"integrity": "sha512-gUuVEAK4/u6F9wRLznPUU4WGUacSEBDPoC2TrBkw3GAnOLHBL45QdfHOXp1kJ4ypBGLxTOB+t7NJLpKoC3gznQ==", "integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==",
"requires": { "requires": {
"undici-types": "~7.11.0" "undici-types": "~7.10.0"
} }
}, },
"@types/node-fetch": { "@types/node-fetch": {
@@ -7167,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": {
@@ -7375,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": {
@@ -7724,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": {}
}, },
@@ -8257,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": {
@@ -8280,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",
@@ -8297,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",
@@ -8308,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",
@@ -8342,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",
@@ -8489,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",
@@ -8505,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",
@@ -8515,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": "*",
@@ -8535,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": "*",
@@ -8567,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",
@@ -8656,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",
@@ -9249,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"
@@ -9418,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.11.0", "version": "7.10.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.11.0.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz",
"integrity": "sha512-kt1ZriHTi7MU+Z/r9DOdAI3ONdaR3M3csEaRc6ewa4f4dTvX4cQCbJ4NkEn0ohE4hHtq85+PhPSTY+pO/1PwgA==" "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag=="
}, },
"universal-user-agent": { "universal-user-agent": {
"version": "7.0.3", "version": "7.0.3",
@@ -9531,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
} }
} }

View File

@@ -32,15 +32,15 @@
"@octokit/plugin-rest-endpoint-methods": "^16.0.0", "@octokit/plugin-rest-endpoint-methods": "^16.0.0",
"@renovatebot/pep440": "^4.2.0", "@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.3.1", "@types/node": "^24.3.0",
"@types/semver": "^7.7.1", "@types/semver": "^7.7.0",
"@vercel/ncc": "^0.38.3", "@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.1", "ts-jest": "^29.4.1",
"typescript": "^5.9.2" "typescript": "^5.9.2"

View File

@@ -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);
} }

View File

@@ -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":

View File

@@ -11,17 +11,12 @@ import {
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
@@ -78,7 +73,7 @@ async function saveCache(): Promise<void> {
async function pruneCache(): Promise<void> { async function pruneCache(): Promise<void> {
const options: exec.ExecOptions = { const options: exec.ExecOptions = {
silent: false, silent: !core.isDebug(),
}; };
const execArgs = ["cache", "prune", "--ci"]; const execArgs = ["cache", "prune", "--ci"];

View File

@@ -8,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();

View File

@@ -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",