cdk-assets 4.7.2 → 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.
package/bin/cdk-assets.js CHANGED
@@ -151,8 +151,8 @@ var require_windows = __commonJS({
151
151
  "../../node_modules/isexe/windows.js"(exports2, module2) {
152
152
  module2.exports = isexe;
153
153
  isexe.sync = sync;
154
- var fs13 = require("fs");
155
- function checkPathExt(path13, options) {
154
+ var fs14 = require("fs");
155
+ function checkPathExt(path15, options) {
156
156
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
157
157
  if (!pathext) {
158
158
  return true;
@@ -163,28 +163,28 @@ var require_windows = __commonJS({
163
163
  }
164
164
  for (var i6 = 0; i6 < pathext.length; i6++) {
165
165
  var p3 = pathext[i6].toLowerCase();
166
- if (p3 && path13.substr(-p3.length).toLowerCase() === p3) {
166
+ if (p3 && path15.substr(-p3.length).toLowerCase() === p3) {
167
167
  return true;
168
168
  }
169
169
  }
170
170
  return false;
171
171
  }
172
172
  __name(checkPathExt, "checkPathExt");
173
- function checkStat(stat, path13, options) {
173
+ function checkStat(stat, path15, options) {
174
174
  if (!stat.isSymbolicLink() && !stat.isFile()) {
175
175
  return false;
176
176
  }
177
- return checkPathExt(path13, options);
177
+ return checkPathExt(path15, options);
178
178
  }
179
179
  __name(checkStat, "checkStat");
180
- function isexe(path13, options, cb) {
181
- fs13.stat(path13, function(er, stat) {
182
- cb(er, er ? false : checkStat(stat, path13, options));
180
+ function isexe(path15, options, cb) {
181
+ fs14.stat(path15, function(er, stat) {
182
+ cb(er, er ? false : checkStat(stat, path15, options));
183
183
  });
184
184
  }
185
185
  __name(isexe, "isexe");
186
- function sync(path13, options) {
187
- return checkStat(fs13.statSync(path13), path13, options);
186
+ function sync(path15, options) {
187
+ return checkStat(fs14.statSync(path15), path15, options);
188
188
  }
189
189
  __name(sync, "sync");
190
190
  }
@@ -195,15 +195,15 @@ var require_mode = __commonJS({
195
195
  "../../node_modules/isexe/mode.js"(exports2, module2) {
196
196
  module2.exports = isexe;
197
197
  isexe.sync = sync;
198
- var fs13 = require("fs");
199
- function isexe(path13, options, cb) {
200
- fs13.stat(path13, function(er, stat) {
198
+ var fs14 = require("fs");
199
+ function isexe(path15, options, cb) {
200
+ fs14.stat(path15, function(er, stat) {
201
201
  cb(er, er ? false : checkStat(stat, options));
202
202
  });
203
203
  }
204
204
  __name(isexe, "isexe");
205
- function sync(path13, options) {
206
- return checkStat(fs13.statSync(path13), options);
205
+ function sync(path15, options) {
206
+ return checkStat(fs14.statSync(path15), options);
207
207
  }
208
208
  __name(sync, "sync");
209
209
  function checkStat(stat, options) {
@@ -230,7 +230,7 @@ var require_mode = __commonJS({
230
230
  // ../../node_modules/isexe/index.js
231
231
  var require_isexe = __commonJS({
232
232
  "../../node_modules/isexe/index.js"(exports2, module2) {
233
- var fs13 = require("fs");
233
+ var fs14 = require("fs");
234
234
  var core;
235
235
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
236
236
  core = require_windows();
@@ -239,7 +239,7 @@ var require_isexe = __commonJS({
239
239
  }
240
240
  module2.exports = isexe;
241
241
  isexe.sync = sync;
242
- function isexe(path13, options, cb) {
242
+ function isexe(path15, options, cb) {
243
243
  if (typeof options === "function") {
244
244
  cb = options;
245
245
  options = {};
@@ -249,7 +249,7 @@ var require_isexe = __commonJS({
249
249
  throw new TypeError("callback not provided");
250
250
  }
251
251
  return new Promise(function(resolve5, reject) {
252
- isexe(path13, options || {}, function(er, is) {
252
+ isexe(path15, options || {}, function(er, is) {
253
253
  if (er) {
254
254
  reject(er);
255
255
  } else {
@@ -258,7 +258,7 @@ var require_isexe = __commonJS({
258
258
  });
259
259
  });
260
260
  }
261
- core(path13, options || {}, function(er, is) {
261
+ core(path15, options || {}, function(er, is) {
262
262
  if (er) {
263
263
  if (er.code === "EACCES" || options && options.ignoreErrors) {
264
264
  er = null;
@@ -269,9 +269,9 @@ var require_isexe = __commonJS({
269
269
  });
270
270
  }
271
271
  __name(isexe, "isexe");
272
- function sync(path13, options) {
272
+ function sync(path15, options) {
273
273
  try {
274
- return core.sync(path13, options || {});
274
+ return core.sync(path15, options || {});
275
275
  } catch (er) {
276
276
  if (options && options.ignoreErrors || er.code === "EACCES") {
277
277
  return false;
@@ -288,7 +288,7 @@ var require_isexe = __commonJS({
288
288
  var require_which = __commonJS({
289
289
  "../../node_modules/cross-spawn/node_modules/which/which.js"(exports2, module2) {
290
290
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
291
- var path13 = require("path");
291
+ var path15 = require("path");
292
292
  var COLON2 = isWindows ? ";" : ":";
293
293
  var isexe = require_isexe();
294
294
  var getNotFoundError = /* @__PURE__ */ __name((cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), "getNotFoundError");
@@ -326,7 +326,7 @@ var require_which = __commonJS({
326
326
  return opt.all && found.length ? resolve5(found) : reject(getNotFoundError(cmd));
327
327
  const ppRaw = pathEnv[i6];
328
328
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
329
- const pCmd = path13.join(pathPart, cmd);
329
+ const pCmd = path15.join(pathPart, cmd);
330
330
  const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
331
331
  resolve5(subStep(p3, i6, 0));
332
332
  }), "step");
@@ -353,7 +353,7 @@ var require_which = __commonJS({
353
353
  for (let i6 = 0; i6 < pathEnv.length; i6++) {
354
354
  const ppRaw = pathEnv[i6];
355
355
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
356
- const pCmd = path13.join(pathPart, cmd);
356
+ const pCmd = path15.join(pathPart, cmd);
357
357
  const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
358
358
  for (let j6 = 0; j6 < pathExt.length; j6++) {
359
359
  const cur = p3 + pathExt[j6];
@@ -401,7 +401,7 @@ var require_path_key = __commonJS({
401
401
  var require_resolveCommand = __commonJS({
402
402
  "../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
403
403
  "use strict";
404
- var path13 = require("path");
404
+ var path15 = require("path");
405
405
  var which = require_which();
406
406
  var getPathKey = require_path_key();
407
407
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -419,7 +419,7 @@ var require_resolveCommand = __commonJS({
419
419
  try {
420
420
  resolved = which.sync(parsed.command, {
421
421
  path: env2[getPathKey({ env: env2 })],
422
- pathExt: withoutPathExt ? path13.delimiter : void 0
422
+ pathExt: withoutPathExt ? path15.delimiter : void 0
423
423
  });
424
424
  } catch (e6) {
425
425
  } finally {
@@ -428,7 +428,7 @@ var require_resolveCommand = __commonJS({
428
428
  }
429
429
  }
430
430
  if (resolved) {
431
- resolved = path13.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
431
+ resolved = path15.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
432
432
  }
433
433
  return resolved;
434
434
  }
@@ -486,8 +486,8 @@ var require_shebang_command = __commonJS({
486
486
  if (!match) {
487
487
  return null;
488
488
  }
489
- const [path13, argument] = match[0].replace(/#! ?/, "").split(" ");
490
- const binary = path13.split("/").pop();
489
+ const [path15, argument] = match[0].replace(/#! ?/, "").split(" ");
490
+ const binary = path15.split("/").pop();
491
491
  if (binary === "env") {
492
492
  return argument;
493
493
  }
@@ -500,16 +500,16 @@ var require_shebang_command = __commonJS({
500
500
  var require_readShebang = __commonJS({
501
501
  "../../node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
502
502
  "use strict";
503
- var fs13 = require("fs");
503
+ var fs14 = require("fs");
504
504
  var shebangCommand = require_shebang_command();
505
505
  function readShebang(command6) {
506
506
  const size = 150;
507
507
  const buffer = Buffer.alloc(size);
508
508
  let fd;
509
509
  try {
510
- fd = fs13.openSync(command6, "r");
511
- fs13.readSync(fd, buffer, 0, size, 0);
512
- fs13.closeSync(fd);
510
+ fd = fs14.openSync(command6, "r");
511
+ fs14.readSync(fd, buffer, 0, size, 0);
512
+ fs14.closeSync(fd);
513
513
  } catch (e6) {
514
514
  }
515
515
  return shebangCommand(buffer.toString());
@@ -523,7 +523,7 @@ var require_readShebang = __commonJS({
523
523
  var require_parse = __commonJS({
524
524
  "../../node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
525
525
  "use strict";
526
- var path13 = require("path");
526
+ var path15 = require("path");
527
527
  var resolveCommand = require_resolveCommand();
528
528
  var escape = require_escape();
529
529
  var readShebang = require_readShebang();
@@ -549,7 +549,7 @@ var require_parse = __commonJS({
549
549
  const needsShell = !isExecutableRegExp.test(commandFile);
550
550
  if (parsed.options.forceShell || needsShell) {
551
551
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
552
- parsed.command = path13.normalize(parsed.command);
552
+ parsed.command = path15.normalize(parsed.command);
553
553
  parsed.command = escape.command(parsed.command);
554
554
  parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
555
555
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -793,6 +793,7 @@ var require_subprocess = __commonJS({
793
793
  async function runUserCommandLine(commandLine, options = {}) {
794
794
  const child = child_process.spawn(commandLine, {
795
795
  ...spawnOptions(options),
796
+ // eslint-disable-next-line no-restricted-syntax -- this is the single sanctioned shell entry point (see the module header)
796
797
  shell: true
797
798
  });
798
799
  return monitor(child, commandLine, options);
@@ -1030,7 +1031,7 @@ var require_path = __commonJS({
1030
1031
  Object.defineProperty(exports2, "__esModule", { value: true });
1031
1032
  exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
1032
1033
  var os5 = require("os");
1033
- var path13 = require("path");
1034
+ var path15 = require("path");
1034
1035
  var IS_WINDOWS_PLATFORM = os5.platform() === "win32";
1035
1036
  var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
1036
1037
  var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
@@ -1043,7 +1044,7 @@ var require_path = __commonJS({
1043
1044
  __name(unixify, "unixify");
1044
1045
  exports2.unixify = unixify;
1045
1046
  function makeAbsolute(cwd, filepath) {
1046
- return path13.resolve(cwd, filepath);
1047
+ return path15.resolve(cwd, filepath);
1047
1048
  }
1048
1049
  __name(makeAbsolute, "makeAbsolute");
1049
1050
  exports2.makeAbsolute = makeAbsolute;
@@ -2360,7 +2361,7 @@ var require_braces = __commonJS({
2360
2361
  var require_constants2 = __commonJS({
2361
2362
  "../../node_modules/micromatch/node_modules/picomatch/lib/constants.js"(exports2, module2) {
2362
2363
  "use strict";
2363
- var path13 = require("path");
2364
+ var path15 = require("path");
2364
2365
  var WIN_SLASH = "\\\\/";
2365
2366
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
2366
2367
  var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
@@ -2534,7 +2535,7 @@ var require_constants2 = __commonJS({
2534
2535
  /* | */
2535
2536
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
2536
2537
  /* \uFEFF */
2537
- SEP: path13.sep,
2538
+ SEP: path15.sep,
2538
2539
  /**
2539
2540
  * Create EXTGLOB_CHARS
2540
2541
  */
@@ -2561,7 +2562,7 @@ var require_constants2 = __commonJS({
2561
2562
  var require_utils2 = __commonJS({
2562
2563
  "../../node_modules/micromatch/node_modules/picomatch/lib/utils.js"(exports2) {
2563
2564
  "use strict";
2564
- var path13 = require("path");
2565
+ var path15 = require("path");
2565
2566
  var win32 = process.platform === "win32";
2566
2567
  var {
2567
2568
  REGEX_BACKSLASH,
@@ -2590,7 +2591,7 @@ var require_utils2 = __commonJS({
2590
2591
  if (options && typeof options.windows === "boolean") {
2591
2592
  return options.windows;
2592
2593
  }
2593
- return win32 === true || path13.sep === "\\";
2594
+ return win32 === true || path15.sep === "\\";
2594
2595
  };
2595
2596
  exports2.escapeLast = (input, char, lastIdx) => {
2596
2597
  const idx = input.lastIndexOf(char, lastIdx);
@@ -3954,7 +3955,7 @@ var require_parse3 = __commonJS({
3954
3955
  var require_picomatch = __commonJS({
3955
3956
  "../../node_modules/micromatch/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
3956
3957
  "use strict";
3957
- var path13 = require("path");
3958
+ var path15 = require("path");
3958
3959
  var scan = require_scan();
3959
3960
  var parse3 = require_parse3();
3960
3961
  var utils = require_utils2();
@@ -4039,7 +4040,7 @@ var require_picomatch = __commonJS({
4039
4040
  };
4040
4041
  picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
4041
4042
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
4042
- return regex.test(path13.basename(input));
4043
+ return regex.test(path15.basename(input));
4043
4044
  };
4044
4045
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
4045
4046
  picomatch.parse = (pattern, options) => {
@@ -4266,7 +4267,7 @@ var require_pattern = __commonJS({
4266
4267
  "use strict";
4267
4268
  Object.defineProperty(exports2, "__esModule", { value: true });
4268
4269
  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;
4269
- var path13 = require("path");
4270
+ var path15 = require("path");
4270
4271
  var globParent = require_glob_parent();
4271
4272
  var micromatch = require_micromatch();
4272
4273
  var GLOBSTAR = "**";
@@ -4376,7 +4377,7 @@ var require_pattern = __commonJS({
4376
4377
  __name(endsWithSlashGlobStar, "endsWithSlashGlobStar");
4377
4378
  exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
4378
4379
  function isAffectDepthOfReadingPattern(pattern) {
4379
- const basename = path13.basename(pattern);
4380
+ const basename = path15.basename(pattern);
4380
4381
  return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
4381
4382
  }
4382
4383
  __name(isAffectDepthOfReadingPattern, "isAffectDepthOfReadingPattern");
@@ -4443,7 +4444,7 @@ var require_pattern = __commonJS({
4443
4444
  __name(partitionAbsoluteAndRelative, "partitionAbsoluteAndRelative");
4444
4445
  exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
4445
4446
  function isAbsolute(pattern) {
4446
- return path13.isAbsolute(pattern);
4447
+ return path15.isAbsolute(pattern);
4447
4448
  }
4448
4449
  __name(isAbsolute, "isAbsolute");
4449
4450
  exports2.isAbsolute = isAbsolute;
@@ -4632,10 +4633,10 @@ var require_utils3 = __commonJS({
4632
4633
  exports2.array = array;
4633
4634
  var errno = require_errno();
4634
4635
  exports2.errno = errno;
4635
- var fs13 = require_fs();
4636
- exports2.fs = fs13;
4637
- var path13 = require_path();
4638
- exports2.path = path13;
4636
+ var fs14 = require_fs();
4637
+ exports2.fs = fs14;
4638
+ var path15 = require_path();
4639
+ exports2.path = path15;
4639
4640
  var pattern = require_pattern();
4640
4641
  exports2.pattern = pattern;
4641
4642
  var stream = require_stream();
@@ -4755,8 +4756,8 @@ var require_async = __commonJS({
4755
4756
  "use strict";
4756
4757
  Object.defineProperty(exports2, "__esModule", { value: true });
4757
4758
  exports2.read = void 0;
4758
- function read(path13, settings, callback) {
4759
- settings.fs.lstat(path13, (lstatError, lstat) => {
4759
+ function read(path15, settings, callback) {
4760
+ settings.fs.lstat(path15, (lstatError, lstat) => {
4760
4761
  if (lstatError !== null) {
4761
4762
  callFailureCallback(callback, lstatError);
4762
4763
  return;
@@ -4765,7 +4766,7 @@ var require_async = __commonJS({
4765
4766
  callSuccessCallback(callback, lstat);
4766
4767
  return;
4767
4768
  }
4768
- settings.fs.stat(path13, (statError, stat) => {
4769
+ settings.fs.stat(path15, (statError, stat) => {
4769
4770
  if (statError !== null) {
4770
4771
  if (settings.throwErrorOnBrokenSymbolicLink) {
4771
4772
  callFailureCallback(callback, statError);
@@ -4800,13 +4801,13 @@ var require_sync = __commonJS({
4800
4801
  "use strict";
4801
4802
  Object.defineProperty(exports2, "__esModule", { value: true });
4802
4803
  exports2.read = void 0;
4803
- function read(path13, settings) {
4804
- const lstat = settings.fs.lstatSync(path13);
4804
+ function read(path15, settings) {
4805
+ const lstat = settings.fs.lstatSync(path15);
4805
4806
  if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
4806
4807
  return lstat;
4807
4808
  }
4808
4809
  try {
4809
- const stat = settings.fs.statSync(path13);
4810
+ const stat = settings.fs.statSync(path15);
4810
4811
  if (settings.markSymbolicLink) {
4811
4812
  stat.isSymbolicLink = () => true;
4812
4813
  }
@@ -4829,12 +4830,12 @@ var require_fs2 = __commonJS({
4829
4830
  "use strict";
4830
4831
  Object.defineProperty(exports2, "__esModule", { value: true });
4831
4832
  exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
4832
- var fs13 = require("fs");
4833
+ var fs14 = require("fs");
4833
4834
  exports2.FILE_SYSTEM_ADAPTER = {
4834
- lstat: fs13.lstat,
4835
- stat: fs13.stat,
4836
- lstatSync: fs13.lstatSync,
4837
- statSync: fs13.statSync
4835
+ lstat: fs14.lstat,
4836
+ stat: fs14.stat,
4837
+ lstatSync: fs14.lstatSync,
4838
+ statSync: fs14.statSync
4838
4839
  };
4839
4840
  function createFileSystemAdapter(fsMethods) {
4840
4841
  if (fsMethods === void 0) {
@@ -4852,7 +4853,7 @@ var require_settings = __commonJS({
4852
4853
  "../../node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
4853
4854
  "use strict";
4854
4855
  Object.defineProperty(exports2, "__esModule", { value: true });
4855
- var fs13 = require_fs2();
4856
+ var fs14 = require_fs2();
4856
4857
  var Settings = class {
4857
4858
  static {
4858
4859
  __name(this, "Settings");
@@ -4860,7 +4861,7 @@ var require_settings = __commonJS({
4860
4861
  constructor(_options = {}) {
4861
4862
  this._options = _options;
4862
4863
  this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
4863
- this.fs = fs13.createFileSystemAdapter(this._options.fs);
4864
+ this.fs = fs14.createFileSystemAdapter(this._options.fs);
4864
4865
  this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
4865
4866
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
4866
4867
  }
@@ -4882,18 +4883,18 @@ var require_out = __commonJS({
4882
4883
  var sync = require_sync();
4883
4884
  var settings_1 = require_settings();
4884
4885
  exports2.Settings = settings_1.default;
4885
- function stat(path13, optionsOrSettingsOrCallback, callback) {
4886
+ function stat(path15, optionsOrSettingsOrCallback, callback) {
4886
4887
  if (typeof optionsOrSettingsOrCallback === "function") {
4887
- async.read(path13, getSettings(), optionsOrSettingsOrCallback);
4888
+ async.read(path15, getSettings(), optionsOrSettingsOrCallback);
4888
4889
  return;
4889
4890
  }
4890
- async.read(path13, getSettings(optionsOrSettingsOrCallback), callback);
4891
+ async.read(path15, getSettings(optionsOrSettingsOrCallback), callback);
4891
4892
  }
4892
4893
  __name(stat, "stat");
4893
4894
  exports2.stat = stat;
4894
- function statSync3(path13, optionsOrSettings) {
4895
+ function statSync3(path15, optionsOrSettings) {
4895
4896
  const settings = getSettings(optionsOrSettings);
4896
- return sync.read(path13, settings);
4897
+ return sync.read(path15, settings);
4897
4898
  }
4898
4899
  __name(statSync3, "statSync");
4899
4900
  exports2.statSync = statSync3;
@@ -5026,8 +5027,8 @@ var require_utils4 = __commonJS({
5026
5027
  "use strict";
5027
5028
  Object.defineProperty(exports2, "__esModule", { value: true });
5028
5029
  exports2.fs = void 0;
5029
- var fs13 = require_fs3();
5030
- exports2.fs = fs13;
5030
+ var fs14 = require_fs3();
5031
+ exports2.fs = fs14;
5031
5032
  }
5032
5033
  });
5033
5034
 
@@ -5123,16 +5124,16 @@ var require_async2 = __commonJS({
5123
5124
  return;
5124
5125
  }
5125
5126
  const tasks = names.map((name) => {
5126
- const path13 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5127
+ const path15 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5127
5128
  return (done) => {
5128
- fsStat.stat(path13, settings.fsStatSettings, (error2, stats) => {
5129
+ fsStat.stat(path15, settings.fsStatSettings, (error2, stats) => {
5129
5130
  if (error2 !== null) {
5130
5131
  done(error2);
5131
5132
  return;
5132
5133
  }
5133
5134
  const entry = {
5134
5135
  name,
5135
- path: path13,
5136
+ path: path15,
5136
5137
  dirent: utils.fs.createDirentFromStats(name, stats)
5137
5138
  };
5138
5139
  if (settings.stats) {
@@ -5232,14 +5233,14 @@ var require_fs4 = __commonJS({
5232
5233
  "use strict";
5233
5234
  Object.defineProperty(exports2, "__esModule", { value: true });
5234
5235
  exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
5235
- var fs13 = require("fs");
5236
+ var fs14 = require("fs");
5236
5237
  exports2.FILE_SYSTEM_ADAPTER = {
5237
- lstat: fs13.lstat,
5238
- stat: fs13.stat,
5239
- lstatSync: fs13.lstatSync,
5240
- statSync: fs13.statSync,
5241
- readdir: fs13.readdir,
5242
- readdirSync: fs13.readdirSync
5238
+ lstat: fs14.lstat,
5239
+ stat: fs14.stat,
5240
+ lstatSync: fs14.lstatSync,
5241
+ statSync: fs14.statSync,
5242
+ readdir: fs14.readdir,
5243
+ readdirSync: fs14.readdirSync
5243
5244
  };
5244
5245
  function createFileSystemAdapter(fsMethods) {
5245
5246
  if (fsMethods === void 0) {
@@ -5257,9 +5258,9 @@ var require_settings2 = __commonJS({
5257
5258
  "../../node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
5258
5259
  "use strict";
5259
5260
  Object.defineProperty(exports2, "__esModule", { value: true });
5260
- var path13 = require("path");
5261
+ var path15 = require("path");
5261
5262
  var fsStat = require_out();
5262
- var fs13 = require_fs4();
5263
+ var fs14 = require_fs4();
5263
5264
  var Settings = class {
5264
5265
  static {
5265
5266
  __name(this, "Settings");
@@ -5267,8 +5268,8 @@ var require_settings2 = __commonJS({
5267
5268
  constructor(_options = {}) {
5268
5269
  this._options = _options;
5269
5270
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
5270
- this.fs = fs13.createFileSystemAdapter(this._options.fs);
5271
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path13.sep);
5271
+ this.fs = fs14.createFileSystemAdapter(this._options.fs);
5272
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep);
5272
5273
  this.stats = this._getValue(this._options.stats, false);
5273
5274
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
5274
5275
  this.fsStatSettings = new fsStat.Settings({
@@ -5295,18 +5296,18 @@ var require_out2 = __commonJS({
5295
5296
  var sync = require_sync2();
5296
5297
  var settings_1 = require_settings2();
5297
5298
  exports2.Settings = settings_1.default;
5298
- function scandir(path13, optionsOrSettingsOrCallback, callback) {
5299
+ function scandir(path15, optionsOrSettingsOrCallback, callback) {
5299
5300
  if (typeof optionsOrSettingsOrCallback === "function") {
5300
- async.read(path13, getSettings(), optionsOrSettingsOrCallback);
5301
+ async.read(path15, getSettings(), optionsOrSettingsOrCallback);
5301
5302
  return;
5302
5303
  }
5303
- async.read(path13, getSettings(optionsOrSettingsOrCallback), callback);
5304
+ async.read(path15, getSettings(optionsOrSettingsOrCallback), callback);
5304
5305
  }
5305
5306
  __name(scandir, "scandir");
5306
5307
  exports2.scandir = scandir;
5307
- function scandirSync(path13, optionsOrSettings) {
5308
+ function scandirSync(path15, optionsOrSettings) {
5308
5309
  const settings = getSettings(optionsOrSettings);
5309
- return sync.read(path13, settings);
5310
+ return sync.read(path15, settings);
5310
5311
  }
5311
5312
  __name(scandirSync, "scandirSync");
5312
5313
  exports2.scandirSync = scandirSync;
@@ -6003,7 +6004,7 @@ var require_settings3 = __commonJS({
6003
6004
  "../../node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
6004
6005
  "use strict";
6005
6006
  Object.defineProperty(exports2, "__esModule", { value: true });
6006
- var path13 = require("path");
6007
+ var path15 = require("path");
6007
6008
  var fsScandir = require_out2();
6008
6009
  var Settings = class {
6009
6010
  static {
@@ -6016,7 +6017,7 @@ var require_settings3 = __commonJS({
6016
6017
  this.deepFilter = this._getValue(this._options.deepFilter, null);
6017
6018
  this.entryFilter = this._getValue(this._options.entryFilter, null);
6018
6019
  this.errorFilter = this._getValue(this._options.errorFilter, null);
6019
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path13.sep);
6020
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep);
6020
6021
  this.fsScandirSettings = new fsScandir.Settings({
6021
6022
  followSymbolicLinks: this._options.followSymbolicLinks,
6022
6023
  fs: this._options.fs,
@@ -6082,7 +6083,7 @@ var require_reader2 = __commonJS({
6082
6083
  "../../node_modules/fast-glob/out/readers/reader.js"(exports2) {
6083
6084
  "use strict";
6084
6085
  Object.defineProperty(exports2, "__esModule", { value: true });
6085
- var path13 = require("path");
6086
+ var path15 = require("path");
6086
6087
  var fsStat = require_out();
6087
6088
  var utils = require_utils3();
6088
6089
  var Reader = class {
@@ -6098,7 +6099,7 @@ var require_reader2 = __commonJS({
6098
6099
  });
6099
6100
  }
6100
6101
  _getFullEntryPath(filepath) {
6101
- return path13.resolve(this._settings.cwd, filepath);
6102
+ return path15.resolve(this._settings.cwd, filepath);
6102
6103
  }
6103
6104
  _makeEntry(stats, pattern) {
6104
6105
  const entry = {
@@ -6538,7 +6539,7 @@ var require_provider = __commonJS({
6538
6539
  "../../node_modules/fast-glob/out/providers/provider.js"(exports2) {
6539
6540
  "use strict";
6540
6541
  Object.defineProperty(exports2, "__esModule", { value: true });
6541
- var path13 = require("path");
6542
+ var path15 = require("path");
6542
6543
  var deep_1 = require_deep();
6543
6544
  var entry_1 = require_entry();
6544
6545
  var error_1 = require_error();
@@ -6555,7 +6556,7 @@ var require_provider = __commonJS({
6555
6556
  this.entryTransformer = new entry_2.default(this._settings);
6556
6557
  }
6557
6558
  _getRootDirectory(task) {
6558
- return path13.resolve(this._settings.cwd, task.base);
6559
+ return path15.resolve(this._settings.cwd, task.base);
6559
6560
  }
6560
6561
  _getReaderOptions(task) {
6561
6562
  const basePath = task.base === "." ? "" : task.base;
@@ -6748,16 +6749,16 @@ var require_settings4 = __commonJS({
6748
6749
  "use strict";
6749
6750
  Object.defineProperty(exports2, "__esModule", { value: true });
6750
6751
  exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
6751
- var fs13 = require("fs");
6752
+ var fs14 = require("fs");
6752
6753
  var os5 = require("os");
6753
6754
  var CPU_COUNT = Math.max(os5.cpus().length, 1);
6754
6755
  exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
6755
- lstat: fs13.lstat,
6756
- lstatSync: fs13.lstatSync,
6757
- stat: fs13.stat,
6758
- statSync: fs13.statSync,
6759
- readdir: fs13.readdir,
6760
- readdirSync: fs13.readdirSync
6756
+ lstat: fs14.lstat,
6757
+ lstatSync: fs14.lstatSync,
6758
+ stat: fs14.stat,
6759
+ statSync: fs14.statSync,
6760
+ readdir: fs14.readdir,
6761
+ readdirSync: fs14.readdirSync
6761
6762
  };
6762
6763
  var Settings = class {
6763
6764
  static {
@@ -7235,7 +7236,7 @@ var require_dist = __commonJS({
7235
7236
  // ../../node_modules/yazl/index.js
7236
7237
  var require_yazl = __commonJS({
7237
7238
  "../../node_modules/yazl/index.js"(exports2) {
7238
- var fs13 = require("fs");
7239
+ var fs14 = require("fs");
7239
7240
  var Transform = require("stream").Transform;
7240
7241
  var PassThrough2 = require("stream").PassThrough;
7241
7242
  var zlib2 = require("zlib");
@@ -7266,14 +7267,14 @@ var require_yazl = __commonJS({
7266
7267
  if (shouldIgnoreAdding(self2)) return;
7267
7268
  var entry = new Entry(metadataPath, false, options);
7268
7269
  self2.entries.push(entry);
7269
- fs13.stat(realPath, function(err, stats) {
7270
+ fs14.stat(realPath, function(err, stats) {
7270
7271
  if (err) return self2.emit("error", err);
7271
7272
  if (!stats.isFile()) return self2.emit("error", new Error("not a file: " + realPath));
7272
7273
  entry.uncompressedSize = stats.size;
7273
7274
  if (options.mtime == null) entry.setLastModDate(stats.mtime);
7274
7275
  if (options.mode == null) entry.setFileAttributesMode(stats.mode);
7275
7276
  entry.setFileDataPumpFunction(function() {
7276
- var readStream = fs13.createReadStream(realPath);
7277
+ var readStream = fs14.createReadStream(realPath);
7277
7278
  entry.state = Entry.FILE_DATA_IN_PROGRESS;
7278
7279
  readStream.on("error", function(err2) {
7279
7280
  self2.emit("error", err2);
@@ -7943,7 +7944,7 @@ var require_zip = __commonJS({
7943
7944
  exports2.zipDirectory = zipDirectory2;
7944
7945
  exports2.zipString = zipString;
7945
7946
  var fs_1 = require("fs");
7946
- var path13 = __importStar2(require("path"));
7947
+ var path15 = __importStar2(require("path"));
7947
7948
  var fast_glob_1 = require_out4();
7948
7949
  var yazl_1 = require_yazl();
7949
7950
  function epoch() {
@@ -7991,7 +7992,7 @@ var require_zip = __commonJS({
7991
7992
  output.once("close", ok);
7992
7993
  zip.outputStream.pipe(output);
7993
7994
  for (const file of files) {
7994
- const fullPath = path13.resolve(directory, file);
7995
+ const fullPath = path15.resolve(directory, file);
7995
7996
  const [data, stat] = await Promise.all([fs_1.promises.readFile(fullPath), fs_1.promises.stat(fullPath)]);
7996
7997
  zip.addBuffer(data, file, {
7997
7998
  mtime: epoch(),
@@ -8079,7 +8080,7 @@ var init_tools = __esm({
8079
8080
 
8080
8081
  // ../@aws-cdk/cdk-assets-lib/lib/private/shell.ts
8081
8082
  async function shell(command6, options) {
8082
- const displayCommand = (0, tools_exports.renderForDisplay)(command6);
8083
+ const displayCommand = (0, tools_exports.renderForDisplay)(redactSensitiveArgs(command6, options.redactFlags));
8083
8084
  handleShellOutput(displayCommand, options, "open");
8084
8085
  try {
8085
8086
  const result = await (0, tools_exports.run)(command6, {
@@ -8097,10 +8098,11 @@ async function shell(command6, options) {
8097
8098
  }
8098
8099
  handleShellOutput(displayCommand, options, "close");
8099
8100
  const stderr = e6.stderr.trim();
8101
+ const message = e6.message.replace(e6.command, () => displayCommand);
8100
8102
  throw new ProcessFailed(
8101
8103
  e6.exitCode,
8102
8104
  e6.signal,
8103
- stderr ? `${e6.message}: ${stderr}` : e6.message
8105
+ stderr ? `${message}: ${stderr}` : message
8104
8106
  );
8105
8107
  }
8106
8108
  throw e6;
@@ -8109,6 +8111,9 @@ async function shell(command6, options) {
8109
8111
  function handleShellOutput(chunk, options, shellEventType) {
8110
8112
  switch (options.subprocessOutputDestination) {
8111
8113
  case "ignore":
8114
+ if (shellEventType === "open") {
8115
+ options.shellEventPublisher(shellEventType, chunk);
8116
+ }
8112
8117
  return;
8113
8118
  case "publish":
8114
8119
  options.shellEventPublisher(shellEventType, chunk);
@@ -8129,6 +8134,23 @@ function handleShellOutput(chunk, options, shellEventType) {
8129
8134
  break;
8130
8135
  }
8131
8136
  }
8137
+ function redactSensitiveArgs(argv, redactFlags) {
8138
+ if (!redactFlags || redactFlags.length === 0) {
8139
+ return [...argv];
8140
+ }
8141
+ const flags = new Set(redactFlags);
8142
+ const out = new Array();
8143
+ for (let i6 = 0; i6 < argv.length; i6++) {
8144
+ out.push(argv[i6]);
8145
+ if (flags.has(argv[i6]) && i6 + 1 < argv.length) {
8146
+ i6 += 1;
8147
+ const token = argv[i6];
8148
+ const eq = token.indexOf("=");
8149
+ out.push(eq >= 0 ? `${token.slice(0, eq + 1)}<redacted>` : "<redacted>");
8150
+ }
8151
+ }
8152
+ return out;
8153
+ }
8132
8154
  var ProcessFailed;
8133
8155
  var init_shell = __esm({
8134
8156
  "../@aws-cdk/cdk-assets-lib/lib/private/shell.ts"() {
@@ -8136,6 +8158,7 @@ var init_shell = __esm({
8136
8158
  init_tools();
8137
8159
  __name(shell, "shell");
8138
8160
  __name(handleShellOutput, "handleShellOutput");
8161
+ __name(redactSensitiveArgs, "redactSensitiveArgs");
8139
8162
  ProcessFailed = class extends Error {
8140
8163
  constructor(exitCode, signal, message) {
8141
8164
  super(message);
@@ -8250,6 +8273,10 @@ var init_docker = __esm({
8250
8273
  await this.execute(buildCommand, {
8251
8274
  cwd: options.directory,
8252
8275
  subprocessOutputDestination: this.subprocessOutputDestination,
8276
+ // `--build-arg` values are passed literally and are a common (if
8277
+ // discouraged) place for secrets; `--secret` specs can name sensitive
8278
+ // sources. Mask their values wherever the command line is logged.
8279
+ redactFlags: ["--build-arg", "--secret"],
8253
8280
  env: {
8254
8281
  BUILDX_NO_DEFAULT_ATTESTATIONS: "1"
8255
8282
  // Docker Build adds provenance attestations by default that confuse cdk-assets
@@ -8692,14 +8719,14 @@ var init_assets = __esm({
8692
8719
  var require_helpers = __commonJS({
8693
8720
  "../@aws-cdk/cloud-assembly-schema/node_modules/jsonschema/lib/helpers.js"(exports2, module2) {
8694
8721
  "use strict";
8695
- var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message, instance, schema, path13, name, argument) {
8696
- if (Array.isArray(path13)) {
8697
- this.path = path13;
8698
- this.property = path13.reduce(function(sum, item) {
8722
+ var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message, instance, schema, path15, name, argument) {
8723
+ if (Array.isArray(path15)) {
8724
+ this.path = path15;
8725
+ this.property = path15.reduce(function(sum, item) {
8699
8726
  return sum + makeSuffix(item);
8700
8727
  }, "instance");
8701
- } else if (path13 !== void 0) {
8702
- this.property = path13;
8728
+ } else if (path15 !== void 0) {
8729
+ this.property = path15;
8703
8730
  }
8704
8731
  if (message) {
8705
8732
  this.message = message;
@@ -8794,16 +8821,16 @@ var require_helpers = __commonJS({
8794
8821
  name: { value: "SchemaError", enumerable: false }
8795
8822
  }
8796
8823
  );
8797
- var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options, path13, base, schemas) {
8824
+ var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options, path15, base, schemas) {
8798
8825
  this.schema = schema;
8799
8826
  this.options = options;
8800
- if (Array.isArray(path13)) {
8801
- this.path = path13;
8802
- this.propertyPath = path13.reduce(function(sum, item) {
8827
+ if (Array.isArray(path15)) {
8828
+ this.path = path15;
8829
+ this.propertyPath = path15.reduce(function(sum, item) {
8803
8830
  return sum + makeSuffix(item);
8804
8831
  }, "instance");
8805
8832
  } else {
8806
- this.propertyPath = path13;
8833
+ this.propertyPath = path15;
8807
8834
  }
8808
8835
  this.base = base;
8809
8836
  this.schemas = schemas;
@@ -8812,10 +8839,10 @@ var require_helpers = __commonJS({
8812
8839
  return (() => resolveUrl(this.base, target))();
8813
8840
  }, "resolve");
8814
8841
  SchemaContext.prototype.makeChild = /* @__PURE__ */ __name(function makeChild(schema, propertyName) {
8815
- var path13 = propertyName === void 0 ? this.path : this.path.concat([propertyName]);
8842
+ var path15 = propertyName === void 0 ? this.path : this.path.concat([propertyName]);
8816
8843
  var id = schema.$id || schema.id;
8817
8844
  let base = (() => resolveUrl(this.base, id || ""))();
8818
- var ctx = new SchemaContext(schema, this.options, path13, base, Object.create(this.schemas));
8845
+ var ctx = new SchemaContext(schema, this.options, path15, base, Object.create(this.schemas));
8819
8846
  if (id && !ctx.schemas[base]) {
8820
8847
  ctx.schemas[base] = schema;
8821
8848
  }
@@ -9932,8 +9959,8 @@ var require_validator = __commonJS({
9932
9959
  if (ctx.schemas[switchSchema]) {
9933
9960
  return { subschema: ctx.schemas[switchSchema], switchSchema };
9934
9961
  }
9935
- let parsed = new URL(switchSchema, "thismessage::/");
9936
- let fragment = parsed.hash;
9962
+ let hashIndex = switchSchema.indexOf("#");
9963
+ let fragment = hashIndex === -1 || hashIndex === switchSchema.length - 1 ? "" : switchSchema.substr(hashIndex);
9937
9964
  var document = fragment && fragment.length && switchSchema.substr(0, switchSchema.length - fragment.length);
9938
9965
  if (!document || !ctx.schemas[document]) {
9939
9966
  throw new SchemaError("no such schema <" + switchSchema + ">", schema);
@@ -12018,7 +12045,7 @@ var require_semver2 = __commonJS({
12018
12045
  // ../@aws-cdk/cloud-assembly-schema/cli-version.json
12019
12046
  var require_cli_version = __commonJS({
12020
12047
  "../@aws-cdk/cloud-assembly-schema/cli-version.json"(exports2, module2) {
12021
- module2.exports = { version: "2.1139.0" };
12048
+ module2.exports = { version: "2.1145.0" };
12022
12049
  }
12023
12050
  });
12024
12051
 
@@ -13733,6 +13760,7 @@ var require_integ_schema = __commonJS({
13733
13760
  enum: [
13734
13761
  "any-change",
13735
13762
  "broadening",
13763
+ "destructive",
13736
13764
  "never"
13737
13765
  ],
13738
13766
  type: "string"
@@ -14293,9 +14321,9 @@ var require_validation_report_schema = __commonJS({
14293
14321
  var require_version = __commonJS({
14294
14322
  "../@aws-cdk/cloud-assembly-schema/schema/version.json"(exports2, module2) {
14295
14323
  module2.exports = {
14296
- schemaHash: "095859ad1d3d89d3bc4f9cbe9393d219798972dbd2389287bcc66b49f323cef1",
14324
+ schemaHash: "b006b5c8829cee1f2287b98829ca0ed8abfbdbb2948fecc185e56398afb11a7b",
14297
14325
  $comment: "Do not hold back the version on additions: jsonschema validation of the manifest by the consumer will trigger errors on unexpected fields.",
14298
- revision: 54
14326
+ revision: 55
14299
14327
  };
14300
14328
  }
14301
14329
  });
@@ -14567,6 +14595,7 @@ var init_common = __esm({
14567
14595
  RequireApproval2["NEVER"] = "never";
14568
14596
  RequireApproval2["ANYCHANGE"] = "any-change";
14569
14597
  RequireApproval2["BROADENING"] = "broadening";
14598
+ RequireApproval2["DESTRUCTIVE"] = "destructive";
14570
14599
  return RequireApproval2;
14571
14600
  })(RequireApproval || {});
14572
14601
  }
@@ -16651,6 +16680,592 @@ var init_template_ranges = __esm({
16651
16680
  }
16652
16681
  });
16653
16682
 
16683
+ // ../@aws-cdk/cloud-assembly-api/lib/stack-trace.ts
16684
+ var stack_trace_exports = {};
16685
+ __export(stack_trace_exports, {
16686
+ DEFAULT_USER_CODE_FINDER: () => DEFAULT_USER_CODE_FINDER,
16687
+ StackFrame: () => StackFrame,
16688
+ StackTrace: () => StackTrace
16689
+ });
16690
+ var DEFAULT_USER_CODE_FINDER, StackTrace, StackFrame;
16691
+ var init_stack_trace = __esm({
16692
+ "../@aws-cdk/cloud-assembly-api/lib/stack-trace.ts"() {
16693
+ "use strict";
16694
+ DEFAULT_USER_CODE_FINDER = {
16695
+ isInterestingFrame(frame) {
16696
+ return frame.includes(" (") && frame.endsWith(")");
16697
+ }
16698
+ };
16699
+ StackTrace = class _StackTrace {
16700
+ constructor(frames) {
16701
+ this.frames = frames;
16702
+ }
16703
+ frames;
16704
+ static {
16705
+ __name(this, "StackTrace");
16706
+ }
16707
+ static fromNewlineSeparatedString(stackTrace) {
16708
+ return new _StackTrace(stackTrace.split("\n"));
16709
+ }
16710
+ /**
16711
+ * Return the first user frame from a "Just My Code" call stack
16712
+ *
16713
+ * With all the NON-"my code" call frames redacted, the top level frame should
16714
+ * be the last user frame that is associated with the given call stack.
16715
+ */
16716
+ findAndParse(finder) {
16717
+ for (const frame of this.frames) {
16718
+ if (finder.isInterestingFrame(frame)) {
16719
+ return StackFrame.parse(frame);
16720
+ }
16721
+ }
16722
+ return void 0;
16723
+ }
16724
+ };
16725
+ StackFrame = class {
16726
+ constructor(functionName, fileName, sourceLocation) {
16727
+ this.functionName = functionName;
16728
+ this.fileName = fileName;
16729
+ this.sourceLocation = sourceLocation;
16730
+ }
16731
+ functionName;
16732
+ fileName;
16733
+ sourceLocation;
16734
+ static {
16735
+ __name(this, "StackFrame");
16736
+ }
16737
+ /**
16738
+ * Parse a single line of a stack frame into a structured object
16739
+ *
16740
+ * This is mostly a NodeJS-flavored string we parse here, except that in
16741
+ * a NodeJS stack trace the line would start with ` at `.
16742
+ *
16743
+ * Parses all of these:
16744
+ *
16745
+ * ```
16746
+ * <function> (<file>:<line>:<col>)
16747
+ * <class>.<function> (<file>:<line>:<col>)
16748
+ * Object.<anonymous> (<file>:<line>:<col>)
16749
+ * <function> [as somethingElse] (<file>:<line>:<col>)
16750
+ * new <constructor> (<file>:<line>:<col>)
16751
+ * <file>:<line>:<col>
16752
+ * ```
16753
+ *
16754
+ * See https://v8.dev/docs/stack-trace-api#appendix%3A-stack-trace-format
16755
+ */
16756
+ static parse(frame) {
16757
+ let fileName;
16758
+ let functionName;
16759
+ let sourceLocation;
16760
+ const paren = frame.indexOf("(");
16761
+ if (paren) {
16762
+ functionName = frame.slice(0, paren - 1);
16763
+ frame = frame.slice(paren + 1, -1);
16764
+ } else {
16765
+ functionName = "<entry>";
16766
+ }
16767
+ if (functionName === "Object.<anonymous>") {
16768
+ functionName = "<anonymous>";
16769
+ }
16770
+ let asI = functionName.indexOf(" [as ");
16771
+ if (asI > -1) {
16772
+ const endOfAlias = functionName.indexOf("]", asI);
16773
+ const lastPeriod = functionName.lastIndexOf(".", asI);
16774
+ functionName = functionName.slice(0, lastPeriod + 1) + functionName.slice(asI + 5, endOfAlias);
16775
+ }
16776
+ const m4 = frame.match(/(:[0-9]+){0,2}$/);
16777
+ fileName = m4 ? frame.slice(0, -m4[0].length) : frame;
16778
+ sourceLocation = m4 ? m4[0].slice(1) : "";
16779
+ return {
16780
+ fileName,
16781
+ functionName,
16782
+ sourceLocation
16783
+ };
16784
+ }
16785
+ };
16786
+ }
16787
+ });
16788
+
16789
+ // ../@aws-cdk/cloud-assembly-api/lib/private/color.ts
16790
+ var Col, Colorize;
16791
+ var init_color = __esm({
16792
+ "../@aws-cdk/cloud-assembly-api/lib/private/color.ts"() {
16793
+ "use strict";
16794
+ Col = class {
16795
+ static {
16796
+ __name(this, "Col");
16797
+ }
16798
+ static RED = "31";
16799
+ static ORANGE = "38;5;208";
16800
+ static YELLOW = "33";
16801
+ static BLUE = "34";
16802
+ static BOLD = "1";
16803
+ static UNDERLINE = "4";
16804
+ static GREY = "90";
16805
+ };
16806
+ Colorize = class _Colorize {
16807
+ static {
16808
+ __name(this, "Colorize");
16809
+ }
16810
+ static red(str) {
16811
+ return _Colorize.colorize(Col.RED, str);
16812
+ }
16813
+ static orange(str) {
16814
+ return _Colorize.colorize(Col.ORANGE, str);
16815
+ }
16816
+ static yellow(str) {
16817
+ return _Colorize.colorize(Col.YELLOW, str);
16818
+ }
16819
+ static blue(str) {
16820
+ return _Colorize.colorize(Col.BLUE, str);
16821
+ }
16822
+ static grey(str) {
16823
+ return _Colorize.colorize(Col.GREY, str);
16824
+ }
16825
+ static bold(str) {
16826
+ return _Colorize.colorize(Col.BOLD, str);
16827
+ }
16828
+ static underline(str) {
16829
+ return _Colorize.colorize(Col.UNDERLINE, str);
16830
+ }
16831
+ static colorize(col, str) {
16832
+ if (process.env.FORCE_COLOR === "0" || process.env.NO_COLOR || !process.stdout.isTTY || !process.stderr.isTTY) {
16833
+ return str;
16834
+ }
16835
+ return `\x1B[${col}m${str}\x1B[0m`;
16836
+ }
16837
+ };
16838
+ }
16839
+ });
16840
+
16841
+ // ../@aws-cdk/cloud-assembly-api/lib/validation/parsing.ts
16842
+ var parsing_exports = {};
16843
+ __export(parsing_exports, {
16844
+ ANNOTATION_PLUGIN_NAME: () => ANNOTATION_PLUGIN_NAME,
16845
+ ANNOTATION_PLUGIN_NAMESPACE: () => ANNOTATION_PLUGIN_NAMESPACE,
16846
+ isSuppressibleViolation: () => isSuppressibleViolation,
16847
+ namespaceFromPluginName: () => namespaceFromPluginName,
16848
+ normalizeValidationId: () => normalizeValidationId,
16849
+ normalizeValidationIdForAnnotations: () => normalizeValidationIdForAnnotations,
16850
+ parseValidationId: () => parseValidationId,
16851
+ pluginNameFromNamespace: () => pluginNameFromNamespace
16852
+ });
16853
+ function isSuppressibleViolation(violation) {
16854
+ const isFatal = violation.severity?.toLowerCase() === "fatal";
16855
+ const isErrorAnnotation = violation.ruleMetadata?.["cdk:annotation"] && violation.severity?.toLowerCase() === "error";
16856
+ return !isFatal && !isErrorAnnotation;
16857
+ }
16858
+ function parseValidationId(id) {
16859
+ let nsSeparator = void 0;
16860
+ const braceStack = [];
16861
+ for (let i6 = 0; i6 < id.length; i6++) {
16862
+ const c6 = id[i6];
16863
+ if (c6 === ":" && id[i6 + 1] === ":" && braceStack.length === 0) {
16864
+ if (nsSeparator !== void 0) {
16865
+ throw new Error(`Invalid validation rule ID '${id}'. The '::' delimiter is reserved for separating the prefix from the rule name (e.g. 'prefix::RuleName').`);
16866
+ }
16867
+ nsSeparator = i6;
16868
+ i6 += 1;
16869
+ } else if (["]", ")", "}"].includes(c6)) {
16870
+ const lastBrace = braceStack.pop();
16871
+ if (lastBrace === void 0) {
16872
+ throw new Error(`Invalid validation rule ID '${id}'. Unmatched closing brace '${c6}' at position ${i6}.`);
16873
+ }
16874
+ if (lastBrace === "(" && c6 !== ")" || lastBrace === "[" && c6 !== "]" || lastBrace === "{" && c6 !== "}") {
16875
+ throw new Error(`Invalid validation rule ID '${id}'. Mismatched closing brace '${c6}' at position ${i6}. Expected '${lastBrace === "(" ? ")" : lastBrace === "[" ? "]" : "}"}'.`);
16876
+ }
16877
+ } else if (["[", "(", "{"].includes(c6)) {
16878
+ braceStack.push(c6);
16879
+ }
16880
+ }
16881
+ if (nsSeparator === void 0) {
16882
+ return { ruleId: id };
16883
+ }
16884
+ if (nsSeparator === 0) {
16885
+ throw new Error(`Invalid validation rule ID '${id}'. Missing plugin name before '::'.`);
16886
+ }
16887
+ const namespace = namespaceFromString(id.substring(0, nsSeparator));
16888
+ const ruleId = id.substring(nsSeparator + 2);
16889
+ return { namespace, ruleId };
16890
+ }
16891
+ function normalizeValidationId(id, defaultNamespace) {
16892
+ const p3 = typeof id === "string" ? parseValidationId(id) : id;
16893
+ const parsed = {
16894
+ namespace: p3.namespace ? namespaceFromString(p3.namespace[NS].replaceAll(/ /g, "-")) : void 0,
16895
+ ruleId: p3.ruleId.replaceAll(/ /g, "-")
16896
+ };
16897
+ if (parsed.namespace && ["annotation", "Construct-Annotations"].includes(parsed.namespace[NS])) {
16898
+ return `${ANNOTATION_PLUGIN_NAMESPACE}::${parsed.ruleId}`;
16899
+ }
16900
+ return `${parsed.namespace ?? defaultNamespace[NS]}::${parsed.ruleId}`;
16901
+ }
16902
+ function normalizeValidationIdForAnnotations(id) {
16903
+ return normalizeValidationId(id, ANNOTATION_PLUGIN_NAMESPACE);
16904
+ }
16905
+ function namespaceFromPluginName(pluginName) {
16906
+ if (pluginName === ANNOTATION_PLUGIN_NAME) {
16907
+ return ANNOTATION_PLUGIN_NAMESPACE;
16908
+ }
16909
+ return namespaceFromString(pluginName.replace(/ /g, "-"));
16910
+ }
16911
+ function namespaceFromString(namespace) {
16912
+ return Object.assign({
16913
+ [NS]: namespace.replace(/ /g, "-")
16914
+ }, {
16915
+ toString() {
16916
+ return this[NS];
16917
+ }
16918
+ });
16919
+ }
16920
+ function pluginNameFromNamespace(namespace) {
16921
+ return namespace[NS].replace(/-/g, " ");
16922
+ }
16923
+ var NS, ANNOTATION_PLUGIN_NAME, ANNOTATION_PLUGIN_NAMESPACE;
16924
+ var init_parsing = __esm({
16925
+ "../@aws-cdk/cloud-assembly-api/lib/validation/parsing.ts"() {
16926
+ "use strict";
16927
+ __name(isSuppressibleViolation, "isSuppressibleViolation");
16928
+ __name(parseValidationId, "parseValidationId");
16929
+ __name(normalizeValidationId, "normalizeValidationId");
16930
+ __name(normalizeValidationIdForAnnotations, "normalizeValidationIdForAnnotations");
16931
+ NS = /* @__PURE__ */ Symbol("namespace");
16932
+ __name(namespaceFromPluginName, "namespaceFromPluginName");
16933
+ __name(namespaceFromString, "namespaceFromString");
16934
+ __name(pluginNameFromNamespace, "pluginNameFromNamespace");
16935
+ ANNOTATION_PLUGIN_NAME = "Construct Annotations";
16936
+ ANNOTATION_PLUGIN_NAMESPACE = namespaceFromPluginName("Annotation");
16937
+ }
16938
+ });
16939
+
16940
+ // ../@aws-cdk/cloud-assembly-api/lib/validation/formatting.ts
16941
+ var formatting_exports = {};
16942
+ __export(formatting_exports, {
16943
+ ValidationReportFormatter: () => ValidationReportFormatter,
16944
+ relativeFileLocationRenderer: () => relativeFileLocationRenderer,
16945
+ stripAnsi: () => stripAnsi
16946
+ });
16947
+ function flattenViolations(reports) {
16948
+ return reports.flatMap((report) => {
16949
+ const pluginName = report.pluginName;
16950
+ return report.violations.flatMap((violation) => {
16951
+ return violation.violatingConstructs.map((construct) => ({
16952
+ severity: normalizeSeverity(violation.severity, violation.customSeverity),
16953
+ description: violation.description,
16954
+ ruleName: violation.ruleName,
16955
+ pluginName,
16956
+ construct,
16957
+ suggestedFix: violation.suggestedFix,
16958
+ ruleMetadata: violation.ruleMetadata
16959
+ }));
16960
+ });
16961
+ });
16962
+ }
16963
+ function normalizeSeverity(severity, customSeverity) {
16964
+ switch (severity) {
16965
+ case "fatal":
16966
+ case "error":
16967
+ case "warning":
16968
+ case "info":
16969
+ return severity.toUpperCase();
16970
+ case "custom":
16971
+ return customSeverity ?? "INFO";
16972
+ }
16973
+ }
16974
+ function getSeverityColor(severity) {
16975
+ switch (severity.toLowerCase()) {
16976
+ case "fatal":
16977
+ return Colorize.red;
16978
+ case "error":
16979
+ return Colorize.orange;
16980
+ case "warning":
16981
+ return Colorize.yellow;
16982
+ default:
16983
+ return Colorize.blue;
16984
+ }
16985
+ }
16986
+ function stripAckTag(description) {
16987
+ return description.replace(/\s*\[ack:\s*[^\]]+\]\s*/g, "").trim();
16988
+ }
16989
+ function formatPluginFailure(f6) {
16990
+ return `${Colorize.orange("ERROR")} ${sanitize(f6.error)}`;
16991
+ }
16992
+ function sanitize(s2) {
16993
+ return (s2 ?? "").replace(CONTROL_CHARS, "\uFFFD");
16994
+ }
16995
+ function isPluginFailure(r6) {
16996
+ if (r6.conclusion === "success" || r6.violations.length > 0 || !r6.metadata?.error) {
16997
+ return void 0;
16998
+ }
16999
+ return { error: r6.metadata.error };
17000
+ }
17001
+ function stripAnsi(x) {
17002
+ const pattern = [
17003
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
17004
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
17005
+ ].join("|");
17006
+ const re = new RegExp(pattern, "g");
17007
+ return x.replaceAll(re, "");
17008
+ }
17009
+ function relativeFileLocationRenderer(root6) {
17010
+ return {
17011
+ renderAbsoluteFilePath(absPath) {
17012
+ const relPath = import_path.default.relative(root6, absPath);
17013
+ return relPath.length < absPath.length ? relPath : absPath;
17014
+ }
17015
+ };
17016
+ }
17017
+ var import_path, ValidationReportFormatter, CONTROL_CHARS, SEVERITY_ORDER;
17018
+ var init_formatting = __esm({
17019
+ "../@aws-cdk/cloud-assembly-api/lib/validation/formatting.ts"() {
17020
+ "use strict";
17021
+ import_path = __toESM(require("path"));
17022
+ init_color();
17023
+ init_stack_trace();
17024
+ init_parsing();
17025
+ ValidationReportFormatter = class {
17026
+ constructor(options) {
17027
+ this.options = options;
17028
+ this.fileLocationRenderer = options.fileLocationRenderer ?? relativeFileLocationRenderer(process.cwd());
17029
+ }
17030
+ options;
17031
+ static {
17032
+ __name(this, "ValidationReportFormatter");
17033
+ }
17034
+ fileLocationRenderer;
17035
+ formatReports(reports) {
17036
+ const successfullyExecutedPlugins = reports.filter((r6) => isPluginFailure(r6) === void 0);
17037
+ const pluginFailures = reports.map(isPluginFailure).filter((e6) => e6 !== void 0);
17038
+ const violations = flattenViolations(successfullyExecutedPlugins);
17039
+ violations.sort((a6, b6) => {
17040
+ const aOrder = SEVERITY_ORDER[a6.severity.toLowerCase()] ?? 4;
17041
+ const bOrder = SEVERITY_ORDER[b6.severity.toLowerCase()] ?? 4;
17042
+ return aOrder - bOrder;
17043
+ });
17044
+ return [
17045
+ ...pluginFailures.map(formatPluginFailure),
17046
+ ...violations.map((v) => this.formatViolationBlock(v))
17047
+ ];
17048
+ }
17049
+ formatViolationBlock(v) {
17050
+ const lines = [];
17051
+ const locations = this.sourceLocations(v.construct.stackTraces);
17052
+ const maxTraces = 5;
17053
+ let additional = false;
17054
+ for (const location of locations.slice(0, maxTraces)) {
17055
+ lines.push(`${additional ? "or " : ""}${Colorize.underline(sanitize(location))}`);
17056
+ additional = true;
17057
+ }
17058
+ if (locations.length > maxTraces) {
17059
+ lines.push(Colorize.grey(`(and ${locations.length - maxTraces} more...)`));
17060
+ }
17061
+ const pluginNs = namespaceFromPluginName(v.pluginName);
17062
+ const parsed = parseValidationId(v.ruleName);
17063
+ lines.push([
17064
+ Colorize.bold(getSeverityColor(v.severity)(sanitize(v.severity))),
17065
+ Colorize.bold(stripAckTag(sanitize(v.description))),
17066
+ Colorize.grey(`(${sanitize(parsed.namespace ? pluginNameFromNamespace(parsed.namespace) : v.pluginName)})`)
17067
+ ].join(" "));
17068
+ const constructInfo = this.formatConstructInfo(v.construct);
17069
+ lines.push(` ${constructInfo}`);
17070
+ if (v.suggestedFix) {
17071
+ lines.push(` Suggested fix: ${sanitize(v.suggestedFix).replace(/\n/g, "\n ")}`);
17072
+ }
17073
+ const ackId = normalizeValidationId(v.ruleName, pluginNs);
17074
+ if (isSuppressibleViolation(v)) {
17075
+ lines.push(` ${Colorize.grey(`Acknowledge with '${sanitize(ackId)}'`)}`);
17076
+ } else {
17077
+ lines.push(` ${Colorize.grey(`Rule ${sanitize(ackId)}`)}`);
17078
+ }
17079
+ return lines.join("\n");
17080
+ }
17081
+ sourceLocations(stackTraces) {
17082
+ const ret = [];
17083
+ for (const trace of stackTraces ?? []) {
17084
+ const frame = StackTrace.fromNewlineSeparatedString(trace).findAndParse(this.options.frameFinder ?? DEFAULT_USER_CODE_FINDER);
17085
+ if (frame && frame.fileName) {
17086
+ const candidate = `${this.fileLocationRenderer.renderAbsoluteFilePath(frame.fileName)}:${frame.sourceLocation}`;
17087
+ if (!ret.includes(candidate)) {
17088
+ ret.push(candidate);
17089
+ }
17090
+ }
17091
+ }
17092
+ return ret;
17093
+ }
17094
+ formatConstructInfo(construct) {
17095
+ const parts = [];
17096
+ const logicalId = sanitize(construct.cloudFormationResource?.logicalId);
17097
+ if (construct.constructPath) {
17098
+ const cPath = sanitize(construct.constructPath);
17099
+ parts.push(logicalId ? `${Colorize.bold(cPath)} (${logicalId})` : Colorize.bold(cPath));
17100
+ } else {
17101
+ if (construct.cloudFormationResource?.templatePath) {
17102
+ parts.push(this.fileLocationRenderer.renderAbsoluteFilePath(sanitize(construct.cloudFormationResource.templatePath)));
17103
+ }
17104
+ if (logicalId) {
17105
+ parts.push(Colorize.bold(logicalId));
17106
+ }
17107
+ }
17108
+ if (construct.constructFqn) {
17109
+ parts.push(Colorize.grey(sanitize(construct.constructFqn)));
17110
+ }
17111
+ return parts.join(" ");
17112
+ }
17113
+ };
17114
+ __name(flattenViolations, "flattenViolations");
17115
+ __name(normalizeSeverity, "normalizeSeverity");
17116
+ __name(getSeverityColor, "getSeverityColor");
17117
+ __name(stripAckTag, "stripAckTag");
17118
+ __name(formatPluginFailure, "formatPluginFailure");
17119
+ CONTROL_CHARS = /[\x00-\x08\x0B-\x1F\x7F\x9B]/g;
17120
+ __name(sanitize, "sanitize");
17121
+ SEVERITY_ORDER = {
17122
+ fatal: 0,
17123
+ error: 1,
17124
+ warning: 2,
17125
+ info: 3
17126
+ };
17127
+ __name(isPluginFailure, "isPluginFailure");
17128
+ __name(stripAnsi, "stripAnsi");
17129
+ __name(relativeFileLocationRenderer, "relativeFileLocationRenderer");
17130
+ }
17131
+ });
17132
+
17133
+ // ../@aws-cdk/cloud-assembly-api/lib/validation/loading.ts
17134
+ var loading_exports = {};
17135
+ __export(loading_exports, {
17136
+ loadUnifiedValidationReport: () => loadUnifiedValidationReport
17137
+ });
17138
+ async function loadUnifiedValidationReport(assembly, stacks) {
17139
+ const ret = [];
17140
+ const reportPath = path10.join(assembly.directory, VALIDATION_REPORT_FILE2);
17141
+ if (await pathExists(reportPath)) {
17142
+ const selectedStackIds = new Set(stacks.map((stack) => stack.hierarchicalId));
17143
+ const report = import_cloud_assembly_schema2.Manifest.loadValidationReport(reportPath);
17144
+ const filteredReports = filterReportsByStacks(report.pluginReports, selectedStackIds);
17145
+ ret.push(...filteredReports);
17146
+ }
17147
+ const alreadyHasAnnotations = ret.some((r6) => r6.pluginName === ANNOTATION_PLUGIN_NAME);
17148
+ if (!alreadyHasAnnotations) {
17149
+ const annotationReport = pluginReportFromAnnotations(stacks);
17150
+ if (annotationReport.violations.length > 0 || annotationReport.conclusion === "failure") {
17151
+ ret.push(annotationReport);
17152
+ }
17153
+ }
17154
+ return ret;
17155
+ }
17156
+ function filterReportsByStacks(reports, selectedStackIds) {
17157
+ const stackIds = Array.from(selectedStackIds);
17158
+ return reports.map(filterReport);
17159
+ function filterReport(report) {
17160
+ const violationsWithoutConstructs = new Set(report.violations.flatMap((v, i6) => v.violatingConstructs.length === 0 ? [i6] : []));
17161
+ const filteredViolations = report.violations.map((v) => ({
17162
+ ...v,
17163
+ violatingConstructs: v.violatingConstructs.filter(constructMatches)
17164
+ })).filter((v, i6) => v.violatingConstructs.length > 0 || violationsWithoutConstructs.has(i6));
17165
+ return {
17166
+ ...report,
17167
+ violations: filteredViolations,
17168
+ conclusion: filteredViolations.length > 0 ? report.conclusion : "success"
17169
+ };
17170
+ }
17171
+ __name(filterReport, "filterReport");
17172
+ function constructMatches(c6) {
17173
+ return !c6.constructPath || stackIds.some((stackId) => c6.constructPath === stackId || c6.constructPath?.startsWith(`${stackId}/`));
17174
+ }
17175
+ __name(constructMatches, "constructMatches");
17176
+ }
17177
+ function pluginReportFromAnnotations(stacks) {
17178
+ const ruleMap = /* @__PURE__ */ new Map();
17179
+ for (const stack of stacks) {
17180
+ for (const entry of stack.messages) {
17181
+ let severity;
17182
+ switch (entry.level) {
17183
+ case "warning" /* WARNING */:
17184
+ severity = "warning";
17185
+ break;
17186
+ case "error" /* ERROR */:
17187
+ severity = "error";
17188
+ break;
17189
+ case "info" /* INFO */:
17190
+ severity = "info";
17191
+ break;
17192
+ }
17193
+ const { message, ruleName } = splitDescriptionAndId(String(entry.entry.data));
17194
+ const ruleKey = `${ruleName}|${severity}|${message}`;
17195
+ let violation = ruleMap.get(ruleKey);
17196
+ if (!violation) {
17197
+ violation = {
17198
+ ruleName: ruleName ?? `${severity}-annotation`,
17199
+ description: message,
17200
+ severity,
17201
+ violatingConstructs: [],
17202
+ ruleMetadata: {
17203
+ "cdk:annotation": "true"
17204
+ }
17205
+ };
17206
+ ruleMap.set(ruleKey, violation);
17207
+ }
17208
+ violation.violatingConstructs.push({
17209
+ constructPath: entry.id.replace(/^\//, "")
17210
+ // remove leading slash
17211
+ // TODO: see if this information can be obtained from tree.json
17212
+ // cloudFormationResource
17213
+ // constructFqn:
17214
+ // libraryVersion
17215
+ // TODO: see if we can get this from metadata stack traces. We may need to re-enable them for
17216
+ // annotations in the core library. Otherwise we should probably get a stack trace to the resource itself.
17217
+ // stackTraces
17218
+ });
17219
+ }
17220
+ }
17221
+ const violations = Array.from(ruleMap.values());
17222
+ const hasErrors = violations.some((v) => v.severity === "error");
17223
+ return {
17224
+ pluginName: ANNOTATION_PLUGIN_NAME,
17225
+ conclusion: hasErrors ? "failure" : "success",
17226
+ violations
17227
+ };
17228
+ }
17229
+ function splitDescriptionAndId(message) {
17230
+ const ackMatch = message.match(/\[ack: ([^\]]+)\]/);
17231
+ if (ackMatch) {
17232
+ return { message: message.replace(ackMatch[0], "").trim(), ruleName: ackMatch[1] };
17233
+ }
17234
+ const idMatch = message.match(/\(([^()]+::[^()]+)\)$/);
17235
+ if (idMatch) {
17236
+ return { message: message.replace(idMatch[0], "").trim(), ruleName: idMatch[1] };
17237
+ }
17238
+ return { message };
17239
+ }
17240
+ async function pathExists(pathName) {
17241
+ try {
17242
+ await import_fs.promises.access(pathName);
17243
+ return true;
17244
+ } catch (e6) {
17245
+ if (e6.code !== "ENOENT") {
17246
+ throw e6;
17247
+ }
17248
+ return false;
17249
+ }
17250
+ }
17251
+ var import_fs, path10, import_cloud_assembly_schema2, VALIDATION_REPORT_FILE2;
17252
+ var init_loading = __esm({
17253
+ "../@aws-cdk/cloud-assembly-api/lib/validation/loading.ts"() {
17254
+ "use strict";
17255
+ import_fs = require("fs");
17256
+ path10 = __toESM(require("path"));
17257
+ import_cloud_assembly_schema2 = __toESM(require_lib2());
17258
+ init_metadata();
17259
+ init_parsing();
17260
+ VALIDATION_REPORT_FILE2 = "validation-report.json";
17261
+ __name(loadUnifiedValidationReport, "loadUnifiedValidationReport");
17262
+ __name(filterReportsByStacks, "filterReportsByStacks");
17263
+ __name(pluginReportFromAnnotations, "pluginReportFromAnnotations");
17264
+ __name(splitDescriptionAndId, "splitDescriptionAndId");
17265
+ __name(pathExists, "pathExists");
17266
+ }
17267
+ });
17268
+
16654
17269
  // ../@aws-cdk/cloud-assembly-api/lib/index.js
16655
17270
  var require_lib3 = __commonJS({
16656
17271
  "../@aws-cdk/cloud-assembly-api/lib/index.js"(exports2) {
@@ -16695,6 +17310,10 @@ var require_lib3 = __commonJS({
16695
17310
  __exportStar((init_bootstrap(), __toCommonJS(bootstrap_exports)), exports2);
16696
17311
  __exportStar((init_construct_tree(), __toCommonJS(construct_tree_exports)), exports2);
16697
17312
  __exportStar((init_template_ranges(), __toCommonJS(template_ranges_exports)), exports2);
17313
+ __exportStar((init_stack_trace(), __toCommonJS(stack_trace_exports)), exports2);
17314
+ __exportStar((init_formatting(), __toCommonJS(formatting_exports)), exports2);
17315
+ __exportStar((init_parsing(), __toCommonJS(parsing_exports)), exports2);
17316
+ __exportStar((init_loading(), __toCommonJS(loading_exports)), exports2);
16698
17317
  }
16699
17318
  });
16700
17319
 
@@ -16759,11 +17378,11 @@ async function repositoryUri(ecr, repositoryName) {
16759
17378
  return void 0;
16760
17379
  }
16761
17380
  }
16762
- var path9, ContainerImageAssetHandler, ContainerImageBuilder;
17381
+ var path11, ContainerImageAssetHandler, ContainerImageBuilder;
16763
17382
  var init_container_images = __esm({
16764
17383
  "../@aws-cdk/cdk-assets-lib/lib/private/handlers/container-images.ts"() {
16765
17384
  "use strict";
16766
- path9 = __toESM(require("path"));
17385
+ path11 = __toESM(require("path"));
16767
17386
  init_client_options();
16768
17387
  init_progress();
16769
17388
  init_placeholders2();
@@ -16794,7 +17413,7 @@ var init_container_images = __esm({
16794
17413
  }
16795
17414
  const dockerForBuilding = await this.host.dockerFactory.forBuild({
16796
17415
  repoUri: initOnce.repoUri,
16797
- eventEmitter: /* @__PURE__ */ __name((m4) => this.host.emitMessage("debug" /* DEBUG */, m4), "eventEmitter"),
17416
+ eventEmitter: this.host.emitMessage.bind(this.host),
16798
17417
  ecr: initOnce.ecr,
16799
17418
  subprocessOutputDestination: this.options.subprocessOutputDestination
16800
17419
  });
@@ -16949,7 +17568,7 @@ var init_container_images = __esm({
16949
17568
  `'directory' is expected in the DockerImage asset source, got: ${JSON.stringify(source)}`
16950
17569
  );
16951
17570
  }
16952
- const fullPath = path9.resolve(this.workDir, source.directory);
17571
+ const fullPath = path11.resolve(this.workDir, source.directory);
16953
17572
  this.host.emitMessage("build" /* BUILD */, `Building Docker image at ${fullPath}`);
16954
17573
  await this.docker.build({
16955
17574
  directory: fullPath,
@@ -17020,11 +17639,11 @@ var require_Mime = __commonJS({
17020
17639
  }
17021
17640
  }
17022
17641
  };
17023
- Mime.prototype.getType = function(path13) {
17024
- path13 = String(path13);
17025
- let last = path13.replace(/^.*[/\\]/, "").toLowerCase();
17642
+ Mime.prototype.getType = function(path15) {
17643
+ path15 = String(path15);
17644
+ let last = path15.replace(/^.*[/\\]/, "").toLowerCase();
17026
17645
  let ext = last.replace(/^.*\./, "").toLowerCase();
17027
- let hasPath = last.length < path13.length;
17646
+ let hasPath = last.length < path15.length;
17028
17647
  let hasDot = ext.length < last.length - 1;
17029
17648
  return (hasDot || !hasPath) && this._types[ext] || null;
17030
17649
  };
@@ -17060,7 +17679,7 @@ var require_mime = __commonJS({
17060
17679
  });
17061
17680
 
17062
17681
  // ../@aws-cdk/cdk-assets-lib/lib/private/fs-extra.ts
17063
- async function pathExists(pathName) {
17682
+ async function pathExists2(pathName) {
17064
17683
  try {
17065
17684
  await pfs.stat(pathName);
17066
17685
  return true;
@@ -17071,13 +17690,13 @@ async function pathExists(pathName) {
17071
17690
  return false;
17072
17691
  }
17073
17692
  }
17074
- var fs9, pfs;
17693
+ var fs10, pfs;
17075
17694
  var init_fs_extra = __esm({
17076
17695
  "../@aws-cdk/cdk-assets-lib/lib/private/fs-extra.ts"() {
17077
17696
  "use strict";
17078
- fs9 = __toESM(require("fs"));
17079
- pfs = fs9.promises;
17080
- __name(pathExists, "pathExists");
17697
+ fs10 = __toESM(require("fs"));
17698
+ pfs = fs10.promises;
17699
+ __name(pathExists2, "pathExists");
17081
17700
  }
17082
17701
  });
17083
17702
 
@@ -17100,13 +17719,13 @@ async function cached(cache6, key, factory) {
17100
17719
  cache6.set(key, fresh);
17101
17720
  return fresh;
17102
17721
  }
17103
- var import_fs, path10, import_cloud_assembly_schema2, mime, EMPTY_ZIP_FILE_SIZE, FileAssetHandler, BucketInformation;
17722
+ var import_fs2, path12, import_cloud_assembly_schema3, mime, EMPTY_ZIP_FILE_SIZE, FileAssetHandler, BucketInformation;
17104
17723
  var init_files = __esm({
17105
17724
  "../@aws-cdk/cdk-assets-lib/lib/private/handlers/files.ts"() {
17106
17725
  "use strict";
17107
- import_fs = require("fs");
17108
- path10 = __toESM(require("path"));
17109
- import_cloud_assembly_schema2 = __toESM(require_lib2());
17726
+ import_fs2 = require("fs");
17727
+ path12 = __toESM(require("path"));
17728
+ import_cloud_assembly_schema3 = __toESM(require_lib2());
17110
17729
  mime = __toESM(require_mime());
17111
17730
  init_client_options();
17112
17731
  init_progress();
@@ -17120,7 +17739,7 @@ var init_files = __esm({
17120
17739
  this.workDir = workDir;
17121
17740
  this.asset = asset;
17122
17741
  this.host = host;
17123
- this.fileCacheRoot = path10.join(workDir, ".cache");
17742
+ this.fileCacheRoot = path12.join(workDir, ".cache");
17124
17743
  }
17125
17744
  workDir;
17126
17745
  asset;
@@ -17235,7 +17854,7 @@ var init_files = __esm({
17235
17854
  {
17236
17855
  Bucket: destination.bucketName,
17237
17856
  Key: destination.objectKey,
17238
- Body: (0, import_fs.createReadStream)(publishFile.packagedPath),
17857
+ Body: (0, import_fs2.createReadStream)(publishFile.packagedPath),
17239
17858
  ContentType: publishFile.contentType,
17240
17859
  ChecksumAlgorithm: "SHA256"
17241
17860
  },
@@ -17249,12 +17868,12 @@ var init_files = __esm({
17249
17868
  `'path' is expected in the File asset source, got: ${JSON.stringify(source)}`
17250
17869
  );
17251
17870
  }
17252
- const fullPath = path10.resolve(this.workDir, source.path);
17253
- if (source.packaging === import_cloud_assembly_schema2.FileAssetPackaging.ZIP_DIRECTORY) {
17871
+ const fullPath = path12.resolve(this.workDir, source.path);
17872
+ if (source.packaging === import_cloud_assembly_schema3.FileAssetPackaging.ZIP_DIRECTORY) {
17254
17873
  const contentType = "application/zip";
17255
- await import_fs.promises.mkdir(this.fileCacheRoot, { recursive: true });
17256
- const packagedPath = path10.join(this.fileCacheRoot, `${this.asset.id.assetId}.zip`);
17257
- if (await pathExists(packagedPath)) {
17874
+ await import_fs2.promises.mkdir(this.fileCacheRoot, { recursive: true });
17875
+ const packagedPath = path12.join(this.fileCacheRoot, `${this.asset.id.assetId}.zip`);
17876
+ if (await pathExists2(packagedPath)) {
17258
17877
  this.host.emitMessage("cached" /* CACHED */, `From cache ${packagedPath}`);
17259
17878
  return { packagedPath, contentType };
17260
17879
  }
@@ -17393,13 +18012,13 @@ function prefixTreeChars(xs, prefix = "") {
17393
18012
  }
17394
18013
  return ret;
17395
18014
  }
17396
- var fs11, path11, import_cloud_assembly_schema3, AssetManifest, ASSET_TYPES, FileManifestEntry, DockerImageManifestEntry, DestinationIdentifier, DestinationPattern;
18015
+ var fs12, path13, import_cloud_assembly_schema4, AssetManifest, ASSET_TYPES, FileManifestEntry, DockerImageManifestEntry, DestinationIdentifier, DestinationPattern;
17397
18016
  var init_asset_manifest = __esm({
17398
18017
  "../@aws-cdk/cdk-assets-lib/lib/asset-manifest.ts"() {
17399
18018
  "use strict";
17400
- fs11 = __toESM(require("fs"));
17401
- path11 = __toESM(require("path"));
17402
- import_cloud_assembly_schema3 = __toESM(require_lib2());
18019
+ fs12 = __toESM(require("fs"));
18020
+ path13 = __toESM(require("path"));
18021
+ import_cloud_assembly_schema4 = __toESM(require_lib2());
17403
18022
  AssetManifest = class _AssetManifest {
17404
18023
  constructor(directory, manifest) {
17405
18024
  this.manifest = manifest;
@@ -17418,8 +18037,8 @@ var init_asset_manifest = __esm({
17418
18037
  */
17419
18038
  static fromFile(fileName) {
17420
18039
  try {
17421
- const obj = import_cloud_assembly_schema3.Manifest.loadAssetManifest(fileName);
17422
- return new _AssetManifest(path11.dirname(fileName), obj);
18040
+ const obj = import_cloud_assembly_schema4.Manifest.loadAssetManifest(fileName);
18041
+ return new _AssetManifest(path13.dirname(fileName), obj);
17423
18042
  } catch (e6) {
17424
18043
  throw new Error(`Cannot read asset manifest '${fileName}': ${e6.message}`);
17425
18044
  }
@@ -17432,12 +18051,12 @@ var init_asset_manifest = __esm({
17432
18051
  static fromPath(filePath) {
17433
18052
  let st;
17434
18053
  try {
17435
- st = fs11.statSync(filePath);
18054
+ st = fs12.statSync(filePath);
17436
18055
  } catch (e6) {
17437
18056
  throw new Error(`Cannot read asset manifest at '${filePath}': ${e6.message}`);
17438
18057
  }
17439
18058
  if (st.isDirectory()) {
17440
- return _AssetManifest.fromFile(path11.join(filePath, _AssetManifest.DEFAULT_FILENAME));
18059
+ return _AssetManifest.fromFile(path13.join(filePath, _AssetManifest.DEFAULT_FILENAME));
17441
18060
  }
17442
18061
  return _AssetManifest.fromFile(filePath);
17443
18062
  }
@@ -19633,12 +20252,12 @@ var init_TypeRegistry = __esm({
19633
20252
  this.namespace = namespace;
19634
20253
  this.schemas = schemas;
19635
20254
  this.exceptions = exceptions;
19636
- }
19637
- static for(namespace) {
19638
20255
  if (!_TypeRegistry.registries.has(namespace)) {
19639
- _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace));
20256
+ _TypeRegistry.registries.set(namespace, this);
19640
20257
  }
19641
- return _TypeRegistry.registries.get(namespace);
20258
+ }
20259
+ static for(namespace) {
20260
+ return _TypeRegistry.registries.get(namespace) ?? new _TypeRegistry(namespace);
19642
20261
  }
19643
20262
  copyFrom(other) {
19644
20263
  const { schemas, exceptions } = this;
@@ -19656,7 +20275,9 @@ var init_TypeRegistry = __esm({
19656
20275
  register(shapeId, schema) {
19657
20276
  const qualifiedName = this.normalizeShapeId(shapeId);
19658
20277
  for (const r6 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) {
19659
- r6.schemas.set(qualifiedName, schema);
20278
+ if (!r6.schemas.has(qualifiedName)) {
20279
+ r6.schemas.set(qualifiedName, schema);
20280
+ }
19660
20281
  }
19661
20282
  }
19662
20283
  getSchema(shapeId) {
@@ -19681,9 +20302,12 @@ var init_TypeRegistry = __esm({
19681
20302
  registerError(es, ctor) {
19682
20303
  const $error = es;
19683
20304
  const ns = $error[1];
20305
+ const qualifiedName = ns + "#" + $error[2];
19684
20306
  for (const r6 of [this, _TypeRegistry.for(ns)]) {
19685
- r6.schemas.set(ns + "#" + $error[2], $error);
19686
- r6.exceptions.set($error, ctor);
20307
+ if (!r6.schemas.has(qualifiedName) && !r6.exceptions.has($error)) {
20308
+ r6.schemas.set(qualifiedName, $error);
20309
+ r6.exceptions.set($error, ctor);
20310
+ }
19687
20311
  }
19688
20312
  }
19689
20313
  getErrorCtor(es) {
@@ -19840,20 +20464,27 @@ var init_command = __esm({
19840
20464
  }
19841
20465
  const stack = clientStack.concat(this.middlewareStack);
19842
20466
  const { logger: logger2 } = configuration;
20467
+ const additionalSmithyContext = additionalContext[import_types2.SMITHY_CONTEXT_KEY];
19843
20468
  const handlerExecutionContext = {
19844
20469
  logger: logger2,
19845
20470
  clientName,
19846
20471
  commandName,
19847
20472
  inputFilterSensitiveLog,
19848
20473
  outputFilterSensitiveLog,
20474
+ ...additionalContext,
19849
20475
  [import_types2.SMITHY_CONTEXT_KEY]: {
20476
+ ...additionalSmithyContext,
19850
20477
  commandInstance: this,
19851
- ...smithyContext
19852
- },
19853
- ...additionalContext
20478
+ ...smithyContext,
20479
+ ...options?.metricsRecorder === void 0 ? {} : { metricsRecorder: options.metricsRecorder }
20480
+ }
19854
20481
  };
19855
20482
  const { requestHandler } = configuration;
19856
20483
  let requestOptions = options ?? {};
20484
+ if (requestOptions.metricsRecorder) {
20485
+ requestOptions = { ...requestOptions };
20486
+ delete requestOptions.metricsRecorder;
20487
+ }
19857
20488
  if (smithyContext.eventStream) {
19858
20489
  requestOptions = {
19859
20490
  isEventStream: true,
@@ -20059,10 +20690,25 @@ var init_exceptions = __esm({
20059
20690
  return _ServiceException.isInstance(instance);
20060
20691
  }
20061
20692
  if (_ServiceException.isInstance(instance)) {
20062
- if (candidate.name && this.name) {
20063
- return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;
20693
+ if (this.prototype.isPrototypeOf(instance)) {
20694
+ return true;
20695
+ }
20696
+ const targetName = this.name;
20697
+ if (!targetName || !candidate.name) {
20698
+ return false;
20699
+ }
20700
+ if (candidate.name === targetName) {
20701
+ return true;
20702
+ }
20703
+ let proto = Object.getPrototypeOf(candidate);
20704
+ while (proto && proto !== Object.prototype) {
20705
+ const ctorName = proto.constructor?.name;
20706
+ if (ctorName && ctorName !== "Error" && ctorName === targetName) {
20707
+ return true;
20708
+ }
20709
+ proto = Object.getPrototypeOf(proto);
20064
20710
  }
20065
- return this.prototype.isPrototypeOf(instance);
20711
+ return false;
20066
20712
  }
20067
20713
  return false;
20068
20714
  }
@@ -21964,14 +22610,14 @@ var init_readFile = __esm({
21964
22610
  import_promises2 = require("node:fs/promises");
21965
22611
  filePromises = {};
21966
22612
  fileIntercept = {};
21967
- readFile2 = /* @__PURE__ */ __name((path13, options) => {
21968
- if (fileIntercept[path13] !== void 0) {
21969
- return fileIntercept[path13];
22613
+ readFile2 = /* @__PURE__ */ __name((path15, options) => {
22614
+ if (fileIntercept[path15] !== void 0) {
22615
+ return fileIntercept[path15];
21970
22616
  }
21971
- if (!filePromises[path13] || options?.ignoreCache) {
21972
- filePromises[path13] = (0, import_promises2.readFile)(path13, "utf8");
22617
+ if (!filePromises[path15] || options?.ignoreCache) {
22618
+ filePromises[path15] = (0, import_promises2.readFile)(path15, "utf8");
21973
22619
  }
21974
- return filePromises[path13];
22620
+ return filePromises[path15];
21975
22621
  }, "readFile");
21976
22622
  }
21977
22623
  });
@@ -22083,8 +22729,8 @@ var init_externalDataInterceptor = __esm({
22083
22729
  getFileRecord() {
22084
22730
  return fileIntercept;
22085
22731
  },
22086
- interceptFile(path13, contents) {
22087
- fileIntercept[path13] = Promise.resolve(contents);
22732
+ interceptFile(path15, contents) {
22733
+ fileIntercept[path15] = Promise.resolve(contents);
22088
22734
  },
22089
22735
  getTokenRecord() {
22090
22736
  return tokenIntercept;
@@ -22883,8 +23529,8 @@ var init_createConfigValueProvider = __esm({
22883
23529
  return endpoint.url.href;
22884
23530
  }
22885
23531
  if ("hostname" in endpoint) {
22886
- const { protocol, hostname, port, path: path13 } = endpoint;
22887
- return `${protocol}//${hostname}${port ? ":" + port : ""}${path13}`;
23532
+ const { protocol, hostname, port, path: path15 } = endpoint;
23533
+ return `${protocol}//${hostname}${port ? ":" + port : ""}${path15}`;
22888
23534
  }
22889
23535
  }
22890
23536
  return endpoint;
@@ -23275,18 +23921,18 @@ var getAttrPathList;
23275
23921
  var init_getAttrPathList = __esm({
23276
23922
  "../../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js"() {
23277
23923
  init_types2();
23278
- getAttrPathList = /* @__PURE__ */ __name((path13) => {
23279
- const parts = path13.split(".");
23924
+ getAttrPathList = /* @__PURE__ */ __name((path15) => {
23925
+ const parts = path15.split(".");
23280
23926
  const pathList = [];
23281
23927
  for (const part of parts) {
23282
23928
  const squareBracketIndex = part.indexOf("[");
23283
23929
  if (squareBracketIndex !== -1) {
23284
23930
  if (part.indexOf("]") !== part.length - 1) {
23285
- throw new EndpointError(`Path: '${path13}' does not end with ']'`);
23931
+ throw new EndpointError(`Path: '${path15}' does not end with ']'`);
23286
23932
  }
23287
23933
  const arrayIndex = part.slice(squareBracketIndex + 1, -1);
23288
23934
  if (Number.isNaN(parseInt(arrayIndex))) {
23289
- throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path13}'`);
23935
+ throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path15}'`);
23290
23936
  }
23291
23937
  if (squareBracketIndex !== 0) {
23292
23938
  pathList.push(part.slice(0, squareBracketIndex));
@@ -23307,9 +23953,9 @@ var init_getAttr = __esm({
23307
23953
  "../../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js"() {
23308
23954
  init_types2();
23309
23955
  init_getAttrPathList();
23310
- getAttr = /* @__PURE__ */ __name((value, path13) => getAttrPathList(path13).reduce((acc, index) => {
23956
+ getAttr = /* @__PURE__ */ __name((value, path15) => getAttrPathList(path15).reduce((acc, index) => {
23311
23957
  if (typeof acc !== "object") {
23312
- throw new EndpointError(`Index '${index}' in '${path13}' not found in '${JSON.stringify(value)}'`);
23958
+ throw new EndpointError(`Index '${index}' in '${path15}' not found in '${JSON.stringify(value)}'`);
23313
23959
  } else if (Array.isArray(acc)) {
23314
23960
  const i6 = parseInt(index);
23315
23961
  return acc[i6 < 0 ? acc.length + i6 : i6];
@@ -23371,8 +24017,8 @@ var init_parseURL = __esm({
23371
24017
  return value;
23372
24018
  }
23373
24019
  if (typeof value === "object" && "hostname" in value) {
23374
- const { hostname: hostname2, port, protocol: protocol2 = "", path: path13 = "", query = {} } = value;
23375
- const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path13}`);
24020
+ const { hostname: hostname2, port, protocol: protocol2 = "", path: path15 = "", query = {} } = value;
24021
+ const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path15}`);
23376
24022
  url.search = Object.entries(query).map(([k6, v]) => `${k6}=${v}`).join("&");
23377
24023
  return url;
23378
24024
  }
@@ -24531,6 +25177,8 @@ var init_getAwsChunkedEncodingStream_browser = __esm({
24531
25177
  const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
24532
25178
  const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
24533
25179
  const digest3 = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0;
25180
+ Promise.resolve(digest3).catch(() => {
25181
+ });
24534
25182
  const reader = readableStream.getReader();
24535
25183
  return new ReadableStream({
24536
25184
  async pull(controller) {
@@ -24567,9 +25215,12 @@ function getAwsChunkedEncodingStream2(stream, options) {
24567
25215
  const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
24568
25216
  const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
24569
25217
  const digest3 = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : void 0;
25218
+ Promise.resolve(digest3).catch(() => {
25219
+ });
24570
25220
  const awsChunkedEncodingStream = new import_node_stream4.Readable({
24571
- read: /* @__PURE__ */ __name(() => {
24572
- }, "read")
25221
+ read() {
25222
+ readable.resume();
25223
+ }
24573
25224
  });
24574
25225
  readable.on("data", (data) => {
24575
25226
  const length = bodyLengthChecker(data) || 0;
@@ -24579,19 +25230,29 @@ function getAwsChunkedEncodingStream2(stream, options) {
24579
25230
  awsChunkedEncodingStream.push(`${length.toString(16)}\r
24580
25231
  `);
24581
25232
  awsChunkedEncodingStream.push(data);
24582
- awsChunkedEncodingStream.push("\r\n");
25233
+ if (!awsChunkedEncodingStream.push("\r\n")) {
25234
+ readable.pause();
25235
+ }
24583
25236
  });
25237
+ readable.on("error", (err) => {
25238
+ awsChunkedEncodingStream.destroy(err);
25239
+ });
25240
+ readable.pause();
24584
25241
  readable.on("end", async () => {
24585
- awsChunkedEncodingStream.push(`0\r
25242
+ try {
25243
+ awsChunkedEncodingStream.push(`0\r
24586
25244
  `);
24587
- if (checksumRequired) {
24588
- const checksum = base64Encoder(await digest3);
24589
- awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r
25245
+ if (checksumRequired) {
25246
+ const checksum = base64Encoder(await digest3);
25247
+ awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r
24590
25248
  `);
24591
- awsChunkedEncodingStream.push(`\r
25249
+ awsChunkedEncodingStream.push(`\r
24592
25250
  `);
25251
+ }
25252
+ awsChunkedEncodingStream.push(null);
25253
+ } catch (err) {
25254
+ awsChunkedEncodingStream.destroy(err);
24593
25255
  }
24594
- awsChunkedEncodingStream.push(null);
24595
25256
  });
24596
25257
  return awsChunkedEncodingStream;
24597
25258
  }
@@ -26937,7 +27598,7 @@ var init_HttpProtocol = __esm({
26937
27598
  constructor(options) {
26938
27599
  super();
26939
27600
  this.options = options;
26940
- this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace);
27601
+ this.compositeErrorRegistry = new TypeRegistry(options.defaultNamespace);
26941
27602
  for (const etr of options.errorTypeRegistries ?? []) {
26942
27603
  this.compositeErrorRegistry.copyFrom(etr);
26943
27604
  }
@@ -27031,6 +27692,44 @@ var init_HttpProtocol = __esm({
27031
27692
  cfId: output.headers["x-amz-cf-id"]
27032
27693
  };
27033
27694
  }
27695
+ resolveError(name, namespaces, registries) {
27696
+ const defaultErrorSchema = [-3, "", "Error", 0, [], [], 0];
27697
+ let schema;
27698
+ for (const registry of registries) {
27699
+ for (const ns of namespaces) {
27700
+ try {
27701
+ if (ns === "*") {
27702
+ schema = registry.getSchema(name);
27703
+ } else {
27704
+ schema = registry.getSchema(ns + "#" + name);
27705
+ }
27706
+ const errorCtor = registry.getErrorCtor(schema);
27707
+ if (errorCtor) {
27708
+ return [schema, errorCtor, "modeled"];
27709
+ } else {
27710
+ const syntheticErrorSchema = registry.getBaseException();
27711
+ if (syntheticErrorSchema) {
27712
+ const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
27713
+ if (syntheticErrorCtor) {
27714
+ return [schema, syntheticErrorCtor, "synthetic"];
27715
+ }
27716
+ }
27717
+ }
27718
+ } catch (ignored) {
27719
+ }
27720
+ }
27721
+ }
27722
+ for (const registry of registries) {
27723
+ const syntheticErrorSchema = registry.getBaseException();
27724
+ if (syntheticErrorSchema) {
27725
+ const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
27726
+ if (syntheticErrorCtor) {
27727
+ return [syntheticErrorSchema, syntheticErrorCtor, "synthetic"];
27728
+ }
27729
+ }
27730
+ }
27731
+ return [defaultErrorSchema, Error, "native"];
27732
+ }
27034
27733
  async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
27035
27734
  const eventStreamSerde = await this.loadEventStreamCapability();
27036
27735
  return eventStreamSerde.serializeEventStream({
@@ -27059,13 +27758,6 @@ var init_HttpProtocol = __esm({
27059
27758
  compositeErrorRegistry: this.compositeErrorRegistry
27060
27759
  });
27061
27760
  }
27062
- resolveEventStreamMarshaller(importedProvider) {
27063
- const context = this.serdeContext;
27064
- if (context.eventStreamMarshaller) {
27065
- return context.eventStreamMarshaller;
27066
- }
27067
- return importedProvider(this.serdeContext);
27068
- }
27069
27761
  getDefaultContentType() {
27070
27762
  throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
27071
27763
  }
@@ -27084,6 +27776,13 @@ var init_HttpProtocol = __esm({
27084
27776
  }
27085
27777
  return context.eventStreamMarshaller;
27086
27778
  }
27779
+ resolveEventStreamMarshaller(importedProvider) {
27780
+ const context = this.serdeContext;
27781
+ if (context.eventStreamMarshaller) {
27782
+ return context.eventStreamMarshaller;
27783
+ }
27784
+ return importedProvider(this.serdeContext);
27785
+ }
27087
27786
  };
27088
27787
  }
27089
27788
  });
@@ -27130,11 +27829,11 @@ var init_HttpBindingProtocol = __esm({
27130
27829
  const opTraits = translateTraits(operationSchema.traits);
27131
27830
  if (opTraits.http) {
27132
27831
  request.method = opTraits.http[0];
27133
- const [path13, search] = opTraits.http[1].split("?");
27832
+ const [path15, search] = opTraits.http[1].split("?");
27134
27833
  if (request.path == "/") {
27135
- request.path = path13;
27834
+ request.path = path15;
27136
27835
  } else {
27137
- request.path += path13;
27836
+ request.path += path15;
27138
27837
  }
27139
27838
  const traitSearchParams = new URLSearchParams(search ?? "");
27140
27839
  for (const [key, value] of traitSearchParams) {
@@ -27552,8 +28251,8 @@ var init_requestBuilder = __esm({
27552
28251
  return this;
27553
28252
  }
27554
28253
  p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
27555
- this.resolvePathStack.push((path13) => {
27556
- this.path = resolvedPath(path13, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
28254
+ this.resolvePathStack.push((path15) => {
28255
+ this.path = resolvedPath(path15, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
27557
28256
  });
27558
28257
  return this;
27559
28258
  }
@@ -28173,7 +28872,7 @@ var init_service_error_classification = __esm({
28173
28872
  return errorMessages.has(error2.message);
28174
28873
  }, "isBrowserNetworkError");
28175
28874
  isThrottlingError = /* @__PURE__ */ __name((error2) => error2.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error2.name) || error2.$retryable?.throttling == true, "isThrottlingError");
28176
- 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");
28875
+ 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");
28177
28876
  isServerError = /* @__PURE__ */ __name((error2) => {
28178
28877
  if (error2.$metadata?.httpStatusCode !== void 0) {
28179
28878
  const statusCode = error2.$metadata.httpStatusCode;
@@ -29739,9 +30438,9 @@ var init_createPaginator = __esm({
29739
30438
  return await client.send(command6, ...args);
29740
30439
  }, "makePagedClientRequest");
29741
30440
  __name(createPaginator, "createPaginator");
29742
- get = /* @__PURE__ */ __name((fromObject, path13) => {
30441
+ get = /* @__PURE__ */ __name((fromObject, path15) => {
29743
30442
  let cursor2 = fromObject;
29744
- const pathComponents = path13.split(".");
30443
+ const pathComponents = path15.split(".");
29745
30444
  for (const step of pathComponents) {
29746
30445
  if (!cursor2 || typeof cursor2 !== "object") {
29747
30446
  return void 0;
@@ -32028,7 +32727,7 @@ var init_resolveAwsSdkSigV4AConfig = __esm({
32028
32727
  // ../../node_modules/@smithy/signature-v4/dist-cjs/index.js
32029
32728
  var require_dist_cjs2 = __commonJS({
32030
32729
  "../../node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2) {
32031
- var { fromUtf8: fromUtf83, fromHex: fromHex2, toHex: toHex2, toUint8Array: toUint8Array2, isArrayBuffer: isArrayBuffer2 } = (init_serde(), __toCommonJS(serde_exports));
32730
+ var { hasOwn: hasOwn2, fromUtf8: fromUtf83, fromHex: fromHex2, toHex: toHex2, toUint8Array: toUint8Array2, isArrayBuffer: isArrayBuffer2 } = (init_serde(), __toCommonJS(serde_exports));
32032
32731
  var { normalizeProvider: normalizeProvider3 } = (init_client2(), __toCommonJS(client_exports));
32033
32732
  var { escapeUri: escapeUri2, HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
32034
32733
  var HeaderFormatter = class {
@@ -32037,7 +32736,9 @@ var require_dist_cjs2 = __commonJS({
32037
32736
  }
32038
32737
  format(headers) {
32039
32738
  const chunks = [];
32040
- for (const headerName of Object.keys(headers)) {
32739
+ for (const headerName in headers) {
32740
+ if (!hasOwn2(headers, headerName))
32741
+ continue;
32041
32742
  const bytes = fromUtf83(headerName);
32042
32743
  chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
32043
32744
  }
@@ -32052,27 +32753,27 @@ var require_dist_cjs2 = __commonJS({
32052
32753
  formatHeaderValue(header) {
32053
32754
  switch (header.type) {
32054
32755
  case "boolean":
32055
- return Uint8Array.from([header.value ? HEADER_VALUE_TYPE2.boolTrue : HEADER_VALUE_TYPE2.boolFalse]);
32756
+ return Uint8Array.from([header.value ? 0 : 1]);
32056
32757
  case "byte":
32057
- return Uint8Array.from([HEADER_VALUE_TYPE2.byte, header.value]);
32758
+ return Uint8Array.from([2, header.value]);
32058
32759
  case "short":
32059
32760
  const shortView = new DataView(new ArrayBuffer(3));
32060
- shortView.setUint8(0, HEADER_VALUE_TYPE2.short);
32761
+ shortView.setUint8(0, 3);
32061
32762
  shortView.setInt16(1, header.value, false);
32062
32763
  return new Uint8Array(shortView.buffer);
32063
32764
  case "integer":
32064
32765
  const intView = new DataView(new ArrayBuffer(5));
32065
- intView.setUint8(0, HEADER_VALUE_TYPE2.integer);
32766
+ intView.setUint8(0, 4);
32066
32767
  intView.setInt32(1, header.value, false);
32067
32768
  return new Uint8Array(intView.buffer);
32068
32769
  case "long":
32069
32770
  const longBytes = new Uint8Array(9);
32070
- longBytes[0] = HEADER_VALUE_TYPE2.long;
32771
+ longBytes[0] = 5;
32071
32772
  longBytes.set(header.value.bytes, 1);
32072
32773
  return longBytes;
32073
32774
  case "binary":
32074
32775
  const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
32075
- binView.setUint8(0, HEADER_VALUE_TYPE2.byteArray);
32776
+ binView.setUint8(0, 6);
32076
32777
  binView.setUint16(1, header.value.byteLength, false);
32077
32778
  const binBytes = new Uint8Array(binView.buffer);
32078
32779
  binBytes.set(header.value, 3);
@@ -32080,14 +32781,14 @@ var require_dist_cjs2 = __commonJS({
32080
32781
  case "string":
32081
32782
  const utf8Bytes = fromUtf83(header.value);
32082
32783
  const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
32083
- strView.setUint8(0, HEADER_VALUE_TYPE2.string);
32784
+ strView.setUint8(0, 7);
32084
32785
  strView.setUint16(1, utf8Bytes.byteLength, false);
32085
32786
  const strBytes = new Uint8Array(strView.buffer);
32086
32787
  strBytes.set(utf8Bytes, 3);
32087
32788
  return strBytes;
32088
32789
  case "timestamp":
32089
32790
  const tsBytes = new Uint8Array(9);
32090
- tsBytes[0] = HEADER_VALUE_TYPE2.timestamp;
32791
+ tsBytes[0] = 8;
32091
32792
  tsBytes.set(Int642.fromNumber(header.value.valueOf()).bytes, 1);
32092
32793
  return tsBytes;
32093
32794
  case "uuid":
@@ -32095,7 +32796,7 @@ var require_dist_cjs2 = __commonJS({
32095
32796
  throw new Error(`Invalid UUID received: ${header.value}`);
32096
32797
  }
32097
32798
  const uuidBytes = new Uint8Array(17);
32098
- uuidBytes[0] = HEADER_VALUE_TYPE2.uuid;
32799
+ uuidBytes[0] = 9;
32099
32800
  uuidBytes.set(fromHex2(header.value.replace(/-/g, "")), 1);
32100
32801
  return uuidBytes;
32101
32802
  }
@@ -32208,7 +32909,9 @@ var require_dist_cjs2 = __commonJS({
32208
32909
  var getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => {
32209
32910
  const keys = [];
32210
32911
  const serialized = {};
32211
- for (const key of Object.keys(query)) {
32912
+ for (const key in query) {
32913
+ if (!hasOwn2(query, key))
32914
+ continue;
32212
32915
  if (key.toLowerCase() === SIGNATURE_HEADER) {
32213
32916
  continue;
32214
32917
  }
@@ -32273,10 +32976,10 @@ ${longDate}
32273
32976
  ${credentialScope}
32274
32977
  ${toHex2(hashedRequest)}`;
32275
32978
  }
32276
- getCanonicalPath({ path: path13 }) {
32979
+ getCanonicalPath({ path: path15 }) {
32277
32980
  if (this.uriEscapePath) {
32278
32981
  const normalizedPathSegments = [];
32279
- for (const pathSegment of path13.split("/")) {
32982
+ for (const pathSegment of path15.split("/")) {
32280
32983
  if (pathSegment?.length === 0)
32281
32984
  continue;
32282
32985
  if (pathSegment === ".")
@@ -32287,11 +32990,11 @@ ${toHex2(hashedRequest)}`;
32287
32990
  normalizedPathSegments.push(pathSegment);
32288
32991
  }
32289
32992
  }
32290
- const normalizedPath = `${path13?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path13?.endsWith("/") ? "/" : ""}`;
32993
+ const normalizedPath = `${path15?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path15?.endsWith("/") ? "/" : ""}`;
32291
32994
  const doubleEncoded = escapeUri2(normalizedPath);
32292
32995
  return doubleEncoded.replace(/%2F/g, "/");
32293
32996
  }
32294
- return path13;
32997
+ return path15;
32295
32998
  }
32296
32999
  validateResolvedCredentials(credentials) {
32297
33000
  if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
@@ -32356,7 +33059,9 @@ ${toHex2(hashedRequest)}`;
32356
33059
  return canonical;
32357
33060
  }, "getCanonicalHeaders");
32358
33061
  var getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => {
32359
- for (const headerName of Object.keys(headers)) {
33062
+ for (const headerName in headers) {
33063
+ if (!hasOwn2(headers, headerName))
33064
+ continue;
32360
33065
  if (headerName.toLowerCase() === SHA256_HEADER) {
32361
33066
  return headers[headerName];
32362
33067
  }
@@ -32372,7 +33077,9 @@ ${toHex2(hashedRequest)}`;
32372
33077
  }, "getPayloadHash");
32373
33078
  var hasHeader2 = /* @__PURE__ */ __name((soughtHeader, headers) => {
32374
33079
  soughtHeader = soughtHeader.toLowerCase();
32375
- for (const headerName of Object.keys(headers)) {
33080
+ for (const headerName in headers) {
33081
+ if (!hasOwn2(headers, headerName))
33082
+ continue;
32376
33083
  if (soughtHeader === headerName.toLowerCase()) {
32377
33084
  return true;
32378
33085
  }
@@ -32381,7 +33088,9 @@ ${toHex2(hashedRequest)}`;
32381
33088
  }, "hasHeader");
32382
33089
  var moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => {
32383
33090
  const { headers, query = {} } = HttpRequest2.clone(request);
32384
- for (const name of Object.keys(headers)) {
33091
+ for (const name in headers) {
33092
+ if (!hasOwn2(headers, name))
33093
+ continue;
32385
33094
  const lname = name.toLowerCase();
32386
33095
  if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {
32387
33096
  query[name] = headers[name];
@@ -32396,7 +33105,9 @@ ${toHex2(hashedRequest)}`;
32396
33105
  }, "moveHeadersToQuery");
32397
33106
  var prepareRequest = /* @__PURE__ */ __name((request) => {
32398
33107
  request = HttpRequest2.clone(request);
32399
- for (const headerName of Object.keys(request.headers)) {
33108
+ for (const headerName in request.headers) {
33109
+ if (!hasOwn2(request.headers, headerName))
33110
+ continue;
32400
33111
  if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
32401
33112
  delete request.headers[headerName];
32402
33113
  }
@@ -33170,12 +33881,13 @@ For more information, please visit: ` + STATIC_STABILITY_DOC_URL);
33170
33881
  // ../../node_modules/@smithy/node-http-handler/dist-cjs/index.js
33171
33882
  var require_dist_cjs5 = __commonJS({
33172
33883
  "../../node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2) {
33884
+ var { hasOwn: hasOwn2 } = (init_serde(), __toCommonJS(serde_exports));
33885
+ var { streamCollector: streamCollector8 } = (init_serde(), __toCommonJS(serde_exports));
33886
+ exports2.streamCollector = streamCollector8;
33173
33887
  var { buildQueryString: buildQueryString2, HttpResponse: HttpResponse2 } = (init_protocols(), __toCommonJS(protocols_exports));
33174
33888
  var node_https = require("node:https");
33175
33889
  var { Readable: Readable8 } = require("node:stream");
33176
33890
  var http2 = require("node:http2");
33177
- var { streamCollector: streamCollector8 } = (init_serde(), __toCommonJS(serde_exports));
33178
- exports2.streamCollector = streamCollector8;
33179
33891
  function buildAbortError(abortSignal) {
33180
33892
  const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : void 0;
33181
33893
  if (reason) {
@@ -33198,6 +33910,8 @@ var require_dist_cjs5 = __commonJS({
33198
33910
  var getTransformedHeaders = /* @__PURE__ */ __name((headers) => {
33199
33911
  const transformedHeaders = {};
33200
33912
  for (const name in headers) {
33913
+ if (!hasOwn2(headers, name))
33914
+ continue;
33201
33915
  const headerValues = headers[name];
33202
33916
  transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
33203
33917
  }
@@ -33388,6 +34102,8 @@ var require_dist_cjs5 = __commonJS({
33388
34102
  }
33389
34103
  if (sockets && requests) {
33390
34104
  for (const origin in sockets) {
34105
+ if (!hasOwn2(sockets, origin))
34106
+ continue;
33391
34107
  const socketsInUse = sockets[origin]?.length ?? 0;
33392
34108
  const requestsEnqueued = requests[origin]?.length ?? 0;
33393
34109
  if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
@@ -33420,6 +34136,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33420
34136
  this.config = await this.configProvider;
33421
34137
  }
33422
34138
  const config = this.config;
34139
+ const logger2 = config.logger;
33423
34140
  const isSSL = request.protocol === "https:";
33424
34141
  if (!isSSL && !this.config.httpAgent) {
33425
34142
  this.config.httpAgent = await this.config.httpAgentProvider();
@@ -33463,7 +34180,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33463
34180
  });
33464
34181
  }
33465
34182
  socketWarningTimeoutId = timing.setTimeout(() => {
33466
- this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);
34183
+ this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, logger2);
33467
34184
  }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2e3) + (config.connectionTimeout ?? 1e3));
33468
34185
  const queryString = request.query ? buildQueryString2(request.query) : "";
33469
34186
  let auth = void 0;
@@ -33472,12 +34189,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33472
34189
  const password = request.password ?? "";
33473
34190
  auth = `${username}:${password}`;
33474
34191
  }
33475
- let path13 = request.path;
34192
+ let path15 = request.path;
33476
34193
  if (queryString) {
33477
- path13 += `?${queryString}`;
34194
+ path15 += `?${queryString}`;
33478
34195
  }
33479
34196
  if (request.fragment) {
33480
- path13 += `#${request.fragment}`;
34197
+ path15 += `#${request.fragment}`;
33481
34198
  }
33482
34199
  let hostname = request.hostname ?? "";
33483
34200
  if (hostname[0] === "[" && hostname.endsWith("]")) {
@@ -33489,7 +34206,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33489
34206
  headers: request.headers,
33490
34207
  host: hostname,
33491
34208
  method: request.method,
33492
- path: path13,
34209
+ path: path15,
33493
34210
  port: request.port,
33494
34211
  agent,
33495
34212
  auth
@@ -33527,7 +34244,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33527
34244
  }
33528
34245
  const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;
33529
34246
  connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);
33530
- requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console);
34247
+ requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, logger2 ?? console);
33531
34248
  socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);
33532
34249
  const httpAgent = nodeHttpsOptions.agent;
33533
34250
  if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
@@ -33545,6 +34262,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33545
34262
  updateHttpClientConfig(key, value) {
33546
34263
  this.config = void 0;
33547
34264
  this.configProvider = this.configProvider.then((config) => {
34265
+ if (key === /* @__PURE__ */ Symbol.for("logger")) {
34266
+ return {
34267
+ ...config,
34268
+ logger: config.logger ?? value
34269
+ };
34270
+ }
33548
34271
  return {
33549
34272
  ...config,
33550
34273
  [key]: value
@@ -33632,6 +34355,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33632
34355
  destroy() {
33633
34356
  this.refs = 0;
33634
34357
  if (!this.session.destroyed) {
34358
+ this.session.setTimeout(0);
33635
34359
  this.session.destroy();
33636
34360
  }
33637
34361
  }
@@ -33750,9 +34474,8 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33750
34474
  session.on("error", ensureDestroyed);
33751
34475
  session.on("frameError", ensureDestroyed);
33752
34476
  session.on("close", ensureDestroyed);
33753
- if (connectionConfiguration.requestTimeout) {
33754
- session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);
33755
- }
34477
+ const timeout = connectionConfiguration.requestTimeout ?? 3e5;
34478
+ session.setTimeout(timeout, ensureDestroyed);
33756
34479
  ref.retain();
33757
34480
  return ref;
33758
34481
  }
@@ -33904,16 +34627,16 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33904
34627
  reject(err);
33905
34628
  }, "rejectWithDestroy");
33906
34629
  const queryString = query ? buildQueryString2(query) : "";
33907
- let path13 = request.path;
34630
+ let path15 = request.path;
33908
34631
  if (queryString) {
33909
- path13 += `?${queryString}`;
34632
+ path15 += `?${queryString}`;
33910
34633
  }
33911
34634
  if (request.fragment) {
33912
- path13 += `#${request.fragment}`;
34635
+ path15 += `#${request.fragment}`;
33913
34636
  }
33914
34637
  const clientHttp2Stream = session.request({
33915
34638
  ...request.headers,
33916
- [constants.HTTP2_HEADER_PATH]: path13,
34639
+ [constants.HTTP2_HEADER_PATH]: path15,
33917
34640
  [constants.HTTP2_HEADER_METHOD]: method
33918
34641
  });
33919
34642
  if (effectiveRequestTimeout) {
@@ -33955,6 +34678,9 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33955
34678
  resolve5({ response: httpResponse });
33956
34679
  if (useIsolatedSession) {
33957
34680
  session.close();
34681
+ clientHttp2Stream.on("end", () => {
34682
+ ref.destroy();
34683
+ });
33958
34684
  }
33959
34685
  });
33960
34686
  clientHttp2Stream.on("close", () => {
@@ -33964,7 +34690,11 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
33964
34690
  this.connectionManager.release(requestContext, ref);
33965
34691
  }
33966
34692
  if (!fulfilled) {
33967
- rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
34693
+ const error2 = new Error("Unexpected error: http2 request did not get a response");
34694
+ if (session.destroyed) {
34695
+ error2.name = "TimeoutError";
34696
+ }
34697
+ rejectWithDestroy(error2);
33968
34698
  }
33969
34699
  });
33970
34700
  writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);
@@ -33995,7 +34725,7 @@ var require_dist_cjs6 = __commonJS({
33995
34725
  var { setCredentialFeature: setCredentialFeature2 } = (init_client3(), __toCommonJS(client_exports2));
33996
34726
  var { CredentialsProviderError: CredentialsProviderError2 } = (init_config2(), __toCommonJS(config_exports));
33997
34727
  var { NodeHttpHandler } = require_dist_cjs5();
33998
- var fs13 = require("node:fs/promises");
34728
+ var fs14 = require("node:fs/promises");
33999
34729
  var { HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
34000
34730
  var { sdkStreamMixin: sdkStreamMixin3, parseRfc3339DateTime: parseRfc3339DateTime2 } = (init_serde(), __toCommonJS(serde_exports));
34001
34731
  var ECS_CONTAINER_HOST = "169.254.170.2";
@@ -34121,7 +34851,7 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
34121
34851
  const provider = retryWrapper(async () => {
34122
34852
  const request = createGetRequest(url);
34123
34853
  if (tokenFile) {
34124
- request.headers.Authorization = validateToken((await fs13.readFile(tokenFile)).toString());
34854
+ request.headers.Authorization = validateToken((await fs14.readFile(tokenFile)).toString());
34125
34855
  } else if (token) {
34126
34856
  request.headers.Authorization = validateToken(token);
34127
34857
  }
@@ -34236,7 +34966,7 @@ var init_package = __esm({
34236
34966
  "../../node_modules/@aws-sdk/nested-clients/package.json"() {
34237
34967
  package_default = {
34238
34968
  name: "@aws-sdk/nested-clients",
34239
- version: "3.997.43",
34969
+ version: "3.997.46",
34240
34970
  description: "Nested clients for AWS SDK packages.",
34241
34971
  homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
34242
34972
  license: "Apache-2.0",
@@ -34336,13 +35066,13 @@ var init_package = __esm({
34336
35066
  "test:watch": "yarn g:vitest watch"
34337
35067
  },
34338
35068
  dependencies: {
34339
- "@aws-sdk/core": "^3.977.8",
34340
- "@aws-sdk/signature-v4-multi-region": "^3.996.45",
34341
- "@aws-sdk/types": "^3.974.4",
34342
- "@smithy/core": "^3.31.1",
34343
- "@smithy/fetch-http-handler": "^5.6.13",
34344
- "@smithy/node-http-handler": "^4.9.13",
34345
- "@smithy/types": "^4.16.1",
35069
+ "@aws-sdk/core": "^3.978.1",
35070
+ "@aws-sdk/signature-v4-multi-region": "^3.996.47",
35071
+ "@aws-sdk/types": "^3.974.6",
35072
+ "@smithy/core": "^3.35.0",
35073
+ "@smithy/fetch-http-handler": "^5.8.0",
35074
+ "@smithy/node-http-handler": "^4.12.1",
35075
+ "@smithy/types": "^4.19.0",
34346
35076
  tslib: "^2.6.2"
34347
35077
  },
34348
35078
  devDependencies: {
@@ -34387,7 +35117,6 @@ var init_cbor_types = __esm({
34387
35117
  var loadSmithyRpcV2CborErrorCode;
34388
35118
  var init_parseCborBody = __esm({
34389
35119
  "../../node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js"() {
34390
- init_transport();
34391
35120
  loadSmithyRpcV2CborErrorCode = /* @__PURE__ */ __name((output, data) => {
34392
35121
  const sanitizeErrorCode2 = /* @__PURE__ */ __name((rawValue) => {
34393
35122
  let cleanValue = rawValue;
@@ -34400,26 +35129,11 @@ var init_parseCborBody = __esm({
34400
35129
  if (cleanValue.indexOf(":") >= 0) {
34401
35130
  cleanValue = cleanValue.split(":")[0];
34402
35131
  }
34403
- if (cleanValue.indexOf("#") >= 0) {
34404
- cleanValue = cleanValue.split("#")[1];
34405
- }
34406
35132
  return cleanValue;
34407
35133
  }, "sanitizeErrorCode");
34408
35134
  if (data["__type"] !== void 0) {
34409
35135
  return sanitizeErrorCode2(data["__type"]);
34410
35136
  }
34411
- let codeKey;
34412
- for (const key in data) {
34413
- if (!hasOwn(data, key))
34414
- continue;
34415
- if (key.toLowerCase() === "code") {
34416
- codeKey = key;
34417
- break;
34418
- }
34419
- }
34420
- if (codeKey && data[codeKey] !== void 0) {
34421
- return sanitizeErrorCode2(data[codeKey]);
34422
- }
34423
35137
  }, "loadSmithyRpcV2CborErrorCode");
34424
35138
  }
34425
35139
  });
@@ -35777,11 +36491,11 @@ var init_SmithyRpcV2CborProtocol = __esm({
35777
36491
  }
35778
36492
  }
35779
36493
  const { service, operation: operation2 } = getSmithyContext(context);
35780
- const path13 = `/service/${service}/operation/${operation2}`;
36494
+ const path15 = `/service/${service}/operation/${operation2}`;
35781
36495
  if (request.path.endsWith("/")) {
35782
- request.path += path13.slice(1);
36496
+ request.path += path15.slice(1);
35783
36497
  } else {
35784
- request.path += path13;
36498
+ request.path += path15;
35785
36499
  }
35786
36500
  return request;
35787
36501
  }
@@ -35789,36 +36503,37 @@ var init_SmithyRpcV2CborProtocol = __esm({
35789
36503
  return super.deserializeResponse(operationSchema, context, response);
35790
36504
  }
35791
36505
  async handleError(operationSchema, context, response, dataObject, metadata) {
35792
- const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
36506
+ const errorIdentifier = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
36507
+ const preferredNamespaces = ["*"];
36508
+ const { defaultNamespace } = this.options;
36509
+ preferredNamespaces.unshift(defaultNamespace);
36510
+ const [namespace, errorShapeName] = (() => {
36511
+ if (errorIdentifier.includes("#")) {
36512
+ return errorIdentifier.split("#");
36513
+ }
36514
+ return [void 0, errorIdentifier];
36515
+ })();
36516
+ if (namespace) {
36517
+ preferredNamespaces.unshift(namespace);
36518
+ }
35793
36519
  const errorMetadata = {
35794
36520
  $metadata: metadata,
35795
- $fault: response.statusCode <= 500 ? "client" : "server"
36521
+ $fault: response.statusCode < 500 ? "client" : "server"
35796
36522
  };
35797
- let namespace = this.options.defaultNamespace;
35798
- if (errorName.includes("#")) {
35799
- [namespace] = errorName.split("#");
35800
- }
35801
- const registry = this.compositeErrorRegistry;
35802
- const nsRegistry = TypeRegistry.for(namespace);
35803
- registry.copyFrom(nsRegistry);
35804
- let errorSchema;
35805
- try {
35806
- errorSchema = registry.getSchema(errorName);
35807
- } catch (ignored) {
36523
+ const preferredRegistries = [this.compositeErrorRegistry];
36524
+ if (namespace) {
36525
+ preferredRegistries.push(TypeRegistry.for(namespace));
36526
+ }
36527
+ preferredRegistries.push(TypeRegistry.for(defaultNamespace));
36528
+ const [errorSchema, ErrorCtor, errorMode] = this.resolveError(errorShapeName, preferredNamespaces, preferredRegistries);
36529
+ if (errorMode === "native" || errorMode === "synthetic") {
35808
36530
  if (dataObject.Message) {
35809
36531
  dataObject.message = dataObject.Message;
35810
36532
  }
35811
- const syntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace);
35812
- registry.copyFrom(syntheticRegistry);
35813
- const baseExceptionSchema = registry.getBaseException();
35814
- if (baseExceptionSchema) {
35815
- const ErrorCtor2 = registry.getErrorCtor(baseExceptionSchema);
35816
- throw Object.assign(new ErrorCtor2({ name: errorName }), errorMetadata, dataObject);
35817
- }
35818
- throw Object.assign(new Error(errorName), errorMetadata, dataObject);
36533
+ const error2 = errorMode === "synthetic" ? new ErrorCtor({ name: errorShapeName }) : new Error(errorShapeName);
36534
+ throw Object.assign(error2, errorMetadata, dataObject);
35819
36535
  }
35820
36536
  const ns = NormalizedSchema.of(errorSchema);
35821
- const ErrorCtor = registry.getErrorCtor(errorSchema);
35822
36537
  const message = dataObject.message ?? dataObject.Message ?? "Unknown";
35823
36538
  const exception = new ErrorCtor({});
35824
36539
  const output = {};
@@ -39864,10 +40579,10 @@ var init_schemas_0 = __esm({
39864
40579
  _se = "server";
39865
40580
  _tT = "tokenType";
39866
40581
  n0 = "com.amazonaws.ssooidc";
39867
- _s_registry = TypeRegistry.for(_s);
40582
+ _s_registry = new TypeRegistry(_s);
39868
40583
  SSOOIDCServiceException$ = [-3, _s, "SSOOIDCServiceException", 0, [], []];
39869
40584
  _s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);
39870
- n0_registry = TypeRegistry.for(n0);
40585
+ n0_registry = new TypeRegistry(n0);
39871
40586
  AccessDeniedException$ = [
39872
40587
  -3,
39873
40588
  n0,
@@ -40407,7 +41122,7 @@ var require_dist_cjs8 = __commonJS({
40407
41122
  const tokenString = JSON.stringify(ssoToken, null, 2);
40408
41123
  return writeFile(tokenFilepath, tokenString);
40409
41124
  }, "writeSSOTokenToFile");
40410
- var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);
41125
+ var lastRefreshAttemptTimes = /* @__PURE__ */ new Map();
40411
41126
  var fromSso = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => {
40412
41127
  init.logger?.debug("@aws-sdk/token-providers - fromSso");
40413
41128
  const profiles = await parseKnownFiles2(init);
@@ -40442,11 +41157,15 @@ var require_dist_cjs8 = __commonJS({
40442
41157
  validateTokenKey("accessToken", ssoToken.accessToken);
40443
41158
  validateTokenKey("expiresAt", ssoToken.expiresAt);
40444
41159
  const { accessToken, expiresAt } = ssoToken;
40445
- const existingToken = { token: accessToken, expiration: new Date(expiresAt) };
41160
+ const existingToken = {
41161
+ token: accessToken,
41162
+ expiration: new Date(expiresAt)
41163
+ };
40446
41164
  if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
40447
41165
  return existingToken;
40448
41166
  }
40449
- if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {
41167
+ const lastRefreshAttemptTime = lastRefreshAttemptTimes.get(ssoSessionName) ?? 0;
41168
+ if (Date.now() - lastRefreshAttemptTime < 30 * 1e3) {
40450
41169
  validateTokenExpiry(existingToken);
40451
41170
  return existingToken;
40452
41171
  }
@@ -40454,7 +41173,7 @@ var require_dist_cjs8 = __commonJS({
40454
41173
  validateTokenKey("clientSecret", ssoToken.clientSecret, true);
40455
41174
  validateTokenKey("refreshToken", ssoToken.refreshToken, true);
40456
41175
  try {
40457
- lastRefreshAttemptTime.setTime(Date.now());
41176
+ lastRefreshAttemptTimes.set(ssoSessionName, Date.now());
40458
41177
  const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
40459
41178
  validateTokenKey("accessToken", newSsoOidcToken.accessToken);
40460
41179
  validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
@@ -40811,10 +41530,10 @@ var init_schemas_02 = __esm({
40811
41530
  _sT = "sessionToken";
40812
41531
  _xasbt = "x-amz-sso_bearer_token";
40813
41532
  n02 = "com.amazonaws.sso";
40814
- _s_registry2 = TypeRegistry.for(_s2);
41533
+ _s_registry2 = new TypeRegistry(_s2);
40815
41534
  SSOServiceException$ = [-3, _s2, "SSOServiceException", 0, [], []];
40816
41535
  _s_registry2.registerError(SSOServiceException$, SSOServiceException);
40817
- n0_registry2 = TypeRegistry.for(n02);
41536
+ n0_registry2 = new TypeRegistry(n02);
40818
41537
  InvalidRequestException$2 = [
40819
41538
  -3,
40820
41539
  n02,
@@ -42018,7 +42737,7 @@ var init_errors3 = __esm({
42018
42737
  });
42019
42738
 
42020
42739
  // ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js
42021
- 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$;
42740
+ 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$;
42022
42741
  var init_schemas_03 = __esm({
42023
42742
  "../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js"() {
42024
42743
  init_schema4();
@@ -42046,6 +42765,7 @@ var init_schemas_03 = __esm({
42046
42765
  _IITE = "InvalidIdentityTokenException";
42047
42766
  _K = "Key";
42048
42767
  _MPDE = "MalformedPolicyDocumentException";
42768
+ _MSTS = "MinimumSessionTokenSize";
42049
42769
  _P = "Policy";
42050
42770
  _PA = "PolicyArns";
42051
42771
  _PAr = "ProviderArn";
@@ -42065,6 +42785,8 @@ var init_schemas_03 = __esm({
42065
42785
  _SI = "SourceIdentity";
42066
42786
  _SN = "SerialNumber";
42067
42787
  _ST = "SessionToken";
42788
+ _STS = "SessionTokenSize";
42789
+ _STU = "SessionTokenUtilization";
42068
42790
  _T = "Tags";
42069
42791
  _TC = "TokenCode";
42070
42792
  _TTK = "TransitiveTagKeys";
@@ -42083,10 +42805,10 @@ var init_schemas_03 = __esm({
42083
42805
  _s3 = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
42084
42806
  _tLT = "tagListType";
42085
42807
  n03 = "com.amazonaws.sts";
42086
- _s_registry3 = TypeRegistry.for(_s3);
42808
+ _s_registry3 = new TypeRegistry(_s3);
42087
42809
  STSServiceException$ = [-3, _s3, "STSServiceException", 0, [], []];
42088
42810
  _s_registry3.registerError(STSServiceException$, STSServiceException);
42089
- n0_registry3 = TypeRegistry.for(n03);
42811
+ n0_registry3 = new TypeRegistry(n03);
42090
42812
  ExpiredTokenException$2 = [
42091
42813
  -3,
42092
42814
  n03,
@@ -42170,8 +42892,8 @@ var init_schemas_03 = __esm({
42170
42892
  n03,
42171
42893
  _ARR,
42172
42894
  0,
42173
- [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
42174
- [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
42895
+ [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC, _MSTS],
42896
+ [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType, 1],
42175
42897
  2
42176
42898
  ];
42177
42899
  AssumeRoleResponse$ = [
@@ -42179,16 +42901,16 @@ var init_schemas_03 = __esm({
42179
42901
  n03,
42180
42902
  _ARRs,
42181
42903
  0,
42182
- [_C, _ARU, _PPS, _SI],
42183
- [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0]
42904
+ [_C, _ARU, _PPS, _SI, _STU, _STS],
42905
+ [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0, 1, 1]
42184
42906
  ];
42185
42907
  AssumeRoleWithWebIdentityRequest$ = [
42186
42908
  3,
42187
42909
  n03,
42188
42910
  _ARWWIR,
42189
42911
  0,
42190
- [_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
42191
- [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
42912
+ [_RA, _RSN, _WIT, _PI, _PA, _P, _DS, _MSTS],
42913
+ [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1, 1],
42192
42914
  3
42193
42915
  ];
42194
42916
  AssumeRoleWithWebIdentityResponse$ = [
@@ -42196,8 +42918,8 @@ var init_schemas_03 = __esm({
42196
42918
  n03,
42197
42919
  _ARWWIRs,
42198
42920
  0,
42199
- [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
42200
- [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0]
42921
+ [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI, _STU, _STS],
42922
+ [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0, 1, 1]
42201
42923
  ];
42202
42924
  Credentials$ = [
42203
42925
  3,
@@ -43237,10 +43959,10 @@ var init_schemas_04 = __esm({
43237
43959
  _tT2 = "tokenType";
43238
43960
  _tt = "token_type";
43239
43961
  n04 = "com.amazonaws.signin";
43240
- _s_registry4 = TypeRegistry.for(_s4);
43962
+ _s_registry4 = new TypeRegistry(_s4);
43241
43963
  SigninServiceException$ = [-3, _s4, "SigninServiceException", 0, [], []];
43242
43964
  _s_registry4.registerError(SigninServiceException$, SigninServiceException);
43243
- n0_registry4 = TypeRegistry.for(n04);
43965
+ n0_registry4 = new TypeRegistry(n04);
43244
43966
  AccessDeniedException$2 = [
43245
43967
  -3,
43246
43968
  n04,
@@ -43738,7 +44460,7 @@ var require_dist_cjs11 = __commonJS({
43738
44460
  var { createHash: createHash6, createPrivateKey, createPublicKey, sign: sign3 } = require("node:crypto");
43739
44461
  var { promises: promises2 } = require("node:fs");
43740
44462
  var { homedir: homedir3 } = require("node:os");
43741
- var { dirname: dirname3, join: join15 } = require("node:path");
44463
+ var { dirname: dirname3, join: join16 } = require("node:path");
43742
44464
  var LoginCredentialsFetcher = class _LoginCredentialsFetcher {
43743
44465
  static {
43744
44466
  __name(this, "LoginCredentialsFetcher");
@@ -43905,10 +44627,10 @@ var require_dist_cjs11 = __commonJS({
43905
44627
  await promises2.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
43906
44628
  }
43907
44629
  getTokenFilePath() {
43908
- const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join15(homedir3(), ".aws", "login", "cache");
44630
+ const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join16(homedir3(), ".aws", "login", "cache");
43909
44631
  const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
43910
44632
  const loginSessionSha256 = createHash6("sha256").update(loginSessionBytes).digest("hex");
43911
- return join15(directory, `${loginSessionSha256}.json`);
44633
+ return join16(directory, `${loginSessionSha256}.json`);
43912
44634
  }
43913
44635
  derToRawSignature(derSignature) {
43914
44636
  let offset = 2;
@@ -44399,6 +45121,7 @@ var require_dist_cjs15 = __commonJS({
44399
45121
  if (!passiveLock) {
44400
45122
  passiveLock = chain3(options).then((c6) => {
44401
45123
  credentials = c6;
45124
+ }).catch(() => {
44402
45125
  }).finally(() => {
44403
45126
  passiveLock = void 0;
44404
45127
  });
@@ -66096,10 +66819,10 @@ var init_schemas_05 = __esm({
66096
66819
  _s5 = "smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity";
66097
66820
  _se3 = "server";
66098
66821
  n05 = "com.amazonaws.cognitoidentity";
66099
- _s_registry5 = TypeRegistry.for(_s5);
66822
+ _s_registry5 = new TypeRegistry(_s5);
66100
66823
  CognitoIdentityServiceException$ = [-3, _s5, "CognitoIdentityServiceException", 0, [], []];
66101
66824
  _s_registry5.registerError(CognitoIdentityServiceException$, CognitoIdentityServiceException);
66102
- n0_registry5 = TypeRegistry.for(n05);
66825
+ n0_registry5 = new TypeRegistry(n05);
66103
66826
  ExternalServiceException$ = [
66104
66827
  -3,
66105
66828
  n05,
@@ -67850,9 +68573,9 @@ var require_lib4 = __commonJS({
67850
68573
  var require_build = __commonJS({
67851
68574
  "../../node_modules/y18n/build/index.cjs"(exports2, module2) {
67852
68575
  "use strict";
67853
- var fs13 = require("fs");
68576
+ var fs14 = require("fs");
67854
68577
  var util = require("util");
67855
- var path13 = require("path");
68578
+ var path15 = require("path");
67856
68579
  var shim;
67857
68580
  var Y18N = class {
67858
68581
  static {
@@ -68018,14 +68741,14 @@ var require_build = __commonJS({
68018
68741
  __name(y18n$1, "y18n$1");
68019
68742
  var nodePlatformShim = {
68020
68743
  fs: {
68021
- readFileSync: fs13.readFileSync,
68022
- writeFile: fs13.writeFile
68744
+ readFileSync: fs14.readFileSync,
68745
+ writeFile: fs14.writeFile
68023
68746
  },
68024
68747
  format: util.format,
68025
- resolve: path13.resolve,
68748
+ resolve: path15.resolve,
68026
68749
  exists: /* @__PURE__ */ __name((file) => {
68027
68750
  try {
68028
- return fs13.statSync(file).isFile();
68751
+ return fs14.statSync(file).isFile();
68029
68752
  } catch (err) {
68030
68753
  return false;
68031
68754
  }
@@ -68043,8 +68766,8 @@ var require_build2 = __commonJS({
68043
68766
  "../../node_modules/yargs-parser/build/index.cjs"(exports2, module2) {
68044
68767
  "use strict";
68045
68768
  var util = require("util");
68046
- var path13 = require("path");
68047
- var fs13 = require("fs");
68769
+ var path15 = require("path");
68770
+ var fs14 = require("fs");
68048
68771
  function camelCase(str) {
68049
68772
  const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
68050
68773
  if (!isCamelCase) {
@@ -69026,13 +69749,13 @@ var require_build2 = __commonJS({
69026
69749
  return env2;
69027
69750
  }, "env"),
69028
69751
  format: util.format,
69029
- normalize: path13.normalize,
69030
- resolve: path13.resolve,
69031
- require: /* @__PURE__ */ __name((path14) => {
69752
+ normalize: path15.normalize,
69753
+ resolve: path15.resolve,
69754
+ require: /* @__PURE__ */ __name((path16) => {
69032
69755
  if (typeof require !== "undefined") {
69033
- return require(path14);
69034
- } else if (path14.match(/\.json$/)) {
69035
- return JSON.parse(fs13.readFileSync(path14, "utf8"));
69756
+ return require(path16);
69757
+ } else if (path16.match(/\.json$/)) {
69758
+ return JSON.parse(fs14.readFileSync(path16, "utf8"));
69036
69759
  } else {
69037
69760
  throw Error("only .json config files are supported in ESM");
69038
69761
  }
@@ -69122,14 +69845,14 @@ var require_emoji_regex = __commonJS({
69122
69845
  var require_string_width = __commonJS({
69123
69846
  "../../node_modules/string-width/index.js"(exports2, module2) {
69124
69847
  "use strict";
69125
- var stripAnsi = require_strip_ansi();
69848
+ var stripAnsi2 = require_strip_ansi();
69126
69849
  var isFullwidthCodePoint = require_is_fullwidth_code_point();
69127
69850
  var emojiRegex = require_emoji_regex();
69128
69851
  var stringWidth = /* @__PURE__ */ __name((string) => {
69129
69852
  if (typeof string !== "string" || string.length === 0) {
69130
69853
  return 0;
69131
69854
  }
69132
- string = stripAnsi(string);
69855
+ string = stripAnsi2(string);
69133
69856
  if (string.length === 0) {
69134
69857
  return 0;
69135
69858
  }
@@ -70029,15 +70752,15 @@ var require_route = __commonJS({
70029
70752
  }
70030
70753
  __name(link, "link");
70031
70754
  function wrapConversion(toModel, graph) {
70032
- const path13 = [graph[toModel].parent, toModel];
70755
+ const path15 = [graph[toModel].parent, toModel];
70033
70756
  let fn = conversions[graph[toModel].parent][toModel];
70034
70757
  let cur = graph[toModel].parent;
70035
70758
  while (graph[cur].parent) {
70036
- path13.unshift(graph[cur].parent);
70759
+ path15.unshift(graph[cur].parent);
70037
70760
  fn = link(conversions[graph[cur].parent][cur], fn);
70038
70761
  cur = graph[cur].parent;
70039
70762
  }
70040
- fn.conversion = path13;
70763
+ fn.conversion = path15;
70041
70764
  return fn;
70042
70765
  }
70043
70766
  __name(wrapConversion, "wrapConversion");
@@ -70269,7 +70992,7 @@ var require_wrap_ansi = __commonJS({
70269
70992
  "../../node_modules/wrap-ansi/index.js"(exports2, module2) {
70270
70993
  "use strict";
70271
70994
  var stringWidth = require_string_width();
70272
- var stripAnsi = require_strip_ansi();
70995
+ var stripAnsi2 = require_strip_ansi();
70273
70996
  var ansiStyles = require_ansi_styles();
70274
70997
  var ESCAPES = /* @__PURE__ */ new Set([
70275
70998
  "\x1B",
@@ -70288,7 +71011,7 @@ var require_wrap_ansi = __commonJS({
70288
71011
  const characters = [...word];
70289
71012
  let isInsideEscape = false;
70290
71013
  let isInsideLinkEscape = false;
70291
- let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
71014
+ let visible = stringWidth(stripAnsi2(rows[rows.length - 1]));
70292
71015
  for (const [index, character] of characters.entries()) {
70293
71016
  const characterLength = stringWidth(character);
70294
71017
  if (visible + characterLength <= columns) {
@@ -70691,12 +71414,12 @@ var require_build3 = __commonJS({
70691
71414
  }
70692
71415
  __name(cliui, "cliui");
70693
71416
  var stringWidth = require_string_width();
70694
- var stripAnsi = require_strip_ansi();
71417
+ var stripAnsi2 = require_strip_ansi();
70695
71418
  var wrap = require_wrap_ansi();
70696
71419
  function ui(opts) {
70697
71420
  return cliui(opts, {
70698
71421
  stringWidth,
70699
- stripAnsi,
71422
+ stripAnsi: stripAnsi2,
70700
71423
  wrap
70701
71424
  });
70702
71425
  }
@@ -70754,8 +71477,8 @@ var require_get_caller_file = __commonJS({
70754
71477
  var require_require_directory = __commonJS({
70755
71478
  "../../node_modules/require-directory/index.js"(exports2, module2) {
70756
71479
  "use strict";
70757
- var fs13 = require("fs");
70758
- var join15 = require("path").join;
71480
+ var fs14 = require("fs");
71481
+ var join16 = require("path").join;
70759
71482
  var resolve5 = require("path").resolve;
70760
71483
  var dirname3 = require("path").dirname;
70761
71484
  var defaultOptions = {
@@ -70768,22 +71491,22 @@ var require_require_directory = __commonJS({
70768
71491
  return obj;
70769
71492
  }, "visit")
70770
71493
  };
70771
- function checkFileInclusion(path13, filename, options) {
71494
+ function checkFileInclusion(path15, filename, options) {
70772
71495
  return (
70773
71496
  // verify file has valid extension
70774
71497
  new RegExp("\\.(" + options.extensions.join("|") + ")$", "i").test(filename) && // if options.include is a RegExp, evaluate it and make sure the path passes
70775
- !(options.include && options.include instanceof RegExp && !options.include.test(path13)) && // if options.include is a function, evaluate it and make sure the path passes
70776
- !(options.include && typeof options.include === "function" && !options.include(path13, filename)) && // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass
70777
- !(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path13)) && // if options.exclude is a function, evaluate it and make sure the path doesn't pass
70778
- !(options.exclude && typeof options.exclude === "function" && options.exclude(path13, filename))
71498
+ !(options.include && options.include instanceof RegExp && !options.include.test(path15)) && // if options.include is a function, evaluate it and make sure the path passes
71499
+ !(options.include && typeof options.include === "function" && !options.include(path15, filename)) && // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass
71500
+ !(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path15)) && // if options.exclude is a function, evaluate it and make sure the path doesn't pass
71501
+ !(options.exclude && typeof options.exclude === "function" && options.exclude(path15, filename))
70779
71502
  );
70780
71503
  }
70781
71504
  __name(checkFileInclusion, "checkFileInclusion");
70782
- function requireDirectory(m4, path13, options) {
71505
+ function requireDirectory(m4, path15, options) {
70783
71506
  var retval = {};
70784
- if (path13 && !options && typeof path13 !== "string") {
70785
- options = path13;
70786
- path13 = null;
71507
+ if (path15 && !options && typeof path15 !== "string") {
71508
+ options = path15;
71509
+ path15 = null;
70787
71510
  }
70788
71511
  options = options || {};
70789
71512
  for (var prop in defaultOptions) {
@@ -70791,10 +71514,10 @@ var require_require_directory = __commonJS({
70791
71514
  options[prop] = defaultOptions[prop];
70792
71515
  }
70793
71516
  }
70794
- path13 = !path13 ? dirname3(m4.filename) : resolve5(dirname3(m4.filename), path13);
70795
- fs13.readdirSync(path13).forEach(function(filename) {
70796
- var joined = join15(path13, filename), files, key, obj;
70797
- if (fs13.statSync(joined).isDirectory() && options.recurse) {
71517
+ path15 = !path15 ? dirname3(m4.filename) : resolve5(dirname3(m4.filename), path15);
71518
+ fs14.readdirSync(path15).forEach(function(filename) {
71519
+ var joined = join16(path15, filename), files, key, obj;
71520
+ if (fs14.statSync(joined).isDirectory() && options.recurse) {
70798
71521
  files = requireDirectory(m4, joined, options);
70799
71522
  if (Object.keys(files).length) {
70800
71523
  retval[options.rename(filename, joined, filename)] = files;
@@ -72563,15 +73286,15 @@ function log(level, message, stream) {
72563
73286
  }
72564
73287
  }
72565
73288
  }
72566
- var fs12, path12, logThreshold, VERSION, LOG_LEVELS;
73289
+ var fs13, path14, logThreshold, VERSION, LOG_LEVELS;
72567
73290
  var init_logging = __esm({
72568
73291
  "bin/logging.ts"() {
72569
73292
  "use strict";
72570
- fs12 = __toESM(require("fs"));
72571
- path12 = __toESM(require("path"));
73293
+ fs13 = __toESM(require("fs"));
73294
+ path14 = __toESM(require("path"));
72572
73295
  logThreshold = "info";
72573
73296
  VERSION = JSON.parse(
72574
- fs12.readFileSync(path12.join(__dirname, "..", "package.json"), { encoding: "utf-8" })
73297
+ fs13.readFileSync(path14.join(__dirname, "..", "package.json"), { encoding: "utf-8" })
72575
73298
  ).version;
72576
73299
  LOG_LEVELS = {
72577
73300
  verbose: 1,