aws-delivlib 15.0.16 → 15.0.18
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/lib/publishing/github/node_modules/.yarn-integrity +2 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/README.md +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert.d.ts +5 -5
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/async_hooks.d.ts +26 -6
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.d.ts +1 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/child_process.d.ts +2 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/cluster.d.ts +15 -15
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/console.d.ts +17 -17
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/crypto.d.ts +35 -28
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dgram.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns.d.ts +16 -16
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/domain.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/events.d.ts +1 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs/promises.d.ts +16 -9
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs.d.ts +28 -19
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.d.ts +7 -6
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.typedarray.d.ts +1 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/http.d.ts +2 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/http2.d.ts +6 -3
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/https.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/index.d.ts +7 -5
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.d.ts +3 -7
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/module.d.ts +63 -29
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/net.d.ts +2 -5
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/os.d.ts +8 -7
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/package.json +13 -3
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/perf_hooks.d.ts +8 -8
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/process.d.ts +21 -11
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/punycode.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/querystring.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline/promises.d.ts +0 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline.d.ts +13 -13
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/repl.d.ts +14 -16
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/sea.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/sqlite.d.ts +182 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream.d.ts +8 -19
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/string_decoder.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/test.d.ts +53 -15
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tls.d.ts +2 -48
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/trace_events.d.ts +6 -6
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/{compatibility → ts5.1/compatibility}/disposable.d.ts +0 -4
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.1/index.d.ts +98 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +1 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/index.d.ts +9 -5
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/index.d.ts +96 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tty.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/url.d.ts +52 -19
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/util.d.ts +16 -295
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/v8.d.ts +29 -32
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/vm.d.ts +17 -10
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/wasi.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/worker_threads.d.ts +34 -18
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib.d.ts +5 -7
- package/lib/publishing/github/node_modules/undici-types/agent.d.ts +7 -7
- package/lib/publishing/github/node_modules/undici-types/api.d.ts +24 -24
- package/lib/publishing/github/node_modules/undici-types/balanced-pool.d.ts +11 -11
- package/lib/publishing/github/node_modules/undici-types/cache-interceptor.d.ts +172 -0
- package/lib/publishing/github/node_modules/undici-types/client.d.ts +12 -13
- package/lib/publishing/github/node_modules/undici-types/cookies.d.ts +2 -0
- package/lib/publishing/github/node_modules/undici-types/diagnostics-channel.d.ts +10 -10
- package/lib/publishing/github/node_modules/undici-types/dispatcher.d.ts +117 -92
- package/lib/publishing/github/node_modules/undici-types/env-http-proxy-agent.d.ts +2 -2
- package/lib/publishing/github/node_modules/undici-types/errors.d.ts +69 -47
- package/lib/publishing/github/node_modules/undici-types/fetch.d.ts +17 -16
- package/lib/publishing/github/node_modules/undici-types/formdata.d.ts +7 -7
- package/lib/publishing/github/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/lib/publishing/github/node_modules/undici-types/global-origin.d.ts +5 -5
- package/lib/publishing/github/node_modules/undici-types/h2c-client.d.ts +75 -0
- package/lib/publishing/github/node_modules/undici-types/handlers.d.ts +7 -7
- package/lib/publishing/github/node_modules/undici-types/header.d.ts +157 -1
- package/lib/publishing/github/node_modules/undici-types/index.d.ts +51 -47
- package/lib/publishing/github/node_modules/undici-types/interceptors.d.ts +25 -8
- package/lib/publishing/github/node_modules/undici-types/mock-agent.d.ts +33 -18
- package/lib/publishing/github/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/lib/publishing/github/node_modules/undici-types/mock-client.d.ts +4 -4
- package/lib/publishing/github/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/lib/publishing/github/node_modules/undici-types/mock-interceptor.d.ts +19 -19
- package/lib/publishing/github/node_modules/undici-types/mock-pool.d.ts +4 -4
- package/lib/publishing/github/node_modules/undici-types/package.json +1 -1
- package/lib/publishing/github/node_modules/undici-types/patch.d.ts +0 -4
- package/lib/publishing/github/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/lib/publishing/github/node_modules/undici-types/pool.d.ts +12 -12
- package/lib/publishing/github/node_modules/undici-types/proxy-agent.d.ts +4 -4
- package/lib/publishing/github/node_modules/undici-types/readable.d.ts +18 -15
- package/lib/publishing/github/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/lib/publishing/github/node_modules/undici-types/retry-handler.d.ts +10 -10
- package/lib/publishing/github/node_modules/undici-types/util.d.ts +3 -3
- package/lib/publishing/github/node_modules/undici-types/utility.d.ts +7 -0
- package/lib/publishing/github/node_modules/undici-types/webidl.d.ts +44 -6
- package/lib/publishing/github/node_modules/undici-types/websocket.d.ts +35 -1
- package/package.json +2 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/lib/publishing/github/node_modules/undici-types/file.d.ts +0 -39
- package/lib/publishing/github/node_modules/undici-types/filereader.d.ts +0 -54
@@ -1,45 +1,47 @@
|
|
1
|
-
import { Readable } from
|
1
|
+
import { Readable } from 'stream'
|
2
2
|
import { Blob } from 'buffer'
|
3
3
|
|
4
4
|
export default BodyReadable
|
5
5
|
|
6
6
|
declare class BodyReadable extends Readable {
|
7
|
-
constructor(
|
8
|
-
resume
|
9
|
-
abort
|
10
|
-
contentType?: string
|
11
|
-
|
7
|
+
constructor (opts: {
|
8
|
+
resume: (this: Readable, size: number) => void | null;
|
9
|
+
abort: () => void | null;
|
10
|
+
contentType?: string;
|
11
|
+
contentLength?: number;
|
12
|
+
highWaterMark?: number;
|
13
|
+
})
|
12
14
|
|
13
15
|
/** Consumes and returns the body as a string
|
14
16
|
* https://fetch.spec.whatwg.org/#dom-body-text
|
15
17
|
*/
|
16
|
-
text(): Promise<string>
|
18
|
+
text (): Promise<string>
|
17
19
|
|
18
20
|
/** Consumes and returns the body as a JavaScript Object
|
19
21
|
* https://fetch.spec.whatwg.org/#dom-body-json
|
20
22
|
*/
|
21
|
-
json(): Promise<unknown>
|
23
|
+
json (): Promise<unknown>
|
22
24
|
|
23
25
|
/** Consumes and returns the body as a Blob
|
24
26
|
* https://fetch.spec.whatwg.org/#dom-body-blob
|
25
27
|
*/
|
26
|
-
blob(): Promise<Blob>
|
28
|
+
blob (): Promise<Blob>
|
27
29
|
|
28
30
|
/** Consumes and returns the body as an Uint8Array
|
29
31
|
* https://fetch.spec.whatwg.org/#dom-body-bytes
|
30
32
|
*/
|
31
|
-
bytes(): Promise<Uint8Array>
|
33
|
+
bytes (): Promise<Uint8Array>
|
32
34
|
|
33
35
|
/** Consumes and returns the body as an ArrayBuffer
|
34
36
|
* https://fetch.spec.whatwg.org/#dom-body-arraybuffer
|
35
37
|
*/
|
36
|
-
arrayBuffer(): Promise<ArrayBuffer>
|
38
|
+
arrayBuffer (): Promise<ArrayBuffer>
|
37
39
|
|
38
40
|
/** Not implemented
|
39
41
|
*
|
40
42
|
* https://fetch.spec.whatwg.org/#dom-body-formdata
|
41
43
|
*/
|
42
|
-
formData(): Promise<never>
|
44
|
+
formData (): Promise<never>
|
43
45
|
|
44
46
|
/** Returns true if the body is not null and the body has been consumed
|
45
47
|
*
|
@@ -49,7 +51,7 @@ declare class BodyReadable extends Readable {
|
|
49
51
|
*/
|
50
52
|
readonly bodyUsed: boolean
|
51
53
|
|
52
|
-
/**
|
54
|
+
/**
|
53
55
|
* If body is null, it should return null as the body
|
54
56
|
*
|
55
57
|
* If body is not null, should return the body as a ReadableStream
|
@@ -59,7 +61,8 @@ declare class BodyReadable extends Readable {
|
|
59
61
|
readonly body: never | undefined
|
60
62
|
|
61
63
|
/** Dumps the response body by reading `limit` number of bytes.
|
62
|
-
* @param opts.limit Number of bytes to read (optional) - Default:
|
64
|
+
* @param opts.limit Number of bytes to read (optional) - Default: 131072
|
65
|
+
* @param opts.signal AbortSignal to cancel the operation (optional)
|
63
66
|
*/
|
64
|
-
dump(opts?: { limit: number }): Promise<void>
|
67
|
+
dump (opts?: { limit: number; signal?: AbortSignal }): Promise<void>
|
65
68
|
}
|
@@ -4,5 +4,5 @@ import RetryHandler from './retry-handler'
|
|
4
4
|
export default RetryAgent
|
5
5
|
|
6
6
|
declare class RetryAgent extends Dispatcher {
|
7
|
-
constructor(dispatcher: Dispatcher, options?: RetryHandler.RetryOptions)
|
7
|
+
constructor (dispatcher: Dispatcher, options?: RetryHandler.RetryOptions)
|
8
8
|
}
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import Dispatcher from
|
1
|
+
import Dispatcher from './dispatcher'
|
2
2
|
|
3
|
-
export default RetryHandler
|
3
|
+
export default RetryHandler
|
4
4
|
|
5
|
-
declare class RetryHandler implements Dispatcher.
|
6
|
-
constructor(
|
5
|
+
declare class RetryHandler implements Dispatcher.DispatchHandler {
|
6
|
+
constructor (
|
7
7
|
options: Dispatcher.DispatchOptions & {
|
8
8
|
retryOptions?: RetryHandler.RetryOptions;
|
9
9
|
},
|
10
10
|
retryHandlers: RetryHandler.RetryHandlers
|
11
|
-
)
|
11
|
+
)
|
12
12
|
}
|
13
13
|
|
14
14
|
declare namespace RetryHandler {
|
15
|
-
export type RetryState = { counter: number; }
|
15
|
+
export type RetryState = { counter: number; }
|
16
16
|
|
17
17
|
export type RetryContext = {
|
18
18
|
state: RetryState;
|
@@ -21,7 +21,7 @@ declare namespace RetryHandler {
|
|
21
21
|
};
|
22
22
|
}
|
23
23
|
|
24
|
-
export type OnRetryCallback = (result?: Error | null) => void
|
24
|
+
export type OnRetryCallback = (result?: Error | null) => void
|
25
25
|
|
26
26
|
export type RetryCallback = (
|
27
27
|
err: Error,
|
@@ -32,7 +32,7 @@ declare namespace RetryHandler {
|
|
32
32
|
};
|
33
33
|
},
|
34
34
|
callback: OnRetryCallback
|
35
|
-
) =>
|
35
|
+
) => void
|
36
36
|
|
37
37
|
export interface RetryOptions {
|
38
38
|
/**
|
@@ -110,7 +110,7 @@ declare namespace RetryHandler {
|
|
110
110
|
}
|
111
111
|
|
112
112
|
export interface RetryHandlers {
|
113
|
-
dispatch: Dispatcher[
|
114
|
-
handler: Dispatcher.
|
113
|
+
dispatch: Dispatcher['dispatch'];
|
114
|
+
handler: Dispatcher.DispatchHandler;
|
115
115
|
}
|
116
116
|
}
|
@@ -3,7 +3,7 @@ export namespace util {
|
|
3
3
|
* Retrieves a header name and returns its lowercase value.
|
4
4
|
* @param value Header name
|
5
5
|
*/
|
6
|
-
export function headerNameToString(value: string | Buffer): string
|
6
|
+
export function headerNameToString (value: string | Buffer): string
|
7
7
|
|
8
8
|
/**
|
9
9
|
* Receives a header object and returns the parsed value.
|
@@ -11,8 +11,8 @@ export namespace util {
|
|
11
11
|
* @param obj Object to specify a proxy object. Used to assign parsed values.
|
12
12
|
* @returns If `obj` is specified, it is equivalent to `obj`.
|
13
13
|
*/
|
14
|
-
export function parseHeaders(
|
14
|
+
export function parseHeaders (
|
15
15
|
headers: (Buffer | string | (Buffer | string)[])[],
|
16
16
|
obj?: Record<string, string | string[]>
|
17
|
-
): Record<string, string | string[]
|
17
|
+
): Record<string, string | string[]>
|
18
18
|
}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
// These types are not exported, and are only used internally
|
2
|
+
import * as undici from './index'
|
2
3
|
|
3
4
|
/**
|
4
5
|
* Take in an unknown value and return one that is of type T
|
@@ -34,11 +35,24 @@ interface WebidlErrors {
|
|
34
35
|
}): TypeError
|
35
36
|
}
|
36
37
|
|
38
|
+
interface WebIDLTypes {
|
39
|
+
UNDEFINED: 1,
|
40
|
+
BOOLEAN: 2,
|
41
|
+
STRING: 3,
|
42
|
+
SYMBOL: 4,
|
43
|
+
NUMBER: 5,
|
44
|
+
BIGINT: 6,
|
45
|
+
NULL: 7
|
46
|
+
OBJECT: 8
|
47
|
+
}
|
48
|
+
|
37
49
|
interface WebidlUtil {
|
38
50
|
/**
|
39
51
|
* @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values
|
40
52
|
*/
|
41
|
-
Type (object: unknown):
|
53
|
+
Type (object: unknown): WebIDLTypes[keyof WebIDLTypes]
|
54
|
+
|
55
|
+
TypeValueToString (o: unknown):
|
42
56
|
| 'Undefined'
|
43
57
|
| 'Boolean'
|
44
58
|
| 'String'
|
@@ -48,6 +62,8 @@ interface WebidlUtil {
|
|
48
62
|
| 'Null'
|
49
63
|
| 'Object'
|
50
64
|
|
65
|
+
Types: WebIDLTypes
|
66
|
+
|
51
67
|
/**
|
52
68
|
* @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
|
53
69
|
*/
|
@@ -68,6 +84,8 @@ interface WebidlUtil {
|
|
68
84
|
*/
|
69
85
|
Stringify (V: any): string
|
70
86
|
|
87
|
+
MakeTypeAssertion <I>(I: I): (arg: any) => arg is I
|
88
|
+
|
71
89
|
/**
|
72
90
|
* Mark a value as uncloneable for Node.js.
|
73
91
|
* This is only effective in some newer Node.js versions.
|
@@ -156,7 +174,7 @@ interface WebidlConverters {
|
|
156
174
|
): NodeJS.TypedArray | ArrayBufferLike | DataView
|
157
175
|
|
158
176
|
['sequence<ByteString>']: SequenceConverter<string>
|
159
|
-
|
177
|
+
|
160
178
|
['sequence<sequence<ByteString>>']: SequenceConverter<string[]>
|
161
179
|
|
162
180
|
['record<ByteString, ByteString>']: RecordConverter<string, string>
|
@@ -164,16 +182,35 @@ interface WebidlConverters {
|
|
164
182
|
[Key: string]: (...args: any[]) => unknown
|
165
183
|
}
|
166
184
|
|
185
|
+
type IsAssertion<T> = (arg: any) => arg is T
|
186
|
+
|
187
|
+
interface WebidlIs {
|
188
|
+
Request: IsAssertion<undici.Request>
|
189
|
+
Response: IsAssertion<undici.Response>
|
190
|
+
ReadableStream: IsAssertion<ReadableStream>
|
191
|
+
Blob: IsAssertion<Blob>
|
192
|
+
URLSearchParams: IsAssertion<URLSearchParams>
|
193
|
+
File: IsAssertion<File>
|
194
|
+
FormData: IsAssertion<undici.FormData>
|
195
|
+
URL: IsAssertion<URL>
|
196
|
+
WebSocketError: IsAssertion<undici.WebSocketError>
|
197
|
+
AbortSignal: IsAssertion<AbortSignal>
|
198
|
+
MessagePort: IsAssertion<MessagePort>
|
199
|
+
}
|
200
|
+
|
167
201
|
export interface Webidl {
|
168
202
|
errors: WebidlErrors
|
169
203
|
util: WebidlUtil
|
170
204
|
converters: WebidlConverters
|
205
|
+
is: WebidlIs
|
171
206
|
|
172
207
|
/**
|
173
208
|
* @description Performs a brand-check on {@param V} to ensure it is a
|
174
209
|
* {@param cls} object.
|
175
210
|
*/
|
176
|
-
brandCheck <Interface>(V: unknown, cls: Interface
|
211
|
+
brandCheck <Interface extends new () => unknown>(V: unknown, cls: Interface): asserts V is Interface
|
212
|
+
|
213
|
+
brandCheckMultiple <Interfaces extends (new () => unknown)[]> (list: Interfaces): (V: any) => asserts V is Interfaces[number]
|
177
214
|
|
178
215
|
/**
|
179
216
|
* @see https://webidl.spec.whatwg.org/#es-sequence
|
@@ -196,10 +233,11 @@ export interface Webidl {
|
|
196
233
|
* Similar to {@link Webidl.brandCheck} but allows skipping the check if third party
|
197
234
|
* interfaces are allowed.
|
198
235
|
*/
|
199
|
-
interfaceConverter <Interface>(
|
236
|
+
interfaceConverter <Interface>(typeCheck: IsAssertion<Interface>, name: string): (
|
200
237
|
V: unknown,
|
201
|
-
|
202
|
-
|
238
|
+
prefix: string,
|
239
|
+
argument: string
|
240
|
+
) => asserts V is Interface
|
203
241
|
|
204
242
|
// TODO(@KhafraDev): a type could likely be implemented that can infer the return type
|
205
243
|
// from the converters given?
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
|
3
3
|
import type { Blob } from 'buffer'
|
4
|
+
import type { ReadableStream, WritableStream } from 'stream/web'
|
4
5
|
import type { MessagePort } from 'worker_threads'
|
5
6
|
import {
|
6
7
|
EventInit,
|
@@ -22,7 +23,7 @@ interface WebSocketEventMap {
|
|
22
23
|
|
23
24
|
interface WebSocket extends EventTarget {
|
24
25
|
binaryType: BinaryType
|
25
|
-
|
26
|
+
|
26
27
|
readonly bufferedAmount: number
|
27
28
|
readonly extensions: string
|
28
29
|
|
@@ -148,3 +149,36 @@ interface WebSocketInit {
|
|
148
149
|
dispatcher?: Dispatcher,
|
149
150
|
headers?: HeadersInit
|
150
151
|
}
|
152
|
+
|
153
|
+
interface WebSocketStreamOptions {
|
154
|
+
protocols?: string | string[]
|
155
|
+
signal?: AbortSignal
|
156
|
+
}
|
157
|
+
|
158
|
+
interface WebSocketCloseInfo {
|
159
|
+
closeCode: number
|
160
|
+
reason: string
|
161
|
+
}
|
162
|
+
|
163
|
+
interface WebSocketStream {
|
164
|
+
closed: Promise<WebSocketCloseInfo>
|
165
|
+
opened: Promise<{
|
166
|
+
extensions: string
|
167
|
+
protocol: string
|
168
|
+
readable: ReadableStream
|
169
|
+
writable: WritableStream
|
170
|
+
}>
|
171
|
+
url: string
|
172
|
+
}
|
173
|
+
|
174
|
+
export declare const WebSocketStream: {
|
175
|
+
prototype: WebSocketStream
|
176
|
+
new (url: string | URL, options?: WebSocketStreamOptions): WebSocketStream
|
177
|
+
}
|
178
|
+
|
179
|
+
interface WebSocketError extends Event, WebSocketCloseInfo {}
|
180
|
+
|
181
|
+
export declare const WebSocketError: {
|
182
|
+
prototype: WebSocketError
|
183
|
+
new (type: string, init?: WebSocketCloseInfo): WebSocketError
|
184
|
+
}
|
package/package.json
CHANGED
@@ -68,7 +68,7 @@
|
|
68
68
|
"JSONStream": "^1.3.5",
|
69
69
|
"minipass": "3.2.1",
|
70
70
|
"node-ical": "0.15.1",
|
71
|
-
"projen": "^0.92.
|
71
|
+
"projen": "^0.92.10",
|
72
72
|
"rrule": "^2.8.1",
|
73
73
|
"standard-version": "^9",
|
74
74
|
"tar": "^6.2.1",
|
@@ -97,7 +97,7 @@
|
|
97
97
|
"publishConfig": {
|
98
98
|
"access": "public"
|
99
99
|
},
|
100
|
-
"version": "15.0.
|
100
|
+
"version": "15.0.18",
|
101
101
|
"jest": {
|
102
102
|
"coverageProvider": "v8",
|
103
103
|
"testMatch": [
|
@@ -1,9 +0,0 @@
|
|
1
|
-
// Declaration files in this directory contain types relating to TypeScript library features
|
2
|
-
// that are not included in all TypeScript versions supported by DefinitelyTyped, but
|
3
|
-
// which can be made backwards-compatible without needing `typesVersions`.
|
4
|
-
// If adding declarations to this directory, please specify which versions of TypeScript require them,
|
5
|
-
// so that they can be removed when no longer needed.
|
6
|
-
|
7
|
-
/// <reference path="disposable.d.ts" />
|
8
|
-
/// <reference path="indexable.d.ts" />
|
9
|
-
/// <reference path="iterators.d.ts" />
|
@@ -1,23 +0,0 @@
|
|
1
|
-
// Polyfill for ES2022's .at() method on string/array prototypes, added to TypeScript in 4.6.
|
2
|
-
// TODO: these methods are not used within @types/node, and should be removed at the next
|
3
|
-
// major @types/node version; users should include the es2022 TypeScript libraries
|
4
|
-
// if they need these features.
|
5
|
-
|
6
|
-
interface RelativeIndexable<T> {
|
7
|
-
at(index: number): T | undefined;
|
8
|
-
}
|
9
|
-
|
10
|
-
interface String extends RelativeIndexable<string> {}
|
11
|
-
interface Array<T> extends RelativeIndexable<T> {}
|
12
|
-
interface ReadonlyArray<T> extends RelativeIndexable<T> {}
|
13
|
-
interface Int8Array extends RelativeIndexable<number> {}
|
14
|
-
interface Uint8Array extends RelativeIndexable<number> {}
|
15
|
-
interface Uint8ClampedArray extends RelativeIndexable<number> {}
|
16
|
-
interface Int16Array extends RelativeIndexable<number> {}
|
17
|
-
interface Uint16Array extends RelativeIndexable<number> {}
|
18
|
-
interface Int32Array extends RelativeIndexable<number> {}
|
19
|
-
interface Uint32Array extends RelativeIndexable<number> {}
|
20
|
-
interface Float32Array extends RelativeIndexable<number> {}
|
21
|
-
interface Float64Array extends RelativeIndexable<number> {}
|
22
|
-
interface BigInt64Array extends RelativeIndexable<bigint> {}
|
23
|
-
interface BigUint64Array extends RelativeIndexable<bigint> {}
|
@@ -1,39 +0,0 @@
|
|
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
|
-
}
|
@@ -1,54 +0,0 @@
|
|
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
|
-
}
|