@idlebox/stripe-node-types 24.0.14-patch.0 → 24.0.15
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/README.md +1 -1
- package/assert/strict.d.ts +113 -1
- package/assert.d.ts +162 -248
- package/async_hooks.d.ts +20 -5
- package/buffer.buffer.d.ts +24 -6
- package/buffer.d.ts +63 -168
- package/child_process.d.ts +117 -223
- package/cluster.d.ts +251 -329
- package/compatibility/iterators.d.ts +15 -0
- package/console.d.ts +60 -346
- package/constants.d.ts +15 -1
- package/crypto.d.ts +713 -1149
- package/dgram.d.ts +30 -50
- package/diagnostics_channel.d.ts +16 -3
- package/dns/promises.d.ts +15 -0
- package/dns.d.ts +150 -131
- package/domain.d.ts +25 -14
- package/events.d.ts +858 -719
- package/fs/promises.d.ts +117 -53
- package/fs.d.ts +729 -484
- package/globals.d.ts +142 -344
- package/globals.typedarray.d.ts +94 -0
- package/http.d.ts +358 -246
- package/http2.d.ts +578 -711
- package/https.d.ts +85 -216
- package/index.d.ts +39 -3
- package/inspector/promises.d.ts +54 -0
- package/inspector.d.ts +180 -3936
- package/inspector.generated.d.ts +4242 -0
- package/module.d.ts +60 -95
- package/my-shim.d.ts +15 -0
- package/net.d.ts +102 -186
- package/os.d.ts +32 -6
- package/package.json +3 -8
- package/path/posix.d.ts +20 -0
- package/path/win32.d.ts +20 -0
- package/path.d.ts +132 -122
- package/perf_hooks.d.ts +310 -644
- package/process.d.ts +192 -138
- package/punycode.d.ts +17 -2
- package/querystring.d.ts +16 -1
- package/quic.d.ts +926 -0
- package/readline/promises.d.ts +16 -1
- package/readline.d.ts +80 -118
- package/repl.d.ts +98 -96
- package/sea.d.ts +25 -1
- package/sqlite.d.ts +277 -13
- package/stream/consumers.d.ts +22 -7
- package/stream/promises.d.ts +148 -12
- package/stream/web.d.ts +187 -494
- package/stream.d.ts +608 -490
- package/string_decoder.d.ts +18 -3
- package/test/reporters.d.ts +112 -0
- package/test.d.ts +238 -199
- package/timers/promises.d.ts +16 -1
- package/timers.d.ts +16 -129
- package/tls.d.ts +163 -163
- package/trace_events.d.ts +21 -6
- package/ts5.6/buffer.buffer.d.ts +25 -8
- package/ts5.6/compatibility/float16array.d.ts +15 -0
- package/ts5.6/globals.typedarray.d.ts +31 -0
- package/ts5.6/index.d.ts +39 -3
- package/ts5.7/compatibility/float16array.d.ts +15 -0
- package/ts5.7/index.d.ts +39 -3
- package/tty.d.ts +70 -13
- package/undici-types/agent.d.ts +20 -4
- package/undici-types/api.d.ts +15 -0
- package/undici-types/balanced-pool.d.ts +15 -0
- package/undici-types/cache-interceptor.d.ts +15 -0
- package/undici-types/cache.d.ts +15 -0
- package/undici-types/client-stats.d.ts +31 -0
- package/undici-types/client.d.ts +21 -5
- package/undici-types/connector.d.ts +15 -0
- package/undici-types/content-type.d.ts +15 -0
- package/undici-types/cookies.d.ts +15 -0
- package/undici-types/diagnostics-channel.d.ts +24 -1
- package/undici-types/dispatcher.d.ts +18 -8
- package/undici-types/env-http-proxy-agent.d.ts +17 -1
- package/undici-types/errors.d.ts +20 -15
- package/undici-types/eventsource.d.ts +24 -4
- package/undici-types/fetch.d.ts +16 -0
- package/undici-types/formdata.d.ts +15 -0
- package/undici-types/global-dispatcher.d.ts +15 -0
- package/undici-types/global-origin.d.ts +15 -0
- package/undici-types/h2c-client.d.ts +15 -2
- package/undici-types/handlers.d.ts +16 -1
- package/undici-types/header.d.ts +15 -0
- package/undici-types/index.d.ts +21 -1
- package/undici-types/interceptors.d.ts +20 -0
- package/undici-types/mock-agent.d.ts +18 -0
- package/undici-types/mock-call-history.d.ts +15 -0
- package/undici-types/mock-client.d.ts +17 -0
- package/undici-types/mock-errors.d.ts +15 -0
- package/undici-types/mock-interceptor.d.ts +17 -1
- package/undici-types/mock-pool.d.ts +17 -0
- package/undici-types/package.json +1 -1
- package/undici-types/patch.d.ts +15 -0
- package/undici-types/pool-stats.d.ts +15 -0
- package/undici-types/pool.d.ts +17 -0
- package/undici-types/proxy-agent.d.ts +16 -0
- package/undici-types/readable.d.ts +15 -0
- package/undici-types/retry-agent.d.ts +15 -0
- package/undici-types/retry-handler.d.ts +24 -0
- package/undici-types/snapshot-agent.d.ts +125 -0
- package/undici-types/util.d.ts +15 -0
- package/undici-types/utility.d.ts +15 -0
- package/undici-types/webidl.d.ts +126 -36
- package/undici-types/websocket.d.ts +18 -1
- package/url.d.ts +107 -587
- package/util/types.d.ts +571 -0
- package/util.d.ts +158 -792
- package/v8.d.ts +82 -7
- package/vm.d.ts +267 -108
- package/wasi.d.ts +38 -2
- package/web-globals/abortcontroller.d.ts +75 -0
- package/web-globals/blob.d.ts +39 -0
- package/web-globals/console.d.ts +25 -0
- package/web-globals/crypto.d.ts +55 -0
- package/web-globals/domexception.d.ts +84 -0
- package/web-globals/encoding.d.ts +27 -0
- package/{dom-events.d.ts → web-globals/events.d.ts} +72 -50
- package/web-globals/fetch.d.ts +70 -0
- package/web-globals/importmeta.d.ts +29 -0
- package/web-globals/messaging.d.ts +39 -0
- package/web-globals/navigator.d.ts +41 -0
- package/web-globals/performance.d.ts +61 -0
- package/web-globals/storage.d.ts +40 -0
- package/web-globals/streams.d.ts +131 -0
- package/web-globals/timers.d.ts +60 -0
- package/web-globals/url.d.ts +40 -0
- package/worker_threads.d.ts +306 -349
- package/zlib.d.ts +59 -94
- package/ts5.1/compatibility/disposable.d.ts +0 -13
- package/ts5.1/index.d.ts +0 -100
package/undici-types/client.d.ts
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import { URL } from 'node:url'
|
|
2
17
|
import Dispatcher from './dispatcher'
|
|
3
18
|
import buildConnector from './connector'
|
|
19
|
+
import TClientStats from './client-stats'
|
|
4
20
|
|
|
5
21
|
type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>
|
|
6
22
|
|
|
@@ -15,6 +31,8 @@ export class Client extends Dispatcher {
|
|
|
15
31
|
closed: boolean
|
|
16
32
|
/** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
|
|
17
33
|
destroyed: boolean
|
|
34
|
+
/** Aggregate stats for a Client. */
|
|
35
|
+
readonly stats: TClientStats
|
|
18
36
|
|
|
19
37
|
// Override dispatcher APIs.
|
|
20
38
|
override connect (
|
|
@@ -68,8 +86,6 @@ export declare namespace Client {
|
|
|
68
86
|
/** TODO */
|
|
69
87
|
maxCachedSessions?: number;
|
|
70
88
|
/** TODO */
|
|
71
|
-
maxRedirections?: number;
|
|
72
|
-
/** TODO */
|
|
73
89
|
connect?: Partial<buildConnector.BuildOptions> | buildConnector.connector;
|
|
74
90
|
/** TODO */
|
|
75
91
|
maxRequestsPerClient?: number;
|
|
@@ -84,13 +100,13 @@ export declare namespace Client {
|
|
|
84
100
|
/**
|
|
85
101
|
* @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
|
|
86
102
|
* @default false
|
|
87
|
-
|
|
103
|
+
*/
|
|
88
104
|
allowH2?: boolean;
|
|
89
105
|
/**
|
|
90
106
|
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
|
|
91
107
|
* @default 100
|
|
92
|
-
|
|
93
|
-
maxConcurrentStreams?: number
|
|
108
|
+
*/
|
|
109
|
+
maxConcurrentStreams?: number;
|
|
94
110
|
}
|
|
95
111
|
export interface SocketInfo {
|
|
96
112
|
localAddress?: string
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import { TLSSocket, ConnectionOptions } from 'node:tls'
|
|
2
17
|
import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'node:net'
|
|
3
18
|
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
/// <reference types="node" />
|
|
2
17
|
|
|
3
18
|
interface MIMEType {
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
/// <reference types="node" />
|
|
2
17
|
|
|
3
18
|
import type { Headers } from './fetch'
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import { Socket } from 'node:net'
|
|
2
17
|
import { URL } from 'node:url'
|
|
3
18
|
import buildConnector from './connector'
|
|
@@ -16,7 +31,6 @@ declare namespace DiagnosticsChannel {
|
|
|
16
31
|
statusText: string;
|
|
17
32
|
headers: Array<Buffer>;
|
|
18
33
|
}
|
|
19
|
-
type Error = unknown
|
|
20
34
|
interface ConnectParams {
|
|
21
35
|
host: URL['host'];
|
|
22
36
|
hostname: URL['hostname'];
|
|
@@ -31,6 +45,15 @@ declare namespace DiagnosticsChannel {
|
|
|
31
45
|
export interface RequestBodySentMessage {
|
|
32
46
|
request: Request;
|
|
33
47
|
}
|
|
48
|
+
|
|
49
|
+
export interface RequestBodyChunkSentMessage {
|
|
50
|
+
request: Request;
|
|
51
|
+
chunk: Uint8Array | string;
|
|
52
|
+
}
|
|
53
|
+
export interface RequestBodyChunkReceivedMessage {
|
|
54
|
+
request: Request;
|
|
55
|
+
chunk: Buffer;
|
|
56
|
+
}
|
|
34
57
|
export interface RequestHeadersMessage {
|
|
35
58
|
request: Request;
|
|
36
59
|
response: Response;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import { URL } from 'node:url'
|
|
2
17
|
import { Duplex, Readable, Writable } from 'node:stream'
|
|
3
18
|
import { EventEmitter } from 'node:events'
|
|
@@ -97,7 +112,8 @@ declare class Dispatcher extends EventEmitter {
|
|
|
97
112
|
|
|
98
113
|
declare namespace Dispatcher {
|
|
99
114
|
export interface ComposedDispatcher extends Dispatcher {}
|
|
100
|
-
export type
|
|
115
|
+
export type Dispatch = Dispatcher['dispatch']
|
|
116
|
+
export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch
|
|
101
117
|
export interface DispatchOptions {
|
|
102
118
|
origin?: string | URL;
|
|
103
119
|
path: string;
|
|
@@ -134,8 +150,6 @@ declare namespace Dispatcher {
|
|
|
134
150
|
signal?: AbortSignal | EventEmitter | null;
|
|
135
151
|
/** This argument parameter is passed through to `ConnectData` */
|
|
136
152
|
opaque?: TOpaque;
|
|
137
|
-
/** Default: 0 */
|
|
138
|
-
maxRedirections?: number;
|
|
139
153
|
/** Default: false */
|
|
140
154
|
redirectionLimitReached?: boolean;
|
|
141
155
|
/** Default: `null` */
|
|
@@ -146,8 +160,6 @@ declare namespace Dispatcher {
|
|
|
146
160
|
opaque?: TOpaque;
|
|
147
161
|
/** Default: `null` */
|
|
148
162
|
signal?: AbortSignal | EventEmitter | null;
|
|
149
|
-
/** Default: 0 */
|
|
150
|
-
maxRedirections?: number;
|
|
151
163
|
/** Default: false */
|
|
152
164
|
redirectionLimitReached?: boolean;
|
|
153
165
|
/** Default: `null` */
|
|
@@ -171,8 +183,6 @@ declare namespace Dispatcher {
|
|
|
171
183
|
protocol?: string;
|
|
172
184
|
/** Default: `null` */
|
|
173
185
|
signal?: AbortSignal | EventEmitter | null;
|
|
174
|
-
/** Default: 0 */
|
|
175
|
-
maxRedirections?: number;
|
|
176
186
|
/** Default: false */
|
|
177
187
|
redirectionLimitReached?: boolean;
|
|
178
188
|
/** Default: `null` */
|
|
@@ -276,7 +286,7 @@ declare namespace Dispatcher {
|
|
|
276
286
|
}
|
|
277
287
|
|
|
278
288
|
export interface DispatchInterceptor {
|
|
279
|
-
(dispatch:
|
|
289
|
+
(dispatch: Dispatch): Dispatch
|
|
280
290
|
}
|
|
281
291
|
}
|
|
282
292
|
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import Agent from './agent'
|
|
17
|
+
import ProxyAgent from './proxy-agent'
|
|
2
18
|
import Dispatcher from './dispatcher'
|
|
3
19
|
|
|
4
20
|
export default EnvHttpProxyAgent
|
|
@@ -10,7 +26,7 @@ declare class EnvHttpProxyAgent extends Dispatcher {
|
|
|
10
26
|
}
|
|
11
27
|
|
|
12
28
|
declare namespace EnvHttpProxyAgent {
|
|
13
|
-
export interface Options extends
|
|
29
|
+
export interface Options extends Omit<ProxyAgent.Options, 'uri'> {
|
|
14
30
|
/** Overrides the value of the HTTP_PROXY environment variable */
|
|
15
31
|
httpProxy?: string;
|
|
16
32
|
/** Overrides the value of the HTTPS_PROXY environment variable */
|
package/undici-types/errors.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import { IncomingHttpHeaders } from './header'
|
|
2
17
|
import Client from './client'
|
|
3
18
|
|
|
@@ -49,21 +64,6 @@ declare namespace Errors {
|
|
|
49
64
|
headers: IncomingHttpHeaders | string[] | null
|
|
50
65
|
}
|
|
51
66
|
|
|
52
|
-
export class ResponseStatusCodeError extends UndiciError {
|
|
53
|
-
constructor (
|
|
54
|
-
message?: string,
|
|
55
|
-
statusCode?: number,
|
|
56
|
-
headers?: IncomingHttpHeaders | string[] | null,
|
|
57
|
-
body?: null | Record<string, any> | string
|
|
58
|
-
)
|
|
59
|
-
name: 'ResponseStatusCodeError'
|
|
60
|
-
code: 'UND_ERR_RESPONSE_STATUS_CODE'
|
|
61
|
-
body: null | Record<string, any> | string
|
|
62
|
-
status: number
|
|
63
|
-
statusCode: number
|
|
64
|
-
headers: IncomingHttpHeaders | string[] | null
|
|
65
|
-
}
|
|
66
|
-
|
|
67
67
|
/** Passed an invalid argument. */
|
|
68
68
|
export class InvalidArgumentError extends UndiciError {
|
|
69
69
|
name: 'InvalidArgumentError'
|
|
@@ -168,5 +168,10 @@ declare namespace Errors {
|
|
|
168
168
|
name: 'SecureProxyConnectionError'
|
|
169
169
|
code: 'UND_ERR_PRX_TLS'
|
|
170
170
|
}
|
|
171
|
+
|
|
172
|
+
class MaxOriginsReachedError extends UndiciError {
|
|
173
|
+
name: 'MaxOriginsReachedError'
|
|
174
|
+
code: 'UND_ERR_MAX_ORIGINS_REACHED'
|
|
175
|
+
}
|
|
171
176
|
}
|
|
172
177
|
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import { MessageEvent, ErrorEvent } from './websocket'
|
|
2
17
|
import Dispatcher from './dispatcher'
|
|
3
18
|
|
|
@@ -18,9 +33,9 @@ interface EventSource extends EventTarget {
|
|
|
18
33
|
readonly CLOSED: 2
|
|
19
34
|
readonly CONNECTING: 0
|
|
20
35
|
readonly OPEN: 1
|
|
21
|
-
onerror: (this: EventSource, ev: ErrorEvent) => any
|
|
22
|
-
onmessage: (this: EventSource, ev: MessageEvent) => any
|
|
23
|
-
onopen: (this: EventSource, ev: Event) => any
|
|
36
|
+
onerror: ((this: EventSource, ev: ErrorEvent) => any) | null
|
|
37
|
+
onmessage: ((this: EventSource, ev: MessageEvent) => any) | null
|
|
38
|
+
onopen: ((this: EventSource, ev: Event) => any) | null
|
|
24
39
|
readonly readyState: 0 | 1 | 2
|
|
25
40
|
readonly url: string
|
|
26
41
|
readonly withCredentials: boolean
|
|
@@ -56,7 +71,12 @@ export declare const EventSource: {
|
|
|
56
71
|
}
|
|
57
72
|
|
|
58
73
|
interface EventSourceInit {
|
|
59
|
-
withCredentials?: boolean
|
|
74
|
+
withCredentials?: boolean
|
|
75
|
+
// @deprecated use `node.dispatcher` instead
|
|
60
76
|
dispatcher?: Dispatcher
|
|
77
|
+
node?: {
|
|
78
|
+
dispatcher?: Dispatcher
|
|
79
|
+
reconnectionTime?: number
|
|
80
|
+
}
|
|
61
81
|
}
|
|
62
82
|
|
package/undici-types/fetch.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
// based on https://github.com/Ethan-Arrowood/undici-fetch/blob/249269714db874351589d2d364a0645d5160ae71/index.d.ts (MIT license)
|
|
2
17
|
// and https://github.com/node-fetch/node-fetch/blob/914ce6be5ec67a8bab63d68510aabf07cb818b6d/index.d.ts (MIT license)
|
|
3
18
|
/// <reference types="node" />
|
|
@@ -33,6 +48,7 @@ export class BodyMixin {
|
|
|
33
48
|
|
|
34
49
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
|
35
50
|
readonly blob: () => Promise<Blob>
|
|
51
|
+
readonly bytes: () => Promise<Uint8Array>
|
|
36
52
|
/**
|
|
37
53
|
* @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments.
|
|
38
54
|
* It is recommended to use a library such as [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) as follows:
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
// Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/FormData.ts (MIT)
|
|
2
17
|
/// <reference types="node" />
|
|
3
18
|
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import Dispatcher from './dispatcher'
|
|
2
17
|
|
|
3
18
|
declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher> (dispatcher: DispatcherImplementation): void
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
declare function setGlobalOrigin (origin: string | URL | undefined): void
|
|
2
17
|
declare function getGlobalOrigin (): URL | undefined
|
|
3
18
|
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import { URL } from 'node:url'
|
|
2
17
|
import Dispatcher from './dispatcher'
|
|
3
18
|
import buildConnector from './connector'
|
|
@@ -51,8 +66,6 @@ export declare namespace H2CClient {
|
|
|
51
66
|
/** TODO */
|
|
52
67
|
maxCachedSessions?: number;
|
|
53
68
|
/** TODO */
|
|
54
|
-
maxRedirections?: number;
|
|
55
|
-
/** TODO */
|
|
56
69
|
connect?: Omit<Partial<buildConnector.BuildOptions>, 'allowH2'> | buildConnector.connector;
|
|
57
70
|
/** TODO */
|
|
58
71
|
maxRequestsPerClient?: number;
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import Dispatcher from './dispatcher'
|
|
2
17
|
|
|
3
18
|
export declare class RedirectHandler implements Dispatcher.DispatchHandler {
|
|
4
19
|
constructor (
|
|
5
|
-
dispatch: Dispatcher,
|
|
20
|
+
dispatch: Dispatcher.Dispatch,
|
|
6
21
|
maxRedirections: number,
|
|
7
22
|
opts: Dispatcher.DispatchOptions,
|
|
8
23
|
handler: Dispatcher.DispatchHandler,
|
package/undici-types/header.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import { Autocomplete } from './utility'
|
|
2
17
|
|
|
3
18
|
/**
|
package/undici-types/index.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import Dispatcher from './dispatcher'
|
|
2
17
|
import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher'
|
|
3
18
|
import { setGlobalOrigin, getGlobalOrigin } from './global-origin'
|
|
@@ -13,6 +28,7 @@ import Agent from './agent'
|
|
|
13
28
|
import MockClient from './mock-client'
|
|
14
29
|
import MockPool from './mock-pool'
|
|
15
30
|
import MockAgent from './mock-agent'
|
|
31
|
+
import { SnapshotAgent } from './snapshot-agent'
|
|
16
32
|
import { MockCallHistory, MockCallHistoryLog } from './mock-call-history'
|
|
17
33
|
import mockErrors from './mock-errors'
|
|
18
34
|
import ProxyAgent from './proxy-agent'
|
|
@@ -33,7 +49,9 @@ export * from './content-type'
|
|
|
33
49
|
export * from './cache'
|
|
34
50
|
export { Interceptable } from './mock-interceptor'
|
|
35
51
|
|
|
36
|
-
|
|
52
|
+
declare function globalThisInstall (): void
|
|
53
|
+
|
|
54
|
+
export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install }
|
|
37
55
|
export default Undici
|
|
38
56
|
|
|
39
57
|
declare namespace Undici {
|
|
@@ -58,6 +76,7 @@ declare namespace Undici {
|
|
|
58
76
|
const MockClient: typeof import('./mock-client').default
|
|
59
77
|
const MockPool: typeof import('./mock-pool').default
|
|
60
78
|
const MockAgent: typeof import('./mock-agent').default
|
|
79
|
+
const SnapshotAgent: typeof import('./snapshot-agent').SnapshotAgent
|
|
61
80
|
const MockCallHistory: typeof import('./mock-call-history').MockCallHistory
|
|
62
81
|
const MockCallHistoryLog: typeof import('./mock-call-history').MockCallHistoryLog
|
|
63
82
|
const mockErrors: typeof import('./mock-errors').default
|
|
@@ -72,5 +91,6 @@ declare namespace Undici {
|
|
|
72
91
|
MemoryCacheStore: typeof import('./cache-interceptor').default.MemoryCacheStore,
|
|
73
92
|
SqliteCacheStore: typeof import('./cache-interceptor').default.SqliteCacheStore
|
|
74
93
|
}
|
|
94
|
+
const install: typeof globalThisInstall
|
|
75
95
|
}
|
|
76
96
|
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import CacheHandler from './cache-interceptor'
|
|
2
17
|
import Dispatcher from './dispatcher'
|
|
3
18
|
import RetryHandler from './retry-handler'
|
|
@@ -9,6 +24,10 @@ declare namespace Interceptors {
|
|
|
9
24
|
export type DumpInterceptorOpts = { maxSize?: number }
|
|
10
25
|
export type RetryInterceptorOpts = RetryHandler.RetryOptions
|
|
11
26
|
export type RedirectInterceptorOpts = { maxRedirections?: number }
|
|
27
|
+
export type DecompressInterceptorOpts = {
|
|
28
|
+
skipErrorResponses?: boolean
|
|
29
|
+
skipStatusCodes?: number[]
|
|
30
|
+
}
|
|
12
31
|
|
|
13
32
|
export type ResponseErrorInterceptorOpts = { throwOnError: boolean }
|
|
14
33
|
export type CacheInterceptorOpts = CacheHandler.CacheOptions
|
|
@@ -28,6 +47,7 @@ declare namespace Interceptors {
|
|
|
28
47
|
export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
29
48
|
export function retry (opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
30
49
|
export function redirect (opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
50
|
+
export function decompress (opts?: DecompressInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
31
51
|
export function responseError (opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
32
52
|
export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
33
53
|
export function cache (opts?: CacheInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import Agent from './agent'
|
|
2
17
|
import Dispatcher from './dispatcher'
|
|
3
18
|
import { Interceptable, MockInterceptor } from './mock-interceptor'
|
|
@@ -59,6 +74,9 @@ declare namespace MockAgent {
|
|
|
59
74
|
/** Ignore trailing slashes in the path */
|
|
60
75
|
ignoreTrailingSlash?: boolean;
|
|
61
76
|
|
|
77
|
+
/** Accept URLs with search parameters using non standard syntaxes. default false */
|
|
78
|
+
acceptNonStandardSearchParameters?: boolean;
|
|
79
|
+
|
|
62
80
|
/** Enable call history. you can either call MockAgent.enableCallHistory(). default false */
|
|
63
81
|
enableCallHistory?: boolean
|
|
64
82
|
}
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
import Dispatcher from './dispatcher'
|
|
2
17
|
|
|
3
18
|
declare namespace MockCallHistoryLog {
|