cdk-ecr-deployment 3.0.126 → 3.0.128

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 (24) hide show
  1. package/.jsii +2 -2
  2. package/lib/index.js +3 -3
  3. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  4. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +91 -0
  5. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +3 -3
  6. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +24 -0
  7. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +17 -5
  8. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +81 -27
  9. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +1 -1
  10. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  11. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +91 -0
  12. package/node_modules/@types/keyv/node_modules/@types/node/package.json +3 -3
  13. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +24 -0
  14. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +17 -5
  15. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +81 -27
  16. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +1 -1
  17. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  18. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +91 -0
  19. package/node_modules/@types/responselike/node_modules/@types/node/package.json +3 -3
  20. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +24 -0
  21. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +17 -5
  22. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +81 -27
  23. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +1 -1
  24. package/package.json +1 -1
@@ -230,16 +230,23 @@ declare module "vm" {
230
230
  */
231
231
  runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any;
232
232
  /**
233
- * First contextifies the given `contextObject`, runs the compiled code contained
234
- * by the `vm.Script` object within the created context, and returns the result.
235
- * Running code does not have access to local scope.
233
+ * This method is a shortcut to `script.runInContext(vm.createContext(options), options)`.
234
+ * It does several things at once:
235
+ *
236
+ * 1. Creates a new context.
237
+ * 2. If `contextObject` is an object, contextifies it with the new context.
238
+ * If `contextObject` is undefined, creates a new object and contextifies it.
239
+ * If `contextObject` is `vm.constants.DONT_CONTEXTIFY`, don't contextify anything.
240
+ * 3. Runs the compiled code contained by the `vm.Script` object within the created context. The code
241
+ * does not have access to the scope in which this method is called.
242
+ * 4. Returns the result.
236
243
  *
237
244
  * The following example compiles code that sets a global variable, then executes
238
245
  * the code multiple times in different contexts. The globals are set on and
239
246
  * contained within each individual `context`.
240
247
  *
241
248
  * ```js
242
- * import vm from 'node:vm';
249
+ * const vm = require('node:vm');
243
250
  *
244
251
  * const script = new vm.Script('globalVar = "set"');
245
252
  *
@@ -250,12 +257,22 @@ declare module "vm" {
250
257
  *
251
258
  * console.log(contexts);
252
259
  * // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }]
260
+ *
261
+ * // This would throw if the context is created from a contextified object.
262
+ * // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary
263
+ * // global objects that can be frozen.
264
+ * const freezeScript = new vm.Script('Object.freeze(globalThis); globalThis;');
265
+ * const frozenContext = freezeScript.runInNewContext(vm.constants.DONT_CONTEXTIFY);
253
266
  * ```
254
267
  * @since v0.3.1
255
- * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
268
+ * @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
269
+ * If `undefined`, an empty contextified object will be created for backwards compatibility.
256
270
  * @return the result of the very last statement executed in the script.
257
271
  */
258
- runInNewContext(contextObject?: Context, options?: RunningScriptInNewContextOptions): any;
272
+ runInNewContext(
273
+ contextObject?: Context | typeof constants.DONT_CONTEXTIFY,
274
+ options?: RunningScriptInNewContextOptions,
275
+ ): any;
259
276
  /**
260
277
  * Runs the compiled code contained by the `vm.Script` within the context of the
261
278
  * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
@@ -347,17 +364,17 @@ declare module "vm" {
347
364
  sourceMapURL?: string | undefined;
348
365
  }
349
366
  /**
350
- * If given a `contextObject`, the `vm.createContext()` method will
367
+ * If the given `contextObject` is an object, the `vm.createContext()` method will
351
368
  * [prepare that object](https://nodejs.org/docs/latest-v22.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
352
- * and return a reference to it so that it can be used in `{@link runInContext}` or
353
- * [`script.runInContext()`](https://nodejs.org/docs/latest-v22.x/api/vm.html#scriptrunincontextcontextifiedobject-options). Inside such
354
- * scripts, the `contextObject` will be the global object, retaining all of its
355
- * existing properties but also having the built-in objects and functions any
356
- * standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
369
+ * and return a reference to it so that it can be used in calls to {@link runInContext} or
370
+ * [`script.runInContext()`](https://nodejs.org/docs/latest-v22.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
371
+ * Inside such scripts, the global object will be wrapped by the `contextObject`, retaining all of its
372
+ * existing properties but also having the built-in objects and functions any standard
373
+ * [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
357
374
  * variables will remain unchanged.
358
375
  *
359
376
  * ```js
360
- * import vm from 'node:vm';
377
+ * const vm = require('node:vm');
361
378
  *
362
379
  * global.globalVar = 3;
363
380
  *
@@ -374,7 +391,12 @@ declare module "vm" {
374
391
  * ```
375
392
  *
376
393
  * If `contextObject` is omitted (or passed explicitly as `undefined`), a new,
377
- * empty `contextified` object will be returned.
394
+ * empty contextified object will be returned.
395
+ *
396
+ * When the global object in the newly created context is contextified, it has some quirks
397
+ * compared to ordinary global objects. For example, it cannot be frozen. To create a context
398
+ * without the contextifying quirks, pass `vm.constants.DONT_CONTEXTIFY` as the `contextObject`
399
+ * argument. See the documentation of `vm.constants.DONT_CONTEXTIFY` for details.
378
400
  *
379
401
  * The `vm.createContext()` method is primarily useful for creating a single
380
402
  * context that can be used to run multiple scripts. For instance, if emulating a
@@ -385,11 +407,17 @@ declare module "vm" {
385
407
  * The provided `name` and `origin` of the context are made visible through the
386
408
  * Inspector API.
387
409
  * @since v0.3.1
410
+ * @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
411
+ * If `undefined`, an empty contextified object will be created for backwards compatibility.
388
412
  * @return contextified object.
389
413
  */
390
- function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
414
+ function createContext(
415
+ contextObject?: Context | typeof constants.DONT_CONTEXTIFY,
416
+ options?: CreateContextOptions,
417
+ ): Context;
391
418
  /**
392
- * Returns `true` if the given `object` object has been `contextified` using {@link createContext}.
419
+ * Returns `true` if the given `object` object has been contextified using {@link createContext},
420
+ * or if it's the global object of a context created using `vm.constants.DONT_CONTEXTIFY`.
393
421
  * @since v0.11.7
394
422
  */
395
423
  function isContext(sandbox: Context): boolean;
@@ -422,18 +450,26 @@ declare module "vm" {
422
450
  */
423
451
  function runInContext(code: string, contextifiedObject: Context, options?: RunningCodeOptions | string): any;
424
452
  /**
425
- * The `vm.runInNewContext()` first contextifies the given `contextObject` (or
426
- * creates a new `contextObject` if passed as `undefined`), compiles the `code`,
427
- * runs it within the created context, then returns the result. Running code
428
- * does not have access to the local scope.
429
- *
453
+ * This method is a shortcut to
454
+ * `(new vm.Script(code, options)).runInContext(vm.createContext(options), options)`.
430
455
  * If `options` is a string, then it specifies the filename.
431
456
  *
457
+ * It does several things at once:
458
+ *
459
+ * 1. Creates a new context.
460
+ * 2. If `contextObject` is an object, contextifies it with the new context.
461
+ * If `contextObject` is undefined, creates a new object and contextifies it.
462
+ * If `contextObject` is `vm.constants.DONT_CONTEXTIFY`, don't contextify anything.
463
+ * 3. Compiles the code as a`vm.Script`
464
+ * 4. Runs the compield code within the created context. The code does not have access to the scope in
465
+ * which this method is called.
466
+ * 5. Returns the result.
467
+ *
432
468
  * The following example compiles and executes code that increments a global
433
469
  * variable and sets a new one. These globals are contained in the `contextObject`.
434
470
  *
435
471
  * ```js
436
- * import vm from 'node:vm';
472
+ * const vm = require('node:vm');
437
473
  *
438
474
  * const contextObject = {
439
475
  * animal: 'cat',
@@ -443,15 +479,21 @@ declare module "vm" {
443
479
  * vm.runInNewContext('count += 1; name = "kitty"', contextObject);
444
480
  * console.log(contextObject);
445
481
  * // Prints: { animal: 'cat', count: 3, name: 'kitty' }
482
+ *
483
+ * // This would throw if the context is created from a contextified object.
484
+ * // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary global objects that
485
+ * // can be frozen.
486
+ * const frozenContext = vm.runInNewContext('Object.freeze(globalThis); globalThis;', vm.constants.DONT_CONTEXTIFY);
446
487
  * ```
447
488
  * @since v0.3.1
448
489
  * @param code The JavaScript code to compile and run.
449
- * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
490
+ * @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
491
+ * If `undefined`, an empty contextified object will be created for backwards compatibility.
450
492
  * @return the result of the very last statement executed in the script.
451
493
  */
452
494
  function runInNewContext(
453
495
  code: string,
454
- contextObject?: Context,
496
+ contextObject?: Context | typeof constants.DONT_CONTEXTIFY,
455
497
  options?: RunningCodeInNewContextOptions | string,
456
498
  ): any;
457
499
  /**
@@ -902,19 +944,31 @@ declare module "vm" {
902
944
  }
903
945
  /**
904
946
  * Returns an object containing commonly used constants for VM operations.
905
- * @since v20.12.0
947
+ * @since v21.7.0, v20.12.0
906
948
  */
907
949
  namespace constants {
908
950
  /**
909
- * Stability: 1.1 - Active development
910
- *
911
951
  * A constant that can be used as the `importModuleDynamically` option to `vm.Script`
912
952
  * and `vm.compileFunction()` so that Node.js uses the default ESM loader from the main
913
953
  * context to load the requested module.
914
954
  *
915
955
  * For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
956
+ * @since v21.7.0, v20.12.0
916
957
  */
917
958
  const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
959
+ /**
960
+ * This constant, when used as the `contextObject` argument in vm APIs, instructs Node.js to create
961
+ * a context without wrapping its global object with another object in a Node.js-specific manner.
962
+ * As a result, the `globalThis` value inside the new context would behave more closely to an ordinary
963
+ * one.
964
+ *
965
+ * When `vm.constants.DONT_CONTEXTIFY` is used as the `contextObject` argument to {@link createContext},
966
+ * the returned object is a proxy-like object to the global object in the newly created context with
967
+ * fewer Node.js-specific quirks. It is reference equal to the `globalThis` value in the new context,
968
+ * can be modified from outside the context, and can be used to access built-ins in the new context directly.
969
+ * @since v22.8.0
970
+ */
971
+ const DONT_CONTEXTIFY: number;
918
972
  }
919
973
  }
920
974
  declare module "node:vm" {
@@ -267,7 +267,7 @@ declare module "worker_threads" {
267
267
  trackUnmanagedFds?: boolean | undefined;
268
268
  /**
269
269
  * An optional `name` to be appended to the worker title
270
- * for debuggin/identification purposes, making the final title as
270
+ * for debugging/identification purposes, making the final title as
271
271
  * `[worker ${id}] ${name}`.
272
272
  */
273
273
  name?: string | undefined;
package/package.json CHANGED
@@ -93,7 +93,7 @@
93
93
  "publishConfig": {
94
94
  "access": "public"
95
95
  },
96
- "version": "3.0.126",
96
+ "version": "3.0.128",
97
97
  "jest": {
98
98
  "coverageProvider": "v8",
99
99
  "testMatch": [