@vixt/core 0.13.4 → 0.13.5
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/dist/client/index.d.ts +2356 -14
- package/dist/client/index.js +264 -72
- package/dist/node/index.d.mts +40 -41
- package/dist/node/index.mjs +10 -39
- package/package.json +7 -7
package/dist/client/index.d.ts
CHANGED
|
@@ -1,25 +1,37 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { URL as URL$1, URLSearchParams as URLSearchParams$1, UrlObject } from "node:url";
|
|
3
|
+
import { Duplex, Readable, Writable } from "node:stream";
|
|
4
|
+
import { EventEmitter } from "node:events";
|
|
5
|
+
import { Blob as Blob$1, File } from "node:buffer";
|
|
6
|
+
import { ReadableStream as ReadableStream$1, WritableStream } from "node:stream/web";
|
|
7
|
+
import { SessionOptions } from "node:http2";
|
|
8
|
+
import { ConnectionOptions, TLSSocket } from "node:tls";
|
|
9
|
+
import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from "node:net";
|
|
10
|
+
import { LookupOptions } from "node:dns";
|
|
11
|
+
import { MessagePort } from "node:worker_threads";
|
|
12
|
+
//#endregion
|
|
1
13
|
//#region src/client/types/app.d.ts
|
|
2
|
-
interface VixtApp {
|
|
14
|
+
export interface VixtApp {
|
|
3
15
|
app: any;
|
|
4
16
|
appConfig: VixtAppConfig;
|
|
5
17
|
[key: string]: unknown;
|
|
6
18
|
}
|
|
7
|
-
interface CreateOptions {
|
|
19
|
+
export interface CreateOptions {
|
|
8
20
|
app: any;
|
|
9
21
|
appConfig: VixtAppConfig;
|
|
10
22
|
}
|
|
11
|
-
interface VixtAppConfig {
|
|
23
|
+
export interface VixtAppConfig {
|
|
12
24
|
readonly baseURL?: string;
|
|
13
25
|
readonly rootId?: string;
|
|
14
26
|
[key: string]: any;
|
|
15
27
|
}
|
|
16
28
|
//#endregion
|
|
17
29
|
//#region src/client/types/plugin.d.ts
|
|
18
|
-
interface PluginDefinition {
|
|
30
|
+
export interface PluginDefinition {
|
|
19
31
|
name?: string;
|
|
20
32
|
setup?: (this: void, vixt: VixtApp) => any;
|
|
21
33
|
}
|
|
22
|
-
interface VixtPlugin {
|
|
34
|
+
export interface VixtPlugin {
|
|
23
35
|
(this: void, vixt: VixtApp): any;
|
|
24
36
|
/** @internal */
|
|
25
37
|
_name?: string;
|
|
@@ -37,16 +49,2346 @@ interface VixtPlugin {
|
|
|
37
49
|
* })
|
|
38
50
|
* ```
|
|
39
51
|
*/
|
|
40
|
-
declare function defineAppConfig(config: VixtAppConfig): VixtAppConfig;
|
|
52
|
+
export declare function defineAppConfig(config: VixtAppConfig): VixtAppConfig;
|
|
41
53
|
/** Access the app config defined in the project. */
|
|
42
|
-
declare function useAppConfig(): VixtAppConfig;
|
|
54
|
+
export declare function useAppConfig(): VixtAppConfig;
|
|
43
55
|
/** Create a Vixt App instance. */
|
|
44
|
-
declare function createVixtApp(options: CreateOptions): VixtApp;
|
|
56
|
+
export declare function createVixtApp(options: CreateOptions): VixtApp;
|
|
45
57
|
/** Access the shared runtime context of the Vixt Application. */
|
|
46
|
-
declare function useVixtApp(): VixtApp;
|
|
58
|
+
export declare function useVixtApp(): VixtApp;
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/utility.d.ts
|
|
61
|
+
type AutocompletePrimitiveBaseType<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : never;
|
|
62
|
+
type Autocomplete<T> = T | (AutocompletePrimitiveBaseType<T> & Record<never, never>);
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/header.d.ts
|
|
65
|
+
/**
|
|
66
|
+
* The header type declaration of `undici`.
|
|
67
|
+
*/
|
|
68
|
+
type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
|
|
69
|
+
/**
|
|
70
|
+
* The header type declaration of `undici` for outgoing requests.
|
|
71
|
+
*/
|
|
72
|
+
type OutgoingHttpHeaders = Record<string, number | string | string[] | undefined>;
|
|
73
|
+
type HeaderNames = Autocomplete<'Accept' | 'Accept-CH' | 'Accept-Charset' | 'Accept-Encoding' | 'Accept-Language' | 'Accept-Patch' | 'Accept-Post' | 'Accept-Ranges' | 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Access-Control-Request-Headers' | 'Access-Control-Request-Method' | 'Age' | 'Allow' | 'Alt-Svc' | 'Alt-Used' | 'Authorization' | 'Cache-Control' | 'Clear-Site-Data' | 'Connection' | 'Content-Disposition' | 'Content-Encoding' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-Range' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Type' | 'Cookie' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Resource-Policy' | 'Date' | 'Device-Memory' | 'ETag' | 'Expect' | 'Expect-CT' | 'Expires' | 'Forwarded' | 'From' | 'Host' | 'If-Match' | 'If-Modified-Since' | 'If-None-Match' | 'If-Range' | 'If-Unmodified-Since' | 'Keep-Alive' | 'Last-Modified' | 'Link' | 'Location' | 'Max-Forwards' | 'Origin' | 'Permissions-Policy' | 'Priority' | 'Proxy-Authenticate' | 'Proxy-Authorization' | 'Range' | 'Referer' | 'Referrer-Policy' | 'Retry-After' | 'Sec-Fetch-Dest' | 'Sec-Fetch-Mode' | 'Sec-Fetch-Site' | 'Sec-Fetch-User' | 'Sec-Purpose' | 'Sec-WebSocket-Accept' | 'Server' | 'Server-Timing' | 'Service-Worker-Navigation-Preload' | 'Set-Cookie' | 'SourceMap' | 'Strict-Transport-Security' | 'TE' | 'Timing-Allow-Origin' | 'Trailer' | 'Transfer-Encoding' | 'Upgrade' | 'Upgrade-Insecure-Requests' | 'User-Agent' | 'Vary' | 'Via' | 'WWW-Authenticate' | 'X-Content-Type-Options' | 'X-Frame-Options'>;
|
|
74
|
+
type IANARegisteredMimeType = Autocomplete<'audio/aac' | 'video/x-msvideo' | 'image/avif' | 'video/av1' | 'application/octet-stream' | 'image/bmp' | 'text/css' | 'text/csv' | 'application/vnd.ms-fontobject' | 'application/epub+zip' | 'image/gif' | 'application/gzip' | 'text/html' | 'image/x-icon' | 'text/calendar' | 'image/jpeg' | 'text/javascript' | 'application/json' | 'application/ld+json' | 'audio/x-midi' | 'audio/mpeg' | 'video/mp4' | 'video/mpeg' | 'audio/ogg' | 'video/ogg' | 'application/ogg' | 'audio/opus' | 'font/otf' | 'application/pdf' | 'image/png' | 'application/rtf' | 'image/svg+xml' | 'image/tiff' | 'video/mp2t' | 'font/ttf' | 'text/plain' | 'application/wasm' | 'video/webm' | 'audio/webm' | 'image/webp' | 'font/woff' | 'font/woff2' | 'application/xhtml+xml' | 'application/xml' | 'application/zip' | 'video/3gpp' | 'video/3gpp2' | 'model/gltf+json' | 'model/gltf-binary'>;
|
|
75
|
+
type KnownHeaderValues = {
|
|
76
|
+
'content-type': IANARegisteredMimeType;
|
|
77
|
+
};
|
|
78
|
+
type HeaderRecord = { [K in HeaderNames | Lowercase<HeaderNames>]?: Lowercase<K> extends keyof KnownHeaderValues ? KnownHeaderValues[Lowercase<K>] : string; };
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/readable.d.ts
|
|
81
|
+
declare class BodyReadable extends Readable {
|
|
82
|
+
constructor(opts: {
|
|
83
|
+
resume: (this: Readable, size: number) => void | null;
|
|
84
|
+
abort: () => void | null;
|
|
85
|
+
contentType?: string;
|
|
86
|
+
contentLength?: number;
|
|
87
|
+
highWaterMark?: number;
|
|
88
|
+
});
|
|
89
|
+
/** Consumes and returns the body as a string
|
|
90
|
+
* https://fetch.spec.whatwg.org/#dom-body-text
|
|
91
|
+
*/
|
|
92
|
+
text(): Promise<string>;
|
|
93
|
+
/** Consumes and returns the body as a JavaScript Object
|
|
94
|
+
* https://fetch.spec.whatwg.org/#dom-body-json
|
|
95
|
+
*/
|
|
96
|
+
json(): Promise<unknown>;
|
|
97
|
+
/** Consumes and returns the body as a Blob
|
|
98
|
+
* https://fetch.spec.whatwg.org/#dom-body-blob
|
|
99
|
+
*/
|
|
100
|
+
blob(): Promise<Blob$1>;
|
|
101
|
+
/** Consumes and returns the body as an Uint8Array
|
|
102
|
+
* https://fetch.spec.whatwg.org/#dom-body-bytes
|
|
103
|
+
*/
|
|
104
|
+
bytes(): Promise<Uint8Array>;
|
|
105
|
+
/** Consumes and returns the body as an ArrayBuffer
|
|
106
|
+
* https://fetch.spec.whatwg.org/#dom-body-arraybuffer
|
|
107
|
+
*/
|
|
108
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
109
|
+
/** Not implemented
|
|
110
|
+
*
|
|
111
|
+
* https://fetch.spec.whatwg.org/#dom-body-formdata
|
|
112
|
+
*/
|
|
113
|
+
formData(): Promise<never>;
|
|
114
|
+
/** Returns true if the body is not null and the body has been consumed
|
|
115
|
+
*
|
|
116
|
+
* Otherwise, returns false
|
|
117
|
+
*
|
|
118
|
+
* https://fetch.spec.whatwg.org/#dom-body-bodyused
|
|
119
|
+
*/
|
|
120
|
+
readonly bodyUsed: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* If body is null, it should return null as the body
|
|
123
|
+
*
|
|
124
|
+
* If body is not null, should return the body as a ReadableStream
|
|
125
|
+
*
|
|
126
|
+
* https://fetch.spec.whatwg.org/#dom-body-body
|
|
127
|
+
*/
|
|
128
|
+
readonly body: never | undefined;
|
|
129
|
+
/** Dumps the response body by reading `limit` number of bytes.
|
|
130
|
+
* @param opts.limit Number of bytes to read (optional) - Default: 131072
|
|
131
|
+
* @param opts.signal AbortSignal to cancel the operation (optional)
|
|
132
|
+
*/
|
|
133
|
+
dump(opts?: {
|
|
134
|
+
limit: number;
|
|
135
|
+
signal?: AbortSignal;
|
|
136
|
+
}): Promise<void>;
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/fetch.d.ts
|
|
140
|
+
type RequestInfo$1 = string | URL$1 | Request$1;
|
|
141
|
+
declare function fetch(input: RequestInfo$1, init?: RequestInit$1): Promise<Response$1>;
|
|
142
|
+
type BodyInit = ArrayBuffer | AsyncIterable<Uint8Array> | Blob$1 | FormData | Iterable<Uint8Array> | NodeJS.ArrayBufferView | URLSearchParams$1 | null | string;
|
|
143
|
+
declare class BodyMixin$1 {
|
|
144
|
+
readonly body: ReadableStream$1 | null;
|
|
145
|
+
readonly bodyUsed: boolean;
|
|
146
|
+
readonly arrayBuffer: () => Promise<ArrayBuffer>;
|
|
147
|
+
readonly blob: () => Promise<Blob$1>;
|
|
148
|
+
readonly bytes: () => Promise<Uint8Array>;
|
|
149
|
+
/**
|
|
150
|
+
* @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments.
|
|
151
|
+
* Calling body.formData() buffers and parses the entire body. Since this is dictated by the spec,
|
|
152
|
+
* this method must only be called on responses from trusted servers.
|
|
153
|
+
* For responses from untrusted or user-controlled servers, use a dedicated streaming parser such as
|
|
154
|
+
* [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) and apply application-specific limits as follows:
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```js
|
|
158
|
+
* import { Busboy } from '@fastify/busboy'
|
|
159
|
+
* import { Readable } from 'node:stream'
|
|
160
|
+
*
|
|
161
|
+
* const response = await fetch('...')
|
|
162
|
+
* const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } })
|
|
163
|
+
*
|
|
164
|
+
* // handle events emitted from `busboy`
|
|
165
|
+
*
|
|
166
|
+
* Readable.fromWeb(response.body).pipe(busboy)
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
readonly formData: () => Promise<FormData>;
|
|
170
|
+
readonly json: () => Promise<unknown>;
|
|
171
|
+
readonly text: () => Promise<string>;
|
|
172
|
+
readonly textStream: () => ReadableStream$1<string>;
|
|
173
|
+
}
|
|
174
|
+
interface SpecIterator<T, TReturn = any, TNext = undefined> {
|
|
175
|
+
next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
|
|
176
|
+
}
|
|
177
|
+
interface SpecIteratorObject<T, TReturn = undefined, TNext = unknown> extends SpecIterator<T, TReturn, TNext> {
|
|
178
|
+
[Symbol.iterator](): SpecIteratorObject<T, TReturn, TNext>;
|
|
179
|
+
map<U>(callbackfn: (value: T, index: number) => U): SpecIteratorObject<U>;
|
|
180
|
+
filter<S extends T>(predicate: (value: T, index: number) => value is S): SpecIteratorObject<S>;
|
|
181
|
+
filter(predicate: (value: T, index: number) => unknown): SpecIteratorObject<T>;
|
|
182
|
+
take(limit: number): SpecIteratorObject<T>;
|
|
183
|
+
drop(count: number): SpecIteratorObject<T>;
|
|
184
|
+
flatMap<U>(callbackfn: (value: T, index: number) => Iterator<U> | Iterable<U>): SpecIteratorObject<U>;
|
|
185
|
+
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T): T;
|
|
186
|
+
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T, initialValue: T): T;
|
|
187
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U, initialValue: U): U;
|
|
188
|
+
toArray(): T[];
|
|
189
|
+
forEach(callbackfn: (value: T, index: number) => void): void;
|
|
190
|
+
some(predicate: (value: T, index: number) => unknown): boolean;
|
|
191
|
+
every(predicate: (value: T, index: number) => unknown): boolean;
|
|
192
|
+
find<S extends T>(predicate: (value: T, index: number) => value is S): S | undefined;
|
|
193
|
+
find(predicate: (value: T, index: number) => unknown): T | undefined;
|
|
194
|
+
readonly [Symbol.toStringTag]: string;
|
|
195
|
+
}
|
|
196
|
+
interface SpecIterableIterator<T> extends SpecIteratorObject<T> {
|
|
197
|
+
[Symbol.iterator](): SpecIterableIterator<T>;
|
|
198
|
+
}
|
|
199
|
+
interface SpecIterable<T> {
|
|
200
|
+
[Symbol.iterator](): SpecIterableIterator<T>;
|
|
201
|
+
}
|
|
202
|
+
type HeadersInit$1 = [string, string][] | HeaderRecord | Headers$1;
|
|
203
|
+
declare class Headers$1 implements SpecIterable<[string, string]> {
|
|
204
|
+
constructor(init?: HeadersInit$1);
|
|
205
|
+
readonly append: (name: string, value: string) => void;
|
|
206
|
+
readonly delete: (name: string) => void;
|
|
207
|
+
readonly get: (name: string) => string | null;
|
|
208
|
+
readonly has: (name: string) => boolean;
|
|
209
|
+
readonly set: (name: string, value: string) => void;
|
|
210
|
+
readonly getSetCookie: () => string[];
|
|
211
|
+
readonly forEach: (callbackfn: (value: string, key: string, iterable: Headers$1) => void, thisArg?: unknown) => void;
|
|
212
|
+
readonly keys: () => SpecIterableIterator<string>;
|
|
213
|
+
readonly values: () => SpecIterableIterator<string>;
|
|
214
|
+
readonly entries: () => SpecIterableIterator<[string, string]>;
|
|
215
|
+
readonly [Symbol.iterator]: () => SpecIterableIterator<[string, string]>;
|
|
216
|
+
}
|
|
217
|
+
type RequestCache = 'default' | 'force-cache' | 'no-cache' | 'no-store' | 'only-if-cached' | 'reload';
|
|
218
|
+
type RequestCredentials = 'omit' | 'include' | 'same-origin';
|
|
219
|
+
type RequestDestination = '' | 'audio' | 'audioworklet' | 'document' | 'embed' | 'font' | 'image' | 'manifest' | 'object' | 'paintworklet' | 'report' | 'script' | 'sharedworker' | 'style' | 'track' | 'video' | 'worker' | 'xslt';
|
|
220
|
+
interface RequestInit$1 {
|
|
221
|
+
body?: BodyInit | null;
|
|
222
|
+
cache?: RequestCache;
|
|
223
|
+
credentials?: RequestCredentials;
|
|
224
|
+
dispatcher?: Dispatcher;
|
|
225
|
+
duplex?: RequestDuplex;
|
|
226
|
+
headers?: HeadersInit$1;
|
|
227
|
+
integrity?: string;
|
|
228
|
+
keepalive?: boolean;
|
|
229
|
+
method?: string;
|
|
230
|
+
mode?: RequestMode;
|
|
231
|
+
redirect?: RequestRedirect;
|
|
232
|
+
referrer?: string;
|
|
233
|
+
referrerPolicy?: ReferrerPolicy;
|
|
234
|
+
signal?: AbortSignal | null;
|
|
235
|
+
window?: null;
|
|
236
|
+
}
|
|
237
|
+
type ReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
238
|
+
type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin';
|
|
239
|
+
type RequestRedirect = 'error' | 'follow' | 'manual';
|
|
240
|
+
type RequestDuplex = 'half';
|
|
241
|
+
declare class Request$1 extends BodyMixin$1 {
|
|
242
|
+
constructor(input: RequestInfo$1, init?: RequestInit$1);
|
|
243
|
+
readonly cache: RequestCache;
|
|
244
|
+
readonly credentials: RequestCredentials;
|
|
245
|
+
readonly destination: RequestDestination;
|
|
246
|
+
readonly headers: Headers$1;
|
|
247
|
+
readonly integrity: string;
|
|
248
|
+
readonly method: string;
|
|
249
|
+
readonly mode: RequestMode;
|
|
250
|
+
readonly redirect: RequestRedirect;
|
|
251
|
+
readonly referrer: string;
|
|
252
|
+
readonly referrerPolicy: ReferrerPolicy;
|
|
253
|
+
readonly url: string;
|
|
254
|
+
readonly keepalive: boolean;
|
|
255
|
+
readonly signal: AbortSignal;
|
|
256
|
+
readonly duplex: RequestDuplex;
|
|
257
|
+
public clone(): Request$1;
|
|
258
|
+
}
|
|
259
|
+
interface ResponseInit {
|
|
260
|
+
readonly status?: number;
|
|
261
|
+
readonly statusText?: string;
|
|
262
|
+
readonly headers?: HeadersInit$1;
|
|
263
|
+
}
|
|
264
|
+
type ResponseType$1 = 'basic' | 'cors' | 'default' | 'error' | 'opaque' | 'opaqueredirect';
|
|
265
|
+
type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308;
|
|
266
|
+
declare class Response$1 extends BodyMixin$1 {
|
|
267
|
+
constructor(body?: BodyInit, init?: ResponseInit);
|
|
268
|
+
readonly headers: Headers$1;
|
|
269
|
+
readonly ok: boolean;
|
|
270
|
+
readonly status: number;
|
|
271
|
+
readonly statusText: string;
|
|
272
|
+
readonly type: ResponseType$1;
|
|
273
|
+
readonly url: string;
|
|
274
|
+
readonly redirected: boolean;
|
|
275
|
+
public clone(): Response$1;
|
|
276
|
+
static error(): Response$1;
|
|
277
|
+
static json(data: any, init?: ResponseInit): Response$1;
|
|
278
|
+
static redirect(url: string | URL$1, status?: ResponseRedirectStatus): Response$1;
|
|
279
|
+
}
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/formdata.d.ts
|
|
282
|
+
/**
|
|
283
|
+
* A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
|
|
284
|
+
*/
|
|
285
|
+
declare type FormDataEntryValue = string | File;
|
|
286
|
+
/**
|
|
287
|
+
* Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch().
|
|
288
|
+
*/
|
|
289
|
+
declare class FormData {
|
|
290
|
+
/**
|
|
291
|
+
* Appends a new value onto an existing key inside a FormData object,
|
|
292
|
+
* or adds the key if it does not already exist.
|
|
293
|
+
*
|
|
294
|
+
* The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values.
|
|
295
|
+
*
|
|
296
|
+
* @param name The name of the field whose data is contained in `value`.
|
|
297
|
+
* @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
|
|
298
|
+
or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
|
|
299
|
+
* @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
|
|
300
|
+
*/
|
|
301
|
+
append(name: string, value: unknown, fileName?: string): void;
|
|
302
|
+
/**
|
|
303
|
+
* Set a new value for an existing key inside FormData,
|
|
304
|
+
* or add the new field if it does not already exist.
|
|
305
|
+
*
|
|
306
|
+
* @param name The name of the field whose data is contained in `value`.
|
|
307
|
+
* @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
|
|
308
|
+
or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
|
|
309
|
+
* @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
|
|
310
|
+
*
|
|
311
|
+
*/
|
|
312
|
+
set(name: string, value: unknown, fileName?: string): void;
|
|
313
|
+
/**
|
|
314
|
+
* Returns the first value associated with a given key from within a `FormData` object.
|
|
315
|
+
* If you expect multiple values and want all of them, use the `getAll()` method instead.
|
|
316
|
+
*
|
|
317
|
+
* @param {string} name A name of the value you want to retrieve.
|
|
318
|
+
*
|
|
319
|
+
* @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null.
|
|
320
|
+
*/
|
|
321
|
+
get(name: string): FormDataEntryValue | null;
|
|
322
|
+
/**
|
|
323
|
+
* Returns all the values associated with a given key from within a `FormData` object.
|
|
324
|
+
*
|
|
325
|
+
* @param {string} name A name of the value you want to retrieve.
|
|
326
|
+
*
|
|
327
|
+
* @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list.
|
|
328
|
+
*/
|
|
329
|
+
getAll(name: string): FormDataEntryValue[];
|
|
330
|
+
/**
|
|
331
|
+
* Returns a boolean stating whether a `FormData` object contains a certain key.
|
|
332
|
+
*
|
|
333
|
+
* @param name A string representing the name of the key you want to test for.
|
|
334
|
+
*
|
|
335
|
+
* @return A boolean value.
|
|
336
|
+
*/
|
|
337
|
+
has(name: string): boolean;
|
|
338
|
+
/**
|
|
339
|
+
* Deletes a key and its value(s) from a `FormData` object.
|
|
340
|
+
*
|
|
341
|
+
* @param name The name of the key you want to delete.
|
|
342
|
+
*/
|
|
343
|
+
delete(name: string): void;
|
|
344
|
+
/**
|
|
345
|
+
* Executes given callback function for each field of the FormData instance
|
|
346
|
+
*/
|
|
347
|
+
forEach: (callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void, thisArg?: unknown) => void;
|
|
348
|
+
/**
|
|
349
|
+
* Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all keys contained in this `FormData` object.
|
|
350
|
+
* Each key is a `string`.
|
|
351
|
+
*/
|
|
352
|
+
keys: () => SpecIterableIterator<string>;
|
|
353
|
+
/**
|
|
354
|
+
* Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all values contained in this object `FormData` object.
|
|
355
|
+
* Each value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
|
|
356
|
+
*/
|
|
357
|
+
values: () => SpecIterableIterator<FormDataEntryValue>;
|
|
358
|
+
/**
|
|
359
|
+
* Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs.
|
|
360
|
+
* The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
|
|
361
|
+
*/
|
|
362
|
+
entries: () => SpecIterableIterator<[string, FormDataEntryValue]>;
|
|
363
|
+
/**
|
|
364
|
+
* An alias for FormData#entries()
|
|
365
|
+
*/
|
|
366
|
+
[Symbol.iterator]: () => SpecIterableIterator<[string, FormDataEntryValue]>;
|
|
367
|
+
readonly [Symbol.toStringTag]: string;
|
|
368
|
+
}
|
|
369
|
+
//#endregion
|
|
370
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/connector.d.ts
|
|
371
|
+
declare function buildConnector(options?: buildConnector.BuildOptions): buildConnector.connector;
|
|
372
|
+
declare namespace buildConnector {
|
|
373
|
+
export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & {
|
|
374
|
+
allowH2?: boolean;
|
|
375
|
+
preferH2?: boolean;
|
|
376
|
+
maxCachedSessions?: number | null;
|
|
377
|
+
socketPath?: string | null;
|
|
378
|
+
timeout?: number | null;
|
|
379
|
+
port?: number;
|
|
380
|
+
keepAlive?: boolean | null;
|
|
381
|
+
keepAliveInitialDelay?: number | null;
|
|
382
|
+
typeOfService?: number | null;
|
|
383
|
+
};
|
|
384
|
+
export interface Options {
|
|
385
|
+
hostname: string;
|
|
386
|
+
host?: string;
|
|
387
|
+
protocol: string;
|
|
388
|
+
port: string;
|
|
389
|
+
servername?: string;
|
|
390
|
+
localAddress?: string | null;
|
|
391
|
+
socketPath?: string | null;
|
|
392
|
+
httpSocket?: Socket;
|
|
393
|
+
}
|
|
394
|
+
export type Callback = (...args: CallbackArgs) => void;
|
|
395
|
+
type CallbackArgs = [null, Socket | TLSSocket] | [Error, null];
|
|
396
|
+
export interface connector {
|
|
397
|
+
(options: buildConnector.Options, callback: buildConnector.Callback): void;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
//#endregion
|
|
401
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/client-stats.d.ts
|
|
402
|
+
declare class ClientStats {
|
|
403
|
+
constructor(pool: Client);
|
|
404
|
+
/** If socket has open connection. */
|
|
405
|
+
connected: boolean;
|
|
406
|
+
/** Number of open socket connections in this client that do not have an active request. */
|
|
407
|
+
pending: number;
|
|
408
|
+
/** Number of currently active requests of this client. */
|
|
409
|
+
running: number;
|
|
410
|
+
/** Number of active, pending, or queued requests of this client. */
|
|
411
|
+
size: number;
|
|
412
|
+
}
|
|
413
|
+
//#endregion
|
|
414
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/client.d.ts
|
|
415
|
+
type ClientConnectOptions<TOpaque = null> = Omit<Dispatcher.ConnectOptions<TOpaque>, 'origin'>;
|
|
416
|
+
// TODO: Pendings
|
|
417
|
+
// 1. Reflect this on Client instantiation
|
|
418
|
+
// 2. Client H2 should use this namespaced options instead.
|
|
419
|
+
/**
|
|
420
|
+
* A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
|
|
421
|
+
*/
|
|
422
|
+
declare class Client extends Dispatcher {
|
|
423
|
+
constructor(url: string | URL$1, options?: Client.Options);
|
|
424
|
+
/** Property to get and set the pipelining factor. */
|
|
425
|
+
pipelining: number;
|
|
426
|
+
/** `true` after `client.close()` has been called. */
|
|
427
|
+
closed: boolean;
|
|
428
|
+
/** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
|
|
429
|
+
destroyed: boolean;
|
|
430
|
+
/** Aggregate stats for a Client. */
|
|
431
|
+
readonly stats: ClientStats;
|
|
432
|
+
// Override dispatcher APIs.
|
|
433
|
+
override connect<TOpaque = null>(options: ClientConnectOptions<TOpaque>): Promise<Dispatcher.ConnectData<TOpaque>>;
|
|
434
|
+
override connect<TOpaque = null>(options: ClientConnectOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ConnectData<TOpaque>) => void): void;
|
|
435
|
+
}
|
|
436
|
+
declare namespace Client {
|
|
437
|
+
export interface Options {
|
|
438
|
+
/** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
|
|
439
|
+
maxHeaderSize?: number;
|
|
440
|
+
/** 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). HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */
|
|
441
|
+
headersTimeout?: number;
|
|
442
|
+
/** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
|
|
443
|
+
socketTimeout?: never;
|
|
444
|
+
/** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
|
|
445
|
+
requestTimeout?: never;
|
|
446
|
+
/** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */
|
|
447
|
+
connectTimeout?: number;
|
|
448
|
+
/** 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). HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */
|
|
449
|
+
bodyTimeout?: number;
|
|
450
|
+
/** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
|
|
451
|
+
idleTimeout?: never;
|
|
452
|
+
/** @deprecated unsupported keepAlive, use pipelining=0 instead */
|
|
453
|
+
keepAlive?: never;
|
|
454
|
+
/** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
|
|
455
|
+
keepAliveTimeout?: number;
|
|
456
|
+
/** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */
|
|
457
|
+
maxKeepAliveTimeout?: never;
|
|
458
|
+
/** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
|
|
459
|
+
keepAliveMaxTimeout?: number;
|
|
460
|
+
/** 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). */
|
|
461
|
+
keepAliveTimeoutThreshold?: number;
|
|
462
|
+
/** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */
|
|
463
|
+
socketPath?: string;
|
|
464
|
+
/** 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`. */
|
|
465
|
+
pipelining?: number;
|
|
466
|
+
/** @deprecated use the connect option instead */
|
|
467
|
+
tls?: never;
|
|
468
|
+
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
|
|
469
|
+
strictContentLength?: boolean;
|
|
470
|
+
/** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */
|
|
471
|
+
maxCachedSessions?: number;
|
|
472
|
+
/** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */
|
|
473
|
+
connect?: Partial<buildConnector.BuildOptions> | buildConnector.connector;
|
|
474
|
+
/** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */
|
|
475
|
+
maxRequestsPerClient?: number;
|
|
476
|
+
/** Local IP address the socket should connect from. */
|
|
477
|
+
localAddress?: string;
|
|
478
|
+
/** Max response body size in bytes, -1 is disabled */
|
|
479
|
+
maxResponseSize?: number;
|
|
480
|
+
/** WebSocket-specific options */
|
|
481
|
+
webSocket?: Client.WebSocketOptions;
|
|
482
|
+
/** EventSource-specific options */
|
|
483
|
+
eventSource?: Client.EventSourceOptions;
|
|
484
|
+
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
|
|
485
|
+
autoSelectFamily?: boolean;
|
|
486
|
+
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
|
|
487
|
+
autoSelectFamilyAttemptTimeout?: number;
|
|
488
|
+
/**
|
|
489
|
+
* @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
|
|
490
|
+
* @default true
|
|
491
|
+
*/
|
|
492
|
+
allowH2?: boolean;
|
|
493
|
+
/**
|
|
494
|
+
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
|
|
495
|
+
* @default 100
|
|
496
|
+
* @deprecated Use h2Options.maxConcurrentStreams instead
|
|
497
|
+
*/
|
|
498
|
+
maxConcurrentStreams?: number;
|
|
499
|
+
/**
|
|
500
|
+
* @description Sets the HTTP/2 stream-level flow-control window size (SETTINGS_INITIAL_WINDOW_SIZE).
|
|
501
|
+
* @default 262144
|
|
502
|
+
* @deprecated Use h2Options.settings.initialWindowSize instead
|
|
503
|
+
*/
|
|
504
|
+
initialWindowSize?: number;
|
|
505
|
+
/**
|
|
506
|
+
* @description Sets the HTTP/2 connection-level flow-control window size (ClientHttp2Session.setLocalWindowSize).
|
|
507
|
+
* @default 524288
|
|
508
|
+
* @deprecated Use h2Options.connectionWindowSize instead
|
|
509
|
+
*/
|
|
510
|
+
connectionWindowSize?: number;
|
|
511
|
+
/**
|
|
512
|
+
* @description Time interval between PING frames dispatch
|
|
513
|
+
* @default 60000
|
|
514
|
+
* @deprecated Use h2Options.connectionWindowSize instead
|
|
515
|
+
*/
|
|
516
|
+
pingInterval?: number;
|
|
517
|
+
/**
|
|
518
|
+
* @description HTTP/2 configuration options
|
|
519
|
+
*/
|
|
520
|
+
h2Options?: Client.H2Options;
|
|
521
|
+
}
|
|
522
|
+
export interface SocketInfo {
|
|
523
|
+
localAddress?: string;
|
|
524
|
+
localPort?: number;
|
|
525
|
+
remoteAddress?: string;
|
|
526
|
+
remotePort?: number;
|
|
527
|
+
remoteFamily?: string;
|
|
528
|
+
timeout?: number;
|
|
529
|
+
bytesWritten?: number;
|
|
530
|
+
bytesRead?: number;
|
|
531
|
+
}
|
|
532
|
+
export interface WebSocketOptions {
|
|
533
|
+
/**
|
|
534
|
+
* Maximum number of fragments in a message. Set to 0 to disable the limit.
|
|
535
|
+
* @default 131072
|
|
536
|
+
*/
|
|
537
|
+
maxFragments?: number;
|
|
538
|
+
/**
|
|
539
|
+
* Maximum allowed payload size in bytes for WebSocket messages.
|
|
540
|
+
* Applied to uncompressed messages, compressed frame payloads, and decompressed (permessage-deflate) messages.
|
|
541
|
+
* Set to 0 to disable the limit.
|
|
542
|
+
* @default 134217728 (128 MB)
|
|
543
|
+
*/
|
|
544
|
+
maxPayloadSize?: number;
|
|
545
|
+
}
|
|
546
|
+
export interface H2Options extends Omit<SessionOptions, keyof buildConnector.BuildOptions> {
|
|
547
|
+
/**
|
|
548
|
+
* @description Sets the HTTP/2 connection-level flow-control window size (ClientHttp2Session.setLocalWindowSize).
|
|
549
|
+
* @default 524288
|
|
550
|
+
*/
|
|
551
|
+
connectionWindowSize?: number;
|
|
552
|
+
/**
|
|
553
|
+
* @description Time interval between PING frames dispatch
|
|
554
|
+
* @default 60000
|
|
555
|
+
*/
|
|
556
|
+
pingInterval?: number;
|
|
557
|
+
/**
|
|
558
|
+
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
|
|
559
|
+
* @default 100
|
|
560
|
+
*/
|
|
561
|
+
maxConcurrentStreams?: number;
|
|
562
|
+
/**
|
|
563
|
+
* @description Enable support for H2C (plain text)
|
|
564
|
+
* @default false
|
|
565
|
+
*/
|
|
566
|
+
useH2c?: boolean;
|
|
567
|
+
/**
|
|
568
|
+
* @description SETTINGS frame object. Default to 'node:http2' defaults
|
|
569
|
+
*/
|
|
570
|
+
settings?: Omit<SessionOptions['settings'], 'enablePush' | 'maxConcurrentStreams' | 'enableConnectProtocol'>;
|
|
571
|
+
}
|
|
572
|
+
export interface EventSourceOptions {
|
|
573
|
+
/**
|
|
574
|
+
* Maximum allowed event size in bytes for EventSource messages.
|
|
575
|
+
* Set to 0 to disable the limit.
|
|
576
|
+
* @default buffer.kStringMaxLength
|
|
577
|
+
*/
|
|
578
|
+
maxEventSize?: number;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
//#endregion
|
|
582
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/errors.d.ts
|
|
583
|
+
declare namespace Errors {
|
|
584
|
+
export class UndiciError extends Error {
|
|
585
|
+
name: string;
|
|
586
|
+
code: string;
|
|
587
|
+
}
|
|
588
|
+
/** Connect timeout error. */
|
|
589
|
+
export class ConnectTimeoutError extends UndiciError {
|
|
590
|
+
name: 'ConnectTimeoutError';
|
|
591
|
+
code: 'UND_ERR_CONNECT_TIMEOUT';
|
|
592
|
+
}
|
|
593
|
+
/** A header exceeds the `headersTimeout` option. */
|
|
594
|
+
export class HeadersTimeoutError extends UndiciError {
|
|
595
|
+
name: 'HeadersTimeoutError';
|
|
596
|
+
code: 'UND_ERR_HEADERS_TIMEOUT';
|
|
597
|
+
}
|
|
598
|
+
/** Headers overflow error. */
|
|
599
|
+
export class HeadersOverflowError extends UndiciError {
|
|
600
|
+
name: 'HeadersOverflowError';
|
|
601
|
+
code: 'UND_ERR_HEADERS_OVERFLOW';
|
|
602
|
+
}
|
|
603
|
+
/** A body exceeds the `bodyTimeout` option. */
|
|
604
|
+
export class BodyTimeoutError extends UndiciError {
|
|
605
|
+
name: 'BodyTimeoutError';
|
|
606
|
+
code: 'UND_ERR_BODY_TIMEOUT';
|
|
607
|
+
}
|
|
608
|
+
export class ResponseError extends UndiciError {
|
|
609
|
+
constructor(message: string, code: number, options: {
|
|
610
|
+
headers?: IncomingHttpHeaders | string[] | null;
|
|
611
|
+
body?: null | Record<string, any> | string;
|
|
612
|
+
});
|
|
613
|
+
name: 'ResponseError';
|
|
614
|
+
code: 'UND_ERR_RESPONSE';
|
|
615
|
+
statusCode: number;
|
|
616
|
+
body: null | Record<string, any> | string;
|
|
617
|
+
headers: IncomingHttpHeaders | string[] | null;
|
|
618
|
+
}
|
|
619
|
+
/** Passed an invalid argument. */
|
|
620
|
+
export class InvalidArgumentError extends UndiciError {
|
|
621
|
+
name: 'InvalidArgumentError';
|
|
622
|
+
code: 'UND_ERR_INVALID_ARG';
|
|
623
|
+
}
|
|
624
|
+
/** Returned an invalid value. */
|
|
625
|
+
export class InvalidReturnValueError extends UndiciError {
|
|
626
|
+
name: 'InvalidReturnValueError';
|
|
627
|
+
code: 'UND_ERR_INVALID_RETURN_VALUE';
|
|
628
|
+
}
|
|
629
|
+
/** The request has been aborted by the user. */
|
|
630
|
+
export class RequestAbortedError extends UndiciError {
|
|
631
|
+
name: 'AbortError';
|
|
632
|
+
code: 'UND_ERR_ABORTED';
|
|
633
|
+
}
|
|
634
|
+
/** Expected error with reason. */
|
|
635
|
+
export class InformationalError extends UndiciError {
|
|
636
|
+
name: 'InformationalError';
|
|
637
|
+
code: 'UND_ERR_INFO';
|
|
638
|
+
}
|
|
639
|
+
/** Request body length does not match content-length header. */
|
|
640
|
+
export class RequestContentLengthMismatchError extends UndiciError {
|
|
641
|
+
name: 'RequestContentLengthMismatchError';
|
|
642
|
+
code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH';
|
|
643
|
+
}
|
|
644
|
+
/** Response body length does not match content-length header. */
|
|
645
|
+
export class ResponseContentLengthMismatchError extends UndiciError {
|
|
646
|
+
name: 'ResponseContentLengthMismatchError';
|
|
647
|
+
code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH';
|
|
648
|
+
}
|
|
649
|
+
/** Trying to use a destroyed client. */
|
|
650
|
+
export class ClientDestroyedError extends UndiciError {
|
|
651
|
+
name: 'ClientDestroyedError';
|
|
652
|
+
code: 'UND_ERR_DESTROYED';
|
|
653
|
+
}
|
|
654
|
+
/** Trying to use a closed client. */
|
|
655
|
+
export class ClientClosedError extends UndiciError {
|
|
656
|
+
name: 'ClientClosedError';
|
|
657
|
+
code: 'UND_ERR_CLOSED';
|
|
658
|
+
}
|
|
659
|
+
/** There is an error with the socket. */
|
|
660
|
+
export class SocketError extends UndiciError {
|
|
661
|
+
name: 'SocketError';
|
|
662
|
+
code: 'UND_ERR_SOCKET';
|
|
663
|
+
socket: Client.SocketInfo | null;
|
|
664
|
+
}
|
|
665
|
+
/** Encountered unsupported functionality. */
|
|
666
|
+
export class NotSupportedError extends UndiciError {
|
|
667
|
+
name: 'NotSupportedError';
|
|
668
|
+
code: 'UND_ERR_NOT_SUPPORTED';
|
|
669
|
+
}
|
|
670
|
+
/** No upstream has been added to the BalancedPool. */
|
|
671
|
+
export class BalancedPoolMissingUpstreamError extends UndiciError {
|
|
672
|
+
name: 'MissingUpstreamError';
|
|
673
|
+
code: 'UND_ERR_BPL_MISSING_UPSTREAM';
|
|
674
|
+
}
|
|
675
|
+
export class HTTPParserError extends UndiciError {
|
|
676
|
+
name: 'HTTPParserError';
|
|
677
|
+
code: string;
|
|
678
|
+
}
|
|
679
|
+
/** The response exceed the length allowed. */
|
|
680
|
+
export class ResponseExceededMaxSizeError extends UndiciError {
|
|
681
|
+
name: 'ResponseExceededMaxSizeError';
|
|
682
|
+
code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE';
|
|
683
|
+
}
|
|
684
|
+
export class RequestRetryError extends UndiciError {
|
|
685
|
+
constructor(message: string, statusCode: number, headers?: IncomingHttpHeaders | string[] | null, body?: null | Record<string, any> | string);
|
|
686
|
+
name: 'RequestRetryError';
|
|
687
|
+
code: 'UND_ERR_REQ_RETRY';
|
|
688
|
+
statusCode: number;
|
|
689
|
+
data: {
|
|
690
|
+
count: number;
|
|
691
|
+
};
|
|
692
|
+
headers: Record<string, string | string[]>;
|
|
693
|
+
}
|
|
694
|
+
export class SecureProxyConnectionError extends UndiciError {
|
|
695
|
+
constructor(cause?: Error, message?: string, options?: Record<any, any>);
|
|
696
|
+
name: 'SecureProxyConnectionError';
|
|
697
|
+
code: 'UND_ERR_PRX_TLS';
|
|
698
|
+
}
|
|
699
|
+
export class ProxyConnectionError extends UndiciError {
|
|
700
|
+
constructor(cause?: Error, message?: string, options?: Record<any, any>);
|
|
701
|
+
name: 'ProxyConnectionError';
|
|
702
|
+
code: 'UND_ERR_PRX_CONN';
|
|
703
|
+
}
|
|
704
|
+
export class MaxOriginsReachedError extends UndiciError {
|
|
705
|
+
name: 'MaxOriginsReachedError';
|
|
706
|
+
code: 'UND_ERR_MAX_ORIGINS_REACHED';
|
|
707
|
+
}
|
|
708
|
+
/** SOCKS5 proxy related error. */
|
|
709
|
+
export class Socks5ProxyError extends UndiciError {
|
|
710
|
+
constructor(message?: string, code?: string);
|
|
711
|
+
name: 'Socks5ProxyError';
|
|
712
|
+
code: string;
|
|
713
|
+
}
|
|
714
|
+
/** WebSocket decompressed message exceeded maximum size. */
|
|
715
|
+
export class MessageSizeExceededError extends UndiciError {
|
|
716
|
+
name: 'MessageSizeExceededError';
|
|
717
|
+
code: 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED';
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
//#endregion
|
|
721
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/dispatcher.d.ts
|
|
722
|
+
type UndiciHeaders = OutgoingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null;
|
|
723
|
+
/** Dispatcher is the core API used to dispatch requests. */
|
|
724
|
+
declare class Dispatcher extends EventEmitter {
|
|
725
|
+
/** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */
|
|
726
|
+
dispatch(options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean;
|
|
727
|
+
/** Starts two-way communications with the requested resource. */
|
|
728
|
+
connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ConnectData<TOpaque>) => void): void;
|
|
729
|
+
connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>): Promise<Dispatcher.ConnectData<TOpaque>>;
|
|
730
|
+
/** Compose a chain of dispatchers */
|
|
731
|
+
compose(dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher;
|
|
732
|
+
compose(...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher;
|
|
733
|
+
/** Performs an HTTP request. */
|
|
734
|
+
request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ResponseData<TOpaque>) => void): void;
|
|
735
|
+
request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>): Promise<Dispatcher.ResponseData<TOpaque>>;
|
|
736
|
+
/** For easy use with `stream.pipeline`. */
|
|
737
|
+
pipeline<TOpaque = null>(options: Dispatcher.PipelineOptions<TOpaque>, handler: Dispatcher.PipelineHandler<TOpaque>): Duplex;
|
|
738
|
+
/** A faster version of `Dispatcher.request`. */
|
|
739
|
+
stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>, callback: (err: Error | null, data: Dispatcher.StreamData<TOpaque>) => void): void;
|
|
740
|
+
stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>): Promise<Dispatcher.StreamData<TOpaque>>;
|
|
741
|
+
/** Upgrade to a different protocol. */
|
|
742
|
+
upgrade(options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void;
|
|
743
|
+
upgrade(options: Dispatcher.UpgradeOptions): Promise<Dispatcher.UpgradeData>;
|
|
744
|
+
/** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */
|
|
745
|
+
close(callback: () => void): void;
|
|
746
|
+
close(): Promise<void>;
|
|
747
|
+
/** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */
|
|
748
|
+
destroy(err: Error | null, callback: () => void): void;
|
|
749
|
+
destroy(callback: () => void): void;
|
|
750
|
+
destroy(err: Error | null): Promise<void>;
|
|
751
|
+
destroy(): Promise<void>;
|
|
752
|
+
on(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
|
|
753
|
+
on(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
754
|
+
on(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
755
|
+
on(eventName: 'drain', callback: (origin: URL$1) => void): this;
|
|
756
|
+
once(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
|
|
757
|
+
once(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
758
|
+
once(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
759
|
+
once(eventName: 'drain', callback: (origin: URL$1) => void): this;
|
|
760
|
+
off(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
|
|
761
|
+
off(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
762
|
+
off(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
763
|
+
off(eventName: 'drain', callback: (origin: URL$1) => void): this;
|
|
764
|
+
addListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
|
|
765
|
+
addListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
766
|
+
addListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
767
|
+
addListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
|
|
768
|
+
removeListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
|
|
769
|
+
removeListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
770
|
+
removeListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
771
|
+
removeListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
|
|
772
|
+
prependListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
|
|
773
|
+
prependListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
774
|
+
prependListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
775
|
+
prependListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
|
|
776
|
+
prependOnceListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
|
|
777
|
+
prependOnceListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
778
|
+
prependOnceListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
|
|
779
|
+
prependOnceListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
|
|
780
|
+
listeners(eventName: 'connect'): ((origin: URL$1, targets: readonly Dispatcher[]) => void)[];
|
|
781
|
+
listeners(eventName: 'disconnect'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
|
|
782
|
+
listeners(eventName: 'connectionError'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
|
|
783
|
+
listeners(eventName: 'drain'): ((origin: URL$1) => void)[];
|
|
784
|
+
rawListeners(eventName: 'connect'): ((origin: URL$1, targets: readonly Dispatcher[]) => void)[];
|
|
785
|
+
rawListeners(eventName: 'disconnect'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
|
|
786
|
+
rawListeners(eventName: 'connectionError'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
|
|
787
|
+
rawListeners(eventName: 'drain'): ((origin: URL$1) => void)[];
|
|
788
|
+
emit(eventName: 'connect', origin: URL$1, targets: readonly Dispatcher[]): boolean;
|
|
789
|
+
emit(eventName: 'disconnect', origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
|
|
790
|
+
emit(eventName: 'connectionError', origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
|
|
791
|
+
emit(eventName: 'drain', origin: URL$1): boolean;
|
|
792
|
+
}
|
|
793
|
+
declare namespace Dispatcher {
|
|
794
|
+
export interface ComposedDispatcher extends Dispatcher {}
|
|
795
|
+
export type Dispatch = Dispatcher['dispatch'];
|
|
796
|
+
export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch;
|
|
797
|
+
export interface DispatchOptions {
|
|
798
|
+
origin?: string | URL$1;
|
|
799
|
+
path: string;
|
|
800
|
+
method: HttpMethod;
|
|
801
|
+
/** Default: `null` */
|
|
802
|
+
body?: string | Buffer | Uint8Array | Readable | null | FormData;
|
|
803
|
+
/** Default: `null` */
|
|
804
|
+
headers?: UndiciHeaders;
|
|
805
|
+
/** Query string params to be embedded in the request URL. Default: `null` */
|
|
806
|
+
query?: Record<string, any>;
|
|
807
|
+
/** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */
|
|
808
|
+
idempotent?: boolean;
|
|
809
|
+
/** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. Defaults to `method !== 'HEAD'`. */
|
|
810
|
+
blocking?: boolean;
|
|
811
|
+
/** The IP Type of Service (ToS) value for the request socket. Must be an integer between 0 and 255. */
|
|
812
|
+
typeOfService?: number | null;
|
|
813
|
+
/** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */
|
|
814
|
+
upgrade?: boolean | string | null;
|
|
815
|
+
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */
|
|
816
|
+
headersTimeout?: number | null;
|
|
817
|
+
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */
|
|
818
|
+
bodyTimeout?: number | null;
|
|
819
|
+
/** Whether the request should stablish a keep-alive or not. Default `false` */
|
|
820
|
+
reset?: boolean;
|
|
821
|
+
/** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */
|
|
822
|
+
expectContinue?: boolean;
|
|
823
|
+
}
|
|
824
|
+
export interface ConnectOptions<TOpaque = null> {
|
|
825
|
+
origin: string | URL$1;
|
|
826
|
+
path: string;
|
|
827
|
+
/** Default: `null` */
|
|
828
|
+
headers?: UndiciHeaders;
|
|
829
|
+
/** Default: `null` */
|
|
830
|
+
signal?: AbortSignal | EventEmitter | null;
|
|
831
|
+
/** This argument parameter is passed through to `ConnectData` */
|
|
832
|
+
opaque?: TOpaque;
|
|
833
|
+
/** Default: `null` */
|
|
834
|
+
responseHeaders?: 'raw' | null;
|
|
835
|
+
}
|
|
836
|
+
export interface RequestOptions<TOpaque = null> extends DispatchOptions {
|
|
837
|
+
/** Default: `null` */
|
|
838
|
+
opaque?: TOpaque;
|
|
839
|
+
/** Default: `null` */
|
|
840
|
+
signal?: AbortSignal | EventEmitter | null;
|
|
841
|
+
/** Default: `null` */
|
|
842
|
+
onInfo?: (info: {
|
|
843
|
+
statusCode: number;
|
|
844
|
+
headers: Record<string, string | string[]>;
|
|
845
|
+
}) => void;
|
|
846
|
+
/** Default: `null` */
|
|
847
|
+
responseHeaders?: 'raw' | null;
|
|
848
|
+
/** Default: `64 KiB` */
|
|
849
|
+
highWaterMark?: number;
|
|
850
|
+
}
|
|
851
|
+
export interface PipelineOptions<TOpaque = null> extends RequestOptions<TOpaque> {
|
|
852
|
+
/** `true` if the `handler` will return an object stream. Default: `false` */
|
|
853
|
+
objectMode?: boolean;
|
|
854
|
+
}
|
|
855
|
+
export interface UpgradeOptions {
|
|
856
|
+
path: string;
|
|
857
|
+
/** Default: `'GET'` */
|
|
858
|
+
method?: string;
|
|
859
|
+
/** Default: `null` */
|
|
860
|
+
headers?: UndiciHeaders;
|
|
861
|
+
/** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */
|
|
862
|
+
protocol?: string;
|
|
863
|
+
/** Default: `null` */
|
|
864
|
+
signal?: AbortSignal | EventEmitter | null;
|
|
865
|
+
/** Default: `null` */
|
|
866
|
+
responseHeaders?: 'raw' | null;
|
|
867
|
+
}
|
|
868
|
+
export interface ConnectData<TOpaque = null> {
|
|
869
|
+
statusCode: number;
|
|
870
|
+
headers: IncomingHttpHeaders;
|
|
871
|
+
socket: Duplex;
|
|
872
|
+
opaque: TOpaque;
|
|
873
|
+
}
|
|
874
|
+
export interface ResponseData<TOpaque = null> {
|
|
875
|
+
statusCode: number;
|
|
876
|
+
statusText: string;
|
|
877
|
+
headers: IncomingHttpHeaders;
|
|
878
|
+
body: BodyReadable & BodyMixin;
|
|
879
|
+
trailers: Record<string, string>;
|
|
880
|
+
opaque: TOpaque;
|
|
881
|
+
context: object;
|
|
882
|
+
}
|
|
883
|
+
export interface PipelineHandlerData<TOpaque = null> {
|
|
884
|
+
statusCode: number;
|
|
885
|
+
headers: IncomingHttpHeaders;
|
|
886
|
+
opaque: TOpaque;
|
|
887
|
+
body: BodyReadable;
|
|
888
|
+
context: object;
|
|
889
|
+
}
|
|
890
|
+
export interface StreamData<TOpaque = null> {
|
|
891
|
+
opaque: TOpaque;
|
|
892
|
+
trailers: Record<string, string>;
|
|
893
|
+
}
|
|
894
|
+
export interface UpgradeData<TOpaque = null> {
|
|
895
|
+
headers: IncomingHttpHeaders;
|
|
896
|
+
socket: Duplex;
|
|
897
|
+
opaque: TOpaque;
|
|
898
|
+
}
|
|
899
|
+
export interface StreamFactoryData<TOpaque = null> {
|
|
900
|
+
statusCode: number;
|
|
901
|
+
headers: IncomingHttpHeaders;
|
|
902
|
+
opaque: TOpaque;
|
|
903
|
+
context: object;
|
|
904
|
+
}
|
|
905
|
+
export type StreamFactory<TOpaque = null> = (data: StreamFactoryData<TOpaque>) => Writable;
|
|
906
|
+
export interface DispatchController {
|
|
907
|
+
get aborted(): boolean;
|
|
908
|
+
get paused(): boolean;
|
|
909
|
+
get reason(): Error | null;
|
|
910
|
+
rawHeaders?: Buffer[] | string[] | IncomingHttpHeaders | null;
|
|
911
|
+
rawTrailers?: Buffer[] | string[] | IncomingHttpHeaders | null;
|
|
912
|
+
abort(reason: Error): void;
|
|
913
|
+
pause(): void;
|
|
914
|
+
resume(): void;
|
|
915
|
+
}
|
|
916
|
+
export interface DispatchHandler {
|
|
917
|
+
onRequestStart?(controller: DispatchController, context: any): void;
|
|
918
|
+
onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void;
|
|
919
|
+
onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void;
|
|
920
|
+
onResponseData?(controller: DispatchController, chunk: Buffer): void;
|
|
921
|
+
onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void;
|
|
922
|
+
onResponseError?(controller: DispatchController, error: Error): void;
|
|
923
|
+
/** Invoked when response is received, before headers have been read. **/
|
|
924
|
+
onResponseStarted?(): void;
|
|
925
|
+
/** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */
|
|
926
|
+
onBodySent?(chunk: Buffer): void;
|
|
927
|
+
/** Invoked after the request body is fully sent. */
|
|
928
|
+
onRequestSent?(): void;
|
|
929
|
+
}
|
|
930
|
+
export type PipelineHandler<TOpaque = null> = (data: PipelineHandlerData<TOpaque>) => Readable;
|
|
931
|
+
export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'>;
|
|
932
|
+
/**
|
|
933
|
+
* @link https://fetch.spec.whatwg.org/#body-mixin
|
|
934
|
+
*/
|
|
935
|
+
interface BodyMixin {
|
|
936
|
+
readonly body?: never;
|
|
937
|
+
readonly bodyUsed: boolean;
|
|
938
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
939
|
+
blob(): Promise<Blob$1>;
|
|
940
|
+
bytes(): Promise<Uint8Array>;
|
|
941
|
+
formData(): Promise<never>;
|
|
942
|
+
json(): Promise<unknown>;
|
|
943
|
+
text(): Promise<string>;
|
|
944
|
+
}
|
|
945
|
+
export interface DispatchInterceptor {
|
|
946
|
+
(dispatch: Dispatch): Dispatch;
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
//#endregion
|
|
950
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/pool-stats.d.ts
|
|
951
|
+
declare class PoolStats {
|
|
952
|
+
constructor(pool: Pool);
|
|
953
|
+
/** Number of open socket connections in this pool. */
|
|
954
|
+
connected: number;
|
|
955
|
+
/** Number of open socket connections in this pool that do not have an active request. */
|
|
956
|
+
free: number;
|
|
957
|
+
/** Number of pending requests across all clients in this pool. */
|
|
958
|
+
pending: number;
|
|
959
|
+
/** Number of queued requests across all clients in this pool. */
|
|
960
|
+
queued: number;
|
|
961
|
+
/** Number of currently active requests across all clients in this pool. */
|
|
962
|
+
running: number;
|
|
963
|
+
/** Number of active, pending, or queued requests across all clients in this pool. */
|
|
964
|
+
size: number;
|
|
965
|
+
}
|
|
966
|
+
//#endregion
|
|
967
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/pool.d.ts
|
|
968
|
+
type PoolConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>;
|
|
969
|
+
declare class Pool extends Dispatcher {
|
|
970
|
+
constructor(url: string | URL$1, options?: Pool.Options);
|
|
971
|
+
/** `true` after `pool.close()` has been called. */
|
|
972
|
+
closed: boolean;
|
|
973
|
+
/** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
|
|
974
|
+
destroyed: boolean;
|
|
975
|
+
/** Aggregate stats for a Pool. */
|
|
976
|
+
readonly stats: PoolStats;
|
|
977
|
+
// Override dispatcher APIs.
|
|
978
|
+
override connect(options: PoolConnectOptions): Promise<Dispatcher.ConnectData>;
|
|
979
|
+
override connect(options: PoolConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void;
|
|
980
|
+
}
|
|
981
|
+
declare namespace Pool {
|
|
982
|
+
export type PoolStats = PoolStats;
|
|
983
|
+
export interface Options extends Client.Options {
|
|
984
|
+
/** Default: `(origin, opts) => new Client(origin, opts)`. */
|
|
985
|
+
factory?(origin: URL$1, opts: object): Dispatcher;
|
|
986
|
+
/** The max number of clients to create. `null` if no limit. Default `null`. */
|
|
987
|
+
connections?: number | null;
|
|
988
|
+
/** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */
|
|
989
|
+
clientTtl?: number | null;
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
//#endregion
|
|
993
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/handlers.d.ts
|
|
994
|
+
declare class RedirectHandler implements Dispatcher.DispatchHandler {
|
|
995
|
+
static buildDispatch(dispatcher: Dispatcher, maxRedirections: number): Dispatcher.Dispatch;
|
|
996
|
+
constructor(dispatch: Dispatcher.Dispatch, maxRedirections: number, opts: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler);
|
|
997
|
+
}
|
|
998
|
+
declare class DecoratorHandler implements Dispatcher.DispatchHandler {
|
|
999
|
+
constructor(handler: Dispatcher.DispatchHandler);
|
|
1000
|
+
}
|
|
1001
|
+
//#endregion
|
|
1002
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/retry-handler.d.ts
|
|
1003
|
+
declare class RetryHandler implements Dispatcher.DispatchHandler {
|
|
1004
|
+
constructor(options: Dispatcher.DispatchOptions & {
|
|
1005
|
+
retryOptions?: RetryHandler.RetryOptions;
|
|
1006
|
+
}, retryHandlers: RetryHandler.RetryHandlers);
|
|
1007
|
+
}
|
|
1008
|
+
declare namespace RetryHandler {
|
|
1009
|
+
export type RetryState = {
|
|
1010
|
+
counter: number;
|
|
1011
|
+
};
|
|
1012
|
+
export type RetryContext = {
|
|
1013
|
+
state: RetryState;
|
|
1014
|
+
opts: Dispatcher.DispatchOptions & {
|
|
1015
|
+
retryOptions?: RetryHandler.RetryOptions;
|
|
1016
|
+
};
|
|
1017
|
+
};
|
|
1018
|
+
export type OnRetryCallback = (result?: Error | null) => void;
|
|
1019
|
+
export type RetryCallback = (err: Error, context: {
|
|
1020
|
+
state: RetryState;
|
|
1021
|
+
opts: Dispatcher.DispatchOptions & {
|
|
1022
|
+
retryOptions?: RetryHandler.RetryOptions;
|
|
1023
|
+
};
|
|
1024
|
+
}, callback: OnRetryCallback) => void;
|
|
1025
|
+
export interface RetryOptions {
|
|
1026
|
+
/**
|
|
1027
|
+
* If true, the retry handler will throw an error if the request fails,
|
|
1028
|
+
* this will prevent the folling handlers from being called, and will destroy the socket.
|
|
1029
|
+
*
|
|
1030
|
+
* @type {boolean}
|
|
1031
|
+
* @memberof RetryOptions
|
|
1032
|
+
* @default true
|
|
1033
|
+
*/
|
|
1034
|
+
throwOnError?: boolean;
|
|
1035
|
+
/**
|
|
1036
|
+
* Callback to be invoked on every retry iteration.
|
|
1037
|
+
* It receives the error, current state of the retry object and the options object
|
|
1038
|
+
* passed when instantiating the retry handler.
|
|
1039
|
+
*
|
|
1040
|
+
* @type {RetryCallback}
|
|
1041
|
+
* @memberof RetryOptions
|
|
1042
|
+
*/
|
|
1043
|
+
retry?: RetryCallback;
|
|
1044
|
+
/**
|
|
1045
|
+
* Maximum number of retries to allow.
|
|
1046
|
+
*
|
|
1047
|
+
* @type {number}
|
|
1048
|
+
* @memberof RetryOptions
|
|
1049
|
+
* @default 5
|
|
1050
|
+
*/
|
|
1051
|
+
maxRetries?: number;
|
|
1052
|
+
/**
|
|
1053
|
+
* Max number of milliseconds allow between retries
|
|
1054
|
+
*
|
|
1055
|
+
* @type {number}
|
|
1056
|
+
* @memberof RetryOptions
|
|
1057
|
+
* @default 30000
|
|
1058
|
+
*/
|
|
1059
|
+
maxTimeout?: number;
|
|
1060
|
+
/**
|
|
1061
|
+
* Initial number of milliseconds to wait before retrying for the first time.
|
|
1062
|
+
*
|
|
1063
|
+
* @type {number}
|
|
1064
|
+
* @memberof RetryOptions
|
|
1065
|
+
* @default 500
|
|
1066
|
+
*/
|
|
1067
|
+
minTimeout?: number;
|
|
1068
|
+
/**
|
|
1069
|
+
* Factior to multiply the timeout factor between retries.
|
|
1070
|
+
*
|
|
1071
|
+
* @type {number}
|
|
1072
|
+
* @memberof RetryOptions
|
|
1073
|
+
* @default 2
|
|
1074
|
+
*/
|
|
1075
|
+
timeoutFactor?: number;
|
|
1076
|
+
/**
|
|
1077
|
+
* It enables to automatically infer timeout between retries based on the `Retry-After` header.
|
|
1078
|
+
*
|
|
1079
|
+
* @type {boolean}
|
|
1080
|
+
* @memberof RetryOptions
|
|
1081
|
+
* @default true
|
|
1082
|
+
*/
|
|
1083
|
+
retryAfter?: boolean;
|
|
1084
|
+
/**
|
|
1085
|
+
* HTTP methods to retry.
|
|
1086
|
+
*
|
|
1087
|
+
* @type {Dispatcher.HttpMethod[]}
|
|
1088
|
+
* @memberof RetryOptions
|
|
1089
|
+
* @default ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'],
|
|
1090
|
+
*/
|
|
1091
|
+
methods?: Dispatcher.HttpMethod[];
|
|
1092
|
+
/**
|
|
1093
|
+
* Error codes to be retried. e.g. `ECONNRESET`, `ENOTFOUND`, `ETIMEDOUT`, `ECONNREFUSED`, etc.
|
|
1094
|
+
*
|
|
1095
|
+
* @type {string[]}
|
|
1096
|
+
* @default ['ECONNRESET','ECONNREFUSED','ENOTFOUND','ENETDOWN','ENETUNREACH','EHOSTDOWN','EHOSTUNREACH','EPIPE']
|
|
1097
|
+
*/
|
|
1098
|
+
errorCodes?: string[];
|
|
1099
|
+
/**
|
|
1100
|
+
* HTTP status codes to be retried.
|
|
1101
|
+
*
|
|
1102
|
+
* @type {number[]}
|
|
1103
|
+
* @memberof RetryOptions
|
|
1104
|
+
* @default [500, 502, 503, 504, 429],
|
|
1105
|
+
*/
|
|
1106
|
+
statusCodes?: number[];
|
|
1107
|
+
}
|
|
1108
|
+
export interface RetryHandlers {
|
|
1109
|
+
dispatch: Dispatcher['dispatch'];
|
|
1110
|
+
handler: Dispatcher.DispatchHandler;
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
//#endregion
|
|
1114
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/balanced-pool.d.ts
|
|
1115
|
+
type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>;
|
|
1116
|
+
declare class BalancedPool extends Dispatcher {
|
|
1117
|
+
constructor(url: string | string[] | URL$1 | URL$1[], options?: Pool.Options);
|
|
1118
|
+
addUpstream(upstream: string | URL$1): BalancedPool;
|
|
1119
|
+
removeUpstream(upstream: string | URL$1): BalancedPool;
|
|
1120
|
+
getUpstream(upstream: string | URL$1): Pool | undefined;
|
|
1121
|
+
upstreams: Array<string>;
|
|
1122
|
+
/** `true` after `pool.close()` has been called. */
|
|
1123
|
+
closed: boolean;
|
|
1124
|
+
/** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
|
|
1125
|
+
destroyed: boolean;
|
|
1126
|
+
// Override dispatcher APIs.
|
|
1127
|
+
override connect(options: BalancedPoolConnectOptions): Promise<Dispatcher.ConnectData>;
|
|
1128
|
+
override connect(options: BalancedPoolConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void;
|
|
1129
|
+
}
|
|
1130
|
+
//#endregion
|
|
1131
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/round-robin-pool.d.ts
|
|
1132
|
+
type RoundRobinPoolConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>;
|
|
1133
|
+
declare class RoundRobinPool extends Dispatcher {
|
|
1134
|
+
constructor(url: string | URL$1, options?: RoundRobinPool.Options);
|
|
1135
|
+
/** `true` after `pool.close()` has been called. */
|
|
1136
|
+
closed: boolean;
|
|
1137
|
+
/** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
|
|
1138
|
+
destroyed: boolean;
|
|
1139
|
+
/** Aggregate stats for a RoundRobinPool. */
|
|
1140
|
+
readonly stats: PoolStats;
|
|
1141
|
+
// Override dispatcher APIs.
|
|
1142
|
+
override connect(options: RoundRobinPoolConnectOptions): Promise<Dispatcher.ConnectData>;
|
|
1143
|
+
override connect(options: RoundRobinPoolConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void;
|
|
1144
|
+
}
|
|
1145
|
+
declare namespace RoundRobinPool {
|
|
1146
|
+
export type RoundRobinPoolStats = PoolStats;
|
|
1147
|
+
export interface Options extends Client.Options {
|
|
1148
|
+
/** Default: `(origin, opts) => new Client(origin, opts)`. */
|
|
1149
|
+
factory?(origin: URL$1, opts: object): Dispatcher;
|
|
1150
|
+
/** The max number of clients to create. `null` if no limit. Default `null`. */
|
|
1151
|
+
connections?: number | null;
|
|
1152
|
+
/** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */
|
|
1153
|
+
clientTtl?: number | null;
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
//#endregion
|
|
1157
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/h2c-client.d.ts
|
|
1158
|
+
type H2ClientOptions = Omit<Dispatcher.ConnectOptions, 'origin'>;
|
|
1159
|
+
/**
|
|
1160
|
+
* A basic H2C client, mapped on top a single TCP connection. Pipelining is disabled by default.
|
|
1161
|
+
*/
|
|
1162
|
+
declare class H2CClient extends Dispatcher {
|
|
1163
|
+
constructor(url: string | URL$1, options?: H2CClient.Options);
|
|
1164
|
+
/** Property to get and set the pipelining factor. */
|
|
1165
|
+
pipelining: number;
|
|
1166
|
+
/** `true` after `client.close()` has been called. */
|
|
1167
|
+
closed: boolean;
|
|
1168
|
+
/** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
|
|
1169
|
+
destroyed: boolean;
|
|
1170
|
+
// Override dispatcher APIs.
|
|
1171
|
+
override connect(options: H2ClientOptions): Promise<Dispatcher.ConnectData>;
|
|
1172
|
+
override connect(options: H2ClientOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void;
|
|
1173
|
+
}
|
|
1174
|
+
declare namespace H2CClient {
|
|
1175
|
+
export interface Options {
|
|
1176
|
+
/** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
|
|
1177
|
+
maxHeaderSize?: number;
|
|
1178
|
+
/** 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). */
|
|
1179
|
+
headersTimeout?: number;
|
|
1180
|
+
/** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */
|
|
1181
|
+
connectTimeout?: number;
|
|
1182
|
+
/** 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). */
|
|
1183
|
+
bodyTimeout?: number;
|
|
1184
|
+
/** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
|
|
1185
|
+
keepAliveTimeout?: number;
|
|
1186
|
+
/** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
|
|
1187
|
+
keepAliveMaxTimeout?: number;
|
|
1188
|
+
/** 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). */
|
|
1189
|
+
keepAliveTimeoutThreshold?: number;
|
|
1190
|
+
/** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */
|
|
1191
|
+
socketPath?: string;
|
|
1192
|
+
/** 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`. */
|
|
1193
|
+
pipelining?: number;
|
|
1194
|
+
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
|
|
1195
|
+
strictContentLength?: boolean;
|
|
1196
|
+
/** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */
|
|
1197
|
+
maxCachedSessions?: number;
|
|
1198
|
+
/** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */
|
|
1199
|
+
connect?: Omit<Partial<buildConnector.BuildOptions>, 'allowH2'> | buildConnector.connector;
|
|
1200
|
+
/** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */
|
|
1201
|
+
maxRequestsPerClient?: number;
|
|
1202
|
+
/** Local IP address the socket should connect from. */
|
|
1203
|
+
localAddress?: string;
|
|
1204
|
+
/** Max response body size in bytes, -1 is disabled */
|
|
1205
|
+
maxResponseSize?: number;
|
|
1206
|
+
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
|
|
1207
|
+
autoSelectFamily?: boolean;
|
|
1208
|
+
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
|
|
1209
|
+
autoSelectFamilyAttemptTimeout?: number;
|
|
1210
|
+
/**
|
|
1211
|
+
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
|
|
1212
|
+
* @default 100
|
|
1213
|
+
*/
|
|
1214
|
+
maxConcurrentStreams?: number;
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
//#endregion
|
|
1218
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/agent.d.ts
|
|
1219
|
+
declare class Agent extends Dispatcher {
|
|
1220
|
+
constructor(opts?: Agent.Options);
|
|
1221
|
+
/** `true` after `dispatcher.close()` has been called. */
|
|
1222
|
+
closed: boolean;
|
|
1223
|
+
/** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */
|
|
1224
|
+
destroyed: boolean;
|
|
1225
|
+
/** Dispatches a request. */
|
|
1226
|
+
dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean;
|
|
1227
|
+
/** Aggregate stats for a Agent by origin. */
|
|
1228
|
+
readonly stats: Record<string, ClientStats | PoolStats>;
|
|
1229
|
+
}
|
|
1230
|
+
declare namespace Agent {
|
|
1231
|
+
export interface Options extends Pool.Options {
|
|
1232
|
+
/** Default: `(origin, opts) => new Pool(origin, opts)`. */
|
|
1233
|
+
factory?(origin: string | URL$1, opts: Object): Dispatcher;
|
|
1234
|
+
maxOrigins?: number;
|
|
1235
|
+
}
|
|
1236
|
+
export interface DispatchOptions extends Dispatcher.DispatchOptions {}
|
|
1237
|
+
}
|
|
1238
|
+
//#endregion
|
|
1239
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/dispatcher1-wrapper.d.ts
|
|
1240
|
+
declare class Dispatcher1Wrapper extends Dispatcher {
|
|
1241
|
+
constructor(dispatcher: Dispatcher);
|
|
1242
|
+
}
|
|
1243
|
+
//#endregion
|
|
1244
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/global-dispatcher.d.ts
|
|
1245
|
+
declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher>(dispatcher: DispatcherImplementation): void;
|
|
1246
|
+
declare function getGlobalDispatcher(): Dispatcher;
|
|
1247
|
+
//#endregion
|
|
1248
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/api.d.ts
|
|
1249
|
+
/** Performs an HTTP request. */
|
|
1250
|
+
declare function request<TOpaque = null>(url: string | URL$1 | UrlObject, options?: {
|
|
1251
|
+
dispatcher?: Dispatcher;
|
|
1252
|
+
} & Omit<Dispatcher.RequestOptions<TOpaque>, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>): Promise<Dispatcher.ResponseData<TOpaque>>;
|
|
1253
|
+
/** A faster version of `request`. */
|
|
1254
|
+
declare function stream<TOpaque = null>(url: string | URL$1 | UrlObject, options: {
|
|
1255
|
+
dispatcher?: Dispatcher;
|
|
1256
|
+
} & Omit<Dispatcher.RequestOptions<TOpaque>, 'origin' | 'path'>, factory: Dispatcher.StreamFactory<TOpaque>): Promise<Dispatcher.StreamData<TOpaque>>;
|
|
1257
|
+
/** For easy use with `stream.pipeline`. */
|
|
1258
|
+
declare function pipeline<TOpaque = null>(url: string | URL$1 | UrlObject, options: {
|
|
1259
|
+
dispatcher?: Dispatcher;
|
|
1260
|
+
} & Omit<Dispatcher.PipelineOptions<TOpaque>, 'origin' | 'path'>, handler: Dispatcher.PipelineHandler<TOpaque>): Duplex;
|
|
1261
|
+
/** Starts two-way communications with the requested resource. */
|
|
1262
|
+
declare function connect<TOpaque = null>(url: string | URL$1 | UrlObject, options?: {
|
|
1263
|
+
dispatcher?: Dispatcher;
|
|
1264
|
+
} & Omit<Dispatcher.ConnectOptions<TOpaque>, 'origin' | 'path'>): Promise<Dispatcher.ConnectData<TOpaque>>;
|
|
1265
|
+
/** Upgrade to a different protocol. */
|
|
1266
|
+
declare function upgrade(url: string | URL$1 | UrlObject, options?: {
|
|
1267
|
+
dispatcher?: Dispatcher;
|
|
1268
|
+
} & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'>): Promise<Dispatcher.UpgradeData>;
|
|
1269
|
+
//#endregion
|
|
1270
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/mock-interceptor.d.ts
|
|
1271
|
+
/** The scope associated with a mock dispatch. */
|
|
1272
|
+
declare class MockScope<TData extends object = object> {
|
|
1273
|
+
constructor(mockDispatch: MockInterceptor.MockDispatch<TData>);
|
|
1274
|
+
/** Delay a reply by a set amount of time in ms. */
|
|
1275
|
+
delay(waitInMs: number): MockScope<TData>;
|
|
1276
|
+
/** Persist the defined mock data for the associated reply. It will return the defined mock data indefinitely. */
|
|
1277
|
+
persist(): MockScope<TData>;
|
|
1278
|
+
/** Define a reply for a set amount of matching requests. */
|
|
1279
|
+
times(repeatTimes: number): MockScope<TData>;
|
|
1280
|
+
}
|
|
1281
|
+
/** The interceptor for a Mock. */
|
|
1282
|
+
declare class MockInterceptor {
|
|
1283
|
+
constructor(options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[]);
|
|
1284
|
+
/** Mock an undici request with the defined reply. */
|
|
1285
|
+
reply<TData extends object = object>(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback<TData>): MockScope<TData>;
|
|
1286
|
+
reply<TData extends object = object>(statusCode: number, data?: TData | Buffer | string | MockInterceptor.MockResponseDataHandler<TData>, responseOptions?: MockInterceptor.MockResponseOptions): MockScope<TData>;
|
|
1287
|
+
/** Mock an undici request by throwing the defined reply error. */
|
|
1288
|
+
replyWithError<TError extends Error = Error>(error: TError): MockScope;
|
|
1289
|
+
/** Set default reply headers on the interceptor for subsequent mocked replies. */
|
|
1290
|
+
defaultReplyHeaders(headers: IncomingHttpHeaders): MockInterceptor;
|
|
1291
|
+
/** Set default reply trailers on the interceptor for subsequent mocked replies. */
|
|
1292
|
+
defaultReplyTrailers(trailers: Record<string, string>): MockInterceptor;
|
|
1293
|
+
/** Set automatically calculated content-length header on subsequent mocked replies. */
|
|
1294
|
+
replyContentLength(): MockInterceptor;
|
|
1295
|
+
}
|
|
1296
|
+
declare namespace MockInterceptor {
|
|
1297
|
+
/** MockInterceptor options. */
|
|
1298
|
+
export interface Options {
|
|
1299
|
+
/** Path to intercept on. */
|
|
1300
|
+
path: string | RegExp | ((path: string) => boolean);
|
|
1301
|
+
/** Method to intercept on. Defaults to GET. */
|
|
1302
|
+
method?: string | RegExp | ((method: string) => boolean);
|
|
1303
|
+
/** Body to intercept on. */
|
|
1304
|
+
body?: string | RegExp | ((body: string) => boolean);
|
|
1305
|
+
/** Headers to intercept on. */
|
|
1306
|
+
headers?: Record<string, string | RegExp | ((body: string) => boolean)> | ((headers: Record<string, string>) => boolean);
|
|
1307
|
+
/** Query params to intercept on */
|
|
1308
|
+
query?: Record<string, any>;
|
|
1309
|
+
}
|
|
1310
|
+
export interface MockDispatch<TData extends object = object, TError extends Error = Error> extends Options {
|
|
1311
|
+
times: number | null;
|
|
1312
|
+
persist: boolean;
|
|
1313
|
+
consumed: boolean;
|
|
1314
|
+
data: MockDispatchData<TData, TError>;
|
|
1315
|
+
}
|
|
1316
|
+
export interface MockDispatchData<TData extends object = object, TError extends Error = Error> extends MockResponseOptions {
|
|
1317
|
+
error: TError | null;
|
|
1318
|
+
statusCode?: number;
|
|
1319
|
+
data?: TData | string;
|
|
1320
|
+
}
|
|
1321
|
+
export interface MockResponseOptions {
|
|
1322
|
+
headers?: IncomingHttpHeaders;
|
|
1323
|
+
trailers?: Record<string, string>;
|
|
1324
|
+
}
|
|
1325
|
+
export interface MockResponseCallbackOptions {
|
|
1326
|
+
path: string;
|
|
1327
|
+
method: string;
|
|
1328
|
+
headers?: Headers$1 | Record<string, string>;
|
|
1329
|
+
origin?: string;
|
|
1330
|
+
body?: BodyInit | Dispatcher.DispatchOptions['body'] | null;
|
|
1331
|
+
}
|
|
1332
|
+
export type MockResponseDataHandler<TData extends object = object> = (opts: MockResponseCallbackOptions) => TData | Buffer | string;
|
|
1333
|
+
export type MockReplyOptions<TData extends object = object> = {
|
|
1334
|
+
statusCode: number;
|
|
1335
|
+
data?: TData | Buffer | string;
|
|
1336
|
+
responseOptions?: MockResponseOptions;
|
|
1337
|
+
};
|
|
1338
|
+
export type MockReplyOptionsCallback<TData extends object = object> = (opts: MockResponseCallbackOptions) => MockReplyOptions<TData> | Promise<MockReplyOptions<TData>>;
|
|
1339
|
+
}
|
|
1340
|
+
interface Interceptable extends Dispatcher {
|
|
1341
|
+
/** Intercepts any matching requests that use the same origin as this mock client. */
|
|
1342
|
+
intercept(options: MockInterceptor.Options): MockInterceptor;
|
|
1343
|
+
/** Clean up all the prepared mocks. */
|
|
1344
|
+
cleanMocks(): void;
|
|
1345
|
+
}
|
|
1346
|
+
//#endregion
|
|
1347
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/mock-call-history.d.ts
|
|
1348
|
+
declare namespace MockCallHistoryLog {
|
|
1349
|
+
/** request's configuration properties */
|
|
1350
|
+
export type MockCallHistoryLogProperties = 'protocol' | 'host' | 'port' | 'origin' | 'path' | 'hash' | 'fullUrl' | 'method' | 'searchParams' | 'body' | 'headers';
|
|
1351
|
+
}
|
|
1352
|
+
/** a log reflecting request configuration */
|
|
1353
|
+
declare class MockCallHistoryLog {
|
|
1354
|
+
constructor(requestInit: Dispatcher.DispatchOptions);
|
|
1355
|
+
/** protocol used. ie. 'https:' or 'http:' etc... */
|
|
1356
|
+
protocol: string;
|
|
1357
|
+
/** request's host. */
|
|
1358
|
+
host: string;
|
|
1359
|
+
/** request's port. */
|
|
1360
|
+
port: string;
|
|
1361
|
+
/** request's origin. ie. https://localhost:3000. */
|
|
1362
|
+
origin: string;
|
|
1363
|
+
/** path. never contains searchParams. */
|
|
1364
|
+
path: string;
|
|
1365
|
+
/** request's hash. */
|
|
1366
|
+
hash: string;
|
|
1367
|
+
/** the full url requested. */
|
|
1368
|
+
fullUrl: string;
|
|
1369
|
+
/** request's method. */
|
|
1370
|
+
method: string;
|
|
1371
|
+
/** search params. */
|
|
1372
|
+
searchParams: Record<string, string>;
|
|
1373
|
+
/** request's body */
|
|
1374
|
+
body: string | null | undefined;
|
|
1375
|
+
/** request's headers */
|
|
1376
|
+
headers: Record<string, string | string[]> | null | undefined;
|
|
1377
|
+
/** returns an Map of property / value pair */
|
|
1378
|
+
toMap(): Map<MockCallHistoryLog.MockCallHistoryLogProperties, string | Record<string, string | string[]> | null | undefined>;
|
|
1379
|
+
/** returns a string computed with all key value pair */
|
|
1380
|
+
toString(): string;
|
|
1381
|
+
}
|
|
1382
|
+
declare namespace MockCallHistory {
|
|
1383
|
+
export type FilterCallsOperator = 'AND' | 'OR';
|
|
1384
|
+
/** modify the filtering behavior */
|
|
1385
|
+
export interface FilterCallsOptions {
|
|
1386
|
+
/** the operator to apply when filtering. 'OR' will adds any MockCallHistoryLog matching any criteria given. 'AND' will adds only MockCallHistoryLog matching every criteria given. (default 'OR') */
|
|
1387
|
+
operator?: FilterCallsOperator | Lowercase<FilterCallsOperator>;
|
|
1388
|
+
}
|
|
1389
|
+
/** a function to be executed for filtering MockCallHistoryLog */
|
|
1390
|
+
export type FilterCallsFunctionCriteria = (log: MockCallHistoryLog) => boolean;
|
|
1391
|
+
/** parameter to filter MockCallHistoryLog */
|
|
1392
|
+
export type FilterCallsParameter = string | RegExp | undefined | null;
|
|
1393
|
+
/** an object to execute multiple filtering at once */
|
|
1394
|
+
export interface FilterCallsObjectCriteria extends Record<string, FilterCallsParameter> {
|
|
1395
|
+
/** filter by request protocol. ie https: */
|
|
1396
|
+
protocol?: FilterCallsParameter;
|
|
1397
|
+
/** filter by request host. */
|
|
1398
|
+
host?: FilterCallsParameter;
|
|
1399
|
+
/** filter by request port. */
|
|
1400
|
+
port?: FilterCallsParameter;
|
|
1401
|
+
/** filter by request origin. */
|
|
1402
|
+
origin?: FilterCallsParameter;
|
|
1403
|
+
/** filter by request path. */
|
|
1404
|
+
path?: FilterCallsParameter;
|
|
1405
|
+
/** filter by request hash. */
|
|
1406
|
+
hash?: FilterCallsParameter;
|
|
1407
|
+
/** filter by request fullUrl. */
|
|
1408
|
+
fullUrl?: FilterCallsParameter;
|
|
1409
|
+
/** filter by request method. */
|
|
1410
|
+
method?: FilterCallsParameter;
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
/** a call history to track requests configuration */
|
|
1414
|
+
declare class MockCallHistory {
|
|
1415
|
+
constructor(name: string);
|
|
1416
|
+
/** returns an array of MockCallHistoryLog. */
|
|
1417
|
+
calls(): Array<MockCallHistoryLog>;
|
|
1418
|
+
/** returns the first MockCallHistoryLog */
|
|
1419
|
+
firstCall(): MockCallHistoryLog | undefined;
|
|
1420
|
+
/** returns the last MockCallHistoryLog. */
|
|
1421
|
+
lastCall(): MockCallHistoryLog | undefined;
|
|
1422
|
+
/** returns the nth MockCallHistoryLog. */
|
|
1423
|
+
nthCall(position: number): MockCallHistoryLog | undefined;
|
|
1424
|
+
/** return all MockCallHistoryLog matching any of criteria given. if an object is used with multiple properties, you can change the operator to apply during filtering on options */
|
|
1425
|
+
filterCalls(criteria: MockCallHistory.FilterCallsFunctionCriteria | MockCallHistory.FilterCallsObjectCriteria | RegExp, options?: MockCallHistory.FilterCallsOptions): Array<MockCallHistoryLog>;
|
|
1426
|
+
/** return all MockCallHistoryLog matching the given protocol. if a string is given, it is matched with includes */
|
|
1427
|
+
filterCallsByProtocol(protocol: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>;
|
|
1428
|
+
/** return all MockCallHistoryLog matching the given host. if a string is given, it is matched with includes */
|
|
1429
|
+
filterCallsByHost(host: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>;
|
|
1430
|
+
/** return all MockCallHistoryLog matching the given port. if a string is given, it is matched with includes */
|
|
1431
|
+
filterCallsByPort(port: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>;
|
|
1432
|
+
/** return all MockCallHistoryLog matching the given origin. if a string is given, it is matched with includes */
|
|
1433
|
+
filterCallsByOrigin(origin: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>;
|
|
1434
|
+
/** return all MockCallHistoryLog matching the given path. if a string is given, it is matched with includes */
|
|
1435
|
+
filterCallsByPath(path: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>;
|
|
1436
|
+
/** return all MockCallHistoryLog matching the given hash. if a string is given, it is matched with includes */
|
|
1437
|
+
filterCallsByHash(hash: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>;
|
|
1438
|
+
/** return all MockCallHistoryLog matching the given fullUrl. if a string is given, it is matched with includes */
|
|
1439
|
+
filterCallsByFullUrl(fullUrl: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>;
|
|
1440
|
+
/** return all MockCallHistoryLog matching the given method. if a string is given, it is matched with includes */
|
|
1441
|
+
filterCallsByMethod(method: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>;
|
|
1442
|
+
/** clear all MockCallHistoryLog on this MockCallHistory. */
|
|
1443
|
+
clear(): void;
|
|
1444
|
+
/** use it with for..of loop or spread operator */
|
|
1445
|
+
[Symbol.iterator]: () => Generator<MockCallHistoryLog>;
|
|
1446
|
+
}
|
|
1447
|
+
//#endregion
|
|
1448
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/mock-agent.d.ts
|
|
1449
|
+
import MockDispatch = MockInterceptor.MockDispatch;
|
|
1450
|
+
/** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */
|
|
1451
|
+
declare class MockAgent<TMockAgentOptions extends MockAgent.Options = MockAgent.Options> extends Dispatcher {
|
|
1452
|
+
constructor(options?: TMockAgentOptions);
|
|
1453
|
+
/** Creates and retrieves mock Dispatcher instances which can then be used to intercept HTTP requests. If the number of connections on the mock agent is set to 1, a MockClient instance is returned. Otherwise a MockPool instance is returned. */
|
|
1454
|
+
get<TInterceptable extends Interceptable>(origin: string): TInterceptable;
|
|
1455
|
+
get<TInterceptable extends Interceptable>(origin: RegExp): TInterceptable;
|
|
1456
|
+
get<TInterceptable extends Interceptable>(origin: ((origin: string) => boolean)): TInterceptable;
|
|
1457
|
+
/** Dispatches a mocked request. */
|
|
1458
|
+
dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean;
|
|
1459
|
+
/** Closes the mock agent and waits for registered mock pools and clients to also close before resolving. */
|
|
1460
|
+
close(): Promise<void>;
|
|
1461
|
+
/** Disables mocking in MockAgent. */
|
|
1462
|
+
deactivate(): void;
|
|
1463
|
+
/** Enables mocking in a MockAgent instance. When instantiated, a MockAgent is automatically activated. Therefore, this method is only effective after `MockAgent.deactivate` has been called. */
|
|
1464
|
+
activate(): void;
|
|
1465
|
+
/** Define host matchers so only matching requests that aren't intercepted by the mock dispatchers will be attempted. */
|
|
1466
|
+
enableNetConnect(): void;
|
|
1467
|
+
enableNetConnect(host: string): void;
|
|
1468
|
+
enableNetConnect(host: RegExp): void;
|
|
1469
|
+
enableNetConnect(host: ((host: string) => boolean)): void;
|
|
1470
|
+
/** Causes all requests to throw when requests are not matched in a MockAgent intercept. */
|
|
1471
|
+
disableNetConnect(): void;
|
|
1472
|
+
/** get call history. returns the MockAgent call history or undefined if the option is not enabled. */
|
|
1473
|
+
getCallHistory(): MockCallHistory | undefined;
|
|
1474
|
+
/** clear every call history. Any MockCallHistoryLog will be deleted on the MockCallHistory instance */
|
|
1475
|
+
clearCallHistory(): void;
|
|
1476
|
+
/** Enable call history. Any subsequence calls will then be registered. */
|
|
1477
|
+
enableCallHistory(): this;
|
|
1478
|
+
/** Disable call history. Any subsequence calls will then not be registered. */
|
|
1479
|
+
disableCallHistory(): this;
|
|
1480
|
+
pendingInterceptors(): MockAgent.PendingInterceptor[];
|
|
1481
|
+
assertNoPendingInterceptors(options?: {
|
|
1482
|
+
pendingInterceptorsFormatter?: MockAgent.PendingInterceptorsFormatter;
|
|
1483
|
+
}): void;
|
|
1484
|
+
}
|
|
1485
|
+
declare namespace MockAgent {
|
|
1486
|
+
/** An interceptor that was registered on a mock dispatcher and has not been consumed yet. */
|
|
1487
|
+
export interface PendingInterceptor extends MockDispatch {
|
|
1488
|
+
origin: string;
|
|
1489
|
+
}
|
|
1490
|
+
export interface PendingInterceptorsFormatter {
|
|
1491
|
+
format(pendingInterceptors: readonly PendingInterceptor[]): string;
|
|
1492
|
+
}
|
|
1493
|
+
/** MockAgent options. */
|
|
1494
|
+
export interface Options extends Agent.Options {
|
|
1495
|
+
/** A custom agent to be encapsulated by the MockAgent. */
|
|
1496
|
+
agent?: Dispatcher;
|
|
1497
|
+
/** Ignore trailing slashes in the path */
|
|
1498
|
+
ignoreTrailingSlash?: boolean;
|
|
1499
|
+
/** Accept URLs with search parameters using non standard syntaxes. default false */
|
|
1500
|
+
acceptNonStandardSearchParameters?: boolean;
|
|
1501
|
+
/** Enable call history. you can either call MockAgent.enableCallHistory(). default false */
|
|
1502
|
+
enableCallHistory?: boolean;
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
//#endregion
|
|
1506
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/mock-client.d.ts
|
|
1507
|
+
/** MockClient extends the Client API and allows one to mock requests. */
|
|
1508
|
+
declare class MockClient extends Client implements Interceptable {
|
|
1509
|
+
constructor(origin: string, options: MockClient.Options);
|
|
1510
|
+
/** Intercepts any matching requests that use the same origin as this mock client. */
|
|
1511
|
+
intercept(options: MockInterceptor.Options): MockInterceptor;
|
|
1512
|
+
/** Dispatches a mocked request. */
|
|
1513
|
+
dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean;
|
|
1514
|
+
/** Closes the mock client and gracefully waits for enqueued requests to complete. */
|
|
1515
|
+
close(): Promise<void>;
|
|
1516
|
+
/** Clean up all the prepared mocks. */
|
|
1517
|
+
cleanMocks(): void;
|
|
1518
|
+
}
|
|
1519
|
+
declare namespace MockClient {
|
|
1520
|
+
/** MockClient options. */
|
|
1521
|
+
export interface Options extends Client.Options {
|
|
1522
|
+
/** The agent to associate this MockClient with. */
|
|
1523
|
+
agent: MockAgent;
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
//#endregion
|
|
1527
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/mock-pool.d.ts
|
|
1528
|
+
/** MockPool extends the Pool API and allows one to mock requests. */
|
|
1529
|
+
declare class MockPool extends Pool implements Interceptable {
|
|
1530
|
+
constructor(origin: string, options: MockPool.Options);
|
|
1531
|
+
/** Intercepts any matching requests that use the same origin as this mock pool. */
|
|
1532
|
+
intercept(options: MockInterceptor.Options): MockInterceptor;
|
|
1533
|
+
/** Dispatches a mocked request. */
|
|
1534
|
+
dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean;
|
|
1535
|
+
/** Closes the mock pool and gracefully waits for enqueued requests to complete. */
|
|
1536
|
+
close(): Promise<void>;
|
|
1537
|
+
/** Clean up all the prepared mocks. */
|
|
1538
|
+
cleanMocks(): void;
|
|
1539
|
+
}
|
|
1540
|
+
declare namespace MockPool {
|
|
1541
|
+
/** MockPool options. */
|
|
1542
|
+
export interface Options extends Pool.Options {
|
|
1543
|
+
/** The agent to associate this MockPool with. */
|
|
1544
|
+
agent: MockAgent;
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
//#endregion
|
|
1548
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/snapshot-agent.d.ts
|
|
1549
|
+
declare class SnapshotRecorder {
|
|
1550
|
+
constructor(options?: SnapshotRecorder.Options);
|
|
1551
|
+
record(requestOpts: any, response: any): Promise<void>;
|
|
1552
|
+
findSnapshot(requestOpts: any): SnapshotRecorder.Snapshot | undefined;
|
|
1553
|
+
loadSnapshots(filePath?: string): Promise<void>;
|
|
1554
|
+
saveSnapshots(filePath?: string): Promise<void>;
|
|
1555
|
+
clear(): void;
|
|
1556
|
+
getSnapshots(): SnapshotRecorder.Snapshot[];
|
|
1557
|
+
size(): number;
|
|
1558
|
+
resetCallCounts(): void;
|
|
1559
|
+
deleteSnapshot(requestOpts: any): boolean;
|
|
1560
|
+
getSnapshotInfo(requestOpts: any): SnapshotRecorder.SnapshotInfo | null;
|
|
1561
|
+
replaceSnapshots(snapshotData: SnapshotRecorder.SnapshotData[]): void;
|
|
1562
|
+
destroy(): void;
|
|
1563
|
+
}
|
|
1564
|
+
declare namespace SnapshotRecorder {
|
|
1565
|
+
type SnapshotRecorderMode = 'record' | 'playback' | 'update';
|
|
1566
|
+
export interface Options {
|
|
1567
|
+
snapshotPath?: string;
|
|
1568
|
+
mode?: SnapshotRecorderMode;
|
|
1569
|
+
maxSnapshots?: number;
|
|
1570
|
+
autoFlush?: boolean;
|
|
1571
|
+
flushInterval?: number;
|
|
1572
|
+
matchHeaders?: string[];
|
|
1573
|
+
ignoreHeaders?: string[];
|
|
1574
|
+
excludeHeaders?: string[];
|
|
1575
|
+
matchBody?: boolean;
|
|
1576
|
+
normalizeBody?: (body: string | Buffer | null | undefined) => string;
|
|
1577
|
+
matchQuery?: boolean;
|
|
1578
|
+
normalizeQuery?: (query: URLSearchParams) => string;
|
|
1579
|
+
caseSensitive?: boolean;
|
|
1580
|
+
shouldRecord?: (requestOpts: any) => boolean;
|
|
1581
|
+
shouldPlayback?: (requestOpts: any) => boolean;
|
|
1582
|
+
excludeUrls?: (string | RegExp)[];
|
|
1583
|
+
}
|
|
1584
|
+
export interface Snapshot {
|
|
1585
|
+
request: {
|
|
1586
|
+
method: string;
|
|
1587
|
+
url: string;
|
|
1588
|
+
headers: Record<string, string>;
|
|
1589
|
+
body?: string;
|
|
1590
|
+
};
|
|
1591
|
+
responses: {
|
|
1592
|
+
statusCode: number;
|
|
1593
|
+
headers: Record<string, string>;
|
|
1594
|
+
body: string;
|
|
1595
|
+
trailers: Record<string, string>;
|
|
1596
|
+
}[];
|
|
1597
|
+
callCount: number;
|
|
1598
|
+
timestamp: string;
|
|
1599
|
+
}
|
|
1600
|
+
export interface SnapshotInfo {
|
|
1601
|
+
hash: string;
|
|
1602
|
+
request: {
|
|
1603
|
+
method: string;
|
|
1604
|
+
url: string;
|
|
1605
|
+
headers: Record<string, string>;
|
|
1606
|
+
body?: string;
|
|
1607
|
+
};
|
|
1608
|
+
responseCount: number;
|
|
1609
|
+
callCount: number;
|
|
1610
|
+
timestamp: string;
|
|
1611
|
+
}
|
|
1612
|
+
export interface SnapshotData {
|
|
1613
|
+
hash: string;
|
|
1614
|
+
snapshot: Snapshot;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
declare class SnapshotAgent extends MockAgent {
|
|
1618
|
+
constructor(options?: SnapshotAgent.Options);
|
|
1619
|
+
saveSnapshots(filePath?: string): Promise<void>;
|
|
1620
|
+
loadSnapshots(filePath?: string): Promise<void>;
|
|
1621
|
+
getRecorder(): SnapshotRecorder;
|
|
1622
|
+
getMode(): SnapshotRecorder.SnapshotRecorderMode;
|
|
1623
|
+
clearSnapshots(): void;
|
|
1624
|
+
resetCallCounts(): void;
|
|
1625
|
+
deleteSnapshot(requestOpts: any): boolean;
|
|
1626
|
+
getSnapshotInfo(requestOpts: any): SnapshotRecorder.SnapshotInfo | null;
|
|
1627
|
+
replaceSnapshots(snapshotData: SnapshotRecorder.SnapshotData[]): void;
|
|
1628
|
+
}
|
|
1629
|
+
declare namespace SnapshotAgent {
|
|
1630
|
+
export interface Options extends MockAgent.Options {
|
|
1631
|
+
mode?: SnapshotRecorder.SnapshotRecorderMode;
|
|
1632
|
+
snapshotPath?: string;
|
|
1633
|
+
maxSnapshots?: number;
|
|
1634
|
+
autoFlush?: boolean;
|
|
1635
|
+
flushInterval?: number;
|
|
1636
|
+
matchHeaders?: string[];
|
|
1637
|
+
ignoreHeaders?: string[];
|
|
1638
|
+
excludeHeaders?: string[];
|
|
1639
|
+
matchBody?: boolean;
|
|
1640
|
+
normalizeBody?: (body: string | Buffer | null | undefined) => string;
|
|
1641
|
+
matchQuery?: boolean;
|
|
1642
|
+
normalizeQuery?: (query: URLSearchParams) => string;
|
|
1643
|
+
caseSensitive?: boolean;
|
|
1644
|
+
shouldRecord?: (requestOpts: any) => boolean;
|
|
1645
|
+
shouldPlayback?: (requestOpts: any) => boolean;
|
|
1646
|
+
excludeUrls?: (string | RegExp)[];
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
//#endregion
|
|
1650
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/mock-errors.d.ts
|
|
1651
|
+
declare namespace MockErrors {
|
|
1652
|
+
/** The request does not match any registered mock dispatches. */
|
|
1653
|
+
export class MockNotMatchedError extends Errors.UndiciError {
|
|
1654
|
+
constructor(message?: string);
|
|
1655
|
+
name: 'MockNotMatchedError';
|
|
1656
|
+
code: 'UND_MOCK_ERR_MOCK_NOT_MATCHED';
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
//#endregion
|
|
1660
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/proxy-agent.d.ts
|
|
1661
|
+
declare class ProxyAgent extends Dispatcher {
|
|
1662
|
+
constructor(options: ProxyAgent.Options | string);
|
|
1663
|
+
dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean;
|
|
1664
|
+
close(): Promise<void>;
|
|
1665
|
+
}
|
|
1666
|
+
declare namespace ProxyAgent {
|
|
1667
|
+
export interface Options extends Agent.Options {
|
|
1668
|
+
uri: string;
|
|
1669
|
+
/**
|
|
1670
|
+
* @deprecated use opts.token
|
|
1671
|
+
*/
|
|
1672
|
+
auth?: string;
|
|
1673
|
+
token?: string;
|
|
1674
|
+
headers?: OutgoingHttpHeaders;
|
|
1675
|
+
requestTls?: buildConnector.BuildOptions;
|
|
1676
|
+
proxyTls?: buildConnector.BuildOptions;
|
|
1677
|
+
clientFactory?(origin: URL, opts: object): Dispatcher;
|
|
1678
|
+
/**
|
|
1679
|
+
* Undici tunnels via CONNECT when the target endpoint uses HTTPS, and
|
|
1680
|
+
* forwards (HTTP/1.1 absolute-form request-target, per RFC 9112 §3.2.2)
|
|
1681
|
+
* otherwise, regardless of whether the proxy URL is HTTP or HTTPS. The
|
|
1682
|
+
* non-tunneled forwarding path does not negotiate HTTP/2 with the proxy.
|
|
1683
|
+
* Set to true to force tunneling for plain HTTP requests as well.
|
|
1684
|
+
*/
|
|
1685
|
+
proxyTunnel?: boolean;
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
//#endregion
|
|
1689
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/socks5-proxy-agent.d.ts
|
|
1690
|
+
declare class Socks5ProxyAgent extends Dispatcher {
|
|
1691
|
+
constructor(proxyUrl: string | URL, options?: Socks5ProxyAgent.Options);
|
|
1692
|
+
}
|
|
1693
|
+
declare namespace Socks5ProxyAgent {
|
|
1694
|
+
export interface Options extends Pool.Options {
|
|
1695
|
+
/** Additional headers to send with the proxy connection */
|
|
1696
|
+
headers?: OutgoingHttpHeaders;
|
|
1697
|
+
/** SOCKS5 proxy username for authentication */
|
|
1698
|
+
username?: string;
|
|
1699
|
+
/** SOCKS5 proxy password for authentication */
|
|
1700
|
+
password?: string;
|
|
1701
|
+
/** Custom connector function for proxy connection */
|
|
1702
|
+
connect?: buildConnector.connector;
|
|
1703
|
+
/** TLS options for the proxy connection (for SOCKS5 over TLS) */
|
|
1704
|
+
proxyTls?: buildConnector.BuildOptions;
|
|
1705
|
+
/** TLS options for the end-to-end connection to the target */
|
|
1706
|
+
requestTls?: buildConnector.BuildOptions;
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
//#endregion
|
|
1710
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/cache.d.ts
|
|
1711
|
+
interface CacheStorage {
|
|
1712
|
+
match(request: RequestInfo$1, options?: MultiCacheQueryOptions): Promise<Response$1 | undefined>;
|
|
1713
|
+
has(cacheName: string): Promise<boolean>;
|
|
1714
|
+
open(cacheName: string): Promise<Cache>;
|
|
1715
|
+
delete(cacheName: string): Promise<boolean>;
|
|
1716
|
+
keys(): Promise<string[]>;
|
|
1717
|
+
}
|
|
1718
|
+
declare const CacheStorage: {
|
|
1719
|
+
prototype: CacheStorage;
|
|
1720
|
+
new (): CacheStorage;
|
|
1721
|
+
};
|
|
1722
|
+
interface Cache {
|
|
1723
|
+
match(request: RequestInfo$1, options?: CacheQueryOptions): Promise<Response$1 | undefined>;
|
|
1724
|
+
matchAll(request?: RequestInfo$1, options?: CacheQueryOptions): Promise<readonly Response$1[]>;
|
|
1725
|
+
add(request: RequestInfo$1): Promise<undefined>;
|
|
1726
|
+
addAll(requests: RequestInfo$1[]): Promise<undefined>;
|
|
1727
|
+
put(request: RequestInfo$1, response: Response$1): Promise<undefined>;
|
|
1728
|
+
delete(request: RequestInfo$1, options?: CacheQueryOptions): Promise<boolean>;
|
|
1729
|
+
keys(request?: RequestInfo$1, options?: CacheQueryOptions): Promise<readonly Request$1[]>;
|
|
1730
|
+
}
|
|
1731
|
+
interface CacheQueryOptions {
|
|
1732
|
+
ignoreSearch?: boolean;
|
|
1733
|
+
ignoreMethod?: boolean;
|
|
1734
|
+
ignoreVary?: boolean;
|
|
1735
|
+
}
|
|
1736
|
+
interface MultiCacheQueryOptions extends CacheQueryOptions {
|
|
1737
|
+
cacheName?: string;
|
|
1738
|
+
}
|
|
1739
|
+
declare const caches: CacheStorage;
|
|
1740
|
+
//#endregion
|
|
1741
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/cache-interceptor.d.ts
|
|
1742
|
+
declare namespace CacheHandler {
|
|
1743
|
+
export type CacheMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE';
|
|
1744
|
+
export interface CacheHandlerOptions {
|
|
1745
|
+
store: CacheStore;
|
|
1746
|
+
cacheByDefault?: number;
|
|
1747
|
+
type?: CacheOptions['type'];
|
|
1748
|
+
}
|
|
1749
|
+
export interface CacheOptions {
|
|
1750
|
+
store?: CacheStore;
|
|
1751
|
+
/**
|
|
1752
|
+
* The methods to cache
|
|
1753
|
+
* Note we can only cache safe methods. Unsafe methods (i.e. PUT, POST)
|
|
1754
|
+
* invalidate the cache for a origin.
|
|
1755
|
+
* @see https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-respons
|
|
1756
|
+
* @see https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1
|
|
1757
|
+
*/
|
|
1758
|
+
methods?: CacheMethods[];
|
|
1759
|
+
/**
|
|
1760
|
+
* RFC9111 allows for caching responses that we aren't explicitly told to
|
|
1761
|
+
* cache or to not cache.
|
|
1762
|
+
* @see https://www.rfc-editor.org/rfc/rfc9111.html#section-3-5
|
|
1763
|
+
* @default undefined
|
|
1764
|
+
*/
|
|
1765
|
+
cacheByDefault?: number;
|
|
1766
|
+
/**
|
|
1767
|
+
* TODO docs
|
|
1768
|
+
* @default 'shared'
|
|
1769
|
+
*/
|
|
1770
|
+
type?: 'shared' | 'private';
|
|
1771
|
+
/**
|
|
1772
|
+
* Array of origins to cache. Only requests to these origins will be cached.
|
|
1773
|
+
* Supports strings (case insensitive) and RegExp patterns.
|
|
1774
|
+
* @default undefined (cache all origins)
|
|
1775
|
+
*/
|
|
1776
|
+
origins?: (string | RegExp)[];
|
|
1777
|
+
}
|
|
1778
|
+
export interface CacheControlDirectives {
|
|
1779
|
+
'max-stale'?: number;
|
|
1780
|
+
'min-fresh'?: number;
|
|
1781
|
+
'max-age'?: number;
|
|
1782
|
+
's-maxage'?: number;
|
|
1783
|
+
'stale-while-revalidate'?: number;
|
|
1784
|
+
'stale-if-error'?: number;
|
|
1785
|
+
public?: true;
|
|
1786
|
+
private?: true | string[];
|
|
1787
|
+
'no-store'?: true;
|
|
1788
|
+
'no-cache'?: true | string[];
|
|
1789
|
+
'must-revalidate'?: true;
|
|
1790
|
+
'proxy-revalidate'?: true;
|
|
1791
|
+
immutable?: true;
|
|
1792
|
+
'no-transform'?: true;
|
|
1793
|
+
'must-understand'?: true;
|
|
1794
|
+
'only-if-cached'?: true;
|
|
1795
|
+
}
|
|
1796
|
+
export interface CacheKey {
|
|
1797
|
+
origin: string;
|
|
1798
|
+
method: string;
|
|
1799
|
+
path: string;
|
|
1800
|
+
headers?: Record<string, string | string[]>;
|
|
1801
|
+
}
|
|
1802
|
+
export interface CacheValue {
|
|
1803
|
+
statusCode: number;
|
|
1804
|
+
statusMessage: string;
|
|
1805
|
+
headers: Record<string, string | string[]>;
|
|
1806
|
+
vary?: Record<string, string | string[] | null>;
|
|
1807
|
+
etag?: string;
|
|
1808
|
+
cacheControlDirectives?: CacheControlDirectives;
|
|
1809
|
+
cachedAt: number;
|
|
1810
|
+
staleAt: number;
|
|
1811
|
+
deleteAt: number;
|
|
1812
|
+
}
|
|
1813
|
+
export interface DeleteByUri {
|
|
1814
|
+
origin: string;
|
|
1815
|
+
method: string;
|
|
1816
|
+
path: string;
|
|
1817
|
+
}
|
|
1818
|
+
type GetResult = {
|
|
1819
|
+
statusCode: number;
|
|
1820
|
+
statusMessage: string;
|
|
1821
|
+
headers: Record<string, string | string[]>;
|
|
1822
|
+
vary?: Record<string, string | string[] | null>;
|
|
1823
|
+
etag?: string;
|
|
1824
|
+
body?: Readable | Iterable<Buffer> | AsyncIterable<Buffer> | Buffer | Iterable<string> | AsyncIterable<string> | string;
|
|
1825
|
+
cacheControlDirectives: CacheControlDirectives;
|
|
1826
|
+
cachedAt: number;
|
|
1827
|
+
staleAt: number;
|
|
1828
|
+
deleteAt: number;
|
|
1829
|
+
};
|
|
1830
|
+
/**
|
|
1831
|
+
* Underlying storage provider for cached responses
|
|
1832
|
+
*/
|
|
1833
|
+
export interface CacheStore {
|
|
1834
|
+
get(key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined;
|
|
1835
|
+
createWriteStream(key: CacheKey, val: CacheValue): Writable | undefined;
|
|
1836
|
+
delete(key: CacheKey): void | Promise<void>;
|
|
1837
|
+
}
|
|
1838
|
+
export interface MemoryCacheStoreOpts {
|
|
1839
|
+
/**
|
|
1840
|
+
* @default Infinity
|
|
1841
|
+
*/
|
|
1842
|
+
maxCount?: number;
|
|
1843
|
+
/**
|
|
1844
|
+
* @default Infinity
|
|
1845
|
+
*/
|
|
1846
|
+
maxSize?: number;
|
|
1847
|
+
/**
|
|
1848
|
+
* @default Infinity
|
|
1849
|
+
*/
|
|
1850
|
+
maxEntrySize?: number;
|
|
1851
|
+
errorCallback?: (err: Error) => void;
|
|
1852
|
+
}
|
|
1853
|
+
export class MemoryCacheStore implements CacheStore {
|
|
1854
|
+
constructor(opts?: MemoryCacheStoreOpts);
|
|
1855
|
+
get(key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined;
|
|
1856
|
+
createWriteStream(key: CacheKey, value: CacheValue): Writable | undefined;
|
|
1857
|
+
delete(key: CacheKey): void | Promise<void>;
|
|
1858
|
+
}
|
|
1859
|
+
export interface SqliteCacheStoreOpts {
|
|
1860
|
+
/**
|
|
1861
|
+
* Location of the database
|
|
1862
|
+
* @default ':memory:'
|
|
1863
|
+
*/
|
|
1864
|
+
location?: string;
|
|
1865
|
+
/**
|
|
1866
|
+
* @default Infinity
|
|
1867
|
+
*/
|
|
1868
|
+
maxCount?: number;
|
|
1869
|
+
/**
|
|
1870
|
+
* @default Infinity
|
|
1871
|
+
*/
|
|
1872
|
+
maxEntrySize?: number;
|
|
1873
|
+
}
|
|
1874
|
+
export class SqliteCacheStore implements CacheStore {
|
|
1875
|
+
constructor(opts?: SqliteCacheStoreOpts);
|
|
1876
|
+
/**
|
|
1877
|
+
* Closes the connection to the database
|
|
1878
|
+
*/
|
|
1879
|
+
close(): void;
|
|
1880
|
+
get(key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined;
|
|
1881
|
+
createWriteStream(key: CacheKey, value: CacheValue): Writable | undefined;
|
|
1882
|
+
delete(key: CacheKey): void | Promise<void>;
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
//#endregion
|
|
1886
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/interceptors.d.ts
|
|
1887
|
+
declare namespace Interceptors {
|
|
1888
|
+
export type DumpInterceptorOpts = {
|
|
1889
|
+
maxSize?: number;
|
|
1890
|
+
};
|
|
1891
|
+
export type RetryInterceptorOpts = RetryHandler.RetryOptions;
|
|
1892
|
+
export type RedirectInterceptorOpts = {
|
|
1893
|
+
maxRedirections?: number;
|
|
1894
|
+
throwOnMaxRedirect?: boolean;
|
|
1895
|
+
stripHeadersOnRedirect?: string[];
|
|
1896
|
+
stripHeadersOnCrossOriginRedirect?: string[];
|
|
1897
|
+
};
|
|
1898
|
+
export type DecompressInterceptorOpts = {
|
|
1899
|
+
skipErrorResponses?: boolean;
|
|
1900
|
+
skipStatusCodes?: number[];
|
|
1901
|
+
/** Maximum decompressed response size in bytes per stage. 0 disables the limit. @default 0 */
|
|
1902
|
+
maxSize?: number;
|
|
1903
|
+
};
|
|
1904
|
+
export type ResponseErrorInterceptorOpts = {
|
|
1905
|
+
throwOnError: boolean;
|
|
1906
|
+
};
|
|
1907
|
+
export type CacheInterceptorOpts = CacheHandler.CacheOptions;
|
|
1908
|
+
// DNS interceptor
|
|
1909
|
+
export type DNSInterceptorRecord = {
|
|
1910
|
+
address: string;
|
|
1911
|
+
ttl: number;
|
|
1912
|
+
family: 4 | 6;
|
|
1913
|
+
};
|
|
1914
|
+
export type DNSInterceptorOriginRecords = {
|
|
1915
|
+
records: {
|
|
1916
|
+
4: {
|
|
1917
|
+
ips: DNSInterceptorRecord[];
|
|
1918
|
+
} | null;
|
|
1919
|
+
6: {
|
|
1920
|
+
ips: DNSInterceptorRecord[];
|
|
1921
|
+
} | null;
|
|
1922
|
+
};
|
|
1923
|
+
};
|
|
1924
|
+
export type DNSStorage = {
|
|
1925
|
+
size: number;
|
|
1926
|
+
get(origin: string): DNSInterceptorOriginRecords | null;
|
|
1927
|
+
set(origin: string, records: DNSInterceptorOriginRecords | null, options: {
|
|
1928
|
+
ttl: number;
|
|
1929
|
+
}): void;
|
|
1930
|
+
delete(origin: string): void;
|
|
1931
|
+
full(): boolean;
|
|
1932
|
+
};
|
|
1933
|
+
export type DNSInterceptorOpts = {
|
|
1934
|
+
maxTTL?: number;
|
|
1935
|
+
maxItems?: number;
|
|
1936
|
+
lookup?: (origin: URL, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, addresses: DNSInterceptorRecord[]) => void) => void;
|
|
1937
|
+
pick?: (origin: URL, records: DNSInterceptorOriginRecords, affinity: 4 | 6) => DNSInterceptorRecord;
|
|
1938
|
+
dualStack?: boolean;
|
|
1939
|
+
affinity?: 4 | 6;
|
|
1940
|
+
storage?: DNSStorage;
|
|
1941
|
+
};
|
|
1942
|
+
// Deduplicate interceptor
|
|
1943
|
+
export type DeduplicateMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE';
|
|
1944
|
+
export type DeduplicateInterceptorOpts = {
|
|
1945
|
+
/**
|
|
1946
|
+
* The HTTP methods to deduplicate.
|
|
1947
|
+
* Note: Only safe HTTP methods can be deduplicated.
|
|
1948
|
+
* @default ['GET']
|
|
1949
|
+
*/
|
|
1950
|
+
methods?: DeduplicateMethods[];
|
|
1951
|
+
/**
|
|
1952
|
+
* Header names that, if present in a request, will cause the request to skip deduplication.
|
|
1953
|
+
* Header name matching is case-insensitive.
|
|
1954
|
+
* @default []
|
|
1955
|
+
*/
|
|
1956
|
+
skipHeaderNames?: string[];
|
|
1957
|
+
/**
|
|
1958
|
+
* Header names to exclude from the deduplication key.
|
|
1959
|
+
* Requests with different values for these headers will still be deduplicated together.
|
|
1960
|
+
* Useful for headers like `x-request-id` that vary per request but shouldn't affect deduplication.
|
|
1961
|
+
* Header name matching is case-insensitive.
|
|
1962
|
+
* @default []
|
|
1963
|
+
*/
|
|
1964
|
+
excludeHeaderNames?: string[];
|
|
1965
|
+
/**
|
|
1966
|
+
* Maximum bytes buffered per paused waiting deduplicated handler.
|
|
1967
|
+
* If a waiting handler remains paused and exceeds this threshold,
|
|
1968
|
+
* it is failed with an abort error to prevent unbounded memory growth.
|
|
1969
|
+
* @default 5 * 1024 * 1024
|
|
1970
|
+
*/
|
|
1971
|
+
maxBufferSize?: number;
|
|
1972
|
+
};
|
|
1973
|
+
export function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor;
|
|
1974
|
+
export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor;
|
|
1975
|
+
export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor;
|
|
1976
|
+
export function decompress(opts?: DecompressInterceptorOpts): Dispatcher.DispatcherComposeInterceptor;
|
|
1977
|
+
export function responseError(opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor;
|
|
1978
|
+
export function dns(opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor;
|
|
1979
|
+
export function cache(opts?: CacheInterceptorOpts): Dispatcher.DispatcherComposeInterceptor;
|
|
1980
|
+
export function deduplicate(opts?: DeduplicateInterceptorOpts): Dispatcher.DispatcherComposeInterceptor;
|
|
1981
|
+
}
|
|
1982
|
+
//#endregion
|
|
1983
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/global-origin.d.ts
|
|
1984
|
+
declare function setGlobalOrigin(origin: string | URL | undefined): void;
|
|
1985
|
+
declare function getGlobalOrigin(): URL | undefined;
|
|
1986
|
+
//#endregion
|
|
1987
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/env-http-proxy-agent.d.ts
|
|
1988
|
+
declare class EnvHttpProxyAgent extends Dispatcher {
|
|
1989
|
+
constructor(opts?: EnvHttpProxyAgent.Options);
|
|
1990
|
+
dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean;
|
|
1991
|
+
}
|
|
1992
|
+
declare namespace EnvHttpProxyAgent {
|
|
1993
|
+
export interface Options extends Omit<ProxyAgent.Options, 'uri'> {
|
|
1994
|
+
/** Overrides the value of the HTTP_PROXY environment variable */
|
|
1995
|
+
httpProxy?: string;
|
|
1996
|
+
/** Overrides the value of the HTTPS_PROXY environment variable */
|
|
1997
|
+
httpsProxy?: string;
|
|
1998
|
+
/** Overrides the value of the NO_PROXY environment variable */
|
|
1999
|
+
noProxy?: string;
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
//#endregion
|
|
2003
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/retry-agent.d.ts
|
|
2004
|
+
declare class RetryAgent extends Dispatcher {
|
|
2005
|
+
constructor(dispatcher: Dispatcher, options?: RetryHandler.RetryOptions);
|
|
2006
|
+
}
|
|
2007
|
+
//#endregion
|
|
2008
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/util.d.ts
|
|
2009
|
+
declare namespace util {
|
|
2010
|
+
/**
|
|
2011
|
+
* Retrieves a header name and returns its lowercase value.
|
|
2012
|
+
* @param value Header name
|
|
2013
|
+
*/
|
|
2014
|
+
export function headerNameToString(value: string | Buffer): string;
|
|
2015
|
+
/**
|
|
2016
|
+
* Receives a header object and returns the parsed value.
|
|
2017
|
+
* @param headers Header object
|
|
2018
|
+
* @param obj Object to specify a proxy object. Used to assign parsed values.
|
|
2019
|
+
* @returns If `obj` is specified, it is equivalent to `obj`.
|
|
2020
|
+
*/
|
|
2021
|
+
export function parseHeaders(headers: (Buffer | string | (Buffer | string)[])[], obj?: Record<string, string | string[]>): Record<string, string | string[]>;
|
|
2022
|
+
}
|
|
2023
|
+
//#endregion
|
|
2024
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/cookies.d.ts
|
|
2025
|
+
interface Cookie {
|
|
2026
|
+
name: string;
|
|
2027
|
+
value: string;
|
|
2028
|
+
expires?: Date | number;
|
|
2029
|
+
maxAge?: number;
|
|
2030
|
+
domain?: string;
|
|
2031
|
+
path?: string;
|
|
2032
|
+
secure?: boolean;
|
|
2033
|
+
httpOnly?: boolean;
|
|
2034
|
+
sameSite?: 'Strict' | 'Lax' | 'None';
|
|
2035
|
+
unparsed?: string[];
|
|
2036
|
+
}
|
|
2037
|
+
declare function deleteCookie(headers: Headers$1, name: string, attributes?: {
|
|
2038
|
+
path?: string;
|
|
2039
|
+
domain?: string;
|
|
2040
|
+
}): void;
|
|
2041
|
+
declare function getCookies(headers: Headers$1): Record<string, string>;
|
|
2042
|
+
declare function getSetCookies(headers: Headers$1): Cookie[];
|
|
2043
|
+
declare function setCookie(headers: Headers$1, cookie: Cookie): void;
|
|
2044
|
+
declare function parseCookie(cookie: string): Cookie | null;
|
|
2045
|
+
//#endregion
|
|
2046
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/patch.d.ts
|
|
2047
|
+
// See https://github.com/nodejs/undici/issues/1740
|
|
2048
|
+
interface EventInit {
|
|
2049
|
+
bubbles?: boolean;
|
|
2050
|
+
cancelable?: boolean;
|
|
2051
|
+
composed?: boolean;
|
|
2052
|
+
}
|
|
2053
|
+
interface EventListenerOptions {
|
|
2054
|
+
capture?: boolean;
|
|
2055
|
+
}
|
|
2056
|
+
interface AddEventListenerOptions extends EventListenerOptions {
|
|
2057
|
+
once?: boolean;
|
|
2058
|
+
passive?: boolean;
|
|
2059
|
+
signal?: AbortSignal;
|
|
2060
|
+
}
|
|
2061
|
+
type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
|
2062
|
+
interface EventListenerObject {
|
|
2063
|
+
handleEvent(object: Event): void;
|
|
2064
|
+
}
|
|
2065
|
+
interface EventListener {
|
|
2066
|
+
(evt: Event): void;
|
|
2067
|
+
}
|
|
2068
|
+
//#endregion
|
|
2069
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/websocket.d.ts
|
|
2070
|
+
type BinaryType = 'blob' | 'arraybuffer';
|
|
2071
|
+
interface WebSocketEventMap {
|
|
2072
|
+
close: CloseEvent;
|
|
2073
|
+
error: ErrorEvent;
|
|
2074
|
+
message: MessageEvent;
|
|
2075
|
+
open: Event;
|
|
2076
|
+
}
|
|
2077
|
+
interface WebSocket extends EventTarget {
|
|
2078
|
+
binaryType: BinaryType;
|
|
2079
|
+
readonly bufferedAmount: number;
|
|
2080
|
+
readonly extensions: string;
|
|
2081
|
+
onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null;
|
|
2082
|
+
onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null;
|
|
2083
|
+
onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null;
|
|
2084
|
+
onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null;
|
|
2085
|
+
readonly protocol: string;
|
|
2086
|
+
readonly readyState: number;
|
|
2087
|
+
readonly url: string;
|
|
2088
|
+
close(code?: number, reason?: string): void;
|
|
2089
|
+
send(data: string | ArrayBufferLike | Blob$1 | ArrayBufferView): void;
|
|
2090
|
+
readonly CLOSED: number;
|
|
2091
|
+
readonly CLOSING: number;
|
|
2092
|
+
readonly CONNECTING: number;
|
|
2093
|
+
readonly OPEN: number;
|
|
2094
|
+
addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2095
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2096
|
+
removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2097
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2098
|
+
}
|
|
2099
|
+
declare const WebSocket: {
|
|
2100
|
+
prototype: WebSocket;
|
|
2101
|
+
new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket;
|
|
2102
|
+
readonly CLOSED: number;
|
|
2103
|
+
readonly CLOSING: number;
|
|
2104
|
+
readonly CONNECTING: number;
|
|
2105
|
+
readonly OPEN: number;
|
|
2106
|
+
};
|
|
2107
|
+
interface CloseEventInit extends EventInit {
|
|
2108
|
+
code?: number;
|
|
2109
|
+
reason?: string;
|
|
2110
|
+
wasClean?: boolean;
|
|
2111
|
+
}
|
|
2112
|
+
interface CloseEvent extends Event {
|
|
2113
|
+
readonly code: number;
|
|
2114
|
+
readonly reason: string;
|
|
2115
|
+
readonly wasClean: boolean;
|
|
2116
|
+
}
|
|
2117
|
+
declare const CloseEvent: {
|
|
2118
|
+
prototype: CloseEvent;
|
|
2119
|
+
new (type: string, eventInitDict?: CloseEventInit): CloseEvent;
|
|
2120
|
+
};
|
|
2121
|
+
interface MessageEventInit<T = any> extends EventInit {
|
|
2122
|
+
data?: T;
|
|
2123
|
+
lastEventId?: string;
|
|
2124
|
+
origin?: string;
|
|
2125
|
+
ports?: MessagePort[];
|
|
2126
|
+
source?: MessagePort | null;
|
|
2127
|
+
}
|
|
2128
|
+
interface MessageEvent<T = any> extends Event {
|
|
2129
|
+
readonly data: T;
|
|
2130
|
+
readonly lastEventId: string;
|
|
2131
|
+
readonly origin: string;
|
|
2132
|
+
readonly ports: readonly MessagePort[];
|
|
2133
|
+
readonly source: MessagePort | null;
|
|
2134
|
+
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessagePort | null, ports?: MessagePort[]): void;
|
|
2135
|
+
}
|
|
2136
|
+
declare const MessageEvent: {
|
|
2137
|
+
prototype: MessageEvent;
|
|
2138
|
+
new <T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
|
|
2139
|
+
};
|
|
2140
|
+
interface ErrorEventInit extends EventInit {
|
|
2141
|
+
message?: string;
|
|
2142
|
+
filename?: string;
|
|
2143
|
+
lineno?: number;
|
|
2144
|
+
colno?: number;
|
|
2145
|
+
error?: any;
|
|
2146
|
+
}
|
|
2147
|
+
interface ErrorEvent extends Event {
|
|
2148
|
+
readonly message: string;
|
|
2149
|
+
readonly filename: string;
|
|
2150
|
+
readonly lineno: number;
|
|
2151
|
+
readonly colno: number;
|
|
2152
|
+
readonly error: Error;
|
|
2153
|
+
}
|
|
2154
|
+
declare const ErrorEvent: {
|
|
2155
|
+
prototype: ErrorEvent;
|
|
2156
|
+
new (type: string, eventInitDict?: ErrorEventInit): ErrorEvent;
|
|
2157
|
+
};
|
|
2158
|
+
interface WebSocketInit {
|
|
2159
|
+
protocols?: string | string[];
|
|
2160
|
+
dispatcher?: Dispatcher;
|
|
2161
|
+
headers?: HeadersInit$1;
|
|
2162
|
+
}
|
|
2163
|
+
interface WebSocketStreamOptions {
|
|
2164
|
+
protocols?: string | string[];
|
|
2165
|
+
signal?: AbortSignal;
|
|
2166
|
+
}
|
|
2167
|
+
interface WebSocketCloseInfo {
|
|
2168
|
+
closeCode: number;
|
|
2169
|
+
reason: string;
|
|
2170
|
+
}
|
|
2171
|
+
interface WebSocketStream {
|
|
2172
|
+
closed: Promise<WebSocketCloseInfo>;
|
|
2173
|
+
opened: Promise<{
|
|
2174
|
+
extensions: string;
|
|
2175
|
+
protocol: string;
|
|
2176
|
+
readable: ReadableStream$1;
|
|
2177
|
+
writable: WritableStream;
|
|
2178
|
+
}>;
|
|
2179
|
+
url: string;
|
|
2180
|
+
close(options?: Partial<WebSocketCloseInfo>): void;
|
|
2181
|
+
}
|
|
2182
|
+
declare const WebSocketStream: {
|
|
2183
|
+
prototype: WebSocketStream;
|
|
2184
|
+
new (url: string | URL, options?: WebSocketStreamOptions): WebSocketStream;
|
|
2185
|
+
};
|
|
2186
|
+
interface WebSocketError extends Event, WebSocketCloseInfo {}
|
|
2187
|
+
declare const WebSocketError: {
|
|
2188
|
+
prototype: WebSocketError;
|
|
2189
|
+
new (type: string, init?: WebSocketCloseInfo): WebSocketError;
|
|
2190
|
+
};
|
|
2191
|
+
declare const ping: (ws: WebSocket, body?: Buffer) => void;
|
|
2192
|
+
//#endregion
|
|
2193
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/eventsource.d.ts
|
|
2194
|
+
interface EventSourceEventMap {
|
|
2195
|
+
error: ErrorEvent;
|
|
2196
|
+
message: MessageEvent;
|
|
2197
|
+
open: Event;
|
|
2198
|
+
}
|
|
2199
|
+
interface EventSource extends EventTarget {
|
|
2200
|
+
close(): void;
|
|
2201
|
+
readonly CLOSED: 2;
|
|
2202
|
+
readonly CONNECTING: 0;
|
|
2203
|
+
readonly OPEN: 1;
|
|
2204
|
+
onerror: ((this: EventSource, ev: ErrorEvent) => any) | null;
|
|
2205
|
+
onmessage: ((this: EventSource, ev: MessageEvent) => any) | null;
|
|
2206
|
+
onopen: ((this: EventSource, ev: Event) => any) | null;
|
|
2207
|
+
readonly readyState: 0 | 1 | 2;
|
|
2208
|
+
readonly url: string;
|
|
2209
|
+
readonly withCredentials: boolean;
|
|
2210
|
+
addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2211
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2212
|
+
removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2213
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2214
|
+
}
|
|
2215
|
+
declare const EventSource: {
|
|
2216
|
+
prototype: EventSource;
|
|
2217
|
+
new (url: string | URL, init?: EventSourceInit): EventSource;
|
|
2218
|
+
readonly CLOSED: 2;
|
|
2219
|
+
readonly CONNECTING: 0;
|
|
2220
|
+
readonly OPEN: 1;
|
|
2221
|
+
};
|
|
2222
|
+
interface EventSourceInit {
|
|
2223
|
+
withCredentials?: boolean;
|
|
2224
|
+
// @deprecated use `node.dispatcher` instead
|
|
2225
|
+
dispatcher?: Dispatcher;
|
|
2226
|
+
node?: {
|
|
2227
|
+
dispatcher?: Dispatcher;
|
|
2228
|
+
reconnectionTime?: number;
|
|
2229
|
+
};
|
|
2230
|
+
}
|
|
2231
|
+
//#endregion
|
|
2232
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/content-type.d.ts
|
|
2233
|
+
interface MIMEType {
|
|
2234
|
+
type: string;
|
|
2235
|
+
subtype: string;
|
|
2236
|
+
parameters: Map<string, string>;
|
|
2237
|
+
essence: string;
|
|
2238
|
+
}
|
|
2239
|
+
/**
|
|
2240
|
+
* Parse a string to a {@link MIMEType} object. Returns `failure` if the string
|
|
2241
|
+
* couldn't be parsed.
|
|
2242
|
+
* @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type
|
|
2243
|
+
*/
|
|
2244
|
+
declare function parseMIMEType(input: string): 'failure' | MIMEType;
|
|
2245
|
+
/**
|
|
2246
|
+
* Convert a MIMEType object to a string.
|
|
2247
|
+
* @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type
|
|
2248
|
+
*/
|
|
2249
|
+
declare function serializeAMimeType(mimeType: MIMEType): string;
|
|
2250
|
+
//#endregion
|
|
2251
|
+
//#region ../../node_modules/.pnpm/undici@8.11.2/node_modules/undici/types/index.d.ts
|
|
2252
|
+
declare const cacheStores: {
|
|
2253
|
+
MemoryCacheStore: typeof CacheHandler.MemoryCacheStore;
|
|
2254
|
+
SqliteCacheStore: typeof CacheHandler.SqliteCacheStore;
|
|
2255
|
+
};
|
|
2256
|
+
declare function globalThisInstall(): void;
|
|
2257
|
+
declare namespace Undici {
|
|
2258
|
+
const Dispatcher: typeof Dispatcher;
|
|
2259
|
+
const Pool: typeof Pool;
|
|
2260
|
+
const RedirectHandler: typeof RedirectHandler;
|
|
2261
|
+
const DecoratorHandler: typeof DecoratorHandler;
|
|
2262
|
+
const RetryHandler: typeof RetryHandler;
|
|
2263
|
+
const BalancedPool: typeof BalancedPool;
|
|
2264
|
+
const RoundRobinPool: typeof RoundRobinPool;
|
|
2265
|
+
const Client: typeof Client;
|
|
2266
|
+
const H2CClient: typeof H2CClient;
|
|
2267
|
+
const buildConnector: typeof buildConnector;
|
|
2268
|
+
const errors: typeof Errors;
|
|
2269
|
+
const Agent: typeof Agent;
|
|
2270
|
+
const Dispatcher1Wrapper: typeof Dispatcher1Wrapper;
|
|
2271
|
+
const setGlobalDispatcher: typeof setGlobalDispatcher;
|
|
2272
|
+
const getGlobalDispatcher: typeof getGlobalDispatcher;
|
|
2273
|
+
const request: typeof request;
|
|
2274
|
+
const stream: typeof stream;
|
|
2275
|
+
const pipeline: typeof pipeline;
|
|
2276
|
+
const connect: typeof connect;
|
|
2277
|
+
const upgrade: typeof upgrade;
|
|
2278
|
+
const MockClient: typeof MockClient;
|
|
2279
|
+
const MockPool: typeof MockPool;
|
|
2280
|
+
const MockAgent: typeof MockAgent;
|
|
2281
|
+
const SnapshotAgent: typeof SnapshotAgent;
|
|
2282
|
+
const MockCallHistory: typeof MockCallHistory;
|
|
2283
|
+
const MockCallHistoryLog: typeof MockCallHistoryLog;
|
|
2284
|
+
const mockErrors: typeof MockErrors;
|
|
2285
|
+
const ProxyAgent: typeof ProxyAgent;
|
|
2286
|
+
const Socks5ProxyAgent: typeof Socks5ProxyAgent;
|
|
2287
|
+
const fetch: typeof fetch;
|
|
2288
|
+
const Headers: typeof Headers$1;
|
|
2289
|
+
const Response: typeof Response$1;
|
|
2290
|
+
const Request: typeof Request$1;
|
|
2291
|
+
const FormData: typeof FormData;
|
|
2292
|
+
const caches: typeof caches;
|
|
2293
|
+
const interceptors: typeof Interceptors;
|
|
2294
|
+
const cacheStores: {
|
|
2295
|
+
MemoryCacheStore: typeof CacheHandler.MemoryCacheStore;
|
|
2296
|
+
SqliteCacheStore: typeof CacheHandler.SqliteCacheStore;
|
|
2297
|
+
};
|
|
2298
|
+
const install: typeof globalThisInstall;
|
|
2299
|
+
}
|
|
2300
|
+
declare namespace index_d_exports {
|
|
2301
|
+
export { Agent, BalancedPool, BinaryType, BodyInit, BodyMixin$1 as BodyMixin, Cache, CacheQueryOptions, CacheStorage, Client, CloseEvent, Cookie, DecoratorHandler, Dispatcher, Dispatcher1Wrapper, EnvHttpProxyAgent, ErrorEvent, EventSource, FormData, H2CClient, Headers$1 as Headers, HeadersInit$1 as HeadersInit, Interceptable, MessageEvent, MockAgent, MockCallHistory, MockCallHistoryLog, MockClient, MockPool, MultiCacheQueryOptions, Pool, ProxyAgent, RedirectHandler, ReferrerPolicy, Request$1 as Request, RequestCache, RequestCredentials, RequestDuplex, RequestInfo$1 as RequestInfo, RequestInit$1 as RequestInit, RequestMode, RequestRedirect, Response$1 as Response, ResponseInit, ResponseRedirectStatus, ResponseType$1 as ResponseType, RetryAgent, RetryHandler, RoundRobinPool, SnapshotAgent, Socks5ProxyAgent, SpecIterable, SpecIterableIterator, SpecIterator, SpecIteratorObject, WebSocket, WebSocketError, WebSocketStream, buildConnector, cacheStores, caches, connect, Undici as default, deleteCookie, Errors as errors, fetch, getCookies, getGlobalDispatcher, getGlobalOrigin, getSetCookies, globalThisInstall as install, Interceptors as interceptors, MockErrors as mockErrors, parseCookie, parseMIMEType, ping, pipeline, request, serializeAMimeType, setCookie, setGlobalDispatcher, setGlobalOrigin, stream, upgrade, util };
|
|
2302
|
+
}
|
|
2303
|
+
//#endregion
|
|
2304
|
+
//#region ../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.BbrTaNPp.d.mts
|
|
2305
|
+
interface $Fetch {
|
|
2306
|
+
<T = any, R extends ResponseType = "json">(request: FetchRequest, options?: FetchOptions<R>): Promise<MappedResponseType<R, T>>;
|
|
2307
|
+
raw<T = any, R extends ResponseType = "json">(request: FetchRequest, options?: FetchOptions<R>): Promise<FetchResponse<MappedResponseType<R, T>>>;
|
|
2308
|
+
native: Fetch;
|
|
2309
|
+
create(defaults: FetchOptions, globalOptions?: CreateFetchOptions): $Fetch;
|
|
2310
|
+
}
|
|
2311
|
+
interface FetchOptions<R extends ResponseType = ResponseType, T = any> extends Omit<RequestInit, "body">, FetchHooks<T, R> {
|
|
2312
|
+
baseURL?: string;
|
|
2313
|
+
body?: RequestInit["body"] | Record<string, any>;
|
|
2314
|
+
ignoreResponseError?: boolean;
|
|
2315
|
+
/**
|
|
2316
|
+
* @deprecated use query instead.
|
|
2317
|
+
*/
|
|
2318
|
+
params?: Record<string, any>;
|
|
2319
|
+
query?: Record<string, any>;
|
|
2320
|
+
parseResponse?: (responseText: string) => any;
|
|
2321
|
+
responseType?: R;
|
|
2322
|
+
/**
|
|
2323
|
+
* @experimental Set to "half" to enable duplex streaming.
|
|
2324
|
+
* Will be automatically set to "half" when using a ReadableStream as body.
|
|
2325
|
+
* @see https://fetch.spec.whatwg.org/#enumdef-requestduplex
|
|
2326
|
+
*/
|
|
2327
|
+
duplex?: "half" | undefined;
|
|
2328
|
+
/**
|
|
2329
|
+
* Only supported in Node.js >= 18 using undici
|
|
2330
|
+
*
|
|
2331
|
+
* @see https://undici.nodejs.org/#/docs/api/Dispatcher
|
|
2332
|
+
*/
|
|
2333
|
+
dispatcher?: InstanceType<typeof Dispatcher>;
|
|
2334
|
+
/**
|
|
2335
|
+
* Only supported older Node.js versions using node-fetch-native polyfill.
|
|
2336
|
+
*/
|
|
2337
|
+
agent?: unknown;
|
|
2338
|
+
/** timeout in milliseconds */
|
|
2339
|
+
timeout?: number;
|
|
2340
|
+
retry?: number | false;
|
|
2341
|
+
/** Delay between retries in milliseconds. */
|
|
2342
|
+
retryDelay?: number | ((context: FetchContext<T, R>) => number);
|
|
2343
|
+
/** Default is [408, 409, 425, 429, 500, 502, 503, 504] */
|
|
2344
|
+
retryStatusCodes?: number[];
|
|
2345
|
+
}
|
|
2346
|
+
interface ResolvedFetchOptions<R extends ResponseType = ResponseType, T = any> extends FetchOptions<R, T> {
|
|
2347
|
+
headers: Headers;
|
|
2348
|
+
}
|
|
2349
|
+
interface CreateFetchOptions {
|
|
2350
|
+
defaults?: FetchOptions;
|
|
2351
|
+
fetch?: Fetch;
|
|
2352
|
+
Headers?: typeof Headers;
|
|
2353
|
+
AbortController?: typeof AbortController;
|
|
2354
|
+
}
|
|
2355
|
+
interface FetchContext<T = any, R extends ResponseType = ResponseType> {
|
|
2356
|
+
request: FetchRequest;
|
|
2357
|
+
options: ResolvedFetchOptions<R>;
|
|
2358
|
+
response?: FetchResponse<T>;
|
|
2359
|
+
error?: Error;
|
|
2360
|
+
}
|
|
2361
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
2362
|
+
type MaybeArray<T> = T | T[];
|
|
2363
|
+
type FetchHook<C extends FetchContext = FetchContext> = (context: C) => MaybePromise<void>;
|
|
2364
|
+
interface FetchHooks<T = any, R extends ResponseType = ResponseType> {
|
|
2365
|
+
onRequest?: MaybeArray<FetchHook<FetchContext<T, R>>>;
|
|
2366
|
+
onRequestError?: MaybeArray<FetchHook<FetchContext<T, R> & {
|
|
2367
|
+
error: Error;
|
|
2368
|
+
}>>;
|
|
2369
|
+
onResponse?: MaybeArray<FetchHook<FetchContext<T, R> & {
|
|
2370
|
+
response: FetchResponse<T>;
|
|
2371
|
+
}>>;
|
|
2372
|
+
onResponseError?: MaybeArray<FetchHook<FetchContext<T, R> & {
|
|
2373
|
+
response: FetchResponse<T>;
|
|
2374
|
+
}>>;
|
|
2375
|
+
}
|
|
2376
|
+
interface ResponseMap {
|
|
2377
|
+
blob: Blob;
|
|
2378
|
+
text: string;
|
|
2379
|
+
arrayBuffer: ArrayBuffer;
|
|
2380
|
+
stream: ReadableStream<Uint8Array>;
|
|
2381
|
+
}
|
|
2382
|
+
type ResponseType = keyof ResponseMap | "json";
|
|
2383
|
+
type MappedResponseType<R extends ResponseType, JsonType = any> = R extends keyof ResponseMap ? ResponseMap[R] : JsonType;
|
|
2384
|
+
interface FetchResponse<T> extends Response {
|
|
2385
|
+
_data?: T;
|
|
2386
|
+
}
|
|
2387
|
+
type Fetch = typeof globalThis.fetch;
|
|
2388
|
+
type FetchRequest = RequestInfo;
|
|
47
2389
|
//#endregion
|
|
48
|
-
//#region
|
|
49
|
-
declare const $fetch:
|
|
2390
|
+
//#region ../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/index.d.mts
|
|
2391
|
+
declare const $fetch: $Fetch;
|
|
50
2392
|
//#endregion
|
|
51
2393
|
//#region src/client/plugin.d.ts
|
|
52
2394
|
/**
|
|
@@ -72,8 +2414,8 @@ declare const $fetch: import("nitro/types").$Fetch;
|
|
|
72
2414
|
* })
|
|
73
2415
|
* ```
|
|
74
2416
|
*/
|
|
75
|
-
declare function defineVixtPlugin(definition: PluginDefinition | VixtPlugin): VixtPlugin;
|
|
2417
|
+
export declare function defineVixtPlugin(definition: PluginDefinition | VixtPlugin): VixtPlugin;
|
|
76
2418
|
/** Applies plugins to a Vixt app. */
|
|
77
|
-
declare function applyPlugins(vixt: VixtApp, plugins: VixtPlugin[]): void;
|
|
2419
|
+
export declare function applyPlugins(vixt: VixtApp, plugins: VixtPlugin[]): void;
|
|
78
2420
|
//#endregion
|
|
79
|
-
export { $fetch
|
|
2421
|
+
export { $fetch };
|