cdk-assets 4.7.3 → 4.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_LICENSES +20 -20
- package/bin/cdk-assets.js +1043 -360
- package/bin/docker-credential-cdk-assets.js +1004 -321
- package/package.json +10 -10
package/bin/cdk-assets.js
CHANGED
|
@@ -151,8 +151,8 @@ var require_windows = __commonJS({
|
|
|
151
151
|
"../../node_modules/isexe/windows.js"(exports2, module2) {
|
|
152
152
|
module2.exports = isexe;
|
|
153
153
|
isexe.sync = sync;
|
|
154
|
-
var
|
|
155
|
-
function checkPathExt(
|
|
154
|
+
var fs14 = require("fs");
|
|
155
|
+
function checkPathExt(path15, options) {
|
|
156
156
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
157
157
|
if (!pathext) {
|
|
158
158
|
return true;
|
|
@@ -163,28 +163,28 @@ var require_windows = __commonJS({
|
|
|
163
163
|
}
|
|
164
164
|
for (var i6 = 0; i6 < pathext.length; i6++) {
|
|
165
165
|
var p3 = pathext[i6].toLowerCase();
|
|
166
|
-
if (p3 &&
|
|
166
|
+
if (p3 && path15.substr(-p3.length).toLowerCase() === p3) {
|
|
167
167
|
return true;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return false;
|
|
171
171
|
}
|
|
172
172
|
__name(checkPathExt, "checkPathExt");
|
|
173
|
-
function checkStat(stat,
|
|
173
|
+
function checkStat(stat, path15, options) {
|
|
174
174
|
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
175
175
|
return false;
|
|
176
176
|
}
|
|
177
|
-
return checkPathExt(
|
|
177
|
+
return checkPathExt(path15, options);
|
|
178
178
|
}
|
|
179
179
|
__name(checkStat, "checkStat");
|
|
180
|
-
function isexe(
|
|
181
|
-
|
|
182
|
-
cb(er, er ? false : checkStat(stat,
|
|
180
|
+
function isexe(path15, options, cb) {
|
|
181
|
+
fs14.stat(path15, function(er, stat) {
|
|
182
|
+
cb(er, er ? false : checkStat(stat, path15, options));
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
__name(isexe, "isexe");
|
|
186
|
-
function sync(
|
|
187
|
-
return checkStat(
|
|
186
|
+
function sync(path15, options) {
|
|
187
|
+
return checkStat(fs14.statSync(path15), path15, options);
|
|
188
188
|
}
|
|
189
189
|
__name(sync, "sync");
|
|
190
190
|
}
|
|
@@ -195,15 +195,15 @@ var require_mode = __commonJS({
|
|
|
195
195
|
"../../node_modules/isexe/mode.js"(exports2, module2) {
|
|
196
196
|
module2.exports = isexe;
|
|
197
197
|
isexe.sync = sync;
|
|
198
|
-
var
|
|
199
|
-
function isexe(
|
|
200
|
-
|
|
198
|
+
var fs14 = require("fs");
|
|
199
|
+
function isexe(path15, options, cb) {
|
|
200
|
+
fs14.stat(path15, function(er, stat) {
|
|
201
201
|
cb(er, er ? false : checkStat(stat, options));
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
__name(isexe, "isexe");
|
|
205
|
-
function sync(
|
|
206
|
-
return checkStat(
|
|
205
|
+
function sync(path15, options) {
|
|
206
|
+
return checkStat(fs14.statSync(path15), options);
|
|
207
207
|
}
|
|
208
208
|
__name(sync, "sync");
|
|
209
209
|
function checkStat(stat, options) {
|
|
@@ -230,7 +230,7 @@ var require_mode = __commonJS({
|
|
|
230
230
|
// ../../node_modules/isexe/index.js
|
|
231
231
|
var require_isexe = __commonJS({
|
|
232
232
|
"../../node_modules/isexe/index.js"(exports2, module2) {
|
|
233
|
-
var
|
|
233
|
+
var fs14 = require("fs");
|
|
234
234
|
var core;
|
|
235
235
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
236
236
|
core = require_windows();
|
|
@@ -239,7 +239,7 @@ var require_isexe = __commonJS({
|
|
|
239
239
|
}
|
|
240
240
|
module2.exports = isexe;
|
|
241
241
|
isexe.sync = sync;
|
|
242
|
-
function isexe(
|
|
242
|
+
function isexe(path15, options, cb) {
|
|
243
243
|
if (typeof options === "function") {
|
|
244
244
|
cb = options;
|
|
245
245
|
options = {};
|
|
@@ -249,7 +249,7 @@ var require_isexe = __commonJS({
|
|
|
249
249
|
throw new TypeError("callback not provided");
|
|
250
250
|
}
|
|
251
251
|
return new Promise(function(resolve5, reject) {
|
|
252
|
-
isexe(
|
|
252
|
+
isexe(path15, options || {}, function(er, is) {
|
|
253
253
|
if (er) {
|
|
254
254
|
reject(er);
|
|
255
255
|
} else {
|
|
@@ -258,7 +258,7 @@ var require_isexe = __commonJS({
|
|
|
258
258
|
});
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
core(
|
|
261
|
+
core(path15, options || {}, function(er, is) {
|
|
262
262
|
if (er) {
|
|
263
263
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
264
264
|
er = null;
|
|
@@ -269,9 +269,9 @@ var require_isexe = __commonJS({
|
|
|
269
269
|
});
|
|
270
270
|
}
|
|
271
271
|
__name(isexe, "isexe");
|
|
272
|
-
function sync(
|
|
272
|
+
function sync(path15, options) {
|
|
273
273
|
try {
|
|
274
|
-
return core.sync(
|
|
274
|
+
return core.sync(path15, options || {});
|
|
275
275
|
} catch (er) {
|
|
276
276
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
277
277
|
return false;
|
|
@@ -288,7 +288,7 @@ var require_isexe = __commonJS({
|
|
|
288
288
|
var require_which = __commonJS({
|
|
289
289
|
"../../node_modules/cross-spawn/node_modules/which/which.js"(exports2, module2) {
|
|
290
290
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
291
|
-
var
|
|
291
|
+
var path15 = require("path");
|
|
292
292
|
var COLON2 = isWindows ? ";" : ":";
|
|
293
293
|
var isexe = require_isexe();
|
|
294
294
|
var getNotFoundError = /* @__PURE__ */ __name((cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), "getNotFoundError");
|
|
@@ -326,7 +326,7 @@ var require_which = __commonJS({
|
|
|
326
326
|
return opt.all && found.length ? resolve5(found) : reject(getNotFoundError(cmd));
|
|
327
327
|
const ppRaw = pathEnv[i6];
|
|
328
328
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
329
|
-
const pCmd =
|
|
329
|
+
const pCmd = path15.join(pathPart, cmd);
|
|
330
330
|
const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
331
331
|
resolve5(subStep(p3, i6, 0));
|
|
332
332
|
}), "step");
|
|
@@ -353,7 +353,7 @@ var require_which = __commonJS({
|
|
|
353
353
|
for (let i6 = 0; i6 < pathEnv.length; i6++) {
|
|
354
354
|
const ppRaw = pathEnv[i6];
|
|
355
355
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
356
|
-
const pCmd =
|
|
356
|
+
const pCmd = path15.join(pathPart, cmd);
|
|
357
357
|
const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
358
358
|
for (let j6 = 0; j6 < pathExt.length; j6++) {
|
|
359
359
|
const cur = p3 + pathExt[j6];
|
|
@@ -401,7 +401,7 @@ var require_path_key = __commonJS({
|
|
|
401
401
|
var require_resolveCommand = __commonJS({
|
|
402
402
|
"../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
403
403
|
"use strict";
|
|
404
|
-
var
|
|
404
|
+
var path15 = require("path");
|
|
405
405
|
var which = require_which();
|
|
406
406
|
var getPathKey = require_path_key();
|
|
407
407
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -419,7 +419,7 @@ var require_resolveCommand = __commonJS({
|
|
|
419
419
|
try {
|
|
420
420
|
resolved = which.sync(parsed.command, {
|
|
421
421
|
path: env2[getPathKey({ env: env2 })],
|
|
422
|
-
pathExt: withoutPathExt ?
|
|
422
|
+
pathExt: withoutPathExt ? path15.delimiter : void 0
|
|
423
423
|
});
|
|
424
424
|
} catch (e6) {
|
|
425
425
|
} finally {
|
|
@@ -428,7 +428,7 @@ var require_resolveCommand = __commonJS({
|
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
if (resolved) {
|
|
431
|
-
resolved =
|
|
431
|
+
resolved = path15.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
432
432
|
}
|
|
433
433
|
return resolved;
|
|
434
434
|
}
|
|
@@ -486,8 +486,8 @@ var require_shebang_command = __commonJS({
|
|
|
486
486
|
if (!match) {
|
|
487
487
|
return null;
|
|
488
488
|
}
|
|
489
|
-
const [
|
|
490
|
-
const binary =
|
|
489
|
+
const [path15, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
490
|
+
const binary = path15.split("/").pop();
|
|
491
491
|
if (binary === "env") {
|
|
492
492
|
return argument;
|
|
493
493
|
}
|
|
@@ -500,16 +500,16 @@ var require_shebang_command = __commonJS({
|
|
|
500
500
|
var require_readShebang = __commonJS({
|
|
501
501
|
"../../node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
502
502
|
"use strict";
|
|
503
|
-
var
|
|
503
|
+
var fs14 = require("fs");
|
|
504
504
|
var shebangCommand = require_shebang_command();
|
|
505
505
|
function readShebang(command6) {
|
|
506
506
|
const size = 150;
|
|
507
507
|
const buffer = Buffer.alloc(size);
|
|
508
508
|
let fd;
|
|
509
509
|
try {
|
|
510
|
-
fd =
|
|
511
|
-
|
|
512
|
-
|
|
510
|
+
fd = fs14.openSync(command6, "r");
|
|
511
|
+
fs14.readSync(fd, buffer, 0, size, 0);
|
|
512
|
+
fs14.closeSync(fd);
|
|
513
513
|
} catch (e6) {
|
|
514
514
|
}
|
|
515
515
|
return shebangCommand(buffer.toString());
|
|
@@ -523,7 +523,7 @@ var require_readShebang = __commonJS({
|
|
|
523
523
|
var require_parse = __commonJS({
|
|
524
524
|
"../../node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
525
525
|
"use strict";
|
|
526
|
-
var
|
|
526
|
+
var path15 = require("path");
|
|
527
527
|
var resolveCommand = require_resolveCommand();
|
|
528
528
|
var escape = require_escape();
|
|
529
529
|
var readShebang = require_readShebang();
|
|
@@ -549,7 +549,7 @@ var require_parse = __commonJS({
|
|
|
549
549
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
550
550
|
if (parsed.options.forceShell || needsShell) {
|
|
551
551
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
552
|
-
parsed.command =
|
|
552
|
+
parsed.command = path15.normalize(parsed.command);
|
|
553
553
|
parsed.command = escape.command(parsed.command);
|
|
554
554
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
555
555
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -1031,7 +1031,7 @@ var require_path = __commonJS({
|
|
|
1031
1031
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1032
1032
|
exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
|
|
1033
1033
|
var os5 = require("os");
|
|
1034
|
-
var
|
|
1034
|
+
var path15 = require("path");
|
|
1035
1035
|
var IS_WINDOWS_PLATFORM = os5.platform() === "win32";
|
|
1036
1036
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
1037
1037
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
@@ -1044,7 +1044,7 @@ var require_path = __commonJS({
|
|
|
1044
1044
|
__name(unixify, "unixify");
|
|
1045
1045
|
exports2.unixify = unixify;
|
|
1046
1046
|
function makeAbsolute(cwd, filepath) {
|
|
1047
|
-
return
|
|
1047
|
+
return path15.resolve(cwd, filepath);
|
|
1048
1048
|
}
|
|
1049
1049
|
__name(makeAbsolute, "makeAbsolute");
|
|
1050
1050
|
exports2.makeAbsolute = makeAbsolute;
|
|
@@ -2361,7 +2361,7 @@ var require_braces = __commonJS({
|
|
|
2361
2361
|
var require_constants2 = __commonJS({
|
|
2362
2362
|
"../../node_modules/micromatch/node_modules/picomatch/lib/constants.js"(exports2, module2) {
|
|
2363
2363
|
"use strict";
|
|
2364
|
-
var
|
|
2364
|
+
var path15 = require("path");
|
|
2365
2365
|
var WIN_SLASH = "\\\\/";
|
|
2366
2366
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
2367
2367
|
var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
@@ -2535,7 +2535,7 @@ var require_constants2 = __commonJS({
|
|
|
2535
2535
|
/* | */
|
|
2536
2536
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
2537
2537
|
/* \uFEFF */
|
|
2538
|
-
SEP:
|
|
2538
|
+
SEP: path15.sep,
|
|
2539
2539
|
/**
|
|
2540
2540
|
* Create EXTGLOB_CHARS
|
|
2541
2541
|
*/
|
|
@@ -2562,7 +2562,7 @@ var require_constants2 = __commonJS({
|
|
|
2562
2562
|
var require_utils2 = __commonJS({
|
|
2563
2563
|
"../../node_modules/micromatch/node_modules/picomatch/lib/utils.js"(exports2) {
|
|
2564
2564
|
"use strict";
|
|
2565
|
-
var
|
|
2565
|
+
var path15 = require("path");
|
|
2566
2566
|
var win32 = process.platform === "win32";
|
|
2567
2567
|
var {
|
|
2568
2568
|
REGEX_BACKSLASH,
|
|
@@ -2591,7 +2591,7 @@ var require_utils2 = __commonJS({
|
|
|
2591
2591
|
if (options && typeof options.windows === "boolean") {
|
|
2592
2592
|
return options.windows;
|
|
2593
2593
|
}
|
|
2594
|
-
return win32 === true ||
|
|
2594
|
+
return win32 === true || path15.sep === "\\";
|
|
2595
2595
|
};
|
|
2596
2596
|
exports2.escapeLast = (input, char, lastIdx) => {
|
|
2597
2597
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -3955,7 +3955,7 @@ var require_parse3 = __commonJS({
|
|
|
3955
3955
|
var require_picomatch = __commonJS({
|
|
3956
3956
|
"../../node_modules/micromatch/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
|
|
3957
3957
|
"use strict";
|
|
3958
|
-
var
|
|
3958
|
+
var path15 = require("path");
|
|
3959
3959
|
var scan = require_scan();
|
|
3960
3960
|
var parse3 = require_parse3();
|
|
3961
3961
|
var utils = require_utils2();
|
|
@@ -4040,7 +4040,7 @@ var require_picomatch = __commonJS({
|
|
|
4040
4040
|
};
|
|
4041
4041
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
4042
4042
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
4043
|
-
return regex.test(
|
|
4043
|
+
return regex.test(path15.basename(input));
|
|
4044
4044
|
};
|
|
4045
4045
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
4046
4046
|
picomatch.parse = (pattern, options) => {
|
|
@@ -4267,7 +4267,7 @@ var require_pattern = __commonJS({
|
|
|
4267
4267
|
"use strict";
|
|
4268
4268
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4269
4269
|
exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
|
|
4270
|
-
var
|
|
4270
|
+
var path15 = require("path");
|
|
4271
4271
|
var globParent = require_glob_parent();
|
|
4272
4272
|
var micromatch = require_micromatch();
|
|
4273
4273
|
var GLOBSTAR = "**";
|
|
@@ -4377,7 +4377,7 @@ var require_pattern = __commonJS({
|
|
|
4377
4377
|
__name(endsWithSlashGlobStar, "endsWithSlashGlobStar");
|
|
4378
4378
|
exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
4379
4379
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
4380
|
-
const basename =
|
|
4380
|
+
const basename = path15.basename(pattern);
|
|
4381
4381
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
4382
4382
|
}
|
|
4383
4383
|
__name(isAffectDepthOfReadingPattern, "isAffectDepthOfReadingPattern");
|
|
@@ -4444,7 +4444,7 @@ var require_pattern = __commonJS({
|
|
|
4444
4444
|
__name(partitionAbsoluteAndRelative, "partitionAbsoluteAndRelative");
|
|
4445
4445
|
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
4446
4446
|
function isAbsolute(pattern) {
|
|
4447
|
-
return
|
|
4447
|
+
return path15.isAbsolute(pattern);
|
|
4448
4448
|
}
|
|
4449
4449
|
__name(isAbsolute, "isAbsolute");
|
|
4450
4450
|
exports2.isAbsolute = isAbsolute;
|
|
@@ -4633,10 +4633,10 @@ var require_utils3 = __commonJS({
|
|
|
4633
4633
|
exports2.array = array;
|
|
4634
4634
|
var errno = require_errno();
|
|
4635
4635
|
exports2.errno = errno;
|
|
4636
|
-
var
|
|
4637
|
-
exports2.fs =
|
|
4638
|
-
var
|
|
4639
|
-
exports2.path =
|
|
4636
|
+
var fs14 = require_fs();
|
|
4637
|
+
exports2.fs = fs14;
|
|
4638
|
+
var path15 = require_path();
|
|
4639
|
+
exports2.path = path15;
|
|
4640
4640
|
var pattern = require_pattern();
|
|
4641
4641
|
exports2.pattern = pattern;
|
|
4642
4642
|
var stream = require_stream();
|
|
@@ -4756,8 +4756,8 @@ var require_async = __commonJS({
|
|
|
4756
4756
|
"use strict";
|
|
4757
4757
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4758
4758
|
exports2.read = void 0;
|
|
4759
|
-
function read(
|
|
4760
|
-
settings.fs.lstat(
|
|
4759
|
+
function read(path15, settings, callback) {
|
|
4760
|
+
settings.fs.lstat(path15, (lstatError, lstat) => {
|
|
4761
4761
|
if (lstatError !== null) {
|
|
4762
4762
|
callFailureCallback(callback, lstatError);
|
|
4763
4763
|
return;
|
|
@@ -4766,7 +4766,7 @@ var require_async = __commonJS({
|
|
|
4766
4766
|
callSuccessCallback(callback, lstat);
|
|
4767
4767
|
return;
|
|
4768
4768
|
}
|
|
4769
|
-
settings.fs.stat(
|
|
4769
|
+
settings.fs.stat(path15, (statError, stat) => {
|
|
4770
4770
|
if (statError !== null) {
|
|
4771
4771
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
4772
4772
|
callFailureCallback(callback, statError);
|
|
@@ -4801,13 +4801,13 @@ var require_sync = __commonJS({
|
|
|
4801
4801
|
"use strict";
|
|
4802
4802
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4803
4803
|
exports2.read = void 0;
|
|
4804
|
-
function read(
|
|
4805
|
-
const lstat = settings.fs.lstatSync(
|
|
4804
|
+
function read(path15, settings) {
|
|
4805
|
+
const lstat = settings.fs.lstatSync(path15);
|
|
4806
4806
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
4807
4807
|
return lstat;
|
|
4808
4808
|
}
|
|
4809
4809
|
try {
|
|
4810
|
-
const stat = settings.fs.statSync(
|
|
4810
|
+
const stat = settings.fs.statSync(path15);
|
|
4811
4811
|
if (settings.markSymbolicLink) {
|
|
4812
4812
|
stat.isSymbolicLink = () => true;
|
|
4813
4813
|
}
|
|
@@ -4830,12 +4830,12 @@ var require_fs2 = __commonJS({
|
|
|
4830
4830
|
"use strict";
|
|
4831
4831
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4832
4832
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
4833
|
-
var
|
|
4833
|
+
var fs14 = require("fs");
|
|
4834
4834
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
4835
|
-
lstat:
|
|
4836
|
-
stat:
|
|
4837
|
-
lstatSync:
|
|
4838
|
-
statSync:
|
|
4835
|
+
lstat: fs14.lstat,
|
|
4836
|
+
stat: fs14.stat,
|
|
4837
|
+
lstatSync: fs14.lstatSync,
|
|
4838
|
+
statSync: fs14.statSync
|
|
4839
4839
|
};
|
|
4840
4840
|
function createFileSystemAdapter(fsMethods) {
|
|
4841
4841
|
if (fsMethods === void 0) {
|
|
@@ -4853,7 +4853,7 @@ var require_settings = __commonJS({
|
|
|
4853
4853
|
"../../node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
|
|
4854
4854
|
"use strict";
|
|
4855
4855
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4856
|
-
var
|
|
4856
|
+
var fs14 = require_fs2();
|
|
4857
4857
|
var Settings = class {
|
|
4858
4858
|
static {
|
|
4859
4859
|
__name(this, "Settings");
|
|
@@ -4861,7 +4861,7 @@ var require_settings = __commonJS({
|
|
|
4861
4861
|
constructor(_options = {}) {
|
|
4862
4862
|
this._options = _options;
|
|
4863
4863
|
this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
|
|
4864
|
-
this.fs =
|
|
4864
|
+
this.fs = fs14.createFileSystemAdapter(this._options.fs);
|
|
4865
4865
|
this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
|
|
4866
4866
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
4867
4867
|
}
|
|
@@ -4883,18 +4883,18 @@ var require_out = __commonJS({
|
|
|
4883
4883
|
var sync = require_sync();
|
|
4884
4884
|
var settings_1 = require_settings();
|
|
4885
4885
|
exports2.Settings = settings_1.default;
|
|
4886
|
-
function stat(
|
|
4886
|
+
function stat(path15, optionsOrSettingsOrCallback, callback) {
|
|
4887
4887
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
4888
|
-
async.read(
|
|
4888
|
+
async.read(path15, getSettings(), optionsOrSettingsOrCallback);
|
|
4889
4889
|
return;
|
|
4890
4890
|
}
|
|
4891
|
-
async.read(
|
|
4891
|
+
async.read(path15, getSettings(optionsOrSettingsOrCallback), callback);
|
|
4892
4892
|
}
|
|
4893
4893
|
__name(stat, "stat");
|
|
4894
4894
|
exports2.stat = stat;
|
|
4895
|
-
function statSync3(
|
|
4895
|
+
function statSync3(path15, optionsOrSettings) {
|
|
4896
4896
|
const settings = getSettings(optionsOrSettings);
|
|
4897
|
-
return sync.read(
|
|
4897
|
+
return sync.read(path15, settings);
|
|
4898
4898
|
}
|
|
4899
4899
|
__name(statSync3, "statSync");
|
|
4900
4900
|
exports2.statSync = statSync3;
|
|
@@ -5027,8 +5027,8 @@ var require_utils4 = __commonJS({
|
|
|
5027
5027
|
"use strict";
|
|
5028
5028
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5029
5029
|
exports2.fs = void 0;
|
|
5030
|
-
var
|
|
5031
|
-
exports2.fs =
|
|
5030
|
+
var fs14 = require_fs3();
|
|
5031
|
+
exports2.fs = fs14;
|
|
5032
5032
|
}
|
|
5033
5033
|
});
|
|
5034
5034
|
|
|
@@ -5124,16 +5124,16 @@ var require_async2 = __commonJS({
|
|
|
5124
5124
|
return;
|
|
5125
5125
|
}
|
|
5126
5126
|
const tasks = names.map((name) => {
|
|
5127
|
-
const
|
|
5127
|
+
const path15 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
5128
5128
|
return (done) => {
|
|
5129
|
-
fsStat.stat(
|
|
5129
|
+
fsStat.stat(path15, settings.fsStatSettings, (error2, stats) => {
|
|
5130
5130
|
if (error2 !== null) {
|
|
5131
5131
|
done(error2);
|
|
5132
5132
|
return;
|
|
5133
5133
|
}
|
|
5134
5134
|
const entry = {
|
|
5135
5135
|
name,
|
|
5136
|
-
path:
|
|
5136
|
+
path: path15,
|
|
5137
5137
|
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
5138
5138
|
};
|
|
5139
5139
|
if (settings.stats) {
|
|
@@ -5233,14 +5233,14 @@ var require_fs4 = __commonJS({
|
|
|
5233
5233
|
"use strict";
|
|
5234
5234
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5235
5235
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
5236
|
-
var
|
|
5236
|
+
var fs14 = require("fs");
|
|
5237
5237
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
5238
|
-
lstat:
|
|
5239
|
-
stat:
|
|
5240
|
-
lstatSync:
|
|
5241
|
-
statSync:
|
|
5242
|
-
readdir:
|
|
5243
|
-
readdirSync:
|
|
5238
|
+
lstat: fs14.lstat,
|
|
5239
|
+
stat: fs14.stat,
|
|
5240
|
+
lstatSync: fs14.lstatSync,
|
|
5241
|
+
statSync: fs14.statSync,
|
|
5242
|
+
readdir: fs14.readdir,
|
|
5243
|
+
readdirSync: fs14.readdirSync
|
|
5244
5244
|
};
|
|
5245
5245
|
function createFileSystemAdapter(fsMethods) {
|
|
5246
5246
|
if (fsMethods === void 0) {
|
|
@@ -5258,9 +5258,9 @@ var require_settings2 = __commonJS({
|
|
|
5258
5258
|
"../../node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
|
|
5259
5259
|
"use strict";
|
|
5260
5260
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5261
|
-
var
|
|
5261
|
+
var path15 = require("path");
|
|
5262
5262
|
var fsStat = require_out();
|
|
5263
|
-
var
|
|
5263
|
+
var fs14 = require_fs4();
|
|
5264
5264
|
var Settings = class {
|
|
5265
5265
|
static {
|
|
5266
5266
|
__name(this, "Settings");
|
|
@@ -5268,8 +5268,8 @@ var require_settings2 = __commonJS({
|
|
|
5268
5268
|
constructor(_options = {}) {
|
|
5269
5269
|
this._options = _options;
|
|
5270
5270
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
5271
|
-
this.fs =
|
|
5272
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
5271
|
+
this.fs = fs14.createFileSystemAdapter(this._options.fs);
|
|
5272
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep);
|
|
5273
5273
|
this.stats = this._getValue(this._options.stats, false);
|
|
5274
5274
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
5275
5275
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -5296,18 +5296,18 @@ var require_out2 = __commonJS({
|
|
|
5296
5296
|
var sync = require_sync2();
|
|
5297
5297
|
var settings_1 = require_settings2();
|
|
5298
5298
|
exports2.Settings = settings_1.default;
|
|
5299
|
-
function scandir(
|
|
5299
|
+
function scandir(path15, optionsOrSettingsOrCallback, callback) {
|
|
5300
5300
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
5301
|
-
async.read(
|
|
5301
|
+
async.read(path15, getSettings(), optionsOrSettingsOrCallback);
|
|
5302
5302
|
return;
|
|
5303
5303
|
}
|
|
5304
|
-
async.read(
|
|
5304
|
+
async.read(path15, getSettings(optionsOrSettingsOrCallback), callback);
|
|
5305
5305
|
}
|
|
5306
5306
|
__name(scandir, "scandir");
|
|
5307
5307
|
exports2.scandir = scandir;
|
|
5308
|
-
function scandirSync(
|
|
5308
|
+
function scandirSync(path15, optionsOrSettings) {
|
|
5309
5309
|
const settings = getSettings(optionsOrSettings);
|
|
5310
|
-
return sync.read(
|
|
5310
|
+
return sync.read(path15, settings);
|
|
5311
5311
|
}
|
|
5312
5312
|
__name(scandirSync, "scandirSync");
|
|
5313
5313
|
exports2.scandirSync = scandirSync;
|
|
@@ -6004,7 +6004,7 @@ var require_settings3 = __commonJS({
|
|
|
6004
6004
|
"../../node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
|
|
6005
6005
|
"use strict";
|
|
6006
6006
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6007
|
-
var
|
|
6007
|
+
var path15 = require("path");
|
|
6008
6008
|
var fsScandir = require_out2();
|
|
6009
6009
|
var Settings = class {
|
|
6010
6010
|
static {
|
|
@@ -6017,7 +6017,7 @@ var require_settings3 = __commonJS({
|
|
|
6017
6017
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
6018
6018
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
6019
6019
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
6020
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
6020
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep);
|
|
6021
6021
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
6022
6022
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
6023
6023
|
fs: this._options.fs,
|
|
@@ -6083,7 +6083,7 @@ var require_reader2 = __commonJS({
|
|
|
6083
6083
|
"../../node_modules/fast-glob/out/readers/reader.js"(exports2) {
|
|
6084
6084
|
"use strict";
|
|
6085
6085
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6086
|
-
var
|
|
6086
|
+
var path15 = require("path");
|
|
6087
6087
|
var fsStat = require_out();
|
|
6088
6088
|
var utils = require_utils3();
|
|
6089
6089
|
var Reader = class {
|
|
@@ -6099,7 +6099,7 @@ var require_reader2 = __commonJS({
|
|
|
6099
6099
|
});
|
|
6100
6100
|
}
|
|
6101
6101
|
_getFullEntryPath(filepath) {
|
|
6102
|
-
return
|
|
6102
|
+
return path15.resolve(this._settings.cwd, filepath);
|
|
6103
6103
|
}
|
|
6104
6104
|
_makeEntry(stats, pattern) {
|
|
6105
6105
|
const entry = {
|
|
@@ -6539,7 +6539,7 @@ var require_provider = __commonJS({
|
|
|
6539
6539
|
"../../node_modules/fast-glob/out/providers/provider.js"(exports2) {
|
|
6540
6540
|
"use strict";
|
|
6541
6541
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6542
|
-
var
|
|
6542
|
+
var path15 = require("path");
|
|
6543
6543
|
var deep_1 = require_deep();
|
|
6544
6544
|
var entry_1 = require_entry();
|
|
6545
6545
|
var error_1 = require_error();
|
|
@@ -6556,7 +6556,7 @@ var require_provider = __commonJS({
|
|
|
6556
6556
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
6557
6557
|
}
|
|
6558
6558
|
_getRootDirectory(task) {
|
|
6559
|
-
return
|
|
6559
|
+
return path15.resolve(this._settings.cwd, task.base);
|
|
6560
6560
|
}
|
|
6561
6561
|
_getReaderOptions(task) {
|
|
6562
6562
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -6749,16 +6749,16 @@ var require_settings4 = __commonJS({
|
|
|
6749
6749
|
"use strict";
|
|
6750
6750
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6751
6751
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
6752
|
-
var
|
|
6752
|
+
var fs14 = require("fs");
|
|
6753
6753
|
var os5 = require("os");
|
|
6754
6754
|
var CPU_COUNT = Math.max(os5.cpus().length, 1);
|
|
6755
6755
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
6756
|
-
lstat:
|
|
6757
|
-
lstatSync:
|
|
6758
|
-
stat:
|
|
6759
|
-
statSync:
|
|
6760
|
-
readdir:
|
|
6761
|
-
readdirSync:
|
|
6756
|
+
lstat: fs14.lstat,
|
|
6757
|
+
lstatSync: fs14.lstatSync,
|
|
6758
|
+
stat: fs14.stat,
|
|
6759
|
+
statSync: fs14.statSync,
|
|
6760
|
+
readdir: fs14.readdir,
|
|
6761
|
+
readdirSync: fs14.readdirSync
|
|
6762
6762
|
};
|
|
6763
6763
|
var Settings = class {
|
|
6764
6764
|
static {
|
|
@@ -7236,7 +7236,7 @@ var require_dist = __commonJS({
|
|
|
7236
7236
|
// ../../node_modules/yazl/index.js
|
|
7237
7237
|
var require_yazl = __commonJS({
|
|
7238
7238
|
"../../node_modules/yazl/index.js"(exports2) {
|
|
7239
|
-
var
|
|
7239
|
+
var fs14 = require("fs");
|
|
7240
7240
|
var Transform = require("stream").Transform;
|
|
7241
7241
|
var PassThrough2 = require("stream").PassThrough;
|
|
7242
7242
|
var zlib2 = require("zlib");
|
|
@@ -7267,14 +7267,14 @@ var require_yazl = __commonJS({
|
|
|
7267
7267
|
if (shouldIgnoreAdding(self2)) return;
|
|
7268
7268
|
var entry = new Entry(metadataPath, false, options);
|
|
7269
7269
|
self2.entries.push(entry);
|
|
7270
|
-
|
|
7270
|
+
fs14.stat(realPath, function(err, stats) {
|
|
7271
7271
|
if (err) return self2.emit("error", err);
|
|
7272
7272
|
if (!stats.isFile()) return self2.emit("error", new Error("not a file: " + realPath));
|
|
7273
7273
|
entry.uncompressedSize = stats.size;
|
|
7274
7274
|
if (options.mtime == null) entry.setLastModDate(stats.mtime);
|
|
7275
7275
|
if (options.mode == null) entry.setFileAttributesMode(stats.mode);
|
|
7276
7276
|
entry.setFileDataPumpFunction(function() {
|
|
7277
|
-
var readStream =
|
|
7277
|
+
var readStream = fs14.createReadStream(realPath);
|
|
7278
7278
|
entry.state = Entry.FILE_DATA_IN_PROGRESS;
|
|
7279
7279
|
readStream.on("error", function(err2) {
|
|
7280
7280
|
self2.emit("error", err2);
|
|
@@ -7944,7 +7944,7 @@ var require_zip = __commonJS({
|
|
|
7944
7944
|
exports2.zipDirectory = zipDirectory2;
|
|
7945
7945
|
exports2.zipString = zipString;
|
|
7946
7946
|
var fs_1 = require("fs");
|
|
7947
|
-
var
|
|
7947
|
+
var path15 = __importStar2(require("path"));
|
|
7948
7948
|
var fast_glob_1 = require_out4();
|
|
7949
7949
|
var yazl_1 = require_yazl();
|
|
7950
7950
|
function epoch() {
|
|
@@ -7992,7 +7992,7 @@ var require_zip = __commonJS({
|
|
|
7992
7992
|
output.once("close", ok);
|
|
7993
7993
|
zip.outputStream.pipe(output);
|
|
7994
7994
|
for (const file of files) {
|
|
7995
|
-
const fullPath =
|
|
7995
|
+
const fullPath = path15.resolve(directory, file);
|
|
7996
7996
|
const [data, stat] = await Promise.all([fs_1.promises.readFile(fullPath), fs_1.promises.stat(fullPath)]);
|
|
7997
7997
|
zip.addBuffer(data, file, {
|
|
7998
7998
|
mtime: epoch(),
|
|
@@ -8111,6 +8111,9 @@ async function shell(command6, options) {
|
|
|
8111
8111
|
function handleShellOutput(chunk, options, shellEventType) {
|
|
8112
8112
|
switch (options.subprocessOutputDestination) {
|
|
8113
8113
|
case "ignore":
|
|
8114
|
+
if (shellEventType === "open") {
|
|
8115
|
+
options.shellEventPublisher(shellEventType, chunk);
|
|
8116
|
+
}
|
|
8114
8117
|
return;
|
|
8115
8118
|
case "publish":
|
|
8116
8119
|
options.shellEventPublisher(shellEventType, chunk);
|
|
@@ -8716,14 +8719,14 @@ var init_assets = __esm({
|
|
|
8716
8719
|
var require_helpers = __commonJS({
|
|
8717
8720
|
"../@aws-cdk/cloud-assembly-schema/node_modules/jsonschema/lib/helpers.js"(exports2, module2) {
|
|
8718
8721
|
"use strict";
|
|
8719
|
-
var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message, instance, schema,
|
|
8720
|
-
if (Array.isArray(
|
|
8721
|
-
this.path =
|
|
8722
|
-
this.property =
|
|
8722
|
+
var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message, instance, schema, path15, name, argument) {
|
|
8723
|
+
if (Array.isArray(path15)) {
|
|
8724
|
+
this.path = path15;
|
|
8725
|
+
this.property = path15.reduce(function(sum, item) {
|
|
8723
8726
|
return sum + makeSuffix(item);
|
|
8724
8727
|
}, "instance");
|
|
8725
|
-
} else if (
|
|
8726
|
-
this.property =
|
|
8728
|
+
} else if (path15 !== void 0) {
|
|
8729
|
+
this.property = path15;
|
|
8727
8730
|
}
|
|
8728
8731
|
if (message) {
|
|
8729
8732
|
this.message = message;
|
|
@@ -8818,16 +8821,16 @@ var require_helpers = __commonJS({
|
|
|
8818
8821
|
name: { value: "SchemaError", enumerable: false }
|
|
8819
8822
|
}
|
|
8820
8823
|
);
|
|
8821
|
-
var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options,
|
|
8824
|
+
var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options, path15, base, schemas) {
|
|
8822
8825
|
this.schema = schema;
|
|
8823
8826
|
this.options = options;
|
|
8824
|
-
if (Array.isArray(
|
|
8825
|
-
this.path =
|
|
8826
|
-
this.propertyPath =
|
|
8827
|
+
if (Array.isArray(path15)) {
|
|
8828
|
+
this.path = path15;
|
|
8829
|
+
this.propertyPath = path15.reduce(function(sum, item) {
|
|
8827
8830
|
return sum + makeSuffix(item);
|
|
8828
8831
|
}, "instance");
|
|
8829
8832
|
} else {
|
|
8830
|
-
this.propertyPath =
|
|
8833
|
+
this.propertyPath = path15;
|
|
8831
8834
|
}
|
|
8832
8835
|
this.base = base;
|
|
8833
8836
|
this.schemas = schemas;
|
|
@@ -8836,10 +8839,10 @@ var require_helpers = __commonJS({
|
|
|
8836
8839
|
return (() => resolveUrl(this.base, target))();
|
|
8837
8840
|
}, "resolve");
|
|
8838
8841
|
SchemaContext.prototype.makeChild = /* @__PURE__ */ __name(function makeChild(schema, propertyName) {
|
|
8839
|
-
var
|
|
8842
|
+
var path15 = propertyName === void 0 ? this.path : this.path.concat([propertyName]);
|
|
8840
8843
|
var id = schema.$id || schema.id;
|
|
8841
8844
|
let base = (() => resolveUrl(this.base, id || ""))();
|
|
8842
|
-
var ctx = new SchemaContext(schema, this.options,
|
|
8845
|
+
var ctx = new SchemaContext(schema, this.options, path15, base, Object.create(this.schemas));
|
|
8843
8846
|
if (id && !ctx.schemas[base]) {
|
|
8844
8847
|
ctx.schemas[base] = schema;
|
|
8845
8848
|
}
|
|
@@ -9956,8 +9959,8 @@ var require_validator = __commonJS({
|
|
|
9956
9959
|
if (ctx.schemas[switchSchema]) {
|
|
9957
9960
|
return { subschema: ctx.schemas[switchSchema], switchSchema };
|
|
9958
9961
|
}
|
|
9959
|
-
let
|
|
9960
|
-
let fragment =
|
|
9962
|
+
let hashIndex = switchSchema.indexOf("#");
|
|
9963
|
+
let fragment = hashIndex === -1 || hashIndex === switchSchema.length - 1 ? "" : switchSchema.substr(hashIndex);
|
|
9961
9964
|
var document = fragment && fragment.length && switchSchema.substr(0, switchSchema.length - fragment.length);
|
|
9962
9965
|
if (!document || !ctx.schemas[document]) {
|
|
9963
9966
|
throw new SchemaError("no such schema <" + switchSchema + ">", schema);
|
|
@@ -12042,7 +12045,7 @@ var require_semver2 = __commonJS({
|
|
|
12042
12045
|
// ../@aws-cdk/cloud-assembly-schema/cli-version.json
|
|
12043
12046
|
var require_cli_version = __commonJS({
|
|
12044
12047
|
"../@aws-cdk/cloud-assembly-schema/cli-version.json"(exports2, module2) {
|
|
12045
|
-
module2.exports = { version: "2.
|
|
12048
|
+
module2.exports = { version: "2.1145.0" };
|
|
12046
12049
|
}
|
|
12047
12050
|
});
|
|
12048
12051
|
|
|
@@ -13757,6 +13760,7 @@ var require_integ_schema = __commonJS({
|
|
|
13757
13760
|
enum: [
|
|
13758
13761
|
"any-change",
|
|
13759
13762
|
"broadening",
|
|
13763
|
+
"destructive",
|
|
13760
13764
|
"never"
|
|
13761
13765
|
],
|
|
13762
13766
|
type: "string"
|
|
@@ -14317,9 +14321,9 @@ var require_validation_report_schema = __commonJS({
|
|
|
14317
14321
|
var require_version = __commonJS({
|
|
14318
14322
|
"../@aws-cdk/cloud-assembly-schema/schema/version.json"(exports2, module2) {
|
|
14319
14323
|
module2.exports = {
|
|
14320
|
-
schemaHash: "
|
|
14324
|
+
schemaHash: "b006b5c8829cee1f2287b98829ca0ed8abfbdbb2948fecc185e56398afb11a7b",
|
|
14321
14325
|
$comment: "Do not hold back the version on additions: jsonschema validation of the manifest by the consumer will trigger errors on unexpected fields.",
|
|
14322
|
-
revision:
|
|
14326
|
+
revision: 55
|
|
14323
14327
|
};
|
|
14324
14328
|
}
|
|
14325
14329
|
});
|
|
@@ -14591,6 +14595,7 @@ var init_common = __esm({
|
|
|
14591
14595
|
RequireApproval2["NEVER"] = "never";
|
|
14592
14596
|
RequireApproval2["ANYCHANGE"] = "any-change";
|
|
14593
14597
|
RequireApproval2["BROADENING"] = "broadening";
|
|
14598
|
+
RequireApproval2["DESTRUCTIVE"] = "destructive";
|
|
14594
14599
|
return RequireApproval2;
|
|
14595
14600
|
})(RequireApproval || {});
|
|
14596
14601
|
}
|
|
@@ -16675,6 +16680,592 @@ var init_template_ranges = __esm({
|
|
|
16675
16680
|
}
|
|
16676
16681
|
});
|
|
16677
16682
|
|
|
16683
|
+
// ../@aws-cdk/cloud-assembly-api/lib/stack-trace.ts
|
|
16684
|
+
var stack_trace_exports = {};
|
|
16685
|
+
__export(stack_trace_exports, {
|
|
16686
|
+
DEFAULT_USER_CODE_FINDER: () => DEFAULT_USER_CODE_FINDER,
|
|
16687
|
+
StackFrame: () => StackFrame,
|
|
16688
|
+
StackTrace: () => StackTrace
|
|
16689
|
+
});
|
|
16690
|
+
var DEFAULT_USER_CODE_FINDER, StackTrace, StackFrame;
|
|
16691
|
+
var init_stack_trace = __esm({
|
|
16692
|
+
"../@aws-cdk/cloud-assembly-api/lib/stack-trace.ts"() {
|
|
16693
|
+
"use strict";
|
|
16694
|
+
DEFAULT_USER_CODE_FINDER = {
|
|
16695
|
+
isInterestingFrame(frame) {
|
|
16696
|
+
return frame.includes(" (") && frame.endsWith(")");
|
|
16697
|
+
}
|
|
16698
|
+
};
|
|
16699
|
+
StackTrace = class _StackTrace {
|
|
16700
|
+
constructor(frames) {
|
|
16701
|
+
this.frames = frames;
|
|
16702
|
+
}
|
|
16703
|
+
frames;
|
|
16704
|
+
static {
|
|
16705
|
+
__name(this, "StackTrace");
|
|
16706
|
+
}
|
|
16707
|
+
static fromNewlineSeparatedString(stackTrace) {
|
|
16708
|
+
return new _StackTrace(stackTrace.split("\n"));
|
|
16709
|
+
}
|
|
16710
|
+
/**
|
|
16711
|
+
* Return the first user frame from a "Just My Code" call stack
|
|
16712
|
+
*
|
|
16713
|
+
* With all the NON-"my code" call frames redacted, the top level frame should
|
|
16714
|
+
* be the last user frame that is associated with the given call stack.
|
|
16715
|
+
*/
|
|
16716
|
+
findAndParse(finder) {
|
|
16717
|
+
for (const frame of this.frames) {
|
|
16718
|
+
if (finder.isInterestingFrame(frame)) {
|
|
16719
|
+
return StackFrame.parse(frame);
|
|
16720
|
+
}
|
|
16721
|
+
}
|
|
16722
|
+
return void 0;
|
|
16723
|
+
}
|
|
16724
|
+
};
|
|
16725
|
+
StackFrame = class {
|
|
16726
|
+
constructor(functionName, fileName, sourceLocation) {
|
|
16727
|
+
this.functionName = functionName;
|
|
16728
|
+
this.fileName = fileName;
|
|
16729
|
+
this.sourceLocation = sourceLocation;
|
|
16730
|
+
}
|
|
16731
|
+
functionName;
|
|
16732
|
+
fileName;
|
|
16733
|
+
sourceLocation;
|
|
16734
|
+
static {
|
|
16735
|
+
__name(this, "StackFrame");
|
|
16736
|
+
}
|
|
16737
|
+
/**
|
|
16738
|
+
* Parse a single line of a stack frame into a structured object
|
|
16739
|
+
*
|
|
16740
|
+
* This is mostly a NodeJS-flavored string we parse here, except that in
|
|
16741
|
+
* a NodeJS stack trace the line would start with ` at `.
|
|
16742
|
+
*
|
|
16743
|
+
* Parses all of these:
|
|
16744
|
+
*
|
|
16745
|
+
* ```
|
|
16746
|
+
* <function> (<file>:<line>:<col>)
|
|
16747
|
+
* <class>.<function> (<file>:<line>:<col>)
|
|
16748
|
+
* Object.<anonymous> (<file>:<line>:<col>)
|
|
16749
|
+
* <function> [as somethingElse] (<file>:<line>:<col>)
|
|
16750
|
+
* new <constructor> (<file>:<line>:<col>)
|
|
16751
|
+
* <file>:<line>:<col>
|
|
16752
|
+
* ```
|
|
16753
|
+
*
|
|
16754
|
+
* See https://v8.dev/docs/stack-trace-api#appendix%3A-stack-trace-format
|
|
16755
|
+
*/
|
|
16756
|
+
static parse(frame) {
|
|
16757
|
+
let fileName;
|
|
16758
|
+
let functionName;
|
|
16759
|
+
let sourceLocation;
|
|
16760
|
+
const paren = frame.indexOf("(");
|
|
16761
|
+
if (paren) {
|
|
16762
|
+
functionName = frame.slice(0, paren - 1);
|
|
16763
|
+
frame = frame.slice(paren + 1, -1);
|
|
16764
|
+
} else {
|
|
16765
|
+
functionName = "<entry>";
|
|
16766
|
+
}
|
|
16767
|
+
if (functionName === "Object.<anonymous>") {
|
|
16768
|
+
functionName = "<anonymous>";
|
|
16769
|
+
}
|
|
16770
|
+
let asI = functionName.indexOf(" [as ");
|
|
16771
|
+
if (asI > -1) {
|
|
16772
|
+
const endOfAlias = functionName.indexOf("]", asI);
|
|
16773
|
+
const lastPeriod = functionName.lastIndexOf(".", asI);
|
|
16774
|
+
functionName = functionName.slice(0, lastPeriod + 1) + functionName.slice(asI + 5, endOfAlias);
|
|
16775
|
+
}
|
|
16776
|
+
const m4 = frame.match(/(:[0-9]+){0,2}$/);
|
|
16777
|
+
fileName = m4 ? frame.slice(0, -m4[0].length) : frame;
|
|
16778
|
+
sourceLocation = m4 ? m4[0].slice(1) : "";
|
|
16779
|
+
return {
|
|
16780
|
+
fileName,
|
|
16781
|
+
functionName,
|
|
16782
|
+
sourceLocation
|
|
16783
|
+
};
|
|
16784
|
+
}
|
|
16785
|
+
};
|
|
16786
|
+
}
|
|
16787
|
+
});
|
|
16788
|
+
|
|
16789
|
+
// ../@aws-cdk/cloud-assembly-api/lib/private/color.ts
|
|
16790
|
+
var Col, Colorize;
|
|
16791
|
+
var init_color = __esm({
|
|
16792
|
+
"../@aws-cdk/cloud-assembly-api/lib/private/color.ts"() {
|
|
16793
|
+
"use strict";
|
|
16794
|
+
Col = class {
|
|
16795
|
+
static {
|
|
16796
|
+
__name(this, "Col");
|
|
16797
|
+
}
|
|
16798
|
+
static RED = "31";
|
|
16799
|
+
static ORANGE = "38;5;208";
|
|
16800
|
+
static YELLOW = "33";
|
|
16801
|
+
static BLUE = "34";
|
|
16802
|
+
static BOLD = "1";
|
|
16803
|
+
static UNDERLINE = "4";
|
|
16804
|
+
static GREY = "90";
|
|
16805
|
+
};
|
|
16806
|
+
Colorize = class _Colorize {
|
|
16807
|
+
static {
|
|
16808
|
+
__name(this, "Colorize");
|
|
16809
|
+
}
|
|
16810
|
+
static red(str) {
|
|
16811
|
+
return _Colorize.colorize(Col.RED, str);
|
|
16812
|
+
}
|
|
16813
|
+
static orange(str) {
|
|
16814
|
+
return _Colorize.colorize(Col.ORANGE, str);
|
|
16815
|
+
}
|
|
16816
|
+
static yellow(str) {
|
|
16817
|
+
return _Colorize.colorize(Col.YELLOW, str);
|
|
16818
|
+
}
|
|
16819
|
+
static blue(str) {
|
|
16820
|
+
return _Colorize.colorize(Col.BLUE, str);
|
|
16821
|
+
}
|
|
16822
|
+
static grey(str) {
|
|
16823
|
+
return _Colorize.colorize(Col.GREY, str);
|
|
16824
|
+
}
|
|
16825
|
+
static bold(str) {
|
|
16826
|
+
return _Colorize.colorize(Col.BOLD, str);
|
|
16827
|
+
}
|
|
16828
|
+
static underline(str) {
|
|
16829
|
+
return _Colorize.colorize(Col.UNDERLINE, str);
|
|
16830
|
+
}
|
|
16831
|
+
static colorize(col, str) {
|
|
16832
|
+
if (process.env.FORCE_COLOR === "0" || process.env.NO_COLOR || !process.stdout.isTTY || !process.stderr.isTTY) {
|
|
16833
|
+
return str;
|
|
16834
|
+
}
|
|
16835
|
+
return `\x1B[${col}m${str}\x1B[0m`;
|
|
16836
|
+
}
|
|
16837
|
+
};
|
|
16838
|
+
}
|
|
16839
|
+
});
|
|
16840
|
+
|
|
16841
|
+
// ../@aws-cdk/cloud-assembly-api/lib/validation/parsing.ts
|
|
16842
|
+
var parsing_exports = {};
|
|
16843
|
+
__export(parsing_exports, {
|
|
16844
|
+
ANNOTATION_PLUGIN_NAME: () => ANNOTATION_PLUGIN_NAME,
|
|
16845
|
+
ANNOTATION_PLUGIN_NAMESPACE: () => ANNOTATION_PLUGIN_NAMESPACE,
|
|
16846
|
+
isSuppressibleViolation: () => isSuppressibleViolation,
|
|
16847
|
+
namespaceFromPluginName: () => namespaceFromPluginName,
|
|
16848
|
+
normalizeValidationId: () => normalizeValidationId,
|
|
16849
|
+
normalizeValidationIdForAnnotations: () => normalizeValidationIdForAnnotations,
|
|
16850
|
+
parseValidationId: () => parseValidationId,
|
|
16851
|
+
pluginNameFromNamespace: () => pluginNameFromNamespace
|
|
16852
|
+
});
|
|
16853
|
+
function isSuppressibleViolation(violation) {
|
|
16854
|
+
const isFatal = violation.severity?.toLowerCase() === "fatal";
|
|
16855
|
+
const isErrorAnnotation = violation.ruleMetadata?.["cdk:annotation"] && violation.severity?.toLowerCase() === "error";
|
|
16856
|
+
return !isFatal && !isErrorAnnotation;
|
|
16857
|
+
}
|
|
16858
|
+
function parseValidationId(id) {
|
|
16859
|
+
let nsSeparator = void 0;
|
|
16860
|
+
const braceStack = [];
|
|
16861
|
+
for (let i6 = 0; i6 < id.length; i6++) {
|
|
16862
|
+
const c6 = id[i6];
|
|
16863
|
+
if (c6 === ":" && id[i6 + 1] === ":" && braceStack.length === 0) {
|
|
16864
|
+
if (nsSeparator !== void 0) {
|
|
16865
|
+
throw new Error(`Invalid validation rule ID '${id}'. The '::' delimiter is reserved for separating the prefix from the rule name (e.g. 'prefix::RuleName').`);
|
|
16866
|
+
}
|
|
16867
|
+
nsSeparator = i6;
|
|
16868
|
+
i6 += 1;
|
|
16869
|
+
} else if (["]", ")", "}"].includes(c6)) {
|
|
16870
|
+
const lastBrace = braceStack.pop();
|
|
16871
|
+
if (lastBrace === void 0) {
|
|
16872
|
+
throw new Error(`Invalid validation rule ID '${id}'. Unmatched closing brace '${c6}' at position ${i6}.`);
|
|
16873
|
+
}
|
|
16874
|
+
if (lastBrace === "(" && c6 !== ")" || lastBrace === "[" && c6 !== "]" || lastBrace === "{" && c6 !== "}") {
|
|
16875
|
+
throw new Error(`Invalid validation rule ID '${id}'. Mismatched closing brace '${c6}' at position ${i6}. Expected '${lastBrace === "(" ? ")" : lastBrace === "[" ? "]" : "}"}'.`);
|
|
16876
|
+
}
|
|
16877
|
+
} else if (["[", "(", "{"].includes(c6)) {
|
|
16878
|
+
braceStack.push(c6);
|
|
16879
|
+
}
|
|
16880
|
+
}
|
|
16881
|
+
if (nsSeparator === void 0) {
|
|
16882
|
+
return { ruleId: id };
|
|
16883
|
+
}
|
|
16884
|
+
if (nsSeparator === 0) {
|
|
16885
|
+
throw new Error(`Invalid validation rule ID '${id}'. Missing plugin name before '::'.`);
|
|
16886
|
+
}
|
|
16887
|
+
const namespace = namespaceFromString(id.substring(0, nsSeparator));
|
|
16888
|
+
const ruleId = id.substring(nsSeparator + 2);
|
|
16889
|
+
return { namespace, ruleId };
|
|
16890
|
+
}
|
|
16891
|
+
function normalizeValidationId(id, defaultNamespace) {
|
|
16892
|
+
const p3 = typeof id === "string" ? parseValidationId(id) : id;
|
|
16893
|
+
const parsed = {
|
|
16894
|
+
namespace: p3.namespace ? namespaceFromString(p3.namespace[NS].replaceAll(/ /g, "-")) : void 0,
|
|
16895
|
+
ruleId: p3.ruleId.replaceAll(/ /g, "-")
|
|
16896
|
+
};
|
|
16897
|
+
if (parsed.namespace && ["annotation", "Construct-Annotations"].includes(parsed.namespace[NS])) {
|
|
16898
|
+
return `${ANNOTATION_PLUGIN_NAMESPACE}::${parsed.ruleId}`;
|
|
16899
|
+
}
|
|
16900
|
+
return `${parsed.namespace ?? defaultNamespace[NS]}::${parsed.ruleId}`;
|
|
16901
|
+
}
|
|
16902
|
+
function normalizeValidationIdForAnnotations(id) {
|
|
16903
|
+
return normalizeValidationId(id, ANNOTATION_PLUGIN_NAMESPACE);
|
|
16904
|
+
}
|
|
16905
|
+
function namespaceFromPluginName(pluginName) {
|
|
16906
|
+
if (pluginName === ANNOTATION_PLUGIN_NAME) {
|
|
16907
|
+
return ANNOTATION_PLUGIN_NAMESPACE;
|
|
16908
|
+
}
|
|
16909
|
+
return namespaceFromString(pluginName.replace(/ /g, "-"));
|
|
16910
|
+
}
|
|
16911
|
+
function namespaceFromString(namespace) {
|
|
16912
|
+
return Object.assign({
|
|
16913
|
+
[NS]: namespace.replace(/ /g, "-")
|
|
16914
|
+
}, {
|
|
16915
|
+
toString() {
|
|
16916
|
+
return this[NS];
|
|
16917
|
+
}
|
|
16918
|
+
});
|
|
16919
|
+
}
|
|
16920
|
+
function pluginNameFromNamespace(namespace) {
|
|
16921
|
+
return namespace[NS].replace(/-/g, " ");
|
|
16922
|
+
}
|
|
16923
|
+
var NS, ANNOTATION_PLUGIN_NAME, ANNOTATION_PLUGIN_NAMESPACE;
|
|
16924
|
+
var init_parsing = __esm({
|
|
16925
|
+
"../@aws-cdk/cloud-assembly-api/lib/validation/parsing.ts"() {
|
|
16926
|
+
"use strict";
|
|
16927
|
+
__name(isSuppressibleViolation, "isSuppressibleViolation");
|
|
16928
|
+
__name(parseValidationId, "parseValidationId");
|
|
16929
|
+
__name(normalizeValidationId, "normalizeValidationId");
|
|
16930
|
+
__name(normalizeValidationIdForAnnotations, "normalizeValidationIdForAnnotations");
|
|
16931
|
+
NS = /* @__PURE__ */ Symbol("namespace");
|
|
16932
|
+
__name(namespaceFromPluginName, "namespaceFromPluginName");
|
|
16933
|
+
__name(namespaceFromString, "namespaceFromString");
|
|
16934
|
+
__name(pluginNameFromNamespace, "pluginNameFromNamespace");
|
|
16935
|
+
ANNOTATION_PLUGIN_NAME = "Construct Annotations";
|
|
16936
|
+
ANNOTATION_PLUGIN_NAMESPACE = namespaceFromPluginName("Annotation");
|
|
16937
|
+
}
|
|
16938
|
+
});
|
|
16939
|
+
|
|
16940
|
+
// ../@aws-cdk/cloud-assembly-api/lib/validation/formatting.ts
|
|
16941
|
+
var formatting_exports = {};
|
|
16942
|
+
__export(formatting_exports, {
|
|
16943
|
+
ValidationReportFormatter: () => ValidationReportFormatter,
|
|
16944
|
+
relativeFileLocationRenderer: () => relativeFileLocationRenderer,
|
|
16945
|
+
stripAnsi: () => stripAnsi
|
|
16946
|
+
});
|
|
16947
|
+
function flattenViolations(reports) {
|
|
16948
|
+
return reports.flatMap((report) => {
|
|
16949
|
+
const pluginName = report.pluginName;
|
|
16950
|
+
return report.violations.flatMap((violation) => {
|
|
16951
|
+
return violation.violatingConstructs.map((construct) => ({
|
|
16952
|
+
severity: normalizeSeverity(violation.severity, violation.customSeverity),
|
|
16953
|
+
description: violation.description,
|
|
16954
|
+
ruleName: violation.ruleName,
|
|
16955
|
+
pluginName,
|
|
16956
|
+
construct,
|
|
16957
|
+
suggestedFix: violation.suggestedFix,
|
|
16958
|
+
ruleMetadata: violation.ruleMetadata
|
|
16959
|
+
}));
|
|
16960
|
+
});
|
|
16961
|
+
});
|
|
16962
|
+
}
|
|
16963
|
+
function normalizeSeverity(severity, customSeverity) {
|
|
16964
|
+
switch (severity) {
|
|
16965
|
+
case "fatal":
|
|
16966
|
+
case "error":
|
|
16967
|
+
case "warning":
|
|
16968
|
+
case "info":
|
|
16969
|
+
return severity.toUpperCase();
|
|
16970
|
+
case "custom":
|
|
16971
|
+
return customSeverity ?? "INFO";
|
|
16972
|
+
}
|
|
16973
|
+
}
|
|
16974
|
+
function getSeverityColor(severity) {
|
|
16975
|
+
switch (severity.toLowerCase()) {
|
|
16976
|
+
case "fatal":
|
|
16977
|
+
return Colorize.red;
|
|
16978
|
+
case "error":
|
|
16979
|
+
return Colorize.orange;
|
|
16980
|
+
case "warning":
|
|
16981
|
+
return Colorize.yellow;
|
|
16982
|
+
default:
|
|
16983
|
+
return Colorize.blue;
|
|
16984
|
+
}
|
|
16985
|
+
}
|
|
16986
|
+
function stripAckTag(description) {
|
|
16987
|
+
return description.replace(/\s*\[ack:\s*[^\]]+\]\s*/g, "").trim();
|
|
16988
|
+
}
|
|
16989
|
+
function formatPluginFailure(f6) {
|
|
16990
|
+
return `${Colorize.orange("ERROR")} ${sanitize(f6.error)}`;
|
|
16991
|
+
}
|
|
16992
|
+
function sanitize(s2) {
|
|
16993
|
+
return (s2 ?? "").replace(CONTROL_CHARS, "\uFFFD");
|
|
16994
|
+
}
|
|
16995
|
+
function isPluginFailure(r6) {
|
|
16996
|
+
if (r6.conclusion === "success" || r6.violations.length > 0 || !r6.metadata?.error) {
|
|
16997
|
+
return void 0;
|
|
16998
|
+
}
|
|
16999
|
+
return { error: r6.metadata.error };
|
|
17000
|
+
}
|
|
17001
|
+
function stripAnsi(x) {
|
|
17002
|
+
const pattern = [
|
|
17003
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
17004
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
17005
|
+
].join("|");
|
|
17006
|
+
const re = new RegExp(pattern, "g");
|
|
17007
|
+
return x.replaceAll(re, "");
|
|
17008
|
+
}
|
|
17009
|
+
function relativeFileLocationRenderer(root6) {
|
|
17010
|
+
return {
|
|
17011
|
+
renderAbsoluteFilePath(absPath) {
|
|
17012
|
+
const relPath = import_path.default.relative(root6, absPath);
|
|
17013
|
+
return relPath.length < absPath.length ? relPath : absPath;
|
|
17014
|
+
}
|
|
17015
|
+
};
|
|
17016
|
+
}
|
|
17017
|
+
var import_path, ValidationReportFormatter, CONTROL_CHARS, SEVERITY_ORDER;
|
|
17018
|
+
var init_formatting = __esm({
|
|
17019
|
+
"../@aws-cdk/cloud-assembly-api/lib/validation/formatting.ts"() {
|
|
17020
|
+
"use strict";
|
|
17021
|
+
import_path = __toESM(require("path"));
|
|
17022
|
+
init_color();
|
|
17023
|
+
init_stack_trace();
|
|
17024
|
+
init_parsing();
|
|
17025
|
+
ValidationReportFormatter = class {
|
|
17026
|
+
constructor(options) {
|
|
17027
|
+
this.options = options;
|
|
17028
|
+
this.fileLocationRenderer = options.fileLocationRenderer ?? relativeFileLocationRenderer(process.cwd());
|
|
17029
|
+
}
|
|
17030
|
+
options;
|
|
17031
|
+
static {
|
|
17032
|
+
__name(this, "ValidationReportFormatter");
|
|
17033
|
+
}
|
|
17034
|
+
fileLocationRenderer;
|
|
17035
|
+
formatReports(reports) {
|
|
17036
|
+
const successfullyExecutedPlugins = reports.filter((r6) => isPluginFailure(r6) === void 0);
|
|
17037
|
+
const pluginFailures = reports.map(isPluginFailure).filter((e6) => e6 !== void 0);
|
|
17038
|
+
const violations = flattenViolations(successfullyExecutedPlugins);
|
|
17039
|
+
violations.sort((a6, b6) => {
|
|
17040
|
+
const aOrder = SEVERITY_ORDER[a6.severity.toLowerCase()] ?? 4;
|
|
17041
|
+
const bOrder = SEVERITY_ORDER[b6.severity.toLowerCase()] ?? 4;
|
|
17042
|
+
return aOrder - bOrder;
|
|
17043
|
+
});
|
|
17044
|
+
return [
|
|
17045
|
+
...pluginFailures.map(formatPluginFailure),
|
|
17046
|
+
...violations.map((v) => this.formatViolationBlock(v))
|
|
17047
|
+
];
|
|
17048
|
+
}
|
|
17049
|
+
formatViolationBlock(v) {
|
|
17050
|
+
const lines = [];
|
|
17051
|
+
const locations = this.sourceLocations(v.construct.stackTraces);
|
|
17052
|
+
const maxTraces = 5;
|
|
17053
|
+
let additional = false;
|
|
17054
|
+
for (const location of locations.slice(0, maxTraces)) {
|
|
17055
|
+
lines.push(`${additional ? "or " : ""}${Colorize.underline(sanitize(location))}`);
|
|
17056
|
+
additional = true;
|
|
17057
|
+
}
|
|
17058
|
+
if (locations.length > maxTraces) {
|
|
17059
|
+
lines.push(Colorize.grey(`(and ${locations.length - maxTraces} more...)`));
|
|
17060
|
+
}
|
|
17061
|
+
const pluginNs = namespaceFromPluginName(v.pluginName);
|
|
17062
|
+
const parsed = parseValidationId(v.ruleName);
|
|
17063
|
+
lines.push([
|
|
17064
|
+
Colorize.bold(getSeverityColor(v.severity)(sanitize(v.severity))),
|
|
17065
|
+
Colorize.bold(stripAckTag(sanitize(v.description))),
|
|
17066
|
+
Colorize.grey(`(${sanitize(parsed.namespace ? pluginNameFromNamespace(parsed.namespace) : v.pluginName)})`)
|
|
17067
|
+
].join(" "));
|
|
17068
|
+
const constructInfo = this.formatConstructInfo(v.construct);
|
|
17069
|
+
lines.push(` ${constructInfo}`);
|
|
17070
|
+
if (v.suggestedFix) {
|
|
17071
|
+
lines.push(` Suggested fix: ${sanitize(v.suggestedFix).replace(/\n/g, "\n ")}`);
|
|
17072
|
+
}
|
|
17073
|
+
const ackId = normalizeValidationId(v.ruleName, pluginNs);
|
|
17074
|
+
if (isSuppressibleViolation(v)) {
|
|
17075
|
+
lines.push(` ${Colorize.grey(`Acknowledge with '${sanitize(ackId)}'`)}`);
|
|
17076
|
+
} else {
|
|
17077
|
+
lines.push(` ${Colorize.grey(`Rule ${sanitize(ackId)}`)}`);
|
|
17078
|
+
}
|
|
17079
|
+
return lines.join("\n");
|
|
17080
|
+
}
|
|
17081
|
+
sourceLocations(stackTraces) {
|
|
17082
|
+
const ret = [];
|
|
17083
|
+
for (const trace of stackTraces ?? []) {
|
|
17084
|
+
const frame = StackTrace.fromNewlineSeparatedString(trace).findAndParse(this.options.frameFinder ?? DEFAULT_USER_CODE_FINDER);
|
|
17085
|
+
if (frame && frame.fileName) {
|
|
17086
|
+
const candidate = `${this.fileLocationRenderer.renderAbsoluteFilePath(frame.fileName)}:${frame.sourceLocation}`;
|
|
17087
|
+
if (!ret.includes(candidate)) {
|
|
17088
|
+
ret.push(candidate);
|
|
17089
|
+
}
|
|
17090
|
+
}
|
|
17091
|
+
}
|
|
17092
|
+
return ret;
|
|
17093
|
+
}
|
|
17094
|
+
formatConstructInfo(construct) {
|
|
17095
|
+
const parts = [];
|
|
17096
|
+
const logicalId = sanitize(construct.cloudFormationResource?.logicalId);
|
|
17097
|
+
if (construct.constructPath) {
|
|
17098
|
+
const cPath = sanitize(construct.constructPath);
|
|
17099
|
+
parts.push(logicalId ? `${Colorize.bold(cPath)} (${logicalId})` : Colorize.bold(cPath));
|
|
17100
|
+
} else {
|
|
17101
|
+
if (construct.cloudFormationResource?.templatePath) {
|
|
17102
|
+
parts.push(this.fileLocationRenderer.renderAbsoluteFilePath(sanitize(construct.cloudFormationResource.templatePath)));
|
|
17103
|
+
}
|
|
17104
|
+
if (logicalId) {
|
|
17105
|
+
parts.push(Colorize.bold(logicalId));
|
|
17106
|
+
}
|
|
17107
|
+
}
|
|
17108
|
+
if (construct.constructFqn) {
|
|
17109
|
+
parts.push(Colorize.grey(sanitize(construct.constructFqn)));
|
|
17110
|
+
}
|
|
17111
|
+
return parts.join(" ");
|
|
17112
|
+
}
|
|
17113
|
+
};
|
|
17114
|
+
__name(flattenViolations, "flattenViolations");
|
|
17115
|
+
__name(normalizeSeverity, "normalizeSeverity");
|
|
17116
|
+
__name(getSeverityColor, "getSeverityColor");
|
|
17117
|
+
__name(stripAckTag, "stripAckTag");
|
|
17118
|
+
__name(formatPluginFailure, "formatPluginFailure");
|
|
17119
|
+
CONTROL_CHARS = /[\x00-\x08\x0B-\x1F\x7F\x9B]/g;
|
|
17120
|
+
__name(sanitize, "sanitize");
|
|
17121
|
+
SEVERITY_ORDER = {
|
|
17122
|
+
fatal: 0,
|
|
17123
|
+
error: 1,
|
|
17124
|
+
warning: 2,
|
|
17125
|
+
info: 3
|
|
17126
|
+
};
|
|
17127
|
+
__name(isPluginFailure, "isPluginFailure");
|
|
17128
|
+
__name(stripAnsi, "stripAnsi");
|
|
17129
|
+
__name(relativeFileLocationRenderer, "relativeFileLocationRenderer");
|
|
17130
|
+
}
|
|
17131
|
+
});
|
|
17132
|
+
|
|
17133
|
+
// ../@aws-cdk/cloud-assembly-api/lib/validation/loading.ts
|
|
17134
|
+
var loading_exports = {};
|
|
17135
|
+
__export(loading_exports, {
|
|
17136
|
+
loadUnifiedValidationReport: () => loadUnifiedValidationReport
|
|
17137
|
+
});
|
|
17138
|
+
async function loadUnifiedValidationReport(assembly, stacks) {
|
|
17139
|
+
const ret = [];
|
|
17140
|
+
const reportPath = path10.join(assembly.directory, VALIDATION_REPORT_FILE2);
|
|
17141
|
+
if (await pathExists(reportPath)) {
|
|
17142
|
+
const selectedStackIds = new Set(stacks.map((stack) => stack.hierarchicalId));
|
|
17143
|
+
const report = import_cloud_assembly_schema2.Manifest.loadValidationReport(reportPath);
|
|
17144
|
+
const filteredReports = filterReportsByStacks(report.pluginReports, selectedStackIds);
|
|
17145
|
+
ret.push(...filteredReports);
|
|
17146
|
+
}
|
|
17147
|
+
const alreadyHasAnnotations = ret.some((r6) => r6.pluginName === ANNOTATION_PLUGIN_NAME);
|
|
17148
|
+
if (!alreadyHasAnnotations) {
|
|
17149
|
+
const annotationReport = pluginReportFromAnnotations(stacks);
|
|
17150
|
+
if (annotationReport.violations.length > 0 || annotationReport.conclusion === "failure") {
|
|
17151
|
+
ret.push(annotationReport);
|
|
17152
|
+
}
|
|
17153
|
+
}
|
|
17154
|
+
return ret;
|
|
17155
|
+
}
|
|
17156
|
+
function filterReportsByStacks(reports, selectedStackIds) {
|
|
17157
|
+
const stackIds = Array.from(selectedStackIds);
|
|
17158
|
+
return reports.map(filterReport);
|
|
17159
|
+
function filterReport(report) {
|
|
17160
|
+
const violationsWithoutConstructs = new Set(report.violations.flatMap((v, i6) => v.violatingConstructs.length === 0 ? [i6] : []));
|
|
17161
|
+
const filteredViolations = report.violations.map((v) => ({
|
|
17162
|
+
...v,
|
|
17163
|
+
violatingConstructs: v.violatingConstructs.filter(constructMatches)
|
|
17164
|
+
})).filter((v, i6) => v.violatingConstructs.length > 0 || violationsWithoutConstructs.has(i6));
|
|
17165
|
+
return {
|
|
17166
|
+
...report,
|
|
17167
|
+
violations: filteredViolations,
|
|
17168
|
+
conclusion: filteredViolations.length > 0 ? report.conclusion : "success"
|
|
17169
|
+
};
|
|
17170
|
+
}
|
|
17171
|
+
__name(filterReport, "filterReport");
|
|
17172
|
+
function constructMatches(c6) {
|
|
17173
|
+
return !c6.constructPath || stackIds.some((stackId) => c6.constructPath === stackId || c6.constructPath?.startsWith(`${stackId}/`));
|
|
17174
|
+
}
|
|
17175
|
+
__name(constructMatches, "constructMatches");
|
|
17176
|
+
}
|
|
17177
|
+
function pluginReportFromAnnotations(stacks) {
|
|
17178
|
+
const ruleMap = /* @__PURE__ */ new Map();
|
|
17179
|
+
for (const stack of stacks) {
|
|
17180
|
+
for (const entry of stack.messages) {
|
|
17181
|
+
let severity;
|
|
17182
|
+
switch (entry.level) {
|
|
17183
|
+
case "warning" /* WARNING */:
|
|
17184
|
+
severity = "warning";
|
|
17185
|
+
break;
|
|
17186
|
+
case "error" /* ERROR */:
|
|
17187
|
+
severity = "error";
|
|
17188
|
+
break;
|
|
17189
|
+
case "info" /* INFO */:
|
|
17190
|
+
severity = "info";
|
|
17191
|
+
break;
|
|
17192
|
+
}
|
|
17193
|
+
const { message, ruleName } = splitDescriptionAndId(String(entry.entry.data));
|
|
17194
|
+
const ruleKey = `${ruleName}|${severity}|${message}`;
|
|
17195
|
+
let violation = ruleMap.get(ruleKey);
|
|
17196
|
+
if (!violation) {
|
|
17197
|
+
violation = {
|
|
17198
|
+
ruleName: ruleName ?? `${severity}-annotation`,
|
|
17199
|
+
description: message,
|
|
17200
|
+
severity,
|
|
17201
|
+
violatingConstructs: [],
|
|
17202
|
+
ruleMetadata: {
|
|
17203
|
+
"cdk:annotation": "true"
|
|
17204
|
+
}
|
|
17205
|
+
};
|
|
17206
|
+
ruleMap.set(ruleKey, violation);
|
|
17207
|
+
}
|
|
17208
|
+
violation.violatingConstructs.push({
|
|
17209
|
+
constructPath: entry.id.replace(/^\//, "")
|
|
17210
|
+
// remove leading slash
|
|
17211
|
+
// TODO: see if this information can be obtained from tree.json
|
|
17212
|
+
// cloudFormationResource
|
|
17213
|
+
// constructFqn:
|
|
17214
|
+
// libraryVersion
|
|
17215
|
+
// TODO: see if we can get this from metadata stack traces. We may need to re-enable them for
|
|
17216
|
+
// annotations in the core library. Otherwise we should probably get a stack trace to the resource itself.
|
|
17217
|
+
// stackTraces
|
|
17218
|
+
});
|
|
17219
|
+
}
|
|
17220
|
+
}
|
|
17221
|
+
const violations = Array.from(ruleMap.values());
|
|
17222
|
+
const hasErrors = violations.some((v) => v.severity === "error");
|
|
17223
|
+
return {
|
|
17224
|
+
pluginName: ANNOTATION_PLUGIN_NAME,
|
|
17225
|
+
conclusion: hasErrors ? "failure" : "success",
|
|
17226
|
+
violations
|
|
17227
|
+
};
|
|
17228
|
+
}
|
|
17229
|
+
function splitDescriptionAndId(message) {
|
|
17230
|
+
const ackMatch = message.match(/\[ack: ([^\]]+)\]/);
|
|
17231
|
+
if (ackMatch) {
|
|
17232
|
+
return { message: message.replace(ackMatch[0], "").trim(), ruleName: ackMatch[1] };
|
|
17233
|
+
}
|
|
17234
|
+
const idMatch = message.match(/\(([^()]+::[^()]+)\)$/);
|
|
17235
|
+
if (idMatch) {
|
|
17236
|
+
return { message: message.replace(idMatch[0], "").trim(), ruleName: idMatch[1] };
|
|
17237
|
+
}
|
|
17238
|
+
return { message };
|
|
17239
|
+
}
|
|
17240
|
+
async function pathExists(pathName) {
|
|
17241
|
+
try {
|
|
17242
|
+
await import_fs.promises.access(pathName);
|
|
17243
|
+
return true;
|
|
17244
|
+
} catch (e6) {
|
|
17245
|
+
if (e6.code !== "ENOENT") {
|
|
17246
|
+
throw e6;
|
|
17247
|
+
}
|
|
17248
|
+
return false;
|
|
17249
|
+
}
|
|
17250
|
+
}
|
|
17251
|
+
var import_fs, path10, import_cloud_assembly_schema2, VALIDATION_REPORT_FILE2;
|
|
17252
|
+
var init_loading = __esm({
|
|
17253
|
+
"../@aws-cdk/cloud-assembly-api/lib/validation/loading.ts"() {
|
|
17254
|
+
"use strict";
|
|
17255
|
+
import_fs = require("fs");
|
|
17256
|
+
path10 = __toESM(require("path"));
|
|
17257
|
+
import_cloud_assembly_schema2 = __toESM(require_lib2());
|
|
17258
|
+
init_metadata();
|
|
17259
|
+
init_parsing();
|
|
17260
|
+
VALIDATION_REPORT_FILE2 = "validation-report.json";
|
|
17261
|
+
__name(loadUnifiedValidationReport, "loadUnifiedValidationReport");
|
|
17262
|
+
__name(filterReportsByStacks, "filterReportsByStacks");
|
|
17263
|
+
__name(pluginReportFromAnnotations, "pluginReportFromAnnotations");
|
|
17264
|
+
__name(splitDescriptionAndId, "splitDescriptionAndId");
|
|
17265
|
+
__name(pathExists, "pathExists");
|
|
17266
|
+
}
|
|
17267
|
+
});
|
|
17268
|
+
|
|
16678
17269
|
// ../@aws-cdk/cloud-assembly-api/lib/index.js
|
|
16679
17270
|
var require_lib3 = __commonJS({
|
|
16680
17271
|
"../@aws-cdk/cloud-assembly-api/lib/index.js"(exports2) {
|
|
@@ -16719,6 +17310,10 @@ var require_lib3 = __commonJS({
|
|
|
16719
17310
|
__exportStar((init_bootstrap(), __toCommonJS(bootstrap_exports)), exports2);
|
|
16720
17311
|
__exportStar((init_construct_tree(), __toCommonJS(construct_tree_exports)), exports2);
|
|
16721
17312
|
__exportStar((init_template_ranges(), __toCommonJS(template_ranges_exports)), exports2);
|
|
17313
|
+
__exportStar((init_stack_trace(), __toCommonJS(stack_trace_exports)), exports2);
|
|
17314
|
+
__exportStar((init_formatting(), __toCommonJS(formatting_exports)), exports2);
|
|
17315
|
+
__exportStar((init_parsing(), __toCommonJS(parsing_exports)), exports2);
|
|
17316
|
+
__exportStar((init_loading(), __toCommonJS(loading_exports)), exports2);
|
|
16722
17317
|
}
|
|
16723
17318
|
});
|
|
16724
17319
|
|
|
@@ -16783,11 +17378,11 @@ async function repositoryUri(ecr, repositoryName) {
|
|
|
16783
17378
|
return void 0;
|
|
16784
17379
|
}
|
|
16785
17380
|
}
|
|
16786
|
-
var
|
|
17381
|
+
var path11, ContainerImageAssetHandler, ContainerImageBuilder;
|
|
16787
17382
|
var init_container_images = __esm({
|
|
16788
17383
|
"../@aws-cdk/cdk-assets-lib/lib/private/handlers/container-images.ts"() {
|
|
16789
17384
|
"use strict";
|
|
16790
|
-
|
|
17385
|
+
path11 = __toESM(require("path"));
|
|
16791
17386
|
init_client_options();
|
|
16792
17387
|
init_progress();
|
|
16793
17388
|
init_placeholders2();
|
|
@@ -16818,7 +17413,7 @@ var init_container_images = __esm({
|
|
|
16818
17413
|
}
|
|
16819
17414
|
const dockerForBuilding = await this.host.dockerFactory.forBuild({
|
|
16820
17415
|
repoUri: initOnce.repoUri,
|
|
16821
|
-
eventEmitter:
|
|
17416
|
+
eventEmitter: this.host.emitMessage.bind(this.host),
|
|
16822
17417
|
ecr: initOnce.ecr,
|
|
16823
17418
|
subprocessOutputDestination: this.options.subprocessOutputDestination
|
|
16824
17419
|
});
|
|
@@ -16973,7 +17568,7 @@ var init_container_images = __esm({
|
|
|
16973
17568
|
`'directory' is expected in the DockerImage asset source, got: ${JSON.stringify(source)}`
|
|
16974
17569
|
);
|
|
16975
17570
|
}
|
|
16976
|
-
const fullPath =
|
|
17571
|
+
const fullPath = path11.resolve(this.workDir, source.directory);
|
|
16977
17572
|
this.host.emitMessage("build" /* BUILD */, `Building Docker image at ${fullPath}`);
|
|
16978
17573
|
await this.docker.build({
|
|
16979
17574
|
directory: fullPath,
|
|
@@ -17044,11 +17639,11 @@ var require_Mime = __commonJS({
|
|
|
17044
17639
|
}
|
|
17045
17640
|
}
|
|
17046
17641
|
};
|
|
17047
|
-
Mime.prototype.getType = function(
|
|
17048
|
-
|
|
17049
|
-
let last =
|
|
17642
|
+
Mime.prototype.getType = function(path15) {
|
|
17643
|
+
path15 = String(path15);
|
|
17644
|
+
let last = path15.replace(/^.*[/\\]/, "").toLowerCase();
|
|
17050
17645
|
let ext = last.replace(/^.*\./, "").toLowerCase();
|
|
17051
|
-
let hasPath = last.length <
|
|
17646
|
+
let hasPath = last.length < path15.length;
|
|
17052
17647
|
let hasDot = ext.length < last.length - 1;
|
|
17053
17648
|
return (hasDot || !hasPath) && this._types[ext] || null;
|
|
17054
17649
|
};
|
|
@@ -17084,7 +17679,7 @@ var require_mime = __commonJS({
|
|
|
17084
17679
|
});
|
|
17085
17680
|
|
|
17086
17681
|
// ../@aws-cdk/cdk-assets-lib/lib/private/fs-extra.ts
|
|
17087
|
-
async function
|
|
17682
|
+
async function pathExists2(pathName) {
|
|
17088
17683
|
try {
|
|
17089
17684
|
await pfs.stat(pathName);
|
|
17090
17685
|
return true;
|
|
@@ -17095,13 +17690,13 @@ async function pathExists(pathName) {
|
|
|
17095
17690
|
return false;
|
|
17096
17691
|
}
|
|
17097
17692
|
}
|
|
17098
|
-
var
|
|
17693
|
+
var fs10, pfs;
|
|
17099
17694
|
var init_fs_extra = __esm({
|
|
17100
17695
|
"../@aws-cdk/cdk-assets-lib/lib/private/fs-extra.ts"() {
|
|
17101
17696
|
"use strict";
|
|
17102
|
-
|
|
17103
|
-
pfs =
|
|
17104
|
-
__name(
|
|
17697
|
+
fs10 = __toESM(require("fs"));
|
|
17698
|
+
pfs = fs10.promises;
|
|
17699
|
+
__name(pathExists2, "pathExists");
|
|
17105
17700
|
}
|
|
17106
17701
|
});
|
|
17107
17702
|
|
|
@@ -17124,13 +17719,13 @@ async function cached(cache6, key, factory) {
|
|
|
17124
17719
|
cache6.set(key, fresh);
|
|
17125
17720
|
return fresh;
|
|
17126
17721
|
}
|
|
17127
|
-
var
|
|
17722
|
+
var import_fs2, path12, import_cloud_assembly_schema3, mime, EMPTY_ZIP_FILE_SIZE, FileAssetHandler, BucketInformation;
|
|
17128
17723
|
var init_files = __esm({
|
|
17129
17724
|
"../@aws-cdk/cdk-assets-lib/lib/private/handlers/files.ts"() {
|
|
17130
17725
|
"use strict";
|
|
17131
|
-
|
|
17132
|
-
|
|
17133
|
-
|
|
17726
|
+
import_fs2 = require("fs");
|
|
17727
|
+
path12 = __toESM(require("path"));
|
|
17728
|
+
import_cloud_assembly_schema3 = __toESM(require_lib2());
|
|
17134
17729
|
mime = __toESM(require_mime());
|
|
17135
17730
|
init_client_options();
|
|
17136
17731
|
init_progress();
|
|
@@ -17144,7 +17739,7 @@ var init_files = __esm({
|
|
|
17144
17739
|
this.workDir = workDir;
|
|
17145
17740
|
this.asset = asset;
|
|
17146
17741
|
this.host = host;
|
|
17147
|
-
this.fileCacheRoot =
|
|
17742
|
+
this.fileCacheRoot = path12.join(workDir, ".cache");
|
|
17148
17743
|
}
|
|
17149
17744
|
workDir;
|
|
17150
17745
|
asset;
|
|
@@ -17259,7 +17854,7 @@ var init_files = __esm({
|
|
|
17259
17854
|
{
|
|
17260
17855
|
Bucket: destination.bucketName,
|
|
17261
17856
|
Key: destination.objectKey,
|
|
17262
|
-
Body: (0,
|
|
17857
|
+
Body: (0, import_fs2.createReadStream)(publishFile.packagedPath),
|
|
17263
17858
|
ContentType: publishFile.contentType,
|
|
17264
17859
|
ChecksumAlgorithm: "SHA256"
|
|
17265
17860
|
},
|
|
@@ -17273,12 +17868,12 @@ var init_files = __esm({
|
|
|
17273
17868
|
`'path' is expected in the File asset source, got: ${JSON.stringify(source)}`
|
|
17274
17869
|
);
|
|
17275
17870
|
}
|
|
17276
|
-
const fullPath =
|
|
17277
|
-
if (source.packaging ===
|
|
17871
|
+
const fullPath = path12.resolve(this.workDir, source.path);
|
|
17872
|
+
if (source.packaging === import_cloud_assembly_schema3.FileAssetPackaging.ZIP_DIRECTORY) {
|
|
17278
17873
|
const contentType = "application/zip";
|
|
17279
|
-
await
|
|
17280
|
-
const packagedPath =
|
|
17281
|
-
if (await
|
|
17874
|
+
await import_fs2.promises.mkdir(this.fileCacheRoot, { recursive: true });
|
|
17875
|
+
const packagedPath = path12.join(this.fileCacheRoot, `${this.asset.id.assetId}.zip`);
|
|
17876
|
+
if (await pathExists2(packagedPath)) {
|
|
17282
17877
|
this.host.emitMessage("cached" /* CACHED */, `From cache ${packagedPath}`);
|
|
17283
17878
|
return { packagedPath, contentType };
|
|
17284
17879
|
}
|
|
@@ -17417,13 +18012,13 @@ function prefixTreeChars(xs, prefix = "") {
|
|
|
17417
18012
|
}
|
|
17418
18013
|
return ret;
|
|
17419
18014
|
}
|
|
17420
|
-
var
|
|
18015
|
+
var fs12, path13, import_cloud_assembly_schema4, AssetManifest, ASSET_TYPES, FileManifestEntry, DockerImageManifestEntry, DestinationIdentifier, DestinationPattern;
|
|
17421
18016
|
var init_asset_manifest = __esm({
|
|
17422
18017
|
"../@aws-cdk/cdk-assets-lib/lib/asset-manifest.ts"() {
|
|
17423
18018
|
"use strict";
|
|
17424
|
-
|
|
17425
|
-
|
|
17426
|
-
|
|
18019
|
+
fs12 = __toESM(require("fs"));
|
|
18020
|
+
path13 = __toESM(require("path"));
|
|
18021
|
+
import_cloud_assembly_schema4 = __toESM(require_lib2());
|
|
17427
18022
|
AssetManifest = class _AssetManifest {
|
|
17428
18023
|
constructor(directory, manifest) {
|
|
17429
18024
|
this.manifest = manifest;
|
|
@@ -17442,8 +18037,8 @@ var init_asset_manifest = __esm({
|
|
|
17442
18037
|
*/
|
|
17443
18038
|
static fromFile(fileName) {
|
|
17444
18039
|
try {
|
|
17445
|
-
const obj =
|
|
17446
|
-
return new _AssetManifest(
|
|
18040
|
+
const obj = import_cloud_assembly_schema4.Manifest.loadAssetManifest(fileName);
|
|
18041
|
+
return new _AssetManifest(path13.dirname(fileName), obj);
|
|
17447
18042
|
} catch (e6) {
|
|
17448
18043
|
throw new Error(`Cannot read asset manifest '${fileName}': ${e6.message}`);
|
|
17449
18044
|
}
|
|
@@ -17456,12 +18051,12 @@ var init_asset_manifest = __esm({
|
|
|
17456
18051
|
static fromPath(filePath) {
|
|
17457
18052
|
let st;
|
|
17458
18053
|
try {
|
|
17459
|
-
st =
|
|
18054
|
+
st = fs12.statSync(filePath);
|
|
17460
18055
|
} catch (e6) {
|
|
17461
18056
|
throw new Error(`Cannot read asset manifest at '${filePath}': ${e6.message}`);
|
|
17462
18057
|
}
|
|
17463
18058
|
if (st.isDirectory()) {
|
|
17464
|
-
return _AssetManifest.fromFile(
|
|
18059
|
+
return _AssetManifest.fromFile(path13.join(filePath, _AssetManifest.DEFAULT_FILENAME));
|
|
17465
18060
|
}
|
|
17466
18061
|
return _AssetManifest.fromFile(filePath);
|
|
17467
18062
|
}
|
|
@@ -19657,12 +20252,12 @@ var init_TypeRegistry = __esm({
|
|
|
19657
20252
|
this.namespace = namespace;
|
|
19658
20253
|
this.schemas = schemas;
|
|
19659
20254
|
this.exceptions = exceptions;
|
|
19660
|
-
}
|
|
19661
|
-
static for(namespace) {
|
|
19662
20255
|
if (!_TypeRegistry.registries.has(namespace)) {
|
|
19663
|
-
_TypeRegistry.registries.set(namespace,
|
|
20256
|
+
_TypeRegistry.registries.set(namespace, this);
|
|
19664
20257
|
}
|
|
19665
|
-
|
|
20258
|
+
}
|
|
20259
|
+
static for(namespace) {
|
|
20260
|
+
return _TypeRegistry.registries.get(namespace) ?? new _TypeRegistry(namespace);
|
|
19666
20261
|
}
|
|
19667
20262
|
copyFrom(other) {
|
|
19668
20263
|
const { schemas, exceptions } = this;
|
|
@@ -19680,7 +20275,9 @@ var init_TypeRegistry = __esm({
|
|
|
19680
20275
|
register(shapeId, schema) {
|
|
19681
20276
|
const qualifiedName = this.normalizeShapeId(shapeId);
|
|
19682
20277
|
for (const r6 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) {
|
|
19683
|
-
r6.schemas.
|
|
20278
|
+
if (!r6.schemas.has(qualifiedName)) {
|
|
20279
|
+
r6.schemas.set(qualifiedName, schema);
|
|
20280
|
+
}
|
|
19684
20281
|
}
|
|
19685
20282
|
}
|
|
19686
20283
|
getSchema(shapeId) {
|
|
@@ -19705,9 +20302,12 @@ var init_TypeRegistry = __esm({
|
|
|
19705
20302
|
registerError(es, ctor) {
|
|
19706
20303
|
const $error = es;
|
|
19707
20304
|
const ns = $error[1];
|
|
20305
|
+
const qualifiedName = ns + "#" + $error[2];
|
|
19708
20306
|
for (const r6 of [this, _TypeRegistry.for(ns)]) {
|
|
19709
|
-
r6.schemas.
|
|
19710
|
-
|
|
20307
|
+
if (!r6.schemas.has(qualifiedName) && !r6.exceptions.has($error)) {
|
|
20308
|
+
r6.schemas.set(qualifiedName, $error);
|
|
20309
|
+
r6.exceptions.set($error, ctor);
|
|
20310
|
+
}
|
|
19711
20311
|
}
|
|
19712
20312
|
}
|
|
19713
20313
|
getErrorCtor(es) {
|
|
@@ -19864,20 +20464,27 @@ var init_command = __esm({
|
|
|
19864
20464
|
}
|
|
19865
20465
|
const stack = clientStack.concat(this.middlewareStack);
|
|
19866
20466
|
const { logger: logger2 } = configuration;
|
|
20467
|
+
const additionalSmithyContext = additionalContext[import_types2.SMITHY_CONTEXT_KEY];
|
|
19867
20468
|
const handlerExecutionContext = {
|
|
19868
20469
|
logger: logger2,
|
|
19869
20470
|
clientName,
|
|
19870
20471
|
commandName,
|
|
19871
20472
|
inputFilterSensitiveLog,
|
|
19872
20473
|
outputFilterSensitiveLog,
|
|
20474
|
+
...additionalContext,
|
|
19873
20475
|
[import_types2.SMITHY_CONTEXT_KEY]: {
|
|
20476
|
+
...additionalSmithyContext,
|
|
19874
20477
|
commandInstance: this,
|
|
19875
|
-
...smithyContext
|
|
19876
|
-
|
|
19877
|
-
|
|
20478
|
+
...smithyContext,
|
|
20479
|
+
...options?.metricsRecorder === void 0 ? {} : { metricsRecorder: options.metricsRecorder }
|
|
20480
|
+
}
|
|
19878
20481
|
};
|
|
19879
20482
|
const { requestHandler } = configuration;
|
|
19880
20483
|
let requestOptions = options ?? {};
|
|
20484
|
+
if (requestOptions.metricsRecorder) {
|
|
20485
|
+
requestOptions = { ...requestOptions };
|
|
20486
|
+
delete requestOptions.metricsRecorder;
|
|
20487
|
+
}
|
|
19881
20488
|
if (smithyContext.eventStream) {
|
|
19882
20489
|
requestOptions = {
|
|
19883
20490
|
isEventStream: true,
|
|
@@ -20083,10 +20690,25 @@ var init_exceptions = __esm({
|
|
|
20083
20690
|
return _ServiceException.isInstance(instance);
|
|
20084
20691
|
}
|
|
20085
20692
|
if (_ServiceException.isInstance(instance)) {
|
|
20086
|
-
if (
|
|
20087
|
-
return
|
|
20693
|
+
if (this.prototype.isPrototypeOf(instance)) {
|
|
20694
|
+
return true;
|
|
20695
|
+
}
|
|
20696
|
+
const targetName = this.name;
|
|
20697
|
+
if (!targetName || !candidate.name) {
|
|
20698
|
+
return false;
|
|
20699
|
+
}
|
|
20700
|
+
if (candidate.name === targetName) {
|
|
20701
|
+
return true;
|
|
20088
20702
|
}
|
|
20089
|
-
|
|
20703
|
+
let proto = Object.getPrototypeOf(candidate);
|
|
20704
|
+
while (proto && proto !== Object.prototype) {
|
|
20705
|
+
const ctorName = proto.constructor?.name;
|
|
20706
|
+
if (ctorName && ctorName !== "Error" && ctorName === targetName) {
|
|
20707
|
+
return true;
|
|
20708
|
+
}
|
|
20709
|
+
proto = Object.getPrototypeOf(proto);
|
|
20710
|
+
}
|
|
20711
|
+
return false;
|
|
20090
20712
|
}
|
|
20091
20713
|
return false;
|
|
20092
20714
|
}
|
|
@@ -21988,14 +22610,14 @@ var init_readFile = __esm({
|
|
|
21988
22610
|
import_promises2 = require("node:fs/promises");
|
|
21989
22611
|
filePromises = {};
|
|
21990
22612
|
fileIntercept = {};
|
|
21991
|
-
readFile2 = /* @__PURE__ */ __name((
|
|
21992
|
-
if (fileIntercept[
|
|
21993
|
-
return fileIntercept[
|
|
22613
|
+
readFile2 = /* @__PURE__ */ __name((path15, options) => {
|
|
22614
|
+
if (fileIntercept[path15] !== void 0) {
|
|
22615
|
+
return fileIntercept[path15];
|
|
21994
22616
|
}
|
|
21995
|
-
if (!filePromises[
|
|
21996
|
-
filePromises[
|
|
22617
|
+
if (!filePromises[path15] || options?.ignoreCache) {
|
|
22618
|
+
filePromises[path15] = (0, import_promises2.readFile)(path15, "utf8");
|
|
21997
22619
|
}
|
|
21998
|
-
return filePromises[
|
|
22620
|
+
return filePromises[path15];
|
|
21999
22621
|
}, "readFile");
|
|
22000
22622
|
}
|
|
22001
22623
|
});
|
|
@@ -22107,8 +22729,8 @@ var init_externalDataInterceptor = __esm({
|
|
|
22107
22729
|
getFileRecord() {
|
|
22108
22730
|
return fileIntercept;
|
|
22109
22731
|
},
|
|
22110
|
-
interceptFile(
|
|
22111
|
-
fileIntercept[
|
|
22732
|
+
interceptFile(path15, contents) {
|
|
22733
|
+
fileIntercept[path15] = Promise.resolve(contents);
|
|
22112
22734
|
},
|
|
22113
22735
|
getTokenRecord() {
|
|
22114
22736
|
return tokenIntercept;
|
|
@@ -22907,8 +23529,8 @@ var init_createConfigValueProvider = __esm({
|
|
|
22907
23529
|
return endpoint.url.href;
|
|
22908
23530
|
}
|
|
22909
23531
|
if ("hostname" in endpoint) {
|
|
22910
|
-
const { protocol, hostname, port, path:
|
|
22911
|
-
return `${protocol}//${hostname}${port ? ":" + port : ""}${
|
|
23532
|
+
const { protocol, hostname, port, path: path15 } = endpoint;
|
|
23533
|
+
return `${protocol}//${hostname}${port ? ":" + port : ""}${path15}`;
|
|
22912
23534
|
}
|
|
22913
23535
|
}
|
|
22914
23536
|
return endpoint;
|
|
@@ -23299,18 +23921,18 @@ var getAttrPathList;
|
|
|
23299
23921
|
var init_getAttrPathList = __esm({
|
|
23300
23922
|
"../../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js"() {
|
|
23301
23923
|
init_types2();
|
|
23302
|
-
getAttrPathList = /* @__PURE__ */ __name((
|
|
23303
|
-
const parts =
|
|
23924
|
+
getAttrPathList = /* @__PURE__ */ __name((path15) => {
|
|
23925
|
+
const parts = path15.split(".");
|
|
23304
23926
|
const pathList = [];
|
|
23305
23927
|
for (const part of parts) {
|
|
23306
23928
|
const squareBracketIndex = part.indexOf("[");
|
|
23307
23929
|
if (squareBracketIndex !== -1) {
|
|
23308
23930
|
if (part.indexOf("]") !== part.length - 1) {
|
|
23309
|
-
throw new EndpointError(`Path: '${
|
|
23931
|
+
throw new EndpointError(`Path: '${path15}' does not end with ']'`);
|
|
23310
23932
|
}
|
|
23311
23933
|
const arrayIndex = part.slice(squareBracketIndex + 1, -1);
|
|
23312
23934
|
if (Number.isNaN(parseInt(arrayIndex))) {
|
|
23313
|
-
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${
|
|
23935
|
+
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path15}'`);
|
|
23314
23936
|
}
|
|
23315
23937
|
if (squareBracketIndex !== 0) {
|
|
23316
23938
|
pathList.push(part.slice(0, squareBracketIndex));
|
|
@@ -23331,9 +23953,9 @@ var init_getAttr = __esm({
|
|
|
23331
23953
|
"../../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js"() {
|
|
23332
23954
|
init_types2();
|
|
23333
23955
|
init_getAttrPathList();
|
|
23334
|
-
getAttr = /* @__PURE__ */ __name((value,
|
|
23956
|
+
getAttr = /* @__PURE__ */ __name((value, path15) => getAttrPathList(path15).reduce((acc, index) => {
|
|
23335
23957
|
if (typeof acc !== "object") {
|
|
23336
|
-
throw new EndpointError(`Index '${index}' in '${
|
|
23958
|
+
throw new EndpointError(`Index '${index}' in '${path15}' not found in '${JSON.stringify(value)}'`);
|
|
23337
23959
|
} else if (Array.isArray(acc)) {
|
|
23338
23960
|
const i6 = parseInt(index);
|
|
23339
23961
|
return acc[i6 < 0 ? acc.length + i6 : i6];
|
|
@@ -23395,8 +24017,8 @@ var init_parseURL = __esm({
|
|
|
23395
24017
|
return value;
|
|
23396
24018
|
}
|
|
23397
24019
|
if (typeof value === "object" && "hostname" in value) {
|
|
23398
|
-
const { hostname: hostname2, port, protocol: protocol2 = "", path:
|
|
23399
|
-
const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${
|
|
24020
|
+
const { hostname: hostname2, port, protocol: protocol2 = "", path: path15 = "", query = {} } = value;
|
|
24021
|
+
const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path15}`);
|
|
23400
24022
|
url.search = Object.entries(query).map(([k6, v]) => `${k6}=${v}`).join("&");
|
|
23401
24023
|
return url;
|
|
23402
24024
|
}
|
|
@@ -24555,6 +25177,8 @@ var init_getAwsChunkedEncodingStream_browser = __esm({
|
|
|
24555
25177
|
const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
|
|
24556
25178
|
const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
|
|
24557
25179
|
const digest3 = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0;
|
|
25180
|
+
Promise.resolve(digest3).catch(() => {
|
|
25181
|
+
});
|
|
24558
25182
|
const reader = readableStream.getReader();
|
|
24559
25183
|
return new ReadableStream({
|
|
24560
25184
|
async pull(controller) {
|
|
@@ -24591,9 +25215,12 @@ function getAwsChunkedEncodingStream2(stream, options) {
|
|
|
24591
25215
|
const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
|
|
24592
25216
|
const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
|
|
24593
25217
|
const digest3 = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : void 0;
|
|
25218
|
+
Promise.resolve(digest3).catch(() => {
|
|
25219
|
+
});
|
|
24594
25220
|
const awsChunkedEncodingStream = new import_node_stream4.Readable({
|
|
24595
|
-
read
|
|
24596
|
-
|
|
25221
|
+
read() {
|
|
25222
|
+
readable.resume();
|
|
25223
|
+
}
|
|
24597
25224
|
});
|
|
24598
25225
|
readable.on("data", (data) => {
|
|
24599
25226
|
const length = bodyLengthChecker(data) || 0;
|
|
@@ -24603,19 +25230,29 @@ function getAwsChunkedEncodingStream2(stream, options) {
|
|
|
24603
25230
|
awsChunkedEncodingStream.push(`${length.toString(16)}\r
|
|
24604
25231
|
`);
|
|
24605
25232
|
awsChunkedEncodingStream.push(data);
|
|
24606
|
-
awsChunkedEncodingStream.push("\r\n")
|
|
25233
|
+
if (!awsChunkedEncodingStream.push("\r\n")) {
|
|
25234
|
+
readable.pause();
|
|
25235
|
+
}
|
|
24607
25236
|
});
|
|
25237
|
+
readable.on("error", (err) => {
|
|
25238
|
+
awsChunkedEncodingStream.destroy(err);
|
|
25239
|
+
});
|
|
25240
|
+
readable.pause();
|
|
24608
25241
|
readable.on("end", async () => {
|
|
24609
|
-
|
|
25242
|
+
try {
|
|
25243
|
+
awsChunkedEncodingStream.push(`0\r
|
|
24610
25244
|
`);
|
|
24611
|
-
|
|
24612
|
-
|
|
24613
|
-
|
|
25245
|
+
if (checksumRequired) {
|
|
25246
|
+
const checksum = base64Encoder(await digest3);
|
|
25247
|
+
awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r
|
|
24614
25248
|
`);
|
|
24615
|
-
|
|
25249
|
+
awsChunkedEncodingStream.push(`\r
|
|
24616
25250
|
`);
|
|
25251
|
+
}
|
|
25252
|
+
awsChunkedEncodingStream.push(null);
|
|
25253
|
+
} catch (err) {
|
|
25254
|
+
awsChunkedEncodingStream.destroy(err);
|
|
24617
25255
|
}
|
|
24618
|
-
awsChunkedEncodingStream.push(null);
|
|
24619
25256
|
});
|
|
24620
25257
|
return awsChunkedEncodingStream;
|
|
24621
25258
|
}
|
|
@@ -26961,7 +27598,7 @@ var init_HttpProtocol = __esm({
|
|
|
26961
27598
|
constructor(options) {
|
|
26962
27599
|
super();
|
|
26963
27600
|
this.options = options;
|
|
26964
|
-
this.compositeErrorRegistry = TypeRegistry
|
|
27601
|
+
this.compositeErrorRegistry = new TypeRegistry(options.defaultNamespace);
|
|
26965
27602
|
for (const etr of options.errorTypeRegistries ?? []) {
|
|
26966
27603
|
this.compositeErrorRegistry.copyFrom(etr);
|
|
26967
27604
|
}
|
|
@@ -27055,6 +27692,44 @@ var init_HttpProtocol = __esm({
|
|
|
27055
27692
|
cfId: output.headers["x-amz-cf-id"]
|
|
27056
27693
|
};
|
|
27057
27694
|
}
|
|
27695
|
+
resolveError(name, namespaces, registries) {
|
|
27696
|
+
const defaultErrorSchema = [-3, "", "Error", 0, [], [], 0];
|
|
27697
|
+
let schema;
|
|
27698
|
+
for (const registry of registries) {
|
|
27699
|
+
for (const ns of namespaces) {
|
|
27700
|
+
try {
|
|
27701
|
+
if (ns === "*") {
|
|
27702
|
+
schema = registry.getSchema(name);
|
|
27703
|
+
} else {
|
|
27704
|
+
schema = registry.getSchema(ns + "#" + name);
|
|
27705
|
+
}
|
|
27706
|
+
const errorCtor = registry.getErrorCtor(schema);
|
|
27707
|
+
if (errorCtor) {
|
|
27708
|
+
return [schema, errorCtor, "modeled"];
|
|
27709
|
+
} else {
|
|
27710
|
+
const syntheticErrorSchema = registry.getBaseException();
|
|
27711
|
+
if (syntheticErrorSchema) {
|
|
27712
|
+
const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
|
|
27713
|
+
if (syntheticErrorCtor) {
|
|
27714
|
+
return [schema, syntheticErrorCtor, "synthetic"];
|
|
27715
|
+
}
|
|
27716
|
+
}
|
|
27717
|
+
}
|
|
27718
|
+
} catch (ignored) {
|
|
27719
|
+
}
|
|
27720
|
+
}
|
|
27721
|
+
}
|
|
27722
|
+
for (const registry of registries) {
|
|
27723
|
+
const syntheticErrorSchema = registry.getBaseException();
|
|
27724
|
+
if (syntheticErrorSchema) {
|
|
27725
|
+
const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
|
|
27726
|
+
if (syntheticErrorCtor) {
|
|
27727
|
+
return [syntheticErrorSchema, syntheticErrorCtor, "synthetic"];
|
|
27728
|
+
}
|
|
27729
|
+
}
|
|
27730
|
+
}
|
|
27731
|
+
return [defaultErrorSchema, Error, "native"];
|
|
27732
|
+
}
|
|
27058
27733
|
async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
|
|
27059
27734
|
const eventStreamSerde = await this.loadEventStreamCapability();
|
|
27060
27735
|
return eventStreamSerde.serializeEventStream({
|
|
@@ -27083,13 +27758,6 @@ var init_HttpProtocol = __esm({
|
|
|
27083
27758
|
compositeErrorRegistry: this.compositeErrorRegistry
|
|
27084
27759
|
});
|
|
27085
27760
|
}
|
|
27086
|
-
resolveEventStreamMarshaller(importedProvider) {
|
|
27087
|
-
const context = this.serdeContext;
|
|
27088
|
-
if (context.eventStreamMarshaller) {
|
|
27089
|
-
return context.eventStreamMarshaller;
|
|
27090
|
-
}
|
|
27091
|
-
return importedProvider(this.serdeContext);
|
|
27092
|
-
}
|
|
27093
27761
|
getDefaultContentType() {
|
|
27094
27762
|
throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
|
27095
27763
|
}
|
|
@@ -27108,6 +27776,13 @@ var init_HttpProtocol = __esm({
|
|
|
27108
27776
|
}
|
|
27109
27777
|
return context.eventStreamMarshaller;
|
|
27110
27778
|
}
|
|
27779
|
+
resolveEventStreamMarshaller(importedProvider) {
|
|
27780
|
+
const context = this.serdeContext;
|
|
27781
|
+
if (context.eventStreamMarshaller) {
|
|
27782
|
+
return context.eventStreamMarshaller;
|
|
27783
|
+
}
|
|
27784
|
+
return importedProvider(this.serdeContext);
|
|
27785
|
+
}
|
|
27111
27786
|
};
|
|
27112
27787
|
}
|
|
27113
27788
|
});
|
|
@@ -27154,11 +27829,11 @@ var init_HttpBindingProtocol = __esm({
|
|
|
27154
27829
|
const opTraits = translateTraits(operationSchema.traits);
|
|
27155
27830
|
if (opTraits.http) {
|
|
27156
27831
|
request.method = opTraits.http[0];
|
|
27157
|
-
const [
|
|
27832
|
+
const [path15, search] = opTraits.http[1].split("?");
|
|
27158
27833
|
if (request.path == "/") {
|
|
27159
|
-
request.path =
|
|
27834
|
+
request.path = path15;
|
|
27160
27835
|
} else {
|
|
27161
|
-
request.path +=
|
|
27836
|
+
request.path += path15;
|
|
27162
27837
|
}
|
|
27163
27838
|
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
27164
27839
|
for (const [key, value] of traitSearchParams) {
|
|
@@ -27576,8 +28251,8 @@ var init_requestBuilder = __esm({
|
|
|
27576
28251
|
return this;
|
|
27577
28252
|
}
|
|
27578
28253
|
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
|
|
27579
|
-
this.resolvePathStack.push((
|
|
27580
|
-
this.path = resolvedPath(
|
|
28254
|
+
this.resolvePathStack.push((path15) => {
|
|
28255
|
+
this.path = resolvedPath(path15, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
|
|
27581
28256
|
});
|
|
27582
28257
|
return this;
|
|
27583
28258
|
}
|
|
@@ -28197,7 +28872,7 @@ var init_service_error_classification = __esm({
|
|
|
28197
28872
|
return errorMessages.has(error2.message);
|
|
28198
28873
|
}, "isBrowserNetworkError");
|
|
28199
28874
|
isThrottlingError = /* @__PURE__ */ __name((error2) => error2.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error2.name) || error2.$retryable?.throttling == true, "isThrottlingError");
|
|
28200
|
-
isTransientError = /* @__PURE__ */ __name((error2, depth = 0) => isRetryableByTrait(error2) || isClockSkewCorrectedError(error2) || error2.name === "InvalidSignatureException" && error2.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error2.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error2?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error2?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error2.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error2) || isNodeJsHttp2TransientError(error2) || error2.cause !== void 0 && depth <= 10 && isTransientError(error2.cause, depth + 1), "isTransientError");
|
|
28875
|
+
isTransientError = /* @__PURE__ */ __name((error2, depth = 0) => error2?.name !== "AbortError" && (isRetryableByTrait(error2) || isClockSkewCorrectedError(error2) || error2.name === "InvalidSignatureException" && error2.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error2.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error2?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error2?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error2.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error2) || isNodeJsHttp2TransientError(error2) || error2.cause !== void 0 && depth <= 10 && isTransientError(error2.cause, depth + 1)), "isTransientError");
|
|
28201
28876
|
isServerError = /* @__PURE__ */ __name((error2) => {
|
|
28202
28877
|
if (error2.$metadata?.httpStatusCode !== void 0) {
|
|
28203
28878
|
const statusCode = error2.$metadata.httpStatusCode;
|
|
@@ -29763,9 +30438,9 @@ var init_createPaginator = __esm({
|
|
|
29763
30438
|
return await client.send(command6, ...args);
|
|
29764
30439
|
}, "makePagedClientRequest");
|
|
29765
30440
|
__name(createPaginator, "createPaginator");
|
|
29766
|
-
get = /* @__PURE__ */ __name((fromObject,
|
|
30441
|
+
get = /* @__PURE__ */ __name((fromObject, path15) => {
|
|
29767
30442
|
let cursor2 = fromObject;
|
|
29768
|
-
const pathComponents =
|
|
30443
|
+
const pathComponents = path15.split(".");
|
|
29769
30444
|
for (const step of pathComponents) {
|
|
29770
30445
|
if (!cursor2 || typeof cursor2 !== "object") {
|
|
29771
30446
|
return void 0;
|
|
@@ -32052,7 +32727,7 @@ var init_resolveAwsSdkSigV4AConfig = __esm({
|
|
|
32052
32727
|
// ../../node_modules/@smithy/signature-v4/dist-cjs/index.js
|
|
32053
32728
|
var require_dist_cjs2 = __commonJS({
|
|
32054
32729
|
"../../node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2) {
|
|
32055
|
-
var { fromUtf8: fromUtf83, fromHex: fromHex2, toHex: toHex2, toUint8Array: toUint8Array2, isArrayBuffer: isArrayBuffer2 } = (init_serde(), __toCommonJS(serde_exports));
|
|
32730
|
+
var { hasOwn: hasOwn2, fromUtf8: fromUtf83, fromHex: fromHex2, toHex: toHex2, toUint8Array: toUint8Array2, isArrayBuffer: isArrayBuffer2 } = (init_serde(), __toCommonJS(serde_exports));
|
|
32056
32731
|
var { normalizeProvider: normalizeProvider3 } = (init_client2(), __toCommonJS(client_exports));
|
|
32057
32732
|
var { escapeUri: escapeUri2, HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
|
|
32058
32733
|
var HeaderFormatter = class {
|
|
@@ -32061,7 +32736,9 @@ var require_dist_cjs2 = __commonJS({
|
|
|
32061
32736
|
}
|
|
32062
32737
|
format(headers) {
|
|
32063
32738
|
const chunks = [];
|
|
32064
|
-
for (const headerName
|
|
32739
|
+
for (const headerName in headers) {
|
|
32740
|
+
if (!hasOwn2(headers, headerName))
|
|
32741
|
+
continue;
|
|
32065
32742
|
const bytes = fromUtf83(headerName);
|
|
32066
32743
|
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
32067
32744
|
}
|
|
@@ -32076,27 +32753,27 @@ var require_dist_cjs2 = __commonJS({
|
|
|
32076
32753
|
formatHeaderValue(header) {
|
|
32077
32754
|
switch (header.type) {
|
|
32078
32755
|
case "boolean":
|
|
32079
|
-
return Uint8Array.from([header.value ?
|
|
32756
|
+
return Uint8Array.from([header.value ? 0 : 1]);
|
|
32080
32757
|
case "byte":
|
|
32081
|
-
return Uint8Array.from([
|
|
32758
|
+
return Uint8Array.from([2, header.value]);
|
|
32082
32759
|
case "short":
|
|
32083
32760
|
const shortView = new DataView(new ArrayBuffer(3));
|
|
32084
|
-
shortView.setUint8(0,
|
|
32761
|
+
shortView.setUint8(0, 3);
|
|
32085
32762
|
shortView.setInt16(1, header.value, false);
|
|
32086
32763
|
return new Uint8Array(shortView.buffer);
|
|
32087
32764
|
case "integer":
|
|
32088
32765
|
const intView = new DataView(new ArrayBuffer(5));
|
|
32089
|
-
intView.setUint8(0,
|
|
32766
|
+
intView.setUint8(0, 4);
|
|
32090
32767
|
intView.setInt32(1, header.value, false);
|
|
32091
32768
|
return new Uint8Array(intView.buffer);
|
|
32092
32769
|
case "long":
|
|
32093
32770
|
const longBytes = new Uint8Array(9);
|
|
32094
|
-
longBytes[0] =
|
|
32771
|
+
longBytes[0] = 5;
|
|
32095
32772
|
longBytes.set(header.value.bytes, 1);
|
|
32096
32773
|
return longBytes;
|
|
32097
32774
|
case "binary":
|
|
32098
32775
|
const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
|
|
32099
|
-
binView.setUint8(0,
|
|
32776
|
+
binView.setUint8(0, 6);
|
|
32100
32777
|
binView.setUint16(1, header.value.byteLength, false);
|
|
32101
32778
|
const binBytes = new Uint8Array(binView.buffer);
|
|
32102
32779
|
binBytes.set(header.value, 3);
|
|
@@ -32104,14 +32781,14 @@ var require_dist_cjs2 = __commonJS({
|
|
|
32104
32781
|
case "string":
|
|
32105
32782
|
const utf8Bytes = fromUtf83(header.value);
|
|
32106
32783
|
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
|
|
32107
|
-
strView.setUint8(0,
|
|
32784
|
+
strView.setUint8(0, 7);
|
|
32108
32785
|
strView.setUint16(1, utf8Bytes.byteLength, false);
|
|
32109
32786
|
const strBytes = new Uint8Array(strView.buffer);
|
|
32110
32787
|
strBytes.set(utf8Bytes, 3);
|
|
32111
32788
|
return strBytes;
|
|
32112
32789
|
case "timestamp":
|
|
32113
32790
|
const tsBytes = new Uint8Array(9);
|
|
32114
|
-
tsBytes[0] =
|
|
32791
|
+
tsBytes[0] = 8;
|
|
32115
32792
|
tsBytes.set(Int642.fromNumber(header.value.valueOf()).bytes, 1);
|
|
32116
32793
|
return tsBytes;
|
|
32117
32794
|
case "uuid":
|
|
@@ -32119,7 +32796,7 @@ var require_dist_cjs2 = __commonJS({
|
|
|
32119
32796
|
throw new Error(`Invalid UUID received: ${header.value}`);
|
|
32120
32797
|
}
|
|
32121
32798
|
const uuidBytes = new Uint8Array(17);
|
|
32122
|
-
uuidBytes[0] =
|
|
32799
|
+
uuidBytes[0] = 9;
|
|
32123
32800
|
uuidBytes.set(fromHex2(header.value.replace(/-/g, "")), 1);
|
|
32124
32801
|
return uuidBytes;
|
|
32125
32802
|
}
|
|
@@ -32232,7 +32909,9 @@ var require_dist_cjs2 = __commonJS({
|
|
|
32232
32909
|
var getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => {
|
|
32233
32910
|
const keys = [];
|
|
32234
32911
|
const serialized = {};
|
|
32235
|
-
for (const key
|
|
32912
|
+
for (const key in query) {
|
|
32913
|
+
if (!hasOwn2(query, key))
|
|
32914
|
+
continue;
|
|
32236
32915
|
if (key.toLowerCase() === SIGNATURE_HEADER) {
|
|
32237
32916
|
continue;
|
|
32238
32917
|
}
|
|
@@ -32297,10 +32976,10 @@ ${longDate}
|
|
|
32297
32976
|
${credentialScope}
|
|
32298
32977
|
${toHex2(hashedRequest)}`;
|
|
32299
32978
|
}
|
|
32300
|
-
getCanonicalPath({ path:
|
|
32979
|
+
getCanonicalPath({ path: path15 }) {
|
|
32301
32980
|
if (this.uriEscapePath) {
|
|
32302
32981
|
const normalizedPathSegments = [];
|
|
32303
|
-
for (const pathSegment of
|
|
32982
|
+
for (const pathSegment of path15.split("/")) {
|
|
32304
32983
|
if (pathSegment?.length === 0)
|
|
32305
32984
|
continue;
|
|
32306
32985
|
if (pathSegment === ".")
|
|
@@ -32311,11 +32990,11 @@ ${toHex2(hashedRequest)}`;
|
|
|
32311
32990
|
normalizedPathSegments.push(pathSegment);
|
|
32312
32991
|
}
|
|
32313
32992
|
}
|
|
32314
|
-
const normalizedPath = `${
|
|
32993
|
+
const normalizedPath = `${path15?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path15?.endsWith("/") ? "/" : ""}`;
|
|
32315
32994
|
const doubleEncoded = escapeUri2(normalizedPath);
|
|
32316
32995
|
return doubleEncoded.replace(/%2F/g, "/");
|
|
32317
32996
|
}
|
|
32318
|
-
return
|
|
32997
|
+
return path15;
|
|
32319
32998
|
}
|
|
32320
32999
|
validateResolvedCredentials(credentials) {
|
|
32321
33000
|
if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
|
|
@@ -32380,7 +33059,9 @@ ${toHex2(hashedRequest)}`;
|
|
|
32380
33059
|
return canonical;
|
|
32381
33060
|
}, "getCanonicalHeaders");
|
|
32382
33061
|
var getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => {
|
|
32383
|
-
for (const headerName
|
|
33062
|
+
for (const headerName in headers) {
|
|
33063
|
+
if (!hasOwn2(headers, headerName))
|
|
33064
|
+
continue;
|
|
32384
33065
|
if (headerName.toLowerCase() === SHA256_HEADER) {
|
|
32385
33066
|
return headers[headerName];
|
|
32386
33067
|
}
|
|
@@ -32396,7 +33077,9 @@ ${toHex2(hashedRequest)}`;
|
|
|
32396
33077
|
}, "getPayloadHash");
|
|
32397
33078
|
var hasHeader2 = /* @__PURE__ */ __name((soughtHeader, headers) => {
|
|
32398
33079
|
soughtHeader = soughtHeader.toLowerCase();
|
|
32399
|
-
for (const headerName
|
|
33080
|
+
for (const headerName in headers) {
|
|
33081
|
+
if (!hasOwn2(headers, headerName))
|
|
33082
|
+
continue;
|
|
32400
33083
|
if (soughtHeader === headerName.toLowerCase()) {
|
|
32401
33084
|
return true;
|
|
32402
33085
|
}
|
|
@@ -32405,7 +33088,9 @@ ${toHex2(hashedRequest)}`;
|
|
|
32405
33088
|
}, "hasHeader");
|
|
32406
33089
|
var moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => {
|
|
32407
33090
|
const { headers, query = {} } = HttpRequest2.clone(request);
|
|
32408
|
-
for (const name
|
|
33091
|
+
for (const name in headers) {
|
|
33092
|
+
if (!hasOwn2(headers, name))
|
|
33093
|
+
continue;
|
|
32409
33094
|
const lname = name.toLowerCase();
|
|
32410
33095
|
if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {
|
|
32411
33096
|
query[name] = headers[name];
|
|
@@ -32420,7 +33105,9 @@ ${toHex2(hashedRequest)}`;
|
|
|
32420
33105
|
}, "moveHeadersToQuery");
|
|
32421
33106
|
var prepareRequest = /* @__PURE__ */ __name((request) => {
|
|
32422
33107
|
request = HttpRequest2.clone(request);
|
|
32423
|
-
for (const headerName
|
|
33108
|
+
for (const headerName in request.headers) {
|
|
33109
|
+
if (!hasOwn2(request.headers, headerName))
|
|
33110
|
+
continue;
|
|
32424
33111
|
if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
|
32425
33112
|
delete request.headers[headerName];
|
|
32426
33113
|
}
|
|
@@ -33502,12 +34189,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33502
34189
|
const password = request.password ?? "";
|
|
33503
34190
|
auth = `${username}:${password}`;
|
|
33504
34191
|
}
|
|
33505
|
-
let
|
|
34192
|
+
let path15 = request.path;
|
|
33506
34193
|
if (queryString) {
|
|
33507
|
-
|
|
34194
|
+
path15 += `?${queryString}`;
|
|
33508
34195
|
}
|
|
33509
34196
|
if (request.fragment) {
|
|
33510
|
-
|
|
34197
|
+
path15 += `#${request.fragment}`;
|
|
33511
34198
|
}
|
|
33512
34199
|
let hostname = request.hostname ?? "";
|
|
33513
34200
|
if (hostname[0] === "[" && hostname.endsWith("]")) {
|
|
@@ -33519,7 +34206,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33519
34206
|
headers: request.headers,
|
|
33520
34207
|
host: hostname,
|
|
33521
34208
|
method: request.method,
|
|
33522
|
-
path:
|
|
34209
|
+
path: path15,
|
|
33523
34210
|
port: request.port,
|
|
33524
34211
|
agent,
|
|
33525
34212
|
auth
|
|
@@ -33668,6 +34355,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33668
34355
|
destroy() {
|
|
33669
34356
|
this.refs = 0;
|
|
33670
34357
|
if (!this.session.destroyed) {
|
|
34358
|
+
this.session.setTimeout(0);
|
|
33671
34359
|
this.session.destroy();
|
|
33672
34360
|
}
|
|
33673
34361
|
}
|
|
@@ -33786,9 +34474,8 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33786
34474
|
session.on("error", ensureDestroyed);
|
|
33787
34475
|
session.on("frameError", ensureDestroyed);
|
|
33788
34476
|
session.on("close", ensureDestroyed);
|
|
33789
|
-
|
|
33790
|
-
|
|
33791
|
-
}
|
|
34477
|
+
const timeout = connectionConfiguration.requestTimeout ?? 3e5;
|
|
34478
|
+
session.setTimeout(timeout, ensureDestroyed);
|
|
33792
34479
|
ref.retain();
|
|
33793
34480
|
return ref;
|
|
33794
34481
|
}
|
|
@@ -33940,16 +34627,16 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33940
34627
|
reject(err);
|
|
33941
34628
|
}, "rejectWithDestroy");
|
|
33942
34629
|
const queryString = query ? buildQueryString2(query) : "";
|
|
33943
|
-
let
|
|
34630
|
+
let path15 = request.path;
|
|
33944
34631
|
if (queryString) {
|
|
33945
|
-
|
|
34632
|
+
path15 += `?${queryString}`;
|
|
33946
34633
|
}
|
|
33947
34634
|
if (request.fragment) {
|
|
33948
|
-
|
|
34635
|
+
path15 += `#${request.fragment}`;
|
|
33949
34636
|
}
|
|
33950
34637
|
const clientHttp2Stream = session.request({
|
|
33951
34638
|
...request.headers,
|
|
33952
|
-
[constants.HTTP2_HEADER_PATH]:
|
|
34639
|
+
[constants.HTTP2_HEADER_PATH]: path15,
|
|
33953
34640
|
[constants.HTTP2_HEADER_METHOD]: method
|
|
33954
34641
|
});
|
|
33955
34642
|
if (effectiveRequestTimeout) {
|
|
@@ -33991,6 +34678,9 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
33991
34678
|
resolve5({ response: httpResponse });
|
|
33992
34679
|
if (useIsolatedSession) {
|
|
33993
34680
|
session.close();
|
|
34681
|
+
clientHttp2Stream.on("end", () => {
|
|
34682
|
+
ref.destroy();
|
|
34683
|
+
});
|
|
33994
34684
|
}
|
|
33995
34685
|
});
|
|
33996
34686
|
clientHttp2Stream.on("close", () => {
|
|
@@ -34000,7 +34690,11 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
34000
34690
|
this.connectionManager.release(requestContext, ref);
|
|
34001
34691
|
}
|
|
34002
34692
|
if (!fulfilled) {
|
|
34003
|
-
|
|
34693
|
+
const error2 = new Error("Unexpected error: http2 request did not get a response");
|
|
34694
|
+
if (session.destroyed) {
|
|
34695
|
+
error2.name = "TimeoutError";
|
|
34696
|
+
}
|
|
34697
|
+
rejectWithDestroy(error2);
|
|
34004
34698
|
}
|
|
34005
34699
|
});
|
|
34006
34700
|
writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);
|
|
@@ -34031,7 +34725,7 @@ var require_dist_cjs6 = __commonJS({
|
|
|
34031
34725
|
var { setCredentialFeature: setCredentialFeature2 } = (init_client3(), __toCommonJS(client_exports2));
|
|
34032
34726
|
var { CredentialsProviderError: CredentialsProviderError2 } = (init_config2(), __toCommonJS(config_exports));
|
|
34033
34727
|
var { NodeHttpHandler } = require_dist_cjs5();
|
|
34034
|
-
var
|
|
34728
|
+
var fs14 = require("node:fs/promises");
|
|
34035
34729
|
var { HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
|
|
34036
34730
|
var { sdkStreamMixin: sdkStreamMixin3, parseRfc3339DateTime: parseRfc3339DateTime2 } = (init_serde(), __toCommonJS(serde_exports));
|
|
34037
34731
|
var ECS_CONTAINER_HOST = "169.254.170.2";
|
|
@@ -34157,7 +34851,7 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
|
|
|
34157
34851
|
const provider = retryWrapper(async () => {
|
|
34158
34852
|
const request = createGetRequest(url);
|
|
34159
34853
|
if (tokenFile) {
|
|
34160
|
-
request.headers.Authorization = validateToken((await
|
|
34854
|
+
request.headers.Authorization = validateToken((await fs14.readFile(tokenFile)).toString());
|
|
34161
34855
|
} else if (token) {
|
|
34162
34856
|
request.headers.Authorization = validateToken(token);
|
|
34163
34857
|
}
|
|
@@ -34272,7 +34966,7 @@ var init_package = __esm({
|
|
|
34272
34966
|
"../../node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
34273
34967
|
package_default = {
|
|
34274
34968
|
name: "@aws-sdk/nested-clients",
|
|
34275
|
-
version: "3.997.
|
|
34969
|
+
version: "3.997.46",
|
|
34276
34970
|
description: "Nested clients for AWS SDK packages.",
|
|
34277
34971
|
homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
|
|
34278
34972
|
license: "Apache-2.0",
|
|
@@ -34372,13 +35066,13 @@ var init_package = __esm({
|
|
|
34372
35066
|
"test:watch": "yarn g:vitest watch"
|
|
34373
35067
|
},
|
|
34374
35068
|
dependencies: {
|
|
34375
|
-
"@aws-sdk/core": "^3.
|
|
34376
|
-
"@aws-sdk/signature-v4-multi-region": "^3.996.
|
|
34377
|
-
"@aws-sdk/types": "^3.974.
|
|
34378
|
-
"@smithy/core": "^3.
|
|
34379
|
-
"@smithy/fetch-http-handler": "^5.
|
|
34380
|
-
"@smithy/node-http-handler": "^4.
|
|
34381
|
-
"@smithy/types": "^4.
|
|
35069
|
+
"@aws-sdk/core": "^3.978.1",
|
|
35070
|
+
"@aws-sdk/signature-v4-multi-region": "^3.996.47",
|
|
35071
|
+
"@aws-sdk/types": "^3.974.6",
|
|
35072
|
+
"@smithy/core": "^3.35.0",
|
|
35073
|
+
"@smithy/fetch-http-handler": "^5.8.0",
|
|
35074
|
+
"@smithy/node-http-handler": "^4.12.1",
|
|
35075
|
+
"@smithy/types": "^4.19.0",
|
|
34382
35076
|
tslib: "^2.6.2"
|
|
34383
35077
|
},
|
|
34384
35078
|
devDependencies: {
|
|
@@ -34423,7 +35117,6 @@ var init_cbor_types = __esm({
|
|
|
34423
35117
|
var loadSmithyRpcV2CborErrorCode;
|
|
34424
35118
|
var init_parseCborBody = __esm({
|
|
34425
35119
|
"../../node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js"() {
|
|
34426
|
-
init_transport();
|
|
34427
35120
|
loadSmithyRpcV2CborErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
34428
35121
|
const sanitizeErrorCode2 = /* @__PURE__ */ __name((rawValue) => {
|
|
34429
35122
|
let cleanValue = rawValue;
|
|
@@ -34436,26 +35129,11 @@ var init_parseCborBody = __esm({
|
|
|
34436
35129
|
if (cleanValue.indexOf(":") >= 0) {
|
|
34437
35130
|
cleanValue = cleanValue.split(":")[0];
|
|
34438
35131
|
}
|
|
34439
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
34440
|
-
cleanValue = cleanValue.split("#")[1];
|
|
34441
|
-
}
|
|
34442
35132
|
return cleanValue;
|
|
34443
35133
|
}, "sanitizeErrorCode");
|
|
34444
35134
|
if (data["__type"] !== void 0) {
|
|
34445
35135
|
return sanitizeErrorCode2(data["__type"]);
|
|
34446
35136
|
}
|
|
34447
|
-
let codeKey;
|
|
34448
|
-
for (const key in data) {
|
|
34449
|
-
if (!hasOwn(data, key))
|
|
34450
|
-
continue;
|
|
34451
|
-
if (key.toLowerCase() === "code") {
|
|
34452
|
-
codeKey = key;
|
|
34453
|
-
break;
|
|
34454
|
-
}
|
|
34455
|
-
}
|
|
34456
|
-
if (codeKey && data[codeKey] !== void 0) {
|
|
34457
|
-
return sanitizeErrorCode2(data[codeKey]);
|
|
34458
|
-
}
|
|
34459
35137
|
}, "loadSmithyRpcV2CborErrorCode");
|
|
34460
35138
|
}
|
|
34461
35139
|
});
|
|
@@ -35813,11 +36491,11 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
35813
36491
|
}
|
|
35814
36492
|
}
|
|
35815
36493
|
const { service, operation: operation2 } = getSmithyContext(context);
|
|
35816
|
-
const
|
|
36494
|
+
const path15 = `/service/${service}/operation/${operation2}`;
|
|
35817
36495
|
if (request.path.endsWith("/")) {
|
|
35818
|
-
request.path +=
|
|
36496
|
+
request.path += path15.slice(1);
|
|
35819
36497
|
} else {
|
|
35820
|
-
request.path +=
|
|
36498
|
+
request.path += path15;
|
|
35821
36499
|
}
|
|
35822
36500
|
return request;
|
|
35823
36501
|
}
|
|
@@ -35825,36 +36503,37 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
35825
36503
|
return super.deserializeResponse(operationSchema, context, response);
|
|
35826
36504
|
}
|
|
35827
36505
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
35828
|
-
const
|
|
36506
|
+
const errorIdentifier = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
36507
|
+
const preferredNamespaces = ["*"];
|
|
36508
|
+
const { defaultNamespace } = this.options;
|
|
36509
|
+
preferredNamespaces.unshift(defaultNamespace);
|
|
36510
|
+
const [namespace, errorShapeName] = (() => {
|
|
36511
|
+
if (errorIdentifier.includes("#")) {
|
|
36512
|
+
return errorIdentifier.split("#");
|
|
36513
|
+
}
|
|
36514
|
+
return [void 0, errorIdentifier];
|
|
36515
|
+
})();
|
|
36516
|
+
if (namespace) {
|
|
36517
|
+
preferredNamespaces.unshift(namespace);
|
|
36518
|
+
}
|
|
35829
36519
|
const errorMetadata = {
|
|
35830
36520
|
$metadata: metadata,
|
|
35831
|
-
$fault: response.statusCode
|
|
36521
|
+
$fault: response.statusCode < 500 ? "client" : "server"
|
|
35832
36522
|
};
|
|
35833
|
-
|
|
35834
|
-
if (
|
|
35835
|
-
|
|
35836
|
-
}
|
|
35837
|
-
|
|
35838
|
-
const
|
|
35839
|
-
|
|
35840
|
-
let errorSchema;
|
|
35841
|
-
try {
|
|
35842
|
-
errorSchema = registry.getSchema(errorName);
|
|
35843
|
-
} catch (ignored) {
|
|
36523
|
+
const preferredRegistries = [this.compositeErrorRegistry];
|
|
36524
|
+
if (namespace) {
|
|
36525
|
+
preferredRegistries.push(TypeRegistry.for(namespace));
|
|
36526
|
+
}
|
|
36527
|
+
preferredRegistries.push(TypeRegistry.for(defaultNamespace));
|
|
36528
|
+
const [errorSchema, ErrorCtor, errorMode] = this.resolveError(errorShapeName, preferredNamespaces, preferredRegistries);
|
|
36529
|
+
if (errorMode === "native" || errorMode === "synthetic") {
|
|
35844
36530
|
if (dataObject.Message) {
|
|
35845
36531
|
dataObject.message = dataObject.Message;
|
|
35846
36532
|
}
|
|
35847
|
-
const
|
|
35848
|
-
|
|
35849
|
-
const baseExceptionSchema = registry.getBaseException();
|
|
35850
|
-
if (baseExceptionSchema) {
|
|
35851
|
-
const ErrorCtor2 = registry.getErrorCtor(baseExceptionSchema);
|
|
35852
|
-
throw Object.assign(new ErrorCtor2({ name: errorName }), errorMetadata, dataObject);
|
|
35853
|
-
}
|
|
35854
|
-
throw Object.assign(new Error(errorName), errorMetadata, dataObject);
|
|
36533
|
+
const error2 = errorMode === "synthetic" ? new ErrorCtor({ name: errorShapeName }) : new Error(errorShapeName);
|
|
36534
|
+
throw Object.assign(error2, errorMetadata, dataObject);
|
|
35855
36535
|
}
|
|
35856
36536
|
const ns = NormalizedSchema.of(errorSchema);
|
|
35857
|
-
const ErrorCtor = registry.getErrorCtor(errorSchema);
|
|
35858
36537
|
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
35859
36538
|
const exception = new ErrorCtor({});
|
|
35860
36539
|
const output = {};
|
|
@@ -39900,10 +40579,10 @@ var init_schemas_0 = __esm({
|
|
|
39900
40579
|
_se = "server";
|
|
39901
40580
|
_tT = "tokenType";
|
|
39902
40581
|
n0 = "com.amazonaws.ssooidc";
|
|
39903
|
-
_s_registry = TypeRegistry
|
|
40582
|
+
_s_registry = new TypeRegistry(_s);
|
|
39904
40583
|
SSOOIDCServiceException$ = [-3, _s, "SSOOIDCServiceException", 0, [], []];
|
|
39905
40584
|
_s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);
|
|
39906
|
-
n0_registry = TypeRegistry
|
|
40585
|
+
n0_registry = new TypeRegistry(n0);
|
|
39907
40586
|
AccessDeniedException$ = [
|
|
39908
40587
|
-3,
|
|
39909
40588
|
n0,
|
|
@@ -40851,10 +41530,10 @@ var init_schemas_02 = __esm({
|
|
|
40851
41530
|
_sT = "sessionToken";
|
|
40852
41531
|
_xasbt = "x-amz-sso_bearer_token";
|
|
40853
41532
|
n02 = "com.amazonaws.sso";
|
|
40854
|
-
_s_registry2 = TypeRegistry
|
|
41533
|
+
_s_registry2 = new TypeRegistry(_s2);
|
|
40855
41534
|
SSOServiceException$ = [-3, _s2, "SSOServiceException", 0, [], []];
|
|
40856
41535
|
_s_registry2.registerError(SSOServiceException$, SSOServiceException);
|
|
40857
|
-
n0_registry2 = TypeRegistry
|
|
41536
|
+
n0_registry2 = new TypeRegistry(n02);
|
|
40858
41537
|
InvalidRequestException$2 = [
|
|
40859
41538
|
-3,
|
|
40860
41539
|
n02,
|
|
@@ -42058,7 +42737,7 @@ var init_errors3 = __esm({
|
|
|
42058
42737
|
});
|
|
42059
42738
|
|
|
42060
42739
|
// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js
|
|
42061
|
-
var _A, _AKI, _AR, _ARI, _ARR, _ARRs, _ARU, _ARWWI, _ARWWIR, _ARWWIRs, _Au, _C, _CA, _DS, _E, _EI, _ETE2, _IDPCEE, _IDPRCE, _IITE, _K, _MPDE, _P, _PA, _PAr, _PC, _PCLT, _PCr, _PDT, _PI, _PPS, _PPTLE, _Pr, _RA, _RDE, _RSN, _SAK, _SFWIT, _SI, _SN, _ST, _T, _TC, _TTK, _Ta, _V, _WIT, _a, _aKST, _aQE, _c3, _cTT, _e3, _hE3, _m2, _pDLT, _s3, _tLT, n03, _s_registry3, STSServiceException$, n0_registry3, ExpiredTokenException$2, IDPCommunicationErrorException$, IDPRejectedClaimException$, InvalidIdentityTokenException$, MalformedPolicyDocumentException$, PackedPolicyTooLargeException$, RegionDisabledException$, errorTypeRegistries3, accessKeySecretType, clientTokenType, AssumedRoleUser$, AssumeRoleRequest$, AssumeRoleResponse$, AssumeRoleWithWebIdentityRequest$, AssumeRoleWithWebIdentityResponse$, Credentials$, PolicyDescriptorType$, ProvidedContext$, Tag$, policyDescriptorListType, ProvidedContextsListType, tagKeyListType, tagListType, AssumeRole$, AssumeRoleWithWebIdentity$;
|
|
42740
|
+
var _A, _AKI, _AR, _ARI, _ARR, _ARRs, _ARU, _ARWWI, _ARWWIR, _ARWWIRs, _Au, _C, _CA, _DS, _E, _EI, _ETE2, _IDPCEE, _IDPRCE, _IITE, _K, _MPDE, _MSTS, _P, _PA, _PAr, _PC, _PCLT, _PCr, _PDT, _PI, _PPS, _PPTLE, _Pr, _RA, _RDE, _RSN, _SAK, _SFWIT, _SI, _SN, _ST, _STS, _STU, _T, _TC, _TTK, _Ta, _V, _WIT, _a, _aKST, _aQE, _c3, _cTT, _e3, _hE3, _m2, _pDLT, _s3, _tLT, n03, _s_registry3, STSServiceException$, n0_registry3, ExpiredTokenException$2, IDPCommunicationErrorException$, IDPRejectedClaimException$, InvalidIdentityTokenException$, MalformedPolicyDocumentException$, PackedPolicyTooLargeException$, RegionDisabledException$, errorTypeRegistries3, accessKeySecretType, clientTokenType, AssumedRoleUser$, AssumeRoleRequest$, AssumeRoleResponse$, AssumeRoleWithWebIdentityRequest$, AssumeRoleWithWebIdentityResponse$, Credentials$, PolicyDescriptorType$, ProvidedContext$, Tag$, policyDescriptorListType, ProvidedContextsListType, tagKeyListType, tagListType, AssumeRole$, AssumeRoleWithWebIdentity$;
|
|
42062
42741
|
var init_schemas_03 = __esm({
|
|
42063
42742
|
"../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js"() {
|
|
42064
42743
|
init_schema4();
|
|
@@ -42086,6 +42765,7 @@ var init_schemas_03 = __esm({
|
|
|
42086
42765
|
_IITE = "InvalidIdentityTokenException";
|
|
42087
42766
|
_K = "Key";
|
|
42088
42767
|
_MPDE = "MalformedPolicyDocumentException";
|
|
42768
|
+
_MSTS = "MinimumSessionTokenSize";
|
|
42089
42769
|
_P = "Policy";
|
|
42090
42770
|
_PA = "PolicyArns";
|
|
42091
42771
|
_PAr = "ProviderArn";
|
|
@@ -42105,6 +42785,8 @@ var init_schemas_03 = __esm({
|
|
|
42105
42785
|
_SI = "SourceIdentity";
|
|
42106
42786
|
_SN = "SerialNumber";
|
|
42107
42787
|
_ST = "SessionToken";
|
|
42788
|
+
_STS = "SessionTokenSize";
|
|
42789
|
+
_STU = "SessionTokenUtilization";
|
|
42108
42790
|
_T = "Tags";
|
|
42109
42791
|
_TC = "TokenCode";
|
|
42110
42792
|
_TTK = "TransitiveTagKeys";
|
|
@@ -42123,10 +42805,10 @@ var init_schemas_03 = __esm({
|
|
|
42123
42805
|
_s3 = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
|
|
42124
42806
|
_tLT = "tagListType";
|
|
42125
42807
|
n03 = "com.amazonaws.sts";
|
|
42126
|
-
_s_registry3 = TypeRegistry
|
|
42808
|
+
_s_registry3 = new TypeRegistry(_s3);
|
|
42127
42809
|
STSServiceException$ = [-3, _s3, "STSServiceException", 0, [], []];
|
|
42128
42810
|
_s_registry3.registerError(STSServiceException$, STSServiceException);
|
|
42129
|
-
n0_registry3 = TypeRegistry
|
|
42811
|
+
n0_registry3 = new TypeRegistry(n03);
|
|
42130
42812
|
ExpiredTokenException$2 = [
|
|
42131
42813
|
-3,
|
|
42132
42814
|
n03,
|
|
@@ -42210,8 +42892,8 @@ var init_schemas_03 = __esm({
|
|
|
42210
42892
|
n03,
|
|
42211
42893
|
_ARR,
|
|
42212
42894
|
0,
|
|
42213
|
-
[_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
|
|
42214
|
-
[0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
|
|
42895
|
+
[_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC, _MSTS],
|
|
42896
|
+
[0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType, 1],
|
|
42215
42897
|
2
|
|
42216
42898
|
];
|
|
42217
42899
|
AssumeRoleResponse$ = [
|
|
@@ -42219,16 +42901,16 @@ var init_schemas_03 = __esm({
|
|
|
42219
42901
|
n03,
|
|
42220
42902
|
_ARRs,
|
|
42221
42903
|
0,
|
|
42222
|
-
[_C, _ARU, _PPS, _SI],
|
|
42223
|
-
[[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0]
|
|
42904
|
+
[_C, _ARU, _PPS, _SI, _STU, _STS],
|
|
42905
|
+
[[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0, 1, 1]
|
|
42224
42906
|
];
|
|
42225
42907
|
AssumeRoleWithWebIdentityRequest$ = [
|
|
42226
42908
|
3,
|
|
42227
42909
|
n03,
|
|
42228
42910
|
_ARWWIR,
|
|
42229
42911
|
0,
|
|
42230
|
-
[_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
|
|
42231
|
-
[0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
|
|
42912
|
+
[_RA, _RSN, _WIT, _PI, _PA, _P, _DS, _MSTS],
|
|
42913
|
+
[0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1, 1],
|
|
42232
42914
|
3
|
|
42233
42915
|
];
|
|
42234
42916
|
AssumeRoleWithWebIdentityResponse$ = [
|
|
@@ -42236,8 +42918,8 @@ var init_schemas_03 = __esm({
|
|
|
42236
42918
|
n03,
|
|
42237
42919
|
_ARWWIRs,
|
|
42238
42920
|
0,
|
|
42239
|
-
[_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
|
|
42240
|
-
[[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0]
|
|
42921
|
+
[_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI, _STU, _STS],
|
|
42922
|
+
[[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0, 1, 1]
|
|
42241
42923
|
];
|
|
42242
42924
|
Credentials$ = [
|
|
42243
42925
|
3,
|
|
@@ -43277,10 +43959,10 @@ var init_schemas_04 = __esm({
|
|
|
43277
43959
|
_tT2 = "tokenType";
|
|
43278
43960
|
_tt = "token_type";
|
|
43279
43961
|
n04 = "com.amazonaws.signin";
|
|
43280
|
-
_s_registry4 = TypeRegistry
|
|
43962
|
+
_s_registry4 = new TypeRegistry(_s4);
|
|
43281
43963
|
SigninServiceException$ = [-3, _s4, "SigninServiceException", 0, [], []];
|
|
43282
43964
|
_s_registry4.registerError(SigninServiceException$, SigninServiceException);
|
|
43283
|
-
n0_registry4 = TypeRegistry
|
|
43965
|
+
n0_registry4 = new TypeRegistry(n04);
|
|
43284
43966
|
AccessDeniedException$2 = [
|
|
43285
43967
|
-3,
|
|
43286
43968
|
n04,
|
|
@@ -43778,7 +44460,7 @@ var require_dist_cjs11 = __commonJS({
|
|
|
43778
44460
|
var { createHash: createHash6, createPrivateKey, createPublicKey, sign: sign3 } = require("node:crypto");
|
|
43779
44461
|
var { promises: promises2 } = require("node:fs");
|
|
43780
44462
|
var { homedir: homedir3 } = require("node:os");
|
|
43781
|
-
var { dirname: dirname3, join:
|
|
44463
|
+
var { dirname: dirname3, join: join16 } = require("node:path");
|
|
43782
44464
|
var LoginCredentialsFetcher = class _LoginCredentialsFetcher {
|
|
43783
44465
|
static {
|
|
43784
44466
|
__name(this, "LoginCredentialsFetcher");
|
|
@@ -43945,10 +44627,10 @@ var require_dist_cjs11 = __commonJS({
|
|
|
43945
44627
|
await promises2.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
|
|
43946
44628
|
}
|
|
43947
44629
|
getTokenFilePath() {
|
|
43948
|
-
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ??
|
|
44630
|
+
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join16(homedir3(), ".aws", "login", "cache");
|
|
43949
44631
|
const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
|
|
43950
44632
|
const loginSessionSha256 = createHash6("sha256").update(loginSessionBytes).digest("hex");
|
|
43951
|
-
return
|
|
44633
|
+
return join16(directory, `${loginSessionSha256}.json`);
|
|
43952
44634
|
}
|
|
43953
44635
|
derToRawSignature(derSignature) {
|
|
43954
44636
|
let offset = 2;
|
|
@@ -44439,6 +45121,7 @@ var require_dist_cjs15 = __commonJS({
|
|
|
44439
45121
|
if (!passiveLock) {
|
|
44440
45122
|
passiveLock = chain3(options).then((c6) => {
|
|
44441
45123
|
credentials = c6;
|
|
45124
|
+
}).catch(() => {
|
|
44442
45125
|
}).finally(() => {
|
|
44443
45126
|
passiveLock = void 0;
|
|
44444
45127
|
});
|
|
@@ -66136,10 +66819,10 @@ var init_schemas_05 = __esm({
|
|
|
66136
66819
|
_s5 = "smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity";
|
|
66137
66820
|
_se3 = "server";
|
|
66138
66821
|
n05 = "com.amazonaws.cognitoidentity";
|
|
66139
|
-
_s_registry5 = TypeRegistry
|
|
66822
|
+
_s_registry5 = new TypeRegistry(_s5);
|
|
66140
66823
|
CognitoIdentityServiceException$ = [-3, _s5, "CognitoIdentityServiceException", 0, [], []];
|
|
66141
66824
|
_s_registry5.registerError(CognitoIdentityServiceException$, CognitoIdentityServiceException);
|
|
66142
|
-
n0_registry5 = TypeRegistry
|
|
66825
|
+
n0_registry5 = new TypeRegistry(n05);
|
|
66143
66826
|
ExternalServiceException$ = [
|
|
66144
66827
|
-3,
|
|
66145
66828
|
n05,
|
|
@@ -67890,9 +68573,9 @@ var require_lib4 = __commonJS({
|
|
|
67890
68573
|
var require_build = __commonJS({
|
|
67891
68574
|
"../../node_modules/y18n/build/index.cjs"(exports2, module2) {
|
|
67892
68575
|
"use strict";
|
|
67893
|
-
var
|
|
68576
|
+
var fs14 = require("fs");
|
|
67894
68577
|
var util = require("util");
|
|
67895
|
-
var
|
|
68578
|
+
var path15 = require("path");
|
|
67896
68579
|
var shim;
|
|
67897
68580
|
var Y18N = class {
|
|
67898
68581
|
static {
|
|
@@ -68058,14 +68741,14 @@ var require_build = __commonJS({
|
|
|
68058
68741
|
__name(y18n$1, "y18n$1");
|
|
68059
68742
|
var nodePlatformShim = {
|
|
68060
68743
|
fs: {
|
|
68061
|
-
readFileSync:
|
|
68062
|
-
writeFile:
|
|
68744
|
+
readFileSync: fs14.readFileSync,
|
|
68745
|
+
writeFile: fs14.writeFile
|
|
68063
68746
|
},
|
|
68064
68747
|
format: util.format,
|
|
68065
|
-
resolve:
|
|
68748
|
+
resolve: path15.resolve,
|
|
68066
68749
|
exists: /* @__PURE__ */ __name((file) => {
|
|
68067
68750
|
try {
|
|
68068
|
-
return
|
|
68751
|
+
return fs14.statSync(file).isFile();
|
|
68069
68752
|
} catch (err) {
|
|
68070
68753
|
return false;
|
|
68071
68754
|
}
|
|
@@ -68083,8 +68766,8 @@ var require_build2 = __commonJS({
|
|
|
68083
68766
|
"../../node_modules/yargs-parser/build/index.cjs"(exports2, module2) {
|
|
68084
68767
|
"use strict";
|
|
68085
68768
|
var util = require("util");
|
|
68086
|
-
var
|
|
68087
|
-
var
|
|
68769
|
+
var path15 = require("path");
|
|
68770
|
+
var fs14 = require("fs");
|
|
68088
68771
|
function camelCase(str) {
|
|
68089
68772
|
const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
|
|
68090
68773
|
if (!isCamelCase) {
|
|
@@ -69066,13 +69749,13 @@ var require_build2 = __commonJS({
|
|
|
69066
69749
|
return env2;
|
|
69067
69750
|
}, "env"),
|
|
69068
69751
|
format: util.format,
|
|
69069
|
-
normalize:
|
|
69070
|
-
resolve:
|
|
69071
|
-
require: /* @__PURE__ */ __name((
|
|
69752
|
+
normalize: path15.normalize,
|
|
69753
|
+
resolve: path15.resolve,
|
|
69754
|
+
require: /* @__PURE__ */ __name((path16) => {
|
|
69072
69755
|
if (typeof require !== "undefined") {
|
|
69073
|
-
return require(
|
|
69074
|
-
} else if (
|
|
69075
|
-
return JSON.parse(
|
|
69756
|
+
return require(path16);
|
|
69757
|
+
} else if (path16.match(/\.json$/)) {
|
|
69758
|
+
return JSON.parse(fs14.readFileSync(path16, "utf8"));
|
|
69076
69759
|
} else {
|
|
69077
69760
|
throw Error("only .json config files are supported in ESM");
|
|
69078
69761
|
}
|
|
@@ -69162,14 +69845,14 @@ var require_emoji_regex = __commonJS({
|
|
|
69162
69845
|
var require_string_width = __commonJS({
|
|
69163
69846
|
"../../node_modules/string-width/index.js"(exports2, module2) {
|
|
69164
69847
|
"use strict";
|
|
69165
|
-
var
|
|
69848
|
+
var stripAnsi2 = require_strip_ansi();
|
|
69166
69849
|
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
69167
69850
|
var emojiRegex = require_emoji_regex();
|
|
69168
69851
|
var stringWidth = /* @__PURE__ */ __name((string) => {
|
|
69169
69852
|
if (typeof string !== "string" || string.length === 0) {
|
|
69170
69853
|
return 0;
|
|
69171
69854
|
}
|
|
69172
|
-
string =
|
|
69855
|
+
string = stripAnsi2(string);
|
|
69173
69856
|
if (string.length === 0) {
|
|
69174
69857
|
return 0;
|
|
69175
69858
|
}
|
|
@@ -70069,15 +70752,15 @@ var require_route = __commonJS({
|
|
|
70069
70752
|
}
|
|
70070
70753
|
__name(link, "link");
|
|
70071
70754
|
function wrapConversion(toModel, graph) {
|
|
70072
|
-
const
|
|
70755
|
+
const path15 = [graph[toModel].parent, toModel];
|
|
70073
70756
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
70074
70757
|
let cur = graph[toModel].parent;
|
|
70075
70758
|
while (graph[cur].parent) {
|
|
70076
|
-
|
|
70759
|
+
path15.unshift(graph[cur].parent);
|
|
70077
70760
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
70078
70761
|
cur = graph[cur].parent;
|
|
70079
70762
|
}
|
|
70080
|
-
fn.conversion =
|
|
70763
|
+
fn.conversion = path15;
|
|
70081
70764
|
return fn;
|
|
70082
70765
|
}
|
|
70083
70766
|
__name(wrapConversion, "wrapConversion");
|
|
@@ -70309,7 +70992,7 @@ var require_wrap_ansi = __commonJS({
|
|
|
70309
70992
|
"../../node_modules/wrap-ansi/index.js"(exports2, module2) {
|
|
70310
70993
|
"use strict";
|
|
70311
70994
|
var stringWidth = require_string_width();
|
|
70312
|
-
var
|
|
70995
|
+
var stripAnsi2 = require_strip_ansi();
|
|
70313
70996
|
var ansiStyles = require_ansi_styles();
|
|
70314
70997
|
var ESCAPES = /* @__PURE__ */ new Set([
|
|
70315
70998
|
"\x1B",
|
|
@@ -70328,7 +71011,7 @@ var require_wrap_ansi = __commonJS({
|
|
|
70328
71011
|
const characters = [...word];
|
|
70329
71012
|
let isInsideEscape = false;
|
|
70330
71013
|
let isInsideLinkEscape = false;
|
|
70331
|
-
let visible = stringWidth(
|
|
71014
|
+
let visible = stringWidth(stripAnsi2(rows[rows.length - 1]));
|
|
70332
71015
|
for (const [index, character] of characters.entries()) {
|
|
70333
71016
|
const characterLength = stringWidth(character);
|
|
70334
71017
|
if (visible + characterLength <= columns) {
|
|
@@ -70731,12 +71414,12 @@ var require_build3 = __commonJS({
|
|
|
70731
71414
|
}
|
|
70732
71415
|
__name(cliui, "cliui");
|
|
70733
71416
|
var stringWidth = require_string_width();
|
|
70734
|
-
var
|
|
71417
|
+
var stripAnsi2 = require_strip_ansi();
|
|
70735
71418
|
var wrap = require_wrap_ansi();
|
|
70736
71419
|
function ui(opts) {
|
|
70737
71420
|
return cliui(opts, {
|
|
70738
71421
|
stringWidth,
|
|
70739
|
-
stripAnsi,
|
|
71422
|
+
stripAnsi: stripAnsi2,
|
|
70740
71423
|
wrap
|
|
70741
71424
|
});
|
|
70742
71425
|
}
|
|
@@ -70794,8 +71477,8 @@ var require_get_caller_file = __commonJS({
|
|
|
70794
71477
|
var require_require_directory = __commonJS({
|
|
70795
71478
|
"../../node_modules/require-directory/index.js"(exports2, module2) {
|
|
70796
71479
|
"use strict";
|
|
70797
|
-
var
|
|
70798
|
-
var
|
|
71480
|
+
var fs14 = require("fs");
|
|
71481
|
+
var join16 = require("path").join;
|
|
70799
71482
|
var resolve5 = require("path").resolve;
|
|
70800
71483
|
var dirname3 = require("path").dirname;
|
|
70801
71484
|
var defaultOptions = {
|
|
@@ -70808,22 +71491,22 @@ var require_require_directory = __commonJS({
|
|
|
70808
71491
|
return obj;
|
|
70809
71492
|
}, "visit")
|
|
70810
71493
|
};
|
|
70811
|
-
function checkFileInclusion(
|
|
71494
|
+
function checkFileInclusion(path15, filename, options) {
|
|
70812
71495
|
return (
|
|
70813
71496
|
// verify file has valid extension
|
|
70814
71497
|
new RegExp("\\.(" + options.extensions.join("|") + ")$", "i").test(filename) && // if options.include is a RegExp, evaluate it and make sure the path passes
|
|
70815
|
-
!(options.include && options.include instanceof RegExp && !options.include.test(
|
|
70816
|
-
!(options.include && typeof options.include === "function" && !options.include(
|
|
70817
|
-
!(options.exclude && options.exclude instanceof RegExp && options.exclude.test(
|
|
70818
|
-
!(options.exclude && typeof options.exclude === "function" && options.exclude(
|
|
71498
|
+
!(options.include && options.include instanceof RegExp && !options.include.test(path15)) && // if options.include is a function, evaluate it and make sure the path passes
|
|
71499
|
+
!(options.include && typeof options.include === "function" && !options.include(path15, filename)) && // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass
|
|
71500
|
+
!(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path15)) && // if options.exclude is a function, evaluate it and make sure the path doesn't pass
|
|
71501
|
+
!(options.exclude && typeof options.exclude === "function" && options.exclude(path15, filename))
|
|
70819
71502
|
);
|
|
70820
71503
|
}
|
|
70821
71504
|
__name(checkFileInclusion, "checkFileInclusion");
|
|
70822
|
-
function requireDirectory(m4,
|
|
71505
|
+
function requireDirectory(m4, path15, options) {
|
|
70823
71506
|
var retval = {};
|
|
70824
|
-
if (
|
|
70825
|
-
options =
|
|
70826
|
-
|
|
71507
|
+
if (path15 && !options && typeof path15 !== "string") {
|
|
71508
|
+
options = path15;
|
|
71509
|
+
path15 = null;
|
|
70827
71510
|
}
|
|
70828
71511
|
options = options || {};
|
|
70829
71512
|
for (var prop in defaultOptions) {
|
|
@@ -70831,10 +71514,10 @@ var require_require_directory = __commonJS({
|
|
|
70831
71514
|
options[prop] = defaultOptions[prop];
|
|
70832
71515
|
}
|
|
70833
71516
|
}
|
|
70834
|
-
|
|
70835
|
-
|
|
70836
|
-
var joined =
|
|
70837
|
-
if (
|
|
71517
|
+
path15 = !path15 ? dirname3(m4.filename) : resolve5(dirname3(m4.filename), path15);
|
|
71518
|
+
fs14.readdirSync(path15).forEach(function(filename) {
|
|
71519
|
+
var joined = join16(path15, filename), files, key, obj;
|
|
71520
|
+
if (fs14.statSync(joined).isDirectory() && options.recurse) {
|
|
70838
71521
|
files = requireDirectory(m4, joined, options);
|
|
70839
71522
|
if (Object.keys(files).length) {
|
|
70840
71523
|
retval[options.rename(filename, joined, filename)] = files;
|
|
@@ -72603,15 +73286,15 @@ function log(level, message, stream) {
|
|
|
72603
73286
|
}
|
|
72604
73287
|
}
|
|
72605
73288
|
}
|
|
72606
|
-
var
|
|
73289
|
+
var fs13, path14, logThreshold, VERSION, LOG_LEVELS;
|
|
72607
73290
|
var init_logging = __esm({
|
|
72608
73291
|
"bin/logging.ts"() {
|
|
72609
73292
|
"use strict";
|
|
72610
|
-
|
|
72611
|
-
|
|
73293
|
+
fs13 = __toESM(require("fs"));
|
|
73294
|
+
path14 = __toESM(require("path"));
|
|
72612
73295
|
logThreshold = "info";
|
|
72613
73296
|
VERSION = JSON.parse(
|
|
72614
|
-
|
|
73297
|
+
fs13.readFileSync(path14.join(__dirname, "..", "package.json"), { encoding: "utf-8" })
|
|
72615
73298
|
).version;
|
|
72616
73299
|
LOG_LEVELS = {
|
|
72617
73300
|
verbose: 1,
|