aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node_modules
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-05-12 16:20:31 +0200
committerEgor Tensin <egor@tensin.name>2026-05-12 16:20:31 +0200
commit3974efd722fa10f283df76342125776a352072dd (patch)
tree21b5240dc856fe452da37f21313a7e1c7801c17f /node_modules
parentworkflows/test: reschedule for my convenience (diff)
downloadcleanup-path-3974efd722fa10f283df76342125776a352072dd.tar.gz
cleanup-path-3974efd722fa10f283df76342125776a352072dd.zip
bump dependenciesv5.0.2
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/.package-lock.json18
-rw-r--r--node_modules/@actions/core/package.json2
-rw-r--r--node_modules/@actions/http-client/package.json2
-rw-r--r--node_modules/undici/docs/docs/api/Client.md2
-rw-r--r--node_modules/undici/lib/dispatcher/agent.js3
-rw-r--r--node_modules/undici/lib/dispatcher/client.js5
-rw-r--r--node_modules/undici/lib/dispatcher/dispatcher-base.js10
-rw-r--r--node_modules/undici/lib/dispatcher/pool-base.js4
-rw-r--r--node_modules/undici/lib/dispatcher/pool.js4
-rw-r--r--node_modules/undici/lib/web/websocket/permessage-deflate.js44
-rw-r--r--node_modules/undici/lib/web/websocket/receiver.js109
-rw-r--r--node_modules/undici/lib/web/websocket/websocket.js6
-rw-r--r--node_modules/undici/package.json2
-rw-r--r--node_modules/undici/types/client.d.ts11
14 files changed, 147 insertions, 75 deletions
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
index 7c24c38..ae3bf1b 100644
--- a/node_modules/.package-lock.json
+++ b/node_modules/.package-lock.json
@@ -5,9 +5,9 @@
"requires": true,
"packages": {
"node_modules/@actions/core": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.0.tgz",
- "integrity": "sha512-zYt6cz+ivnTmiT/ksRVriMBOiuoUpDCJJlZ5KPl2/FRdvwU3f7MPh9qftvbkXJThragzUZieit2nyHUyw53Seg==",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.1.tgz",
+ "integrity": "sha512-a6d/Nwahm9fliVGRhdhofo40HjHQasUPusmc7vBfyky+7Z+P2A1J68zyFVaNcEclc/Se+eO595oAr5nwEIoIUA==",
"license": "MIT",
"dependencies": {
"@actions/exec": "^3.0.0",
@@ -24,9 +24,9 @@
}
},
"node_modules/@actions/http-client": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.0.tgz",
- "integrity": "sha512-QuwPsgVMsD6qaPD57GLZi9sqzAZCtiJT8kVBCDpLtxhL5MydQ4gS+DrejtZZPdIYyB1e95uCK9Luyds7ybHI3g==",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.1.tgz",
+ "integrity": "sha512-+Nvd1ImaOZBSoPbsUtEhv+1z99H12xzncCkz0a3RuehINE81FZSe2QTj3uvAPTcJX/SCzUQHQ0D1GrPMbrPitg==",
"license": "MIT",
"dependencies": {
"tunnel": "^0.0.6",
@@ -49,9 +49,9 @@
}
},
"node_modules/undici": {
- "version": "6.24.1",
- "resolved": "https://registry.npmjs.org/undici/-/undici-6.24.1.tgz",
- "integrity": "sha512-sC+b0tB1whOCzbtlx20fx3WgCXwkW627p4EA9uM+/tNNPkSS+eSEld6pAs9nDv7WbY1UUljBMYPtu9BCOrCWKA==",
+ "version": "6.25.0",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.25.0.tgz",
+ "integrity": "sha512-ZgpWDC5gmNiuY9CnLVXEH8rl50xhRCuLNA97fAUnKi8RRuV4E6KG31pDTsLVUKnohJE0I3XDrTeEydAXRw47xg==",
"license": "MIT",
"engines": {
"node": ">=18.17"
diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json
index 3088d9d..01f93cd 100644
--- a/node_modules/@actions/core/package.json
+++ b/node_modules/@actions/core/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/core",
- "version": "3.0.0",
+ "version": "3.0.1",
"description": "Actions core lib",
"keywords": [
"github",
diff --git a/node_modules/@actions/http-client/package.json b/node_modules/@actions/http-client/package.json
index 79a3c59..e6e8945 100644
--- a/node_modules/@actions/http-client/package.json
+++ b/node_modules/@actions/http-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/http-client",
- "version": "4.0.0",
+ "version": "4.0.1",
"description": "Actions Http Client",
"keywords": [
"github",
diff --git a/node_modules/undici/docs/docs/api/Client.md b/node_modules/undici/docs/docs/api/Client.md
index 03342f5..fdee5ea 100644
--- a/node_modules/undici/docs/docs/api/Client.md
+++ b/node_modules/undici/docs/docs/api/Client.md
@@ -26,6 +26,8 @@ Returns: `Client`
* **keepAliveTimeoutThreshold** `number | null` (optional) - Default: `2e3` - A number of milliseconds subtracted from server *keep-alive* hints when overriding `keepAliveTimeout` to account for timing inaccuracies caused by e.g. transport latency. Defaults to 2 seconds.
* **maxHeaderSize** `number | null` (optional) - Default: `--max-http-header-size` or `16384` - The maximum length of request headers in bytes. Defaults to Node.js' --max-http-header-size or 16KiB.
* **maxResponseSize** `number | null` (optional) - Default: `-1` - The maximum length of response body in bytes. Set to `-1` to disable.
+* **webSocket** `WebSocketOptions` (optional) - WebSocket-specific configuration options.
+ * **maxPayloadSize** `number` (optional) - Default: `134217728` (128 MB) - Maximum allowed payload size in bytes for WebSocket messages. Applied to uncompressed messages, compressed frame payloads, and decompressed (permessage-deflate) messages. Set to 0 to disable the limit.
* **pipelining** `number | null` (optional) - Default: `1` - The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Carefully consider your workload and environment before enabling concurrent requests as pipelining may reduce performance if used incorrectly. Pipelining is sensitive to network stack settings as well as head of line blocking caused by e.g. long running requests. Set to `0` to disable keep-alive connections.
* **connect** `ConnectOptions | Function | null` (optional) - Default: `null`.
* **strictContentLength** `Boolean` (optional) - Default: `true` - Whether to treat request content length mismatches as errors. If true, an error is thrown when the request content-length header doesn't match the length of the request body.
diff --git a/node_modules/undici/lib/dispatcher/agent.js b/node_modules/undici/lib/dispatcher/agent.js
index 98f1486..db2f817 100644
--- a/node_modules/undici/lib/dispatcher/agent.js
+++ b/node_modules/undici/lib/dispatcher/agent.js
@@ -24,7 +24,6 @@ function defaultFactory (origin, opts) {
class Agent extends DispatcherBase {
constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
- super()
if (typeof factory !== 'function') {
throw new InvalidArgumentError('factory must be a function.')
@@ -38,6 +37,8 @@ class Agent extends DispatcherBase {
throw new InvalidArgumentError('maxRedirections must be a positive number')
}
+ super(options)
+
if (connect && typeof connect !== 'function') {
connect = { ...connect }
}
diff --git a/node_modules/undici/lib/dispatcher/client.js b/node_modules/undici/lib/dispatcher/client.js
index 3dc3566..18472ff 100644
--- a/node_modules/undici/lib/dispatcher/client.js
+++ b/node_modules/undici/lib/dispatcher/client.js
@@ -106,9 +106,10 @@ class Client extends DispatcherBase {
autoSelectFamilyAttemptTimeout,
// h2
maxConcurrentStreams,
- allowH2
+ allowH2,
+ webSocket
} = {}) {
- super()
+ super({ webSocket })
if (keepAlive !== undefined) {
throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')
diff --git a/node_modules/undici/lib/dispatcher/dispatcher-base.js b/node_modules/undici/lib/dispatcher/dispatcher-base.js
index bd860ac..c999b2c 100644
--- a/node_modules/undici/lib/dispatcher/dispatcher-base.js
+++ b/node_modules/undici/lib/dispatcher/dispatcher-base.js
@@ -11,15 +11,23 @@ const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = requ
const kOnDestroyed = Symbol('onDestroyed')
const kOnClosed = Symbol('onClosed')
const kInterceptedDispatch = Symbol('Intercepted Dispatch')
+const kWebSocketOptions = Symbol('webSocketOptions')
class DispatcherBase extends Dispatcher {
- constructor () {
+ constructor (opts) {
super()
this[kDestroyed] = false
this[kOnDestroyed] = null
this[kClosed] = false
this[kOnClosed] = []
+ this[kWebSocketOptions] = opts?.webSocket ?? {}
+ }
+
+ get webSocketOptions () {
+ return {
+ maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024
+ }
}
get destroyed () {
diff --git a/node_modules/undici/lib/dispatcher/pool-base.js b/node_modules/undici/lib/dispatcher/pool-base.js
index d0ba2c3..6f9ec5e 100644
--- a/node_modules/undici/lib/dispatcher/pool-base.js
+++ b/node_modules/undici/lib/dispatcher/pool-base.js
@@ -19,8 +19,8 @@ const kRemoveClient = Symbol('remove client')
const kStats = Symbol('stats')
class PoolBase extends DispatcherBase {
- constructor () {
- super()
+ constructor (opts) {
+ super(opts)
this[kQueue] = new FixedQueue()
this[kClients] = []
diff --git a/node_modules/undici/lib/dispatcher/pool.js b/node_modules/undici/lib/dispatcher/pool.js
index 0b8a2da..9eaf3fd 100644
--- a/node_modules/undici/lib/dispatcher/pool.js
+++ b/node_modules/undici/lib/dispatcher/pool.js
@@ -37,8 +37,6 @@ class Pool extends PoolBase {
allowH2,
...options
} = {}) {
- super()
-
if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
throw new InvalidArgumentError('invalid connections')
}
@@ -63,6 +61,8 @@ class Pool extends PoolBase {
})
}
+ super(options)
+
this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool)
? options.interceptors.Pool
: []
diff --git a/node_modules/undici/lib/web/websocket/permessage-deflate.js b/node_modules/undici/lib/web/websocket/permessage-deflate.js
index 1f1a130..6a6e438 100644
--- a/node_modules/undici/lib/web/websocket/permessage-deflate.js
+++ b/node_modules/undici/lib/web/websocket/permessage-deflate.js
@@ -8,40 +8,35 @@ const tail = Buffer.from([0x00, 0x00, 0xff, 0xff])
const kBuffer = Symbol('kBuffer')
const kLength = Symbol('kLength')
-// Default maximum decompressed message size: 4 MB
-const kDefaultMaxDecompressedSize = 4 * 1024 * 1024
-
class PerMessageDeflate {
/** @type {import('node:zlib').InflateRaw} */
#inflate
#options = {}
- /** @type {boolean} */
- #aborted = false
-
- /** @type {Function|null} */
- #currentCallback = null
+ #maxPayloadSize = 0
/**
* @param {Map<string, string>} extensions
*/
- constructor (extensions) {
+ constructor (extensions, options) {
this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover')
this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits')
+
+ this.#maxPayloadSize = options.maxPayloadSize
}
+ /**
+ * Decompress a compressed payload.
+ * @param {Buffer} chunk Compressed data
+ * @param {boolean} fin Final fragment flag
+ * @param {Function} callback Callback function
+ */
decompress (chunk, fin, callback) {
// An endpoint uses the following algorithm to decompress a message.
// 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the
// payload of the message.
// 2. Decompress the resulting data using DEFLATE.
-
- if (this.#aborted) {
- callback(new MessageSizeExceededError())
- return
- }
-
if (!this.#inflate) {
let windowBits = Z_DEFAULT_WINDOWBITS
@@ -64,23 +59,12 @@ class PerMessageDeflate {
this.#inflate[kLength] = 0
this.#inflate.on('data', (data) => {
- if (this.#aborted) {
- return
- }
-
this.#inflate[kLength] += data.length
- if (this.#inflate[kLength] > kDefaultMaxDecompressedSize) {
- this.#aborted = true
+ if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) {
+ callback(new MessageSizeExceededError())
this.#inflate.removeAllListeners()
- this.#inflate.destroy()
this.#inflate = null
-
- if (this.#currentCallback) {
- const cb = this.#currentCallback
- this.#currentCallback = null
- cb(new MessageSizeExceededError())
- }
return
}
@@ -93,14 +77,13 @@ class PerMessageDeflate {
})
}
- this.#currentCallback = callback
this.#inflate.write(chunk)
if (fin) {
this.#inflate.write(tail)
}
this.#inflate.flush(() => {
- if (this.#aborted || !this.#inflate) {
+ if (!this.#inflate) {
return
}
@@ -108,7 +91,6 @@ class PerMessageDeflate {
this.#inflate[kBuffer].length = 0
this.#inflate[kLength] = 0
- this.#currentCallback = null
callback(null, full)
})
diff --git a/node_modules/undici/lib/web/websocket/receiver.js b/node_modules/undici/lib/web/websocket/receiver.js
index e7f7512..53e427e 100644
--- a/node_modules/undici/lib/web/websocket/receiver.js
+++ b/node_modules/undici/lib/web/websocket/receiver.js
@@ -18,6 +18,7 @@ const {
const { WebsocketFrameSend } = require('./frame')
const { closeWebSocketConnection } = require('./connection')
const { PerMessageDeflate } = require('./permessage-deflate')
+const { MessageSizeExceededError } = require('../../core/errors')
// This code was influenced by ws released under the MIT license.
// Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
@@ -26,6 +27,7 @@ const { PerMessageDeflate } = require('./permessage-deflate')
class ByteParser extends Writable {
#buffers = []
+ #fragmentsBytes = 0
#byteOffset = 0
#loop = false
@@ -37,18 +39,23 @@ class ByteParser extends Writable {
/** @type {Map<string, PerMessageDeflate>} */
#extensions
+ /** @type {number} */
+ #maxPayloadSize
+
/**
* @param {import('./websocket').WebSocket} ws
* @param {Map<string, string>|null} extensions
+ * @param {{ maxPayloadSize?: number }} [options]
*/
- constructor (ws, extensions) {
+ constructor (ws, extensions, options = {}) {
super()
this.ws = ws
this.#extensions = extensions == null ? new Map() : extensions
+ this.#maxPayloadSize = options.maxPayloadSize ?? 0
if (this.#extensions.has('permessage-deflate')) {
- this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions))
+ this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options))
}
}
@@ -64,6 +71,19 @@ class ByteParser extends Writable {
this.run(callback)
}
+ #validatePayloadLength () {
+ if (
+ this.#maxPayloadSize > 0 &&
+ !isControlFrame(this.#info.opcode) &&
+ this.#info.payloadLength > this.#maxPayloadSize
+ ) {
+ failWebsocketConnection(this.ws, 'Payload size exceeds maximum allowed size')
+ return false
+ }
+
+ return true
+ }
+
/**
* Runs whenever a new chunk is received.
* Callback is called whenever there are no more chunks buffering,
@@ -152,6 +172,10 @@ class ByteParser extends Writable {
if (payloadLength <= 125) {
this.#info.payloadLength = payloadLength
this.#state = parserStates.READ_DATA
+
+ if (!this.#validatePayloadLength()) {
+ return
+ }
} else if (payloadLength === 126) {
this.#state = parserStates.PAYLOADLENGTH_16
} else if (payloadLength === 127) {
@@ -176,6 +200,10 @@ class ByteParser extends Writable {
this.#info.payloadLength = buffer.readUInt16BE(0)
this.#state = parserStates.READ_DATA
+
+ if (!this.#validatePayloadLength()) {
+ return
+ }
} else if (this.#state === parserStates.PAYLOADLENGTH_64) {
if (this.#byteOffset < 8) {
return callback()
@@ -198,6 +226,10 @@ class ByteParser extends Writable {
this.#info.payloadLength = lower
this.#state = parserStates.READ_DATA
+
+ if (!this.#validatePayloadLength()) {
+ return
+ }
} else if (this.#state === parserStates.READ_DATA) {
if (this.#byteOffset < this.#info.payloadLength) {
return callback()
@@ -210,42 +242,53 @@ class ByteParser extends Writable {
this.#state = parserStates.INFO
} else {
if (!this.#info.compressed) {
- this.#fragments.push(body)
+ this.writeFragments(body)
+
+ if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) {
+ failWebsocketConnection(this.ws, new MessageSizeExceededError().message)
+ return
+ }
// If the frame is not fragmented, a message has been received.
// If the frame is fragmented, it will terminate with a fin bit set
// and an opcode of 0 (continuation), therefore we handle that when
// parsing continuation frames, not here.
if (!this.#info.fragmented && this.#info.fin) {
- const fullMessage = Buffer.concat(this.#fragments)
- websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage)
- this.#fragments.length = 0
+ websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments())
}
this.#state = parserStates.INFO
} else {
- this.#extensions.get('permessage-deflate').decompress(body, this.#info.fin, (error, data) => {
- if (error) {
- failWebsocketConnection(this.ws, error.message)
- return
- }
+ this.#extensions.get('permessage-deflate').decompress(
+ body,
+ this.#info.fin,
+ (error, data) => {
+ if (error) {
+ failWebsocketConnection(this.ws, error.message)
+ return
+ }
- this.#fragments.push(data)
+ this.writeFragments(data)
+
+ if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) {
+ failWebsocketConnection(this.ws, new MessageSizeExceededError().message)
+ return
+ }
+
+ if (!this.#info.fin) {
+ this.#state = parserStates.INFO
+ this.#loop = true
+ this.run(callback)
+ return
+ }
+
+ websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments())
- if (!this.#info.fin) {
- this.#state = parserStates.INFO
this.#loop = true
+ this.#state = parserStates.INFO
this.run(callback)
- return
}
-
- websocketMessageReceived(this.ws, this.#info.binaryType, Buffer.concat(this.#fragments))
-
- this.#loop = true
- this.#state = parserStates.INFO
- this.#fragments.length = 0
- this.run(callback)
- })
+ )
this.#loop = false
break
@@ -297,6 +340,26 @@ class ByteParser extends Writable {
return buffer
}
+ writeFragments (fragment) {
+ this.#fragmentsBytes += fragment.length
+ this.#fragments.push(fragment)
+ }
+
+ consumeFragments () {
+ const fragments = this.#fragments
+
+ if (fragments.length === 1) {
+ this.#fragmentsBytes = 0
+ return fragments.shift()
+ }
+
+ const output = Buffer.concat(fragments, this.#fragmentsBytes)
+ this.#fragments = []
+ this.#fragmentsBytes = 0
+
+ return output
+ }
+
parseCloseBody (data) {
assert(data.length !== 1)
diff --git a/node_modules/undici/lib/web/websocket/websocket.js b/node_modules/undici/lib/web/websocket/websocket.js
index aa2a20a..ccedb79 100644
--- a/node_modules/undici/lib/web/websocket/websocket.js
+++ b/node_modules/undici/lib/web/websocket/websocket.js
@@ -435,7 +435,11 @@ class WebSocket extends EventTarget {
// once this happens, the connection is open
this[kResponse] = response
- const parser = new ByteParser(this, parsedExtensions)
+ const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize
+
+ const parser = new ByteParser(this, parsedExtensions, {
+ maxPayloadSize
+ })
parser.on('drain', onParserDrain)
parser.on('error', onParserError.bind(this))
diff --git a/node_modules/undici/package.json b/node_modules/undici/package.json
index 0c57391..46cb9a8 100644
--- a/node_modules/undici/package.json
+++ b/node_modules/undici/package.json
@@ -1,6 +1,6 @@
{
"name": "undici",
- "version": "6.24.1",
+ "version": "6.25.0",
"description": "An HTTP/1.1 client, written from scratch for Node.js",
"homepage": "https://undici.nodejs.org",
"bugs": {
diff --git a/node_modules/undici/types/client.d.ts b/node_modules/undici/types/client.d.ts
index d0a5379..22833ae 100644
--- a/node_modules/undici/types/client.d.ts
+++ b/node_modules/undici/types/client.d.ts
@@ -78,6 +78,8 @@ export declare namespace Client {
localAddress?: string;
/** Max response body size in bytes, -1 is disabled */
maxResponseSize?: number;
+ /** WebSocket-specific options */
+ webSocket?: Client.WebSocketOptions;
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
autoSelectFamily?: boolean;
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
@@ -103,6 +105,15 @@ export declare namespace Client {
bytesWritten?: number
bytesRead?: number
}
+ export interface WebSocketOptions {
+ /**
+ * Maximum allowed payload size in bytes for WebSocket messages.
+ * Applied to uncompressed messages, compressed frame payloads, and decompressed (permessage-deflate) messages.
+ * Set to 0 to disable the limit.
+ * @default 134217728 (128 MB)
+ */
+ maxPayloadSize?: number;
+ }
}
export default Client;