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/THIRD_PARTY_LICENSES +20 -20
- package/bin/cdk-assets.js +1093 -370
- package/bin/docker-credential-cdk-assets.js +1054 -331
- package/package.json +10 -10
|
@@ -198,8 +198,8 @@ var require_windows = __commonJS({
|
|
|
198
198
|
"../../node_modules/isexe/windows.js"(exports2, module2) {
|
|
199
199
|
module2.exports = isexe;
|
|
200
200
|
isexe.sync = sync;
|
|
201
|
-
var
|
|
202
|
-
function checkPathExt(
|
|
201
|
+
var fs14 = require("fs");
|
|
202
|
+
function checkPathExt(path14, options) {
|
|
203
203
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
204
204
|
if (!pathext) {
|
|
205
205
|
return true;
|
|
@@ -210,28 +210,28 @@ var require_windows = __commonJS({
|
|
|
210
210
|
}
|
|
211
211
|
for (var i6 = 0; i6 < pathext.length; i6++) {
|
|
212
212
|
var p3 = pathext[i6].toLowerCase();
|
|
213
|
-
if (p3 &&
|
|
213
|
+
if (p3 && path14.substr(-p3.length).toLowerCase() === p3) {
|
|
214
214
|
return true;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
return false;
|
|
218
218
|
}
|
|
219
219
|
__name(checkPathExt, "checkPathExt");
|
|
220
|
-
function checkStat(stat,
|
|
220
|
+
function checkStat(stat, path14, options) {
|
|
221
221
|
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
222
222
|
return false;
|
|
223
223
|
}
|
|
224
|
-
return checkPathExt(
|
|
224
|
+
return checkPathExt(path14, options);
|
|
225
225
|
}
|
|
226
226
|
__name(checkStat, "checkStat");
|
|
227
|
-
function isexe(
|
|
228
|
-
|
|
229
|
-
cb(er, er ? false : checkStat(stat,
|
|
227
|
+
function isexe(path14, options, cb) {
|
|
228
|
+
fs14.stat(path14, function(er, stat) {
|
|
229
|
+
cb(er, er ? false : checkStat(stat, path14, options));
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
232
|
__name(isexe, "isexe");
|
|
233
|
-
function sync(
|
|
234
|
-
return checkStat(
|
|
233
|
+
function sync(path14, options) {
|
|
234
|
+
return checkStat(fs14.statSync(path14), path14, options);
|
|
235
235
|
}
|
|
236
236
|
__name(sync, "sync");
|
|
237
237
|
}
|
|
@@ -242,15 +242,15 @@ var require_mode = __commonJS({
|
|
|
242
242
|
"../../node_modules/isexe/mode.js"(exports2, module2) {
|
|
243
243
|
module2.exports = isexe;
|
|
244
244
|
isexe.sync = sync;
|
|
245
|
-
var
|
|
246
|
-
function isexe(
|
|
247
|
-
|
|
245
|
+
var fs14 = require("fs");
|
|
246
|
+
function isexe(path14, options, cb) {
|
|
247
|
+
fs14.stat(path14, function(er, stat) {
|
|
248
248
|
cb(er, er ? false : checkStat(stat, options));
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
251
|
__name(isexe, "isexe");
|
|
252
|
-
function sync(
|
|
253
|
-
return checkStat(
|
|
252
|
+
function sync(path14, options) {
|
|
253
|
+
return checkStat(fs14.statSync(path14), options);
|
|
254
254
|
}
|
|
255
255
|
__name(sync, "sync");
|
|
256
256
|
function checkStat(stat, options) {
|
|
@@ -277,7 +277,7 @@ var require_mode = __commonJS({
|
|
|
277
277
|
// ../../node_modules/isexe/index.js
|
|
278
278
|
var require_isexe = __commonJS({
|
|
279
279
|
"../../node_modules/isexe/index.js"(exports2, module2) {
|
|
280
|
-
var
|
|
280
|
+
var fs14 = require("fs");
|
|
281
281
|
var core;
|
|
282
282
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
283
283
|
core = require_windows();
|
|
@@ -286,7 +286,7 @@ var require_isexe = __commonJS({
|
|
|
286
286
|
}
|
|
287
287
|
module2.exports = isexe;
|
|
288
288
|
isexe.sync = sync;
|
|
289
|
-
function isexe(
|
|
289
|
+
function isexe(path14, options, cb) {
|
|
290
290
|
if (typeof options === "function") {
|
|
291
291
|
cb = options;
|
|
292
292
|
options = {};
|
|
@@ -296,7 +296,7 @@ var require_isexe = __commonJS({
|
|
|
296
296
|
throw new TypeError("callback not provided");
|
|
297
297
|
}
|
|
298
298
|
return new Promise(function(resolve5, reject) {
|
|
299
|
-
isexe(
|
|
299
|
+
isexe(path14, options || {}, function(er, is) {
|
|
300
300
|
if (er) {
|
|
301
301
|
reject(er);
|
|
302
302
|
} else {
|
|
@@ -305,7 +305,7 @@ var require_isexe = __commonJS({
|
|
|
305
305
|
});
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
core(
|
|
308
|
+
core(path14, options || {}, function(er, is) {
|
|
309
309
|
if (er) {
|
|
310
310
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
311
311
|
er = null;
|
|
@@ -316,9 +316,9 @@ var require_isexe = __commonJS({
|
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
318
|
__name(isexe, "isexe");
|
|
319
|
-
function sync(
|
|
319
|
+
function sync(path14, options) {
|
|
320
320
|
try {
|
|
321
|
-
return core.sync(
|
|
321
|
+
return core.sync(path14, options || {});
|
|
322
322
|
} catch (er) {
|
|
323
323
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
324
324
|
return false;
|
|
@@ -335,7 +335,7 @@ var require_isexe = __commonJS({
|
|
|
335
335
|
var require_which = __commonJS({
|
|
336
336
|
"../../node_modules/cross-spawn/node_modules/which/which.js"(exports2, module2) {
|
|
337
337
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
338
|
-
var
|
|
338
|
+
var path14 = require("path");
|
|
339
339
|
var COLON2 = isWindows ? ";" : ":";
|
|
340
340
|
var isexe = require_isexe();
|
|
341
341
|
var getNotFoundError = /* @__PURE__ */ __name((cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), "getNotFoundError");
|
|
@@ -373,7 +373,7 @@ var require_which = __commonJS({
|
|
|
373
373
|
return opt.all && found.length ? resolve5(found) : reject(getNotFoundError(cmd));
|
|
374
374
|
const ppRaw = pathEnv[i6];
|
|
375
375
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
376
|
-
const pCmd =
|
|
376
|
+
const pCmd = path14.join(pathPart, cmd);
|
|
377
377
|
const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
378
378
|
resolve5(subStep(p3, i6, 0));
|
|
379
379
|
}), "step");
|
|
@@ -400,7 +400,7 @@ var require_which = __commonJS({
|
|
|
400
400
|
for (let i6 = 0; i6 < pathEnv.length; i6++) {
|
|
401
401
|
const ppRaw = pathEnv[i6];
|
|
402
402
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
403
|
-
const pCmd =
|
|
403
|
+
const pCmd = path14.join(pathPart, cmd);
|
|
404
404
|
const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
405
405
|
for (let j6 = 0; j6 < pathExt.length; j6++) {
|
|
406
406
|
const cur = p3 + pathExt[j6];
|
|
@@ -448,7 +448,7 @@ var require_path_key = __commonJS({
|
|
|
448
448
|
var require_resolveCommand = __commonJS({
|
|
449
449
|
"../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
450
450
|
"use strict";
|
|
451
|
-
var
|
|
451
|
+
var path14 = require("path");
|
|
452
452
|
var which = require_which();
|
|
453
453
|
var getPathKey = require_path_key();
|
|
454
454
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -466,7 +466,7 @@ var require_resolveCommand = __commonJS({
|
|
|
466
466
|
try {
|
|
467
467
|
resolved = which.sync(parsed.command, {
|
|
468
468
|
path: env2[getPathKey({ env: env2 })],
|
|
469
|
-
pathExt: withoutPathExt ?
|
|
469
|
+
pathExt: withoutPathExt ? path14.delimiter : void 0
|
|
470
470
|
});
|
|
471
471
|
} catch (e6) {
|
|
472
472
|
} finally {
|
|
@@ -475,7 +475,7 @@ var require_resolveCommand = __commonJS({
|
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
477
|
if (resolved) {
|
|
478
|
-
resolved =
|
|
478
|
+
resolved = path14.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
479
479
|
}
|
|
480
480
|
return resolved;
|
|
481
481
|
}
|
|
@@ -533,8 +533,8 @@ var require_shebang_command = __commonJS({
|
|
|
533
533
|
if (!match) {
|
|
534
534
|
return null;
|
|
535
535
|
}
|
|
536
|
-
const [
|
|
537
|
-
const binary =
|
|
536
|
+
const [path14, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
537
|
+
const binary = path14.split("/").pop();
|
|
538
538
|
if (binary === "env") {
|
|
539
539
|
return argument;
|
|
540
540
|
}
|
|
@@ -547,16 +547,16 @@ var require_shebang_command = __commonJS({
|
|
|
547
547
|
var require_readShebang = __commonJS({
|
|
548
548
|
"../../node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
549
549
|
"use strict";
|
|
550
|
-
var
|
|
550
|
+
var fs14 = require("fs");
|
|
551
551
|
var shebangCommand = require_shebang_command();
|
|
552
552
|
function readShebang(command6) {
|
|
553
553
|
const size = 150;
|
|
554
554
|
const buffer = Buffer.alloc(size);
|
|
555
555
|
let fd;
|
|
556
556
|
try {
|
|
557
|
-
fd =
|
|
558
|
-
|
|
559
|
-
|
|
557
|
+
fd = fs14.openSync(command6, "r");
|
|
558
|
+
fs14.readSync(fd, buffer, 0, size, 0);
|
|
559
|
+
fs14.closeSync(fd);
|
|
560
560
|
} catch (e6) {
|
|
561
561
|
}
|
|
562
562
|
return shebangCommand(buffer.toString());
|
|
@@ -570,7 +570,7 @@ var require_readShebang = __commonJS({
|
|
|
570
570
|
var require_parse = __commonJS({
|
|
571
571
|
"../../node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
572
572
|
"use strict";
|
|
573
|
-
var
|
|
573
|
+
var path14 = require("path");
|
|
574
574
|
var resolveCommand = require_resolveCommand();
|
|
575
575
|
var escape = require_escape();
|
|
576
576
|
var readShebang = require_readShebang();
|
|
@@ -596,7 +596,7 @@ var require_parse = __commonJS({
|
|
|
596
596
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
597
597
|
if (parsed.options.forceShell || needsShell) {
|
|
598
598
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
599
|
-
parsed.command =
|
|
599
|
+
parsed.command = path14.normalize(parsed.command);
|
|
600
600
|
parsed.command = escape.command(parsed.command);
|
|
601
601
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
602
602
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -840,6 +840,7 @@ var require_subprocess = __commonJS({
|
|
|
840
840
|
async function runUserCommandLine(commandLine, options = {}) {
|
|
841
841
|
const child = child_process.spawn(commandLine, {
|
|
842
842
|
...spawnOptions(options),
|
|
843
|
+
// eslint-disable-next-line no-restricted-syntax -- this is the single sanctioned shell entry point (see the module header)
|
|
843
844
|
shell: true
|
|
844
845
|
});
|
|
845
846
|
return monitor(child, commandLine, options);
|
|
@@ -1077,7 +1078,7 @@ var require_path = __commonJS({
|
|
|
1077
1078
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1078
1079
|
exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
|
|
1079
1080
|
var os5 = require("os");
|
|
1080
|
-
var
|
|
1081
|
+
var path14 = require("path");
|
|
1081
1082
|
var IS_WINDOWS_PLATFORM = os5.platform() === "win32";
|
|
1082
1083
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
1083
1084
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
@@ -1090,7 +1091,7 @@ var require_path = __commonJS({
|
|
|
1090
1091
|
__name(unixify, "unixify");
|
|
1091
1092
|
exports2.unixify = unixify;
|
|
1092
1093
|
function makeAbsolute(cwd, filepath) {
|
|
1093
|
-
return
|
|
1094
|
+
return path14.resolve(cwd, filepath);
|
|
1094
1095
|
}
|
|
1095
1096
|
__name(makeAbsolute, "makeAbsolute");
|
|
1096
1097
|
exports2.makeAbsolute = makeAbsolute;
|
|
@@ -2407,7 +2408,7 @@ var require_braces = __commonJS({
|
|
|
2407
2408
|
var require_constants2 = __commonJS({
|
|
2408
2409
|
"../../node_modules/micromatch/node_modules/picomatch/lib/constants.js"(exports2, module2) {
|
|
2409
2410
|
"use strict";
|
|
2410
|
-
var
|
|
2411
|
+
var path14 = require("path");
|
|
2411
2412
|
var WIN_SLASH = "\\\\/";
|
|
2412
2413
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
2413
2414
|
var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
@@ -2581,7 +2582,7 @@ var require_constants2 = __commonJS({
|
|
|
2581
2582
|
/* | */
|
|
2582
2583
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
2583
2584
|
/* \uFEFF */
|
|
2584
|
-
SEP:
|
|
2585
|
+
SEP: path14.sep,
|
|
2585
2586
|
/**
|
|
2586
2587
|
* Create EXTGLOB_CHARS
|
|
2587
2588
|
*/
|
|
@@ -2608,7 +2609,7 @@ var require_constants2 = __commonJS({
|
|
|
2608
2609
|
var require_utils2 = __commonJS({
|
|
2609
2610
|
"../../node_modules/micromatch/node_modules/picomatch/lib/utils.js"(exports2) {
|
|
2610
2611
|
"use strict";
|
|
2611
|
-
var
|
|
2612
|
+
var path14 = require("path");
|
|
2612
2613
|
var win32 = process.platform === "win32";
|
|
2613
2614
|
var {
|
|
2614
2615
|
REGEX_BACKSLASH,
|
|
@@ -2637,7 +2638,7 @@ var require_utils2 = __commonJS({
|
|
|
2637
2638
|
if (options && typeof options.windows === "boolean") {
|
|
2638
2639
|
return options.windows;
|
|
2639
2640
|
}
|
|
2640
|
-
return win32 === true ||
|
|
2641
|
+
return win32 === true || path14.sep === "\\";
|
|
2641
2642
|
};
|
|
2642
2643
|
exports2.escapeLast = (input, char, lastIdx) => {
|
|
2643
2644
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -4001,7 +4002,7 @@ var require_parse3 = __commonJS({
|
|
|
4001
4002
|
var require_picomatch = __commonJS({
|
|
4002
4003
|
"../../node_modules/micromatch/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
|
|
4003
4004
|
"use strict";
|
|
4004
|
-
var
|
|
4005
|
+
var path14 = require("path");
|
|
4005
4006
|
var scan = require_scan();
|
|
4006
4007
|
var parse3 = require_parse3();
|
|
4007
4008
|
var utils = require_utils2();
|
|
@@ -4086,7 +4087,7 @@ var require_picomatch = __commonJS({
|
|
|
4086
4087
|
};
|
|
4087
4088
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
4088
4089
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
4089
|
-
return regex.test(
|
|
4090
|
+
return regex.test(path14.basename(input));
|
|
4090
4091
|
};
|
|
4091
4092
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
4092
4093
|
picomatch.parse = (pattern, options) => {
|
|
@@ -4313,7 +4314,7 @@ var require_pattern = __commonJS({
|
|
|
4313
4314
|
"use strict";
|
|
4314
4315
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4315
4316
|
exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
|
|
4316
|
-
var
|
|
4317
|
+
var path14 = require("path");
|
|
4317
4318
|
var globParent = require_glob_parent();
|
|
4318
4319
|
var micromatch = require_micromatch();
|
|
4319
4320
|
var GLOBSTAR = "**";
|
|
@@ -4423,7 +4424,7 @@ var require_pattern = __commonJS({
|
|
|
4423
4424
|
__name(endsWithSlashGlobStar, "endsWithSlashGlobStar");
|
|
4424
4425
|
exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
4425
4426
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
4426
|
-
const basename =
|
|
4427
|
+
const basename = path14.basename(pattern);
|
|
4427
4428
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
4428
4429
|
}
|
|
4429
4430
|
__name(isAffectDepthOfReadingPattern, "isAffectDepthOfReadingPattern");
|
|
@@ -4490,7 +4491,7 @@ var require_pattern = __commonJS({
|
|
|
4490
4491
|
__name(partitionAbsoluteAndRelative, "partitionAbsoluteAndRelative");
|
|
4491
4492
|
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
4492
4493
|
function isAbsolute(pattern) {
|
|
4493
|
-
return
|
|
4494
|
+
return path14.isAbsolute(pattern);
|
|
4494
4495
|
}
|
|
4495
4496
|
__name(isAbsolute, "isAbsolute");
|
|
4496
4497
|
exports2.isAbsolute = isAbsolute;
|
|
@@ -4679,10 +4680,10 @@ var require_utils3 = __commonJS({
|
|
|
4679
4680
|
exports2.array = array;
|
|
4680
4681
|
var errno = require_errno();
|
|
4681
4682
|
exports2.errno = errno;
|
|
4682
|
-
var
|
|
4683
|
-
exports2.fs =
|
|
4684
|
-
var
|
|
4685
|
-
exports2.path =
|
|
4683
|
+
var fs14 = require_fs();
|
|
4684
|
+
exports2.fs = fs14;
|
|
4685
|
+
var path14 = require_path();
|
|
4686
|
+
exports2.path = path14;
|
|
4686
4687
|
var pattern = require_pattern();
|
|
4687
4688
|
exports2.pattern = pattern;
|
|
4688
4689
|
var stream = require_stream();
|
|
@@ -4802,8 +4803,8 @@ var require_async = __commonJS({
|
|
|
4802
4803
|
"use strict";
|
|
4803
4804
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4804
4805
|
exports2.read = void 0;
|
|
4805
|
-
function read(
|
|
4806
|
-
settings.fs.lstat(
|
|
4806
|
+
function read(path14, settings, callback) {
|
|
4807
|
+
settings.fs.lstat(path14, (lstatError, lstat) => {
|
|
4807
4808
|
if (lstatError !== null) {
|
|
4808
4809
|
callFailureCallback(callback, lstatError);
|
|
4809
4810
|
return;
|
|
@@ -4812,7 +4813,7 @@ var require_async = __commonJS({
|
|
|
4812
4813
|
callSuccessCallback(callback, lstat);
|
|
4813
4814
|
return;
|
|
4814
4815
|
}
|
|
4815
|
-
settings.fs.stat(
|
|
4816
|
+
settings.fs.stat(path14, (statError, stat) => {
|
|
4816
4817
|
if (statError !== null) {
|
|
4817
4818
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
4818
4819
|
callFailureCallback(callback, statError);
|
|
@@ -4847,13 +4848,13 @@ var require_sync = __commonJS({
|
|
|
4847
4848
|
"use strict";
|
|
4848
4849
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4849
4850
|
exports2.read = void 0;
|
|
4850
|
-
function read(
|
|
4851
|
-
const lstat = settings.fs.lstatSync(
|
|
4851
|
+
function read(path14, settings) {
|
|
4852
|
+
const lstat = settings.fs.lstatSync(path14);
|
|
4852
4853
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
4853
4854
|
return lstat;
|
|
4854
4855
|
}
|
|
4855
4856
|
try {
|
|
4856
|
-
const stat = settings.fs.statSync(
|
|
4857
|
+
const stat = settings.fs.statSync(path14);
|
|
4857
4858
|
if (settings.markSymbolicLink) {
|
|
4858
4859
|
stat.isSymbolicLink = () => true;
|
|
4859
4860
|
}
|
|
@@ -4876,12 +4877,12 @@ var require_fs2 = __commonJS({
|
|
|
4876
4877
|
"use strict";
|
|
4877
4878
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4878
4879
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
4879
|
-
var
|
|
4880
|
+
var fs14 = require("fs");
|
|
4880
4881
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
4881
|
-
lstat:
|
|
4882
|
-
stat:
|
|
4883
|
-
lstatSync:
|
|
4884
|
-
statSync:
|
|
4882
|
+
lstat: fs14.lstat,
|
|
4883
|
+
stat: fs14.stat,
|
|
4884
|
+
lstatSync: fs14.lstatSync,
|
|
4885
|
+
statSync: fs14.statSync
|
|
4885
4886
|
};
|
|
4886
4887
|
function createFileSystemAdapter(fsMethods) {
|
|
4887
4888
|
if (fsMethods === void 0) {
|
|
@@ -4899,7 +4900,7 @@ var require_settings = __commonJS({
|
|
|
4899
4900
|
"../../node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
|
|
4900
4901
|
"use strict";
|
|
4901
4902
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4902
|
-
var
|
|
4903
|
+
var fs14 = require_fs2();
|
|
4903
4904
|
var Settings = class {
|
|
4904
4905
|
static {
|
|
4905
4906
|
__name(this, "Settings");
|
|
@@ -4907,7 +4908,7 @@ var require_settings = __commonJS({
|
|
|
4907
4908
|
constructor(_options = {}) {
|
|
4908
4909
|
this._options = _options;
|
|
4909
4910
|
this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
|
|
4910
|
-
this.fs =
|
|
4911
|
+
this.fs = fs14.createFileSystemAdapter(this._options.fs);
|
|
4911
4912
|
this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
|
|
4912
4913
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
4913
4914
|
}
|
|
@@ -4929,18 +4930,18 @@ var require_out = __commonJS({
|
|
|
4929
4930
|
var sync = require_sync();
|
|
4930
4931
|
var settings_1 = require_settings();
|
|
4931
4932
|
exports2.Settings = settings_1.default;
|
|
4932
|
-
function stat(
|
|
4933
|
+
function stat(path14, optionsOrSettingsOrCallback, callback) {
|
|
4933
4934
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
4934
|
-
async.read(
|
|
4935
|
+
async.read(path14, getSettings(), optionsOrSettingsOrCallback);
|
|
4935
4936
|
return;
|
|
4936
4937
|
}
|
|
4937
|
-
async.read(
|
|
4938
|
+
async.read(path14, getSettings(optionsOrSettingsOrCallback), callback);
|
|
4938
4939
|
}
|
|
4939
4940
|
__name(stat, "stat");
|
|
4940
4941
|
exports2.stat = stat;
|
|
4941
|
-
function statSync3(
|
|
4942
|
+
function statSync3(path14, optionsOrSettings) {
|
|
4942
4943
|
const settings = getSettings(optionsOrSettings);
|
|
4943
|
-
return sync.read(
|
|
4944
|
+
return sync.read(path14, settings);
|
|
4944
4945
|
}
|
|
4945
4946
|
__name(statSync3, "statSync");
|
|
4946
4947
|
exports2.statSync = statSync3;
|
|
@@ -5073,8 +5074,8 @@ var require_utils4 = __commonJS({
|
|
|
5073
5074
|
"use strict";
|
|
5074
5075
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5075
5076
|
exports2.fs = void 0;
|
|
5076
|
-
var
|
|
5077
|
-
exports2.fs =
|
|
5077
|
+
var fs14 = require_fs3();
|
|
5078
|
+
exports2.fs = fs14;
|
|
5078
5079
|
}
|
|
5079
5080
|
});
|
|
5080
5081
|
|
|
@@ -5170,16 +5171,16 @@ var require_async2 = __commonJS({
|
|
|
5170
5171
|
return;
|
|
5171
5172
|
}
|
|
5172
5173
|
const tasks = names.map((name) => {
|
|
5173
|
-
const
|
|
5174
|
+
const path14 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
5174
5175
|
return (done) => {
|
|
5175
|
-
fsStat.stat(
|
|
5176
|
+
fsStat.stat(path14, settings.fsStatSettings, (error2, stats) => {
|
|
5176
5177
|
if (error2 !== null) {
|
|
5177
5178
|
done(error2);
|
|
5178
5179
|
return;
|
|
5179
5180
|
}
|
|
5180
5181
|
const entry = {
|
|
5181
5182
|
name,
|
|
5182
|
-
path:
|
|
5183
|
+
path: path14,
|
|
5183
5184
|
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
5184
5185
|
};
|
|
5185
5186
|
if (settings.stats) {
|
|
@@ -5279,14 +5280,14 @@ var require_fs4 = __commonJS({
|
|
|
5279
5280
|
"use strict";
|
|
5280
5281
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5281
5282
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
5282
|
-
var
|
|
5283
|
+
var fs14 = require("fs");
|
|
5283
5284
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
5284
|
-
lstat:
|
|
5285
|
-
stat:
|
|
5286
|
-
lstatSync:
|
|
5287
|
-
statSync:
|
|
5288
|
-
readdir:
|
|
5289
|
-
readdirSync:
|
|
5285
|
+
lstat: fs14.lstat,
|
|
5286
|
+
stat: fs14.stat,
|
|
5287
|
+
lstatSync: fs14.lstatSync,
|
|
5288
|
+
statSync: fs14.statSync,
|
|
5289
|
+
readdir: fs14.readdir,
|
|
5290
|
+
readdirSync: fs14.readdirSync
|
|
5290
5291
|
};
|
|
5291
5292
|
function createFileSystemAdapter(fsMethods) {
|
|
5292
5293
|
if (fsMethods === void 0) {
|
|
@@ -5304,9 +5305,9 @@ var require_settings2 = __commonJS({
|
|
|
5304
5305
|
"../../node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
|
|
5305
5306
|
"use strict";
|
|
5306
5307
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5307
|
-
var
|
|
5308
|
+
var path14 = require("path");
|
|
5308
5309
|
var fsStat = require_out();
|
|
5309
|
-
var
|
|
5310
|
+
var fs14 = require_fs4();
|
|
5310
5311
|
var Settings = class {
|
|
5311
5312
|
static {
|
|
5312
5313
|
__name(this, "Settings");
|
|
@@ -5314,8 +5315,8 @@ var require_settings2 = __commonJS({
|
|
|
5314
5315
|
constructor(_options = {}) {
|
|
5315
5316
|
this._options = _options;
|
|
5316
5317
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
5317
|
-
this.fs =
|
|
5318
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
5318
|
+
this.fs = fs14.createFileSystemAdapter(this._options.fs);
|
|
5319
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path14.sep);
|
|
5319
5320
|
this.stats = this._getValue(this._options.stats, false);
|
|
5320
5321
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
5321
5322
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -5342,18 +5343,18 @@ var require_out2 = __commonJS({
|
|
|
5342
5343
|
var sync = require_sync2();
|
|
5343
5344
|
var settings_1 = require_settings2();
|
|
5344
5345
|
exports2.Settings = settings_1.default;
|
|
5345
|
-
function scandir(
|
|
5346
|
+
function scandir(path14, optionsOrSettingsOrCallback, callback) {
|
|
5346
5347
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
5347
|
-
async.read(
|
|
5348
|
+
async.read(path14, getSettings(), optionsOrSettingsOrCallback);
|
|
5348
5349
|
return;
|
|
5349
5350
|
}
|
|
5350
|
-
async.read(
|
|
5351
|
+
async.read(path14, getSettings(optionsOrSettingsOrCallback), callback);
|
|
5351
5352
|
}
|
|
5352
5353
|
__name(scandir, "scandir");
|
|
5353
5354
|
exports2.scandir = scandir;
|
|
5354
|
-
function scandirSync(
|
|
5355
|
+
function scandirSync(path14, optionsOrSettings) {
|
|
5355
5356
|
const settings = getSettings(optionsOrSettings);
|
|
5356
|
-
return sync.read(
|
|
5357
|
+
return sync.read(path14, settings);
|
|
5357
5358
|
}
|
|
5358
5359
|
__name(scandirSync, "scandirSync");
|
|
5359
5360
|
exports2.scandirSync = scandirSync;
|
|
@@ -6050,7 +6051,7 @@ var require_settings3 = __commonJS({
|
|
|
6050
6051
|
"../../node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
|
|
6051
6052
|
"use strict";
|
|
6052
6053
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6053
|
-
var
|
|
6054
|
+
var path14 = require("path");
|
|
6054
6055
|
var fsScandir = require_out2();
|
|
6055
6056
|
var Settings = class {
|
|
6056
6057
|
static {
|
|
@@ -6063,7 +6064,7 @@ var require_settings3 = __commonJS({
|
|
|
6063
6064
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
6064
6065
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
6065
6066
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
6066
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
6067
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path14.sep);
|
|
6067
6068
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
6068
6069
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
6069
6070
|
fs: this._options.fs,
|
|
@@ -6129,7 +6130,7 @@ var require_reader2 = __commonJS({
|
|
|
6129
6130
|
"../../node_modules/fast-glob/out/readers/reader.js"(exports2) {
|
|
6130
6131
|
"use strict";
|
|
6131
6132
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6132
|
-
var
|
|
6133
|
+
var path14 = require("path");
|
|
6133
6134
|
var fsStat = require_out();
|
|
6134
6135
|
var utils = require_utils3();
|
|
6135
6136
|
var Reader = class {
|
|
@@ -6145,7 +6146,7 @@ var require_reader2 = __commonJS({
|
|
|
6145
6146
|
});
|
|
6146
6147
|
}
|
|
6147
6148
|
_getFullEntryPath(filepath) {
|
|
6148
|
-
return
|
|
6149
|
+
return path14.resolve(this._settings.cwd, filepath);
|
|
6149
6150
|
}
|
|
6150
6151
|
_makeEntry(stats, pattern) {
|
|
6151
6152
|
const entry = {
|
|
@@ -6585,7 +6586,7 @@ var require_provider = __commonJS({
|
|
|
6585
6586
|
"../../node_modules/fast-glob/out/providers/provider.js"(exports2) {
|
|
6586
6587
|
"use strict";
|
|
6587
6588
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6588
|
-
var
|
|
6589
|
+
var path14 = require("path");
|
|
6589
6590
|
var deep_1 = require_deep();
|
|
6590
6591
|
var entry_1 = require_entry();
|
|
6591
6592
|
var error_1 = require_error();
|
|
@@ -6602,7 +6603,7 @@ var require_provider = __commonJS({
|
|
|
6602
6603
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
6603
6604
|
}
|
|
6604
6605
|
_getRootDirectory(task) {
|
|
6605
|
-
return
|
|
6606
|
+
return path14.resolve(this._settings.cwd, task.base);
|
|
6606
6607
|
}
|
|
6607
6608
|
_getReaderOptions(task) {
|
|
6608
6609
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -6795,16 +6796,16 @@ var require_settings4 = __commonJS({
|
|
|
6795
6796
|
"use strict";
|
|
6796
6797
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6797
6798
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
6798
|
-
var
|
|
6799
|
+
var fs14 = require("fs");
|
|
6799
6800
|
var os5 = require("os");
|
|
6800
6801
|
var CPU_COUNT = Math.max(os5.cpus().length, 1);
|
|
6801
6802
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
6802
|
-
lstat:
|
|
6803
|
-
lstatSync:
|
|
6804
|
-
stat:
|
|
6805
|
-
statSync:
|
|
6806
|
-
readdir:
|
|
6807
|
-
readdirSync:
|
|
6803
|
+
lstat: fs14.lstat,
|
|
6804
|
+
lstatSync: fs14.lstatSync,
|
|
6805
|
+
stat: fs14.stat,
|
|
6806
|
+
statSync: fs14.statSync,
|
|
6807
|
+
readdir: fs14.readdir,
|
|
6808
|
+
readdirSync: fs14.readdirSync
|
|
6808
6809
|
};
|
|
6809
6810
|
var Settings = class {
|
|
6810
6811
|
static {
|
|
@@ -7282,7 +7283,7 @@ var require_dist = __commonJS({
|
|
|
7282
7283
|
// ../../node_modules/yazl/index.js
|
|
7283
7284
|
var require_yazl = __commonJS({
|
|
7284
7285
|
"../../node_modules/yazl/index.js"(exports2) {
|
|
7285
|
-
var
|
|
7286
|
+
var fs14 = require("fs");
|
|
7286
7287
|
var Transform = require("stream").Transform;
|
|
7287
7288
|
var PassThrough2 = require("stream").PassThrough;
|
|
7288
7289
|
var zlib2 = require("zlib");
|
|
@@ -7313,14 +7314,14 @@ var require_yazl = __commonJS({
|
|
|
7313
7314
|
if (shouldIgnoreAdding(self2)) return;
|
|
7314
7315
|
var entry = new Entry(metadataPath, false, options);
|
|
7315
7316
|
self2.entries.push(entry);
|
|
7316
|
-
|
|
7317
|
+
fs14.stat(realPath, function(err, stats) {
|
|
7317
7318
|
if (err) return self2.emit("error", err);
|
|
7318
7319
|
if (!stats.isFile()) return self2.emit("error", new Error("not a file: " + realPath));
|
|
7319
7320
|
entry.uncompressedSize = stats.size;
|
|
7320
7321
|
if (options.mtime == null) entry.setLastModDate(stats.mtime);
|
|
7321
7322
|
if (options.mode == null) entry.setFileAttributesMode(stats.mode);
|
|
7322
7323
|
entry.setFileDataPumpFunction(function() {
|
|
7323
|
-
var readStream =
|
|
7324
|
+
var readStream = fs14.createReadStream(realPath);
|
|
7324
7325
|
entry.state = Entry.FILE_DATA_IN_PROGRESS;
|
|
7325
7326
|
readStream.on("error", function(err2) {
|
|
7326
7327
|
self2.emit("error", err2);
|
|
@@ -7990,7 +7991,7 @@ var require_zip = __commonJS({
|
|
|
7990
7991
|
exports2.zipDirectory = zipDirectory2;
|
|
7991
7992
|
exports2.zipString = zipString;
|
|
7992
7993
|
var fs_1 = require("fs");
|
|
7993
|
-
var
|
|
7994
|
+
var path14 = __importStar2(require("path"));
|
|
7994
7995
|
var fast_glob_1 = require_out4();
|
|
7995
7996
|
var yazl_1 = require_yazl();
|
|
7996
7997
|
function epoch() {
|
|
@@ -8038,7 +8039,7 @@ var require_zip = __commonJS({
|
|
|
8038
8039
|
output.once("close", ok);
|
|
8039
8040
|
zip.outputStream.pipe(output);
|
|
8040
8041
|
for (const file of files) {
|
|
8041
|
-
const fullPath =
|
|
8042
|
+
const fullPath = path14.resolve(directory, file);
|
|
8042
8043
|
const [data, stat] = await Promise.all([fs_1.promises.readFile(fullPath), fs_1.promises.stat(fullPath)]);
|
|
8043
8044
|
zip.addBuffer(data, file, {
|
|
8044
8045
|
mtime: epoch(),
|
|
@@ -8126,7 +8127,7 @@ var init_tools = __esm({
|
|
|
8126
8127
|
|
|
8127
8128
|
// ../@aws-cdk/cdk-assets-lib/lib/private/shell.ts
|
|
8128
8129
|
async function shell(command6, options) {
|
|
8129
|
-
const displayCommand = (0, tools_exports.renderForDisplay)(command6);
|
|
8130
|
+
const displayCommand = (0, tools_exports.renderForDisplay)(redactSensitiveArgs(command6, options.redactFlags));
|
|
8130
8131
|
handleShellOutput(displayCommand, options, "open");
|
|
8131
8132
|
try {
|
|
8132
8133
|
const result = await (0, tools_exports.run)(command6, {
|
|
@@ -8144,10 +8145,11 @@ async function shell(command6, options) {
|
|
|
8144
8145
|
}
|
|
8145
8146
|
handleShellOutput(displayCommand, options, "close");
|
|
8146
8147
|
const stderr = e6.stderr.trim();
|
|
8148
|
+
const message = e6.message.replace(e6.command, () => displayCommand);
|
|
8147
8149
|
throw new ProcessFailed(
|
|
8148
8150
|
e6.exitCode,
|
|
8149
8151
|
e6.signal,
|
|
8150
|
-
stderr ? `${
|
|
8152
|
+
stderr ? `${message}: ${stderr}` : message
|
|
8151
8153
|
);
|
|
8152
8154
|
}
|
|
8153
8155
|
throw e6;
|
|
@@ -8156,6 +8158,9 @@ async function shell(command6, options) {
|
|
|
8156
8158
|
function handleShellOutput(chunk, options, shellEventType) {
|
|
8157
8159
|
switch (options.subprocessOutputDestination) {
|
|
8158
8160
|
case "ignore":
|
|
8161
|
+
if (shellEventType === "open") {
|
|
8162
|
+
options.shellEventPublisher(shellEventType, chunk);
|
|
8163
|
+
}
|
|
8159
8164
|
return;
|
|
8160
8165
|
case "publish":
|
|
8161
8166
|
options.shellEventPublisher(shellEventType, chunk);
|
|
@@ -8176,6 +8181,23 @@ function handleShellOutput(chunk, options, shellEventType) {
|
|
|
8176
8181
|
break;
|
|
8177
8182
|
}
|
|
8178
8183
|
}
|
|
8184
|
+
function redactSensitiveArgs(argv, redactFlags) {
|
|
8185
|
+
if (!redactFlags || redactFlags.length === 0) {
|
|
8186
|
+
return [...argv];
|
|
8187
|
+
}
|
|
8188
|
+
const flags = new Set(redactFlags);
|
|
8189
|
+
const out = new Array();
|
|
8190
|
+
for (let i6 = 0; i6 < argv.length; i6++) {
|
|
8191
|
+
out.push(argv[i6]);
|
|
8192
|
+
if (flags.has(argv[i6]) && i6 + 1 < argv.length) {
|
|
8193
|
+
i6 += 1;
|
|
8194
|
+
const token = argv[i6];
|
|
8195
|
+
const eq = token.indexOf("=");
|
|
8196
|
+
out.push(eq >= 0 ? `${token.slice(0, eq + 1)}<redacted>` : "<redacted>");
|
|
8197
|
+
}
|
|
8198
|
+
}
|
|
8199
|
+
return out;
|
|
8200
|
+
}
|
|
8179
8201
|
var ProcessFailed;
|
|
8180
8202
|
var init_shell = __esm({
|
|
8181
8203
|
"../@aws-cdk/cdk-assets-lib/lib/private/shell.ts"() {
|
|
@@ -8183,6 +8205,7 @@ var init_shell = __esm({
|
|
|
8183
8205
|
init_tools();
|
|
8184
8206
|
__name(shell, "shell");
|
|
8185
8207
|
__name(handleShellOutput, "handleShellOutput");
|
|
8208
|
+
__name(redactSensitiveArgs, "redactSensitiveArgs");
|
|
8186
8209
|
ProcessFailed = class extends Error {
|
|
8187
8210
|
constructor(exitCode, signal, message) {
|
|
8188
8211
|
super(message);
|
|
@@ -8297,6 +8320,10 @@ var init_docker = __esm({
|
|
|
8297
8320
|
await this.execute(buildCommand, {
|
|
8298
8321
|
cwd: options.directory,
|
|
8299
8322
|
subprocessOutputDestination: this.subprocessOutputDestination,
|
|
8323
|
+
// `--build-arg` values are passed literally and are a common (if
|
|
8324
|
+
// discouraged) place for secrets; `--secret` specs can name sensitive
|
|
8325
|
+
// sources. Mask their values wherever the command line is logged.
|
|
8326
|
+
redactFlags: ["--build-arg", "--secret"],
|
|
8300
8327
|
env: {
|
|
8301
8328
|
BUILDX_NO_DEFAULT_ATTESTATIONS: "1"
|
|
8302
8329
|
// Docker Build adds provenance attestations by default that confuse cdk-assets
|
|
@@ -8739,14 +8766,14 @@ var init_assets = __esm({
|
|
|
8739
8766
|
var require_helpers = __commonJS({
|
|
8740
8767
|
"../@aws-cdk/cloud-assembly-schema/node_modules/jsonschema/lib/helpers.js"(exports2, module2) {
|
|
8741
8768
|
"use strict";
|
|
8742
|
-
var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message, instance, schema,
|
|
8743
|
-
if (Array.isArray(
|
|
8744
|
-
this.path =
|
|
8745
|
-
this.property =
|
|
8769
|
+
var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message, instance, schema, path14, name, argument) {
|
|
8770
|
+
if (Array.isArray(path14)) {
|
|
8771
|
+
this.path = path14;
|
|
8772
|
+
this.property = path14.reduce(function(sum, item) {
|
|
8746
8773
|
return sum + makeSuffix(item);
|
|
8747
8774
|
}, "instance");
|
|
8748
|
-
} else if (
|
|
8749
|
-
this.property =
|
|
8775
|
+
} else if (path14 !== void 0) {
|
|
8776
|
+
this.property = path14;
|
|
8750
8777
|
}
|
|
8751
8778
|
if (message) {
|
|
8752
8779
|
this.message = message;
|
|
@@ -8841,16 +8868,16 @@ var require_helpers = __commonJS({
|
|
|
8841
8868
|
name: { value: "SchemaError", enumerable: false }
|
|
8842
8869
|
}
|
|
8843
8870
|
);
|
|
8844
|
-
var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options,
|
|
8871
|
+
var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options, path14, base, schemas) {
|
|
8845
8872
|
this.schema = schema;
|
|
8846
8873
|
this.options = options;
|
|
8847
|
-
if (Array.isArray(
|
|
8848
|
-
this.path =
|
|
8849
|
-
this.propertyPath =
|
|
8874
|
+
if (Array.isArray(path14)) {
|
|
8875
|
+
this.path = path14;
|
|
8876
|
+
this.propertyPath = path14.reduce(function(sum, item) {
|
|
8850
8877
|
return sum + makeSuffix(item);
|
|
8851
8878
|
}, "instance");
|
|
8852
8879
|
} else {
|
|
8853
|
-
this.propertyPath =
|
|
8880
|
+
this.propertyPath = path14;
|
|
8854
8881
|
}
|
|
8855
8882
|
this.base = base;
|
|
8856
8883
|
this.schemas = schemas;
|
|
@@ -8859,10 +8886,10 @@ var require_helpers = __commonJS({
|
|
|
8859
8886
|
return (() => resolveUrl(this.base, target))();
|
|
8860
8887
|
}, "resolve");
|
|
8861
8888
|
SchemaContext.prototype.makeChild = /* @__PURE__ */ __name(function makeChild(schema, propertyName) {
|
|
8862
|
-
var
|
|
8889
|
+
var path14 = propertyName === void 0 ? this.path : this.path.concat([propertyName]);
|
|
8863
8890
|
var id = schema.$id || schema.id;
|
|
8864
8891
|
let base = (() => resolveUrl(this.base, id || ""))();
|
|
8865
|
-
var ctx = new SchemaContext(schema, this.options,
|
|
8892
|
+
var ctx = new SchemaContext(schema, this.options, path14, base, Object.create(this.schemas));
|
|
8866
8893
|
if (id && !ctx.schemas[base]) {
|
|
8867
8894
|
ctx.schemas[base] = schema;
|
|
8868
8895
|
}
|
|
@@ -9979,8 +10006,8 @@ var require_validator = __commonJS({
|
|
|
9979
10006
|
if (ctx.schemas[switchSchema]) {
|
|
9980
10007
|
return { subschema: ctx.schemas[switchSchema], switchSchema };
|
|
9981
10008
|
}
|
|
9982
|
-
let
|
|
9983
|
-
let fragment =
|
|
10009
|
+
let hashIndex = switchSchema.indexOf("#");
|
|
10010
|
+
let fragment = hashIndex === -1 || hashIndex === switchSchema.length - 1 ? "" : switchSchema.substr(hashIndex);
|
|
9984
10011
|
var document = fragment && fragment.length && switchSchema.substr(0, switchSchema.length - fragment.length);
|
|
9985
10012
|
if (!document || !ctx.schemas[document]) {
|
|
9986
10013
|
throw new SchemaError("no such schema <" + switchSchema + ">", schema);
|
|
@@ -12065,7 +12092,7 @@ var require_semver2 = __commonJS({
|
|
|
12065
12092
|
// ../@aws-cdk/cloud-assembly-schema/cli-version.json
|
|
12066
12093
|
var require_cli_version = __commonJS({
|
|
12067
12094
|
"../@aws-cdk/cloud-assembly-schema/cli-version.json"(exports2, module2) {
|
|
12068
|
-
module2.exports = { version: "2.
|
|
12095
|
+
module2.exports = { version: "2.1145.0" };
|
|
12069
12096
|
}
|
|
12070
12097
|
});
|
|
12071
12098
|
|
|
@@ -13780,6 +13807,7 @@ var require_integ_schema = __commonJS({
|
|
|
13780
13807
|
enum: [
|
|
13781
13808
|
"any-change",
|
|
13782
13809
|
"broadening",
|
|
13810
|
+
"destructive",
|
|
13783
13811
|
"never"
|
|
13784
13812
|
],
|
|
13785
13813
|
type: "string"
|
|
@@ -14340,9 +14368,9 @@ var require_validation_report_schema = __commonJS({
|
|
|
14340
14368
|
var require_version = __commonJS({
|
|
14341
14369
|
"../@aws-cdk/cloud-assembly-schema/schema/version.json"(exports2, module2) {
|
|
14342
14370
|
module2.exports = {
|
|
14343
|
-
schemaHash: "
|
|
14371
|
+
schemaHash: "b006b5c8829cee1f2287b98829ca0ed8abfbdbb2948fecc185e56398afb11a7b",
|
|
14344
14372
|
$comment: "Do not hold back the version on additions: jsonschema validation of the manifest by the consumer will trigger errors on unexpected fields.",
|
|
14345
|
-
revision:
|
|
14373
|
+
revision: 55
|
|
14346
14374
|
};
|
|
14347
14375
|
}
|
|
14348
14376
|
});
|
|
@@ -14614,6 +14642,7 @@ var init_common = __esm({
|
|
|
14614
14642
|
RequireApproval2["NEVER"] = "never";
|
|
14615
14643
|
RequireApproval2["ANYCHANGE"] = "any-change";
|
|
14616
14644
|
RequireApproval2["BROADENING"] = "broadening";
|
|
14645
|
+
RequireApproval2["DESTRUCTIVE"] = "destructive";
|
|
14617
14646
|
return RequireApproval2;
|
|
14618
14647
|
})(RequireApproval || {});
|
|
14619
14648
|
}
|
|
@@ -16698,6 +16727,592 @@ var init_template_ranges = __esm({
|
|
|
16698
16727
|
}
|
|
16699
16728
|
});
|
|
16700
16729
|
|
|
16730
|
+
// ../@aws-cdk/cloud-assembly-api/lib/stack-trace.ts
|
|
16731
|
+
var stack_trace_exports = {};
|
|
16732
|
+
__export(stack_trace_exports, {
|
|
16733
|
+
DEFAULT_USER_CODE_FINDER: () => DEFAULT_USER_CODE_FINDER,
|
|
16734
|
+
StackFrame: () => StackFrame,
|
|
16735
|
+
StackTrace: () => StackTrace
|
|
16736
|
+
});
|
|
16737
|
+
var DEFAULT_USER_CODE_FINDER, StackTrace, StackFrame;
|
|
16738
|
+
var init_stack_trace = __esm({
|
|
16739
|
+
"../@aws-cdk/cloud-assembly-api/lib/stack-trace.ts"() {
|
|
16740
|
+
"use strict";
|
|
16741
|
+
DEFAULT_USER_CODE_FINDER = {
|
|
16742
|
+
isInterestingFrame(frame) {
|
|
16743
|
+
return frame.includes(" (") && frame.endsWith(")");
|
|
16744
|
+
}
|
|
16745
|
+
};
|
|
16746
|
+
StackTrace = class _StackTrace {
|
|
16747
|
+
constructor(frames) {
|
|
16748
|
+
this.frames = frames;
|
|
16749
|
+
}
|
|
16750
|
+
frames;
|
|
16751
|
+
static {
|
|
16752
|
+
__name(this, "StackTrace");
|
|
16753
|
+
}
|
|
16754
|
+
static fromNewlineSeparatedString(stackTrace) {
|
|
16755
|
+
return new _StackTrace(stackTrace.split("\n"));
|
|
16756
|
+
}
|
|
16757
|
+
/**
|
|
16758
|
+
* Return the first user frame from a "Just My Code" call stack
|
|
16759
|
+
*
|
|
16760
|
+
* With all the NON-"my code" call frames redacted, the top level frame should
|
|
16761
|
+
* be the last user frame that is associated with the given call stack.
|
|
16762
|
+
*/
|
|
16763
|
+
findAndParse(finder) {
|
|
16764
|
+
for (const frame of this.frames) {
|
|
16765
|
+
if (finder.isInterestingFrame(frame)) {
|
|
16766
|
+
return StackFrame.parse(frame);
|
|
16767
|
+
}
|
|
16768
|
+
}
|
|
16769
|
+
return void 0;
|
|
16770
|
+
}
|
|
16771
|
+
};
|
|
16772
|
+
StackFrame = class {
|
|
16773
|
+
constructor(functionName, fileName, sourceLocation) {
|
|
16774
|
+
this.functionName = functionName;
|
|
16775
|
+
this.fileName = fileName;
|
|
16776
|
+
this.sourceLocation = sourceLocation;
|
|
16777
|
+
}
|
|
16778
|
+
functionName;
|
|
16779
|
+
fileName;
|
|
16780
|
+
sourceLocation;
|
|
16781
|
+
static {
|
|
16782
|
+
__name(this, "StackFrame");
|
|
16783
|
+
}
|
|
16784
|
+
/**
|
|
16785
|
+
* Parse a single line of a stack frame into a structured object
|
|
16786
|
+
*
|
|
16787
|
+
* This is mostly a NodeJS-flavored string we parse here, except that in
|
|
16788
|
+
* a NodeJS stack trace the line would start with ` at `.
|
|
16789
|
+
*
|
|
16790
|
+
* Parses all of these:
|
|
16791
|
+
*
|
|
16792
|
+
* ```
|
|
16793
|
+
* <function> (<file>:<line>:<col>)
|
|
16794
|
+
* <class>.<function> (<file>:<line>:<col>)
|
|
16795
|
+
* Object.<anonymous> (<file>:<line>:<col>)
|
|
16796
|
+
* <function> [as somethingElse] (<file>:<line>:<col>)
|
|
16797
|
+
* new <constructor> (<file>:<line>:<col>)
|
|
16798
|
+
* <file>:<line>:<col>
|
|
16799
|
+
* ```
|
|
16800
|
+
*
|
|
16801
|
+
* See https://v8.dev/docs/stack-trace-api#appendix%3A-stack-trace-format
|
|
16802
|
+
*/
|
|
16803
|
+
static parse(frame) {
|
|
16804
|
+
let fileName;
|
|
16805
|
+
let functionName;
|
|
16806
|
+
let sourceLocation;
|
|
16807
|
+
const paren = frame.indexOf("(");
|
|
16808
|
+
if (paren) {
|
|
16809
|
+
functionName = frame.slice(0, paren - 1);
|
|
16810
|
+
frame = frame.slice(paren + 1, -1);
|
|
16811
|
+
} else {
|
|
16812
|
+
functionName = "<entry>";
|
|
16813
|
+
}
|
|
16814
|
+
if (functionName === "Object.<anonymous>") {
|
|
16815
|
+
functionName = "<anonymous>";
|
|
16816
|
+
}
|
|
16817
|
+
let asI = functionName.indexOf(" [as ");
|
|
16818
|
+
if (asI > -1) {
|
|
16819
|
+
const endOfAlias = functionName.indexOf("]", asI);
|
|
16820
|
+
const lastPeriod = functionName.lastIndexOf(".", asI);
|
|
16821
|
+
functionName = functionName.slice(0, lastPeriod + 1) + functionName.slice(asI + 5, endOfAlias);
|
|
16822
|
+
}
|
|
16823
|
+
const m4 = frame.match(/(:[0-9]+){0,2}$/);
|
|
16824
|
+
fileName = m4 ? frame.slice(0, -m4[0].length) : frame;
|
|
16825
|
+
sourceLocation = m4 ? m4[0].slice(1) : "";
|
|
16826
|
+
return {
|
|
16827
|
+
fileName,
|
|
16828
|
+
functionName,
|
|
16829
|
+
sourceLocation
|
|
16830
|
+
};
|
|
16831
|
+
}
|
|
16832
|
+
};
|
|
16833
|
+
}
|
|
16834
|
+
});
|
|
16835
|
+
|
|
16836
|
+
// ../@aws-cdk/cloud-assembly-api/lib/private/color.ts
|
|
16837
|
+
var Col, Colorize;
|
|
16838
|
+
var init_color = __esm({
|
|
16839
|
+
"../@aws-cdk/cloud-assembly-api/lib/private/color.ts"() {
|
|
16840
|
+
"use strict";
|
|
16841
|
+
Col = class {
|
|
16842
|
+
static {
|
|
16843
|
+
__name(this, "Col");
|
|
16844
|
+
}
|
|
16845
|
+
static RED = "31";
|
|
16846
|
+
static ORANGE = "38;5;208";
|
|
16847
|
+
static YELLOW = "33";
|
|
16848
|
+
static BLUE = "34";
|
|
16849
|
+
static BOLD = "1";
|
|
16850
|
+
static UNDERLINE = "4";
|
|
16851
|
+
static GREY = "90";
|
|
16852
|
+
};
|
|
16853
|
+
Colorize = class _Colorize {
|
|
16854
|
+
static {
|
|
16855
|
+
__name(this, "Colorize");
|
|
16856
|
+
}
|
|
16857
|
+
static red(str) {
|
|
16858
|
+
return _Colorize.colorize(Col.RED, str);
|
|
16859
|
+
}
|
|
16860
|
+
static orange(str) {
|
|
16861
|
+
return _Colorize.colorize(Col.ORANGE, str);
|
|
16862
|
+
}
|
|
16863
|
+
static yellow(str) {
|
|
16864
|
+
return _Colorize.colorize(Col.YELLOW, str);
|
|
16865
|
+
}
|
|
16866
|
+
static blue(str) {
|
|
16867
|
+
return _Colorize.colorize(Col.BLUE, str);
|
|
16868
|
+
}
|
|
16869
|
+
static grey(str) {
|
|
16870
|
+
return _Colorize.colorize(Col.GREY, str);
|
|
16871
|
+
}
|
|
16872
|
+
static bold(str) {
|
|
16873
|
+
return _Colorize.colorize(Col.BOLD, str);
|
|
16874
|
+
}
|
|
16875
|
+
static underline(str) {
|
|
16876
|
+
return _Colorize.colorize(Col.UNDERLINE, str);
|
|
16877
|
+
}
|
|
16878
|
+
static colorize(col, str) {
|
|
16879
|
+
if (process.env.FORCE_COLOR === "0" || process.env.NO_COLOR || !process.stdout.isTTY || !process.stderr.isTTY) {
|
|
16880
|
+
return str;
|
|
16881
|
+
}
|
|
16882
|
+
return `\x1B[${col}m${str}\x1B[0m`;
|
|
16883
|
+
}
|
|
16884
|
+
};
|
|
16885
|
+
}
|
|
16886
|
+
});
|
|
16887
|
+
|
|
16888
|
+
// ../@aws-cdk/cloud-assembly-api/lib/validation/parsing.ts
|
|
16889
|
+
var parsing_exports = {};
|
|
16890
|
+
__export(parsing_exports, {
|
|
16891
|
+
ANNOTATION_PLUGIN_NAME: () => ANNOTATION_PLUGIN_NAME,
|
|
16892
|
+
ANNOTATION_PLUGIN_NAMESPACE: () => ANNOTATION_PLUGIN_NAMESPACE,
|
|
16893
|
+
isSuppressibleViolation: () => isSuppressibleViolation,
|
|
16894
|
+
namespaceFromPluginName: () => namespaceFromPluginName,
|
|
16895
|
+
normalizeValidationId: () => normalizeValidationId,
|
|
16896
|
+
normalizeValidationIdForAnnotations: () => normalizeValidationIdForAnnotations,
|
|
16897
|
+
parseValidationId: () => parseValidationId,
|
|
16898
|
+
pluginNameFromNamespace: () => pluginNameFromNamespace
|
|
16899
|
+
});
|
|
16900
|
+
function isSuppressibleViolation(violation) {
|
|
16901
|
+
const isFatal = violation.severity?.toLowerCase() === "fatal";
|
|
16902
|
+
const isErrorAnnotation = violation.ruleMetadata?.["cdk:annotation"] && violation.severity?.toLowerCase() === "error";
|
|
16903
|
+
return !isFatal && !isErrorAnnotation;
|
|
16904
|
+
}
|
|
16905
|
+
function parseValidationId(id) {
|
|
16906
|
+
let nsSeparator = void 0;
|
|
16907
|
+
const braceStack = [];
|
|
16908
|
+
for (let i6 = 0; i6 < id.length; i6++) {
|
|
16909
|
+
const c6 = id[i6];
|
|
16910
|
+
if (c6 === ":" && id[i6 + 1] === ":" && braceStack.length === 0) {
|
|
16911
|
+
if (nsSeparator !== void 0) {
|
|
16912
|
+
throw new Error(`Invalid validation rule ID '${id}'. The '::' delimiter is reserved for separating the prefix from the rule name (e.g. 'prefix::RuleName').`);
|
|
16913
|
+
}
|
|
16914
|
+
nsSeparator = i6;
|
|
16915
|
+
i6 += 1;
|
|
16916
|
+
} else if (["]", ")", "}"].includes(c6)) {
|
|
16917
|
+
const lastBrace = braceStack.pop();
|
|
16918
|
+
if (lastBrace === void 0) {
|
|
16919
|
+
throw new Error(`Invalid validation rule ID '${id}'. Unmatched closing brace '${c6}' at position ${i6}.`);
|
|
16920
|
+
}
|
|
16921
|
+
if (lastBrace === "(" && c6 !== ")" || lastBrace === "[" && c6 !== "]" || lastBrace === "{" && c6 !== "}") {
|
|
16922
|
+
throw new Error(`Invalid validation rule ID '${id}'. Mismatched closing brace '${c6}' at position ${i6}. Expected '${lastBrace === "(" ? ")" : lastBrace === "[" ? "]" : "}"}'.`);
|
|
16923
|
+
}
|
|
16924
|
+
} else if (["[", "(", "{"].includes(c6)) {
|
|
16925
|
+
braceStack.push(c6);
|
|
16926
|
+
}
|
|
16927
|
+
}
|
|
16928
|
+
if (nsSeparator === void 0) {
|
|
16929
|
+
return { ruleId: id };
|
|
16930
|
+
}
|
|
16931
|
+
if (nsSeparator === 0) {
|
|
16932
|
+
throw new Error(`Invalid validation rule ID '${id}'. Missing plugin name before '::'.`);
|
|
16933
|
+
}
|
|
16934
|
+
const namespace = namespaceFromString(id.substring(0, nsSeparator));
|
|
16935
|
+
const ruleId = id.substring(nsSeparator + 2);
|
|
16936
|
+
return { namespace, ruleId };
|
|
16937
|
+
}
|
|
16938
|
+
function normalizeValidationId(id, defaultNamespace) {
|
|
16939
|
+
const p3 = typeof id === "string" ? parseValidationId(id) : id;
|
|
16940
|
+
const parsed = {
|
|
16941
|
+
namespace: p3.namespace ? namespaceFromString(p3.namespace[NS].replaceAll(/ /g, "-")) : void 0,
|
|
16942
|
+
ruleId: p3.ruleId.replaceAll(/ /g, "-")
|
|
16943
|
+
};
|
|
16944
|
+
if (parsed.namespace && ["annotation", "Construct-Annotations"].includes(parsed.namespace[NS])) {
|
|
16945
|
+
return `${ANNOTATION_PLUGIN_NAMESPACE}::${parsed.ruleId}`;
|
|
16946
|
+
}
|
|
16947
|
+
return `${parsed.namespace ?? defaultNamespace[NS]}::${parsed.ruleId}`;
|
|
16948
|
+
}
|
|
16949
|
+
function normalizeValidationIdForAnnotations(id) {
|
|
16950
|
+
return normalizeValidationId(id, ANNOTATION_PLUGIN_NAMESPACE);
|
|
16951
|
+
}
|
|
16952
|
+
function namespaceFromPluginName(pluginName) {
|
|
16953
|
+
if (pluginName === ANNOTATION_PLUGIN_NAME) {
|
|
16954
|
+
return ANNOTATION_PLUGIN_NAMESPACE;
|
|
16955
|
+
}
|
|
16956
|
+
return namespaceFromString(pluginName.replace(/ /g, "-"));
|
|
16957
|
+
}
|
|
16958
|
+
function namespaceFromString(namespace) {
|
|
16959
|
+
return Object.assign({
|
|
16960
|
+
[NS]: namespace.replace(/ /g, "-")
|
|
16961
|
+
}, {
|
|
16962
|
+
toString() {
|
|
16963
|
+
return this[NS];
|
|
16964
|
+
}
|
|
16965
|
+
});
|
|
16966
|
+
}
|
|
16967
|
+
function pluginNameFromNamespace(namespace) {
|
|
16968
|
+
return namespace[NS].replace(/-/g, " ");
|
|
16969
|
+
}
|
|
16970
|
+
var NS, ANNOTATION_PLUGIN_NAME, ANNOTATION_PLUGIN_NAMESPACE;
|
|
16971
|
+
var init_parsing = __esm({
|
|
16972
|
+
"../@aws-cdk/cloud-assembly-api/lib/validation/parsing.ts"() {
|
|
16973
|
+
"use strict";
|
|
16974
|
+
__name(isSuppressibleViolation, "isSuppressibleViolation");
|
|
16975
|
+
__name(parseValidationId, "parseValidationId");
|
|
16976
|
+
__name(normalizeValidationId, "normalizeValidationId");
|
|
16977
|
+
__name(normalizeValidationIdForAnnotations, "normalizeValidationIdForAnnotations");
|
|
16978
|
+
NS = /* @__PURE__ */ Symbol("namespace");
|
|
16979
|
+
__name(namespaceFromPluginName, "namespaceFromPluginName");
|
|
16980
|
+
__name(namespaceFromString, "namespaceFromString");
|
|
16981
|
+
__name(pluginNameFromNamespace, "pluginNameFromNamespace");
|
|
16982
|
+
ANNOTATION_PLUGIN_NAME = "Construct Annotations";
|
|
16983
|
+
ANNOTATION_PLUGIN_NAMESPACE = namespaceFromPluginName("Annotation");
|
|
16984
|
+
}
|
|
16985
|
+
});
|
|
16986
|
+
|
|
16987
|
+
// ../@aws-cdk/cloud-assembly-api/lib/validation/formatting.ts
|
|
16988
|
+
var formatting_exports = {};
|
|
16989
|
+
__export(formatting_exports, {
|
|
16990
|
+
ValidationReportFormatter: () => ValidationReportFormatter,
|
|
16991
|
+
relativeFileLocationRenderer: () => relativeFileLocationRenderer,
|
|
16992
|
+
stripAnsi: () => stripAnsi
|
|
16993
|
+
});
|
|
16994
|
+
function flattenViolations(reports) {
|
|
16995
|
+
return reports.flatMap((report) => {
|
|
16996
|
+
const pluginName = report.pluginName;
|
|
16997
|
+
return report.violations.flatMap((violation) => {
|
|
16998
|
+
return violation.violatingConstructs.map((construct) => ({
|
|
16999
|
+
severity: normalizeSeverity(violation.severity, violation.customSeverity),
|
|
17000
|
+
description: violation.description,
|
|
17001
|
+
ruleName: violation.ruleName,
|
|
17002
|
+
pluginName,
|
|
17003
|
+
construct,
|
|
17004
|
+
suggestedFix: violation.suggestedFix,
|
|
17005
|
+
ruleMetadata: violation.ruleMetadata
|
|
17006
|
+
}));
|
|
17007
|
+
});
|
|
17008
|
+
});
|
|
17009
|
+
}
|
|
17010
|
+
function normalizeSeverity(severity, customSeverity) {
|
|
17011
|
+
switch (severity) {
|
|
17012
|
+
case "fatal":
|
|
17013
|
+
case "error":
|
|
17014
|
+
case "warning":
|
|
17015
|
+
case "info":
|
|
17016
|
+
return severity.toUpperCase();
|
|
17017
|
+
case "custom":
|
|
17018
|
+
return customSeverity ?? "INFO";
|
|
17019
|
+
}
|
|
17020
|
+
}
|
|
17021
|
+
function getSeverityColor(severity) {
|
|
17022
|
+
switch (severity.toLowerCase()) {
|
|
17023
|
+
case "fatal":
|
|
17024
|
+
return Colorize.red;
|
|
17025
|
+
case "error":
|
|
17026
|
+
return Colorize.orange;
|
|
17027
|
+
case "warning":
|
|
17028
|
+
return Colorize.yellow;
|
|
17029
|
+
default:
|
|
17030
|
+
return Colorize.blue;
|
|
17031
|
+
}
|
|
17032
|
+
}
|
|
17033
|
+
function stripAckTag(description) {
|
|
17034
|
+
return description.replace(/\s*\[ack:\s*[^\]]+\]\s*/g, "").trim();
|
|
17035
|
+
}
|
|
17036
|
+
function formatPluginFailure(f6) {
|
|
17037
|
+
return `${Colorize.orange("ERROR")} ${sanitize(f6.error)}`;
|
|
17038
|
+
}
|
|
17039
|
+
function sanitize(s2) {
|
|
17040
|
+
return (s2 ?? "").replace(CONTROL_CHARS, "\uFFFD");
|
|
17041
|
+
}
|
|
17042
|
+
function isPluginFailure(r6) {
|
|
17043
|
+
if (r6.conclusion === "success" || r6.violations.length > 0 || !r6.metadata?.error) {
|
|
17044
|
+
return void 0;
|
|
17045
|
+
}
|
|
17046
|
+
return { error: r6.metadata.error };
|
|
17047
|
+
}
|
|
17048
|
+
function stripAnsi(x) {
|
|
17049
|
+
const pattern = [
|
|
17050
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
17051
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
17052
|
+
].join("|");
|
|
17053
|
+
const re = new RegExp(pattern, "g");
|
|
17054
|
+
return x.replaceAll(re, "");
|
|
17055
|
+
}
|
|
17056
|
+
function relativeFileLocationRenderer(root6) {
|
|
17057
|
+
return {
|
|
17058
|
+
renderAbsoluteFilePath(absPath) {
|
|
17059
|
+
const relPath = import_path.default.relative(root6, absPath);
|
|
17060
|
+
return relPath.length < absPath.length ? relPath : absPath;
|
|
17061
|
+
}
|
|
17062
|
+
};
|
|
17063
|
+
}
|
|
17064
|
+
var import_path, ValidationReportFormatter, CONTROL_CHARS, SEVERITY_ORDER;
|
|
17065
|
+
var init_formatting = __esm({
|
|
17066
|
+
"../@aws-cdk/cloud-assembly-api/lib/validation/formatting.ts"() {
|
|
17067
|
+
"use strict";
|
|
17068
|
+
import_path = __toESM(require("path"));
|
|
17069
|
+
init_color();
|
|
17070
|
+
init_stack_trace();
|
|
17071
|
+
init_parsing();
|
|
17072
|
+
ValidationReportFormatter = class {
|
|
17073
|
+
constructor(options) {
|
|
17074
|
+
this.options = options;
|
|
17075
|
+
this.fileLocationRenderer = options.fileLocationRenderer ?? relativeFileLocationRenderer(process.cwd());
|
|
17076
|
+
}
|
|
17077
|
+
options;
|
|
17078
|
+
static {
|
|
17079
|
+
__name(this, "ValidationReportFormatter");
|
|
17080
|
+
}
|
|
17081
|
+
fileLocationRenderer;
|
|
17082
|
+
formatReports(reports) {
|
|
17083
|
+
const successfullyExecutedPlugins = reports.filter((r6) => isPluginFailure(r6) === void 0);
|
|
17084
|
+
const pluginFailures = reports.map(isPluginFailure).filter((e6) => e6 !== void 0);
|
|
17085
|
+
const violations = flattenViolations(successfullyExecutedPlugins);
|
|
17086
|
+
violations.sort((a6, b6) => {
|
|
17087
|
+
const aOrder = SEVERITY_ORDER[a6.severity.toLowerCase()] ?? 4;
|
|
17088
|
+
const bOrder = SEVERITY_ORDER[b6.severity.toLowerCase()] ?? 4;
|
|
17089
|
+
return aOrder - bOrder;
|
|
17090
|
+
});
|
|
17091
|
+
return [
|
|
17092
|
+
...pluginFailures.map(formatPluginFailure),
|
|
17093
|
+
...violations.map((v) => this.formatViolationBlock(v))
|
|
17094
|
+
];
|
|
17095
|
+
}
|
|
17096
|
+
formatViolationBlock(v) {
|
|
17097
|
+
const lines = [];
|
|
17098
|
+
const locations = this.sourceLocations(v.construct.stackTraces);
|
|
17099
|
+
const maxTraces = 5;
|
|
17100
|
+
let additional = false;
|
|
17101
|
+
for (const location of locations.slice(0, maxTraces)) {
|
|
17102
|
+
lines.push(`${additional ? "or " : ""}${Colorize.underline(sanitize(location))}`);
|
|
17103
|
+
additional = true;
|
|
17104
|
+
}
|
|
17105
|
+
if (locations.length > maxTraces) {
|
|
17106
|
+
lines.push(Colorize.grey(`(and ${locations.length - maxTraces} more...)`));
|
|
17107
|
+
}
|
|
17108
|
+
const pluginNs = namespaceFromPluginName(v.pluginName);
|
|
17109
|
+
const parsed = parseValidationId(v.ruleName);
|
|
17110
|
+
lines.push([
|
|
17111
|
+
Colorize.bold(getSeverityColor(v.severity)(sanitize(v.severity))),
|
|
17112
|
+
Colorize.bold(stripAckTag(sanitize(v.description))),
|
|
17113
|
+
Colorize.grey(`(${sanitize(parsed.namespace ? pluginNameFromNamespace(parsed.namespace) : v.pluginName)})`)
|
|
17114
|
+
].join(" "));
|
|
17115
|
+
const constructInfo = this.formatConstructInfo(v.construct);
|
|
17116
|
+
lines.push(` ${constructInfo}`);
|
|
17117
|
+
if (v.suggestedFix) {
|
|
17118
|
+
lines.push(` Suggested fix: ${sanitize(v.suggestedFix).replace(/\n/g, "\n ")}`);
|
|
17119
|
+
}
|
|
17120
|
+
const ackId = normalizeValidationId(v.ruleName, pluginNs);
|
|
17121
|
+
if (isSuppressibleViolation(v)) {
|
|
17122
|
+
lines.push(` ${Colorize.grey(`Acknowledge with '${sanitize(ackId)}'`)}`);
|
|
17123
|
+
} else {
|
|
17124
|
+
lines.push(` ${Colorize.grey(`Rule ${sanitize(ackId)}`)}`);
|
|
17125
|
+
}
|
|
17126
|
+
return lines.join("\n");
|
|
17127
|
+
}
|
|
17128
|
+
sourceLocations(stackTraces) {
|
|
17129
|
+
const ret = [];
|
|
17130
|
+
for (const trace of stackTraces ?? []) {
|
|
17131
|
+
const frame = StackTrace.fromNewlineSeparatedString(trace).findAndParse(this.options.frameFinder ?? DEFAULT_USER_CODE_FINDER);
|
|
17132
|
+
if (frame && frame.fileName) {
|
|
17133
|
+
const candidate = `${this.fileLocationRenderer.renderAbsoluteFilePath(frame.fileName)}:${frame.sourceLocation}`;
|
|
17134
|
+
if (!ret.includes(candidate)) {
|
|
17135
|
+
ret.push(candidate);
|
|
17136
|
+
}
|
|
17137
|
+
}
|
|
17138
|
+
}
|
|
17139
|
+
return ret;
|
|
17140
|
+
}
|
|
17141
|
+
formatConstructInfo(construct) {
|
|
17142
|
+
const parts = [];
|
|
17143
|
+
const logicalId = sanitize(construct.cloudFormationResource?.logicalId);
|
|
17144
|
+
if (construct.constructPath) {
|
|
17145
|
+
const cPath = sanitize(construct.constructPath);
|
|
17146
|
+
parts.push(logicalId ? `${Colorize.bold(cPath)} (${logicalId})` : Colorize.bold(cPath));
|
|
17147
|
+
} else {
|
|
17148
|
+
if (construct.cloudFormationResource?.templatePath) {
|
|
17149
|
+
parts.push(this.fileLocationRenderer.renderAbsoluteFilePath(sanitize(construct.cloudFormationResource.templatePath)));
|
|
17150
|
+
}
|
|
17151
|
+
if (logicalId) {
|
|
17152
|
+
parts.push(Colorize.bold(logicalId));
|
|
17153
|
+
}
|
|
17154
|
+
}
|
|
17155
|
+
if (construct.constructFqn) {
|
|
17156
|
+
parts.push(Colorize.grey(sanitize(construct.constructFqn)));
|
|
17157
|
+
}
|
|
17158
|
+
return parts.join(" ");
|
|
17159
|
+
}
|
|
17160
|
+
};
|
|
17161
|
+
__name(flattenViolations, "flattenViolations");
|
|
17162
|
+
__name(normalizeSeverity, "normalizeSeverity");
|
|
17163
|
+
__name(getSeverityColor, "getSeverityColor");
|
|
17164
|
+
__name(stripAckTag, "stripAckTag");
|
|
17165
|
+
__name(formatPluginFailure, "formatPluginFailure");
|
|
17166
|
+
CONTROL_CHARS = /[\x00-\x08\x0B-\x1F\x7F\x9B]/g;
|
|
17167
|
+
__name(sanitize, "sanitize");
|
|
17168
|
+
SEVERITY_ORDER = {
|
|
17169
|
+
fatal: 0,
|
|
17170
|
+
error: 1,
|
|
17171
|
+
warning: 2,
|
|
17172
|
+
info: 3
|
|
17173
|
+
};
|
|
17174
|
+
__name(isPluginFailure, "isPluginFailure");
|
|
17175
|
+
__name(stripAnsi, "stripAnsi");
|
|
17176
|
+
__name(relativeFileLocationRenderer, "relativeFileLocationRenderer");
|
|
17177
|
+
}
|
|
17178
|
+
});
|
|
17179
|
+
|
|
17180
|
+
// ../@aws-cdk/cloud-assembly-api/lib/validation/loading.ts
|
|
17181
|
+
var loading_exports = {};
|
|
17182
|
+
__export(loading_exports, {
|
|
17183
|
+
loadUnifiedValidationReport: () => loadUnifiedValidationReport
|
|
17184
|
+
});
|
|
17185
|
+
async function loadUnifiedValidationReport(assembly, stacks) {
|
|
17186
|
+
const ret = [];
|
|
17187
|
+
const reportPath = path10.join(assembly.directory, VALIDATION_REPORT_FILE2);
|
|
17188
|
+
if (await pathExists(reportPath)) {
|
|
17189
|
+
const selectedStackIds = new Set(stacks.map((stack) => stack.hierarchicalId));
|
|
17190
|
+
const report = import_cloud_assembly_schema2.Manifest.loadValidationReport(reportPath);
|
|
17191
|
+
const filteredReports = filterReportsByStacks(report.pluginReports, selectedStackIds);
|
|
17192
|
+
ret.push(...filteredReports);
|
|
17193
|
+
}
|
|
17194
|
+
const alreadyHasAnnotations = ret.some((r6) => r6.pluginName === ANNOTATION_PLUGIN_NAME);
|
|
17195
|
+
if (!alreadyHasAnnotations) {
|
|
17196
|
+
const annotationReport = pluginReportFromAnnotations(stacks);
|
|
17197
|
+
if (annotationReport.violations.length > 0 || annotationReport.conclusion === "failure") {
|
|
17198
|
+
ret.push(annotationReport);
|
|
17199
|
+
}
|
|
17200
|
+
}
|
|
17201
|
+
return ret;
|
|
17202
|
+
}
|
|
17203
|
+
function filterReportsByStacks(reports, selectedStackIds) {
|
|
17204
|
+
const stackIds = Array.from(selectedStackIds);
|
|
17205
|
+
return reports.map(filterReport);
|
|
17206
|
+
function filterReport(report) {
|
|
17207
|
+
const violationsWithoutConstructs = new Set(report.violations.flatMap((v, i6) => v.violatingConstructs.length === 0 ? [i6] : []));
|
|
17208
|
+
const filteredViolations = report.violations.map((v) => ({
|
|
17209
|
+
...v,
|
|
17210
|
+
violatingConstructs: v.violatingConstructs.filter(constructMatches)
|
|
17211
|
+
})).filter((v, i6) => v.violatingConstructs.length > 0 || violationsWithoutConstructs.has(i6));
|
|
17212
|
+
return {
|
|
17213
|
+
...report,
|
|
17214
|
+
violations: filteredViolations,
|
|
17215
|
+
conclusion: filteredViolations.length > 0 ? report.conclusion : "success"
|
|
17216
|
+
};
|
|
17217
|
+
}
|
|
17218
|
+
__name(filterReport, "filterReport");
|
|
17219
|
+
function constructMatches(c6) {
|
|
17220
|
+
return !c6.constructPath || stackIds.some((stackId) => c6.constructPath === stackId || c6.constructPath?.startsWith(`${stackId}/`));
|
|
17221
|
+
}
|
|
17222
|
+
__name(constructMatches, "constructMatches");
|
|
17223
|
+
}
|
|
17224
|
+
function pluginReportFromAnnotations(stacks) {
|
|
17225
|
+
const ruleMap = /* @__PURE__ */ new Map();
|
|
17226
|
+
for (const stack of stacks) {
|
|
17227
|
+
for (const entry of stack.messages) {
|
|
17228
|
+
let severity;
|
|
17229
|
+
switch (entry.level) {
|
|
17230
|
+
case "warning" /* WARNING */:
|
|
17231
|
+
severity = "warning";
|
|
17232
|
+
break;
|
|
17233
|
+
case "error" /* ERROR */:
|
|
17234
|
+
severity = "error";
|
|
17235
|
+
break;
|
|
17236
|
+
case "info" /* INFO */:
|
|
17237
|
+
severity = "info";
|
|
17238
|
+
break;
|
|
17239
|
+
}
|
|
17240
|
+
const { message, ruleName } = splitDescriptionAndId(String(entry.entry.data));
|
|
17241
|
+
const ruleKey = `${ruleName}|${severity}|${message}`;
|
|
17242
|
+
let violation = ruleMap.get(ruleKey);
|
|
17243
|
+
if (!violation) {
|
|
17244
|
+
violation = {
|
|
17245
|
+
ruleName: ruleName ?? `${severity}-annotation`,
|
|
17246
|
+
description: message,
|
|
17247
|
+
severity,
|
|
17248
|
+
violatingConstructs: [],
|
|
17249
|
+
ruleMetadata: {
|
|
17250
|
+
"cdk:annotation": "true"
|
|
17251
|
+
}
|
|
17252
|
+
};
|
|
17253
|
+
ruleMap.set(ruleKey, violation);
|
|
17254
|
+
}
|
|
17255
|
+
violation.violatingConstructs.push({
|
|
17256
|
+
constructPath: entry.id.replace(/^\//, "")
|
|
17257
|
+
// remove leading slash
|
|
17258
|
+
// TODO: see if this information can be obtained from tree.json
|
|
17259
|
+
// cloudFormationResource
|
|
17260
|
+
// constructFqn:
|
|
17261
|
+
// libraryVersion
|
|
17262
|
+
// TODO: see if we can get this from metadata stack traces. We may need to re-enable them for
|
|
17263
|
+
// annotations in the core library. Otherwise we should probably get a stack trace to the resource itself.
|
|
17264
|
+
// stackTraces
|
|
17265
|
+
});
|
|
17266
|
+
}
|
|
17267
|
+
}
|
|
17268
|
+
const violations = Array.from(ruleMap.values());
|
|
17269
|
+
const hasErrors = violations.some((v) => v.severity === "error");
|
|
17270
|
+
return {
|
|
17271
|
+
pluginName: ANNOTATION_PLUGIN_NAME,
|
|
17272
|
+
conclusion: hasErrors ? "failure" : "success",
|
|
17273
|
+
violations
|
|
17274
|
+
};
|
|
17275
|
+
}
|
|
17276
|
+
function splitDescriptionAndId(message) {
|
|
17277
|
+
const ackMatch = message.match(/\[ack: ([^\]]+)\]/);
|
|
17278
|
+
if (ackMatch) {
|
|
17279
|
+
return { message: message.replace(ackMatch[0], "").trim(), ruleName: ackMatch[1] };
|
|
17280
|
+
}
|
|
17281
|
+
const idMatch = message.match(/\(([^()]+::[^()]+)\)$/);
|
|
17282
|
+
if (idMatch) {
|
|
17283
|
+
return { message: message.replace(idMatch[0], "").trim(), ruleName: idMatch[1] };
|
|
17284
|
+
}
|
|
17285
|
+
return { message };
|
|
17286
|
+
}
|
|
17287
|
+
async function pathExists(pathName) {
|
|
17288
|
+
try {
|
|
17289
|
+
await import_fs.promises.access(pathName);
|
|
17290
|
+
return true;
|
|
17291
|
+
} catch (e6) {
|
|
17292
|
+
if (e6.code !== "ENOENT") {
|
|
17293
|
+
throw e6;
|
|
17294
|
+
}
|
|
17295
|
+
return false;
|
|
17296
|
+
}
|
|
17297
|
+
}
|
|
17298
|
+
var import_fs, path10, import_cloud_assembly_schema2, VALIDATION_REPORT_FILE2;
|
|
17299
|
+
var init_loading = __esm({
|
|
17300
|
+
"../@aws-cdk/cloud-assembly-api/lib/validation/loading.ts"() {
|
|
17301
|
+
"use strict";
|
|
17302
|
+
import_fs = require("fs");
|
|
17303
|
+
path10 = __toESM(require("path"));
|
|
17304
|
+
import_cloud_assembly_schema2 = __toESM(require_lib2());
|
|
17305
|
+
init_metadata();
|
|
17306
|
+
init_parsing();
|
|
17307
|
+
VALIDATION_REPORT_FILE2 = "validation-report.json";
|
|
17308
|
+
__name(loadUnifiedValidationReport, "loadUnifiedValidationReport");
|
|
17309
|
+
__name(filterReportsByStacks, "filterReportsByStacks");
|
|
17310
|
+
__name(pluginReportFromAnnotations, "pluginReportFromAnnotations");
|
|
17311
|
+
__name(splitDescriptionAndId, "splitDescriptionAndId");
|
|
17312
|
+
__name(pathExists, "pathExists");
|
|
17313
|
+
}
|
|
17314
|
+
});
|
|
17315
|
+
|
|
16701
17316
|
// ../@aws-cdk/cloud-assembly-api/lib/index.js
|
|
16702
17317
|
var require_lib3 = __commonJS({
|
|
16703
17318
|
"../@aws-cdk/cloud-assembly-api/lib/index.js"(exports2) {
|
|
@@ -16742,6 +17357,10 @@ var require_lib3 = __commonJS({
|
|
|
16742
17357
|
__exportStar((init_bootstrap(), __toCommonJS(bootstrap_exports)), exports2);
|
|
16743
17358
|
__exportStar((init_construct_tree(), __toCommonJS(construct_tree_exports)), exports2);
|
|
16744
17359
|
__exportStar((init_template_ranges(), __toCommonJS(template_ranges_exports)), exports2);
|
|
17360
|
+
__exportStar((init_stack_trace(), __toCommonJS(stack_trace_exports)), exports2);
|
|
17361
|
+
__exportStar((init_formatting(), __toCommonJS(formatting_exports)), exports2);
|
|
17362
|
+
__exportStar((init_parsing(), __toCommonJS(parsing_exports)), exports2);
|
|
17363
|
+
__exportStar((init_loading(), __toCommonJS(loading_exports)), exports2);
|
|
16745
17364
|
}
|
|
16746
17365
|
});
|
|
16747
17366
|
|
|
@@ -16806,11 +17425,11 @@ async function repositoryUri(ecr, repositoryName) {
|
|
|
16806
17425
|
return void 0;
|
|
16807
17426
|
}
|
|
16808
17427
|
}
|
|
16809
|
-
var
|
|
17428
|
+
var path11, ContainerImageAssetHandler, ContainerImageBuilder;
|
|
16810
17429
|
var init_container_images = __esm({
|
|
16811
17430
|
"../@aws-cdk/cdk-assets-lib/lib/private/handlers/container-images.ts"() {
|
|
16812
17431
|
"use strict";
|
|
16813
|
-
|
|
17432
|
+
path11 = __toESM(require("path"));
|
|
16814
17433
|
init_client_options();
|
|
16815
17434
|
init_progress();
|
|
16816
17435
|
init_placeholders2();
|
|
@@ -16841,7 +17460,7 @@ var init_container_images = __esm({
|
|
|
16841
17460
|
}
|
|
16842
17461
|
const dockerForBuilding = await this.host.dockerFactory.forBuild({
|
|
16843
17462
|
repoUri: initOnce.repoUri,
|
|
16844
|
-
eventEmitter:
|
|
17463
|
+
eventEmitter: this.host.emitMessage.bind(this.host),
|
|
16845
17464
|
ecr: initOnce.ecr,
|
|
16846
17465
|
subprocessOutputDestination: this.options.subprocessOutputDestination
|
|
16847
17466
|
});
|
|
@@ -16996,7 +17615,7 @@ var init_container_images = __esm({
|
|
|
16996
17615
|
`'directory' is expected in the DockerImage asset source, got: ${JSON.stringify(source)}`
|
|
16997
17616
|
);
|
|
16998
17617
|
}
|
|
16999
|
-
const fullPath =
|
|
17618
|
+
const fullPath = path11.resolve(this.workDir, source.directory);
|
|
17000
17619
|
this.host.emitMessage("build" /* BUILD */, `Building Docker image at ${fullPath}`);
|
|
17001
17620
|
await this.docker.build({
|
|
17002
17621
|
directory: fullPath,
|
|
@@ -17067,11 +17686,11 @@ var require_Mime = __commonJS({
|
|
|
17067
17686
|
}
|
|
17068
17687
|
}
|
|
17069
17688
|
};
|
|
17070
|
-
Mime.prototype.getType = function(
|
|
17071
|
-
|
|
17072
|
-
let last =
|
|
17689
|
+
Mime.prototype.getType = function(path14) {
|
|
17690
|
+
path14 = String(path14);
|
|
17691
|
+
let last = path14.replace(/^.*[/\\]/, "").toLowerCase();
|
|
17073
17692
|
let ext = last.replace(/^.*\./, "").toLowerCase();
|
|
17074
|
-
let hasPath = last.length <
|
|
17693
|
+
let hasPath = last.length < path14.length;
|
|
17075
17694
|
let hasDot = ext.length < last.length - 1;
|
|
17076
17695
|
return (hasDot || !hasPath) && this._types[ext] || null;
|
|
17077
17696
|
};
|
|
@@ -17107,7 +17726,7 @@ var require_mime = __commonJS({
|
|
|
17107
17726
|
});
|
|
17108
17727
|
|
|
17109
17728
|
// ../@aws-cdk/cdk-assets-lib/lib/private/fs-extra.ts
|
|
17110
|
-
async function
|
|
17729
|
+
async function pathExists2(pathName) {
|
|
17111
17730
|
try {
|
|
17112
17731
|
await pfs.stat(pathName);
|
|
17113
17732
|
return true;
|
|
@@ -17118,13 +17737,13 @@ async function pathExists(pathName) {
|
|
|
17118
17737
|
return false;
|
|
17119
17738
|
}
|
|
17120
17739
|
}
|
|
17121
|
-
var
|
|
17740
|
+
var fs10, pfs;
|
|
17122
17741
|
var init_fs_extra = __esm({
|
|
17123
17742
|
"../@aws-cdk/cdk-assets-lib/lib/private/fs-extra.ts"() {
|
|
17124
17743
|
"use strict";
|
|
17125
|
-
|
|
17126
|
-
pfs =
|
|
17127
|
-
__name(
|
|
17744
|
+
fs10 = __toESM(require("fs"));
|
|
17745
|
+
pfs = fs10.promises;
|
|
17746
|
+
__name(pathExists2, "pathExists");
|
|
17128
17747
|
}
|
|
17129
17748
|
});
|
|
17130
17749
|
|
|
@@ -17147,13 +17766,13 @@ async function cached(cache6, key, factory) {
|
|
|
17147
17766
|
cache6.set(key, fresh);
|
|
17148
17767
|
return fresh;
|
|
17149
17768
|
}
|
|
17150
|
-
var
|
|
17769
|
+
var import_fs2, path12, import_cloud_assembly_schema3, mime, EMPTY_ZIP_FILE_SIZE, FileAssetHandler, BucketInformation;
|
|
17151
17770
|
var init_files = __esm({
|
|
17152
17771
|
"../@aws-cdk/cdk-assets-lib/lib/private/handlers/files.ts"() {
|
|
17153
17772
|
"use strict";
|
|
17154
|
-
|
|
17155
|
-
|
|
17156
|
-
|
|
17773
|
+
import_fs2 = require("fs");
|
|
17774
|
+
path12 = __toESM(require("path"));
|
|
17775
|
+
import_cloud_assembly_schema3 = __toESM(require_lib2());
|
|
17157
17776
|
mime = __toESM(require_mime());
|
|
17158
17777
|
init_client_options();
|
|
17159
17778
|
init_progress();
|
|
@@ -17167,7 +17786,7 @@ var init_files = __esm({
|
|
|
17167
17786
|
this.workDir = workDir;
|
|
17168
17787
|
this.asset = asset;
|
|
17169
17788
|
this.host = host;
|
|
17170
|
-
this.fileCacheRoot =
|
|
17789
|
+
this.fileCacheRoot = path12.join(workDir, ".cache");
|
|
17171
17790
|
}
|
|
17172
17791
|
workDir;
|
|
17173
17792
|
asset;
|
|
@@ -17282,7 +17901,7 @@ var init_files = __esm({
|
|
|
17282
17901
|
{
|
|
17283
17902
|
Bucket: destination.bucketName,
|
|
17284
17903
|
Key: destination.objectKey,
|
|
17285
|
-
Body: (0,
|
|
17904
|
+
Body: (0, import_fs2.createReadStream)(publishFile.packagedPath),
|
|
17286
17905
|
ContentType: publishFile.contentType,
|
|
17287
17906
|
ChecksumAlgorithm: "SHA256"
|
|
17288
17907
|
},
|
|
@@ -17296,12 +17915,12 @@ var init_files = __esm({
|
|
|
17296
17915
|
`'path' is expected in the File asset source, got: ${JSON.stringify(source)}`
|
|
17297
17916
|
);
|
|
17298
17917
|
}
|
|
17299
|
-
const fullPath =
|
|
17300
|
-
if (source.packaging ===
|
|
17918
|
+
const fullPath = path12.resolve(this.workDir, source.path);
|
|
17919
|
+
if (source.packaging === import_cloud_assembly_schema3.FileAssetPackaging.ZIP_DIRECTORY) {
|
|
17301
17920
|
const contentType = "application/zip";
|
|
17302
|
-
await
|
|
17303
|
-
const packagedPath =
|
|
17304
|
-
if (await
|
|
17921
|
+
await import_fs2.promises.mkdir(this.fileCacheRoot, { recursive: true });
|
|
17922
|
+
const packagedPath = path12.join(this.fileCacheRoot, `${this.asset.id.assetId}.zip`);
|
|
17923
|
+
if (await pathExists2(packagedPath)) {
|
|
17305
17924
|
this.host.emitMessage("cached" /* CACHED */, `From cache ${packagedPath}`);
|
|
17306
17925
|
return { packagedPath, contentType };
|
|
17307
17926
|
}
|
|
@@ -17440,13 +18059,13 @@ function prefixTreeChars(xs, prefix = "") {
|
|
|
17440
18059
|
}
|
|
17441
18060
|
return ret;
|
|
17442
18061
|
}
|
|
17443
|
-
var
|
|
18062
|
+
var fs12, path13, import_cloud_assembly_schema4, AssetManifest, ASSET_TYPES, FileManifestEntry, DockerImageManifestEntry, DestinationIdentifier, DestinationPattern;
|
|
17444
18063
|
var init_asset_manifest = __esm({
|
|
17445
18064
|
"../@aws-cdk/cdk-assets-lib/lib/asset-manifest.ts"() {
|
|
17446
18065
|
"use strict";
|
|
17447
|
-
|
|
17448
|
-
|
|
17449
|
-
|
|
18066
|
+
fs12 = __toESM(require("fs"));
|
|
18067
|
+
path13 = __toESM(require("path"));
|
|
18068
|
+
import_cloud_assembly_schema4 = __toESM(require_lib2());
|
|
17450
18069
|
AssetManifest = class _AssetManifest {
|
|
17451
18070
|
constructor(directory, manifest) {
|
|
17452
18071
|
this.manifest = manifest;
|
|
@@ -17465,8 +18084,8 @@ var init_asset_manifest = __esm({
|
|
|
17465
18084
|
*/
|
|
17466
18085
|
static fromFile(fileName) {
|
|
17467
18086
|
try {
|
|
17468
|
-
const obj =
|
|
17469
|
-
return new _AssetManifest(
|
|
18087
|
+
const obj = import_cloud_assembly_schema4.Manifest.loadAssetManifest(fileName);
|
|
18088
|
+
return new _AssetManifest(path13.dirname(fileName), obj);
|
|
17470
18089
|
} catch (e6) {
|
|
17471
18090
|
throw new Error(`Cannot read asset manifest '${fileName}': ${e6.message}`);
|
|
17472
18091
|
}
|
|
@@ -17479,12 +18098,12 @@ var init_asset_manifest = __esm({
|
|
|
17479
18098
|
static fromPath(filePath) {
|
|
17480
18099
|
let st;
|
|
17481
18100
|
try {
|
|
17482
|
-
st =
|
|
18101
|
+
st = fs12.statSync(filePath);
|
|
17483
18102
|
} catch (e6) {
|
|
17484
18103
|
throw new Error(`Cannot read asset manifest at '${filePath}': ${e6.message}`);
|
|
17485
18104
|
}
|
|
17486
18105
|
if (st.isDirectory()) {
|
|
17487
|
-
return _AssetManifest.fromFile(
|
|
18106
|
+
return _AssetManifest.fromFile(path13.join(filePath, _AssetManifest.DEFAULT_FILENAME));
|
|
17488
18107
|
}
|
|
17489
18108
|
return _AssetManifest.fromFile(filePath);
|
|
17490
18109
|
}
|
|
@@ -19680,12 +20299,12 @@ var init_TypeRegistry = __esm({
|
|
|
19680
20299
|
this.namespace = namespace;
|
|
19681
20300
|
this.schemas = schemas;
|
|
19682
20301
|
this.exceptions = exceptions;
|
|
19683
|
-
}
|
|
19684
|
-
static for(namespace) {
|
|
19685
20302
|
if (!_TypeRegistry.registries.has(namespace)) {
|
|
19686
|
-
_TypeRegistry.registries.set(namespace,
|
|
20303
|
+
_TypeRegistry.registries.set(namespace, this);
|
|
19687
20304
|
}
|
|
19688
|
-
|
|
20305
|
+
}
|
|
20306
|
+
static for(namespace) {
|
|
20307
|
+
return _TypeRegistry.registries.get(namespace) ?? new _TypeRegistry(namespace);
|
|
19689
20308
|
}
|
|
19690
20309
|
copyFrom(other) {
|
|
19691
20310
|
const { schemas, exceptions } = this;
|
|
@@ -19703,7 +20322,9 @@ var init_TypeRegistry = __esm({
|
|
|
19703
20322
|
register(shapeId, schema) {
|
|
19704
20323
|
const qualifiedName = this.normalizeShapeId(shapeId);
|
|
19705
20324
|
for (const r6 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) {
|
|
19706
|
-
r6.schemas.
|
|
20325
|
+
if (!r6.schemas.has(qualifiedName)) {
|
|
20326
|
+
r6.schemas.set(qualifiedName, schema);
|
|
20327
|
+
}
|
|
19707
20328
|
}
|
|
19708
20329
|
}
|
|
19709
20330
|
getSchema(shapeId) {
|
|
@@ -19728,9 +20349,12 @@ var init_TypeRegistry = __esm({
|
|
|
19728
20349
|
registerError(es, ctor) {
|
|
19729
20350
|
const $error = es;
|
|
19730
20351
|
const ns = $error[1];
|
|
20352
|
+
const qualifiedName = ns + "#" + $error[2];
|
|
19731
20353
|
for (const r6 of [this, _TypeRegistry.for(ns)]) {
|
|
19732
|
-
r6.schemas.
|
|
19733
|
-
|
|
20354
|
+
if (!r6.schemas.has(qualifiedName) && !r6.exceptions.has($error)) {
|
|
20355
|
+
r6.schemas.set(qualifiedName, $error);
|
|
20356
|
+
r6.exceptions.set($error, ctor);
|
|
20357
|
+
}
|
|
19734
20358
|
}
|
|
19735
20359
|
}
|
|
19736
20360
|
getErrorCtor(es) {
|
|
@@ -19887,20 +20511,27 @@ var init_command = __esm({
|
|
|
19887
20511
|
}
|
|
19888
20512
|
const stack = clientStack.concat(this.middlewareStack);
|
|
19889
20513
|
const { logger: logger2 } = configuration;
|
|
20514
|
+
const additionalSmithyContext = additionalContext[import_types2.SMITHY_CONTEXT_KEY];
|
|
19890
20515
|
const handlerExecutionContext = {
|
|
19891
20516
|
logger: logger2,
|
|
19892
20517
|
clientName,
|
|
19893
20518
|
commandName,
|
|
19894
20519
|
inputFilterSensitiveLog,
|
|
19895
20520
|
outputFilterSensitiveLog,
|
|
20521
|
+
...additionalContext,
|
|
19896
20522
|
[import_types2.SMITHY_CONTEXT_KEY]: {
|
|
20523
|
+
...additionalSmithyContext,
|
|
19897
20524
|
commandInstance: this,
|
|
19898
|
-
...smithyContext
|
|
19899
|
-
|
|
19900
|
-
|
|
20525
|
+
...smithyContext,
|
|
20526
|
+
...options?.metricsRecorder === void 0 ? {} : { metricsRecorder: options.metricsRecorder }
|
|
20527
|
+
}
|
|
19901
20528
|
};
|
|
19902
20529
|
const { requestHandler } = configuration;
|
|
19903
20530
|
let requestOptions = options ?? {};
|
|
20531
|
+
if (requestOptions.metricsRecorder) {
|
|
20532
|
+
requestOptions = { ...requestOptions };
|
|
20533
|
+
delete requestOptions.metricsRecorder;
|
|
20534
|
+
}
|
|
19904
20535
|
if (smithyContext.eventStream) {
|
|
19905
20536
|
requestOptions = {
|
|
19906
20537
|
isEventStream: true,
|
|
@@ -20106,10 +20737,25 @@ var init_exceptions = __esm({
|
|
|
20106
20737
|
return _ServiceException.isInstance(instance);
|
|
20107
20738
|
}
|
|
20108
20739
|
if (_ServiceException.isInstance(instance)) {
|
|
20109
|
-
if (
|
|
20110
|
-
return
|
|
20740
|
+
if (this.prototype.isPrototypeOf(instance)) {
|
|
20741
|
+
return true;
|
|
20742
|
+
}
|
|
20743
|
+
const targetName = this.name;
|
|
20744
|
+
if (!targetName || !candidate.name) {
|
|
20745
|
+
return false;
|
|
20746
|
+
}
|
|
20747
|
+
if (candidate.name === targetName) {
|
|
20748
|
+
return true;
|
|
20749
|
+
}
|
|
20750
|
+
let proto = Object.getPrototypeOf(candidate);
|
|
20751
|
+
while (proto && proto !== Object.prototype) {
|
|
20752
|
+
const ctorName = proto.constructor?.name;
|
|
20753
|
+
if (ctorName && ctorName !== "Error" && ctorName === targetName) {
|
|
20754
|
+
return true;
|
|
20755
|
+
}
|
|
20756
|
+
proto = Object.getPrototypeOf(proto);
|
|
20111
20757
|
}
|
|
20112
|
-
return
|
|
20758
|
+
return false;
|
|
20113
20759
|
}
|
|
20114
20760
|
return false;
|
|
20115
20761
|
}
|
|
@@ -22011,14 +22657,14 @@ var init_readFile = __esm({
|
|
|
22011
22657
|
import_promises2 = require("node:fs/promises");
|
|
22012
22658
|
filePromises = {};
|
|
22013
22659
|
fileIntercept = {};
|
|
22014
|
-
readFile2 = /* @__PURE__ */ __name((
|
|
22015
|
-
if (fileIntercept[
|
|
22016
|
-
return fileIntercept[
|
|
22660
|
+
readFile2 = /* @__PURE__ */ __name((path14, options) => {
|
|
22661
|
+
if (fileIntercept[path14] !== void 0) {
|
|
22662
|
+
return fileIntercept[path14];
|
|
22017
22663
|
}
|
|
22018
|
-
if (!filePromises[
|
|
22019
|
-
filePromises[
|
|
22664
|
+
if (!filePromises[path14] || options?.ignoreCache) {
|
|
22665
|
+
filePromises[path14] = (0, import_promises2.readFile)(path14, "utf8");
|
|
22020
22666
|
}
|
|
22021
|
-
return filePromises[
|
|
22667
|
+
return filePromises[path14];
|
|
22022
22668
|
}, "readFile");
|
|
22023
22669
|
}
|
|
22024
22670
|
});
|
|
@@ -22130,8 +22776,8 @@ var init_externalDataInterceptor = __esm({
|
|
|
22130
22776
|
getFileRecord() {
|
|
22131
22777
|
return fileIntercept;
|
|
22132
22778
|
},
|
|
22133
|
-
interceptFile(
|
|
22134
|
-
fileIntercept[
|
|
22779
|
+
interceptFile(path14, contents) {
|
|
22780
|
+
fileIntercept[path14] = Promise.resolve(contents);
|
|
22135
22781
|
},
|
|
22136
22782
|
getTokenRecord() {
|
|
22137
22783
|
return tokenIntercept;
|
|
@@ -22930,8 +23576,8 @@ var init_createConfigValueProvider = __esm({
|
|
|
22930
23576
|
return endpoint.url.href;
|
|
22931
23577
|
}
|
|
22932
23578
|
if ("hostname" in endpoint) {
|
|
22933
|
-
const { protocol, hostname, port, path:
|
|
22934
|
-
return `${protocol}//${hostname}${port ? ":" + port : ""}${
|
|
23579
|
+
const { protocol, hostname, port, path: path14 } = endpoint;
|
|
23580
|
+
return `${protocol}//${hostname}${port ? ":" + port : ""}${path14}`;
|
|
22935
23581
|
}
|
|
22936
23582
|
}
|
|
22937
23583
|
return endpoint;
|
|
@@ -23322,18 +23968,18 @@ var getAttrPathList;
|
|
|
23322
23968
|
var init_getAttrPathList = __esm({
|
|
23323
23969
|
"../../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js"() {
|
|
23324
23970
|
init_types2();
|
|
23325
|
-
getAttrPathList = /* @__PURE__ */ __name((
|
|
23326
|
-
const parts =
|
|
23971
|
+
getAttrPathList = /* @__PURE__ */ __name((path14) => {
|
|
23972
|
+
const parts = path14.split(".");
|
|
23327
23973
|
const pathList = [];
|
|
23328
23974
|
for (const part of parts) {
|
|
23329
23975
|
const squareBracketIndex = part.indexOf("[");
|
|
23330
23976
|
if (squareBracketIndex !== -1) {
|
|
23331
23977
|
if (part.indexOf("]") !== part.length - 1) {
|
|
23332
|
-
throw new EndpointError(`Path: '${
|
|
23978
|
+
throw new EndpointError(`Path: '${path14}' does not end with ']'`);
|
|
23333
23979
|
}
|
|
23334
23980
|
const arrayIndex = part.slice(squareBracketIndex + 1, -1);
|
|
23335
23981
|
if (Number.isNaN(parseInt(arrayIndex))) {
|
|
23336
|
-
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${
|
|
23982
|
+
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path14}'`);
|
|
23337
23983
|
}
|
|
23338
23984
|
if (squareBracketIndex !== 0) {
|
|
23339
23985
|
pathList.push(part.slice(0, squareBracketIndex));
|
|
@@ -23354,9 +24000,9 @@ var init_getAttr = __esm({
|
|
|
23354
24000
|
"../../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js"() {
|
|
23355
24001
|
init_types2();
|
|
23356
24002
|
init_getAttrPathList();
|
|
23357
|
-
getAttr = /* @__PURE__ */ __name((value,
|
|
24003
|
+
getAttr = /* @__PURE__ */ __name((value, path14) => getAttrPathList(path14).reduce((acc, index) => {
|
|
23358
24004
|
if (typeof acc !== "object") {
|
|
23359
|
-
throw new EndpointError(`Index '${index}' in '${
|
|
24005
|
+
throw new EndpointError(`Index '${index}' in '${path14}' not found in '${JSON.stringify(value)}'`);
|
|
23360
24006
|
} else if (Array.isArray(acc)) {
|
|
23361
24007
|
const i6 = parseInt(index);
|
|
23362
24008
|
return acc[i6 < 0 ? acc.length + i6 : i6];
|
|
@@ -23418,8 +24064,8 @@ var init_parseURL = __esm({
|
|
|
23418
24064
|
return value;
|
|
23419
24065
|
}
|
|
23420
24066
|
if (typeof value === "object" && "hostname" in value) {
|
|
23421
|
-
const { hostname: hostname2, port, protocol: protocol2 = "", path:
|
|
23422
|
-
const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${
|
|
24067
|
+
const { hostname: hostname2, port, protocol: protocol2 = "", path: path14 = "", query = {} } = value;
|
|
24068
|
+
const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path14}`);
|
|
23423
24069
|
url.search = Object.entries(query).map(([k6, v]) => `${k6}=${v}`).join("&");
|
|
23424
24070
|
return url;
|
|
23425
24071
|
}
|
|
@@ -24578,6 +25224,8 @@ var init_getAwsChunkedEncodingStream_browser = __esm({
|
|
|
24578
25224
|
const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
|
|
24579
25225
|
const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
|
|
24580
25226
|
const digest3 = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0;
|
|
25227
|
+
Promise.resolve(digest3).catch(() => {
|
|
25228
|
+
});
|
|
24581
25229
|
const reader = readableStream.getReader();
|
|
24582
25230
|
return new ReadableStream({
|
|
24583
25231
|
async pull(controller) {
|
|
@@ -24614,9 +25262,12 @@ function getAwsChunkedEncodingStream2(stream, options) {
|
|
|
24614
25262
|
const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
|
|
24615
25263
|
const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
|
|
24616
25264
|
const digest3 = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : void 0;
|
|
25265
|
+
Promise.resolve(digest3).catch(() => {
|
|
25266
|
+
});
|
|
24617
25267
|
const awsChunkedEncodingStream = new import_node_stream4.Readable({
|
|
24618
|
-
read
|
|
24619
|
-
|
|
25268
|
+
read() {
|
|
25269
|
+
readable.resume();
|
|
25270
|
+
}
|
|
24620
25271
|
});
|
|
24621
25272
|
readable.on("data", (data) => {
|
|
24622
25273
|
const length = bodyLengthChecker(data) || 0;
|
|
@@ -24626,19 +25277,29 @@ function getAwsChunkedEncodingStream2(stream, options) {
|
|
|
24626
25277
|
awsChunkedEncodingStream.push(`${length.toString(16)}\r
|
|
24627
25278
|
`);
|
|
24628
25279
|
awsChunkedEncodingStream.push(data);
|
|
24629
|
-
awsChunkedEncodingStream.push("\r\n")
|
|
25280
|
+
if (!awsChunkedEncodingStream.push("\r\n")) {
|
|
25281
|
+
readable.pause();
|
|
25282
|
+
}
|
|
24630
25283
|
});
|
|
25284
|
+
readable.on("error", (err) => {
|
|
25285
|
+
awsChunkedEncodingStream.destroy(err);
|
|
25286
|
+
});
|
|
25287
|
+
readable.pause();
|
|
24631
25288
|
readable.on("end", async () => {
|
|
24632
|
-
|
|
25289
|
+
try {
|
|
25290
|
+
awsChunkedEncodingStream.push(`0\r
|
|
24633
25291
|
`);
|
|
24634
|
-
|
|
24635
|
-
|
|
24636
|
-
|
|
25292
|
+
if (checksumRequired) {
|
|
25293
|
+
const checksum = base64Encoder(await digest3);
|
|
25294
|
+
awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r
|
|
24637
25295
|
`);
|
|
24638
|
-
|
|
25296
|
+
awsChunkedEncodingStream.push(`\r
|
|
24639
25297
|
`);
|
|
25298
|
+
}
|
|
25299
|
+
awsChunkedEncodingStream.push(null);
|
|
25300
|
+
} catch (err) {
|
|
25301
|
+
awsChunkedEncodingStream.destroy(err);
|
|
24640
25302
|
}
|
|
24641
|
-
awsChunkedEncodingStream.push(null);
|
|
24642
25303
|
});
|
|
24643
25304
|
return awsChunkedEncodingStream;
|
|
24644
25305
|
}
|
|
@@ -26984,7 +27645,7 @@ var init_HttpProtocol = __esm({
|
|
|
26984
27645
|
constructor(options) {
|
|
26985
27646
|
super();
|
|
26986
27647
|
this.options = options;
|
|
26987
|
-
this.compositeErrorRegistry = TypeRegistry
|
|
27648
|
+
this.compositeErrorRegistry = new TypeRegistry(options.defaultNamespace);
|
|
26988
27649
|
for (const etr of options.errorTypeRegistries ?? []) {
|
|
26989
27650
|
this.compositeErrorRegistry.copyFrom(etr);
|
|
26990
27651
|
}
|
|
@@ -27078,6 +27739,44 @@ var init_HttpProtocol = __esm({
|
|
|
27078
27739
|
cfId: output.headers["x-amz-cf-id"]
|
|
27079
27740
|
};
|
|
27080
27741
|
}
|
|
27742
|
+
resolveError(name, namespaces, registries) {
|
|
27743
|
+
const defaultErrorSchema = [-3, "", "Error", 0, [], [], 0];
|
|
27744
|
+
let schema;
|
|
27745
|
+
for (const registry of registries) {
|
|
27746
|
+
for (const ns of namespaces) {
|
|
27747
|
+
try {
|
|
27748
|
+
if (ns === "*") {
|
|
27749
|
+
schema = registry.getSchema(name);
|
|
27750
|
+
} else {
|
|
27751
|
+
schema = registry.getSchema(ns + "#" + name);
|
|
27752
|
+
}
|
|
27753
|
+
const errorCtor = registry.getErrorCtor(schema);
|
|
27754
|
+
if (errorCtor) {
|
|
27755
|
+
return [schema, errorCtor, "modeled"];
|
|
27756
|
+
} else {
|
|
27757
|
+
const syntheticErrorSchema = registry.getBaseException();
|
|
27758
|
+
if (syntheticErrorSchema) {
|
|
27759
|
+
const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
|
|
27760
|
+
if (syntheticErrorCtor) {
|
|
27761
|
+
return [schema, syntheticErrorCtor, "synthetic"];
|
|
27762
|
+
}
|
|
27763
|
+
}
|
|
27764
|
+
}
|
|
27765
|
+
} catch (ignored) {
|
|
27766
|
+
}
|
|
27767
|
+
}
|
|
27768
|
+
}
|
|
27769
|
+
for (const registry of registries) {
|
|
27770
|
+
const syntheticErrorSchema = registry.getBaseException();
|
|
27771
|
+
if (syntheticErrorSchema) {
|
|
27772
|
+
const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
|
|
27773
|
+
if (syntheticErrorCtor) {
|
|
27774
|
+
return [syntheticErrorSchema, syntheticErrorCtor, "synthetic"];
|
|
27775
|
+
}
|
|
27776
|
+
}
|
|
27777
|
+
}
|
|
27778
|
+
return [defaultErrorSchema, Error, "native"];
|
|
27779
|
+
}
|
|
27081
27780
|
async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
|
|
27082
27781
|
const eventStreamSerde = await this.loadEventStreamCapability();
|
|
27083
27782
|
return eventStreamSerde.serializeEventStream({
|
|
@@ -27106,13 +27805,6 @@ var init_HttpProtocol = __esm({
|
|
|
27106
27805
|
compositeErrorRegistry: this.compositeErrorRegistry
|
|
27107
27806
|
});
|
|
27108
27807
|
}
|
|
27109
|
-
resolveEventStreamMarshaller(importedProvider) {
|
|
27110
|
-
const context = this.serdeContext;
|
|
27111
|
-
if (context.eventStreamMarshaller) {
|
|
27112
|
-
return context.eventStreamMarshaller;
|
|
27113
|
-
}
|
|
27114
|
-
return importedProvider(this.serdeContext);
|
|
27115
|
-
}
|
|
27116
27808
|
getDefaultContentType() {
|
|
27117
27809
|
throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
|
27118
27810
|
}
|
|
@@ -27131,6 +27823,13 @@ var init_HttpProtocol = __esm({
|
|
|
27131
27823
|
}
|
|
27132
27824
|
return context.eventStreamMarshaller;
|
|
27133
27825
|
}
|
|
27826
|
+
resolveEventStreamMarshaller(importedProvider) {
|
|
27827
|
+
const context = this.serdeContext;
|
|
27828
|
+
if (context.eventStreamMarshaller) {
|
|
27829
|
+
return context.eventStreamMarshaller;
|
|
27830
|
+
}
|
|
27831
|
+
return importedProvider(this.serdeContext);
|
|
27832
|
+
}
|
|
27134
27833
|
};
|
|
27135
27834
|
}
|
|
27136
27835
|
});
|
|
@@ -27177,11 +27876,11 @@ var init_HttpBindingProtocol = __esm({
|
|
|
27177
27876
|
const opTraits = translateTraits(operationSchema.traits);
|
|
27178
27877
|
if (opTraits.http) {
|
|
27179
27878
|
request.method = opTraits.http[0];
|
|
27180
|
-
const [
|
|
27879
|
+
const [path14, search] = opTraits.http[1].split("?");
|
|
27181
27880
|
if (request.path == "/") {
|
|
27182
|
-
request.path =
|
|
27881
|
+
request.path = path14;
|
|
27183
27882
|
} else {
|
|
27184
|
-
request.path +=
|
|
27883
|
+
request.path += path14;
|
|
27185
27884
|
}
|
|
27186
27885
|
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
27187
27886
|
for (const [key, value] of traitSearchParams) {
|
|
@@ -27599,8 +28298,8 @@ var init_requestBuilder = __esm({
|
|
|
27599
28298
|
return this;
|
|
27600
28299
|
}
|
|
27601
28300
|
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
|
|
27602
|
-
this.resolvePathStack.push((
|
|
27603
|
-
this.path = resolvedPath(
|
|
28301
|
+
this.resolvePathStack.push((path14) => {
|
|
28302
|
+
this.path = resolvedPath(path14, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
|
|
27604
28303
|
});
|
|
27605
28304
|
return this;
|
|
27606
28305
|
}
|
|
@@ -28220,7 +28919,7 @@ var init_service_error_classification = __esm({
|
|
|
28220
28919
|
return errorMessages.has(error2.message);
|
|
28221
28920
|
}, "isBrowserNetworkError");
|
|
28222
28921
|
isThrottlingError = /* @__PURE__ */ __name((error2) => error2.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error2.name) || error2.$retryable?.throttling == true, "isThrottlingError");
|
|
28223
|
-
isTransientError = /* @__PURE__ */ __name((error2, depth = 0) => isRetryableByTrait(error2) || isClockSkewCorrectedError(error2) || error2.name === "InvalidSignatureException" && error2.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error2.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error2?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error2?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error2.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error2) || isNodeJsHttp2TransientError(error2) || error2.cause !== void 0 && depth <= 10 && isTransientError(error2.cause, depth + 1), "isTransientError");
|
|
28922
|
+
isTransientError = /* @__PURE__ */ __name((error2, depth = 0) => error2?.name !== "AbortError" && (isRetryableByTrait(error2) || isClockSkewCorrectedError(error2) || error2.name === "InvalidSignatureException" && error2.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error2.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error2?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error2?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error2.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error2) || isNodeJsHttp2TransientError(error2) || error2.cause !== void 0 && depth <= 10 && isTransientError(error2.cause, depth + 1)), "isTransientError");
|
|
28224
28923
|
isServerError = /* @__PURE__ */ __name((error2) => {
|
|
28225
28924
|
if (error2.$metadata?.httpStatusCode !== void 0) {
|
|
28226
28925
|
const statusCode = error2.$metadata.httpStatusCode;
|
|
@@ -29786,9 +30485,9 @@ var init_createPaginator = __esm({
|
|
|
29786
30485
|
return await client.send(command6, ...args);
|
|
29787
30486
|
}, "makePagedClientRequest");
|
|
29788
30487
|
__name(createPaginator, "createPaginator");
|
|
29789
|
-
get = /* @__PURE__ */ __name((fromObject,
|
|
30488
|
+
get = /* @__PURE__ */ __name((fromObject, path14) => {
|
|
29790
30489
|
let cursor2 = fromObject;
|
|
29791
|
-
const pathComponents =
|
|
30490
|
+
const pathComponents = path14.split(".");
|
|
29792
30491
|
for (const step of pathComponents) {
|
|
29793
30492
|
if (!cursor2 || typeof cursor2 !== "object") {
|
|
29794
30493
|
return void 0;
|
|
@@ -32075,7 +32774,7 @@ var init_resolveAwsSdkSigV4AConfig = __esm({
|
|
|
32075
32774
|
// ../../node_modules/@smithy/signature-v4/dist-cjs/index.js
|
|
32076
32775
|
var require_dist_cjs2 = __commonJS({
|
|
32077
32776
|
"../../node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2) {
|
|
32078
|
-
var { fromUtf8: fromUtf83, fromHex: fromHex2, toHex: toHex2, toUint8Array: toUint8Array2, isArrayBuffer: isArrayBuffer2 } = (init_serde(), __toCommonJS(serde_exports));
|
|
32777
|
+
var { hasOwn: hasOwn2, fromUtf8: fromUtf83, fromHex: fromHex2, toHex: toHex2, toUint8Array: toUint8Array2, isArrayBuffer: isArrayBuffer2 } = (init_serde(), __toCommonJS(serde_exports));
|
|
32079
32778
|
var { normalizeProvider: normalizeProvider3 } = (init_client2(), __toCommonJS(client_exports));
|
|
32080
32779
|
var { escapeUri: escapeUri2, HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
|
|
32081
32780
|
var HeaderFormatter = class {
|
|
@@ -32084,7 +32783,9 @@ var require_dist_cjs2 = __commonJS({
|
|
|
32084
32783
|
}
|
|
32085
32784
|
format(headers) {
|
|
32086
32785
|
const chunks = [];
|
|
32087
|
-
for (const headerName
|
|
32786
|
+
for (const headerName in headers) {
|
|
32787
|
+
if (!hasOwn2(headers, headerName))
|
|
32788
|
+
continue;
|
|
32088
32789
|
const bytes = fromUtf83(headerName);
|
|
32089
32790
|
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
32090
32791
|
}
|
|
@@ -32099,27 +32800,27 @@ var require_dist_cjs2 = __commonJS({
|
|
|
32099
32800
|
formatHeaderValue(header) {
|
|
32100
32801
|
switch (header.type) {
|
|
32101
32802
|
case "boolean":
|
|
32102
|
-
return Uint8Array.from([header.value ?
|
|
32803
|
+
return Uint8Array.from([header.value ? 0 : 1]);
|
|
32103
32804
|
case "byte":
|
|
32104
|
-
return Uint8Array.from([
|
|
32805
|
+
return Uint8Array.from([2, header.value]);
|
|
32105
32806
|
case "short":
|
|
32106
32807
|
const shortView = new DataView(new ArrayBuffer(3));
|
|
32107
|
-
shortView.setUint8(0,
|
|
32808
|
+
shortView.setUint8(0, 3);
|
|
32108
32809
|
shortView.setInt16(1, header.value, false);
|
|
32109
32810
|
return new Uint8Array(shortView.buffer);
|
|
32110
32811
|
case "integer":
|
|
32111
32812
|
const intView = new DataView(new ArrayBuffer(5));
|
|
32112
|
-
intView.setUint8(0,
|
|
32813
|
+
intView.setUint8(0, 4);
|
|
32113
32814
|
intView.setInt32(1, header.value, false);
|
|
32114
32815
|
return new Uint8Array(intView.buffer);
|
|
32115
32816
|
case "long":
|
|
32116
32817
|
const longBytes = new Uint8Array(9);
|
|
32117
|
-
longBytes[0] =
|
|
32818
|
+
longBytes[0] = 5;
|
|
32118
32819
|
longBytes.set(header.value.bytes, 1);
|
|
32119
32820
|
return longBytes;
|
|
32120
32821
|
case "binary":
|
|
32121
32822
|
const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
|
|
32122
|
-
binView.setUint8(0,
|
|
32823
|
+
binView.setUint8(0, 6);
|
|
32123
32824
|
binView.setUint16(1, header.value.byteLength, false);
|
|
32124
32825
|
const binBytes = new Uint8Array(binView.buffer);
|
|
32125
32826
|
binBytes.set(header.value, 3);
|
|
@@ -32127,14 +32828,14 @@ var require_dist_cjs2 = __commonJS({
|
|
|
32127
32828
|
case "string":
|
|
32128
32829
|
const utf8Bytes = fromUtf83(header.value);
|
|
32129
32830
|
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
|
|
32130
|
-
strView.setUint8(0,
|
|
32831
|
+
strView.setUint8(0, 7);
|
|
32131
32832
|
strView.setUint16(1, utf8Bytes.byteLength, false);
|
|
32132
32833
|
const strBytes = new Uint8Array(strView.buffer);
|
|
32133
32834
|
strBytes.set(utf8Bytes, 3);
|
|
32134
32835
|
return strBytes;
|
|
32135
32836
|
case "timestamp":
|
|
32136
32837
|
const tsBytes = new Uint8Array(9);
|
|
32137
|
-
tsBytes[0] =
|
|
32838
|
+
tsBytes[0] = 8;
|
|
32138
32839
|
tsBytes.set(Int642.fromNumber(header.value.valueOf()).bytes, 1);
|
|
32139
32840
|
return tsBytes;
|
|
32140
32841
|
case "uuid":
|
|
@@ -32142,7 +32843,7 @@ var require_dist_cjs2 = __commonJS({
|
|
|
32142
32843
|
throw new Error(`Invalid UUID received: ${header.value}`);
|
|
32143
32844
|
}
|
|
32144
32845
|
const uuidBytes = new Uint8Array(17);
|
|
32145
|
-
uuidBytes[0] =
|
|
32846
|
+
uuidBytes[0] = 9;
|
|
32146
32847
|
uuidBytes.set(fromHex2(header.value.replace(/-/g, "")), 1);
|
|
32147
32848
|
return uuidBytes;
|
|
32148
32849
|
}
|
|
@@ -32255,7 +32956,9 @@ var require_dist_cjs2 = __commonJS({
|
|
|
32255
32956
|
var getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => {
|
|
32256
32957
|
const keys = [];
|
|
32257
32958
|
const serialized = {};
|
|
32258
|
-
for (const key
|
|
32959
|
+
for (const key in query) {
|
|
32960
|
+
if (!hasOwn2(query, key))
|
|
32961
|
+
continue;
|
|
32259
32962
|
if (key.toLowerCase() === SIGNATURE_HEADER) {
|
|
32260
32963
|
continue;
|
|
32261
32964
|
}
|
|
@@ -32320,10 +33023,10 @@ ${longDate}
|
|
|
32320
33023
|
${credentialScope}
|
|
32321
33024
|
${toHex2(hashedRequest)}`;
|
|
32322
33025
|
}
|
|
32323
|
-
getCanonicalPath({ path:
|
|
33026
|
+
getCanonicalPath({ path: path14 }) {
|
|
32324
33027
|
if (this.uriEscapePath) {
|
|
32325
33028
|
const normalizedPathSegments = [];
|
|
32326
|
-
for (const pathSegment of
|
|
33029
|
+
for (const pathSegment of path14.split("/")) {
|
|
32327
33030
|
if (pathSegment?.length === 0)
|
|
32328
33031
|
continue;
|
|
32329
33032
|
if (pathSegment === ".")
|
|
@@ -32334,11 +33037,11 @@ ${toHex2(hashedRequest)}`;
|
|
|
32334
33037
|
normalizedPathSegments.push(pathSegment);
|
|
32335
33038
|
}
|
|
32336
33039
|
}
|
|
32337
|
-
const normalizedPath = `${
|
|
33040
|
+
const normalizedPath = `${path14?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path14?.endsWith("/") ? "/" : ""}`;
|
|
32338
33041
|
const doubleEncoded = escapeUri2(normalizedPath);
|
|
32339
33042
|
return doubleEncoded.replace(/%2F/g, "/");
|
|
32340
33043
|
}
|
|
32341
|
-
return
|
|
33044
|
+
return path14;
|
|
32342
33045
|
}
|
|
32343
33046
|
validateResolvedCredentials(credentials) {
|
|
32344
33047
|
if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
|
|
@@ -32403,7 +33106,9 @@ ${toHex2(hashedRequest)}`;
|
|
|
32403
33106
|
return canonical;
|
|
32404
33107
|
}, "getCanonicalHeaders");
|
|
32405
33108
|
var getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => {
|
|
32406
|
-
for (const headerName
|
|
33109
|
+
for (const headerName in headers) {
|
|
33110
|
+
if (!hasOwn2(headers, headerName))
|
|
33111
|
+
continue;
|
|
32407
33112
|
if (headerName.toLowerCase() === SHA256_HEADER) {
|
|
32408
33113
|
return headers[headerName];
|
|
32409
33114
|
}
|
|
@@ -32419,7 +33124,9 @@ ${toHex2(hashedRequest)}`;
|
|
|
32419
33124
|
}, "getPayloadHash");
|
|
32420
33125
|
var hasHeader2 = /* @__PURE__ */ __name((soughtHeader, headers) => {
|
|
32421
33126
|
soughtHeader = soughtHeader.toLowerCase();
|
|
32422
|
-
for (const headerName
|
|
33127
|
+
for (const headerName in headers) {
|
|
33128
|
+
if (!hasOwn2(headers, headerName))
|
|
33129
|
+
continue;
|
|
32423
33130
|
if (soughtHeader === headerName.toLowerCase()) {
|
|
32424
33131
|
return true;
|
|
32425
33132
|
}
|
|
@@ -32428,7 +33135,9 @@ ${toHex2(hashedRequest)}`;
|
|
|
32428
33135
|
}, "hasHeader");
|
|
32429
33136
|
var moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => {
|
|
32430
33137
|
const { headers, query = {} } = HttpRequest2.clone(request);
|
|
32431
|
-
for (const name
|
|
33138
|
+
for (const name in headers) {
|
|
33139
|
+
if (!hasOwn2(headers, name))
|
|
33140
|
+
continue;
|
|
32432
33141
|
const lname = name.toLowerCase();
|
|
32433
33142
|
if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {
|
|
32434
33143
|
query[name] = headers[name];
|
|
@@ -32443,7 +33152,9 @@ ${toHex2(hashedRequest)}`;
|
|
|
32443
33152
|
}, "moveHeadersToQuery");
|
|
32444
33153
|
var prepareRequest = /* @__PURE__ */ __name((request) => {
|
|
32445
33154
|
request = HttpRequest2.clone(request);
|
|
32446
|
-
for (const headerName
|
|
33155
|
+
for (const headerName in request.headers) {
|
|
33156
|
+
if (!hasOwn2(request.headers, headerName))
|
|
33157
|
+
continue;
|
|
32447
33158
|
if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
|
32448
33159
|
delete request.headers[headerName];
|
|
32449
33160
|
}
|
|
@@ -33217,12 +33928,13 @@ For more information, please visit: ` + STATIC_STABILITY_DOC_URL);
|
|
|
33217
33928
|
// ../../node_modules/@smithy/node-http-handler/dist-cjs/index.js
|
|
33218
33929
|
var require_dist_cjs5 = __commonJS({
|
|
33219
33930
|
"../../node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2) {
|
|
33931
|
+
var { hasOwn: hasOwn2 } = (init_serde(), __toCommonJS(serde_exports));
|
|
33932
|
+
var { streamCollector: streamCollector8 } = (init_serde(), __toCommonJS(serde_exports));
|
|
33933
|
+
exports2.streamCollector = streamCollector8;
|
|
33220
33934
|
var { buildQueryString: buildQueryString2, HttpResponse: HttpResponse2 } = (init_protocols(), __toCommonJS(protocols_exports));
|
|
33221
33935
|
var node_https = require("node:https");
|
|
33222
33936
|
var { Readable: Readable8 } = require("node:stream");
|
|
33223
33937
|
var http2 = require("node:http2");
|
|
33224
|
-
var { streamCollector: streamCollector8 } = (init_serde(), __toCommonJS(serde_exports));
|
|
33225
|
-
exports2.streamCollector = streamCollector8;
|
|
33226
33938
|
function buildAbortError(abortSignal) {
|
|
33227
33939
|
const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : void 0;
|
|
33228
33940
|
if (reason) {
|
|
@@ -33245,6 +33957,8 @@ var require_dist_cjs5 = __commonJS({
|
|
|
33245
33957
|
var getTransformedHeaders = /* @__PURE__ */ __name((headers) => {
|
|
33246
33958
|
const transformedHeaders = {};
|
|
33247
33959
|
for (const name in headers) {
|
|
33960
|
+
if (!hasOwn2(headers, name))
|
|
33961
|
+
continue;
|
|
33248
33962
|
const headerValues = headers[name];
|
|
33249
33963
|
transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
|
|
33250
33964
|
}
|
|
@@ -33435,6 +34149,8 @@ var require_dist_cjs5 = __commonJS({
|
|
|
33435
34149
|
}
|
|
33436
34150
|
if (sockets && requests) {
|
|
33437
34151
|
for (const origin in sockets) {
|
|
34152
|
+
if (!hasOwn2(sockets, origin))
|
|
34153
|
+
continue;
|
|
33438
34154
|
const socketsInUse = sockets[origin]?.length ?? 0;
|
|
33439
34155
|
const requestsEnqueued = requests[origin]?.length ?? 0;
|
|
33440
34156
|
if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
|
|
@@ -33467,6 +34183,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33467
34183
|
this.config = await this.configProvider;
|
|
33468
34184
|
}
|
|
33469
34185
|
const config = this.config;
|
|
34186
|
+
const logger2 = config.logger;
|
|
33470
34187
|
const isSSL = request.protocol === "https:";
|
|
33471
34188
|
if (!isSSL && !this.config.httpAgent) {
|
|
33472
34189
|
this.config.httpAgent = await this.config.httpAgentProvider();
|
|
@@ -33510,7 +34227,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33510
34227
|
});
|
|
33511
34228
|
}
|
|
33512
34229
|
socketWarningTimeoutId = timing.setTimeout(() => {
|
|
33513
|
-
this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp,
|
|
34230
|
+
this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, logger2);
|
|
33514
34231
|
}, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2e3) + (config.connectionTimeout ?? 1e3));
|
|
33515
34232
|
const queryString = request.query ? buildQueryString2(request.query) : "";
|
|
33516
34233
|
let auth = void 0;
|
|
@@ -33519,12 +34236,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33519
34236
|
const password = request.password ?? "";
|
|
33520
34237
|
auth = `${username}:${password}`;
|
|
33521
34238
|
}
|
|
33522
|
-
let
|
|
34239
|
+
let path14 = request.path;
|
|
33523
34240
|
if (queryString) {
|
|
33524
|
-
|
|
34241
|
+
path14 += `?${queryString}`;
|
|
33525
34242
|
}
|
|
33526
34243
|
if (request.fragment) {
|
|
33527
|
-
|
|
34244
|
+
path14 += `#${request.fragment}`;
|
|
33528
34245
|
}
|
|
33529
34246
|
let hostname = request.hostname ?? "";
|
|
33530
34247
|
if (hostname[0] === "[" && hostname.endsWith("]")) {
|
|
@@ -33536,7 +34253,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33536
34253
|
headers: request.headers,
|
|
33537
34254
|
host: hostname,
|
|
33538
34255
|
method: request.method,
|
|
33539
|
-
path:
|
|
34256
|
+
path: path14,
|
|
33540
34257
|
port: request.port,
|
|
33541
34258
|
agent,
|
|
33542
34259
|
auth
|
|
@@ -33574,7 +34291,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33574
34291
|
}
|
|
33575
34292
|
const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;
|
|
33576
34293
|
connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);
|
|
33577
|
-
requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout,
|
|
34294
|
+
requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, logger2 ?? console);
|
|
33578
34295
|
socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);
|
|
33579
34296
|
const httpAgent = nodeHttpsOptions.agent;
|
|
33580
34297
|
if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
|
|
@@ -33592,6 +34309,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33592
34309
|
updateHttpClientConfig(key, value) {
|
|
33593
34310
|
this.config = void 0;
|
|
33594
34311
|
this.configProvider = this.configProvider.then((config) => {
|
|
34312
|
+
if (key === /* @__PURE__ */ Symbol.for("logger")) {
|
|
34313
|
+
return {
|
|
34314
|
+
...config,
|
|
34315
|
+
logger: config.logger ?? value
|
|
34316
|
+
};
|
|
34317
|
+
}
|
|
33595
34318
|
return {
|
|
33596
34319
|
...config,
|
|
33597
34320
|
[key]: value
|
|
@@ -33679,6 +34402,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33679
34402
|
destroy() {
|
|
33680
34403
|
this.refs = 0;
|
|
33681
34404
|
if (!this.session.destroyed) {
|
|
34405
|
+
this.session.setTimeout(0);
|
|
33682
34406
|
this.session.destroy();
|
|
33683
34407
|
}
|
|
33684
34408
|
}
|
|
@@ -33797,9 +34521,8 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33797
34521
|
session.on("error", ensureDestroyed);
|
|
33798
34522
|
session.on("frameError", ensureDestroyed);
|
|
33799
34523
|
session.on("close", ensureDestroyed);
|
|
33800
|
-
|
|
33801
|
-
|
|
33802
|
-
}
|
|
34524
|
+
const timeout = connectionConfiguration.requestTimeout ?? 3e5;
|
|
34525
|
+
session.setTimeout(timeout, ensureDestroyed);
|
|
33803
34526
|
ref.retain();
|
|
33804
34527
|
return ref;
|
|
33805
34528
|
}
|
|
@@ -33951,16 +34674,16 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33951
34674
|
reject(err);
|
|
33952
34675
|
}, "rejectWithDestroy");
|
|
33953
34676
|
const queryString = query ? buildQueryString2(query) : "";
|
|
33954
|
-
let
|
|
34677
|
+
let path14 = request.path;
|
|
33955
34678
|
if (queryString) {
|
|
33956
|
-
|
|
34679
|
+
path14 += `?${queryString}`;
|
|
33957
34680
|
}
|
|
33958
34681
|
if (request.fragment) {
|
|
33959
|
-
|
|
34682
|
+
path14 += `#${request.fragment}`;
|
|
33960
34683
|
}
|
|
33961
34684
|
const clientHttp2Stream = session.request({
|
|
33962
34685
|
...request.headers,
|
|
33963
|
-
[constants.HTTP2_HEADER_PATH]:
|
|
34686
|
+
[constants.HTTP2_HEADER_PATH]: path14,
|
|
33964
34687
|
[constants.HTTP2_HEADER_METHOD]: method
|
|
33965
34688
|
});
|
|
33966
34689
|
if (effectiveRequestTimeout) {
|
|
@@ -34002,6 +34725,9 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
34002
34725
|
resolve5({ response: httpResponse });
|
|
34003
34726
|
if (useIsolatedSession) {
|
|
34004
34727
|
session.close();
|
|
34728
|
+
clientHttp2Stream.on("end", () => {
|
|
34729
|
+
ref.destroy();
|
|
34730
|
+
});
|
|
34005
34731
|
}
|
|
34006
34732
|
});
|
|
34007
34733
|
clientHttp2Stream.on("close", () => {
|
|
@@ -34011,7 +34737,11 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
34011
34737
|
this.connectionManager.release(requestContext, ref);
|
|
34012
34738
|
}
|
|
34013
34739
|
if (!fulfilled) {
|
|
34014
|
-
|
|
34740
|
+
const error2 = new Error("Unexpected error: http2 request did not get a response");
|
|
34741
|
+
if (session.destroyed) {
|
|
34742
|
+
error2.name = "TimeoutError";
|
|
34743
|
+
}
|
|
34744
|
+
rejectWithDestroy(error2);
|
|
34015
34745
|
}
|
|
34016
34746
|
});
|
|
34017
34747
|
writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);
|
|
@@ -34042,7 +34772,7 @@ var require_dist_cjs6 = __commonJS({
|
|
|
34042
34772
|
var { setCredentialFeature: setCredentialFeature2 } = (init_client3(), __toCommonJS(client_exports2));
|
|
34043
34773
|
var { CredentialsProviderError: CredentialsProviderError2 } = (init_config2(), __toCommonJS(config_exports));
|
|
34044
34774
|
var { NodeHttpHandler } = require_dist_cjs5();
|
|
34045
|
-
var
|
|
34775
|
+
var fs14 = require("node:fs/promises");
|
|
34046
34776
|
var { HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
|
|
34047
34777
|
var { sdkStreamMixin: sdkStreamMixin3, parseRfc3339DateTime: parseRfc3339DateTime2 } = (init_serde(), __toCommonJS(serde_exports));
|
|
34048
34778
|
var ECS_CONTAINER_HOST = "169.254.170.2";
|
|
@@ -34168,7 +34898,7 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
|
|
|
34168
34898
|
const provider = retryWrapper(async () => {
|
|
34169
34899
|
const request = createGetRequest(url);
|
|
34170
34900
|
if (tokenFile) {
|
|
34171
|
-
request.headers.Authorization = validateToken((await
|
|
34901
|
+
request.headers.Authorization = validateToken((await fs14.readFile(tokenFile)).toString());
|
|
34172
34902
|
} else if (token) {
|
|
34173
34903
|
request.headers.Authorization = validateToken(token);
|
|
34174
34904
|
}
|
|
@@ -34283,7 +35013,7 @@ var init_package = __esm({
|
|
|
34283
35013
|
"../../node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
34284
35014
|
package_default = {
|
|
34285
35015
|
name: "@aws-sdk/nested-clients",
|
|
34286
|
-
version: "3.997.
|
|
35016
|
+
version: "3.997.46",
|
|
34287
35017
|
description: "Nested clients for AWS SDK packages.",
|
|
34288
35018
|
homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
|
|
34289
35019
|
license: "Apache-2.0",
|
|
@@ -34383,13 +35113,13 @@ var init_package = __esm({
|
|
|
34383
35113
|
"test:watch": "yarn g:vitest watch"
|
|
34384
35114
|
},
|
|
34385
35115
|
dependencies: {
|
|
34386
|
-
"@aws-sdk/core": "^3.
|
|
34387
|
-
"@aws-sdk/signature-v4-multi-region": "^3.996.
|
|
34388
|
-
"@aws-sdk/types": "^3.974.
|
|
34389
|
-
"@smithy/core": "^3.
|
|
34390
|
-
"@smithy/fetch-http-handler": "^5.
|
|
34391
|
-
"@smithy/node-http-handler": "^4.
|
|
34392
|
-
"@smithy/types": "^4.
|
|
35116
|
+
"@aws-sdk/core": "^3.978.1",
|
|
35117
|
+
"@aws-sdk/signature-v4-multi-region": "^3.996.47",
|
|
35118
|
+
"@aws-sdk/types": "^3.974.6",
|
|
35119
|
+
"@smithy/core": "^3.35.0",
|
|
35120
|
+
"@smithy/fetch-http-handler": "^5.8.0",
|
|
35121
|
+
"@smithy/node-http-handler": "^4.12.1",
|
|
35122
|
+
"@smithy/types": "^4.19.0",
|
|
34393
35123
|
tslib: "^2.6.2"
|
|
34394
35124
|
},
|
|
34395
35125
|
devDependencies: {
|
|
@@ -34434,7 +35164,6 @@ var init_cbor_types = __esm({
|
|
|
34434
35164
|
var loadSmithyRpcV2CborErrorCode;
|
|
34435
35165
|
var init_parseCborBody = __esm({
|
|
34436
35166
|
"../../node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js"() {
|
|
34437
|
-
init_transport();
|
|
34438
35167
|
loadSmithyRpcV2CborErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
34439
35168
|
const sanitizeErrorCode2 = /* @__PURE__ */ __name((rawValue) => {
|
|
34440
35169
|
let cleanValue = rawValue;
|
|
@@ -34447,26 +35176,11 @@ var init_parseCborBody = __esm({
|
|
|
34447
35176
|
if (cleanValue.indexOf(":") >= 0) {
|
|
34448
35177
|
cleanValue = cleanValue.split(":")[0];
|
|
34449
35178
|
}
|
|
34450
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
34451
|
-
cleanValue = cleanValue.split("#")[1];
|
|
34452
|
-
}
|
|
34453
35179
|
return cleanValue;
|
|
34454
35180
|
}, "sanitizeErrorCode");
|
|
34455
35181
|
if (data["__type"] !== void 0) {
|
|
34456
35182
|
return sanitizeErrorCode2(data["__type"]);
|
|
34457
35183
|
}
|
|
34458
|
-
let codeKey;
|
|
34459
|
-
for (const key in data) {
|
|
34460
|
-
if (!hasOwn(data, key))
|
|
34461
|
-
continue;
|
|
34462
|
-
if (key.toLowerCase() === "code") {
|
|
34463
|
-
codeKey = key;
|
|
34464
|
-
break;
|
|
34465
|
-
}
|
|
34466
|
-
}
|
|
34467
|
-
if (codeKey && data[codeKey] !== void 0) {
|
|
34468
|
-
return sanitizeErrorCode2(data[codeKey]);
|
|
34469
|
-
}
|
|
34470
35184
|
}, "loadSmithyRpcV2CborErrorCode");
|
|
34471
35185
|
}
|
|
34472
35186
|
});
|
|
@@ -35824,11 +36538,11 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
35824
36538
|
}
|
|
35825
36539
|
}
|
|
35826
36540
|
const { service, operation: operation2 } = getSmithyContext(context);
|
|
35827
|
-
const
|
|
36541
|
+
const path14 = `/service/${service}/operation/${operation2}`;
|
|
35828
36542
|
if (request.path.endsWith("/")) {
|
|
35829
|
-
request.path +=
|
|
36543
|
+
request.path += path14.slice(1);
|
|
35830
36544
|
} else {
|
|
35831
|
-
request.path +=
|
|
36545
|
+
request.path += path14;
|
|
35832
36546
|
}
|
|
35833
36547
|
return request;
|
|
35834
36548
|
}
|
|
@@ -35836,36 +36550,37 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
35836
36550
|
return super.deserializeResponse(operationSchema, context, response);
|
|
35837
36551
|
}
|
|
35838
36552
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
35839
|
-
const
|
|
36553
|
+
const errorIdentifier = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
36554
|
+
const preferredNamespaces = ["*"];
|
|
36555
|
+
const { defaultNamespace } = this.options;
|
|
36556
|
+
preferredNamespaces.unshift(defaultNamespace);
|
|
36557
|
+
const [namespace, errorShapeName] = (() => {
|
|
36558
|
+
if (errorIdentifier.includes("#")) {
|
|
36559
|
+
return errorIdentifier.split("#");
|
|
36560
|
+
}
|
|
36561
|
+
return [void 0, errorIdentifier];
|
|
36562
|
+
})();
|
|
36563
|
+
if (namespace) {
|
|
36564
|
+
preferredNamespaces.unshift(namespace);
|
|
36565
|
+
}
|
|
35840
36566
|
const errorMetadata = {
|
|
35841
36567
|
$metadata: metadata,
|
|
35842
|
-
$fault: response.statusCode
|
|
36568
|
+
$fault: response.statusCode < 500 ? "client" : "server"
|
|
35843
36569
|
};
|
|
35844
|
-
|
|
35845
|
-
if (
|
|
35846
|
-
|
|
35847
|
-
}
|
|
35848
|
-
|
|
35849
|
-
const
|
|
35850
|
-
|
|
35851
|
-
let errorSchema;
|
|
35852
|
-
try {
|
|
35853
|
-
errorSchema = registry.getSchema(errorName);
|
|
35854
|
-
} catch (ignored) {
|
|
36570
|
+
const preferredRegistries = [this.compositeErrorRegistry];
|
|
36571
|
+
if (namespace) {
|
|
36572
|
+
preferredRegistries.push(TypeRegistry.for(namespace));
|
|
36573
|
+
}
|
|
36574
|
+
preferredRegistries.push(TypeRegistry.for(defaultNamespace));
|
|
36575
|
+
const [errorSchema, ErrorCtor, errorMode] = this.resolveError(errorShapeName, preferredNamespaces, preferredRegistries);
|
|
36576
|
+
if (errorMode === "native" || errorMode === "synthetic") {
|
|
35855
36577
|
if (dataObject.Message) {
|
|
35856
36578
|
dataObject.message = dataObject.Message;
|
|
35857
36579
|
}
|
|
35858
|
-
const
|
|
35859
|
-
|
|
35860
|
-
const baseExceptionSchema = registry.getBaseException();
|
|
35861
|
-
if (baseExceptionSchema) {
|
|
35862
|
-
const ErrorCtor2 = registry.getErrorCtor(baseExceptionSchema);
|
|
35863
|
-
throw Object.assign(new ErrorCtor2({ name: errorName }), errorMetadata, dataObject);
|
|
35864
|
-
}
|
|
35865
|
-
throw Object.assign(new Error(errorName), errorMetadata, dataObject);
|
|
36580
|
+
const error2 = errorMode === "synthetic" ? new ErrorCtor({ name: errorShapeName }) : new Error(errorShapeName);
|
|
36581
|
+
throw Object.assign(error2, errorMetadata, dataObject);
|
|
35866
36582
|
}
|
|
35867
36583
|
const ns = NormalizedSchema.of(errorSchema);
|
|
35868
|
-
const ErrorCtor = registry.getErrorCtor(errorSchema);
|
|
35869
36584
|
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
35870
36585
|
const exception = new ErrorCtor({});
|
|
35871
36586
|
const output = {};
|
|
@@ -39911,10 +40626,10 @@ var init_schemas_0 = __esm({
|
|
|
39911
40626
|
_se = "server";
|
|
39912
40627
|
_tT = "tokenType";
|
|
39913
40628
|
n0 = "com.amazonaws.ssooidc";
|
|
39914
|
-
_s_registry = TypeRegistry
|
|
40629
|
+
_s_registry = new TypeRegistry(_s);
|
|
39915
40630
|
SSOOIDCServiceException$ = [-3, _s, "SSOOIDCServiceException", 0, [], []];
|
|
39916
40631
|
_s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);
|
|
39917
|
-
n0_registry = TypeRegistry
|
|
40632
|
+
n0_registry = new TypeRegistry(n0);
|
|
39918
40633
|
AccessDeniedException$ = [
|
|
39919
40634
|
-3,
|
|
39920
40635
|
n0,
|
|
@@ -40454,7 +41169,7 @@ var require_dist_cjs8 = __commonJS({
|
|
|
40454
41169
|
const tokenString = JSON.stringify(ssoToken, null, 2);
|
|
40455
41170
|
return writeFile(tokenFilepath, tokenString);
|
|
40456
41171
|
}, "writeSSOTokenToFile");
|
|
40457
|
-
var
|
|
41172
|
+
var lastRefreshAttemptTimes = /* @__PURE__ */ new Map();
|
|
40458
41173
|
var fromSso = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => {
|
|
40459
41174
|
init.logger?.debug("@aws-sdk/token-providers - fromSso");
|
|
40460
41175
|
const profiles = await parseKnownFiles2(init);
|
|
@@ -40489,11 +41204,15 @@ var require_dist_cjs8 = __commonJS({
|
|
|
40489
41204
|
validateTokenKey("accessToken", ssoToken.accessToken);
|
|
40490
41205
|
validateTokenKey("expiresAt", ssoToken.expiresAt);
|
|
40491
41206
|
const { accessToken, expiresAt } = ssoToken;
|
|
40492
|
-
const existingToken = {
|
|
41207
|
+
const existingToken = {
|
|
41208
|
+
token: accessToken,
|
|
41209
|
+
expiration: new Date(expiresAt)
|
|
41210
|
+
};
|
|
40493
41211
|
if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
|
|
40494
41212
|
return existingToken;
|
|
40495
41213
|
}
|
|
40496
|
-
|
|
41214
|
+
const lastRefreshAttemptTime = lastRefreshAttemptTimes.get(ssoSessionName) ?? 0;
|
|
41215
|
+
if (Date.now() - lastRefreshAttemptTime < 30 * 1e3) {
|
|
40497
41216
|
validateTokenExpiry(existingToken);
|
|
40498
41217
|
return existingToken;
|
|
40499
41218
|
}
|
|
@@ -40501,7 +41220,7 @@ var require_dist_cjs8 = __commonJS({
|
|
|
40501
41220
|
validateTokenKey("clientSecret", ssoToken.clientSecret, true);
|
|
40502
41221
|
validateTokenKey("refreshToken", ssoToken.refreshToken, true);
|
|
40503
41222
|
try {
|
|
40504
|
-
|
|
41223
|
+
lastRefreshAttemptTimes.set(ssoSessionName, Date.now());
|
|
40505
41224
|
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
|
|
40506
41225
|
validateTokenKey("accessToken", newSsoOidcToken.accessToken);
|
|
40507
41226
|
validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
|
|
@@ -40858,10 +41577,10 @@ var init_schemas_02 = __esm({
|
|
|
40858
41577
|
_sT = "sessionToken";
|
|
40859
41578
|
_xasbt = "x-amz-sso_bearer_token";
|
|
40860
41579
|
n02 = "com.amazonaws.sso";
|
|
40861
|
-
_s_registry2 = TypeRegistry
|
|
41580
|
+
_s_registry2 = new TypeRegistry(_s2);
|
|
40862
41581
|
SSOServiceException$ = [-3, _s2, "SSOServiceException", 0, [], []];
|
|
40863
41582
|
_s_registry2.registerError(SSOServiceException$, SSOServiceException);
|
|
40864
|
-
n0_registry2 = TypeRegistry
|
|
41583
|
+
n0_registry2 = new TypeRegistry(n02);
|
|
40865
41584
|
InvalidRequestException$2 = [
|
|
40866
41585
|
-3,
|
|
40867
41586
|
n02,
|
|
@@ -42065,7 +42784,7 @@ var init_errors3 = __esm({
|
|
|
42065
42784
|
});
|
|
42066
42785
|
|
|
42067
42786
|
// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js
|
|
42068
|
-
var _A, _AKI, _AR, _ARI, _ARR, _ARRs, _ARU, _ARWWI, _ARWWIR, _ARWWIRs, _Au, _C, _CA, _DS, _E, _EI, _ETE2, _IDPCEE, _IDPRCE, _IITE, _K, _MPDE, _P, _PA, _PAr, _PC, _PCLT, _PCr, _PDT, _PI, _PPS, _PPTLE, _Pr, _RA, _RDE, _RSN, _SAK, _SFWIT, _SI, _SN, _ST, _T, _TC, _TTK, _Ta, _V, _WIT, _a, _aKST, _aQE, _c3, _cTT, _e3, _hE3, _m2, _pDLT, _s3, _tLT, n03, _s_registry3, STSServiceException$, n0_registry3, ExpiredTokenException$2, IDPCommunicationErrorException$, IDPRejectedClaimException$, InvalidIdentityTokenException$, MalformedPolicyDocumentException$, PackedPolicyTooLargeException$, RegionDisabledException$, errorTypeRegistries3, accessKeySecretType, clientTokenType, AssumedRoleUser$, AssumeRoleRequest$, AssumeRoleResponse$, AssumeRoleWithWebIdentityRequest$, AssumeRoleWithWebIdentityResponse$, Credentials$, PolicyDescriptorType$, ProvidedContext$, Tag$, policyDescriptorListType, ProvidedContextsListType, tagKeyListType, tagListType, AssumeRole$, AssumeRoleWithWebIdentity$;
|
|
42787
|
+
var _A, _AKI, _AR, _ARI, _ARR, _ARRs, _ARU, _ARWWI, _ARWWIR, _ARWWIRs, _Au, _C, _CA, _DS, _E, _EI, _ETE2, _IDPCEE, _IDPRCE, _IITE, _K, _MPDE, _MSTS, _P, _PA, _PAr, _PC, _PCLT, _PCr, _PDT, _PI, _PPS, _PPTLE, _Pr, _RA, _RDE, _RSN, _SAK, _SFWIT, _SI, _SN, _ST, _STS, _STU, _T, _TC, _TTK, _Ta, _V, _WIT, _a, _aKST, _aQE, _c3, _cTT, _e3, _hE3, _m2, _pDLT, _s3, _tLT, n03, _s_registry3, STSServiceException$, n0_registry3, ExpiredTokenException$2, IDPCommunicationErrorException$, IDPRejectedClaimException$, InvalidIdentityTokenException$, MalformedPolicyDocumentException$, PackedPolicyTooLargeException$, RegionDisabledException$, errorTypeRegistries3, accessKeySecretType, clientTokenType, AssumedRoleUser$, AssumeRoleRequest$, AssumeRoleResponse$, AssumeRoleWithWebIdentityRequest$, AssumeRoleWithWebIdentityResponse$, Credentials$, PolicyDescriptorType$, ProvidedContext$, Tag$, policyDescriptorListType, ProvidedContextsListType, tagKeyListType, tagListType, AssumeRole$, AssumeRoleWithWebIdentity$;
|
|
42069
42788
|
var init_schemas_03 = __esm({
|
|
42070
42789
|
"../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js"() {
|
|
42071
42790
|
init_schema4();
|
|
@@ -42093,6 +42812,7 @@ var init_schemas_03 = __esm({
|
|
|
42093
42812
|
_IITE = "InvalidIdentityTokenException";
|
|
42094
42813
|
_K = "Key";
|
|
42095
42814
|
_MPDE = "MalformedPolicyDocumentException";
|
|
42815
|
+
_MSTS = "MinimumSessionTokenSize";
|
|
42096
42816
|
_P = "Policy";
|
|
42097
42817
|
_PA = "PolicyArns";
|
|
42098
42818
|
_PAr = "ProviderArn";
|
|
@@ -42112,6 +42832,8 @@ var init_schemas_03 = __esm({
|
|
|
42112
42832
|
_SI = "SourceIdentity";
|
|
42113
42833
|
_SN = "SerialNumber";
|
|
42114
42834
|
_ST = "SessionToken";
|
|
42835
|
+
_STS = "SessionTokenSize";
|
|
42836
|
+
_STU = "SessionTokenUtilization";
|
|
42115
42837
|
_T = "Tags";
|
|
42116
42838
|
_TC = "TokenCode";
|
|
42117
42839
|
_TTK = "TransitiveTagKeys";
|
|
@@ -42130,10 +42852,10 @@ var init_schemas_03 = __esm({
|
|
|
42130
42852
|
_s3 = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
|
|
42131
42853
|
_tLT = "tagListType";
|
|
42132
42854
|
n03 = "com.amazonaws.sts";
|
|
42133
|
-
_s_registry3 = TypeRegistry
|
|
42855
|
+
_s_registry3 = new TypeRegistry(_s3);
|
|
42134
42856
|
STSServiceException$ = [-3, _s3, "STSServiceException", 0, [], []];
|
|
42135
42857
|
_s_registry3.registerError(STSServiceException$, STSServiceException);
|
|
42136
|
-
n0_registry3 = TypeRegistry
|
|
42858
|
+
n0_registry3 = new TypeRegistry(n03);
|
|
42137
42859
|
ExpiredTokenException$2 = [
|
|
42138
42860
|
-3,
|
|
42139
42861
|
n03,
|
|
@@ -42217,8 +42939,8 @@ var init_schemas_03 = __esm({
|
|
|
42217
42939
|
n03,
|
|
42218
42940
|
_ARR,
|
|
42219
42941
|
0,
|
|
42220
|
-
[_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
|
|
42221
|
-
[0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
|
|
42942
|
+
[_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC, _MSTS],
|
|
42943
|
+
[0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType, 1],
|
|
42222
42944
|
2
|
|
42223
42945
|
];
|
|
42224
42946
|
AssumeRoleResponse$ = [
|
|
@@ -42226,16 +42948,16 @@ var init_schemas_03 = __esm({
|
|
|
42226
42948
|
n03,
|
|
42227
42949
|
_ARRs,
|
|
42228
42950
|
0,
|
|
42229
|
-
[_C, _ARU, _PPS, _SI],
|
|
42230
|
-
[[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0]
|
|
42951
|
+
[_C, _ARU, _PPS, _SI, _STU, _STS],
|
|
42952
|
+
[[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0, 1, 1]
|
|
42231
42953
|
];
|
|
42232
42954
|
AssumeRoleWithWebIdentityRequest$ = [
|
|
42233
42955
|
3,
|
|
42234
42956
|
n03,
|
|
42235
42957
|
_ARWWIR,
|
|
42236
42958
|
0,
|
|
42237
|
-
[_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
|
|
42238
|
-
[0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
|
|
42959
|
+
[_RA, _RSN, _WIT, _PI, _PA, _P, _DS, _MSTS],
|
|
42960
|
+
[0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1, 1],
|
|
42239
42961
|
3
|
|
42240
42962
|
];
|
|
42241
42963
|
AssumeRoleWithWebIdentityResponse$ = [
|
|
@@ -42243,8 +42965,8 @@ var init_schemas_03 = __esm({
|
|
|
42243
42965
|
n03,
|
|
42244
42966
|
_ARWWIRs,
|
|
42245
42967
|
0,
|
|
42246
|
-
[_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
|
|
42247
|
-
[[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0]
|
|
42968
|
+
[_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI, _STU, _STS],
|
|
42969
|
+
[[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0, 1, 1]
|
|
42248
42970
|
];
|
|
42249
42971
|
Credentials$ = [
|
|
42250
42972
|
3,
|
|
@@ -43284,10 +44006,10 @@ var init_schemas_04 = __esm({
|
|
|
43284
44006
|
_tT2 = "tokenType";
|
|
43285
44007
|
_tt = "token_type";
|
|
43286
44008
|
n04 = "com.amazonaws.signin";
|
|
43287
|
-
_s_registry4 = TypeRegistry
|
|
44009
|
+
_s_registry4 = new TypeRegistry(_s4);
|
|
43288
44010
|
SigninServiceException$ = [-3, _s4, "SigninServiceException", 0, [], []];
|
|
43289
44011
|
_s_registry4.registerError(SigninServiceException$, SigninServiceException);
|
|
43290
|
-
n0_registry4 = TypeRegistry
|
|
44012
|
+
n0_registry4 = new TypeRegistry(n04);
|
|
43291
44013
|
AccessDeniedException$2 = [
|
|
43292
44014
|
-3,
|
|
43293
44015
|
n04,
|
|
@@ -43785,7 +44507,7 @@ var require_dist_cjs11 = __commonJS({
|
|
|
43785
44507
|
var { createHash: createHash6, createPrivateKey, createPublicKey, sign: sign3 } = require("node:crypto");
|
|
43786
44508
|
var { promises: promises2 } = require("node:fs");
|
|
43787
44509
|
var { homedir: homedir3 } = require("node:os");
|
|
43788
|
-
var { dirname: dirname3, join:
|
|
44510
|
+
var { dirname: dirname3, join: join15 } = require("node:path");
|
|
43789
44511
|
var LoginCredentialsFetcher = class _LoginCredentialsFetcher {
|
|
43790
44512
|
static {
|
|
43791
44513
|
__name(this, "LoginCredentialsFetcher");
|
|
@@ -43952,10 +44674,10 @@ var require_dist_cjs11 = __commonJS({
|
|
|
43952
44674
|
await promises2.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
|
|
43953
44675
|
}
|
|
43954
44676
|
getTokenFilePath() {
|
|
43955
|
-
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ??
|
|
44677
|
+
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join15(homedir3(), ".aws", "login", "cache");
|
|
43956
44678
|
const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
|
|
43957
44679
|
const loginSessionSha256 = createHash6("sha256").update(loginSessionBytes).digest("hex");
|
|
43958
|
-
return
|
|
44680
|
+
return join15(directory, `${loginSessionSha256}.json`);
|
|
43959
44681
|
}
|
|
43960
44682
|
derToRawSignature(derSignature) {
|
|
43961
44683
|
let offset = 2;
|
|
@@ -44446,6 +45168,7 @@ var require_dist_cjs15 = __commonJS({
|
|
|
44446
45168
|
if (!passiveLock) {
|
|
44447
45169
|
passiveLock = chain3(options).then((c6) => {
|
|
44448
45170
|
credentials = c6;
|
|
45171
|
+
}).catch(() => {
|
|
44449
45172
|
}).finally(() => {
|
|
44450
45173
|
passiveLock = void 0;
|
|
44451
45174
|
});
|
|
@@ -66143,10 +66866,10 @@ var init_schemas_05 = __esm({
|
|
|
66143
66866
|
_s5 = "smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity";
|
|
66144
66867
|
_se3 = "server";
|
|
66145
66868
|
n05 = "com.amazonaws.cognitoidentity";
|
|
66146
|
-
_s_registry5 = TypeRegistry
|
|
66869
|
+
_s_registry5 = new TypeRegistry(_s5);
|
|
66147
66870
|
CognitoIdentityServiceException$ = [-3, _s5, "CognitoIdentityServiceException", 0, [], []];
|
|
66148
66871
|
_s_registry5.registerError(CognitoIdentityServiceException$, CognitoIdentityServiceException);
|
|
66149
|
-
n0_registry5 = TypeRegistry
|
|
66872
|
+
n0_registry5 = new TypeRegistry(n05);
|
|
66150
66873
|
ExternalServiceException$ = [
|
|
66151
66874
|
-3,
|
|
66152
66875
|
n05,
|
|
@@ -67932,7 +68655,7 @@ var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function(
|
|
|
67932
68655
|
};
|
|
67933
68656
|
})();
|
|
67934
68657
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67935
|
-
var
|
|
68658
|
+
var fs13 = __importStar(require("fs"));
|
|
67936
68659
|
var cdk_assets_lib_1 = require_lib4();
|
|
67937
68660
|
var docker_credentials_1 = (init_docker_credentials(), __toCommonJS(docker_credentials_exports));
|
|
67938
68661
|
async function main() {
|
|
@@ -67943,9 +68666,9 @@ async function main() {
|
|
|
67943
68666
|
if (!config) {
|
|
67944
68667
|
throw new Error(`unable to find CDK Docker credentials at: ${(0, docker_credentials_1.cdkCredentialsConfigFile)()}`);
|
|
67945
68668
|
}
|
|
67946
|
-
let endpoint =
|
|
68669
|
+
let endpoint = fs13.readFileSync(0, { encoding: "utf-8" }).trim();
|
|
67947
68670
|
const credentials = await (0, docker_credentials_1.fetchDockerLoginCredentials)(new cdk_assets_lib_1.DefaultAwsClient(), config, endpoint);
|
|
67948
|
-
|
|
68671
|
+
fs13.writeFileSync(1, JSON.stringify(credentials));
|
|
67949
68672
|
}
|
|
67950
68673
|
__name(main, "main");
|
|
67951
68674
|
main().catch((e6) => {
|