cdk-common 2.0.352 → 2.0.353

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.
package/.jsii CHANGED
@@ -9199,6 +9199,6 @@
9199
9199
  "symbolId": "src/main:LambdaArmFunctionProps"
9200
9200
  }
9201
9201
  },
9202
- "version": "2.0.352",
9203
- "fingerprint": "keeZ6uIp1p4jmeJf9eUL0ys5Yub0+j/xaBCFcGiItaA="
9202
+ "version": "2.0.353",
9203
+ "fingerprint": "CZFl1SmCJU3hnPXgOq25oG96aEdiKc2g9A/YpQi6BbI="
9204
9204
  }
package/lib/main.js CHANGED
@@ -41,5 +41,5 @@ class LambdaArmFunction extends constructs_1.Construct {
41
41
  }
42
42
  exports.LambdaArmFunction = LambdaArmFunction;
43
43
  _a = JSII_RTTI_SYMBOL_1;
44
- LambdaArmFunction[_a] = { fqn: "cdk-common.LambdaArmFunction", version: "2.0.352" };
44
+ LambdaArmFunction[_a] = { fqn: "cdk-common.LambdaArmFunction", version: "2.0.353" };
45
45
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9tYWluLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsbUNBQW1DO0FBQ25DLGlEQUFpRDtBQUNqRCwyQ0FBdUM7QUFLdkMsTUFBYSxpQkFBa0IsU0FBUSxzQkFBUztJQUU5QyxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLEtBQTRCO1FBQ3BFLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFFakIsSUFBSSxLQUFLLENBQUMsT0FBTyxLQUFLLE1BQU0sQ0FBQyxPQUFPLENBQUMsV0FBVyxFQUFFO1lBQ2hELEdBQUcsQ0FBQyxXQUFXLENBQUMsRUFBRSxDQUFDLElBQU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HJvcHMgfSk7XG4gIH1cbn0iXX0=
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 16 Dec 2022 20:33:08 GMT
11
+ * Last updated: Sat, 17 Dec 2022 20:33:03 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.11.16",
3
+ "version": "18.11.17",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -232,6 +232,6 @@
232
232
  },
233
233
  "scripts": {},
234
234
  "dependencies": {},
235
- "typesPublisherContentHash": "2a5d551168a90d2077c306901d1ee122f0d48cf895930b3d91f2bbbaa619fed1",
235
+ "typesPublisherContentHash": "2d88944144b47057ed775becb8763772da81db335f442b6aafc1eb4b61e8d915",
236
236
  "typeScriptVersion": "4.2"
237
237
  }
@@ -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 };
@@ -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 };