@wbce/projen-d9 0.0.27

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 (125) hide show
  1. package/.jsii +552 -0
  2. package/API.md +8472 -0
  3. package/CHANGELOG.md +189 -0
  4. package/LICENSE +674 -0
  5. package/README.md +82 -0
  6. package/lib/cli/commands/init.d.ts +1 -0
  7. package/lib/cli/commands/init.js +8 -0
  8. package/lib/cli/commands/save/apply-snapshot.d.ts +7 -0
  9. package/lib/cli/commands/save/apply-snapshot.js +278 -0
  10. package/lib/cli/commands/save/cli.d.ts +8 -0
  11. package/lib/cli/commands/save/cli.js +33 -0
  12. package/lib/cli/commands/save/draft.d.ts +0 -0
  13. package/lib/cli/commands/save/draft.js +2 -0
  14. package/lib/cli/commands/save/utils.d.ts +9 -0
  15. package/lib/cli/commands/save/utils.js +123 -0
  16. package/lib/cli/commands/sync.d.ts +5 -0
  17. package/lib/cli/commands/sync.js +13 -0
  18. package/lib/cli/index.d.ts +2 -0
  19. package/lib/cli/index.js +44 -0
  20. package/lib/index.d.ts +59 -0
  21. package/lib/index.js +322 -0
  22. package/node_modules/@types/node/LICENSE +21 -0
  23. package/node_modules/@types/node/README.md +16 -0
  24. package/node_modules/@types/node/assert.d.ts +117 -0
  25. package/node_modules/@types/node/async_hooks.d.ts +246 -0
  26. package/node_modules/@types/node/buffer.d.ts +22 -0
  27. package/node_modules/@types/node/child_process.d.ts +507 -0
  28. package/node_modules/@types/node/cluster.d.ts +260 -0
  29. package/node_modules/@types/node/console.d.ts +3 -0
  30. package/node_modules/@types/node/constants.d.ts +448 -0
  31. package/node_modules/@types/node/crypto.d.ts +1183 -0
  32. package/node_modules/@types/node/dgram.d.ts +118 -0
  33. package/node_modules/@types/node/dns.d.ts +372 -0
  34. package/node_modules/@types/node/domain.d.ts +16 -0
  35. package/node_modules/@types/node/events.d.ts +47 -0
  36. package/node_modules/@types/node/fs.d.ts +2567 -0
  37. package/node_modules/@types/node/globals.d.ts +1351 -0
  38. package/node_modules/@types/node/globals.global.d.ts +1 -0
  39. package/node_modules/@types/node/http.d.ts +456 -0
  40. package/node_modules/@types/node/http2.d.ts +952 -0
  41. package/node_modules/@types/node/https.d.ts +156 -0
  42. package/node_modules/@types/node/index.d.ts +91 -0
  43. package/node_modules/@types/node/inspector.d.ts +3040 -0
  44. package/node_modules/@types/node/module.d.ts +3 -0
  45. package/node_modules/@types/node/net.d.ts +290 -0
  46. package/node_modules/@types/node/os.d.ts +263 -0
  47. package/node_modules/@types/node/package.json +195 -0
  48. package/node_modules/@types/node/path.d.ts +159 -0
  49. package/node_modules/@types/node/perf_hooks.d.ts +259 -0
  50. package/node_modules/@types/node/process.d.ts +15 -0
  51. package/node_modules/@types/node/punycode.d.ts +75 -0
  52. package/node_modules/@types/node/querystring.d.ts +29 -0
  53. package/node_modules/@types/node/readline.d.ts +158 -0
  54. package/node_modules/@types/node/repl.d.ts +390 -0
  55. package/node_modules/@types/node/stream.d.ts +334 -0
  56. package/node_modules/@types/node/string_decoder.d.ts +7 -0
  57. package/node_modules/@types/node/timers.d.ts +16 -0
  58. package/node_modules/@types/node/tls.d.ts +713 -0
  59. package/node_modules/@types/node/trace_events.d.ts +61 -0
  60. package/node_modules/@types/node/tty.d.ts +66 -0
  61. package/node_modules/@types/node/url.d.ts +147 -0
  62. package/node_modules/@types/node/util.d.ts +200 -0
  63. package/node_modules/@types/node/v8.d.ts +197 -0
  64. package/node_modules/@types/node/vm.d.ts +112 -0
  65. package/node_modules/@types/node/wasi.d.ts +55 -0
  66. package/node_modules/@types/node/worker_threads.d.ts +207 -0
  67. package/node_modules/@types/node/zlib.d.ts +356 -0
  68. package/node_modules/@types/pg/LICENSE +21 -0
  69. package/node_modules/@types/pg/README.md +15 -0
  70. package/node_modules/@types/pg/index.d.mts +56 -0
  71. package/node_modules/@types/pg/index.d.ts +360 -0
  72. package/node_modules/@types/pg/lib/connection-parameters.d.ts +58 -0
  73. package/node_modules/@types/pg/lib/type-overrides.d.ts +77 -0
  74. package/node_modules/@types/pg/package.json +38 -0
  75. package/node_modules/@types/pg-copy-streams/LICENSE +21 -0
  76. package/node_modules/@types/pg-copy-streams/README.md +38 -0
  77. package/node_modules/@types/pg-copy-streams/index.d.ts +19 -0
  78. package/node_modules/@types/pg-copy-streams/package.json +28 -0
  79. package/node_modules/commander/LICENSE +22 -0
  80. package/node_modules/commander/Readme.md +1176 -0
  81. package/node_modules/commander/esm.mjs +16 -0
  82. package/node_modules/commander/index.js +24 -0
  83. package/node_modules/commander/lib/argument.js +150 -0
  84. package/node_modules/commander/lib/command.js +2777 -0
  85. package/node_modules/commander/lib/error.js +39 -0
  86. package/node_modules/commander/lib/help.js +747 -0
  87. package/node_modules/commander/lib/option.js +380 -0
  88. package/node_modules/commander/lib/suggestSimilar.js +101 -0
  89. package/node_modules/commander/package-support.json +19 -0
  90. package/node_modules/commander/package.json +82 -0
  91. package/node_modules/commander/typings/esm.d.mts +3 -0
  92. package/node_modules/commander/typings/index.d.ts +1113 -0
  93. package/node_modules/pg/LICENSE +21 -0
  94. package/node_modules/pg/README.md +95 -0
  95. package/node_modules/pg/esm/index.mjs +20 -0
  96. package/node_modules/pg/lib/client.js +743 -0
  97. package/node_modules/pg/lib/connection-parameters.js +171 -0
  98. package/node_modules/pg/lib/connection.js +221 -0
  99. package/node_modules/pg/lib/crypto/cert-signatures.js +122 -0
  100. package/node_modules/pg/lib/crypto/sasl.js +212 -0
  101. package/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
  102. package/node_modules/pg/lib/crypto/utils-webcrypto.js +89 -0
  103. package/node_modules/pg/lib/crypto/utils.js +9 -0
  104. package/node_modules/pg/lib/defaults.js +91 -0
  105. package/node_modules/pg/lib/index.js +73 -0
  106. package/node_modules/pg/lib/native/client.js +323 -0
  107. package/node_modules/pg/lib/native/index.js +2 -0
  108. package/node_modules/pg/lib/native/query.js +165 -0
  109. package/node_modules/pg/lib/query.js +252 -0
  110. package/node_modules/pg/lib/result.js +109 -0
  111. package/node_modules/pg/lib/stream.js +83 -0
  112. package/node_modules/pg/lib/type-overrides.js +35 -0
  113. package/node_modules/pg/lib/utils.js +217 -0
  114. package/node_modules/pg/package.json +76 -0
  115. package/node_modules/pg-copy-streams/Makefile +19 -0
  116. package/node_modules/pg-copy-streams/README.md +315 -0
  117. package/node_modules/pg-copy-streams/copy-both.js +267 -0
  118. package/node_modules/pg-copy-streams/copy-from.js +173 -0
  119. package/node_modules/pg-copy-streams/copy-to.js +177 -0
  120. package/node_modules/pg-copy-streams/eslint.config.js +55 -0
  121. package/node_modules/pg-copy-streams/index.js +17 -0
  122. package/node_modules/pg-copy-streams/message-formats.js +27 -0
  123. package/node_modules/pg-copy-streams/obuf.js +376 -0
  124. package/node_modules/pg-copy-streams/package.json +51 -0
  125. package/package.json +136 -0
@@ -0,0 +1,61 @@
1
+ declare module 'trace_events' {
2
+ /**
3
+ * The `Tracing` object is used to enable or disable tracing for sets of
4
+ * categories. Instances are created using the
5
+ * `trace_events.createTracing()` method.
6
+ *
7
+ * When created, the `Tracing` object is disabled. Calling the
8
+ * `tracing.enable()` method adds the categories to the set of enabled trace
9
+ * event categories. Calling `tracing.disable()` will remove the categories
10
+ * from the set of enabled trace event categories.
11
+ */
12
+ interface Tracing {
13
+ /**
14
+ * A comma-separated list of the trace event categories covered by this
15
+ * `Tracing` object.
16
+ */
17
+ readonly categories: string;
18
+
19
+ /**
20
+ * Disables this `Tracing` object.
21
+ *
22
+ * Only trace event categories _not_ covered by other enabled `Tracing`
23
+ * objects and _not_ specified by the `--trace-event-categories` flag
24
+ * will be disabled.
25
+ */
26
+ disable(): void;
27
+
28
+ /**
29
+ * Enables this `Tracing` object for the set of categories covered by
30
+ * the `Tracing` object.
31
+ */
32
+ enable(): void;
33
+
34
+ /**
35
+ * `true` only if the `Tracing` object has been enabled.
36
+ */
37
+ readonly enabled: boolean;
38
+ }
39
+
40
+ interface CreateTracingOptions {
41
+ /**
42
+ * An array of trace category names. Values included in the array are
43
+ * coerced to a string when possible. An error will be thrown if the
44
+ * value cannot be coerced.
45
+ */
46
+ categories: string[];
47
+ }
48
+
49
+ /**
50
+ * Creates and returns a Tracing object for the given set of categories.
51
+ */
52
+ function createTracing(options: CreateTracingOptions): Tracing;
53
+
54
+ /**
55
+ * Returns a comma-separated list of all currently-enabled trace event
56
+ * categories. The current set of enabled trace event categories is
57
+ * determined by the union of all currently-enabled `Tracing` objects and
58
+ * any categories enabled using the `--trace-event-categories` flag.
59
+ */
60
+ function getEnabledCategories(): string | undefined;
61
+ }
@@ -0,0 +1,66 @@
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
+ }
@@ -0,0 +1,147 @@
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
+ path?: string | null | undefined;
12
+ pathname?: string | null | undefined;
13
+ protocol?: string | null | undefined;
14
+ search?: string | null | undefined;
15
+ slashes?: boolean | null | undefined;
16
+ port?: string | number | null | undefined;
17
+ query?: string | null | ParsedUrlQueryInput | undefined;
18
+ }
19
+
20
+ // Output of `url.parse`
21
+ interface Url {
22
+ auth: string | null;
23
+ hash: string | null;
24
+ host: string | null;
25
+ hostname: string | null;
26
+ href: string;
27
+ path: string | null;
28
+ pathname: string | null;
29
+ protocol: string | null;
30
+ search: string | null;
31
+ slashes: boolean | null;
32
+ port: string | null;
33
+ query: string | null | ParsedUrlQuery;
34
+ }
35
+
36
+ interface UrlWithParsedQuery extends Url {
37
+ query: ParsedUrlQuery;
38
+ }
39
+
40
+ interface UrlWithStringQuery extends Url {
41
+ query: string | null;
42
+ }
43
+
44
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
45
+ function parse(urlStr: string): UrlWithStringQuery;
46
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
47
+ function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
48
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
49
+ function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
50
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
51
+ function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
52
+
53
+ function format(URL: URL, options?: URLFormatOptions): string;
54
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
55
+ function format(urlObject: UrlObject | string): string;
56
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
57
+ function resolve(from: string, to: string): string;
58
+
59
+ function domainToASCII(domain: string): string;
60
+ function domainToUnicode(domain: string): string;
61
+
62
+ /**
63
+ * This function ensures the correct decodings of percent-encoded characters as
64
+ * well as ensuring a cross-platform valid absolute path string.
65
+ * @param url The file URL string or URL object to convert to a path.
66
+ */
67
+ function fileURLToPath(url: string | URL): string;
68
+
69
+ /**
70
+ * This function ensures that path is resolved absolutely, and that the URL
71
+ * control characters are correctly encoded when converting into a File URL.
72
+ * @param url The path to convert to a File URL.
73
+ */
74
+ function pathToFileURL(url: string): URL;
75
+
76
+ interface URLFormatOptions {
77
+ auth?: boolean | undefined;
78
+ fragment?: boolean | undefined;
79
+ search?: boolean | undefined;
80
+ unicode?: boolean | undefined;
81
+ }
82
+
83
+ class URL {
84
+ constructor(input: string, base?: string | URL);
85
+ hash: string;
86
+ host: string;
87
+ hostname: string;
88
+ href: string;
89
+ readonly origin: string;
90
+ password: string;
91
+ pathname: string;
92
+ port: string;
93
+ protocol: string;
94
+ search: string;
95
+ readonly searchParams: URLSearchParams;
96
+ username: string;
97
+ toString(): string;
98
+ toJSON(): string;
99
+ }
100
+
101
+ class URLSearchParams implements Iterable<[string, string]> {
102
+ constructor(init?: URLSearchParams | string | { [key: string]: string | ReadonlyArray<string> | undefined } | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
103
+ append(name: string, value: string): void;
104
+ delete(name: string): void;
105
+ entries(): IterableIterator<[string, string]>;
106
+ forEach(callback: (value: string, name: string, searchParams: URLSearchParams) => void): void;
107
+ get(name: string): string | null;
108
+ getAll(name: string): string[];
109
+ has(name: string): boolean;
110
+ keys(): IterableIterator<string>;
111
+ set(name: string, value: string): void;
112
+ sort(): void;
113
+ toString(): string;
114
+ values(): IterableIterator<string>;
115
+ [Symbol.iterator](): IterableIterator<[string, string]>;
116
+ }
117
+
118
+ import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url';
119
+ global {
120
+ interface URLSearchParams extends _URLSearchParams {}
121
+ interface URL extends _URL {}
122
+ interface Global {
123
+ URL: typeof _URL;
124
+ URLSearchParams: typeof _URLSearchParams;
125
+ }
126
+ /**
127
+ * `URL` class is a global reference for `require('url').URL`
128
+ * https://nodejs.org/api/url.html#the-whatwg-url-api
129
+ * @since v10.0.0
130
+ */
131
+ var URL:
132
+ // For compatibility with "dom" and "webworker" URL declarations
133
+ typeof globalThis extends { onmessage: any, URL: infer URL }
134
+ ? URL
135
+ : typeof _URL;
136
+ /**
137
+ * `URLSearchParams` class is a global reference for `require('url').URLSearchParams`.
138
+ * https://nodejs.org/api/url.html#class-urlsearchparams
139
+ * @since v10.0.0
140
+ */
141
+ var URLSearchParams:
142
+ // For compatibility with "dom" and "webworker" URLSearchParams declarations
143
+ typeof globalThis extends { onmessage: any, URLSearchParams: infer URLSearchParams }
144
+ ? URLSearchParams
145
+ : typeof _URLSearchParams;
146
+ }
147
+ }
@@ -0,0 +1,200 @@
1
+ declare module 'util' {
2
+ interface InspectOptions extends NodeJS.InspectOptions { }
3
+ function format(format?: any, ...param: any[]): string;
4
+ function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
5
+ /** @deprecated since v0.11.3 - use a third party module instead. */
6
+ function log(string: string): void;
7
+ function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
8
+ function inspect(object: any, options: InspectOptions): string;
9
+ namespace inspect {
10
+ const custom: unique symbol;
11
+ let colors: {
12
+ [color: string]: [number, number] | undefined
13
+ };
14
+ let styles: {
15
+ [style: string]: string | undefined
16
+ };
17
+ let defaultOptions: InspectOptions;
18
+ /**
19
+ * Allows changing inspect settings from the repl.
20
+ */
21
+ let replDefaults: InspectOptions;
22
+ }
23
+ /** @deprecated since v4.0.0 - use `Array.isArray()` instead. */
24
+ function isArray(object: any): object is any[];
25
+ /** @deprecated since v4.0.0 - use `util.types.isRegExp()` instead. */
26
+ function isRegExp(object: any): object is RegExp;
27
+ /** @deprecated since v4.0.0 - use `util.types.isDate()` instead. */
28
+ function isDate(object: any): object is Date;
29
+ /** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */
30
+ function isError(object: any): object is Error;
31
+ function inherits(constructor: any, superConstructor: any): void;
32
+ function debuglog(key: string): (msg: string, ...param: any[]) => void;
33
+ /** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */
34
+ function isBoolean(object: any): object is boolean;
35
+ /** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */
36
+ function isBuffer(object: any): object is Buffer;
37
+ /** @deprecated since v4.0.0 - use `typeof value === 'function'` instead. */
38
+ function isFunction(object: any): boolean;
39
+ /** @deprecated since v4.0.0 - use `value === null` instead. */
40
+ function isNull(object: any): object is null;
41
+ /** @deprecated since v4.0.0 - use `value === null || value === undefined` instead. */
42
+ function isNullOrUndefined(object: any): object is null | undefined;
43
+ /** @deprecated since v4.0.0 - use `typeof value === 'number'` instead. */
44
+ function isNumber(object: any): object is number;
45
+ /** @deprecated since v4.0.0 - use `value !== null && typeof value === 'object'` instead. */
46
+ function isObject(object: any): boolean;
47
+ /** @deprecated since v4.0.0 - use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. */
48
+ function isPrimitive(object: any): boolean;
49
+ /** @deprecated since v4.0.0 - use `typeof value === 'string'` instead. */
50
+ function isString(object: any): object is string;
51
+ /** @deprecated since v4.0.0 - use `typeof value === 'symbol'` instead. */
52
+ function isSymbol(object: any): object is symbol;
53
+ /** @deprecated since v4.0.0 - use `value === undefined` instead. */
54
+ function isUndefined(object: any): object is undefined;
55
+ function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
56
+ function isDeepStrictEqual(val1: any, val2: any): boolean;
57
+
58
+ interface CustomPromisify<TCustom extends Function> extends Function {
59
+ __promisify__: TCustom;
60
+ }
61
+
62
+ function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
63
+ function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
64
+ function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
65
+ function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
66
+ function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
67
+ 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;
68
+ 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;
69
+ function callbackify<T1, T2, T3, TResult>(
70
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
71
+ function callbackify<T1, T2, T3, T4>(
72
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
73
+ function callbackify<T1, T2, T3, T4, TResult>(
74
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
75
+ function callbackify<T1, T2, T3, T4, T5>(
76
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
77
+ function callbackify<T1, T2, T3, T4, T5, TResult>(
78
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
79
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
80
+ function callbackify<T1, T2, T3, T4, T5, T6>(
81
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
82
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
83
+ function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
84
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
85
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
86
+
87
+ function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
88
+ function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
89
+ function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
90
+ function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
91
+ function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
92
+ function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
93
+ function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
94
+ function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void):
95
+ (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
96
+ 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>;
97
+ function promisify<T1, T2, T3, T4, TResult>(
98
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
99
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
100
+ function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void):
101
+ (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
102
+ function promisify<T1, T2, T3, T4, T5, TResult>(
103
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
104
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
105
+ function promisify<T1, T2, T3, T4, T5>(
106
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
107
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
108
+ function promisify(fn: Function): Function;
109
+ namespace promisify {
110
+ const custom: unique symbol;
111
+ }
112
+
113
+ namespace types {
114
+ function isAnyArrayBuffer(object: any): object is ArrayBufferLike;
115
+ function isArgumentsObject(object: any): object is IArguments;
116
+ function isArrayBuffer(object: any): object is ArrayBuffer;
117
+ function isArrayBufferView(object: any): object is NodeJS.ArrayBufferView;
118
+ function isAsyncFunction(object: any): boolean;
119
+ function isBigInt64Array(value: any): value is BigInt64Array;
120
+ function isBigUint64Array(value: any): value is BigUint64Array;
121
+ function isBooleanObject(object: any): object is Boolean;
122
+ function isBoxedPrimitive(object: any): object is String | Number | BigInt | Boolean | Symbol;
123
+ function isDataView(object: any): object is DataView;
124
+ function isDate(object: any): object is Date;
125
+ function isExternal(object: any): boolean;
126
+ function isFloat32Array(object: any): object is Float32Array;
127
+ function isFloat64Array(object: any): object is Float64Array;
128
+ function isGeneratorFunction(object: any): object is GeneratorFunction;
129
+ function isGeneratorObject(object: any): object is Generator;
130
+ function isInt8Array(object: any): object is Int8Array;
131
+ function isInt16Array(object: any): object is Int16Array;
132
+ function isInt32Array(object: any): object is Int32Array;
133
+ function isMap<T>(
134
+ object: T | {},
135
+ ): object is T extends ReadonlyMap<any, any>
136
+ ? unknown extends T
137
+ ? never
138
+ : ReadonlyMap<any, any>
139
+ : Map<any, any>;
140
+ function isMapIterator(object: any): boolean;
141
+ function isModuleNamespaceObject(value: any): boolean;
142
+ function isNativeError(object: any): object is Error;
143
+ function isNumberObject(object: any): object is Number;
144
+ function isPromise(object: any): object is Promise<any>;
145
+ function isProxy(object: any): boolean;
146
+ function isRegExp(object: any): object is RegExp;
147
+ function isSet<T>(
148
+ object: T | {},
149
+ ): object is T extends ReadonlySet<any>
150
+ ? unknown extends T
151
+ ? never
152
+ : ReadonlySet<any>
153
+ : Set<any>;
154
+ function isSetIterator(object: any): boolean;
155
+ function isSharedArrayBuffer(object: any): object is SharedArrayBuffer;
156
+ function isStringObject(object: any): object is String;
157
+ function isSymbolObject(object: any): object is Symbol;
158
+ function isTypedArray(object: any): object is NodeJS.TypedArray;
159
+ function isUint8Array(object: any): object is Uint8Array;
160
+ function isUint8ClampedArray(object: any): object is Uint8ClampedArray;
161
+ function isUint16Array(object: any): object is Uint16Array;
162
+ function isUint32Array(object: any): object is Uint32Array;
163
+ function isWeakMap(object: any): object is WeakMap<any, any>;
164
+ function isWeakSet(object: any): object is WeakSet<any>;
165
+ /** @deprecated Removed in v14.0.0 */
166
+ function isWebAssemblyCompiledModule(object: any): boolean;
167
+ }
168
+
169
+ class TextDecoder {
170
+ readonly encoding: string;
171
+ readonly fatal: boolean;
172
+ readonly ignoreBOM: boolean;
173
+ constructor(
174
+ encoding?: string,
175
+ options?: { fatal?: boolean | undefined; ignoreBOM?: boolean | undefined }
176
+ );
177
+ decode(
178
+ input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
179
+ options?: { stream?: boolean | undefined }
180
+ ): string;
181
+ }
182
+
183
+ interface EncodeIntoResult {
184
+ /**
185
+ * The read Unicode code units of input.
186
+ */
187
+
188
+ read: number;
189
+ /**
190
+ * The written UTF-8 bytes of output.
191
+ */
192
+ written: number;
193
+ }
194
+
195
+ class TextEncoder {
196
+ readonly encoding: string;
197
+ encode(input?: string): Uint8Array;
198
+ encodeInto(input: string, output: Uint8Array): EncodeIntoResult;
199
+ }
200
+ }
@@ -0,0 +1,197 @@
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
+ /**
68
+ * @experimental
69
+ */
70
+ class Serializer {
71
+ /**
72
+ * Writes out a header, which includes the serialization format version.
73
+ */
74
+ writeHeader(): void;
75
+
76
+ /**
77
+ * Serializes a JavaScript value and adds the serialized representation to the internal buffer.
78
+ * This throws an error if value cannot be serialized.
79
+ */
80
+ writeValue(val: any): boolean;
81
+
82
+ /**
83
+ * Returns the stored internal buffer.
84
+ * This serializer should not be used once the buffer is released.
85
+ * Calling this method results in undefined behavior if a previous write has failed.
86
+ */
87
+ releaseBuffer(): Buffer;
88
+
89
+ /**
90
+ * Marks an ArrayBuffer as having its contents transferred out of band.\
91
+ * Pass the corresponding ArrayBuffer in the deserializing context to deserializer.transferArrayBuffer().
92
+ */
93
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
94
+
95
+ /**
96
+ * Write a raw 32-bit unsigned integer.
97
+ */
98
+ writeUint32(value: number): void;
99
+
100
+ /**
101
+ * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
102
+ */
103
+ writeUint64(hi: number, lo: number): void;
104
+
105
+ /**
106
+ * Write a JS number value.
107
+ */
108
+ writeDouble(value: number): void;
109
+
110
+ /**
111
+ * Write raw bytes into the serializer’s internal buffer.
112
+ * The deserializer will require a way to compute the length of the buffer.
113
+ */
114
+ writeRawBytes(buffer: NodeJS.TypedArray): void;
115
+ }
116
+
117
+ /**
118
+ * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
119
+ * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
120
+ * @experimental
121
+ */
122
+ class DefaultSerializer extends Serializer {
123
+ }
124
+
125
+ /**
126
+ * @experimental
127
+ */
128
+ class Deserializer {
129
+ constructor(data: NodeJS.TypedArray);
130
+ /**
131
+ * Reads and validates a header (including the format version).
132
+ * May, for example, reject an invalid or unsupported wire format.
133
+ * In that case, an Error is thrown.
134
+ */
135
+ readHeader(): boolean;
136
+
137
+ /**
138
+ * Deserializes a JavaScript value from the buffer and returns it.
139
+ */
140
+ readValue(): any;
141
+
142
+ /**
143
+ * Marks an ArrayBuffer as having its contents transferred out of band.
144
+ * Pass the corresponding `ArrayBuffer` in the serializing context to serializer.transferArrayBuffer()
145
+ * (or return the id from serializer._getSharedArrayBufferId() in the case of SharedArrayBuffers).
146
+ */
147
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
148
+
149
+ /**
150
+ * Reads the underlying wire format version.
151
+ * Likely mostly to be useful to legacy code reading old wire format versions.
152
+ * May not be called before .readHeader().
153
+ */
154
+ getWireFormatVersion(): number;
155
+
156
+ /**
157
+ * Read a raw 32-bit unsigned integer and return it.
158
+ */
159
+ readUint32(): number;
160
+
161
+ /**
162
+ * Read a raw 64-bit unsigned integer and return it as an array [hi, lo] with two 32-bit unsigned integer entries.
163
+ */
164
+ readUint64(): [number, number];
165
+
166
+ /**
167
+ * Read a JS number value.
168
+ */
169
+ readDouble(): number;
170
+
171
+ /**
172
+ * Read raw bytes from the deserializer’s internal buffer.
173
+ * The length parameter must correspond to the length of the buffer that was passed to serializer.writeRawBytes().
174
+ */
175
+ readRawBytes(length: number): Buffer;
176
+ }
177
+
178
+ /**
179
+ * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
180
+ * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
181
+ * @experimental
182
+ */
183
+ class DefaultDeserializer extends Deserializer {
184
+ }
185
+
186
+ /**
187
+ * Uses a `DefaultSerializer` to serialize value into a buffer.
188
+ * @experimental
189
+ */
190
+ function serialize(value: any): Buffer;
191
+
192
+ /**
193
+ * Uses a `DefaultDeserializer` with default options to read a JS value from a buffer.
194
+ * @experimental
195
+ */
196
+ function deserialize(data: NodeJS.TypedArray): any;
197
+ }