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
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
declare module 'vm' {
|
|
2
|
+
interface Context extends NodeJS.Dict<any> { }
|
|
3
|
+
interface BaseOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Specifies the filename used in stack traces produced by this script.
|
|
6
|
+
* Default: `''`.
|
|
7
|
+
*/
|
|
8
|
+
filename?: string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Specifies the line number offset that is displayed in stack traces produced by this script.
|
|
11
|
+
* Default: `0`.
|
|
12
|
+
*/
|
|
13
|
+
lineOffset?: number | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Specifies the column number offset that is displayed in stack traces produced by this script.
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
columnOffset?: number | undefined;
|
|
19
|
+
}
|
|
20
|
+
interface ScriptOptions extends BaseOptions {
|
|
21
|
+
displayErrors?: boolean | undefined;
|
|
22
|
+
timeout?: number | undefined;
|
|
23
|
+
cachedData?: Buffer | undefined;
|
|
24
|
+
/** @deprecated in favor of `script.createCachedData()` */
|
|
25
|
+
produceCachedData?: boolean | undefined;
|
|
26
|
+
}
|
|
27
|
+
interface RunningScriptOptions extends BaseOptions {
|
|
28
|
+
/**
|
|
29
|
+
* When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
|
|
30
|
+
* Default: `true`.
|
|
31
|
+
*/
|
|
32
|
+
displayErrors?: boolean | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Specifies the number of milliseconds to execute code before terminating execution.
|
|
35
|
+
* If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
|
|
36
|
+
*/
|
|
37
|
+
timeout?: number | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
|
|
40
|
+
* Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
|
|
41
|
+
* If execution is terminated, an `Error` will be thrown.
|
|
42
|
+
* Default: `false`.
|
|
43
|
+
*/
|
|
44
|
+
breakOnSigint?: boolean | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
|
47
|
+
*/
|
|
48
|
+
microtaskMode?: 'afterEvaluate' | undefined;
|
|
49
|
+
}
|
|
50
|
+
interface CompileFunctionOptions extends BaseOptions {
|
|
51
|
+
/**
|
|
52
|
+
* Provides an optional data with V8's code cache data for the supplied source.
|
|
53
|
+
*/
|
|
54
|
+
cachedData?: Buffer | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Specifies whether to produce new cache data.
|
|
57
|
+
* Default: `false`,
|
|
58
|
+
*/
|
|
59
|
+
produceCachedData?: boolean | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* The sandbox/context in which the said function should be compiled in.
|
|
62
|
+
*/
|
|
63
|
+
parsingContext?: Context | undefined;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
|
|
67
|
+
*/
|
|
68
|
+
contextExtensions?: Object[] | undefined;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
interface CreateContextOptions {
|
|
72
|
+
/**
|
|
73
|
+
* Human-readable name of the newly created context.
|
|
74
|
+
* @default 'VM Context i' Where i is an ascending numerical index of the created context.
|
|
75
|
+
*/
|
|
76
|
+
name?: string | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Corresponds to the newly created context for display purposes.
|
|
79
|
+
* The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
|
|
80
|
+
* like the value of the `url.origin` property of a URL object.
|
|
81
|
+
* Most notably, this string should omit the trailing slash, as that denotes a path.
|
|
82
|
+
* @default ''
|
|
83
|
+
*/
|
|
84
|
+
origin?: string | undefined;
|
|
85
|
+
codeGeneration?: {
|
|
86
|
+
/**
|
|
87
|
+
* If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
|
|
88
|
+
* will throw an EvalError.
|
|
89
|
+
* @default true
|
|
90
|
+
*/
|
|
91
|
+
strings?: boolean | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
|
|
94
|
+
* @default true
|
|
95
|
+
*/
|
|
96
|
+
wasm?: boolean | undefined;
|
|
97
|
+
} | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
|
100
|
+
*/
|
|
101
|
+
microtaskMode?: 'afterEvaluate' | undefined;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
type MeasureMemoryMode = 'summary' | 'detailed';
|
|
105
|
+
|
|
106
|
+
interface MeasureMemoryOptions {
|
|
107
|
+
/**
|
|
108
|
+
* @default 'summary'
|
|
109
|
+
*/
|
|
110
|
+
mode?: MeasureMemoryMode | undefined;
|
|
111
|
+
context?: Context | undefined;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface MemoryMeasurement {
|
|
115
|
+
total: {
|
|
116
|
+
jsMemoryEstimate: number;
|
|
117
|
+
jsMemoryRange: [number, number];
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
class Script {
|
|
122
|
+
constructor(code: string, options?: ScriptOptions);
|
|
123
|
+
runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any;
|
|
124
|
+
runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
|
|
125
|
+
runInThisContext(options?: RunningScriptOptions): any;
|
|
126
|
+
createCachedData(): Buffer;
|
|
127
|
+
cachedDataRejected?: boolean | undefined;
|
|
128
|
+
}
|
|
129
|
+
function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
|
|
130
|
+
function isContext(sandbox: Context): boolean;
|
|
131
|
+
function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
|
|
132
|
+
function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
|
|
133
|
+
function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
|
|
134
|
+
function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Measure the memory known to V8 and used by the current execution context or a specified context.
|
|
138
|
+
*
|
|
139
|
+
* The format of the object that the returned Promise may resolve with is
|
|
140
|
+
* specific to the V8 engine and may change from one version of V8 to the next.
|
|
141
|
+
*
|
|
142
|
+
* The returned result is different from the statistics returned by
|
|
143
|
+
* `v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measures
|
|
144
|
+
* the memory reachable by V8 from a specific context, while
|
|
145
|
+
* `v8.getHeapSpaceStatistics()` measures the memory used by an instance
|
|
146
|
+
* of V8 engine, which can switch among multiple contexts that reference
|
|
147
|
+
* objects in the heap of one engine.
|
|
148
|
+
*
|
|
149
|
+
* @experimental
|
|
150
|
+
*/
|
|
151
|
+
function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
|
|
152
|
+
}
|
|
153
|
+
declare module 'node:vm' {
|
|
154
|
+
export * from 'vm';
|
|
155
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
declare module 'wasi' {
|
|
2
|
+
interface WASIOptions {
|
|
3
|
+
/**
|
|
4
|
+
* An array of strings that the WebAssembly application will
|
|
5
|
+
* see as command line arguments. The first argument is the virtual path to the
|
|
6
|
+
* WASI command itself.
|
|
7
|
+
*/
|
|
8
|
+
args?: string[] | undefined;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An object similar to `process.env` that the WebAssembly
|
|
12
|
+
* application will see as its environment.
|
|
13
|
+
*/
|
|
14
|
+
env?: object | undefined;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This object represents the WebAssembly application's
|
|
18
|
+
* sandbox directory structure. The string keys of `preopens` are treated as
|
|
19
|
+
* directories within the sandbox. The corresponding values in `preopens` are
|
|
20
|
+
* the real paths to those directories on the host machine.
|
|
21
|
+
*/
|
|
22
|
+
preopens?: NodeJS.Dict<string> | undefined;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* By default, WASI applications terminate the Node.js
|
|
26
|
+
* process via the `__wasi_proc_exit()` function. Setting this option to `true`
|
|
27
|
+
* causes `wasi.start()` to return the exit code rather than terminate the
|
|
28
|
+
* process.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
returnOnExit?: boolean | undefined;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The file descriptor used as standard input in the WebAssembly application.
|
|
35
|
+
* @default 0
|
|
36
|
+
*/
|
|
37
|
+
stdin?: number | undefined;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The file descriptor used as standard output in the WebAssembly application.
|
|
41
|
+
* @default 1
|
|
42
|
+
*/
|
|
43
|
+
stdout?: number | undefined;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The file descriptor used as standard error in the WebAssembly application.
|
|
47
|
+
* @default 2
|
|
48
|
+
*/
|
|
49
|
+
stderr?: number | undefined;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
class WASI {
|
|
53
|
+
constructor(options?: WASIOptions);
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* Attempt to begin execution of `instance` by invoking its `_start()` export.
|
|
57
|
+
* If `instance` does not contain a `_start()` export, then `start()` attempts to
|
|
58
|
+
* invoke the `__wasi_unstable_reactor_start()` export. If neither of those exports
|
|
59
|
+
* is present on `instance`, then `start()` does nothing.
|
|
60
|
+
*
|
|
61
|
+
* `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
|
|
62
|
+
* `memory`. If `instance` does not have a `memory` export an exception is thrown.
|
|
63
|
+
*
|
|
64
|
+
* If `start()` is called more than once, an exception is thrown.
|
|
65
|
+
*/
|
|
66
|
+
start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Attempt to initialize `instance` as a WASI reactor by invoking its `_initialize()` export, if it is present.
|
|
70
|
+
* If `instance` contains a `_start()` export, then an exception is thrown.
|
|
71
|
+
*
|
|
72
|
+
* `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
|
|
73
|
+
* `memory`. If `instance` does not have a `memory` export an exception is thrown.
|
|
74
|
+
*
|
|
75
|
+
* If `initialize()` is called more than once, an exception is thrown.
|
|
76
|
+
*/
|
|
77
|
+
initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Is an object that implements the WASI system call API. This object
|
|
81
|
+
* should be passed as the `wasi_snapshot_preview1` import during the instantiation of a
|
|
82
|
+
* [`WebAssembly.Instance`][].
|
|
83
|
+
*/
|
|
84
|
+
readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
declare module 'node:wasi' {
|
|
88
|
+
export * from 'wasi';
|
|
89
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
declare module 'worker_threads' {
|
|
2
|
+
import { Context } from 'vm';
|
|
3
|
+
import EventEmitter = require('events');
|
|
4
|
+
import { Readable, Writable } from 'stream';
|
|
5
|
+
import { URL } from 'url';
|
|
6
|
+
import { FileHandle } from 'fs/promises';
|
|
7
|
+
|
|
8
|
+
const isMainThread: boolean;
|
|
9
|
+
const parentPort: null | MessagePort;
|
|
10
|
+
const resourceLimits: ResourceLimits;
|
|
11
|
+
const SHARE_ENV: unique symbol;
|
|
12
|
+
const threadId: number;
|
|
13
|
+
const workerData: any;
|
|
14
|
+
|
|
15
|
+
class MessageChannel {
|
|
16
|
+
readonly port1: MessagePort;
|
|
17
|
+
readonly port2: MessagePort;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type TransferListItem = ArrayBuffer | MessagePort | FileHandle;
|
|
21
|
+
|
|
22
|
+
class MessagePort extends EventEmitter {
|
|
23
|
+
close(): void;
|
|
24
|
+
postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
|
|
25
|
+
ref(): void;
|
|
26
|
+
unref(): void;
|
|
27
|
+
start(): void;
|
|
28
|
+
|
|
29
|
+
addListener(event: "close", listener: () => void): this;
|
|
30
|
+
addListener(event: "message", listener: (value: any) => void): this;
|
|
31
|
+
addListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
32
|
+
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
33
|
+
|
|
34
|
+
emit(event: "close"): boolean;
|
|
35
|
+
emit(event: "message", value: any): boolean;
|
|
36
|
+
emit(event: "messageerror", error: Error): boolean;
|
|
37
|
+
emit(event: string | symbol, ...args: any[]): boolean;
|
|
38
|
+
|
|
39
|
+
on(event: "close", listener: () => void): this;
|
|
40
|
+
on(event: "message", listener: (value: any) => void): this;
|
|
41
|
+
on(event: "messageerror", listener: (error: Error) => void): this;
|
|
42
|
+
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
43
|
+
|
|
44
|
+
once(event: "close", listener: () => void): this;
|
|
45
|
+
once(event: "message", listener: (value: any) => void): this;
|
|
46
|
+
once(event: "messageerror", listener: (error: Error) => void): this;
|
|
47
|
+
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
48
|
+
|
|
49
|
+
prependListener(event: "close", listener: () => void): this;
|
|
50
|
+
prependListener(event: "message", listener: (value: any) => void): this;
|
|
51
|
+
prependListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
52
|
+
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
53
|
+
|
|
54
|
+
prependOnceListener(event: "close", listener: () => void): this;
|
|
55
|
+
prependOnceListener(event: "message", listener: (value: any) => void): this;
|
|
56
|
+
prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
57
|
+
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
58
|
+
|
|
59
|
+
removeListener(event: "close", listener: () => void): this;
|
|
60
|
+
removeListener(event: "message", listener: (value: any) => void): this;
|
|
61
|
+
removeListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
62
|
+
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
63
|
+
|
|
64
|
+
off(event: "close", listener: () => void): this;
|
|
65
|
+
off(event: "message", listener: (value: any) => void): this;
|
|
66
|
+
off(event: "messageerror", listener: (error: Error) => void): this;
|
|
67
|
+
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface WorkerOptions {
|
|
71
|
+
/**
|
|
72
|
+
* List of arguments which would be stringified and appended to
|
|
73
|
+
* `process.argv` in the worker. This is mostly similar to the `workerData`
|
|
74
|
+
* but the values will be available on the global `process.argv` as if they
|
|
75
|
+
* were passed as CLI options to the script.
|
|
76
|
+
*/
|
|
77
|
+
argv?: any[] | undefined;
|
|
78
|
+
env?: NodeJS.Dict<string> | typeof SHARE_ENV | undefined;
|
|
79
|
+
eval?: boolean | undefined;
|
|
80
|
+
workerData?: any;
|
|
81
|
+
stdin?: boolean | undefined;
|
|
82
|
+
stdout?: boolean | undefined;
|
|
83
|
+
stderr?: boolean | undefined;
|
|
84
|
+
execArgv?: string[] | undefined;
|
|
85
|
+
resourceLimits?: ResourceLimits | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Additional data to send in the first worker message.
|
|
88
|
+
*/
|
|
89
|
+
transferList?: TransferListItem[] | undefined;
|
|
90
|
+
trackUnmanagedFds?: boolean | undefined;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
interface ResourceLimits {
|
|
94
|
+
/**
|
|
95
|
+
* The maximum size of a heap space for recently created objects.
|
|
96
|
+
*/
|
|
97
|
+
maxYoungGenerationSizeMb?: number | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* The maximum size of the main heap in MB.
|
|
100
|
+
*/
|
|
101
|
+
maxOldGenerationSizeMb?: number | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* The size of a pre-allocated memory range used for generated code.
|
|
104
|
+
*/
|
|
105
|
+
codeRangeSizeMb?: number | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
|
|
108
|
+
* @default 4
|
|
109
|
+
*/
|
|
110
|
+
stackSizeMb?: number | undefined;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
class Worker extends EventEmitter {
|
|
114
|
+
readonly stdin: Writable | null;
|
|
115
|
+
readonly stdout: Readable;
|
|
116
|
+
readonly stderr: Readable;
|
|
117
|
+
readonly threadId: number;
|
|
118
|
+
readonly resourceLimits?: ResourceLimits | undefined;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @param filename The path to the Worker’s main script or module.
|
|
122
|
+
* Must be either an absolute path or a relative path (i.e. relative to the current working directory) starting with ./ or ../,
|
|
123
|
+
* or a WHATWG URL object using file: protocol. If options.eval is true, this is a string containing JavaScript code rather than a path.
|
|
124
|
+
*/
|
|
125
|
+
constructor(filename: string | URL, options?: WorkerOptions);
|
|
126
|
+
|
|
127
|
+
postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
|
|
128
|
+
ref(): void;
|
|
129
|
+
unref(): void;
|
|
130
|
+
/**
|
|
131
|
+
* Stop all JavaScript execution in the worker thread as soon as possible.
|
|
132
|
+
* Returns a Promise for the exit code that is fulfilled when the `exit` event is emitted.
|
|
133
|
+
*/
|
|
134
|
+
terminate(): Promise<number>;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Returns a readable stream for a V8 snapshot of the current state of the Worker.
|
|
138
|
+
* See [`v8.getHeapSnapshot()`][] for more details.
|
|
139
|
+
*
|
|
140
|
+
* If the Worker thread is no longer running, which may occur before the
|
|
141
|
+
* [`'exit'` event][] is emitted, the returned `Promise` will be rejected
|
|
142
|
+
* immediately with an [`ERR_WORKER_NOT_RUNNING`][] error
|
|
143
|
+
*/
|
|
144
|
+
getHeapSnapshot(): Promise<Readable>;
|
|
145
|
+
|
|
146
|
+
addListener(event: "error", listener: (err: Error) => void): this;
|
|
147
|
+
addListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
148
|
+
addListener(event: "message", listener: (value: any) => void): this;
|
|
149
|
+
addListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
150
|
+
addListener(event: "online", listener: () => void): this;
|
|
151
|
+
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
152
|
+
|
|
153
|
+
emit(event: "error", err: Error): boolean;
|
|
154
|
+
emit(event: "exit", exitCode: number): boolean;
|
|
155
|
+
emit(event: "message", value: any): boolean;
|
|
156
|
+
emit(event: "messageerror", error: Error): boolean;
|
|
157
|
+
emit(event: "online"): boolean;
|
|
158
|
+
emit(event: string | symbol, ...args: any[]): boolean;
|
|
159
|
+
|
|
160
|
+
on(event: "error", listener: (err: Error) => void): this;
|
|
161
|
+
on(event: "exit", listener: (exitCode: number) => void): this;
|
|
162
|
+
on(event: "message", listener: (value: any) => void): this;
|
|
163
|
+
on(event: "messageerror", listener: (error: Error) => void): this;
|
|
164
|
+
on(event: "online", listener: () => void): this;
|
|
165
|
+
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
166
|
+
|
|
167
|
+
once(event: "error", listener: (err: Error) => void): this;
|
|
168
|
+
once(event: "exit", listener: (exitCode: number) => void): this;
|
|
169
|
+
once(event: "message", listener: (value: any) => void): this;
|
|
170
|
+
once(event: "messageerror", listener: (error: Error) => void): this;
|
|
171
|
+
once(event: "online", listener: () => void): this;
|
|
172
|
+
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
173
|
+
|
|
174
|
+
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
175
|
+
prependListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
176
|
+
prependListener(event: "message", listener: (value: any) => void): this;
|
|
177
|
+
prependListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
178
|
+
prependListener(event: "online", listener: () => void): this;
|
|
179
|
+
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
180
|
+
|
|
181
|
+
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
182
|
+
prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
183
|
+
prependOnceListener(event: "message", listener: (value: any) => void): this;
|
|
184
|
+
prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
185
|
+
prependOnceListener(event: "online", listener: () => void): this;
|
|
186
|
+
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
187
|
+
|
|
188
|
+
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
189
|
+
removeListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
190
|
+
removeListener(event: "message", listener: (value: any) => void): this;
|
|
191
|
+
removeListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
192
|
+
removeListener(event: "online", listener: () => void): this;
|
|
193
|
+
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
194
|
+
|
|
195
|
+
off(event: "error", listener: (err: Error) => void): this;
|
|
196
|
+
off(event: "exit", listener: (exitCode: number) => void): this;
|
|
197
|
+
off(event: "message", listener: (value: any) => void): this;
|
|
198
|
+
off(event: "messageerror", listener: (error: Error) => void): this;
|
|
199
|
+
off(event: "online", listener: () => void): this;
|
|
200
|
+
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Mark an object as not transferable.
|
|
205
|
+
* If `object` occurs in the transfer list of a `port.postMessage()` call, it will be ignored.
|
|
206
|
+
*
|
|
207
|
+
* In particular, this makes sense for objects that can be cloned, rather than transferred,
|
|
208
|
+
* and which are used by other objects on the sending side. For example, Node.js marks
|
|
209
|
+
* the `ArrayBuffer`s it uses for its Buffer pool with this.
|
|
210
|
+
*
|
|
211
|
+
* This operation cannot be undone.
|
|
212
|
+
*/
|
|
213
|
+
function markAsUntransferable(object: object): void;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Transfer a `MessagePort` to a different `vm` Context. The original `port`
|
|
217
|
+
* object will be rendered unusable, and the returned `MessagePort` instance will
|
|
218
|
+
* take its place.
|
|
219
|
+
*
|
|
220
|
+
* The returned `MessagePort` will be an object in the target context, and will
|
|
221
|
+
* inherit from its global `Object` class. Objects passed to the
|
|
222
|
+
* `port.onmessage()` listener will also be created in the target context
|
|
223
|
+
* and inherit from its global `Object` class.
|
|
224
|
+
*
|
|
225
|
+
* However, the created `MessagePort` will no longer inherit from
|
|
226
|
+
* `EventEmitter`, and only `port.onmessage()` can be used to receive
|
|
227
|
+
* events using it.
|
|
228
|
+
*/
|
|
229
|
+
function moveMessagePortToContext(port: MessagePort, context: Context): MessagePort;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Receive a single message from a given `MessagePort`. If no message is available,
|
|
233
|
+
* `undefined` is returned, otherwise an object with a single `message` property
|
|
234
|
+
* that contains the message payload, corresponding to the oldest message in the
|
|
235
|
+
* `MessagePort`’s queue.
|
|
236
|
+
*/
|
|
237
|
+
function receiveMessageOnPort(port: MessagePort): { message: any } | undefined;
|
|
238
|
+
}
|
|
239
|
+
declare module 'node:worker_threads' {
|
|
240
|
+
export * from 'worker_threads';
|
|
241
|
+
}
|
package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/zlib.d.ts
RENAMED
|
@@ -1,44 +1,55 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
import * as stream from
|
|
1
|
+
declare module 'zlib' {
|
|
2
|
+
import * as stream from 'stream';
|
|
3
3
|
|
|
4
4
|
interface ZlibOptions {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
/**
|
|
6
|
+
* @default constants.Z_NO_FLUSH
|
|
7
|
+
*/
|
|
8
|
+
flush?: number | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* @default constants.Z_FINISH
|
|
11
|
+
*/
|
|
12
|
+
finishFlush?: number | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* @default 16*1024
|
|
15
|
+
*/
|
|
16
|
+
chunkSize?: number | undefined;
|
|
17
|
+
windowBits?: number | undefined;
|
|
18
|
+
level?: number | undefined; // compression only
|
|
19
|
+
memLevel?: number | undefined; // compression only
|
|
20
|
+
strategy?: number | undefined; // compression only
|
|
21
|
+
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined; // deflate/inflate only, empty dictionary by default
|
|
22
|
+
info?: boolean | undefined;
|
|
23
|
+
maxOutputLength?: number | undefined;
|
|
14
24
|
}
|
|
15
25
|
|
|
16
26
|
interface BrotliOptions {
|
|
17
27
|
/**
|
|
18
28
|
* @default constants.BROTLI_OPERATION_PROCESS
|
|
19
29
|
*/
|
|
20
|
-
flush?: number;
|
|
30
|
+
flush?: number | undefined;
|
|
21
31
|
/**
|
|
22
32
|
* @default constants.BROTLI_OPERATION_FINISH
|
|
23
33
|
*/
|
|
24
|
-
finishFlush?: number;
|
|
34
|
+
finishFlush?: number | undefined;
|
|
25
35
|
/**
|
|
26
36
|
* @default 16*1024
|
|
27
37
|
*/
|
|
28
|
-
chunkSize?: number;
|
|
38
|
+
chunkSize?: number | undefined;
|
|
29
39
|
params?: {
|
|
30
40
|
/**
|
|
31
41
|
* Each key is a `constants.BROTLI_*` constant.
|
|
32
42
|
*/
|
|
33
43
|
[key: number]: boolean | number;
|
|
34
|
-
};
|
|
44
|
+
} | undefined;
|
|
45
|
+
maxOutputLength?: number | undefined;
|
|
35
46
|
}
|
|
36
47
|
|
|
37
48
|
interface Zlib {
|
|
38
49
|
/** @deprecated Use bytesWritten instead. */
|
|
39
50
|
readonly bytesRead: number;
|
|
40
51
|
readonly bytesWritten: number;
|
|
41
|
-
shell?: boolean | string;
|
|
52
|
+
shell?: boolean | string | undefined;
|
|
42
53
|
close(callback?: () => void): void;
|
|
43
54
|
flush(kind?: number, callback?: () => void): void;
|
|
44
55
|
flush(callback?: () => void): void;
|
|
@@ -72,7 +83,7 @@ declare module "zlib" {
|
|
|
72
83
|
function createInflateRaw(options?: ZlibOptions): InflateRaw;
|
|
73
84
|
function createUnzip(options?: ZlibOptions): Unzip;
|
|
74
85
|
|
|
75
|
-
type InputType = string |
|
|
86
|
+
type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
|
|
76
87
|
|
|
77
88
|
type CompressCallback = (error: Error | null, result: Buffer) => void;
|
|
78
89
|
|
|
@@ -149,43 +160,6 @@ declare module "zlib" {
|
|
|
149
160
|
function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
|
|
150
161
|
|
|
151
162
|
namespace constants {
|
|
152
|
-
// Allowed flush values.
|
|
153
|
-
|
|
154
|
-
const Z_NO_FLUSH: number;
|
|
155
|
-
const Z_PARTIAL_FLUSH: number;
|
|
156
|
-
const Z_SYNC_FLUSH: number;
|
|
157
|
-
const Z_FULL_FLUSH: number;
|
|
158
|
-
const Z_FINISH: number;
|
|
159
|
-
const Z_BLOCK: number;
|
|
160
|
-
const Z_TREES: number;
|
|
161
|
-
|
|
162
|
-
// Return codes for the compression/decompression functions. Negative values are errors, positive values are used for special but normal events.
|
|
163
|
-
|
|
164
|
-
const Z_OK: number;
|
|
165
|
-
const Z_STREAM_END: number;
|
|
166
|
-
const Z_NEED_DICT: number;
|
|
167
|
-
const Z_ERRNO: number;
|
|
168
|
-
const Z_STREAM_ERROR: number;
|
|
169
|
-
const Z_DATA_ERROR: number;
|
|
170
|
-
const Z_MEM_ERROR: number;
|
|
171
|
-
const Z_BUF_ERROR: number;
|
|
172
|
-
const Z_VERSION_ERROR: number;
|
|
173
|
-
|
|
174
|
-
// Compression levels.
|
|
175
|
-
|
|
176
|
-
const Z_NO_COMPRESSION: number;
|
|
177
|
-
const Z_BEST_SPEED: number;
|
|
178
|
-
const Z_BEST_COMPRESSION: number;
|
|
179
|
-
const Z_DEFAULT_COMPRESSION: number;
|
|
180
|
-
|
|
181
|
-
// Compression strategy.
|
|
182
|
-
|
|
183
|
-
const Z_FILTERED: number;
|
|
184
|
-
const Z_HUFFMAN_ONLY: number;
|
|
185
|
-
const Z_RLE: number;
|
|
186
|
-
const Z_FIXED: number;
|
|
187
|
-
const Z_DEFAULT_STRATEGY: number;
|
|
188
|
-
|
|
189
163
|
const BROTLI_DECODE: number;
|
|
190
164
|
const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
|
|
191
165
|
const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number;
|
|
@@ -253,6 +227,66 @@ declare module "zlib" {
|
|
|
253
227
|
const BROTLI_PARAM_NPOSTFIX: number;
|
|
254
228
|
const BROTLI_PARAM_QUALITY: number;
|
|
255
229
|
const BROTLI_PARAM_SIZE_HINT: number;
|
|
230
|
+
|
|
231
|
+
const DEFLATE: number;
|
|
232
|
+
const DEFLATERAW: number;
|
|
233
|
+
const GUNZIP: number;
|
|
234
|
+
const GZIP: number;
|
|
235
|
+
const INFLATE: number;
|
|
236
|
+
const INFLATERAW: number;
|
|
237
|
+
const UNZIP: number;
|
|
238
|
+
|
|
239
|
+
// Allowed flush values.
|
|
240
|
+
const Z_NO_FLUSH: number;
|
|
241
|
+
const Z_PARTIAL_FLUSH: number;
|
|
242
|
+
const Z_SYNC_FLUSH: number;
|
|
243
|
+
const Z_FULL_FLUSH: number;
|
|
244
|
+
const Z_FINISH: number;
|
|
245
|
+
const Z_BLOCK: number;
|
|
246
|
+
const Z_TREES: number;
|
|
247
|
+
|
|
248
|
+
// Return codes for the compression/decompression functions.
|
|
249
|
+
// Negative values are errors, positive values are used for special but normal events.
|
|
250
|
+
const Z_OK: number;
|
|
251
|
+
const Z_STREAM_END: number;
|
|
252
|
+
const Z_NEED_DICT: number;
|
|
253
|
+
const Z_ERRNO: number;
|
|
254
|
+
const Z_STREAM_ERROR: number;
|
|
255
|
+
const Z_DATA_ERROR: number;
|
|
256
|
+
const Z_MEM_ERROR: number;
|
|
257
|
+
const Z_BUF_ERROR: number;
|
|
258
|
+
const Z_VERSION_ERROR: number;
|
|
259
|
+
|
|
260
|
+
// Compression levels.
|
|
261
|
+
const Z_NO_COMPRESSION: number;
|
|
262
|
+
const Z_BEST_SPEED: number;
|
|
263
|
+
const Z_BEST_COMPRESSION: number;
|
|
264
|
+
const Z_DEFAULT_COMPRESSION: number;
|
|
265
|
+
|
|
266
|
+
// Compression strategy.
|
|
267
|
+
const Z_FILTERED: number;
|
|
268
|
+
const Z_HUFFMAN_ONLY: number;
|
|
269
|
+
const Z_RLE: number;
|
|
270
|
+
const Z_FIXED: number;
|
|
271
|
+
const Z_DEFAULT_STRATEGY: number;
|
|
272
|
+
|
|
273
|
+
const Z_DEFAULT_WINDOWBITS: number;
|
|
274
|
+
const Z_MIN_WINDOWBITS: number;
|
|
275
|
+
const Z_MAX_WINDOWBITS: number;
|
|
276
|
+
|
|
277
|
+
const Z_MIN_CHUNK: number;
|
|
278
|
+
const Z_MAX_CHUNK: number;
|
|
279
|
+
const Z_DEFAULT_CHUNK: number;
|
|
280
|
+
|
|
281
|
+
const Z_MIN_MEMLEVEL: number;
|
|
282
|
+
const Z_MAX_MEMLEVEL: number;
|
|
283
|
+
const Z_DEFAULT_MEMLEVEL: number;
|
|
284
|
+
|
|
285
|
+
const Z_MIN_LEVEL: number;
|
|
286
|
+
const Z_MAX_LEVEL: number;
|
|
287
|
+
const Z_DEFAULT_LEVEL: number;
|
|
288
|
+
|
|
289
|
+
const ZLIB_VERNUM: number;
|
|
256
290
|
}
|
|
257
291
|
|
|
258
292
|
// Allowed flush values.
|
|
@@ -325,3 +359,6 @@ declare module "zlib" {
|
|
|
325
359
|
/** @deprecated */
|
|
326
360
|
const Z_DEFLATED: number;
|
|
327
361
|
}
|
|
362
|
+
declare module 'node:zlib' {
|
|
363
|
+
export * from 'zlib';
|
|
364
|
+
}
|