mirror of
https://github.com/actions/setup-python.git
synced 2026-11-16 14:05:04 +08:00
Merge 14de4ddb02 into 6d4fd22b20
This commit is contained in:
commit
88f260070f
8 changed files with 606 additions and 72 deletions
75
.lsf-source/deepmerge-4.3.1-lsf-prototype-v1.repair.json
Normal file
75
.lsf-source/deepmerge-4.3.1-lsf-prototype-v1.repair.json
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
{
|
||||||
|
"schema": 1,
|
||||||
|
"profile": "deepmerge-4.3.1-lsf-prototype-v1",
|
||||||
|
"name": "deepmerge",
|
||||||
|
"version": "4.3.1",
|
||||||
|
"upstreamIntegrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "index.js",
|
||||||
|
"beforeSha256": "12440c84957c1990ea2d5e33dc0091722dc1dc1585c6d20e0c780e568ffa9d30",
|
||||||
|
"afterSha256": "ba2a6c79e67e10f45a32cfe8f5ea5c5607dc4718be2b37956e9202ea4cdbe1bc",
|
||||||
|
"edits": [
|
||||||
|
{
|
||||||
|
"before": "function propertyIsOnObject(object, property) {",
|
||||||
|
"after": "function propertyIsForbidden(key) {\n\treturn key === '__proto__'\n}\n\nfunction propertyIsOnObject(object, property) {",
|
||||||
|
"count": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": "\t\tgetKeys(target).forEach(function(key) {\n",
|
||||||
|
"after": "\t\tgetKeys(target).forEach(function(key) {\n\t\t\tif (propertyIsForbidden(key)) {\n\t\t\t\treturn\n\t\t\t}\n",
|
||||||
|
"count": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": "if (propertyIsUnsafe(target, key)) {",
|
||||||
|
"after": "if (propertyIsForbidden(key) || propertyIsUnsafe(target, key)) {",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "dist/cjs.js",
|
||||||
|
"beforeSha256": "2e5160f84a1141bd927264afe4d15766f1e6cf07daef182b37ff53fea121de7d",
|
||||||
|
"afterSha256": "c5e9c1f08e7a3b589010133108a3c625806358fa9e1bdaa11f07e9e756f19da0",
|
||||||
|
"edits": [
|
||||||
|
{
|
||||||
|
"before": "function propertyIsOnObject(object, property) {",
|
||||||
|
"after": "function propertyIsForbidden(key) {\n\treturn key === '__proto__'\n}\n\nfunction propertyIsOnObject(object, property) {",
|
||||||
|
"count": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": "\t\tgetKeys(target).forEach(function(key) {\n",
|
||||||
|
"after": "\t\tgetKeys(target).forEach(function(key) {\n\t\t\tif (propertyIsForbidden(key)) {\n\t\t\t\treturn\n\t\t\t}\n",
|
||||||
|
"count": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": "if (propertyIsUnsafe(target, key)) {",
|
||||||
|
"after": "if (propertyIsForbidden(key) || propertyIsUnsafe(target, key)) {",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "dist/umd.js",
|
||||||
|
"beforeSha256": "f33e6596482d1fb5c7c427f8ef92f2aa849eea9223acd974176b2fb27ddbf73a",
|
||||||
|
"afterSha256": "b12652d3654f47b08ae43e8b390b66c55987ace6d9a6167c3240744ffa0f28f9",
|
||||||
|
"edits": [
|
||||||
|
{
|
||||||
|
"before": "\tfunction propertyIsOnObject(object, property) {",
|
||||||
|
"after": "\tfunction propertyIsForbidden(key) {\n\t\treturn key === '__proto__'\n\t}\n\n\tfunction propertyIsOnObject(object, property) {",
|
||||||
|
"count": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": "\t\t\tgetKeys(target).forEach(function(key) {\n",
|
||||||
|
"after": "\t\t\tgetKeys(target).forEach(function(key) {\n\t\t\t\tif (propertyIsForbidden(key)) {\n\t\t\t\t\treturn\n\t\t\t\t}\n",
|
||||||
|
"count": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": "if (propertyIsUnsafe(target, key)) {",
|
||||||
|
"after": "if (propertyIsForbidden(key) || propertyIsUnsafe(target, key)) {",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
202
.lsf-source/deepmerge-4.3.1-lsf-prototype-v1.source.json
Normal file
202
.lsf-source/deepmerge-4.3.1-lsf-prototype-v1.source.json
Normal file
|
|
@ -0,0 +1,202 @@
|
||||||
|
{
|
||||||
|
"schema": 1,
|
||||||
|
"profile": "deepmerge-4.3.1-lsf-prototype-v1",
|
||||||
|
"name": "deepmerge",
|
||||||
|
"version": "4.3.1",
|
||||||
|
"trueSourceRole": "development/build dependency of this action; not a claim of production runtime reachability",
|
||||||
|
"upstream": {
|
||||||
|
"url": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
||||||
|
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
||||||
|
"bytes": 8452,
|
||||||
|
"sha256": "4003a0a348276a95543fa969f561f6b5968629acbbb59d66018dd23e7b8f1d5c",
|
||||||
|
"gitBlob": "1d1560e971dfc484bbe0cb9e8c86bde9140e45b5"
|
||||||
|
},
|
||||||
|
"repair": {
|
||||||
|
"path": ".lsf-source/deepmerge-4.3.1-lsf-prototype-v1.repair.json",
|
||||||
|
"bytes": 3064,
|
||||||
|
"sha256": "e402617d1e791c4bed35768b6c34ba68c370c076551495e738de0731ad2049c7",
|
||||||
|
"gitBlob": "52602f18647aa2f2bd30f046e05bcce2705a761f"
|
||||||
|
},
|
||||||
|
"derived": {
|
||||||
|
"path": ".lsf-source/deepmerge-4.3.1-lsf-prototype-v1.tar",
|
||||||
|
"integrity": "sha512-w9M3UphEGYK/Zn9kkYnPVw7NnQyxE3T7gIcqBv3m4/Fe+LAhnAPZBwgYCqj0/orv2GagYhPGa2OMjqdzp7G0Lg==",
|
||||||
|
"bytes": 51200,
|
||||||
|
"sha256": "c4ca0f4eb3a2464c026bc3dec5d9eaf04544aed24c3fd1d77da95f85e36c369f",
|
||||||
|
"gitBlob": "30e23fad3a82fd30bc3f08e26704a0c0bc84c704"
|
||||||
|
},
|
||||||
|
"packageManifestUnchanged": {
|
||||||
|
"bytes": 1152,
|
||||||
|
"sha256": "f56978e7a6da1a3c6edee41abb54f98584a2fa2680458c48db820ae772fef0c9",
|
||||||
|
"gitBlob": "2b7b1be8c3ad6253396713c5a915eda3fef74462"
|
||||||
|
},
|
||||||
|
"license": {
|
||||||
|
"upstreamPath": "package/license.txt",
|
||||||
|
"unchanged": true,
|
||||||
|
"bytes": 1116,
|
||||||
|
"sha256": "6cfc4687cb2f2d86f4a77e6b526290d3878e5e512f3fec2f4cb36a9cb36f798b",
|
||||||
|
"gitBlob": "5003078718343fc207823c9f543ef906ac59dcbe"
|
||||||
|
},
|
||||||
|
"fileIdentities": [
|
||||||
|
{
|
||||||
|
"path": ".editorconfig",
|
||||||
|
"before": {
|
||||||
|
"bytes": 113,
|
||||||
|
"sha256": "73cc38e40b41f1eea6fd2d98d0ade5324f1ad564c3f111ebd0040b4286d2c25c",
|
||||||
|
"gitBlob": "6244e1b7bf4ec9d050cb53b600c9b7f9c376a7bf"
|
||||||
|
},
|
||||||
|
"after": {
|
||||||
|
"bytes": 113,
|
||||||
|
"sha256": "73cc38e40b41f1eea6fd2d98d0ade5324f1ad564c3f111ebd0040b4286d2c25c",
|
||||||
|
"gitBlob": "6244e1b7bf4ec9d050cb53b600c9b7f9c376a7bf"
|
||||||
|
},
|
||||||
|
"mode": "0o644"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".eslintcache",
|
||||||
|
"before": {
|
||||||
|
"bytes": 382,
|
||||||
|
"sha256": "7690c5da38095c17a8c3ce73f3ebdc7bf7d7797c618a9c919c79a6b5e0024012",
|
||||||
|
"gitBlob": "c1321eb470e0026ecce2014fe5a34f408ecba873"
|
||||||
|
},
|
||||||
|
"after": {
|
||||||
|
"bytes": 382,
|
||||||
|
"sha256": "7690c5da38095c17a8c3ce73f3ebdc7bf7d7797c618a9c919c79a6b5e0024012",
|
||||||
|
"gitBlob": "c1321eb470e0026ecce2014fe5a34f408ecba873"
|
||||||
|
},
|
||||||
|
"mode": "0o644"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "changelog.md",
|
||||||
|
"before": {
|
||||||
|
"bytes": 9785,
|
||||||
|
"sha256": "360f6a3465a3e82f7bc1428cf1dc0cf5e6935a83b97345d172d27a4d8703321e",
|
||||||
|
"gitBlob": "082e0dd393f4dcee8668050a850c7e327762f976"
|
||||||
|
},
|
||||||
|
"after": {
|
||||||
|
"bytes": 9785,
|
||||||
|
"sha256": "360f6a3465a3e82f7bc1428cf1dc0cf5e6935a83b97345d172d27a4d8703321e",
|
||||||
|
"gitBlob": "082e0dd393f4dcee8668050a850c7e327762f976"
|
||||||
|
},
|
||||||
|
"mode": "0o644"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "dist/cjs.js",
|
||||||
|
"before": {
|
||||||
|
"bytes": 4048,
|
||||||
|
"sha256": "2e5160f84a1141bd927264afe4d15766f1e6cf07daef182b37ff53fea121de7d",
|
||||||
|
"gitBlob": "7c36cbdd06cc22c92d590be3f87a08a91ca06b40"
|
||||||
|
},
|
||||||
|
"after": {
|
||||||
|
"bytes": 4194,
|
||||||
|
"sha256": "c5e9c1f08e7a3b589010133108a3c625806358fa9e1bdaa11f07e9e756f19da0",
|
||||||
|
"gitBlob": "7bddaa8b853a932c64ce63efaa2ba5dead4280d9"
|
||||||
|
},
|
||||||
|
"mode": "0o644"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "dist/umd.js",
|
||||||
|
"before": {
|
||||||
|
"bytes": 4420,
|
||||||
|
"sha256": "f33e6596482d1fb5c7c427f8ef92f2aa849eea9223acd974176b2fb27ddbf73a",
|
||||||
|
"gitBlob": "4071e7c56ec8e5273fe166f6e723ac460fab8b72"
|
||||||
|
},
|
||||||
|
"after": {
|
||||||
|
"bytes": 4572,
|
||||||
|
"sha256": "b12652d3654f47b08ae43e8b390b66c55987ace6d9a6167c3240744ffa0f28f9",
|
||||||
|
"gitBlob": "50e34096e0e36280789910bc3b136122ff52653e"
|
||||||
|
},
|
||||||
|
"mode": "0o644"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "index.d.ts",
|
||||||
|
"before": {
|
||||||
|
"bytes": 823,
|
||||||
|
"sha256": "146ba4b99c5feb82663e17a671bf9f53bb39c704cd76345d6c5a801c26372f44",
|
||||||
|
"gitBlob": "46784de5625a962c3c4c68c8fe16078815cce018"
|
||||||
|
},
|
||||||
|
"after": {
|
||||||
|
"bytes": 823,
|
||||||
|
"sha256": "146ba4b99c5feb82663e17a671bf9f53bb39c704cd76345d6c5a801c26372f44",
|
||||||
|
"gitBlob": "46784de5625a962c3c4c68c8fe16078815cce018"
|
||||||
|
},
|
||||||
|
"mode": "0o644"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "index.js",
|
||||||
|
"before": {
|
||||||
|
"bytes": 3293,
|
||||||
|
"sha256": "12440c84957c1990ea2d5e33dc0091722dc1dc1585c6d20e0c780e568ffa9d30",
|
||||||
|
"gitBlob": "77968aed5d456cccc294f60912ef381fa1e52a7b"
|
||||||
|
},
|
||||||
|
"after": {
|
||||||
|
"bytes": 3439,
|
||||||
|
"sha256": "ba2a6c79e67e10f45a32cfe8f5ea5c5607dc4718be2b37956e9202ea4cdbe1bc",
|
||||||
|
"gitBlob": "7b5e0a9954795812cd5770a17499602967275163"
|
||||||
|
},
|
||||||
|
"mode": "0o644"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "license.txt",
|
||||||
|
"before": {
|
||||||
|
"bytes": 1116,
|
||||||
|
"sha256": "6cfc4687cb2f2d86f4a77e6b526290d3878e5e512f3fec2f4cb36a9cb36f798b",
|
||||||
|
"gitBlob": "5003078718343fc207823c9f543ef906ac59dcbe"
|
||||||
|
},
|
||||||
|
"after": {
|
||||||
|
"bytes": 1116,
|
||||||
|
"sha256": "6cfc4687cb2f2d86f4a77e6b526290d3878e5e512f3fec2f4cb36a9cb36f798b",
|
||||||
|
"gitBlob": "5003078718343fc207823c9f543ef906ac59dcbe"
|
||||||
|
},
|
||||||
|
"mode": "0o644"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "package.json",
|
||||||
|
"before": {
|
||||||
|
"bytes": 1152,
|
||||||
|
"sha256": "f56978e7a6da1a3c6edee41abb54f98584a2fa2680458c48db820ae772fef0c9",
|
||||||
|
"gitBlob": "2b7b1be8c3ad6253396713c5a915eda3fef74462"
|
||||||
|
},
|
||||||
|
"after": {
|
||||||
|
"bytes": 1152,
|
||||||
|
"sha256": "f56978e7a6da1a3c6edee41abb54f98584a2fa2680458c48db820ae772fef0c9",
|
||||||
|
"gitBlob": "2b7b1be8c3ad6253396713c5a915eda3fef74462"
|
||||||
|
},
|
||||||
|
"mode": "0o644"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "readme.md",
|
||||||
|
"before": {
|
||||||
|
"bytes": 5682,
|
||||||
|
"sha256": "202430923abee498512b2f9cbab686a1e7d64759314a503ca0d5aaa29007fc0f",
|
||||||
|
"gitBlob": "79e4e303b0148748b5ef107e6d7f0afa2d665aa6"
|
||||||
|
},
|
||||||
|
"after": {
|
||||||
|
"bytes": 5682,
|
||||||
|
"sha256": "202430923abee498512b2f9cbab686a1e7d64759314a503ca0d5aaa29007fc0f",
|
||||||
|
"gitBlob": "79e4e303b0148748b5ef107e6d7f0afa2d665aa6"
|
||||||
|
},
|
||||||
|
"mode": "0o644"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "rollup.config.js",
|
||||||
|
"before": {
|
||||||
|
"bytes": 343,
|
||||||
|
"sha256": "abba48beb11daa282e69134e4928ec32737ae6f6d192dd5f00a6e660e032bb25",
|
||||||
|
"gitBlob": "8323ab27e53825fc55e052c54a8869de99d8b874"
|
||||||
|
},
|
||||||
|
"after": {
|
||||||
|
"bytes": 343,
|
||||||
|
"sha256": "abba48beb11daa282e69134e4928ec32737ae6f6d192dd5f00a6e660e032bb25",
|
||||||
|
"gitBlob": "8323ab27e53825fc55e052c54a8869de99d8b874"
|
||||||
|
},
|
||||||
|
"mode": "0o644"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"advisory": {
|
||||||
|
"id": "GHSA-gcqx-w48m-w2h4",
|
||||||
|
"modified": "2026-10-27T21:45:04.256048Z"
|
||||||
|
},
|
||||||
|
"notAnUpstreamFixedRelease": true,
|
||||||
|
"forkBuildVerified": false,
|
||||||
|
"runtimeOrSignedSDKQualified": false
|
||||||
|
}
|
||||||
BIN
.lsf-source/deepmerge-4.3.1-lsf-prototype-v1.tar
Normal file
BIN
.lsf-source/deepmerge-4.3.1-lsf-prototype-v1.tar
Normal file
Binary file not shown.
45
.lsf-source/verify-installed-deepmerge.mjs
Normal file
45
.lsf-source/verify-installed-deepmerge.mjs
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
import assert from 'node:assert/strict'
|
||||||
|
import {createHash} from 'node:crypto'
|
||||||
|
import {readFileSync} from 'node:fs'
|
||||||
|
import {createRequire} from 'node:module'
|
||||||
|
import {dirname, join, resolve} from 'node:path'
|
||||||
|
import {fileURLToPath} from 'node:url'
|
||||||
|
|
||||||
|
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..')
|
||||||
|
const read = name => readFileSync(join(root, name))
|
||||||
|
const sha = value => createHash('sha256').update(value).digest('hex')
|
||||||
|
const archive = 'file:.lsf-source/deepmerge-4.3.1-lsf-prototype-v1.tar'
|
||||||
|
assert.equal(sha(read('.lsf-source/deepmerge-4.3.1-lsf-prototype-v1.tar')), 'c4ca0f4eb3a2464c026bc3dec5d9eaf04544aed24c3fd1d77da95f85e36c369f')
|
||||||
|
const owner = JSON.parse(read('package.json'))
|
||||||
|
const lock = JSON.parse(read('package-lock.json'))
|
||||||
|
assert.equal(owner.devDependencies.deepmerge, archive)
|
||||||
|
assert.equal(lock.packages[''].devDependencies.deepmerge, archive)
|
||||||
|
assert.equal(lock.packages['node_modules/deepmerge'].version, '4.3.1')
|
||||||
|
assert.equal(lock.packages['node_modules/deepmerge'].resolved, archive)
|
||||||
|
assert.equal(lock.packages['node_modules/deepmerge'].integrity, 'sha512-w9M3UphEGYK/Zn9kkYnPVw7NnQyxE3T7gIcqBv3m4/Fe+LAhnAPZBwgYCqj0/orv2GagYhPGa2OMjqdzp7G0Lg==')
|
||||||
|
const repairRaw = read('.lsf-source/deepmerge-4.3.1-lsf-prototype-v1.repair.json')
|
||||||
|
const repairText = repairRaw.toString('utf8').replaceAll('\r\n', '\n')
|
||||||
|
assert.equal(sha(Buffer.from(repairText)), 'e402617d1e791c4bed35768b6c34ba68c370c076551495e738de0731ad2049c7')
|
||||||
|
const repair = JSON.parse(repairText)
|
||||||
|
assert.deepEqual(repair.files.map(row => row.path).sort(), ['dist/cjs.js', 'dist/umd.js', 'index.js'])
|
||||||
|
const require = createRequire(join(root, 'package.json'))
|
||||||
|
const installed = dirname(require.resolve('deepmerge/package.json'))
|
||||||
|
const manifest = JSON.parse(readFileSync(join(installed, 'package.json')))
|
||||||
|
assert.equal(manifest.name, 'deepmerge')
|
||||||
|
assert.equal(manifest.version, '4.3.1')
|
||||||
|
assert.equal(manifest.license, 'MIT')
|
||||||
|
const actual = {}
|
||||||
|
for (const row of repair.files) {
|
||||||
|
actual[row.path] = sha(readFileSync(join(installed, row.path)))
|
||||||
|
assert.equal(actual[row.path], row.afterSha256)
|
||||||
|
}
|
||||||
|
console.log(JSON.stringify({
|
||||||
|
kind: 'installed-source-assertion',
|
||||||
|
sourceCommit: process.env.GITHUB_SHA || null,
|
||||||
|
node: process.versions.node,
|
||||||
|
packageVersion: manifest.version,
|
||||||
|
repairSha256: sha(Buffer.from(repairText)),
|
||||||
|
installedPostimages: actual,
|
||||||
|
actionBuildOrSignedSDKQualified: false
|
||||||
|
}))
|
||||||
|
|
||||||
160
dist/cache-save/index.js
vendored
160
dist/cache-save/index.js
vendored
|
|
@ -16178,7 +16178,7 @@ function defaultFactory (origin, opts) {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Agent extends DispatcherBase {
|
class Agent extends DispatcherBase {
|
||||||
constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
|
constructor ({ factory = defaultFactory, maxRedirections = 0, connect, tls, ...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.')
|
||||||
}
|
}
|
||||||
|
|
@ -16197,11 +16197,15 @@ class Agent extends DispatcherBase {
|
||||||
connect = { ...connect }
|
connect = { ...connect }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tls && typeof tls !== 'function') {
|
||||||
|
tls = { ...tls }
|
||||||
|
}
|
||||||
|
|
||||||
this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent)
|
this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent)
|
||||||
? options.interceptors.Agent
|
? options.interceptors.Agent
|
||||||
: [createRedirectInterceptor({ maxRedirections })]
|
: [createRedirectInterceptor({ maxRedirections })]
|
||||||
|
|
||||||
this[kOptions] = { ...util.deepClone(options), connect }
|
this[kOptions] = { ...util.deepClone(options), connect, tls }
|
||||||
this[kOptions].interceptors = options.interceptors
|
this[kOptions].interceptors = options.interceptors
|
||||||
? { ...options.interceptors }
|
? { ...options.interceptors }
|
||||||
: undefined
|
: undefined
|
||||||
|
|
@ -17234,8 +17238,6 @@ async function connectH1 (client, socket) {
|
||||||
socket[kParser] = new Parser(client, socket, llhttpInstance)
|
socket[kParser] = new Parser(client, socket, llhttpInstance)
|
||||||
|
|
||||||
addListener(socket, 'error', function (err) {
|
addListener(socket, 'error', function (err) {
|
||||||
assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')
|
|
||||||
|
|
||||||
const parser = this[kParser]
|
const parser = this[kParser]
|
||||||
|
|
||||||
// On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded
|
// On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded
|
||||||
|
|
@ -18165,8 +18167,6 @@ async function connectH2 (client, socket) {
|
||||||
socket[kHTTP2Session] = session
|
socket[kHTTP2Session] = session
|
||||||
|
|
||||||
util.addListener(socket, 'error', function (err) {
|
util.addListener(socket, 'error', function (err) {
|
||||||
assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')
|
|
||||||
|
|
||||||
this[kError] = err
|
this[kError] = err
|
||||||
|
|
||||||
this[kClient][kOnError](err)
|
this[kClient][kOnError](err)
|
||||||
|
|
@ -18240,8 +18240,6 @@ function resumeH2 (client) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onHttp2SessionError (err) {
|
function onHttp2SessionError (err) {
|
||||||
assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')
|
|
||||||
|
|
||||||
this[kSocket][kError] = err
|
this[kSocket][kError] = err
|
||||||
this[kClient][kOnError](err)
|
this[kClient][kOnError](err)
|
||||||
}
|
}
|
||||||
|
|
@ -18939,9 +18937,10 @@ class Client extends DispatcherBase {
|
||||||
// h2
|
// h2
|
||||||
maxConcurrentStreams,
|
maxConcurrentStreams,
|
||||||
allowH2,
|
allowH2,
|
||||||
webSocket
|
webSocket,
|
||||||
|
eventSource
|
||||||
} = {}) {
|
} = {}) {
|
||||||
super({ webSocket })
|
super({ webSocket, eventSource })
|
||||||
|
|
||||||
if (keepAlive !== undefined) {
|
if (keepAlive !== undefined) {
|
||||||
throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')
|
throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')
|
||||||
|
|
@ -19462,6 +19461,7 @@ module.exports = Client
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const buffer = __nccwpck_require__(4573)
|
||||||
const Dispatcher = __nccwpck_require__(883)
|
const Dispatcher = __nccwpck_require__(883)
|
||||||
const {
|
const {
|
||||||
ClientDestroyedError,
|
ClientDestroyedError,
|
||||||
|
|
@ -19474,6 +19474,7 @@ const kOnDestroyed = Symbol('onDestroyed')
|
||||||
const kOnClosed = Symbol('onClosed')
|
const kOnClosed = Symbol('onClosed')
|
||||||
const kInterceptedDispatch = Symbol('Intercepted Dispatch')
|
const kInterceptedDispatch = Symbol('Intercepted Dispatch')
|
||||||
const kWebSocketOptions = Symbol('webSocketOptions')
|
const kWebSocketOptions = Symbol('webSocketOptions')
|
||||||
|
const kEventSourceOptions = Symbol('eventSourceOptions')
|
||||||
|
|
||||||
class DispatcherBase extends Dispatcher {
|
class DispatcherBase extends Dispatcher {
|
||||||
constructor (opts) {
|
constructor (opts) {
|
||||||
|
|
@ -19484,6 +19485,7 @@ class DispatcherBase extends Dispatcher {
|
||||||
this[kClosed] = false
|
this[kClosed] = false
|
||||||
this[kOnClosed] = []
|
this[kOnClosed] = []
|
||||||
this[kWebSocketOptions] = opts?.webSocket ?? {}
|
this[kWebSocketOptions] = opts?.webSocket ?? {}
|
||||||
|
this[kEventSourceOptions] = opts?.eventSource ?? {}
|
||||||
}
|
}
|
||||||
|
|
||||||
get webSocketOptions () {
|
get webSocketOptions () {
|
||||||
|
|
@ -19493,6 +19495,12 @@ class DispatcherBase extends Dispatcher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get eventSourceOptions () {
|
||||||
|
return {
|
||||||
|
maxEventSize: this[kEventSourceOptions].maxEventSize ?? buffer.kStringMaxLength
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
get destroyed () {
|
get destroyed () {
|
||||||
return this[kDestroyed]
|
return this[kDestroyed]
|
||||||
}
|
}
|
||||||
|
|
@ -25851,6 +25859,7 @@ module.exports = {
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
||||||
|
const buffer = __nccwpck_require__(4573)
|
||||||
const { Transform } = __nccwpck_require__(7075)
|
const { Transform } = __nccwpck_require__(7075)
|
||||||
const { isASCIINumber, isValidLastEventId } = __nccwpck_require__(4811)
|
const { isASCIINumber, isValidLastEventId } = __nccwpck_require__(4811)
|
||||||
|
|
||||||
|
|
@ -25875,11 +25884,19 @@ const COLON = 0x3A
|
||||||
*/
|
*/
|
||||||
const SPACE = 0x20
|
const SPACE = 0x20
|
||||||
|
|
||||||
|
const defaultMaxEventSize = buffer.kStringMaxLength
|
||||||
|
|
||||||
const DATA = Buffer.from('data')
|
const DATA = Buffer.from('data')
|
||||||
const EVENT = Buffer.from('event')
|
const EVENT = Buffer.from('event')
|
||||||
const ID = Buffer.from('id')
|
const ID = Buffer.from('id')
|
||||||
const RETRY = Buffer.from('retry')
|
const RETRY = Buffer.from('retry')
|
||||||
|
|
||||||
|
// Each data field creates a string node, and each unconsumed input chunk keeps
|
||||||
|
// a Buffer wrapper. The absolute ceiling protects the large default byte limit.
|
||||||
|
const minParserItems = 1024
|
||||||
|
const maxParserItems = 131072
|
||||||
|
const bytesPerParserItem = 128
|
||||||
|
|
||||||
function isASCIINumberBytes (buffer, start) {
|
function isASCIINumberBytes (buffer, start) {
|
||||||
if (start >= buffer.length) {
|
if (start >= buffer.length) {
|
||||||
return false
|
return false
|
||||||
|
|
@ -25918,6 +25935,12 @@ function isFieldName (line, length, field) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function createMaxEventSizeExceededError () {
|
||||||
|
const error = new Error('EventSource message size exceeded')
|
||||||
|
error.aborted = false
|
||||||
|
return error
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {object} EventSourceStreamEvent
|
* @typedef {object} EventSourceStreamEvent
|
||||||
* @type {object}
|
* @type {object}
|
||||||
|
|
@ -25966,6 +25989,13 @@ class EventSourceStream extends Transform {
|
||||||
pos = 0
|
pos = 0
|
||||||
lineChunkIndex = 0
|
lineChunkIndex = 0
|
||||||
linePos = 0
|
linePos = 0
|
||||||
|
lineLength = 0
|
||||||
|
eventSize = 0
|
||||||
|
eventFieldSizes = { data: 0, event: 0, id: 0, retry: 0 }
|
||||||
|
dataLineCount = 0
|
||||||
|
maxEventSize
|
||||||
|
maxDataLines
|
||||||
|
maxBufferedChunks
|
||||||
|
|
||||||
event = {
|
event = {
|
||||||
data: undefined,
|
data: undefined,
|
||||||
|
|
@ -25976,6 +26006,7 @@ class EventSourceStream extends Transform {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {object} options
|
* @param {object} options
|
||||||
|
* @param {number} [options.maxEventSize]
|
||||||
* @param {eventSourceSettings} options.eventSourceSettings
|
* @param {eventSourceSettings} options.eventSourceSettings
|
||||||
* @param {Function} [options.push]
|
* @param {Function} [options.push]
|
||||||
*/
|
*/
|
||||||
|
|
@ -25987,6 +26018,12 @@ class EventSourceStream extends Transform {
|
||||||
super(options)
|
super(options)
|
||||||
|
|
||||||
this.state = options.eventSourceSettings || {}
|
this.state = options.eventSourceSettings || {}
|
||||||
|
this.maxEventSize = options.maxEventSize ?? defaultMaxEventSize
|
||||||
|
const parserItemLimit = this.maxEventSize > 0
|
||||||
|
? Math.min(maxParserItems, Math.max(minParserItems, Math.floor(this.maxEventSize / bytesPerParserItem)))
|
||||||
|
: 0
|
||||||
|
this.maxDataLines = parserItemLimit
|
||||||
|
this.maxBufferedChunks = parserItemLimit
|
||||||
if (options.push) {
|
if (options.push) {
|
||||||
this.push = options.push
|
this.push = options.push
|
||||||
}
|
}
|
||||||
|
|
@ -26004,6 +26041,14 @@ class EventSourceStream extends Transform {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A leading line ending can immediately release the currently buffered
|
||||||
|
// line, even when it uses the final allowed chunk slot.
|
||||||
|
if (this.maxEventSize > 0 &&
|
||||||
|
this.chunks.length >= this.maxBufferedChunks &&
|
||||||
|
chunk[0] !== LF && chunk[0] !== CR) {
|
||||||
|
callback(createMaxEventSizeExceededError())
|
||||||
|
return
|
||||||
|
}
|
||||||
this.chunks.push(chunk)
|
this.chunks.push(chunk)
|
||||||
|
|
||||||
// Strip leading byte-order-mark if we opened the stream and started
|
// Strip leading byte-order-mark if we opened the stream and started
|
||||||
|
|
@ -26082,7 +26127,12 @@ class EventSourceStream extends Transform {
|
||||||
|
|
||||||
// In any case, we can process the line as we reached an
|
// In any case, we can process the line as we reached an
|
||||||
// end-of-line character
|
// end-of-line character
|
||||||
|
try {
|
||||||
this.parseLine(this.readLine(), this.event)
|
this.parseLine(this.readLine(), this.event)
|
||||||
|
} catch (error) {
|
||||||
|
callback(error)
|
||||||
|
return
|
||||||
|
}
|
||||||
this.consumeCurrentByte()
|
this.consumeCurrentByte()
|
||||||
// A line was processed and this could be the end of the event. We need
|
// A line was processed and this could be the end of the event. We need
|
||||||
// to check if the next line is empty to determine if the event is
|
// to check if the next line is empty to determine if the event is
|
||||||
|
|
@ -26091,15 +26141,28 @@ class EventSourceStream extends Transform {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// readLine() is only called after CR or LF. Reject an unfinished line
|
||||||
|
// before it can retain an unbounded number of decoded chunks. The seven
|
||||||
|
// extra bytes allow the longest field prefix ("event: " or "retry: ").
|
||||||
|
if (this.maxEventSize > 0 && ++this.lineLength > this.maxEventSize + 7) {
|
||||||
|
callback(createMaxEventSizeExceededError())
|
||||||
|
return
|
||||||
|
}
|
||||||
this.advanceCursor()
|
this.advanceCursor()
|
||||||
}
|
}
|
||||||
|
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_destroy (error, callback) {
|
||||||
|
this.chunks.length = 0
|
||||||
|
this.clearEvent()
|
||||||
|
super._destroy(error, callback)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Buffer} line
|
* @param {Buffer} line
|
||||||
* @param {EventStreamEvent} event
|
* @param {EventSourceStreamEvent} event
|
||||||
*/
|
*/
|
||||||
parseLine (line, event) {
|
parseLine (line, event) {
|
||||||
// If the line is empty (a blank line)
|
// If the line is empty (a blank line)
|
||||||
|
|
@ -26133,6 +26196,13 @@ class EventSourceStream extends Transform {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isFieldName(line, fieldLength, DATA)) {
|
if (isFieldName(line, fieldLength, DATA)) {
|
||||||
|
if (this.maxEventSize > 0 && this.dataLineCount >= this.maxDataLines) {
|
||||||
|
throw createMaxEventSizeExceededError()
|
||||||
|
}
|
||||||
|
const valueBytes = line.length - valueStart
|
||||||
|
const dataSize = this.eventFieldSizes.data + (event.data === undefined ? 0 : 1) + valueBytes
|
||||||
|
this.setEventFieldSize('data', dataSize)
|
||||||
|
|
||||||
const value = line.toString('utf8', valueStart)
|
const value = line.toString('utf8', valueStart)
|
||||||
|
|
||||||
if (event.data === undefined) {
|
if (event.data === undefined) {
|
||||||
|
|
@ -26140,11 +26210,13 @@ class EventSourceStream extends Transform {
|
||||||
} else {
|
} else {
|
||||||
event.data += `\n${value}`
|
event.data += `\n${value}`
|
||||||
}
|
}
|
||||||
|
this.dataLineCount++
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isFieldName(line, fieldLength, RETRY)) {
|
if (isFieldName(line, fieldLength, RETRY)) {
|
||||||
if (isASCIINumberBytes(line, valueStart)) {
|
if (isASCIINumberBytes(line, valueStart)) {
|
||||||
|
this.setEventFieldSize('retry', line.length - valueStart)
|
||||||
event.retry = line.toString('utf8', valueStart)
|
event.retry = line.toString('utf8', valueStart)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
@ -26152,18 +26224,27 @@ class EventSourceStream extends Transform {
|
||||||
|
|
||||||
if (isFieldName(line, fieldLength, ID)) {
|
if (isFieldName(line, fieldLength, ID)) {
|
||||||
if (isValidLastEventIdBytes(line, valueStart)) {
|
if (isValidLastEventIdBytes(line, valueStart)) {
|
||||||
|
this.setEventFieldSize('id', line.length - valueStart)
|
||||||
event.id = line.toString('utf8', valueStart)
|
event.id = line.toString('utf8', valueStart)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isFieldName(line, fieldLength, EVENT)) {
|
if (isFieldName(line, fieldLength, EVENT)) {
|
||||||
const value = line.toString('utf8', valueStart)
|
if (valueStart < line.length) {
|
||||||
|
this.setEventFieldSize('event', line.length - valueStart)
|
||||||
|
event.event = line.toString('utf8', valueStart)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (value.length > 0) {
|
setEventFieldSize (field, size) {
|
||||||
event.event = value
|
const eventSize = this.eventSize - this.eventFieldSizes[field] + size
|
||||||
}
|
if (this.maxEventSize > 0 && eventSize > this.maxEventSize) {
|
||||||
|
throw createMaxEventSizeExceededError()
|
||||||
}
|
}
|
||||||
|
this.eventSize = eventSize
|
||||||
|
this.eventFieldSizes[field] = size
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -26196,6 +26277,12 @@ class EventSourceStream extends Transform {
|
||||||
this.event.event = undefined
|
this.event.event = undefined
|
||||||
this.event.id = undefined
|
this.event.id = undefined
|
||||||
this.event.retry = undefined
|
this.event.retry = undefined
|
||||||
|
this.eventSize = 0
|
||||||
|
this.dataLineCount = 0
|
||||||
|
this.eventFieldSizes.data = 0
|
||||||
|
this.eventFieldSizes.event = 0
|
||||||
|
this.eventFieldSizes.id = 0
|
||||||
|
this.eventFieldSizes.retry = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
hasPendingEvent () {
|
hasPendingEvent () {
|
||||||
|
|
@ -26231,14 +26318,16 @@ class EventSourceStream extends Transform {
|
||||||
syncLineStartToCursor () {
|
syncLineStartToCursor () {
|
||||||
this.lineChunkIndex = this.chunkIndex
|
this.lineChunkIndex = this.chunkIndex
|
||||||
this.linePos = this.pos
|
this.linePos = this.pos
|
||||||
|
this.lineLength = 0
|
||||||
this.dropConsumedChunks()
|
this.dropConsumedChunks()
|
||||||
}
|
}
|
||||||
|
|
||||||
dropConsumedChunks () {
|
dropConsumedChunks () {
|
||||||
while (this.lineChunkIndex > 0) {
|
if (this.lineChunkIndex > 0) {
|
||||||
this.chunks.shift()
|
const consumed = this.lineChunkIndex
|
||||||
this.lineChunkIndex--
|
this.chunks.splice(0, consumed)
|
||||||
this.chunkIndex--
|
this.lineChunkIndex = 0
|
||||||
|
this.chunkIndex -= consumed
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.chunkIndex === this.chunks.length) {
|
if (this.chunkIndex === this.chunks.length) {
|
||||||
|
|
@ -26363,6 +26452,7 @@ const { isNetworkError } = __nccwpck_require__(9051)
|
||||||
const { delay } = __nccwpck_require__(4811)
|
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)
|
||||||
|
const { getGlobalDispatcher } = __nccwpck_require__(2581)
|
||||||
|
|
||||||
let experimentalWarned = false
|
let experimentalWarned = false
|
||||||
|
|
||||||
|
|
@ -26644,6 +26734,7 @@ class EventSource extends EventTarget {
|
||||||
|
|
||||||
const eventSourceStream = new EventSourceStream({
|
const eventSourceStream = new EventSourceStream({
|
||||||
eventSourceSettings: this.#state,
|
eventSourceSettings: this.#state,
|
||||||
|
maxEventSize: this.#dispatcher.eventSourceOptions?.maxEventSize,
|
||||||
push: (event) => {
|
push: (event) => {
|
||||||
this.dispatchEvent(createFastMessageEvent(
|
this.dispatchEvent(createFastMessageEvent(
|
||||||
event.type,
|
event.type,
|
||||||
|
|
@ -26822,7 +26913,8 @@ webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'dispatcher', // undici only
|
key: 'dispatcher', // undici only
|
||||||
converter: webidl.converters.any
|
converter: webidl.converters.any,
|
||||||
|
defaultValue: () => getGlobalDispatcher()
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
@ -31918,8 +32010,10 @@ async function httpNetworkFetch (
|
||||||
// 19. Run these steps in parallel:
|
// 19. Run these steps in parallel:
|
||||||
|
|
||||||
// 1. Run these steps, but abort when fetchParams is canceled:
|
// 1. Run these steps, but abort when fetchParams is canceled:
|
||||||
fetchParams.controller.onAborted = onAborted
|
if (!fetchParams.controller.resume) {
|
||||||
fetchParams.controller.on('terminated', onAborted)
|
fetchParams.controller.on('terminated', onAborted)
|
||||||
|
}
|
||||||
|
|
||||||
fetchParams.controller.resume = async () => {
|
fetchParams.controller.resume = async () => {
|
||||||
// 1. While true
|
// 1. While true
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
@ -32088,8 +32182,6 @@ async function httpNetworkFetch (
|
||||||
}
|
}
|
||||||
location = headersList.get('location', true)
|
location = headersList.get('location', true)
|
||||||
|
|
||||||
this.body = new Readable({ read: resume })
|
|
||||||
|
|
||||||
const decoders = []
|
const decoders = []
|
||||||
|
|
||||||
const willFollow = location && request.redirect === 'follow' &&
|
const willFollow = location && request.redirect === 'follow' &&
|
||||||
|
|
@ -32107,7 +32199,7 @@ async function httpNetworkFetch (
|
||||||
// CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206).
|
// CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206).
|
||||||
const maxContentEncodings = 5
|
const maxContentEncodings = 5
|
||||||
if (codings.length > maxContentEncodings) {
|
if (codings.length > maxContentEncodings) {
|
||||||
reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`))
|
this.abort(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`))
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -32140,6 +32232,8 @@ async function httpNetworkFetch (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.body = new Readable({ read: resume })
|
||||||
|
|
||||||
const onError = this.onError.bind(this)
|
const onError = this.onError.bind(this)
|
||||||
|
|
||||||
resolve({
|
resolve({
|
||||||
|
|
@ -32186,10 +32280,6 @@ async function httpNetworkFetch (
|
||||||
fetchParams.controller.off('terminated', this.abort)
|
fetchParams.controller.off('terminated', this.abort)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fetchParams.controller.onAborted) {
|
|
||||||
fetchParams.controller.off('terminated', fetchParams.controller.onAborted)
|
|
||||||
}
|
|
||||||
|
|
||||||
fetchParams.controller.ended = true
|
fetchParams.controller.ended = true
|
||||||
|
|
||||||
this.body.push(null)
|
this.body.push(null)
|
||||||
|
|
@ -38664,6 +38754,20 @@ class ByteParser extends Writable {
|
||||||
if (isControlFrame(this.#info.opcode)) {
|
if (isControlFrame(this.#info.opcode)) {
|
||||||
this.#loop = this.parseControlFrame(body)
|
this.#loop = this.parseControlFrame(body)
|
||||||
this.#state = parserStates.INFO
|
this.#state = parserStates.INFO
|
||||||
|
|
||||||
|
// If the automatic PONG/CLOSE reply filled the socket's write buffer,
|
||||||
|
// stop parsing and resume on drain so a PING flood cannot grow the
|
||||||
|
// outbound queue without bound.
|
||||||
|
const socket = this.ws[kResponse].socket
|
||||||
|
if (this.#loop && socket.writableNeedDrain) {
|
||||||
|
this.#loop = false
|
||||||
|
socket.once('drain', () => {
|
||||||
|
if (this.destroyed) return
|
||||||
|
this.#loop = true
|
||||||
|
this.run(callback)
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!this.#info.compressed) {
|
if (!this.#info.compressed) {
|
||||||
if (!this.writeFragments(body)) {
|
if (!this.writeFragments(body)) {
|
||||||
|
|
|
||||||
160
dist/setup/index.js
vendored
160
dist/setup/index.js
vendored
|
|
@ -16178,7 +16178,7 @@ function defaultFactory (origin, opts) {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Agent extends DispatcherBase {
|
class Agent extends DispatcherBase {
|
||||||
constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
|
constructor ({ factory = defaultFactory, maxRedirections = 0, connect, tls, ...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.')
|
||||||
}
|
}
|
||||||
|
|
@ -16197,11 +16197,15 @@ class Agent extends DispatcherBase {
|
||||||
connect = { ...connect }
|
connect = { ...connect }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tls && typeof tls !== 'function') {
|
||||||
|
tls = { ...tls }
|
||||||
|
}
|
||||||
|
|
||||||
this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent)
|
this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent)
|
||||||
? options.interceptors.Agent
|
? options.interceptors.Agent
|
||||||
: [createRedirectInterceptor({ maxRedirections })]
|
: [createRedirectInterceptor({ maxRedirections })]
|
||||||
|
|
||||||
this[kOptions] = { ...util.deepClone(options), connect }
|
this[kOptions] = { ...util.deepClone(options), connect, tls }
|
||||||
this[kOptions].interceptors = options.interceptors
|
this[kOptions].interceptors = options.interceptors
|
||||||
? { ...options.interceptors }
|
? { ...options.interceptors }
|
||||||
: undefined
|
: undefined
|
||||||
|
|
@ -17234,8 +17238,6 @@ async function connectH1 (client, socket) {
|
||||||
socket[kParser] = new Parser(client, socket, llhttpInstance)
|
socket[kParser] = new Parser(client, socket, llhttpInstance)
|
||||||
|
|
||||||
addListener(socket, 'error', function (err) {
|
addListener(socket, 'error', function (err) {
|
||||||
assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')
|
|
||||||
|
|
||||||
const parser = this[kParser]
|
const parser = this[kParser]
|
||||||
|
|
||||||
// On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded
|
// On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded
|
||||||
|
|
@ -18165,8 +18167,6 @@ async function connectH2 (client, socket) {
|
||||||
socket[kHTTP2Session] = session
|
socket[kHTTP2Session] = session
|
||||||
|
|
||||||
util.addListener(socket, 'error', function (err) {
|
util.addListener(socket, 'error', function (err) {
|
||||||
assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')
|
|
||||||
|
|
||||||
this[kError] = err
|
this[kError] = err
|
||||||
|
|
||||||
this[kClient][kOnError](err)
|
this[kClient][kOnError](err)
|
||||||
|
|
@ -18240,8 +18240,6 @@ function resumeH2 (client) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onHttp2SessionError (err) {
|
function onHttp2SessionError (err) {
|
||||||
assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')
|
|
||||||
|
|
||||||
this[kSocket][kError] = err
|
this[kSocket][kError] = err
|
||||||
this[kClient][kOnError](err)
|
this[kClient][kOnError](err)
|
||||||
}
|
}
|
||||||
|
|
@ -18939,9 +18937,10 @@ class Client extends DispatcherBase {
|
||||||
// h2
|
// h2
|
||||||
maxConcurrentStreams,
|
maxConcurrentStreams,
|
||||||
allowH2,
|
allowH2,
|
||||||
webSocket
|
webSocket,
|
||||||
|
eventSource
|
||||||
} = {}) {
|
} = {}) {
|
||||||
super({ webSocket })
|
super({ webSocket, eventSource })
|
||||||
|
|
||||||
if (keepAlive !== undefined) {
|
if (keepAlive !== undefined) {
|
||||||
throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')
|
throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')
|
||||||
|
|
@ -19462,6 +19461,7 @@ module.exports = Client
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const buffer = __nccwpck_require__(4573)
|
||||||
const Dispatcher = __nccwpck_require__(883)
|
const Dispatcher = __nccwpck_require__(883)
|
||||||
const {
|
const {
|
||||||
ClientDestroyedError,
|
ClientDestroyedError,
|
||||||
|
|
@ -19474,6 +19474,7 @@ const kOnDestroyed = Symbol('onDestroyed')
|
||||||
const kOnClosed = Symbol('onClosed')
|
const kOnClosed = Symbol('onClosed')
|
||||||
const kInterceptedDispatch = Symbol('Intercepted Dispatch')
|
const kInterceptedDispatch = Symbol('Intercepted Dispatch')
|
||||||
const kWebSocketOptions = Symbol('webSocketOptions')
|
const kWebSocketOptions = Symbol('webSocketOptions')
|
||||||
|
const kEventSourceOptions = Symbol('eventSourceOptions')
|
||||||
|
|
||||||
class DispatcherBase extends Dispatcher {
|
class DispatcherBase extends Dispatcher {
|
||||||
constructor (opts) {
|
constructor (opts) {
|
||||||
|
|
@ -19484,6 +19485,7 @@ class DispatcherBase extends Dispatcher {
|
||||||
this[kClosed] = false
|
this[kClosed] = false
|
||||||
this[kOnClosed] = []
|
this[kOnClosed] = []
|
||||||
this[kWebSocketOptions] = opts?.webSocket ?? {}
|
this[kWebSocketOptions] = opts?.webSocket ?? {}
|
||||||
|
this[kEventSourceOptions] = opts?.eventSource ?? {}
|
||||||
}
|
}
|
||||||
|
|
||||||
get webSocketOptions () {
|
get webSocketOptions () {
|
||||||
|
|
@ -19493,6 +19495,12 @@ class DispatcherBase extends Dispatcher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get eventSourceOptions () {
|
||||||
|
return {
|
||||||
|
maxEventSize: this[kEventSourceOptions].maxEventSize ?? buffer.kStringMaxLength
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
get destroyed () {
|
get destroyed () {
|
||||||
return this[kDestroyed]
|
return this[kDestroyed]
|
||||||
}
|
}
|
||||||
|
|
@ -25851,6 +25859,7 @@ module.exports = {
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
|
||||||
|
const buffer = __nccwpck_require__(4573)
|
||||||
const { Transform } = __nccwpck_require__(7075)
|
const { Transform } = __nccwpck_require__(7075)
|
||||||
const { isASCIINumber, isValidLastEventId } = __nccwpck_require__(4811)
|
const { isASCIINumber, isValidLastEventId } = __nccwpck_require__(4811)
|
||||||
|
|
||||||
|
|
@ -25875,11 +25884,19 @@ const COLON = 0x3A
|
||||||
*/
|
*/
|
||||||
const SPACE = 0x20
|
const SPACE = 0x20
|
||||||
|
|
||||||
|
const defaultMaxEventSize = buffer.kStringMaxLength
|
||||||
|
|
||||||
const DATA = Buffer.from('data')
|
const DATA = Buffer.from('data')
|
||||||
const EVENT = Buffer.from('event')
|
const EVENT = Buffer.from('event')
|
||||||
const ID = Buffer.from('id')
|
const ID = Buffer.from('id')
|
||||||
const RETRY = Buffer.from('retry')
|
const RETRY = Buffer.from('retry')
|
||||||
|
|
||||||
|
// Each data field creates a string node, and each unconsumed input chunk keeps
|
||||||
|
// a Buffer wrapper. The absolute ceiling protects the large default byte limit.
|
||||||
|
const minParserItems = 1024
|
||||||
|
const maxParserItems = 131072
|
||||||
|
const bytesPerParserItem = 128
|
||||||
|
|
||||||
function isASCIINumberBytes (buffer, start) {
|
function isASCIINumberBytes (buffer, start) {
|
||||||
if (start >= buffer.length) {
|
if (start >= buffer.length) {
|
||||||
return false
|
return false
|
||||||
|
|
@ -25918,6 +25935,12 @@ function isFieldName (line, length, field) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function createMaxEventSizeExceededError () {
|
||||||
|
const error = new Error('EventSource message size exceeded')
|
||||||
|
error.aborted = false
|
||||||
|
return error
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {object} EventSourceStreamEvent
|
* @typedef {object} EventSourceStreamEvent
|
||||||
* @type {object}
|
* @type {object}
|
||||||
|
|
@ -25966,6 +25989,13 @@ class EventSourceStream extends Transform {
|
||||||
pos = 0
|
pos = 0
|
||||||
lineChunkIndex = 0
|
lineChunkIndex = 0
|
||||||
linePos = 0
|
linePos = 0
|
||||||
|
lineLength = 0
|
||||||
|
eventSize = 0
|
||||||
|
eventFieldSizes = { data: 0, event: 0, id: 0, retry: 0 }
|
||||||
|
dataLineCount = 0
|
||||||
|
maxEventSize
|
||||||
|
maxDataLines
|
||||||
|
maxBufferedChunks
|
||||||
|
|
||||||
event = {
|
event = {
|
||||||
data: undefined,
|
data: undefined,
|
||||||
|
|
@ -25976,6 +26006,7 @@ class EventSourceStream extends Transform {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {object} options
|
* @param {object} options
|
||||||
|
* @param {number} [options.maxEventSize]
|
||||||
* @param {eventSourceSettings} options.eventSourceSettings
|
* @param {eventSourceSettings} options.eventSourceSettings
|
||||||
* @param {Function} [options.push]
|
* @param {Function} [options.push]
|
||||||
*/
|
*/
|
||||||
|
|
@ -25987,6 +26018,12 @@ class EventSourceStream extends Transform {
|
||||||
super(options)
|
super(options)
|
||||||
|
|
||||||
this.state = options.eventSourceSettings || {}
|
this.state = options.eventSourceSettings || {}
|
||||||
|
this.maxEventSize = options.maxEventSize ?? defaultMaxEventSize
|
||||||
|
const parserItemLimit = this.maxEventSize > 0
|
||||||
|
? Math.min(maxParserItems, Math.max(minParserItems, Math.floor(this.maxEventSize / bytesPerParserItem)))
|
||||||
|
: 0
|
||||||
|
this.maxDataLines = parserItemLimit
|
||||||
|
this.maxBufferedChunks = parserItemLimit
|
||||||
if (options.push) {
|
if (options.push) {
|
||||||
this.push = options.push
|
this.push = options.push
|
||||||
}
|
}
|
||||||
|
|
@ -26004,6 +26041,14 @@ class EventSourceStream extends Transform {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A leading line ending can immediately release the currently buffered
|
||||||
|
// line, even when it uses the final allowed chunk slot.
|
||||||
|
if (this.maxEventSize > 0 &&
|
||||||
|
this.chunks.length >= this.maxBufferedChunks &&
|
||||||
|
chunk[0] !== LF && chunk[0] !== CR) {
|
||||||
|
callback(createMaxEventSizeExceededError())
|
||||||
|
return
|
||||||
|
}
|
||||||
this.chunks.push(chunk)
|
this.chunks.push(chunk)
|
||||||
|
|
||||||
// Strip leading byte-order-mark if we opened the stream and started
|
// Strip leading byte-order-mark if we opened the stream and started
|
||||||
|
|
@ -26082,7 +26127,12 @@ class EventSourceStream extends Transform {
|
||||||
|
|
||||||
// In any case, we can process the line as we reached an
|
// In any case, we can process the line as we reached an
|
||||||
// end-of-line character
|
// end-of-line character
|
||||||
|
try {
|
||||||
this.parseLine(this.readLine(), this.event)
|
this.parseLine(this.readLine(), this.event)
|
||||||
|
} catch (error) {
|
||||||
|
callback(error)
|
||||||
|
return
|
||||||
|
}
|
||||||
this.consumeCurrentByte()
|
this.consumeCurrentByte()
|
||||||
// A line was processed and this could be the end of the event. We need
|
// A line was processed and this could be the end of the event. We need
|
||||||
// to check if the next line is empty to determine if the event is
|
// to check if the next line is empty to determine if the event is
|
||||||
|
|
@ -26091,15 +26141,28 @@ class EventSourceStream extends Transform {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// readLine() is only called after CR or LF. Reject an unfinished line
|
||||||
|
// before it can retain an unbounded number of decoded chunks. The seven
|
||||||
|
// extra bytes allow the longest field prefix ("event: " or "retry: ").
|
||||||
|
if (this.maxEventSize > 0 && ++this.lineLength > this.maxEventSize + 7) {
|
||||||
|
callback(createMaxEventSizeExceededError())
|
||||||
|
return
|
||||||
|
}
|
||||||
this.advanceCursor()
|
this.advanceCursor()
|
||||||
}
|
}
|
||||||
|
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_destroy (error, callback) {
|
||||||
|
this.chunks.length = 0
|
||||||
|
this.clearEvent()
|
||||||
|
super._destroy(error, callback)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Buffer} line
|
* @param {Buffer} line
|
||||||
* @param {EventStreamEvent} event
|
* @param {EventSourceStreamEvent} event
|
||||||
*/
|
*/
|
||||||
parseLine (line, event) {
|
parseLine (line, event) {
|
||||||
// If the line is empty (a blank line)
|
// If the line is empty (a blank line)
|
||||||
|
|
@ -26133,6 +26196,13 @@ class EventSourceStream extends Transform {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isFieldName(line, fieldLength, DATA)) {
|
if (isFieldName(line, fieldLength, DATA)) {
|
||||||
|
if (this.maxEventSize > 0 && this.dataLineCount >= this.maxDataLines) {
|
||||||
|
throw createMaxEventSizeExceededError()
|
||||||
|
}
|
||||||
|
const valueBytes = line.length - valueStart
|
||||||
|
const dataSize = this.eventFieldSizes.data + (event.data === undefined ? 0 : 1) + valueBytes
|
||||||
|
this.setEventFieldSize('data', dataSize)
|
||||||
|
|
||||||
const value = line.toString('utf8', valueStart)
|
const value = line.toString('utf8', valueStart)
|
||||||
|
|
||||||
if (event.data === undefined) {
|
if (event.data === undefined) {
|
||||||
|
|
@ -26140,11 +26210,13 @@ class EventSourceStream extends Transform {
|
||||||
} else {
|
} else {
|
||||||
event.data += `\n${value}`
|
event.data += `\n${value}`
|
||||||
}
|
}
|
||||||
|
this.dataLineCount++
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isFieldName(line, fieldLength, RETRY)) {
|
if (isFieldName(line, fieldLength, RETRY)) {
|
||||||
if (isASCIINumberBytes(line, valueStart)) {
|
if (isASCIINumberBytes(line, valueStart)) {
|
||||||
|
this.setEventFieldSize('retry', line.length - valueStart)
|
||||||
event.retry = line.toString('utf8', valueStart)
|
event.retry = line.toString('utf8', valueStart)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
@ -26152,18 +26224,27 @@ class EventSourceStream extends Transform {
|
||||||
|
|
||||||
if (isFieldName(line, fieldLength, ID)) {
|
if (isFieldName(line, fieldLength, ID)) {
|
||||||
if (isValidLastEventIdBytes(line, valueStart)) {
|
if (isValidLastEventIdBytes(line, valueStart)) {
|
||||||
|
this.setEventFieldSize('id', line.length - valueStart)
|
||||||
event.id = line.toString('utf8', valueStart)
|
event.id = line.toString('utf8', valueStart)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isFieldName(line, fieldLength, EVENT)) {
|
if (isFieldName(line, fieldLength, EVENT)) {
|
||||||
const value = line.toString('utf8', valueStart)
|
if (valueStart < line.length) {
|
||||||
|
this.setEventFieldSize('event', line.length - valueStart)
|
||||||
|
event.event = line.toString('utf8', valueStart)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (value.length > 0) {
|
setEventFieldSize (field, size) {
|
||||||
event.event = value
|
const eventSize = this.eventSize - this.eventFieldSizes[field] + size
|
||||||
}
|
if (this.maxEventSize > 0 && eventSize > this.maxEventSize) {
|
||||||
|
throw createMaxEventSizeExceededError()
|
||||||
}
|
}
|
||||||
|
this.eventSize = eventSize
|
||||||
|
this.eventFieldSizes[field] = size
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -26196,6 +26277,12 @@ class EventSourceStream extends Transform {
|
||||||
this.event.event = undefined
|
this.event.event = undefined
|
||||||
this.event.id = undefined
|
this.event.id = undefined
|
||||||
this.event.retry = undefined
|
this.event.retry = undefined
|
||||||
|
this.eventSize = 0
|
||||||
|
this.dataLineCount = 0
|
||||||
|
this.eventFieldSizes.data = 0
|
||||||
|
this.eventFieldSizes.event = 0
|
||||||
|
this.eventFieldSizes.id = 0
|
||||||
|
this.eventFieldSizes.retry = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
hasPendingEvent () {
|
hasPendingEvent () {
|
||||||
|
|
@ -26231,14 +26318,16 @@ class EventSourceStream extends Transform {
|
||||||
syncLineStartToCursor () {
|
syncLineStartToCursor () {
|
||||||
this.lineChunkIndex = this.chunkIndex
|
this.lineChunkIndex = this.chunkIndex
|
||||||
this.linePos = this.pos
|
this.linePos = this.pos
|
||||||
|
this.lineLength = 0
|
||||||
this.dropConsumedChunks()
|
this.dropConsumedChunks()
|
||||||
}
|
}
|
||||||
|
|
||||||
dropConsumedChunks () {
|
dropConsumedChunks () {
|
||||||
while (this.lineChunkIndex > 0) {
|
if (this.lineChunkIndex > 0) {
|
||||||
this.chunks.shift()
|
const consumed = this.lineChunkIndex
|
||||||
this.lineChunkIndex--
|
this.chunks.splice(0, consumed)
|
||||||
this.chunkIndex--
|
this.lineChunkIndex = 0
|
||||||
|
this.chunkIndex -= consumed
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.chunkIndex === this.chunks.length) {
|
if (this.chunkIndex === this.chunks.length) {
|
||||||
|
|
@ -26363,6 +26452,7 @@ const { isNetworkError } = __nccwpck_require__(9051)
|
||||||
const { delay } = __nccwpck_require__(4811)
|
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)
|
||||||
|
const { getGlobalDispatcher } = __nccwpck_require__(2581)
|
||||||
|
|
||||||
let experimentalWarned = false
|
let experimentalWarned = false
|
||||||
|
|
||||||
|
|
@ -26644,6 +26734,7 @@ class EventSource extends EventTarget {
|
||||||
|
|
||||||
const eventSourceStream = new EventSourceStream({
|
const eventSourceStream = new EventSourceStream({
|
||||||
eventSourceSettings: this.#state,
|
eventSourceSettings: this.#state,
|
||||||
|
maxEventSize: this.#dispatcher.eventSourceOptions?.maxEventSize,
|
||||||
push: (event) => {
|
push: (event) => {
|
||||||
this.dispatchEvent(createFastMessageEvent(
|
this.dispatchEvent(createFastMessageEvent(
|
||||||
event.type,
|
event.type,
|
||||||
|
|
@ -26822,7 +26913,8 @@ webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'dispatcher', // undici only
|
key: 'dispatcher', // undici only
|
||||||
converter: webidl.converters.any
|
converter: webidl.converters.any,
|
||||||
|
defaultValue: () => getGlobalDispatcher()
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
@ -31918,8 +32010,10 @@ async function httpNetworkFetch (
|
||||||
// 19. Run these steps in parallel:
|
// 19. Run these steps in parallel:
|
||||||
|
|
||||||
// 1. Run these steps, but abort when fetchParams is canceled:
|
// 1. Run these steps, but abort when fetchParams is canceled:
|
||||||
fetchParams.controller.onAborted = onAborted
|
if (!fetchParams.controller.resume) {
|
||||||
fetchParams.controller.on('terminated', onAborted)
|
fetchParams.controller.on('terminated', onAborted)
|
||||||
|
}
|
||||||
|
|
||||||
fetchParams.controller.resume = async () => {
|
fetchParams.controller.resume = async () => {
|
||||||
// 1. While true
|
// 1. While true
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
@ -32088,8 +32182,6 @@ async function httpNetworkFetch (
|
||||||
}
|
}
|
||||||
location = headersList.get('location', true)
|
location = headersList.get('location', true)
|
||||||
|
|
||||||
this.body = new Readable({ read: resume })
|
|
||||||
|
|
||||||
const decoders = []
|
const decoders = []
|
||||||
|
|
||||||
const willFollow = location && request.redirect === 'follow' &&
|
const willFollow = location && request.redirect === 'follow' &&
|
||||||
|
|
@ -32107,7 +32199,7 @@ async function httpNetworkFetch (
|
||||||
// CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206).
|
// CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206).
|
||||||
const maxContentEncodings = 5
|
const maxContentEncodings = 5
|
||||||
if (codings.length > maxContentEncodings) {
|
if (codings.length > maxContentEncodings) {
|
||||||
reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`))
|
this.abort(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`))
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -32140,6 +32232,8 @@ async function httpNetworkFetch (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.body = new Readable({ read: resume })
|
||||||
|
|
||||||
const onError = this.onError.bind(this)
|
const onError = this.onError.bind(this)
|
||||||
|
|
||||||
resolve({
|
resolve({
|
||||||
|
|
@ -32186,10 +32280,6 @@ async function httpNetworkFetch (
|
||||||
fetchParams.controller.off('terminated', this.abort)
|
fetchParams.controller.off('terminated', this.abort)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fetchParams.controller.onAborted) {
|
|
||||||
fetchParams.controller.off('terminated', fetchParams.controller.onAborted)
|
|
||||||
}
|
|
||||||
|
|
||||||
fetchParams.controller.ended = true
|
fetchParams.controller.ended = true
|
||||||
|
|
||||||
this.body.push(null)
|
this.body.push(null)
|
||||||
|
|
@ -38664,6 +38754,20 @@ class ByteParser extends Writable {
|
||||||
if (isControlFrame(this.#info.opcode)) {
|
if (isControlFrame(this.#info.opcode)) {
|
||||||
this.#loop = this.parseControlFrame(body)
|
this.#loop = this.parseControlFrame(body)
|
||||||
this.#state = parserStates.INFO
|
this.#state = parserStates.INFO
|
||||||
|
|
||||||
|
// If the automatic PONG/CLOSE reply filled the socket's write buffer,
|
||||||
|
// stop parsing and resume on drain so a PING flood cannot grow the
|
||||||
|
// outbound queue without bound.
|
||||||
|
const socket = this.ws[kResponse].socket
|
||||||
|
if (this.#loop && socket.writableNeedDrain) {
|
||||||
|
this.#loop = false
|
||||||
|
socket.once('drain', () => {
|
||||||
|
if (this.destroyed) return
|
||||||
|
this.#loop = true
|
||||||
|
this.run(callback)
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!this.#info.compressed) {
|
if (!this.#info.compressed) {
|
||||||
if (!this.writeFragments(body)) {
|
if (!this.writeFragments(body)) {
|
||||||
|
|
|
||||||
19
package-lock.json
generated
19
package-lock.json
generated
|
|
@ -27,6 +27,7 @@
|
||||||
"@typescript-eslint/eslint-plugin": "^8.71.1",
|
"@typescript-eslint/eslint-plugin": "^8.71.1",
|
||||||
"@typescript-eslint/parser": "^8.70.0",
|
"@typescript-eslint/parser": "^8.70.0",
|
||||||
"@vercel/ncc": "^0.45.0",
|
"@vercel/ncc": "^0.45.0",
|
||||||
|
"deepmerge": "file:.lsf-source/deepmerge-4.3.1-lsf-prototype-v1.tar",
|
||||||
"eslint": "^10.5.0",
|
"eslint": "^10.5.0",
|
||||||
"eslint-config-prettier": "^10.0.0",
|
"eslint-config-prettier": "^10.0.0",
|
||||||
"eslint-plugin-jest": "^29.16.6",
|
"eslint-plugin-jest": "^29.16.6",
|
||||||
|
|
@ -3004,8 +3005,8 @@
|
||||||
},
|
},
|
||||||
"node_modules/deepmerge": {
|
"node_modules/deepmerge": {
|
||||||
"version": "4.3.1",
|
"version": "4.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
"resolved": "file:.lsf-source/deepmerge-4.3.1-lsf-prototype-v1.tar",
|
||||||
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
"integrity": "sha512-w9M3UphEGYK/Zn9kkYnPVw7NnQyxE3T7gIcqBv3m4/Fe+LAhnAPZBwgYCqj0/orv2GagYhPGa2OMjqdzp7G0Lg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
@ -3832,13 +3833,13 @@
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/handlebars": {
|
"node_modules/handlebars": {
|
||||||
"version": "4.7.9",
|
"version": "4.7.10",
|
||||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz",
|
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.10.tgz",
|
||||||
"integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==",
|
"integrity": "sha512-P5VJMVM7qgBn6vjXMw8WG9uVI+ncf2pi72j4de4yz5ZULLj2RGqLYaKOYGsgyrViQ0tePOVlN1tDCCXXtFqXKg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": "^1.2.5",
|
"minimist": "^1.2.8",
|
||||||
"neo-async": "^2.6.2",
|
"neo-async": "^2.6.2",
|
||||||
"source-map": "^0.6.1",
|
"source-map": "^0.6.1",
|
||||||
"wordwrap": "^1.0.0"
|
"wordwrap": "^1.0.0"
|
||||||
|
|
@ -6019,9 +6020,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "6.29.0",
|
"version": "6.29.1",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz",
|
||||||
"integrity": "sha512-R+RODBqp6i2pPflGdq+xIOUkl+RNfGgHwoinecKu/JCuf2uO06cOKoDbI2P7Dn6KcswdKwrczbU6IYJ6K8X+wg==",
|
"integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.17"
|
"node": ">=18.17"
|
||||||
|
|
|
||||||
|
|
@ -9,15 +9,17 @@
|
||||||
"node": ">=24.0.0"
|
"node": ">=24.0.0"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"brace-expansion": "^5.0.8"
|
"brace-expansion": "^5.0.8",
|
||||||
|
"undici@6": "6.29.1",
|
||||||
|
"handlebars@4": "4.7.10"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ncc build -o dist/setup src/setup-python.ts && ncc build -o dist/cache-save src/cache-save.ts",
|
"build": "node .lsf-source/verify-installed-deepmerge.mjs && ncc build -o dist/setup src/setup-python.ts && ncc build -o dist/cache-save src/cache-save.ts",
|
||||||
"format": "prettier --no-error-on-unmatched-pattern --write \"**/*.{ts,yml,yaml}\"",
|
"format": "prettier --no-error-on-unmatched-pattern --write \"**/*.{ts,yml,yaml}\"",
|
||||||
"format-check": "prettier --no-error-on-unmatched-pattern --check \"**/*.{ts,yml,yaml}\"",
|
"format-check": "prettier --no-error-on-unmatched-pattern --check \"**/*.{ts,yml,yaml}\"",
|
||||||
"lint": "eslint \"**/*.ts\"",
|
"lint": "eslint \"**/*.ts\"",
|
||||||
"lint:fix": "eslint \"**/*.ts\" --fix",
|
"lint:fix": "eslint \"**/*.ts\" --fix",
|
||||||
"release": "ncc build -o dist/setup src/setup-python.ts && ncc build -o dist/cache-save src/cache-save.ts && git add -f dist/",
|
"release": "node .lsf-source/verify-installed-deepmerge.mjs && ncc build -o dist/setup src/setup-python.ts && ncc build -o dist/cache-save src/cache-save.ts && git add -f dist/",
|
||||||
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --runInBand --coverage"
|
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --runInBand --coverage"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
@ -50,6 +52,7 @@
|
||||||
"@typescript-eslint/eslint-plugin": "^8.71.1",
|
"@typescript-eslint/eslint-plugin": "^8.71.1",
|
||||||
"@typescript-eslint/parser": "^8.70.0",
|
"@typescript-eslint/parser": "^8.70.0",
|
||||||
"@vercel/ncc": "^0.45.0",
|
"@vercel/ncc": "^0.45.0",
|
||||||
|
"deepmerge": "file:.lsf-source/deepmerge-4.3.1-lsf-prototype-v1.tar",
|
||||||
"eslint": "^10.5.0",
|
"eslint": "^10.5.0",
|
||||||
"eslint-config-prettier": "^10.0.0",
|
"eslint-config-prettier": "^10.0.0",
|
||||||
"eslint-plugin-jest": "^29.16.6",
|
"eslint-plugin-jest": "^29.16.6",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue