omegon 0.8.4 → 0.9.1
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/extensions/cleave/dispatcher.ts +213 -20
- package/extensions/cleave/rpc-child.ts +269 -0
- package/extensions/cleave/types.ts +52 -0
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +11 -5
- package/node_modules/@types/node/assert.d.ts +173 -50
- package/node_modules/@types/node/async_hooks.d.ts +8 -28
- package/node_modules/@types/node/buffer.buffer.d.ts +7 -1
- package/node_modules/@types/node/buffer.d.ts +168 -44
- package/node_modules/@types/node/child_process.d.ts +70 -27
- package/node_modules/@types/node/cluster.d.ts +332 -240
- package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -1
- package/node_modules/@types/node/console.d.ts +350 -49
- package/node_modules/@types/node/constants.d.ts +4 -3
- package/node_modules/@types/node/crypto.d.ts +1110 -630
- package/node_modules/@types/node/dgram.d.ts +51 -15
- package/node_modules/@types/node/diagnostics_channel.d.ts +6 -4
- package/node_modules/@types/node/dns/promises.d.ts +4 -4
- package/node_modules/@types/node/dns.d.ts +133 -132
- package/node_modules/@types/node/domain.d.ts +17 -13
- package/node_modules/@types/node/events.d.ts +663 -734
- package/node_modules/@types/node/fs/promises.d.ts +9 -43
- package/node_modules/@types/node/fs.d.ts +411 -628
- package/node_modules/@types/node/globals.d.ts +30 -8
- package/node_modules/@types/node/globals.typedarray.d.ts +0 -63
- package/node_modules/@types/node/http.d.ts +265 -364
- package/node_modules/@types/node/http2.d.ts +715 -551
- package/node_modules/@types/node/https.d.ts +239 -65
- package/node_modules/@types/node/index.d.ts +6 -24
- package/node_modules/@types/node/inspector.d.ts +53 -69
- package/node_modules/@types/node/inspector.generated.d.ts +410 -759
- package/node_modules/@types/node/module.d.ts +186 -52
- package/node_modules/@types/node/net.d.ts +194 -70
- package/node_modules/@types/node/os.d.ts +11 -12
- package/node_modules/@types/node/package.json +3 -13
- package/node_modules/@types/node/path.d.ts +133 -120
- package/node_modules/@types/node/perf_hooks.d.ts +643 -318
- package/node_modules/@types/node/process.d.ts +132 -223
- package/node_modules/@types/node/punycode.d.ts +5 -5
- package/node_modules/@types/node/querystring.d.ts +4 -4
- package/node_modules/@types/node/readline/promises.d.ts +3 -3
- package/node_modules/@types/node/readline.d.ts +120 -68
- package/node_modules/@types/node/repl.d.ts +100 -87
- package/node_modules/@types/node/sea.d.ts +1 -10
- package/node_modules/@types/node/sqlite.d.ts +19 -363
- package/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/node/stream/promises.d.ts +15 -136
- package/node_modules/@types/node/stream/web.d.ts +502 -176
- package/node_modules/@types/node/stream.d.ts +475 -581
- package/node_modules/@types/node/string_decoder.d.ts +4 -4
- package/node_modules/@types/node/test.d.ts +196 -308
- package/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/node/timers.d.ts +132 -4
- package/node_modules/@types/node/tls.d.ts +226 -110
- package/node_modules/@types/node/trace_events.d.ts +9 -9
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -1
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -2
- package/node_modules/@types/node/ts5.6/index.d.ts +6 -26
- package/node_modules/@types/node/tty.d.ts +16 -58
- package/node_modules/@types/node/url.d.ts +573 -130
- package/node_modules/@types/node/util.d.ts +1100 -181
- package/node_modules/@types/node/v8.d.ts +8 -76
- package/node_modules/@types/node/vm.d.ts +72 -280
- package/node_modules/@types/node/wasi.d.ts +4 -25
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +2 -27
- package/node_modules/@types/node/web-globals/events.d.ts +0 -9
- package/node_modules/@types/node/web-globals/fetch.d.ts +0 -14
- package/node_modules/@types/node/web-globals/navigator.d.ts +0 -3
- package/node_modules/@types/node/worker_threads.d.ts +335 -268
- package/node_modules/@types/node/zlib.d.ts +74 -9
- package/node_modules/undici-types/agent.d.ts +12 -13
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +12 -13
- package/node_modules/undici-types/client.d.ts +19 -19
- package/node_modules/undici-types/connector.d.ts +2 -2
- package/node_modules/undici-types/cookies.d.ts +0 -2
- package/node_modules/undici-types/diagnostics-channel.d.ts +10 -18
- package/node_modules/undici-types/dispatcher.d.ts +103 -123
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +3 -4
- package/node_modules/undici-types/errors.d.ts +54 -66
- package/node_modules/undici-types/eventsource.d.ts +4 -9
- package/node_modules/undici-types/fetch.d.ts +20 -22
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/handlers.d.ts +8 -8
- package/node_modules/undici-types/header.d.ts +1 -157
- package/node_modules/undici-types/index.d.ts +47 -64
- package/node_modules/undici-types/interceptors.d.ts +8 -64
- package/node_modules/undici-types/mock-agent.d.ts +18 -36
- package/node_modules/undici-types/mock-client.d.ts +4 -6
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +20 -21
- package/node_modules/undici-types/mock-pool.d.ts +4 -6
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +4 -0
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +13 -15
- package/node_modules/undici-types/proxy-agent.d.ts +4 -5
- package/node_modules/undici-types/readable.d.ts +16 -19
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +10 -19
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/webidl.d.ts +29 -142
- package/node_modules/undici-types/websocket.d.ts +10 -46
- package/package.json +2 -1
- package/scripts/check-vendor-dist.mjs +56 -0
- package/skills/cleave/SKILL.md +62 -2
- package/node_modules/@types/node/inspector/promises.d.ts +0 -41
- package/node_modules/@types/node/path/posix.d.ts +0 -8
- package/node_modules/@types/node/path/win32.d.ts +0 -8
- package/node_modules/@types/node/quic.d.ts +0 -910
- package/node_modules/@types/node/test/reporters.d.ts +0 -96
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/node_modules/@types/node/ts5.7/index.d.ts +0 -117
- package/node_modules/@types/node/util/types.d.ts +0 -558
- package/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/node_modules/@types/node/web-globals/streams.d.ts +0 -115
- package/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/node_modules/undici-types/cache-interceptor.d.ts +0 -173
- package/node_modules/undici-types/client-stats.d.ts +0 -15
- package/node_modules/undici-types/h2c-client.d.ts +0 -73
- package/node_modules/undici-types/mock-call-history.d.ts +0 -111
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -41
- package/node_modules/undici-types/snapshot-agent.d.ts +0 -109
- package/node_modules/undici-types/utility.d.ts +0 -7
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// and https://github.com/node-fetch/node-fetch/blob/914ce6be5ec67a8bab63d68510aabf07cb818b6d/index.d.ts (MIT license)
|
|
3
3
|
/// <reference types="node" />
|
|
4
4
|
|
|
5
|
-
import { Blob } from '
|
|
6
|
-
import { URL, URLSearchParams } from '
|
|
7
|
-
import { ReadableStream } from '
|
|
5
|
+
import { Blob } from 'buffer'
|
|
6
|
+
import { URL, URLSearchParams } from 'url'
|
|
7
|
+
import { ReadableStream } from 'stream/web'
|
|
8
8
|
import { FormData } from './formdata'
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
import Dispatcher from './dispatcher'
|
|
11
11
|
|
|
12
12
|
export type RequestInfo = string | URL | Request
|
|
@@ -33,21 +33,20 @@ export class BodyMixin {
|
|
|
33
33
|
|
|
34
34
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
|
35
35
|
readonly blob: () => Promise<Blob>
|
|
36
|
-
readonly bytes: () => Promise<Uint8Array>
|
|
37
36
|
/**
|
|
38
37
|
* @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments.
|
|
39
38
|
* It is recommended to use a library such as [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) as follows:
|
|
40
|
-
*
|
|
39
|
+
*
|
|
41
40
|
* @example
|
|
42
41
|
* ```js
|
|
43
42
|
* import { Busboy } from '@fastify/busboy'
|
|
44
43
|
* import { Readable } from 'node:stream'
|
|
45
|
-
*
|
|
44
|
+
*
|
|
46
45
|
* const response = await fetch('...')
|
|
47
46
|
* const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } })
|
|
48
|
-
*
|
|
47
|
+
*
|
|
49
48
|
* // handle events emitted from `busboy`
|
|
50
|
-
*
|
|
49
|
+
*
|
|
51
50
|
* Readable.fromWeb(response.body).pipe(busboy)
|
|
52
51
|
* ```
|
|
53
52
|
*/
|
|
@@ -68,7 +67,7 @@ export interface SpecIterable<T> {
|
|
|
68
67
|
[Symbol.iterator](): SpecIterator<T>;
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
export type HeadersInit = [string, string
|
|
70
|
+
export type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers
|
|
72
71
|
|
|
73
72
|
export declare class Headers implements SpecIterable<[string, string]> {
|
|
74
73
|
constructor (init?: HeadersInit)
|
|
@@ -120,21 +119,20 @@ type RequestDestination =
|
|
|
120
119
|
| 'xslt'
|
|
121
120
|
|
|
122
121
|
export interface RequestInit {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
credentials?: RequestCredentials
|
|
126
|
-
dispatcher?: Dispatcher
|
|
127
|
-
duplex?: RequestDuplex
|
|
122
|
+
method?: string
|
|
123
|
+
keepalive?: boolean
|
|
128
124
|
headers?: HeadersInit
|
|
125
|
+
body?: BodyInit | null
|
|
126
|
+
redirect?: RequestRedirect
|
|
129
127
|
integrity?: string
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
signal?: AbortSignal | null
|
|
129
|
+
credentials?: RequestCredentials
|
|
132
130
|
mode?: RequestMode
|
|
133
|
-
redirect?: RequestRedirect
|
|
134
131
|
referrer?: string
|
|
135
132
|
referrerPolicy?: ReferrerPolicy
|
|
136
|
-
signal?: AbortSignal | null
|
|
137
133
|
window?: null
|
|
134
|
+
dispatcher?: Dispatcher
|
|
135
|
+
duplex?: RequestDuplex
|
|
138
136
|
}
|
|
139
137
|
|
|
140
138
|
export type ReferrerPolicy =
|
|
@@ -146,7 +144,7 @@ export type ReferrerPolicy =
|
|
|
146
144
|
| 'same-origin'
|
|
147
145
|
| 'strict-origin'
|
|
148
146
|
| 'strict-origin-when-cross-origin'
|
|
149
|
-
| 'unsafe-url'
|
|
147
|
+
| 'unsafe-url';
|
|
150
148
|
|
|
151
149
|
export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'
|
|
152
150
|
|
|
@@ -206,6 +204,6 @@ export declare class Response extends BodyMixin {
|
|
|
206
204
|
readonly clone: () => Response
|
|
207
205
|
|
|
208
206
|
static error (): Response
|
|
209
|
-
static json
|
|
210
|
-
static redirect (url: string | URL, status
|
|
207
|
+
static json(data: any, init?: ResponseInit): Response
|
|
208
|
+
static redirect (url: string | URL, status: ResponseRedirectStatus): Response
|
|
211
209
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/File.ts (MIT)
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
|
|
4
|
+
import { Blob } from 'buffer'
|
|
5
|
+
|
|
6
|
+
export interface BlobPropertyBag {
|
|
7
|
+
type?: string
|
|
8
|
+
endings?: 'native' | 'transparent'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface FilePropertyBag extends BlobPropertyBag {
|
|
12
|
+
/**
|
|
13
|
+
* The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
|
|
14
|
+
*/
|
|
15
|
+
lastModified?: number
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare class File extends Blob {
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new File instance.
|
|
21
|
+
*
|
|
22
|
+
* @param fileBits An `Array` strings, or [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), [`ArrayBufferView`](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView), [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) objects, or a mix of any of such objects, that will be put inside the [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File).
|
|
23
|
+
* @param fileName The name of the file.
|
|
24
|
+
* @param options An options object containing optional attributes for the file.
|
|
25
|
+
*/
|
|
26
|
+
constructor(fileBits: ReadonlyArray<string | NodeJS.ArrayBufferView | Blob>, fileName: string, options?: FilePropertyBag)
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Name of the file referenced by the File object.
|
|
30
|
+
*/
|
|
31
|
+
readonly name: string
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
|
|
35
|
+
*/
|
|
36
|
+
readonly lastModified: number
|
|
37
|
+
|
|
38
|
+
readonly [Symbol.toStringTag]: string
|
|
39
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
|
|
3
|
+
import { Blob } from 'buffer'
|
|
4
|
+
import { DOMException, EventInit } from './patch'
|
|
5
|
+
|
|
6
|
+
export declare class FileReader {
|
|
7
|
+
__proto__: EventTarget & FileReader
|
|
8
|
+
|
|
9
|
+
constructor ()
|
|
10
|
+
|
|
11
|
+
readAsArrayBuffer (blob: Blob): void
|
|
12
|
+
readAsBinaryString (blob: Blob): void
|
|
13
|
+
readAsText (blob: Blob, encoding?: string): void
|
|
14
|
+
readAsDataURL (blob: Blob): void
|
|
15
|
+
|
|
16
|
+
abort (): void
|
|
17
|
+
|
|
18
|
+
static readonly EMPTY = 0
|
|
19
|
+
static readonly LOADING = 1
|
|
20
|
+
static readonly DONE = 2
|
|
21
|
+
|
|
22
|
+
readonly EMPTY = 0
|
|
23
|
+
readonly LOADING = 1
|
|
24
|
+
readonly DONE = 2
|
|
25
|
+
|
|
26
|
+
readonly readyState: number
|
|
27
|
+
|
|
28
|
+
readonly result: string | ArrayBuffer | null
|
|
29
|
+
|
|
30
|
+
readonly error: DOMException | null
|
|
31
|
+
|
|
32
|
+
onloadstart: null | ((this: FileReader, event: ProgressEvent) => void)
|
|
33
|
+
onprogress: null | ((this: FileReader, event: ProgressEvent) => void)
|
|
34
|
+
onload: null | ((this: FileReader, event: ProgressEvent) => void)
|
|
35
|
+
onabort: null | ((this: FileReader, event: ProgressEvent) => void)
|
|
36
|
+
onerror: null | ((this: FileReader, event: ProgressEvent) => void)
|
|
37
|
+
onloadend: null | ((this: FileReader, event: ProgressEvent) => void)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface ProgressEventInit extends EventInit {
|
|
41
|
+
lengthComputable?: boolean
|
|
42
|
+
loaded?: number
|
|
43
|
+
total?: number
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export declare class ProgressEvent {
|
|
47
|
+
__proto__: Event & ProgressEvent
|
|
48
|
+
|
|
49
|
+
constructor (type: string, eventInitDict?: ProgressEventInit)
|
|
50
|
+
|
|
51
|
+
readonly lengthComputable: boolean
|
|
52
|
+
readonly loaded: number
|
|
53
|
+
readonly total: number
|
|
54
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/FormData.ts (MIT)
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
|
|
4
|
-
import { File } from '
|
|
4
|
+
import { File } from './file'
|
|
5
5
|
import { SpecIterableIterator } from './fetch'
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -24,7 +24,7 @@ export declare class FormData {
|
|
|
24
24
|
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.
|
|
25
25
|
* @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.
|
|
26
26
|
*/
|
|
27
|
-
append
|
|
27
|
+
append(name: string, value: unknown, fileName?: string): void
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Set a new value for an existing key inside FormData,
|
|
@@ -36,7 +36,7 @@ export declare class FormData {
|
|
|
36
36
|
* @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.
|
|
37
37
|
*
|
|
38
38
|
*/
|
|
39
|
-
set
|
|
39
|
+
set(name: string, value: unknown, fileName?: string): void
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Returns the first value associated with a given key from within a `FormData` object.
|
|
@@ -46,7 +46,7 @@ export declare class FormData {
|
|
|
46
46
|
*
|
|
47
47
|
* @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null.
|
|
48
48
|
*/
|
|
49
|
-
get
|
|
49
|
+
get(name: string): FormDataEntryValue | null
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Returns all the values associated with a given key from within a `FormData` object.
|
|
@@ -55,7 +55,7 @@ export declare class FormData {
|
|
|
55
55
|
*
|
|
56
56
|
* @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.
|
|
57
57
|
*/
|
|
58
|
-
getAll
|
|
58
|
+
getAll(name: string): FormDataEntryValue[]
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Returns a boolean stating whether a `FormData` object contains a certain key.
|
|
@@ -64,14 +64,14 @@ export declare class FormData {
|
|
|
64
64
|
*
|
|
65
65
|
* @return A boolean value.
|
|
66
66
|
*/
|
|
67
|
-
has
|
|
67
|
+
has(name: string): boolean
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Deletes a key and its value(s) from a `FormData` object.
|
|
71
71
|
*
|
|
72
72
|
* @param name The name of the key you want to delete.
|
|
73
73
|
*/
|
|
74
|
-
delete
|
|
74
|
+
delete(name: string): void
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Executes given callback function for each field of the FormData instance
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import Dispatcher from
|
|
2
|
-
|
|
3
|
-
declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher> (dispatcher: DispatcherImplementation): void
|
|
4
|
-
declare function getGlobalDispatcher (): Dispatcher
|
|
1
|
+
import Dispatcher from "./dispatcher";
|
|
5
2
|
|
|
6
3
|
export {
|
|
7
4
|
getGlobalDispatcher,
|
|
8
5
|
setGlobalDispatcher
|
|
9
6
|
}
|
|
7
|
+
|
|
8
|
+
declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher>(dispatcher: DispatcherImplementation): void;
|
|
9
|
+
declare function getGlobalDispatcher(): Dispatcher;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare function setGlobalOrigin (origin: string | URL | undefined): void
|
|
2
|
-
declare function getGlobalOrigin (): URL | undefined
|
|
3
|
-
|
|
4
1
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
setGlobalOrigin,
|
|
3
|
+
getGlobalOrigin
|
|
7
4
|
}
|
|
5
|
+
|
|
6
|
+
declare function setGlobalOrigin(origin: string | URL | undefined): void;
|
|
7
|
+
declare function getGlobalOrigin(): URL | undefined;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import Dispatcher from
|
|
1
|
+
import Dispatcher from "./dispatcher";
|
|
2
2
|
|
|
3
|
-
export declare class RedirectHandler implements Dispatcher.
|
|
4
|
-
constructor
|
|
5
|
-
dispatch: Dispatcher
|
|
3
|
+
export declare class RedirectHandler implements Dispatcher.DispatchHandlers {
|
|
4
|
+
constructor(
|
|
5
|
+
dispatch: Dispatcher,
|
|
6
6
|
maxRedirections: number,
|
|
7
7
|
opts: Dispatcher.DispatchOptions,
|
|
8
|
-
handler: Dispatcher.
|
|
8
|
+
handler: Dispatcher.DispatchHandlers,
|
|
9
9
|
redirectionLimitReached: boolean
|
|
10
|
-
)
|
|
10
|
+
);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export declare class DecoratorHandler implements Dispatcher.
|
|
14
|
-
constructor
|
|
13
|
+
export declare class DecoratorHandler implements Dispatcher.DispatchHandlers {
|
|
14
|
+
constructor(handler: Dispatcher.DispatchHandlers);
|
|
15
15
|
}
|
|
@@ -1,160 +1,4 @@
|
|
|
1
|
-
import { Autocomplete } from './utility'
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* The header type declaration of `undici`.
|
|
5
3
|
*/
|
|
6
|
-
export type IncomingHttpHeaders = Record<string, string | string[] | undefined
|
|
7
|
-
|
|
8
|
-
type HeaderNames = Autocomplete<
|
|
9
|
-
| 'Accept'
|
|
10
|
-
| 'Accept-CH'
|
|
11
|
-
| 'Accept-Charset'
|
|
12
|
-
| 'Accept-Encoding'
|
|
13
|
-
| 'Accept-Language'
|
|
14
|
-
| 'Accept-Patch'
|
|
15
|
-
| 'Accept-Post'
|
|
16
|
-
| 'Accept-Ranges'
|
|
17
|
-
| 'Access-Control-Allow-Credentials'
|
|
18
|
-
| 'Access-Control-Allow-Headers'
|
|
19
|
-
| 'Access-Control-Allow-Methods'
|
|
20
|
-
| 'Access-Control-Allow-Origin'
|
|
21
|
-
| 'Access-Control-Expose-Headers'
|
|
22
|
-
| 'Access-Control-Max-Age'
|
|
23
|
-
| 'Access-Control-Request-Headers'
|
|
24
|
-
| 'Access-Control-Request-Method'
|
|
25
|
-
| 'Age'
|
|
26
|
-
| 'Allow'
|
|
27
|
-
| 'Alt-Svc'
|
|
28
|
-
| 'Alt-Used'
|
|
29
|
-
| 'Authorization'
|
|
30
|
-
| 'Cache-Control'
|
|
31
|
-
| 'Clear-Site-Data'
|
|
32
|
-
| 'Connection'
|
|
33
|
-
| 'Content-Disposition'
|
|
34
|
-
| 'Content-Encoding'
|
|
35
|
-
| 'Content-Language'
|
|
36
|
-
| 'Content-Length'
|
|
37
|
-
| 'Content-Location'
|
|
38
|
-
| 'Content-Range'
|
|
39
|
-
| 'Content-Security-Policy'
|
|
40
|
-
| 'Content-Security-Policy-Report-Only'
|
|
41
|
-
| 'Content-Type'
|
|
42
|
-
| 'Cookie'
|
|
43
|
-
| 'Cross-Origin-Embedder-Policy'
|
|
44
|
-
| 'Cross-Origin-Opener-Policy'
|
|
45
|
-
| 'Cross-Origin-Resource-Policy'
|
|
46
|
-
| 'Date'
|
|
47
|
-
| 'Device-Memory'
|
|
48
|
-
| 'ETag'
|
|
49
|
-
| 'Expect'
|
|
50
|
-
| 'Expect-CT'
|
|
51
|
-
| 'Expires'
|
|
52
|
-
| 'Forwarded'
|
|
53
|
-
| 'From'
|
|
54
|
-
| 'Host'
|
|
55
|
-
| 'If-Match'
|
|
56
|
-
| 'If-Modified-Since'
|
|
57
|
-
| 'If-None-Match'
|
|
58
|
-
| 'If-Range'
|
|
59
|
-
| 'If-Unmodified-Since'
|
|
60
|
-
| 'Keep-Alive'
|
|
61
|
-
| 'Last-Modified'
|
|
62
|
-
| 'Link'
|
|
63
|
-
| 'Location'
|
|
64
|
-
| 'Max-Forwards'
|
|
65
|
-
| 'Origin'
|
|
66
|
-
| 'Permissions-Policy'
|
|
67
|
-
| 'Priority'
|
|
68
|
-
| 'Proxy-Authenticate'
|
|
69
|
-
| 'Proxy-Authorization'
|
|
70
|
-
| 'Range'
|
|
71
|
-
| 'Referer'
|
|
72
|
-
| 'Referrer-Policy'
|
|
73
|
-
| 'Retry-After'
|
|
74
|
-
| 'Sec-Fetch-Dest'
|
|
75
|
-
| 'Sec-Fetch-Mode'
|
|
76
|
-
| 'Sec-Fetch-Site'
|
|
77
|
-
| 'Sec-Fetch-User'
|
|
78
|
-
| 'Sec-Purpose'
|
|
79
|
-
| 'Sec-WebSocket-Accept'
|
|
80
|
-
| 'Server'
|
|
81
|
-
| 'Server-Timing'
|
|
82
|
-
| 'Service-Worker-Navigation-Preload'
|
|
83
|
-
| 'Set-Cookie'
|
|
84
|
-
| 'SourceMap'
|
|
85
|
-
| 'Strict-Transport-Security'
|
|
86
|
-
| 'TE'
|
|
87
|
-
| 'Timing-Allow-Origin'
|
|
88
|
-
| 'Trailer'
|
|
89
|
-
| 'Transfer-Encoding'
|
|
90
|
-
| 'Upgrade'
|
|
91
|
-
| 'Upgrade-Insecure-Requests'
|
|
92
|
-
| 'User-Agent'
|
|
93
|
-
| 'Vary'
|
|
94
|
-
| 'Via'
|
|
95
|
-
| 'WWW-Authenticate'
|
|
96
|
-
| 'X-Content-Type-Options'
|
|
97
|
-
| 'X-Frame-Options'
|
|
98
|
-
>
|
|
99
|
-
|
|
100
|
-
type IANARegisteredMimeType = Autocomplete<
|
|
101
|
-
| 'audio/aac'
|
|
102
|
-
| 'video/x-msvideo'
|
|
103
|
-
| 'image/avif'
|
|
104
|
-
| 'video/av1'
|
|
105
|
-
| 'application/octet-stream'
|
|
106
|
-
| 'image/bmp'
|
|
107
|
-
| 'text/css'
|
|
108
|
-
| 'text/csv'
|
|
109
|
-
| 'application/vnd.ms-fontobject'
|
|
110
|
-
| 'application/epub+zip'
|
|
111
|
-
| 'image/gif'
|
|
112
|
-
| 'application/gzip'
|
|
113
|
-
| 'text/html'
|
|
114
|
-
| 'image/x-icon'
|
|
115
|
-
| 'text/calendar'
|
|
116
|
-
| 'image/jpeg'
|
|
117
|
-
| 'text/javascript'
|
|
118
|
-
| 'application/json'
|
|
119
|
-
| 'application/ld+json'
|
|
120
|
-
| 'audio/x-midi'
|
|
121
|
-
| 'audio/mpeg'
|
|
122
|
-
| 'video/mp4'
|
|
123
|
-
| 'video/mpeg'
|
|
124
|
-
| 'audio/ogg'
|
|
125
|
-
| 'video/ogg'
|
|
126
|
-
| 'application/ogg'
|
|
127
|
-
| 'audio/opus'
|
|
128
|
-
| 'font/otf'
|
|
129
|
-
| 'application/pdf'
|
|
130
|
-
| 'image/png'
|
|
131
|
-
| 'application/rtf'
|
|
132
|
-
| 'image/svg+xml'
|
|
133
|
-
| 'image/tiff'
|
|
134
|
-
| 'video/mp2t'
|
|
135
|
-
| 'font/ttf'
|
|
136
|
-
| 'text/plain'
|
|
137
|
-
| 'application/wasm'
|
|
138
|
-
| 'video/webm'
|
|
139
|
-
| 'audio/webm'
|
|
140
|
-
| 'image/webp'
|
|
141
|
-
| 'font/woff'
|
|
142
|
-
| 'font/woff2'
|
|
143
|
-
| 'application/xhtml+xml'
|
|
144
|
-
| 'application/xml'
|
|
145
|
-
| 'application/zip'
|
|
146
|
-
| 'video/3gpp'
|
|
147
|
-
| 'video/3gpp2'
|
|
148
|
-
| 'model/gltf+json'
|
|
149
|
-
| 'model/gltf-binary'
|
|
150
|
-
>
|
|
151
|
-
|
|
152
|
-
type KnownHeaderValues = {
|
|
153
|
-
'content-type': IANARegisteredMimeType
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export type HeaderRecord = {
|
|
157
|
-
[K in HeaderNames | Lowercase<HeaderNames>]?: Lowercase<K> extends keyof KnownHeaderValues
|
|
158
|
-
? KnownHeaderValues[Lowercase<K>]
|
|
159
|
-
: string
|
|
160
|
-
}
|
|
4
|
+
export type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
|
|
@@ -1,39 +1,31 @@
|
|
|
1
|
-
import Dispatcher from
|
|
1
|
+
import Dispatcher from'./dispatcher'
|
|
2
2
|
import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher'
|
|
3
3
|
import { setGlobalOrigin, getGlobalOrigin } from './global-origin'
|
|
4
|
-
import Pool from
|
|
4
|
+
import Pool from'./pool'
|
|
5
5
|
import { RedirectHandler, DecoratorHandler } from './handlers'
|
|
6
6
|
|
|
7
7
|
import BalancedPool from './balanced-pool'
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { SnapshotAgent } from './snapshot-agent'
|
|
18
|
-
import { MockCallHistory, MockCallHistoryLog } from './mock-call-history'
|
|
19
|
-
import mockErrors from './mock-errors'
|
|
20
|
-
import ProxyAgent from './proxy-agent'
|
|
8
|
+
import Client from'./client'
|
|
9
|
+
import buildConnector from'./connector'
|
|
10
|
+
import errors from'./errors'
|
|
11
|
+
import Agent from'./agent'
|
|
12
|
+
import MockClient from'./mock-client'
|
|
13
|
+
import MockPool from'./mock-pool'
|
|
14
|
+
import MockAgent from'./mock-agent'
|
|
15
|
+
import mockErrors from'./mock-errors'
|
|
16
|
+
import ProxyAgent from'./proxy-agent'
|
|
21
17
|
import EnvHttpProxyAgent from './env-http-proxy-agent'
|
|
22
|
-
import RetryHandler from
|
|
23
|
-
import RetryAgent from
|
|
18
|
+
import RetryHandler from'./retry-handler'
|
|
19
|
+
import RetryAgent from'./retry-agent'
|
|
24
20
|
import { request, pipeline, stream, connect, upgrade } from './api'
|
|
25
21
|
import interceptors from './interceptors'
|
|
26
22
|
|
|
27
|
-
import CacheInterceptor from './cache-interceptor'
|
|
28
|
-
declare const cacheStores: {
|
|
29
|
-
MemoryCacheStore: typeof CacheInterceptor.MemoryCacheStore;
|
|
30
|
-
SqliteCacheStore: typeof CacheInterceptor.SqliteCacheStore;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
23
|
export * from './util'
|
|
34
24
|
export * from './cookies'
|
|
35
25
|
export * from './eventsource'
|
|
36
26
|
export * from './fetch'
|
|
27
|
+
export * from './file'
|
|
28
|
+
export * from './filereader'
|
|
37
29
|
export * from './formdata'
|
|
38
30
|
export * from './diagnostics-channel'
|
|
39
31
|
export * from './websocket'
|
|
@@ -41,48 +33,39 @@ export * from './content-type'
|
|
|
41
33
|
export * from './cache'
|
|
42
34
|
export { Interceptable } from './mock-interceptor'
|
|
43
35
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export { Dispatcher, BalancedPool, RoundRobinPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, cacheStores, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install }
|
|
36
|
+
export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent }
|
|
47
37
|
export default Undici
|
|
48
38
|
|
|
49
39
|
declare namespace Undici {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const caches: typeof import('./cache').caches
|
|
82
|
-
const interceptors: typeof import('./interceptors').default
|
|
83
|
-
const cacheStores: {
|
|
84
|
-
MemoryCacheStore: typeof import('./cache-interceptor').default.MemoryCacheStore,
|
|
85
|
-
SqliteCacheStore: typeof import('./cache-interceptor').default.SqliteCacheStore
|
|
86
|
-
}
|
|
87
|
-
const install: typeof globalThisInstall
|
|
40
|
+
var Dispatcher: typeof import('./dispatcher').default
|
|
41
|
+
var Pool: typeof import('./pool').default;
|
|
42
|
+
var RedirectHandler: typeof import ('./handlers').RedirectHandler
|
|
43
|
+
var DecoratorHandler: typeof import ('./handlers').DecoratorHandler
|
|
44
|
+
var RetryHandler: typeof import ('./retry-handler').default
|
|
45
|
+
var createRedirectInterceptor: typeof import ('./interceptors').default.createRedirectInterceptor
|
|
46
|
+
var BalancedPool: typeof import('./balanced-pool').default;
|
|
47
|
+
var Client: typeof import('./client').default;
|
|
48
|
+
var buildConnector: typeof import('./connector').default;
|
|
49
|
+
var errors: typeof import('./errors').default;
|
|
50
|
+
var Agent: typeof import('./agent').default;
|
|
51
|
+
var setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher;
|
|
52
|
+
var getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher;
|
|
53
|
+
var request: typeof import('./api').request;
|
|
54
|
+
var stream: typeof import('./api').stream;
|
|
55
|
+
var pipeline: typeof import('./api').pipeline;
|
|
56
|
+
var connect: typeof import('./api').connect;
|
|
57
|
+
var upgrade: typeof import('./api').upgrade;
|
|
58
|
+
var MockClient: typeof import('./mock-client').default;
|
|
59
|
+
var MockPool: typeof import('./mock-pool').default;
|
|
60
|
+
var MockAgent: typeof import('./mock-agent').default;
|
|
61
|
+
var mockErrors: typeof import('./mock-errors').default;
|
|
62
|
+
var fetch: typeof import('./fetch').fetch;
|
|
63
|
+
var Headers: typeof import('./fetch').Headers;
|
|
64
|
+
var Response: typeof import('./fetch').Response;
|
|
65
|
+
var Request: typeof import('./fetch').Request;
|
|
66
|
+
var FormData: typeof import('./formdata').FormData;
|
|
67
|
+
var File: typeof import('./file').File;
|
|
68
|
+
var FileReader: typeof import('./filereader').FileReader;
|
|
69
|
+
var caches: typeof import('./cache').caches;
|
|
70
|
+
var interceptors: typeof import('./interceptors').default;
|
|
88
71
|
}
|