@rio-cloud/cdk-v2-constructs 8.2.0 → 8.2.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/.jsii +2 -2
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +105 -2
- package/node_modules/@types/node/assert.d.ts +211 -92
- package/node_modules/@types/node/async_hooks.d.ts +103 -19
- package/node_modules/@types/node/buffer.buffer.d.ts +472 -0
- package/node_modules/@types/node/buffer.d.ts +88 -516
- package/node_modules/@types/node/child_process.d.ts +167 -231
- package/node_modules/@types/node/cluster.d.ts +172 -26
- package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/node/console.d.ts +66 -28
- package/node_modules/@types/node/constants.d.ts +14 -12
- package/node_modules/@types/node/crypto.d.ts +1458 -497
- package/node_modules/@types/node/dgram.d.ts +44 -30
- package/node_modules/@types/node/diagnostics_channel.d.ts +389 -4
- package/node_modules/@types/node/dns/promises.d.ts +120 -42
- package/node_modules/@types/node/dns.d.ts +209 -95
- package/node_modules/@types/node/domain.d.ts +14 -18
- package/node_modules/@types/node/events.d.ts +245 -113
- package/node_modules/@types/node/fs/promises.d.ts +194 -96
- package/node_modules/@types/node/fs.d.ts +695 -270
- package/node_modules/@types/node/globals.d.ts +97 -308
- package/node_modules/@types/node/globals.typedarray.d.ts +41 -0
- package/node_modules/@types/node/http.d.ts +363 -97
- package/node_modules/@types/node/http2.d.ts +684 -231
- package/node_modules/@types/node/https.d.ts +122 -87
- package/node_modules/@types/node/index.d.ts +24 -11
- package/node_modules/@types/node/inspector.d.ts +220 -2690
- package/node_modules/@types/node/inspector.generated.d.ts +4239 -0
- package/node_modules/@types/node/module.d.ts +705 -149
- package/node_modules/@types/node/net.d.ts +178 -54
- package/node_modules/@types/node/os.d.ts +47 -17
- package/node_modules/@types/node/package.json +22 -97
- package/node_modules/@types/node/path.d.ts +12 -3
- package/node_modules/@types/node/perf_hooks.d.ts +500 -97
- package/node_modules/@types/node/process.d.ts +657 -87
- package/node_modules/@types/node/punycode.d.ts +5 -5
- package/node_modules/@types/node/querystring.d.ts +24 -13
- package/node_modules/@types/node/readline/promises.d.ts +25 -14
- package/node_modules/@types/node/readline.d.ts +102 -41
- package/node_modules/@types/node/repl.d.ts +38 -30
- package/node_modules/@types/node/sea.d.ts +162 -0
- package/node_modules/@types/node/sqlite.d.ts +1040 -0
- package/node_modules/@types/node/stream/consumers.d.ts +33 -7
- package/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@types/node/stream/web.d.ts +251 -28
- package/node_modules/@types/node/stream.d.ts +1060 -1055
- package/node_modules/@types/node/string_decoder.d.ts +8 -8
- package/node_modules/@types/node/test.d.ts +2133 -1166
- package/node_modules/@types/node/timers/promises.d.ts +31 -16
- package/node_modules/@types/node/timers.d.ts +159 -114
- package/node_modules/@types/node/tls.d.ts +232 -163
- package/node_modules/@types/node/trace_events.d.ts +43 -28
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +103 -0
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
- package/node_modules/@types/node/tty.d.ts +9 -9
- package/node_modules/@types/node/url.d.ts +236 -84
- package/node_modules/@types/node/util.d.ts +562 -412
- package/node_modules/@types/node/v8.d.ts +368 -21
- package/node_modules/@types/node/vm.d.ts +443 -149
- package/node_modules/@types/node/wasi.d.ts +62 -18
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +62 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
- package/node_modules/@types/node/worker_threads.d.ts +310 -107
- package/node_modules/@types/node/zlib.d.ts +301 -73
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/agent.d.ts +13 -12
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +19 -7
- package/node_modules/undici-types/cache-interceptor.d.ts +173 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +26 -15
- package/node_modules/undici-types/connector.d.ts +2 -2
- package/node_modules/undici-types/cookies.d.ts +2 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +19 -12
- package/node_modules/undici-types/dispatcher.d.ts +148 -113
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/undici-types/errors.d.ts +79 -46
- package/node_modules/undici-types/eventsource.d.ts +66 -0
- package/node_modules/undici-types/fetch.d.ts +41 -39
- package/node_modules/undici-types/formdata.d.ts +8 -8
- 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/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +11 -5
- package/node_modules/undici-types/header.d.ts +157 -1
- package/node_modules/undici-types/index.d.ts +68 -43
- package/node_modules/undici-types/interceptors.d.ts +71 -3
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +24 -23
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -42
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +21 -8
- package/node_modules/undici-types/proxy-agent.d.ts +5 -6
- package/node_modules/undici-types/readable.d.ts +24 -17
- package/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +157 -36
- package/node_modules/undici-types/websocket.d.ts +67 -12
- package/package.json +9 -60
- package/version.json +1 -1
- package/node_modules/@types/node/dom-events.d.ts +0 -122
- package/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
- package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
- package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
- package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
- package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
- package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
- package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4455
- package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -586
- package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -191
- package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
- package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
- package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
- package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
- package/node_modules/@types/node/ts4.8/events.d.ts +0 -796
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1232
- package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4289
- package/node_modules/@types/node/ts4.8/globals.d.ts +0 -381
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/http.d.ts +0 -1888
- package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
- package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
- package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
- package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
- package/node_modules/@types/node/ts4.8/module.d.ts +0 -287
- package/node_modules/@types/node/ts4.8/net.d.ts +0 -949
- package/node_modules/@types/node/ts4.8/os.d.ts +0 -477
- package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -639
- package/node_modules/@types/node/ts4.8/process.d.ts +0 -1532
- package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
- package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
- package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
- package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
- package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
- package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
- package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -350
- package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
- package/node_modules/@types/node/ts4.8/test.d.ts +0 -1382
- package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
- package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
- package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
- package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
- package/node_modules/@types/node/ts4.8/url.d.ts +0 -927
- package/node_modules/@types/node/ts4.8/util.d.ts +0 -2186
- package/node_modules/@types/node/ts4.8/v8.d.ts +0 -635
- package/node_modules/@types/node/ts4.8/vm.d.ts +0 -901
- package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
- package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
- package/node_modules/argparse/CHANGELOG.md +0 -216
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
|
@@ -1,11 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The utility consumer functions provide common options for consuming
|
|
3
|
+
* streams.
|
|
4
|
+
* @since v16.7.0
|
|
5
|
+
*/
|
|
1
6
|
declare module "stream/consumers" {
|
|
2
|
-
import { Blob as NodeBlob } from "node:buffer";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function
|
|
7
|
+
import { Blob as NodeBlob, NonSharedBuffer } from "node:buffer";
|
|
8
|
+
import { ReadableStream as WebReadableStream } from "node:stream/web";
|
|
9
|
+
/**
|
|
10
|
+
* @since v16.7.0
|
|
11
|
+
* @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream.
|
|
12
|
+
*/
|
|
13
|
+
function arrayBuffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<ArrayBuffer>;
|
|
14
|
+
/**
|
|
15
|
+
* @since v16.7.0
|
|
16
|
+
* @returns Fulfills with a `Blob` containing the full contents of the stream.
|
|
17
|
+
*/
|
|
18
|
+
function blob(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NodeBlob>;
|
|
19
|
+
/**
|
|
20
|
+
* @since v16.7.0
|
|
21
|
+
* @returns Fulfills with a `Buffer` containing the full contents of the stream.
|
|
22
|
+
*/
|
|
23
|
+
function buffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NonSharedBuffer>;
|
|
24
|
+
/**
|
|
25
|
+
* @since v16.7.0
|
|
26
|
+
* @returns Fulfills with the contents of the stream parsed as a
|
|
27
|
+
* UTF-8 encoded string that is then passed through `JSON.parse()`.
|
|
28
|
+
*/
|
|
29
|
+
function json(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* @since v16.7.0
|
|
32
|
+
* @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string.
|
|
33
|
+
*/
|
|
34
|
+
function text(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<string>;
|
|
9
35
|
}
|
|
10
36
|
declare module "node:stream/consumers" {
|
|
11
37
|
export * from "stream/consumers";
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
declare module "stream/promises" {
|
|
2
2
|
import {
|
|
3
|
-
FinishedOptions,
|
|
3
|
+
FinishedOptions as _FinishedOptions,
|
|
4
4
|
PipelineDestination,
|
|
5
5
|
PipelineOptions,
|
|
6
6
|
PipelinePromise,
|
|
7
7
|
PipelineSource,
|
|
8
8
|
PipelineTransform,
|
|
9
9
|
} from "node:stream";
|
|
10
|
+
interface FinishedOptions extends _FinishedOptions {
|
|
11
|
+
/**
|
|
12
|
+
* If true, removes the listeners registered by this function before the promise is fulfilled.
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
cleanup?: boolean | undefined;
|
|
16
|
+
}
|
|
10
17
|
function finished(
|
|
11
18
|
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
|
|
12
19
|
options?: FinishedOptions,
|
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
type _ByteLengthQueuingStrategy = typeof globalThis extends { onmessage: any } ? {}
|
|
2
|
+
: import("stream/web").ByteLengthQueuingStrategy;
|
|
3
|
+
type _CountQueuingStrategy = typeof globalThis extends { onmessage: any } ? {}
|
|
4
|
+
: import("stream/web").CountQueuingStrategy;
|
|
5
|
+
type _QueuingStrategy<T = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
6
|
+
: import("stream/web").QueuingStrategy<T>;
|
|
7
|
+
type _ReadableByteStreamController = typeof globalThis extends { onmessage: any } ? {}
|
|
8
|
+
: import("stream/web").ReadableByteStreamController;
|
|
9
|
+
type _ReadableStream<R = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
10
|
+
: import("stream/web").ReadableStream<R>;
|
|
11
|
+
type _ReadableStreamBYOBReader = typeof globalThis extends { onmessage: any } ? {}
|
|
12
|
+
: import("stream/web").ReadableStreamBYOBReader;
|
|
13
|
+
type _ReadableStreamBYOBRequest = typeof globalThis extends { onmessage: any } ? {}
|
|
14
|
+
: import("stream/web").ReadableStreamBYOBRequest;
|
|
15
|
+
type _ReadableStreamDefaultController<R = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
16
|
+
: import("stream/web").ReadableStreamDefaultController<R>;
|
|
17
|
+
type _ReadableStreamDefaultReader<R = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
18
|
+
: import("stream/web").ReadableStreamDefaultReader<R>;
|
|
19
|
+
type _TextDecoderStream = typeof globalThis extends { onmessage: any } ? {}
|
|
20
|
+
: import("stream/web").TextDecoderStream;
|
|
21
|
+
type _TextEncoderStream = typeof globalThis extends { onmessage: any } ? {}
|
|
22
|
+
: import("stream/web").TextEncoderStream;
|
|
23
|
+
type _TransformStream<I = any, O = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
24
|
+
: import("stream/web").TransformStream<I, O>;
|
|
25
|
+
type _TransformStreamDefaultController<O = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
26
|
+
: import("stream/web").TransformStreamDefaultController<O>;
|
|
27
|
+
type _WritableStream<W = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
28
|
+
: import("stream/web").WritableStream<W>;
|
|
29
|
+
type _WritableStreamDefaultController = typeof globalThis extends { onmessage: any } ? {}
|
|
30
|
+
: import("stream/web").WritableStreamDefaultController;
|
|
31
|
+
type _WritableStreamDefaultWriter<W = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
32
|
+
: import("stream/web").WritableStreamDefaultWriter<W>;
|
|
33
|
+
|
|
1
34
|
declare module "stream/web" {
|
|
2
35
|
// stub module, pending copy&paste from .d.ts or manual impl
|
|
3
36
|
// copy from lib.dom.d.ts
|
|
@@ -62,28 +95,17 @@ declare module "stream/web" {
|
|
|
62
95
|
signal?: AbortSignal;
|
|
63
96
|
}
|
|
64
97
|
interface ReadableStreamGenericReader {
|
|
65
|
-
readonly closed: Promise<
|
|
98
|
+
readonly closed: Promise<void>;
|
|
66
99
|
cancel(reason?: any): Promise<void>;
|
|
67
100
|
}
|
|
68
|
-
interface ReadableStreamDefaultReadValueResult<T> {
|
|
69
|
-
done: false;
|
|
70
|
-
value: T;
|
|
71
|
-
}
|
|
72
|
-
interface ReadableStreamDefaultReadDoneResult {
|
|
73
|
-
done: true;
|
|
74
|
-
value?: undefined;
|
|
75
|
-
}
|
|
76
101
|
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
|
|
77
|
-
type ReadableStreamDefaultReadResult<T> =
|
|
78
|
-
| ReadableStreamDefaultReadValueResult<T>
|
|
79
|
-
| ReadableStreamDefaultReadDoneResult;
|
|
80
102
|
interface ReadableStreamReadValueResult<T> {
|
|
81
103
|
done: false;
|
|
82
104
|
value: T;
|
|
83
105
|
}
|
|
84
106
|
interface ReadableStreamReadDoneResult<T> {
|
|
85
107
|
done: true;
|
|
86
|
-
value
|
|
108
|
+
value: T | undefined;
|
|
87
109
|
}
|
|
88
110
|
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
|
|
89
111
|
interface ReadableByteStreamControllerCallback {
|
|
@@ -119,6 +141,9 @@ declare module "stream/web" {
|
|
|
119
141
|
interface TransformerTransformCallback<I, O> {
|
|
120
142
|
(chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
|
121
143
|
}
|
|
144
|
+
interface TransformerCancelCallback {
|
|
145
|
+
(reason: any): void | PromiseLike<void>;
|
|
146
|
+
}
|
|
122
147
|
interface UnderlyingByteSource {
|
|
123
148
|
autoAllocateChunkSize?: number;
|
|
124
149
|
cancel?: ReadableStreamErrorCallback;
|
|
@@ -142,39 +167,77 @@ declare module "stream/web" {
|
|
|
142
167
|
interface ReadableStreamErrorCallback {
|
|
143
168
|
(reason: any): void | PromiseLike<void>;
|
|
144
169
|
}
|
|
170
|
+
interface ReadableStreamAsyncIterator<T> extends NodeJS.AsyncIterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
|
|
171
|
+
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
|
|
172
|
+
}
|
|
145
173
|
/** This Streams API interface represents a readable stream of byte data. */
|
|
146
174
|
interface ReadableStream<R = any> {
|
|
147
175
|
readonly locked: boolean;
|
|
148
176
|
cancel(reason?: any): Promise<void>;
|
|
149
|
-
getReader(): ReadableStreamDefaultReader<R>;
|
|
150
177
|
getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
|
|
178
|
+
getReader(): ReadableStreamDefaultReader<R>;
|
|
179
|
+
getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<R>;
|
|
151
180
|
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
|
|
152
181
|
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
|
|
153
182
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
154
|
-
values(options?: { preventCancel?: boolean }):
|
|
155
|
-
[Symbol.asyncIterator]():
|
|
183
|
+
values(options?: { preventCancel?: boolean }): ReadableStreamAsyncIterator<R>;
|
|
184
|
+
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<R>;
|
|
156
185
|
}
|
|
157
186
|
const ReadableStream: {
|
|
158
187
|
prototype: ReadableStream;
|
|
188
|
+
from<T>(iterable: Iterable<T> | AsyncIterable<T>): ReadableStream<T>;
|
|
159
189
|
new(underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>;
|
|
160
190
|
new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
161
191
|
};
|
|
192
|
+
type ReadableStreamReaderMode = "byob";
|
|
193
|
+
interface ReadableStreamGetReaderOptions {
|
|
194
|
+
/**
|
|
195
|
+
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
|
|
196
|
+
*
|
|
197
|
+
* This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation.
|
|
198
|
+
*/
|
|
199
|
+
mode?: ReadableStreamReaderMode;
|
|
200
|
+
}
|
|
201
|
+
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
|
|
162
202
|
interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
|
|
163
|
-
read(): Promise<
|
|
203
|
+
read(): Promise<ReadableStreamReadResult<R>>;
|
|
164
204
|
releaseLock(): void;
|
|
165
205
|
}
|
|
206
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
166
207
|
interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
|
|
167
|
-
|
|
208
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
209
|
+
read<T extends ArrayBufferView>(
|
|
210
|
+
view: T,
|
|
211
|
+
options?: {
|
|
212
|
+
min?: number;
|
|
213
|
+
},
|
|
214
|
+
): Promise<ReadableStreamReadResult<T>>;
|
|
215
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
168
216
|
releaseLock(): void;
|
|
169
217
|
}
|
|
170
218
|
const ReadableStreamDefaultReader: {
|
|
171
219
|
prototype: ReadableStreamDefaultReader;
|
|
172
220
|
new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
|
|
173
221
|
};
|
|
174
|
-
const ReadableStreamBYOBReader:
|
|
175
|
-
|
|
222
|
+
const ReadableStreamBYOBReader: {
|
|
223
|
+
prototype: ReadableStreamBYOBReader;
|
|
224
|
+
new(stream: ReadableStream): ReadableStreamBYOBReader;
|
|
225
|
+
};
|
|
226
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
227
|
+
interface ReadableStreamBYOBRequest {
|
|
228
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
229
|
+
readonly view: ArrayBufferView | null;
|
|
230
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
231
|
+
respond(bytesWritten: number): void;
|
|
232
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
233
|
+
respondWithNewView(view: ArrayBufferView): void;
|
|
234
|
+
}
|
|
235
|
+
const ReadableStreamBYOBRequest: {
|
|
236
|
+
prototype: ReadableStreamBYOBRequest;
|
|
237
|
+
new(): ReadableStreamBYOBRequest;
|
|
238
|
+
};
|
|
176
239
|
interface ReadableByteStreamController {
|
|
177
|
-
readonly byobRequest:
|
|
240
|
+
readonly byobRequest: ReadableStreamBYOBRequest | null;
|
|
178
241
|
readonly desiredSize: number | null;
|
|
179
242
|
close(): void;
|
|
180
243
|
enqueue(chunk: ArrayBufferView): void;
|
|
@@ -187,7 +250,7 @@ declare module "stream/web" {
|
|
|
187
250
|
interface ReadableStreamDefaultController<R = any> {
|
|
188
251
|
readonly desiredSize: number | null;
|
|
189
252
|
close(): void;
|
|
190
|
-
enqueue(chunk
|
|
253
|
+
enqueue(chunk: R): void;
|
|
191
254
|
error(e?: any): void;
|
|
192
255
|
}
|
|
193
256
|
const ReadableStreamDefaultController: {
|
|
@@ -199,6 +262,7 @@ declare module "stream/web" {
|
|
|
199
262
|
readableType?: undefined;
|
|
200
263
|
start?: TransformerStartCallback<O>;
|
|
201
264
|
transform?: TransformerTransformCallback<I, O>;
|
|
265
|
+
cancel?: TransformerCancelCallback;
|
|
202
266
|
writableType?: undefined;
|
|
203
267
|
}
|
|
204
268
|
interface TransformStream<I = any, O = any> {
|
|
@@ -215,7 +279,7 @@ declare module "stream/web" {
|
|
|
215
279
|
};
|
|
216
280
|
interface TransformStreamDefaultController<O = any> {
|
|
217
281
|
readonly desiredSize: number | null;
|
|
218
|
-
enqueue(chunk
|
|
282
|
+
enqueue(chunk: O): void;
|
|
219
283
|
error(reason?: any): void;
|
|
220
284
|
terminate(): void;
|
|
221
285
|
}
|
|
@@ -245,13 +309,13 @@ declare module "stream/web" {
|
|
|
245
309
|
* sink.
|
|
246
310
|
*/
|
|
247
311
|
interface WritableStreamDefaultWriter<W = any> {
|
|
248
|
-
readonly closed: Promise<
|
|
312
|
+
readonly closed: Promise<void>;
|
|
249
313
|
readonly desiredSize: number | null;
|
|
250
|
-
readonly ready: Promise<
|
|
314
|
+
readonly ready: Promise<void>;
|
|
251
315
|
abort(reason?: any): Promise<void>;
|
|
252
316
|
close(): Promise<void>;
|
|
253
317
|
releaseLock(): void;
|
|
254
|
-
write(chunk
|
|
318
|
+
write(chunk: W): Promise<void>;
|
|
255
319
|
}
|
|
256
320
|
const WritableStreamDefaultWriter: {
|
|
257
321
|
prototype: WritableStreamDefaultWriter;
|
|
@@ -275,7 +339,7 @@ declare module "stream/web" {
|
|
|
275
339
|
size?: QueuingStrategySize<T>;
|
|
276
340
|
}
|
|
277
341
|
interface QueuingStrategySize<T = any> {
|
|
278
|
-
(chunk
|
|
342
|
+
(chunk: T): number;
|
|
279
343
|
}
|
|
280
344
|
interface QueuingStrategyInit {
|
|
281
345
|
/**
|
|
@@ -342,8 +406,167 @@ declare module "stream/web" {
|
|
|
342
406
|
}
|
|
343
407
|
const TextDecoderStream: {
|
|
344
408
|
prototype: TextDecoderStream;
|
|
345
|
-
new(
|
|
409
|
+
new(encoding?: string, options?: TextDecoderOptions): TextDecoderStream;
|
|
346
410
|
};
|
|
411
|
+
type CompressionFormat = "brotli" | "deflate" | "deflate-raw" | "gzip";
|
|
412
|
+
class CompressionStream {
|
|
413
|
+
constructor(format: CompressionFormat);
|
|
414
|
+
readonly readable: ReadableStream;
|
|
415
|
+
readonly writable: WritableStream;
|
|
416
|
+
}
|
|
417
|
+
class DecompressionStream {
|
|
418
|
+
constructor(format: CompressionFormat);
|
|
419
|
+
readonly readable: ReadableStream;
|
|
420
|
+
readonly writable: WritableStream;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
global {
|
|
424
|
+
interface ByteLengthQueuingStrategy extends _ByteLengthQueuingStrategy {}
|
|
425
|
+
/**
|
|
426
|
+
* `ByteLengthQueuingStrategy` class is a global reference for `import { ByteLengthQueuingStrategy } from 'node:stream/web'`.
|
|
427
|
+
* https://nodejs.org/api/globals.html#class-bytelengthqueuingstrategy
|
|
428
|
+
* @since v18.0.0
|
|
429
|
+
*/
|
|
430
|
+
var ByteLengthQueuingStrategy: typeof globalThis extends { onmessage: any; ByteLengthQueuingStrategy: infer T }
|
|
431
|
+
? T
|
|
432
|
+
: typeof import("stream/web").ByteLengthQueuingStrategy;
|
|
433
|
+
|
|
434
|
+
interface CountQueuingStrategy extends _CountQueuingStrategy {}
|
|
435
|
+
/**
|
|
436
|
+
* `CountQueuingStrategy` class is a global reference for `import { CountQueuingStrategy } from 'node:stream/web'`.
|
|
437
|
+
* https://nodejs.org/api/globals.html#class-countqueuingstrategy
|
|
438
|
+
* @since v18.0.0
|
|
439
|
+
*/
|
|
440
|
+
var CountQueuingStrategy: typeof globalThis extends { onmessage: any; CountQueuingStrategy: infer T } ? T
|
|
441
|
+
: typeof import("stream/web").CountQueuingStrategy;
|
|
442
|
+
|
|
443
|
+
interface QueuingStrategy<T = any> extends _QueuingStrategy<T> {}
|
|
444
|
+
|
|
445
|
+
interface ReadableByteStreamController extends _ReadableByteStreamController {}
|
|
446
|
+
/**
|
|
447
|
+
* `ReadableByteStreamController` class is a global reference for `import { ReadableByteStreamController } from 'node:stream/web'`.
|
|
448
|
+
* https://nodejs.org/api/globals.html#class-readablebytestreamcontroller
|
|
449
|
+
* @since v18.0.0
|
|
450
|
+
*/
|
|
451
|
+
var ReadableByteStreamController: typeof globalThis extends
|
|
452
|
+
{ onmessage: any; ReadableByteStreamController: infer T } ? T
|
|
453
|
+
: typeof import("stream/web").ReadableByteStreamController;
|
|
454
|
+
|
|
455
|
+
interface ReadableStream<R = any> extends _ReadableStream<R> {}
|
|
456
|
+
/**
|
|
457
|
+
* `ReadableStream` class is a global reference for `import { ReadableStream } from 'node:stream/web'`.
|
|
458
|
+
* https://nodejs.org/api/globals.html#class-readablestream
|
|
459
|
+
* @since v18.0.0
|
|
460
|
+
*/
|
|
461
|
+
var ReadableStream: typeof globalThis extends { onmessage: any; ReadableStream: infer T } ? T
|
|
462
|
+
: typeof import("stream/web").ReadableStream;
|
|
463
|
+
|
|
464
|
+
interface ReadableStreamBYOBReader extends _ReadableStreamBYOBReader {}
|
|
465
|
+
/**
|
|
466
|
+
* `ReadableStreamBYOBReader` class is a global reference for `import { ReadableStreamBYOBReader } from 'node:stream/web'`.
|
|
467
|
+
* https://nodejs.org/api/globals.html#class-readablestreambyobreader
|
|
468
|
+
* @since v18.0.0
|
|
469
|
+
*/
|
|
470
|
+
var ReadableStreamBYOBReader: typeof globalThis extends { onmessage: any; ReadableStreamBYOBReader: infer T }
|
|
471
|
+
? T
|
|
472
|
+
: typeof import("stream/web").ReadableStreamBYOBReader;
|
|
473
|
+
|
|
474
|
+
interface ReadableStreamBYOBRequest extends _ReadableStreamBYOBRequest {}
|
|
475
|
+
/**
|
|
476
|
+
* `ReadableStreamBYOBRequest` class is a global reference for `import { ReadableStreamBYOBRequest } from 'node:stream/web'`.
|
|
477
|
+
* https://nodejs.org/api/globals.html#class-readablestreambyobrequest
|
|
478
|
+
* @since v18.0.0
|
|
479
|
+
*/
|
|
480
|
+
var ReadableStreamBYOBRequest: typeof globalThis extends { onmessage: any; ReadableStreamBYOBRequest: infer T }
|
|
481
|
+
? T
|
|
482
|
+
: typeof import("stream/web").ReadableStreamBYOBRequest;
|
|
483
|
+
|
|
484
|
+
interface ReadableStreamDefaultController<R = any> extends _ReadableStreamDefaultController<R> {}
|
|
485
|
+
/**
|
|
486
|
+
* `ReadableStreamDefaultController` class is a global reference for `import { ReadableStreamDefaultController } from 'node:stream/web'`.
|
|
487
|
+
* https://nodejs.org/api/globals.html#class-readablestreamdefaultcontroller
|
|
488
|
+
* @since v18.0.0
|
|
489
|
+
*/
|
|
490
|
+
var ReadableStreamDefaultController: typeof globalThis extends
|
|
491
|
+
{ onmessage: any; ReadableStreamDefaultController: infer T } ? T
|
|
492
|
+
: typeof import("stream/web").ReadableStreamDefaultController;
|
|
493
|
+
|
|
494
|
+
interface ReadableStreamDefaultReader<R = any> extends _ReadableStreamDefaultReader<R> {}
|
|
495
|
+
/**
|
|
496
|
+
* `ReadableStreamDefaultReader` class is a global reference for `import { ReadableStreamDefaultReader } from 'node:stream/web'`.
|
|
497
|
+
* https://nodejs.org/api/globals.html#class-readablestreamdefaultreader
|
|
498
|
+
* @since v18.0.0
|
|
499
|
+
*/
|
|
500
|
+
var ReadableStreamDefaultReader: typeof globalThis extends
|
|
501
|
+
{ onmessage: any; ReadableStreamDefaultReader: infer T } ? T
|
|
502
|
+
: typeof import("stream/web").ReadableStreamDefaultReader;
|
|
503
|
+
|
|
504
|
+
interface TextDecoderStream extends _TextDecoderStream {}
|
|
505
|
+
/**
|
|
506
|
+
* `TextDecoderStream` class is a global reference for `import { TextDecoderStream } from 'node:stream/web'`.
|
|
507
|
+
* https://nodejs.org/api/globals.html#class-textdecoderstream
|
|
508
|
+
* @since v18.0.0
|
|
509
|
+
*/
|
|
510
|
+
var TextDecoderStream: typeof globalThis extends { onmessage: any; TextDecoderStream: infer T } ? T
|
|
511
|
+
: typeof import("stream/web").TextDecoderStream;
|
|
512
|
+
|
|
513
|
+
interface TextEncoderStream extends _TextEncoderStream {}
|
|
514
|
+
/**
|
|
515
|
+
* `TextEncoderStream` class is a global reference for `import { TextEncoderStream } from 'node:stream/web'`.
|
|
516
|
+
* https://nodejs.org/api/globals.html#class-textencoderstream
|
|
517
|
+
* @since v18.0.0
|
|
518
|
+
*/
|
|
519
|
+
var TextEncoderStream: typeof globalThis extends { onmessage: any; TextEncoderStream: infer T } ? T
|
|
520
|
+
: typeof import("stream/web").TextEncoderStream;
|
|
521
|
+
|
|
522
|
+
interface TransformStream<I = any, O = any> extends _TransformStream<I, O> {}
|
|
523
|
+
/**
|
|
524
|
+
* `TransformStream` class is a global reference for `import { TransformStream } from 'node:stream/web'`.
|
|
525
|
+
* https://nodejs.org/api/globals.html#class-transformstream
|
|
526
|
+
* @since v18.0.0
|
|
527
|
+
*/
|
|
528
|
+
var TransformStream: typeof globalThis extends { onmessage: any; TransformStream: infer T } ? T
|
|
529
|
+
: typeof import("stream/web").TransformStream;
|
|
530
|
+
|
|
531
|
+
interface TransformStreamDefaultController<O = any> extends _TransformStreamDefaultController<O> {}
|
|
532
|
+
/**
|
|
533
|
+
* `TransformStreamDefaultController` class is a global reference for `import { TransformStreamDefaultController } from 'node:stream/web'`.
|
|
534
|
+
* https://nodejs.org/api/globals.html#class-transformstreamdefaultcontroller
|
|
535
|
+
* @since v18.0.0
|
|
536
|
+
*/
|
|
537
|
+
var TransformStreamDefaultController: typeof globalThis extends
|
|
538
|
+
{ onmessage: any; TransformStreamDefaultController: infer T } ? T
|
|
539
|
+
: typeof import("stream/web").TransformStreamDefaultController;
|
|
540
|
+
|
|
541
|
+
interface WritableStream<W = any> extends _WritableStream<W> {}
|
|
542
|
+
/**
|
|
543
|
+
* `WritableStream` class is a global reference for `import { WritableStream } from 'node:stream/web'`.
|
|
544
|
+
* https://nodejs.org/api/globals.html#class-writablestream
|
|
545
|
+
* @since v18.0.0
|
|
546
|
+
*/
|
|
547
|
+
var WritableStream: typeof globalThis extends { onmessage: any; WritableStream: infer T } ? T
|
|
548
|
+
: typeof import("stream/web").WritableStream;
|
|
549
|
+
|
|
550
|
+
interface WritableStreamDefaultController extends _WritableStreamDefaultController {}
|
|
551
|
+
/**
|
|
552
|
+
* `WritableStreamDefaultController` class is a global reference for `import { WritableStreamDefaultController } from 'node:stream/web'`.
|
|
553
|
+
* https://nodejs.org/api/globals.html#class-writablestreamdefaultcontroller
|
|
554
|
+
* @since v18.0.0
|
|
555
|
+
*/
|
|
556
|
+
var WritableStreamDefaultController: typeof globalThis extends
|
|
557
|
+
{ onmessage: any; WritableStreamDefaultController: infer T } ? T
|
|
558
|
+
: typeof import("stream/web").WritableStreamDefaultController;
|
|
559
|
+
|
|
560
|
+
interface WritableStreamDefaultWriter<W = any> extends _WritableStreamDefaultWriter<W> {}
|
|
561
|
+
/**
|
|
562
|
+
* `WritableStreamDefaultWriter` class is a global reference for `import { WritableStreamDefaultWriter } from 'node:stream/web'`.
|
|
563
|
+
* https://nodejs.org/api/globals.html#class-writablestreamdefaultwriter
|
|
564
|
+
* @since v18.0.0
|
|
565
|
+
*/
|
|
566
|
+
var WritableStreamDefaultWriter: typeof globalThis extends
|
|
567
|
+
{ onmessage: any; WritableStreamDefaultWriter: infer T } ? T
|
|
568
|
+
: typeof import("stream/web").WritableStreamDefaultWriter;
|
|
569
|
+
}
|
|
347
570
|
}
|
|
348
571
|
declare module "node:stream/web" {
|
|
349
572
|
export * from "stream/web";
|