undici-types 8.4.1 → 8.6.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 +6 -1
- package/cookies.d.ts +1 -1
- package/errors.d.ts +10 -0
- package/fetch.d.ts +1 -0
- package/package.json +1 -1
package/client.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export declare namespace Client {
|
|
|
57
57
|
keepAliveTimeoutThreshold?: number;
|
|
58
58
|
/** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */
|
|
59
59
|
socketPath?: string;
|
|
60
|
-
/** 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). Default: `1`. */
|
|
60
|
+
/** 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). Only enable values greater than `1` when the remote server is trusted. Default: `1`. */
|
|
61
61
|
pipelining?: number;
|
|
62
62
|
/** @deprecated use the connect option instead */
|
|
63
63
|
tls?: never;
|
|
@@ -116,6 +116,11 @@ export declare namespace Client {
|
|
|
116
116
|
bytesRead?: number
|
|
117
117
|
}
|
|
118
118
|
export interface WebSocketOptions {
|
|
119
|
+
/**
|
|
120
|
+
* Maximum number of fragments in a message. Set to 0 to disable the limit.
|
|
121
|
+
* @default 131072
|
|
122
|
+
*/
|
|
123
|
+
maxFragments?: number;
|
|
119
124
|
/**
|
|
120
125
|
* Maximum allowed payload size in bytes for WebSocket messages.
|
|
121
126
|
* Applied to uncompressed messages, compressed frame payloads, and decompressed (permessage-deflate) messages.
|
package/cookies.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface Cookie {
|
|
|
18
18
|
export function deleteCookie (
|
|
19
19
|
headers: Headers,
|
|
20
20
|
name: string,
|
|
21
|
-
attributes?: {
|
|
21
|
+
attributes?: { path?: string, domain?: string }
|
|
22
22
|
): void
|
|
23
23
|
|
|
24
24
|
export function getCookies (headers: Headers): Record<string, string>
|
package/errors.d.ts
CHANGED
|
@@ -154,6 +154,16 @@ declare namespace Errors {
|
|
|
154
154
|
code: 'UND_ERR_PRX_TLS'
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
export class ProxyConnectionError extends UndiciError {
|
|
158
|
+
constructor (
|
|
159
|
+
cause?: Error,
|
|
160
|
+
message?: string,
|
|
161
|
+
options?: Record<any, any>
|
|
162
|
+
)
|
|
163
|
+
name: 'ProxyConnectionError'
|
|
164
|
+
code: 'UND_ERR_PRX_CONN'
|
|
165
|
+
}
|
|
166
|
+
|
|
157
167
|
export class MaxOriginsReachedError extends UndiciError {
|
|
158
168
|
name: 'MaxOriginsReachedError'
|
|
159
169
|
code: 'UND_ERR_MAX_ORIGINS_REACHED'
|
package/fetch.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export class BodyMixin {
|
|
|
57
57
|
readonly formData: () => Promise<FormData>
|
|
58
58
|
readonly json: () => Promise<unknown>
|
|
59
59
|
readonly text: () => Promise<string>
|
|
60
|
+
readonly textStream: () => ReadableStream<string>
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
export interface SpecIterator<T, TReturn = any, TNext = undefined> {
|