cdk-common 2.0.630 → 2.0.632

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 (43) 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 +1 -1
  4. package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +2 -1
  5. package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +1 -1
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/index.d.ts +1 -1
  7. package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +11 -11
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +19 -0
  9. package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +1 -1
  10. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
  11. package/node_modules/@types/concat-stream/node_modules/@types/node/stream/web.d.ts +14 -0
  12. package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +11 -1
  13. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/buffer.d.ts +3 -2
  14. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/crypto.d.ts +1 -1
  15. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/module.d.ts +39 -11
  16. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/net.d.ts +31 -0
  17. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/os.d.ts +1 -1
  18. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/stream/web.d.ts +14 -0
  19. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/stream.d.ts +164 -0
  20. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/test.d.ts +28 -3
  21. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/util.d.ts +11 -3
  22. package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +11 -3
  23. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  24. package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +2 -1
  25. package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +1 -1
  26. package/node_modules/@types/form-data/node_modules/@types/node/index.d.ts +1 -1
  27. package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +11 -11
  28. package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +19 -0
  29. package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +1 -1
  30. package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
  31. package/node_modules/@types/form-data/node_modules/@types/node/stream/web.d.ts +14 -0
  32. package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +11 -1
  33. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/buffer.d.ts +3 -2
  34. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/crypto.d.ts +1 -1
  35. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/module.d.ts +39 -11
  36. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/net.d.ts +31 -0
  37. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/os.d.ts +1 -1
  38. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/stream/web.d.ts +14 -0
  39. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/stream.d.ts +164 -0
  40. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/test.d.ts +28 -3
  41. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/util.d.ts +11 -3
  42. package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +11 -3
  43. package/package.json +2 -2
@@ -40,6 +40,12 @@ declare module "stream" {
40
40
  import Stream = internal.Stream;
41
41
  import Readable = internal.Readable;
42
42
  import ReadableOptions = internal.ReadableOptions;
43
+ interface ArrayOptions {
44
+ /** the maximum concurrent invocations of `fn` to call on the stream at once. **Default: 1**. */
45
+ concurrency?: number;
46
+ /** allows destroying the stream if the signal is aborted. */
47
+ signal?: AbortSignal;
48
+ }
43
49
  class ReadableBase extends Stream implements NodeJS.ReadableStream {
44
50
  /**
45
51
  * A utility method for creating Readable Streams out of iterators.
@@ -399,6 +405,164 @@ declare module "stream" {
399
405
  */
400
406
  wrap(stream: NodeJS.ReadableStream): this;
401
407
  push(chunk: any, encoding?: BufferEncoding): boolean;
408
+ /**
409
+ * The iterator created by this method gives users the option to cancel the destruction
410
+ * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`,
411
+ * or if the iterator should destroy the stream if the stream emitted an error during iteration.
412
+ * @since v16.3.0
413
+ * @param options.destroyOnReturn When set to `false`, calling `return` on the async iterator,
414
+ * or exiting a `for await...of` iteration using a `break`, `return`, or `throw` will not destroy the stream.
415
+ * **Default: `true`**.
416
+ */
417
+ iterator(options?: { destroyOnReturn?: boolean }): AsyncIterableIterator<any>;
418
+ /**
419
+ * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream.
420
+ * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream.
421
+ * @since v17.4.0, v16.14.0
422
+ * @param fn a function to map over every chunk in the stream. Async or not.
423
+ * @returns a stream mapped with the function *fn*.
424
+ */
425
+ map(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => any, options?: ArrayOptions): Readable;
426
+ /**
427
+ * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called
428
+ * and if it returns a truthy value, the chunk will be passed to the result stream.
429
+ * If the *fn* function returns a promise - that promise will be `await`ed.
430
+ * @since v17.4.0, v16.14.0
431
+ * @param fn a function to filter chunks from the stream. Async or not.
432
+ * @returns a stream filtered with the predicate *fn*.
433
+ */
434
+ filter(
435
+ fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
436
+ options?: ArrayOptions,
437
+ ): Readable;
438
+ /**
439
+ * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called.
440
+ * If the *fn* function returns a promise - that promise will be `await`ed.
441
+ *
442
+ * This method is different from `for await...of` loops in that it can optionally process chunks concurrently.
443
+ * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option
444
+ * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`.
445
+ * In either case the stream will be destroyed.
446
+ *
447
+ * This method is different from listening to the `'data'` event in that it uses the `readable` event
448
+ * in the underlying machinary and can limit the number of concurrent *fn* calls.
449
+ * @since v17.5.0
450
+ * @param fn a function to call on each chunk of the stream. Async or not.
451
+ * @returns a promise for when the stream has finished.
452
+ */
453
+ forEach(
454
+ fn: (data: any, options?: Pick<ArrayOptions, "signal">) => void | Promise<void>,
455
+ options?: ArrayOptions,
456
+ ): Promise<void>;
457
+ /**
458
+ * This method allows easily obtaining the contents of a stream.
459
+ *
460
+ * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended
461
+ * for interoperability and convenience, not as the primary way to consume streams.
462
+ * @since v17.5.0
463
+ * @returns a promise containing an array with the contents of the stream.
464
+ */
465
+ toArray(options?: Pick<ArrayOptions, "signal">): Promise<any[]>;
466
+ /**
467
+ * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream
468
+ * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk
469
+ * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`.
470
+ * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`.
471
+ * @since v17.5.0
472
+ * @param fn a function to call on each chunk of the stream. Async or not.
473
+ * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks.
474
+ */
475
+ some(
476
+ fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
477
+ options?: ArrayOptions,
478
+ ): Promise<boolean>;
479
+ /**
480
+ * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream
481
+ * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy,
482
+ * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value.
483
+ * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`.
484
+ * @since v17.5.0
485
+ * @param fn a function to call on each chunk of the stream. Async or not.
486
+ * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value,
487
+ * or `undefined` if no element was found.
488
+ */
489
+ find<T>(
490
+ fn: (data: any, options?: Pick<ArrayOptions, "signal">) => data is T,
491
+ options?: ArrayOptions,
492
+ ): Promise<T | undefined>;
493
+ find(
494
+ fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
495
+ options?: ArrayOptions,
496
+ ): Promise<any>;
497
+ /**
498
+ * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream
499
+ * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk
500
+ * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`.
501
+ * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`.
502
+ * @since v17.5.0
503
+ * @param fn a function to call on each chunk of the stream. Async or not.
504
+ * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks.
505
+ */
506
+ every(
507
+ fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
508
+ options?: ArrayOptions,
509
+ ): Promise<boolean>;
510
+ /**
511
+ * This method returns a new stream by applying the given callback to each chunk of the stream
512
+ * and then flattening the result.
513
+ *
514
+ * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams
515
+ * will be merged (flattened) into the returned stream.
516
+ * @since v17.5.0
517
+ * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator.
518
+ * @returns a stream flat-mapped with the function *fn*.
519
+ */
520
+ flatMap(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => any, options?: ArrayOptions): Readable;
521
+ /**
522
+ * This method returns a new stream with the first *limit* chunks dropped from the start.
523
+ * @since v17.5.0
524
+ * @param limit the number of chunks to drop from the readable.
525
+ * @returns a stream with *limit* chunks dropped from the start.
526
+ */
527
+ drop(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
528
+ /**
529
+ * This method returns a new stream with the first *limit* chunks.
530
+ * @since v17.5.0
531
+ * @param limit the number of chunks to take from the readable.
532
+ * @returns a stream with *limit* chunks taken.
533
+ */
534
+ take(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
535
+ /**
536
+ * This method returns a new stream with chunks of the underlying stream paired with a counter
537
+ * in the form `[index, chunk]`. The first index value is `0` and it increases by 1 for each chunk produced.
538
+ * @since v17.5.0
539
+ * @returns a stream of indexed pairs.
540
+ */
541
+ asIndexedPairs(options?: Pick<ArrayOptions, "signal">): Readable;
542
+ /**
543
+ * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation
544
+ * on the previous element. It returns a promise for the final value of the reduction.
545
+ *
546
+ * If no *initial* value is supplied the first chunk of the stream is used as the initial value.
547
+ * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property.
548
+ *
549
+ * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter
550
+ * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method.
551
+ * @since v17.5.0
552
+ * @param fn a reducer function to call over every chunk in the stream. Async or not.
553
+ * @param initial the initial value to use in the reduction.
554
+ * @returns a promise for the final value of the reduction.
555
+ */
556
+ reduce<T = any>(
557
+ fn: (previous: any, data: any, options?: Pick<ArrayOptions, "signal">) => T,
558
+ initial?: undefined,
559
+ options?: Pick<ArrayOptions, "signal">,
560
+ ): Promise<T>;
561
+ reduce<T = any>(
562
+ fn: (previous: T, data: any, options?: Pick<ArrayOptions, "signal">) => T,
563
+ initial: T,
564
+ options?: Pick<ArrayOptions, "signal">,
565
+ ): Promise<T>;
402
566
  _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
403
567
  /**
404
568
  * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the readable
@@ -76,7 +76,7 @@
76
76
  *
77
77
  * If any tests fail, the process exit code is set to `1`.
78
78
  * @since v18.0.0, v16.17.0
79
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/test.js)
79
+ * @see [source](https://github.com/nodejs/node/blob/v20.4.0/lib/test.js)
80
80
  */
81
81
  declare module "node:test" {
82
82
  import { Readable } from "node:stream";
@@ -84,7 +84,9 @@ declare module "node:test" {
84
84
  /**
85
85
  * ```js
86
86
  * import { tap } from 'node:test/reporters';
87
+ * import { run } from 'node:test';
87
88
  * import process from 'node:process';
89
+ * import path from 'node:path';
88
90
  *
89
91
  * run({ files: [path.resolve('./tests/test.js')] })
90
92
  * .compose(tap)
@@ -292,6 +294,10 @@ declare module "node:test" {
292
294
  * For each test that is executed, any corresponding test hooks, such as `beforeEach()`, are also run.
293
295
  */
294
296
  testNamePatterns?: string | RegExp | string[] | RegExp[];
297
+ /**
298
+ * If truthy, the test context will only run tests that have the `only` option set
299
+ */
300
+ only?: boolean;
295
301
  /**
296
302
  * A function that accepts the TestsStream instance and can be used to setup listeners before any tests are run.
297
303
  */
@@ -1146,7 +1152,22 @@ declare module "node:test" {
1146
1152
  */
1147
1153
  [Symbol.dispose](): void;
1148
1154
  }
1149
- export { after, afterEach, before, beforeEach, describe, it, mock, only, run, skip, test, test as default, todo, Mock };
1155
+ export {
1156
+ after,
1157
+ afterEach,
1158
+ before,
1159
+ beforeEach,
1160
+ describe,
1161
+ it,
1162
+ Mock,
1163
+ mock,
1164
+ only,
1165
+ run,
1166
+ skip,
1167
+ test,
1168
+ test as default,
1169
+ todo,
1170
+ };
1150
1171
  }
1151
1172
 
1152
1173
  interface TestLocationInfo {
@@ -1353,5 +1374,9 @@ declare module "node:test/reporters" {
1353
1374
  class Spec extends Transform {
1354
1375
  constructor();
1355
1376
  }
1356
- export { dot, Spec as spec, tap, TestEvent };
1377
+ /**
1378
+ * The `junit` reporter outputs test results in a jUnit XML format
1379
+ */
1380
+ function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
1381
+ export { dot, Spec as spec, tap, junit, TestEvent };
1357
1382
  }
@@ -419,8 +419,14 @@ declare module "util" {
419
419
  * const bigNumber = 123_456_789n;
420
420
  * const bigDecimal = 1_234.123_45;
421
421
  *
422
- * console.log(thousand, million, bigNumber, bigDecimal);
423
- * // 1_000 1_000_000 123_456_789n 1_234.123_45
422
+ * console.log(inspect(thousand, { numericSeparator: true }));
423
+ * // 1_000
424
+ * console.log(inspect(million, { numericSeparator: true }));
425
+ * // 1_000_000
426
+ * console.log(inspect(bigNumber, { numericSeparator: true }));
427
+ * // 123_456_789n
428
+ * console.log(inspect(bigDecimal, { numericSeparator: true }));
429
+ * // 1_234.123_45
424
430
  * ```
425
431
  *
426
432
  * `util.inspect()` is a synchronous method intended for debugging. Its maximum
@@ -1087,6 +1093,8 @@ declare module "util" {
1087
1093
  * const stats = await stat('.');
1088
1094
  * console.log(`This directory is owned by ${stats.uid}`);
1089
1095
  * }
1096
+ *
1097
+ * callStat();
1090
1098
  * ```
1091
1099
  *
1092
1100
  * If there is an `original[util.promisify.custom]` property present, `promisify`will return its value, see `Custom promisified functions`.
@@ -1632,7 +1640,7 @@ declare module "util" {
1632
1640
  * params.set('foo', 'def');
1633
1641
  * params.set('baz', 'xyz');
1634
1642
  * console.log(params.toString());
1635
- * // Prints: foo=def&#x26;bar=1&#x26;baz=xyz
1643
+ * // Prints: foo=def;bar=1;baz=xyz
1636
1644
  * ```
1637
1645
  */
1638
1646
  set(name: string, value: string): void;
@@ -419,8 +419,14 @@ declare module "util" {
419
419
  * const bigNumber = 123_456_789n;
420
420
  * const bigDecimal = 1_234.123_45;
421
421
  *
422
- * console.log(thousand, million, bigNumber, bigDecimal);
423
- * // 1_000 1_000_000 123_456_789n 1_234.123_45
422
+ * console.log(inspect(thousand, { numericSeparator: true }));
423
+ * // 1_000
424
+ * console.log(inspect(million, { numericSeparator: true }));
425
+ * // 1_000_000
426
+ * console.log(inspect(bigNumber, { numericSeparator: true }));
427
+ * // 123_456_789n
428
+ * console.log(inspect(bigDecimal, { numericSeparator: true }));
429
+ * // 1_234.123_45
424
430
  * ```
425
431
  *
426
432
  * `util.inspect()` is a synchronous method intended for debugging. Its maximum
@@ -1087,6 +1093,8 @@ declare module "util" {
1087
1093
  * const stats = await stat('.');
1088
1094
  * console.log(`This directory is owned by ${stats.uid}`);
1089
1095
  * }
1096
+ *
1097
+ * callStat();
1090
1098
  * ```
1091
1099
  *
1092
1100
  * If there is an `original[util.promisify.custom]` property present, `promisify`will return its value, see `Custom promisified functions`.
@@ -1632,7 +1640,7 @@ declare module "util" {
1632
1640
  * params.set('foo', 'def');
1633
1641
  * params.set('baz', 'xyz');
1634
1642
  * console.log(params.toString());
1635
- * // Prints: foo=def&#x26;bar=1&#x26;baz=xyz
1643
+ * // Prints: foo=def;bar=1;baz=xyz
1636
1644
  * ```
1637
1645
  */
1638
1646
  set(name: string, value: string): void;
package/package.json CHANGED
@@ -55,7 +55,7 @@
55
55
  "jsii-pacmak": "^1.89.0",
56
56
  "jsii-rosetta": "1.x",
57
57
  "npm-check-updates": "^16",
58
- "projen": "0.73.36",
58
+ "projen": "0.73.37",
59
59
  "standard-version": "^9",
60
60
  "ts-jest": "^27",
61
61
  "typescript": "^4.9"
@@ -87,7 +87,7 @@
87
87
  ],
88
88
  "main": "lib/index.js",
89
89
  "license": "Apache-2.0",
90
- "version": "2.0.630",
90
+ "version": "2.0.632",
91
91
  "jest": {
92
92
  "testMatch": [
93
93
  "<rootDir>/src/**/__tests__/**/*.ts?(x)",