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.
Files changed (84) hide show
  1. package/.jsii +3 -3
  2. package/lib/main.js +1 -1
  3. package/node_modules/@aws-cdk/assert/package.json +8 -8
  4. package/node_modules/@aws-cdk/cfnspec/package.json +3 -3
  5. package/node_modules/@aws-cdk/cfnspec/tsconfig.tsbuildinfo +5 -5
  6. package/node_modules/@aws-cdk/cloudformation-diff/package.json +5 -5
  7. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/LICENSE +0 -0
  8. package/node_modules/@types/node/README.md +16 -0
  9. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/assert.d.ts +35 -6
  10. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/async_hooks.d.ts +96 -11
  11. package/node_modules/@types/node/buffer.d.ts +89 -0
  12. package/node_modules/@types/node/child_process.d.ts +514 -0
  13. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/cluster.d.ts +43 -38
  14. package/node_modules/@types/node/console.d.ts +142 -0
  15. package/node_modules/@types/node/constants.d.ts +18 -0
  16. package/node_modules/@types/node/crypto.d.ts +1283 -0
  17. package/node_modules/@types/node/dgram.d.ts +144 -0
  18. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/dns.d.ts +33 -12
  19. package/node_modules/@types/node/domain.d.ts +27 -0
  20. package/node_modules/@types/node/events.d.ts +82 -0
  21. package/node_modules/@types/node/fs/promises.d.ts +569 -0
  22. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/fs.d.ts +736 -757
  23. package/node_modules/@types/node/globals.d.ts +746 -0
  24. package/node_modules/@types/node/globals.global.d.ts +1 -0
  25. package/node_modules/@types/node/http.d.ts +492 -0
  26. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/http2.d.ts +289 -186
  27. package/node_modules/@types/node/https.d.ts +142 -0
  28. package/node_modules/@types/node/index.d.ts +98 -0
  29. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/inspector.d.ts +1508 -1619
  30. package/node_modules/@types/node/module.d.ts +56 -0
  31. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/net.d.ts +128 -71
  32. package/node_modules/@types/node/os.d.ts +242 -0
  33. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/package.json +67 -23
  34. package/node_modules/@types/node/path.d.ts +168 -0
  35. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/perf_hooks.d.ts +124 -19
  36. package/node_modules/@types/node/process.d.ts +413 -0
  37. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/punycode.d.ts +11 -1
  38. package/node_modules/@types/node/querystring.d.ts +31 -0
  39. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/readline.d.ts +55 -24
  40. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/repl.d.ts +40 -22
  41. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/stream.d.ts +103 -57
  42. package/node_modules/@types/node/string_decoder.d.ts +10 -0
  43. package/node_modules/@types/node/timers.d.ts +19 -0
  44. package/node_modules/@types/node/tls.d.ts +784 -0
  45. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/trace_events.d.ts +7 -4
  46. package/node_modules/@types/node/tty.d.ts +69 -0
  47. package/node_modules/@types/node/url.d.ts +149 -0
  48. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/util.d.ts +70 -41
  49. package/node_modules/@types/node/v8.d.ts +190 -0
  50. package/node_modules/@types/node/vm.d.ts +155 -0
  51. package/node_modules/@types/node/wasi.d.ts +89 -0
  52. package/node_modules/@types/node/worker_threads.d.ts +241 -0
  53. package/node_modules/{@aws-cdk/cloudformation-diff/node_modules/@types → @types}/node/zlib.d.ts +91 -54
  54. package/package.json +3 -3
  55. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/README.md +0 -16
  56. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/base.d.ts +0 -19
  57. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/buffer.d.ts +0 -16
  58. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/child_process.d.ts +0 -369
  59. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/console.d.ts +0 -3
  60. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/constants.d.ts +0 -449
  61. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/crypto.d.ts +0 -613
  62. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/dgram.d.ts +0 -97
  63. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/domain.d.ts +0 -16
  64. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/events.d.ts +0 -30
  65. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/globals.d.ts +0 -1066
  66. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/http.d.ts +0 -274
  67. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/https.d.ts +0 -51
  68. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/index.d.ts +0 -41
  69. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/module.d.ts +0 -3
  70. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/os.d.ts +0 -254
  71. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/path.d.ts +0 -159
  72. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/process.d.ts +0 -3
  73. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/querystring.d.ts +0 -17
  74. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/string_decoder.d.ts +0 -9
  75. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/timers.d.ts +0 -16
  76. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/tls.d.ts +0 -459
  77. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/ts3.6/assert.d.ts +0 -73
  78. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/ts3.6/base.d.ts +0 -54
  79. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/ts3.6/index.d.ts +0 -6
  80. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/tty.d.ts +0 -17
  81. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/url.d.ts +0 -104
  82. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/v8.d.ts +0 -28
  83. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/vm.d.ts +0 -81
  84. package/node_modules/@aws-cdk/cloudformation-diff/node_modules/@types/node/worker_threads.d.ts +0 -124
@@ -0,0 +1,413 @@
1
+ declare module 'process' {
2
+ import * as tty from 'tty';
3
+
4
+ global {
5
+ var process: NodeJS.Process;
6
+
7
+ namespace NodeJS {
8
+ // this namespace merge is here because these are specifically used
9
+ // as the type for process.stdin, process.stdout, and process.stderr.
10
+ // they can't live in tty.d.ts because we need to disambiguate the imported name.
11
+ interface ReadStream extends tty.ReadStream {}
12
+ interface WriteStream extends tty.WriteStream {}
13
+
14
+ interface MemoryUsage {
15
+ rss: number;
16
+ heapTotal: number;
17
+ heapUsed: number;
18
+ external: number;
19
+ arrayBuffers: number;
20
+ }
21
+
22
+ interface CpuUsage {
23
+ user: number;
24
+ system: number;
25
+ }
26
+
27
+ interface ProcessRelease {
28
+ name: string;
29
+ sourceUrl?: string | undefined;
30
+ headersUrl?: string | undefined;
31
+ libUrl?: string | undefined;
32
+ lts?: string | undefined;
33
+ }
34
+
35
+ interface ProcessVersions extends Dict<string> {
36
+ http_parser: string;
37
+ node: string;
38
+ v8: string;
39
+ ares: string;
40
+ uv: string;
41
+ zlib: string;
42
+ modules: string;
43
+ openssl: string;
44
+ }
45
+
46
+ type Platform = 'aix'
47
+ | 'android'
48
+ | 'darwin'
49
+ | 'freebsd'
50
+ | 'linux'
51
+ | 'openbsd'
52
+ | 'sunos'
53
+ | 'win32'
54
+ | 'cygwin'
55
+ | 'netbsd';
56
+
57
+ type Signals =
58
+ "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" |
59
+ "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" |
60
+ "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" |
61
+ "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO";
62
+
63
+ type UncaughtExceptionOrigin = 'uncaughtException' | 'unhandledRejection';
64
+ type MultipleResolveType = 'resolve' | 'reject';
65
+
66
+ type BeforeExitListener = (code: number) => void;
67
+ type DisconnectListener = () => void;
68
+ type ExitListener = (code: number) => void;
69
+ type RejectionHandledListener = (promise: Promise<any>) => void;
70
+ type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void;
71
+ type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise<any>) => void;
72
+ type WarningListener = (warning: Error) => void;
73
+ type MessageListener = (message: any, sendHandle: any) => void;
74
+ type SignalsListener = (signal: Signals) => void;
75
+ type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
76
+ type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
77
+ type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<any>, value: any) => void;
78
+
79
+ interface Socket extends ReadWriteStream {
80
+ isTTY?: true | undefined;
81
+ }
82
+
83
+ // Alias for compatibility
84
+ interface ProcessEnv extends Dict<string> {}
85
+
86
+ interface HRTime {
87
+ (time?: [number, number]): [number, number];
88
+ bigint(): bigint;
89
+ }
90
+
91
+ interface ProcessReport {
92
+ /**
93
+ * Directory where the report is written.
94
+ * working directory of the Node.js process.
95
+ * @default '' indicating that reports are written to the current
96
+ */
97
+ directory: string;
98
+
99
+ /**
100
+ * Filename where the report is written.
101
+ * The default value is the empty string.
102
+ * @default '' the output filename will be comprised of a timestamp,
103
+ * PID, and sequence number.
104
+ */
105
+ filename: string;
106
+
107
+ /**
108
+ * Returns a JSON-formatted diagnostic report for the running process.
109
+ * The report's JavaScript stack trace is taken from err, if present.
110
+ */
111
+ getReport(err?: Error): string;
112
+
113
+ /**
114
+ * If true, a diagnostic report is generated on fatal errors,
115
+ * such as out of memory errors or failed C++ assertions.
116
+ * @default false
117
+ */
118
+ reportOnFatalError: boolean;
119
+
120
+ /**
121
+ * If true, a diagnostic report is generated when the process
122
+ * receives the signal specified by process.report.signal.
123
+ * @default false
124
+ */
125
+ reportOnSignal: boolean;
126
+
127
+ /**
128
+ * If true, a diagnostic report is generated on uncaught exception.
129
+ * @default false
130
+ */
131
+ reportOnUncaughtException: boolean;
132
+
133
+ /**
134
+ * The signal used to trigger the creation of a diagnostic report.
135
+ * @default 'SIGUSR2'
136
+ */
137
+ signal: Signals;
138
+
139
+ /**
140
+ * Writes a diagnostic report to a file. If filename is not provided, the default filename
141
+ * includes the date, time, PID, and a sequence number.
142
+ * The report's JavaScript stack trace is taken from err, if present.
143
+ *
144
+ * @param fileName Name of the file where the report is written.
145
+ * This should be a relative path, that will be appended to the directory specified in
146
+ * `process.report.directory`, or the current working directory of the Node.js process,
147
+ * if unspecified.
148
+ * @param error A custom error used for reporting the JavaScript stack.
149
+ * @return Filename of the generated report.
150
+ */
151
+ writeReport(fileName?: string): string;
152
+ writeReport(error?: Error): string;
153
+ writeReport(fileName?: string, err?: Error): string;
154
+ }
155
+
156
+ interface ResourceUsage {
157
+ fsRead: number;
158
+ fsWrite: number;
159
+ involuntaryContextSwitches: number;
160
+ ipcReceived: number;
161
+ ipcSent: number;
162
+ majorPageFault: number;
163
+ maxRSS: number;
164
+ minorPageFault: number;
165
+ sharedMemorySize: number;
166
+ signalsCount: number;
167
+ swappedOut: number;
168
+ systemCPUTime: number;
169
+ unsharedDataSize: number;
170
+ unsharedStackSize: number;
171
+ userCPUTime: number;
172
+ voluntaryContextSwitches: number;
173
+ }
174
+
175
+ interface Process extends EventEmitter {
176
+ /**
177
+ * Can also be a tty.WriteStream, not typed due to limitations.
178
+ */
179
+ stdout: WriteStream & {
180
+ fd: 1;
181
+ };
182
+ /**
183
+ * Can also be a tty.WriteStream, not typed due to limitations.
184
+ */
185
+ stderr: WriteStream & {
186
+ fd: 2;
187
+ };
188
+ stdin: ReadStream & {
189
+ fd: 0;
190
+ };
191
+ openStdin(): Socket;
192
+ argv: string[];
193
+ argv0: string;
194
+ execArgv: string[];
195
+ execPath: string;
196
+ abort(): never;
197
+ chdir(directory: string): void;
198
+ cwd(): string;
199
+ debugPort: number;
200
+ emitWarning(warning: string | Error, name?: string, ctor?: Function): void;
201
+ env: ProcessEnv;
202
+ exit(code?: number): never;
203
+ exitCode?: number | undefined;
204
+ getgid(): number;
205
+ setgid(id: number | string): void;
206
+ getuid(): number;
207
+ setuid(id: number | string): void;
208
+ geteuid(): number;
209
+ seteuid(id: number | string): void;
210
+ getegid(): number;
211
+ setegid(id: number | string): void;
212
+ getgroups(): number[];
213
+ setgroups(groups: ReadonlyArray<string | number>): void;
214
+ setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
215
+ hasUncaughtExceptionCaptureCallback(): boolean;
216
+ version: string;
217
+ versions: ProcessVersions;
218
+ config: {
219
+ target_defaults: {
220
+ cflags: any[];
221
+ default_configuration: string;
222
+ defines: string[];
223
+ include_dirs: string[];
224
+ libraries: string[];
225
+ };
226
+ variables: {
227
+ clang: number;
228
+ host_arch: string;
229
+ node_install_npm: boolean;
230
+ node_install_waf: boolean;
231
+ node_prefix: string;
232
+ node_shared_openssl: boolean;
233
+ node_shared_v8: boolean;
234
+ node_shared_zlib: boolean;
235
+ node_use_dtrace: boolean;
236
+ node_use_etw: boolean;
237
+ node_use_openssl: boolean;
238
+ target_arch: string;
239
+ v8_no_strict_aliasing: number;
240
+ v8_use_snapshot: boolean;
241
+ visibility: string;
242
+ };
243
+ };
244
+ kill(pid: number, signal?: string | number): true;
245
+ pid: number;
246
+ ppid: number;
247
+ title: string;
248
+ arch: string;
249
+ platform: Platform;
250
+ /** @deprecated since v14.0.0 - use `require.main` instead. */
251
+ mainModule?: Module | undefined;
252
+ memoryUsage(): MemoryUsage;
253
+ cpuUsage(previousValue?: CpuUsage): CpuUsage;
254
+ nextTick(callback: Function, ...args: any[]): void;
255
+ release: ProcessRelease;
256
+ features: {
257
+ inspector: boolean;
258
+ debug: boolean;
259
+ uv: boolean;
260
+ ipv6: boolean;
261
+ tls_alpn: boolean;
262
+ tls_sni: boolean;
263
+ tls_ocsp: boolean;
264
+ tls: boolean;
265
+ };
266
+ /**
267
+ * @deprecated since v14.0.0 - Calling process.umask() with no argument causes
268
+ * the process-wide umask to be written twice. This introduces a race condition between threads,
269
+ * and is a potential security vulnerability. There is no safe, cross-platform alternative API.
270
+ */
271
+ umask(): number;
272
+ /**
273
+ * Can only be set if not in worker thread.
274
+ */
275
+ umask(mask: string | number): number;
276
+ uptime(): number;
277
+ hrtime: HRTime;
278
+ domain: Domain;
279
+
280
+ // Worker
281
+ send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean | undefined}, callback?: (error: Error | null) => void): boolean;
282
+ disconnect(): void;
283
+ connected: boolean;
284
+
285
+ /**
286
+ * The `process.allowedNodeEnvironmentFlags` property is a special,
287
+ * read-only `Set` of flags allowable within the [`NODE_OPTIONS`][]
288
+ * environment variable.
289
+ */
290
+ allowedNodeEnvironmentFlags: ReadonlySet<string>;
291
+
292
+ /**
293
+ * Only available with `--experimental-report`
294
+ */
295
+ report?: ProcessReport | undefined;
296
+
297
+ resourceUsage(): ResourceUsage;
298
+
299
+ traceDeprecation: boolean;
300
+
301
+ /* EventEmitter */
302
+ addListener(event: "beforeExit", listener: BeforeExitListener): this;
303
+ addListener(event: "disconnect", listener: DisconnectListener): this;
304
+ addListener(event: "exit", listener: ExitListener): this;
305
+ addListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
306
+ addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
307
+ addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
308
+ addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
309
+ addListener(event: "warning", listener: WarningListener): this;
310
+ addListener(event: "message", listener: MessageListener): this;
311
+ addListener(event: Signals, listener: SignalsListener): this;
312
+ addListener(event: "newListener", listener: NewListenerListener): this;
313
+ addListener(event: "removeListener", listener: RemoveListenerListener): this;
314
+ addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
315
+
316
+ emit(event: "beforeExit", code: number): boolean;
317
+ emit(event: "disconnect"): boolean;
318
+ emit(event: "exit", code: number): boolean;
319
+ emit(event: "rejectionHandled", promise: Promise<any>): boolean;
320
+ emit(event: "uncaughtException", error: Error): boolean;
321
+ emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
322
+ emit(event: "unhandledRejection", reason: any, promise: Promise<any>): boolean;
323
+ emit(event: "warning", warning: Error): boolean;
324
+ emit(event: "message", message: any, sendHandle: any): this;
325
+ emit(event: Signals, signal: Signals): boolean;
326
+ emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this;
327
+ emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this;
328
+ emit(event: "multipleResolves", listener: MultipleResolveListener): this;
329
+
330
+ on(event: "beforeExit", listener: BeforeExitListener): this;
331
+ on(event: "disconnect", listener: DisconnectListener): this;
332
+ on(event: "exit", listener: ExitListener): this;
333
+ on(event: "rejectionHandled", listener: RejectionHandledListener): this;
334
+ on(event: "uncaughtException", listener: UncaughtExceptionListener): this;
335
+ on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
336
+ on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
337
+ on(event: "warning", listener: WarningListener): this;
338
+ on(event: "message", listener: MessageListener): this;
339
+ on(event: Signals, listener: SignalsListener): this;
340
+ on(event: "newListener", listener: NewListenerListener): this;
341
+ on(event: "removeListener", listener: RemoveListenerListener): this;
342
+ on(event: "multipleResolves", listener: MultipleResolveListener): this;
343
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
344
+
345
+ once(event: "beforeExit", listener: BeforeExitListener): this;
346
+ once(event: "disconnect", listener: DisconnectListener): this;
347
+ once(event: "exit", listener: ExitListener): this;
348
+ once(event: "rejectionHandled", listener: RejectionHandledListener): this;
349
+ once(event: "uncaughtException", listener: UncaughtExceptionListener): this;
350
+ once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
351
+ once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
352
+ once(event: "warning", listener: WarningListener): this;
353
+ once(event: "message", listener: MessageListener): this;
354
+ once(event: Signals, listener: SignalsListener): this;
355
+ once(event: "newListener", listener: NewListenerListener): this;
356
+ once(event: "removeListener", listener: RemoveListenerListener): this;
357
+ once(event: "multipleResolves", listener: MultipleResolveListener): this;
358
+
359
+ prependListener(event: "beforeExit", listener: BeforeExitListener): this;
360
+ prependListener(event: "disconnect", listener: DisconnectListener): this;
361
+ prependListener(event: "exit", listener: ExitListener): this;
362
+ prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
363
+ prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
364
+ prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
365
+ prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
366
+ prependListener(event: "warning", listener: WarningListener): this;
367
+ prependListener(event: "message", listener: MessageListener): this;
368
+ prependListener(event: Signals, listener: SignalsListener): this;
369
+ prependListener(event: "newListener", listener: NewListenerListener): this;
370
+ prependListener(event: "removeListener", listener: RemoveListenerListener): this;
371
+ prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
372
+
373
+ prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this;
374
+ prependOnceListener(event: "disconnect", listener: DisconnectListener): this;
375
+ prependOnceListener(event: "exit", listener: ExitListener): this;
376
+ prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
377
+ prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
378
+ prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
379
+ prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
380
+ prependOnceListener(event: "warning", listener: WarningListener): this;
381
+ prependOnceListener(event: "message", listener: MessageListener): this;
382
+ prependOnceListener(event: Signals, listener: SignalsListener): this;
383
+ prependOnceListener(event: "newListener", listener: NewListenerListener): this;
384
+ prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this;
385
+ prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
386
+
387
+ listeners(event: "beforeExit"): BeforeExitListener[];
388
+ listeners(event: "disconnect"): DisconnectListener[];
389
+ listeners(event: "exit"): ExitListener[];
390
+ listeners(event: "rejectionHandled"): RejectionHandledListener[];
391
+ listeners(event: "uncaughtException"): UncaughtExceptionListener[];
392
+ listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[];
393
+ listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
394
+ listeners(event: "warning"): WarningListener[];
395
+ listeners(event: "message"): MessageListener[];
396
+ listeners(event: Signals): SignalsListener[];
397
+ listeners(event: "newListener"): NewListenerListener[];
398
+ listeners(event: "removeListener"): RemoveListenerListener[];
399
+ listeners(event: "multipleResolves"): MultipleResolveListener[];
400
+ }
401
+
402
+ interface Global {
403
+ process: Process;
404
+ }
405
+ }
406
+ }
407
+
408
+ export = process;
409
+ }
410
+ declare module 'node:process' {
411
+ import process = require('process');
412
+ export = process;
413
+ }
@@ -1,4 +1,11 @@
1
- declare module "punycode" {
1
+ /**
2
+ * @deprecated since v7.0.0
3
+ * The version of the punycode module bundled in Node.js is being deprecated.
4
+ * In a future major version of Node.js this module will be removed.
5
+ * Users currently depending on the punycode module should switch to using
6
+ * the userland-provided Punycode.js module instead.
7
+ */
8
+ declare module 'punycode' {
2
9
  /**
3
10
  * @deprecated since v7.0.0
4
11
  * The version of the punycode module bundled in Node.js is being deprecated.
@@ -66,3 +73,6 @@ declare module "punycode" {
66
73
  */
67
74
  const version: string;
68
75
  }
76
+ declare module 'node:punycode' {
77
+ export * from 'punycode';
78
+ }
@@ -0,0 +1,31 @@
1
+ declare module 'querystring' {
2
+ interface StringifyOptions {
3
+ encodeURIComponent?: ((str: string) => string) | undefined;
4
+ }
5
+
6
+ interface ParseOptions {
7
+ maxKeys?: number | undefined;
8
+ decodeURIComponent?: ((str: string) => string) | undefined;
9
+ }
10
+
11
+ interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> { }
12
+
13
+ interface ParsedUrlQueryInput extends NodeJS.Dict<string | number | boolean | ReadonlyArray<string> | ReadonlyArray<number> | ReadonlyArray<boolean> | null> {
14
+ }
15
+
16
+ function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
17
+ function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
18
+ /**
19
+ * The querystring.encode() function is an alias for querystring.stringify().
20
+ */
21
+ const encode: typeof stringify;
22
+ /**
23
+ * The querystring.decode() function is an alias for querystring.parse().
24
+ */
25
+ const decode: typeof parse;
26
+ function escape(str: string): string;
27
+ function unescape(str: string): string;
28
+ }
29
+ declare module 'node:querystring' {
30
+ export * from 'querystring';
31
+ }
@@ -1,16 +1,15 @@
1
- declare module "readline" {
2
- import * as events from "events";
3
- import * as stream from "stream";
1
+ declare module 'readline' {
2
+ import EventEmitter = require('events');
4
3
 
5
4
  interface Key {
6
- sequence?: string;
7
- name?: string;
8
- ctrl?: boolean;
9
- meta?: boolean;
10
- shift?: boolean;
5
+ sequence?: string | undefined;
6
+ name?: string | undefined;
7
+ ctrl?: boolean | undefined;
8
+ meta?: boolean | undefined;
9
+ shift?: boolean | undefined;
11
10
  }
12
11
 
13
- class Interface extends events.EventEmitter {
12
+ class Interface extends EventEmitter {
14
13
  readonly terminal: boolean;
15
14
 
16
15
  // Need direct access to line/cursor data, for use in external processes
@@ -46,6 +45,14 @@ declare module "readline" {
46
45
  resume(): this;
47
46
  close(): void;
48
47
  write(data: string | Buffer, key?: Key): void;
48
+ write(data: undefined | null | string | Buffer, key: Key): void;
49
+
50
+ /**
51
+ * Returns the real position of the cursor in relation to the input
52
+ * prompt + string. Long input (wrapping) strings, as well as multiple
53
+ * line prompts are included in the calculations.
54
+ */
55
+ getCursorPos(): CursorPos;
49
56
 
50
57
  /**
51
58
  * events.EventEmitter
@@ -111,33 +118,57 @@ declare module "readline" {
111
118
  prependOnceListener(event: "SIGCONT", listener: () => void): this;
112
119
  prependOnceListener(event: "SIGINT", listener: () => void): this;
113
120
  prependOnceListener(event: "SIGTSTP", listener: () => void): this;
121
+ [Symbol.asyncIterator](): AsyncIterableIterator<string>;
114
122
  }
115
123
 
116
- type ReadLine = Interface; // type forwarded for backwards compatiblity
124
+ type ReadLine = Interface; // type forwarded for backwards compatibility
117
125
 
118
126
  type Completer = (line: string) => CompleterResult;
119
- type AsyncCompleter = (line: string, callback: (err: any, result: CompleterResult) => void) => any;
127
+ type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => any;
120
128
 
121
129
  type CompleterResult = [string[], string];
122
130
 
123
131
  interface ReadLineOptions {
124
132
  input: NodeJS.ReadableStream;
125
- output?: NodeJS.WritableStream;
126
- completer?: Completer | AsyncCompleter;
127
- terminal?: boolean;
128
- historySize?: number;
129
- prompt?: string;
130
- crlfDelay?: number;
131
- removeHistoryDuplicates?: boolean;
132
- escapeCodeTimeout?: number;
133
+ output?: NodeJS.WritableStream | undefined;
134
+ completer?: Completer | AsyncCompleter | undefined;
135
+ terminal?: boolean | undefined;
136
+ historySize?: number | undefined;
137
+ prompt?: string | undefined;
138
+ crlfDelay?: number | undefined;
139
+ removeHistoryDuplicates?: boolean | undefined;
140
+ escapeCodeTimeout?: number | undefined;
141
+ tabSize?: number | undefined;
133
142
  }
134
143
 
135
144
  function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
136
145
  function createInterface(options: ReadLineOptions): Interface;
137
-
138
- function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void;
139
146
  function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
140
- function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void;
141
- function clearLine(stream: NodeJS.WritableStream, dir: number): void;
142
- function clearScreenDown(stream: NodeJS.WritableStream): void;
147
+
148
+ type Direction = -1 | 0 | 1;
149
+
150
+ interface CursorPos {
151
+ rows: number;
152
+ cols: number;
153
+ }
154
+
155
+ /**
156
+ * Clears the current line of this WriteStream in a direction identified by `dir`.
157
+ */
158
+ function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
159
+ /**
160
+ * Clears this `WriteStream` from the current cursor down.
161
+ */
162
+ function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
163
+ /**
164
+ * Moves this WriteStream's cursor to the specified position.
165
+ */
166
+ function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
167
+ /**
168
+ * Moves this WriteStream's cursor relative to its current position.
169
+ */
170
+ function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
171
+ }
172
+ declare module 'node:readline' {
173
+ export * from 'readline';
143
174
  }