undici-types 7.23.0 → 7.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/errors.d.ts CHANGED
@@ -168,4 +168,10 @@ declare namespace Errors {
168
168
  name: 'Socks5ProxyError'
169
169
  code: string
170
170
  }
171
+
172
+ /** WebSocket decompressed message exceeded maximum size. */
173
+ export class MessageSizeExceededError extends UndiciError {
174
+ name: 'MessageSizeExceededError'
175
+ code: 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED'
176
+ }
171
177
  }
package/interceptors.d.ts CHANGED
@@ -60,6 +60,13 @@ declare namespace Interceptors {
60
60
  * @default []
61
61
  */
62
62
  excludeHeaderNames?: string[]
63
+ /**
64
+ * Maximum bytes buffered per paused waiting deduplicated handler.
65
+ * If a waiting handler remains paused and exceeds this threshold,
66
+ * it is failed with an abort error to prevent unbounded memory growth.
67
+ * @default 5 * 1024 * 1024
68
+ */
69
+ maxBufferSize?: number
63
70
  }
64
71
 
65
72
  export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici-types",
3
- "version": "7.23.0",
3
+ "version": "7.24.0",
4
4
  "description": "A stand-alone types package for Undici",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {
package/websocket.d.ts CHANGED
@@ -147,7 +147,14 @@ export declare const ErrorEvent: {
147
147
  interface WebSocketInit {
148
148
  protocols?: string | string[],
149
149
  dispatcher?: Dispatcher,
150
- headers?: HeadersInit
150
+ headers?: HeadersInit,
151
+ /**
152
+ * Maximum size in bytes for decompressed WebSocket messages.
153
+ * When a message exceeds this limit during decompression, the connection
154
+ * will be closed with status code 1009 (Message Too Big).
155
+ * @default 4194304 (4 MB)
156
+ */
157
+ maxDecompressedMessageSize?: number
151
158
  }
152
159
 
153
160
  interface WebSocketStreamOptions {