cdk-common 2.0.1301 → 2.0.1303
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 +32 -2
- package/API.md +30 -0
- package/lib/main.js +1 -1
- package/lib/managed-policies.d.ts +6 -1
- package/lib/managed-policies.js +6 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +15 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +3 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +35 -35
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +11 -11
- package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +3 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +4 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +9 -12
- package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +5 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +13 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +6 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +7 -19
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +29 -22
- package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +18 -48
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +15 -9
- package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +3 -4
- package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +35 -35
- package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +11 -11
- package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +3 -4
- package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +4 -3
- package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +9 -12
- package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +5 -5
- package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +13 -3
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +6 -8
- package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +7 -19
- package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +29 -22
- package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +18 -48
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare module "process" {
|
|
2
|
+
import { Control, MessageOptions } from "node:child_process";
|
|
2
3
|
import * as tty from "node:tty";
|
|
3
4
|
import { Worker } from "node:worker_threads";
|
|
4
5
|
|
|
@@ -346,7 +347,7 @@ declare module "process" {
|
|
|
346
347
|
/**
|
|
347
348
|
* Can be used to change the default timezone at runtime
|
|
348
349
|
*/
|
|
349
|
-
TZ?: string;
|
|
350
|
+
TZ?: string | undefined;
|
|
350
351
|
}
|
|
351
352
|
interface HRTime {
|
|
352
353
|
/**
|
|
@@ -990,7 +991,7 @@ declare module "process" {
|
|
|
990
991
|
* @since v0.1.13
|
|
991
992
|
* @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed.
|
|
992
993
|
*/
|
|
993
|
-
exit(code?: number | string | null
|
|
994
|
+
exit(code?: number | string | null): never;
|
|
994
995
|
/**
|
|
995
996
|
* A number which will be the process exit code, when the process either
|
|
996
997
|
* exits gracefully, or is exited via {@link exit} without specifying
|
|
@@ -1001,7 +1002,7 @@ declare module "process" {
|
|
|
1001
1002
|
* @default undefined
|
|
1002
1003
|
* @since v0.11.8
|
|
1003
1004
|
*/
|
|
1004
|
-
exitCode
|
|
1005
|
+
exitCode: number | string | null | undefined;
|
|
1005
1006
|
finalization: {
|
|
1006
1007
|
/**
|
|
1007
1008
|
* This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected.
|
|
@@ -1568,7 +1569,7 @@ declare module "process" {
|
|
|
1568
1569
|
* @since v0.1.17
|
|
1569
1570
|
* @deprecated Since v14.0.0 - Use `main` instead.
|
|
1570
1571
|
*/
|
|
1571
|
-
mainModule?: Module
|
|
1572
|
+
mainModule?: Module;
|
|
1572
1573
|
memoryUsage: MemoryUsageFn;
|
|
1573
1574
|
/**
|
|
1574
1575
|
* Gets the amount of memory available to the process (in bytes) based on
|
|
@@ -1760,18 +1761,7 @@ declare module "process" {
|
|
|
1760
1761
|
* If no IPC channel exists, this property is undefined.
|
|
1761
1762
|
* @since v7.1.0
|
|
1762
1763
|
*/
|
|
1763
|
-
channel?:
|
|
1764
|
-
/**
|
|
1765
|
-
* This method makes the IPC channel keep the event loop of the process running if .unref() has been called before.
|
|
1766
|
-
* @since v7.1.0
|
|
1767
|
-
*/
|
|
1768
|
-
ref(): void;
|
|
1769
|
-
/**
|
|
1770
|
-
* This method makes the IPC channel not keep the event loop of the process running, and lets it finish even while the channel is open.
|
|
1771
|
-
* @since v7.1.0
|
|
1772
|
-
*/
|
|
1773
|
-
unref(): void;
|
|
1774
|
-
};
|
|
1764
|
+
channel?: Control;
|
|
1775
1765
|
/**
|
|
1776
1766
|
* If Node.js is spawned with an IPC channel, the `process.send()` method can be
|
|
1777
1767
|
* used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
|
|
@@ -1786,9 +1776,7 @@ declare module "process" {
|
|
|
1786
1776
|
send?(
|
|
1787
1777
|
message: any,
|
|
1788
1778
|
sendHandle?: any,
|
|
1789
|
-
options?:
|
|
1790
|
-
keepOpen?: boolean | undefined;
|
|
1791
|
-
},
|
|
1779
|
+
options?: MessageOptions,
|
|
1792
1780
|
callback?: (error: Error | null) => void,
|
|
1793
1781
|
): boolean;
|
|
1794
1782
|
/**
|
|
@@ -45,22 +45,22 @@ declare module "stream" {
|
|
|
45
45
|
emitClose?: boolean | undefined;
|
|
46
46
|
highWaterMark?: number | undefined;
|
|
47
47
|
objectMode?: boolean | undefined;
|
|
48
|
-
construct
|
|
49
|
-
destroy
|
|
48
|
+
construct?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined;
|
|
49
|
+
destroy?: ((this: T, error: Error | null, callback: (error?: Error | null) => void) => void) | undefined;
|
|
50
50
|
autoDestroy?: boolean | undefined;
|
|
51
51
|
}
|
|
52
52
|
interface ReadableOptions<T extends Readable = Readable> extends StreamOptions<T> {
|
|
53
53
|
encoding?: BufferEncoding | undefined;
|
|
54
|
-
read
|
|
54
|
+
read?: ((this: T, size: number) => void) | undefined;
|
|
55
55
|
}
|
|
56
56
|
interface ArrayOptions {
|
|
57
57
|
/**
|
|
58
58
|
* The maximum concurrent invocations of `fn` to call on the stream at once.
|
|
59
59
|
* @default 1
|
|
60
60
|
*/
|
|
61
|
-
concurrency?: number;
|
|
61
|
+
concurrency?: number | undefined;
|
|
62
62
|
/** Allows destroying the stream if the signal is aborted. */
|
|
63
|
-
signal?: AbortSignal;
|
|
63
|
+
signal?: AbortSignal | undefined;
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* @since v0.9.4
|
|
@@ -697,21 +697,25 @@ declare module "stream" {
|
|
|
697
697
|
interface WritableOptions<T extends Writable = Writable> extends StreamOptions<T> {
|
|
698
698
|
decodeStrings?: boolean | undefined;
|
|
699
699
|
defaultEncoding?: BufferEncoding | undefined;
|
|
700
|
-
write
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
700
|
+
write?:
|
|
701
|
+
| ((
|
|
702
|
+
this: T,
|
|
703
|
+
chunk: any,
|
|
704
|
+
encoding: BufferEncoding,
|
|
705
|
+
callback: (error?: Error | null) => void,
|
|
706
|
+
) => void)
|
|
707
|
+
| undefined;
|
|
708
|
+
writev?:
|
|
709
|
+
| ((
|
|
710
|
+
this: T,
|
|
711
|
+
chunks: Array<{
|
|
712
|
+
chunk: any;
|
|
713
|
+
encoding: BufferEncoding;
|
|
714
|
+
}>,
|
|
715
|
+
callback: (error?: Error | null) => void,
|
|
716
|
+
) => void)
|
|
717
|
+
| undefined;
|
|
718
|
+
final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined;
|
|
715
719
|
}
|
|
716
720
|
/**
|
|
717
721
|
* @since v0.9.4
|
|
@@ -1235,8 +1239,10 @@ declare module "stream" {
|
|
|
1235
1239
|
function duplexPair(options?: DuplexOptions): [Duplex, Duplex];
|
|
1236
1240
|
type TransformCallback = (error?: Error | null, data?: any) => void;
|
|
1237
1241
|
interface TransformOptions<T extends Transform = Transform> extends DuplexOptions<T> {
|
|
1238
|
-
transform
|
|
1239
|
-
|
|
1242
|
+
transform?:
|
|
1243
|
+
| ((this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback) => void)
|
|
1244
|
+
| undefined;
|
|
1245
|
+
flush?: ((this: T, callback: TransformCallback) => void) | undefined;
|
|
1240
1246
|
}
|
|
1241
1247
|
/**
|
|
1242
1248
|
* Transform streams are `Duplex` streams where the output is in some way
|
|
@@ -1643,6 +1649,7 @@ declare module "stream" {
|
|
|
1643
1649
|
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
|
|
1644
1650
|
): Promise<void>;
|
|
1645
1651
|
}
|
|
1652
|
+
// TODO: this interface never existed; remove in next major
|
|
1646
1653
|
interface Pipe {
|
|
1647
1654
|
close(): void;
|
|
1648
1655
|
hasRef(): boolean;
|
|
@@ -586,7 +586,7 @@ declare module "tls" {
|
|
|
586
586
|
* requires explicitly specifying a cipher suite with the `ciphers` option.
|
|
587
587
|
* More information can be found in the RFC 4279.
|
|
588
588
|
*/
|
|
589
|
-
pskCallback
|
|
589
|
+
pskCallback?: ((socket: TLSSocket, identity: string) => NodeJS.ArrayBufferView | null) | undefined;
|
|
590
590
|
/**
|
|
591
591
|
* hint to send to a client to help
|
|
592
592
|
* with selecting the identity during TLS-PSK negotiation. Will be ignored
|
|
@@ -627,7 +627,7 @@ declare module "tls" {
|
|
|
627
627
|
* compatible with the selected cipher's digest.
|
|
628
628
|
* `identity` must use UTF-8 encoding.
|
|
629
629
|
*/
|
|
630
|
-
pskCallback
|
|
630
|
+
pskCallback?: ((hint: string | null) => PSKCallbackNegotation | null) | undefined;
|
|
631
631
|
}
|
|
632
632
|
/**
|
|
633
633
|
* Accepts encrypted connections using TLS or SSL.
|
|
@@ -43,12 +43,12 @@ declare module "v8" {
|
|
|
43
43
|
* If true, expose internals in the heap snapshot.
|
|
44
44
|
* @default false
|
|
45
45
|
*/
|
|
46
|
-
exposeInternals?: boolean;
|
|
46
|
+
exposeInternals?: boolean | undefined;
|
|
47
47
|
/**
|
|
48
48
|
* If true, expose numeric values in artificial fields.
|
|
49
49
|
* @default false
|
|
50
50
|
*/
|
|
51
|
-
exposeNumericValues?: boolean;
|
|
51
|
+
exposeNumericValues?: boolean | undefined;
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* Returns an integer representing a version tag derived from the V8 version,
|
|
@@ -99,28 +99,22 @@ declare module "vm" {
|
|
|
99
99
|
*/
|
|
100
100
|
breakOnSigint?: boolean | undefined;
|
|
101
101
|
}
|
|
102
|
-
interface RunningScriptInNewContextOptions
|
|
102
|
+
interface RunningScriptInNewContextOptions
|
|
103
|
+
extends RunningScriptOptions, Pick<CreateContextOptions, "microtaskMode">
|
|
104
|
+
{
|
|
103
105
|
/**
|
|
104
106
|
* Human-readable name of the newly created context.
|
|
105
107
|
*/
|
|
106
|
-
contextName?: CreateContextOptions["name"];
|
|
108
|
+
contextName?: CreateContextOptions["name"] | undefined;
|
|
107
109
|
/**
|
|
108
110
|
* Origin corresponding to the newly created context for display purposes. The origin should be formatted like a URL,
|
|
109
111
|
* but with only the scheme, host, and port (if necessary), like the value of the `url.origin` property of a `URL` object.
|
|
110
112
|
* Most notably, this string should omit the trailing slash, as that denotes a path.
|
|
111
113
|
*/
|
|
112
|
-
contextOrigin?: CreateContextOptions["origin"];
|
|
113
|
-
contextCodeGeneration?: CreateContextOptions["codeGeneration"];
|
|
114
|
-
/**
|
|
115
|
-
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
|
116
|
-
*/
|
|
117
|
-
microtaskMode?: CreateContextOptions["microtaskMode"];
|
|
114
|
+
contextOrigin?: CreateContextOptions["origin"] | undefined;
|
|
115
|
+
contextCodeGeneration?: CreateContextOptions["codeGeneration"] | undefined;
|
|
118
116
|
}
|
|
119
|
-
interface RunningCodeOptions extends RunningScriptOptions {
|
|
120
|
-
/**
|
|
121
|
-
* Provides an optional data with V8's code cache data for the supplied source.
|
|
122
|
-
*/
|
|
123
|
-
cachedData?: ScriptOptions["cachedData"] | undefined;
|
|
117
|
+
interface RunningCodeOptions extends RunningScriptOptions, Pick<ScriptOptions, "cachedData"> {
|
|
124
118
|
/**
|
|
125
119
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
126
120
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
@@ -132,11 +126,9 @@ declare module "vm" {
|
|
|
132
126
|
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
|
133
127
|
| undefined;
|
|
134
128
|
}
|
|
135
|
-
interface RunningCodeInNewContextOptions
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
*/
|
|
139
|
-
cachedData?: ScriptOptions["cachedData"] | undefined;
|
|
129
|
+
interface RunningCodeInNewContextOptions
|
|
130
|
+
extends RunningScriptInNewContextOptions, Pick<ScriptOptions, "cachedData">
|
|
131
|
+
{
|
|
140
132
|
/**
|
|
141
133
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
142
134
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
@@ -148,16 +140,7 @@ declare module "vm" {
|
|
|
148
140
|
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
|
149
141
|
| undefined;
|
|
150
142
|
}
|
|
151
|
-
interface CompileFunctionOptions extends BaseOptions {
|
|
152
|
-
/**
|
|
153
|
-
* Provides an optional data with V8's code cache data for the supplied source.
|
|
154
|
-
*/
|
|
155
|
-
cachedData?: ScriptOptions["cachedData"] | undefined;
|
|
156
|
-
/**
|
|
157
|
-
* Specifies whether to produce new cache data.
|
|
158
|
-
* @default false
|
|
159
|
-
*/
|
|
160
|
-
produceCachedData?: boolean | undefined;
|
|
143
|
+
interface CompileFunctionOptions extends BaseOptions, Pick<ScriptOptions, "cachedData" | "produceCachedData"> {
|
|
161
144
|
/**
|
|
162
145
|
* The sandbox/context in which the said function should be compiled in.
|
|
163
146
|
*/
|
|
@@ -386,15 +369,15 @@ declare module "vm" {
|
|
|
386
369
|
*/
|
|
387
370
|
createCachedData(): Buffer;
|
|
388
371
|
/** @deprecated in favor of `script.createCachedData()` */
|
|
389
|
-
cachedDataProduced?: boolean
|
|
372
|
+
cachedDataProduced?: boolean;
|
|
390
373
|
/**
|
|
391
374
|
* When `cachedData` is supplied to create the `vm.Script`, this value will be set
|
|
392
375
|
* to either `true` or `false` depending on acceptance of the data by V8.
|
|
393
376
|
* Otherwise the value is `undefined`.
|
|
394
377
|
* @since v5.7.0
|
|
395
378
|
*/
|
|
396
|
-
cachedDataRejected?: boolean
|
|
397
|
-
cachedData?: Buffer
|
|
379
|
+
cachedDataRejected?: boolean;
|
|
380
|
+
cachedData?: Buffer;
|
|
398
381
|
/**
|
|
399
382
|
* When the script is compiled from a source that contains a source map magic
|
|
400
383
|
* comment, this property will be set to the URL of the source map.
|
|
@@ -412,7 +395,7 @@ declare module "vm" {
|
|
|
412
395
|
* ```
|
|
413
396
|
* @since v19.1.0, v18.13.0
|
|
414
397
|
*/
|
|
415
|
-
sourceMapURL
|
|
398
|
+
sourceMapURL: string | undefined;
|
|
416
399
|
}
|
|
417
400
|
/**
|
|
418
401
|
* If the given `contextObject` is an object, the `vm.createContext()` method will
|
|
@@ -622,11 +605,7 @@ declare module "vm" {
|
|
|
622
605
|
code: string,
|
|
623
606
|
params?: readonly string[],
|
|
624
607
|
options?: CompileFunctionOptions,
|
|
625
|
-
): Function &
|
|
626
|
-
cachedData?: Script["cachedData"] | undefined;
|
|
627
|
-
cachedDataProduced?: Script["cachedDataProduced"] | undefined;
|
|
628
|
-
cachedDataRejected?: Script["cachedDataRejected"] | undefined;
|
|
629
|
-
};
|
|
608
|
+
): Function & Pick<Script, "cachedData" | "cachedDataProduced" | "cachedDataRejected">;
|
|
630
609
|
/**
|
|
631
610
|
* Measure the memory known to V8 and used by all contexts known to the
|
|
632
611
|
* current V8 isolate, or the main context.
|
|
@@ -683,10 +662,7 @@ declare module "vm" {
|
|
|
683
662
|
* @experimental
|
|
684
663
|
*/
|
|
685
664
|
function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
|
|
686
|
-
interface ModuleEvaluateOptions {
|
|
687
|
-
timeout?: RunningScriptOptions["timeout"] | undefined;
|
|
688
|
-
breakOnSigint?: RunningScriptOptions["breakOnSigint"] | undefined;
|
|
689
|
-
}
|
|
665
|
+
interface ModuleEvaluateOptions extends Pick<RunningScriptOptions, "breakOnSigint" | "timeout"> {}
|
|
690
666
|
type ModuleLinker = (
|
|
691
667
|
specifier: string,
|
|
692
668
|
referencingModule: Module,
|
|
@@ -885,19 +861,13 @@ declare module "vm" {
|
|
|
885
861
|
*/
|
|
886
862
|
link(linker: ModuleLinker): Promise<void>;
|
|
887
863
|
}
|
|
888
|
-
interface SourceTextModuleOptions {
|
|
864
|
+
interface SourceTextModuleOptions extends Pick<ScriptOptions, "cachedData" | "columnOffset" | "lineOffset"> {
|
|
889
865
|
/**
|
|
890
866
|
* String used in stack traces.
|
|
891
867
|
* @default 'vm:module(i)' where i is a context-specific ascending index.
|
|
892
868
|
*/
|
|
893
869
|
identifier?: string | undefined;
|
|
894
|
-
/**
|
|
895
|
-
* Provides an optional data with V8's code cache data for the supplied source.
|
|
896
|
-
*/
|
|
897
|
-
cachedData?: ScriptOptions["cachedData"] | undefined;
|
|
898
870
|
context?: Context | undefined;
|
|
899
|
-
lineOffset?: BaseOptions["lineOffset"] | undefined;
|
|
900
|
-
columnOffset?: BaseOptions["columnOffset"] | undefined;
|
|
901
871
|
/**
|
|
902
872
|
* Called during evaluation of this module to initialize the `import.meta`.
|
|
903
873
|
*/
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Sat, 11 Oct 2025 14:02:18 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -69,7 +69,7 @@ declare module "child_process" {
|
|
|
69
69
|
import { Abortable, EventEmitter } from "node:events";
|
|
70
70
|
import * as dgram from "node:dgram";
|
|
71
71
|
import * as net from "node:net";
|
|
72
|
-
import {
|
|
72
|
+
import { Readable, Stream, Writable } from "node:stream";
|
|
73
73
|
import { URL } from "node:url";
|
|
74
74
|
type Serializable = string | object | number | boolean | bigint;
|
|
75
75
|
type SendHandle = net.Socket | net.Server | dgram.Socket | undefined;
|
|
@@ -139,7 +139,7 @@ declare module "child_process" {
|
|
|
139
139
|
* no IPC channel exists, this property is `undefined`.
|
|
140
140
|
* @since v7.1.0
|
|
141
141
|
*/
|
|
142
|
-
readonly channel?:
|
|
142
|
+
readonly channel?: Control | null;
|
|
143
143
|
/**
|
|
144
144
|
* A sparse array of pipes to the child process, corresponding with positions in
|
|
145
145
|
* the `stdio` option passed to {@link spawn} that have been set
|
|
@@ -612,6 +612,10 @@ declare module "child_process" {
|
|
|
612
612
|
Readable | Writable | null | undefined, // extra, no modification
|
|
613
613
|
];
|
|
614
614
|
}
|
|
615
|
+
interface Control extends EventEmitter {
|
|
616
|
+
ref(): void;
|
|
617
|
+
unref(): void;
|
|
618
|
+
}
|
|
615
619
|
interface MessageOptions {
|
|
616
620
|
keepOpen?: boolean | undefined;
|
|
617
621
|
}
|
|
@@ -894,11 +898,12 @@ declare module "child_process" {
|
|
|
894
898
|
interface ExecOptionsWithBufferEncoding extends ExecOptions {
|
|
895
899
|
encoding: "buffer" | null; // specify `null`.
|
|
896
900
|
}
|
|
901
|
+
// TODO: Just Plain Wrong™ (see also nodejs/node#57392)
|
|
897
902
|
interface ExecException extends Error {
|
|
898
|
-
cmd?: string
|
|
899
|
-
killed?: boolean
|
|
900
|
-
code?: number
|
|
901
|
-
signal?: NodeJS.Signals
|
|
903
|
+
cmd?: string;
|
|
904
|
+
killed?: boolean;
|
|
905
|
+
code?: number;
|
|
906
|
+
signal?: NodeJS.Signals;
|
|
902
907
|
stdout?: string;
|
|
903
908
|
stderr?: string;
|
|
904
909
|
}
|
|
@@ -1056,10 +1061,11 @@ declare module "child_process" {
|
|
|
1056
1061
|
}
|
|
1057
1062
|
/** @deprecated Use `ExecFileOptions` instead. */
|
|
1058
1063
|
interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {}
|
|
1064
|
+
// TODO: execFile exceptions can take many forms... this accurately describes none of them
|
|
1059
1065
|
type ExecFileException =
|
|
1060
1066
|
& Omit<ExecException, "code">
|
|
1061
1067
|
& Omit<NodeJS.ErrnoException, "code">
|
|
1062
|
-
& { code?: string | number |
|
|
1068
|
+
& { code?: string | number | null };
|
|
1063
1069
|
/**
|
|
1064
1070
|
* The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
|
|
1065
1071
|
* executable `file` is spawned directly as a new process making it slightly more
|
|
@@ -1320,7 +1326,7 @@ declare module "child_process" {
|
|
|
1320
1326
|
stderr: T;
|
|
1321
1327
|
status: number | null;
|
|
1322
1328
|
signal: NodeJS.Signals | null;
|
|
1323
|
-
error?: Error
|
|
1329
|
+
error?: Error;
|
|
1324
1330
|
}
|
|
1325
1331
|
/**
|
|
1326
1332
|
* The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
|
|
@@ -1409,7 +1415,7 @@ declare module "child_process" {
|
|
|
1409
1415
|
encoding: BufferEncoding;
|
|
1410
1416
|
}
|
|
1411
1417
|
interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
|
|
1412
|
-
encoding?: "buffer" | null; // specify `null`.
|
|
1418
|
+
encoding?: "buffer" | null | undefined; // specify `null`.
|
|
1413
1419
|
}
|
|
1414
1420
|
/**
|
|
1415
1421
|
* The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
|
|
@@ -481,7 +481,7 @@ declare module "cluster" {
|
|
|
481
481
|
* ```
|
|
482
482
|
* @since v0.7.0
|
|
483
483
|
*/
|
|
484
|
-
readonly worker?: Worker
|
|
484
|
+
readonly worker?: Worker;
|
|
485
485
|
/**
|
|
486
486
|
* A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process.
|
|
487
487
|
*
|
|
@@ -497,7 +497,7 @@ declare module "cluster" {
|
|
|
497
497
|
* ```
|
|
498
498
|
* @since v0.7.0
|
|
499
499
|
*/
|
|
500
|
-
readonly workers?: NodeJS.Dict<Worker
|
|
500
|
+
readonly workers?: NodeJS.Dict<Worker>;
|
|
501
501
|
readonly SCHED_NONE: number;
|
|
502
502
|
readonly SCHED_RR: number;
|
|
503
503
|
/**
|
|
@@ -550,10 +550,9 @@ declare module "cluster" {
|
|
|
550
550
|
prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
|
|
551
551
|
prependListener(event: "fork", listener: (worker: Worker) => void): this;
|
|
552
552
|
prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
|
|
553
|
-
// the handle is a net.Socket or net.Server object, or undefined.
|
|
554
553
|
prependListener(
|
|
555
554
|
event: "message",
|
|
556
|
-
listener: (worker: Worker, message: any, handle
|
|
555
|
+
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
|
|
557
556
|
): this;
|
|
558
557
|
prependListener(event: "online", listener: (worker: Worker) => void): this;
|
|
559
558
|
prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
|
|
@@ -510,50 +510,50 @@ declare module "crypto" {
|
|
|
510
510
|
format: "jwk";
|
|
511
511
|
}
|
|
512
512
|
interface JsonWebKey {
|
|
513
|
-
crv?: string
|
|
514
|
-
d?: string
|
|
515
|
-
dp?: string
|
|
516
|
-
dq?: string
|
|
517
|
-
e?: string
|
|
518
|
-
k?: string
|
|
519
|
-
kty?: string
|
|
520
|
-
n?: string
|
|
521
|
-
p?: string
|
|
522
|
-
q?: string
|
|
523
|
-
qi?: string
|
|
524
|
-
x?: string
|
|
525
|
-
y?: string
|
|
513
|
+
crv?: string;
|
|
514
|
+
d?: string;
|
|
515
|
+
dp?: string;
|
|
516
|
+
dq?: string;
|
|
517
|
+
e?: string;
|
|
518
|
+
k?: string;
|
|
519
|
+
kty?: string;
|
|
520
|
+
n?: string;
|
|
521
|
+
p?: string;
|
|
522
|
+
q?: string;
|
|
523
|
+
qi?: string;
|
|
524
|
+
x?: string;
|
|
525
|
+
y?: string;
|
|
526
526
|
[key: string]: unknown;
|
|
527
527
|
}
|
|
528
528
|
interface AsymmetricKeyDetails {
|
|
529
529
|
/**
|
|
530
530
|
* Key size in bits (RSA, DSA).
|
|
531
531
|
*/
|
|
532
|
-
modulusLength?: number
|
|
532
|
+
modulusLength?: number;
|
|
533
533
|
/**
|
|
534
534
|
* Public exponent (RSA).
|
|
535
535
|
*/
|
|
536
|
-
publicExponent?: bigint
|
|
536
|
+
publicExponent?: bigint;
|
|
537
537
|
/**
|
|
538
538
|
* Name of the message digest (RSA-PSS).
|
|
539
539
|
*/
|
|
540
|
-
hashAlgorithm?: string
|
|
540
|
+
hashAlgorithm?: string;
|
|
541
541
|
/**
|
|
542
542
|
* Name of the message digest used by MGF1 (RSA-PSS).
|
|
543
543
|
*/
|
|
544
|
-
mgf1HashAlgorithm?: string
|
|
544
|
+
mgf1HashAlgorithm?: string;
|
|
545
545
|
/**
|
|
546
546
|
* Minimal salt length in bytes (RSA-PSS).
|
|
547
547
|
*/
|
|
548
|
-
saltLength?: number
|
|
548
|
+
saltLength?: number;
|
|
549
549
|
/**
|
|
550
550
|
* Size of q in bits (DSA).
|
|
551
551
|
*/
|
|
552
|
-
divisorLength?: number
|
|
552
|
+
divisorLength?: number;
|
|
553
553
|
/**
|
|
554
554
|
* Name of the curve (EC).
|
|
555
555
|
*/
|
|
556
|
-
namedCurve?: string
|
|
556
|
+
namedCurve?: string;
|
|
557
557
|
}
|
|
558
558
|
/**
|
|
559
559
|
* Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key,
|
|
@@ -598,7 +598,7 @@ declare module "crypto" {
|
|
|
598
598
|
* keys.
|
|
599
599
|
* @since v11.6.0
|
|
600
600
|
*/
|
|
601
|
-
asymmetricKeyType?: KeyType
|
|
601
|
+
asymmetricKeyType?: KeyType;
|
|
602
602
|
/**
|
|
603
603
|
* This property exists only on asymmetric keys. Depending on the type of the key,
|
|
604
604
|
* this object contains information about the key. None of the information obtained
|
|
@@ -612,7 +612,7 @@ declare module "crypto" {
|
|
|
612
612
|
* Other key details might be exposed via this API using additional attributes.
|
|
613
613
|
* @since v15.7.0
|
|
614
614
|
*/
|
|
615
|
-
asymmetricKeyDetails?: AsymmetricKeyDetails
|
|
615
|
+
asymmetricKeyDetails?: AsymmetricKeyDetails;
|
|
616
616
|
/**
|
|
617
617
|
* For symmetric keys, the following encoding options can be used:
|
|
618
618
|
*
|
|
@@ -651,7 +651,7 @@ declare module "crypto" {
|
|
|
651
651
|
* property is `undefined` for asymmetric keys.
|
|
652
652
|
* @since v11.6.0
|
|
653
653
|
*/
|
|
654
|
-
symmetricKeySize?: number
|
|
654
|
+
symmetricKeySize?: number;
|
|
655
655
|
/**
|
|
656
656
|
* Converts a `KeyObject` instance to a `CryptoKey`.
|
|
657
657
|
* @since 22.10.0
|
|
@@ -2512,15 +2512,15 @@ declare module "crypto" {
|
|
|
2512
2512
|
/**
|
|
2513
2513
|
* Name of the message digest
|
|
2514
2514
|
*/
|
|
2515
|
-
hashAlgorithm?: string;
|
|
2515
|
+
hashAlgorithm?: string | undefined;
|
|
2516
2516
|
/**
|
|
2517
2517
|
* Name of the message digest used by MGF1
|
|
2518
2518
|
*/
|
|
2519
|
-
mgf1HashAlgorithm?: string;
|
|
2519
|
+
mgf1HashAlgorithm?: string | undefined;
|
|
2520
2520
|
/**
|
|
2521
2521
|
* Minimal salt length in bytes
|
|
2522
2522
|
*/
|
|
2523
|
-
saltLength?: string;
|
|
2523
|
+
saltLength?: string | undefined;
|
|
2524
2524
|
}
|
|
2525
2525
|
interface DSAKeyPairKeyObjectOptions {
|
|
2526
2526
|
/**
|
|
@@ -2563,15 +2563,15 @@ declare module "crypto" {
|
|
|
2563
2563
|
/**
|
|
2564
2564
|
* Name of the message digest
|
|
2565
2565
|
*/
|
|
2566
|
-
hashAlgorithm?: string;
|
|
2566
|
+
hashAlgorithm?: string | undefined;
|
|
2567
2567
|
/**
|
|
2568
2568
|
* Name of the message digest used by MGF1
|
|
2569
2569
|
*/
|
|
2570
|
-
mgf1HashAlgorithm?: string;
|
|
2570
|
+
mgf1HashAlgorithm?: string | undefined;
|
|
2571
2571
|
/**
|
|
2572
2572
|
* Minimal salt length in bytes
|
|
2573
2573
|
*/
|
|
2574
|
-
saltLength?: string;
|
|
2574
|
+
saltLength?: string | undefined;
|
|
2575
2575
|
publicKeyEncoding: {
|
|
2576
2576
|
type: "spki";
|
|
2577
2577
|
format: PubF;
|
|
@@ -3835,23 +3835,23 @@ declare module "crypto" {
|
|
|
3835
3835
|
/**
|
|
3836
3836
|
* @default 'always'
|
|
3837
3837
|
*/
|
|
3838
|
-
subject?: "always" | "default" | "never";
|
|
3838
|
+
subject?: "always" | "default" | "never" | undefined;
|
|
3839
3839
|
/**
|
|
3840
3840
|
* @default true
|
|
3841
3841
|
*/
|
|
3842
|
-
wildcards?: boolean;
|
|
3842
|
+
wildcards?: boolean | undefined;
|
|
3843
3843
|
/**
|
|
3844
3844
|
* @default true
|
|
3845
3845
|
*/
|
|
3846
|
-
partialWildcards?: boolean;
|
|
3846
|
+
partialWildcards?: boolean | undefined;
|
|
3847
3847
|
/**
|
|
3848
3848
|
* @default false
|
|
3849
3849
|
*/
|
|
3850
|
-
multiLabelWildcards?: boolean;
|
|
3850
|
+
multiLabelWildcards?: boolean | undefined;
|
|
3851
3851
|
/**
|
|
3852
3852
|
* @default false
|
|
3853
3853
|
*/
|
|
3854
|
-
singleLabelSubdomains?: boolean;
|
|
3854
|
+
singleLabelSubdomains?: boolean | undefined;
|
|
3855
3855
|
}
|
|
3856
3856
|
/**
|
|
3857
3857
|
* Encapsulates an X509 certificate and provides read-only access to
|
|
@@ -3953,7 +3953,7 @@ declare module "crypto" {
|
|
|
3953
3953
|
* available.
|
|
3954
3954
|
* @since v15.9.0
|
|
3955
3955
|
*/
|
|
3956
|
-
readonly issuerCertificate
|
|
3956
|
+
readonly issuerCertificate: X509Certificate | undefined;
|
|
3957
3957
|
/**
|
|
3958
3958
|
* The public key `KeyObject` for this certificate.
|
|
3959
3959
|
* @since v15.6.0
|
|
@@ -829,7 +829,7 @@ declare module "dns" {
|
|
|
829
829
|
* The number of tries the resolver will try contacting each name server before giving up.
|
|
830
830
|
* @default 4
|
|
831
831
|
*/
|
|
832
|
-
tries?: number;
|
|
832
|
+
tries?: number | undefined;
|
|
833
833
|
/**
|
|
834
834
|
* The max retry timeout, in milliseconds.
|
|
835
835
|
* @default 0
|