diff --git a/deps/undici/src/docs/docs/api/Client.md b/deps/undici/src/docs/docs/api/Client.md index 2276f737c36611..03342f59959db0 100644 --- a/deps/undici/src/docs/docs/api/Client.md +++ b/deps/undici/src/docs/docs/api/Client.md @@ -19,7 +19,7 @@ Returns: `Client` > ⚠️ Warning: The `H2` support is experimental. -* **bodyTimeout** `number | null` (optional) - Default: `300e3` - The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Defaults to 300 seconds. +* **bodyTimeout** `number | null` (optional) - Default: `300e3` - The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Defaults to 300 seconds. Please note the `timeout` will be reset if you keep writing data to the scoket everytime. * **headersTimeout** `number | null` (optional) - Default: `300e3` - The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers while not sending the request. Defaults to 300 seconds. * **keepAliveMaxTimeout** `number | null` (optional) - Default: `600e3` - The maximum allowed `keepAliveTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Defaults to 10 minutes. * **keepAliveTimeout** `number | null` (optional) - Default: `4e3` - The timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. See [MDN: HTTP - Headers - Keep-Alive directives](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive#directives) for more details. Defaults to 4 seconds. diff --git a/deps/undici/src/lib/core/connect.js b/deps/undici/src/lib/core/connect.js index 4ad2c91d2cb99c..b388f022298391 100644 --- a/deps/undici/src/lib/core/connect.js +++ b/deps/undici/src/lib/core/connect.js @@ -73,7 +73,7 @@ if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env } } -function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { +function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') } @@ -91,7 +91,7 @@ function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...o servername = servername || options.servername || util.getServerName(host) || null const sessionKey = servername || hostname - const session = sessionCache.get(sessionKey) || null + const session = customSession || sessionCache.get(sessionKey) || null assert(sessionKey) diff --git a/deps/undici/src/lib/core/request.js b/deps/undici/src/lib/core/request.js index c44cd0891f5f1b..78003038ba97b0 100644 --- a/deps/undici/src/lib/core/request.js +++ b/deps/undici/src/lib/core/request.js @@ -16,7 +16,8 @@ const { isBlobLike, buildURL, validateHandler, - getServerName + getServerName, + normalizedMethodRecords } = require('./util') const { channels } = require('./diagnostics.js') const { headerNameLowerCasedRecord } = require('./constants') @@ -51,13 +52,13 @@ class Request { method !== 'CONNECT' ) { throw new InvalidArgumentError('path must be an absolute URL or start with a slash') - } else if (invalidPathRegex.exec(path) !== null) { + } else if (invalidPathRegex.test(path)) { throw new InvalidArgumentError('invalid request path') } if (typeof method !== 'string') { throw new InvalidArgumentError('method must be a string') - } else if (!isValidHTTPToken(method)) { + } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) { throw new InvalidArgumentError('invalid request method') } diff --git a/deps/undici/src/lib/core/util.js b/deps/undici/src/lib/core/util.js index ddb72d226ced09..00f8a9b200a99f 100644 --- a/deps/undici/src/lib/core/util.js +++ b/deps/undici/src/lib/core/util.js @@ -645,6 +645,31 @@ function errorRequest (client, request, err) { const kEnumerableProperty = Object.create(null) kEnumerableProperty.enumerable = true +const normalizedMethodRecordsBase = { + delete: 'DELETE', + DELETE: 'DELETE', + get: 'GET', + GET: 'GET', + head: 'HEAD', + HEAD: 'HEAD', + options: 'OPTIONS', + OPTIONS: 'OPTIONS', + post: 'POST', + POST: 'POST', + put: 'PUT', + PUT: 'PUT' +} + +const normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: 'patch', + PATCH: 'PATCH' +} + +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(normalizedMethodRecordsBase, null) +Object.setPrototypeOf(normalizedMethodRecords, null) + module.exports = { kEnumerableProperty, nop, @@ -683,6 +708,8 @@ module.exports = { isValidHeaderValue, isTokenCharCode, parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, isValidPort, isHttpOrHttpsPrefixed, nodeMajor, diff --git a/deps/undici/src/lib/dispatcher/client-h1.js b/deps/undici/src/lib/dispatcher/client-h1.js index c537ed838ec272..2f1c96724d3951 100644 --- a/deps/undici/src/lib/dispatcher/client-h1.js +++ b/deps/undici/src/lib/dispatcher/client-h1.js @@ -978,19 +978,19 @@ function writeH1 (client, request) { /* istanbul ignore else: assertion */ if (!body || bodyLength === 0) { - writeBuffer({ abort, body: null, client, request, socket, contentLength, header, expectsPayload }) + writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload) } else if (util.isBuffer(body)) { - writeBuffer({ abort, body, client, request, socket, contentLength, header, expectsPayload }) + writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) } else if (util.isBlobLike(body)) { if (typeof body.stream === 'function') { - writeIterable({ abort, body: body.stream(), client, request, socket, contentLength, header, expectsPayload }) + writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload) } else { - writeBlob({ abort, body, client, request, socket, contentLength, header, expectsPayload }) + writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) } } else if (util.isStream(body)) { - writeStream({ abort, body, client, request, socket, contentLength, header, expectsPayload }) + writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) } else if (util.isIterable(body)) { - writeIterable({ abort, body, client, request, socket, contentLength, header, expectsPayload }) + writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) } else { assert(false) } @@ -998,7 +998,7 @@ function writeH1 (client, request) { return true } -function writeStream ({ abort, body, client, request, socket, contentLength, header, expectsPayload }) { +function writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') let finished = false @@ -1101,7 +1101,7 @@ function writeStream ({ abort, body, client, request, socket, contentLength, hea } } -function writeBuffer ({ abort, body, client, request, socket, contentLength, header, expectsPayload }) { +function writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) { try { if (!body) { if (contentLength === 0) { @@ -1131,7 +1131,7 @@ function writeBuffer ({ abort, body, client, request, socket, contentLength, hea } } -async function writeBlob ({ abort, body, client, request, socket, contentLength, header, expectsPayload }) { +async function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) { assert(contentLength === body.size, 'blob body must have content length') try { @@ -1159,7 +1159,7 @@ async function writeBlob ({ abort, body, client, request, socket, contentLength, } } -async function writeIterable ({ abort, body, client, request, socket, contentLength, header, expectsPayload }) { +async function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') let callback = null diff --git a/deps/undici/src/lib/dispatcher/client-h2.js b/deps/undici/src/lib/dispatcher/client-h2.js index c78fe602c4890f..6c5155717d184d 100644 --- a/deps/undici/src/lib/dispatcher/client-h2.js +++ b/deps/undici/src/lib/dispatcher/client-h2.js @@ -477,82 +477,80 @@ function writeH2 (client, request) { function writeBodyH2 () { /* istanbul ignore else: assertion */ if (!body || contentLength === 0) { - writeBuffer({ + writeBuffer( abort, + stream, + null, client, request, + client[kSocket], contentLength, - expectsPayload, - h2stream: stream, - body: null, - socket: client[kSocket] - }) + expectsPayload + ) } else if (util.isBuffer(body)) { - writeBuffer({ + writeBuffer( abort, + stream, + body, client, request, + client[kSocket], contentLength, - body, - expectsPayload, - h2stream: stream, - socket: client[kSocket] - }) + expectsPayload + ) } else if (util.isBlobLike(body)) { if (typeof body.stream === 'function') { - writeIterable({ + writeIterable( abort, + stream, + body.stream(), client, request, + client[kSocket], contentLength, - expectsPayload, - h2stream: stream, - body: body.stream(), - socket: client[kSocket] - }) + expectsPayload + ) } else { - writeBlob({ + writeBlob( abort, + stream, body, client, request, + client[kSocket], contentLength, - expectsPayload, - h2stream: stream, - socket: client[kSocket] - }) + expectsPayload + ) } } else if (util.isStream(body)) { - writeStream({ + writeStream( abort, + client[kSocket], + expectsPayload, + stream, body, client, request, - contentLength, - expectsPayload, - socket: client[kSocket], - h2stream: stream, - header: '' - }) + contentLength + ) } else if (util.isIterable(body)) { - writeIterable({ + writeIterable( abort, + stream, body, client, request, + client[kSocket], contentLength, - expectsPayload, - header: '', - h2stream: stream, - socket: client[kSocket] - }) + expectsPayload + ) } else { assert(false) } } } -function writeBuffer ({ abort, h2stream, body, client, request, socket, contentLength, expectsPayload }) { +function writeBuffer (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { try { if (body != null && util.isBuffer(body)) { assert(contentLength === body.byteLength, 'buffer body must have content length') @@ -575,7 +573,7 @@ function writeBuffer ({ abort, h2stream, body, client, request, socket, contentL } } -function writeStream ({ abort, socket, expectsPayload, h2stream, body, client, request, contentLength }) { +function writeStream (abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') // For HTTP/2, is enough to pipe the stream @@ -606,7 +604,7 @@ function writeStream ({ abort, socket, expectsPayload, h2stream, body, client, r } } -async function writeBlob ({ abort, h2stream, body, client, request, socket, contentLength, expectsPayload }) { +async function writeBlob (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { assert(contentLength === body.size, 'blob body must have content length') try { @@ -634,7 +632,7 @@ async function writeBlob ({ abort, h2stream, body, client, request, socket, cont } } -async function writeIterable ({ abort, h2stream, body, client, request, socket, contentLength, expectsPayload }) { +async function writeIterable (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') let callback = null diff --git a/deps/undici/src/lib/handler/retry-handler.js b/deps/undici/src/lib/handler/retry-handler.js index fcd9f0df5131da..f7dedfa4bac35b 100644 --- a/deps/undici/src/lib/handler/retry-handler.js +++ b/deps/undici/src/lib/handler/retry-handler.js @@ -202,7 +202,7 @@ class RetryHandler { this.abort( new RequestRetryError('Content-Range mismatch', statusCode, { headers, - count: this.retryCount + data: { count: this.retryCount } }) ) return false @@ -213,7 +213,7 @@ class RetryHandler { this.abort( new RequestRetryError('ETag mismatch', statusCode, { headers, - count: this.retryCount + data: { count: this.retryCount } }) ) return false diff --git a/deps/undici/src/lib/web/fetch/body.js b/deps/undici/src/lib/web/fetch/body.js index 5b14d22d27a854..55718ac7c8165d 100644 --- a/deps/undici/src/lib/web/fetch/body.js +++ b/deps/undici/src/lib/web/fetch/body.js @@ -309,7 +309,7 @@ function bodyMixinMethods (instance) { // Return a Blob whose contents are bytes and type attribute // is mimeType. return new Blob([bytes], { type: mimeType }) - }, instance, false) + }, instance) }, arrayBuffer () { @@ -318,21 +318,20 @@ function bodyMixinMethods (instance) { // given a byte sequence bytes: return a new ArrayBuffer // whose contents are bytes. return consumeBody(this, (bytes) => { - // Note: arrayBuffer already cloned. - return bytes.buffer - }, instance, true) + return new Uint8Array(bytes).buffer + }, instance) }, text () { // The text() method steps are to return the result of running // consume body with this and UTF-8 decode. - return consumeBody(this, utf8DecodeBytes, instance, false) + return consumeBody(this, utf8DecodeBytes, instance) }, json () { // The json() method steps are to return the result of running // consume body with this and parse JSON from bytes. - return consumeBody(this, parseJSONFromBytes, instance, false) + return consumeBody(this, parseJSONFromBytes, instance) }, formData () { @@ -384,7 +383,7 @@ function bodyMixinMethods (instance) { throw new TypeError( 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' ) - }, instance, false) + }, instance) }, bytes () { @@ -392,8 +391,8 @@ function bodyMixinMethods (instance) { // with this and the following step given a byte sequence bytes: return the // result of creating a Uint8Array from bytes in this’s relevant realm. return consumeBody(this, (bytes) => { - return new Uint8Array(bytes.buffer, 0, bytes.byteLength) - }, instance, true) + return new Uint8Array(bytes) + }, instance) } } @@ -409,9 +408,8 @@ function mixinBody (prototype) { * @param {Response|Request} object * @param {(value: unknown) => unknown} convertBytesToJSValue * @param {Response|Request} instance - * @param {boolean} [shouldClone] */ -async function consumeBody (object, convertBytesToJSValue, instance, shouldClone) { +async function consumeBody (object, convertBytesToJSValue, instance) { webidl.brandCheck(object, instance) // 1. If object is unusable, then return a promise rejected @@ -449,7 +447,7 @@ async function consumeBody (object, convertBytesToJSValue, instance, shouldClone // 6. Otherwise, fully read object’s body given successSteps, // errorSteps, and object’s relevant global object. - await fullyReadBody(object[kState].body, successSteps, errorSteps, shouldClone) + await fullyReadBody(object[kState].body, successSteps, errorSteps) // 7. Return promise. return promise.promise diff --git a/deps/undici/src/lib/web/fetch/request.js b/deps/undici/src/lib/web/fetch/request.js index 07a87f66d47be7..bc436aa9705e34 100644 --- a/deps/undici/src/lib/web/fetch/request.js +++ b/deps/undici/src/lib/web/fetch/request.js @@ -10,9 +10,7 @@ const nodeUtil = require('node:util') const { isValidHTTPToken, sameOrigin, - normalizeMethod, - environmentSettingsObject, - normalizeMethodRecord + environmentSettingsObject } = require('./util') const { forbiddenMethodsSet, @@ -24,7 +22,7 @@ const { requestCache, requestDuplex } = require('./constants') -const { kEnumerableProperty } = util +const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util const { kHeaders, kSignal, kState, kDispatcher } = require('./symbols') const { webidl } = require('./webidl') const { URLSerializer } = require('./data-url') @@ -349,7 +347,7 @@ class Request { // 1. Let method be init["method"]. let method = init.method - const mayBeNormalized = normalizeMethodRecord[method] + const mayBeNormalized = normalizedMethodRecords[method] if (mayBeNormalized !== undefined) { // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones @@ -361,12 +359,16 @@ class Request { throw new TypeError(`'${method}' is not a valid HTTP method.`) } - if (forbiddenMethodsSet.has(method.toUpperCase())) { + const upperCase = method.toUpperCase() + + if (forbiddenMethodsSet.has(upperCase)) { throw new TypeError(`'${method}' HTTP method is unsupported.`) } // 3. Normalize method. - method = normalizeMethod(method) + // https://fetch.spec.whatwg.org/#concept-method-normalize + // Note: must be in uppercase + method = normalizedMethodRecordsBase[upperCase] ?? method // 4. Set request’s method to method. request.method = method diff --git a/deps/undici/src/lib/web/fetch/util.js b/deps/undici/src/lib/web/fetch/util.js index e533ac957ca69b..dc5ce9b392a68b 100644 --- a/deps/undici/src/lib/web/fetch/util.js +++ b/deps/undici/src/lib/web/fetch/util.js @@ -6,7 +6,7 @@ const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet const { getGlobalOrigin } = require('./global') const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require('./data-url') const { performance } = require('node:perf_hooks') -const { isBlobLike, ReadableStreamFrom, isValidHTTPToken } = require('../../core/util') +const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require('../../core/util') const assert = require('node:assert') const { isUint8Array } = require('node:util/types') const { webidl } = require('./webidl') @@ -260,10 +260,13 @@ function appendRequestOriginHeader (request) { // TODO: implement "byte-serializing a request origin" let serializedOrigin = request.origin - // "'client' is changed to an origin during fetching." - // This doesn't happen in undici (in most cases) because undici, by default, - // has no concept of origin. - if (serializedOrigin === 'client') { + // - "'client' is changed to an origin during fetching." + // This doesn't happen in undici (in most cases) because undici, by default, + // has no concept of origin. + // - request.origin can also be set to request.client.origin (client being + // an environment settings object), which is undefined without using + // setGlobalOrigin. + if (serializedOrigin === 'client' || serializedOrigin === undefined) { return } @@ -791,37 +794,12 @@ function isCancelled (fetchParams) { fetchParams.controller.state === 'terminated' } -const normalizeMethodRecordBase = { - delete: 'DELETE', - DELETE: 'DELETE', - get: 'GET', - GET: 'GET', - head: 'HEAD', - HEAD: 'HEAD', - options: 'OPTIONS', - OPTIONS: 'OPTIONS', - post: 'POST', - POST: 'POST', - put: 'PUT', - PUT: 'PUT' -} - -const normalizeMethodRecord = { - ...normalizeMethodRecordBase, - patch: 'patch', - PATCH: 'PATCH' -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(normalizeMethodRecordBase, null) -Object.setPrototypeOf(normalizeMethodRecord, null) - /** * @see https://fetch.spec.whatwg.org/#concept-method-normalize * @param {string} method */ function normalizeMethod (method) { - return normalizeMethodRecordBase[method.toLowerCase()] ?? method + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method } // https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string @@ -1051,7 +1029,7 @@ function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueInde /** * @see https://fetch.spec.whatwg.org/#body-fully-read */ -async function fullyReadBody (body, processBody, processBodyError, shouldClone) { +async function fullyReadBody (body, processBody, processBodyError) { // 1. If taskDestination is null, then set taskDestination to // the result of starting a new parallel queue. @@ -1077,7 +1055,7 @@ async function fullyReadBody (body, processBody, processBodyError, shouldClone) // 5. Read all bytes from reader, given successSteps and errorSteps. try { - successSteps(await readAllBytes(reader, shouldClone)) + successSteps(await readAllBytes(reader)) } catch (e) { errorSteps(e) } @@ -1125,9 +1103,8 @@ function isomorphicEncode (input) { * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes * @see https://streams.spec.whatwg.org/#read-loop * @param {ReadableStreamDefaultReader} reader - * @param {boolean} [shouldClone] */ -async function readAllBytes (reader, shouldClone) { +async function readAllBytes (reader) { const bytes = [] let byteLength = 0 @@ -1136,13 +1113,6 @@ async function readAllBytes (reader, shouldClone) { if (done) { // 1. Call successSteps with bytes. - if (bytes.length === 1) { - const { buffer, byteOffset, byteLength } = bytes[0] - if (shouldClone === false) { - return Buffer.from(buffer, byteOffset, byteLength) - } - return Buffer.from(buffer.slice(byteOffset, byteOffset + byteLength), 0, byteLength) - } return Buffer.concat(bytes, byteLength) } @@ -1639,7 +1609,6 @@ module.exports = { urlHasHttpsScheme, urlIsHttpHttpsScheme, readAllBytes, - normalizeMethodRecord, simpleRangeHeaderValue, buildContentRange, parseMetadata, diff --git a/deps/undici/src/lib/web/websocket/websocket.js b/deps/undici/src/lib/web/websocket/websocket.js index 83d4ee94e30952..109d7be2e2f18b 100644 --- a/deps/undici/src/lib/web/websocket/websocket.js +++ b/deps/undici/src/lib/web/websocket/websocket.js @@ -28,8 +28,6 @@ const { types } = require('node:util') const { ErrorEvent, CloseEvent } = require('./events') const { SendQueue } = require('./sender') -let experimentalWarned = false - // https://websockets.spec.whatwg.org/#interface-definition class WebSocket extends EventTarget { #events = { @@ -56,13 +54,6 @@ class WebSocket extends EventTarget { const prefix = 'WebSocket constructor' webidl.argumentLengthCheck(arguments, 1, prefix) - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('WebSockets are experimental, expect them to change at any time.', { - code: 'UNDICI-WS' - }) - } - const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols, prefix, 'options') url = webidl.converters.USVString(url, prefix, 'url') diff --git a/deps/undici/src/package-lock.json b/deps/undici/src/package-lock.json index 1b33a92a748980..91ada55a0d9cbb 100644 --- a/deps/undici/src/package-lock.json +++ b/deps/undici/src/package-lock.json @@ -1,12 +1,12 @@ { "name": "undici", - "version": "6.18.2", + "version": "6.19.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "undici", - "version": "6.18.2", + "version": "6.19.2", "license": "MIT", "devDependencies": { "@fastify/busboy": "2.1.1", @@ -14,8 +14,8 @@ "@sinonjs/fake-timers": "^11.1.0", "@types/node": "^18.0.3", "abort-controller": "^3.0.0", - "borp": "^0.14.0", - "c8": "^9.1.0", + "borp": "^0.15.0", + "c8": "^10.0.0", "cross-env": "^7.0.3", "dns-packet": "^5.4.0", "fast-check": "^3.17.1", @@ -75,13 +75,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.6.tgz", - "integrity": "sha512-ZJhac6FkEd1yhG2AHOmfcXG4ceoLltoCVJjN5XsWN9BifBQr+cHJbWi0h68HZuSORq+3WtJ2z0hwF2NG1b5kcA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/highlight": "^7.24.6", + "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" }, "engines": { @@ -89,9 +89,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.6.tgz", - "integrity": "sha512-aC2DGhBq5eEdyXWqrDInSqQjO0k8xtPRf5YylULqx8MCd6jBtzqfta/3ETMRpuKIc5hyswfO80ObyA1MvkCcUQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", + "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", "dev": true, "license": "MIT", "engines": { @@ -99,22 +99,22 @@ } }, "node_modules/@babel/core": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.6.tgz", - "integrity": "sha512-qAHSfAdVyFmIvl0VHELib8xar7ONuSHrE2hLnsaWkYNTI68dmi1x8GYDhJjMI/e7XWal9QBlZkwbOnkcw7Z8gQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", + "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.6", - "@babel/generator": "^7.24.6", - "@babel/helper-compilation-targets": "^7.24.6", - "@babel/helper-module-transforms": "^7.24.6", - "@babel/helpers": "^7.24.6", - "@babel/parser": "^7.24.6", - "@babel/template": "^7.24.6", - "@babel/traverse": "^7.24.6", - "@babel/types": "^7.24.6", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helpers": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -130,13 +130,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.6.tgz", - "integrity": "sha512-S7m4eNa6YAPJRHmKsLHIDJhNAGNKoWNiWefz1MBbpnt8g9lvMDl1hir4P9bo/57bQEmuwEhnRU/AMWsD0G/Fbg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.24.6", + "@babel/types": "^7.24.7", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -146,14 +146,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.6.tgz", - "integrity": "sha512-VZQ57UsDGlX/5fFA7GkVPplZhHsVc+vuErWgdOiysI9Ksnw0Pbbd6pnPiR/mmJyKHgyIW0c7KT32gmhiF+cirg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", + "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.24.6", - "@babel/helper-validator-option": "^7.24.6", + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", "browserslist": "^4.22.2", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -163,67 +163,71 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.6.tgz", - "integrity": "sha512-Y50Cg3k0LKLMjxdPjIl40SdJgMB85iXn27Vk/qbHZCFx/o5XO3PSnpi675h1KEmmDb6OFArfd5SCQEQ5Q4H88g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/types": "^7.24.7" + }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.6.tgz", - "integrity": "sha512-xpeLqeeRkbxhnYimfr2PC+iA0Q7ljX/d1eZ9/inYbmfG2jpl8Lu3DyXvpOAnrS5kxkfOWJjioIMQsaMBXFI05w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.24.6", - "@babel/types": "^7.24.6" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.6.tgz", - "integrity": "sha512-SF/EMrC3OD7dSta1bLJIlrsVxwtd0UpjRJqLno6125epQMJ/kyFmpTT4pbvPbdQHzCHg+biQ7Syo8lnDtbR+uA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.24.6" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.6.tgz", - "integrity": "sha512-a26dmxFJBF62rRO9mmpgrfTLsAuyHk4e1hKTUkD/fcMfynt8gvEKwQPQDVxWhca8dHoDck+55DFt42zV0QMw5g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.24.6" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.6.tgz", - "integrity": "sha512-Y/YMPm83mV2HJTbX1Qh2sjgjqcacvOlhbzdCCsSlblOKjSYmQqEbO6rUniWQyRo9ncyfjT8hnUjlG06RXDEmcA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", + "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-module-imports": "^7.24.6", - "@babel/helper-simple-access": "^7.24.6", - "@babel/helper-split-export-declaration": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -233,9 +237,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.6.tgz", - "integrity": "sha512-MZG/JcWfxybKwsA9N9PmtF2lOSFSEMVCpIRrbxccZFLJPrJciJdG/UhSh5W96GEteJI2ARqm5UAHxISwRDLSNg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", + "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", "dev": true, "license": "MIT", "engines": { @@ -243,35 +247,36 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.6.tgz", - "integrity": "sha512-nZzcMMD4ZhmB35MOOzQuiGO5RzL6tJbsT37Zx8M5L/i9KSrukGXWTjLe1knIbb/RmxoJE9GON9soq0c0VEMM5g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.24.6" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.6.tgz", - "integrity": "sha512-CvLSkwXGWnYlF9+J3iZUvwgAxKiYzK3BWuo+mLzD/MDGOZDj7Gq8+hqaOkMxmJwmlv0iu86uH5fdADd9Hxkymw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.24.6" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.6.tgz", - "integrity": "sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", "dev": true, "license": "MIT", "engines": { @@ -279,9 +284,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.6.tgz", - "integrity": "sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "dev": true, "license": "MIT", "engines": { @@ -289,9 +294,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.6.tgz", - "integrity": "sha512-Jktc8KkF3zIkePb48QO+IapbXlSapOW9S+ogZZkcO6bABgYAxtZcjZ/O005111YLf+j4M84uEgwYoidDkXbCkQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", + "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", "dev": true, "license": "MIT", "engines": { @@ -299,27 +304,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.6.tgz", - "integrity": "sha512-V2PI+NqnyFu1i0GyTd/O/cTpxzQCYioSkUIRmgo7gFEHKKCg5w46+r/A6WeUR1+P3TeQ49dspGPNd/E3n9AnnA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", + "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.24.6", - "@babel/types": "^7.24.6" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.6.tgz", - "integrity": "sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.24.6", + "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -407,9 +412,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.6.tgz", - "integrity": "sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "dev": true, "license": "MIT", "bin": { @@ -485,13 +490,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.6.tgz", - "integrity": "sha512-lWfvAIFNWMlCsU0DRUun2GpFwZdGTukLaHJqRh1JRb80NdAP5Sb1HDHB5X9P9OtgZHQl089UzQkpYlBq2VTPRw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -595,13 +600,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.6.tgz", - "integrity": "sha512-TzCtxGgVTEJWWwcYwQhCIQ6WaKlo80/B+Onsk4RRCcYqpYGFcG9etPW94VToGte5AAcxRrhjPUFvUS3Y2qKi4A==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", + "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.6" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -611,35 +616,35 @@ } }, "node_modules/@babel/template": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.6.tgz", - "integrity": "sha512-3vgazJlLwNXi9jhrR1ef8qiB65L1RK90+lEQwv4OxveHnqC3BfmnHdgySwRLzf6akhlOYenT+b7AfWq+a//AHw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.6", - "@babel/parser": "^7.24.6", - "@babel/types": "^7.24.6" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.6.tgz", - "integrity": "sha512-OsNjaJwT9Zn8ozxcfoBc+RaHdj3gFmCmYoQLUII1o6ZrUwku0BMg80FoOTPx+Gi6XhcQxAYE4xyjPTo4SxEQqw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.6", - "@babel/generator": "^7.24.6", - "@babel/helper-environment-visitor": "^7.24.6", - "@babel/helper-function-name": "^7.24.6", - "@babel/helper-hoist-variables": "^7.24.6", - "@babel/helper-split-export-declaration": "^7.24.6", - "@babel/parser": "^7.24.6", - "@babel/types": "^7.24.6", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -648,14 +653,14 @@ } }, "node_modules/@babel/types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", - "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.6", - "@babel/helper-validator-identifier": "^7.24.6", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -686,9 +691,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", + "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", "dev": true, "license": "MIT", "engines": { @@ -816,6 +821,7 @@ "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -869,6 +875,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", "dev": true, "license": "BSD-3-Clause" }, @@ -1663,9 +1670,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "18.19.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", - "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", + "version": "18.19.36", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.36.tgz", + "integrity": "sha512-tX1BNmYSWEvViftB26VLNxT6mEr37M7+ldUtq7rlKnv4/2fKYsJIOmqJAjT6h1DNuwQjIKgw3VJ/Dtw3yiTIQw==", "dev": true, "license": "MIT", "dependencies": { @@ -1734,9 +1741,9 @@ } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", + "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", "dev": true, "license": "MIT", "bin": { @@ -2111,17 +2118,20 @@ } }, "node_modules/array.prototype.tosorted": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz", - "integrity": "sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.1.0", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/arraybuffer.prototype.slice": { @@ -2219,6 +2229,39 @@ "node": ">=8" } }, + "node_modules/babel-plugin-istanbul/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", @@ -2236,6 +2279,34 @@ "node": ">=8" } }, + "node_modules/babel-plugin-istanbul/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/babel-plugin-jest-hoist": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", @@ -2307,14 +2378,14 @@ "dev": true }, "node_modules/borp": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/borp/-/borp-0.14.0.tgz", - "integrity": "sha512-shUCcU6oV5SwSLoMUAXS4jSacOEE/iZmzdBsv6jFkNczK8nFOXSqO5AiojRJnjuhhfm/YcSTcfBsdOSF8zPPfQ==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/borp/-/borp-0.15.0.tgz", + "integrity": "sha512-G3tAYzy+meolAqquLa52n4XGsER6lBsL3i+56C3JPZYkcCXUak7tMTJGOxVwwaxZM9GERGKTtqLr5H0yNZ+uXA==", "dev": true, "license": "MIT", "dependencies": { "@reporters/github": "^1.5.4", - "c8": "^9.0.0", + "c8": "^10.0.0", "execa": "^8.0.1", "find-up": "^7.0.0", "glob": "^10.3.10" @@ -2347,9 +2418,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", + "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", "dev": true, "funding": [ { @@ -2367,10 +2438,10 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "update-browserslist-db": "^1.0.16" }, "bin": { "browserslist": "cli.js" @@ -2420,9 +2491,9 @@ } }, "node_modules/c8": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", - "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", + "integrity": "sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw==", "dev": true, "license": "ISC", "dependencies": { @@ -2433,7 +2504,7 @@ "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.6", - "test-exclude": "^6.0.0", + "test-exclude": "^7.0.1", "v8-to-istanbul": "^9.0.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1" @@ -2442,7 +2513,15 @@ "c8": "bin/c8.js" }, "engines": { - "node": ">=14.14.0" + "node": ">=18" + }, + "peerDependencies": { + "monocart-coverage-reports": "^2" + }, + "peerDependenciesMeta": { + "monocart-coverage-reports": { + "optional": true + } } }, "node_modules/c8/node_modules/find-up": { @@ -2563,9 +2642,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001625", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001625.tgz", - "integrity": "sha512-4KE9N2gcRH+HQhpeiRZXd+1niLB/XNLAhSy4z7fI8EzcbcPoAqjNInxVHTiTwWfTIV4w096XG8OtCOCQQKPv3w==", + "version": "1.0.30001636", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", + "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==", "dev": true, "funding": [ { @@ -3190,9 +3269,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.4.788", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.788.tgz", - "integrity": "sha512-ubp5+Ev/VV8KuRoWnfP2QF2Bg+O2ZFdb49DiiNbz2VmgkIqrnyYaqIOqj8A6K/3p1xV0QcU5hBQ1+BmB6ot1OA==", + "version": "1.4.805", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.805.tgz", + "integrity": "sha512-8W4UJwX/w9T0QSzINJckTKG6CYpAUTqsaWcWIsdud3I1FYJcMgW9QqT1/4CBff/pP/TihWh13OmiyY8neto6vw==", "dev": true, "license": "ISC" }, @@ -4489,9 +4568,9 @@ } }, "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", "dev": true, "license": "ISC", "dependencies": { @@ -5701,9 +5780,9 @@ } }, "node_modules/jackspeak": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.1.2.tgz", - "integrity": "sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -8426,9 +8505,9 @@ } }, "node_modules/rrweb-cssom": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.0.tgz", - "integrity": "sha512-KlSv0pm9kgQSRxXEMgtivPJ4h826YHsuob8pSHcfSZsSXGtvpEAie8S0AnXuObEJ7nhikOb4ahwxDm0H2yW17g==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz", + "integrity": "sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==", "dev": true, "license": "MIT" }, @@ -9233,64 +9312,18 @@ "license": "MIT" }, "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, "engines": { - "node": ">=8" - } - }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/test-exclude/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" + "node": ">=18" } }, "node_modules/text-table": { @@ -9406,9 +9439,9 @@ } }, "node_modules/tsd": { - "version": "0.31.0", - "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.31.0.tgz", - "integrity": "sha512-yjBiQ5n8OMv/IZOuhDjBy0ZLCoJ7rky/RxRh5W4sJ0oNNCU/kf6s3puPAkGNi59PptDdkcpUm+RsKSdjR2YbNg==", + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.31.1.tgz", + "integrity": "sha512-sSL84A0SFwx2xGMWrxlGaarKFSQszWjJS2vgNDDLwatytzg2aq6ShlwHsBYxRNmjzXISODwMva5ZOdAg/4AoOA==", "dev": true, "license": "MIT", "dependencies": { @@ -10048,9 +10081,9 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", - "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "dev": true, "license": "MIT", "engines": { diff --git a/deps/undici/src/package.json b/deps/undici/src/package.json index eaaea7add10eb6..8187dad6884de6 100644 --- a/deps/undici/src/package.json +++ b/deps/undici/src/package.json @@ -1,6 +1,6 @@ { "name": "undici", - "version": "6.18.2", + "version": "6.19.2", "description": "An HTTP/1.1 client, written from scratch for Node.js", "homepage": "https://undici.nodejs.org", "bugs": { @@ -85,7 +85,7 @@ "test:node-test": "borp -p \"test/node-test/**/*.js\"", "test:tdd": "borp --expose-gc -p \"test/*.js\"", "test:tdd:node-test": "borp -p \"test/node-test/**/*.js\" -w", - "test:typescript": "tsd && tsc --skipLibCheck test/imports/undici-import.ts", + "test:typescript": "tsd && tsc test/imports/undici-import.ts --typeRoots ./types && tsc ./types/*.d.ts --noEmit --typeRoots ./types", "test:webidl": "borp -p \"test/webidl/*.js\"", "test:websocket": "borp -p \"test/websocket/*.js\"", "test:websocket:autobahn": "node test/autobahn/client.js", @@ -99,7 +99,7 @@ "coverage:report:ci": "c8 report", "bench": "echo \"Error: Benchmarks have been moved to '/benchmarks'\" && exit 1", "serve:website": "echo \"Error: Documentation has been moved to '/docs'\" && exit 1", - "prepare": "husky install && node ./scripts/platform-shell.js" + "prepare": "husky && node ./scripts/platform-shell.js" }, "devDependencies": { "@fastify/busboy": "2.1.1", @@ -107,8 +107,8 @@ "@sinonjs/fake-timers": "^11.1.0", "@types/node": "^18.0.3", "abort-controller": "^3.0.0", - "borp": "^0.14.0", - "c8": "^9.1.0", + "borp": "^0.15.0", + "c8": "^10.0.0", "cross-env": "^7.0.3", "dns-packet": "^5.4.0", "fast-check": "^3.17.1", diff --git a/deps/undici/src/types/errors.d.ts b/deps/undici/src/types/errors.d.ts index 7923ddd9796e60..f6fb73b5a90396 100644 --- a/deps/undici/src/types/errors.d.ts +++ b/deps/undici/src/types/errors.d.ts @@ -125,4 +125,25 @@ declare namespace Errors { name: 'ResponseExceededMaxSizeError'; code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE'; } + + export class RequestRetryError extends UndiciError { + constructor ( + message: string, + statusCode: number, + headers?: IncomingHttpHeaders | string[] | null, + body?: null | Record | string + ); + name: 'RequestRetryError'; + code: 'UND_ERR_REQ_RETRY'; + statusCode: number; + data: { + count: number; + }; + headers: Record; + } + + export class SecureProxyConnectionError extends UndiciError { + name: 'SecureProxyConnectionError'; + code: 'UND_ERR_PRX_TLS'; + } } diff --git a/deps/undici/src/types/formdata.d.ts b/deps/undici/src/types/formdata.d.ts index df29a572d6bd4f..e676b11ec342a3 100644 --- a/deps/undici/src/types/formdata.d.ts +++ b/deps/undici/src/types/formdata.d.ts @@ -2,7 +2,7 @@ /// import { File } from './file' -import { SpecIterator, SpecIterableIterator } from './fetch' +import { SpecIterableIterator } from './fetch' /** * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs. diff --git a/deps/undici/src/types/index.d.ts b/deps/undici/src/types/index.d.ts index 9e5eaeb3d54ae4..f6be35cd9bf40d 100644 --- a/deps/undici/src/types/index.d.ts +++ b/deps/undici/src/types/index.d.ts @@ -18,6 +18,7 @@ import EnvHttpProxyAgent from './env-http-proxy-agent' import RetryHandler from'./retry-handler' import RetryAgent from'./retry-agent' import { request, pipeline, stream, connect, upgrade } from './api' +import interceptors from './interceptors' export * from './util' export * from './cookies' @@ -32,7 +33,7 @@ export * from './content-type' export * from './cache' export { Interceptable } from './mock-interceptor' -export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent } +export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent } export default Undici declare namespace Undici { @@ -41,7 +42,7 @@ declare namespace Undici { var RedirectHandler: typeof import ('./handlers').RedirectHandler var DecoratorHandler: typeof import ('./handlers').DecoratorHandler var RetryHandler: typeof import ('./retry-handler').default - var createRedirectInterceptor: typeof import ('./interceptors').createRedirectInterceptor + var createRedirectInterceptor: typeof import ('./interceptors').default.createRedirectInterceptor var BalancedPool: typeof import('./balanced-pool').default; var Client: typeof import('./client').default; var buildConnector: typeof import('./connector').default; @@ -66,9 +67,5 @@ declare namespace Undici { var File: typeof import('./file').File; var FileReader: typeof import('./filereader').FileReader; var caches: typeof import('./cache').caches; - var interceptors: { - dump: typeof import('./interceptors').dump; - retry: typeof import('./interceptors').retry; - redirect: typeof import('./interceptors').redirect; - } + var interceptors: typeof import('./interceptors').default; } diff --git a/deps/undici/src/types/interceptors.d.ts b/deps/undici/src/types/interceptors.d.ts index d546ac344e3689..fab6da08c0d9b5 100644 --- a/deps/undici/src/types/interceptors.d.ts +++ b/deps/undici/src/types/interceptors.d.ts @@ -1,11 +1,15 @@ import Dispatcher from "./dispatcher"; import RetryHandler from "./retry-handler"; -export type DumpInterceptorOpts = { maxSize?: number } -export type RetryInterceptorOpts = RetryHandler.RetryOptions -export type RedirectInterceptorOpts = { maxRedirections?: number } +export default Interceptors; -export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor -export declare function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor -export declare function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor -export declare function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor +declare namespace Interceptors { + export type DumpInterceptorOpts = { maxSize?: number } + export type RetryInterceptorOpts = RetryHandler.RetryOptions + export type RedirectInterceptorOpts = { maxRedirections?: number } + + export function createRedirectInterceptor(opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor +} diff --git a/deps/undici/src/types/retry-agent.d.ts b/deps/undici/src/types/retry-agent.d.ts index cf559d956e504f..963cea99e42c84 100644 --- a/deps/undici/src/types/retry-agent.d.ts +++ b/deps/undici/src/types/retry-agent.d.ts @@ -1,7 +1,4 @@ -import Agent from './agent' -import buildConnector from './connector'; import Dispatcher from './dispatcher' -import { IncomingHttpHeaders } from './header' import RetryHandler from './retry-handler' export default RetryAgent diff --git a/deps/undici/src/types/webidl.d.ts b/deps/undici/src/types/webidl.d.ts index fe802a201245fb..8a23a85bf0100a 100644 --- a/deps/undici/src/types/webidl.d.ts +++ b/deps/undici/src/types/webidl.d.ts @@ -55,9 +55,7 @@ interface WebidlUtil { V: unknown, bitLength: number, signedness: 'signed' | 'unsigned', - opts?: ConvertToIntOpts, - prefix: string, - argument: string + opts?: ConvertToIntOpts ): number /** diff --git a/deps/undici/undici.js b/deps/undici/undici.js index 6d744c035432b5..6db2e4ce249f34 100644 --- a/deps/undici/undici.js +++ b/deps/undici/undici.js @@ -1582,6 +1582,27 @@ var require_util = __commonJS({ __name(errorRequest, "errorRequest"); var kEnumerableProperty = /* @__PURE__ */ Object.create(null); kEnumerableProperty.enumerable = true; + var normalizedMethodRecordsBase = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + var normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH" + }; + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); module2.exports = { kEnumerableProperty, nop, @@ -1620,6 +1641,8 @@ var require_util = __commonJS({ isValidHeaderValue, isTokenCharCode, parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, isValidPort, isHttpOrHttpsPrefixed, nodeMajor, @@ -1835,7 +1858,8 @@ var require_request = __commonJS({ isBlobLike, buildURL, validateHandler, - getServerName + getServerName, + normalizedMethodRecords } = require_util(); var { channels } = require_diagnostics(); var { headerNameLowerCasedRecord } = require_constants(); @@ -1865,12 +1889,12 @@ var require_request = __commonJS({ throw new InvalidArgumentError("path must be a string"); } else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path) !== null) { + } else if (invalidPathRegex.test(path)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { throw new InvalidArgumentError("method must be a string"); - } else if (!isValidHTTPToken(method)) { + } else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) { throw new InvalidArgumentError("invalid request method"); } if (upgrade && typeof upgrade !== "string") { @@ -2206,7 +2230,7 @@ var require_connect = __commonJS({ } }; } - function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { + function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); } @@ -2222,7 +2246,7 @@ var require_connect = __commonJS({ } servername = servername || options.servername || util.getServerName(host) || null; const sessionKey = servername || hostname; - const session = sessionCache.get(sessionKey) || null; + const session = customSession || sessionCache.get(sessionKey) || null; assert(sessionKey); socket = tls.connect({ highWaterMark: 16384, @@ -3772,7 +3796,7 @@ var require_util2 = __commonJS({ var { getGlobalOrigin } = require_global(); var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); var { performance: performance2 } = require("node:perf_hooks"); - var { isBlobLike, ReadableStreamFrom, isValidHTTPToken } = require_util(); + var { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util(); var assert = require("node:assert"); var { isUint8Array } = require("node:util/types"); var { webidl } = require_webidl(); @@ -3893,7 +3917,7 @@ var require_util2 = __commonJS({ __name(appendFetchMetadata, "appendFetchMetadata"); function appendRequestOriginHeader(request) { let serializedOrigin = request.origin; - if (serializedOrigin === "client") { + if (serializedOrigin === "client" || serializedOrigin === void 0) { return; } if (request.responseTainting === "cors" || request.mode === "websocket") { @@ -4198,29 +4222,8 @@ var require_util2 = __commonJS({ return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; } __name(isCancelled, "isCancelled"); - var normalizeMethodRecordBase = { - delete: "DELETE", - DELETE: "DELETE", - get: "GET", - GET: "GET", - head: "HEAD", - HEAD: "HEAD", - options: "OPTIONS", - OPTIONS: "OPTIONS", - post: "POST", - POST: "POST", - put: "PUT", - PUT: "PUT" - }; - var normalizeMethodRecord = { - ...normalizeMethodRecordBase, - patch: "patch", - PATCH: "PATCH" - }; - Object.setPrototypeOf(normalizeMethodRecordBase, null); - Object.setPrototypeOf(normalizeMethodRecord, null); function normalizeMethod(method) { - return normalizeMethodRecordBase[method.toLowerCase()] ?? method; + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; } __name(normalizeMethod, "normalizeMethod"); function serializeJavascriptValueToJSONString(value) { @@ -4364,7 +4367,7 @@ var require_util2 = __commonJS({ }); } __name(iteratorMixin, "iteratorMixin"); - async function fullyReadBody(body, processBody, processBodyError, shouldClone) { + async function fullyReadBody(body, processBody, processBodyError) { const successSteps = processBody; const errorSteps = processBodyError; let reader; @@ -4375,7 +4378,7 @@ var require_util2 = __commonJS({ return; } try { - successSteps(await readAllBytes(reader, shouldClone)); + successSteps(await readAllBytes(reader)); } catch (e) { errorSteps(e); } @@ -4402,19 +4405,12 @@ var require_util2 = __commonJS({ return input; } __name(isomorphicEncode, "isomorphicEncode"); - async function readAllBytes(reader, shouldClone) { + async function readAllBytes(reader) { const bytes = []; let byteLength = 0; while (true) { const { done, value: chunk } = await reader.read(); if (done) { - if (bytes.length === 1) { - const { buffer, byteOffset, byteLength: byteLength2 } = bytes[0]; - if (shouldClone === false) { - return Buffer.from(buffer, byteOffset, byteLength2); - } - return Buffer.from(buffer.slice(byteOffset, byteOffset + byteLength2), 0, byteLength2); - } return Buffer.concat(bytes, byteLength); } if (!isUint8Array(chunk)) { @@ -4697,7 +4693,6 @@ var require_util2 = __commonJS({ urlHasHttpsScheme, urlIsHttpHttpsScheme, readAllBytes, - normalizeMethodRecord, simpleRangeHeaderValue, buildContentRange, parseMetadata, @@ -5391,18 +5386,18 @@ Content-Type: ${value.type || "application/octet-stream"}\r mimeType = serializeAMimeType(mimeType); } return new Blob2([bytes], { type: mimeType }); - }, instance, false); + }, instance); }, arrayBuffer() { return consumeBody(this, (bytes) => { - return bytes.buffer; - }, instance, true); + return new Uint8Array(bytes).buffer; + }, instance); }, text() { - return consumeBody(this, utf8DecodeBytes, instance, false); + return consumeBody(this, utf8DecodeBytes, instance); }, json() { - return consumeBody(this, parseJSONFromBytes, instance, false); + return consumeBody(this, parseJSONFromBytes, instance); }, formData() { return consumeBody(this, (value) => { @@ -5431,12 +5426,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r throw new TypeError( 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' ); - }, instance, false); + }, instance); }, bytes() { return consumeBody(this, (bytes) => { - return new Uint8Array(bytes.buffer, 0, bytes.byteLength); - }, instance, true); + return new Uint8Array(bytes); + }, instance); } }; return methods; @@ -5446,7 +5441,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r Object.assign(prototype.prototype, bodyMixinMethods(prototype)); } __name(mixinBody, "mixinBody"); - async function consumeBody(object, convertBytesToJSValue, instance, shouldClone) { + async function consumeBody(object, convertBytesToJSValue, instance) { webidl.brandCheck(object, instance); if (bodyUnusable(object[kState].body)) { throw new TypeError("Body is unusable: Body has already been read"); @@ -5465,7 +5460,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r successSteps(Buffer.allocUnsafe(0)); return promise.promise; } - await fullyReadBody(object[kState].body, successSteps, errorSteps, shouldClone); + await fullyReadBody(object[kState].body, successSteps, errorSteps); return promise.promise; } __name(consumeBody, "consumeBody"); @@ -6230,26 +6225,26 @@ upgrade: ${upgrade}\r channels.sendHeaders.publish({ request, headers: header, socket }); } if (!body || bodyLength === 0) { - writeBuffer({ abort, body: null, client, request, socket, contentLength, header, expectsPayload }); + writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); } else if (util.isBuffer(body)) { - writeBuffer({ abort, body, client, request, socket, contentLength, header, expectsPayload }); + writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); } else if (util.isBlobLike(body)) { if (typeof body.stream === "function") { - writeIterable({ abort, body: body.stream(), client, request, socket, contentLength, header, expectsPayload }); + writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); } else { - writeBlob({ abort, body, client, request, socket, contentLength, header, expectsPayload }); + writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); } } else if (util.isStream(body)) { - writeStream({ abort, body, client, request, socket, contentLength, header, expectsPayload }); + writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); } else if (util.isIterable(body)) { - writeIterable({ abort, body, client, request, socket, contentLength, header, expectsPayload }); + writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); } else { assert(false); } return true; } __name(writeH1, "writeH1"); - function writeStream({ abort, body, client, request, socket, contentLength, header, expectsPayload }) { + function writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); let finished = false; const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }); @@ -6319,7 +6314,7 @@ upgrade: ${upgrade}\r } } __name(writeStream, "writeStream"); - function writeBuffer({ abort, body, client, request, socket, contentLength, header, expectsPayload }) { + function writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { try { if (!body) { if (contentLength === 0) { @@ -6351,7 +6346,7 @@ upgrade: ${upgrade}\r } } __name(writeBuffer, "writeBuffer"); - async function writeBlob({ abort, body, client, request, socket, contentLength, header, expectsPayload }) { + async function writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { assert(contentLength === body.size, "blob body must have content length"); try { if (contentLength != null && contentLength !== body.size) { @@ -6375,7 +6370,7 @@ upgrade: ${upgrade}\r } } __name(writeBlob, "writeBlob"); - async function writeIterable({ abort, body, client, request, socket, contentLength, header, expectsPayload }) { + async function writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { @@ -6851,75 +6846,73 @@ var require_client_h2 = __commonJS({ return true; function writeBodyH2() { if (!body || contentLength === 0) { - writeBuffer({ + writeBuffer( abort, + stream, + null, client, request, + client[kSocket], contentLength, - expectsPayload, - h2stream: stream, - body: null, - socket: client[kSocket] - }); + expectsPayload + ); } else if (util.isBuffer(body)) { - writeBuffer({ + writeBuffer( abort, + stream, + body, client, request, + client[kSocket], contentLength, - body, - expectsPayload, - h2stream: stream, - socket: client[kSocket] - }); + expectsPayload + ); } else if (util.isBlobLike(body)) { if (typeof body.stream === "function") { - writeIterable({ + writeIterable( abort, + stream, + body.stream(), client, request, + client[kSocket], contentLength, - expectsPayload, - h2stream: stream, - body: body.stream(), - socket: client[kSocket] - }); + expectsPayload + ); } else { - writeBlob({ + writeBlob( abort, + stream, body, client, request, + client[kSocket], contentLength, - expectsPayload, - h2stream: stream, - socket: client[kSocket] - }); + expectsPayload + ); } } else if (util.isStream(body)) { - writeStream({ + writeStream( abort, + client[kSocket], + expectsPayload, + stream, body, client, request, - contentLength, - expectsPayload, - socket: client[kSocket], - h2stream: stream, - header: "" - }); + contentLength + ); } else if (util.isIterable(body)) { - writeIterable({ + writeIterable( abort, + stream, body, client, request, + client[kSocket], contentLength, - expectsPayload, - header: "", - h2stream: stream, - socket: client[kSocket] - }); + expectsPayload + ); } else { assert(false); } @@ -6927,7 +6920,7 @@ var require_client_h2 = __commonJS({ __name(writeBodyH2, "writeBodyH2"); } __name(writeH2, "writeH2"); - function writeBuffer({ abort, h2stream, body, client, request, socket, contentLength, expectsPayload }) { + function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { try { if (body != null && util.isBuffer(body)) { assert(contentLength === body.byteLength, "buffer body must have content length"); @@ -6947,7 +6940,7 @@ var require_client_h2 = __commonJS({ } } __name(writeBuffer, "writeBuffer"); - function writeStream({ abort, socket, expectsPayload, h2stream, body, client, request, contentLength }) { + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); const pipe = pipeline( body, @@ -6973,7 +6966,7 @@ var require_client_h2 = __commonJS({ __name(onPipeData, "onPipeData"); } __name(writeStream, "writeStream"); - async function writeBlob({ abort, h2stream, body, client, request, socket, contentLength, expectsPayload }) { + async function writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { assert(contentLength === body.size, "blob body must have content length"); try { if (contentLength != null && contentLength !== body.size) { @@ -6995,7 +6988,7 @@ var require_client_h2 = __commonJS({ } } __name(writeBlob, "writeBlob"); - async function writeIterable({ abort, h2stream, body, client, request, socket, contentLength, expectsPayload }) { + async function writeIterable(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { @@ -9201,9 +9194,7 @@ var require_request2 = __commonJS({ var { isValidHTTPToken, sameOrigin, - normalizeMethod, - environmentSettingsObject, - normalizeMethodRecord + environmentSettingsObject } = require_util2(); var { forbiddenMethodsSet, @@ -9215,7 +9206,7 @@ var require_request2 = __commonJS({ requestCache, requestDuplex } = require_constants3(); - var { kEnumerableProperty } = util; + var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util; var { kHeaders, kSignal, kState, kDispatcher } = require_symbols2(); var { webidl } = require_webidl(); var { URLSerializer } = require_data_url(); @@ -9417,17 +9408,18 @@ var require_request2 = __commonJS({ } if (init.method !== void 0) { let method = init.method; - const mayBeNormalized = normalizeMethodRecord[method]; + const mayBeNormalized = normalizedMethodRecords[method]; if (mayBeNormalized !== void 0) { request.method = mayBeNormalized; } else { if (!isValidHTTPToken(method)) { throw new TypeError(`'${method}' is not a valid HTTP method.`); } - if (forbiddenMethodsSet.has(method.toUpperCase())) { + const upperCase = method.toUpperCase(); + if (forbiddenMethodsSet.has(upperCase)) { throw new TypeError(`'${method}' HTTP method is unsupported.`); } - method = normalizeMethod(method); + method = normalizedMethodRecordsBase[upperCase] ?? method; request.method = method; } if (!patchMethodWarning && request.method === "patch") { @@ -12251,7 +12243,6 @@ var require_websocket = __commonJS({ var { types } = require("node:util"); var { ErrorEvent: ErrorEvent2, CloseEvent: CloseEvent2 } = require_events(); var { SendQueue } = require_sender(); - var experimentalWarned = false; var WebSocket = class _WebSocket extends EventTarget { static { __name(this, "WebSocket"); @@ -12275,12 +12266,6 @@ var require_websocket = __commonJS({ super(); const prefix = "WebSocket constructor"; webidl.argumentLengthCheck(arguments, 1, prefix); - if (!experimentalWarned) { - experimentalWarned = true; - process.emitWarning("WebSockets are experimental, expect them to change at any time.", { - code: "UNDICI-WS" - }); - } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); url = webidl.converters.USVString(url, prefix, "url"); protocols = options.protocols; diff --git a/src/undici_version.h b/src/undici_version.h index 263cb9211bdf94..8fd646706ca701 100644 --- a/src/undici_version.h +++ b/src/undici_version.h @@ -2,5 +2,5 @@ // Refer to tools/dep_updaters/update-undici.sh #ifndef SRC_UNDICI_VERSION_H_ #define SRC_UNDICI_VERSION_H_ -#define UNDICI_VERSION "6.18.2" +#define UNDICI_VERSION "6.19.2" #endif // SRC_UNDICI_VERSION_H_