undici-types 6.24.0 → 6.25.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/client.d.ts +11 -0
- package/package.json +1 -1
- package/websocket.d.ts +1 -8
package/client.d.ts
CHANGED
|
@@ -78,6 +78,8 @@ export declare namespace Client {
|
|
|
78
78
|
localAddress?: string;
|
|
79
79
|
/** Max response body size in bytes, -1 is disabled */
|
|
80
80
|
maxResponseSize?: number;
|
|
81
|
+
/** WebSocket-specific options */
|
|
82
|
+
webSocket?: Client.WebSocketOptions;
|
|
81
83
|
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
|
|
82
84
|
autoSelectFamily?: boolean;
|
|
83
85
|
/** 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 {
|
|
|
103
105
|
bytesWritten?: number
|
|
104
106
|
bytesRead?: number
|
|
105
107
|
}
|
|
108
|
+
export interface WebSocketOptions {
|
|
109
|
+
/**
|
|
110
|
+
* Maximum allowed payload size in bytes for WebSocket messages.
|
|
111
|
+
* Applied to uncompressed messages, compressed frame payloads, and decompressed (permessage-deflate) messages.
|
|
112
|
+
* Set to 0 to disable the limit.
|
|
113
|
+
* @default 134217728 (128 MB)
|
|
114
|
+
*/
|
|
115
|
+
maxPayloadSize?: number;
|
|
116
|
+
}
|
|
106
117
|
}
|
|
107
118
|
|
|
108
119
|
export default Client;
|
package/package.json
CHANGED
package/websocket.d.ts
CHANGED
|
@@ -146,12 +146,5 @@ export declare const ErrorEvent: {
|
|
|
146
146
|
interface WebSocketInit {
|
|
147
147
|
protocols?: string | string[],
|
|
148
148
|
dispatcher?: Dispatcher,
|
|
149
|
-
headers?: HeadersInit
|
|
150
|
-
/**
|
|
151
|
-
* Maximum size in bytes for decompressed WebSocket messages.
|
|
152
|
-
* When a message exceeds this limit during decompression, the connection
|
|
153
|
-
* will be closed with status code 1009 (Message Too Big).
|
|
154
|
-
* @default 4194304 (4 MB)
|
|
155
|
-
*/
|
|
156
|
-
maxDecompressedMessageSize?: number
|
|
149
|
+
headers?: HeadersInit
|
|
157
150
|
}
|