undici-types 8.0.2 → 8.1.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/agent.d.ts +0 -2
- package/client.d.ts +18 -12
- package/dispatcher.d.ts +0 -2
- package/h2c-client.d.ts +6 -6
- package/package.json +1 -1
- package/pool.d.ts +0 -2
- package/round-robin-pool.d.ts +0 -2
- package/webidl.d.ts +0 -1
package/agent.d.ts
CHANGED
|
@@ -22,8 +22,6 @@ declare namespace Agent {
|
|
|
22
22
|
export interface Options extends Pool.Options {
|
|
23
23
|
/** Default: `(origin, opts) => new Pool(origin, opts)`. */
|
|
24
24
|
factory?(origin: string | URL, opts: Object): Dispatcher;
|
|
25
|
-
|
|
26
|
-
interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options['interceptors']
|
|
27
25
|
maxOrigins?: number
|
|
28
26
|
}
|
|
29
27
|
|
package/client.d.ts
CHANGED
|
@@ -30,12 +30,7 @@ export class Client extends Dispatcher {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export declare namespace Client {
|
|
33
|
-
export interface OptionsInterceptors {
|
|
34
|
-
Client: readonly Dispatcher.DispatchInterceptor[];
|
|
35
|
-
}
|
|
36
33
|
export interface Options {
|
|
37
|
-
/** TODO */
|
|
38
|
-
interceptors?: OptionsInterceptors;
|
|
39
34
|
/** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
|
|
40
35
|
maxHeaderSize?: number;
|
|
41
36
|
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
|
|
@@ -44,7 +39,7 @@ export declare namespace Client {
|
|
|
44
39
|
socketTimeout?: never;
|
|
45
40
|
/** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
|
|
46
41
|
requestTimeout?: never;
|
|
47
|
-
/**
|
|
42
|
+
/** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */
|
|
48
43
|
connectTimeout?: number;
|
|
49
44
|
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
|
|
50
45
|
bodyTimeout?: number;
|
|
@@ -60,7 +55,7 @@ export declare namespace Client {
|
|
|
60
55
|
keepAliveMaxTimeout?: number;
|
|
61
56
|
/** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
|
|
62
57
|
keepAliveTimeoutThreshold?: number;
|
|
63
|
-
/**
|
|
58
|
+
/** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */
|
|
64
59
|
socketPath?: string;
|
|
65
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`. */
|
|
66
61
|
pipelining?: number;
|
|
@@ -68,23 +63,25 @@ export declare namespace Client {
|
|
|
68
63
|
tls?: never;
|
|
69
64
|
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
|
|
70
65
|
strictContentLength?: boolean;
|
|
71
|
-
/**
|
|
66
|
+
/** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */
|
|
72
67
|
maxCachedSessions?: number;
|
|
73
|
-
/**
|
|
68
|
+
/** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */
|
|
74
69
|
connect?: Partial<buildConnector.BuildOptions> | buildConnector.connector;
|
|
75
|
-
/**
|
|
70
|
+
/** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */
|
|
76
71
|
maxRequestsPerClient?: number;
|
|
77
|
-
/**
|
|
72
|
+
/** Local IP address the socket should connect from. */
|
|
78
73
|
localAddress?: string;
|
|
79
74
|
/** Max response body size in bytes, -1 is disabled */
|
|
80
75
|
maxResponseSize?: number;
|
|
76
|
+
/** WebSocket-specific options */
|
|
77
|
+
webSocket?: Client.WebSocketOptions;
|
|
81
78
|
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
|
|
82
79
|
autoSelectFamily?: boolean;
|
|
83
80
|
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
|
|
84
81
|
autoSelectFamilyAttemptTimeout?: number;
|
|
85
82
|
/**
|
|
86
83
|
* @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
|
|
87
|
-
* @default
|
|
84
|
+
* @default true
|
|
88
85
|
*/
|
|
89
86
|
allowH2?: boolean;
|
|
90
87
|
/**
|
|
@@ -118,6 +115,15 @@ export declare namespace Client {
|
|
|
118
115
|
bytesWritten?: number
|
|
119
116
|
bytesRead?: number
|
|
120
117
|
}
|
|
118
|
+
export interface WebSocketOptions {
|
|
119
|
+
/**
|
|
120
|
+
* Maximum allowed payload size in bytes for WebSocket messages.
|
|
121
|
+
* Applied to uncompressed messages, compressed frame payloads, and decompressed (permessage-deflate) messages.
|
|
122
|
+
* Set to 0 to disable the limit.
|
|
123
|
+
* @default 134217728 (128 MB)
|
|
124
|
+
*/
|
|
125
|
+
maxPayloadSize?: number;
|
|
126
|
+
}
|
|
121
127
|
}
|
|
122
128
|
|
|
123
129
|
export default Client
|
package/dispatcher.d.ts
CHANGED
|
@@ -8,8 +8,6 @@ import { FormData } from './formdata'
|
|
|
8
8
|
import Errors from './errors'
|
|
9
9
|
import { Autocomplete } from './utility'
|
|
10
10
|
|
|
11
|
-
type AbortSignal = unknown
|
|
12
|
-
|
|
13
11
|
export default Dispatcher
|
|
14
12
|
|
|
15
13
|
export type UndiciHeaders = Record<string, string | string[]> | IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null
|
package/h2c-client.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare namespace H2CClient {
|
|
|
32
32
|
maxHeaderSize?: number;
|
|
33
33
|
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
|
|
34
34
|
headersTimeout?: number;
|
|
35
|
-
/**
|
|
35
|
+
/** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */
|
|
36
36
|
connectTimeout?: number;
|
|
37
37
|
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
|
|
38
38
|
bodyTimeout?: number;
|
|
@@ -42,19 +42,19 @@ export declare namespace H2CClient {
|
|
|
42
42
|
keepAliveMaxTimeout?: number;
|
|
43
43
|
/** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
|
|
44
44
|
keepAliveTimeoutThreshold?: number;
|
|
45
|
-
/**
|
|
45
|
+
/** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */
|
|
46
46
|
socketPath?: string;
|
|
47
47
|
/** 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`. */
|
|
48
48
|
pipelining?: number;
|
|
49
49
|
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
|
|
50
50
|
strictContentLength?: boolean;
|
|
51
|
-
/**
|
|
51
|
+
/** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */
|
|
52
52
|
maxCachedSessions?: number;
|
|
53
|
-
/**
|
|
53
|
+
/** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */
|
|
54
54
|
connect?: Omit<Partial<buildConnector.BuildOptions>, 'allowH2'> | buildConnector.connector;
|
|
55
|
-
/**
|
|
55
|
+
/** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */
|
|
56
56
|
maxRequestsPerClient?: number;
|
|
57
|
-
/**
|
|
57
|
+
/** Local IP address the socket should connect from. */
|
|
58
58
|
localAddress?: string;
|
|
59
59
|
/** Max response body size in bytes, -1 is disabled */
|
|
60
60
|
maxResponseSize?: number;
|
package/package.json
CHANGED
package/pool.d.ts
CHANGED
|
@@ -35,7 +35,5 @@ declare namespace Pool {
|
|
|
35
35
|
connections?: number | null;
|
|
36
36
|
/** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */
|
|
37
37
|
clientTtl?: number | null;
|
|
38
|
-
|
|
39
|
-
interceptors?: { Pool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options['interceptors']
|
|
40
38
|
}
|
|
41
39
|
}
|
package/round-robin-pool.d.ts
CHANGED
|
@@ -35,7 +35,5 @@ declare namespace RoundRobinPool {
|
|
|
35
35
|
connections?: number | null;
|
|
36
36
|
/** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */
|
|
37
37
|
clientTtl?: number | null;
|
|
38
|
-
|
|
39
|
-
interceptors?: { RoundRobinPool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options['interceptors']
|
|
40
38
|
}
|
|
41
39
|
}
|