cdk-common 2.0.1168 → 2.0.1170

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 (41) hide show
  1. package/.jsii +2 -2
  2. package/lib/main.js +1 -1
  3. package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +2 -2
  4. package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +7 -48
  5. package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +0 -2
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.buffer.d.ts +1 -0
  7. package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +8 -9
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +3 -9
  9. package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +3 -4
  10. package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +36 -0
  11. package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +25 -0
  12. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +7 -2
  13. package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +22 -0
  14. package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +6 -1
  15. package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +36 -13
  16. package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +54 -6
  17. package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +25 -0
  18. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -0
  19. package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +207 -88
  20. package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +81 -0
  21. package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +167 -36
  22. package/node_modules/@types/form-data/node_modules/@types/node/README.md +2 -2
  23. package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +7 -48
  24. package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +0 -2
  25. package/node_modules/@types/form-data/node_modules/@types/node/buffer.buffer.d.ts +1 -0
  26. package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +8 -9
  27. package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +3 -9
  28. package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +3 -4
  29. package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +36 -0
  30. package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +25 -0
  31. package/node_modules/@types/form-data/node_modules/@types/node/package.json +7 -2
  32. package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +22 -0
  33. package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +6 -1
  34. package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +36 -13
  35. package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +54 -6
  36. package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +25 -0
  37. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -0
  38. package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +207 -88
  39. package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +81 -0
  40. package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +167 -36
  41. package/package.json +1 -1
@@ -1938,6 +1938,28 @@ declare module "process" {
1938
1938
  * @param maybeRefable An object that may be "unref'd".
1939
1939
  */
1940
1940
  unref(maybeRefable: any): void;
1941
+ /**
1942
+ * Replaces the current process with a new process.
1943
+ *
1944
+ * This is achieved by using the `execve` POSIX function and therefore no memory or other
1945
+ * resources from the current process are preserved, except for the standard input,
1946
+ * standard output and standard error file descriptor.
1947
+ *
1948
+ * All other resources are discarded by the system when the processes are swapped, without triggering
1949
+ * any exit or close events and without running any cleanup handler.
1950
+ *
1951
+ * This function will never return, unless an error occurred.
1952
+ *
1953
+ * This function is not available on Windows or IBM i.
1954
+ * @since v22.15.0
1955
+ * @experimental
1956
+ * @param file The name or path of the executable file to run.
1957
+ * @param args List of string arguments. No argument can contain a null-byte (`\u0000`).
1958
+ * @param env Environment key-value pairs.
1959
+ * No key or value can contain a null-byte (`\u0000`).
1960
+ * **Default:** `process.env`.
1961
+ */
1962
+ execve?(file: string, args?: readonly string[], env?: ProcessEnv): never;
1941
1963
  /* EventEmitter */
1942
1964
  addListener(event: "beforeExit", listener: BeforeExitListener): this;
1943
1965
  addListener(event: "disconnect", listener: DisconnectListener): this;
@@ -51,7 +51,7 @@ declare module "readline" {
51
51
  * and is read from, the `input` stream.
52
52
  * @since v0.1.104
53
53
  */
54
- export class Interface extends EventEmitter {
54
+ export class Interface extends EventEmitter implements Disposable {
55
55
  readonly terminal: boolean;
56
56
  /**
57
57
  * The current input data being processed by node.
@@ -208,6 +208,11 @@ declare module "readline" {
208
208
  * @since v0.1.98
209
209
  */
210
210
  close(): void;
211
+ /**
212
+ * Alias for `rl.close()`.
213
+ * @since v22.15.0
214
+ */
215
+ [Symbol.dispose](): void;
211
216
  /**
212
217
  * The `rl.write()` method will write either `data` or a key sequence identified
213
218
  * by `key` to the `output`. The `key` argument is supported only if `output` is
@@ -158,9 +158,10 @@ declare module "node:sqlite" {
158
158
  */
159
159
  useBigIntArguments?: boolean | undefined;
160
160
  /**
161
- * If `true`, `function` can accept a variable number of
162
- * arguments. If `false`, `function` must be invoked with exactly
163
- * `function.length` arguments.
161
+ * If `true`, `function` may be invoked with any number of
162
+ * arguments (between zero and
163
+ * [`SQLITE_MAX_FUNCTION_ARG`](https://www.sqlite.org/limits.html#max_function_arg)). If `false`,
164
+ * `function` must be invoked with exactly `function.length` arguments.
164
165
  * @default false
165
166
  */
166
167
  varargs?: boolean | undefined;
@@ -170,16 +171,16 @@ declare module "node:sqlite" {
170
171
  * exposed by this class execute synchronously.
171
172
  * @since v22.5.0
172
173
  */
173
- class DatabaseSync {
174
+ class DatabaseSync implements Disposable {
174
175
  /**
175
176
  * Constructs a new `DatabaseSync` instance.
176
- * @param location The location of the database.
177
+ * @param path The path of the database.
177
178
  * A SQLite database can be stored in a file or completely [in memory](https://www.sqlite.org/inmemorydb.html).
178
- * To use a file-backed database, the location should be a file path.
179
- * To use an in-memory database, the location should be the special name `':memory:'`.
179
+ * To use a file-backed database, the path should be a file path.
180
+ * To use an in-memory database, the path should be the special name `':memory:'`.
180
181
  * @param options Configuration options for the database connection.
181
182
  */
182
- constructor(location: string, options?: DatabaseSyncOptions);
183
+ constructor(path: string | Buffer | URL, options?: DatabaseSyncOptions);
183
184
  /**
184
185
  * Closes the database connection. An exception is thrown if the database is not
185
186
  * open. This method is a wrapper around [`sqlite3_close_v2()`](https://www.sqlite.org/c3ref/close.html).
@@ -217,16 +218,24 @@ declare module "node:sqlite" {
217
218
  * @param name The name of the SQLite function to create.
218
219
  * @param options Optional configuration settings for the function.
219
220
  * @param func The JavaScript function to call when the SQLite
220
- * function is invoked.
221
+ * function is invoked. The return value of this function should be a valid
222
+ * SQLite data type: see
223
+ * [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v22.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite).
224
+ * The result defaults to `NULL` if the return value is `undefined`.
221
225
  */
222
226
  function(
223
227
  name: string,
224
228
  options: FunctionOptions,
225
- func: (...args: SupportedValueType[]) => SupportedValueType,
229
+ func: (...args: SQLOutputValue[]) => SQLInputValue,
226
230
  ): void;
227
- function(name: string, func: (...args: SupportedValueType[]) => SupportedValueType): void;
231
+ function(name: string, func: (...args: SQLOutputValue[]) => SQLInputValue): void;
228
232
  /**
229
- * Opens the database specified in the `location` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via
233
+ * Whether the database is currently open or not.
234
+ * @since v22.15.0
235
+ */
236
+ readonly isOpen: boolean;
237
+ /**
238
+ * Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via
230
239
  * the constructor. An exception is thrown if the database is already open.
231
240
  * @since v22.5.0
232
241
  */
@@ -272,10 +281,17 @@ declare module "node:sqlite" {
272
281
  * ```
273
282
  * @param changeset A binary changeset or patchset.
274
283
  * @param options The configuration options for how the changes will be applied.
275
- * @returns Whether the changeset was applied succesfully without being aborted.
284
+ * @returns Whether the changeset was applied successfully without being aborted.
276
285
  * @since v22.12.0
277
286
  */
278
287
  applyChangeset(changeset: Uint8Array, options?: ApplyChangesetOptions): boolean;
288
+ /**
289
+ * Closes the database connection. If the database connection is already closed
290
+ * then this is a no-op.
291
+ * @since v22.15.0
292
+ * @experimental
293
+ */
294
+ [Symbol.dispose](): void;
279
295
  }
280
296
  /**
281
297
  * @since v22.12.0
@@ -424,6 +440,13 @@ declare module "node:sqlite" {
424
440
  * @param enabled Enables or disables support for binding named parameters without the prefix character.
425
441
  */
426
442
  setAllowBareNamedParameters(enabled: boolean): void;
443
+ /**
444
+ * By default, if an unknown name is encountered while binding parameters, an
445
+ * exception is thrown. This method allows unknown named parameters to be ignored.
446
+ * @since v22.15.0
447
+ * @param enabled Enables or disables support for unknown named parameters.
448
+ */
449
+ setAllowUnknownNamedParameters(enabled: boolean): void;
427
450
  /**
428
451
  * When reading from the database, SQLite `INTEGER`s are mapped to JavaScript
429
452
  * numbers by default. However, SQLite `INTEGER`s can store values larger than
@@ -648,11 +648,12 @@ declare module "node:test" {
648
648
  */
649
649
  readonly name: string;
650
650
  /**
651
- * Used to set the number of assertions and subtests that are expected to run within the test.
652
- * If the number of assertions and subtests that run does not match the expected count, the test will fail.
651
+ * This function is used to set the number of assertions and subtests that are expected to run
652
+ * within the test. If the number of assertions and subtests that run does not match the
653
+ * expected count, the test will fail.
654
+ *
655
+ * > Note: To make sure assertions are tracked, `t.assert` must be used instead of `assert` directly.
653
656
  *
654
- * To make sure assertions are tracked, the assert functions on `context.assert` must be used,
655
- * instead of importing from the `node:assert` module.
656
657
  * ```js
657
658
  * test('top level test', (t) => {
658
659
  * t.plan(2);
@@ -661,7 +662,9 @@ declare module "node:test" {
661
662
  * });
662
663
  * ```
663
664
  *
664
- * When working with asynchronous code, the `plan` function can be used to ensure that the correct number of assertions are run:
665
+ * When working with asynchronous code, the `plan` function can be used to ensure that the
666
+ * correct number of assertions are run:
667
+ *
665
668
  * ```js
666
669
  * test('planning with streams', (t, done) => {
667
670
  * function* generate() {
@@ -675,14 +678,35 @@ declare module "node:test" {
675
678
  * stream.on('data', (chunk) => {
676
679
  * t.assert.strictEqual(chunk, expected.shift());
677
680
  * });
681
+ *
678
682
  * stream.on('end', () => {
679
683
  * done();
680
684
  * });
681
685
  * });
682
686
  * ```
687
+ *
688
+ * When using the `wait` option, you can control how long the test will wait for the expected assertions.
689
+ * For example, setting a maximum wait time ensures that the test will wait for asynchronous assertions
690
+ * to complete within the specified timeframe:
691
+ *
692
+ * ```js
693
+ * test('plan with wait: 2000 waits for async assertions', (t) => {
694
+ * t.plan(1, { wait: 2000 }); // Waits for up to 2 seconds for the assertion to complete.
695
+ *
696
+ * const asyncActivity = () => {
697
+ * setTimeout(() => {
698
+ * * t.assert.ok(true, 'Async assertion completed within the wait time');
699
+ * }, 1000); // Completes after 1 second, within the 2-second wait time.
700
+ * };
701
+ *
702
+ * asyncActivity(); // The test will pass because the assertion is completed in time.
703
+ * });
704
+ * ```
705
+ *
706
+ * Note: If a `wait` timeout is specified, it begins counting down only after the test function finishes executing.
683
707
  * @since v22.2.0
684
708
  */
685
- plan(count: number): void;
709
+ plan(count: number, options?: TestContextPlanOptions): void;
686
710
  /**
687
711
  * If `shouldRunOnlyTests` is truthy, the test context will only run tests that
688
712
  * have the `only` option set. Otherwise, all tests are run. If Node.js was not
@@ -858,6 +882,20 @@ declare module "node:test" {
858
882
  */
859
883
  serializers?: ReadonlyArray<(value: any) => any> | undefined;
860
884
  }
885
+ interface TestContextPlanOptions {
886
+ /**
887
+ * The wait time for the plan:
888
+ * * If `true`, the plan waits indefinitely for all assertions and subtests to run.
889
+ * * If `false`, the plan performs an immediate check after the test function completes,
890
+ * without waiting for any pending assertions or subtests.
891
+ * Any assertions or subtests that complete after this check will not be counted towards the plan.
892
+ * * If a number, it specifies the maximum wait time in milliseconds
893
+ * before timing out while waiting for expected assertions and subtests to be matched.
894
+ * If the timeout is reached, the test will fail.
895
+ * @default false
896
+ */
897
+ wait?: boolean | number | undefined;
898
+ }
861
899
  interface TestContextWaitForOptions {
862
900
  /**
863
901
  * The number of milliseconds to wait after an unsuccessful
@@ -1971,6 +2009,11 @@ interface TestDequeue extends TestLocationInfo {
1971
2009
  * The nesting level of the test.
1972
2010
  */
1973
2011
  nesting: number;
2012
+ /**
2013
+ * The test type. Either `'suite'` or `'test'`.
2014
+ * @since v22.15.0
2015
+ */
2016
+ type: "suite" | "test";
1974
2017
  }
1975
2018
  interface TestEnqueue extends TestLocationInfo {
1976
2019
  /**
@@ -1981,6 +2024,11 @@ interface TestEnqueue extends TestLocationInfo {
1981
2024
  * The nesting level of the test.
1982
2025
  */
1983
2026
  nesting: number;
2027
+ /**
2028
+ * The test type. Either `'suite'` or `'test'`.
2029
+ * @since v22.15.0
2030
+ */
2031
+ type: "suite" | "test";
1984
2032
  }
1985
2033
  interface TestFail extends TestLocationInfo {
1986
2034
  /**
@@ -1158,6 +1158,31 @@ declare module "tls" {
1158
1158
  * @since v0.11.13
1159
1159
  */
1160
1160
  function createSecureContext(options?: SecureContextOptions): SecureContext;
1161
+ /**
1162
+ * Returns an array containing the CA certificates from various sources, depending on `type`:
1163
+ *
1164
+ * * `"default"`: return the CA certificates that will be used by the Node.js TLS clients by default.
1165
+ * * When `--use-bundled-ca` is enabled (default), or `--use-openssl-ca` is not enabled,
1166
+ * this would include CA certificates from the bundled Mozilla CA store.
1167
+ * * When `--use-system-ca` is enabled, this would also include certificates from the system's
1168
+ * trusted store.
1169
+ * * When `NODE_EXTRA_CA_CERTS` is used, this would also include certificates loaded from the specified
1170
+ * file.
1171
+ * * `"system"`: return the CA certificates that are loaded from the system's trusted store, according
1172
+ * to rules set by `--use-system-ca`. This can be used to get the certificates from the system
1173
+ * when `--use-system-ca` is not enabled.
1174
+ * * `"bundled"`: return the CA certificates from the bundled Mozilla CA store. This would be the same
1175
+ * as `tls.rootCertificates`.
1176
+ * * `"extra"`: return the CA certificates loaded from `NODE_EXTRA_CA_CERTS`. It's an empty array if
1177
+ * `NODE_EXTRA_CA_CERTS` is not set.
1178
+ * @since v22.15.0
1179
+ * @param type The type of CA certificates that will be returned. Valid values
1180
+ * are `"default"`, `"system"`, `"bundled"` and `"extra"`.
1181
+ * **Default:** `"default"`.
1182
+ * @returns An array of PEM-encoded certificates. The array may contain duplicates
1183
+ * if the same certificate is repeatedly stored in multiple sources.
1184
+ */
1185
+ function getCACertificates(type?: "default" | "system" | "bundled" | "extra"): string[];
1161
1186
  /**
1162
1187
  * Returns an array with the names of the supported TLS ciphers. The names are
1163
1188
  * lower-case for historical reasons, but must be uppercased to be used in
@@ -158,6 +158,7 @@ declare module "buffer" {
158
158
  * @param encoding The encoding of `string`. **Default:** `'utf8'`.
159
159
  */
160
160
  from(string: WithImplicitCoercion<string>, encoding?: BufferEncoding): Buffer;
161
+ from(arrayOrString: WithImplicitCoercion<ArrayLike<number> | string>): Buffer;
161
162
  /**
162
163
  * Creates a new Buffer using the passed {data}
163
164
  * @param values to create a new Buffer