aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node_modules/undici/lib/dispatcher
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/undici/lib/dispatcher
parentworkflows/test: reschedule for my convenience (diff)
downloadcleanup-path-5.0.2.tar.gz
cleanup-path-5.0.2.zip
bump dependenciesv5.0.2
Diffstat (limited to '')
-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
5 files changed, 18 insertions, 8 deletions
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
: []