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
@@ -1,4 +1,4 @@
1
- declare module "trace_events" {
1
+ declare module 'trace_events' {
2
2
  /**
3
3
  * The `Tracing` object is used to enable or disable tracing for sets of
4
4
  * categories. Instances are created using the
@@ -9,7 +9,7 @@ declare module "trace_events" {
9
9
  * event categories. Calling `tracing.disable()` will remove the categories
10
10
  * from the set of enabled trace event categories.
11
11
  */
12
- export interface Tracing {
12
+ interface Tracing {
13
13
  /**
14
14
  * A comma-separated list of the trace event categories covered by this
15
15
  * `Tracing` object.
@@ -49,7 +49,7 @@ declare module "trace_events" {
49
49
  /**
50
50
  * Creates and returns a Tracing object for the given set of categories.
51
51
  */
52
- export function createTracing(options: CreateTracingOptions): Tracing;
52
+ function createTracing(options: CreateTracingOptions): Tracing;
53
53
 
54
54
  /**
55
55
  * Returns a comma-separated list of all currently-enabled trace event
@@ -57,5 +57,8 @@ declare module "trace_events" {
57
57
  * determined by the union of all currently-enabled `Tracing` objects and
58
58
  * any categories enabled using the `--trace-event-categories` flag.
59
59
  */
60
- export function getEnabledCategories(): string;
60
+ function getEnabledCategories(): string | undefined;
61
+ }
62
+ declare module 'node:trace_events' {
63
+ export * from 'trace_events';
61
64
  }
@@ -0,0 +1,69 @@
1
+ declare module 'tty' {
2
+ import * as net from 'net';
3
+
4
+ function isatty(fd: number): boolean;
5
+ class ReadStream extends net.Socket {
6
+ constructor(fd: number, options?: net.SocketConstructorOpts);
7
+ isRaw: boolean;
8
+ setRawMode(mode: boolean): this;
9
+ isTTY: boolean;
10
+ }
11
+ /**
12
+ * -1 - to the left from cursor
13
+ * 0 - the entire line
14
+ * 1 - to the right from cursor
15
+ */
16
+ type Direction = -1 | 0 | 1;
17
+ class WriteStream extends net.Socket {
18
+ constructor(fd: number);
19
+ addListener(event: string, listener: (...args: any[]) => void): this;
20
+ addListener(event: "resize", listener: () => void): this;
21
+
22
+ emit(event: string | symbol, ...args: any[]): boolean;
23
+ emit(event: "resize"): boolean;
24
+
25
+ on(event: string, listener: (...args: any[]) => void): this;
26
+ on(event: "resize", listener: () => void): this;
27
+
28
+ once(event: string, listener: (...args: any[]) => void): this;
29
+ once(event: "resize", listener: () => void): this;
30
+
31
+ prependListener(event: string, listener: (...args: any[]) => void): this;
32
+ prependListener(event: "resize", listener: () => void): this;
33
+
34
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
35
+ prependOnceListener(event: "resize", listener: () => void): this;
36
+
37
+ /**
38
+ * Clears the current line of this WriteStream in a direction identified by `dir`.
39
+ */
40
+ clearLine(dir: Direction, callback?: () => void): boolean;
41
+ /**
42
+ * Clears this `WriteStream` from the current cursor down.
43
+ */
44
+ clearScreenDown(callback?: () => void): boolean;
45
+ /**
46
+ * Moves this WriteStream's cursor to the specified position.
47
+ */
48
+ cursorTo(x: number, y?: number, callback?: () => void): boolean;
49
+ cursorTo(x: number, callback: () => void): boolean;
50
+ /**
51
+ * Moves this WriteStream's cursor relative to its current position.
52
+ */
53
+ moveCursor(dx: number, dy: number, callback?: () => void): boolean;
54
+ /**
55
+ * @default `process.env`
56
+ */
57
+ getColorDepth(env?: {}): number;
58
+ hasColors(depth?: number): boolean;
59
+ hasColors(env?: {}): boolean;
60
+ hasColors(depth: number, env?: {}): boolean;
61
+ getWindowSize(): [number, number];
62
+ columns: number;
63
+ rows: number;
64
+ isTTY: boolean;
65
+ }
66
+ }
67
+ declare module 'node:tty' {
68
+ export * from 'tty';
69
+ }
@@ -0,0 +1,149 @@
1
+ declare module 'url' {
2
+ import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
3
+
4
+ // Input to `url.format`
5
+ interface UrlObject {
6
+ auth?: string | null | undefined;
7
+ hash?: string | null | undefined;
8
+ host?: string | null | undefined;
9
+ hostname?: string | null | undefined;
10
+ href?: string | null | undefined;
11
+ pathname?: string | null | undefined;
12
+ protocol?: string | null | undefined;
13
+ search?: string | null | undefined;
14
+ slashes?: boolean | null | undefined;
15
+ port?: string | number | null | undefined;
16
+ query?: string | null | ParsedUrlQueryInput | undefined;
17
+ }
18
+
19
+ // Output of `url.parse`
20
+ interface Url {
21
+ auth: string | null;
22
+ hash: string | null;
23
+ host: string | null;
24
+ hostname: string | null;
25
+ href: string;
26
+ path: string | null;
27
+ pathname: string | null;
28
+ protocol: string | null;
29
+ search: string | null;
30
+ slashes: boolean | null;
31
+ port: string | null;
32
+ query: string | null | ParsedUrlQuery;
33
+ }
34
+
35
+ interface UrlWithParsedQuery extends Url {
36
+ query: ParsedUrlQuery;
37
+ }
38
+
39
+ interface UrlWithStringQuery extends Url {
40
+ query: string | null;
41
+ }
42
+
43
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
44
+ function parse(urlStr: string): UrlWithStringQuery;
45
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
46
+ function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
47
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
48
+ function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
49
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
50
+ function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
51
+
52
+ function format(URL: URL, options?: URLFormatOptions): string;
53
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
54
+ function format(urlObject: UrlObject | string): string;
55
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
56
+ function resolve(from: string, to: string): string;
57
+
58
+ function domainToASCII(domain: string): string;
59
+ function domainToUnicode(domain: string): string;
60
+
61
+ /**
62
+ * This function ensures the correct decodings of percent-encoded characters as
63
+ * well as ensuring a cross-platform valid absolute path string.
64
+ * @param url The file URL string or URL object to convert to a path.
65
+ */
66
+ function fileURLToPath(url: string | URL): string;
67
+
68
+ /**
69
+ * This function ensures that path is resolved absolutely, and that the URL
70
+ * control characters are correctly encoded when converting into a File URL.
71
+ * @param url The path to convert to a File URL.
72
+ */
73
+ function pathToFileURL(url: string): URL;
74
+
75
+ interface URLFormatOptions {
76
+ auth?: boolean | undefined;
77
+ fragment?: boolean | undefined;
78
+ search?: boolean | undefined;
79
+ unicode?: boolean | undefined;
80
+ }
81
+
82
+ class URL {
83
+ constructor(input: string, base?: string | URL);
84
+ hash: string;
85
+ host: string;
86
+ hostname: string;
87
+ href: string;
88
+ readonly origin: string;
89
+ password: string;
90
+ pathname: string;
91
+ port: string;
92
+ protocol: string;
93
+ search: string;
94
+ readonly searchParams: URLSearchParams;
95
+ username: string;
96
+ toString(): string;
97
+ toJSON(): string;
98
+ }
99
+
100
+ class URLSearchParams implements Iterable<[string, string]> {
101
+ constructor(init?: URLSearchParams | string | Record<string, string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
102
+ append(name: string, value: string): void;
103
+ delete(name: string): void;
104
+ entries(): IterableIterator<[string, string]>;
105
+ forEach(callback: (value: string, name: string, searchParams: URLSearchParams) => void, thisArg?: any): void;
106
+ get(name: string): string | null;
107
+ getAll(name: string): string[];
108
+ has(name: string): boolean;
109
+ keys(): IterableIterator<string>;
110
+ set(name: string, value: string): void;
111
+ sort(): void;
112
+ toString(): string;
113
+ values(): IterableIterator<string>;
114
+ [Symbol.iterator](): IterableIterator<[string, string]>;
115
+ }
116
+
117
+ import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url';
118
+ global {
119
+ interface URLSearchParams extends _URLSearchParams {}
120
+ interface URL extends _URL {}
121
+ interface Global {
122
+ URL: typeof _URL;
123
+ URLSearchParams: typeof _URLSearchParams;
124
+ }
125
+ /**
126
+ * `URL` class is a global reference for `require('url').URL`
127
+ * https://nodejs.org/api/url.html#the-whatwg-url-api
128
+ * @since v10.0.0
129
+ */
130
+ var URL:
131
+ // For compatibility with "dom" and "webworker" URL declarations
132
+ typeof globalThis extends { onmessage: any, URL: infer URL }
133
+ ? URL
134
+ : typeof _URL;
135
+ /**
136
+ * `URLSearchParams` class is a global reference for `require('url').URLSearchParams`.
137
+ * https://nodejs.org/api/url.html#class-urlsearchparams
138
+ * @since v10.0.0
139
+ */
140
+ var URLSearchParams:
141
+ // For compatibility with "dom" and "webworker" URLSearchParams declarations
142
+ typeof globalThis extends { onmessage: any, URLSearchParams: infer URLSearchParams }
143
+ ? URLSearchParams
144
+ : typeof _URLSearchParams;
145
+ }
146
+ }
147
+ declare module 'node:url' {
148
+ export * from 'url';
149
+ }
@@ -1,28 +1,28 @@
1
- declare module "util" {
1
+ declare module 'util' {
2
2
  interface InspectOptions extends NodeJS.InspectOptions { }
3
- function format(format: any, ...param: any[]): string;
4
- function formatWithOptions(inspectOptions: InspectOptions, format: string, ...param: any[]): string;
5
- /** @deprecated since v0.11.3 - use `console.error()` instead. */
6
- function debug(string: string): void;
7
- /** @deprecated since v0.11.3 - use `console.error()` instead. */
8
- function error(...param: any[]): void;
9
- /** @deprecated since v0.11.3 - use `console.log()` instead. */
10
- function puts(...param: any[]): void;
11
- /** @deprecated since v0.11.3 - use `console.log()` instead. */
12
- function print(...param: any[]): void;
3
+ type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
4
+ type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
5
+ interface InspectOptionsStylized extends InspectOptions {
6
+ stylize(text: string, styleType: Style): string;
7
+ }
8
+ function format(format?: any, ...param: any[]): string;
9
+ function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
10
+ function getSystemErrorName(err: number): string;
13
11
  /** @deprecated since v0.11.3 - use a third party module instead. */
14
12
  function log(string: string): void;
15
13
  function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
16
14
  function inspect(object: any, options: InspectOptions): string;
17
15
  namespace inspect {
18
- let colors: {
19
- [color: string]: [number, number] | undefined
20
- };
21
- const custom: unique symbol;
16
+ let colors: NodeJS.Dict<[number, number]>;
22
17
  let styles: {
23
- [style: string]: string | undefined
18
+ [K in Style]: string
24
19
  };
25
20
  let defaultOptions: InspectOptions;
21
+ /**
22
+ * Allows changing inspect settings from the repl.
23
+ */
24
+ let replDefaults: InspectOptions;
25
+ const custom: unique symbol;
26
26
  }
27
27
  /** @deprecated since v4.0.0 - use `Array.isArray()` instead. */
28
28
  function isArray(object: any): object is any[];
@@ -33,7 +33,12 @@ declare module "util" {
33
33
  /** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */
34
34
  function isError(object: any): object is Error;
35
35
  function inherits(constructor: any, superConstructor: any): void;
36
- function debuglog(key: string): (msg: string, ...param: any[]) => void;
36
+ type DebugLoggerFunction = (msg: string, ...param: any[]) => void;
37
+ interface DebugLogger extends DebugLoggerFunction {
38
+ enabled: boolean;
39
+ }
40
+ function debuglog(key: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger;
41
+ const debug: typeof debuglog;
37
42
  /** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */
38
43
  function isBoolean(object: any): object is boolean;
39
44
  /** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */
@@ -59,14 +64,10 @@ declare module "util" {
59
64
  function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
60
65
  function isDeepStrictEqual(val1: any, val2: any): boolean;
61
66
 
62
- interface CustomPromisify<TCustom extends Function> extends Function {
63
- __promisify__: TCustom;
64
- }
65
-
66
67
  function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
67
- function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
68
+ function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
68
69
  function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
69
- function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
70
+ function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
70
71
  function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
71
72
  function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
72
73
  function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
@@ -88,26 +89,41 @@ declare module "util" {
88
89
  fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
89
90
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
90
91
 
92
+ interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
93
+ __promisify__: TCustom;
94
+ }
95
+
96
+ interface CustomPromisifySymbol<TCustom extends Function> extends Function {
97
+ [promisify.custom]: TCustom;
98
+ }
99
+
100
+ type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
101
+
91
102
  function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
92
- function promisify<TResult>(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise<TResult>;
93
- function promisify(fn: (callback: (err?: Error | null) => void) => void): () => Promise<void>;
94
- function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
95
- function promisify<T1>(fn: (arg1: T1, callback: (err?: Error | null) => void) => void): (arg1: T1) => Promise<void>;
96
- function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
97
- function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
98
- function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
99
- function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
103
+ function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
104
+ function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
105
+ function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
106
+ function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
107
+ function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
108
+ function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
109
+ function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void):
110
+ (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
111
+ function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
100
112
  function promisify<T1, T2, T3, T4, TResult>(
101
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void,
113
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
102
114
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
103
- function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
115
+ function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void):
116
+ (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
104
117
  function promisify<T1, T2, T3, T4, T5, TResult>(
105
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void,
118
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
106
119
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
107
120
  function promisify<T1, T2, T3, T4, T5>(
108
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error | null) => void) => void,
121
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
109
122
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
110
123
  function promisify(fn: Function): Function;
124
+ namespace promisify {
125
+ const custom: unique symbol;
126
+ }
111
127
 
112
128
  namespace types {
113
129
  function isAnyArrayBuffer(object: any): object is ArrayBufferLike;
@@ -161,8 +177,6 @@ declare module "util" {
161
177
  function isUint32Array(object: any): object is Uint32Array;
162
178
  function isWeakMap(object: any): object is WeakMap<any, any>;
163
179
  function isWeakSet(object: any): object is WeakSet<any>;
164
- /** @deprecated Removed in v14.0.0 */
165
- function isWebAssemblyCompiledModule(object: any): boolean;
166
180
  }
167
181
 
168
182
  class TextDecoder {
@@ -171,17 +185,32 @@ declare module "util" {
171
185
  readonly ignoreBOM: boolean;
172
186
  constructor(
173
187
  encoding?: string,
174
- options?: { fatal?: boolean; ignoreBOM?: boolean }
188
+ options?: { fatal?: boolean | undefined; ignoreBOM?: boolean | undefined }
175
189
  );
176
190
  decode(
177
- input?: NodeJS.TypedArray | DataView | ArrayBuffer | null,
178
- options?: { stream?: boolean }
191
+ input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
192
+ options?: { stream?: boolean | undefined }
179
193
  ): string;
180
194
  }
181
195
 
196
+ interface EncodeIntoResult {
197
+ /**
198
+ * The read Unicode code units of input.
199
+ */
200
+
201
+ read: number;
202
+ /**
203
+ * The written UTF-8 bytes of output.
204
+ */
205
+ written: number;
206
+ }
207
+
182
208
  class TextEncoder {
183
209
  readonly encoding: string;
184
- constructor();
185
210
  encode(input?: string): Uint8Array;
211
+ encodeInto(input: string, output: Uint8Array): EncodeIntoResult;
186
212
  }
187
213
  }
214
+ declare module 'node:util' {
215
+ export * from 'util';
216
+ }
@@ -0,0 +1,190 @@
1
+ declare module 'v8' {
2
+ import { Readable } from 'stream';
3
+
4
+ interface HeapSpaceInfo {
5
+ space_name: string;
6
+ space_size: number;
7
+ space_used_size: number;
8
+ space_available_size: number;
9
+ physical_space_size: number;
10
+ }
11
+
12
+ // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
13
+ type DoesZapCodeSpaceFlag = 0 | 1;
14
+
15
+ interface HeapInfo {
16
+ total_heap_size: number;
17
+ total_heap_size_executable: number;
18
+ total_physical_size: number;
19
+ total_available_size: number;
20
+ used_heap_size: number;
21
+ heap_size_limit: number;
22
+ malloced_memory: number;
23
+ peak_malloced_memory: number;
24
+ does_zap_garbage: DoesZapCodeSpaceFlag;
25
+ number_of_native_contexts: number;
26
+ number_of_detached_contexts: number;
27
+ }
28
+
29
+ interface HeapCodeStatistics {
30
+ code_and_metadata_size: number;
31
+ bytecode_and_metadata_size: number;
32
+ external_script_source_size: number;
33
+ }
34
+
35
+ /**
36
+ * Returns an integer representing a "version tag" derived from the V8 version, command line flags and detected CPU features.
37
+ * This is useful for determining whether a vm.Script cachedData buffer is compatible with this instance of V8.
38
+ */
39
+ function cachedDataVersionTag(): number;
40
+
41
+ function getHeapStatistics(): HeapInfo;
42
+ function getHeapSpaceStatistics(): HeapSpaceInfo[];
43
+ function setFlagsFromString(flags: string): void;
44
+ /**
45
+ * Generates a snapshot of the current V8 heap and returns a Readable
46
+ * Stream that may be used to read the JSON serialized representation.
47
+ * This conversation was marked as resolved by joyeecheung
48
+ * This JSON stream format is intended to be used with tools such as
49
+ * Chrome DevTools. The JSON schema is undocumented and specific to the
50
+ * V8 engine, and may change from one version of V8 to the next.
51
+ */
52
+ function getHeapSnapshot(): Readable;
53
+
54
+ /**
55
+ *
56
+ * @param fileName The file path where the V8 heap snapshot is to be
57
+ * saved. If not specified, a file name with the pattern
58
+ * `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
59
+ * generated, where `{pid}` will be the PID of the Node.js process,
60
+ * `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from
61
+ * the main Node.js thread or the id of a worker thread.
62
+ */
63
+ function writeHeapSnapshot(fileName?: string): string;
64
+
65
+ function getHeapCodeStatistics(): HeapCodeStatistics;
66
+
67
+ class Serializer {
68
+ /**
69
+ * Writes out a header, which includes the serialization format version.
70
+ */
71
+ writeHeader(): void;
72
+
73
+ /**
74
+ * Serializes a JavaScript value and adds the serialized representation to the internal buffer.
75
+ * This throws an error if value cannot be serialized.
76
+ */
77
+ writeValue(val: any): boolean;
78
+
79
+ /**
80
+ * Returns the stored internal buffer.
81
+ * This serializer should not be used once the buffer is released.
82
+ * Calling this method results in undefined behavior if a previous write has failed.
83
+ */
84
+ releaseBuffer(): Buffer;
85
+
86
+ /**
87
+ * Marks an ArrayBuffer as having its contents transferred out of band.\
88
+ * Pass the corresponding ArrayBuffer in the deserializing context to deserializer.transferArrayBuffer().
89
+ */
90
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
91
+
92
+ /**
93
+ * Write a raw 32-bit unsigned integer.
94
+ */
95
+ writeUint32(value: number): void;
96
+
97
+ /**
98
+ * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
99
+ */
100
+ writeUint64(hi: number, lo: number): void;
101
+
102
+ /**
103
+ * Write a JS number value.
104
+ */
105
+ writeDouble(value: number): void;
106
+
107
+ /**
108
+ * Write raw bytes into the serializer’s internal buffer.
109
+ * The deserializer will require a way to compute the length of the buffer.
110
+ */
111
+ writeRawBytes(buffer: NodeJS.TypedArray): void;
112
+ }
113
+
114
+ /**
115
+ * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
116
+ * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
117
+ */
118
+ class DefaultSerializer extends Serializer {
119
+ }
120
+
121
+ class Deserializer {
122
+ constructor(data: NodeJS.TypedArray);
123
+ /**
124
+ * Reads and validates a header (including the format version).
125
+ * May, for example, reject an invalid or unsupported wire format.
126
+ * In that case, an Error is thrown.
127
+ */
128
+ readHeader(): boolean;
129
+
130
+ /**
131
+ * Deserializes a JavaScript value from the buffer and returns it.
132
+ */
133
+ readValue(): any;
134
+
135
+ /**
136
+ * Marks an ArrayBuffer as having its contents transferred out of band.
137
+ * Pass the corresponding `ArrayBuffer` in the serializing context to serializer.transferArrayBuffer()
138
+ * (or return the id from serializer._getSharedArrayBufferId() in the case of SharedArrayBuffers).
139
+ */
140
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
141
+
142
+ /**
143
+ * Reads the underlying wire format version.
144
+ * Likely mostly to be useful to legacy code reading old wire format versions.
145
+ * May not be called before .readHeader().
146
+ */
147
+ getWireFormatVersion(): number;
148
+
149
+ /**
150
+ * Read a raw 32-bit unsigned integer and return it.
151
+ */
152
+ readUint32(): number;
153
+
154
+ /**
155
+ * Read a raw 64-bit unsigned integer and return it as an array [hi, lo] with two 32-bit unsigned integer entries.
156
+ */
157
+ readUint64(): [number, number];
158
+
159
+ /**
160
+ * Read a JS number value.
161
+ */
162
+ readDouble(): number;
163
+
164
+ /**
165
+ * Read raw bytes from the deserializer’s internal buffer.
166
+ * The length parameter must correspond to the length of the buffer that was passed to serializer.writeRawBytes().
167
+ */
168
+ readRawBytes(length: number): Buffer;
169
+ }
170
+
171
+ /**
172
+ * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
173
+ * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
174
+ */
175
+ class DefaultDeserializer extends Deserializer {
176
+ }
177
+
178
+ /**
179
+ * Uses a `DefaultSerializer` to serialize value into a buffer.
180
+ */
181
+ function serialize(value: any): Buffer;
182
+
183
+ /**
184
+ * Uses a `DefaultDeserializer` with default options to read a JS value from a buffer.
185
+ */
186
+ function deserialize(data: NodeJS.TypedArray): any;
187
+ }
188
+ declare module 'node:v8' {
189
+ export * from 'v8';
190
+ }