aws-cdk 2.1141.0 → 2.1143.0
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/README.md +10 -1
- package/THIRD_PARTY_LICENSES +14 -14
- package/build-info.json +2 -2
- package/db.json.gz +0 -0
- package/lib/cli/cdk-toolkit.d.ts +8 -0
- package/lib/cli/cdk-toolkit.js +2 -3
- package/lib/cli/cli-config.js +3 -2
- package/lib/cli/cli-type-registry.json +5 -1
- package/lib/cli/cli.js +51 -17
- package/lib/cli/convert-to-user-input.js +3 -1
- package/lib/cli/debug-handles.d.ts +52 -0
- package/lib/cli/debug-handles.js +347 -0
- package/lib/cli/parse-command-line-arguments.js +7 -2
- package/lib/cli/user-input.d.ts +7 -1
- package/lib/cli/user-input.js +1 -1
- package/lib/index.js +954 -582
- package/lib/index_bg.wasm +0 -0
- package/lib/init-templates/.init-version.json +1 -1
- package/lib/init-templates/.recommended-feature-flags.json +2 -1
- package/package.json +10 -10
package/lib/index.js
CHANGED
|
@@ -485,7 +485,7 @@ var require_helpers = __commonJS({
|
|
|
485
485
|
this.base = base;
|
|
486
486
|
this.schemas = schemas;
|
|
487
487
|
}, "SchemaContext");
|
|
488
|
-
SchemaContext.prototype.resolve = /* @__PURE__ */ __name(function
|
|
488
|
+
SchemaContext.prototype.resolve = /* @__PURE__ */ __name(function resolve17(target) {
|
|
489
489
|
return (() => resolveUrl(this.base, target))();
|
|
490
490
|
}, "resolve");
|
|
491
491
|
SchemaContext.prototype.makeChild = /* @__PURE__ */ __name(function makeChild(schema, propertyName) {
|
|
@@ -1604,7 +1604,7 @@ var require_validator = __commonJS({
|
|
|
1604
1604
|
}
|
|
1605
1605
|
return schema;
|
|
1606
1606
|
}, "superResolve");
|
|
1607
|
-
Validator2.prototype.resolve = /* @__PURE__ */ __name(function
|
|
1607
|
+
Validator2.prototype.resolve = /* @__PURE__ */ __name(function resolve17(schema, switchSchema, ctx) {
|
|
1608
1608
|
switchSchema = ctx.resolve(switchSchema);
|
|
1609
1609
|
if (ctx.schemas[switchSchema]) {
|
|
1610
1610
|
return { subschema: ctx.schemas[switchSchema], switchSchema };
|
|
@@ -3695,7 +3695,7 @@ var require_semver2 = __commonJS({
|
|
|
3695
3695
|
// ../@aws-cdk/cloud-assembly-schema/cli-version.json
|
|
3696
3696
|
var require_cli_version = __commonJS({
|
|
3697
3697
|
"../@aws-cdk/cloud-assembly-schema/cli-version.json"(exports2, module2) {
|
|
3698
|
-
module2.exports = { version: "2.
|
|
3698
|
+
module2.exports = { version: "2.1143.0" };
|
|
3699
3699
|
}
|
|
3700
3700
|
});
|
|
3701
3701
|
|
|
@@ -8383,8 +8383,8 @@ var require_universalify = __commonJS({
|
|
|
8383
8383
|
return Object.defineProperty(function(...args) {
|
|
8384
8384
|
if (typeof args[args.length - 1] === "function") fn.apply(this, args);
|
|
8385
8385
|
else {
|
|
8386
|
-
return new Promise((
|
|
8387
|
-
args.push((err, res) => err != null ? reject(err) :
|
|
8386
|
+
return new Promise((resolve17, reject) => {
|
|
8387
|
+
args.push((err, res) => err != null ? reject(err) : resolve17(res));
|
|
8388
8388
|
fn.apply(this, args);
|
|
8389
8389
|
});
|
|
8390
8390
|
}
|
|
@@ -9279,18 +9279,18 @@ var require_fs = __commonJS({
|
|
|
9279
9279
|
if (typeof callback === "function") {
|
|
9280
9280
|
return fs58.exists(filename, callback);
|
|
9281
9281
|
}
|
|
9282
|
-
return new Promise((
|
|
9283
|
-
return fs58.exists(filename,
|
|
9282
|
+
return new Promise((resolve17) => {
|
|
9283
|
+
return fs58.exists(filename, resolve17);
|
|
9284
9284
|
});
|
|
9285
9285
|
};
|
|
9286
9286
|
exports2.read = function(fd, buffer, offset, length, position, callback) {
|
|
9287
9287
|
if (typeof callback === "function") {
|
|
9288
9288
|
return fs58.read(fd, buffer, offset, length, position, callback);
|
|
9289
9289
|
}
|
|
9290
|
-
return new Promise((
|
|
9290
|
+
return new Promise((resolve17, reject) => {
|
|
9291
9291
|
fs58.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
9292
9292
|
if (err) return reject(err);
|
|
9293
|
-
|
|
9293
|
+
resolve17({ bytesRead, buffer: buffer2 });
|
|
9294
9294
|
});
|
|
9295
9295
|
});
|
|
9296
9296
|
};
|
|
@@ -9298,10 +9298,10 @@ var require_fs = __commonJS({
|
|
|
9298
9298
|
if (typeof args[args.length - 1] === "function") {
|
|
9299
9299
|
return fs58.write(fd, buffer, ...args);
|
|
9300
9300
|
}
|
|
9301
|
-
return new Promise((
|
|
9301
|
+
return new Promise((resolve17, reject) => {
|
|
9302
9302
|
fs58.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
9303
9303
|
if (err) return reject(err);
|
|
9304
|
-
|
|
9304
|
+
resolve17({ bytesWritten, buffer: buffer2 });
|
|
9305
9305
|
});
|
|
9306
9306
|
});
|
|
9307
9307
|
};
|
|
@@ -9309,10 +9309,10 @@ var require_fs = __commonJS({
|
|
|
9309
9309
|
if (typeof args[args.length - 1] === "function") {
|
|
9310
9310
|
return fs58.readv(fd, buffers, ...args);
|
|
9311
9311
|
}
|
|
9312
|
-
return new Promise((
|
|
9312
|
+
return new Promise((resolve17, reject) => {
|
|
9313
9313
|
fs58.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
|
9314
9314
|
if (err) return reject(err);
|
|
9315
|
-
|
|
9315
|
+
resolve17({ bytesRead, buffers: buffers2 });
|
|
9316
9316
|
});
|
|
9317
9317
|
});
|
|
9318
9318
|
};
|
|
@@ -9320,10 +9320,10 @@ var require_fs = __commonJS({
|
|
|
9320
9320
|
if (typeof args[args.length - 1] === "function") {
|
|
9321
9321
|
return fs58.writev(fd, buffers, ...args);
|
|
9322
9322
|
}
|
|
9323
|
-
return new Promise((
|
|
9323
|
+
return new Promise((resolve17, reject) => {
|
|
9324
9324
|
fs58.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
9325
9325
|
if (err) return reject(err);
|
|
9326
|
-
|
|
9326
|
+
resolve17({ bytesWritten, buffers: buffers2 });
|
|
9327
9327
|
});
|
|
9328
9328
|
});
|
|
9329
9329
|
};
|
|
@@ -10396,7 +10396,7 @@ var require_jsonfile = __commonJS({
|
|
|
10396
10396
|
}
|
|
10397
10397
|
__name(_readFile, "_readFile");
|
|
10398
10398
|
var readFile11 = universalify.fromPromise(_readFile);
|
|
10399
|
-
function
|
|
10399
|
+
function readFileSync22(file, options = {}) {
|
|
10400
10400
|
if (typeof options === "string") {
|
|
10401
10401
|
options = { encoding: options };
|
|
10402
10402
|
}
|
|
@@ -10415,7 +10415,7 @@ var require_jsonfile = __commonJS({
|
|
|
10415
10415
|
}
|
|
10416
10416
|
}
|
|
10417
10417
|
}
|
|
10418
|
-
__name(
|
|
10418
|
+
__name(readFileSync22, "readFileSync");
|
|
10419
10419
|
async function _writeFile(file, obj, options = {}) {
|
|
10420
10420
|
const fs58 = options.fs || _fs;
|
|
10421
10421
|
const str = stringify2(obj, options);
|
|
@@ -10431,7 +10431,7 @@ var require_jsonfile = __commonJS({
|
|
|
10431
10431
|
__name(writeFileSync6, "writeFileSync");
|
|
10432
10432
|
module2.exports = {
|
|
10433
10433
|
readFile: readFile11,
|
|
10434
|
-
readFileSync:
|
|
10434
|
+
readFileSync: readFileSync22,
|
|
10435
10435
|
writeFile: writeFile6,
|
|
10436
10436
|
writeFileSync: writeFileSync6
|
|
10437
10437
|
};
|
|
@@ -10898,12 +10898,12 @@ var require_isexe = __commonJS({
|
|
|
10898
10898
|
if (typeof Promise !== "function") {
|
|
10899
10899
|
throw new TypeError("callback not provided");
|
|
10900
10900
|
}
|
|
10901
|
-
return new Promise(function(
|
|
10901
|
+
return new Promise(function(resolve17, reject) {
|
|
10902
10902
|
isexe(path54, options || {}, function(er, is) {
|
|
10903
10903
|
if (er) {
|
|
10904
10904
|
reject(er);
|
|
10905
10905
|
} else {
|
|
10906
|
-
|
|
10906
|
+
resolve17(is);
|
|
10907
10907
|
}
|
|
10908
10908
|
});
|
|
10909
10909
|
});
|
|
@@ -10971,27 +10971,27 @@ var require_which = __commonJS({
|
|
|
10971
10971
|
opt = {};
|
|
10972
10972
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
10973
10973
|
const found2 = [];
|
|
10974
|
-
const step = /* @__PURE__ */ __name((i6) => new Promise((
|
|
10974
|
+
const step = /* @__PURE__ */ __name((i6) => new Promise((resolve17, reject) => {
|
|
10975
10975
|
if (i6 === pathEnv.length)
|
|
10976
|
-
return opt.all && found2.length ?
|
|
10976
|
+
return opt.all && found2.length ? resolve17(found2) : reject(getNotFoundError(cmd));
|
|
10977
10977
|
const ppRaw = pathEnv[i6];
|
|
10978
10978
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
10979
10979
|
const pCmd = path54.join(pathPart, cmd);
|
|
10980
10980
|
const p3 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
10981
|
-
|
|
10981
|
+
resolve17(subStep(p3, i6, 0));
|
|
10982
10982
|
}), "step");
|
|
10983
|
-
const subStep = /* @__PURE__ */ __name((p3, i6, ii) => new Promise((
|
|
10983
|
+
const subStep = /* @__PURE__ */ __name((p3, i6, ii) => new Promise((resolve17, reject) => {
|
|
10984
10984
|
if (ii === pathExt.length)
|
|
10985
|
-
return
|
|
10985
|
+
return resolve17(step(i6 + 1));
|
|
10986
10986
|
const ext = pathExt[ii];
|
|
10987
10987
|
isexe(p3 + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
10988
10988
|
if (!er && is) {
|
|
10989
10989
|
if (opt.all)
|
|
10990
10990
|
found2.push(p3 + ext);
|
|
10991
10991
|
else
|
|
10992
|
-
return
|
|
10992
|
+
return resolve17(p3 + ext);
|
|
10993
10993
|
}
|
|
10994
|
-
return
|
|
10994
|
+
return resolve17(subStep(p3, i6, ii + 1));
|
|
10995
10995
|
});
|
|
10996
10996
|
}), "subStep");
|
|
10997
10997
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -11496,7 +11496,7 @@ var require_subprocess = __commonJS({
|
|
|
11496
11496
|
}
|
|
11497
11497
|
__name(spawnOptions, "spawnOptions");
|
|
11498
11498
|
function monitor(child, displayCommand, options) {
|
|
11499
|
-
return new Promise((
|
|
11499
|
+
return new Promise((resolve17, reject) => {
|
|
11500
11500
|
const collect = options.collect ?? true;
|
|
11501
11501
|
const stdout2 = new Array();
|
|
11502
11502
|
const stderr = new Array();
|
|
@@ -11558,7 +11558,7 @@ var require_subprocess = __commonJS({
|
|
|
11558
11558
|
lines?.flush();
|
|
11559
11559
|
settle(() => {
|
|
11560
11560
|
if (exitCode === 0) {
|
|
11561
|
-
|
|
11561
|
+
resolve17({ stdout: stdout2.join(""), stderr: stderr.join("") });
|
|
11562
11562
|
} else {
|
|
11563
11563
|
reject(new SubprocessError5({
|
|
11564
11564
|
command: displayCommand,
|
|
@@ -16258,13 +16258,13 @@ var require_queue = __commonJS({
|
|
|
16258
16258
|
queue.drained = drained;
|
|
16259
16259
|
return queue;
|
|
16260
16260
|
function push(value2) {
|
|
16261
|
-
var p3 = new Promise(function(
|
|
16261
|
+
var p3 = new Promise(function(resolve17, reject) {
|
|
16262
16262
|
pushCb(value2, function(err, result2) {
|
|
16263
16263
|
if (err) {
|
|
16264
16264
|
reject(err);
|
|
16265
16265
|
return;
|
|
16266
16266
|
}
|
|
16267
|
-
|
|
16267
|
+
resolve17(result2);
|
|
16268
16268
|
});
|
|
16269
16269
|
});
|
|
16270
16270
|
p3.catch(noop);
|
|
@@ -16272,13 +16272,13 @@ var require_queue = __commonJS({
|
|
|
16272
16272
|
}
|
|
16273
16273
|
__name(push, "push");
|
|
16274
16274
|
function unshift(value2) {
|
|
16275
|
-
var p3 = new Promise(function(
|
|
16275
|
+
var p3 = new Promise(function(resolve17, reject) {
|
|
16276
16276
|
unshiftCb(value2, function(err, result2) {
|
|
16277
16277
|
if (err) {
|
|
16278
16278
|
reject(err);
|
|
16279
16279
|
return;
|
|
16280
16280
|
}
|
|
16281
|
-
|
|
16281
|
+
resolve17(result2);
|
|
16282
16282
|
});
|
|
16283
16283
|
});
|
|
16284
16284
|
p3.catch(noop);
|
|
@@ -16286,15 +16286,15 @@ var require_queue = __commonJS({
|
|
|
16286
16286
|
}
|
|
16287
16287
|
__name(unshift, "unshift");
|
|
16288
16288
|
function drained() {
|
|
16289
|
-
var p3 = new Promise(function(
|
|
16289
|
+
var p3 = new Promise(function(resolve17) {
|
|
16290
16290
|
process.nextTick(function() {
|
|
16291
16291
|
if (queue.idle()) {
|
|
16292
|
-
|
|
16292
|
+
resolve17();
|
|
16293
16293
|
} else {
|
|
16294
16294
|
var previousDrain = queue.drain;
|
|
16295
16295
|
queue.drain = function() {
|
|
16296
16296
|
if (typeof previousDrain === "function") previousDrain();
|
|
16297
|
-
|
|
16297
|
+
resolve17();
|
|
16298
16298
|
queue.drain = previousDrain;
|
|
16299
16299
|
};
|
|
16300
16300
|
}
|
|
@@ -16819,9 +16819,9 @@ var require_stream3 = __commonJS({
|
|
|
16819
16819
|
});
|
|
16820
16820
|
}
|
|
16821
16821
|
_getStat(filepath) {
|
|
16822
|
-
return new Promise((
|
|
16822
|
+
return new Promise((resolve17, reject) => {
|
|
16823
16823
|
this._stat(filepath, this._fsStatSettings, (error3, stats) => {
|
|
16824
|
-
return error3 === null ?
|
|
16824
|
+
return error3 === null ? resolve17(stats) : reject(error3);
|
|
16825
16825
|
});
|
|
16826
16826
|
});
|
|
16827
16827
|
}
|
|
@@ -16848,10 +16848,10 @@ var require_async6 = __commonJS({
|
|
|
16848
16848
|
this._readerStream = new stream_1.default(this._settings);
|
|
16849
16849
|
}
|
|
16850
16850
|
dynamic(root6, options) {
|
|
16851
|
-
return new Promise((
|
|
16851
|
+
return new Promise((resolve17, reject) => {
|
|
16852
16852
|
this._walkAsync(root6, options, (error3, entries) => {
|
|
16853
16853
|
if (error3 === null) {
|
|
16854
|
-
|
|
16854
|
+
resolve17(entries);
|
|
16855
16855
|
} else {
|
|
16856
16856
|
reject(error3);
|
|
16857
16857
|
}
|
|
@@ -16861,10 +16861,10 @@ var require_async6 = __commonJS({
|
|
|
16861
16861
|
async static(patterns, options) {
|
|
16862
16862
|
const entries = [];
|
|
16863
16863
|
const stream = this._readerStream.static(patterns, options);
|
|
16864
|
-
return new Promise((
|
|
16864
|
+
return new Promise((resolve17, reject) => {
|
|
16865
16865
|
stream.once("error", reject);
|
|
16866
16866
|
stream.on("data", (entry) => entries.push(entry));
|
|
16867
|
-
stream.once("end", () =>
|
|
16867
|
+
stream.once("end", () => resolve17(entries));
|
|
16868
16868
|
});
|
|
16869
16869
|
}
|
|
16870
16870
|
};
|
|
@@ -18609,12 +18609,12 @@ var require_zip = __commonJS({
|
|
|
18609
18609
|
}
|
|
18610
18610
|
__name(zipDirectory3, "zipDirectory");
|
|
18611
18611
|
function zipString2(fileName, rawString) {
|
|
18612
|
-
return new Promise((
|
|
18612
|
+
return new Promise((resolve17, reject) => {
|
|
18613
18613
|
const buffers = [];
|
|
18614
18614
|
const zip2 = new yazl_1.ZipFile();
|
|
18615
18615
|
zip2.outputStream.on("data", (chunk) => buffers.push(chunk));
|
|
18616
18616
|
zip2.outputStream.on("error", reject);
|
|
18617
|
-
zip2.outputStream.on("end", () =>
|
|
18617
|
+
zip2.outputStream.on("end", () => resolve17(Buffer.concat(buffers)));
|
|
18618
18618
|
zip2.addBuffer(Buffer.from(rawString), fileName, {
|
|
18619
18619
|
mtime: epoch(),
|
|
18620
18620
|
// reset date to get the same hash for the same content
|
|
@@ -20075,12 +20075,12 @@ function pLimit(concurrency) {
|
|
|
20075
20075
|
return;
|
|
20076
20076
|
}
|
|
20077
20077
|
if (activeCount < concurrency && queue.length > 0) {
|
|
20078
|
-
const [fac,
|
|
20078
|
+
const [fac, resolve17, reject] = queue.shift();
|
|
20079
20079
|
activeCount++;
|
|
20080
20080
|
fac().then(
|
|
20081
20081
|
(r6) => {
|
|
20082
20082
|
resumeNext();
|
|
20083
|
-
|
|
20083
|
+
resolve17(r6);
|
|
20084
20084
|
},
|
|
20085
20085
|
(e6) => {
|
|
20086
20086
|
resumeNext();
|
|
@@ -20102,12 +20102,12 @@ function pLimit(concurrency) {
|
|
|
20102
20102
|
}
|
|
20103
20103
|
__name(resumeNext, "resumeNext");
|
|
20104
20104
|
const ret = /* @__PURE__ */ __name((promiseFactory) => {
|
|
20105
|
-
return new Promise((
|
|
20105
|
+
return new Promise((resolve17, reject) => {
|
|
20106
20106
|
if (stopped) {
|
|
20107
20107
|
reject(new Error("Task has been cancelled"));
|
|
20108
20108
|
return;
|
|
20109
20109
|
}
|
|
20110
|
-
queue.push([promiseFactory,
|
|
20110
|
+
queue.push([promiseFactory, resolve17, reject]);
|
|
20111
20111
|
dispatch();
|
|
20112
20112
|
});
|
|
20113
20113
|
}, "ret");
|
|
@@ -21071,7 +21071,7 @@ var sleep;
|
|
|
21071
21071
|
var init_sleep = __esm({
|
|
21072
21072
|
"../../node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/sleep.js"() {
|
|
21073
21073
|
sleep = /* @__PURE__ */ __name((seconds) => {
|
|
21074
|
-
return new Promise((
|
|
21074
|
+
return new Promise((resolve17) => setTimeout(resolve17, seconds * 1e3));
|
|
21075
21075
|
}, "sleep");
|
|
21076
21076
|
}
|
|
21077
21077
|
});
|
|
@@ -21236,8 +21236,8 @@ var init_createWaiter = __esm({
|
|
|
21236
21236
|
init_waiter();
|
|
21237
21237
|
abortTimeout = /* @__PURE__ */ __name((abortSignal) => {
|
|
21238
21238
|
let onAbort;
|
|
21239
|
-
const promise = new Promise((
|
|
21240
|
-
onAbort = /* @__PURE__ */ __name(() =>
|
|
21239
|
+
const promise = new Promise((resolve17) => {
|
|
21240
|
+
onAbort = /* @__PURE__ */ __name(() => resolve17({ state: WaiterState.ABORTED }), "onAbort");
|
|
21241
21241
|
if (typeof abortSignal.addEventListener === "function") {
|
|
21242
21242
|
abortSignal.addEventListener("abort", onAbort);
|
|
21243
21243
|
} else {
|
|
@@ -24761,7 +24761,7 @@ var init_getInstanceMetadataRegion = __esm({
|
|
|
24761
24761
|
}, "resolveImdsEndpoint");
|
|
24762
24762
|
imdsRequest = /* @__PURE__ */ __name(async (options) => {
|
|
24763
24763
|
const { request: request4 } = await import("node:http");
|
|
24764
|
-
return new Promise((
|
|
24764
|
+
return new Promise((resolve17, reject) => {
|
|
24765
24765
|
const req = request4({
|
|
24766
24766
|
hostname: options.hostname,
|
|
24767
24767
|
port: options.port,
|
|
@@ -24789,7 +24789,7 @@ var init_getInstanceMetadataRegion = __esm({
|
|
|
24789
24789
|
const chunks2 = [];
|
|
24790
24790
|
res.on("data", (chunk) => chunks2.push(chunk));
|
|
24791
24791
|
res.on("end", () => {
|
|
24792
|
-
|
|
24792
|
+
resolve17(Buffer.concat(chunks2));
|
|
24793
24793
|
req.destroy();
|
|
24794
24794
|
});
|
|
24795
24795
|
});
|
|
@@ -27050,7 +27050,7 @@ var init_headStream = __esm({
|
|
|
27050
27050
|
if (isReadableStream(stream)) {
|
|
27051
27051
|
return headStream(stream, bytes);
|
|
27052
27052
|
}
|
|
27053
|
-
return new Promise((
|
|
27053
|
+
return new Promise((resolve17, reject) => {
|
|
27054
27054
|
const collector = new Collector();
|
|
27055
27055
|
collector.limit = bytes;
|
|
27056
27056
|
stream.pipe(collector);
|
|
@@ -27061,7 +27061,7 @@ var init_headStream = __esm({
|
|
|
27061
27061
|
collector.on("error", reject);
|
|
27062
27062
|
collector.on("finish", function() {
|
|
27063
27063
|
const bytes2 = concatBytes(this.buffers);
|
|
27064
|
-
|
|
27064
|
+
resolve17(bytes2);
|
|
27065
27065
|
});
|
|
27066
27066
|
});
|
|
27067
27067
|
}, "headStream");
|
|
@@ -27218,7 +27218,7 @@ var init_stream_collector = __esm({
|
|
|
27218
27218
|
if (isReadableStream(stream)) {
|
|
27219
27219
|
return collectReadableStream(stream);
|
|
27220
27220
|
}
|
|
27221
|
-
return new Promise((
|
|
27221
|
+
return new Promise((resolve17, reject) => {
|
|
27222
27222
|
const collector = new Collector2();
|
|
27223
27223
|
const nodeStream = stream;
|
|
27224
27224
|
nodeStream.pipe(collector);
|
|
@@ -27229,7 +27229,7 @@ var init_stream_collector = __esm({
|
|
|
27229
27229
|
collector.on("error", reject);
|
|
27230
27230
|
collector.on("finish", function() {
|
|
27231
27231
|
const bytes = concatBytes(this.bufferedBytes);
|
|
27232
|
-
|
|
27232
|
+
resolve17(bytes);
|
|
27233
27233
|
});
|
|
27234
27234
|
});
|
|
27235
27235
|
}, "streamCollector");
|
|
@@ -27573,7 +27573,7 @@ var init_fileStreamHasher = __esm({
|
|
|
27573
27573
|
"../../node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/fileStreamHasher.js"() {
|
|
27574
27574
|
import_node_fs2 = require("node:fs");
|
|
27575
27575
|
init_HashCalculator();
|
|
27576
|
-
fileStreamHasher = /* @__PURE__ */ __name((hashCtor, fileStream) => new Promise((
|
|
27576
|
+
fileStreamHasher = /* @__PURE__ */ __name((hashCtor, fileStream) => new Promise((resolve17, reject) => {
|
|
27577
27577
|
if (!isReadStream(fileStream)) {
|
|
27578
27578
|
reject(new Error("Unable to calculate hash for non-file streams."));
|
|
27579
27579
|
return;
|
|
@@ -27591,7 +27591,7 @@ var init_fileStreamHasher = __esm({
|
|
|
27591
27591
|
});
|
|
27592
27592
|
hashCalculator.on("error", reject);
|
|
27593
27593
|
hashCalculator.on("finish", function() {
|
|
27594
|
-
hash.digest().then(
|
|
27594
|
+
hash.digest().then(resolve17).catch(reject);
|
|
27595
27595
|
});
|
|
27596
27596
|
}), "fileStreamHasher");
|
|
27597
27597
|
isReadStream = /* @__PURE__ */ __name((stream) => typeof stream.path === "string", "isReadStream");
|
|
@@ -27610,14 +27610,14 @@ var init_readableStreamHasher = __esm({
|
|
|
27610
27610
|
const hash = new hashCtor();
|
|
27611
27611
|
const hashCalculator = new HashCalculator(hash);
|
|
27612
27612
|
readableStream.pipe(hashCalculator);
|
|
27613
|
-
return new Promise((
|
|
27613
|
+
return new Promise((resolve17, reject) => {
|
|
27614
27614
|
readableStream.on("error", (err) => {
|
|
27615
27615
|
hashCalculator.end();
|
|
27616
27616
|
reject(err);
|
|
27617
27617
|
});
|
|
27618
27618
|
hashCalculator.on("error", reject);
|
|
27619
27619
|
hashCalculator.on("finish", () => {
|
|
27620
|
-
hash.digest().then(
|
|
27620
|
+
hash.digest().then(resolve17).catch(reject);
|
|
27621
27621
|
});
|
|
27622
27622
|
});
|
|
27623
27623
|
}, "readableStreamHasher");
|
|
@@ -28916,7 +28916,7 @@ async function* readableToIterable(readStream) {
|
|
|
28916
28916
|
streamEnded = true;
|
|
28917
28917
|
});
|
|
28918
28918
|
while (!generationEnded) {
|
|
28919
|
-
const value2 = await new Promise((
|
|
28919
|
+
const value2 = await new Promise((resolve17) => setTimeout(() => resolve17(records.shift()), 0));
|
|
28920
28920
|
if (value2) {
|
|
28921
28921
|
yield value2;
|
|
28922
28922
|
}
|
|
@@ -30750,7 +30750,7 @@ var init_retryMiddleware = __esm({
|
|
|
30750
30750
|
init_parseRetryAfterHeader();
|
|
30751
30751
|
init_util2();
|
|
30752
30752
|
__name(bindRetryMiddleware, "bindRetryMiddleware");
|
|
30753
|
-
cooldown = /* @__PURE__ */ __name((ms) => new Promise((
|
|
30753
|
+
cooldown = /* @__PURE__ */ __name((ms) => new Promise((resolve17) => setTimeout(resolve17, ms)), "cooldown");
|
|
30754
30754
|
isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2");
|
|
30755
30755
|
getRetryErrorInfo = /* @__PURE__ */ __name((error3, logger2) => {
|
|
30756
30756
|
const errorInfo = {
|
|
@@ -30852,7 +30852,7 @@ var init_DefaultRateLimiter = __esm({
|
|
|
30852
30852
|
this.refillTokenBucket();
|
|
30853
30853
|
while (amount > this.availableTokens) {
|
|
30854
30854
|
const delay = (amount - this.availableTokens) / this.fillRate * 1e3;
|
|
30855
|
-
await new Promise((
|
|
30855
|
+
await new Promise((resolve17) => _DefaultRateLimiter.setTimeoutFn(resolve17, delay));
|
|
30856
30856
|
this.refillTokenBucket();
|
|
30857
30857
|
}
|
|
30858
30858
|
this.availableTokens = this.availableTokens - amount;
|
|
@@ -31311,7 +31311,7 @@ var init_StandardRetryStrategy2 = __esm({
|
|
|
31311
31311
|
const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
|
|
31312
31312
|
const delay = Math.max(delayFromResponse || 0, delayFromDecider);
|
|
31313
31313
|
totalDelay += delay;
|
|
31314
|
-
await new Promise((
|
|
31314
|
+
await new Promise((resolve17) => setTimeout(resolve17, delay));
|
|
31315
31315
|
continue;
|
|
31316
31316
|
}
|
|
31317
31317
|
if (!err.$metadata) {
|
|
@@ -35233,7 +35233,7 @@ var require_dist_cjs4 = __commonJS({
|
|
|
35233
35233
|
var DEFAULT_MAX_RETRIES = 0;
|
|
35234
35234
|
var providerConfigFromInit = /* @__PURE__ */ __name(({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT2 }) => ({ maxRetries, timeout }), "providerConfigFromInit");
|
|
35235
35235
|
function httpRequest(options) {
|
|
35236
|
-
return new Promise((
|
|
35236
|
+
return new Promise((resolve17, reject) => {
|
|
35237
35237
|
const req = node_http.request({
|
|
35238
35238
|
method: "GET",
|
|
35239
35239
|
...options,
|
|
@@ -35258,7 +35258,7 @@ var require_dist_cjs4 = __commonJS({
|
|
|
35258
35258
|
chunks2.push(chunk);
|
|
35259
35259
|
});
|
|
35260
35260
|
res.on("end", () => {
|
|
35261
|
-
|
|
35261
|
+
resolve17(Buffer.concat(chunks2));
|
|
35262
35262
|
req.destroy();
|
|
35263
35263
|
});
|
|
35264
35264
|
});
|
|
@@ -35566,7 +35566,7 @@ For more information, please visit: ` + STATIC_STABILITY_DOC_URL);
|
|
|
35566
35566
|
// ../../node_modules/@smithy/node-http-handler/dist-cjs/index.js
|
|
35567
35567
|
var require_dist_cjs5 = __commonJS({
|
|
35568
35568
|
"../../node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2) {
|
|
35569
|
-
var { hasOwn:
|
|
35569
|
+
var { hasOwn: hasOwn3 } = (init_serde(), __toCommonJS(serde_exports));
|
|
35570
35570
|
var { streamCollector: streamCollector8 } = (init_serde(), __toCommonJS(serde_exports));
|
|
35571
35571
|
exports2.streamCollector = streamCollector8;
|
|
35572
35572
|
var { buildQueryString: buildQueryString2, HttpResponse: HttpResponse2 } = (init_protocols(), __toCommonJS(protocols_exports));
|
|
@@ -35595,7 +35595,7 @@ var require_dist_cjs5 = __commonJS({
|
|
|
35595
35595
|
var getTransformedHeaders = /* @__PURE__ */ __name((headers) => {
|
|
35596
35596
|
const transformedHeaders = {};
|
|
35597
35597
|
for (const name in headers) {
|
|
35598
|
-
if (!
|
|
35598
|
+
if (!hasOwn3(headers, name))
|
|
35599
35599
|
continue;
|
|
35600
35600
|
const headerValues = headers[name];
|
|
35601
35601
|
transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
|
|
@@ -35707,21 +35707,21 @@ var require_dist_cjs5 = __commonJS({
|
|
|
35707
35707
|
let sendBody = true;
|
|
35708
35708
|
if (!externalAgent && expect === "100-continue") {
|
|
35709
35709
|
sendBody = await Promise.race([
|
|
35710
|
-
new Promise((
|
|
35711
|
-
timeoutId = Number(timing.setTimeout(() =>
|
|
35710
|
+
new Promise((resolve17) => {
|
|
35711
|
+
timeoutId = Number(timing.setTimeout(() => resolve17(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
|
|
35712
35712
|
}),
|
|
35713
|
-
new Promise((
|
|
35713
|
+
new Promise((resolve17) => {
|
|
35714
35714
|
httpRequest.on("continue", () => {
|
|
35715
35715
|
timing.clearTimeout(timeoutId);
|
|
35716
|
-
|
|
35716
|
+
resolve17(true);
|
|
35717
35717
|
});
|
|
35718
35718
|
httpRequest.on("response", () => {
|
|
35719
35719
|
timing.clearTimeout(timeoutId);
|
|
35720
|
-
|
|
35720
|
+
resolve17(false);
|
|
35721
35721
|
});
|
|
35722
35722
|
httpRequest.on("error", () => {
|
|
35723
35723
|
timing.clearTimeout(timeoutId);
|
|
35724
|
-
|
|
35724
|
+
resolve17(false);
|
|
35725
35725
|
});
|
|
35726
35726
|
})
|
|
35727
35727
|
]);
|
|
@@ -35787,7 +35787,7 @@ var require_dist_cjs5 = __commonJS({
|
|
|
35787
35787
|
}
|
|
35788
35788
|
if (sockets && requests) {
|
|
35789
35789
|
for (const origin in sockets) {
|
|
35790
|
-
if (!
|
|
35790
|
+
if (!hasOwn3(sockets, origin))
|
|
35791
35791
|
continue;
|
|
35792
35792
|
const socketsInUse = sockets[origin]?.length ?? 0;
|
|
35793
35793
|
const requestsEnqueued = requests[origin]?.length ?? 0;
|
|
@@ -35802,13 +35802,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
35802
35802
|
return socketWarningTimestamp;
|
|
35803
35803
|
}
|
|
35804
35804
|
constructor(options) {
|
|
35805
|
-
this.configProvider = new Promise((
|
|
35805
|
+
this.configProvider = new Promise((resolve17, reject) => {
|
|
35806
35806
|
if (typeof options === "function") {
|
|
35807
35807
|
options().then((_options) => {
|
|
35808
|
-
|
|
35808
|
+
resolve17(this.resolveDefaultConfig(_options));
|
|
35809
35809
|
}).catch(reject);
|
|
35810
35810
|
} else {
|
|
35811
|
-
|
|
35811
|
+
resolve17(this.resolveDefaultConfig(options));
|
|
35812
35812
|
}
|
|
35813
35813
|
});
|
|
35814
35814
|
}
|
|
@@ -35840,7 +35840,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
35840
35840
|
timing.clearTimeout(socketTimeoutId);
|
|
35841
35841
|
timing.clearTimeout(keepAliveTimeoutId);
|
|
35842
35842
|
}, "clearTimeouts");
|
|
35843
|
-
const
|
|
35843
|
+
const resolve17 = /* @__PURE__ */ __name(async (arg) => {
|
|
35844
35844
|
await writeRequestBodyPromise;
|
|
35845
35845
|
clearTimeouts();
|
|
35846
35846
|
_resolve(arg);
|
|
@@ -35904,7 +35904,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
35904
35904
|
headers: getTransformedHeaders(res.headers),
|
|
35905
35905
|
body: res
|
|
35906
35906
|
});
|
|
35907
|
-
|
|
35907
|
+
resolve17({ response: httpResponse });
|
|
35908
35908
|
});
|
|
35909
35909
|
req.on("error", (err) => {
|
|
35910
35910
|
if (NODEJS_TIMEOUT_ERROR_CODES2.includes(err.code)) {
|
|
@@ -36244,13 +36244,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
36244
36244
|
return new _NodeHttp2Handler(instanceOrOptions);
|
|
36245
36245
|
}
|
|
36246
36246
|
constructor(options) {
|
|
36247
|
-
this.configProvider = new Promise((
|
|
36247
|
+
this.configProvider = new Promise((resolve17, reject) => {
|
|
36248
36248
|
if (typeof options === "function") {
|
|
36249
36249
|
options().then((opts) => {
|
|
36250
|
-
|
|
36250
|
+
resolve17(opts || {});
|
|
36251
36251
|
}).catch(reject);
|
|
36252
36252
|
} else {
|
|
36253
|
-
|
|
36253
|
+
resolve17(options || {});
|
|
36254
36254
|
}
|
|
36255
36255
|
});
|
|
36256
36256
|
}
|
|
@@ -36275,7 +36275,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
36275
36275
|
return new Promise((_resolve, _reject) => {
|
|
36276
36276
|
let fulfilled = false;
|
|
36277
36277
|
let writeRequestBodyPromise = void 0;
|
|
36278
|
-
const
|
|
36278
|
+
const resolve17 = /* @__PURE__ */ __name(async (arg) => {
|
|
36279
36279
|
await writeRequestBodyPromise;
|
|
36280
36280
|
_resolve(arg);
|
|
36281
36281
|
}, "resolve");
|
|
@@ -36360,7 +36360,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
36360
36360
|
body: clientHttp2Stream
|
|
36361
36361
|
});
|
|
36362
36362
|
fulfilled = true;
|
|
36363
|
-
|
|
36363
|
+
resolve17({ response: httpResponse });
|
|
36364
36364
|
if (useIsolatedSession) {
|
|
36365
36365
|
session.close();
|
|
36366
36366
|
}
|
|
@@ -36487,7 +36487,7 @@ var require_dist_cjs6 = __commonJS({
|
|
|
36487
36487
|
try {
|
|
36488
36488
|
return await toRetry();
|
|
36489
36489
|
} catch (e6) {
|
|
36490
|
-
await new Promise((
|
|
36490
|
+
await new Promise((resolve17) => setTimeout(resolve17, delayMs));
|
|
36491
36491
|
}
|
|
36492
36492
|
}
|
|
36493
36493
|
return await toRetry();
|
|
@@ -36644,7 +36644,7 @@ var init_package = __esm({
|
|
|
36644
36644
|
"../../node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
36645
36645
|
package_default = {
|
|
36646
36646
|
name: "@aws-sdk/nested-clients",
|
|
36647
|
-
version: "3.997.
|
|
36647
|
+
version: "3.997.45",
|
|
36648
36648
|
description: "Nested clients for AWS SDK packages.",
|
|
36649
36649
|
homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
|
|
36650
36650
|
license: "Apache-2.0",
|
|
@@ -36744,7 +36744,7 @@ var init_package = __esm({
|
|
|
36744
36744
|
"test:watch": "yarn g:vitest watch"
|
|
36745
36745
|
},
|
|
36746
36746
|
dependencies: {
|
|
36747
|
-
"@aws-sdk/core": "^3.
|
|
36747
|
+
"@aws-sdk/core": "^3.978.0",
|
|
36748
36748
|
"@aws-sdk/signature-v4-multi-region": "^3.996.46",
|
|
36749
36749
|
"@aws-sdk/types": "^3.974.5",
|
|
36750
36750
|
"@smithy/core": "^3.33.3",
|
|
@@ -46150,7 +46150,7 @@ var require_dist_cjs11 = __commonJS({
|
|
|
46150
46150
|
var { createHash: createHash8, createPrivateKey, createPublicKey, sign: sign3 } = require("node:crypto");
|
|
46151
46151
|
var { promises: promises8 } = require("node:fs");
|
|
46152
46152
|
var { homedir: homedir8 } = require("node:os");
|
|
46153
|
-
var { dirname: dirname17, join:
|
|
46153
|
+
var { dirname: dirname17, join: join53 } = require("node:path");
|
|
46154
46154
|
var LoginCredentialsFetcher = class _LoginCredentialsFetcher {
|
|
46155
46155
|
static {
|
|
46156
46156
|
__name(this, "LoginCredentialsFetcher");
|
|
@@ -46317,10 +46317,10 @@ var require_dist_cjs11 = __commonJS({
|
|
|
46317
46317
|
await promises8.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
|
|
46318
46318
|
}
|
|
46319
46319
|
getTokenFilePath() {
|
|
46320
|
-
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ??
|
|
46320
|
+
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join53(homedir8(), ".aws", "login", "cache");
|
|
46321
46321
|
const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
|
|
46322
46322
|
const loginSessionSha256 = createHash8("sha256").update(loginSessionBytes).digest("hex");
|
|
46323
|
-
return
|
|
46323
|
+
return join53(directory, `${loginSessionSha256}.json`);
|
|
46324
46324
|
}
|
|
46325
46325
|
derToRawSignature(derSignature) {
|
|
46326
46326
|
let offset = 2;
|
|
@@ -46508,7 +46508,7 @@ var require_dist_cjs13 = __commonJS({
|
|
|
46508
46508
|
"../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2) {
|
|
46509
46509
|
var { setCredentialFeature: setCredentialFeature2 } = (init_client3(), __toCommonJS(client_exports2));
|
|
46510
46510
|
var { CredentialsProviderError: CredentialsProviderError2, externalDataInterceptor: externalDataInterceptor2 } = (init_config2(), __toCommonJS(config_exports));
|
|
46511
|
-
var { readFileSync:
|
|
46511
|
+
var { readFileSync: readFileSync22 } = require("node:fs");
|
|
46512
46512
|
var fromWebToken = /* @__PURE__ */ __name((init) => async (awsIdentityProperties) => {
|
|
46513
46513
|
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
|
|
46514
46514
|
const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
|
|
@@ -46549,7 +46549,7 @@ var require_dist_cjs13 = __commonJS({
|
|
|
46549
46549
|
}
|
|
46550
46550
|
const credentials = await fromWebToken({
|
|
46551
46551
|
...init,
|
|
46552
|
-
webIdentityToken: externalDataInterceptor2?.getTokenRecord?.()[webIdentityTokenFile] ??
|
|
46552
|
+
webIdentityToken: externalDataInterceptor2?.getTokenRecord?.()[webIdentityTokenFile] ?? readFileSync22(webIdentityTokenFile, { encoding: "ascii" }),
|
|
46553
46553
|
roleArn,
|
|
46554
46554
|
roleSessionName
|
|
46555
46555
|
})(awsIdentityProperties);
|
|
@@ -53492,11 +53492,22 @@ var init_format_url = __esm({
|
|
|
53492
53492
|
}
|
|
53493
53493
|
});
|
|
53494
53494
|
|
|
53495
|
+
// ../../node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js
|
|
53496
|
+
function hasOwn2(container, key) {
|
|
53497
|
+
return Object.prototype.hasOwnProperty.call(container, key);
|
|
53498
|
+
}
|
|
53499
|
+
var init_hasOwn2 = __esm({
|
|
53500
|
+
"../../node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js"() {
|
|
53501
|
+
__name(hasOwn2, "hasOwn");
|
|
53502
|
+
}
|
|
53503
|
+
});
|
|
53504
|
+
|
|
53495
53505
|
// ../../node_modules/@aws-sdk/core/dist-es/submodules/util/index.js
|
|
53496
53506
|
var util_exports = {};
|
|
53497
53507
|
__export(util_exports, {
|
|
53498
53508
|
build: () => build,
|
|
53499
53509
|
formatUrl: () => formatUrl,
|
|
53510
|
+
hasOwn: () => hasOwn2,
|
|
53500
53511
|
parse: () => parse2,
|
|
53501
53512
|
validate: () => validate
|
|
53502
53513
|
});
|
|
@@ -53504,6 +53515,7 @@ var init_util3 = __esm({
|
|
|
53504
53515
|
"../../node_modules/@aws-sdk/core/dist-es/submodules/util/index.js"() {
|
|
53505
53516
|
init_arn();
|
|
53506
53517
|
init_format_url();
|
|
53518
|
+
init_hasOwn2();
|
|
53507
53519
|
}
|
|
53508
53520
|
});
|
|
53509
53521
|
|
|
@@ -69147,35 +69159,35 @@ var require_dist_cjs20 = __commonJS({
|
|
|
69147
69159
|
getItem(key) {
|
|
69148
69160
|
return this.withObjectStore("readonly", (store) => {
|
|
69149
69161
|
const req = store.get(key);
|
|
69150
|
-
return new Promise((
|
|
69151
|
-
req.onerror = () =>
|
|
69152
|
-
req.onsuccess = () =>
|
|
69162
|
+
return new Promise((resolve17) => {
|
|
69163
|
+
req.onerror = () => resolve17(null);
|
|
69164
|
+
req.onsuccess = () => resolve17(req.result ? req.result.value : null);
|
|
69153
69165
|
});
|
|
69154
69166
|
}).catch(() => null);
|
|
69155
69167
|
}
|
|
69156
69168
|
removeItem(key) {
|
|
69157
69169
|
return this.withObjectStore("readwrite", (store) => {
|
|
69158
69170
|
const req = store.delete(key);
|
|
69159
|
-
return new Promise((
|
|
69171
|
+
return new Promise((resolve17, reject) => {
|
|
69160
69172
|
req.onerror = () => reject(req.error);
|
|
69161
|
-
req.onsuccess = () =>
|
|
69173
|
+
req.onsuccess = () => resolve17();
|
|
69162
69174
|
});
|
|
69163
69175
|
});
|
|
69164
69176
|
}
|
|
69165
69177
|
setItem(id, value2) {
|
|
69166
69178
|
return this.withObjectStore("readwrite", (store) => {
|
|
69167
69179
|
const req = store.put({ id, value: value2 });
|
|
69168
|
-
return new Promise((
|
|
69180
|
+
return new Promise((resolve17, reject) => {
|
|
69169
69181
|
req.onerror = () => reject(req.error);
|
|
69170
|
-
req.onsuccess = () =>
|
|
69182
|
+
req.onsuccess = () => resolve17();
|
|
69171
69183
|
});
|
|
69172
69184
|
});
|
|
69173
69185
|
}
|
|
69174
69186
|
getDb() {
|
|
69175
69187
|
const openDbRequest = self.indexedDB.open(this.dbName, 1);
|
|
69176
|
-
return new Promise((
|
|
69188
|
+
return new Promise((resolve17, reject) => {
|
|
69177
69189
|
openDbRequest.onsuccess = () => {
|
|
69178
|
-
|
|
69190
|
+
resolve17(openDbRequest.result);
|
|
69179
69191
|
};
|
|
69180
69192
|
openDbRequest.onerror = () => {
|
|
69181
69193
|
reject(openDbRequest.error);
|
|
@@ -69196,9 +69208,9 @@ var require_dist_cjs20 = __commonJS({
|
|
|
69196
69208
|
return this.getDb().then((db) => {
|
|
69197
69209
|
const tx = db.transaction(STORE_NAME, mode);
|
|
69198
69210
|
tx.oncomplete = () => db.close();
|
|
69199
|
-
return new Promise((
|
|
69211
|
+
return new Promise((resolve17, reject) => {
|
|
69200
69212
|
tx.onerror = () => reject(tx.error);
|
|
69201
|
-
|
|
69213
|
+
resolve17(action(tx.objectStore(STORE_NAME)));
|
|
69202
69214
|
}).catch((err) => {
|
|
69203
69215
|
db.close();
|
|
69204
69216
|
throw err;
|
|
@@ -70032,7 +70044,7 @@ to input.params.ContentLength in bytes.
|
|
|
70032
70044
|
}
|
|
70033
70045
|
}
|
|
70034
70046
|
async __abortTimeout(abortSignal) {
|
|
70035
|
-
return new Promise((
|
|
70047
|
+
return new Promise((resolve17, reject) => {
|
|
70036
70048
|
abortSignal.onabort = () => {
|
|
70037
70049
|
const abortError = new Error("Upload aborted.");
|
|
70038
70050
|
abortError.name = "AbortError";
|
|
@@ -71641,14 +71653,14 @@ var require_templates = __commonJS({
|
|
|
71641
71653
|
return results;
|
|
71642
71654
|
}
|
|
71643
71655
|
__name(parseStyle, "parseStyle");
|
|
71644
|
-
function buildStyle(
|
|
71656
|
+
function buildStyle(chalk43, styles) {
|
|
71645
71657
|
const enabled = {};
|
|
71646
71658
|
for (const layer of styles) {
|
|
71647
71659
|
for (const style of layer.styles) {
|
|
71648
71660
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
71649
71661
|
}
|
|
71650
71662
|
}
|
|
71651
|
-
let current =
|
|
71663
|
+
let current = chalk43;
|
|
71652
71664
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
71653
71665
|
if (!Array.isArray(styles2)) {
|
|
71654
71666
|
continue;
|
|
@@ -71661,7 +71673,7 @@ var require_templates = __commonJS({
|
|
|
71661
71673
|
return current;
|
|
71662
71674
|
}
|
|
71663
71675
|
__name(buildStyle, "buildStyle");
|
|
71664
|
-
module2.exports = (
|
|
71676
|
+
module2.exports = (chalk43, temporary) => {
|
|
71665
71677
|
const styles = [];
|
|
71666
71678
|
const chunks2 = [];
|
|
71667
71679
|
let chunk = [];
|
|
@@ -71671,13 +71683,13 @@ var require_templates = __commonJS({
|
|
|
71671
71683
|
} else if (style) {
|
|
71672
71684
|
const string = chunk.join("");
|
|
71673
71685
|
chunk = [];
|
|
71674
|
-
chunks2.push(styles.length === 0 ? string : buildStyle(
|
|
71686
|
+
chunks2.push(styles.length === 0 ? string : buildStyle(chalk43, styles)(string));
|
|
71675
71687
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
71676
71688
|
} else if (close) {
|
|
71677
71689
|
if (styles.length === 0) {
|
|
71678
71690
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
71679
71691
|
}
|
|
71680
|
-
chunks2.push(buildStyle(
|
|
71692
|
+
chunks2.push(buildStyle(chalk43, styles)(chunk.join("")));
|
|
71681
71693
|
chunk = [];
|
|
71682
71694
|
styles.pop();
|
|
71683
71695
|
} else {
|
|
@@ -71728,16 +71740,16 @@ var require_source = __commonJS({
|
|
|
71728
71740
|
}
|
|
71729
71741
|
};
|
|
71730
71742
|
var chalkFactory = /* @__PURE__ */ __name((options) => {
|
|
71731
|
-
const
|
|
71732
|
-
applyOptions(
|
|
71733
|
-
|
|
71734
|
-
Object.setPrototypeOf(
|
|
71735
|
-
Object.setPrototypeOf(
|
|
71736
|
-
|
|
71743
|
+
const chalk44 = {};
|
|
71744
|
+
applyOptions(chalk44, options);
|
|
71745
|
+
chalk44.template = (...arguments_) => chalkTag(chalk44.template, ...arguments_);
|
|
71746
|
+
Object.setPrototypeOf(chalk44, Chalk.prototype);
|
|
71747
|
+
Object.setPrototypeOf(chalk44.template, chalk44);
|
|
71748
|
+
chalk44.template.constructor = () => {
|
|
71737
71749
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
71738
71750
|
};
|
|
71739
|
-
|
|
71740
|
-
return
|
|
71751
|
+
chalk44.template.Instance = ChalkClass;
|
|
71752
|
+
return chalk44.template;
|
|
71741
71753
|
}, "chalkFactory");
|
|
71742
71754
|
function Chalk(options) {
|
|
71743
71755
|
return chalkFactory(options);
|
|
@@ -71849,7 +71861,7 @@ var require_source = __commonJS({
|
|
|
71849
71861
|
return openAll + string + closeAll;
|
|
71850
71862
|
}, "applyStyle");
|
|
71851
71863
|
var template;
|
|
71852
|
-
var chalkTag = /* @__PURE__ */ __name((
|
|
71864
|
+
var chalkTag = /* @__PURE__ */ __name((chalk44, ...strings) => {
|
|
71853
71865
|
const [firstString] = strings;
|
|
71854
71866
|
if (!isArray2(firstString) || !isArray2(firstString.raw)) {
|
|
71855
71867
|
return strings.join(" ");
|
|
@@ -71865,14 +71877,14 @@ var require_source = __commonJS({
|
|
|
71865
71877
|
if (template === void 0) {
|
|
71866
71878
|
template = require_templates();
|
|
71867
71879
|
}
|
|
71868
|
-
return template(
|
|
71880
|
+
return template(chalk44, parts.join(""));
|
|
71869
71881
|
}, "chalkTag");
|
|
71870
71882
|
Object.defineProperties(Chalk.prototype, styles);
|
|
71871
|
-
var
|
|
71872
|
-
|
|
71873
|
-
|
|
71874
|
-
|
|
71875
|
-
module2.exports =
|
|
71883
|
+
var chalk43 = Chalk();
|
|
71884
|
+
chalk43.supportsColor = stdoutColor;
|
|
71885
|
+
chalk43.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
71886
|
+
chalk43.stderr.supportsColor = stderrColor;
|
|
71887
|
+
module2.exports = chalk43;
|
|
71876
71888
|
}
|
|
71877
71889
|
});
|
|
71878
71890
|
|
|
@@ -77735,12 +77747,12 @@ ${ctx.indent}`;
|
|
|
77735
77747
|
for (const {
|
|
77736
77748
|
format: format31,
|
|
77737
77749
|
test,
|
|
77738
|
-
resolve:
|
|
77750
|
+
resolve: resolve17
|
|
77739
77751
|
} of tags) {
|
|
77740
77752
|
if (test) {
|
|
77741
77753
|
const match = str.match(test);
|
|
77742
77754
|
if (match) {
|
|
77743
|
-
let res =
|
|
77755
|
+
let res = resolve17.apply(null, match);
|
|
77744
77756
|
if (!(res instanceof Scalar2)) res = new Scalar2(res);
|
|
77745
77757
|
if (format31) res.format = format31;
|
|
77746
77758
|
return res;
|
|
@@ -84084,12 +84096,12 @@ var init_asset_publishing = __esm({
|
|
|
84084
84096
|
|
|
84085
84097
|
// ../@aws-cdk/toolkit-lib/lib/util/promises.ts
|
|
84086
84098
|
function promiseWithResolvers() {
|
|
84087
|
-
let
|
|
84099
|
+
let resolve17, reject;
|
|
84088
84100
|
const promise = new Promise((res, rej) => {
|
|
84089
|
-
|
|
84101
|
+
resolve17 = res;
|
|
84090
84102
|
reject = rej;
|
|
84091
84103
|
});
|
|
84092
|
-
return { promise, resolve:
|
|
84104
|
+
return { promise, resolve: resolve17, reject };
|
|
84093
84105
|
}
|
|
84094
84106
|
async function waitFor(valueProvider, timeout = 5e3) {
|
|
84095
84107
|
while (true) {
|
|
@@ -92191,6 +92203,13 @@ function assertEvaluatesToString(intrinsic, value2) {
|
|
|
92191
92203
|
throw new CfnEvaluationException(`${intrinsic}: expected a string, got ${JSON.stringify(value2)}`);
|
|
92192
92204
|
}
|
|
92193
92205
|
}
|
|
92206
|
+
function topLevelPropertyName(property) {
|
|
92207
|
+
if (typeof property !== "string" || !property.startsWith("/properties/")) {
|
|
92208
|
+
return void 0;
|
|
92209
|
+
}
|
|
92210
|
+
const [first] = property.slice("/properties/".length).split("/");
|
|
92211
|
+
return first?.replace(/~1/g, "/").replace(/~0/g, "~") || void 0;
|
|
92212
|
+
}
|
|
92194
92213
|
function iamArnFmt(parts) {
|
|
92195
92214
|
return `arn:${parts.partition}:${parts.service}::${parts.account}:${parts.resourceType}/${parts.resourceName}`;
|
|
92196
92215
|
}
|
|
@@ -92307,6 +92326,7 @@ var init_evaluate_cloudformation_template = __esm({
|
|
|
92307
92326
|
};
|
|
92308
92327
|
__name(assertEvaluatesToArray, "assertEvaluatesToArray");
|
|
92309
92328
|
__name(assertEvaluatesToString, "assertEvaluatesToString");
|
|
92329
|
+
__name(topLevelPropertyName, "topLevelPropertyName");
|
|
92310
92330
|
EvaluateCloudFormationTemplate = class _EvaluateCloudFormationTemplate {
|
|
92311
92331
|
static {
|
|
92312
92332
|
__name(this, "EvaluateCloudFormationTemplate");
|
|
@@ -92324,6 +92344,7 @@ var init_evaluate_cloudformation_template = __esm({
|
|
|
92324
92344
|
lookupExport;
|
|
92325
92345
|
cachedUrlSuffix;
|
|
92326
92346
|
_cloudControl;
|
|
92347
|
+
createOnlyPropertiesCache = /* @__PURE__ */ new Map();
|
|
92327
92348
|
constructor(props) {
|
|
92328
92349
|
this.stackArtifact = props.stackArtifact;
|
|
92329
92350
|
this.stackName = props.stackName ?? props.stackArtifact.stackName;
|
|
@@ -92519,6 +92540,49 @@ var init_evaluate_cloudformation_template = __esm({
|
|
|
92519
92540
|
}
|
|
92520
92541
|
return physicalId;
|
|
92521
92542
|
}
|
|
92543
|
+
/**
|
|
92544
|
+
* Best-effort lookup of the top-level property names the resource type
|
|
92545
|
+
* declares as create-only (e.g. `QueueName` for `AWS::SQS::Queue`).
|
|
92546
|
+
*
|
|
92547
|
+
* Read from the registry schema via `cloudformation:DescribeType` and
|
|
92548
|
+
* cached per resource type. Returns an empty set when the schema cannot be
|
|
92549
|
+
* retrieved, so callers keep their previous behavior instead of failing
|
|
92550
|
+
* on the lookup itself.
|
|
92551
|
+
*/
|
|
92552
|
+
async getCreateOnlyProperties(resourceType) {
|
|
92553
|
+
const cached3 = this.createOnlyPropertiesCache.get(resourceType);
|
|
92554
|
+
if (cached3) {
|
|
92555
|
+
return cached3;
|
|
92556
|
+
}
|
|
92557
|
+
const createOnly = await this.fetchCreateOnlyProperties(resourceType);
|
|
92558
|
+
this.createOnlyPropertiesCache.set(resourceType, createOnly);
|
|
92559
|
+
return createOnly;
|
|
92560
|
+
}
|
|
92561
|
+
async fetchCreateOnlyProperties(resourceType) {
|
|
92562
|
+
try {
|
|
92563
|
+
const response = await this.sdk.cloudFormation().describeType({
|
|
92564
|
+
Type: "RESOURCE",
|
|
92565
|
+
TypeName: resourceType
|
|
92566
|
+
});
|
|
92567
|
+
if (!response.Schema) {
|
|
92568
|
+
return /* @__PURE__ */ new Set();
|
|
92569
|
+
}
|
|
92570
|
+
const schema = JSON.parse(response.Schema);
|
|
92571
|
+
if (!Array.isArray(schema.createOnlyProperties)) {
|
|
92572
|
+
return /* @__PURE__ */ new Set();
|
|
92573
|
+
}
|
|
92574
|
+
const names = /* @__PURE__ */ new Set();
|
|
92575
|
+
for (const property of schema.createOnlyProperties) {
|
|
92576
|
+
const topLevel = topLevelPropertyName(property);
|
|
92577
|
+
if (topLevel) {
|
|
92578
|
+
names.add(topLevel);
|
|
92579
|
+
}
|
|
92580
|
+
}
|
|
92581
|
+
return names;
|
|
92582
|
+
} catch {
|
|
92583
|
+
return /* @__PURE__ */ new Set();
|
|
92584
|
+
}
|
|
92585
|
+
}
|
|
92522
92586
|
getResourceProperty(logicalId, propertyName) {
|
|
92523
92587
|
return this.template.Resources?.[logicalId]?.Properties?.[propertyName];
|
|
92524
92588
|
}
|
|
@@ -95990,15 +96054,16 @@ __export(cfn_api_exports, {
|
|
|
95990
96054
|
});
|
|
95991
96055
|
async function createDiffChangeSet(ioHelper, options) {
|
|
95992
96056
|
try {
|
|
95993
|
-
const { cfn, bodyParameter, exists, executionRoleArn, diagnoser } = await prepareChangeSetEnv(ioHelper, options);
|
|
96057
|
+
const { cfn, bodyParameter, exists, stackExistedBefore, executionRoleArn, diagnoser } = await prepareChangeSetEnv(ioHelper, options);
|
|
95994
96058
|
await ioHelper.defaults.info(
|
|
95995
96059
|
"Hold on while we create a read-only change set to get a diff with accurate replacement information (use --method=template to use a less accurate but faster template-only diff)\n"
|
|
95996
96060
|
);
|
|
95997
96061
|
return await createChangeSetAndCleanup(ioHelper, {
|
|
95998
96062
|
cfn,
|
|
95999
|
-
changeSetName:
|
|
96063
|
+
changeSetName: options.changeSetName ?? `cdk-diff-change-set-${options.uuid}`,
|
|
96000
96064
|
stack: options.stack,
|
|
96001
96065
|
exists,
|
|
96066
|
+
stackExistedBefore,
|
|
96002
96067
|
uuid: options.uuid,
|
|
96003
96068
|
bodyParameter,
|
|
96004
96069
|
parameters: options.parameters,
|
|
@@ -96118,6 +96183,9 @@ async function createChangeSetAndCleanup(ioHelper, options) {
|
|
|
96118
96183
|
StackName: stackId,
|
|
96119
96184
|
ClientRequestToken: (0, import_node_crypto9.randomUUID)()
|
|
96120
96185
|
});
|
|
96186
|
+
if (!options.stackExistedBefore) {
|
|
96187
|
+
await waitForStackDelete(options.cfn, ioHelper, stackId);
|
|
96188
|
+
}
|
|
96121
96189
|
}
|
|
96122
96190
|
}
|
|
96123
96191
|
}
|
|
@@ -96155,6 +96223,7 @@ async function createValidationChangeSet(ioHelper, options) {
|
|
|
96155
96223
|
StackName: changeSet.StackId ?? options.stack.stackName,
|
|
96156
96224
|
ClientRequestToken: (0, import_node_crypto9.randomUUID)()
|
|
96157
96225
|
}).catch((e6) => ioHelper.defaults.warn(`Failed to clean up REVIEW_IN_PROGRESS stack: ${e6}`));
|
|
96226
|
+
await waitForStackDelete(cfn, ioHelper, changeSet.StackId ?? options.stack.stackName).catch((e6) => ioHelper.defaults.warn(`Failed to wait for REVIEW_IN_PROGRESS stack cleanup: ${e6}`));
|
|
96158
96227
|
}
|
|
96159
96228
|
}
|
|
96160
96229
|
}
|
|
@@ -108367,11 +108436,12 @@ var init_ecs_services = __esm({
|
|
|
108367
108436
|
});
|
|
108368
108437
|
|
|
108369
108438
|
// ../@aws-cdk/toolkit-lib/lib/api/hotswap/hotswap-template-cache.ts
|
|
108370
|
-
function cachePath(assemblyDir, stackName) {
|
|
108371
|
-
|
|
108439
|
+
function cachePath(assemblyDir, stackName, environment) {
|
|
108440
|
+
const environmentKey = environment.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
108441
|
+
return path19.join(assemblyDir, CACHE_DIR, `${stackName}.${environmentKey}.json`);
|
|
108372
108442
|
}
|
|
108373
|
-
async function readHotswapTemplateCache(assemblyDir, stackName, newRootTemplate) {
|
|
108374
|
-
const cachedPath = cachePath(assemblyDir, stackName);
|
|
108443
|
+
async function readHotswapTemplateCache(assemblyDir, stackName, newRootTemplate, environment) {
|
|
108444
|
+
const cachedPath = cachePath(assemblyDir, stackName, environment);
|
|
108375
108445
|
try {
|
|
108376
108446
|
const cached3 = await fs19.readJson(cachedPath);
|
|
108377
108447
|
return {
|
|
@@ -108382,17 +108452,17 @@ async function readHotswapTemplateCache(assemblyDir, stackName, newRootTemplate)
|
|
|
108382
108452
|
return void 0;
|
|
108383
108453
|
}
|
|
108384
108454
|
}
|
|
108385
|
-
async function writeHotswapTemplateCache(assemblyDir, stackName, rootTemplate, nestedStacks) {
|
|
108455
|
+
async function writeHotswapTemplateCache(assemblyDir, stackName, rootTemplate, nestedStacks, environment) {
|
|
108386
108456
|
const state2 = {
|
|
108387
108457
|
deployedRootTemplate: rootTemplate,
|
|
108388
108458
|
nestedStacks: toCachedNestedStacks(nestedStacks)
|
|
108389
108459
|
};
|
|
108390
|
-
const cachedPath = cachePath(assemblyDir, stackName);
|
|
108460
|
+
const cachedPath = cachePath(assemblyDir, stackName, environment);
|
|
108391
108461
|
await fs19.ensureDir(path19.dirname(cachedPath));
|
|
108392
108462
|
await fs19.writeJson(cachedPath, state2, { spaces: 2 });
|
|
108393
108463
|
}
|
|
108394
|
-
async function invalidateHotswapTemplateCache(assemblyDir, stackName) {
|
|
108395
|
-
await fs19.rm(cachePath(assemblyDir, stackName), { force: true });
|
|
108464
|
+
async function invalidateHotswapTemplateCache(assemblyDir, stackName, environment) {
|
|
108465
|
+
await fs19.rm(cachePath(assemblyDir, stackName, environment), { force: true });
|
|
108396
108466
|
}
|
|
108397
108467
|
function toCachedNestedStacks(nestedStacks) {
|
|
108398
108468
|
const result2 = {};
|
|
@@ -108793,12 +108863,16 @@ async function isHotswappableCloudControlChange(logicalId, change, evaluateCfnTe
|
|
|
108793
108863
|
if (changedPropNames.length === 0) {
|
|
108794
108864
|
return ret;
|
|
108795
108865
|
}
|
|
108796
|
-
const
|
|
108866
|
+
const resourceType = change.newValue.Type;
|
|
108867
|
+
const createOnlyProps = await evaluateCfnTemplate.getCreateOnlyProperties(resourceType);
|
|
108868
|
+
const classifiedChanges = classifyChanges(
|
|
108869
|
+
change,
|
|
108870
|
+
changedPropNames.filter((name) => !createOnlyProps.has(name))
|
|
108871
|
+
);
|
|
108797
108872
|
classifiedChanges.reportNonHotswappablePropertyChanges(ret);
|
|
108798
108873
|
if (classifiedChanges.namesOfHotswappableProps.length === 0) {
|
|
108799
108874
|
return ret;
|
|
108800
108875
|
}
|
|
108801
|
-
const resourceType = change.newValue.Type;
|
|
108802
108876
|
const identifier = await resolveCloudControlIdentifier(logicalId, resourceType, evaluateCfnTemplate);
|
|
108803
108877
|
if (!identifier) {
|
|
108804
108878
|
ret.push(nonHotswappableChange(
|
|
@@ -109075,18 +109149,18 @@ var require_p_limit = __commonJS({
|
|
|
109075
109149
|
queue.dequeue()();
|
|
109076
109150
|
}
|
|
109077
109151
|
}, "next");
|
|
109078
|
-
const run5 = /* @__PURE__ */ __name(async (fn,
|
|
109152
|
+
const run5 = /* @__PURE__ */ __name(async (fn, resolve17, ...args) => {
|
|
109079
109153
|
activeCount++;
|
|
109080
109154
|
const result2 = (async () => fn(...args))();
|
|
109081
|
-
|
|
109155
|
+
resolve17(result2);
|
|
109082
109156
|
try {
|
|
109083
109157
|
await result2;
|
|
109084
109158
|
} catch {
|
|
109085
109159
|
}
|
|
109086
109160
|
next();
|
|
109087
109161
|
}, "run");
|
|
109088
|
-
const enqueue = /* @__PURE__ */ __name((fn,
|
|
109089
|
-
queue.enqueue(run5.bind(null, fn,
|
|
109162
|
+
const enqueue = /* @__PURE__ */ __name((fn, resolve17, ...args) => {
|
|
109163
|
+
queue.enqueue(run5.bind(null, fn, resolve17, ...args));
|
|
109090
109164
|
(async () => {
|
|
109091
109165
|
await Promise.resolve();
|
|
109092
109166
|
if (activeCount < concurrency && queue.size > 0) {
|
|
@@ -109094,8 +109168,8 @@ var require_p_limit = __commonJS({
|
|
|
109094
109168
|
}
|
|
109095
109169
|
})();
|
|
109096
109170
|
}, "enqueue");
|
|
109097
|
-
const generator = /* @__PURE__ */ __name((fn, ...args) => new Promise((
|
|
109098
|
-
enqueue(fn,
|
|
109171
|
+
const generator = /* @__PURE__ */ __name((fn, ...args) => new Promise((resolve17) => {
|
|
109172
|
+
enqueue(fn, resolve17, ...args);
|
|
109099
109173
|
}), "generator");
|
|
109100
109174
|
Object.defineProperties(generator, {
|
|
109101
109175
|
activeCount: {
|
|
@@ -109149,7 +109223,8 @@ async function tryHotswapDeployment(sdkProvider, ioHelper, assetParams, cloudFor
|
|
|
109149
109223
|
async function hotswapDeployment(sdkProvider, ioSpan, assetParams, stack, hotswapMode, hotswapPropertyOverrides) {
|
|
109150
109224
|
const resolvedEnv = await sdkProvider.resolveEnvironment(stack.environment);
|
|
109151
109225
|
const sdk = (await sdkProvider.forEnvironment(resolvedEnv, 1 /* ForWriting */)).sdk;
|
|
109152
|
-
const
|
|
109226
|
+
const environmentKey = `${resolvedEnv.account}/${resolvedEnv.region}`;
|
|
109227
|
+
const hotswapCache = await readHotswapTemplateCache(stack.assembly.directory, stack.stackName, stack.template, environmentKey);
|
|
109153
109228
|
const currentTemplate = hotswapCache ?? await loadCurrentTemplateWithNestedStacks(stack, sdk);
|
|
109154
109229
|
const evaluateCfnTemplate = new EvaluateCloudFormationTemplate({
|
|
109155
109230
|
stackArtifact: stack,
|
|
@@ -109192,7 +109267,7 @@ async function hotswapDeployment(sdkProvider, ioSpan, assetParams, stack, hotswa
|
|
|
109192
109267
|
let error3;
|
|
109193
109268
|
try {
|
|
109194
109269
|
await applyAllHotswapOperations(sdk, ioSpan, hotswappable);
|
|
109195
|
-
await writeHotswapTemplateCache(stack.assembly.directory, stack.stackName, stack.template, currentTemplate.nestedStacks);
|
|
109270
|
+
await writeHotswapTemplateCache(stack.assembly.directory, stack.stackName, stack.template, currentTemplate.nestedStacks, environmentKey);
|
|
109196
109271
|
} catch (e6) {
|
|
109197
109272
|
error3 = e6;
|
|
109198
109273
|
}
|
|
@@ -109833,10 +109908,12 @@ async function canSkipDeploy(deployStackOptions, cloudFormationStack, parameterC
|
|
|
109833
109908
|
await ioHelper.defaults.debug(`${deployName}: stack is in a failure state`);
|
|
109834
109909
|
return false;
|
|
109835
109910
|
}
|
|
109911
|
+
const hotswapCacheEnv = deployStackOptions.resolvedEnvironment;
|
|
109836
109912
|
const hotswapCache = await readHotswapTemplateCache(
|
|
109837
109913
|
deployStackOptions.stack.assembly.directory,
|
|
109838
109914
|
deployStackOptions.stack.stackName,
|
|
109839
|
-
deployStackOptions.stack.template
|
|
109915
|
+
deployStackOptions.stack.template,
|
|
109916
|
+
`${hotswapCacheEnv.account}/${hotswapCacheEnv.region}`
|
|
109840
109917
|
);
|
|
109841
109918
|
if (hotswapCache && (0, import_cloudformation_diff.diffTemplate)(hotswapCache.deployedRootTemplate, deployStackOptions.stack.template).differenceCount > 0) {
|
|
109842
109919
|
await ioHelper.defaults.debug(`${deployName}: template has changed in relation to last successful hotswap deployment`);
|
|
@@ -109928,7 +110005,12 @@ var init_deploy_stack = __esm({
|
|
|
109928
110005
|
uuid;
|
|
109929
110006
|
async performDeployment() {
|
|
109930
110007
|
const deploymentMethod = this.deploymentMethod ?? { method: "change-set" };
|
|
109931
|
-
|
|
110008
|
+
const deploymentEnv = this.options.resolvedEnvironment;
|
|
110009
|
+
await invalidateHotswapTemplateCache(
|
|
110010
|
+
this.stackArtifact.assembly.directory,
|
|
110011
|
+
this.stackArtifact.stackName,
|
|
110012
|
+
`${deploymentEnv.account}/${deploymentEnv.region}`
|
|
110013
|
+
);
|
|
109932
110014
|
if (deploymentMethod.method === "direct" && this.options.resourcesToImport) {
|
|
109933
110015
|
throw new ToolkitError("ImportRequiresChangeSet", "Importing resources requires a changeset deployment");
|
|
109934
110016
|
}
|
|
@@ -110638,18 +110720,18 @@ var init_network_detector = __esm({
|
|
|
110638
110720
|
agent,
|
|
110639
110721
|
timeout: this.TIMEOUT
|
|
110640
110722
|
};
|
|
110641
|
-
return new Promise((
|
|
110723
|
+
return new Promise((resolve17) => {
|
|
110642
110724
|
const req = https.request(
|
|
110643
110725
|
_NetworkDetector.URL,
|
|
110644
110726
|
options,
|
|
110645
110727
|
(res) => {
|
|
110646
|
-
|
|
110728
|
+
resolve17(res.statusCode !== void 0 && res.statusCode < 500);
|
|
110647
110729
|
}
|
|
110648
110730
|
);
|
|
110649
|
-
req.on("error", () =>
|
|
110731
|
+
req.on("error", () => resolve17(false));
|
|
110650
110732
|
req.on("timeout", () => {
|
|
110651
110733
|
req.destroy();
|
|
110652
|
-
|
|
110734
|
+
resolve17(false);
|
|
110653
110735
|
});
|
|
110654
110736
|
req.end();
|
|
110655
110737
|
});
|
|
@@ -110691,7 +110773,7 @@ var init_web_data_source = __esm({
|
|
|
110691
110773
|
const options = {
|
|
110692
110774
|
agent: this.agent
|
|
110693
110775
|
};
|
|
110694
|
-
const notices = await new Promise((
|
|
110776
|
+
const notices = await new Promise((resolve17, reject) => {
|
|
110695
110777
|
let req;
|
|
110696
110778
|
let timer = setTimeout(() => {
|
|
110697
110779
|
if (req) {
|
|
@@ -110716,7 +110798,7 @@ var init_web_data_source = __esm({
|
|
|
110716
110798
|
if (!data) {
|
|
110717
110799
|
throw new ToolkitError("MissingNoticesKey", "'notices' key is missing from received data");
|
|
110718
110800
|
}
|
|
110719
|
-
|
|
110801
|
+
resolve17(data ?? []);
|
|
110720
110802
|
} catch (e6) {
|
|
110721
110803
|
reject(ToolkitError.withCause("NoticesParseError", `Parse error: ${formatErrorMessage(e6)}`, e6));
|
|
110722
110804
|
}
|
|
@@ -111994,10 +112076,11 @@ function bootstrapVersionFromTemplate(template) {
|
|
|
111994
112076
|
function bootstrapVariantFromTemplate(template) {
|
|
111995
112077
|
return template.Parameters?.[BOOTSTRAP_VARIANT_PARAMETER]?.Default ?? DEFAULT_BOOTSTRAP_VARIANT;
|
|
111996
112078
|
}
|
|
111997
|
-
var os6, path23, import_cloud_assembly_api6, import_cloud_assembly_schema5, fs23, BootstrapStack;
|
|
112079
|
+
var import_node_crypto12, os6, path23, import_cloud_assembly_api6, import_cloud_assembly_schema5, fs23, BootstrapStack;
|
|
111998
112080
|
var init_deploy_bootstrap = __esm({
|
|
111999
112081
|
"../@aws-cdk/toolkit-lib/lib/api/bootstrap/deploy-bootstrap.ts"() {
|
|
112000
112082
|
"use strict";
|
|
112083
|
+
import_node_crypto12 = require("node:crypto");
|
|
112001
112084
|
os6 = __toESM(require("os"));
|
|
112002
112085
|
path23 = __toESM(require("path"));
|
|
112003
112086
|
import_cloud_assembly_api6 = __toESM(require_lib3());
|
|
@@ -112107,6 +112190,11 @@ var init_deploy_bootstrap = __esm({
|
|
|
112107
112190
|
deploymentMethod: {
|
|
112108
112191
|
method: "change-set",
|
|
112109
112192
|
execute: options.execute,
|
|
112193
|
+
// A unique name when executing, so parallel bootstraps don't collide.
|
|
112194
|
+
// With --no-execute the change set is left in review for the user, so
|
|
112195
|
+
// keep the stable default name: re-running replaces the pending change
|
|
112196
|
+
// set instead of accumulating one per run.
|
|
112197
|
+
changeSetName: options.execute ?? true ? `cdk-bootstrap-change-set-${(0, import_node_crypto12.randomUUID)()}` : void 0,
|
|
112110
112198
|
importExistingResources: options.importExistingResources ?? true
|
|
112111
112199
|
},
|
|
112112
112200
|
parameters,
|
|
@@ -112975,6 +113063,20 @@ async function writeFileAtomic(filename, contents) {
|
|
|
112975
113063
|
await import_fs3.promises.writeFile(tmpFile, contents, { encoding: "utf-8" });
|
|
112976
113064
|
await import_fs3.promises.rename(tmpFile, filename);
|
|
112977
113065
|
}
|
|
113066
|
+
async function writeLockFile(filename, contents) {
|
|
113067
|
+
await writeFileAtomic(filename, contents);
|
|
113068
|
+
ownedLockFiles.add(filename);
|
|
113069
|
+
}
|
|
113070
|
+
async function deleteLockFile(filename) {
|
|
113071
|
+
ownedLockFiles.delete(filename);
|
|
113072
|
+
await deleteFile(filename);
|
|
113073
|
+
}
|
|
113074
|
+
function isStale(filename, pid) {
|
|
113075
|
+
if (pid === process.pid) {
|
|
113076
|
+
return !ownedLockFiles.has(filename);
|
|
113077
|
+
}
|
|
113078
|
+
return !processExists(pid);
|
|
113079
|
+
}
|
|
112978
113080
|
async function deleteFile(filename) {
|
|
112979
113081
|
try {
|
|
112980
113082
|
await import_fs3.promises.unlink(filename);
|
|
@@ -112993,18 +113095,20 @@ function processExists(pid) {
|
|
|
112993
113095
|
return false;
|
|
112994
113096
|
}
|
|
112995
113097
|
}
|
|
112996
|
-
var import_fs3, path26, RWLock, tmpCounter;
|
|
113098
|
+
var import_fs3, path26, ownedLockFiles, readCounter, RWLock, tmpCounter;
|
|
112997
113099
|
var init_rwlock = __esm({
|
|
112998
113100
|
"../@aws-cdk/toolkit-lib/lib/api/rwlock.ts"() {
|
|
112999
113101
|
"use strict";
|
|
113000
113102
|
import_fs3 = require("fs");
|
|
113001
113103
|
path26 = __toESM(require("path"));
|
|
113002
113104
|
init_toolkit_error();
|
|
113105
|
+
ownedLockFiles = /* @__PURE__ */ new Set();
|
|
113106
|
+
readCounter = 0;
|
|
113003
113107
|
RWLock = class {
|
|
113004
113108
|
constructor(directory) {
|
|
113005
113109
|
this.directory = directory;
|
|
113006
113110
|
this.pidString = `${process.pid}`;
|
|
113007
|
-
this.writerFile = path26.
|
|
113111
|
+
this.writerFile = path26.resolve(this.directory, "synth.lock");
|
|
113008
113112
|
}
|
|
113009
113113
|
directory;
|
|
113010
113114
|
static {
|
|
@@ -113012,7 +113116,6 @@ var init_rwlock = __esm({
|
|
|
113012
113116
|
}
|
|
113013
113117
|
pidString;
|
|
113014
113118
|
writerFile;
|
|
113015
|
-
readCounter = 0;
|
|
113016
113119
|
/**
|
|
113017
113120
|
* Acquire a writer lock.
|
|
113018
113121
|
*
|
|
@@ -113024,18 +113127,18 @@ var init_rwlock = __esm({
|
|
|
113024
113127
|
if (readers.length > 0) {
|
|
113025
113128
|
throw new LockError("ConcurrentReadLock", `Other CLIs (PID=${readers}) are currently reading from ${this.directory}. Invoke the CLI in sequence, or use '--output' to synth into different directories.`);
|
|
113026
113129
|
}
|
|
113027
|
-
await
|
|
113130
|
+
await writeLockFile(this.writerFile, this.pidString);
|
|
113028
113131
|
let released = false;
|
|
113029
113132
|
return {
|
|
113030
113133
|
release: /* @__PURE__ */ __name(async () => {
|
|
113031
113134
|
if (!released) {
|
|
113032
|
-
await
|
|
113135
|
+
await deleteLockFile(this.writerFile);
|
|
113033
113136
|
released = true;
|
|
113034
113137
|
}
|
|
113035
113138
|
}, "release"),
|
|
113036
113139
|
convertToReaderLock: /* @__PURE__ */ __name(async () => {
|
|
113037
113140
|
const ret = await this.doAcquireRead();
|
|
113038
|
-
await
|
|
113141
|
+
await deleteLockFile(this.writerFile);
|
|
113039
113142
|
return ret;
|
|
113040
113143
|
}, "convertToReaderLock")
|
|
113041
113144
|
};
|
|
@@ -113057,19 +113160,19 @@ var init_rwlock = __esm({
|
|
|
113057
113160
|
* is incremented "atomically" from the point of view of this PID.).
|
|
113058
113161
|
*/
|
|
113059
113162
|
readerFile() {
|
|
113060
|
-
return path26.
|
|
113163
|
+
return path26.resolve(this.directory, `read.${this.pidString}.${++readCounter}.lock`);
|
|
113061
113164
|
}
|
|
113062
113165
|
/**
|
|
113063
113166
|
* Do the actual acquiring of a read lock.
|
|
113064
113167
|
*/
|
|
113065
113168
|
async doAcquireRead() {
|
|
113066
113169
|
const readerFile = this.readerFile();
|
|
113067
|
-
await
|
|
113170
|
+
await writeLockFile(readerFile, this.pidString);
|
|
113068
113171
|
let released = false;
|
|
113069
113172
|
return {
|
|
113070
113173
|
release: /* @__PURE__ */ __name(async () => {
|
|
113071
113174
|
if (!released) {
|
|
113072
|
-
await
|
|
113175
|
+
await deleteLockFile(readerFile);
|
|
113073
113176
|
released = true;
|
|
113074
113177
|
}
|
|
113075
113178
|
}, "release")
|
|
@@ -113094,7 +113197,7 @@ var init_rwlock = __esm({
|
|
|
113094
113197
|
return void 0;
|
|
113095
113198
|
}
|
|
113096
113199
|
const pid = parseInt(contents, 10);
|
|
113097
|
-
if (
|
|
113200
|
+
if (isStale(this.writerFile, pid)) {
|
|
113098
113201
|
await deleteFile(this.writerFile);
|
|
113099
113202
|
return void 0;
|
|
113100
113203
|
}
|
|
@@ -113123,10 +113226,11 @@ var init_rwlock = __esm({
|
|
|
113123
113226
|
const m4 = fname.match(re);
|
|
113124
113227
|
if (m4) {
|
|
113125
113228
|
const pid = parseInt(m4[1], 10);
|
|
113126
|
-
|
|
113127
|
-
|
|
113229
|
+
const file = path26.resolve(this.directory, fname);
|
|
113230
|
+
if (isStale(file, pid)) {
|
|
113231
|
+
await deleteFile(file);
|
|
113128
113232
|
} else {
|
|
113129
|
-
|
|
113233
|
+
ret.push(pid);
|
|
113130
113234
|
}
|
|
113131
113235
|
}
|
|
113132
113236
|
}
|
|
@@ -113136,6 +113240,9 @@ var init_rwlock = __esm({
|
|
|
113136
113240
|
__name(readFileIfExists, "readFileIfExists");
|
|
113137
113241
|
tmpCounter = 0;
|
|
113138
113242
|
__name(writeFileAtomic, "writeFileAtomic");
|
|
113243
|
+
__name(writeLockFile, "writeLockFile");
|
|
113244
|
+
__name(deleteLockFile, "deleteLockFile");
|
|
113245
|
+
__name(isStale, "isStale");
|
|
113139
113246
|
__name(deleteFile, "deleteFile");
|
|
113140
113247
|
__name(processExists, "processExists");
|
|
113141
113248
|
}
|
|
@@ -285217,7 +285324,7 @@ var require_dist_cjs45 = __commonJS({
|
|
|
285217
285324
|
return (numFailures) => Math.pow(1.2, numFailures);
|
|
285218
285325
|
}
|
|
285219
285326
|
sleep(ms) {
|
|
285220
|
-
return new Promise((
|
|
285327
|
+
return new Promise((resolve17) => setTimeout(resolve17, ms));
|
|
285221
285328
|
}
|
|
285222
285329
|
async retryWithBackoff(operation2) {
|
|
285223
285330
|
let lastError;
|
|
@@ -285700,7 +285807,7 @@ async function v3ProviderFromPlugin(producer) {
|
|
|
285700
285807
|
} else if (isV2Credentials(initial)) {
|
|
285701
285808
|
return v3ProviderFromV2Credentials(initial);
|
|
285702
285809
|
} else {
|
|
285703
|
-
throw new AuthenticationError("InvalidPluginCredentials", `Plugin returned a value that doesn't resemble AWS credentials
|
|
285810
|
+
throw new AuthenticationError("InvalidPluginCredentials", `Plugin returned a value that doesn't resemble AWS credentials (got ${describeShape(initial)})`);
|
|
285704
285811
|
}
|
|
285705
285812
|
}
|
|
285706
285813
|
function v3ProviderFromV2Credentials(x) {
|
|
@@ -285719,7 +285826,7 @@ function refreshFromPluginProvider(current, producer) {
|
|
|
285719
285826
|
if (credentialsAboutToExpire(current)) {
|
|
285720
285827
|
const newCreds = await producer();
|
|
285721
285828
|
if (!isV3Credentials(newCreds)) {
|
|
285722
|
-
throw new AuthenticationError("PluginCredentialTypeMismatch", `Plugin initially returned static V3 credentials but now returned something else
|
|
285829
|
+
throw new AuthenticationError("PluginCredentialTypeMismatch", `Plugin initially returned static V3 credentials but now returned something else (got ${describeShape(newCreds)})`);
|
|
285723
285830
|
}
|
|
285724
285831
|
current = newCreds;
|
|
285725
285832
|
}
|
|
@@ -285729,17 +285836,22 @@ function refreshFromPluginProvider(current, producer) {
|
|
|
285729
285836
|
function isV3Provider(x) {
|
|
285730
285837
|
return typeof x === "function";
|
|
285731
285838
|
}
|
|
285839
|
+
function describeShape(x) {
|
|
285840
|
+
if (x && typeof x === "object") {
|
|
285841
|
+
return `an object with keys [${Object.keys(x).join(", ")}]`;
|
|
285842
|
+
}
|
|
285843
|
+
return x === null ? "null" : `a value of type ${typeof x}`;
|
|
285844
|
+
}
|
|
285732
285845
|
function isV2Credentials(x) {
|
|
285733
285846
|
return !!(x && typeof x === "object" && x.getPromise);
|
|
285734
285847
|
}
|
|
285735
285848
|
function isV3Credentials(x) {
|
|
285736
285849
|
return !!(x && typeof x === "object" && x.accessKeyId && !isV2Credentials(x));
|
|
285737
285850
|
}
|
|
285738
|
-
var
|
|
285851
|
+
var CredentialPlugins;
|
|
285739
285852
|
var init_credential_plugins = __esm({
|
|
285740
285853
|
"../@aws-cdk/toolkit-lib/lib/api/aws-auth/credential-plugins.ts"() {
|
|
285741
285854
|
"use strict";
|
|
285742
|
-
import_util45 = require("util");
|
|
285743
285855
|
init_provider_caching();
|
|
285744
285856
|
init_toolkit_error();
|
|
285745
285857
|
init_util4();
|
|
@@ -285805,6 +285917,7 @@ var init_credential_plugins = __esm({
|
|
|
285805
285917
|
__name(v3ProviderFromV2Credentials, "v3ProviderFromV2Credentials");
|
|
285806
285918
|
__name(refreshFromPluginProvider, "refreshFromPluginProvider");
|
|
285807
285919
|
__name(isV3Provider, "isV3Provider");
|
|
285920
|
+
__name(describeShape, "describeShape");
|
|
285808
285921
|
__name(isV2Credentials, "isV2Credentials");
|
|
285809
285922
|
__name(isV3Credentials, "isV3Credentials");
|
|
285810
285923
|
}
|
|
@@ -286138,7 +286251,7 @@ function formatSdkLoggerContent(content) {
|
|
|
286138
286251
|
return apiFmt;
|
|
286139
286252
|
}
|
|
286140
286253
|
}
|
|
286141
|
-
return content.map((x) => typeof x === "string" ? x : (0,
|
|
286254
|
+
return content.map((x) => typeof x === "string" ? x : (0, import_util47.inspect)(x)).join("");
|
|
286142
286255
|
}
|
|
286143
286256
|
function formatApiCall(content) {
|
|
286144
286257
|
if (!isSdkApiCallSuccess(content) && !isSdkApiCallError(content)) {
|
|
@@ -286164,11 +286277,11 @@ function isSdkApiCallSuccess(x) {
|
|
|
286164
286277
|
function isSdkApiCallError(x) {
|
|
286165
286278
|
return x && typeof x === "object" && x.commandName && x.error;
|
|
286166
286279
|
}
|
|
286167
|
-
var
|
|
286280
|
+
var import_util47, IoHostSdkLogger;
|
|
286168
286281
|
var init_sdk_logger = __esm({
|
|
286169
286282
|
"../@aws-cdk/toolkit-lib/lib/api/aws-auth/sdk-logger.ts"() {
|
|
286170
286283
|
"use strict";
|
|
286171
|
-
|
|
286284
|
+
import_util47 = require("util");
|
|
286172
286285
|
init_util4();
|
|
286173
286286
|
init_private();
|
|
286174
286287
|
IoHostSdkLogger = class {
|
|
@@ -286180,7 +286293,7 @@ var init_sdk_logger = __esm({
|
|
|
286180
286293
|
this.ioHelper = ioHelper;
|
|
286181
286294
|
}
|
|
286182
286295
|
notify(level, ...content) {
|
|
286183
|
-
void this.ioHelper.notify(IO.CDK_SDK_I0100.msg((0,
|
|
286296
|
+
void this.ioHelper.notify(IO.CDK_SDK_I0100.msg((0, import_util47.format)("[SDK %s] %s", level, formatSdkLoggerContent(content)), {
|
|
286184
286297
|
sdkLevel: level,
|
|
286185
286298
|
content
|
|
286186
286299
|
}));
|
|
@@ -288677,7 +288790,7 @@ var require_placeholders = __commonJS({
|
|
|
288677
288790
|
"use strict";
|
|
288678
288791
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
288679
288792
|
exports2.EnvironmentPlaceholders = void 0;
|
|
288680
|
-
var
|
|
288793
|
+
var EnvironmentPlaceholders5 = class _EnvironmentPlaceholders {
|
|
288681
288794
|
static {
|
|
288682
288795
|
__name(this, "EnvironmentPlaceholders");
|
|
288683
288796
|
}
|
|
@@ -288741,10 +288854,10 @@ var require_placeholders = __commonJS({
|
|
|
288741
288854
|
return ret;
|
|
288742
288855
|
}
|
|
288743
288856
|
};
|
|
288744
|
-
exports2.EnvironmentPlaceholders =
|
|
288745
|
-
|
|
288746
|
-
|
|
288747
|
-
|
|
288857
|
+
exports2.EnvironmentPlaceholders = EnvironmentPlaceholders5;
|
|
288858
|
+
EnvironmentPlaceholders5.CURRENT_REGION = "${AWS::Region}";
|
|
288859
|
+
EnvironmentPlaceholders5.CURRENT_ACCOUNT = "${AWS::AccountId}";
|
|
288860
|
+
EnvironmentPlaceholders5.CURRENT_PARTITION = "${AWS::Partition}";
|
|
288748
288861
|
function replaceAll2(s2, search, replace) {
|
|
288749
288862
|
return s2.split(search).join(replace);
|
|
288750
288863
|
}
|
|
@@ -291264,12 +291377,12 @@ var init_readable_assembly = __esm({
|
|
|
291264
291377
|
});
|
|
291265
291378
|
|
|
291266
291379
|
// ../@aws-cdk/toolkit-lib/lib/api/cloud-assembly/source-builder.ts
|
|
291267
|
-
var path31,
|
|
291380
|
+
var path31, import_util52, cxapi6, fs31, CloudAssemblySourceBuilder;
|
|
291268
291381
|
var init_source_builder = __esm({
|
|
291269
291382
|
"../@aws-cdk/toolkit-lib/lib/api/cloud-assembly/source-builder.ts"() {
|
|
291270
291383
|
"use strict";
|
|
291271
291384
|
path31 = __toESM(require("path"));
|
|
291272
|
-
|
|
291385
|
+
import_util52 = require("util");
|
|
291273
291386
|
cxapi6 = __toESM(require_lib3());
|
|
291274
291387
|
fs31 = __toESM(require_lib4());
|
|
291275
291388
|
init_context_store();
|
|
@@ -291335,7 +291448,7 @@ var init_source_builder = __esm({
|
|
|
291335
291448
|
...await contextStore.read(),
|
|
291336
291449
|
...synthParams.context
|
|
291337
291450
|
};
|
|
291338
|
-
await services.ioHelper.defaults.debug((0,
|
|
291451
|
+
await services.ioHelper.defaults.debug((0, import_util52.format)("context:", fullContext));
|
|
291339
291452
|
const env3 = noUndefined({
|
|
291340
291453
|
// Versioning, outdir, default account and region
|
|
291341
291454
|
...await execution.defaultEnvVars(),
|
|
@@ -291381,6 +291494,14 @@ var init_source_builder = __esm({
|
|
|
291381
291494
|
* the CloudAssembly is being used, no CDK app synthesis can take place into
|
|
291382
291495
|
* that directory.
|
|
291383
291496
|
*
|
|
291497
|
+
* @remarks
|
|
291498
|
+
* A Cloud Assembly is a trust boundary. Do not deploy Cloud Assemblies
|
|
291499
|
+
* from sources you do not trust. Building assets from an external directory
|
|
291500
|
+
* can run external code. The author who synthesized the Cloud Assembly, or
|
|
291501
|
+
* anyone who can modify it between synthesis and deployment, can affect what
|
|
291502
|
+
* code runs on your shell environment, as well as what resources are deployed
|
|
291503
|
+
* using your AWS credentials.
|
|
291504
|
+
*
|
|
291384
291505
|
* @param directory - directory the directory of a already produced Cloud Assembly.
|
|
291385
291506
|
* @returns the CloudAssembly source
|
|
291386
291507
|
*/
|
|
@@ -291474,7 +291595,7 @@ var init_source_builder = __esm({
|
|
|
291474
291595
|
...await contextStore.read(),
|
|
291475
291596
|
...synthParams.context
|
|
291476
291597
|
};
|
|
291477
|
-
await services.ioHelper.defaults.debug((0,
|
|
291598
|
+
await services.ioHelper.defaults.debug((0, import_util52.format)("context:", fullContext));
|
|
291478
291599
|
const env3 = noUndefined({
|
|
291479
291600
|
// Need to start with full env of `writeContextToEnv` will not be able to do the size
|
|
291480
291601
|
// calculation correctly.
|
|
@@ -292494,14 +292615,13 @@ var init_io = __esm({
|
|
|
292494
292615
|
});
|
|
292495
292616
|
|
|
292496
292617
|
// ../@aws-cdk/toolkit-lib/lib/api/logs-monitor/logs-monitor.ts
|
|
292497
|
-
var
|
|
292618
|
+
var import_node_crypto13, util7, import_chalk16, CloudWatchLogEventMonitor;
|
|
292498
292619
|
var init_logs_monitor2 = __esm({
|
|
292499
292620
|
"../@aws-cdk/toolkit-lib/lib/api/logs-monitor/logs-monitor.ts"() {
|
|
292500
292621
|
"use strict";
|
|
292501
|
-
|
|
292622
|
+
import_node_crypto13 = require("node:crypto");
|
|
292502
292623
|
util7 = __toESM(require("node:util"));
|
|
292503
292624
|
import_chalk16 = __toESM(require_source());
|
|
292504
|
-
init_util4();
|
|
292505
292625
|
init_private();
|
|
292506
292626
|
CloudWatchLogEventMonitor = class {
|
|
292507
292627
|
static {
|
|
@@ -292534,7 +292654,7 @@ var init_logs_monitor2 = __esm({
|
|
|
292534
292654
|
* resume reading/printing events
|
|
292535
292655
|
*/
|
|
292536
292656
|
async activate() {
|
|
292537
|
-
this.monitorId = (0,
|
|
292657
|
+
this.monitorId = (0, import_node_crypto13.randomUUID)();
|
|
292538
292658
|
await this.ioHelper.notify(IO.CDK_TOOLKIT_I5032.msg("Start monitoring log groups", {
|
|
292539
292659
|
monitor: this.monitorId,
|
|
292540
292660
|
logGroupNames: this.logGroupNames()
|
|
@@ -292599,27 +292719,44 @@ var init_logs_monitor2 = __esm({
|
|
|
292599
292719
|
return;
|
|
292600
292720
|
}
|
|
292601
292721
|
try {
|
|
292602
|
-
const
|
|
292603
|
-
|
|
292604
|
-
|
|
292722
|
+
for (const result2 of await this.readNewEvents()) {
|
|
292723
|
+
if ("error" in result2) {
|
|
292724
|
+
await this.reportError(result2.error);
|
|
292725
|
+
continue;
|
|
292726
|
+
}
|
|
292727
|
+
for (const event of result2.events) {
|
|
292728
|
+
await this.print(event);
|
|
292729
|
+
}
|
|
292605
292730
|
}
|
|
292606
292731
|
if (!this.monitorId) {
|
|
292607
292732
|
return;
|
|
292608
292733
|
}
|
|
292609
292734
|
} catch (e6) {
|
|
292610
|
-
await this.
|
|
292735
|
+
await this.reportError(e6);
|
|
292611
292736
|
}
|
|
292612
292737
|
this.scheduleNextTick();
|
|
292613
292738
|
}
|
|
292739
|
+
async reportError(e6) {
|
|
292740
|
+
if (e6?.name === "ThrottlingException") {
|
|
292741
|
+
await this.ioHelper.defaults.debug(`Throttled while monitoring logs, will retry: ${String(e6)}`);
|
|
292742
|
+
return;
|
|
292743
|
+
}
|
|
292744
|
+
await this.ioHelper.notify(IO.CDK_TOOLKIT_E5035.msg(`Error occurred while monitoring logs: ${String(e6)}`, { error: e6 }));
|
|
292745
|
+
}
|
|
292614
292746
|
/**
|
|
292615
292747
|
* Reads all new log events from a set of CloudWatch Log Groups
|
|
292616
292748
|
* in parallel
|
|
292749
|
+
*
|
|
292750
|
+
* A failure for one log group does not discard the events of the other log groups.
|
|
292617
292751
|
*/
|
|
292618
292752
|
async readNewEvents() {
|
|
292619
292753
|
const promises8 = [];
|
|
292620
292754
|
for (const settings of this.envsLogGroupsAccessSettings.values()) {
|
|
292621
292755
|
for (const group4 of Object.keys(settings.logGroupsStartTimes)) {
|
|
292622
|
-
promises8.push(this.readEventsFromLogGroup(settings, group4)
|
|
292756
|
+
promises8.push(this.readEventsFromLogGroup(settings, group4).then(
|
|
292757
|
+
(events) => ({ events }),
|
|
292758
|
+
(error3) => ({ error: error3 })
|
|
292759
|
+
));
|
|
292623
292760
|
}
|
|
292624
292761
|
}
|
|
292625
292762
|
return Promise.all(promises8);
|
|
@@ -292801,11 +292938,11 @@ function removeNonImportResources(stack) {
|
|
|
292801
292938
|
delete template.Outputs;
|
|
292802
292939
|
return template;
|
|
292803
292940
|
}
|
|
292804
|
-
var
|
|
292941
|
+
var import_util55, cfnDiff, import_chalk17, fs32, ResourceImporter;
|
|
292805
292942
|
var init_importer = __esm({
|
|
292806
292943
|
"../@aws-cdk/toolkit-lib/lib/api/resource-import/importer.ts"() {
|
|
292807
292944
|
"use strict";
|
|
292808
|
-
|
|
292945
|
+
import_util55 = require("util");
|
|
292809
292946
|
cfnDiff = __toESM(require_lib9());
|
|
292810
292947
|
import_chalk17 = __toESM(require_source());
|
|
292811
292948
|
fs32 = __toESM(require_lib4());
|
|
@@ -292869,12 +293006,12 @@ var init_importer = __esm({
|
|
|
292869
293006
|
const descr = this.describeResource(resource.logicalId);
|
|
292870
293007
|
const idProps = remaining[resource.logicalId];
|
|
292871
293008
|
if (idProps) {
|
|
292872
|
-
await this.ioHelper.defaults.info((0,
|
|
293009
|
+
await this.ioHelper.defaults.info((0, import_util55.format)("%s: importing using %s", import_chalk17.default.blue(descr), import_chalk17.default.blue(fmtdict(idProps))));
|
|
292873
293010
|
ret.importResources.push(resource);
|
|
292874
293011
|
ret.resourceMap[resource.logicalId] = idProps;
|
|
292875
293012
|
delete remaining[resource.logicalId];
|
|
292876
293013
|
} else {
|
|
292877
|
-
await this.ioHelper.defaults.info((0,
|
|
293014
|
+
await this.ioHelper.defaults.info((0, import_util55.format)("%s: skipping", import_chalk17.default.blue(descr)));
|
|
292878
293015
|
}
|
|
292879
293016
|
}
|
|
292880
293017
|
const unknown = Object.keys(remaining);
|
|
@@ -292918,9 +293055,9 @@ var init_importer = __esm({
|
|
|
292918
293055
|
});
|
|
292919
293056
|
assertIsSuccessfulDeployStackResult(result2);
|
|
292920
293057
|
const message2 = result2.noOp ? "\u2705 %s (no changes)" : "\u2705 %s";
|
|
292921
|
-
await this.ioHelper.defaults.info("\n" + import_chalk17.default.green((0,
|
|
293058
|
+
await this.ioHelper.defaults.info("\n" + import_chalk17.default.green((0, import_util55.format)(message2, this.stack.displayName)));
|
|
292922
293059
|
} catch (e6) {
|
|
292923
|
-
await this.ioHelper.notify(IO.CDK_TOOLKIT_E3900.msg((0,
|
|
293060
|
+
await this.ioHelper.notify(IO.CDK_TOOLKIT_E3900.msg((0, import_util55.format)("\n \u274C %s failed: %s", import_chalk17.default.bold(this.stack.displayName), e6), { error: e6 }));
|
|
292924
293061
|
throw e6;
|
|
292925
293062
|
}
|
|
292926
293063
|
}
|
|
@@ -293050,7 +293187,7 @@ var init_importer = __esm({
|
|
|
293050
293187
|
for (const idProp of idProps) {
|
|
293051
293188
|
const defaultValue2 = resourceProps[idProp] ?? "";
|
|
293052
293189
|
const response = await this.ioHelper.requestResponse(IO.CDK_TOOLKIT_I3110.req(
|
|
293053
|
-
(0,
|
|
293190
|
+
(0, import_util55.format)(promptPattern, import_chalk17.default.blue(idProp)),
|
|
293054
293191
|
{
|
|
293055
293192
|
resource: {
|
|
293056
293193
|
name: resourceName,
|
|
@@ -293332,10 +293469,11 @@ var init_private4 = __esm({
|
|
|
293332
293469
|
});
|
|
293333
293470
|
|
|
293334
293471
|
// ../@aws-cdk/toolkit-lib/lib/api/orphan/orphaner.ts
|
|
293335
|
-
var ResourceOrphaner;
|
|
293472
|
+
var import_node_crypto14, ResourceOrphaner;
|
|
293336
293473
|
var init_orphaner = __esm({
|
|
293337
293474
|
"../@aws-cdk/toolkit-lib/lib/api/orphan/orphaner.ts"() {
|
|
293338
293475
|
"use strict";
|
|
293476
|
+
import_node_crypto14 = require("node:crypto");
|
|
293339
293477
|
init_private4();
|
|
293340
293478
|
init_toolkit_error();
|
|
293341
293479
|
ResourceOrphaner = class {
|
|
@@ -293390,6 +293528,7 @@ var init_orphaner = __esm({
|
|
|
293390
293528
|
async execute(stack, logicalIds, currentTemplate) {
|
|
293391
293529
|
const env3 = await this.deployments.envs.accessStackForReadOnlyStackOperations(stack);
|
|
293392
293530
|
const cfn = env3.sdk.cloudFormation();
|
|
293531
|
+
const operationId = (0, import_node_crypto14.randomUUID)();
|
|
293393
293532
|
const stackResources = await cfn.listStackResources({ StackName: stack.stackName });
|
|
293394
293533
|
const physicalIds = /* @__PURE__ */ new Map();
|
|
293395
293534
|
for (const res of stackResources) {
|
|
@@ -293398,7 +293537,7 @@ var init_orphaner = __esm({
|
|
|
293398
293537
|
}
|
|
293399
293538
|
}
|
|
293400
293539
|
await this.ioHelper.defaults.info("Step 1/3: Resolving attribute values...");
|
|
293401
|
-
const resolvedValues = await this.resolveGetAttValues(stack, cfn, logicalIds, currentTemplate, physicalIds);
|
|
293540
|
+
const resolvedValues = await this.resolveGetAttValues(stack, cfn, logicalIds, currentTemplate, physicalIds, operationId);
|
|
293402
293541
|
await this.ioHelper.defaults.info("Step 2/3: Decoupling resources...");
|
|
293403
293542
|
const decoupledTemplate = JSON.parse(JSON.stringify(currentTemplate));
|
|
293404
293543
|
for (const id of logicalIds) {
|
|
@@ -293407,7 +293546,7 @@ var init_orphaner = __esm({
|
|
|
293407
293546
|
decoupledTemplate.Resources[id].DeletionPolicy = "Retain";
|
|
293408
293547
|
decoupledTemplate.Resources[id].UpdateReplacePolicy = "Retain";
|
|
293409
293548
|
}
|
|
293410
|
-
const step2Result = await this.deployStack(stack, decoupledTemplate,
|
|
293549
|
+
const step2Result = await this.deployStack(stack, decoupledTemplate, `cdk-orphan-step2-${operationId}`);
|
|
293411
293550
|
assertDeploySucceeded(step2Result, "Step 2");
|
|
293412
293551
|
await this.ioHelper.defaults.info("Step 3/3: Removing resources from stack...");
|
|
293413
293552
|
const removalTemplate = JSON.parse(JSON.stringify(decoupledTemplate));
|
|
@@ -293415,7 +293554,7 @@ var init_orphaner = __esm({
|
|
|
293415
293554
|
delete removalTemplate.Resources[id];
|
|
293416
293555
|
}
|
|
293417
293556
|
ensureNonEmptyResources(removalTemplate);
|
|
293418
|
-
const step3Result = await this.deployStack(stack, removalTemplate,
|
|
293557
|
+
const step3Result = await this.deployStack(stack, removalTemplate, `cdk-orphan-step3-${operationId}`);
|
|
293419
293558
|
assertDeploySucceeded(step3Result, "Step 3");
|
|
293420
293559
|
if (step3Result.noOp) {
|
|
293421
293560
|
throw new ToolkitError(
|
|
@@ -293451,7 +293590,7 @@ var init_orphaner = __esm({
|
|
|
293451
293590
|
*
|
|
293452
293591
|
* Returns a complete map of resolved values (Ref + attrs) for each logical ID.
|
|
293453
293592
|
*/
|
|
293454
|
-
async resolveGetAttValues(stack, cfn, logicalIds, currentTemplate, physicalIds) {
|
|
293593
|
+
async resolveGetAttValues(stack, cfn, logicalIds, currentTemplate, physicalIds, operationId) {
|
|
293455
293594
|
const values = /* @__PURE__ */ new Map();
|
|
293456
293595
|
for (const id of logicalIds) {
|
|
293457
293596
|
const physicalId = physicalIds.get(id);
|
|
@@ -293473,7 +293612,7 @@ var init_orphaner = __esm({
|
|
|
293473
293612
|
Value: { "Fn::GetAtt": [ref.logicalId, ref.attr] }
|
|
293474
293613
|
};
|
|
293475
293614
|
}
|
|
293476
|
-
const step1Result = await this.deployStack(stack, resolveTemplate,
|
|
293615
|
+
const step1Result = await this.deployStack(stack, resolveTemplate, `cdk-orphan-step1-${operationId}`);
|
|
293477
293616
|
assertDeploySucceeded(step1Result, "Step 1");
|
|
293478
293617
|
const stackDesc = await cfn.describeStacks({ StackName: stack.stackName });
|
|
293479
293618
|
for (const output of stackDesc.Stacks?.[0]?.Outputs ?? []) {
|
|
@@ -294424,10 +294563,10 @@ var init_stack_refresh = __esm({
|
|
|
294424
294563
|
if (this.lastRefreshTime >= horizon) {
|
|
294425
294564
|
return Promise.resolve();
|
|
294426
294565
|
}
|
|
294427
|
-
return new Promise((
|
|
294566
|
+
return new Promise((resolve17, reject) => {
|
|
294428
294567
|
const onRefresh = /* @__PURE__ */ __name(() => {
|
|
294429
294568
|
clearTimeout(timeoutHandle);
|
|
294430
|
-
|
|
294569
|
+
resolve17(void 0);
|
|
294431
294570
|
}, "onRefresh");
|
|
294432
294571
|
this.queuedPromises.push(onRefresh);
|
|
294433
294572
|
const timeoutHandle = setTimeout(() => {
|
|
@@ -296056,7 +296195,7 @@ var init_handler = __esm({
|
|
|
296056
296195
|
this._addToNodeFs(path54, initialAdd, wh, depth + 1);
|
|
296057
296196
|
}
|
|
296058
296197
|
}).on(EV.ERROR, this._boundHandleError);
|
|
296059
|
-
return new Promise((
|
|
296198
|
+
return new Promise((resolve17, reject) => {
|
|
296060
296199
|
if (!stream)
|
|
296061
296200
|
return reject();
|
|
296062
296201
|
stream.once(STR_END, () => {
|
|
@@ -296065,7 +296204,7 @@ var init_handler = __esm({
|
|
|
296065
296204
|
return;
|
|
296066
296205
|
}
|
|
296067
296206
|
const wasThrottled = throttler ? throttler.clear() : false;
|
|
296068
|
-
|
|
296207
|
+
resolve17(void 0);
|
|
296069
296208
|
previous.getChildren().filter((item) => {
|
|
296070
296209
|
return item !== directory && !current.has(item);
|
|
296071
296210
|
}).forEach((item) => {
|
|
@@ -298608,7 +298747,7 @@ function partitionByAmbiguity(overrides, moves) {
|
|
|
298608
298747
|
nonAmbiguous.push(move);
|
|
298609
298748
|
} else {
|
|
298610
298749
|
for (const override of overrides) {
|
|
298611
|
-
const resolvedMove =
|
|
298750
|
+
const resolvedMove = resolve17(override, move);
|
|
298612
298751
|
if (resolvedMove != null) {
|
|
298613
298752
|
nonAmbiguous.push(resolvedMove);
|
|
298614
298753
|
move = remove2(override, move);
|
|
@@ -298621,13 +298760,13 @@ function partitionByAmbiguity(overrides, moves) {
|
|
|
298621
298760
|
}
|
|
298622
298761
|
}
|
|
298623
298762
|
}
|
|
298624
|
-
function
|
|
298763
|
+
function resolve17(override, move) {
|
|
298625
298764
|
const [pre, post] = move;
|
|
298626
298765
|
const source = pre.find((loc) => loc.equalTo(override.source));
|
|
298627
298766
|
const destination = post.find((loc) => loc.equalTo(override.destination));
|
|
298628
298767
|
return source && destination ? [[source], [destination]] : void 0;
|
|
298629
298768
|
}
|
|
298630
|
-
__name(
|
|
298769
|
+
__name(resolve17, "resolve");
|
|
298631
298770
|
function remove2(override, move) {
|
|
298632
298771
|
const [pre, post] = move;
|
|
298633
298772
|
return [
|
|
@@ -298638,41 +298777,17 @@ function partitionByAmbiguity(overrides, moves) {
|
|
|
298638
298777
|
__name(remove2, "remove");
|
|
298639
298778
|
return [nonAmbiguous, ambiguous];
|
|
298640
298779
|
}
|
|
298641
|
-
|
|
298642
|
-
let partition4 = /* @__PURE__ */ __name(async () => {
|
|
298643
|
-
const p3 = await aws.discoverPartition();
|
|
298644
|
-
partition4 = /* @__PURE__ */ __name(() => Promise.resolve(p3), "partition");
|
|
298645
|
-
return p3;
|
|
298646
|
-
}, "partition");
|
|
298647
|
-
let account = /* @__PURE__ */ __name(async () => {
|
|
298648
|
-
const a6 = await aws.discoverCurrentAccount();
|
|
298649
|
-
account = /* @__PURE__ */ __name(() => Promise.resolve(a6), "account");
|
|
298650
|
-
return a6;
|
|
298651
|
-
}, "account");
|
|
298652
|
-
return import_cloud_assembly_api13.EnvironmentPlaceholders.replaceAsync(object, {
|
|
298653
|
-
async region() {
|
|
298654
|
-
return object.region ?? aws.discoverDefaultRegion();
|
|
298655
|
-
},
|
|
298656
|
-
async accountId() {
|
|
298657
|
-
return (await account()).accountId;
|
|
298658
|
-
},
|
|
298659
|
-
async partition() {
|
|
298660
|
-
return partition4();
|
|
298661
|
-
}
|
|
298662
|
-
});
|
|
298663
|
-
}
|
|
298664
|
-
var import_cdk_assets_lib5, import_cloud_assembly_api13, RefactoringContext;
|
|
298780
|
+
var RefactoringContext;
|
|
298665
298781
|
var init_context3 = __esm({
|
|
298666
298782
|
"../@aws-cdk/toolkit-lib/lib/api/refactoring/context.ts"() {
|
|
298667
298783
|
"use strict";
|
|
298668
|
-
import_cdk_assets_lib5 = __toESM(require_lib5());
|
|
298669
|
-
import_cloud_assembly_api13 = __toESM(require_lib3());
|
|
298670
298784
|
init_cloudformation4();
|
|
298671
298785
|
init_digest();
|
|
298672
298786
|
init_toolkit_error();
|
|
298673
298787
|
init_sets();
|
|
298674
298788
|
init_cfn_api();
|
|
298675
298789
|
init_environment2();
|
|
298790
|
+
init_placeholders3();
|
|
298676
298791
|
init_plugin2();
|
|
298677
298792
|
RefactoringContext = class {
|
|
298678
298793
|
static {
|
|
@@ -298773,8 +298888,8 @@ var init_context3 = __esm({
|
|
|
298773
298888
|
const arn = Array.from(roleArns)[0];
|
|
298774
298889
|
if (arn != null) {
|
|
298775
298890
|
const resolvedEnv = await sdkProvider.resolveEnvironment(env3);
|
|
298776
|
-
const
|
|
298777
|
-
return
|
|
298891
|
+
const { assumeRoleArn } = await replaceEnvPlaceholders({ assumeRoleArn: arn }, resolvedEnv, sdkProvider);
|
|
298892
|
+
return assumeRoleArn;
|
|
298778
298893
|
}
|
|
298779
298894
|
return void 0;
|
|
298780
298895
|
}
|
|
@@ -298788,7 +298903,6 @@ var init_context3 = __esm({
|
|
|
298788
298903
|
__name(isAmbiguousMove, "isAmbiguousMove");
|
|
298789
298904
|
__name(resourceMappings, "resourceMappings");
|
|
298790
298905
|
__name(partitionByAmbiguity, "partitionByAmbiguity");
|
|
298791
|
-
__name(replaceAwsPlaceholders2, "replaceAwsPlaceholders");
|
|
298792
298906
|
}
|
|
298793
298907
|
});
|
|
298794
298908
|
|
|
@@ -298993,7 +299107,8 @@ async function cfnDiff2(ioHelper, stacks, deployments, options, sdkProvider, inc
|
|
|
298993
299107
|
parameters: methodOptions.parameters ?? {},
|
|
298994
299108
|
failOnError: !(methodOptions.fallbackToTemplate ?? true),
|
|
298995
299109
|
importExistingResources: methodOptions.importExistingResources,
|
|
298996
|
-
|
|
299110
|
+
changeSetName: methodOptions.changeSetName,
|
|
299111
|
+
uuid: (0, import_node_crypto15.randomUUID)()
|
|
298997
299112
|
}))?.changeSet : void 0;
|
|
298998
299113
|
if (changeSet) {
|
|
298999
299114
|
await attachNestedChangeSetData(ioHelper, deployments, stack, changeSet, nestedStacks);
|
|
@@ -299046,11 +299161,11 @@ function appendObject(obj1, obj2) {
|
|
|
299046
299161
|
}
|
|
299047
299162
|
return obj1;
|
|
299048
299163
|
}
|
|
299049
|
-
var
|
|
299164
|
+
var import_node_crypto15, fs34;
|
|
299050
299165
|
var init_helpers5 = __esm({
|
|
299051
299166
|
"../@aws-cdk/toolkit-lib/lib/actions/diff/private/helpers.ts"() {
|
|
299052
299167
|
"use strict";
|
|
299053
|
-
|
|
299168
|
+
import_node_crypto15 = require("node:crypto");
|
|
299054
299169
|
fs34 = __toESM(require_lib4());
|
|
299055
299170
|
init_diff4();
|
|
299056
299171
|
init_change_sets();
|
|
@@ -299080,8 +299195,8 @@ function countAssemblyResults(span, assembly) {
|
|
|
299080
299195
|
const stacksRecursively = assembly.stacksRecursively;
|
|
299081
299196
|
span.incCounter("stacks", stacksRecursively.length);
|
|
299082
299197
|
span.incCounter("assemblies", asmCount(assembly));
|
|
299083
|
-
span.incCounter("errorAnns", sum3(stacksRecursively.map((s2) => s2.messages.filter((m4) => m4.level ===
|
|
299084
|
-
span.incCounter("warnings", sum3(stacksRecursively.map((s2) => s2.messages.filter((m4) => m4.level ===
|
|
299198
|
+
span.incCounter("errorAnns", sum3(stacksRecursively.map((s2) => s2.messages.filter((m4) => m4.level === import_cloud_assembly_api13.SynthesisMessageLevel.ERROR).length)));
|
|
299199
|
+
span.incCounter("warnings", sum3(stacksRecursively.map((s2) => s2.messages.filter((m4) => m4.level === import_cloud_assembly_api13.SynthesisMessageLevel.WARNING).length)));
|
|
299085
299200
|
const annotationErrorCodes = stacksRecursively.flatMap((s2) => Object.values(s2.metadata ?? {}).flatMap((ms) => ms.filter((m4) => m4.type === ANNOTATION_ERROR_CODE_TYPE)));
|
|
299086
299201
|
for (const annotationErrorCode of annotationErrorCodes) {
|
|
299087
299202
|
span.incCounter(`errorAnn:${annotationErrorCode.data}`);
|
|
@@ -299094,11 +299209,11 @@ function countAssemblyResults(span, assembly) {
|
|
|
299094
299209
|
function sum3(xs) {
|
|
299095
299210
|
return xs.reduce((a6, b6) => a6 + b6, 0);
|
|
299096
299211
|
}
|
|
299097
|
-
var
|
|
299212
|
+
var import_cloud_assembly_api13, ANNOTATION_ERROR_CODE_TYPE;
|
|
299098
299213
|
var init_count_assembly_results = __esm({
|
|
299099
299214
|
"../@aws-cdk/toolkit-lib/lib/toolkit/private/count-assembly-results.ts"() {
|
|
299100
299215
|
"use strict";
|
|
299101
|
-
|
|
299216
|
+
import_cloud_assembly_api13 = __toESM(require_lib3());
|
|
299102
299217
|
__name(countAssemblyResults, "countAssemblyResults");
|
|
299103
299218
|
__name(sum3, "sum");
|
|
299104
299219
|
ANNOTATION_ERROR_CODE_TYPE = "aws:cdk:error-code";
|
|
@@ -299426,7 +299541,7 @@ async function waitForDriftDetection(cfn, ioHelper, driftDetectionId) {
|
|
|
299426
299541
|
await ioHelper.defaults.trace("Waiting for drift detection to complete...");
|
|
299427
299542
|
checkIn = Date.now() + timeBetweenOutputs;
|
|
299428
299543
|
}
|
|
299429
|
-
await new Promise((
|
|
299544
|
+
await new Promise((resolve17) => setTimeout(resolve17, timeBetweenApiCalls));
|
|
299430
299545
|
}
|
|
299431
299546
|
}
|
|
299432
299547
|
var import_node_util8;
|
|
@@ -299943,27 +300058,25 @@ function hasWarnings(reports) {
|
|
|
299943
300058
|
return reports.some((r6) => r6.violations.some((v) => v.severity === "warning"));
|
|
299944
300059
|
}
|
|
299945
300060
|
function filterReportsByStacks(reports, selectedStackIds) {
|
|
299946
|
-
|
|
299947
|
-
|
|
299948
|
-
|
|
299949
|
-
|
|
299950
|
-
|
|
299951
|
-
|
|
299952
|
-
|
|
299953
|
-
|
|
299954
|
-
return {
|
|
299955
|
-
...violation,
|
|
299956
|
-
violatingConstructs: violation.violatingConstructs.filter(
|
|
299957
|
-
(c6) => selectedStackIds.has(c6.constructPath?.split("/")[0] ?? "")
|
|
299958
|
-
)
|
|
299959
|
-
};
|
|
299960
|
-
});
|
|
300061
|
+
const stackIds = Array.from(selectedStackIds);
|
|
300062
|
+
return reports.map(filterReport);
|
|
300063
|
+
function filterReport(report) {
|
|
300064
|
+
const violationsWithoutConstructs = new Set(report.violations.flatMap((v, i6) => v.violatingConstructs.length === 0 ? [i6] : []));
|
|
300065
|
+
const filteredViolations = report.violations.map((v) => ({
|
|
300066
|
+
...v,
|
|
300067
|
+
violatingConstructs: v.violatingConstructs.filter(constructMatches)
|
|
300068
|
+
})).filter((v, i6) => v.violatingConstructs.length > 0 || violationsWithoutConstructs.has(i6));
|
|
299961
300069
|
return {
|
|
299962
300070
|
...report,
|
|
299963
300071
|
violations: filteredViolations,
|
|
299964
300072
|
conclusion: filteredViolations.length > 0 ? report.conclusion : "success"
|
|
299965
300073
|
};
|
|
299966
|
-
}
|
|
300074
|
+
}
|
|
300075
|
+
__name(filterReport, "filterReport");
|
|
300076
|
+
function constructMatches(c6) {
|
|
300077
|
+
return !c6.constructPath || stackIds.some((stackId) => c6.constructPath === stackId || c6.constructPath?.startsWith(`${stackId}/`));
|
|
300078
|
+
}
|
|
300079
|
+
__name(constructMatches, "constructMatches");
|
|
299967
300080
|
}
|
|
299968
300081
|
var path34, import_cloud_assembly_schema6, fs35, VALIDATION_REPORT_FILE2, CONSTRUCT_ANNOTATIONS_PLUGINNAME;
|
|
299969
300082
|
var init_validation_report = __esm({
|
|
@@ -300007,12 +300120,12 @@ async function synthAndMeasure(ioHelper, cx, selectStacks) {
|
|
|
300007
300120
|
function zeroTime() {
|
|
300008
300121
|
return { asMs: 0, asSec: 0 };
|
|
300009
300122
|
}
|
|
300010
|
-
var import_dispose_polyfill7,
|
|
300123
|
+
var import_dispose_polyfill7, import_node_crypto16, path35, cxapi11, import_cloud_assembly_schema7, import_chalk29, fs36, FILE_EVENTS, Toolkit;
|
|
300011
300124
|
var init_toolkit = __esm({
|
|
300012
300125
|
"../@aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts"() {
|
|
300013
300126
|
"use strict";
|
|
300014
300127
|
import_dispose_polyfill7 = __toESM(require_dispose_polyfill());
|
|
300015
|
-
|
|
300128
|
+
import_node_crypto16 = require("node:crypto");
|
|
300016
300129
|
path35 = __toESM(require("node:path"));
|
|
300017
300130
|
cxapi11 = __toESM(require_lib3());
|
|
300018
300131
|
import_cloud_assembly_schema7 = __toESM(require_lib2());
|
|
@@ -300574,7 +300687,7 @@ var init_toolkit = __esm({
|
|
|
300574
300687
|
deployments,
|
|
300575
300688
|
stack,
|
|
300576
300689
|
parameters: {},
|
|
300577
|
-
uuid: (0,
|
|
300690
|
+
uuid: (0, import_node_crypto16.randomUUID)(),
|
|
300578
300691
|
failOnError: true
|
|
300579
300692
|
});
|
|
300580
300693
|
const diagnosis = report.diagnosis.result;
|
|
@@ -302576,7 +302689,7 @@ async function getOrCreateInstallationId(ioHelper) {
|
|
|
302576
302689
|
return cachedId;
|
|
302577
302690
|
}
|
|
302578
302691
|
}
|
|
302579
|
-
const newId = (0,
|
|
302692
|
+
const newId = (0, import_node_crypto17.randomUUID)();
|
|
302580
302693
|
try {
|
|
302581
302694
|
await ensureCacheDir();
|
|
302582
302695
|
fs37.writeFileSync(installationIdPath, newId);
|
|
@@ -302586,17 +302699,17 @@ async function getOrCreateInstallationId(ioHelper) {
|
|
|
302586
302699
|
return newId;
|
|
302587
302700
|
} catch (e6) {
|
|
302588
302701
|
await ioHelper.defaults.trace(`Error getting installation ID: ${e6}`);
|
|
302589
|
-
return (0,
|
|
302702
|
+
return (0, import_node_crypto17.randomUUID)();
|
|
302590
302703
|
}
|
|
302591
302704
|
}
|
|
302592
302705
|
async function ensureCacheDir() {
|
|
302593
302706
|
await fs37.promises.mkdir(cdkCacheDir(), { recursive: true });
|
|
302594
302707
|
}
|
|
302595
|
-
var
|
|
302708
|
+
var import_node_crypto17, fs37, path36;
|
|
302596
302709
|
var init_installation_id = __esm({
|
|
302597
302710
|
"lib/cli/telemetry/installation-id.ts"() {
|
|
302598
302711
|
"use strict";
|
|
302599
|
-
|
|
302712
|
+
import_node_crypto17 = require("node:crypto");
|
|
302600
302713
|
fs37 = __toESM(require("node:fs"));
|
|
302601
302714
|
path36 = __toESM(require("node:path"));
|
|
302602
302715
|
init_util9();
|
|
@@ -302818,7 +302931,7 @@ var require_cli_type_registry = __commonJS({
|
|
|
302818
302931
|
"debug-cli": {
|
|
302819
302932
|
type: "boolean",
|
|
302820
302933
|
default: false,
|
|
302821
|
-
desc: "Debug the CDK CLI itself."
|
|
302934
|
+
desc: "Debug the CDK CLI itself. Reports what is keeping the CLI process alive if it fails to exit, and raises the CLI log level to show that report. Will slow down execution."
|
|
302822
302935
|
},
|
|
302823
302936
|
profile: {
|
|
302824
302937
|
type: "string",
|
|
@@ -303692,6 +303805,10 @@ var require_cli_type_registry = __commonJS({
|
|
|
303692
303805
|
default: true,
|
|
303693
303806
|
deprecated: "use --method instead"
|
|
303694
303807
|
},
|
|
303808
|
+
"change-set-name": {
|
|
303809
|
+
type: "string",
|
|
303810
|
+
desc: "Name of the CloudFormation change set to create (only if method is not template)"
|
|
303811
|
+
},
|
|
303695
303812
|
method: {
|
|
303696
303813
|
alias: "m",
|
|
303697
303814
|
type: "string",
|
|
@@ -304305,11 +304422,11 @@ async function tryDetectAmznPackage() {
|
|
|
304305
304422
|
}
|
|
304306
304423
|
return void 0;
|
|
304307
304424
|
}
|
|
304308
|
-
var
|
|
304425
|
+
var import_node_crypto18, fs41, os11, pathlib, import_toolkit_lib3, ABORTED_ERROR_MESSAGE, VALID_USER_AGENTS, TelemetrySession;
|
|
304309
304426
|
var init_session = __esm({
|
|
304310
304427
|
"lib/cli/telemetry/session.ts"() {
|
|
304311
304428
|
"use strict";
|
|
304312
|
-
|
|
304429
|
+
import_node_crypto18 = require("node:crypto");
|
|
304313
304430
|
fs41 = __toESM(require("node:fs/promises"));
|
|
304314
304431
|
os11 = __toESM(require("os"));
|
|
304315
304432
|
pathlib = __toESM(require("path"));
|
|
@@ -304359,7 +304476,7 @@ var init_session = __esm({
|
|
|
304359
304476
|
this._sessionInfo = {
|
|
304360
304477
|
identifiers: {
|
|
304361
304478
|
installationId: await getOrCreateInstallationId(this.ioHost.asIoHelper()),
|
|
304362
|
-
sessionId: (0,
|
|
304479
|
+
sessionId: (0, import_node_crypto18.randomUUID)(),
|
|
304363
304480
|
telemetryVersion: "2.0",
|
|
304364
304481
|
cdkCliVersion: versionNumber2(),
|
|
304365
304482
|
cdkLibraryVersion: await getLibraryVersion(this.ioHost.asIoHelper()),
|
|
@@ -306114,7 +306231,7 @@ async function dotnetAddProject(ioHelper, targetDirectory, context, ext = "cspro
|
|
|
306114
306231
|
if (attempt === MAX_ATTEMPTS) {
|
|
306115
306232
|
throw new import_toolkit_lib10.ToolkitError("DotnetSlnAddFailed", `Could not add project ${pname}.${ext} to solution ${pname}.sln. ${formatErrorMessage(e6)}`);
|
|
306116
306233
|
}
|
|
306117
|
-
await new Promise((
|
|
306234
|
+
await new Promise((resolve17) => setTimeout(resolve17, 1e3));
|
|
306118
306235
|
}
|
|
306119
306236
|
}
|
|
306120
306237
|
}
|
|
@@ -307167,8 +307284,8 @@ function chunks(list2, chunkSize) {
|
|
|
307167
307284
|
}
|
|
307168
307285
|
function setEnvironment(account, region) {
|
|
307169
307286
|
return {
|
|
307170
|
-
account: account ??
|
|
307171
|
-
region: region ??
|
|
307287
|
+
account: account ?? import_cloud_assembly_api14.UNKNOWN_ACCOUNT,
|
|
307288
|
+
region: region ?? import_cloud_assembly_api14.UNKNOWN_REGION,
|
|
307172
307289
|
name: "cdk-migrate-env"
|
|
307173
307290
|
};
|
|
307174
307291
|
}
|
|
@@ -307214,7 +307331,7 @@ async function scanProgressBar(ioHelper, scanId, cfn) {
|
|
|
307214
307331
|
curScan = await cfn.describeResourceScan(scanId);
|
|
307215
307332
|
curProgress = curScan.PercentageCompleted ?? curProgress;
|
|
307216
307333
|
printBar(30, curProgress);
|
|
307217
|
-
await new Promise((
|
|
307334
|
+
await new Promise((resolve17) => setTimeout(resolve17, 2e3));
|
|
307218
307335
|
}
|
|
307219
307336
|
await ioHelper.defaults.info("\n\u2705 Scan Complete!");
|
|
307220
307337
|
}
|
|
@@ -307236,13 +307353,13 @@ function printBar(width, progress) {
|
|
|
307236
307353
|
async function printDots(message2, timeoutx4) {
|
|
307237
307354
|
if (!process.env.MIGRATE_INTEG_TEST) {
|
|
307238
307355
|
rewriteLine(message2 + " .");
|
|
307239
|
-
await new Promise((
|
|
307356
|
+
await new Promise((resolve17) => setTimeout(resolve17, timeoutx4));
|
|
307240
307357
|
rewriteLine(message2 + " ..");
|
|
307241
|
-
await new Promise((
|
|
307358
|
+
await new Promise((resolve17) => setTimeout(resolve17, timeoutx4));
|
|
307242
307359
|
rewriteLine(message2 + " ...");
|
|
307243
|
-
await new Promise((
|
|
307360
|
+
await new Promise((resolve17) => setTimeout(resolve17, timeoutx4));
|
|
307244
307361
|
rewriteLine(message2);
|
|
307245
|
-
await new Promise((
|
|
307362
|
+
await new Promise((resolve17) => setTimeout(resolve17, timeoutx4));
|
|
307246
307363
|
}
|
|
307247
307364
|
}
|
|
307248
307365
|
function rewriteLine(message2) {
|
|
@@ -307351,13 +307468,13 @@ function deduplicateResources(resources) {
|
|
|
307351
307468
|
}
|
|
307352
307469
|
return Object.values(uniqueResources);
|
|
307353
307470
|
}
|
|
307354
|
-
var fs45, path43,
|
|
307471
|
+
var fs45, path43, import_cloud_assembly_api14, import_toolkit_lib12, cdk_from_cfn, import_chalk33, camelCase2, decamelize2, MIGRATE_SUPPORTED_LANGUAGES, FilterType, CfnTemplateGeneratorProvider;
|
|
307355
307472
|
var init_migrate = __esm({
|
|
307356
307473
|
"lib/commands/migrate.ts"() {
|
|
307357
307474
|
"use strict";
|
|
307358
307475
|
fs45 = __toESM(require("fs"));
|
|
307359
307476
|
path43 = __toESM(require("path"));
|
|
307360
|
-
|
|
307477
|
+
import_cloud_assembly_api14 = __toESM(require_lib3());
|
|
307361
307478
|
import_toolkit_lib12 = __toESM(require_lib12());
|
|
307362
307479
|
cdk_from_cfn = __toESM(require_cdk_from_cfn());
|
|
307363
307480
|
import_chalk33 = __toESM(require_source());
|
|
@@ -309623,7 +309740,7 @@ async function execProgram(aws, ioHelper, config2) {
|
|
|
309623
309740
|
...config2.context.all,
|
|
309624
309741
|
...params.context
|
|
309625
309742
|
};
|
|
309626
|
-
await debugFn((0,
|
|
309743
|
+
await debugFn((0, import_util73.format)("context:", context));
|
|
309627
309744
|
if (params.env.CDK_DEBUG === "true") {
|
|
309628
309745
|
await ioHelper.defaults.info("\u{1F50D} Synthesizing with debug information. This may take a bit longer.");
|
|
309629
309746
|
}
|
|
@@ -309673,7 +309790,7 @@ async function execProgram(aws, ioHelper, config2) {
|
|
|
309673
309790
|
const perfCountersFile = path44.join(outdir, "performance-counters.json");
|
|
309674
309791
|
await fs47.promises.rm(perfCountersFile, { force: true });
|
|
309675
309792
|
env3.CDK_PERF_COUNTERS_FILE = perfCountersFile;
|
|
309676
|
-
await debugFn((0,
|
|
309793
|
+
await debugFn((0, import_util73.format)("env:", env3));
|
|
309677
309794
|
const cleanupTemp = writeContextToEnv(env3, context, "add-process-env-later");
|
|
309678
309795
|
try {
|
|
309679
309796
|
await exec2(commandLine);
|
|
@@ -309711,7 +309828,7 @@ async function execProgram(aws, ioHelper, config2) {
|
|
|
309711
309828
|
}
|
|
309712
309829
|
function createAssembly(appDir) {
|
|
309713
309830
|
try {
|
|
309714
|
-
return new
|
|
309831
|
+
return new import_cloud_assembly_api15.CloudAssembly(appDir, {
|
|
309715
309832
|
// We sort as we deploy
|
|
309716
309833
|
topoSort: false
|
|
309717
309834
|
});
|
|
@@ -309726,13 +309843,13 @@ function createAssembly(appDir) {
|
|
|
309726
309843
|
function noUndefined2(xs) {
|
|
309727
309844
|
return Object.fromEntries(Object.entries(xs).filter(([_, v]) => v !== void 0));
|
|
309728
309845
|
}
|
|
309729
|
-
var path44,
|
|
309846
|
+
var path44, import_util73, import_cloud_assembly_api15, cxschema11, cxapi12, import_toolkit_lib15, fs47;
|
|
309730
309847
|
var init_exec2 = __esm({
|
|
309731
309848
|
"lib/cxapp/exec.ts"() {
|
|
309732
309849
|
"use strict";
|
|
309733
309850
|
path44 = __toESM(require("path"));
|
|
309734
|
-
|
|
309735
|
-
|
|
309851
|
+
import_util73 = require("util");
|
|
309852
|
+
import_cloud_assembly_api15 = __toESM(require_lib3());
|
|
309736
309853
|
cxschema11 = __toESM(require_lib2());
|
|
309737
309854
|
cxapi12 = __toESM(require_lib11());
|
|
309738
309855
|
import_toolkit_lib15 = __toESM(require_lib12());
|
|
@@ -309932,11 +310049,11 @@ var require_p_finally = __commonJS({
|
|
|
309932
310049
|
onFinally = onFinally || (() => {
|
|
309933
310050
|
});
|
|
309934
310051
|
return promise.then(
|
|
309935
|
-
(val) => new Promise((
|
|
309936
|
-
|
|
310052
|
+
(val) => new Promise((resolve17) => {
|
|
310053
|
+
resolve17(onFinally());
|
|
309937
310054
|
}).then(() => val),
|
|
309938
|
-
(err) => new Promise((
|
|
309939
|
-
|
|
310055
|
+
(err) => new Promise((resolve17) => {
|
|
310056
|
+
resolve17(onFinally());
|
|
309940
310057
|
}).then(() => {
|
|
309941
310058
|
throw err;
|
|
309942
310059
|
})
|
|
@@ -309959,18 +310076,18 @@ var require_p_timeout = __commonJS({
|
|
|
309959
310076
|
this.name = "TimeoutError";
|
|
309960
310077
|
}
|
|
309961
310078
|
};
|
|
309962
|
-
var pTimeout = /* @__PURE__ */ __name((promise, milliseconds, fallback2) => new Promise((
|
|
310079
|
+
var pTimeout = /* @__PURE__ */ __name((promise, milliseconds, fallback2) => new Promise((resolve17, reject) => {
|
|
309963
310080
|
if (typeof milliseconds !== "number" || milliseconds < 0) {
|
|
309964
310081
|
throw new TypeError("Expected `milliseconds` to be a positive number");
|
|
309965
310082
|
}
|
|
309966
310083
|
if (milliseconds === Infinity) {
|
|
309967
|
-
|
|
310084
|
+
resolve17(promise);
|
|
309968
310085
|
return;
|
|
309969
310086
|
}
|
|
309970
310087
|
const timer = setTimeout(() => {
|
|
309971
310088
|
if (typeof fallback2 === "function") {
|
|
309972
310089
|
try {
|
|
309973
|
-
|
|
310090
|
+
resolve17(fallback2());
|
|
309974
310091
|
} catch (error3) {
|
|
309975
310092
|
reject(error3);
|
|
309976
310093
|
}
|
|
@@ -309985,7 +310102,7 @@ var require_p_timeout = __commonJS({
|
|
|
309985
310102
|
}, milliseconds);
|
|
309986
310103
|
pFinally(
|
|
309987
310104
|
// eslint-disable-next-line promise/prefer-await-to-then
|
|
309988
|
-
promise.then(
|
|
310105
|
+
promise.then(resolve17, reject),
|
|
309989
310106
|
() => {
|
|
309990
310107
|
clearTimeout(timer);
|
|
309991
310108
|
}
|
|
@@ -310210,7 +310327,7 @@ var require_dist3 = __commonJS({
|
|
|
310210
310327
|
Adds a sync or async task to the queue. Always returns a promise.
|
|
310211
310328
|
*/
|
|
310212
310329
|
async add(fn, options = {}) {
|
|
310213
|
-
return new Promise((
|
|
310330
|
+
return new Promise((resolve17, reject) => {
|
|
310214
310331
|
const run5 = /* @__PURE__ */ __name(async () => {
|
|
310215
310332
|
this._pendingCount++;
|
|
310216
310333
|
this._intervalCount++;
|
|
@@ -310221,7 +310338,7 @@ var require_dist3 = __commonJS({
|
|
|
310221
310338
|
}
|
|
310222
310339
|
return void 0;
|
|
310223
310340
|
});
|
|
310224
|
-
|
|
310341
|
+
resolve17(await operation2);
|
|
310225
310342
|
} catch (error3) {
|
|
310226
310343
|
reject(error3);
|
|
310227
310344
|
}
|
|
@@ -310272,11 +310389,11 @@ var require_dist3 = __commonJS({
|
|
|
310272
310389
|
if (this._queue.size === 0) {
|
|
310273
310390
|
return;
|
|
310274
310391
|
}
|
|
310275
|
-
return new Promise((
|
|
310392
|
+
return new Promise((resolve17) => {
|
|
310276
310393
|
const existingResolve = this._resolveEmpty;
|
|
310277
310394
|
this._resolveEmpty = () => {
|
|
310278
310395
|
existingResolve();
|
|
310279
|
-
|
|
310396
|
+
resolve17();
|
|
310280
310397
|
};
|
|
310281
310398
|
});
|
|
310282
310399
|
}
|
|
@@ -310289,11 +310406,11 @@ var require_dist3 = __commonJS({
|
|
|
310289
310406
|
if (this._pendingCount === 0 && this._queue.size === 0) {
|
|
310290
310407
|
return;
|
|
310291
310408
|
}
|
|
310292
|
-
return new Promise((
|
|
310409
|
+
return new Promise((resolve17) => {
|
|
310293
310410
|
const existingResolve = this._resolveIdle;
|
|
310294
310411
|
this._resolveIdle = () => {
|
|
310295
310412
|
existingResolve();
|
|
310296
|
-
|
|
310413
|
+
resolve17();
|
|
310297
310414
|
};
|
|
310298
310415
|
});
|
|
310299
310416
|
}
|
|
@@ -310849,11 +310966,11 @@ async function displayFlagsMessage(ioHost, toolkit, cloudExecutable) {
|
|
|
310849
310966
|
function requiresApproval(requireApproval, permissionChangeType) {
|
|
310850
310967
|
return requireApproval === import_cloud_assembly_schema9.RequireApproval.ANYCHANGE || requireApproval === import_cloud_assembly_schema9.RequireApproval.BROADENING && permissionChangeType === import_toolkit_lib17.PermissionChangeType.BROADENING;
|
|
310851
310968
|
}
|
|
310852
|
-
var
|
|
310969
|
+
var import_node_crypto19, path46, import_node_util9, cxapi13, import_cloud_assembly_schema9, import_toolkit_lib17, import_chalk35, fs49, pLimit5, FILE_EVENTS2, InternalToolkit, CdkToolkit, WorkGraphDeploymentActions;
|
|
310853
310970
|
var init_cdk_toolkit = __esm({
|
|
310854
310971
|
"lib/cli/cdk-toolkit.ts"() {
|
|
310855
310972
|
"use strict";
|
|
310856
|
-
|
|
310973
|
+
import_node_crypto19 = require("node:crypto");
|
|
310857
310974
|
path46 = __toESM(require("node:path"));
|
|
310858
310975
|
import_node_util9 = require("node:util");
|
|
310859
310976
|
cxapi13 = __toESM(require_lib3());
|
|
@@ -311106,12 +311223,13 @@ var init_cdk_toolkit = __esm({
|
|
|
311106
311223
|
}
|
|
311107
311224
|
return cfn_api_exports.createDiffChangeSet(asIoHelper(this.ioHost, "diff"), {
|
|
311108
311225
|
stack,
|
|
311109
|
-
uuid: (0,
|
|
311226
|
+
uuid: (0, import_node_crypto19.randomUUID)(),
|
|
311110
311227
|
deployments: this.props.deployments,
|
|
311111
311228
|
sdkProvider: this.props.sdkProvider,
|
|
311112
311229
|
parameters: Object.assign({}, parameterMap["*"], parameterMap[stack.stackName]),
|
|
311113
311230
|
resourcesToImport,
|
|
311114
311231
|
importExistingResources: options.importExistingResources,
|
|
311232
|
+
changeSetName: options.changeSetName,
|
|
311115
311233
|
failOnError: options.method === "change-set"
|
|
311116
311234
|
});
|
|
311117
311235
|
}
|
|
@@ -311509,10 +311627,8 @@ Do you wish to deploy these changes?`;
|
|
|
311509
311627
|
}
|
|
311510
311628
|
}
|
|
311511
311629
|
await this.ioHost.asIoHelper().defaults.info("%s: importing resources into stack...", import_chalk35.default.bold(stack.displayName));
|
|
311512
|
-
const tags = tagsForStack(stack);
|
|
311513
311630
|
await resourceImporter.importResourcesFromMap(actualImport, {
|
|
311514
311631
|
roleArn: options.roleArn,
|
|
311515
|
-
tags,
|
|
311516
311632
|
deploymentMethod: options.deploymentMethod,
|
|
311517
311633
|
usePreviousParameters: true,
|
|
311518
311634
|
rollback: options.rollback,
|
|
@@ -312269,6 +312385,248 @@ Do you wish to deploy these changes?`;
|
|
|
312269
312385
|
}
|
|
312270
312386
|
});
|
|
312271
312387
|
|
|
312388
|
+
// lib/cli/debug-handles.ts
|
|
312389
|
+
function describeLeak(leak, sources) {
|
|
312390
|
+
const frames = actionableFrames(leak.creationStack);
|
|
312391
|
+
const lines = ["", import_chalk36.default.bold(`# ${leak.type} (${TRACKED_TYPES[leak.type]})`)];
|
|
312392
|
+
if (frames.length === 0) {
|
|
312393
|
+
lines.push(" (opened entirely inside Node internals, no CLI frames to show)");
|
|
312394
|
+
return lines;
|
|
312395
|
+
}
|
|
312396
|
+
const [origin] = frames;
|
|
312397
|
+
if (origin.func && origin.func !== "<anonymous>") {
|
|
312398
|
+
lines.push(` created in ${origin.func}()`);
|
|
312399
|
+
}
|
|
312400
|
+
lines.push(" call stack:");
|
|
312401
|
+
for (const frame of frames) {
|
|
312402
|
+
lines.push(` ${frame.func} (${frame.file}:${frame.line}:${frame.column})`);
|
|
312403
|
+
const snippet = sources.snippetAt(frame);
|
|
312404
|
+
if (snippet) {
|
|
312405
|
+
lines.push(` ${import_chalk36.default.dim(snippet)}`);
|
|
312406
|
+
}
|
|
312407
|
+
}
|
|
312408
|
+
return lines;
|
|
312409
|
+
}
|
|
312410
|
+
function captureCreationStack() {
|
|
312411
|
+
const carrier = {};
|
|
312412
|
+
const previous = Error.prepareStackTrace;
|
|
312413
|
+
const previousLimit = Error.stackTraceLimit;
|
|
312414
|
+
Error.stackTraceLimit = STACK_CAPTURE_DEPTH;
|
|
312415
|
+
Error.prepareStackTrace = (_error, callSites) => callSites.map((site) => {
|
|
312416
|
+
const file = site.getFileName() ?? "";
|
|
312417
|
+
return {
|
|
312418
|
+
func: site.getFunctionName() ?? "<anonymous>",
|
|
312419
|
+
file: file.startsWith("file://") ? (0, import_node_url.fileURLToPath)(file) : file,
|
|
312420
|
+
line: site.getLineNumber() ?? 0,
|
|
312421
|
+
column: site.getColumnNumber() ?? 0
|
|
312422
|
+
};
|
|
312423
|
+
});
|
|
312424
|
+
try {
|
|
312425
|
+
Error.captureStackTrace(carrier, captureCreationStack);
|
|
312426
|
+
return carrier.stack?.slice(1) ?? [];
|
|
312427
|
+
} finally {
|
|
312428
|
+
Error.prepareStackTrace = previous;
|
|
312429
|
+
Error.stackTraceLimit = previousLimit;
|
|
312430
|
+
}
|
|
312431
|
+
}
|
|
312432
|
+
function activeResourceSummary() {
|
|
312433
|
+
const counts = /* @__PURE__ */ new Map();
|
|
312434
|
+
for (const type of process.getActiveResourcesInfo()) {
|
|
312435
|
+
counts.set(type, (counts.get(type) ?? 0) + 1);
|
|
312436
|
+
}
|
|
312437
|
+
if (counts.size === 0) {
|
|
312438
|
+
return "(none)";
|
|
312439
|
+
}
|
|
312440
|
+
return [...counts].map(([type, count]) => `${count}x ${type}`).join(", ");
|
|
312441
|
+
}
|
|
312442
|
+
function actionableFrames(frames) {
|
|
312443
|
+
return frames.filter((frame) => frame.file && !frame.file.startsWith("node:"));
|
|
312444
|
+
}
|
|
312445
|
+
function readLines(file) {
|
|
312446
|
+
try {
|
|
312447
|
+
return (0, import_node_fs5.readFileSync)(file, "utf-8").split(/\r?\n/);
|
|
312448
|
+
} catch {
|
|
312449
|
+
return void 0;
|
|
312450
|
+
}
|
|
312451
|
+
}
|
|
312452
|
+
function trackLeakedHandles() {
|
|
312453
|
+
const tracker = new LeakedHandleTracker();
|
|
312454
|
+
tracker.start();
|
|
312455
|
+
return tracker;
|
|
312456
|
+
}
|
|
312457
|
+
var import_node_async_hooks, import_node_fs5, import_node_url, import_chalk36, TRACKED_TYPES, STACK_CAPTURE_DEPTH, HANDLE_DUMP_GRACE_MS, MAX_TRACKED_HANDLES, SOURCE_SNIPPET_CHARS, LeakedHandleTracker, SourceCache;
|
|
312458
|
+
var init_debug_handles = __esm({
|
|
312459
|
+
"lib/cli/debug-handles.ts"() {
|
|
312460
|
+
"use strict";
|
|
312461
|
+
import_node_async_hooks = require("node:async_hooks");
|
|
312462
|
+
import_node_fs5 = require("node:fs");
|
|
312463
|
+
import_node_url = require("node:url");
|
|
312464
|
+
import_chalk36 = __toESM(require_source());
|
|
312465
|
+
TRACKED_TYPES = {
|
|
312466
|
+
TCPWRAP: "open network connection",
|
|
312467
|
+
TCPSERVERWRAP: "listening TCP server",
|
|
312468
|
+
PIPEWRAP: "open pipe",
|
|
312469
|
+
PIPESERVERWRAP: "listening pipe server",
|
|
312470
|
+
UDPWRAP: "open UDP socket",
|
|
312471
|
+
TTYWRAP: "open terminal stream",
|
|
312472
|
+
Timeout: "timer from setTimeout or setInterval",
|
|
312473
|
+
Immediate: "pending setImmediate callback",
|
|
312474
|
+
PROCESSWRAP: "spawned child process still running",
|
|
312475
|
+
FSEVENTWRAP: "file-system watcher",
|
|
312476
|
+
STATWATCHER: "file-system stat watcher",
|
|
312477
|
+
SIGNALWRAP: "OS signal handler still registered",
|
|
312478
|
+
WORKER: "worker thread still running",
|
|
312479
|
+
MESSAGEPORT: "open worker-thread message channel"
|
|
312480
|
+
};
|
|
312481
|
+
STACK_CAPTURE_DEPTH = 60;
|
|
312482
|
+
HANDLE_DUMP_GRACE_MS = 1e3;
|
|
312483
|
+
MAX_TRACKED_HANDLES = 1e4;
|
|
312484
|
+
SOURCE_SNIPPET_CHARS = 200;
|
|
312485
|
+
LeakedHandleTracker = class {
|
|
312486
|
+
static {
|
|
312487
|
+
__name(this, "LeakedHandleTracker");
|
|
312488
|
+
}
|
|
312489
|
+
watched = /* @__PURE__ */ new Map();
|
|
312490
|
+
/**
|
|
312491
|
+
* Whether we stopped recording because {@link MAX_TRACKED_HANDLES} was reached.
|
|
312492
|
+
* Reported, so a short list is never mistaken for a complete one.
|
|
312493
|
+
*/
|
|
312494
|
+
atCapacity = false;
|
|
312495
|
+
hook = (0, import_node_async_hooks.createHook)({
|
|
312496
|
+
init: /* @__PURE__ */ __name((asyncId, type, _triggerAsyncId, resource) => {
|
|
312497
|
+
if (!(type in TRACKED_TYPES)) {
|
|
312498
|
+
return;
|
|
312499
|
+
}
|
|
312500
|
+
if (this.watched.size >= MAX_TRACKED_HANDLES) {
|
|
312501
|
+
this.atCapacity = true;
|
|
312502
|
+
return;
|
|
312503
|
+
}
|
|
312504
|
+
try {
|
|
312505
|
+
this.watched.set(asyncId, {
|
|
312506
|
+
type,
|
|
312507
|
+
handleRef: new WeakRef(resource),
|
|
312508
|
+
creationStack: captureCreationStack()
|
|
312509
|
+
});
|
|
312510
|
+
} catch {
|
|
312511
|
+
this.watched.delete(asyncId);
|
|
312512
|
+
}
|
|
312513
|
+
}, "init"),
|
|
312514
|
+
destroy: /* @__PURE__ */ __name((asyncId) => {
|
|
312515
|
+
this.watched.delete(asyncId);
|
|
312516
|
+
}, "destroy")
|
|
312517
|
+
});
|
|
312518
|
+
/**
|
|
312519
|
+
* Begin watching async resources. Must run before the resources we care about
|
|
312520
|
+
* are created, and only when the user opted in, since the hook adds a small
|
|
312521
|
+
* per-resource cost.
|
|
312522
|
+
*/
|
|
312523
|
+
start() {
|
|
312524
|
+
this.hook.enable();
|
|
312525
|
+
}
|
|
312526
|
+
/**
|
|
312527
|
+
* Stop watching and discard all tracked state.
|
|
312528
|
+
*/
|
|
312529
|
+
stop() {
|
|
312530
|
+
this.hook.disable();
|
|
312531
|
+
this.watched.clear();
|
|
312532
|
+
}
|
|
312533
|
+
/**
|
|
312534
|
+
* Report the leaked handles once the grace period has passed. The timer is
|
|
312535
|
+
* unref'd, so it never fires if the process exits cleanly within the window and
|
|
312536
|
+
* never holds the process open itself.
|
|
312537
|
+
*/
|
|
312538
|
+
scheduleReport(ioHelper) {
|
|
312539
|
+
setTimeout(() => {
|
|
312540
|
+
this.report(ioHelper).catch(() => void 0);
|
|
312541
|
+
}, HANDLE_DUMP_GRACE_MS).unref();
|
|
312542
|
+
}
|
|
312543
|
+
/**
|
|
312544
|
+
* Report every resource still holding the event loop open, each with the source
|
|
312545
|
+
* location where it was created. Call at the very end of execution, by which
|
|
312546
|
+
* point only genuinely leaked handles should remain.
|
|
312547
|
+
*
|
|
312548
|
+
* Emitted as one message, so unrelated output cannot interleave into the middle
|
|
312549
|
+
* of a stack trace, and at DEBUG, which is the level `--debug-cli` raises the
|
|
312550
|
+
* CLI to.
|
|
312551
|
+
*/
|
|
312552
|
+
async report(ioHelper) {
|
|
312553
|
+
this.hook.disable();
|
|
312554
|
+
const leaks = [...this.watched.values()].filter((r6) => {
|
|
312555
|
+
const handle = r6.handleRef.deref();
|
|
312556
|
+
if (handle === void 0) {
|
|
312557
|
+
return false;
|
|
312558
|
+
}
|
|
312559
|
+
if (handle._destroyed === true) {
|
|
312560
|
+
return false;
|
|
312561
|
+
}
|
|
312562
|
+
return typeof handle.hasRef === "function" && handle.hasRef();
|
|
312563
|
+
});
|
|
312564
|
+
this.watched.clear();
|
|
312565
|
+
await ioHelper.defaults.debug(this.renderReport(leaks).join("\n"));
|
|
312566
|
+
}
|
|
312567
|
+
renderReport(leaks) {
|
|
312568
|
+
if (leaks.length === 0) {
|
|
312569
|
+
return [
|
|
312570
|
+
"The CLI process is still alive, but no tracked handle explains it.",
|
|
312571
|
+
`Node reports these resources still active: ${activeResourceSummary()}`,
|
|
312572
|
+
"The cause may be a handle opened before tracking started, or a type this build does not track."
|
|
312573
|
+
];
|
|
312574
|
+
}
|
|
312575
|
+
const lines = [`${leaks.length} ${leaks.length === 1 ? "handle" : "handles"} still keeping the CLI process alive:`];
|
|
312576
|
+
if (this.atCapacity) {
|
|
312577
|
+
lines.push(`Stopped recording after ${MAX_TRACKED_HANDLES} handles, so this list may be incomplete.`);
|
|
312578
|
+
}
|
|
312579
|
+
const sources = new SourceCache();
|
|
312580
|
+
for (const leak of leaks) {
|
|
312581
|
+
lines.push(...describeLeak(leak, sources));
|
|
312582
|
+
}
|
|
312583
|
+
if (sources.sawMinifiedLine) {
|
|
312584
|
+
lines.push("");
|
|
312585
|
+
lines.push("Locations above are positions in the bundled CLI, not in the original source files.");
|
|
312586
|
+
}
|
|
312587
|
+
return lines;
|
|
312588
|
+
}
|
|
312589
|
+
};
|
|
312590
|
+
__name(describeLeak, "describeLeak");
|
|
312591
|
+
__name(captureCreationStack, "captureCreationStack");
|
|
312592
|
+
__name(activeResourceSummary, "activeResourceSummary");
|
|
312593
|
+
__name(actionableFrames, "actionableFrames");
|
|
312594
|
+
SourceCache = class {
|
|
312595
|
+
static {
|
|
312596
|
+
__name(this, "SourceCache");
|
|
312597
|
+
}
|
|
312598
|
+
/**
|
|
312599
|
+
* Whether any line we read was long enough to be minified rather than
|
|
312600
|
+
* hand-written. Used to warn that the printed locations are bundle-relative.
|
|
312601
|
+
*/
|
|
312602
|
+
sawMinifiedLine = false;
|
|
312603
|
+
files = /* @__PURE__ */ new Map();
|
|
312604
|
+
snippetAt(frame) {
|
|
312605
|
+
const line = this.linesOf(frame.file)?.[frame.line - 1];
|
|
312606
|
+
if (line === void 0) {
|
|
312607
|
+
return void 0;
|
|
312608
|
+
}
|
|
312609
|
+
if (line.length <= SOURCE_SNIPPET_CHARS) {
|
|
312610
|
+
return line.trim() || void 0;
|
|
312611
|
+
}
|
|
312612
|
+
this.sawMinifiedLine = true;
|
|
312613
|
+
const start = Math.max(0, frame.column - 1 - Math.floor(SOURCE_SNIPPET_CHARS / 2));
|
|
312614
|
+
const end2 = Math.min(line.length, start + SOURCE_SNIPPET_CHARS);
|
|
312615
|
+
const window2 = line.slice(start, end2).trim();
|
|
312616
|
+
return `${start > 0 ? "\u2026" : ""}${window2}${end2 < line.length ? "\u2026" : ""}`;
|
|
312617
|
+
}
|
|
312618
|
+
linesOf(file) {
|
|
312619
|
+
if (!this.files.has(file)) {
|
|
312620
|
+
this.files.set(file, readLines(file));
|
|
312621
|
+
}
|
|
312622
|
+
return this.files.get(file);
|
|
312623
|
+
}
|
|
312624
|
+
};
|
|
312625
|
+
__name(readLines, "readLines");
|
|
312626
|
+
__name(trackLeakedHandles, "trackLeakedHandles");
|
|
312627
|
+
}
|
|
312628
|
+
});
|
|
312629
|
+
|
|
312272
312630
|
// lib/cli/util/console-formatters.ts
|
|
312273
312631
|
function formatAsBanner(msgs) {
|
|
312274
312632
|
const printLen = /* @__PURE__ */ __name((str) => stripAnsi(str).length, "printLen");
|
|
@@ -312317,7 +312675,7 @@ function getJson(url, agent, options = {}) {
|
|
|
312317
312675
|
agent,
|
|
312318
312676
|
headers: { Accept: "application/json" }
|
|
312319
312677
|
};
|
|
312320
|
-
return new Promise((
|
|
312678
|
+
return new Promise((resolve17, reject) => {
|
|
312321
312679
|
let req;
|
|
312322
312680
|
const timer = setTimeout(() => {
|
|
312323
312681
|
if (req) {
|
|
@@ -312328,7 +312686,7 @@ function getJson(url, agent, options = {}) {
|
|
|
312328
312686
|
req = https3.get(url, requestOptions, (res) => {
|
|
312329
312687
|
if (res.statusCode === 404 && options.allowNotFound) {
|
|
312330
312688
|
res.resume();
|
|
312331
|
-
|
|
312689
|
+
resolve17(void 0);
|
|
312332
312690
|
return;
|
|
312333
312691
|
}
|
|
312334
312692
|
if (res.statusCode !== 200) {
|
|
@@ -312343,7 +312701,7 @@ function getJson(url, agent, options = {}) {
|
|
|
312343
312701
|
});
|
|
312344
312702
|
res.on("end", () => {
|
|
312345
312703
|
try {
|
|
312346
|
-
|
|
312704
|
+
resolve17(JSON.parse(rawData));
|
|
312347
312705
|
} catch (e6) {
|
|
312348
312706
|
reject(import_toolkit_lib18.ToolkitError.withCause("NpmRegistryParseError", `could not parse response from ${url}: ${e6.message}`, e6));
|
|
312349
312707
|
}
|
|
@@ -312380,10 +312738,10 @@ async function getVersionMessages(currentVersion, cacheFile, agent) {
|
|
|
312380
312738
|
await cacheFile.update(JSON.stringify(packageInfo));
|
|
312381
312739
|
const versionMessages = [];
|
|
312382
312740
|
if (packageInfo.deprecated) {
|
|
312383
|
-
versionMessages.push(
|
|
312741
|
+
versionMessages.push(import_chalk37.default.red(packageInfo.deprecated));
|
|
312384
312742
|
}
|
|
312385
312743
|
if (semver4.gt(latestVersion, currentVersion)) {
|
|
312386
|
-
versionMessages.push(`Newer version of CDK is available [${
|
|
312744
|
+
versionMessages.push(`Newer version of CDK is available [${import_chalk37.default.green(latestVersion)}]`);
|
|
312387
312745
|
const majorUpgradeMessage = getMajorVersionUpgradeMessage(currentVersion);
|
|
312388
312746
|
if (majorUpgradeMessage) {
|
|
312389
312747
|
versionMessages.push(majorUpgradeMessage);
|
|
@@ -312414,13 +312772,13 @@ async function displayVersionMessage(ioHelper, options = {}) {
|
|
|
312414
312772
|
await ioHelper.defaults.debug(`Could not run version check - ${err.message}`);
|
|
312415
312773
|
}
|
|
312416
312774
|
}
|
|
312417
|
-
var path47, import_toolkit_lib19,
|
|
312775
|
+
var path47, import_toolkit_lib19, import_chalk37, fs50, semver4, ONE_DAY_IN_SECONDS, UPGRADE_DOCUMENTATION_LINKS, VersionCheckTTL;
|
|
312418
312776
|
var init_display_version = __esm({
|
|
312419
312777
|
"lib/cli/display-version.ts"() {
|
|
312420
312778
|
"use strict";
|
|
312421
312779
|
path47 = __toESM(require("path"));
|
|
312422
312780
|
import_toolkit_lib19 = __toESM(require_lib12());
|
|
312423
|
-
|
|
312781
|
+
import_chalk37 = __toESM(require_source());
|
|
312424
312782
|
fs50 = __toESM(require_lib4());
|
|
312425
312783
|
semver4 = __toESM(require_semver4());
|
|
312426
312784
|
init_util9();
|
|
@@ -312757,8 +313115,8 @@ var require_require_directory = __commonJS({
|
|
|
312757
313115
|
"../../node_modules/require-directory/index.js"(exports2, module2) {
|
|
312758
313116
|
"use strict";
|
|
312759
313117
|
var fs58 = require("fs");
|
|
312760
|
-
var
|
|
312761
|
-
var
|
|
313118
|
+
var join53 = require("path").join;
|
|
313119
|
+
var resolve17 = require("path").resolve;
|
|
312762
313120
|
var dirname17 = require("path").dirname;
|
|
312763
313121
|
var defaultOptions2 = {
|
|
312764
313122
|
extensions: ["js", "json", "coffee"],
|
|
@@ -312793,9 +313151,9 @@ var require_require_directory = __commonJS({
|
|
|
312793
313151
|
options[prop] = defaultOptions2[prop];
|
|
312794
313152
|
}
|
|
312795
313153
|
}
|
|
312796
|
-
path54 = !path54 ? dirname17(m4.filename) :
|
|
313154
|
+
path54 = !path54 ? dirname17(m4.filename) : resolve17(dirname17(m4.filename), path54);
|
|
312797
313155
|
fs58.readdirSync(path54).forEach(function(filename) {
|
|
312798
|
-
var joined =
|
|
313156
|
+
var joined = join53(path54, filename), files, key, obj;
|
|
312799
313157
|
if (fs58.statSync(joined).isDirectory() && options.recurse) {
|
|
312800
313158
|
files = requireDirectory(m4, joined, options);
|
|
312801
313159
|
if (Object.keys(files).length) {
|
|
@@ -315831,8 +316189,8 @@ var require_y18n = __commonJS({
|
|
|
315831
316189
|
var require_p_try = __commonJS({
|
|
315832
316190
|
"../../node_modules/p-try/index.js"(exports2, module2) {
|
|
315833
316191
|
"use strict";
|
|
315834
|
-
var pTry = /* @__PURE__ */ __name((fn, ...arguments_) => new Promise((
|
|
315835
|
-
|
|
316192
|
+
var pTry = /* @__PURE__ */ __name((fn, ...arguments_) => new Promise((resolve17) => {
|
|
316193
|
+
resolve17(fn(...arguments_));
|
|
315836
316194
|
}), "pTry");
|
|
315837
316195
|
module2.exports = pTry;
|
|
315838
316196
|
module2.exports.default = pTry;
|
|
@@ -315856,20 +316214,20 @@ var require_p_limit2 = __commonJS({
|
|
|
315856
316214
|
queue.shift()();
|
|
315857
316215
|
}
|
|
315858
316216
|
}, "next");
|
|
315859
|
-
const run5 = /* @__PURE__ */ __name((fn,
|
|
316217
|
+
const run5 = /* @__PURE__ */ __name((fn, resolve17, ...args) => {
|
|
315860
316218
|
activeCount++;
|
|
315861
316219
|
const result2 = pTry(fn, ...args);
|
|
315862
|
-
|
|
316220
|
+
resolve17(result2);
|
|
315863
316221
|
result2.then(next, next);
|
|
315864
316222
|
}, "run");
|
|
315865
|
-
const enqueue = /* @__PURE__ */ __name((fn,
|
|
316223
|
+
const enqueue = /* @__PURE__ */ __name((fn, resolve17, ...args) => {
|
|
315866
316224
|
if (activeCount < concurrency) {
|
|
315867
|
-
run5(fn,
|
|
316225
|
+
run5(fn, resolve17, ...args);
|
|
315868
316226
|
} else {
|
|
315869
|
-
queue.push(run5.bind(null, fn,
|
|
316227
|
+
queue.push(run5.bind(null, fn, resolve17, ...args));
|
|
315870
316228
|
}
|
|
315871
316229
|
}, "enqueue");
|
|
315872
|
-
const generator = /* @__PURE__ */ __name((fn, ...args) => new Promise((
|
|
316230
|
+
const generator = /* @__PURE__ */ __name((fn, ...args) => new Promise((resolve17) => enqueue(fn, resolve17, ...args)), "generator");
|
|
315873
316231
|
Object.defineProperties(generator, {
|
|
315874
316232
|
activeCount: {
|
|
315875
316233
|
get: /* @__PURE__ */ __name(() => activeCount, "get")
|
|
@@ -317347,7 +317705,7 @@ function parseCommandLineArguments(args) {
|
|
|
317347
317705
|
}).option("debug-cli", {
|
|
317348
317706
|
default: false,
|
|
317349
317707
|
type: "boolean",
|
|
317350
|
-
desc: "Debug the CDK CLI itself."
|
|
317708
|
+
desc: "Debug the CDK CLI itself. Reports what is keeping the CLI process alive if it fails to exit, and raises the CLI log level to show that report. Will slow down execution."
|
|
317351
317709
|
}).option("profile", {
|
|
317352
317710
|
default: void 0,
|
|
317353
317711
|
type: "string",
|
|
@@ -318082,6 +318440,10 @@ function parseCommandLineArguments(args) {
|
|
|
318082
318440
|
alias: "changeset",
|
|
318083
318441
|
desc: "Whether to create a change set to analyze resource replacements. In this mode, diff will use the deploy role instead of the lookup role.",
|
|
318084
318442
|
deprecated: "use --method instead"
|
|
318443
|
+
}).option("change-set-name", {
|
|
318444
|
+
default: void 0,
|
|
318445
|
+
type: "string",
|
|
318446
|
+
desc: "Name of the CloudFormation change set to create (only if method is not template)"
|
|
318085
318447
|
}).option("method", {
|
|
318086
318448
|
default: "auto",
|
|
318087
318449
|
alias: "m",
|
|
@@ -318362,7 +318724,7 @@ var init_platform_warnings = __esm({
|
|
|
318362
318724
|
// lib/cli/pretty-print-error.ts
|
|
318363
318725
|
function prettyPrintError(error3, options = { soft: false, debug: false }) {
|
|
318364
318726
|
const err = ensureError(error3);
|
|
318365
|
-
const errorPaint = options.soft ?
|
|
318727
|
+
const errorPaint = options.soft ? import_chalk38.default.yellow : import_chalk38.default.red;
|
|
318366
318728
|
console.error(errorPaint(err.message));
|
|
318367
318729
|
printCauses(err, options);
|
|
318368
318730
|
if (options.debug) {
|
|
@@ -318372,13 +318734,13 @@ function prettyPrintError(error3, options = { soft: false, debug: false }) {
|
|
|
318372
318734
|
function printCauses(err, options) {
|
|
318373
318735
|
if (err.cause && !options.soft) {
|
|
318374
318736
|
const cause = ensureError(err.cause);
|
|
318375
|
-
console.error(
|
|
318737
|
+
console.error(import_chalk38.default.yellow(`\u2023 ${cause.name}: ${cause.message}`));
|
|
318376
318738
|
printCauses(cause, options);
|
|
318377
318739
|
}
|
|
318378
318740
|
}
|
|
318379
318741
|
function printTraces(err) {
|
|
318380
318742
|
if (err.stack) {
|
|
318381
|
-
console.debug(
|
|
318743
|
+
console.debug(import_chalk38.default.gray(err.stack));
|
|
318382
318744
|
}
|
|
318383
318745
|
if (err.cause) {
|
|
318384
318746
|
printTraces(ensureError(err.cause));
|
|
@@ -318394,11 +318756,11 @@ function ensureError(value2) {
|
|
|
318394
318756
|
const error3 = new Error(`An unexpected error was thrown: ${stringified}`);
|
|
318395
318757
|
return error3;
|
|
318396
318758
|
}
|
|
318397
|
-
var
|
|
318759
|
+
var import_chalk38;
|
|
318398
318760
|
var init_pretty_print_error = __esm({
|
|
318399
318761
|
"lib/cli/pretty-print-error.ts"() {
|
|
318400
318762
|
"use strict";
|
|
318401
|
-
|
|
318763
|
+
import_chalk38 = __toESM(require_source());
|
|
318402
318764
|
__name(prettyPrintError, "prettyPrintError");
|
|
318403
318765
|
__name(printCauses, "printCauses");
|
|
318404
318766
|
__name(printTraces, "printTraces");
|
|
@@ -319246,8 +319608,8 @@ var require_lru_cache = __commonJS({
|
|
|
319246
319608
|
}
|
|
319247
319609
|
return stale ? v.__staleWhileFetching : v.__returned = v;
|
|
319248
319610
|
}
|
|
319249
|
-
const
|
|
319250
|
-
if (!forceRefresh && !
|
|
319611
|
+
const isStale2 = this.isStale(index);
|
|
319612
|
+
if (!forceRefresh && !isStale2) {
|
|
319251
319613
|
if (status) status.fetch = "hit";
|
|
319252
319614
|
this.moveToTail(index);
|
|
319253
319615
|
if (updateAgeOnGet) {
|
|
@@ -319260,8 +319622,8 @@ var require_lru_cache = __commonJS({
|
|
|
319260
319622
|
const hasStale = p3.__staleWhileFetching !== void 0;
|
|
319261
319623
|
const staleVal = hasStale && allowStale;
|
|
319262
319624
|
if (status) {
|
|
319263
|
-
status.fetch = hasStale &&
|
|
319264
|
-
if (staleVal &&
|
|
319625
|
+
status.fetch = hasStale && isStale2 ? "stale" : "refresh";
|
|
319626
|
+
if (staleVal && isStale2) status.returnedStale = true;
|
|
319265
319627
|
}
|
|
319266
319628
|
return staleVal ? p3.__staleWhileFetching : p3.__returned = p3;
|
|
319267
319629
|
}
|
|
@@ -319483,8 +319845,8 @@ var require_helpers2 = __commonJS({
|
|
|
319483
319845
|
function req(url, opts = {}) {
|
|
319484
319846
|
const href = typeof url === "string" ? url : url.href;
|
|
319485
319847
|
const req2 = (href.startsWith("https:") ? https4 : http).request(url, opts);
|
|
319486
|
-
const promise = new Promise((
|
|
319487
|
-
req2.once("response",
|
|
319848
|
+
const promise = new Promise((resolve17, reject) => {
|
|
319849
|
+
req2.once("response", resolve17).once("error", reject).end();
|
|
319488
319850
|
});
|
|
319489
319851
|
req2.then = promise.then.bind(promise);
|
|
319490
319852
|
return req2;
|
|
@@ -320547,7 +320909,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
320547
320909
|
var debug_1 = __importDefault2(require_src2());
|
|
320548
320910
|
var debug2 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
|
|
320549
320911
|
function parseProxyResponse(socket) {
|
|
320550
|
-
return new Promise((
|
|
320912
|
+
return new Promise((resolve17, reject) => {
|
|
320551
320913
|
let buffersLength = 0;
|
|
320552
320914
|
const buffers = [];
|
|
320553
320915
|
function read() {
|
|
@@ -320617,7 +320979,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
320617
320979
|
}
|
|
320618
320980
|
debug2("got proxy server response: %o %o", firstLine, headers);
|
|
320619
320981
|
cleanup();
|
|
320620
|
-
|
|
320982
|
+
resolve17({
|
|
320621
320983
|
connect: {
|
|
320622
320984
|
statusCode,
|
|
320623
320985
|
statusText,
|
|
@@ -324426,12 +324788,12 @@ var require_socksclient = __commonJS({
|
|
|
324426
324788
|
"use strict";
|
|
324427
324789
|
var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
324428
324790
|
function adopt(value2) {
|
|
324429
|
-
return value2 instanceof P ? value2 : new P(function(
|
|
324430
|
-
|
|
324791
|
+
return value2 instanceof P ? value2 : new P(function(resolve17) {
|
|
324792
|
+
resolve17(value2);
|
|
324431
324793
|
});
|
|
324432
324794
|
}
|
|
324433
324795
|
__name(adopt, "adopt");
|
|
324434
|
-
return new (P || (P = Promise))(function(
|
|
324796
|
+
return new (P || (P = Promise))(function(resolve17, reject) {
|
|
324435
324797
|
function fulfilled(value2) {
|
|
324436
324798
|
try {
|
|
324437
324799
|
step(generator.next(value2));
|
|
@@ -324449,7 +324811,7 @@ var require_socksclient = __commonJS({
|
|
|
324449
324811
|
}
|
|
324450
324812
|
__name(rejected, "rejected");
|
|
324451
324813
|
function step(result2) {
|
|
324452
|
-
result2.done ?
|
|
324814
|
+
result2.done ? resolve17(result2.value) : adopt(result2.value).then(fulfilled, rejected);
|
|
324453
324815
|
}
|
|
324454
324816
|
__name(step, "step");
|
|
324455
324817
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
@@ -324487,13 +324849,13 @@ var require_socksclient = __commonJS({
|
|
|
324487
324849
|
* @returns { Promise }
|
|
324488
324850
|
*/
|
|
324489
324851
|
static createConnection(options, callback) {
|
|
324490
|
-
return new Promise((
|
|
324852
|
+
return new Promise((resolve17, reject) => {
|
|
324491
324853
|
try {
|
|
324492
324854
|
(0, helpers_1.validateSocksClientOptions)(options, ["connect"]);
|
|
324493
324855
|
} catch (err) {
|
|
324494
324856
|
if (typeof callback === "function") {
|
|
324495
324857
|
callback(err);
|
|
324496
|
-
return
|
|
324858
|
+
return resolve17(err);
|
|
324497
324859
|
} else {
|
|
324498
324860
|
return reject(err);
|
|
324499
324861
|
}
|
|
@@ -324504,16 +324866,16 @@ var require_socksclient = __commonJS({
|
|
|
324504
324866
|
client.removeAllListeners();
|
|
324505
324867
|
if (typeof callback === "function") {
|
|
324506
324868
|
callback(null, info2);
|
|
324507
|
-
|
|
324869
|
+
resolve17(info2);
|
|
324508
324870
|
} else {
|
|
324509
|
-
|
|
324871
|
+
resolve17(info2);
|
|
324510
324872
|
}
|
|
324511
324873
|
});
|
|
324512
324874
|
client.once("error", (err) => {
|
|
324513
324875
|
client.removeAllListeners();
|
|
324514
324876
|
if (typeof callback === "function") {
|
|
324515
324877
|
callback(err);
|
|
324516
|
-
|
|
324878
|
+
resolve17(err);
|
|
324517
324879
|
} else {
|
|
324518
324880
|
reject(err);
|
|
324519
324881
|
}
|
|
@@ -324530,13 +324892,13 @@ var require_socksclient = __commonJS({
|
|
|
324530
324892
|
* @returns { Promise }
|
|
324531
324893
|
*/
|
|
324532
324894
|
static createConnectionChain(options, callback) {
|
|
324533
|
-
return new Promise((
|
|
324895
|
+
return new Promise((resolve17, reject) => __awaiter2(this, void 0, void 0, function* () {
|
|
324534
324896
|
try {
|
|
324535
324897
|
(0, helpers_1.validateSocksClientChainOptions)(options);
|
|
324536
324898
|
} catch (err) {
|
|
324537
324899
|
if (typeof callback === "function") {
|
|
324538
324900
|
callback(err);
|
|
324539
|
-
return
|
|
324901
|
+
return resolve17(err);
|
|
324540
324902
|
} else {
|
|
324541
324903
|
return reject(err);
|
|
324542
324904
|
}
|
|
@@ -324562,14 +324924,14 @@ var require_socksclient = __commonJS({
|
|
|
324562
324924
|
}
|
|
324563
324925
|
if (typeof callback === "function") {
|
|
324564
324926
|
callback(null, { socket: sock });
|
|
324565
|
-
|
|
324927
|
+
resolve17({ socket: sock });
|
|
324566
324928
|
} else {
|
|
324567
|
-
|
|
324929
|
+
resolve17({ socket: sock });
|
|
324568
324930
|
}
|
|
324569
324931
|
} catch (err) {
|
|
324570
324932
|
if (typeof callback === "function") {
|
|
324571
324933
|
callback(err);
|
|
324572
|
-
|
|
324934
|
+
resolve17(err);
|
|
324573
324935
|
} else {
|
|
324574
324936
|
reject(err);
|
|
324575
324937
|
}
|
|
@@ -325257,12 +325619,12 @@ var require_dist7 = __commonJS({
|
|
|
325257
325619
|
let { host } = opts;
|
|
325258
325620
|
const { port, lookup: lookupFn = dns.lookup } = opts;
|
|
325259
325621
|
if (shouldLookup) {
|
|
325260
|
-
host = await new Promise((
|
|
325622
|
+
host = await new Promise((resolve17, reject) => {
|
|
325261
325623
|
lookupFn(host, {}, (err, res) => {
|
|
325262
325624
|
if (err) {
|
|
325263
325625
|
reject(err);
|
|
325264
325626
|
} else {
|
|
325265
|
-
|
|
325627
|
+
resolve17(res);
|
|
325266
325628
|
}
|
|
325267
325629
|
});
|
|
325268
325630
|
});
|
|
@@ -325956,7 +326318,7 @@ var require_netUtils = __commonJS({
|
|
|
325956
326318
|
}
|
|
325957
326319
|
__name(describeAddress, "describeAddress");
|
|
325958
326320
|
function upgradeSocket(socket, options) {
|
|
325959
|
-
return new Promise((
|
|
326321
|
+
return new Promise((resolve17, reject) => {
|
|
325960
326322
|
const tlsOptions = Object.assign({}, options, {
|
|
325961
326323
|
socket
|
|
325962
326324
|
});
|
|
@@ -325966,7 +326328,7 @@ var require_netUtils = __commonJS({
|
|
|
325966
326328
|
reject(tlsSocket.authorizationError);
|
|
325967
326329
|
} else {
|
|
325968
326330
|
tlsSocket.removeAllListeners("error");
|
|
325969
|
-
|
|
326331
|
+
resolve17(tlsSocket);
|
|
325970
326332
|
}
|
|
325971
326333
|
}).once("error", (error3) => {
|
|
325972
326334
|
reject(error3);
|
|
@@ -326631,7 +326993,7 @@ var require_transfer = __commonJS({
|
|
|
326631
326993
|
}
|
|
326632
326994
|
__name(parsePasvResponse, "parsePasvResponse");
|
|
326633
326995
|
function connectForPassiveTransfer(host, port, ftp) {
|
|
326634
|
-
return new Promise((
|
|
326996
|
+
return new Promise((resolve17, reject) => {
|
|
326635
326997
|
let socket = ftp._newSocket();
|
|
326636
326998
|
const handleConnErr = /* @__PURE__ */ __name(function(err) {
|
|
326637
326999
|
err.message = "Can't open data connection in passive mode: " + err.message;
|
|
@@ -326659,7 +327021,7 @@ var require_transfer = __commonJS({
|
|
|
326659
327021
|
socket.removeListener("error", handleConnErr);
|
|
326660
327022
|
socket.removeListener("timeout", handleTimeout);
|
|
326661
327023
|
ftp.dataSocket = socket;
|
|
326662
|
-
|
|
327024
|
+
resolve17();
|
|
326663
327025
|
});
|
|
326664
327026
|
});
|
|
326665
327027
|
}
|
|
@@ -329127,7 +329489,7 @@ var require_util3 = __commonJS({
|
|
|
329127
329489
|
}
|
|
329128
329490
|
__name(normalize3, "normalize");
|
|
329129
329491
|
exports2.normalize = normalize3;
|
|
329130
|
-
function
|
|
329492
|
+
function join53(aRoot, aPath) {
|
|
329131
329493
|
if (aRoot === "") {
|
|
329132
329494
|
aRoot = ".";
|
|
329133
329495
|
}
|
|
@@ -329159,8 +329521,8 @@ var require_util3 = __commonJS({
|
|
|
329159
329521
|
}
|
|
329160
329522
|
return joined;
|
|
329161
329523
|
}
|
|
329162
|
-
__name(
|
|
329163
|
-
exports2.join =
|
|
329524
|
+
__name(join53, "join");
|
|
329525
|
+
exports2.join = join53;
|
|
329164
329526
|
exports2.isAbsolute = function(aPath) {
|
|
329165
329527
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
329166
329528
|
};
|
|
@@ -329343,7 +329705,7 @@ var require_util3 = __commonJS({
|
|
|
329343
329705
|
parsed.path = parsed.path.substring(0, index + 1);
|
|
329344
329706
|
}
|
|
329345
329707
|
}
|
|
329346
|
-
sourceURL =
|
|
329708
|
+
sourceURL = join53(urlGenerate(parsed), sourceURL);
|
|
329347
329709
|
}
|
|
329348
329710
|
return normalize3(sourceURL);
|
|
329349
329711
|
}
|
|
@@ -331180,7 +331542,7 @@ var require_escodegen = __commonJS({
|
|
|
331180
331542
|
return space ? space : " ";
|
|
331181
331543
|
}
|
|
331182
331544
|
__name(noEmptySpace, "noEmptySpace");
|
|
331183
|
-
function
|
|
331545
|
+
function join53(left, right) {
|
|
331184
331546
|
var leftSource, rightSource, leftCharCode, rightCharCode;
|
|
331185
331547
|
leftSource = toSourceNodeWhenNeeded(left).toString();
|
|
331186
331548
|
if (leftSource.length === 0) {
|
|
@@ -331199,7 +331561,7 @@ var require_escodegen = __commonJS({
|
|
|
331199
331561
|
}
|
|
331200
331562
|
return [left, space, right];
|
|
331201
331563
|
}
|
|
331202
|
-
__name(
|
|
331564
|
+
__name(join53, "join");
|
|
331203
331565
|
function addIndent(stmt) {
|
|
331204
331566
|
return [base, stmt];
|
|
331205
331567
|
}
|
|
@@ -331527,8 +331889,8 @@ var require_escodegen = __commonJS({
|
|
|
331527
331889
|
} else {
|
|
331528
331890
|
result2.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT));
|
|
331529
331891
|
}
|
|
331530
|
-
result2 =
|
|
331531
|
-
result2 = [
|
|
331892
|
+
result2 = join53(result2, operator);
|
|
331893
|
+
result2 = [join53(
|
|
331532
331894
|
result2,
|
|
331533
331895
|
that.generateExpression(stmt.right, Precedence.Assignment, E_TTT)
|
|
331534
331896
|
), ")"];
|
|
@@ -331671,11 +332033,11 @@ var require_escodegen = __commonJS({
|
|
|
331671
332033
|
var result2, fragment;
|
|
331672
332034
|
result2 = ["class"];
|
|
331673
332035
|
if (stmt.id) {
|
|
331674
|
-
result2 =
|
|
332036
|
+
result2 = join53(result2, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
|
|
331675
332037
|
}
|
|
331676
332038
|
if (stmt.superClass) {
|
|
331677
|
-
fragment =
|
|
331678
|
-
result2 =
|
|
332039
|
+
fragment = join53("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT));
|
|
332040
|
+
result2 = join53(result2, fragment);
|
|
331679
332041
|
}
|
|
331680
332042
|
result2.push(space);
|
|
331681
332043
|
result2.push(this.generateStatement(stmt.body, S_TFFT));
|
|
@@ -331688,9 +332050,9 @@ var require_escodegen = __commonJS({
|
|
|
331688
332050
|
return escapeDirective(stmt.directive) + this.semicolon(flags);
|
|
331689
332051
|
}, "DirectiveStatement"),
|
|
331690
332052
|
DoWhileStatement: /* @__PURE__ */ __name(function(stmt, flags) {
|
|
331691
|
-
var result2 =
|
|
332053
|
+
var result2 = join53("do", this.maybeBlock(stmt.body, S_TFFF));
|
|
331692
332054
|
result2 = this.maybeBlockSuffix(stmt.body, result2);
|
|
331693
|
-
return
|
|
332055
|
+
return join53(result2, [
|
|
331694
332056
|
"while" + space + "(",
|
|
331695
332057
|
this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
|
|
331696
332058
|
")" + this.semicolon(flags)
|
|
@@ -331726,11 +332088,11 @@ var require_escodegen = __commonJS({
|
|
|
331726
332088
|
ExportDefaultDeclaration: /* @__PURE__ */ __name(function(stmt, flags) {
|
|
331727
332089
|
var result2 = ["export"], bodyFlags;
|
|
331728
332090
|
bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
|
|
331729
|
-
result2 =
|
|
332091
|
+
result2 = join53(result2, "default");
|
|
331730
332092
|
if (isStatement(stmt.declaration)) {
|
|
331731
|
-
result2 =
|
|
332093
|
+
result2 = join53(result2, this.generateStatement(stmt.declaration, bodyFlags));
|
|
331732
332094
|
} else {
|
|
331733
|
-
result2 =
|
|
332095
|
+
result2 = join53(result2, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
|
|
331734
332096
|
}
|
|
331735
332097
|
return result2;
|
|
331736
332098
|
}, "ExportDefaultDeclaration"),
|
|
@@ -331738,15 +332100,15 @@ var require_escodegen = __commonJS({
|
|
|
331738
332100
|
var result2 = ["export"], bodyFlags, that = this;
|
|
331739
332101
|
bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
|
|
331740
332102
|
if (stmt.declaration) {
|
|
331741
|
-
return
|
|
332103
|
+
return join53(result2, this.generateStatement(stmt.declaration, bodyFlags));
|
|
331742
332104
|
}
|
|
331743
332105
|
if (stmt.specifiers) {
|
|
331744
332106
|
if (stmt.specifiers.length === 0) {
|
|
331745
|
-
result2 =
|
|
332107
|
+
result2 = join53(result2, "{" + space + "}");
|
|
331746
332108
|
} else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) {
|
|
331747
|
-
result2 =
|
|
332109
|
+
result2 = join53(result2, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
|
|
331748
332110
|
} else {
|
|
331749
|
-
result2 =
|
|
332111
|
+
result2 = join53(result2, "{");
|
|
331750
332112
|
withIndent(function(indent2) {
|
|
331751
332113
|
var i6, iz;
|
|
331752
332114
|
result2.push(newline);
|
|
@@ -331764,7 +332126,7 @@ var require_escodegen = __commonJS({
|
|
|
331764
332126
|
result2.push(base + "}");
|
|
331765
332127
|
}
|
|
331766
332128
|
if (stmt.source) {
|
|
331767
|
-
result2 =
|
|
332129
|
+
result2 = join53(result2, [
|
|
331768
332130
|
"from" + space,
|
|
331769
332131
|
// ModuleSpecifier
|
|
331770
332132
|
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
@@ -331855,7 +332217,7 @@ var require_escodegen = __commonJS({
|
|
|
331855
332217
|
];
|
|
331856
332218
|
cursor2 = 0;
|
|
331857
332219
|
if (stmt.specifiers[cursor2].type === Syntax.ImportDefaultSpecifier) {
|
|
331858
|
-
result2 =
|
|
332220
|
+
result2 = join53(result2, [
|
|
331859
332221
|
this.generateExpression(stmt.specifiers[cursor2], Precedence.Sequence, E_TTT)
|
|
331860
332222
|
]);
|
|
331861
332223
|
++cursor2;
|
|
@@ -331865,7 +332227,7 @@ var require_escodegen = __commonJS({
|
|
|
331865
332227
|
result2.push(",");
|
|
331866
332228
|
}
|
|
331867
332229
|
if (stmt.specifiers[cursor2].type === Syntax.ImportNamespaceSpecifier) {
|
|
331868
|
-
result2 =
|
|
332230
|
+
result2 = join53(result2, [
|
|
331869
332231
|
space,
|
|
331870
332232
|
this.generateExpression(stmt.specifiers[cursor2], Precedence.Sequence, E_TTT)
|
|
331871
332233
|
]);
|
|
@@ -331894,7 +332256,7 @@ var require_escodegen = __commonJS({
|
|
|
331894
332256
|
}
|
|
331895
332257
|
}
|
|
331896
332258
|
}
|
|
331897
|
-
result2 =
|
|
332259
|
+
result2 = join53(result2, [
|
|
331898
332260
|
"from" + space,
|
|
331899
332261
|
// ModuleSpecifier
|
|
331900
332262
|
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
@@ -331949,7 +332311,7 @@ var require_escodegen = __commonJS({
|
|
|
331949
332311
|
return result2;
|
|
331950
332312
|
}, "VariableDeclaration"),
|
|
331951
332313
|
ThrowStatement: /* @__PURE__ */ __name(function(stmt, flags) {
|
|
331952
|
-
return [
|
|
332314
|
+
return [join53(
|
|
331953
332315
|
"throw",
|
|
331954
332316
|
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
|
331955
332317
|
), this.semicolon(flags)];
|
|
@@ -331960,7 +332322,7 @@ var require_escodegen = __commonJS({
|
|
|
331960
332322
|
result2 = this.maybeBlockSuffix(stmt.block, result2);
|
|
331961
332323
|
if (stmt.handlers) {
|
|
331962
332324
|
for (i6 = 0, iz = stmt.handlers.length; i6 < iz; ++i6) {
|
|
331963
|
-
result2 =
|
|
332325
|
+
result2 = join53(result2, this.generateStatement(stmt.handlers[i6], S_TFFF));
|
|
331964
332326
|
if (stmt.finalizer || i6 + 1 !== iz) {
|
|
331965
332327
|
result2 = this.maybeBlockSuffix(stmt.handlers[i6].body, result2);
|
|
331966
332328
|
}
|
|
@@ -331968,7 +332330,7 @@ var require_escodegen = __commonJS({
|
|
|
331968
332330
|
} else {
|
|
331969
332331
|
guardedHandlers = stmt.guardedHandlers || [];
|
|
331970
332332
|
for (i6 = 0, iz = guardedHandlers.length; i6 < iz; ++i6) {
|
|
331971
|
-
result2 =
|
|
332333
|
+
result2 = join53(result2, this.generateStatement(guardedHandlers[i6], S_TFFF));
|
|
331972
332334
|
if (stmt.finalizer || i6 + 1 !== iz) {
|
|
331973
332335
|
result2 = this.maybeBlockSuffix(guardedHandlers[i6].body, result2);
|
|
331974
332336
|
}
|
|
@@ -331976,13 +332338,13 @@ var require_escodegen = __commonJS({
|
|
|
331976
332338
|
if (stmt.handler) {
|
|
331977
332339
|
if (Array.isArray(stmt.handler)) {
|
|
331978
332340
|
for (i6 = 0, iz = stmt.handler.length; i6 < iz; ++i6) {
|
|
331979
|
-
result2 =
|
|
332341
|
+
result2 = join53(result2, this.generateStatement(stmt.handler[i6], S_TFFF));
|
|
331980
332342
|
if (stmt.finalizer || i6 + 1 !== iz) {
|
|
331981
332343
|
result2 = this.maybeBlockSuffix(stmt.handler[i6].body, result2);
|
|
331982
332344
|
}
|
|
331983
332345
|
}
|
|
331984
332346
|
} else {
|
|
331985
|
-
result2 =
|
|
332347
|
+
result2 = join53(result2, this.generateStatement(stmt.handler, S_TFFF));
|
|
331986
332348
|
if (stmt.finalizer) {
|
|
331987
332349
|
result2 = this.maybeBlockSuffix(stmt.handler.body, result2);
|
|
331988
332350
|
}
|
|
@@ -331990,7 +332352,7 @@ var require_escodegen = __commonJS({
|
|
|
331990
332352
|
}
|
|
331991
332353
|
}
|
|
331992
332354
|
if (stmt.finalizer) {
|
|
331993
|
-
result2 =
|
|
332355
|
+
result2 = join53(result2, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]);
|
|
331994
332356
|
}
|
|
331995
332357
|
return result2;
|
|
331996
332358
|
}, "TryStatement"),
|
|
@@ -332024,7 +332386,7 @@ var require_escodegen = __commonJS({
|
|
|
332024
332386
|
withIndent(function() {
|
|
332025
332387
|
if (stmt.test) {
|
|
332026
332388
|
result2 = [
|
|
332027
|
-
|
|
332389
|
+
join53("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
|
|
332028
332390
|
":"
|
|
332029
332391
|
];
|
|
332030
332392
|
} else {
|
|
@@ -332072,9 +332434,9 @@ var require_escodegen = __commonJS({
|
|
|
332072
332434
|
result2.push(this.maybeBlock(stmt.consequent, S_TFFF));
|
|
332073
332435
|
result2 = this.maybeBlockSuffix(stmt.consequent, result2);
|
|
332074
332436
|
if (stmt.alternate.type === Syntax.IfStatement) {
|
|
332075
|
-
result2 =
|
|
332437
|
+
result2 = join53(result2, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]);
|
|
332076
332438
|
} else {
|
|
332077
|
-
result2 =
|
|
332439
|
+
result2 = join53(result2, join53("else", this.maybeBlock(stmt.alternate, bodyFlags)));
|
|
332078
332440
|
}
|
|
332079
332441
|
} else {
|
|
332080
332442
|
result2.push(this.maybeBlock(stmt.consequent, bodyFlags));
|
|
@@ -332175,7 +332537,7 @@ var require_escodegen = __commonJS({
|
|
|
332175
332537
|
}, "FunctionDeclaration"),
|
|
332176
332538
|
ReturnStatement: /* @__PURE__ */ __name(function(stmt, flags) {
|
|
332177
332539
|
if (stmt.argument) {
|
|
332178
|
-
return [
|
|
332540
|
+
return [join53(
|
|
332179
332541
|
"return",
|
|
332180
332542
|
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
|
332181
332543
|
), this.semicolon(flags)];
|
|
@@ -332264,14 +332626,14 @@ var require_escodegen = __commonJS({
|
|
|
332264
332626
|
if (leftSource.charCodeAt(leftSource.length - 1) === 47 && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) {
|
|
332265
332627
|
result2 = [fragment, noEmptySpace(), expr.operator];
|
|
332266
332628
|
} else {
|
|
332267
|
-
result2 =
|
|
332629
|
+
result2 = join53(fragment, expr.operator);
|
|
332268
332630
|
}
|
|
332269
332631
|
fragment = this.generateExpression(expr.right, rightPrecedence, flags);
|
|
332270
332632
|
if (expr.operator === "/" && fragment.toString().charAt(0) === "/" || expr.operator.slice(-1) === "<" && fragment.toString().slice(0, 3) === "!--") {
|
|
332271
332633
|
result2.push(noEmptySpace());
|
|
332272
332634
|
result2.push(fragment);
|
|
332273
332635
|
} else {
|
|
332274
|
-
result2 =
|
|
332636
|
+
result2 = join53(result2, fragment);
|
|
332275
332637
|
}
|
|
332276
332638
|
if (expr.operator === "in" && !(flags & F_ALLOW_IN)) {
|
|
332277
332639
|
return ["(", result2, ")"];
|
|
@@ -332311,7 +332673,7 @@ var require_escodegen = __commonJS({
|
|
|
332311
332673
|
var result2, length, i6, iz, itemFlags;
|
|
332312
332674
|
length = expr["arguments"].length;
|
|
332313
332675
|
itemFlags = flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ? E_TFT : E_TFF;
|
|
332314
|
-
result2 =
|
|
332676
|
+
result2 = join53(
|
|
332315
332677
|
"new",
|
|
332316
332678
|
this.generateExpression(expr.callee, Precedence.New, itemFlags)
|
|
332317
332679
|
);
|
|
@@ -332361,11 +332723,11 @@ var require_escodegen = __commonJS({
|
|
|
332361
332723
|
var result2, fragment, rightCharCode, leftSource, leftCharCode;
|
|
332362
332724
|
fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT);
|
|
332363
332725
|
if (space === "") {
|
|
332364
|
-
result2 =
|
|
332726
|
+
result2 = join53(expr.operator, fragment);
|
|
332365
332727
|
} else {
|
|
332366
332728
|
result2 = [expr.operator];
|
|
332367
332729
|
if (expr.operator.length > 2) {
|
|
332368
|
-
result2 =
|
|
332730
|
+
result2 = join53(result2, fragment);
|
|
332369
332731
|
} else {
|
|
332370
332732
|
leftSource = toSourceNodeWhenNeeded(result2).toString();
|
|
332371
332733
|
leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
|
|
@@ -332388,7 +332750,7 @@ var require_escodegen = __commonJS({
|
|
|
332388
332750
|
result2 = "yield";
|
|
332389
332751
|
}
|
|
332390
332752
|
if (expr.argument) {
|
|
332391
|
-
result2 =
|
|
332753
|
+
result2 = join53(
|
|
332392
332754
|
result2,
|
|
332393
332755
|
this.generateExpression(expr.argument, Precedence.Yield, E_TTT)
|
|
332394
332756
|
);
|
|
@@ -332396,7 +332758,7 @@ var require_escodegen = __commonJS({
|
|
|
332396
332758
|
return parenthesize(result2, Precedence.Yield, precedence);
|
|
332397
332759
|
}, "YieldExpression"),
|
|
332398
332760
|
AwaitExpression: /* @__PURE__ */ __name(function(expr, precedence, flags) {
|
|
332399
|
-
var result2 =
|
|
332761
|
+
var result2 = join53(
|
|
332400
332762
|
expr.all ? "await*" : "await",
|
|
332401
332763
|
this.generateExpression(expr.argument, Precedence.Await, E_TTT)
|
|
332402
332764
|
);
|
|
@@ -332479,11 +332841,11 @@ var require_escodegen = __commonJS({
|
|
|
332479
332841
|
var result2, fragment;
|
|
332480
332842
|
result2 = ["class"];
|
|
332481
332843
|
if (expr.id) {
|
|
332482
|
-
result2 =
|
|
332844
|
+
result2 = join53(result2, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
|
|
332483
332845
|
}
|
|
332484
332846
|
if (expr.superClass) {
|
|
332485
|
-
fragment =
|
|
332486
|
-
result2 =
|
|
332847
|
+
fragment = join53("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT));
|
|
332848
|
+
result2 = join53(result2, fragment);
|
|
332487
332849
|
}
|
|
332488
332850
|
result2.push(space);
|
|
332489
332851
|
result2.push(this.generateStatement(expr.body, S_TFFT));
|
|
@@ -332498,7 +332860,7 @@ var require_escodegen = __commonJS({
|
|
|
332498
332860
|
}
|
|
332499
332861
|
if (expr.kind === "get" || expr.kind === "set") {
|
|
332500
332862
|
fragment = [
|
|
332501
|
-
|
|
332863
|
+
join53(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
|
|
332502
332864
|
this.generateFunctionBody(expr.value)
|
|
332503
332865
|
];
|
|
332504
332866
|
} else {
|
|
@@ -332508,7 +332870,7 @@ var require_escodegen = __commonJS({
|
|
|
332508
332870
|
this.generateFunctionBody(expr.value)
|
|
332509
332871
|
];
|
|
332510
332872
|
}
|
|
332511
|
-
return
|
|
332873
|
+
return join53(result2, fragment);
|
|
332512
332874
|
}, "MethodDefinition"),
|
|
332513
332875
|
Property: /* @__PURE__ */ __name(function(expr, precedence, flags) {
|
|
332514
332876
|
if (expr.kind === "get" || expr.kind === "set") {
|
|
@@ -332703,7 +333065,7 @@ var require_escodegen = __commonJS({
|
|
|
332703
333065
|
for (i6 = 0, iz = expr.blocks.length; i6 < iz; ++i6) {
|
|
332704
333066
|
fragment = that.generateExpression(expr.blocks[i6], Precedence.Sequence, E_TTT);
|
|
332705
333067
|
if (i6 > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) {
|
|
332706
|
-
result2 =
|
|
333068
|
+
result2 = join53(result2, fragment);
|
|
332707
333069
|
} else {
|
|
332708
333070
|
result2.push(fragment);
|
|
332709
333071
|
}
|
|
@@ -332711,13 +333073,13 @@ var require_escodegen = __commonJS({
|
|
|
332711
333073
|
});
|
|
332712
333074
|
}
|
|
332713
333075
|
if (expr.filter) {
|
|
332714
|
-
result2 =
|
|
333076
|
+
result2 = join53(result2, "if" + space);
|
|
332715
333077
|
fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT);
|
|
332716
|
-
result2 =
|
|
333078
|
+
result2 = join53(result2, ["(", fragment, ")"]);
|
|
332717
333079
|
}
|
|
332718
333080
|
if (!extra.moz.comprehensionExpressionStartsWithAssignment) {
|
|
332719
333081
|
fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
|
|
332720
|
-
result2 =
|
|
333082
|
+
result2 = join53(result2, fragment);
|
|
332721
333083
|
}
|
|
332722
333084
|
result2.push(expr.type === Syntax.GeneratorExpression ? ")" : "]");
|
|
332723
333085
|
return result2;
|
|
@@ -332733,8 +333095,8 @@ var require_escodegen = __commonJS({
|
|
|
332733
333095
|
} else {
|
|
332734
333096
|
fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT);
|
|
332735
333097
|
}
|
|
332736
|
-
fragment =
|
|
332737
|
-
fragment =
|
|
333098
|
+
fragment = join53(fragment, expr.of ? "of" : "in");
|
|
333099
|
+
fragment = join53(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
|
|
332738
333100
|
return ["for" + space + "(", fragment, ")"];
|
|
332739
333101
|
}, "ComprehensionBlock"),
|
|
332740
333102
|
SpreadElement: /* @__PURE__ */ __name(function(expr, precedence, flags) {
|
|
@@ -339368,12 +339730,12 @@ function __metadata(metadataKey, metadataValue) {
|
|
|
339368
339730
|
}
|
|
339369
339731
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
339370
339732
|
function adopt(value2) {
|
|
339371
|
-
return value2 instanceof P ? value2 : new P(function(
|
|
339372
|
-
|
|
339733
|
+
return value2 instanceof P ? value2 : new P(function(resolve17) {
|
|
339734
|
+
resolve17(value2);
|
|
339373
339735
|
});
|
|
339374
339736
|
}
|
|
339375
339737
|
__name(adopt, "adopt");
|
|
339376
|
-
return new (P || (P = Promise))(function(
|
|
339738
|
+
return new (P || (P = Promise))(function(resolve17, reject) {
|
|
339377
339739
|
function fulfilled(value2) {
|
|
339378
339740
|
try {
|
|
339379
339741
|
step(generator.next(value2));
|
|
@@ -339391,7 +339753,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
339391
339753
|
}
|
|
339392
339754
|
__name(rejected, "rejected");
|
|
339393
339755
|
function step(result2) {
|
|
339394
|
-
result2.done ?
|
|
339756
|
+
result2.done ? resolve17(result2.value) : adopt(result2.value).then(fulfilled, rejected);
|
|
339395
339757
|
}
|
|
339396
339758
|
__name(step, "step");
|
|
339397
339759
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
@@ -339593,15 +339955,15 @@ function __asyncValues(o3) {
|
|
|
339593
339955
|
}, i6);
|
|
339594
339956
|
function verb(n3) {
|
|
339595
339957
|
i6[n3] = o3[n3] && function(v) {
|
|
339596
|
-
return new Promise(function(
|
|
339597
|
-
v = o3[n3](v), settle(
|
|
339958
|
+
return new Promise(function(resolve17, reject) {
|
|
339959
|
+
v = o3[n3](v), settle(resolve17, reject, v.done, v.value);
|
|
339598
339960
|
});
|
|
339599
339961
|
};
|
|
339600
339962
|
}
|
|
339601
339963
|
__name(verb, "verb");
|
|
339602
|
-
function settle(
|
|
339964
|
+
function settle(resolve17, reject, d6, v) {
|
|
339603
339965
|
Promise.resolve(v).then(function(v2) {
|
|
339604
|
-
|
|
339966
|
+
resolve17({ value: v2, done: d6 });
|
|
339605
339967
|
}, reject);
|
|
339606
339968
|
}
|
|
339607
339969
|
__name(settle, "settle");
|
|
@@ -339831,7 +340193,7 @@ var require_types2 = __commonJS({
|
|
|
339831
340193
|
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
339832
340194
|
var Op = Object.prototype;
|
|
339833
340195
|
var objToStr = Op.toString;
|
|
339834
|
-
var
|
|
340196
|
+
var hasOwn3 = Op.hasOwnProperty;
|
|
339835
340197
|
var BaseType = (
|
|
339836
340198
|
/** @class */
|
|
339837
340199
|
(function() {
|
|
@@ -339990,7 +340352,7 @@ var require_types2 = __commonJS({
|
|
|
339990
340352
|
if (this.finalized !== true || that.finalized !== true) {
|
|
339991
340353
|
throw new Error("");
|
|
339992
340354
|
}
|
|
339993
|
-
return
|
|
340355
|
+
return hasOwn3.call(that.allSupertypes, this.typeName);
|
|
339994
340356
|
} else {
|
|
339995
340357
|
throw new Error(that + " is not a Def");
|
|
339996
340358
|
}
|
|
@@ -340122,10 +340484,10 @@ var require_types2 = __commonJS({
|
|
|
340122
340484
|
// The Def object d returned from Type.def may be used to configure the
|
|
340123
340485
|
// type d.type by calling methods such as d.bases, d.build, and d.field.
|
|
340124
340486
|
def: /* @__PURE__ */ __name(function(typeName) {
|
|
340125
|
-
return
|
|
340487
|
+
return hasOwn3.call(defCache, typeName) ? defCache[typeName] : defCache[typeName] = new DefImpl(typeName);
|
|
340126
340488
|
}, "def"),
|
|
340127
340489
|
hasDef: /* @__PURE__ */ __name(function(typeName) {
|
|
340128
|
-
return
|
|
340490
|
+
return hasOwn3.call(defCache, typeName);
|
|
340129
340491
|
}, "hasDef")
|
|
340130
340492
|
};
|
|
340131
340493
|
var builtInCtorFns = [];
|
|
@@ -340169,7 +340531,7 @@ var require_types2 = __commonJS({
|
|
|
340169
340531
|
function defFromValue(value2) {
|
|
340170
340532
|
if (value2 && typeof value2 === "object") {
|
|
340171
340533
|
var type = value2.type;
|
|
340172
|
-
if (typeof type === "string" &&
|
|
340534
|
+
if (typeof type === "string" && hasOwn3.call(defCache, type)) {
|
|
340173
340535
|
var d6 = defCache[type];
|
|
340174
340536
|
if (d6.finalized) {
|
|
340175
340537
|
return d6;
|
|
@@ -340230,10 +340592,10 @@ var require_types2 = __commonJS({
|
|
|
340230
340592
|
});
|
|
340231
340593
|
this.buildable = true;
|
|
340232
340594
|
var addParam = /* @__PURE__ */ __name(function(built, param, arg, isArgAvailable) {
|
|
340233
|
-
if (
|
|
340595
|
+
if (hasOwn3.call(built, param))
|
|
340234
340596
|
return;
|
|
340235
340597
|
var all = _this.allFields;
|
|
340236
|
-
if (!
|
|
340598
|
+
if (!hasOwn3.call(all, param)) {
|
|
340237
340599
|
throw new Error("" + param);
|
|
340238
340600
|
}
|
|
340239
340601
|
var field = all[param];
|
|
@@ -340285,7 +340647,7 @@ var require_types2 = __commonJS({
|
|
|
340285
340647
|
}
|
|
340286
340648
|
var built = Object.create(nodePrototype);
|
|
340287
340649
|
Object.keys(_this.allFields).forEach(function(param) {
|
|
340288
|
-
if (
|
|
340650
|
+
if (hasOwn3.call(obj, param)) {
|
|
340289
340651
|
addParam(built, param, obj[param], true);
|
|
340290
340652
|
} else {
|
|
340291
340653
|
addParam(built, param, null, false);
|
|
@@ -340330,7 +340692,7 @@ var require_types2 = __commonJS({
|
|
|
340330
340692
|
allSupertypes[this.typeName] = this;
|
|
340331
340693
|
this.fieldNames.length = 0;
|
|
340332
340694
|
for (var fieldName in allFields) {
|
|
340333
|
-
if (
|
|
340695
|
+
if (hasOwn3.call(allFields, fieldName) && !allFields[fieldName].hidden) {
|
|
340334
340696
|
this.fieldNames.push(fieldName);
|
|
340335
340697
|
}
|
|
340336
340698
|
}
|
|
@@ -340349,7 +340711,7 @@ var require_types2 = __commonJS({
|
|
|
340349
340711
|
})(Def)
|
|
340350
340712
|
);
|
|
340351
340713
|
function getSupertypeNames(typeName) {
|
|
340352
|
-
if (!
|
|
340714
|
+
if (!hasOwn3.call(defCache, typeName)) {
|
|
340353
340715
|
throw new Error("");
|
|
340354
340716
|
}
|
|
340355
340717
|
var d6 = defCache[typeName];
|
|
@@ -340371,7 +340733,7 @@ var require_types2 = __commonJS({
|
|
|
340371
340733
|
}
|
|
340372
340734
|
for (var j6 = 0; j6 < d6.supertypeList.length; ++j6) {
|
|
340373
340735
|
var superTypeName = d6.supertypeList[j6];
|
|
340374
|
-
if (
|
|
340736
|
+
if (hasOwn3.call(candidates, superTypeName)) {
|
|
340375
340737
|
table3[typeName] = superTypeName;
|
|
340376
340738
|
break;
|
|
340377
340739
|
}
|
|
@@ -340486,14 +340848,14 @@ var require_types2 = __commonJS({
|
|
|
340486
340848
|
if (d6.finalized !== true) {
|
|
340487
340849
|
throw new Error("");
|
|
340488
340850
|
}
|
|
340489
|
-
if (
|
|
340851
|
+
if (hasOwn3.call(lastSeen, typeName)) {
|
|
340490
340852
|
delete list2[lastSeen[typeName]];
|
|
340491
340853
|
}
|
|
340492
340854
|
lastSeen[typeName] = pos2;
|
|
340493
340855
|
list2.push.apply(list2, d6.baseNames);
|
|
340494
340856
|
}
|
|
340495
340857
|
for (var to = 0, from = to, len = list2.length; from < len; ++from) {
|
|
340496
|
-
if (
|
|
340858
|
+
if (hasOwn3.call(list2, from)) {
|
|
340497
340859
|
list2[to++] = list2[from];
|
|
340498
340860
|
}
|
|
340499
340861
|
}
|
|
@@ -340543,7 +340905,7 @@ var require_path2 = __commonJS({
|
|
|
340543
340905
|
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
340544
340906
|
var types_1 = tslib_1.__importDefault(require_types2());
|
|
340545
340907
|
var Op = Object.prototype;
|
|
340546
|
-
var
|
|
340908
|
+
var hasOwn3 = Op.hasOwnProperty;
|
|
340547
340909
|
function pathPlugin(fork) {
|
|
340548
340910
|
var types2 = fork.use(types_1.default);
|
|
340549
340911
|
var isArray2 = types2.builtInTypes.array;
|
|
@@ -340574,7 +340936,7 @@ var require_path2 = __commonJS({
|
|
|
340574
340936
|
var cache6 = getChildCache(path54);
|
|
340575
340937
|
var actualChildValue = path54.getValueProperty(name);
|
|
340576
340938
|
var childPath = cache6[name];
|
|
340577
|
-
if (!
|
|
340939
|
+
if (!hasOwn3.call(cache6, name) || // Ensure consistency between cache and reality.
|
|
340578
340940
|
childPath.value !== actualChildValue) {
|
|
340579
340941
|
childPath = cache6[name] = new path54.constructor(actualChildValue, path54, name);
|
|
340580
340942
|
}
|
|
@@ -340601,13 +340963,13 @@ var require_path2 = __commonJS({
|
|
|
340601
340963
|
var len = this.value.length;
|
|
340602
340964
|
var i6 = 0;
|
|
340603
340965
|
for (var i6 = 0; i6 < len; ++i6) {
|
|
340604
|
-
if (
|
|
340966
|
+
if (hasOwn3.call(this.value, i6)) {
|
|
340605
340967
|
childPaths[i6] = this.get(i6);
|
|
340606
340968
|
}
|
|
340607
340969
|
}
|
|
340608
340970
|
context = context || this;
|
|
340609
340971
|
for (i6 = 0; i6 < len; ++i6) {
|
|
340610
|
-
if (
|
|
340972
|
+
if (hasOwn3.call(childPaths, i6)) {
|
|
340611
340973
|
callback.call(context, childPaths[i6]);
|
|
340612
340974
|
}
|
|
340613
340975
|
}
|
|
@@ -340656,7 +341018,7 @@ var require_path2 = __commonJS({
|
|
|
340656
341018
|
var moves = /* @__PURE__ */ Object.create(null);
|
|
340657
341019
|
var cache6 = getChildCache(path54);
|
|
340658
341020
|
for (var i6 = start; i6 < end2; ++i6) {
|
|
340659
|
-
if (
|
|
341021
|
+
if (hasOwn3.call(path54.value, i6)) {
|
|
340660
341022
|
var childPath = path54.get(i6);
|
|
340661
341023
|
if (childPath.name !== i6) {
|
|
340662
341024
|
throw new Error("");
|
|
@@ -340851,7 +341213,7 @@ var require_scope = __commonJS({
|
|
|
340851
341213
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
340852
341214
|
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
340853
341215
|
var types_1 = tslib_1.__importDefault(require_types2());
|
|
340854
|
-
var
|
|
341216
|
+
var hasOwn3 = Object.prototype.hasOwnProperty;
|
|
340855
341217
|
function scopePlugin(fork) {
|
|
340856
341218
|
var types2 = fork.use(types_1.default);
|
|
340857
341219
|
var Type = types2.Type;
|
|
@@ -340903,11 +341265,11 @@ var require_scope = __commonJS({
|
|
|
340903
341265
|
Sp.didScan = false;
|
|
340904
341266
|
Sp.declares = function(name) {
|
|
340905
341267
|
this.scan();
|
|
340906
|
-
return
|
|
341268
|
+
return hasOwn3.call(this.bindings, name);
|
|
340907
341269
|
};
|
|
340908
341270
|
Sp.declaresType = function(name) {
|
|
340909
341271
|
this.scan();
|
|
340910
|
-
return
|
|
341272
|
+
return hasOwn3.call(this.types, name);
|
|
340911
341273
|
};
|
|
340912
341274
|
Sp.declareTemporary = function(prefix) {
|
|
340913
341275
|
if (prefix) {
|
|
@@ -341026,7 +341388,7 @@ var require_scope = __commonJS({
|
|
|
341026
341388
|
if (namedTypes.CatchClause.check(node) && // TODO Broaden this to accept any pattern.
|
|
341027
341389
|
namedTypes.Identifier.check(node.param)) {
|
|
341028
341390
|
var catchParamName = node.param.name;
|
|
341029
|
-
var hadBinding =
|
|
341391
|
+
var hadBinding = hasOwn3.call(bindings, catchParamName);
|
|
341030
341392
|
recursiveScanScope(path54.get("body"), bindings, scopeTypes2);
|
|
341031
341393
|
if (!hadBinding) {
|
|
341032
341394
|
delete bindings[catchParamName];
|
|
@@ -341041,7 +341403,7 @@ var require_scope = __commonJS({
|
|
|
341041
341403
|
var pattern = patternPath.value;
|
|
341042
341404
|
namedTypes.Pattern.assert(pattern);
|
|
341043
341405
|
if (namedTypes.Identifier.check(pattern)) {
|
|
341044
|
-
if (
|
|
341406
|
+
if (hasOwn3.call(bindings, pattern.name)) {
|
|
341045
341407
|
bindings[pattern.name].push(patternPath);
|
|
341046
341408
|
} else {
|
|
341047
341409
|
bindings[pattern.name] = [patternPath];
|
|
@@ -341079,7 +341441,7 @@ var require_scope = __commonJS({
|
|
|
341079
341441
|
var pattern = patternPath.value;
|
|
341080
341442
|
namedTypes.Pattern.assert(pattern);
|
|
341081
341443
|
if (namedTypes.Identifier.check(pattern)) {
|
|
341082
|
-
if (
|
|
341444
|
+
if (hasOwn3.call(types3, pattern.name)) {
|
|
341083
341445
|
types3[pattern.name].push(patternPath);
|
|
341084
341446
|
} else {
|
|
341085
341447
|
types3[pattern.name] = [patternPath];
|
|
@@ -341483,7 +341845,7 @@ var require_path_visitor = __commonJS({
|
|
|
341483
341845
|
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
341484
341846
|
var types_1 = tslib_1.__importDefault(require_types2());
|
|
341485
341847
|
var node_path_1 = tslib_1.__importDefault(require_node_path());
|
|
341486
|
-
var
|
|
341848
|
+
var hasOwn3 = Object.prototype.hasOwnProperty;
|
|
341487
341849
|
function pathVisitorPlugin(fork) {
|
|
341488
341850
|
var types2 = fork.use(types_1.default);
|
|
341489
341851
|
var NodePath = fork.use(node_path_1.default);
|
|
@@ -341497,7 +341859,7 @@ var require_path_visitor = __commonJS({
|
|
|
341497
341859
|
}
|
|
341498
341860
|
this._reusableContextStack = [];
|
|
341499
341861
|
this._methodNameTable = computeMethodNameTable(this);
|
|
341500
|
-
this._shouldVisitComments =
|
|
341862
|
+
this._shouldVisitComments = hasOwn3.call(this._methodNameTable, "Block") || hasOwn3.call(this._methodNameTable, "Line");
|
|
341501
341863
|
this.Context = makeContextConstructor(this);
|
|
341502
341864
|
this._visiting = false;
|
|
341503
341865
|
this._changeReported = false;
|
|
@@ -341546,7 +341908,7 @@ var require_path_visitor = __commonJS({
|
|
|
341546
341908
|
}, "fromMethodsObject");
|
|
341547
341909
|
function extend(target, source) {
|
|
341548
341910
|
for (var property in source) {
|
|
341549
|
-
if (
|
|
341911
|
+
if (hasOwn3.call(source, property)) {
|
|
341550
341912
|
target[property] = source[property];
|
|
341551
341913
|
}
|
|
341552
341914
|
}
|
|
@@ -341638,7 +342000,7 @@ var require_path_visitor = __commonJS({
|
|
|
341638
342000
|
var childPaths = [];
|
|
341639
342001
|
for (var i6 = 0; i6 < childCount; ++i6) {
|
|
341640
342002
|
var childName = childNames[i6];
|
|
341641
|
-
if (!
|
|
342003
|
+
if (!hasOwn3.call(value2, childName)) {
|
|
341642
342004
|
value2[childName] = types2.getFieldValue(value2, childName);
|
|
341643
342005
|
}
|
|
341644
342006
|
childPaths.push(path54.get(childName));
|
|
@@ -341790,7 +342152,7 @@ var require_equiv = __commonJS({
|
|
|
341790
342152
|
var isObject3 = types2.builtInTypes.object;
|
|
341791
342153
|
var isDate = types2.builtInTypes.Date;
|
|
341792
342154
|
var isRegExp = types2.builtInTypes.RegExp;
|
|
341793
|
-
var
|
|
342155
|
+
var hasOwn3 = Object.prototype.hasOwnProperty;
|
|
341794
342156
|
function astNodesAreEquivalent(a6, b6, problemPath) {
|
|
341795
342157
|
if (isArray2.check(problemPath)) {
|
|
341796
342158
|
problemPath.length = 0;
|
|
@@ -341911,7 +342273,7 @@ var require_equiv = __commonJS({
|
|
|
341911
342273
|
}
|
|
341912
342274
|
for (i6 = 0; i6 < bNameCount; ++i6) {
|
|
341913
342275
|
name = bNames[i6];
|
|
341914
|
-
if (!
|
|
342276
|
+
if (!hasOwn3.call(seenNames, name)) {
|
|
341915
342277
|
problemPath.push(name);
|
|
341916
342278
|
return false;
|
|
341917
342279
|
}
|
|
@@ -343272,12 +343634,12 @@ var require_util4 = __commonJS({
|
|
|
343272
343634
|
exports2.isGMT = exports2.dnsLookup = void 0;
|
|
343273
343635
|
var dns_1 = require("dns");
|
|
343274
343636
|
function dnsLookup(host, opts) {
|
|
343275
|
-
return new Promise((
|
|
343637
|
+
return new Promise((resolve17, reject) => {
|
|
343276
343638
|
(0, dns_1.lookup)(host, opts, (err, res) => {
|
|
343277
343639
|
if (err) {
|
|
343278
343640
|
reject(err);
|
|
343279
343641
|
} else {
|
|
343280
|
-
|
|
343642
|
+
resolve17(res);
|
|
343281
343643
|
}
|
|
343282
343644
|
});
|
|
343283
343645
|
});
|
|
@@ -343905,10 +344267,10 @@ var require_myIpAddress = __commonJS({
|
|
|
343905
344267
|
var ip_1 = require_ip();
|
|
343906
344268
|
var net_1 = __importDefault2(require("net"));
|
|
343907
344269
|
async function myIpAddress() {
|
|
343908
|
-
return new Promise((
|
|
344270
|
+
return new Promise((resolve17, reject) => {
|
|
343909
344271
|
const socket = net_1.default.connect({ host: "8.8.8.8", port: 53 });
|
|
343910
344272
|
const onError = /* @__PURE__ */ __name(() => {
|
|
343911
|
-
|
|
344273
|
+
resolve17(ip_1.ip.address());
|
|
343912
344274
|
}, "onError");
|
|
343913
344275
|
socket.once("error", onError);
|
|
343914
344276
|
socket.once("connect", () => {
|
|
@@ -343916,9 +344278,9 @@ var require_myIpAddress = __commonJS({
|
|
|
343916
344278
|
const addr = socket.address();
|
|
343917
344279
|
socket.destroy();
|
|
343918
344280
|
if (typeof addr === "string") {
|
|
343919
|
-
|
|
344281
|
+
resolve17(addr);
|
|
343920
344282
|
} else if (addr.address) {
|
|
343921
|
-
|
|
344283
|
+
resolve17(addr.address);
|
|
343922
344284
|
} else {
|
|
343923
344285
|
reject(new Error("Expected a `string`"));
|
|
343924
344286
|
}
|
|
@@ -344557,8 +344919,8 @@ var require_deferred_promise = __commonJS({
|
|
|
344557
344919
|
this.context = args.context;
|
|
344558
344920
|
this.owner = args.context.runtime;
|
|
344559
344921
|
this.handle = args.promiseHandle;
|
|
344560
|
-
this.settled = new Promise((
|
|
344561
|
-
this.onSettled =
|
|
344922
|
+
this.settled = new Promise((resolve17) => {
|
|
344923
|
+
this.onSettled = resolve17;
|
|
344562
344924
|
});
|
|
344563
344925
|
this.resolveHandle = args.resolveHandle;
|
|
344564
344926
|
this.rejectHandle = args.rejectHandle;
|
|
@@ -345091,13 +345453,13 @@ var require_context = __commonJS({
|
|
|
345091
345453
|
if (vmResolveResult.error) {
|
|
345092
345454
|
return Promise.resolve(vmResolveResult);
|
|
345093
345455
|
}
|
|
345094
|
-
return new Promise((
|
|
345456
|
+
return new Promise((resolve17) => {
|
|
345095
345457
|
lifetime_1.Scope.withScope((scope) => {
|
|
345096
345458
|
const resolveHandle = scope.manage(this.newFunction("resolve", (value2) => {
|
|
345097
|
-
|
|
345459
|
+
resolve17({ value: value2 && value2.dup() });
|
|
345098
345460
|
}));
|
|
345099
345461
|
const rejectHandle = scope.manage(this.newFunction("reject", (error3) => {
|
|
345100
|
-
|
|
345462
|
+
resolve17({ error: error3 && error3.dup() });
|
|
345101
345463
|
}));
|
|
345102
345464
|
const promiseHandle = scope.manage(vmResolveResult.value);
|
|
345103
345465
|
const promiseThenHandle = scope.manage(this.getProp(promiseHandle, "then"));
|
|
@@ -347217,7 +347579,7 @@ var require_parse_proxy_response2 = __commonJS({
|
|
|
347217
347579
|
var debug_1 = __importDefault2(require_src2());
|
|
347218
347580
|
var debug2 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
|
|
347219
347581
|
function parseProxyResponse(socket) {
|
|
347220
|
-
return new Promise((
|
|
347582
|
+
return new Promise((resolve17, reject) => {
|
|
347221
347583
|
let buffersLength = 0;
|
|
347222
347584
|
const buffers = [];
|
|
347223
347585
|
function read() {
|
|
@@ -347287,7 +347649,7 @@ var require_parse_proxy_response2 = __commonJS({
|
|
|
347287
347649
|
}
|
|
347288
347650
|
debug2("got proxy server response: %o %o", firstLine, headers);
|
|
347289
347651
|
cleanup();
|
|
347290
|
-
|
|
347652
|
+
resolve17({
|
|
347291
347653
|
connect: {
|
|
347292
347654
|
statusCode,
|
|
347293
347655
|
statusText,
|
|
@@ -347935,19 +348297,19 @@ async function listContext(ioHelper, context, sourceFiles) {
|
|
|
347935
348297
|
await ioHelper.defaults.info("SSM parameters, and so on.");
|
|
347936
348298
|
return;
|
|
347937
348299
|
}
|
|
347938
|
-
const data_out = [[
|
|
348300
|
+
const data_out = [[import_chalk39.default.green("#"), import_chalk39.default.green("Key"), import_chalk39.default.green("Value")]];
|
|
347939
348301
|
for (const [i6, key] of keys) {
|
|
347940
348302
|
const jsonWithoutNewlines = JSON.stringify(context.all[key], void 0, 2).replace(/\s+/g, " ");
|
|
347941
348303
|
data_out.push([i6, key, jsonWithoutNewlines]);
|
|
347942
348304
|
}
|
|
347943
348305
|
if (sourceFiles.length > 0) {
|
|
347944
|
-
await ioHelper.defaults.info("Context found in %s:", sourceFiles.map((f6) =>
|
|
348306
|
+
await ioHelper.defaults.info("Context found in %s:", sourceFiles.map((f6) => import_chalk39.default.blue(f6)).join(", "));
|
|
347945
348307
|
} else {
|
|
347946
348308
|
await ioHelper.defaults.info("Context found:");
|
|
347947
348309
|
}
|
|
347948
348310
|
await ioHelper.defaults.info("");
|
|
347949
348311
|
await ioHelper.defaults.info(renderTable(data_out, process.stdout.columns));
|
|
347950
|
-
await ioHelper.defaults.info(`Run ${
|
|
348312
|
+
await ioHelper.defaults.info(`Run ${import_chalk39.default.blue("cdk context --reset KEY_OR_NUMBER")} to remove a context key. It will be refreshed on the next CDK synthesis run.`);
|
|
347951
348313
|
}
|
|
347952
348314
|
async function invalidateContext(ioHelper, context, key, force) {
|
|
347953
348315
|
const i6 = parseInt(key, 10);
|
|
@@ -347957,10 +348319,10 @@ async function invalidateContext(ioHelper, context, key, force) {
|
|
|
347957
348319
|
if (context.has(key)) {
|
|
347958
348320
|
context.unset(key);
|
|
347959
348321
|
if (!context.has(key)) {
|
|
347960
|
-
await ioHelper.defaults.info("Context value %s reset. It will be refreshed on next synthesis",
|
|
348322
|
+
await ioHelper.defaults.info("Context value %s reset. It will be refreshed on next synthesis", import_chalk39.default.blue(key));
|
|
347961
348323
|
return;
|
|
347962
348324
|
}
|
|
347963
|
-
await ioHelper.defaults.error("Only context values specified in %s can be reset through the CLI",
|
|
348325
|
+
await ioHelper.defaults.error("Only context values specified in %s can be reset through the CLI", import_chalk39.default.blue(PROJECT_CONTEXT));
|
|
347964
348326
|
if (!force) {
|
|
347965
348327
|
throw new import_toolkit_lib21.ToolkitError("ReadonlyContextKey", `Cannot reset readonly context value with key: ${key}`);
|
|
347966
348328
|
}
|
|
@@ -347996,7 +348358,7 @@ async function printReadonly(ioHelper, readonly) {
|
|
|
347996
348358
|
await ioHelper.defaults.info(" %s", match);
|
|
347997
348359
|
}
|
|
347998
348360
|
await ioHelper.defaults.info("");
|
|
347999
|
-
await ioHelper.defaults.info("This usually means they are configured in %s or %s",
|
|
348361
|
+
await ioHelper.defaults.info("This usually means they are configured in %s or %s", import_chalk39.default.blue(PROJECT_CONFIG), import_chalk39.default.blue(USER_DEFAULTS));
|
|
348000
348362
|
}
|
|
348001
348363
|
function keysByExpression(context, expression) {
|
|
348002
348364
|
const matchesExpression = picomatch4(expression);
|
|
@@ -348034,12 +348396,12 @@ function enumerate1(xs) {
|
|
|
348034
348396
|
}
|
|
348035
348397
|
return ret;
|
|
348036
348398
|
}
|
|
348037
|
-
var import_toolkit_lib21,
|
|
348399
|
+
var import_toolkit_lib21, import_chalk39, picomatch4;
|
|
348038
348400
|
var init_context5 = __esm({
|
|
348039
348401
|
"lib/commands/context.ts"() {
|
|
348040
348402
|
"use strict";
|
|
348041
348403
|
import_toolkit_lib21 = __toESM(require_lib12());
|
|
348042
|
-
|
|
348404
|
+
import_chalk39 = __toESM(require_source());
|
|
348043
348405
|
init_tables();
|
|
348044
348406
|
init_user_configuration();
|
|
348045
348407
|
picomatch4 = require_picomatch6();
|
|
@@ -348060,9 +348422,9 @@ var init_context5 = __esm({
|
|
|
348060
348422
|
async function docs(options) {
|
|
348061
348423
|
const ioHelper = options.ioHelper;
|
|
348062
348424
|
const url = "https://docs.aws.amazon.com/cdk/api/v2/";
|
|
348063
|
-
await ioHelper.defaults.info(
|
|
348425
|
+
await ioHelper.defaults.info(import_chalk40.default.green(url));
|
|
348064
348426
|
const browserCommand = options.browser.replace(/%u/g, url);
|
|
348065
|
-
await ioHelper.defaults.debug(`Opening documentation ${
|
|
348427
|
+
await ioHelper.defaults.debug(`Opening documentation ${import_chalk40.default.green(browserCommand)}`);
|
|
348066
348428
|
try {
|
|
348067
348429
|
const { stdout: stdout2, stderr } = await (0, tools_exports3.runUserCommandLine)(browserCommand);
|
|
348068
348430
|
if (stdout2) {
|
|
@@ -348077,11 +348439,11 @@ async function docs(options) {
|
|
|
348077
348439
|
}
|
|
348078
348440
|
return 0;
|
|
348079
348441
|
}
|
|
348080
|
-
var
|
|
348442
|
+
var import_chalk40;
|
|
348081
348443
|
var init_docs = __esm({
|
|
348082
348444
|
"lib/commands/docs.ts"() {
|
|
348083
348445
|
"use strict";
|
|
348084
|
-
|
|
348446
|
+
import_chalk40 = __toESM(require_source());
|
|
348085
348447
|
init_tools3();
|
|
348086
348448
|
__name(docs, "docs");
|
|
348087
348449
|
}
|
|
@@ -348109,13 +348471,13 @@ async function displayCliConfiguration(ioHelper, settings) {
|
|
|
348109
348471
|
debug2.push("CLI");
|
|
348110
348472
|
}
|
|
348111
348473
|
const debugging = debug2.length ? `debugging ${debug2.join(" & ")}` : "no debugging";
|
|
348112
|
-
await ioHelper.defaults.info(
|
|
348474
|
+
await ioHelper.defaults.info(import_chalk41.default.gray.italic(
|
|
348113
348475
|
`${verbose}, ${debugging}`
|
|
348114
348476
|
));
|
|
348115
348477
|
return true;
|
|
348116
348478
|
}
|
|
348117
348479
|
async function displayVersionInformation(ioHelper) {
|
|
348118
|
-
await ioHelper.defaults.info(`\u2139\uFE0F CDK CLI Version: ${
|
|
348480
|
+
await ioHelper.defaults.info(`\u2139\uFE0F CDK CLI Version: ${import_chalk41.default.green(versionWithBuild())}`);
|
|
348119
348481
|
return true;
|
|
348120
348482
|
}
|
|
348121
348483
|
async function displayAwsEnvironmentVariables(ioHelper) {
|
|
@@ -348126,7 +348488,7 @@ async function displayAwsEnvironmentVariables(ioHelper) {
|
|
|
348126
348488
|
}
|
|
348127
348489
|
await ioHelper.defaults.info("\u2139\uFE0F AWS environment variables:");
|
|
348128
348490
|
for (const key of keys) {
|
|
348129
|
-
await ioHelper.defaults.info(` - ${
|
|
348491
|
+
await ioHelper.defaults.info(` - ${import_chalk41.default.blue(key)} = ${import_chalk41.default.green(anonymizeAwsVariable(key, process2.env[key]))}`);
|
|
348130
348492
|
}
|
|
348131
348493
|
return true;
|
|
348132
348494
|
}
|
|
@@ -348140,10 +348502,10 @@ async function displayCdkEnvironmentVariables(ioHelper) {
|
|
|
348140
348502
|
let healthy = true;
|
|
348141
348503
|
for (const key of keys.sort()) {
|
|
348142
348504
|
if (key === cxapi14.CONTEXT_ENV || key === cxapi14.CONTEXT_OVERFLOW_LOCATION_ENV || key === cxapi14.OUTDIR_ENV) {
|
|
348143
|
-
await ioHelper.defaults.info(` - ${
|
|
348505
|
+
await ioHelper.defaults.info(` - ${import_chalk41.default.red(key)} = ${import_chalk41.default.green(process2.env[key])} (\u26A0\uFE0F reserved for use by the CDK toolkit)`);
|
|
348144
348506
|
healthy = false;
|
|
348145
348507
|
} else {
|
|
348146
|
-
await ioHelper.defaults.info(` - ${
|
|
348508
|
+
await ioHelper.defaults.info(` - ${import_chalk41.default.blue(key)} = ${import_chalk41.default.green(process2.env[key])}`);
|
|
348147
348509
|
}
|
|
348148
348510
|
}
|
|
348149
348511
|
return healthy;
|
|
@@ -348157,13 +348519,13 @@ function anonymizeAwsVariable(name, value2) {
|
|
|
348157
348519
|
}
|
|
348158
348520
|
return value2;
|
|
348159
348521
|
}
|
|
348160
|
-
var process2, cxapi14,
|
|
348522
|
+
var process2, cxapi14, import_chalk41, verifications;
|
|
348161
348523
|
var init_doctor = __esm({
|
|
348162
348524
|
"lib/commands/doctor.ts"() {
|
|
348163
348525
|
"use strict";
|
|
348164
348526
|
process2 = __toESM(require("process"));
|
|
348165
348527
|
cxapi14 = __toESM(require_lib11());
|
|
348166
|
-
|
|
348528
|
+
import_chalk41 = __toESM(require_source());
|
|
348167
348529
|
init_display_version();
|
|
348168
348530
|
init_version();
|
|
348169
348531
|
__name(doctor, "doctor");
|
|
@@ -349594,8 +349956,8 @@ var require_prompt2 = __commonJS({
|
|
|
349594
349956
|
throw new Error("expected prompt to have a custom render method");
|
|
349595
349957
|
}
|
|
349596
349958
|
run() {
|
|
349597
|
-
return new Promise(async (
|
|
349598
|
-
this.once("submit",
|
|
349959
|
+
return new Promise(async (resolve17, reject) => {
|
|
349960
|
+
this.once("submit", resolve17);
|
|
349599
349961
|
this.once("cancel", reject);
|
|
349600
349962
|
if (await this.skip()) {
|
|
349601
349963
|
this.render = () => {
|
|
@@ -350121,14 +350483,14 @@ var require_array3 = __commonJS({
|
|
|
350121
350483
|
return this.render();
|
|
350122
350484
|
}, "number");
|
|
350123
350485
|
clearTimeout(this.numberTimeout);
|
|
350124
|
-
return new Promise((
|
|
350486
|
+
return new Promise((resolve17) => {
|
|
350125
350487
|
let len = this.choices.length;
|
|
350126
350488
|
let num = this.num;
|
|
350127
350489
|
let handle = /* @__PURE__ */ __name((val = false, res) => {
|
|
350128
350490
|
clearTimeout(this.numberTimeout);
|
|
350129
350491
|
if (val) res = number(num);
|
|
350130
350492
|
this.num = "";
|
|
350131
|
-
|
|
350493
|
+
resolve17(res);
|
|
350132
350494
|
}, "handle");
|
|
350133
350495
|
if (num === "0" || num.length === 1 && Number(num + "0") > len) {
|
|
350134
350496
|
return handle(true);
|
|
@@ -353329,7 +353691,7 @@ function normalizePath2(url, type) {
|
|
|
353329
353691
|
}
|
|
353330
353692
|
url.path = path54;
|
|
353331
353693
|
}
|
|
353332
|
-
function
|
|
353694
|
+
function resolve14(input, base) {
|
|
353333
353695
|
if (!input && !base)
|
|
353334
353696
|
return "";
|
|
353335
353697
|
const url = parseUrl2(input);
|
|
@@ -353400,7 +353762,7 @@ var init_resolve_uri = __esm({
|
|
|
353400
353762
|
__name(stripPathFilename, "stripPathFilename");
|
|
353401
353763
|
__name(mergePaths, "mergePaths");
|
|
353402
353764
|
__name(normalizePath2, "normalizePath");
|
|
353403
|
-
__name(
|
|
353765
|
+
__name(resolve14, "resolve");
|
|
353404
353766
|
}
|
|
353405
353767
|
});
|
|
353406
353768
|
|
|
@@ -353413,7 +353775,7 @@ function stripFilename(path54) {
|
|
|
353413
353775
|
function resolver(mapUrl, sourceRoot) {
|
|
353414
353776
|
const from = stripFilename(mapUrl);
|
|
353415
353777
|
const prefix = sourceRoot ? sourceRoot + "/" : "";
|
|
353416
|
-
return (source) =>
|
|
353778
|
+
return (source) => resolve14(prefix + (source || ""), from);
|
|
353417
353779
|
}
|
|
353418
353780
|
function maybeSort(mappings, owned) {
|
|
353419
353781
|
const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
|
|
@@ -353591,8 +353953,8 @@ var init_trace_mapping = __esm({
|
|
|
353591
353953
|
this.sources = sources;
|
|
353592
353954
|
this.sourcesContent = sourcesContent;
|
|
353593
353955
|
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
|
|
353594
|
-
const
|
|
353595
|
-
this.resolvedSources = sources.map(
|
|
353956
|
+
const resolve17 = resolver(mapUrl, sourceRoot);
|
|
353957
|
+
this.resolvedSources = sources.map(resolve17);
|
|
353596
353958
|
const { mappings } = parsed;
|
|
353597
353959
|
if (typeof mappings === "string") {
|
|
353598
353960
|
this._encoded = mappings;
|
|
@@ -353963,15 +354325,15 @@ __export(assembly_reader_exports, {
|
|
|
353963
354325
|
readAssembly: () => readAssembly
|
|
353964
354326
|
});
|
|
353965
354327
|
async function readAssembly(assemblyDir) {
|
|
353966
|
-
const manifestPath = path49.join(assemblyDir,
|
|
354328
|
+
const manifestPath = path49.join(assemblyDir, import_cloud_assembly_api16.MANIFEST_FILE);
|
|
353967
354329
|
if (!fs54.existsSync(manifestPath)) {
|
|
353968
354330
|
return { status: "not-found" };
|
|
353969
354331
|
}
|
|
353970
354332
|
try {
|
|
353971
|
-
const assembly = new
|
|
354333
|
+
const assembly = new import_cloud_assembly_api16.CloudAssembly(assemblyDir);
|
|
353972
354334
|
const projectRoot = path49.dirname(assemblyDir);
|
|
353973
354335
|
const sourceResolver = new SourceMapResolver(projectRoot);
|
|
353974
|
-
const tree = await (0,
|
|
354336
|
+
const tree = await (0, import_cloud_assembly_api16.buildConstructTreeAsync)(assembly, async (fields, stack, constructPath) => ({
|
|
353975
354337
|
...fields,
|
|
353976
354338
|
// templateFile comes from the manifest / a nested stack's aws:asset:path,
|
|
353977
354339
|
// both attacker-influenceable if cdk.out is tampered with. Drop any that
|
|
@@ -354000,13 +354362,13 @@ function loadViolations(assemblyDir) {
|
|
|
354000
354362
|
if (!fs54.existsSync(reportPath)) return void 0;
|
|
354001
354363
|
return JSON.parse(fs54.readFileSync(reportPath, "utf-8"));
|
|
354002
354364
|
}
|
|
354003
|
-
var fs54, path49,
|
|
354365
|
+
var fs54, path49, import_cloud_assembly_api16, import_cloud_assembly_schema10;
|
|
354004
354366
|
var init_assembly_reader = __esm({
|
|
354005
354367
|
"../@aws-cdk/cdk-explorer/lib/core/assembly-reader.ts"() {
|
|
354006
354368
|
"use strict";
|
|
354007
354369
|
fs54 = __toESM(require("fs"));
|
|
354008
354370
|
path49 = __toESM(require("path"));
|
|
354009
|
-
|
|
354371
|
+
import_cloud_assembly_api16 = __toESM(require_lib3());
|
|
354010
354372
|
import_cloud_assembly_schema10 = __toESM(require_lib2());
|
|
354011
354373
|
init_api_private2();
|
|
354012
354374
|
init_source_resolver();
|
|
@@ -355175,8 +355537,8 @@ var require_semaphore = __commonJS({
|
|
|
355175
355537
|
this._waiting = [];
|
|
355176
355538
|
}
|
|
355177
355539
|
lock(thunk) {
|
|
355178
|
-
return new Promise((
|
|
355179
|
-
this._waiting.push({ thunk, resolve:
|
|
355540
|
+
return new Promise((resolve17, reject) => {
|
|
355541
|
+
this._waiting.push({ thunk, resolve: resolve17, reject });
|
|
355180
355542
|
this.runNext();
|
|
355181
355543
|
});
|
|
355182
355544
|
}
|
|
@@ -356741,9 +357103,9 @@ ${JSON.stringify(message2, null, 4)}`);
|
|
|
356741
357103
|
if (typeof cancellationStrategy.sender.enableCancellation === "function") {
|
|
356742
357104
|
cancellationStrategy.sender.enableCancellation(requestMessage);
|
|
356743
357105
|
}
|
|
356744
|
-
return new Promise(async (
|
|
357106
|
+
return new Promise(async (resolve17, reject) => {
|
|
356745
357107
|
const resolveWithCleanup = /* @__PURE__ */ __name((r6) => {
|
|
356746
|
-
|
|
357108
|
+
resolve17(r6);
|
|
356747
357109
|
cancellationStrategy.sender.cleanup(id);
|
|
356748
357110
|
disposable?.dispose();
|
|
356749
357111
|
}, "resolveWithCleanup");
|
|
@@ -357165,10 +357527,10 @@ var require_ril = __commonJS({
|
|
|
357165
357527
|
return api_1.Disposable.create(() => this.stream.off("end", listener));
|
|
357166
357528
|
}
|
|
357167
357529
|
write(data, encoding) {
|
|
357168
|
-
return new Promise((
|
|
357530
|
+
return new Promise((resolve17, reject) => {
|
|
357169
357531
|
const callback = /* @__PURE__ */ __name((error3) => {
|
|
357170
357532
|
if (error3 === void 0 || error3 === null) {
|
|
357171
|
-
|
|
357533
|
+
resolve17();
|
|
357172
357534
|
} else {
|
|
357173
357535
|
reject(error3);
|
|
357174
357536
|
}
|
|
@@ -357447,10 +357809,10 @@ var require_main2 = __commonJS({
|
|
|
357447
357809
|
exports2.generateRandomPipeName = generateRandomPipeName;
|
|
357448
357810
|
function createClientPipeTransport(pipeName, encoding = "utf-8") {
|
|
357449
357811
|
let connectResolve;
|
|
357450
|
-
const connected = new Promise((
|
|
357451
|
-
connectResolve =
|
|
357812
|
+
const connected = new Promise((resolve17, _reject) => {
|
|
357813
|
+
connectResolve = resolve17;
|
|
357452
357814
|
});
|
|
357453
|
-
return new Promise((
|
|
357815
|
+
return new Promise((resolve17, reject) => {
|
|
357454
357816
|
let server = (0, net_1.createServer)((socket) => {
|
|
357455
357817
|
server.close();
|
|
357456
357818
|
connectResolve([
|
|
@@ -357461,7 +357823,7 @@ var require_main2 = __commonJS({
|
|
|
357461
357823
|
server.on("error", reject);
|
|
357462
357824
|
server.listen(pipeName, () => {
|
|
357463
357825
|
server.removeListener("error", reject);
|
|
357464
|
-
|
|
357826
|
+
resolve17({
|
|
357465
357827
|
onConnected: /* @__PURE__ */ __name(() => {
|
|
357466
357828
|
return connected;
|
|
357467
357829
|
}, "onConnected")
|
|
@@ -357482,10 +357844,10 @@ var require_main2 = __commonJS({
|
|
|
357482
357844
|
exports2.createServerPipeTransport = createServerPipeTransport;
|
|
357483
357845
|
function createClientSocketTransport(port, encoding = "utf-8") {
|
|
357484
357846
|
let connectResolve;
|
|
357485
|
-
const connected = new Promise((
|
|
357486
|
-
connectResolve =
|
|
357847
|
+
const connected = new Promise((resolve17, _reject) => {
|
|
357848
|
+
connectResolve = resolve17;
|
|
357487
357849
|
});
|
|
357488
|
-
return new Promise((
|
|
357850
|
+
return new Promise((resolve17, reject) => {
|
|
357489
357851
|
const server = (0, net_1.createServer)((socket) => {
|
|
357490
357852
|
server.close();
|
|
357491
357853
|
connectResolve([
|
|
@@ -357496,7 +357858,7 @@ var require_main2 = __commonJS({
|
|
|
357496
357858
|
server.on("error", reject);
|
|
357497
357859
|
server.listen(port, "127.0.0.1", () => {
|
|
357498
357860
|
server.removeListener("error", reject);
|
|
357499
|
-
|
|
357861
|
+
resolve17({
|
|
357500
357862
|
onConnected: /* @__PURE__ */ __name(() => {
|
|
357501
357863
|
return connected;
|
|
357502
357864
|
}, "onConnected")
|
|
@@ -358726,8 +359088,8 @@ var require_semaphore2 = __commonJS({
|
|
|
358726
359088
|
this._waiting = [];
|
|
358727
359089
|
}
|
|
358728
359090
|
lock(thunk) {
|
|
358729
|
-
return new Promise((
|
|
358730
|
-
this._waiting.push({ thunk, resolve:
|
|
359091
|
+
return new Promise((resolve17, reject) => {
|
|
359092
|
+
this._waiting.push({ thunk, resolve: resolve17, reject });
|
|
358731
359093
|
this.runNext();
|
|
358732
359094
|
});
|
|
358733
359095
|
}
|
|
@@ -360292,9 +360654,9 @@ ${JSON.stringify(message2, null, 4)}`);
|
|
|
360292
360654
|
if (typeof cancellationStrategy.sender.enableCancellation === "function") {
|
|
360293
360655
|
cancellationStrategy.sender.enableCancellation(requestMessage);
|
|
360294
360656
|
}
|
|
360295
|
-
return new Promise(async (
|
|
360657
|
+
return new Promise(async (resolve17, reject) => {
|
|
360296
360658
|
const resolveWithCleanup = /* @__PURE__ */ __name((r6) => {
|
|
360297
|
-
|
|
360659
|
+
resolve17(r6);
|
|
360298
360660
|
cancellationStrategy.sender.cleanup(id);
|
|
360299
360661
|
disposable?.dispose();
|
|
360300
360662
|
}, "resolveWithCleanup");
|
|
@@ -360715,10 +361077,10 @@ var require_ril2 = __commonJS({
|
|
|
360715
361077
|
return api_1.Disposable.create(() => this.stream.off("end", listener));
|
|
360716
361078
|
}
|
|
360717
361079
|
write(data, encoding) {
|
|
360718
|
-
return new Promise((
|
|
361080
|
+
return new Promise((resolve17, reject) => {
|
|
360719
361081
|
const callback = /* @__PURE__ */ __name((error3) => {
|
|
360720
361082
|
if (error3 === void 0 || error3 === null) {
|
|
360721
|
-
|
|
361083
|
+
resolve17();
|
|
360722
361084
|
} else {
|
|
360723
361085
|
reject(error3);
|
|
360724
361086
|
}
|
|
@@ -360997,10 +361359,10 @@ var require_main3 = __commonJS({
|
|
|
360997
361359
|
exports2.generateRandomPipeName = generateRandomPipeName;
|
|
360998
361360
|
function createClientPipeTransport(pipeName, encoding = "utf-8") {
|
|
360999
361361
|
let connectResolve;
|
|
361000
|
-
const connected = new Promise((
|
|
361001
|
-
connectResolve =
|
|
361362
|
+
const connected = new Promise((resolve17, _reject) => {
|
|
361363
|
+
connectResolve = resolve17;
|
|
361002
361364
|
});
|
|
361003
|
-
return new Promise((
|
|
361365
|
+
return new Promise((resolve17, reject) => {
|
|
361004
361366
|
let server = (0, net_1.createServer)((socket) => {
|
|
361005
361367
|
server.close();
|
|
361006
361368
|
connectResolve([
|
|
@@ -361011,7 +361373,7 @@ var require_main3 = __commonJS({
|
|
|
361011
361373
|
server.on("error", reject);
|
|
361012
361374
|
server.listen(pipeName, () => {
|
|
361013
361375
|
server.removeListener("error", reject);
|
|
361014
|
-
|
|
361376
|
+
resolve17({
|
|
361015
361377
|
onConnected: /* @__PURE__ */ __name(() => {
|
|
361016
361378
|
return connected;
|
|
361017
361379
|
}, "onConnected")
|
|
@@ -361032,10 +361394,10 @@ var require_main3 = __commonJS({
|
|
|
361032
361394
|
exports2.createServerPipeTransport = createServerPipeTransport;
|
|
361033
361395
|
function createClientSocketTransport(port, encoding = "utf-8") {
|
|
361034
361396
|
let connectResolve;
|
|
361035
|
-
const connected = new Promise((
|
|
361036
|
-
connectResolve =
|
|
361397
|
+
const connected = new Promise((resolve17, _reject) => {
|
|
361398
|
+
connectResolve = resolve17;
|
|
361037
361399
|
});
|
|
361038
|
-
return new Promise((
|
|
361400
|
+
return new Promise((resolve17, reject) => {
|
|
361039
361401
|
const server = (0, net_1.createServer)((socket) => {
|
|
361040
361402
|
server.close();
|
|
361041
361403
|
connectResolve([
|
|
@@ -361046,7 +361408,7 @@ var require_main3 = __commonJS({
|
|
|
361046
361408
|
server.on("error", reject);
|
|
361047
361409
|
server.listen(port, "127.0.0.1", () => {
|
|
361048
361410
|
server.removeListener("error", reject);
|
|
361049
|
-
|
|
361411
|
+
resolve17({
|
|
361050
361412
|
onConnected: /* @__PURE__ */ __name(() => {
|
|
361051
361413
|
return connected;
|
|
361052
361414
|
}, "onConnected")
|
|
@@ -366100,8 +366462,8 @@ var require_server = __commonJS({
|
|
|
366100
366462
|
if (value2 instanceof Promise) {
|
|
366101
366463
|
return value2;
|
|
366102
366464
|
} else if (Is.thenable(value2)) {
|
|
366103
|
-
return new Promise((
|
|
366104
|
-
value2.then((resolved) =>
|
|
366465
|
+
return new Promise((resolve17, reject) => {
|
|
366466
|
+
value2.then((resolved) => resolve17(resolved), (error3) => reject(error3));
|
|
366105
366467
|
});
|
|
366106
366468
|
} else {
|
|
366107
366469
|
return Promise.resolve(value2);
|
|
@@ -366375,7 +366737,7 @@ var require_files = __commonJS({
|
|
|
366375
366737
|
return process.platform === "win32";
|
|
366376
366738
|
}
|
|
366377
366739
|
__name(isWindows2, "isWindows");
|
|
366378
|
-
function
|
|
366740
|
+
function resolve17(moduleName, nodePath, cwd, tracer) {
|
|
366379
366741
|
const nodePathKey = "NODE_PATH";
|
|
366380
366742
|
const app = [
|
|
366381
366743
|
"var p = process;",
|
|
@@ -366394,7 +366756,7 @@ var require_files = __commonJS({
|
|
|
366394
366756
|
"}",
|
|
366395
366757
|
"});"
|
|
366396
366758
|
].join("");
|
|
366397
|
-
return new Promise((
|
|
366759
|
+
return new Promise((resolve18, reject) => {
|
|
366398
366760
|
let env3 = process.env;
|
|
366399
366761
|
let newEnv = /* @__PURE__ */ Object.create(null);
|
|
366400
366762
|
Object.keys(env3).forEach((key) => newEnv[key] = env3[key]);
|
|
@@ -366426,7 +366788,7 @@ var require_files = __commonJS({
|
|
|
366426
366788
|
if (message3.c === "r") {
|
|
366427
366789
|
cp.send({ c: "e" });
|
|
366428
366790
|
if (message3.s) {
|
|
366429
|
-
|
|
366791
|
+
resolve18(message3.r);
|
|
366430
366792
|
} else {
|
|
366431
366793
|
reject(new Error(`Failed to resolve module: ${moduleName}`));
|
|
366432
366794
|
}
|
|
@@ -366442,8 +366804,8 @@ var require_files = __commonJS({
|
|
|
366442
366804
|
}
|
|
366443
366805
|
});
|
|
366444
366806
|
}
|
|
366445
|
-
__name(
|
|
366446
|
-
exports2.resolve =
|
|
366807
|
+
__name(resolve17, "resolve");
|
|
366808
|
+
exports2.resolve = resolve17;
|
|
366447
366809
|
function resolveGlobalNodePath(tracer) {
|
|
366448
366810
|
let npmCommand = "npm";
|
|
366449
366811
|
const env3 = /* @__PURE__ */ Object.create(null);
|
|
@@ -366562,17 +366924,17 @@ var require_files = __commonJS({
|
|
|
366562
366924
|
if (!path54.isAbsolute(nodePath)) {
|
|
366563
366925
|
nodePath = path54.join(workspaceRoot, nodePath);
|
|
366564
366926
|
}
|
|
366565
|
-
return
|
|
366927
|
+
return resolve17(moduleName, nodePath, nodePath, tracer).then((value2) => {
|
|
366566
366928
|
if (FileSystem.isParent(nodePath, value2)) {
|
|
366567
366929
|
return value2;
|
|
366568
366930
|
} else {
|
|
366569
366931
|
return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
|
|
366570
366932
|
}
|
|
366571
366933
|
}).then(void 0, (_error) => {
|
|
366572
|
-
return
|
|
366934
|
+
return resolve17(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
|
|
366573
366935
|
});
|
|
366574
366936
|
} else {
|
|
366575
|
-
return
|
|
366937
|
+
return resolve17(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
|
|
366576
366938
|
}
|
|
366577
366939
|
}
|
|
366578
366940
|
__name(resolveModulePath, "resolveModulePath");
|
|
@@ -367274,7 +367636,7 @@ async function resourceTarget(node) {
|
|
|
367274
367636
|
} catch {
|
|
367275
367637
|
return void 0;
|
|
367276
367638
|
}
|
|
367277
|
-
const block = (0,
|
|
367639
|
+
const block = (0, import_cloud_assembly_api17.resolveResourceRange)(templateText, node.logicalId);
|
|
367278
367640
|
if (block === void 0) {
|
|
367279
367641
|
return void 0;
|
|
367280
367642
|
}
|
|
@@ -367284,7 +367646,7 @@ async function resourceTarget(node) {
|
|
|
367284
367646
|
};
|
|
367285
367647
|
}
|
|
367286
367648
|
function sourceTargetAtTemplateOffset(index, templateFile, templateText, offset) {
|
|
367287
|
-
const logicalId = (0,
|
|
367649
|
+
const logicalId = (0, import_cloud_assembly_api17.resolveLogicalIdAtOffset)(templateText, offset);
|
|
367288
367650
|
if (logicalId === void 0) {
|
|
367289
367651
|
return void 0;
|
|
367290
367652
|
}
|
|
@@ -367298,13 +367660,13 @@ function sourceTargetAtTemplateOffset(index, templateFile, templateText, offset)
|
|
|
367298
367660
|
range: { start: position, end: position }
|
|
367299
367661
|
};
|
|
367300
367662
|
}
|
|
367301
|
-
var fs55, import_url2,
|
|
367663
|
+
var fs55, import_url2, import_cloud_assembly_api17;
|
|
367302
367664
|
var init_template_locator = __esm({
|
|
367303
367665
|
"../@aws-cdk/cdk-explorer/lib/lsp/template-locator.ts"() {
|
|
367304
367666
|
"use strict";
|
|
367305
367667
|
fs55 = __toESM(require("fs"));
|
|
367306
367668
|
import_url2 = require("url");
|
|
367307
|
-
|
|
367669
|
+
import_cloud_assembly_api17 = __toESM(require_lib3());
|
|
367308
367670
|
init_positions();
|
|
367309
367671
|
__name(resourceTarget, "resourceTarget");
|
|
367310
367672
|
__name(sourceTargetAtTemplateOffset, "sourceTargetAtTemplateOffset");
|
|
@@ -367546,7 +367908,7 @@ async function resolveHoverLinks(nodes6, primary, readTemplate) {
|
|
|
367546
367908
|
const resolveOnce = /* @__PURE__ */ __name(async (file) => {
|
|
367547
367909
|
if (!templates.has(file)) {
|
|
367548
367910
|
const text = await readTemplate(file);
|
|
367549
|
-
const ranges = text === void 0 ? void 0 : (0,
|
|
367911
|
+
const ranges = text === void 0 ? void 0 : (0, import_cloud_assembly_api18.indexTemplateRanges)(text);
|
|
367550
367912
|
templates.set(file, text !== void 0 && ranges !== void 0 ? { text, ranges } : void 0);
|
|
367551
367913
|
}
|
|
367552
367914
|
return templates.get(file);
|
|
@@ -367702,12 +368064,12 @@ function histogram(nodes6) {
|
|
|
367702
368064
|
function truncate(text, max) {
|
|
367703
368065
|
return text.length <= max ? text : `${text.slice(0, max - 1)}\u2026`;
|
|
367704
368066
|
}
|
|
367705
|
-
var import_url5,
|
|
368067
|
+
var import_url5, import_cloud_assembly_api18, import_node2, MAX_PROPERTIES, MAX_LINKED_AUX, MAX_STRING_LENGTH, MAX_OBJECT_KEYS, MAX_HISTOGRAM_TYPES;
|
|
367706
368068
|
var init_hover = __esm({
|
|
367707
368069
|
"../@aws-cdk/cdk-explorer/lib/lsp/hover.ts"() {
|
|
367708
368070
|
"use strict";
|
|
367709
368071
|
import_url5 = require("url");
|
|
367710
|
-
|
|
368072
|
+
import_cloud_assembly_api18 = __toESM(require_lib3());
|
|
367711
368073
|
import_node2 = __toESM(require_node6());
|
|
367712
368074
|
init_codelens();
|
|
367713
368075
|
init_positions();
|
|
@@ -367834,17 +368196,17 @@ function startAssemblyWatcher(options) {
|
|
|
367834
368196
|
}
|
|
367835
368197
|
};
|
|
367836
368198
|
}
|
|
367837
|
-
var path51,
|
|
368199
|
+
var path51, import_cloud_assembly_api19, import_cloud_assembly_schema11, TREE_FILE, ASSEMBLY_SIGNAL_FILES, DEBOUNCE_MS;
|
|
367838
368200
|
var init_assembly_watcher = __esm({
|
|
367839
368201
|
"../@aws-cdk/cdk-explorer/lib/core/assembly-watcher.ts"() {
|
|
367840
368202
|
"use strict";
|
|
367841
368203
|
path51 = __toESM(require("path"));
|
|
367842
|
-
|
|
368204
|
+
import_cloud_assembly_api19 = __toESM(require_lib3());
|
|
367843
368205
|
import_cloud_assembly_schema11 = __toESM(require_lib2());
|
|
367844
368206
|
init_esm2();
|
|
367845
368207
|
TREE_FILE = "tree.json";
|
|
367846
368208
|
ASSEMBLY_SIGNAL_FILES = /* @__PURE__ */ new Set([
|
|
367847
|
-
|
|
368209
|
+
import_cloud_assembly_api19.MANIFEST_FILE,
|
|
367848
368210
|
TREE_FILE,
|
|
367849
368211
|
import_cloud_assembly_schema11.VALIDATION_REPORT_FILE
|
|
367850
368212
|
]);
|
|
@@ -367861,7 +368223,7 @@ __export(server_exports, {
|
|
|
367861
368223
|
startServer: () => startServer
|
|
367862
368224
|
});
|
|
367863
368225
|
async function sleep3(ms) {
|
|
367864
|
-
return new Promise((
|
|
368226
|
+
return new Promise((resolve17) => setTimeout(resolve17, ms));
|
|
367865
368227
|
}
|
|
367866
368228
|
function handleSynthOnSave(result2, log) {
|
|
367867
368229
|
switch (result2.status) {
|
|
@@ -367902,7 +368264,7 @@ function createLspHandlers(options) {
|
|
|
367902
368264
|
let autoSynthEnabled = false;
|
|
367903
368265
|
let shouldIgnore = /* @__PURE__ */ __name(() => false, "shouldIgnore");
|
|
367904
368266
|
let assemblyWatcher;
|
|
367905
|
-
let cachedIndex =
|
|
368267
|
+
let cachedIndex = import_cloud_assembly_api20.ConstructIndex.fromTree([]);
|
|
367906
368268
|
let cachedTree = [];
|
|
367907
368269
|
let cachedWarnings = [];
|
|
367908
368270
|
let cachedAssemblyDir;
|
|
@@ -367948,7 +368310,7 @@ function createLspHandlers(options) {
|
|
|
367948
368310
|
for (const warning2 of warnings) {
|
|
367949
368311
|
log.warn(warning2);
|
|
367950
368312
|
}
|
|
367951
|
-
cachedIndex =
|
|
368313
|
+
cachedIndex = import_cloud_assembly_api20.ConstructIndex.fromTree(tree);
|
|
367952
368314
|
cachedTree = tree;
|
|
367953
368315
|
cachedWarnings = warnings;
|
|
367954
368316
|
cachedAssemblyDir = assemblyDir;
|
|
@@ -368136,7 +368498,7 @@ function createLspHandlers(options) {
|
|
|
368136
368498
|
const templateRangesFor = /* @__PURE__ */ __name((templateFile) => {
|
|
368137
368499
|
if (!rangesByTemplate.has(templateFile)) {
|
|
368138
368500
|
try {
|
|
368139
|
-
rangesByTemplate.set(templateFile, (0,
|
|
368501
|
+
rangesByTemplate.set(templateFile, (0, import_cloud_assembly_api20.indexTemplateRanges)(fs56.readFileSync(templateFile, "utf-8")));
|
|
368140
368502
|
} catch {
|
|
368141
368503
|
rangesByTemplate.set(templateFile, void 0);
|
|
368142
368504
|
}
|
|
@@ -368230,14 +368592,14 @@ function startServer(options) {
|
|
|
368230
368592
|
connection.onExit(() => process.exit(0));
|
|
368231
368593
|
connection.listen();
|
|
368232
368594
|
}
|
|
368233
|
-
var fs56, path52, import_url7,
|
|
368595
|
+
var fs56, path52, import_url7, import_cloud_assembly_api20, import_toolkit_lib22, import_node4, import_node5, REFRESH_LOCK_RETRIES, REFRESH_LOCK_RETRY_MS, SYNTH_LOCK_RETRY_BASE_MS, SYNTH_LOCK_RETRY_MAX_MS, NOOP_LOGGER;
|
|
368234
368596
|
var init_server = __esm({
|
|
368235
368597
|
"../@aws-cdk/cdk-explorer/lib/lsp/server.ts"() {
|
|
368236
368598
|
"use strict";
|
|
368237
368599
|
fs56 = __toESM(require("fs"));
|
|
368238
368600
|
path52 = __toESM(require("path"));
|
|
368239
368601
|
import_url7 = require("url");
|
|
368240
|
-
|
|
368602
|
+
import_cloud_assembly_api20 = __toESM(require_lib3());
|
|
368241
368603
|
import_toolkit_lib22 = __toESM(require_lib12());
|
|
368242
368604
|
import_node4 = __toESM(require_node3());
|
|
368243
368605
|
import_node5 = __toESM(require_node6());
|
|
@@ -368326,7 +368688,7 @@ async function runSynth(options) {
|
|
|
368326
368688
|
} catch (err) {
|
|
368327
368689
|
return classify(err);
|
|
368328
368690
|
}
|
|
368329
|
-
await new Promise((
|
|
368691
|
+
await new Promise((resolve17) => setTimeout(resolve17, READER_HANDOFF_DELAY_MS));
|
|
368330
368692
|
try {
|
|
368331
368693
|
await cached3.dispose();
|
|
368332
368694
|
} catch (err) {
|
|
@@ -368441,8 +368803,8 @@ async function lsp(options = {}) {
|
|
|
368441
368803
|
return 0;
|
|
368442
368804
|
}
|
|
368443
368805
|
(0, import_cdk_explorer.startLspServer)(versionNumber2());
|
|
368444
|
-
await new Promise((
|
|
368445
|
-
const done = /* @__PURE__ */ __name(() =>
|
|
368806
|
+
await new Promise((resolve17) => {
|
|
368807
|
+
const done = /* @__PURE__ */ __name(() => resolve17(), "done");
|
|
368446
368808
|
process3.stdin.once("end", done);
|
|
368447
368809
|
process3.stdin.once("close", done);
|
|
368448
368810
|
});
|
|
@@ -368589,6 +368951,7 @@ __export(cli_exports, {
|
|
|
368589
368951
|
async function exec(args, synthesizer) {
|
|
368590
368952
|
const libraryLoadTime = performance.now();
|
|
368591
368953
|
const argv = await parseCommandLineArguments(args);
|
|
368954
|
+
handleTracker = argv.debugCli ? trackLeakedHandles() : void 0;
|
|
368592
368955
|
argv.language = getLanguageFromAlias(argv.language) ?? argv.language;
|
|
368593
368956
|
if (argv.noColor) {
|
|
368594
368957
|
process.env.FORCE_COLOR = "0";
|
|
@@ -368598,18 +368961,7 @@ async function exec(args, synthesizer) {
|
|
|
368598
368961
|
process.env.FORCE_COLOR = "0";
|
|
368599
368962
|
}
|
|
368600
368963
|
const cmd = argv._[0];
|
|
368601
|
-
|
|
368602
|
-
if (argv.verbose) {
|
|
368603
|
-
switch (argv.verbose) {
|
|
368604
|
-
case 1:
|
|
368605
|
-
ioMessageLevel = "debug";
|
|
368606
|
-
break;
|
|
368607
|
-
case 2:
|
|
368608
|
-
default:
|
|
368609
|
-
ioMessageLevel = "trace";
|
|
368610
|
-
break;
|
|
368611
|
-
}
|
|
368612
|
-
}
|
|
368964
|
+
const ioMessageLevel = determineIoMessageLevel(argv);
|
|
368613
368965
|
const ioHost = CliIoHost.instance({
|
|
368614
368966
|
logLevel: ioMessageLevel,
|
|
368615
368967
|
isTTY: process.stdout.isTTY,
|
|
@@ -368644,7 +368996,8 @@ async function exec(args, synthesizer) {
|
|
|
368644
368996
|
);
|
|
368645
368997
|
if (guessAgent() && !argv.verbose && configuration.settings.get(["progress"]) === void 0) {
|
|
368646
368998
|
ioHost.stackProgress = "errors-only" /* ERRORS_ONLY */;
|
|
368647
|
-
await ioHost.defaults.info(
|
|
368999
|
+
await ioHost.defaults.info("AI agent detected");
|
|
369000
|
+
await ioHost.defaults.debug('Using --progress "errors-only" (set --progress or the "progress" key in cdk.json to change)');
|
|
368648
369001
|
}
|
|
368649
369002
|
const proxyAgent = await new ProxyAgentProvider(ioHelper).create({
|
|
368650
369003
|
proxyAddress: configuration.settings.get(["proxy"]),
|
|
@@ -368751,7 +369104,7 @@ async function exec(args, synthesizer) {
|
|
|
368751
369104
|
async function main(command6, args2) {
|
|
368752
369105
|
ioHost.currentAction = command6;
|
|
368753
369106
|
const toolkitStackName = ToolkitInfo.determineName(configuration.settings.get(["toolkitStackName"]));
|
|
368754
|
-
await ioHost.defaults.debug(`Toolkit stack: ${
|
|
369107
|
+
await ioHost.defaults.debug(`Toolkit stack: ${import_chalk42.default.bold(toolkitStackName)}`);
|
|
368755
369108
|
const cloudFormation = new Deployments({
|
|
368756
369109
|
sdkProvider,
|
|
368757
369110
|
toolkitStackName,
|
|
@@ -368814,6 +369167,12 @@ async function exec(args, synthesizer) {
|
|
|
368814
369167
|
case "diff":
|
|
368815
369168
|
ioHost.currentAction = "diff";
|
|
368816
369169
|
const enableDiffNoFail = isFeatureEnabled(configuration, cxapi15.ENABLE_DIFF_NO_FAIL_CONTEXT);
|
|
369170
|
+
const diffMethod = determineDiffMethod(args2);
|
|
369171
|
+
if (diffMethod === "template") {
|
|
369172
|
+
rejectIncompatibleOptions(args2, "--method=template", {
|
|
369173
|
+
changeSetName: "--change-set-name"
|
|
369174
|
+
});
|
|
369175
|
+
}
|
|
368817
369176
|
return cli2.diff({
|
|
368818
369177
|
stackNames: args2.STACKS,
|
|
368819
369178
|
exclusively: args2.exclusively,
|
|
@@ -368824,7 +369183,8 @@ async function exec(args, synthesizer) {
|
|
|
368824
369183
|
fail: args2.fail != null ? args2.fail : !enableDiffNoFail,
|
|
368825
369184
|
compareAgainstProcessedTemplate: args2.processed,
|
|
368826
369185
|
quiet: args2.quiet,
|
|
368827
|
-
method:
|
|
369186
|
+
method: diffMethod,
|
|
369187
|
+
changeSetName: args2.changeSetName,
|
|
368828
369188
|
toolkitStackName,
|
|
368829
369189
|
importExistingResources: args2.importExistingResources,
|
|
368830
369190
|
includeMoves: args2["include-moves"]
|
|
@@ -369123,6 +369483,12 @@ async function exec(args, synthesizer) {
|
|
|
369123
369483
|
}
|
|
369124
369484
|
__name(main, "main");
|
|
369125
369485
|
}
|
|
369486
|
+
function determineIoMessageLevel(argv) {
|
|
369487
|
+
if (argv.verbose) {
|
|
369488
|
+
return argv.verbose === 1 ? "debug" : "trace";
|
|
369489
|
+
}
|
|
369490
|
+
return argv.debugCli ? "debug" : "info";
|
|
369491
|
+
}
|
|
369126
369492
|
async function determineBootstrapVersion(ioHost, args) {
|
|
369127
369493
|
let source;
|
|
369128
369494
|
if (args.template) {
|
|
@@ -369318,18 +369684,23 @@ function cli(args = process.argv.slice(2)) {
|
|
|
369318
369684
|
} catch (e6) {
|
|
369319
369685
|
await CliIoHost.get()?.asIoHelper().defaults.trace(`Ending Telemetry failed: ${e6.message}`);
|
|
369320
369686
|
}
|
|
369687
|
+
const ioHelper = CliIoHost.get()?.asIoHelper();
|
|
369688
|
+
if (ioHelper) {
|
|
369689
|
+
handleTracker?.scheduleReport(ioHelper);
|
|
369690
|
+
}
|
|
369321
369691
|
});
|
|
369322
369692
|
}
|
|
369323
|
-
var cxapi15, import_toolkit_lib25,
|
|
369693
|
+
var cxapi15, import_toolkit_lib25, import_chalk42, handleTracker;
|
|
369324
369694
|
var init_cli = __esm({
|
|
369325
369695
|
"lib/cli/cli.ts"() {
|
|
369326
369696
|
"use strict";
|
|
369327
369697
|
cxapi15 = __toESM(require_lib11());
|
|
369328
369698
|
import_toolkit_lib25 = __toESM(require_lib12());
|
|
369329
|
-
|
|
369699
|
+
import_chalk42 = __toESM(require_source());
|
|
369330
369700
|
init_util9();
|
|
369331
369701
|
init_cdk_toolkit();
|
|
369332
369702
|
init_ci_systems();
|
|
369703
|
+
init_debug_handles();
|
|
369333
369704
|
init_display_version();
|
|
369334
369705
|
init_io_host2();
|
|
369335
369706
|
init_parse_command_line_arguments();
|
|
@@ -369361,6 +369732,7 @@ var init_cli = __esm({
|
|
|
369361
369732
|
init_ci();
|
|
369362
369733
|
init_guess_agent();
|
|
369363
369734
|
__name(exec, "exec");
|
|
369735
|
+
__name(determineIoMessageLevel, "determineIoMessageLevel");
|
|
369364
369736
|
__name(determineBootstrapVersion, "determineBootstrapVersion");
|
|
369365
369737
|
__name(isFeatureEnabled, "isFeatureEnabled");
|
|
369366
369738
|
__name(specificStacksOrAllRecursively, "specificStacksOrAllRecursively");
|