cloudstructs 0.6.13 → 0.6.15

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 (122) hide show
  1. package/.jsii +4 -4
  2. package/assets/slack-app/provider.lambda/index.js +1 -0
  3. package/assets/slack-textract/detect.lambda/index.js +19 -12
  4. package/assets/ssl-server-test/analyze.lambda/index.js +1 -0
  5. package/lib/codecommit-mirror/index.js +2 -2
  6. package/lib/ecs-service-roller/index.js +2 -2
  7. package/lib/email-receiver/receiver.js +1 -1
  8. package/lib/saml-identity-provider/index.js +2 -2
  9. package/lib/slack-app/manifest.js +1 -1
  10. package/lib/slack-app/slack-app.js +2 -2
  11. package/lib/slack-events/index.js +1 -1
  12. package/lib/slack-textract/index.js +1 -1
  13. package/lib/ssl-server-test/index.js +1 -1
  14. package/lib/state-machine-cr-provider/index.js +1 -1
  15. package/lib/static-website/index.js +1 -1
  16. package/lib/toolkit-cleaner/index.js +1 -1
  17. package/lib/url-shortener/index.js +3 -2
  18. package/node_modules/@slack/logger/node_modules/@types/node/README.md +2 -2
  19. package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +6 -6
  20. package/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +5 -5
  21. package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +61 -24
  22. package/node_modules/@slack/logger/node_modules/@types/node/https.d.ts +1 -0
  23. package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +1 -0
  24. package/node_modules/@slack/logger/node_modules/@types/node/package.json +9 -4
  25. package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +95 -23
  26. package/node_modules/@slack/logger/node_modules/@types/node/timers/promises.d.ts +25 -0
  27. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/crypto.d.ts +6 -6
  28. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +5 -5
  29. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/http.d.ts +61 -24
  30. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/https.d.ts +1 -0
  31. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/test.d.ts +95 -23
  32. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/timers/promises.d.ts +25 -0
  33. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/util.d.ts +96 -20
  34. package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +96 -20
  35. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +2 -2
  36. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +6 -6
  37. package/node_modules/@slack/web-api/node_modules/@types/node/diagnostics_channel.d.ts +5 -5
  38. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +61 -24
  39. package/node_modules/@slack/web-api/node_modules/@types/node/https.d.ts +1 -0
  40. package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +1 -0
  41. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +9 -4
  42. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +95 -23
  43. package/node_modules/@slack/web-api/node_modules/@types/node/timers/promises.d.ts +25 -0
  44. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/crypto.d.ts +6 -6
  45. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +5 -5
  46. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/http.d.ts +61 -24
  47. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/https.d.ts +1 -0
  48. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/test.d.ts +95 -23
  49. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/timers/promises.d.ts +25 -0
  50. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/util.d.ts +96 -20
  51. package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +96 -20
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +6 -6
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +5 -5
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +61 -24
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +1 -0
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +1 -0
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +9 -4
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +95 -23
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +25 -0
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +6 -6
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +5 -5
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http.d.ts +61 -24
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/https.d.ts +1 -0
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +95 -23
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers/promises.d.ts +25 -0
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +96 -20
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +96 -20
  69. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +2 -2
  70. package/node_modules/@types/is-stream/node_modules/@types/node/crypto.d.ts +6 -6
  71. package/node_modules/@types/is-stream/node_modules/@types/node/diagnostics_channel.d.ts +5 -5
  72. package/node_modules/@types/is-stream/node_modules/@types/node/http.d.ts +61 -24
  73. package/node_modules/@types/is-stream/node_modules/@types/node/https.d.ts +1 -0
  74. package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +1 -0
  75. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +9 -4
  76. package/node_modules/@types/is-stream/node_modules/@types/node/test.d.ts +95 -23
  77. package/node_modules/@types/is-stream/node_modules/@types/node/timers/promises.d.ts +25 -0
  78. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/crypto.d.ts +6 -6
  79. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +5 -5
  80. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/http.d.ts +61 -24
  81. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/https.d.ts +1 -0
  82. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/test.d.ts +95 -23
  83. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/timers/promises.d.ts +25 -0
  84. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/util.d.ts +96 -20
  85. package/node_modules/@types/is-stream/node_modules/@types/node/util.d.ts +96 -20
  86. package/node_modules/@types/keyv/node_modules/@types/node/README.md +2 -2
  87. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +6 -6
  88. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +5 -5
  89. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +61 -24
  90. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +1 -0
  91. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +1 -0
  92. package/node_modules/@types/keyv/node_modules/@types/node/package.json +9 -4
  93. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +95 -23
  94. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +25 -0
  95. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +6 -6
  96. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +5 -5
  97. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http.d.ts +61 -24
  98. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/https.d.ts +1 -0
  99. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +95 -23
  100. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers/promises.d.ts +25 -0
  101. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +96 -20
  102. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +96 -20
  103. package/node_modules/@types/responselike/node_modules/@types/node/README.md +2 -2
  104. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +6 -6
  105. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +5 -5
  106. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +61 -24
  107. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +1 -0
  108. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +1 -0
  109. package/node_modules/@types/responselike/node_modules/@types/node/package.json +9 -4
  110. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +95 -23
  111. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +25 -0
  112. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +6 -6
  113. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +5 -5
  114. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http.d.ts +61 -24
  115. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/https.d.ts +1 -0
  116. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +95 -23
  117. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers/promises.d.ts +25 -0
  118. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +96 -20
  119. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +96 -20
  120. package/node_modules/got/dist/source/as-promise/index.js +1 -0
  121. package/node_modules/got/package.json +2 -1
  122. package/package.json +11 -10
@@ -43,6 +43,7 @@ declare module 'http' {
43
43
  import * as stream from 'node:stream';
44
44
  import { URL } from 'node:url';
45
45
  import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
46
+ import { LookupOptions } from 'node:dns';
46
47
  // incoming headers will never contain number
47
48
  interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
48
49
  accept?: string | undefined;
@@ -113,56 +114,87 @@ declare module 'http' {
113
114
  type OutgoingHttpHeader = number | string | string[];
114
115
  interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {}
115
116
  interface ClientRequestArgs {
116
- signal?: AbortSignal | undefined;
117
- protocol?: string | null | undefined;
117
+ _defaultAgent?: Agent | undefined;
118
+ agent?: Agent | boolean | undefined;
119
+ auth?: string | null | undefined;
120
+ // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
121
+ createConnection?:
122
+ | ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket)
123
+ | undefined;
124
+ defaultPort?: number | string | undefined;
125
+ family?: number | undefined;
126
+ headers?: OutgoingHttpHeaders | undefined;
127
+ hints?: LookupOptions['hints'];
118
128
  host?: string | null | undefined;
119
129
  hostname?: string | null | undefined;
120
- family?: number | undefined;
121
- port?: number | string | null | undefined;
122
- defaultPort?: number | string | undefined;
130
+ insecureHTTPParser?: boolean | undefined;
123
131
  localAddress?: string | undefined;
124
- socketPath?: string | undefined;
132
+ localPort?: number | undefined;
133
+ lookup?: LookupFunction | undefined;
125
134
  /**
126
- * @default 8192
135
+ * @default 16384
127
136
  */
128
137
  maxHeaderSize?: number | undefined;
129
138
  method?: string | undefined;
130
139
  path?: string | null | undefined;
131
- headers?: OutgoingHttpHeaders | undefined;
132
- auth?: string | null | undefined;
133
- agent?: Agent | boolean | undefined;
134
- _defaultAgent?: Agent | undefined;
135
- timeout?: number | undefined;
140
+ port?: number | string | null | undefined;
141
+ protocol?: string | null | undefined;
136
142
  setHost?: boolean | undefined;
137
- // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
138
- createConnection?:
139
- | ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket)
140
- | undefined;
141
- lookup?: LookupFunction | undefined;
143
+ signal?: AbortSignal | undefined;
144
+ socketPath?: string | undefined;
145
+ timeout?: number | undefined;
146
+ uniqueHeaders?: Array<string | string[]> | undefined;
142
147
  }
143
148
  interface ServerOptions<
144
149
  Request extends typeof IncomingMessage = typeof IncomingMessage,
145
150
  Response extends typeof ServerResponse = typeof ServerResponse,
146
151
  > {
152
+ /**
153
+ * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`.
154
+ */
147
155
  IncomingMessage?: Request | undefined;
156
+ /**
157
+ * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`.
158
+ */
148
159
  ServerResponse?: Response | undefined;
149
160
  /**
150
- * Optionally overrides the value of
151
- * `--max-http-header-size` for requests received by this server, i.e.
152
- * the maximum length of request headers in bytes.
153
- * @default 8192
161
+ * Sets the timeout value in milliseconds for receiving the entire request from the client.
162
+ * @see Server.requestTimeout for more information.
163
+ * @default 300000
164
+ * @since v18.0.0
154
165
  */
155
- maxHeaderSize?: number | undefined;
166
+ requestTimeout?: number | undefined;
156
167
  /**
157
- * Use an insecure HTTP parser that accepts invalid HTTP headers when true.
168
+ * The number of milliseconds of inactivity a server needs to wait for additional incoming data,
169
+ * after it has finished writing the last response, before a socket will be destroyed.
170
+ * @see Server.keepAliveTimeout for more information.
171
+ * @default 5000
172
+ * @since v18.0.0
173
+ */
174
+ keepAliveTimeout?: number | undefined;
175
+ /**
176
+ * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.
177
+ * @default 30000
178
+ */
179
+ connectionsCheckingInterval?: number | undefined;
180
+ /**
181
+ * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`.
158
182
  * Using the insecure parser should be avoided.
159
183
  * See --insecure-http-parser for more information.
160
184
  * @default false
161
185
  */
162
186
  insecureHTTPParser?: boolean | undefined;
187
+ /**
188
+ * Optionally overrides the value of
189
+ * `--max-http-header-size` for requests received by this server, i.e.
190
+ * the maximum length of request headers in bytes.
191
+ * @default 16384
192
+ * @since v13.3.0
193
+ */
194
+ maxHeaderSize?: number | undefined;
163
195
  /**
164
196
  * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
165
- * @default false
197
+ * @default true
166
198
  * @since v16.5.0
167
199
  */
168
200
  noDelay?: boolean | undefined;
@@ -179,6 +211,11 @@ declare module 'http' {
179
211
  * @since v16.5.0
180
212
  */
181
213
  keepAliveInitialDelay?: number | undefined;
214
+ /**
215
+ * A list of response headers that should be sent only once.
216
+ * If the header's value is an array, the items will be joined using `; `.
217
+ */
218
+ uniqueHeaders?: Array<string | string[]> | undefined;
182
219
  }
183
220
  type RequestListener<
184
221
  Request extends typeof IncomingMessage = typeof IncomingMessage,
@@ -14,6 +14,7 @@ declare module 'https' {
14
14
  > = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
15
15
  type RequestOptions = http.RequestOptions &
16
16
  tls.SecureContextOptions & {
17
+ checkServerIdentity?: typeof tls.checkServerIdentity | undefined;
17
18
  rejectUnauthorized?: boolean | undefined; // Defaults to true
18
19
  servername?: string | undefined; // SNI TLS Extension
19
20
  };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * The `node:test` module provides a standalone testing module.
3
- * @see [source](https://github.com/nodejs/node/blob/v18.8.0/lib/test.js)
3
+ * @see [source](https://github.com/nodejs/node/blob/v18.x/lib/test.js)
4
4
  */
5
5
  declare module 'node:test' {
6
6
  /**
@@ -61,6 +61,19 @@ declare module 'node:test' {
61
61
  function describe(name?: string, fn?: SuiteFn): void;
62
62
  function describe(options?: TestOptions, fn?: SuiteFn): void;
63
63
  function describe(fn?: SuiteFn): void;
64
+ namespace describe {
65
+ // Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`.
66
+ function skip(name?: string, options?: TestOptions, fn?: SuiteFn): void;
67
+ function skip(name?: string, fn?: SuiteFn): void;
68
+ function skip(options?: TestOptions, fn?: SuiteFn): void;
69
+ function skip(fn?: SuiteFn): void;
70
+
71
+ // Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.
72
+ function todo(name?: string, options?: TestOptions, fn?: SuiteFn): void;
73
+ function todo(name?: string, fn?: SuiteFn): void;
74
+ function todo(options?: TestOptions, fn?: SuiteFn): void;
75
+ function todo(fn?: SuiteFn): void;
76
+ }
64
77
 
65
78
  /**
66
79
  * @since v18.6.0
@@ -74,6 +87,19 @@ declare module 'node:test' {
74
87
  function it(name?: string, fn?: ItFn): void;
75
88
  function it(options?: TestOptions, fn?: ItFn): void;
76
89
  function it(fn?: ItFn): void;
90
+ namespace it {
91
+ // Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
92
+ function skip(name?: string, options?: TestOptions, fn?: ItFn): void;
93
+ function skip(name?: string, fn?: ItFn): void;
94
+ function skip(options?: TestOptions, fn?: ItFn): void;
95
+ function skip(fn?: ItFn): void;
96
+
97
+ // Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
98
+ function todo(name?: string, options?: TestOptions, fn?: ItFn): void;
99
+ function todo(name?: string, fn?: ItFn): void;
100
+ function todo(options?: TestOptions, fn?: ItFn): void;
101
+ function todo(fn?: ItFn): void;
102
+ }
77
103
 
78
104
  /**
79
105
  * The type of a function under test. The first argument to this function is a
@@ -96,32 +122,45 @@ declare module 'node:test' {
96
122
 
97
123
  interface RunOptions {
98
124
  /**
99
- * @default false
125
+ * If a number is provided, then that many files would run in parallel.
126
+ * If truthy, it would run (number of cpu cores - 1) files in parallel.
127
+ * If falsy, it would only run one file at a time.
128
+ * If unspecified, subtests inherit this value from their parent.
129
+ * @default true
100
130
  */
101
- concurrency?: number | boolean;
131
+ concurrency?: number | boolean | undefined;
102
132
 
103
133
  /**
104
- * An array containing the list of files to run. If unspecified, the test runner execution model will be used.
134
+ * An array containing the list of files to run.
135
+ * If unspecified, the test runner execution model will be used.
105
136
  */
106
- files?: readonly string[];
137
+ files?: readonly string[] | undefined;
107
138
 
108
139
  /**
109
- * Allows aborting an in-progress test.
140
+ * Allows aborting an in-progress test execution.
110
141
  * @default undefined
111
142
  */
112
- signal?: AbortSignal;
143
+ signal?: AbortSignal | undefined;
113
144
 
114
145
  /**
115
- * A number of milliseconds the test will fail after. If unspecified, subtests inherit this
116
- * value from their parent.
146
+ * A number of milliseconds the test will fail after.
147
+ * If unspecified, subtests inherit this value from their parent.
117
148
  * @default Infinity
118
149
  */
119
- timeout?: number;
150
+ timeout?: number | undefined;
151
+
152
+ /**
153
+ * Sets inspector port of test child process.
154
+ * If a nullish value is provided, each process gets its own port,
155
+ * incremented from the primary's `process.debugPort`.
156
+ */
157
+ inspectPort?: number | (() => number) | undefined;
120
158
  }
121
159
 
122
160
  /**
123
- * A successful call of the run() method will return a new TapStream object, streaming a TAP output.
124
- * TapStream will emit events in the order of the tests' definitions.
161
+ * A successful call of the `run()` method will return a new `TapStream` object,
162
+ * streaming a [TAP](https://testanything.org/) output.
163
+ * `TapStream` will emit events in the order of the tests' definitions.
125
164
  * @since v18.9.0
126
165
  */
127
166
  interface TapStream extends NodeJS.ReadableStream {
@@ -216,6 +255,24 @@ declare module 'node:test' {
216
255
  * @since v18.0.0
217
256
  */
218
257
  interface TestContext {
258
+ /**
259
+ * This function is used to create a hook running before each subtest of the current test.
260
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
261
+ * the second argument. Default: A no-op function.
262
+ * @param options Configuration options for the hook.
263
+ * @since v18.8.0
264
+ */
265
+ beforeEach: typeof beforeEach;
266
+
267
+ /**
268
+ * This function is used to create a hook running after each subtest of the current test.
269
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
270
+ * the second argument. Default: A no-op function.
271
+ * @param options Configuration options for the hook.
272
+ * @since v18.8.0
273
+ */
274
+ afterEach: typeof afterEach;
275
+
219
276
  /**
220
277
  * This function is used to write TAP diagnostics to the output. Any diagnostic information is
221
278
  * included at the end of the test's results. This function does not return a value.
@@ -224,6 +281,12 @@ declare module 'node:test' {
224
281
  */
225
282
  diagnostic(message: string): void;
226
283
 
284
+ /**
285
+ * The name of the test.
286
+ * @since v18.8.0
287
+ */
288
+ readonly name: string;
289
+
227
290
  /**
228
291
  * If `shouldRunOnlyTests` is truthy, the test context will only run tests that have the `only`
229
292
  * option set. Otherwise, all tests are run. If Node.js was not started with the `--test-only`
@@ -233,6 +296,12 @@ declare module 'node:test' {
233
296
  */
234
297
  runOnly(shouldRunOnlyTests: boolean): void;
235
298
 
299
+ /**
300
+ * Can be used to abort test subtasks when the test has been aborted.
301
+ * @since v18.7.0
302
+ */
303
+ readonly signal: AbortSignal;
304
+
236
305
  /**
237
306
  * This function causes the test's output to indicate the test as skipped. If `message` is
238
307
  * provided, it is included in the TAP output. Calling `skip()` does not terminate execution of
@@ -268,31 +337,34 @@ declare module 'node:test' {
268
337
 
269
338
  interface TestOptions {
270
339
  /**
271
- * The number of tests that can be run at the same time. If unspecified, subtests inherit this
272
- * value from their parent.
273
- * @default 1
340
+ * If a number is provided, then that many tests would run in parallel.
341
+ * If truthy, it would run (number of cpu cores - 1) tests in parallel.
342
+ * For subtests, it will be `Infinity` tests in parallel.
343
+ * If falsy, it would only run one test at a time.
344
+ * If unspecified, subtests inherit this value from their parent.
345
+ * @default false
274
346
  */
275
- concurrency?: number;
347
+ concurrency?: number | boolean | undefined;
276
348
 
277
349
  /**
278
350
  * If truthy, and the test context is configured to run `only` tests, then this test will be
279
351
  * run. Otherwise, the test is skipped.
280
352
  * @default false
281
353
  */
282
- only?: boolean;
354
+ only?: boolean | undefined;
283
355
 
284
356
  /**
285
357
  * Allows aborting an in-progress test.
286
358
  * @since v18.8.0
287
359
  */
288
- signal?: AbortSignal;
360
+ signal?: AbortSignal | undefined;
289
361
 
290
362
  /**
291
363
  * If truthy, the test is skipped. If a string is provided, that string is displayed in the
292
364
  * test results as the reason for skipping the test.
293
365
  * @default false
294
366
  */
295
- skip?: boolean | string;
367
+ skip?: boolean | string | undefined;
296
368
 
297
369
  /**
298
370
  * A number of milliseconds the test will fail after. If unspecified, subtests inherit this
@@ -300,14 +372,14 @@ declare module 'node:test' {
300
372
  * @default Infinity
301
373
  * @since v18.7.0
302
374
  */
303
- timeout?: number;
375
+ timeout?: number | undefined;
304
376
 
305
377
  /**
306
378
  * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in
307
379
  * the test results as the reason why the test is `TODO`.
308
380
  * @default false
309
381
  */
310
- todo?: boolean | string;
382
+ todo?: boolean | string | undefined;
311
383
  }
312
384
 
313
385
  /**
@@ -360,14 +432,14 @@ declare module 'node:test' {
360
432
  /**
361
433
  * Allows aborting an in-progress hook.
362
434
  */
363
- signal?: AbortSignal;
435
+ signal?: AbortSignal | undefined;
364
436
 
365
437
  /**
366
438
  * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this
367
439
  * value from their parent.
368
440
  * @default Infinity
369
441
  */
370
- timeout?: number;
442
+ timeout?: number | undefined;
371
443
  }
372
444
 
373
445
  export { test as default, run, test, describe, it, before, after, beforeEach, afterEach };
@@ -62,6 +62,31 @@ declare module 'timers/promises' {
62
62
  * @since v15.9.0
63
63
  */
64
64
  function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): AsyncIterable<T>;
65
+
66
+ interface Scheduler {
67
+ /**
68
+ * ```js
69
+ * import { scheduler } from 'node:timers/promises';
70
+ *
71
+ * await scheduler.wait(1000); // Wait one second before continuing
72
+ * ```
73
+ * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API.
74
+ * Calling timersPromises.scheduler.wait(delay, options) is roughly equivalent to calling timersPromises.setTimeout(delay, undefined, options) except that the ref option is not supported.
75
+ * @since v16.14.0
76
+ * @experimental
77
+ * @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
78
+ */
79
+ wait: (delay?: number, options?: TimerOptions) => Promise<void>;
80
+ /**
81
+ * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API.
82
+ * Calling timersPromises.scheduler.yield() is equivalent to calling timersPromises.setImmediate() with no arguments.
83
+ * @since v16.14.0
84
+ * @experimental
85
+ */
86
+ yield: () => Promise<void>;
87
+ }
88
+
89
+ const scheduler: Scheduler;
65
90
  }
66
91
  declare module 'node:timers/promises' {
67
92
  export * from 'timers/promises';
@@ -6,28 +6,44 @@
6
6
  * ```js
7
7
  * const util = require('util');
8
8
  * ```
9
- * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/util.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v18.x/lib/util.js)
10
10
  */
11
11
  declare module 'util' {
12
12
  import * as types from 'node:util/types';
13
13
  export interface InspectOptions {
14
14
  /**
15
- * If set to `true`, getters are going to be
16
- * inspected as well. If set to `'get'` only getters without setter are going
17
- * to be inspected. If set to `'set'` only getters having a corresponding
18
- * setter are going to be inspected. This might cause side effects depending on
19
- * the getter function.
20
- * @default `false`
15
+ * If `true`, object's non-enumerable symbols and properties are included in the formatted result.
16
+ * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties).
17
+ * @default false
21
18
  */
22
- getters?: 'get' | 'set' | boolean | undefined;
23
19
  showHidden?: boolean | undefined;
24
20
  /**
21
+ * Specifies the number of times to recurse while formatting object.
22
+ * This is useful for inspecting large objects.
23
+ * To recurse up to the maximum call stack size pass `Infinity` or `null`.
25
24
  * @default 2
26
25
  */
27
26
  depth?: number | null | undefined;
27
+ /**
28
+ * If `true`, the output is styled with ANSI color codes. Colors are customizable.
29
+ */
28
30
  colors?: boolean | undefined;
31
+ /**
32
+ * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked.
33
+ * @default true
34
+ */
29
35
  customInspect?: boolean | undefined;
36
+ /**
37
+ * If `true`, `Proxy` inspection includes the target and handler objects.
38
+ * @default false
39
+ */
30
40
  showProxy?: boolean | undefined;
41
+ /**
42
+ * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements
43
+ * to include when formatting. Set to `null` or `Infinity` to show all elements.
44
+ * Set to `0` or negative to show no elements.
45
+ * @default 100
46
+ */
31
47
  maxArrayLength?: number | null | undefined;
32
48
  /**
33
49
  * Specifies the maximum number of characters to
@@ -36,6 +52,12 @@ declare module 'util' {
36
52
  * @default 10000
37
53
  */
38
54
  maxStringLength?: number | null | undefined;
55
+ /**
56
+ * The length at which input values are split across multiple lines.
57
+ * Set to `Infinity` to format the input as a single line
58
+ * (in combination with `compact` set to `true` or any number >= `1`).
59
+ * @default 80
60
+ */
39
61
  breakLength?: number | undefined;
40
62
  /**
41
63
  * Setting this to `false` causes each object key
@@ -45,13 +67,33 @@ declare module 'util' {
45
67
  * `breakLength`. Short array elements are also grouped together. Note that no
46
68
  * text will be reduced below 16 characters, no matter the `breakLength` size.
47
69
  * For more information, see the example below.
48
- * @default `true`
70
+ * @default true
49
71
  */
50
72
  compact?: boolean | number | undefined;
73
+ /**
74
+ * If set to `true` or a function, all properties of an object, and `Set` and `Map`
75
+ * entries are sorted in the resulting string.
76
+ * If set to `true` the default sort is used.
77
+ * If set to a function, it is used as a compare function.
78
+ */
51
79
  sorted?: boolean | ((a: string, b: string) => number) | undefined;
80
+ /**
81
+ * If set to `true`, getters are going to be
82
+ * inspected as well. If set to `'get'` only getters without setter are going
83
+ * to be inspected. If set to `'set'` only getters having a corresponding
84
+ * setter are going to be inspected. This might cause side effects depending on
85
+ * the getter function.
86
+ * @default false
87
+ */
88
+ getters?: 'get' | 'set' | boolean | undefined;
89
+ /**
90
+ * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers.
91
+ * @default false
92
+ */
93
+ numericSeparator?: boolean | undefined;
52
94
  }
53
95
  export type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
54
- export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
96
+ export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => any; // TODO: , inspect: inspect
55
97
  export interface InspectOptionsStylized extends InspectOptions {
56
98
  stylize(text: string, styleType: Style): string;
57
99
  }
@@ -899,7 +941,7 @@ declare module 'util' {
899
941
  * });
900
942
  * ```
901
943
  * @since v8.2.0
902
- * @param original An `async` function
944
+ * @param fn An `async` function
903
945
  * @return a callback style function
904
946
  */
905
947
  export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
@@ -1198,16 +1240,31 @@ declare module 'util' {
1198
1240
  * - `tokens` Detailed parse information (only if `tokens` was specified).
1199
1241
  *
1200
1242
  */
1201
- export function parseArgs<T extends ParseArgsConfig>(config: T): ParsedResults<T>;
1243
+ export function parseArgs<T extends ParseArgsConfig>(config?: T): ParsedResults<T>;
1202
1244
 
1203
1245
  interface ParseArgsOptionConfig {
1246
+ /**
1247
+ * Type of argument.
1248
+ */
1204
1249
  type: 'string' | 'boolean';
1205
- short?: string;
1206
- multiple?: boolean;
1207
1250
  /**
1251
+ * Whether this option can be provided multiple times.
1252
+ * If `true`, all values will be collected in an array.
1253
+ * If `false`, values for the option are last-wins.
1254
+ * @default false.
1255
+ */
1256
+ multiple?: boolean | undefined;
1257
+ /**
1258
+ * A single character alias for the option.
1259
+ */
1260
+ short?: string | undefined;
1261
+ /**
1262
+ * The default option value when it is not set by args.
1263
+ * It must be of the same type as the the `type` property.
1264
+ * When `multiple` is `true`, it must be an array.
1208
1265
  * @since v18.11.0
1209
1266
  */
1210
- default?: string | boolean | string[] | boolean[];
1267
+ default?: string | boolean | string[] | boolean[] | undefined;
1211
1268
  }
1212
1269
 
1213
1270
  interface ParseArgsOptionsConfig {
@@ -1215,11 +1272,30 @@ declare module 'util' {
1215
1272
  }
1216
1273
 
1217
1274
  export interface ParseArgsConfig {
1218
- strict?: boolean;
1219
- allowPositionals?: boolean;
1220
- tokens?: boolean;
1221
- options?: ParseArgsOptionsConfig;
1222
- args?: string[];
1275
+ /**
1276
+ * Array of argument strings.
1277
+ */
1278
+ args?: string[] | undefined;
1279
+ /**
1280
+ * Used to describe arguments known to the parser.
1281
+ */
1282
+ options?: ParseArgsOptionsConfig | undefined;
1283
+ /**
1284
+ * Should an error be thrown when unknown arguments are encountered,
1285
+ * or when arguments are passed that do not match the `type` configured in `options`.
1286
+ * @default true
1287
+ */
1288
+ strict?: boolean | undefined;
1289
+ /**
1290
+ * Whether this command accepts positional arguments.
1291
+ */
1292
+ allowPositionals?: boolean | undefined;
1293
+ /**
1294
+ * Return the parsed tokens. This is useful for extending the built-in behavior,
1295
+ * from adding additional checks through to reprocessing the tokens in different ways.
1296
+ * @default false
1297
+ */
1298
+ tokens?: boolean | undefined;
1223
1299
  }
1224
1300
 
1225
1301
  /*