@emulsify/cli 1.10.2 → 1.11.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/README.md +6 -6
- package/dist/node_modules/.package-lock.json +22 -22
- package/dist/node_modules/@types/node/README.md +1 -1
- package/dist/node_modules/@types/node/assert.d.ts +2 -2
- package/dist/node_modules/@types/node/buffer.buffer.d.ts +385 -0
- package/dist/node_modules/@types/node/buffer.d.ts +42 -390
- package/dist/node_modules/@types/node/child_process.d.ts +32 -28
- package/dist/node_modules/@types/node/cluster.d.ts +1 -1
- package/dist/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/dist/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/dist/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/dist/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/dist/node_modules/@types/node/console.d.ts +2 -2
- package/dist/node_modules/@types/node/crypto.d.ts +3 -3
- package/dist/node_modules/@types/node/dns/promises.d.ts +6 -5
- package/dist/node_modules/@types/node/dns.d.ts +5 -5
- package/dist/node_modules/@types/node/domain.d.ts +2 -2
- package/dist/node_modules/@types/node/events.d.ts +3 -3
- package/dist/node_modules/@types/node/fs/promises.d.ts +2 -2
- package/dist/node_modules/@types/node/fs.d.ts +2 -2
- package/dist/node_modules/@types/node/globals.d.ts +124 -68
- package/dist/node_modules/@types/node/globals.typedarray.d.ts +21 -0
- package/dist/node_modules/@types/node/http.d.ts +43 -7
- package/dist/node_modules/@types/node/http2.d.ts +238 -101
- package/dist/node_modules/@types/node/https.d.ts +17 -23
- package/dist/node_modules/@types/node/index.d.ts +11 -9
- package/dist/node_modules/@types/node/inspector.d.ts +1061 -111
- package/dist/node_modules/@types/node/module.d.ts +3 -3
- package/dist/node_modules/@types/node/net.d.ts +8 -2
- package/dist/node_modules/@types/node/os.d.ts +1 -1
- package/dist/node_modules/@types/node/package.json +11 -3
- package/dist/node_modules/@types/node/path.d.ts +10 -1
- package/dist/node_modules/@types/node/perf_hooks.d.ts +49 -20
- package/dist/node_modules/@types/node/process.d.ts +142 -17
- package/dist/node_modules/@types/node/punycode.d.ts +1 -1
- package/dist/node_modules/@types/node/querystring.d.ts +1 -1
- package/dist/node_modules/@types/node/readline/promises.d.ts +1 -1
- package/dist/node_modules/@types/node/readline.d.ts +10 -10
- package/dist/node_modules/@types/node/repl.d.ts +4 -4
- package/dist/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/dist/node_modules/@types/node/stream/web.d.ts +182 -25
- package/dist/node_modules/@types/node/stream.d.ts +36 -17
- package/dist/node_modules/@types/node/string_decoder.d.ts +3 -3
- package/dist/node_modules/@types/node/test.d.ts +313 -94
- package/dist/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/dist/node_modules/@types/node/timers.d.ts +1 -1
- package/dist/node_modules/@types/node/tls.d.ts +5 -5
- package/dist/node_modules/@types/node/trace_events.d.ts +4 -4
- package/dist/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
- package/dist/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
- package/dist/node_modules/@types/node/ts5.6/index.d.ts +91 -0
- package/dist/node_modules/@types/node/tty.d.ts +1 -1
- package/dist/node_modules/@types/node/url.d.ts +14 -11
- package/dist/node_modules/@types/node/util.d.ts +55 -49
- package/dist/node_modules/@types/node/v8.d.ts +12 -12
- package/dist/node_modules/@types/node/vm.d.ts +11 -12
- package/dist/node_modules/@types/node/worker_threads.d.ts +22 -22
- package/dist/node_modules/@types/node/zlib.d.ts +17 -8
- package/dist/node_modules/debug/README.md +1 -1
- package/dist/node_modules/debug/package.json +2 -2
- package/dist/node_modules/fast-uri/.github/workflows/ci.yml +2 -2
- package/dist/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +1 -1
- package/dist/node_modules/fast-uri/index.js +3 -9
- package/dist/node_modules/fast-uri/package.json +4 -4
- package/dist/node_modules/fast-uri/test/ajv.test.js +1 -1
- package/dist/node_modules/fast-uri/test/compatibility.test.js +3 -2
- package/dist/node_modules/fast-uri/test/equal.test.js +1 -2
- package/dist/node_modules/fast-uri/test/parse.test.js +1 -2
- package/dist/node_modules/fast-uri/test/resolve.test.js +1 -2
- package/dist/node_modules/fast-uri/test/serialize.test.js +1 -2
- package/dist/node_modules/fast-uri/test/uri-js.test.js +539 -567
- package/dist/node_modules/fast-uri/test/util.test.js +2 -3
- package/dist/node_modules/ms/index.js +1 -1
- package/dist/node_modules/ms/license.md +1 -1
- package/dist/node_modules/ms/package.json +5 -4
- package/dist/node_modules/ms/readme.md +1 -2
- package/dist/node_modules/simple-git/dist/cjs/index.js +14 -15
- package/dist/node_modules/simple-git/dist/cjs/index.js.map +2 -2
- package/dist/node_modules/simple-git/dist/esm/index.js +14 -15
- package/dist/node_modules/simple-git/dist/esm/index.js.map +2 -2
- package/dist/node_modules/simple-git/dist/typings/response.d.ts +7 -6
- package/dist/node_modules/simple-git/package.json +5 -5
- package/dist/node_modules/undici-types/LICENSE +21 -0
- package/dist/node_modules/undici-types/balanced-pool.d.ts +11 -0
- package/dist/node_modules/undici-types/client.d.ts +12 -1
- package/dist/node_modules/undici-types/diagnostics-channel.d.ts +1 -2
- package/dist/node_modules/undici-types/dispatcher.d.ts +18 -4
- package/dist/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/dist/node_modules/undici-types/errors.d.ts +21 -0
- package/dist/node_modules/undici-types/eventsource.d.ts +63 -0
- package/dist/node_modules/undici-types/fetch.d.ts +25 -25
- package/dist/node_modules/undici-types/formdata.d.ts +1 -1
- package/dist/node_modules/undici-types/handlers.d.ts +10 -4
- package/dist/node_modules/undici-types/index.d.ts +10 -2
- package/dist/node_modules/undici-types/interceptors.d.ts +12 -2
- package/dist/node_modules/undici-types/mock-interceptor.d.ts +4 -4
- package/dist/node_modules/undici-types/package.json +1 -1
- package/dist/node_modules/undici-types/pool.d.ts +11 -0
- package/dist/node_modules/undici-types/proxy-agent.d.ts +0 -2
- package/dist/node_modules/undici-types/readable.d.ts +2 -3
- package/dist/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/dist/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/dist/node_modules/undici-types/util.d.ts +18 -0
- package/dist/node_modules/undici-types/webidl.d.ts +10 -8
- package/dist/node_modules/undici-types/websocket.d.ts +22 -1
- package/dist/package-lock.json +834 -700
- package/dist/package.json +2 -2
- package/dist/util/system/getAvailableSystems.js +5 -0
- package/package.json +2 -2
- package/dist/node_modules/@types/node/globals.global.d.ts +0 -1
- package/dist/node_modules/fast-uri/.taprc +0 -3
|
@@ -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,38 @@
|
|
|
1
|
+
type _ByteLengthQueuingStrategy = typeof globalThis extends { onmessage: any } ? {}
|
|
2
|
+
: import("stream/web").ByteLengthQueuingStrategy;
|
|
3
|
+
type _CompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {}
|
|
4
|
+
: import("stream/web").CompressionStream;
|
|
5
|
+
type _CountQueuingStrategy = typeof globalThis extends { onmessage: any } ? {}
|
|
6
|
+
: import("stream/web").CountQueuingStrategy;
|
|
7
|
+
type _DecompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {}
|
|
8
|
+
: import("stream/web").DecompressionStream;
|
|
9
|
+
type _ReadableByteStreamController = typeof globalThis extends { onmessage: any } ? {}
|
|
10
|
+
: import("stream/web").ReadableByteStreamController;
|
|
11
|
+
type _ReadableStream<R = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
12
|
+
: import("stream/web").ReadableStream<R>;
|
|
13
|
+
type _ReadableStreamBYOBReader = typeof globalThis extends { onmessage: any } ? {}
|
|
14
|
+
: import("stream/web").ReadableStreamBYOBReader;
|
|
15
|
+
type _ReadableStreamBYOBRequest = typeof globalThis extends { onmessage: any } ? {}
|
|
16
|
+
: import("stream/web").ReadableStreamBYOBRequest;
|
|
17
|
+
type _ReadableStreamDefaultController<R = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
18
|
+
: import("stream/web").ReadableStreamDefaultController<R>;
|
|
19
|
+
type _ReadableStreamDefaultReader<R = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
20
|
+
: import("stream/web").ReadableStreamDefaultReader<R>;
|
|
21
|
+
type _TextDecoderStream = typeof globalThis extends { onmessage: any } ? {}
|
|
22
|
+
: import("stream/web").TextDecoderStream;
|
|
23
|
+
type _TextEncoderStream = typeof globalThis extends { onmessage: any } ? {}
|
|
24
|
+
: import("stream/web").TextEncoderStream;
|
|
25
|
+
type _TransformStream<I = any, O = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
26
|
+
: import("stream/web").TransformStream<I, O>;
|
|
27
|
+
type _TransformStreamDefaultController<O = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
28
|
+
: import("stream/web").TransformStreamDefaultController<O>;
|
|
29
|
+
type _WritableStream<W = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
30
|
+
: import("stream/web").WritableStream<W>;
|
|
31
|
+
type _WritableStreamDefaultController = typeof globalThis extends { onmessage: any } ? {}
|
|
32
|
+
: import("stream/web").WritableStreamDefaultController;
|
|
33
|
+
type _WritableStreamDefaultWriter<W = any> = typeof globalThis extends { onmessage: any } ? {}
|
|
34
|
+
: import("stream/web").WritableStreamDefaultWriter<W>;
|
|
35
|
+
|
|
1
36
|
declare module "stream/web" {
|
|
2
37
|
// stub module, pending copy&paste from .d.ts or manual impl
|
|
3
38
|
// copy from lib.dom.d.ts
|
|
@@ -65,18 +100,7 @@ declare module "stream/web" {
|
|
|
65
100
|
readonly closed: Promise<undefined>;
|
|
66
101
|
cancel(reason?: any): Promise<void>;
|
|
67
102
|
}
|
|
68
|
-
interface ReadableStreamDefaultReadValueResult<T> {
|
|
69
|
-
done: false;
|
|
70
|
-
value: T;
|
|
71
|
-
}
|
|
72
|
-
interface ReadableStreamDefaultReadDoneResult {
|
|
73
|
-
done: true;
|
|
74
|
-
value?: undefined;
|
|
75
|
-
}
|
|
76
103
|
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
|
|
77
|
-
type ReadableStreamDefaultReadResult<T> =
|
|
78
|
-
| ReadableStreamDefaultReadValueResult<T>
|
|
79
|
-
| ReadableStreamDefaultReadDoneResult;
|
|
80
104
|
interface ReadableStreamReadValueResult<T> {
|
|
81
105
|
done: false;
|
|
82
106
|
value: T;
|
|
@@ -142,17 +166,21 @@ declare module "stream/web" {
|
|
|
142
166
|
interface ReadableStreamErrorCallback {
|
|
143
167
|
(reason: any): void | PromiseLike<void>;
|
|
144
168
|
}
|
|
169
|
+
interface ReadableStreamAsyncIterator<T> extends NodeJS.AsyncIterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
|
|
170
|
+
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
|
|
171
|
+
}
|
|
145
172
|
/** This Streams API interface represents a readable stream of byte data. */
|
|
146
173
|
interface ReadableStream<R = any> {
|
|
147
174
|
readonly locked: boolean;
|
|
148
175
|
cancel(reason?: any): Promise<void>;
|
|
149
|
-
getReader(): ReadableStreamDefaultReader<R>;
|
|
150
176
|
getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
|
|
177
|
+
getReader(): ReadableStreamDefaultReader<R>;
|
|
178
|
+
getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<R>;
|
|
151
179
|
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
|
|
152
180
|
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
|
|
153
181
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
154
|
-
values(options?: { preventCancel?: boolean }):
|
|
155
|
-
[Symbol.asyncIterator]():
|
|
182
|
+
values(options?: { preventCancel?: boolean }): ReadableStreamAsyncIterator<R>;
|
|
183
|
+
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<R>;
|
|
156
184
|
}
|
|
157
185
|
const ReadableStream: {
|
|
158
186
|
prototype: ReadableStream;
|
|
@@ -160,20 +188,48 @@ declare module "stream/web" {
|
|
|
160
188
|
new(underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>;
|
|
161
189
|
new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
162
190
|
};
|
|
191
|
+
type ReadableStreamReaderMode = "byob";
|
|
192
|
+
interface ReadableStreamGetReaderOptions {
|
|
193
|
+
/**
|
|
194
|
+
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
|
|
195
|
+
*
|
|
196
|
+
* 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.
|
|
197
|
+
*/
|
|
198
|
+
mode?: ReadableStreamReaderMode;
|
|
199
|
+
}
|
|
200
|
+
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
|
|
163
201
|
interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
|
|
164
|
-
read(): Promise<
|
|
202
|
+
read(): Promise<ReadableStreamReadResult<R>>;
|
|
165
203
|
releaseLock(): void;
|
|
166
204
|
}
|
|
205
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
167
206
|
interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
|
|
207
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
168
208
|
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
|
|
209
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
169
210
|
releaseLock(): void;
|
|
170
211
|
}
|
|
171
212
|
const ReadableStreamDefaultReader: {
|
|
172
213
|
prototype: ReadableStreamDefaultReader;
|
|
173
214
|
new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
|
|
174
215
|
};
|
|
175
|
-
const ReadableStreamBYOBReader:
|
|
176
|
-
|
|
216
|
+
const ReadableStreamBYOBReader: {
|
|
217
|
+
prototype: ReadableStreamBYOBReader;
|
|
218
|
+
new(stream: ReadableStream): ReadableStreamBYOBReader;
|
|
219
|
+
};
|
|
220
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
221
|
+
interface ReadableStreamBYOBRequest {
|
|
222
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
223
|
+
readonly view: ArrayBufferView | null;
|
|
224
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
225
|
+
respond(bytesWritten: number): void;
|
|
226
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
227
|
+
respondWithNewView(view: ArrayBufferView): void;
|
|
228
|
+
}
|
|
229
|
+
const ReadableStreamBYOBRequest: {
|
|
230
|
+
prototype: ReadableStreamBYOBRequest;
|
|
231
|
+
new(): ReadableStreamBYOBRequest;
|
|
232
|
+
};
|
|
177
233
|
interface ReadableByteStreamController {
|
|
178
234
|
readonly byobRequest: undefined;
|
|
179
235
|
readonly desiredSize: number | null;
|
|
@@ -345,22 +401,123 @@ declare module "stream/web" {
|
|
|
345
401
|
prototype: TextDecoderStream;
|
|
346
402
|
new(encoding?: string, options?: TextDecoderOptions): TextDecoderStream;
|
|
347
403
|
};
|
|
348
|
-
interface CompressionStream
|
|
349
|
-
readonly readable: ReadableStream
|
|
350
|
-
readonly writable: WritableStream
|
|
404
|
+
interface CompressionStream {
|
|
405
|
+
readonly readable: ReadableStream;
|
|
406
|
+
readonly writable: WritableStream;
|
|
351
407
|
}
|
|
352
408
|
const CompressionStream: {
|
|
353
409
|
prototype: CompressionStream;
|
|
354
|
-
new
|
|
410
|
+
new(format: "deflate" | "deflate-raw" | "gzip"): CompressionStream;
|
|
355
411
|
};
|
|
356
|
-
interface DecompressionStream
|
|
357
|
-
readonly
|
|
358
|
-
readonly
|
|
412
|
+
interface DecompressionStream {
|
|
413
|
+
readonly writable: WritableStream;
|
|
414
|
+
readonly readable: ReadableStream;
|
|
359
415
|
}
|
|
360
416
|
const DecompressionStream: {
|
|
361
417
|
prototype: DecompressionStream;
|
|
362
|
-
new
|
|
418
|
+
new(format: "deflate" | "deflate-raw" | "gzip"): DecompressionStream;
|
|
363
419
|
};
|
|
420
|
+
|
|
421
|
+
global {
|
|
422
|
+
interface ByteLengthQueuingStrategy extends _ByteLengthQueuingStrategy {}
|
|
423
|
+
var ByteLengthQueuingStrategy: typeof globalThis extends { onmessage: any; ByteLengthQueuingStrategy: infer T }
|
|
424
|
+
? T
|
|
425
|
+
: typeof import("stream/web").ByteLengthQueuingStrategy;
|
|
426
|
+
|
|
427
|
+
interface CompressionStream extends _CompressionStream {}
|
|
428
|
+
var CompressionStream: typeof globalThis extends {
|
|
429
|
+
onmessage: any;
|
|
430
|
+
// CompressionStream, DecompressionStream and ReportingObserver was introduced in the same commit.
|
|
431
|
+
// If ReportingObserver check is removed, the type here will form a circular reference in TS5.0+lib.dom.d.ts
|
|
432
|
+
ReportingObserver: any;
|
|
433
|
+
CompressionStream: infer T;
|
|
434
|
+
} ? T
|
|
435
|
+
// TS 4.8, 4.9, 5.0
|
|
436
|
+
: typeof globalThis extends { onmessage: any; TransformStream: { prototype: infer T } } ? {
|
|
437
|
+
prototype: T;
|
|
438
|
+
new(format: "deflate" | "deflate-raw" | "gzip"): T;
|
|
439
|
+
}
|
|
440
|
+
: typeof import("stream/web").CompressionStream;
|
|
441
|
+
|
|
442
|
+
interface CountQueuingStrategy extends _CountQueuingStrategy {}
|
|
443
|
+
var CountQueuingStrategy: typeof globalThis extends { onmessage: any; CountQueuingStrategy: infer T } ? T
|
|
444
|
+
: typeof import("stream/web").CountQueuingStrategy;
|
|
445
|
+
|
|
446
|
+
interface DecompressionStream extends _DecompressionStream {}
|
|
447
|
+
var DecompressionStream: typeof globalThis extends {
|
|
448
|
+
onmessage: any;
|
|
449
|
+
// CompressionStream, DecompressionStream and ReportingObserver was introduced in the same commit.
|
|
450
|
+
// If ReportingObserver check is removed, the type here will form a circular reference in TS5.0+lib.dom.d.ts
|
|
451
|
+
ReportingObserver: any;
|
|
452
|
+
DecompressionStream: infer T;
|
|
453
|
+
} ? T
|
|
454
|
+
// TS 4.8, 4.9, 5.0
|
|
455
|
+
: typeof globalThis extends { onmessage: any; TransformStream: { prototype: infer T } } ? {
|
|
456
|
+
prototype: T;
|
|
457
|
+
new(format: "deflate" | "deflate-raw" | "gzip"): T;
|
|
458
|
+
}
|
|
459
|
+
: typeof import("stream/web").DecompressionStream;
|
|
460
|
+
|
|
461
|
+
interface ReadableByteStreamController extends _ReadableByteStreamController {}
|
|
462
|
+
var ReadableByteStreamController: typeof globalThis extends
|
|
463
|
+
{ onmessage: any; ReadableByteStreamController: infer T } ? T
|
|
464
|
+
: typeof import("stream/web").ReadableByteStreamController;
|
|
465
|
+
|
|
466
|
+
interface ReadableStream<R = any> extends _ReadableStream<R> {}
|
|
467
|
+
var ReadableStream: typeof globalThis extends { onmessage: any; ReadableStream: infer T } ? T
|
|
468
|
+
: typeof import("stream/web").ReadableStream;
|
|
469
|
+
|
|
470
|
+
interface ReadableStreamBYOBReader extends _ReadableStreamBYOBReader {}
|
|
471
|
+
var ReadableStreamBYOBReader: typeof globalThis extends { onmessage: any; ReadableStreamBYOBReader: infer T }
|
|
472
|
+
? T
|
|
473
|
+
: typeof import("stream/web").ReadableStreamBYOBReader;
|
|
474
|
+
|
|
475
|
+
interface ReadableStreamBYOBRequest extends _ReadableStreamBYOBRequest {}
|
|
476
|
+
var ReadableStreamBYOBRequest: typeof globalThis extends { onmessage: any; ReadableStreamBYOBRequest: infer T }
|
|
477
|
+
? T
|
|
478
|
+
: typeof import("stream/web").ReadableStreamBYOBRequest;
|
|
479
|
+
|
|
480
|
+
interface ReadableStreamDefaultController<R = any> extends _ReadableStreamDefaultController<R> {}
|
|
481
|
+
var ReadableStreamDefaultController: typeof globalThis extends
|
|
482
|
+
{ onmessage: any; ReadableStreamDefaultController: infer T } ? T
|
|
483
|
+
: typeof import("stream/web").ReadableStreamDefaultController;
|
|
484
|
+
|
|
485
|
+
interface ReadableStreamDefaultReader<R = any> extends _ReadableStreamDefaultReader<R> {}
|
|
486
|
+
var ReadableStreamDefaultReader: typeof globalThis extends
|
|
487
|
+
{ onmessage: any; ReadableStreamDefaultReader: infer T } ? T
|
|
488
|
+
: typeof import("stream/web").ReadableStreamDefaultReader;
|
|
489
|
+
|
|
490
|
+
interface TextDecoderStream extends _TextDecoderStream {}
|
|
491
|
+
var TextDecoderStream: typeof globalThis extends { onmessage: any; TextDecoderStream: infer T } ? T
|
|
492
|
+
: typeof import("stream/web").TextDecoderStream;
|
|
493
|
+
|
|
494
|
+
interface TextEncoderStream extends _TextEncoderStream {}
|
|
495
|
+
var TextEncoderStream: typeof globalThis extends { onmessage: any; TextEncoderStream: infer T } ? T
|
|
496
|
+
: typeof import("stream/web").TextEncoderStream;
|
|
497
|
+
|
|
498
|
+
interface TransformStream<I = any, O = any> extends _TransformStream<I, O> {}
|
|
499
|
+
var TransformStream: typeof globalThis extends { onmessage: any; TransformStream: infer T } ? T
|
|
500
|
+
: typeof import("stream/web").TransformStream;
|
|
501
|
+
|
|
502
|
+
interface TransformStreamDefaultController<O = any> extends _TransformStreamDefaultController<O> {}
|
|
503
|
+
var TransformStreamDefaultController: typeof globalThis extends
|
|
504
|
+
{ onmessage: any; TransformStreamDefaultController: infer T } ? T
|
|
505
|
+
: typeof import("stream/web").TransformStreamDefaultController;
|
|
506
|
+
|
|
507
|
+
interface WritableStream<W = any> extends _WritableStream<W> {}
|
|
508
|
+
var WritableStream: typeof globalThis extends { onmessage: any; WritableStream: infer T } ? T
|
|
509
|
+
: typeof import("stream/web").WritableStream;
|
|
510
|
+
|
|
511
|
+
interface WritableStreamDefaultController extends _WritableStreamDefaultController {}
|
|
512
|
+
var WritableStreamDefaultController: typeof globalThis extends
|
|
513
|
+
{ onmessage: any; WritableStreamDefaultController: infer T } ? T
|
|
514
|
+
: typeof import("stream/web").WritableStreamDefaultController;
|
|
515
|
+
|
|
516
|
+
interface WritableStreamDefaultWriter<W = any> extends _WritableStreamDefaultWriter<W> {}
|
|
517
|
+
var WritableStreamDefaultWriter: typeof globalThis extends
|
|
518
|
+
{ onmessage: any; WritableStreamDefaultWriter: infer T } ? T
|
|
519
|
+
: typeof import("stream/web").WritableStreamDefaultWriter;
|
|
520
|
+
}
|
|
364
521
|
}
|
|
365
522
|
declare module "node:stream/web" {
|
|
366
523
|
export * from "stream/web";
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* To access the `node:stream` module:
|
|
11
11
|
*
|
|
12
12
|
* ```js
|
|
13
|
-
*
|
|
13
|
+
* import stream from 'node:stream';
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
16
|
* The `node:stream` module is useful for creating new types of stream instances.
|
|
@@ -303,7 +303,7 @@ declare module "stream" {
|
|
|
303
303
|
* the method does nothing.
|
|
304
304
|
*
|
|
305
305
|
* ```js
|
|
306
|
-
*
|
|
306
|
+
* import fs from 'node:fs';
|
|
307
307
|
* const readable = getReadableStreamSomehow();
|
|
308
308
|
* const writable = fs.createWriteStream('file.txt');
|
|
309
309
|
* // All the data from readable goes into 'file.txt',
|
|
@@ -341,7 +341,7 @@ declare module "stream" {
|
|
|
341
341
|
* // Pull off a header delimited by \n\n.
|
|
342
342
|
* // Use unshift() if we get too much.
|
|
343
343
|
* // Call the callback with (error, header, stream).
|
|
344
|
-
*
|
|
344
|
+
* import { StringDecoder } from 'node:string_decoder';
|
|
345
345
|
* function parseHeader(stream, callback) {
|
|
346
346
|
* stream.on('error', callback);
|
|
347
347
|
* stream.on('readable', onReadable);
|
|
@@ -399,8 +399,8 @@ declare module "stream" {
|
|
|
399
399
|
* libraries.
|
|
400
400
|
*
|
|
401
401
|
* ```js
|
|
402
|
-
*
|
|
403
|
-
*
|
|
402
|
+
* import { OldReader } from './old-api-module.js';
|
|
403
|
+
* import { Readable } from 'node:stream';
|
|
404
404
|
* const oreader = new OldReader();
|
|
405
405
|
* const myReader = new Readable().wrap(oreader);
|
|
406
406
|
*
|
|
@@ -422,7 +422,7 @@ declare module "stream" {
|
|
|
422
422
|
* or exiting a `for await...of` iteration using a `break`, `return`, or `throw` will not destroy the stream.
|
|
423
423
|
* **Default: `true`**.
|
|
424
424
|
*/
|
|
425
|
-
iterator(options?: { destroyOnReturn?: boolean }):
|
|
425
|
+
iterator(options?: { destroyOnReturn?: boolean }): NodeJS.AsyncIterator<any>;
|
|
426
426
|
/**
|
|
427
427
|
* This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream.
|
|
428
428
|
* If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream.
|
|
@@ -651,7 +651,7 @@ declare module "stream" {
|
|
|
651
651
|
removeListener(event: "readable", listener: () => void): this;
|
|
652
652
|
removeListener(event: "resume", listener: () => void): this;
|
|
653
653
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
654
|
-
[Symbol.asyncIterator]():
|
|
654
|
+
[Symbol.asyncIterator](): NodeJS.AsyncIterator<any>;
|
|
655
655
|
/**
|
|
656
656
|
* Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished.
|
|
657
657
|
* @since v20.4.0
|
|
@@ -806,7 +806,7 @@ declare module "stream" {
|
|
|
806
806
|
*
|
|
807
807
|
* ```js
|
|
808
808
|
* // Write 'hello, ' and then end with 'world!'.
|
|
809
|
-
*
|
|
809
|
+
* import fs from 'node:fs';
|
|
810
810
|
* const file = fs.createWriteStream('example.txt');
|
|
811
811
|
* file.write('hello, ');
|
|
812
812
|
* file.end('world!');
|
|
@@ -1250,6 +1250,25 @@ declare module "stream" {
|
|
|
1250
1250
|
removeListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1251
1251
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1252
1252
|
}
|
|
1253
|
+
/**
|
|
1254
|
+
* The utility function `duplexPair` returns an Array with two items,
|
|
1255
|
+
* each being a `Duplex` stream connected to the other side:
|
|
1256
|
+
*
|
|
1257
|
+
* ```js
|
|
1258
|
+
* const [ sideA, sideB ] = duplexPair();
|
|
1259
|
+
* ```
|
|
1260
|
+
*
|
|
1261
|
+
* Whatever is written to one stream is made readable on the other. It provides
|
|
1262
|
+
* behavior analogous to a network connection, where the data written by the client
|
|
1263
|
+
* becomes readable by the server, and vice-versa.
|
|
1264
|
+
*
|
|
1265
|
+
* The Duplex streams are symmetrical; one or the other may be used without any
|
|
1266
|
+
* difference in behavior.
|
|
1267
|
+
* @param options A value to pass to both {@link Duplex} constructors,
|
|
1268
|
+
* to set options such as buffering.
|
|
1269
|
+
* @since v20.17.0
|
|
1270
|
+
*/
|
|
1271
|
+
function duplexPair(options?: DuplexOptions): [Duplex, Duplex];
|
|
1253
1272
|
type TransformCallback = (error?: Error | null, data?: any) => void;
|
|
1254
1273
|
interface TransformOptions extends DuplexOptions {
|
|
1255
1274
|
construct?(this: Transform, callback: (error?: Error | null) => void): void;
|
|
@@ -1304,7 +1323,7 @@ declare module "stream" {
|
|
|
1304
1323
|
* stream, and `controller.error(new AbortError())` for webstreams.
|
|
1305
1324
|
*
|
|
1306
1325
|
* ```js
|
|
1307
|
-
*
|
|
1326
|
+
* import fs from 'node:fs';
|
|
1308
1327
|
*
|
|
1309
1328
|
* const controller = new AbortController();
|
|
1310
1329
|
* const read = addAbortSignal(
|
|
@@ -1398,8 +1417,8 @@ declare module "stream" {
|
|
|
1398
1417
|
* or has experienced an error or a premature close event.
|
|
1399
1418
|
*
|
|
1400
1419
|
* ```js
|
|
1401
|
-
*
|
|
1402
|
-
*
|
|
1420
|
+
* import { finished } from 'node:stream';
|
|
1421
|
+
* import fs from 'node:fs';
|
|
1403
1422
|
*
|
|
1404
1423
|
* const rs = fs.createReadStream('archive.tar');
|
|
1405
1424
|
*
|
|
@@ -1482,9 +1501,9 @@ declare module "stream" {
|
|
|
1482
1501
|
* properly cleaning up and provide a callback when the pipeline is complete.
|
|
1483
1502
|
*
|
|
1484
1503
|
* ```js
|
|
1485
|
-
*
|
|
1486
|
-
*
|
|
1487
|
-
*
|
|
1504
|
+
* import { pipeline } from 'node:stream';
|
|
1505
|
+
* import fs from 'node:fs';
|
|
1506
|
+
* import zlib from 'node:zlib';
|
|
1488
1507
|
*
|
|
1489
1508
|
* // Use the pipeline API to easily pipe a series of streams
|
|
1490
1509
|
* // together and get notified when the pipeline is fully done.
|
|
@@ -1524,9 +1543,9 @@ declare module "stream" {
|
|
|
1524
1543
|
* See the example below:
|
|
1525
1544
|
*
|
|
1526
1545
|
* ```js
|
|
1527
|
-
*
|
|
1528
|
-
*
|
|
1529
|
-
*
|
|
1546
|
+
* import fs from 'node:fs';
|
|
1547
|
+
* import http from 'node:http';
|
|
1548
|
+
* import { pipeline } from 'node:stream';
|
|
1530
1549
|
*
|
|
1531
1550
|
* const server = http.createServer((req, res) => {
|
|
1532
1551
|
* const fileStream = fs.createReadStream('./fileNotExist.txt');
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* characters. It can be accessed using:
|
|
5
5
|
*
|
|
6
6
|
* ```js
|
|
7
|
-
*
|
|
7
|
+
* import { StringDecoder } from 'node:string_decoder';
|
|
8
8
|
* ```
|
|
9
9
|
*
|
|
10
10
|
* The following example shows the basic use of the `StringDecoder` class.
|
|
11
11
|
*
|
|
12
12
|
* ```js
|
|
13
|
-
*
|
|
13
|
+
* import { StringDecoder } from 'node:string_decoder';
|
|
14
14
|
* const decoder = new StringDecoder('utf8');
|
|
15
15
|
*
|
|
16
16
|
* const cent = Buffer.from([0xC2, 0xA2]);
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* symbol (`€`) are written over three separate operations:
|
|
30
30
|
*
|
|
31
31
|
* ```js
|
|
32
|
-
*
|
|
32
|
+
* import { StringDecoder } from 'node:string_decoder';
|
|
33
33
|
* const decoder = new StringDecoder('utf8');
|
|
34
34
|
*
|
|
35
35
|
* decoder.write(Buffer.from([0xE2]));
|