cdk-common 2.0.221 → 2.0.224
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 +3 -3
- package/lib/main.js +1 -1
- package/node_modules/@aws-cdk/assert/package.json +8 -8
- package/node_modules/@aws-cdk/cfnspec/package.json +3 -3
- package/node_modules/@aws-cdk/cfnspec/tsconfig.tsbuildinfo +5 -5
- package/node_modules/@aws-cdk/cloudformation-diff/package.json +5 -5
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/LICENSE +0 -0
- package/node_modules/@types/node/README.md +16 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/assert.d.ts +35 -6
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/async_hooks.d.ts +96 -11
- package/node_modules/@types/node/buffer.d.ts +89 -0
- package/node_modules/@types/node/child_process.d.ts +514 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/cluster.d.ts +43 -38
- package/node_modules/@types/node/console.d.ts +142 -0
- package/node_modules/@types/node/constants.d.ts +18 -0
- package/node_modules/@types/node/crypto.d.ts +1283 -0
- package/node_modules/@types/node/dgram.d.ts +144 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/dns.d.ts +33 -12
- package/node_modules/@types/node/domain.d.ts +27 -0
- package/node_modules/@types/node/events.d.ts +82 -0
- package/node_modules/@types/node/fs/promises.d.ts +569 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/fs.d.ts +736 -757
- package/node_modules/@types/node/globals.d.ts +746 -0
- package/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@types/node/http.d.ts +492 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/http2.d.ts +289 -186
- package/node_modules/@types/node/https.d.ts +142 -0
- package/node_modules/@types/node/index.d.ts +98 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/inspector.d.ts +1508 -1619
- package/node_modules/@types/node/module.d.ts +56 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/net.d.ts +128 -71
- package/node_modules/@types/node/os.d.ts +242 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/package.json +67 -23
- package/node_modules/@types/node/path.d.ts +168 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/perf_hooks.d.ts +124 -19
- package/node_modules/@types/node/process.d.ts +413 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/punycode.d.ts +11 -1
- package/node_modules/@types/node/querystring.d.ts +31 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/readline.d.ts +55 -24
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/repl.d.ts +40 -22
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/stream.d.ts +103 -57
- package/node_modules/@types/node/string_decoder.d.ts +10 -0
- package/node_modules/@types/node/timers.d.ts +19 -0
- package/node_modules/@types/node/tls.d.ts +784 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/trace_events.d.ts +7 -4
- package/node_modules/@types/node/tty.d.ts +69 -0
- package/node_modules/@types/node/url.d.ts +149 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/util.d.ts +70 -41
- package/node_modules/@types/node/v8.d.ts +190 -0
- package/node_modules/@types/node/vm.d.ts +155 -0
- package/node_modules/@types/node/wasi.d.ts +89 -0
- package/node_modules/@types/node/worker_threads.d.ts +241 -0
- package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/zlib.d.ts +91 -54
- package/package.json +3 -3
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/README.md +0 -16
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/base.d.ts +0 -19
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/buffer.d.ts +0 -16
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/child_process.d.ts +0 -369
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/console.d.ts +0 -3
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/constants.d.ts +0 -449
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/crypto.d.ts +0 -613
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/dgram.d.ts +0 -97
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/domain.d.ts +0 -16
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/events.d.ts +0 -30
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/globals.d.ts +0 -1066
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/http.d.ts +0 -274
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/https.d.ts +0 -51
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/index.d.ts +0 -41
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/module.d.ts +0 -3
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/os.d.ts +0 -254
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/path.d.ts +0 -159
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/process.d.ts +0 -3
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/querystring.d.ts +0 -17
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/string_decoder.d.ts +0 -9
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/timers.d.ts +0 -16
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/tls.d.ts +0 -459
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/ts3.6/assert.d.ts +0 -73
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/ts3.6/base.d.ts +0 -54
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/ts3.6/index.d.ts +0 -6
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/tty.d.ts +0 -17
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/url.d.ts +0 -104
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/v8.d.ts +0 -28
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/vm.d.ts +0 -81
- package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/worker_threads.d.ts +0 -124
package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/repl.d.ts
RENAMED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
import { Interface, Completer, AsyncCompleter } from
|
|
3
|
-
import { Context } from
|
|
4
|
-
import { InspectOptions } from
|
|
1
|
+
declare module 'repl' {
|
|
2
|
+
import { Interface, Completer, AsyncCompleter } from 'readline';
|
|
3
|
+
import { Context } from 'vm';
|
|
4
|
+
import { InspectOptions } from 'util';
|
|
5
5
|
|
|
6
6
|
interface ReplOptions {
|
|
7
7
|
/**
|
|
8
8
|
* The input prompt to display.
|
|
9
9
|
* @default "> "
|
|
10
10
|
*/
|
|
11
|
-
prompt?: string;
|
|
11
|
+
prompt?: string | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* The `Readable` stream from which REPL input will be read.
|
|
14
14
|
* @default process.stdin
|
|
15
15
|
*/
|
|
16
|
-
input?: NodeJS.ReadableStream;
|
|
16
|
+
input?: NodeJS.ReadableStream | undefined;
|
|
17
17
|
/**
|
|
18
18
|
* The `Writable` stream to which REPL output will be written.
|
|
19
19
|
* @default process.stdout
|
|
20
20
|
*/
|
|
21
|
-
output?: NodeJS.WritableStream;
|
|
21
|
+
output?: NodeJS.WritableStream | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* If `true`, specifies that the output should be treated as a TTY terminal, and have
|
|
24
24
|
* ANSI/VT100 escape codes written to it.
|
|
25
25
|
* Default: checking the value of the `isTTY` property on the output stream upon
|
|
26
26
|
* instantiation.
|
|
27
27
|
*/
|
|
28
|
-
terminal?: boolean;
|
|
28
|
+
terminal?: boolean | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* The function to be used when evaluating each given line of input.
|
|
31
31
|
* Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can
|
|
@@ -35,40 +35,45 @@ declare module "repl" {
|
|
|
35
35
|
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation
|
|
36
36
|
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions
|
|
37
37
|
*/
|
|
38
|
-
eval?: REPLEval;
|
|
38
|
+
eval?: REPLEval | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Defines if the repl prints output previews or not.
|
|
41
|
+
* @default `true` Always `false` in case `terminal` is falsy.
|
|
42
|
+
*/
|
|
43
|
+
preview?: boolean | undefined;
|
|
39
44
|
/**
|
|
40
45
|
* If `true`, specifies that the default `writer` function should include ANSI color
|
|
41
46
|
* styling to REPL output. If a custom `writer` function is provided then this has no
|
|
42
47
|
* effect.
|
|
43
48
|
* Default: the REPL instance's `terminal` value.
|
|
44
49
|
*/
|
|
45
|
-
useColors?: boolean;
|
|
50
|
+
useColors?: boolean | undefined;
|
|
46
51
|
/**
|
|
47
52
|
* If `true`, specifies that the default evaluation function will use the JavaScript
|
|
48
53
|
* `global` as the context as opposed to creating a new separate context for the REPL
|
|
49
54
|
* instance. The node CLI REPL sets this value to `true`.
|
|
50
55
|
* Default: `false`.
|
|
51
56
|
*/
|
|
52
|
-
useGlobal?: boolean;
|
|
57
|
+
useGlobal?: boolean | undefined;
|
|
53
58
|
/**
|
|
54
59
|
* If `true`, specifies that the default writer will not output the return value of a
|
|
55
60
|
* command if it evaluates to `undefined`.
|
|
56
61
|
* Default: `false`.
|
|
57
62
|
*/
|
|
58
|
-
ignoreUndefined?: boolean;
|
|
63
|
+
ignoreUndefined?: boolean | undefined;
|
|
59
64
|
/**
|
|
60
65
|
* The function to invoke to format the output of each command before writing to `output`.
|
|
61
66
|
* Default: a wrapper for `util.inspect`.
|
|
62
67
|
*
|
|
63
68
|
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output
|
|
64
69
|
*/
|
|
65
|
-
writer?: REPLWriter;
|
|
70
|
+
writer?: REPLWriter | undefined;
|
|
66
71
|
/**
|
|
67
72
|
* An optional function used for custom Tab auto completion.
|
|
68
73
|
*
|
|
69
74
|
* @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function
|
|
70
75
|
*/
|
|
71
|
-
completer?: Completer | AsyncCompleter;
|
|
76
|
+
completer?: Completer | AsyncCompleter | undefined;
|
|
72
77
|
/**
|
|
73
78
|
* A flag that specifies whether the default evaluator executes all JavaScript commands in
|
|
74
79
|
* strict mode or default (sloppy) mode.
|
|
@@ -77,13 +82,13 @@ declare module "repl" {
|
|
|
77
82
|
* - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
|
|
78
83
|
* prefacing every repl statement with `'use strict'`.
|
|
79
84
|
*/
|
|
80
|
-
replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
|
|
85
|
+
replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined;
|
|
81
86
|
/**
|
|
82
87
|
* Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
|
|
83
88
|
* pressed. This cannot be used together with a custom `eval` function.
|
|
84
89
|
* Default: `false`.
|
|
85
90
|
*/
|
|
86
|
-
breakEvalOnSigint?: boolean;
|
|
91
|
+
breakEvalOnSigint?: boolean | undefined;
|
|
87
92
|
}
|
|
88
93
|
|
|
89
94
|
type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
|
|
@@ -101,7 +106,7 @@ declare module "repl" {
|
|
|
101
106
|
/**
|
|
102
107
|
* Help text to be displayed when `.help` is entered.
|
|
103
108
|
*/
|
|
104
|
-
help?: string;
|
|
109
|
+
help?: string | undefined;
|
|
105
110
|
/**
|
|
106
111
|
* The function to execute, optionally accepting a single string argument.
|
|
107
112
|
*/
|
|
@@ -131,11 +136,11 @@ declare module "repl" {
|
|
|
131
136
|
*/
|
|
132
137
|
readonly context: Context;
|
|
133
138
|
/**
|
|
134
|
-
*
|
|
139
|
+
* @deprecated since v14.3.0 - Use `input` instead.
|
|
135
140
|
*/
|
|
136
141
|
readonly inputStream: NodeJS.ReadableStream;
|
|
137
142
|
/**
|
|
138
|
-
*
|
|
143
|
+
* @deprecated since v14.3.0 - Use `output` instead.
|
|
139
144
|
*/
|
|
140
145
|
readonly outputStream: NodeJS.WritableStream;
|
|
141
146
|
/**
|
|
@@ -149,7 +154,7 @@ declare module "repl" {
|
|
|
149
154
|
/**
|
|
150
155
|
* The commands registered via `replServer.defineCommand()`.
|
|
151
156
|
*/
|
|
152
|
-
readonly commands:
|
|
157
|
+
readonly commands: NodeJS.ReadOnlyDict<REPLCommand>;
|
|
153
158
|
/**
|
|
154
159
|
* A value indicating whether the REPL is currently in "editor mode".
|
|
155
160
|
*
|
|
@@ -268,6 +273,16 @@ declare module "repl" {
|
|
|
268
273
|
*/
|
|
269
274
|
clearBufferedCommand(): void;
|
|
270
275
|
|
|
276
|
+
/**
|
|
277
|
+
* Initializes a history log file for the REPL instance. When executing the
|
|
278
|
+
* Node.js binary and using the command line REPL, a history file is initialized
|
|
279
|
+
* by default. However, this is not the case when creating a REPL
|
|
280
|
+
* programmatically. Use this method to initialize a history log file when working
|
|
281
|
+
* with REPL instances programmatically.
|
|
282
|
+
* @param path The path to the history file
|
|
283
|
+
*/
|
|
284
|
+
setupHistory(path: string, cb: (err: Error | null, repl: this) => void): void;
|
|
285
|
+
|
|
271
286
|
/**
|
|
272
287
|
* events.EventEmitter
|
|
273
288
|
* 1. close - inherited from `readline.Interface`
|
|
@@ -351,13 +366,13 @@ declare module "repl" {
|
|
|
351
366
|
/**
|
|
352
367
|
* A flag passed in the REPL options. Evaluates expressions in sloppy mode.
|
|
353
368
|
*/
|
|
354
|
-
|
|
369
|
+
const REPL_MODE_SLOPPY: unique symbol;
|
|
355
370
|
|
|
356
371
|
/**
|
|
357
372
|
* A flag passed in the REPL options. Evaluates expressions in strict mode.
|
|
358
373
|
* This is equivalent to prefacing every repl statement with `'use strict'`.
|
|
359
374
|
*/
|
|
360
|
-
|
|
375
|
+
const REPL_MODE_STRICT: unique symbol;
|
|
361
376
|
|
|
362
377
|
/**
|
|
363
378
|
* Creates and starts a `repl.REPLServer` instance.
|
|
@@ -378,3 +393,6 @@ declare module "repl" {
|
|
|
378
393
|
constructor(err: Error);
|
|
379
394
|
}
|
|
380
395
|
}
|
|
396
|
+
declare module 'node:repl' {
|
|
397
|
+
export * from 'repl';
|
|
398
|
+
}
|
package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/stream.d.ts
RENAMED
|
@@ -2,38 +2,50 @@ declare module 'stream' {
|
|
|
2
2
|
import EventEmitter = require('events');
|
|
3
3
|
|
|
4
4
|
class internal extends EventEmitter {
|
|
5
|
-
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
|
|
5
|
+
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
namespace internal {
|
|
9
|
-
class Stream extends internal {
|
|
9
|
+
class Stream extends internal {
|
|
10
|
+
constructor(opts?: ReadableOptions);
|
|
11
|
+
}
|
|
10
12
|
|
|
11
13
|
interface ReadableOptions {
|
|
12
|
-
highWaterMark?: number;
|
|
13
|
-
encoding?:
|
|
14
|
-
objectMode?: boolean;
|
|
14
|
+
highWaterMark?: number | undefined;
|
|
15
|
+
encoding?: BufferEncoding | undefined;
|
|
16
|
+
objectMode?: boolean | undefined;
|
|
15
17
|
read?(this: Readable, size: number): void;
|
|
16
18
|
destroy?(this: Readable, error: Error | null, callback: (error: Error | null) => void): void;
|
|
19
|
+
autoDestroy?: boolean | undefined;
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
class Readable extends Stream implements NodeJS.ReadableStream {
|
|
23
|
+
/**
|
|
24
|
+
* A utility method for creating Readable Streams out of iterators.
|
|
25
|
+
*/
|
|
26
|
+
static from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable;
|
|
27
|
+
|
|
20
28
|
readable: boolean;
|
|
29
|
+
readonly readableEncoding: BufferEncoding | null;
|
|
30
|
+
readonly readableEnded: boolean;
|
|
21
31
|
readonly readableFlowing: boolean | null;
|
|
22
32
|
readonly readableHighWaterMark: number;
|
|
23
33
|
readonly readableLength: number;
|
|
34
|
+
readonly readableObjectMode: boolean;
|
|
35
|
+
destroyed: boolean;
|
|
24
36
|
constructor(opts?: ReadableOptions);
|
|
25
37
|
_read(size: number): void;
|
|
26
38
|
read(size?: number): any;
|
|
27
|
-
setEncoding(encoding:
|
|
39
|
+
setEncoding(encoding: BufferEncoding): this;
|
|
28
40
|
pause(): this;
|
|
29
41
|
resume(): this;
|
|
30
42
|
isPaused(): boolean;
|
|
31
43
|
unpipe(destination?: NodeJS.WritableStream): this;
|
|
32
|
-
unshift(chunk: any): void;
|
|
44
|
+
unshift(chunk: any, encoding?: BufferEncoding): void;
|
|
33
45
|
wrap(oldStream: NodeJS.ReadableStream): this;
|
|
34
|
-
push(chunk: any, encoding?:
|
|
35
|
-
_destroy(error: Error | null, callback: (error
|
|
36
|
-
destroy(error?: Error):
|
|
46
|
+
push(chunk: any, encoding?: BufferEncoding): boolean;
|
|
47
|
+
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
48
|
+
destroy(error?: Error): this;
|
|
37
49
|
|
|
38
50
|
/**
|
|
39
51
|
* Event emitter
|
|
@@ -41,89 +53,113 @@ declare module 'stream' {
|
|
|
41
53
|
* 1. close
|
|
42
54
|
* 2. data
|
|
43
55
|
* 3. end
|
|
44
|
-
* 4.
|
|
45
|
-
* 5.
|
|
56
|
+
* 4. error
|
|
57
|
+
* 5. pause
|
|
58
|
+
* 6. readable
|
|
59
|
+
* 7. resume
|
|
46
60
|
*/
|
|
47
61
|
addListener(event: "close", listener: () => void): this;
|
|
48
62
|
addListener(event: "data", listener: (chunk: any) => void): this;
|
|
49
63
|
addListener(event: "end", listener: () => void): this;
|
|
50
|
-
addListener(event: "readable", listener: () => void): this;
|
|
51
64
|
addListener(event: "error", listener: (err: Error) => void): this;
|
|
65
|
+
addListener(event: "pause", listener: () => void): this;
|
|
66
|
+
addListener(event: "readable", listener: () => void): this;
|
|
67
|
+
addListener(event: "resume", listener: () => void): this;
|
|
52
68
|
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
53
69
|
|
|
54
70
|
emit(event: "close"): boolean;
|
|
55
71
|
emit(event: "data", chunk: any): boolean;
|
|
56
72
|
emit(event: "end"): boolean;
|
|
57
|
-
emit(event: "readable"): boolean;
|
|
58
73
|
emit(event: "error", err: Error): boolean;
|
|
74
|
+
emit(event: "pause"): boolean;
|
|
75
|
+
emit(event: "readable"): boolean;
|
|
76
|
+
emit(event: "resume"): boolean;
|
|
59
77
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
60
78
|
|
|
61
79
|
on(event: "close", listener: () => void): this;
|
|
62
80
|
on(event: "data", listener: (chunk: any) => void): this;
|
|
63
81
|
on(event: "end", listener: () => void): this;
|
|
64
|
-
on(event: "readable", listener: () => void): this;
|
|
65
82
|
on(event: "error", listener: (err: Error) => void): this;
|
|
83
|
+
on(event: "pause", listener: () => void): this;
|
|
84
|
+
on(event: "readable", listener: () => void): this;
|
|
85
|
+
on(event: "resume", listener: () => void): this;
|
|
66
86
|
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
67
87
|
|
|
68
88
|
once(event: "close", listener: () => void): this;
|
|
69
89
|
once(event: "data", listener: (chunk: any) => void): this;
|
|
70
90
|
once(event: "end", listener: () => void): this;
|
|
71
|
-
once(event: "readable", listener: () => void): this;
|
|
72
91
|
once(event: "error", listener: (err: Error) => void): this;
|
|
92
|
+
once(event: "pause", listener: () => void): this;
|
|
93
|
+
once(event: "readable", listener: () => void): this;
|
|
94
|
+
once(event: "resume", listener: () => void): this;
|
|
73
95
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
74
96
|
|
|
75
97
|
prependListener(event: "close", listener: () => void): this;
|
|
76
98
|
prependListener(event: "data", listener: (chunk: any) => void): this;
|
|
77
99
|
prependListener(event: "end", listener: () => void): this;
|
|
78
|
-
prependListener(event: "readable", listener: () => void): this;
|
|
79
100
|
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
101
|
+
prependListener(event: "pause", listener: () => void): this;
|
|
102
|
+
prependListener(event: "readable", listener: () => void): this;
|
|
103
|
+
prependListener(event: "resume", listener: () => void): this;
|
|
80
104
|
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
81
105
|
|
|
82
106
|
prependOnceListener(event: "close", listener: () => void): this;
|
|
83
107
|
prependOnceListener(event: "data", listener: (chunk: any) => void): this;
|
|
84
108
|
prependOnceListener(event: "end", listener: () => void): this;
|
|
85
|
-
prependOnceListener(event: "readable", listener: () => void): this;
|
|
86
109
|
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
110
|
+
prependOnceListener(event: "pause", listener: () => void): this;
|
|
111
|
+
prependOnceListener(event: "readable", listener: () => void): this;
|
|
112
|
+
prependOnceListener(event: "resume", listener: () => void): this;
|
|
87
113
|
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
88
114
|
|
|
89
115
|
removeListener(event: "close", listener: () => void): this;
|
|
90
116
|
removeListener(event: "data", listener: (chunk: any) => void): this;
|
|
91
117
|
removeListener(event: "end", listener: () => void): this;
|
|
92
|
-
removeListener(event: "readable", listener: () => void): this;
|
|
93
118
|
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
119
|
+
removeListener(event: "pause", listener: () => void): this;
|
|
120
|
+
removeListener(event: "readable", listener: () => void): this;
|
|
121
|
+
removeListener(event: "resume", listener: () => void): this;
|
|
94
122
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
95
123
|
|
|
96
124
|
[Symbol.asyncIterator](): AsyncIterableIterator<any>;
|
|
97
125
|
}
|
|
98
126
|
|
|
99
127
|
interface WritableOptions {
|
|
100
|
-
highWaterMark?: number;
|
|
101
|
-
decodeStrings?: boolean;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
128
|
+
highWaterMark?: number | undefined;
|
|
129
|
+
decodeStrings?: boolean | undefined;
|
|
130
|
+
defaultEncoding?: BufferEncoding | undefined;
|
|
131
|
+
objectMode?: boolean | undefined;
|
|
132
|
+
emitClose?: boolean | undefined;
|
|
133
|
+
write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
134
|
+
writev?(this: Writable, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
|
|
105
135
|
destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void;
|
|
106
136
|
final?(this: Writable, callback: (error?: Error | null) => void): void;
|
|
137
|
+
autoDestroy?: boolean | undefined;
|
|
107
138
|
}
|
|
108
139
|
|
|
109
140
|
class Writable extends Stream implements NodeJS.WritableStream {
|
|
110
|
-
writable: boolean;
|
|
141
|
+
readonly writable: boolean;
|
|
142
|
+
readonly writableEnded: boolean;
|
|
143
|
+
readonly writableFinished: boolean;
|
|
111
144
|
readonly writableHighWaterMark: number;
|
|
112
145
|
readonly writableLength: number;
|
|
146
|
+
readonly writableObjectMode: boolean;
|
|
147
|
+
readonly writableCorked: number;
|
|
148
|
+
destroyed: boolean;
|
|
113
149
|
constructor(opts?: WritableOptions);
|
|
114
|
-
_write(chunk: any, encoding:
|
|
115
|
-
_writev?(chunks: Array<{ chunk: any, encoding:
|
|
116
|
-
_destroy(error: Error | null, callback: (error
|
|
150
|
+
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
151
|
+
_writev?(chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
|
|
152
|
+
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
117
153
|
_final(callback: (error?: Error | null) => void): void;
|
|
118
154
|
write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
|
|
119
|
-
write(chunk: any, encoding
|
|
120
|
-
setDefaultEncoding(encoding:
|
|
121
|
-
end(cb?: () => void):
|
|
122
|
-
end(chunk: any, cb?: () => void):
|
|
123
|
-
end(chunk: any, encoding
|
|
155
|
+
write(chunk: any, encoding: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
|
|
156
|
+
setDefaultEncoding(encoding: BufferEncoding): this;
|
|
157
|
+
end(cb?: () => void): this;
|
|
158
|
+
end(chunk: any, cb?: () => void): this;
|
|
159
|
+
end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
|
|
124
160
|
cork(): void;
|
|
125
161
|
uncork(): void;
|
|
126
|
-
destroy(error?: Error):
|
|
162
|
+
destroy(error?: Error): this;
|
|
127
163
|
|
|
128
164
|
/**
|
|
129
165
|
* Event emitter
|
|
@@ -193,62 +229,68 @@ declare module 'stream' {
|
|
|
193
229
|
}
|
|
194
230
|
|
|
195
231
|
interface DuplexOptions extends ReadableOptions, WritableOptions {
|
|
196
|
-
allowHalfOpen?: boolean;
|
|
197
|
-
readableObjectMode?: boolean;
|
|
198
|
-
writableObjectMode?: boolean;
|
|
199
|
-
readableHighWaterMark?: number;
|
|
200
|
-
writableHighWaterMark?: number;
|
|
232
|
+
allowHalfOpen?: boolean | undefined;
|
|
233
|
+
readableObjectMode?: boolean | undefined;
|
|
234
|
+
writableObjectMode?: boolean | undefined;
|
|
235
|
+
readableHighWaterMark?: number | undefined;
|
|
236
|
+
writableHighWaterMark?: number | undefined;
|
|
237
|
+
writableCorked?: number | undefined;
|
|
201
238
|
read?(this: Duplex, size: number): void;
|
|
202
|
-
write?(this: Duplex, chunk: any, encoding:
|
|
203
|
-
writev?(this: Duplex, chunks: Array<{ chunk: any, encoding:
|
|
239
|
+
write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
240
|
+
writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
|
|
204
241
|
final?(this: Duplex, callback: (error?: Error | null) => void): void;
|
|
205
242
|
destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
|
|
206
243
|
}
|
|
207
244
|
|
|
208
245
|
// Note: Duplex extends both Readable and Writable.
|
|
209
246
|
class Duplex extends Readable implements Writable {
|
|
210
|
-
writable: boolean;
|
|
247
|
+
readonly writable: boolean;
|
|
248
|
+
readonly writableEnded: boolean;
|
|
249
|
+
readonly writableFinished: boolean;
|
|
211
250
|
readonly writableHighWaterMark: number;
|
|
212
251
|
readonly writableLength: number;
|
|
252
|
+
readonly writableObjectMode: boolean;
|
|
253
|
+
readonly writableCorked: number;
|
|
254
|
+
allowHalfOpen: boolean;
|
|
213
255
|
constructor(opts?: DuplexOptions);
|
|
214
|
-
_write(chunk: any, encoding:
|
|
215
|
-
_writev?(chunks: Array<{ chunk: any, encoding:
|
|
256
|
+
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
257
|
+
_writev?(chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
|
|
216
258
|
_destroy(error: Error | null, callback: (error: Error | null) => void): void;
|
|
217
259
|
_final(callback: (error?: Error | null) => void): void;
|
|
260
|
+
write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
|
|
218
261
|
write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
end(cb?: () => void):
|
|
222
|
-
end(chunk: any, cb?: () => void):
|
|
223
|
-
end(chunk: any, encoding?: string, cb?: () => void): void;
|
|
262
|
+
setDefaultEncoding(encoding: BufferEncoding): this;
|
|
263
|
+
end(cb?: () => void): this;
|
|
264
|
+
end(chunk: any, cb?: () => void): this;
|
|
265
|
+
end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this;
|
|
224
266
|
cork(): void;
|
|
225
267
|
uncork(): void;
|
|
226
268
|
}
|
|
227
269
|
|
|
228
|
-
type TransformCallback = (error?: Error, data?: any) => void;
|
|
270
|
+
type TransformCallback = (error?: Error | null, data?: any) => void;
|
|
229
271
|
|
|
230
272
|
interface TransformOptions extends DuplexOptions {
|
|
231
273
|
read?(this: Transform, size: number): void;
|
|
232
|
-
write?(this: Transform, chunk: any, encoding:
|
|
233
|
-
writev?(this: Transform, chunks: Array<{ chunk: any, encoding:
|
|
274
|
+
write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
275
|
+
writev?(this: Transform, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
|
|
234
276
|
final?(this: Transform, callback: (error?: Error | null) => void): void;
|
|
235
277
|
destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
|
|
236
|
-
transform?(this: Transform, chunk: any, encoding:
|
|
278
|
+
transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
|
|
237
279
|
flush?(this: Transform, callback: TransformCallback): void;
|
|
238
280
|
}
|
|
239
281
|
|
|
240
282
|
class Transform extends Duplex {
|
|
241
283
|
constructor(opts?: TransformOptions);
|
|
242
|
-
_transform(chunk: any, encoding:
|
|
284
|
+
_transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
|
|
243
285
|
_flush(callback: TransformCallback): void;
|
|
244
286
|
}
|
|
245
287
|
|
|
246
288
|
class PassThrough extends Transform { }
|
|
247
289
|
|
|
248
290
|
interface FinishedOptions {
|
|
249
|
-
error?: boolean;
|
|
250
|
-
readable?: boolean;
|
|
251
|
-
writable?: boolean;
|
|
291
|
+
error?: boolean | undefined;
|
|
292
|
+
readable?: boolean | undefined;
|
|
293
|
+
writable?: boolean | undefined;
|
|
252
294
|
}
|
|
253
295
|
function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
|
|
254
296
|
function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
|
|
@@ -311,3 +353,7 @@ declare module 'stream' {
|
|
|
311
353
|
|
|
312
354
|
export = internal;
|
|
313
355
|
}
|
|
356
|
+
declare module 'node:stream' {
|
|
357
|
+
import stream = require('stream');
|
|
358
|
+
export = stream;
|
|
359
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare module 'timers' {
|
|
2
|
+
function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
|
|
3
|
+
namespace setTimeout {
|
|
4
|
+
function __promisify__(ms: number): Promise<void>;
|
|
5
|
+
function __promisify__<T>(ms: number, value: T): Promise<T>;
|
|
6
|
+
}
|
|
7
|
+
function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void;
|
|
8
|
+
function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
|
|
9
|
+
function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void;
|
|
10
|
+
function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
|
|
11
|
+
namespace setImmediate {
|
|
12
|
+
function __promisify__(): Promise<void>;
|
|
13
|
+
function __promisify__<T>(value: T): Promise<T>;
|
|
14
|
+
}
|
|
15
|
+
function clearImmediate(immediateId: NodeJS.Immediate | undefined): void;
|
|
16
|
+
}
|
|
17
|
+
declare module 'node:timers' {
|
|
18
|
+
export * from 'timers';
|
|
19
|
+
}
|