cdk-assets 4.7.3 → 4.7.4

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.
@@ -198,8 +198,8 @@ var require_windows = __commonJS({
198
198
  "../../node_modules/isexe/windows.js"(exports2, module2) {
199
199
  module2.exports = isexe;
200
200
  isexe.sync = sync;
201
- var fs13 = require("fs");
202
- function checkPathExt(path12, options) {
201
+ var fs14 = require("fs");
202
+ function checkPathExt(path14, options) {
203
203
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
204
204
  if (!pathext) {
205
205
  return true;
@@ -210,28 +210,28 @@ var require_windows = __commonJS({
210
210
  }
211
211
  for (var i6 = 0; i6 < pathext.length; i6++) {
212
212
  var p3 = pathext[i6].toLowerCase();
213
- if (p3 && path12.substr(-p3.length).toLowerCase() === p3) {
213
+ if (p3 && path14.substr(-p3.length).toLowerCase() === p3) {
214
214
  return true;
215
215
  }
216
216
  }
217
217
  return false;
218
218
  }
219
219
  __name(checkPathExt, "checkPathExt");
220
- function checkStat(stat, path12, options) {
220
+ function checkStat(stat, path14, options) {
221
221
  if (!stat.isSymbolicLink() && !stat.isFile()) {
222
222
  return false;
223
223
  }
224
- return checkPathExt(path12, options);
224
+ return checkPathExt(path14, options);
225
225
  }
226
226
  __name(checkStat, "checkStat");
227
- function isexe(path12, options, cb) {
228
- fs13.stat(path12, function(er, stat) {
229
- cb(er, er ? false : checkStat(stat, path12, options));
227
+ function isexe(path14, options, cb) {
228
+ fs14.stat(path14, function(er, stat) {
229
+ cb(er, er ? false : checkStat(stat, path14, options));
230
230
  });
231
231
  }
232
232
  __name(isexe, "isexe");
233
- function sync(path12, options) {
234
- return checkStat(fs13.statSync(path12), path12, options);
233
+ function sync(path14, options) {
234
+ return checkStat(fs14.statSync(path14), path14, options);
235
235
  }
236
236
  __name(sync, "sync");
237
237
  }
@@ -242,15 +242,15 @@ var require_mode = __commonJS({
242
242
  "../../node_modules/isexe/mode.js"(exports2, module2) {
243
243
  module2.exports = isexe;
244
244
  isexe.sync = sync;
245
- var fs13 = require("fs");
246
- function isexe(path12, options, cb) {
247
- fs13.stat(path12, function(er, stat) {
245
+ var fs14 = require("fs");
246
+ function isexe(path14, options, cb) {
247
+ fs14.stat(path14, function(er, stat) {
248
248
  cb(er, er ? false : checkStat(stat, options));
249
249
  });
250
250
  }
251
251
  __name(isexe, "isexe");
252
- function sync(path12, options) {
253
- return checkStat(fs13.statSync(path12), options);
252
+ function sync(path14, options) {
253
+ return checkStat(fs14.statSync(path14), options);
254
254
  }
255
255
  __name(sync, "sync");
256
256
  function checkStat(stat, options) {
@@ -277,7 +277,7 @@ var require_mode = __commonJS({
277
277
  // ../../node_modules/isexe/index.js
278
278
  var require_isexe = __commonJS({
279
279
  "../../node_modules/isexe/index.js"(exports2, module2) {
280
- var fs13 = require("fs");
280
+ var fs14 = require("fs");
281
281
  var core;
282
282
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
283
283
  core = require_windows();
@@ -286,7 +286,7 @@ var require_isexe = __commonJS({
286
286
  }
287
287
  module2.exports = isexe;
288
288
  isexe.sync = sync;
289
- function isexe(path12, options, cb) {
289
+ function isexe(path14, options, cb) {
290
290
  if (typeof options === "function") {
291
291
  cb = options;
292
292
  options = {};
@@ -296,7 +296,7 @@ var require_isexe = __commonJS({
296
296
  throw new TypeError("callback not provided");
297
297
  }
298
298
  return new Promise(function(resolve5, reject) {
299
- isexe(path12, options || {}, function(er, is) {
299
+ isexe(path14, options || {}, function(er, is) {
300
300
  if (er) {
301
301
  reject(er);
302
302
  } else {
@@ -305,7 +305,7 @@ var require_isexe = __commonJS({
305
305
  });
306
306
  });
307
307
  }
308
- core(path12, options || {}, function(er, is) {
308
+ core(path14, options || {}, function(er, is) {
309
309
  if (er) {
310
310
  if (er.code === "EACCES" || options && options.ignoreErrors) {
311
311
  er = null;
@@ -316,9 +316,9 @@ var require_isexe = __commonJS({
316
316
  });
317
317
  }
318
318
  __name(isexe, "isexe");
319
- function sync(path12, options) {
319
+ function sync(path14, options) {
320
320
  try {
321
- return core.sync(path12, options || {});
321
+ return core.sync(path14, options || {});
322
322
  } catch (er) {
323
323
  if (options && options.ignoreErrors || er.code === "EACCES") {
324
324
  return false;
@@ -335,7 +335,7 @@ var require_isexe = __commonJS({
335
335
  var require_which = __commonJS({
336
336
  "../../node_modules/cross-spawn/node_modules/which/which.js"(exports2, module2) {
337
337
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
338
- var path12 = require("path");
338
+ var path14 = require("path");
339
339
  var COLON2 = isWindows ? ";" : ":";
340
340
  var isexe = require_isexe();
341
341
  var getNotFoundError = /* @__PURE__ */ __name((cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), "getNotFoundError");
@@ -373,7 +373,7 @@ var require_which = __commonJS({
373
373
  return opt.all && found.length ? resolve5(found) : reject(getNotFoundError(cmd));
374
374
  const ppRaw = pathEnv[i6];
375
375
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
376
- const pCmd = path12.join(pathPart, cmd);
376
+ const pCmd = path14.join(pathPart, cmd);
377
377
  const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
378
378
  resolve5(subStep(p3, i6, 0));
379
379
  }), "step");
@@ -400,7 +400,7 @@ var require_which = __commonJS({
400
400
  for (let i6 = 0; i6 < pathEnv.length; i6++) {
401
401
  const ppRaw = pathEnv[i6];
402
402
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
403
- const pCmd = path12.join(pathPart, cmd);
403
+ const pCmd = path14.join(pathPart, cmd);
404
404
  const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
405
405
  for (let j6 = 0; j6 < pathExt.length; j6++) {
406
406
  const cur = p3 + pathExt[j6];
@@ -448,7 +448,7 @@ var require_path_key = __commonJS({
448
448
  var require_resolveCommand = __commonJS({
449
449
  "../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
450
450
  "use strict";
451
- var path12 = require("path");
451
+ var path14 = require("path");
452
452
  var which = require_which();
453
453
  var getPathKey = require_path_key();
454
454
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -466,7 +466,7 @@ var require_resolveCommand = __commonJS({
466
466
  try {
467
467
  resolved = which.sync(parsed.command, {
468
468
  path: env2[getPathKey({ env: env2 })],
469
- pathExt: withoutPathExt ? path12.delimiter : void 0
469
+ pathExt: withoutPathExt ? path14.delimiter : void 0
470
470
  });
471
471
  } catch (e6) {
472
472
  } finally {
@@ -475,7 +475,7 @@ var require_resolveCommand = __commonJS({
475
475
  }
476
476
  }
477
477
  if (resolved) {
478
- resolved = path12.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
478
+ resolved = path14.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
479
479
  }
480
480
  return resolved;
481
481
  }
@@ -533,8 +533,8 @@ var require_shebang_command = __commonJS({
533
533
  if (!match) {
534
534
  return null;
535
535
  }
536
- const [path12, argument] = match[0].replace(/#! ?/, "").split(" ");
537
- const binary = path12.split("/").pop();
536
+ const [path14, argument] = match[0].replace(/#! ?/, "").split(" ");
537
+ const binary = path14.split("/").pop();
538
538
  if (binary === "env") {
539
539
  return argument;
540
540
  }
@@ -547,16 +547,16 @@ var require_shebang_command = __commonJS({
547
547
  var require_readShebang = __commonJS({
548
548
  "../../node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
549
549
  "use strict";
550
- var fs13 = require("fs");
550
+ var fs14 = require("fs");
551
551
  var shebangCommand = require_shebang_command();
552
552
  function readShebang(command6) {
553
553
  const size = 150;
554
554
  const buffer = Buffer.alloc(size);
555
555
  let fd;
556
556
  try {
557
- fd = fs13.openSync(command6, "r");
558
- fs13.readSync(fd, buffer, 0, size, 0);
559
- fs13.closeSync(fd);
557
+ fd = fs14.openSync(command6, "r");
558
+ fs14.readSync(fd, buffer, 0, size, 0);
559
+ fs14.closeSync(fd);
560
560
  } catch (e6) {
561
561
  }
562
562
  return shebangCommand(buffer.toString());
@@ -570,7 +570,7 @@ var require_readShebang = __commonJS({
570
570
  var require_parse = __commonJS({
571
571
  "../../node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
572
572
  "use strict";
573
- var path12 = require("path");
573
+ var path14 = require("path");
574
574
  var resolveCommand = require_resolveCommand();
575
575
  var escape = require_escape();
576
576
  var readShebang = require_readShebang();
@@ -596,7 +596,7 @@ var require_parse = __commonJS({
596
596
  const needsShell = !isExecutableRegExp.test(commandFile);
597
597
  if (parsed.options.forceShell || needsShell) {
598
598
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
599
- parsed.command = path12.normalize(parsed.command);
599
+ parsed.command = path14.normalize(parsed.command);
600
600
  parsed.command = escape.command(parsed.command);
601
601
  parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
602
602
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -1078,7 +1078,7 @@ var require_path = __commonJS({
1078
1078
  Object.defineProperty(exports2, "__esModule", { value: true });
1079
1079
  exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
1080
1080
  var os5 = require("os");
1081
- var path12 = require("path");
1081
+ var path14 = require("path");
1082
1082
  var IS_WINDOWS_PLATFORM = os5.platform() === "win32";
1083
1083
  var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
1084
1084
  var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
@@ -1091,7 +1091,7 @@ var require_path = __commonJS({
1091
1091
  __name(unixify, "unixify");
1092
1092
  exports2.unixify = unixify;
1093
1093
  function makeAbsolute(cwd, filepath) {
1094
- return path12.resolve(cwd, filepath);
1094
+ return path14.resolve(cwd, filepath);
1095
1095
  }
1096
1096
  __name(makeAbsolute, "makeAbsolute");
1097
1097
  exports2.makeAbsolute = makeAbsolute;
@@ -2408,7 +2408,7 @@ var require_braces = __commonJS({
2408
2408
  var require_constants2 = __commonJS({
2409
2409
  "../../node_modules/micromatch/node_modules/picomatch/lib/constants.js"(exports2, module2) {
2410
2410
  "use strict";
2411
- var path12 = require("path");
2411
+ var path14 = require("path");
2412
2412
  var WIN_SLASH = "\\\\/";
2413
2413
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
2414
2414
  var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
@@ -2582,7 +2582,7 @@ var require_constants2 = __commonJS({
2582
2582
  /* | */
2583
2583
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
2584
2584
  /* \uFEFF */
2585
- SEP: path12.sep,
2585
+ SEP: path14.sep,
2586
2586
  /**
2587
2587
  * Create EXTGLOB_CHARS
2588
2588
  */
@@ -2609,7 +2609,7 @@ var require_constants2 = __commonJS({
2609
2609
  var require_utils2 = __commonJS({
2610
2610
  "../../node_modules/micromatch/node_modules/picomatch/lib/utils.js"(exports2) {
2611
2611
  "use strict";
2612
- var path12 = require("path");
2612
+ var path14 = require("path");
2613
2613
  var win32 = process.platform === "win32";
2614
2614
  var {
2615
2615
  REGEX_BACKSLASH,
@@ -2638,7 +2638,7 @@ var require_utils2 = __commonJS({
2638
2638
  if (options && typeof options.windows === "boolean") {
2639
2639
  return options.windows;
2640
2640
  }
2641
- return win32 === true || path12.sep === "\\";
2641
+ return win32 === true || path14.sep === "\\";
2642
2642
  };
2643
2643
  exports2.escapeLast = (input, char, lastIdx) => {
2644
2644
  const idx = input.lastIndexOf(char, lastIdx);
@@ -4002,7 +4002,7 @@ var require_parse3 = __commonJS({
4002
4002
  var require_picomatch = __commonJS({
4003
4003
  "../../node_modules/micromatch/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
4004
4004
  "use strict";
4005
- var path12 = require("path");
4005
+ var path14 = require("path");
4006
4006
  var scan = require_scan();
4007
4007
  var parse3 = require_parse3();
4008
4008
  var utils = require_utils2();
@@ -4087,7 +4087,7 @@ var require_picomatch = __commonJS({
4087
4087
  };
4088
4088
  picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
4089
4089
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
4090
- return regex.test(path12.basename(input));
4090
+ return regex.test(path14.basename(input));
4091
4091
  };
4092
4092
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
4093
4093
  picomatch.parse = (pattern, options) => {
@@ -4314,7 +4314,7 @@ var require_pattern = __commonJS({
4314
4314
  "use strict";
4315
4315
  Object.defineProperty(exports2, "__esModule", { value: true });
4316
4316
  exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
4317
- var path12 = require("path");
4317
+ var path14 = require("path");
4318
4318
  var globParent = require_glob_parent();
4319
4319
  var micromatch = require_micromatch();
4320
4320
  var GLOBSTAR = "**";
@@ -4424,7 +4424,7 @@ var require_pattern = __commonJS({
4424
4424
  __name(endsWithSlashGlobStar, "endsWithSlashGlobStar");
4425
4425
  exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
4426
4426
  function isAffectDepthOfReadingPattern(pattern) {
4427
- const basename = path12.basename(pattern);
4427
+ const basename = path14.basename(pattern);
4428
4428
  return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
4429
4429
  }
4430
4430
  __name(isAffectDepthOfReadingPattern, "isAffectDepthOfReadingPattern");
@@ -4491,7 +4491,7 @@ var require_pattern = __commonJS({
4491
4491
  __name(partitionAbsoluteAndRelative, "partitionAbsoluteAndRelative");
4492
4492
  exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
4493
4493
  function isAbsolute(pattern) {
4494
- return path12.isAbsolute(pattern);
4494
+ return path14.isAbsolute(pattern);
4495
4495
  }
4496
4496
  __name(isAbsolute, "isAbsolute");
4497
4497
  exports2.isAbsolute = isAbsolute;
@@ -4680,10 +4680,10 @@ var require_utils3 = __commonJS({
4680
4680
  exports2.array = array;
4681
4681
  var errno = require_errno();
4682
4682
  exports2.errno = errno;
4683
- var fs13 = require_fs();
4684
- exports2.fs = fs13;
4685
- var path12 = require_path();
4686
- exports2.path = path12;
4683
+ var fs14 = require_fs();
4684
+ exports2.fs = fs14;
4685
+ var path14 = require_path();
4686
+ exports2.path = path14;
4687
4687
  var pattern = require_pattern();
4688
4688
  exports2.pattern = pattern;
4689
4689
  var stream = require_stream();
@@ -4803,8 +4803,8 @@ var require_async = __commonJS({
4803
4803
  "use strict";
4804
4804
  Object.defineProperty(exports2, "__esModule", { value: true });
4805
4805
  exports2.read = void 0;
4806
- function read(path12, settings, callback) {
4807
- settings.fs.lstat(path12, (lstatError, lstat) => {
4806
+ function read(path14, settings, callback) {
4807
+ settings.fs.lstat(path14, (lstatError, lstat) => {
4808
4808
  if (lstatError !== null) {
4809
4809
  callFailureCallback(callback, lstatError);
4810
4810
  return;
@@ -4813,7 +4813,7 @@ var require_async = __commonJS({
4813
4813
  callSuccessCallback(callback, lstat);
4814
4814
  return;
4815
4815
  }
4816
- settings.fs.stat(path12, (statError, stat) => {
4816
+ settings.fs.stat(path14, (statError, stat) => {
4817
4817
  if (statError !== null) {
4818
4818
  if (settings.throwErrorOnBrokenSymbolicLink) {
4819
4819
  callFailureCallback(callback, statError);
@@ -4848,13 +4848,13 @@ var require_sync = __commonJS({
4848
4848
  "use strict";
4849
4849
  Object.defineProperty(exports2, "__esModule", { value: true });
4850
4850
  exports2.read = void 0;
4851
- function read(path12, settings) {
4852
- const lstat = settings.fs.lstatSync(path12);
4851
+ function read(path14, settings) {
4852
+ const lstat = settings.fs.lstatSync(path14);
4853
4853
  if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
4854
4854
  return lstat;
4855
4855
  }
4856
4856
  try {
4857
- const stat = settings.fs.statSync(path12);
4857
+ const stat = settings.fs.statSync(path14);
4858
4858
  if (settings.markSymbolicLink) {
4859
4859
  stat.isSymbolicLink = () => true;
4860
4860
  }
@@ -4877,12 +4877,12 @@ var require_fs2 = __commonJS({
4877
4877
  "use strict";
4878
4878
  Object.defineProperty(exports2, "__esModule", { value: true });
4879
4879
  exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
4880
- var fs13 = require("fs");
4880
+ var fs14 = require("fs");
4881
4881
  exports2.FILE_SYSTEM_ADAPTER = {
4882
- lstat: fs13.lstat,
4883
- stat: fs13.stat,
4884
- lstatSync: fs13.lstatSync,
4885
- statSync: fs13.statSync
4882
+ lstat: fs14.lstat,
4883
+ stat: fs14.stat,
4884
+ lstatSync: fs14.lstatSync,
4885
+ statSync: fs14.statSync
4886
4886
  };
4887
4887
  function createFileSystemAdapter(fsMethods) {
4888
4888
  if (fsMethods === void 0) {
@@ -4900,7 +4900,7 @@ var require_settings = __commonJS({
4900
4900
  "../../node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
4901
4901
  "use strict";
4902
4902
  Object.defineProperty(exports2, "__esModule", { value: true });
4903
- var fs13 = require_fs2();
4903
+ var fs14 = require_fs2();
4904
4904
  var Settings = class {
4905
4905
  static {
4906
4906
  __name(this, "Settings");
@@ -4908,7 +4908,7 @@ var require_settings = __commonJS({
4908
4908
  constructor(_options = {}) {
4909
4909
  this._options = _options;
4910
4910
  this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
4911
- this.fs = fs13.createFileSystemAdapter(this._options.fs);
4911
+ this.fs = fs14.createFileSystemAdapter(this._options.fs);
4912
4912
  this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
4913
4913
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
4914
4914
  }
@@ -4930,18 +4930,18 @@ var require_out = __commonJS({
4930
4930
  var sync = require_sync();
4931
4931
  var settings_1 = require_settings();
4932
4932
  exports2.Settings = settings_1.default;
4933
- function stat(path12, optionsOrSettingsOrCallback, callback) {
4933
+ function stat(path14, optionsOrSettingsOrCallback, callback) {
4934
4934
  if (typeof optionsOrSettingsOrCallback === "function") {
4935
- async.read(path12, getSettings(), optionsOrSettingsOrCallback);
4935
+ async.read(path14, getSettings(), optionsOrSettingsOrCallback);
4936
4936
  return;
4937
4937
  }
4938
- async.read(path12, getSettings(optionsOrSettingsOrCallback), callback);
4938
+ async.read(path14, getSettings(optionsOrSettingsOrCallback), callback);
4939
4939
  }
4940
4940
  __name(stat, "stat");
4941
4941
  exports2.stat = stat;
4942
- function statSync3(path12, optionsOrSettings) {
4942
+ function statSync3(path14, optionsOrSettings) {
4943
4943
  const settings = getSettings(optionsOrSettings);
4944
- return sync.read(path12, settings);
4944
+ return sync.read(path14, settings);
4945
4945
  }
4946
4946
  __name(statSync3, "statSync");
4947
4947
  exports2.statSync = statSync3;
@@ -5074,8 +5074,8 @@ var require_utils4 = __commonJS({
5074
5074
  "use strict";
5075
5075
  Object.defineProperty(exports2, "__esModule", { value: true });
5076
5076
  exports2.fs = void 0;
5077
- var fs13 = require_fs3();
5078
- exports2.fs = fs13;
5077
+ var fs14 = require_fs3();
5078
+ exports2.fs = fs14;
5079
5079
  }
5080
5080
  });
5081
5081
 
@@ -5171,16 +5171,16 @@ var require_async2 = __commonJS({
5171
5171
  return;
5172
5172
  }
5173
5173
  const tasks = names.map((name) => {
5174
- const path12 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5174
+ const path14 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5175
5175
  return (done) => {
5176
- fsStat.stat(path12, settings.fsStatSettings, (error2, stats) => {
5176
+ fsStat.stat(path14, settings.fsStatSettings, (error2, stats) => {
5177
5177
  if (error2 !== null) {
5178
5178
  done(error2);
5179
5179
  return;
5180
5180
  }
5181
5181
  const entry = {
5182
5182
  name,
5183
- path: path12,
5183
+ path: path14,
5184
5184
  dirent: utils.fs.createDirentFromStats(name, stats)
5185
5185
  };
5186
5186
  if (settings.stats) {
@@ -5280,14 +5280,14 @@ var require_fs4 = __commonJS({
5280
5280
  "use strict";
5281
5281
  Object.defineProperty(exports2, "__esModule", { value: true });
5282
5282
  exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
5283
- var fs13 = require("fs");
5283
+ var fs14 = require("fs");
5284
5284
  exports2.FILE_SYSTEM_ADAPTER = {
5285
- lstat: fs13.lstat,
5286
- stat: fs13.stat,
5287
- lstatSync: fs13.lstatSync,
5288
- statSync: fs13.statSync,
5289
- readdir: fs13.readdir,
5290
- readdirSync: fs13.readdirSync
5285
+ lstat: fs14.lstat,
5286
+ stat: fs14.stat,
5287
+ lstatSync: fs14.lstatSync,
5288
+ statSync: fs14.statSync,
5289
+ readdir: fs14.readdir,
5290
+ readdirSync: fs14.readdirSync
5291
5291
  };
5292
5292
  function createFileSystemAdapter(fsMethods) {
5293
5293
  if (fsMethods === void 0) {
@@ -5305,9 +5305,9 @@ var require_settings2 = __commonJS({
5305
5305
  "../../node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
5306
5306
  "use strict";
5307
5307
  Object.defineProperty(exports2, "__esModule", { value: true });
5308
- var path12 = require("path");
5308
+ var path14 = require("path");
5309
5309
  var fsStat = require_out();
5310
- var fs13 = require_fs4();
5310
+ var fs14 = require_fs4();
5311
5311
  var Settings = class {
5312
5312
  static {
5313
5313
  __name(this, "Settings");
@@ -5315,8 +5315,8 @@ var require_settings2 = __commonJS({
5315
5315
  constructor(_options = {}) {
5316
5316
  this._options = _options;
5317
5317
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
5318
- this.fs = fs13.createFileSystemAdapter(this._options.fs);
5319
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path12.sep);
5318
+ this.fs = fs14.createFileSystemAdapter(this._options.fs);
5319
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path14.sep);
5320
5320
  this.stats = this._getValue(this._options.stats, false);
5321
5321
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
5322
5322
  this.fsStatSettings = new fsStat.Settings({
@@ -5343,18 +5343,18 @@ var require_out2 = __commonJS({
5343
5343
  var sync = require_sync2();
5344
5344
  var settings_1 = require_settings2();
5345
5345
  exports2.Settings = settings_1.default;
5346
- function scandir(path12, optionsOrSettingsOrCallback, callback) {
5346
+ function scandir(path14, optionsOrSettingsOrCallback, callback) {
5347
5347
  if (typeof optionsOrSettingsOrCallback === "function") {
5348
- async.read(path12, getSettings(), optionsOrSettingsOrCallback);
5348
+ async.read(path14, getSettings(), optionsOrSettingsOrCallback);
5349
5349
  return;
5350
5350
  }
5351
- async.read(path12, getSettings(optionsOrSettingsOrCallback), callback);
5351
+ async.read(path14, getSettings(optionsOrSettingsOrCallback), callback);
5352
5352
  }
5353
5353
  __name(scandir, "scandir");
5354
5354
  exports2.scandir = scandir;
5355
- function scandirSync(path12, optionsOrSettings) {
5355
+ function scandirSync(path14, optionsOrSettings) {
5356
5356
  const settings = getSettings(optionsOrSettings);
5357
- return sync.read(path12, settings);
5357
+ return sync.read(path14, settings);
5358
5358
  }
5359
5359
  __name(scandirSync, "scandirSync");
5360
5360
  exports2.scandirSync = scandirSync;
@@ -6051,7 +6051,7 @@ var require_settings3 = __commonJS({
6051
6051
  "../../node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
6052
6052
  "use strict";
6053
6053
  Object.defineProperty(exports2, "__esModule", { value: true });
6054
- var path12 = require("path");
6054
+ var path14 = require("path");
6055
6055
  var fsScandir = require_out2();
6056
6056
  var Settings = class {
6057
6057
  static {
@@ -6064,7 +6064,7 @@ var require_settings3 = __commonJS({
6064
6064
  this.deepFilter = this._getValue(this._options.deepFilter, null);
6065
6065
  this.entryFilter = this._getValue(this._options.entryFilter, null);
6066
6066
  this.errorFilter = this._getValue(this._options.errorFilter, null);
6067
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path12.sep);
6067
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path14.sep);
6068
6068
  this.fsScandirSettings = new fsScandir.Settings({
6069
6069
  followSymbolicLinks: this._options.followSymbolicLinks,
6070
6070
  fs: this._options.fs,
@@ -6130,7 +6130,7 @@ var require_reader2 = __commonJS({
6130
6130
  "../../node_modules/fast-glob/out/readers/reader.js"(exports2) {
6131
6131
  "use strict";
6132
6132
  Object.defineProperty(exports2, "__esModule", { value: true });
6133
- var path12 = require("path");
6133
+ var path14 = require("path");
6134
6134
  var fsStat = require_out();
6135
6135
  var utils = require_utils3();
6136
6136
  var Reader = class {
@@ -6146,7 +6146,7 @@ var require_reader2 = __commonJS({
6146
6146
  });
6147
6147
  }
6148
6148
  _getFullEntryPath(filepath) {
6149
- return path12.resolve(this._settings.cwd, filepath);
6149
+ return path14.resolve(this._settings.cwd, filepath);
6150
6150
  }
6151
6151
  _makeEntry(stats, pattern) {
6152
6152
  const entry = {
@@ -6586,7 +6586,7 @@ var require_provider = __commonJS({
6586
6586
  "../../node_modules/fast-glob/out/providers/provider.js"(exports2) {
6587
6587
  "use strict";
6588
6588
  Object.defineProperty(exports2, "__esModule", { value: true });
6589
- var path12 = require("path");
6589
+ var path14 = require("path");
6590
6590
  var deep_1 = require_deep();
6591
6591
  var entry_1 = require_entry();
6592
6592
  var error_1 = require_error();
@@ -6603,7 +6603,7 @@ var require_provider = __commonJS({
6603
6603
  this.entryTransformer = new entry_2.default(this._settings);
6604
6604
  }
6605
6605
  _getRootDirectory(task) {
6606
- return path12.resolve(this._settings.cwd, task.base);
6606
+ return path14.resolve(this._settings.cwd, task.base);
6607
6607
  }
6608
6608
  _getReaderOptions(task) {
6609
6609
  const basePath = task.base === "." ? "" : task.base;
@@ -6796,16 +6796,16 @@ var require_settings4 = __commonJS({
6796
6796
  "use strict";
6797
6797
  Object.defineProperty(exports2, "__esModule", { value: true });
6798
6798
  exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
6799
- var fs13 = require("fs");
6799
+ var fs14 = require("fs");
6800
6800
  var os5 = require("os");
6801
6801
  var CPU_COUNT = Math.max(os5.cpus().length, 1);
6802
6802
  exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
6803
- lstat: fs13.lstat,
6804
- lstatSync: fs13.lstatSync,
6805
- stat: fs13.stat,
6806
- statSync: fs13.statSync,
6807
- readdir: fs13.readdir,
6808
- readdirSync: fs13.readdirSync
6803
+ lstat: fs14.lstat,
6804
+ lstatSync: fs14.lstatSync,
6805
+ stat: fs14.stat,
6806
+ statSync: fs14.statSync,
6807
+ readdir: fs14.readdir,
6808
+ readdirSync: fs14.readdirSync
6809
6809
  };
6810
6810
  var Settings = class {
6811
6811
  static {
@@ -7283,7 +7283,7 @@ var require_dist = __commonJS({
7283
7283
  // ../../node_modules/yazl/index.js
7284
7284
  var require_yazl = __commonJS({
7285
7285
  "../../node_modules/yazl/index.js"(exports2) {
7286
- var fs13 = require("fs");
7286
+ var fs14 = require("fs");
7287
7287
  var Transform = require("stream").Transform;
7288
7288
  var PassThrough2 = require("stream").PassThrough;
7289
7289
  var zlib2 = require("zlib");
@@ -7314,14 +7314,14 @@ var require_yazl = __commonJS({
7314
7314
  if (shouldIgnoreAdding(self2)) return;
7315
7315
  var entry = new Entry(metadataPath, false, options);
7316
7316
  self2.entries.push(entry);
7317
- fs13.stat(realPath, function(err, stats) {
7317
+ fs14.stat(realPath, function(err, stats) {
7318
7318
  if (err) return self2.emit("error", err);
7319
7319
  if (!stats.isFile()) return self2.emit("error", new Error("not a file: " + realPath));
7320
7320
  entry.uncompressedSize = stats.size;
7321
7321
  if (options.mtime == null) entry.setLastModDate(stats.mtime);
7322
7322
  if (options.mode == null) entry.setFileAttributesMode(stats.mode);
7323
7323
  entry.setFileDataPumpFunction(function() {
7324
- var readStream = fs13.createReadStream(realPath);
7324
+ var readStream = fs14.createReadStream(realPath);
7325
7325
  entry.state = Entry.FILE_DATA_IN_PROGRESS;
7326
7326
  readStream.on("error", function(err2) {
7327
7327
  self2.emit("error", err2);
@@ -7991,7 +7991,7 @@ var require_zip = __commonJS({
7991
7991
  exports2.zipDirectory = zipDirectory2;
7992
7992
  exports2.zipString = zipString;
7993
7993
  var fs_1 = require("fs");
7994
- var path12 = __importStar2(require("path"));
7994
+ var path14 = __importStar2(require("path"));
7995
7995
  var fast_glob_1 = require_out4();
7996
7996
  var yazl_1 = require_yazl();
7997
7997
  function epoch() {
@@ -8039,7 +8039,7 @@ var require_zip = __commonJS({
8039
8039
  output.once("close", ok);
8040
8040
  zip.outputStream.pipe(output);
8041
8041
  for (const file of files) {
8042
- const fullPath = path12.resolve(directory, file);
8042
+ const fullPath = path14.resolve(directory, file);
8043
8043
  const [data, stat] = await Promise.all([fs_1.promises.readFile(fullPath), fs_1.promises.stat(fullPath)]);
8044
8044
  zip.addBuffer(data, file, {
8045
8045
  mtime: epoch(),
@@ -8158,6 +8158,9 @@ async function shell(command6, options) {
8158
8158
  function handleShellOutput(chunk, options, shellEventType) {
8159
8159
  switch (options.subprocessOutputDestination) {
8160
8160
  case "ignore":
8161
+ if (shellEventType === "open") {
8162
+ options.shellEventPublisher(shellEventType, chunk);
8163
+ }
8161
8164
  return;
8162
8165
  case "publish":
8163
8166
  options.shellEventPublisher(shellEventType, chunk);
@@ -8763,14 +8766,14 @@ var init_assets = __esm({
8763
8766
  var require_helpers = __commonJS({
8764
8767
  "../@aws-cdk/cloud-assembly-schema/node_modules/jsonschema/lib/helpers.js"(exports2, module2) {
8765
8768
  "use strict";
8766
- var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message, instance, schema, path12, name, argument) {
8767
- if (Array.isArray(path12)) {
8768
- this.path = path12;
8769
- this.property = path12.reduce(function(sum, item) {
8769
+ var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message, instance, schema, path14, name, argument) {
8770
+ if (Array.isArray(path14)) {
8771
+ this.path = path14;
8772
+ this.property = path14.reduce(function(sum, item) {
8770
8773
  return sum + makeSuffix(item);
8771
8774
  }, "instance");
8772
- } else if (path12 !== void 0) {
8773
- this.property = path12;
8775
+ } else if (path14 !== void 0) {
8776
+ this.property = path14;
8774
8777
  }
8775
8778
  if (message) {
8776
8779
  this.message = message;
@@ -8865,16 +8868,16 @@ var require_helpers = __commonJS({
8865
8868
  name: { value: "SchemaError", enumerable: false }
8866
8869
  }
8867
8870
  );
8868
- var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options, path12, base, schemas) {
8871
+ var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options, path14, base, schemas) {
8869
8872
  this.schema = schema;
8870
8873
  this.options = options;
8871
- if (Array.isArray(path12)) {
8872
- this.path = path12;
8873
- this.propertyPath = path12.reduce(function(sum, item) {
8874
+ if (Array.isArray(path14)) {
8875
+ this.path = path14;
8876
+ this.propertyPath = path14.reduce(function(sum, item) {
8874
8877
  return sum + makeSuffix(item);
8875
8878
  }, "instance");
8876
8879
  } else {
8877
- this.propertyPath = path12;
8880
+ this.propertyPath = path14;
8878
8881
  }
8879
8882
  this.base = base;
8880
8883
  this.schemas = schemas;
@@ -8883,10 +8886,10 @@ var require_helpers = __commonJS({
8883
8886
  return (() => resolveUrl(this.base, target))();
8884
8887
  }, "resolve");
8885
8888
  SchemaContext.prototype.makeChild = /* @__PURE__ */ __name(function makeChild(schema, propertyName) {
8886
- var path12 = propertyName === void 0 ? this.path : this.path.concat([propertyName]);
8889
+ var path14 = propertyName === void 0 ? this.path : this.path.concat([propertyName]);
8887
8890
  var id = schema.$id || schema.id;
8888
8891
  let base = (() => resolveUrl(this.base, id || ""))();
8889
- var ctx = new SchemaContext(schema, this.options, path12, base, Object.create(this.schemas));
8892
+ var ctx = new SchemaContext(schema, this.options, path14, base, Object.create(this.schemas));
8890
8893
  if (id && !ctx.schemas[base]) {
8891
8894
  ctx.schemas[base] = schema;
8892
8895
  }
@@ -10003,8 +10006,8 @@ var require_validator = __commonJS({
10003
10006
  if (ctx.schemas[switchSchema]) {
10004
10007
  return { subschema: ctx.schemas[switchSchema], switchSchema };
10005
10008
  }
10006
- let parsed = new URL(switchSchema, "thismessage::/");
10007
- let fragment = parsed.hash;
10009
+ let hashIndex = switchSchema.indexOf("#");
10010
+ let fragment = hashIndex === -1 || hashIndex === switchSchema.length - 1 ? "" : switchSchema.substr(hashIndex);
10008
10011
  var document = fragment && fragment.length && switchSchema.substr(0, switchSchema.length - fragment.length);
10009
10012
  if (!document || !ctx.schemas[document]) {
10010
10013
  throw new SchemaError("no such schema <" + switchSchema + ">", schema);
@@ -12089,7 +12092,7 @@ var require_semver2 = __commonJS({
12089
12092
  // ../@aws-cdk/cloud-assembly-schema/cli-version.json
12090
12093
  var require_cli_version = __commonJS({
12091
12094
  "../@aws-cdk/cloud-assembly-schema/cli-version.json"(exports2, module2) {
12092
- module2.exports = { version: "2.1140.0" };
12095
+ module2.exports = { version: "2.1145.0" };
12093
12096
  }
12094
12097
  });
12095
12098
 
@@ -13804,6 +13807,7 @@ var require_integ_schema = __commonJS({
13804
13807
  enum: [
13805
13808
  "any-change",
13806
13809
  "broadening",
13810
+ "destructive",
13807
13811
  "never"
13808
13812
  ],
13809
13813
  type: "string"
@@ -14364,9 +14368,9 @@ var require_validation_report_schema = __commonJS({
14364
14368
  var require_version = __commonJS({
14365
14369
  "../@aws-cdk/cloud-assembly-schema/schema/version.json"(exports2, module2) {
14366
14370
  module2.exports = {
14367
- schemaHash: "095859ad1d3d89d3bc4f9cbe9393d219798972dbd2389287bcc66b49f323cef1",
14371
+ schemaHash: "b006b5c8829cee1f2287b98829ca0ed8abfbdbb2948fecc185e56398afb11a7b",
14368
14372
  $comment: "Do not hold back the version on additions: jsonschema validation of the manifest by the consumer will trigger errors on unexpected fields.",
14369
- revision: 54
14373
+ revision: 55
14370
14374
  };
14371
14375
  }
14372
14376
  });
@@ -14638,6 +14642,7 @@ var init_common = __esm({
14638
14642
  RequireApproval2["NEVER"] = "never";
14639
14643
  RequireApproval2["ANYCHANGE"] = "any-change";
14640
14644
  RequireApproval2["BROADENING"] = "broadening";
14645
+ RequireApproval2["DESTRUCTIVE"] = "destructive";
14641
14646
  return RequireApproval2;
14642
14647
  })(RequireApproval || {});
14643
14648
  }
@@ -16722,6 +16727,592 @@ var init_template_ranges = __esm({
16722
16727
  }
16723
16728
  });
16724
16729
 
16730
+ // ../@aws-cdk/cloud-assembly-api/lib/stack-trace.ts
16731
+ var stack_trace_exports = {};
16732
+ __export(stack_trace_exports, {
16733
+ DEFAULT_USER_CODE_FINDER: () => DEFAULT_USER_CODE_FINDER,
16734
+ StackFrame: () => StackFrame,
16735
+ StackTrace: () => StackTrace
16736
+ });
16737
+ var DEFAULT_USER_CODE_FINDER, StackTrace, StackFrame;
16738
+ var init_stack_trace = __esm({
16739
+ "../@aws-cdk/cloud-assembly-api/lib/stack-trace.ts"() {
16740
+ "use strict";
16741
+ DEFAULT_USER_CODE_FINDER = {
16742
+ isInterestingFrame(frame) {
16743
+ return frame.includes(" (") && frame.endsWith(")");
16744
+ }
16745
+ };
16746
+ StackTrace = class _StackTrace {
16747
+ constructor(frames) {
16748
+ this.frames = frames;
16749
+ }
16750
+ frames;
16751
+ static {
16752
+ __name(this, "StackTrace");
16753
+ }
16754
+ static fromNewlineSeparatedString(stackTrace) {
16755
+ return new _StackTrace(stackTrace.split("\n"));
16756
+ }
16757
+ /**
16758
+ * Return the first user frame from a "Just My Code" call stack
16759
+ *
16760
+ * With all the NON-"my code" call frames redacted, the top level frame should
16761
+ * be the last user frame that is associated with the given call stack.
16762
+ */
16763
+ findAndParse(finder) {
16764
+ for (const frame of this.frames) {
16765
+ if (finder.isInterestingFrame(frame)) {
16766
+ return StackFrame.parse(frame);
16767
+ }
16768
+ }
16769
+ return void 0;
16770
+ }
16771
+ };
16772
+ StackFrame = class {
16773
+ constructor(functionName, fileName, sourceLocation) {
16774
+ this.functionName = functionName;
16775
+ this.fileName = fileName;
16776
+ this.sourceLocation = sourceLocation;
16777
+ }
16778
+ functionName;
16779
+ fileName;
16780
+ sourceLocation;
16781
+ static {
16782
+ __name(this, "StackFrame");
16783
+ }
16784
+ /**
16785
+ * Parse a single line of a stack frame into a structured object
16786
+ *
16787
+ * This is mostly a NodeJS-flavored string we parse here, except that in
16788
+ * a NodeJS stack trace the line would start with ` at `.
16789
+ *
16790
+ * Parses all of these:
16791
+ *
16792
+ * ```
16793
+ * <function> (<file>:<line>:<col>)
16794
+ * <class>.<function> (<file>:<line>:<col>)
16795
+ * Object.<anonymous> (<file>:<line>:<col>)
16796
+ * <function> [as somethingElse] (<file>:<line>:<col>)
16797
+ * new <constructor> (<file>:<line>:<col>)
16798
+ * <file>:<line>:<col>
16799
+ * ```
16800
+ *
16801
+ * See https://v8.dev/docs/stack-trace-api#appendix%3A-stack-trace-format
16802
+ */
16803
+ static parse(frame) {
16804
+ let fileName;
16805
+ let functionName;
16806
+ let sourceLocation;
16807
+ const paren = frame.indexOf("(");
16808
+ if (paren) {
16809
+ functionName = frame.slice(0, paren - 1);
16810
+ frame = frame.slice(paren + 1, -1);
16811
+ } else {
16812
+ functionName = "<entry>";
16813
+ }
16814
+ if (functionName === "Object.<anonymous>") {
16815
+ functionName = "<anonymous>";
16816
+ }
16817
+ let asI = functionName.indexOf(" [as ");
16818
+ if (asI > -1) {
16819
+ const endOfAlias = functionName.indexOf("]", asI);
16820
+ const lastPeriod = functionName.lastIndexOf(".", asI);
16821
+ functionName = functionName.slice(0, lastPeriod + 1) + functionName.slice(asI + 5, endOfAlias);
16822
+ }
16823
+ const m4 = frame.match(/(:[0-9]+){0,2}$/);
16824
+ fileName = m4 ? frame.slice(0, -m4[0].length) : frame;
16825
+ sourceLocation = m4 ? m4[0].slice(1) : "";
16826
+ return {
16827
+ fileName,
16828
+ functionName,
16829
+ sourceLocation
16830
+ };
16831
+ }
16832
+ };
16833
+ }
16834
+ });
16835
+
16836
+ // ../@aws-cdk/cloud-assembly-api/lib/private/color.ts
16837
+ var Col, Colorize;
16838
+ var init_color = __esm({
16839
+ "../@aws-cdk/cloud-assembly-api/lib/private/color.ts"() {
16840
+ "use strict";
16841
+ Col = class {
16842
+ static {
16843
+ __name(this, "Col");
16844
+ }
16845
+ static RED = "31";
16846
+ static ORANGE = "38;5;208";
16847
+ static YELLOW = "33";
16848
+ static BLUE = "34";
16849
+ static BOLD = "1";
16850
+ static UNDERLINE = "4";
16851
+ static GREY = "90";
16852
+ };
16853
+ Colorize = class _Colorize {
16854
+ static {
16855
+ __name(this, "Colorize");
16856
+ }
16857
+ static red(str) {
16858
+ return _Colorize.colorize(Col.RED, str);
16859
+ }
16860
+ static orange(str) {
16861
+ return _Colorize.colorize(Col.ORANGE, str);
16862
+ }
16863
+ static yellow(str) {
16864
+ return _Colorize.colorize(Col.YELLOW, str);
16865
+ }
16866
+ static blue(str) {
16867
+ return _Colorize.colorize(Col.BLUE, str);
16868
+ }
16869
+ static grey(str) {
16870
+ return _Colorize.colorize(Col.GREY, str);
16871
+ }
16872
+ static bold(str) {
16873
+ return _Colorize.colorize(Col.BOLD, str);
16874
+ }
16875
+ static underline(str) {
16876
+ return _Colorize.colorize(Col.UNDERLINE, str);
16877
+ }
16878
+ static colorize(col, str) {
16879
+ if (process.env.FORCE_COLOR === "0" || process.env.NO_COLOR || !process.stdout.isTTY || !process.stderr.isTTY) {
16880
+ return str;
16881
+ }
16882
+ return `\x1B[${col}m${str}\x1B[0m`;
16883
+ }
16884
+ };
16885
+ }
16886
+ });
16887
+
16888
+ // ../@aws-cdk/cloud-assembly-api/lib/validation/parsing.ts
16889
+ var parsing_exports = {};
16890
+ __export(parsing_exports, {
16891
+ ANNOTATION_PLUGIN_NAME: () => ANNOTATION_PLUGIN_NAME,
16892
+ ANNOTATION_PLUGIN_NAMESPACE: () => ANNOTATION_PLUGIN_NAMESPACE,
16893
+ isSuppressibleViolation: () => isSuppressibleViolation,
16894
+ namespaceFromPluginName: () => namespaceFromPluginName,
16895
+ normalizeValidationId: () => normalizeValidationId,
16896
+ normalizeValidationIdForAnnotations: () => normalizeValidationIdForAnnotations,
16897
+ parseValidationId: () => parseValidationId,
16898
+ pluginNameFromNamespace: () => pluginNameFromNamespace
16899
+ });
16900
+ function isSuppressibleViolation(violation) {
16901
+ const isFatal = violation.severity?.toLowerCase() === "fatal";
16902
+ const isErrorAnnotation = violation.ruleMetadata?.["cdk:annotation"] && violation.severity?.toLowerCase() === "error";
16903
+ return !isFatal && !isErrorAnnotation;
16904
+ }
16905
+ function parseValidationId(id) {
16906
+ let nsSeparator = void 0;
16907
+ const braceStack = [];
16908
+ for (let i6 = 0; i6 < id.length; i6++) {
16909
+ const c6 = id[i6];
16910
+ if (c6 === ":" && id[i6 + 1] === ":" && braceStack.length === 0) {
16911
+ if (nsSeparator !== void 0) {
16912
+ throw new Error(`Invalid validation rule ID '${id}'. The '::' delimiter is reserved for separating the prefix from the rule name (e.g. 'prefix::RuleName').`);
16913
+ }
16914
+ nsSeparator = i6;
16915
+ i6 += 1;
16916
+ } else if (["]", ")", "}"].includes(c6)) {
16917
+ const lastBrace = braceStack.pop();
16918
+ if (lastBrace === void 0) {
16919
+ throw new Error(`Invalid validation rule ID '${id}'. Unmatched closing brace '${c6}' at position ${i6}.`);
16920
+ }
16921
+ if (lastBrace === "(" && c6 !== ")" || lastBrace === "[" && c6 !== "]" || lastBrace === "{" && c6 !== "}") {
16922
+ throw new Error(`Invalid validation rule ID '${id}'. Mismatched closing brace '${c6}' at position ${i6}. Expected '${lastBrace === "(" ? ")" : lastBrace === "[" ? "]" : "}"}'.`);
16923
+ }
16924
+ } else if (["[", "(", "{"].includes(c6)) {
16925
+ braceStack.push(c6);
16926
+ }
16927
+ }
16928
+ if (nsSeparator === void 0) {
16929
+ return { ruleId: id };
16930
+ }
16931
+ if (nsSeparator === 0) {
16932
+ throw new Error(`Invalid validation rule ID '${id}'. Missing plugin name before '::'.`);
16933
+ }
16934
+ const namespace = namespaceFromString(id.substring(0, nsSeparator));
16935
+ const ruleId = id.substring(nsSeparator + 2);
16936
+ return { namespace, ruleId };
16937
+ }
16938
+ function normalizeValidationId(id, defaultNamespace) {
16939
+ const p3 = typeof id === "string" ? parseValidationId(id) : id;
16940
+ const parsed = {
16941
+ namespace: p3.namespace ? namespaceFromString(p3.namespace[NS].replaceAll(/ /g, "-")) : void 0,
16942
+ ruleId: p3.ruleId.replaceAll(/ /g, "-")
16943
+ };
16944
+ if (parsed.namespace && ["annotation", "Construct-Annotations"].includes(parsed.namespace[NS])) {
16945
+ return `${ANNOTATION_PLUGIN_NAMESPACE}::${parsed.ruleId}`;
16946
+ }
16947
+ return `${parsed.namespace ?? defaultNamespace[NS]}::${parsed.ruleId}`;
16948
+ }
16949
+ function normalizeValidationIdForAnnotations(id) {
16950
+ return normalizeValidationId(id, ANNOTATION_PLUGIN_NAMESPACE);
16951
+ }
16952
+ function namespaceFromPluginName(pluginName) {
16953
+ if (pluginName === ANNOTATION_PLUGIN_NAME) {
16954
+ return ANNOTATION_PLUGIN_NAMESPACE;
16955
+ }
16956
+ return namespaceFromString(pluginName.replace(/ /g, "-"));
16957
+ }
16958
+ function namespaceFromString(namespace) {
16959
+ return Object.assign({
16960
+ [NS]: namespace.replace(/ /g, "-")
16961
+ }, {
16962
+ toString() {
16963
+ return this[NS];
16964
+ }
16965
+ });
16966
+ }
16967
+ function pluginNameFromNamespace(namespace) {
16968
+ return namespace[NS].replace(/-/g, " ");
16969
+ }
16970
+ var NS, ANNOTATION_PLUGIN_NAME, ANNOTATION_PLUGIN_NAMESPACE;
16971
+ var init_parsing = __esm({
16972
+ "../@aws-cdk/cloud-assembly-api/lib/validation/parsing.ts"() {
16973
+ "use strict";
16974
+ __name(isSuppressibleViolation, "isSuppressibleViolation");
16975
+ __name(parseValidationId, "parseValidationId");
16976
+ __name(normalizeValidationId, "normalizeValidationId");
16977
+ __name(normalizeValidationIdForAnnotations, "normalizeValidationIdForAnnotations");
16978
+ NS = /* @__PURE__ */ Symbol("namespace");
16979
+ __name(namespaceFromPluginName, "namespaceFromPluginName");
16980
+ __name(namespaceFromString, "namespaceFromString");
16981
+ __name(pluginNameFromNamespace, "pluginNameFromNamespace");
16982
+ ANNOTATION_PLUGIN_NAME = "Construct Annotations";
16983
+ ANNOTATION_PLUGIN_NAMESPACE = namespaceFromPluginName("Annotation");
16984
+ }
16985
+ });
16986
+
16987
+ // ../@aws-cdk/cloud-assembly-api/lib/validation/formatting.ts
16988
+ var formatting_exports = {};
16989
+ __export(formatting_exports, {
16990
+ ValidationReportFormatter: () => ValidationReportFormatter,
16991
+ relativeFileLocationRenderer: () => relativeFileLocationRenderer,
16992
+ stripAnsi: () => stripAnsi
16993
+ });
16994
+ function flattenViolations(reports) {
16995
+ return reports.flatMap((report) => {
16996
+ const pluginName = report.pluginName;
16997
+ return report.violations.flatMap((violation) => {
16998
+ return violation.violatingConstructs.map((construct) => ({
16999
+ severity: normalizeSeverity(violation.severity, violation.customSeverity),
17000
+ description: violation.description,
17001
+ ruleName: violation.ruleName,
17002
+ pluginName,
17003
+ construct,
17004
+ suggestedFix: violation.suggestedFix,
17005
+ ruleMetadata: violation.ruleMetadata
17006
+ }));
17007
+ });
17008
+ });
17009
+ }
17010
+ function normalizeSeverity(severity, customSeverity) {
17011
+ switch (severity) {
17012
+ case "fatal":
17013
+ case "error":
17014
+ case "warning":
17015
+ case "info":
17016
+ return severity.toUpperCase();
17017
+ case "custom":
17018
+ return customSeverity ?? "INFO";
17019
+ }
17020
+ }
17021
+ function getSeverityColor(severity) {
17022
+ switch (severity.toLowerCase()) {
17023
+ case "fatal":
17024
+ return Colorize.red;
17025
+ case "error":
17026
+ return Colorize.orange;
17027
+ case "warning":
17028
+ return Colorize.yellow;
17029
+ default:
17030
+ return Colorize.blue;
17031
+ }
17032
+ }
17033
+ function stripAckTag(description) {
17034
+ return description.replace(/\s*\[ack:\s*[^\]]+\]\s*/g, "").trim();
17035
+ }
17036
+ function formatPluginFailure(f6) {
17037
+ return `${Colorize.orange("ERROR")} ${sanitize(f6.error)}`;
17038
+ }
17039
+ function sanitize(s2) {
17040
+ return (s2 ?? "").replace(CONTROL_CHARS, "\uFFFD");
17041
+ }
17042
+ function isPluginFailure(r6) {
17043
+ if (r6.conclusion === "success" || r6.violations.length > 0 || !r6.metadata?.error) {
17044
+ return void 0;
17045
+ }
17046
+ return { error: r6.metadata.error };
17047
+ }
17048
+ function stripAnsi(x) {
17049
+ const pattern = [
17050
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
17051
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
17052
+ ].join("|");
17053
+ const re = new RegExp(pattern, "g");
17054
+ return x.replaceAll(re, "");
17055
+ }
17056
+ function relativeFileLocationRenderer(root6) {
17057
+ return {
17058
+ renderAbsoluteFilePath(absPath) {
17059
+ const relPath = import_path.default.relative(root6, absPath);
17060
+ return relPath.length < absPath.length ? relPath : absPath;
17061
+ }
17062
+ };
17063
+ }
17064
+ var import_path, ValidationReportFormatter, CONTROL_CHARS, SEVERITY_ORDER;
17065
+ var init_formatting = __esm({
17066
+ "../@aws-cdk/cloud-assembly-api/lib/validation/formatting.ts"() {
17067
+ "use strict";
17068
+ import_path = __toESM(require("path"));
17069
+ init_color();
17070
+ init_stack_trace();
17071
+ init_parsing();
17072
+ ValidationReportFormatter = class {
17073
+ constructor(options) {
17074
+ this.options = options;
17075
+ this.fileLocationRenderer = options.fileLocationRenderer ?? relativeFileLocationRenderer(process.cwd());
17076
+ }
17077
+ options;
17078
+ static {
17079
+ __name(this, "ValidationReportFormatter");
17080
+ }
17081
+ fileLocationRenderer;
17082
+ formatReports(reports) {
17083
+ const successfullyExecutedPlugins = reports.filter((r6) => isPluginFailure(r6) === void 0);
17084
+ const pluginFailures = reports.map(isPluginFailure).filter((e6) => e6 !== void 0);
17085
+ const violations = flattenViolations(successfullyExecutedPlugins);
17086
+ violations.sort((a6, b6) => {
17087
+ const aOrder = SEVERITY_ORDER[a6.severity.toLowerCase()] ?? 4;
17088
+ const bOrder = SEVERITY_ORDER[b6.severity.toLowerCase()] ?? 4;
17089
+ return aOrder - bOrder;
17090
+ });
17091
+ return [
17092
+ ...pluginFailures.map(formatPluginFailure),
17093
+ ...violations.map((v) => this.formatViolationBlock(v))
17094
+ ];
17095
+ }
17096
+ formatViolationBlock(v) {
17097
+ const lines = [];
17098
+ const locations = this.sourceLocations(v.construct.stackTraces);
17099
+ const maxTraces = 5;
17100
+ let additional = false;
17101
+ for (const location of locations.slice(0, maxTraces)) {
17102
+ lines.push(`${additional ? "or " : ""}${Colorize.underline(sanitize(location))}`);
17103
+ additional = true;
17104
+ }
17105
+ if (locations.length > maxTraces) {
17106
+ lines.push(Colorize.grey(`(and ${locations.length - maxTraces} more...)`));
17107
+ }
17108
+ const pluginNs = namespaceFromPluginName(v.pluginName);
17109
+ const parsed = parseValidationId(v.ruleName);
17110
+ lines.push([
17111
+ Colorize.bold(getSeverityColor(v.severity)(sanitize(v.severity))),
17112
+ Colorize.bold(stripAckTag(sanitize(v.description))),
17113
+ Colorize.grey(`(${sanitize(parsed.namespace ? pluginNameFromNamespace(parsed.namespace) : v.pluginName)})`)
17114
+ ].join(" "));
17115
+ const constructInfo = this.formatConstructInfo(v.construct);
17116
+ lines.push(` ${constructInfo}`);
17117
+ if (v.suggestedFix) {
17118
+ lines.push(` Suggested fix: ${sanitize(v.suggestedFix).replace(/\n/g, "\n ")}`);
17119
+ }
17120
+ const ackId = normalizeValidationId(v.ruleName, pluginNs);
17121
+ if (isSuppressibleViolation(v)) {
17122
+ lines.push(` ${Colorize.grey(`Acknowledge with '${sanitize(ackId)}'`)}`);
17123
+ } else {
17124
+ lines.push(` ${Colorize.grey(`Rule ${sanitize(ackId)}`)}`);
17125
+ }
17126
+ return lines.join("\n");
17127
+ }
17128
+ sourceLocations(stackTraces) {
17129
+ const ret = [];
17130
+ for (const trace of stackTraces ?? []) {
17131
+ const frame = StackTrace.fromNewlineSeparatedString(trace).findAndParse(this.options.frameFinder ?? DEFAULT_USER_CODE_FINDER);
17132
+ if (frame && frame.fileName) {
17133
+ const candidate = `${this.fileLocationRenderer.renderAbsoluteFilePath(frame.fileName)}:${frame.sourceLocation}`;
17134
+ if (!ret.includes(candidate)) {
17135
+ ret.push(candidate);
17136
+ }
17137
+ }
17138
+ }
17139
+ return ret;
17140
+ }
17141
+ formatConstructInfo(construct) {
17142
+ const parts = [];
17143
+ const logicalId = sanitize(construct.cloudFormationResource?.logicalId);
17144
+ if (construct.constructPath) {
17145
+ const cPath = sanitize(construct.constructPath);
17146
+ parts.push(logicalId ? `${Colorize.bold(cPath)} (${logicalId})` : Colorize.bold(cPath));
17147
+ } else {
17148
+ if (construct.cloudFormationResource?.templatePath) {
17149
+ parts.push(this.fileLocationRenderer.renderAbsoluteFilePath(sanitize(construct.cloudFormationResource.templatePath)));
17150
+ }
17151
+ if (logicalId) {
17152
+ parts.push(Colorize.bold(logicalId));
17153
+ }
17154
+ }
17155
+ if (construct.constructFqn) {
17156
+ parts.push(Colorize.grey(sanitize(construct.constructFqn)));
17157
+ }
17158
+ return parts.join(" ");
17159
+ }
17160
+ };
17161
+ __name(flattenViolations, "flattenViolations");
17162
+ __name(normalizeSeverity, "normalizeSeverity");
17163
+ __name(getSeverityColor, "getSeverityColor");
17164
+ __name(stripAckTag, "stripAckTag");
17165
+ __name(formatPluginFailure, "formatPluginFailure");
17166
+ CONTROL_CHARS = /[\x00-\x08\x0B-\x1F\x7F\x9B]/g;
17167
+ __name(sanitize, "sanitize");
17168
+ SEVERITY_ORDER = {
17169
+ fatal: 0,
17170
+ error: 1,
17171
+ warning: 2,
17172
+ info: 3
17173
+ };
17174
+ __name(isPluginFailure, "isPluginFailure");
17175
+ __name(stripAnsi, "stripAnsi");
17176
+ __name(relativeFileLocationRenderer, "relativeFileLocationRenderer");
17177
+ }
17178
+ });
17179
+
17180
+ // ../@aws-cdk/cloud-assembly-api/lib/validation/loading.ts
17181
+ var loading_exports = {};
17182
+ __export(loading_exports, {
17183
+ loadUnifiedValidationReport: () => loadUnifiedValidationReport
17184
+ });
17185
+ async function loadUnifiedValidationReport(assembly, stacks) {
17186
+ const ret = [];
17187
+ const reportPath = path10.join(assembly.directory, VALIDATION_REPORT_FILE2);
17188
+ if (await pathExists(reportPath)) {
17189
+ const selectedStackIds = new Set(stacks.map((stack) => stack.hierarchicalId));
17190
+ const report = import_cloud_assembly_schema2.Manifest.loadValidationReport(reportPath);
17191
+ const filteredReports = filterReportsByStacks(report.pluginReports, selectedStackIds);
17192
+ ret.push(...filteredReports);
17193
+ }
17194
+ const alreadyHasAnnotations = ret.some((r6) => r6.pluginName === ANNOTATION_PLUGIN_NAME);
17195
+ if (!alreadyHasAnnotations) {
17196
+ const annotationReport = pluginReportFromAnnotations(stacks);
17197
+ if (annotationReport.violations.length > 0 || annotationReport.conclusion === "failure") {
17198
+ ret.push(annotationReport);
17199
+ }
17200
+ }
17201
+ return ret;
17202
+ }
17203
+ function filterReportsByStacks(reports, selectedStackIds) {
17204
+ const stackIds = Array.from(selectedStackIds);
17205
+ return reports.map(filterReport);
17206
+ function filterReport(report) {
17207
+ const violationsWithoutConstructs = new Set(report.violations.flatMap((v, i6) => v.violatingConstructs.length === 0 ? [i6] : []));
17208
+ const filteredViolations = report.violations.map((v) => ({
17209
+ ...v,
17210
+ violatingConstructs: v.violatingConstructs.filter(constructMatches)
17211
+ })).filter((v, i6) => v.violatingConstructs.length > 0 || violationsWithoutConstructs.has(i6));
17212
+ return {
17213
+ ...report,
17214
+ violations: filteredViolations,
17215
+ conclusion: filteredViolations.length > 0 ? report.conclusion : "success"
17216
+ };
17217
+ }
17218
+ __name(filterReport, "filterReport");
17219
+ function constructMatches(c6) {
17220
+ return !c6.constructPath || stackIds.some((stackId) => c6.constructPath === stackId || c6.constructPath?.startsWith(`${stackId}/`));
17221
+ }
17222
+ __name(constructMatches, "constructMatches");
17223
+ }
17224
+ function pluginReportFromAnnotations(stacks) {
17225
+ const ruleMap = /* @__PURE__ */ new Map();
17226
+ for (const stack of stacks) {
17227
+ for (const entry of stack.messages) {
17228
+ let severity;
17229
+ switch (entry.level) {
17230
+ case "warning" /* WARNING */:
17231
+ severity = "warning";
17232
+ break;
17233
+ case "error" /* ERROR */:
17234
+ severity = "error";
17235
+ break;
17236
+ case "info" /* INFO */:
17237
+ severity = "info";
17238
+ break;
17239
+ }
17240
+ const { message, ruleName } = splitDescriptionAndId(String(entry.entry.data));
17241
+ const ruleKey = `${ruleName}|${severity}|${message}`;
17242
+ let violation = ruleMap.get(ruleKey);
17243
+ if (!violation) {
17244
+ violation = {
17245
+ ruleName: ruleName ?? `${severity}-annotation`,
17246
+ description: message,
17247
+ severity,
17248
+ violatingConstructs: [],
17249
+ ruleMetadata: {
17250
+ "cdk:annotation": "true"
17251
+ }
17252
+ };
17253
+ ruleMap.set(ruleKey, violation);
17254
+ }
17255
+ violation.violatingConstructs.push({
17256
+ constructPath: entry.id.replace(/^\//, "")
17257
+ // remove leading slash
17258
+ // TODO: see if this information can be obtained from tree.json
17259
+ // cloudFormationResource
17260
+ // constructFqn:
17261
+ // libraryVersion
17262
+ // TODO: see if we can get this from metadata stack traces. We may need to re-enable them for
17263
+ // annotations in the core library. Otherwise we should probably get a stack trace to the resource itself.
17264
+ // stackTraces
17265
+ });
17266
+ }
17267
+ }
17268
+ const violations = Array.from(ruleMap.values());
17269
+ const hasErrors = violations.some((v) => v.severity === "error");
17270
+ return {
17271
+ pluginName: ANNOTATION_PLUGIN_NAME,
17272
+ conclusion: hasErrors ? "failure" : "success",
17273
+ violations
17274
+ };
17275
+ }
17276
+ function splitDescriptionAndId(message) {
17277
+ const ackMatch = message.match(/\[ack: ([^\]]+)\]/);
17278
+ if (ackMatch) {
17279
+ return { message: message.replace(ackMatch[0], "").trim(), ruleName: ackMatch[1] };
17280
+ }
17281
+ const idMatch = message.match(/\(([^()]+::[^()]+)\)$/);
17282
+ if (idMatch) {
17283
+ return { message: message.replace(idMatch[0], "").trim(), ruleName: idMatch[1] };
17284
+ }
17285
+ return { message };
17286
+ }
17287
+ async function pathExists(pathName) {
17288
+ try {
17289
+ await import_fs.promises.access(pathName);
17290
+ return true;
17291
+ } catch (e6) {
17292
+ if (e6.code !== "ENOENT") {
17293
+ throw e6;
17294
+ }
17295
+ return false;
17296
+ }
17297
+ }
17298
+ var import_fs, path10, import_cloud_assembly_schema2, VALIDATION_REPORT_FILE2;
17299
+ var init_loading = __esm({
17300
+ "../@aws-cdk/cloud-assembly-api/lib/validation/loading.ts"() {
17301
+ "use strict";
17302
+ import_fs = require("fs");
17303
+ path10 = __toESM(require("path"));
17304
+ import_cloud_assembly_schema2 = __toESM(require_lib2());
17305
+ init_metadata();
17306
+ init_parsing();
17307
+ VALIDATION_REPORT_FILE2 = "validation-report.json";
17308
+ __name(loadUnifiedValidationReport, "loadUnifiedValidationReport");
17309
+ __name(filterReportsByStacks, "filterReportsByStacks");
17310
+ __name(pluginReportFromAnnotations, "pluginReportFromAnnotations");
17311
+ __name(splitDescriptionAndId, "splitDescriptionAndId");
17312
+ __name(pathExists, "pathExists");
17313
+ }
17314
+ });
17315
+
16725
17316
  // ../@aws-cdk/cloud-assembly-api/lib/index.js
16726
17317
  var require_lib3 = __commonJS({
16727
17318
  "../@aws-cdk/cloud-assembly-api/lib/index.js"(exports2) {
@@ -16766,6 +17357,10 @@ var require_lib3 = __commonJS({
16766
17357
  __exportStar((init_bootstrap(), __toCommonJS(bootstrap_exports)), exports2);
16767
17358
  __exportStar((init_construct_tree(), __toCommonJS(construct_tree_exports)), exports2);
16768
17359
  __exportStar((init_template_ranges(), __toCommonJS(template_ranges_exports)), exports2);
17360
+ __exportStar((init_stack_trace(), __toCommonJS(stack_trace_exports)), exports2);
17361
+ __exportStar((init_formatting(), __toCommonJS(formatting_exports)), exports2);
17362
+ __exportStar((init_parsing(), __toCommonJS(parsing_exports)), exports2);
17363
+ __exportStar((init_loading(), __toCommonJS(loading_exports)), exports2);
16769
17364
  }
16770
17365
  });
16771
17366
 
@@ -16830,11 +17425,11 @@ async function repositoryUri(ecr, repositoryName) {
16830
17425
  return void 0;
16831
17426
  }
16832
17427
  }
16833
- var path9, ContainerImageAssetHandler, ContainerImageBuilder;
17428
+ var path11, ContainerImageAssetHandler, ContainerImageBuilder;
16834
17429
  var init_container_images = __esm({
16835
17430
  "../@aws-cdk/cdk-assets-lib/lib/private/handlers/container-images.ts"() {
16836
17431
  "use strict";
16837
- path9 = __toESM(require("path"));
17432
+ path11 = __toESM(require("path"));
16838
17433
  init_client_options();
16839
17434
  init_progress();
16840
17435
  init_placeholders2();
@@ -16865,7 +17460,7 @@ var init_container_images = __esm({
16865
17460
  }
16866
17461
  const dockerForBuilding = await this.host.dockerFactory.forBuild({
16867
17462
  repoUri: initOnce.repoUri,
16868
- eventEmitter: /* @__PURE__ */ __name((m4) => this.host.emitMessage("debug" /* DEBUG */, m4), "eventEmitter"),
17463
+ eventEmitter: this.host.emitMessage.bind(this.host),
16869
17464
  ecr: initOnce.ecr,
16870
17465
  subprocessOutputDestination: this.options.subprocessOutputDestination
16871
17466
  });
@@ -17020,7 +17615,7 @@ var init_container_images = __esm({
17020
17615
  `'directory' is expected in the DockerImage asset source, got: ${JSON.stringify(source)}`
17021
17616
  );
17022
17617
  }
17023
- const fullPath = path9.resolve(this.workDir, source.directory);
17618
+ const fullPath = path11.resolve(this.workDir, source.directory);
17024
17619
  this.host.emitMessage("build" /* BUILD */, `Building Docker image at ${fullPath}`);
17025
17620
  await this.docker.build({
17026
17621
  directory: fullPath,
@@ -17091,11 +17686,11 @@ var require_Mime = __commonJS({
17091
17686
  }
17092
17687
  }
17093
17688
  };
17094
- Mime.prototype.getType = function(path12) {
17095
- path12 = String(path12);
17096
- let last = path12.replace(/^.*[/\\]/, "").toLowerCase();
17689
+ Mime.prototype.getType = function(path14) {
17690
+ path14 = String(path14);
17691
+ let last = path14.replace(/^.*[/\\]/, "").toLowerCase();
17097
17692
  let ext = last.replace(/^.*\./, "").toLowerCase();
17098
- let hasPath = last.length < path12.length;
17693
+ let hasPath = last.length < path14.length;
17099
17694
  let hasDot = ext.length < last.length - 1;
17100
17695
  return (hasDot || !hasPath) && this._types[ext] || null;
17101
17696
  };
@@ -17131,7 +17726,7 @@ var require_mime = __commonJS({
17131
17726
  });
17132
17727
 
17133
17728
  // ../@aws-cdk/cdk-assets-lib/lib/private/fs-extra.ts
17134
- async function pathExists(pathName) {
17729
+ async function pathExists2(pathName) {
17135
17730
  try {
17136
17731
  await pfs.stat(pathName);
17137
17732
  return true;
@@ -17142,13 +17737,13 @@ async function pathExists(pathName) {
17142
17737
  return false;
17143
17738
  }
17144
17739
  }
17145
- var fs9, pfs;
17740
+ var fs10, pfs;
17146
17741
  var init_fs_extra = __esm({
17147
17742
  "../@aws-cdk/cdk-assets-lib/lib/private/fs-extra.ts"() {
17148
17743
  "use strict";
17149
- fs9 = __toESM(require("fs"));
17150
- pfs = fs9.promises;
17151
- __name(pathExists, "pathExists");
17744
+ fs10 = __toESM(require("fs"));
17745
+ pfs = fs10.promises;
17746
+ __name(pathExists2, "pathExists");
17152
17747
  }
17153
17748
  });
17154
17749
 
@@ -17171,13 +17766,13 @@ async function cached(cache6, key, factory) {
17171
17766
  cache6.set(key, fresh);
17172
17767
  return fresh;
17173
17768
  }
17174
- var import_fs, path10, import_cloud_assembly_schema2, mime, EMPTY_ZIP_FILE_SIZE, FileAssetHandler, BucketInformation;
17769
+ var import_fs2, path12, import_cloud_assembly_schema3, mime, EMPTY_ZIP_FILE_SIZE, FileAssetHandler, BucketInformation;
17175
17770
  var init_files = __esm({
17176
17771
  "../@aws-cdk/cdk-assets-lib/lib/private/handlers/files.ts"() {
17177
17772
  "use strict";
17178
- import_fs = require("fs");
17179
- path10 = __toESM(require("path"));
17180
- import_cloud_assembly_schema2 = __toESM(require_lib2());
17773
+ import_fs2 = require("fs");
17774
+ path12 = __toESM(require("path"));
17775
+ import_cloud_assembly_schema3 = __toESM(require_lib2());
17181
17776
  mime = __toESM(require_mime());
17182
17777
  init_client_options();
17183
17778
  init_progress();
@@ -17191,7 +17786,7 @@ var init_files = __esm({
17191
17786
  this.workDir = workDir;
17192
17787
  this.asset = asset;
17193
17788
  this.host = host;
17194
- this.fileCacheRoot = path10.join(workDir, ".cache");
17789
+ this.fileCacheRoot = path12.join(workDir, ".cache");
17195
17790
  }
17196
17791
  workDir;
17197
17792
  asset;
@@ -17306,7 +17901,7 @@ var init_files = __esm({
17306
17901
  {
17307
17902
  Bucket: destination.bucketName,
17308
17903
  Key: destination.objectKey,
17309
- Body: (0, import_fs.createReadStream)(publishFile.packagedPath),
17904
+ Body: (0, import_fs2.createReadStream)(publishFile.packagedPath),
17310
17905
  ContentType: publishFile.contentType,
17311
17906
  ChecksumAlgorithm: "SHA256"
17312
17907
  },
@@ -17320,12 +17915,12 @@ var init_files = __esm({
17320
17915
  `'path' is expected in the File asset source, got: ${JSON.stringify(source)}`
17321
17916
  );
17322
17917
  }
17323
- const fullPath = path10.resolve(this.workDir, source.path);
17324
- if (source.packaging === import_cloud_assembly_schema2.FileAssetPackaging.ZIP_DIRECTORY) {
17918
+ const fullPath = path12.resolve(this.workDir, source.path);
17919
+ if (source.packaging === import_cloud_assembly_schema3.FileAssetPackaging.ZIP_DIRECTORY) {
17325
17920
  const contentType = "application/zip";
17326
- await import_fs.promises.mkdir(this.fileCacheRoot, { recursive: true });
17327
- const packagedPath = path10.join(this.fileCacheRoot, `${this.asset.id.assetId}.zip`);
17328
- if (await pathExists(packagedPath)) {
17921
+ await import_fs2.promises.mkdir(this.fileCacheRoot, { recursive: true });
17922
+ const packagedPath = path12.join(this.fileCacheRoot, `${this.asset.id.assetId}.zip`);
17923
+ if (await pathExists2(packagedPath)) {
17329
17924
  this.host.emitMessage("cached" /* CACHED */, `From cache ${packagedPath}`);
17330
17925
  return { packagedPath, contentType };
17331
17926
  }
@@ -17464,13 +18059,13 @@ function prefixTreeChars(xs, prefix = "") {
17464
18059
  }
17465
18060
  return ret;
17466
18061
  }
17467
- var fs11, path11, import_cloud_assembly_schema3, AssetManifest, ASSET_TYPES, FileManifestEntry, DockerImageManifestEntry, DestinationIdentifier, DestinationPattern;
18062
+ var fs12, path13, import_cloud_assembly_schema4, AssetManifest, ASSET_TYPES, FileManifestEntry, DockerImageManifestEntry, DestinationIdentifier, DestinationPattern;
17468
18063
  var init_asset_manifest = __esm({
17469
18064
  "../@aws-cdk/cdk-assets-lib/lib/asset-manifest.ts"() {
17470
18065
  "use strict";
17471
- fs11 = __toESM(require("fs"));
17472
- path11 = __toESM(require("path"));
17473
- import_cloud_assembly_schema3 = __toESM(require_lib2());
18066
+ fs12 = __toESM(require("fs"));
18067
+ path13 = __toESM(require("path"));
18068
+ import_cloud_assembly_schema4 = __toESM(require_lib2());
17474
18069
  AssetManifest = class _AssetManifest {
17475
18070
  constructor(directory, manifest) {
17476
18071
  this.manifest = manifest;
@@ -17489,8 +18084,8 @@ var init_asset_manifest = __esm({
17489
18084
  */
17490
18085
  static fromFile(fileName) {
17491
18086
  try {
17492
- const obj = import_cloud_assembly_schema3.Manifest.loadAssetManifest(fileName);
17493
- return new _AssetManifest(path11.dirname(fileName), obj);
18087
+ const obj = import_cloud_assembly_schema4.Manifest.loadAssetManifest(fileName);
18088
+ return new _AssetManifest(path13.dirname(fileName), obj);
17494
18089
  } catch (e6) {
17495
18090
  throw new Error(`Cannot read asset manifest '${fileName}': ${e6.message}`);
17496
18091
  }
@@ -17503,12 +18098,12 @@ var init_asset_manifest = __esm({
17503
18098
  static fromPath(filePath) {
17504
18099
  let st;
17505
18100
  try {
17506
- st = fs11.statSync(filePath);
18101
+ st = fs12.statSync(filePath);
17507
18102
  } catch (e6) {
17508
18103
  throw new Error(`Cannot read asset manifest at '${filePath}': ${e6.message}`);
17509
18104
  }
17510
18105
  if (st.isDirectory()) {
17511
- return _AssetManifest.fromFile(path11.join(filePath, _AssetManifest.DEFAULT_FILENAME));
18106
+ return _AssetManifest.fromFile(path13.join(filePath, _AssetManifest.DEFAULT_FILENAME));
17512
18107
  }
17513
18108
  return _AssetManifest.fromFile(filePath);
17514
18109
  }
@@ -19704,12 +20299,12 @@ var init_TypeRegistry = __esm({
19704
20299
  this.namespace = namespace;
19705
20300
  this.schemas = schemas;
19706
20301
  this.exceptions = exceptions;
19707
- }
19708
- static for(namespace) {
19709
20302
  if (!_TypeRegistry.registries.has(namespace)) {
19710
- _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace));
20303
+ _TypeRegistry.registries.set(namespace, this);
19711
20304
  }
19712
- return _TypeRegistry.registries.get(namespace);
20305
+ }
20306
+ static for(namespace) {
20307
+ return _TypeRegistry.registries.get(namespace) ?? new _TypeRegistry(namespace);
19713
20308
  }
19714
20309
  copyFrom(other) {
19715
20310
  const { schemas, exceptions } = this;
@@ -19727,7 +20322,9 @@ var init_TypeRegistry = __esm({
19727
20322
  register(shapeId, schema) {
19728
20323
  const qualifiedName = this.normalizeShapeId(shapeId);
19729
20324
  for (const r6 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) {
19730
- r6.schemas.set(qualifiedName, schema);
20325
+ if (!r6.schemas.has(qualifiedName)) {
20326
+ r6.schemas.set(qualifiedName, schema);
20327
+ }
19731
20328
  }
19732
20329
  }
19733
20330
  getSchema(shapeId) {
@@ -19752,9 +20349,12 @@ var init_TypeRegistry = __esm({
19752
20349
  registerError(es, ctor) {
19753
20350
  const $error = es;
19754
20351
  const ns = $error[1];
20352
+ const qualifiedName = ns + "#" + $error[2];
19755
20353
  for (const r6 of [this, _TypeRegistry.for(ns)]) {
19756
- r6.schemas.set(ns + "#" + $error[2], $error);
19757
- r6.exceptions.set($error, ctor);
20354
+ if (!r6.schemas.has(qualifiedName) && !r6.exceptions.has($error)) {
20355
+ r6.schemas.set(qualifiedName, $error);
20356
+ r6.exceptions.set($error, ctor);
20357
+ }
19758
20358
  }
19759
20359
  }
19760
20360
  getErrorCtor(es) {
@@ -19911,20 +20511,27 @@ var init_command = __esm({
19911
20511
  }
19912
20512
  const stack = clientStack.concat(this.middlewareStack);
19913
20513
  const { logger: logger2 } = configuration;
20514
+ const additionalSmithyContext = additionalContext[import_types2.SMITHY_CONTEXT_KEY];
19914
20515
  const handlerExecutionContext = {
19915
20516
  logger: logger2,
19916
20517
  clientName,
19917
20518
  commandName,
19918
20519
  inputFilterSensitiveLog,
19919
20520
  outputFilterSensitiveLog,
20521
+ ...additionalContext,
19920
20522
  [import_types2.SMITHY_CONTEXT_KEY]: {
20523
+ ...additionalSmithyContext,
19921
20524
  commandInstance: this,
19922
- ...smithyContext
19923
- },
19924
- ...additionalContext
20525
+ ...smithyContext,
20526
+ ...options?.metricsRecorder === void 0 ? {} : { metricsRecorder: options.metricsRecorder }
20527
+ }
19925
20528
  };
19926
20529
  const { requestHandler } = configuration;
19927
20530
  let requestOptions = options ?? {};
20531
+ if (requestOptions.metricsRecorder) {
20532
+ requestOptions = { ...requestOptions };
20533
+ delete requestOptions.metricsRecorder;
20534
+ }
19928
20535
  if (smithyContext.eventStream) {
19929
20536
  requestOptions = {
19930
20537
  isEventStream: true,
@@ -20130,10 +20737,25 @@ var init_exceptions = __esm({
20130
20737
  return _ServiceException.isInstance(instance);
20131
20738
  }
20132
20739
  if (_ServiceException.isInstance(instance)) {
20133
- if (candidate.name && this.name) {
20134
- return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;
20740
+ if (this.prototype.isPrototypeOf(instance)) {
20741
+ return true;
20742
+ }
20743
+ const targetName = this.name;
20744
+ if (!targetName || !candidate.name) {
20745
+ return false;
20746
+ }
20747
+ if (candidate.name === targetName) {
20748
+ return true;
20749
+ }
20750
+ let proto = Object.getPrototypeOf(candidate);
20751
+ while (proto && proto !== Object.prototype) {
20752
+ const ctorName = proto.constructor?.name;
20753
+ if (ctorName && ctorName !== "Error" && ctorName === targetName) {
20754
+ return true;
20755
+ }
20756
+ proto = Object.getPrototypeOf(proto);
20135
20757
  }
20136
- return this.prototype.isPrototypeOf(instance);
20758
+ return false;
20137
20759
  }
20138
20760
  return false;
20139
20761
  }
@@ -22035,14 +22657,14 @@ var init_readFile = __esm({
22035
22657
  import_promises2 = require("node:fs/promises");
22036
22658
  filePromises = {};
22037
22659
  fileIntercept = {};
22038
- readFile2 = /* @__PURE__ */ __name((path12, options) => {
22039
- if (fileIntercept[path12] !== void 0) {
22040
- return fileIntercept[path12];
22660
+ readFile2 = /* @__PURE__ */ __name((path14, options) => {
22661
+ if (fileIntercept[path14] !== void 0) {
22662
+ return fileIntercept[path14];
22041
22663
  }
22042
- if (!filePromises[path12] || options?.ignoreCache) {
22043
- filePromises[path12] = (0, import_promises2.readFile)(path12, "utf8");
22664
+ if (!filePromises[path14] || options?.ignoreCache) {
22665
+ filePromises[path14] = (0, import_promises2.readFile)(path14, "utf8");
22044
22666
  }
22045
- return filePromises[path12];
22667
+ return filePromises[path14];
22046
22668
  }, "readFile");
22047
22669
  }
22048
22670
  });
@@ -22154,8 +22776,8 @@ var init_externalDataInterceptor = __esm({
22154
22776
  getFileRecord() {
22155
22777
  return fileIntercept;
22156
22778
  },
22157
- interceptFile(path12, contents) {
22158
- fileIntercept[path12] = Promise.resolve(contents);
22779
+ interceptFile(path14, contents) {
22780
+ fileIntercept[path14] = Promise.resolve(contents);
22159
22781
  },
22160
22782
  getTokenRecord() {
22161
22783
  return tokenIntercept;
@@ -22954,8 +23576,8 @@ var init_createConfigValueProvider = __esm({
22954
23576
  return endpoint.url.href;
22955
23577
  }
22956
23578
  if ("hostname" in endpoint) {
22957
- const { protocol, hostname, port, path: path12 } = endpoint;
22958
- return `${protocol}//${hostname}${port ? ":" + port : ""}${path12}`;
23579
+ const { protocol, hostname, port, path: path14 } = endpoint;
23580
+ return `${protocol}//${hostname}${port ? ":" + port : ""}${path14}`;
22959
23581
  }
22960
23582
  }
22961
23583
  return endpoint;
@@ -23346,18 +23968,18 @@ var getAttrPathList;
23346
23968
  var init_getAttrPathList = __esm({
23347
23969
  "../../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js"() {
23348
23970
  init_types2();
23349
- getAttrPathList = /* @__PURE__ */ __name((path12) => {
23350
- const parts = path12.split(".");
23971
+ getAttrPathList = /* @__PURE__ */ __name((path14) => {
23972
+ const parts = path14.split(".");
23351
23973
  const pathList = [];
23352
23974
  for (const part of parts) {
23353
23975
  const squareBracketIndex = part.indexOf("[");
23354
23976
  if (squareBracketIndex !== -1) {
23355
23977
  if (part.indexOf("]") !== part.length - 1) {
23356
- throw new EndpointError(`Path: '${path12}' does not end with ']'`);
23978
+ throw new EndpointError(`Path: '${path14}' does not end with ']'`);
23357
23979
  }
23358
23980
  const arrayIndex = part.slice(squareBracketIndex + 1, -1);
23359
23981
  if (Number.isNaN(parseInt(arrayIndex))) {
23360
- throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path12}'`);
23982
+ throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path14}'`);
23361
23983
  }
23362
23984
  if (squareBracketIndex !== 0) {
23363
23985
  pathList.push(part.slice(0, squareBracketIndex));
@@ -23378,9 +24000,9 @@ var init_getAttr = __esm({
23378
24000
  "../../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js"() {
23379
24001
  init_types2();
23380
24002
  init_getAttrPathList();
23381
- getAttr = /* @__PURE__ */ __name((value, path12) => getAttrPathList(path12).reduce((acc, index) => {
24003
+ getAttr = /* @__PURE__ */ __name((value, path14) => getAttrPathList(path14).reduce((acc, index) => {
23382
24004
  if (typeof acc !== "object") {
23383
- throw new EndpointError(`Index '${index}' in '${path12}' not found in '${JSON.stringify(value)}'`);
24005
+ throw new EndpointError(`Index '${index}' in '${path14}' not found in '${JSON.stringify(value)}'`);
23384
24006
  } else if (Array.isArray(acc)) {
23385
24007
  const i6 = parseInt(index);
23386
24008
  return acc[i6 < 0 ? acc.length + i6 : i6];
@@ -23442,8 +24064,8 @@ var init_parseURL = __esm({
23442
24064
  return value;
23443
24065
  }
23444
24066
  if (typeof value === "object" && "hostname" in value) {
23445
- const { hostname: hostname2, port, protocol: protocol2 = "", path: path12 = "", query = {} } = value;
23446
- const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path12}`);
24067
+ const { hostname: hostname2, port, protocol: protocol2 = "", path: path14 = "", query = {} } = value;
24068
+ const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path14}`);
23447
24069
  url.search = Object.entries(query).map(([k6, v]) => `${k6}=${v}`).join("&");
23448
24070
  return url;
23449
24071
  }
@@ -24602,6 +25224,8 @@ var init_getAwsChunkedEncodingStream_browser = __esm({
24602
25224
  const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
24603
25225
  const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
24604
25226
  const digest3 = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0;
25227
+ Promise.resolve(digest3).catch(() => {
25228
+ });
24605
25229
  const reader = readableStream.getReader();
24606
25230
  return new ReadableStream({
24607
25231
  async pull(controller) {
@@ -24638,9 +25262,12 @@ function getAwsChunkedEncodingStream2(stream, options) {
24638
25262
  const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
24639
25263
  const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
24640
25264
  const digest3 = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : void 0;
25265
+ Promise.resolve(digest3).catch(() => {
25266
+ });
24641
25267
  const awsChunkedEncodingStream = new import_node_stream4.Readable({
24642
- read: /* @__PURE__ */ __name(() => {
24643
- }, "read")
25268
+ read() {
25269
+ readable.resume();
25270
+ }
24644
25271
  });
24645
25272
  readable.on("data", (data) => {
24646
25273
  const length = bodyLengthChecker(data) || 0;
@@ -24650,19 +25277,29 @@ function getAwsChunkedEncodingStream2(stream, options) {
24650
25277
  awsChunkedEncodingStream.push(`${length.toString(16)}\r
24651
25278
  `);
24652
25279
  awsChunkedEncodingStream.push(data);
24653
- awsChunkedEncodingStream.push("\r\n");
25280
+ if (!awsChunkedEncodingStream.push("\r\n")) {
25281
+ readable.pause();
25282
+ }
25283
+ });
25284
+ readable.on("error", (err) => {
25285
+ awsChunkedEncodingStream.destroy(err);
24654
25286
  });
25287
+ readable.pause();
24655
25288
  readable.on("end", async () => {
24656
- awsChunkedEncodingStream.push(`0\r
25289
+ try {
25290
+ awsChunkedEncodingStream.push(`0\r
24657
25291
  `);
24658
- if (checksumRequired) {
24659
- const checksum = base64Encoder(await digest3);
24660
- awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r
25292
+ if (checksumRequired) {
25293
+ const checksum = base64Encoder(await digest3);
25294
+ awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r
24661
25295
  `);
24662
- awsChunkedEncodingStream.push(`\r
25296
+ awsChunkedEncodingStream.push(`\r
24663
25297
  `);
25298
+ }
25299
+ awsChunkedEncodingStream.push(null);
25300
+ } catch (err) {
25301
+ awsChunkedEncodingStream.destroy(err);
24664
25302
  }
24665
- awsChunkedEncodingStream.push(null);
24666
25303
  });
24667
25304
  return awsChunkedEncodingStream;
24668
25305
  }
@@ -27008,7 +27645,7 @@ var init_HttpProtocol = __esm({
27008
27645
  constructor(options) {
27009
27646
  super();
27010
27647
  this.options = options;
27011
- this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace);
27648
+ this.compositeErrorRegistry = new TypeRegistry(options.defaultNamespace);
27012
27649
  for (const etr of options.errorTypeRegistries ?? []) {
27013
27650
  this.compositeErrorRegistry.copyFrom(etr);
27014
27651
  }
@@ -27102,6 +27739,44 @@ var init_HttpProtocol = __esm({
27102
27739
  cfId: output.headers["x-amz-cf-id"]
27103
27740
  };
27104
27741
  }
27742
+ resolveError(name, namespaces, registries) {
27743
+ const defaultErrorSchema = [-3, "", "Error", 0, [], [], 0];
27744
+ let schema;
27745
+ for (const registry of registries) {
27746
+ for (const ns of namespaces) {
27747
+ try {
27748
+ if (ns === "*") {
27749
+ schema = registry.getSchema(name);
27750
+ } else {
27751
+ schema = registry.getSchema(ns + "#" + name);
27752
+ }
27753
+ const errorCtor = registry.getErrorCtor(schema);
27754
+ if (errorCtor) {
27755
+ return [schema, errorCtor, "modeled"];
27756
+ } else {
27757
+ const syntheticErrorSchema = registry.getBaseException();
27758
+ if (syntheticErrorSchema) {
27759
+ const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
27760
+ if (syntheticErrorCtor) {
27761
+ return [schema, syntheticErrorCtor, "synthetic"];
27762
+ }
27763
+ }
27764
+ }
27765
+ } catch (ignored) {
27766
+ }
27767
+ }
27768
+ }
27769
+ for (const registry of registries) {
27770
+ const syntheticErrorSchema = registry.getBaseException();
27771
+ if (syntheticErrorSchema) {
27772
+ const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
27773
+ if (syntheticErrorCtor) {
27774
+ return [syntheticErrorSchema, syntheticErrorCtor, "synthetic"];
27775
+ }
27776
+ }
27777
+ }
27778
+ return [defaultErrorSchema, Error, "native"];
27779
+ }
27105
27780
  async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
27106
27781
  const eventStreamSerde = await this.loadEventStreamCapability();
27107
27782
  return eventStreamSerde.serializeEventStream({
@@ -27130,13 +27805,6 @@ var init_HttpProtocol = __esm({
27130
27805
  compositeErrorRegistry: this.compositeErrorRegistry
27131
27806
  });
27132
27807
  }
27133
- resolveEventStreamMarshaller(importedProvider) {
27134
- const context = this.serdeContext;
27135
- if (context.eventStreamMarshaller) {
27136
- return context.eventStreamMarshaller;
27137
- }
27138
- return importedProvider(this.serdeContext);
27139
- }
27140
27808
  getDefaultContentType() {
27141
27809
  throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
27142
27810
  }
@@ -27155,6 +27823,13 @@ var init_HttpProtocol = __esm({
27155
27823
  }
27156
27824
  return context.eventStreamMarshaller;
27157
27825
  }
27826
+ resolveEventStreamMarshaller(importedProvider) {
27827
+ const context = this.serdeContext;
27828
+ if (context.eventStreamMarshaller) {
27829
+ return context.eventStreamMarshaller;
27830
+ }
27831
+ return importedProvider(this.serdeContext);
27832
+ }
27158
27833
  };
27159
27834
  }
27160
27835
  });
@@ -27201,11 +27876,11 @@ var init_HttpBindingProtocol = __esm({
27201
27876
  const opTraits = translateTraits(operationSchema.traits);
27202
27877
  if (opTraits.http) {
27203
27878
  request.method = opTraits.http[0];
27204
- const [path12, search] = opTraits.http[1].split("?");
27879
+ const [path14, search] = opTraits.http[1].split("?");
27205
27880
  if (request.path == "/") {
27206
- request.path = path12;
27881
+ request.path = path14;
27207
27882
  } else {
27208
- request.path += path12;
27883
+ request.path += path14;
27209
27884
  }
27210
27885
  const traitSearchParams = new URLSearchParams(search ?? "");
27211
27886
  for (const [key, value] of traitSearchParams) {
@@ -27623,8 +28298,8 @@ var init_requestBuilder = __esm({
27623
28298
  return this;
27624
28299
  }
27625
28300
  p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
27626
- this.resolvePathStack.push((path12) => {
27627
- this.path = resolvedPath(path12, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
28301
+ this.resolvePathStack.push((path14) => {
28302
+ this.path = resolvedPath(path14, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
27628
28303
  });
27629
28304
  return this;
27630
28305
  }
@@ -28244,7 +28919,7 @@ var init_service_error_classification = __esm({
28244
28919
  return errorMessages.has(error2.message);
28245
28920
  }, "isBrowserNetworkError");
28246
28921
  isThrottlingError = /* @__PURE__ */ __name((error2) => error2.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error2.name) || error2.$retryable?.throttling == true, "isThrottlingError");
28247
- isTransientError = /* @__PURE__ */ __name((error2, depth = 0) => isRetryableByTrait(error2) || isClockSkewCorrectedError(error2) || error2.name === "InvalidSignatureException" && error2.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error2.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error2?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error2?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error2.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error2) || isNodeJsHttp2TransientError(error2) || error2.cause !== void 0 && depth <= 10 && isTransientError(error2.cause, depth + 1), "isTransientError");
28922
+ isTransientError = /* @__PURE__ */ __name((error2, depth = 0) => error2?.name !== "AbortError" && (isRetryableByTrait(error2) || isClockSkewCorrectedError(error2) || error2.name === "InvalidSignatureException" && error2.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error2.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error2?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error2?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error2.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error2) || isNodeJsHttp2TransientError(error2) || error2.cause !== void 0 && depth <= 10 && isTransientError(error2.cause, depth + 1)), "isTransientError");
28248
28923
  isServerError = /* @__PURE__ */ __name((error2) => {
28249
28924
  if (error2.$metadata?.httpStatusCode !== void 0) {
28250
28925
  const statusCode = error2.$metadata.httpStatusCode;
@@ -29810,9 +30485,9 @@ var init_createPaginator = __esm({
29810
30485
  return await client.send(command6, ...args);
29811
30486
  }, "makePagedClientRequest");
29812
30487
  __name(createPaginator, "createPaginator");
29813
- get = /* @__PURE__ */ __name((fromObject, path12) => {
30488
+ get = /* @__PURE__ */ __name((fromObject, path14) => {
29814
30489
  let cursor2 = fromObject;
29815
- const pathComponents = path12.split(".");
30490
+ const pathComponents = path14.split(".");
29816
30491
  for (const step of pathComponents) {
29817
30492
  if (!cursor2 || typeof cursor2 !== "object") {
29818
30493
  return void 0;
@@ -32099,7 +32774,7 @@ var init_resolveAwsSdkSigV4AConfig = __esm({
32099
32774
  // ../../node_modules/@smithy/signature-v4/dist-cjs/index.js
32100
32775
  var require_dist_cjs2 = __commonJS({
32101
32776
  "../../node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2) {
32102
- var { fromUtf8: fromUtf83, fromHex: fromHex2, toHex: toHex2, toUint8Array: toUint8Array2, isArrayBuffer: isArrayBuffer2 } = (init_serde(), __toCommonJS(serde_exports));
32777
+ var { hasOwn: hasOwn2, fromUtf8: fromUtf83, fromHex: fromHex2, toHex: toHex2, toUint8Array: toUint8Array2, isArrayBuffer: isArrayBuffer2 } = (init_serde(), __toCommonJS(serde_exports));
32103
32778
  var { normalizeProvider: normalizeProvider3 } = (init_client2(), __toCommonJS(client_exports));
32104
32779
  var { escapeUri: escapeUri2, HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
32105
32780
  var HeaderFormatter = class {
@@ -32108,7 +32783,9 @@ var require_dist_cjs2 = __commonJS({
32108
32783
  }
32109
32784
  format(headers) {
32110
32785
  const chunks = [];
32111
- for (const headerName of Object.keys(headers)) {
32786
+ for (const headerName in headers) {
32787
+ if (!hasOwn2(headers, headerName))
32788
+ continue;
32112
32789
  const bytes = fromUtf83(headerName);
32113
32790
  chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
32114
32791
  }
@@ -32123,27 +32800,27 @@ var require_dist_cjs2 = __commonJS({
32123
32800
  formatHeaderValue(header) {
32124
32801
  switch (header.type) {
32125
32802
  case "boolean":
32126
- return Uint8Array.from([header.value ? HEADER_VALUE_TYPE2.boolTrue : HEADER_VALUE_TYPE2.boolFalse]);
32803
+ return Uint8Array.from([header.value ? 0 : 1]);
32127
32804
  case "byte":
32128
- return Uint8Array.from([HEADER_VALUE_TYPE2.byte, header.value]);
32805
+ return Uint8Array.from([2, header.value]);
32129
32806
  case "short":
32130
32807
  const shortView = new DataView(new ArrayBuffer(3));
32131
- shortView.setUint8(0, HEADER_VALUE_TYPE2.short);
32808
+ shortView.setUint8(0, 3);
32132
32809
  shortView.setInt16(1, header.value, false);
32133
32810
  return new Uint8Array(shortView.buffer);
32134
32811
  case "integer":
32135
32812
  const intView = new DataView(new ArrayBuffer(5));
32136
- intView.setUint8(0, HEADER_VALUE_TYPE2.integer);
32813
+ intView.setUint8(0, 4);
32137
32814
  intView.setInt32(1, header.value, false);
32138
32815
  return new Uint8Array(intView.buffer);
32139
32816
  case "long":
32140
32817
  const longBytes = new Uint8Array(9);
32141
- longBytes[0] = HEADER_VALUE_TYPE2.long;
32818
+ longBytes[0] = 5;
32142
32819
  longBytes.set(header.value.bytes, 1);
32143
32820
  return longBytes;
32144
32821
  case "binary":
32145
32822
  const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
32146
- binView.setUint8(0, HEADER_VALUE_TYPE2.byteArray);
32823
+ binView.setUint8(0, 6);
32147
32824
  binView.setUint16(1, header.value.byteLength, false);
32148
32825
  const binBytes = new Uint8Array(binView.buffer);
32149
32826
  binBytes.set(header.value, 3);
@@ -32151,14 +32828,14 @@ var require_dist_cjs2 = __commonJS({
32151
32828
  case "string":
32152
32829
  const utf8Bytes = fromUtf83(header.value);
32153
32830
  const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
32154
- strView.setUint8(0, HEADER_VALUE_TYPE2.string);
32831
+ strView.setUint8(0, 7);
32155
32832
  strView.setUint16(1, utf8Bytes.byteLength, false);
32156
32833
  const strBytes = new Uint8Array(strView.buffer);
32157
32834
  strBytes.set(utf8Bytes, 3);
32158
32835
  return strBytes;
32159
32836
  case "timestamp":
32160
32837
  const tsBytes = new Uint8Array(9);
32161
- tsBytes[0] = HEADER_VALUE_TYPE2.timestamp;
32838
+ tsBytes[0] = 8;
32162
32839
  tsBytes.set(Int642.fromNumber(header.value.valueOf()).bytes, 1);
32163
32840
  return tsBytes;
32164
32841
  case "uuid":
@@ -32166,7 +32843,7 @@ var require_dist_cjs2 = __commonJS({
32166
32843
  throw new Error(`Invalid UUID received: ${header.value}`);
32167
32844
  }
32168
32845
  const uuidBytes = new Uint8Array(17);
32169
- uuidBytes[0] = HEADER_VALUE_TYPE2.uuid;
32846
+ uuidBytes[0] = 9;
32170
32847
  uuidBytes.set(fromHex2(header.value.replace(/-/g, "")), 1);
32171
32848
  return uuidBytes;
32172
32849
  }
@@ -32279,7 +32956,9 @@ var require_dist_cjs2 = __commonJS({
32279
32956
  var getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => {
32280
32957
  const keys = [];
32281
32958
  const serialized = {};
32282
- for (const key of Object.keys(query)) {
32959
+ for (const key in query) {
32960
+ if (!hasOwn2(query, key))
32961
+ continue;
32283
32962
  if (key.toLowerCase() === SIGNATURE_HEADER) {
32284
32963
  continue;
32285
32964
  }
@@ -32344,10 +33023,10 @@ ${longDate}
32344
33023
  ${credentialScope}
32345
33024
  ${toHex2(hashedRequest)}`;
32346
33025
  }
32347
- getCanonicalPath({ path: path12 }) {
33026
+ getCanonicalPath({ path: path14 }) {
32348
33027
  if (this.uriEscapePath) {
32349
33028
  const normalizedPathSegments = [];
32350
- for (const pathSegment of path12.split("/")) {
33029
+ for (const pathSegment of path14.split("/")) {
32351
33030
  if (pathSegment?.length === 0)
32352
33031
  continue;
32353
33032
  if (pathSegment === ".")
@@ -32358,11 +33037,11 @@ ${toHex2(hashedRequest)}`;
32358
33037
  normalizedPathSegments.push(pathSegment);
32359
33038
  }
32360
33039
  }
32361
- const normalizedPath = `${path12?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path12?.endsWith("/") ? "/" : ""}`;
33040
+ const normalizedPath = `${path14?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path14?.endsWith("/") ? "/" : ""}`;
32362
33041
  const doubleEncoded = escapeUri2(normalizedPath);
32363
33042
  return doubleEncoded.replace(/%2F/g, "/");
32364
33043
  }
32365
- return path12;
33044
+ return path14;
32366
33045
  }
32367
33046
  validateResolvedCredentials(credentials) {
32368
33047
  if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
@@ -32427,7 +33106,9 @@ ${toHex2(hashedRequest)}`;
32427
33106
  return canonical;
32428
33107
  }, "getCanonicalHeaders");
32429
33108
  var getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => {
32430
- for (const headerName of Object.keys(headers)) {
33109
+ for (const headerName in headers) {
33110
+ if (!hasOwn2(headers, headerName))
33111
+ continue;
32431
33112
  if (headerName.toLowerCase() === SHA256_HEADER) {
32432
33113
  return headers[headerName];
32433
33114
  }
@@ -32443,7 +33124,9 @@ ${toHex2(hashedRequest)}`;
32443
33124
  }, "getPayloadHash");
32444
33125
  var hasHeader2 = /* @__PURE__ */ __name((soughtHeader, headers) => {
32445
33126
  soughtHeader = soughtHeader.toLowerCase();
32446
- for (const headerName of Object.keys(headers)) {
33127
+ for (const headerName in headers) {
33128
+ if (!hasOwn2(headers, headerName))
33129
+ continue;
32447
33130
  if (soughtHeader === headerName.toLowerCase()) {
32448
33131
  return true;
32449
33132
  }
@@ -32452,7 +33135,9 @@ ${toHex2(hashedRequest)}`;
32452
33135
  }, "hasHeader");
32453
33136
  var moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => {
32454
33137
  const { headers, query = {} } = HttpRequest2.clone(request);
32455
- for (const name of Object.keys(headers)) {
33138
+ for (const name in headers) {
33139
+ if (!hasOwn2(headers, name))
33140
+ continue;
32456
33141
  const lname = name.toLowerCase();
32457
33142
  if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {
32458
33143
  query[name] = headers[name];
@@ -32467,7 +33152,9 @@ ${toHex2(hashedRequest)}`;
32467
33152
  }, "moveHeadersToQuery");
32468
33153
  var prepareRequest = /* @__PURE__ */ __name((request) => {
32469
33154
  request = HttpRequest2.clone(request);
32470
- for (const headerName of Object.keys(request.headers)) {
33155
+ for (const headerName in request.headers) {
33156
+ if (!hasOwn2(request.headers, headerName))
33157
+ continue;
32471
33158
  if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
32472
33159
  delete request.headers[headerName];
32473
33160
  }
@@ -33549,12 +34236,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33549
34236
  const password = request.password ?? "";
33550
34237
  auth = `${username}:${password}`;
33551
34238
  }
33552
- let path12 = request.path;
34239
+ let path14 = request.path;
33553
34240
  if (queryString) {
33554
- path12 += `?${queryString}`;
34241
+ path14 += `?${queryString}`;
33555
34242
  }
33556
34243
  if (request.fragment) {
33557
- path12 += `#${request.fragment}`;
34244
+ path14 += `#${request.fragment}`;
33558
34245
  }
33559
34246
  let hostname = request.hostname ?? "";
33560
34247
  if (hostname[0] === "[" && hostname.endsWith("]")) {
@@ -33566,7 +34253,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33566
34253
  headers: request.headers,
33567
34254
  host: hostname,
33568
34255
  method: request.method,
33569
- path: path12,
34256
+ path: path14,
33570
34257
  port: request.port,
33571
34258
  agent,
33572
34259
  auth
@@ -33715,6 +34402,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33715
34402
  destroy() {
33716
34403
  this.refs = 0;
33717
34404
  if (!this.session.destroyed) {
34405
+ this.session.setTimeout(0);
33718
34406
  this.session.destroy();
33719
34407
  }
33720
34408
  }
@@ -33833,9 +34521,8 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33833
34521
  session.on("error", ensureDestroyed);
33834
34522
  session.on("frameError", ensureDestroyed);
33835
34523
  session.on("close", ensureDestroyed);
33836
- if (connectionConfiguration.requestTimeout) {
33837
- session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);
33838
- }
34524
+ const timeout = connectionConfiguration.requestTimeout ?? 3e5;
34525
+ session.setTimeout(timeout, ensureDestroyed);
33839
34526
  ref.retain();
33840
34527
  return ref;
33841
34528
  }
@@ -33987,16 +34674,16 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33987
34674
  reject(err);
33988
34675
  }, "rejectWithDestroy");
33989
34676
  const queryString = query ? buildQueryString2(query) : "";
33990
- let path12 = request.path;
34677
+ let path14 = request.path;
33991
34678
  if (queryString) {
33992
- path12 += `?${queryString}`;
34679
+ path14 += `?${queryString}`;
33993
34680
  }
33994
34681
  if (request.fragment) {
33995
- path12 += `#${request.fragment}`;
34682
+ path14 += `#${request.fragment}`;
33996
34683
  }
33997
34684
  const clientHttp2Stream = session.request({
33998
34685
  ...request.headers,
33999
- [constants.HTTP2_HEADER_PATH]: path12,
34686
+ [constants.HTTP2_HEADER_PATH]: path14,
34000
34687
  [constants.HTTP2_HEADER_METHOD]: method
34001
34688
  });
34002
34689
  if (effectiveRequestTimeout) {
@@ -34038,6 +34725,9 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
34038
34725
  resolve5({ response: httpResponse });
34039
34726
  if (useIsolatedSession) {
34040
34727
  session.close();
34728
+ clientHttp2Stream.on("end", () => {
34729
+ ref.destroy();
34730
+ });
34041
34731
  }
34042
34732
  });
34043
34733
  clientHttp2Stream.on("close", () => {
@@ -34047,7 +34737,11 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
34047
34737
  this.connectionManager.release(requestContext, ref);
34048
34738
  }
34049
34739
  if (!fulfilled) {
34050
- rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
34740
+ const error2 = new Error("Unexpected error: http2 request did not get a response");
34741
+ if (session.destroyed) {
34742
+ error2.name = "TimeoutError";
34743
+ }
34744
+ rejectWithDestroy(error2);
34051
34745
  }
34052
34746
  });
34053
34747
  writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);
@@ -34078,7 +34772,7 @@ var require_dist_cjs6 = __commonJS({
34078
34772
  var { setCredentialFeature: setCredentialFeature2 } = (init_client3(), __toCommonJS(client_exports2));
34079
34773
  var { CredentialsProviderError: CredentialsProviderError2 } = (init_config2(), __toCommonJS(config_exports));
34080
34774
  var { NodeHttpHandler } = require_dist_cjs5();
34081
- var fs13 = require("node:fs/promises");
34775
+ var fs14 = require("node:fs/promises");
34082
34776
  var { HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
34083
34777
  var { sdkStreamMixin: sdkStreamMixin3, parseRfc3339DateTime: parseRfc3339DateTime2 } = (init_serde(), __toCommonJS(serde_exports));
34084
34778
  var ECS_CONTAINER_HOST = "169.254.170.2";
@@ -34204,7 +34898,7 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
34204
34898
  const provider = retryWrapper(async () => {
34205
34899
  const request = createGetRequest(url);
34206
34900
  if (tokenFile) {
34207
- request.headers.Authorization = validateToken((await fs13.readFile(tokenFile)).toString());
34901
+ request.headers.Authorization = validateToken((await fs14.readFile(tokenFile)).toString());
34208
34902
  } else if (token) {
34209
34903
  request.headers.Authorization = validateToken(token);
34210
34904
  }
@@ -34319,7 +35013,7 @@ var init_package = __esm({
34319
35013
  "../../node_modules/@aws-sdk/nested-clients/package.json"() {
34320
35014
  package_default = {
34321
35015
  name: "@aws-sdk/nested-clients",
34322
- version: "3.997.44",
35016
+ version: "3.997.46",
34323
35017
  description: "Nested clients for AWS SDK packages.",
34324
35018
  homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
34325
35019
  license: "Apache-2.0",
@@ -34419,13 +35113,13 @@ var init_package = __esm({
34419
35113
  "test:watch": "yarn g:vitest watch"
34420
35114
  },
34421
35115
  dependencies: {
34422
- "@aws-sdk/core": "^3.977.9",
34423
- "@aws-sdk/signature-v4-multi-region": "^3.996.46",
34424
- "@aws-sdk/types": "^3.974.5",
34425
- "@smithy/core": "^3.33.3",
34426
- "@smithy/fetch-http-handler": "^5.7.2",
34427
- "@smithy/node-http-handler": "^4.11.3",
34428
- "@smithy/types": "^4.17.2",
35116
+ "@aws-sdk/core": "^3.978.1",
35117
+ "@aws-sdk/signature-v4-multi-region": "^3.996.47",
35118
+ "@aws-sdk/types": "^3.974.6",
35119
+ "@smithy/core": "^3.35.0",
35120
+ "@smithy/fetch-http-handler": "^5.8.0",
35121
+ "@smithy/node-http-handler": "^4.12.1",
35122
+ "@smithy/types": "^4.19.0",
34429
35123
  tslib: "^2.6.2"
34430
35124
  },
34431
35125
  devDependencies: {
@@ -34470,7 +35164,6 @@ var init_cbor_types = __esm({
34470
35164
  var loadSmithyRpcV2CborErrorCode;
34471
35165
  var init_parseCborBody = __esm({
34472
35166
  "../../node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js"() {
34473
- init_transport();
34474
35167
  loadSmithyRpcV2CborErrorCode = /* @__PURE__ */ __name((output, data) => {
34475
35168
  const sanitizeErrorCode2 = /* @__PURE__ */ __name((rawValue) => {
34476
35169
  let cleanValue = rawValue;
@@ -34483,26 +35176,11 @@ var init_parseCborBody = __esm({
34483
35176
  if (cleanValue.indexOf(":") >= 0) {
34484
35177
  cleanValue = cleanValue.split(":")[0];
34485
35178
  }
34486
- if (cleanValue.indexOf("#") >= 0) {
34487
- cleanValue = cleanValue.split("#")[1];
34488
- }
34489
35179
  return cleanValue;
34490
35180
  }, "sanitizeErrorCode");
34491
35181
  if (data["__type"] !== void 0) {
34492
35182
  return sanitizeErrorCode2(data["__type"]);
34493
35183
  }
34494
- let codeKey;
34495
- for (const key in data) {
34496
- if (!hasOwn(data, key))
34497
- continue;
34498
- if (key.toLowerCase() === "code") {
34499
- codeKey = key;
34500
- break;
34501
- }
34502
- }
34503
- if (codeKey && data[codeKey] !== void 0) {
34504
- return sanitizeErrorCode2(data[codeKey]);
34505
- }
34506
35184
  }, "loadSmithyRpcV2CborErrorCode");
34507
35185
  }
34508
35186
  });
@@ -35860,11 +36538,11 @@ var init_SmithyRpcV2CborProtocol = __esm({
35860
36538
  }
35861
36539
  }
35862
36540
  const { service, operation: operation2 } = getSmithyContext(context);
35863
- const path12 = `/service/${service}/operation/${operation2}`;
36541
+ const path14 = `/service/${service}/operation/${operation2}`;
35864
36542
  if (request.path.endsWith("/")) {
35865
- request.path += path12.slice(1);
36543
+ request.path += path14.slice(1);
35866
36544
  } else {
35867
- request.path += path12;
36545
+ request.path += path14;
35868
36546
  }
35869
36547
  return request;
35870
36548
  }
@@ -35872,36 +36550,37 @@ var init_SmithyRpcV2CborProtocol = __esm({
35872
36550
  return super.deserializeResponse(operationSchema, context, response);
35873
36551
  }
35874
36552
  async handleError(operationSchema, context, response, dataObject, metadata) {
35875
- const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
36553
+ const errorIdentifier = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
36554
+ const preferredNamespaces = ["*"];
36555
+ const { defaultNamespace } = this.options;
36556
+ preferredNamespaces.unshift(defaultNamespace);
36557
+ const [namespace, errorShapeName] = (() => {
36558
+ if (errorIdentifier.includes("#")) {
36559
+ return errorIdentifier.split("#");
36560
+ }
36561
+ return [void 0, errorIdentifier];
36562
+ })();
36563
+ if (namespace) {
36564
+ preferredNamespaces.unshift(namespace);
36565
+ }
35876
36566
  const errorMetadata = {
35877
36567
  $metadata: metadata,
35878
- $fault: response.statusCode <= 500 ? "client" : "server"
36568
+ $fault: response.statusCode < 500 ? "client" : "server"
35879
36569
  };
35880
- let namespace = this.options.defaultNamespace;
35881
- if (errorName.includes("#")) {
35882
- [namespace] = errorName.split("#");
35883
- }
35884
- const registry = this.compositeErrorRegistry;
35885
- const nsRegistry = TypeRegistry.for(namespace);
35886
- registry.copyFrom(nsRegistry);
35887
- let errorSchema;
35888
- try {
35889
- errorSchema = registry.getSchema(errorName);
35890
- } catch (ignored) {
36570
+ const preferredRegistries = [this.compositeErrorRegistry];
36571
+ if (namespace) {
36572
+ preferredRegistries.push(TypeRegistry.for(namespace));
36573
+ }
36574
+ preferredRegistries.push(TypeRegistry.for(defaultNamespace));
36575
+ const [errorSchema, ErrorCtor, errorMode] = this.resolveError(errorShapeName, preferredNamespaces, preferredRegistries);
36576
+ if (errorMode === "native" || errorMode === "synthetic") {
35891
36577
  if (dataObject.Message) {
35892
36578
  dataObject.message = dataObject.Message;
35893
36579
  }
35894
- const syntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace);
35895
- registry.copyFrom(syntheticRegistry);
35896
- const baseExceptionSchema = registry.getBaseException();
35897
- if (baseExceptionSchema) {
35898
- const ErrorCtor2 = registry.getErrorCtor(baseExceptionSchema);
35899
- throw Object.assign(new ErrorCtor2({ name: errorName }), errorMetadata, dataObject);
35900
- }
35901
- throw Object.assign(new Error(errorName), errorMetadata, dataObject);
36580
+ const error2 = errorMode === "synthetic" ? new ErrorCtor({ name: errorShapeName }) : new Error(errorShapeName);
36581
+ throw Object.assign(error2, errorMetadata, dataObject);
35902
36582
  }
35903
36583
  const ns = NormalizedSchema.of(errorSchema);
35904
- const ErrorCtor = registry.getErrorCtor(errorSchema);
35905
36584
  const message = dataObject.message ?? dataObject.Message ?? "Unknown";
35906
36585
  const exception = new ErrorCtor({});
35907
36586
  const output = {};
@@ -39947,10 +40626,10 @@ var init_schemas_0 = __esm({
39947
40626
  _se = "server";
39948
40627
  _tT = "tokenType";
39949
40628
  n0 = "com.amazonaws.ssooidc";
39950
- _s_registry = TypeRegistry.for(_s);
40629
+ _s_registry = new TypeRegistry(_s);
39951
40630
  SSOOIDCServiceException$ = [-3, _s, "SSOOIDCServiceException", 0, [], []];
39952
40631
  _s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);
39953
- n0_registry = TypeRegistry.for(n0);
40632
+ n0_registry = new TypeRegistry(n0);
39954
40633
  AccessDeniedException$ = [
39955
40634
  -3,
39956
40635
  n0,
@@ -40898,10 +41577,10 @@ var init_schemas_02 = __esm({
40898
41577
  _sT = "sessionToken";
40899
41578
  _xasbt = "x-amz-sso_bearer_token";
40900
41579
  n02 = "com.amazonaws.sso";
40901
- _s_registry2 = TypeRegistry.for(_s2);
41580
+ _s_registry2 = new TypeRegistry(_s2);
40902
41581
  SSOServiceException$ = [-3, _s2, "SSOServiceException", 0, [], []];
40903
41582
  _s_registry2.registerError(SSOServiceException$, SSOServiceException);
40904
- n0_registry2 = TypeRegistry.for(n02);
41583
+ n0_registry2 = new TypeRegistry(n02);
40905
41584
  InvalidRequestException$2 = [
40906
41585
  -3,
40907
41586
  n02,
@@ -42105,7 +42784,7 @@ var init_errors3 = __esm({
42105
42784
  });
42106
42785
 
42107
42786
  // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js
42108
- var _A, _AKI, _AR, _ARI, _ARR, _ARRs, _ARU, _ARWWI, _ARWWIR, _ARWWIRs, _Au, _C, _CA, _DS, _E, _EI, _ETE2, _IDPCEE, _IDPRCE, _IITE, _K, _MPDE, _P, _PA, _PAr, _PC, _PCLT, _PCr, _PDT, _PI, _PPS, _PPTLE, _Pr, _RA, _RDE, _RSN, _SAK, _SFWIT, _SI, _SN, _ST, _T, _TC, _TTK, _Ta, _V, _WIT, _a, _aKST, _aQE, _c3, _cTT, _e3, _hE3, _m2, _pDLT, _s3, _tLT, n03, _s_registry3, STSServiceException$, n0_registry3, ExpiredTokenException$2, IDPCommunicationErrorException$, IDPRejectedClaimException$, InvalidIdentityTokenException$, MalformedPolicyDocumentException$, PackedPolicyTooLargeException$, RegionDisabledException$, errorTypeRegistries3, accessKeySecretType, clientTokenType, AssumedRoleUser$, AssumeRoleRequest$, AssumeRoleResponse$, AssumeRoleWithWebIdentityRequest$, AssumeRoleWithWebIdentityResponse$, Credentials$, PolicyDescriptorType$, ProvidedContext$, Tag$, policyDescriptorListType, ProvidedContextsListType, tagKeyListType, tagListType, AssumeRole$, AssumeRoleWithWebIdentity$;
42787
+ var _A, _AKI, _AR, _ARI, _ARR, _ARRs, _ARU, _ARWWI, _ARWWIR, _ARWWIRs, _Au, _C, _CA, _DS, _E, _EI, _ETE2, _IDPCEE, _IDPRCE, _IITE, _K, _MPDE, _MSTS, _P, _PA, _PAr, _PC, _PCLT, _PCr, _PDT, _PI, _PPS, _PPTLE, _Pr, _RA, _RDE, _RSN, _SAK, _SFWIT, _SI, _SN, _ST, _STS, _STU, _T, _TC, _TTK, _Ta, _V, _WIT, _a, _aKST, _aQE, _c3, _cTT, _e3, _hE3, _m2, _pDLT, _s3, _tLT, n03, _s_registry3, STSServiceException$, n0_registry3, ExpiredTokenException$2, IDPCommunicationErrorException$, IDPRejectedClaimException$, InvalidIdentityTokenException$, MalformedPolicyDocumentException$, PackedPolicyTooLargeException$, RegionDisabledException$, errorTypeRegistries3, accessKeySecretType, clientTokenType, AssumedRoleUser$, AssumeRoleRequest$, AssumeRoleResponse$, AssumeRoleWithWebIdentityRequest$, AssumeRoleWithWebIdentityResponse$, Credentials$, PolicyDescriptorType$, ProvidedContext$, Tag$, policyDescriptorListType, ProvidedContextsListType, tagKeyListType, tagListType, AssumeRole$, AssumeRoleWithWebIdentity$;
42109
42788
  var init_schemas_03 = __esm({
42110
42789
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js"() {
42111
42790
  init_schema4();
@@ -42133,6 +42812,7 @@ var init_schemas_03 = __esm({
42133
42812
  _IITE = "InvalidIdentityTokenException";
42134
42813
  _K = "Key";
42135
42814
  _MPDE = "MalformedPolicyDocumentException";
42815
+ _MSTS = "MinimumSessionTokenSize";
42136
42816
  _P = "Policy";
42137
42817
  _PA = "PolicyArns";
42138
42818
  _PAr = "ProviderArn";
@@ -42152,6 +42832,8 @@ var init_schemas_03 = __esm({
42152
42832
  _SI = "SourceIdentity";
42153
42833
  _SN = "SerialNumber";
42154
42834
  _ST = "SessionToken";
42835
+ _STS = "SessionTokenSize";
42836
+ _STU = "SessionTokenUtilization";
42155
42837
  _T = "Tags";
42156
42838
  _TC = "TokenCode";
42157
42839
  _TTK = "TransitiveTagKeys";
@@ -42170,10 +42852,10 @@ var init_schemas_03 = __esm({
42170
42852
  _s3 = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
42171
42853
  _tLT = "tagListType";
42172
42854
  n03 = "com.amazonaws.sts";
42173
- _s_registry3 = TypeRegistry.for(_s3);
42855
+ _s_registry3 = new TypeRegistry(_s3);
42174
42856
  STSServiceException$ = [-3, _s3, "STSServiceException", 0, [], []];
42175
42857
  _s_registry3.registerError(STSServiceException$, STSServiceException);
42176
- n0_registry3 = TypeRegistry.for(n03);
42858
+ n0_registry3 = new TypeRegistry(n03);
42177
42859
  ExpiredTokenException$2 = [
42178
42860
  -3,
42179
42861
  n03,
@@ -42257,8 +42939,8 @@ var init_schemas_03 = __esm({
42257
42939
  n03,
42258
42940
  _ARR,
42259
42941
  0,
42260
- [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
42261
- [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
42942
+ [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC, _MSTS],
42943
+ [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType, 1],
42262
42944
  2
42263
42945
  ];
42264
42946
  AssumeRoleResponse$ = [
@@ -42266,16 +42948,16 @@ var init_schemas_03 = __esm({
42266
42948
  n03,
42267
42949
  _ARRs,
42268
42950
  0,
42269
- [_C, _ARU, _PPS, _SI],
42270
- [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0]
42951
+ [_C, _ARU, _PPS, _SI, _STU, _STS],
42952
+ [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0, 1, 1]
42271
42953
  ];
42272
42954
  AssumeRoleWithWebIdentityRequest$ = [
42273
42955
  3,
42274
42956
  n03,
42275
42957
  _ARWWIR,
42276
42958
  0,
42277
- [_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
42278
- [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
42959
+ [_RA, _RSN, _WIT, _PI, _PA, _P, _DS, _MSTS],
42960
+ [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1, 1],
42279
42961
  3
42280
42962
  ];
42281
42963
  AssumeRoleWithWebIdentityResponse$ = [
@@ -42283,8 +42965,8 @@ var init_schemas_03 = __esm({
42283
42965
  n03,
42284
42966
  _ARWWIRs,
42285
42967
  0,
42286
- [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
42287
- [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0]
42968
+ [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI, _STU, _STS],
42969
+ [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0, 1, 1]
42288
42970
  ];
42289
42971
  Credentials$ = [
42290
42972
  3,
@@ -43324,10 +44006,10 @@ var init_schemas_04 = __esm({
43324
44006
  _tT2 = "tokenType";
43325
44007
  _tt = "token_type";
43326
44008
  n04 = "com.amazonaws.signin";
43327
- _s_registry4 = TypeRegistry.for(_s4);
44009
+ _s_registry4 = new TypeRegistry(_s4);
43328
44010
  SigninServiceException$ = [-3, _s4, "SigninServiceException", 0, [], []];
43329
44011
  _s_registry4.registerError(SigninServiceException$, SigninServiceException);
43330
- n0_registry4 = TypeRegistry.for(n04);
44012
+ n0_registry4 = new TypeRegistry(n04);
43331
44013
  AccessDeniedException$2 = [
43332
44014
  -3,
43333
44015
  n04,
@@ -43825,7 +44507,7 @@ var require_dist_cjs11 = __commonJS({
43825
44507
  var { createHash: createHash6, createPrivateKey, createPublicKey, sign: sign3 } = require("node:crypto");
43826
44508
  var { promises: promises2 } = require("node:fs");
43827
44509
  var { homedir: homedir3 } = require("node:os");
43828
- var { dirname: dirname3, join: join14 } = require("node:path");
44510
+ var { dirname: dirname3, join: join15 } = require("node:path");
43829
44511
  var LoginCredentialsFetcher = class _LoginCredentialsFetcher {
43830
44512
  static {
43831
44513
  __name(this, "LoginCredentialsFetcher");
@@ -43992,10 +44674,10 @@ var require_dist_cjs11 = __commonJS({
43992
44674
  await promises2.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
43993
44675
  }
43994
44676
  getTokenFilePath() {
43995
- const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join14(homedir3(), ".aws", "login", "cache");
44677
+ const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join15(homedir3(), ".aws", "login", "cache");
43996
44678
  const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
43997
44679
  const loginSessionSha256 = createHash6("sha256").update(loginSessionBytes).digest("hex");
43998
- return join14(directory, `${loginSessionSha256}.json`);
44680
+ return join15(directory, `${loginSessionSha256}.json`);
43999
44681
  }
44000
44682
  derToRawSignature(derSignature) {
44001
44683
  let offset = 2;
@@ -44486,6 +45168,7 @@ var require_dist_cjs15 = __commonJS({
44486
45168
  if (!passiveLock) {
44487
45169
  passiveLock = chain3(options).then((c6) => {
44488
45170
  credentials = c6;
45171
+ }).catch(() => {
44489
45172
  }).finally(() => {
44490
45173
  passiveLock = void 0;
44491
45174
  });
@@ -66183,10 +66866,10 @@ var init_schemas_05 = __esm({
66183
66866
  _s5 = "smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity";
66184
66867
  _se3 = "server";
66185
66868
  n05 = "com.amazonaws.cognitoidentity";
66186
- _s_registry5 = TypeRegistry.for(_s5);
66869
+ _s_registry5 = new TypeRegistry(_s5);
66187
66870
  CognitoIdentityServiceException$ = [-3, _s5, "CognitoIdentityServiceException", 0, [], []];
66188
66871
  _s_registry5.registerError(CognitoIdentityServiceException$, CognitoIdentityServiceException);
66189
- n0_registry5 = TypeRegistry.for(n05);
66872
+ n0_registry5 = new TypeRegistry(n05);
66190
66873
  ExternalServiceException$ = [
66191
66874
  -3,
66192
66875
  n05,
@@ -67972,7 +68655,7 @@ var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function(
67972
68655
  };
67973
68656
  })();
67974
68657
  Object.defineProperty(exports, "__esModule", { value: true });
67975
- var fs12 = __importStar(require("fs"));
68658
+ var fs13 = __importStar(require("fs"));
67976
68659
  var cdk_assets_lib_1 = require_lib4();
67977
68660
  var docker_credentials_1 = (init_docker_credentials(), __toCommonJS(docker_credentials_exports));
67978
68661
  async function main() {
@@ -67983,9 +68666,9 @@ async function main() {
67983
68666
  if (!config) {
67984
68667
  throw new Error(`unable to find CDK Docker credentials at: ${(0, docker_credentials_1.cdkCredentialsConfigFile)()}`);
67985
68668
  }
67986
- let endpoint = fs12.readFileSync(0, { encoding: "utf-8" }).trim();
68669
+ let endpoint = fs13.readFileSync(0, { encoding: "utf-8" }).trim();
67987
68670
  const credentials = await (0, docker_credentials_1.fetchDockerLoginCredentials)(new cdk_assets_lib_1.DefaultAwsClient(), config, endpoint);
67988
- fs12.writeFileSync(1, JSON.stringify(credentials));
68671
+ fs13.writeFileSync(1, JSON.stringify(credentials));
67989
68672
  }
67990
68673
  __name(main, "main");
67991
68674
  main().catch((e6) => {