aws-cdk 2.1142.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 +2 -2
- 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 +49 -16
- 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 +905 -546
- package/lib/index_bg.wasm +0 -0
- package/lib/init-templates/.init-version.json +1 -1
- package/package.json +9 -9
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
|
});
|
|
@@ -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
|
]);
|
|
@@ -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();
|
|
@@ -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);
|
|
@@ -69159,35 +69159,35 @@ var require_dist_cjs20 = __commonJS({
|
|
|
69159
69159
|
getItem(key) {
|
|
69160
69160
|
return this.withObjectStore("readonly", (store) => {
|
|
69161
69161
|
const req = store.get(key);
|
|
69162
|
-
return new Promise((
|
|
69163
|
-
req.onerror = () =>
|
|
69164
|
-
req.onsuccess = () =>
|
|
69162
|
+
return new Promise((resolve17) => {
|
|
69163
|
+
req.onerror = () => resolve17(null);
|
|
69164
|
+
req.onsuccess = () => resolve17(req.result ? req.result.value : null);
|
|
69165
69165
|
});
|
|
69166
69166
|
}).catch(() => null);
|
|
69167
69167
|
}
|
|
69168
69168
|
removeItem(key) {
|
|
69169
69169
|
return this.withObjectStore("readwrite", (store) => {
|
|
69170
69170
|
const req = store.delete(key);
|
|
69171
|
-
return new Promise((
|
|
69171
|
+
return new Promise((resolve17, reject) => {
|
|
69172
69172
|
req.onerror = () => reject(req.error);
|
|
69173
|
-
req.onsuccess = () =>
|
|
69173
|
+
req.onsuccess = () => resolve17();
|
|
69174
69174
|
});
|
|
69175
69175
|
});
|
|
69176
69176
|
}
|
|
69177
69177
|
setItem(id, value2) {
|
|
69178
69178
|
return this.withObjectStore("readwrite", (store) => {
|
|
69179
69179
|
const req = store.put({ id, value: value2 });
|
|
69180
|
-
return new Promise((
|
|
69180
|
+
return new Promise((resolve17, reject) => {
|
|
69181
69181
|
req.onerror = () => reject(req.error);
|
|
69182
|
-
req.onsuccess = () =>
|
|
69182
|
+
req.onsuccess = () => resolve17();
|
|
69183
69183
|
});
|
|
69184
69184
|
});
|
|
69185
69185
|
}
|
|
69186
69186
|
getDb() {
|
|
69187
69187
|
const openDbRequest = self.indexedDB.open(this.dbName, 1);
|
|
69188
|
-
return new Promise((
|
|
69188
|
+
return new Promise((resolve17, reject) => {
|
|
69189
69189
|
openDbRequest.onsuccess = () => {
|
|
69190
|
-
|
|
69190
|
+
resolve17(openDbRequest.result);
|
|
69191
69191
|
};
|
|
69192
69192
|
openDbRequest.onerror = () => {
|
|
69193
69193
|
reject(openDbRequest.error);
|
|
@@ -69208,9 +69208,9 @@ var require_dist_cjs20 = __commonJS({
|
|
|
69208
69208
|
return this.getDb().then((db) => {
|
|
69209
69209
|
const tx = db.transaction(STORE_NAME, mode);
|
|
69210
69210
|
tx.oncomplete = () => db.close();
|
|
69211
|
-
return new Promise((
|
|
69211
|
+
return new Promise((resolve17, reject) => {
|
|
69212
69212
|
tx.onerror = () => reject(tx.error);
|
|
69213
|
-
|
|
69213
|
+
resolve17(action(tx.objectStore(STORE_NAME)));
|
|
69214
69214
|
}).catch((err) => {
|
|
69215
69215
|
db.close();
|
|
69216
69216
|
throw err;
|
|
@@ -70044,7 +70044,7 @@ to input.params.ContentLength in bytes.
|
|
|
70044
70044
|
}
|
|
70045
70045
|
}
|
|
70046
70046
|
async __abortTimeout(abortSignal) {
|
|
70047
|
-
return new Promise((
|
|
70047
|
+
return new Promise((resolve17, reject) => {
|
|
70048
70048
|
abortSignal.onabort = () => {
|
|
70049
70049
|
const abortError = new Error("Upload aborted.");
|
|
70050
70050
|
abortError.name = "AbortError";
|
|
@@ -71653,14 +71653,14 @@ var require_templates = __commonJS({
|
|
|
71653
71653
|
return results;
|
|
71654
71654
|
}
|
|
71655
71655
|
__name(parseStyle, "parseStyle");
|
|
71656
|
-
function buildStyle(
|
|
71656
|
+
function buildStyle(chalk43, styles) {
|
|
71657
71657
|
const enabled = {};
|
|
71658
71658
|
for (const layer of styles) {
|
|
71659
71659
|
for (const style of layer.styles) {
|
|
71660
71660
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
71661
71661
|
}
|
|
71662
71662
|
}
|
|
71663
|
-
let current =
|
|
71663
|
+
let current = chalk43;
|
|
71664
71664
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
71665
71665
|
if (!Array.isArray(styles2)) {
|
|
71666
71666
|
continue;
|
|
@@ -71673,7 +71673,7 @@ var require_templates = __commonJS({
|
|
|
71673
71673
|
return current;
|
|
71674
71674
|
}
|
|
71675
71675
|
__name(buildStyle, "buildStyle");
|
|
71676
|
-
module2.exports = (
|
|
71676
|
+
module2.exports = (chalk43, temporary) => {
|
|
71677
71677
|
const styles = [];
|
|
71678
71678
|
const chunks2 = [];
|
|
71679
71679
|
let chunk = [];
|
|
@@ -71683,13 +71683,13 @@ var require_templates = __commonJS({
|
|
|
71683
71683
|
} else if (style) {
|
|
71684
71684
|
const string = chunk.join("");
|
|
71685
71685
|
chunk = [];
|
|
71686
|
-
chunks2.push(styles.length === 0 ? string : buildStyle(
|
|
71686
|
+
chunks2.push(styles.length === 0 ? string : buildStyle(chalk43, styles)(string));
|
|
71687
71687
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
71688
71688
|
} else if (close) {
|
|
71689
71689
|
if (styles.length === 0) {
|
|
71690
71690
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
71691
71691
|
}
|
|
71692
|
-
chunks2.push(buildStyle(
|
|
71692
|
+
chunks2.push(buildStyle(chalk43, styles)(chunk.join("")));
|
|
71693
71693
|
chunk = [];
|
|
71694
71694
|
styles.pop();
|
|
71695
71695
|
} else {
|
|
@@ -71740,16 +71740,16 @@ var require_source = __commonJS({
|
|
|
71740
71740
|
}
|
|
71741
71741
|
};
|
|
71742
71742
|
var chalkFactory = /* @__PURE__ */ __name((options) => {
|
|
71743
|
-
const
|
|
71744
|
-
applyOptions(
|
|
71745
|
-
|
|
71746
|
-
Object.setPrototypeOf(
|
|
71747
|
-
Object.setPrototypeOf(
|
|
71748
|
-
|
|
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 = () => {
|
|
71749
71749
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
71750
71750
|
};
|
|
71751
|
-
|
|
71752
|
-
return
|
|
71751
|
+
chalk44.template.Instance = ChalkClass;
|
|
71752
|
+
return chalk44.template;
|
|
71753
71753
|
}, "chalkFactory");
|
|
71754
71754
|
function Chalk(options) {
|
|
71755
71755
|
return chalkFactory(options);
|
|
@@ -71861,7 +71861,7 @@ var require_source = __commonJS({
|
|
|
71861
71861
|
return openAll + string + closeAll;
|
|
71862
71862
|
}, "applyStyle");
|
|
71863
71863
|
var template;
|
|
71864
|
-
var chalkTag = /* @__PURE__ */ __name((
|
|
71864
|
+
var chalkTag = /* @__PURE__ */ __name((chalk44, ...strings) => {
|
|
71865
71865
|
const [firstString] = strings;
|
|
71866
71866
|
if (!isArray2(firstString) || !isArray2(firstString.raw)) {
|
|
71867
71867
|
return strings.join(" ");
|
|
@@ -71877,14 +71877,14 @@ var require_source = __commonJS({
|
|
|
71877
71877
|
if (template === void 0) {
|
|
71878
71878
|
template = require_templates();
|
|
71879
71879
|
}
|
|
71880
|
-
return template(
|
|
71880
|
+
return template(chalk44, parts.join(""));
|
|
71881
71881
|
}, "chalkTag");
|
|
71882
71882
|
Object.defineProperties(Chalk.prototype, styles);
|
|
71883
|
-
var
|
|
71884
|
-
|
|
71885
|
-
|
|
71886
|
-
|
|
71887
|
-
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;
|
|
71888
71888
|
}
|
|
71889
71889
|
});
|
|
71890
71890
|
|
|
@@ -77747,12 +77747,12 @@ ${ctx.indent}`;
|
|
|
77747
77747
|
for (const {
|
|
77748
77748
|
format: format31,
|
|
77749
77749
|
test,
|
|
77750
|
-
resolve:
|
|
77750
|
+
resolve: resolve17
|
|
77751
77751
|
} of tags) {
|
|
77752
77752
|
if (test) {
|
|
77753
77753
|
const match = str.match(test);
|
|
77754
77754
|
if (match) {
|
|
77755
|
-
let res =
|
|
77755
|
+
let res = resolve17.apply(null, match);
|
|
77756
77756
|
if (!(res instanceof Scalar2)) res = new Scalar2(res);
|
|
77757
77757
|
if (format31) res.format = format31;
|
|
77758
77758
|
return res;
|
|
@@ -84096,12 +84096,12 @@ var init_asset_publishing = __esm({
|
|
|
84096
84096
|
|
|
84097
84097
|
// ../@aws-cdk/toolkit-lib/lib/util/promises.ts
|
|
84098
84098
|
function promiseWithResolvers() {
|
|
84099
|
-
let
|
|
84099
|
+
let resolve17, reject;
|
|
84100
84100
|
const promise = new Promise((res, rej) => {
|
|
84101
|
-
|
|
84101
|
+
resolve17 = res;
|
|
84102
84102
|
reject = rej;
|
|
84103
84103
|
});
|
|
84104
|
-
return { promise, resolve:
|
|
84104
|
+
return { promise, resolve: resolve17, reject };
|
|
84105
84105
|
}
|
|
84106
84106
|
async function waitFor(valueProvider, timeout = 5e3) {
|
|
84107
84107
|
while (true) {
|
|
@@ -92203,6 +92203,13 @@ function assertEvaluatesToString(intrinsic, value2) {
|
|
|
92203
92203
|
throw new CfnEvaluationException(`${intrinsic}: expected a string, got ${JSON.stringify(value2)}`);
|
|
92204
92204
|
}
|
|
92205
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
|
+
}
|
|
92206
92213
|
function iamArnFmt(parts) {
|
|
92207
92214
|
return `arn:${parts.partition}:${parts.service}::${parts.account}:${parts.resourceType}/${parts.resourceName}`;
|
|
92208
92215
|
}
|
|
@@ -92319,6 +92326,7 @@ var init_evaluate_cloudformation_template = __esm({
|
|
|
92319
92326
|
};
|
|
92320
92327
|
__name(assertEvaluatesToArray, "assertEvaluatesToArray");
|
|
92321
92328
|
__name(assertEvaluatesToString, "assertEvaluatesToString");
|
|
92329
|
+
__name(topLevelPropertyName, "topLevelPropertyName");
|
|
92322
92330
|
EvaluateCloudFormationTemplate = class _EvaluateCloudFormationTemplate {
|
|
92323
92331
|
static {
|
|
92324
92332
|
__name(this, "EvaluateCloudFormationTemplate");
|
|
@@ -92336,6 +92344,7 @@ var init_evaluate_cloudformation_template = __esm({
|
|
|
92336
92344
|
lookupExport;
|
|
92337
92345
|
cachedUrlSuffix;
|
|
92338
92346
|
_cloudControl;
|
|
92347
|
+
createOnlyPropertiesCache = /* @__PURE__ */ new Map();
|
|
92339
92348
|
constructor(props) {
|
|
92340
92349
|
this.stackArtifact = props.stackArtifact;
|
|
92341
92350
|
this.stackName = props.stackName ?? props.stackArtifact.stackName;
|
|
@@ -92531,6 +92540,49 @@ var init_evaluate_cloudformation_template = __esm({
|
|
|
92531
92540
|
}
|
|
92532
92541
|
return physicalId;
|
|
92533
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
|
+
}
|
|
92534
92586
|
getResourceProperty(logicalId, propertyName) {
|
|
92535
92587
|
return this.template.Resources?.[logicalId]?.Properties?.[propertyName];
|
|
92536
92588
|
}
|
|
@@ -96002,15 +96054,16 @@ __export(cfn_api_exports, {
|
|
|
96002
96054
|
});
|
|
96003
96055
|
async function createDiffChangeSet(ioHelper, options) {
|
|
96004
96056
|
try {
|
|
96005
|
-
const { cfn, bodyParameter, exists, executionRoleArn, diagnoser } = await prepareChangeSetEnv(ioHelper, options);
|
|
96057
|
+
const { cfn, bodyParameter, exists, stackExistedBefore, executionRoleArn, diagnoser } = await prepareChangeSetEnv(ioHelper, options);
|
|
96006
96058
|
await ioHelper.defaults.info(
|
|
96007
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"
|
|
96008
96060
|
);
|
|
96009
96061
|
return await createChangeSetAndCleanup(ioHelper, {
|
|
96010
96062
|
cfn,
|
|
96011
|
-
changeSetName:
|
|
96063
|
+
changeSetName: options.changeSetName ?? `cdk-diff-change-set-${options.uuid}`,
|
|
96012
96064
|
stack: options.stack,
|
|
96013
96065
|
exists,
|
|
96066
|
+
stackExistedBefore,
|
|
96014
96067
|
uuid: options.uuid,
|
|
96015
96068
|
bodyParameter,
|
|
96016
96069
|
parameters: options.parameters,
|
|
@@ -96130,6 +96183,9 @@ async function createChangeSetAndCleanup(ioHelper, options) {
|
|
|
96130
96183
|
StackName: stackId,
|
|
96131
96184
|
ClientRequestToken: (0, import_node_crypto9.randomUUID)()
|
|
96132
96185
|
});
|
|
96186
|
+
if (!options.stackExistedBefore) {
|
|
96187
|
+
await waitForStackDelete(options.cfn, ioHelper, stackId);
|
|
96188
|
+
}
|
|
96133
96189
|
}
|
|
96134
96190
|
}
|
|
96135
96191
|
}
|
|
@@ -96167,6 +96223,7 @@ async function createValidationChangeSet(ioHelper, options) {
|
|
|
96167
96223
|
StackName: changeSet.StackId ?? options.stack.stackName,
|
|
96168
96224
|
ClientRequestToken: (0, import_node_crypto9.randomUUID)()
|
|
96169
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}`));
|
|
96170
96227
|
}
|
|
96171
96228
|
}
|
|
96172
96229
|
}
|
|
@@ -108379,11 +108436,12 @@ var init_ecs_services = __esm({
|
|
|
108379
108436
|
});
|
|
108380
108437
|
|
|
108381
108438
|
// ../@aws-cdk/toolkit-lib/lib/api/hotswap/hotswap-template-cache.ts
|
|
108382
|
-
function cachePath(assemblyDir, stackName) {
|
|
108383
|
-
|
|
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`);
|
|
108384
108442
|
}
|
|
108385
|
-
async function readHotswapTemplateCache(assemblyDir, stackName, newRootTemplate) {
|
|
108386
|
-
const cachedPath = cachePath(assemblyDir, stackName);
|
|
108443
|
+
async function readHotswapTemplateCache(assemblyDir, stackName, newRootTemplate, environment) {
|
|
108444
|
+
const cachedPath = cachePath(assemblyDir, stackName, environment);
|
|
108387
108445
|
try {
|
|
108388
108446
|
const cached3 = await fs19.readJson(cachedPath);
|
|
108389
108447
|
return {
|
|
@@ -108394,17 +108452,17 @@ async function readHotswapTemplateCache(assemblyDir, stackName, newRootTemplate)
|
|
|
108394
108452
|
return void 0;
|
|
108395
108453
|
}
|
|
108396
108454
|
}
|
|
108397
|
-
async function writeHotswapTemplateCache(assemblyDir, stackName, rootTemplate, nestedStacks) {
|
|
108455
|
+
async function writeHotswapTemplateCache(assemblyDir, stackName, rootTemplate, nestedStacks, environment) {
|
|
108398
108456
|
const state2 = {
|
|
108399
108457
|
deployedRootTemplate: rootTemplate,
|
|
108400
108458
|
nestedStacks: toCachedNestedStacks(nestedStacks)
|
|
108401
108459
|
};
|
|
108402
|
-
const cachedPath = cachePath(assemblyDir, stackName);
|
|
108460
|
+
const cachedPath = cachePath(assemblyDir, stackName, environment);
|
|
108403
108461
|
await fs19.ensureDir(path19.dirname(cachedPath));
|
|
108404
108462
|
await fs19.writeJson(cachedPath, state2, { spaces: 2 });
|
|
108405
108463
|
}
|
|
108406
|
-
async function invalidateHotswapTemplateCache(assemblyDir, stackName) {
|
|
108407
|
-
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 });
|
|
108408
108466
|
}
|
|
108409
108467
|
function toCachedNestedStacks(nestedStacks) {
|
|
108410
108468
|
const result2 = {};
|
|
@@ -108805,12 +108863,16 @@ async function isHotswappableCloudControlChange(logicalId, change, evaluateCfnTe
|
|
|
108805
108863
|
if (changedPropNames.length === 0) {
|
|
108806
108864
|
return ret;
|
|
108807
108865
|
}
|
|
108808
|
-
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
|
+
);
|
|
108809
108872
|
classifiedChanges.reportNonHotswappablePropertyChanges(ret);
|
|
108810
108873
|
if (classifiedChanges.namesOfHotswappableProps.length === 0) {
|
|
108811
108874
|
return ret;
|
|
108812
108875
|
}
|
|
108813
|
-
const resourceType = change.newValue.Type;
|
|
108814
108876
|
const identifier = await resolveCloudControlIdentifier(logicalId, resourceType, evaluateCfnTemplate);
|
|
108815
108877
|
if (!identifier) {
|
|
108816
108878
|
ret.push(nonHotswappableChange(
|
|
@@ -109087,18 +109149,18 @@ var require_p_limit = __commonJS({
|
|
|
109087
109149
|
queue.dequeue()();
|
|
109088
109150
|
}
|
|
109089
109151
|
}, "next");
|
|
109090
|
-
const run5 = /* @__PURE__ */ __name(async (fn,
|
|
109152
|
+
const run5 = /* @__PURE__ */ __name(async (fn, resolve17, ...args) => {
|
|
109091
109153
|
activeCount++;
|
|
109092
109154
|
const result2 = (async () => fn(...args))();
|
|
109093
|
-
|
|
109155
|
+
resolve17(result2);
|
|
109094
109156
|
try {
|
|
109095
109157
|
await result2;
|
|
109096
109158
|
} catch {
|
|
109097
109159
|
}
|
|
109098
109160
|
next();
|
|
109099
109161
|
}, "run");
|
|
109100
|
-
const enqueue = /* @__PURE__ */ __name((fn,
|
|
109101
|
-
queue.enqueue(run5.bind(null, fn,
|
|
109162
|
+
const enqueue = /* @__PURE__ */ __name((fn, resolve17, ...args) => {
|
|
109163
|
+
queue.enqueue(run5.bind(null, fn, resolve17, ...args));
|
|
109102
109164
|
(async () => {
|
|
109103
109165
|
await Promise.resolve();
|
|
109104
109166
|
if (activeCount < concurrency && queue.size > 0) {
|
|
@@ -109106,8 +109168,8 @@ var require_p_limit = __commonJS({
|
|
|
109106
109168
|
}
|
|
109107
109169
|
})();
|
|
109108
109170
|
}, "enqueue");
|
|
109109
|
-
const generator = /* @__PURE__ */ __name((fn, ...args) => new Promise((
|
|
109110
|
-
enqueue(fn,
|
|
109171
|
+
const generator = /* @__PURE__ */ __name((fn, ...args) => new Promise((resolve17) => {
|
|
109172
|
+
enqueue(fn, resolve17, ...args);
|
|
109111
109173
|
}), "generator");
|
|
109112
109174
|
Object.defineProperties(generator, {
|
|
109113
109175
|
activeCount: {
|
|
@@ -109161,7 +109223,8 @@ async function tryHotswapDeployment(sdkProvider, ioHelper, assetParams, cloudFor
|
|
|
109161
109223
|
async function hotswapDeployment(sdkProvider, ioSpan, assetParams, stack, hotswapMode, hotswapPropertyOverrides) {
|
|
109162
109224
|
const resolvedEnv = await sdkProvider.resolveEnvironment(stack.environment);
|
|
109163
109225
|
const sdk = (await sdkProvider.forEnvironment(resolvedEnv, 1 /* ForWriting */)).sdk;
|
|
109164
|
-
const
|
|
109226
|
+
const environmentKey = `${resolvedEnv.account}/${resolvedEnv.region}`;
|
|
109227
|
+
const hotswapCache = await readHotswapTemplateCache(stack.assembly.directory, stack.stackName, stack.template, environmentKey);
|
|
109165
109228
|
const currentTemplate = hotswapCache ?? await loadCurrentTemplateWithNestedStacks(stack, sdk);
|
|
109166
109229
|
const evaluateCfnTemplate = new EvaluateCloudFormationTemplate({
|
|
109167
109230
|
stackArtifact: stack,
|
|
@@ -109204,7 +109267,7 @@ async function hotswapDeployment(sdkProvider, ioSpan, assetParams, stack, hotswa
|
|
|
109204
109267
|
let error3;
|
|
109205
109268
|
try {
|
|
109206
109269
|
await applyAllHotswapOperations(sdk, ioSpan, hotswappable);
|
|
109207
|
-
await writeHotswapTemplateCache(stack.assembly.directory, stack.stackName, stack.template, currentTemplate.nestedStacks);
|
|
109270
|
+
await writeHotswapTemplateCache(stack.assembly.directory, stack.stackName, stack.template, currentTemplate.nestedStacks, environmentKey);
|
|
109208
109271
|
} catch (e6) {
|
|
109209
109272
|
error3 = e6;
|
|
109210
109273
|
}
|
|
@@ -109845,10 +109908,12 @@ async function canSkipDeploy(deployStackOptions, cloudFormationStack, parameterC
|
|
|
109845
109908
|
await ioHelper.defaults.debug(`${deployName}: stack is in a failure state`);
|
|
109846
109909
|
return false;
|
|
109847
109910
|
}
|
|
109911
|
+
const hotswapCacheEnv = deployStackOptions.resolvedEnvironment;
|
|
109848
109912
|
const hotswapCache = await readHotswapTemplateCache(
|
|
109849
109913
|
deployStackOptions.stack.assembly.directory,
|
|
109850
109914
|
deployStackOptions.stack.stackName,
|
|
109851
|
-
deployStackOptions.stack.template
|
|
109915
|
+
deployStackOptions.stack.template,
|
|
109916
|
+
`${hotswapCacheEnv.account}/${hotswapCacheEnv.region}`
|
|
109852
109917
|
);
|
|
109853
109918
|
if (hotswapCache && (0, import_cloudformation_diff.diffTemplate)(hotswapCache.deployedRootTemplate, deployStackOptions.stack.template).differenceCount > 0) {
|
|
109854
109919
|
await ioHelper.defaults.debug(`${deployName}: template has changed in relation to last successful hotswap deployment`);
|
|
@@ -109940,7 +110005,12 @@ var init_deploy_stack = __esm({
|
|
|
109940
110005
|
uuid;
|
|
109941
110006
|
async performDeployment() {
|
|
109942
110007
|
const deploymentMethod = this.deploymentMethod ?? { method: "change-set" };
|
|
109943
|
-
|
|
110008
|
+
const deploymentEnv = this.options.resolvedEnvironment;
|
|
110009
|
+
await invalidateHotswapTemplateCache(
|
|
110010
|
+
this.stackArtifact.assembly.directory,
|
|
110011
|
+
this.stackArtifact.stackName,
|
|
110012
|
+
`${deploymentEnv.account}/${deploymentEnv.region}`
|
|
110013
|
+
);
|
|
109944
110014
|
if (deploymentMethod.method === "direct" && this.options.resourcesToImport) {
|
|
109945
110015
|
throw new ToolkitError("ImportRequiresChangeSet", "Importing resources requires a changeset deployment");
|
|
109946
110016
|
}
|
|
@@ -110650,18 +110720,18 @@ var init_network_detector = __esm({
|
|
|
110650
110720
|
agent,
|
|
110651
110721
|
timeout: this.TIMEOUT
|
|
110652
110722
|
};
|
|
110653
|
-
return new Promise((
|
|
110723
|
+
return new Promise((resolve17) => {
|
|
110654
110724
|
const req = https.request(
|
|
110655
110725
|
_NetworkDetector.URL,
|
|
110656
110726
|
options,
|
|
110657
110727
|
(res) => {
|
|
110658
|
-
|
|
110728
|
+
resolve17(res.statusCode !== void 0 && res.statusCode < 500);
|
|
110659
110729
|
}
|
|
110660
110730
|
);
|
|
110661
|
-
req.on("error", () =>
|
|
110731
|
+
req.on("error", () => resolve17(false));
|
|
110662
110732
|
req.on("timeout", () => {
|
|
110663
110733
|
req.destroy();
|
|
110664
|
-
|
|
110734
|
+
resolve17(false);
|
|
110665
110735
|
});
|
|
110666
110736
|
req.end();
|
|
110667
110737
|
});
|
|
@@ -110703,7 +110773,7 @@ var init_web_data_source = __esm({
|
|
|
110703
110773
|
const options = {
|
|
110704
110774
|
agent: this.agent
|
|
110705
110775
|
};
|
|
110706
|
-
const notices = await new Promise((
|
|
110776
|
+
const notices = await new Promise((resolve17, reject) => {
|
|
110707
110777
|
let req;
|
|
110708
110778
|
let timer = setTimeout(() => {
|
|
110709
110779
|
if (req) {
|
|
@@ -110728,7 +110798,7 @@ var init_web_data_source = __esm({
|
|
|
110728
110798
|
if (!data) {
|
|
110729
110799
|
throw new ToolkitError("MissingNoticesKey", "'notices' key is missing from received data");
|
|
110730
110800
|
}
|
|
110731
|
-
|
|
110801
|
+
resolve17(data ?? []);
|
|
110732
110802
|
} catch (e6) {
|
|
110733
110803
|
reject(ToolkitError.withCause("NoticesParseError", `Parse error: ${formatErrorMessage(e6)}`, e6));
|
|
110734
110804
|
}
|
|
@@ -112006,10 +112076,11 @@ function bootstrapVersionFromTemplate(template) {
|
|
|
112006
112076
|
function bootstrapVariantFromTemplate(template) {
|
|
112007
112077
|
return template.Parameters?.[BOOTSTRAP_VARIANT_PARAMETER]?.Default ?? DEFAULT_BOOTSTRAP_VARIANT;
|
|
112008
112078
|
}
|
|
112009
|
-
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;
|
|
112010
112080
|
var init_deploy_bootstrap = __esm({
|
|
112011
112081
|
"../@aws-cdk/toolkit-lib/lib/api/bootstrap/deploy-bootstrap.ts"() {
|
|
112012
112082
|
"use strict";
|
|
112083
|
+
import_node_crypto12 = require("node:crypto");
|
|
112013
112084
|
os6 = __toESM(require("os"));
|
|
112014
112085
|
path23 = __toESM(require("path"));
|
|
112015
112086
|
import_cloud_assembly_api6 = __toESM(require_lib3());
|
|
@@ -112119,6 +112190,11 @@ var init_deploy_bootstrap = __esm({
|
|
|
112119
112190
|
deploymentMethod: {
|
|
112120
112191
|
method: "change-set",
|
|
112121
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,
|
|
112122
112198
|
importExistingResources: options.importExistingResources ?? true
|
|
112123
112199
|
},
|
|
112124
112200
|
parameters,
|
|
@@ -112987,6 +113063,20 @@ async function writeFileAtomic(filename, contents) {
|
|
|
112987
113063
|
await import_fs3.promises.writeFile(tmpFile, contents, { encoding: "utf-8" });
|
|
112988
113064
|
await import_fs3.promises.rename(tmpFile, filename);
|
|
112989
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
|
+
}
|
|
112990
113080
|
async function deleteFile(filename) {
|
|
112991
113081
|
try {
|
|
112992
113082
|
await import_fs3.promises.unlink(filename);
|
|
@@ -113005,18 +113095,20 @@ function processExists(pid) {
|
|
|
113005
113095
|
return false;
|
|
113006
113096
|
}
|
|
113007
113097
|
}
|
|
113008
|
-
var import_fs3, path26, RWLock, tmpCounter;
|
|
113098
|
+
var import_fs3, path26, ownedLockFiles, readCounter, RWLock, tmpCounter;
|
|
113009
113099
|
var init_rwlock = __esm({
|
|
113010
113100
|
"../@aws-cdk/toolkit-lib/lib/api/rwlock.ts"() {
|
|
113011
113101
|
"use strict";
|
|
113012
113102
|
import_fs3 = require("fs");
|
|
113013
113103
|
path26 = __toESM(require("path"));
|
|
113014
113104
|
init_toolkit_error();
|
|
113105
|
+
ownedLockFiles = /* @__PURE__ */ new Set();
|
|
113106
|
+
readCounter = 0;
|
|
113015
113107
|
RWLock = class {
|
|
113016
113108
|
constructor(directory) {
|
|
113017
113109
|
this.directory = directory;
|
|
113018
113110
|
this.pidString = `${process.pid}`;
|
|
113019
|
-
this.writerFile = path26.
|
|
113111
|
+
this.writerFile = path26.resolve(this.directory, "synth.lock");
|
|
113020
113112
|
}
|
|
113021
113113
|
directory;
|
|
113022
113114
|
static {
|
|
@@ -113024,7 +113116,6 @@ var init_rwlock = __esm({
|
|
|
113024
113116
|
}
|
|
113025
113117
|
pidString;
|
|
113026
113118
|
writerFile;
|
|
113027
|
-
readCounter = 0;
|
|
113028
113119
|
/**
|
|
113029
113120
|
* Acquire a writer lock.
|
|
113030
113121
|
*
|
|
@@ -113036,18 +113127,18 @@ var init_rwlock = __esm({
|
|
|
113036
113127
|
if (readers.length > 0) {
|
|
113037
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.`);
|
|
113038
113129
|
}
|
|
113039
|
-
await
|
|
113130
|
+
await writeLockFile(this.writerFile, this.pidString);
|
|
113040
113131
|
let released = false;
|
|
113041
113132
|
return {
|
|
113042
113133
|
release: /* @__PURE__ */ __name(async () => {
|
|
113043
113134
|
if (!released) {
|
|
113044
|
-
await
|
|
113135
|
+
await deleteLockFile(this.writerFile);
|
|
113045
113136
|
released = true;
|
|
113046
113137
|
}
|
|
113047
113138
|
}, "release"),
|
|
113048
113139
|
convertToReaderLock: /* @__PURE__ */ __name(async () => {
|
|
113049
113140
|
const ret = await this.doAcquireRead();
|
|
113050
|
-
await
|
|
113141
|
+
await deleteLockFile(this.writerFile);
|
|
113051
113142
|
return ret;
|
|
113052
113143
|
}, "convertToReaderLock")
|
|
113053
113144
|
};
|
|
@@ -113069,19 +113160,19 @@ var init_rwlock = __esm({
|
|
|
113069
113160
|
* is incremented "atomically" from the point of view of this PID.).
|
|
113070
113161
|
*/
|
|
113071
113162
|
readerFile() {
|
|
113072
|
-
return path26.
|
|
113163
|
+
return path26.resolve(this.directory, `read.${this.pidString}.${++readCounter}.lock`);
|
|
113073
113164
|
}
|
|
113074
113165
|
/**
|
|
113075
113166
|
* Do the actual acquiring of a read lock.
|
|
113076
113167
|
*/
|
|
113077
113168
|
async doAcquireRead() {
|
|
113078
113169
|
const readerFile = this.readerFile();
|
|
113079
|
-
await
|
|
113170
|
+
await writeLockFile(readerFile, this.pidString);
|
|
113080
113171
|
let released = false;
|
|
113081
113172
|
return {
|
|
113082
113173
|
release: /* @__PURE__ */ __name(async () => {
|
|
113083
113174
|
if (!released) {
|
|
113084
|
-
await
|
|
113175
|
+
await deleteLockFile(readerFile);
|
|
113085
113176
|
released = true;
|
|
113086
113177
|
}
|
|
113087
113178
|
}, "release")
|
|
@@ -113106,7 +113197,7 @@ var init_rwlock = __esm({
|
|
|
113106
113197
|
return void 0;
|
|
113107
113198
|
}
|
|
113108
113199
|
const pid = parseInt(contents, 10);
|
|
113109
|
-
if (
|
|
113200
|
+
if (isStale(this.writerFile, pid)) {
|
|
113110
113201
|
await deleteFile(this.writerFile);
|
|
113111
113202
|
return void 0;
|
|
113112
113203
|
}
|
|
@@ -113135,10 +113226,11 @@ var init_rwlock = __esm({
|
|
|
113135
113226
|
const m4 = fname.match(re);
|
|
113136
113227
|
if (m4) {
|
|
113137
113228
|
const pid = parseInt(m4[1], 10);
|
|
113138
|
-
|
|
113139
|
-
|
|
113229
|
+
const file = path26.resolve(this.directory, fname);
|
|
113230
|
+
if (isStale(file, pid)) {
|
|
113231
|
+
await deleteFile(file);
|
|
113140
113232
|
} else {
|
|
113141
|
-
|
|
113233
|
+
ret.push(pid);
|
|
113142
113234
|
}
|
|
113143
113235
|
}
|
|
113144
113236
|
}
|
|
@@ -113148,6 +113240,9 @@ var init_rwlock = __esm({
|
|
|
113148
113240
|
__name(readFileIfExists, "readFileIfExists");
|
|
113149
113241
|
tmpCounter = 0;
|
|
113150
113242
|
__name(writeFileAtomic, "writeFileAtomic");
|
|
113243
|
+
__name(writeLockFile, "writeLockFile");
|
|
113244
|
+
__name(deleteLockFile, "deleteLockFile");
|
|
113245
|
+
__name(isStale, "isStale");
|
|
113151
113246
|
__name(deleteFile, "deleteFile");
|
|
113152
113247
|
__name(processExists, "processExists");
|
|
113153
113248
|
}
|
|
@@ -285229,7 +285324,7 @@ var require_dist_cjs45 = __commonJS({
|
|
|
285229
285324
|
return (numFailures) => Math.pow(1.2, numFailures);
|
|
285230
285325
|
}
|
|
285231
285326
|
sleep(ms) {
|
|
285232
|
-
return new Promise((
|
|
285327
|
+
return new Promise((resolve17) => setTimeout(resolve17, ms));
|
|
285233
285328
|
}
|
|
285234
285329
|
async retryWithBackoff(operation2) {
|
|
285235
285330
|
let lastError;
|
|
@@ -285712,7 +285807,7 @@ async function v3ProviderFromPlugin(producer) {
|
|
|
285712
285807
|
} else if (isV2Credentials(initial)) {
|
|
285713
285808
|
return v3ProviderFromV2Credentials(initial);
|
|
285714
285809
|
} else {
|
|
285715
|
-
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)})`);
|
|
285716
285811
|
}
|
|
285717
285812
|
}
|
|
285718
285813
|
function v3ProviderFromV2Credentials(x) {
|
|
@@ -285731,7 +285826,7 @@ function refreshFromPluginProvider(current, producer) {
|
|
|
285731
285826
|
if (credentialsAboutToExpire(current)) {
|
|
285732
285827
|
const newCreds = await producer();
|
|
285733
285828
|
if (!isV3Credentials(newCreds)) {
|
|
285734
|
-
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)})`);
|
|
285735
285830
|
}
|
|
285736
285831
|
current = newCreds;
|
|
285737
285832
|
}
|
|
@@ -285741,17 +285836,22 @@ function refreshFromPluginProvider(current, producer) {
|
|
|
285741
285836
|
function isV3Provider(x) {
|
|
285742
285837
|
return typeof x === "function";
|
|
285743
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
|
+
}
|
|
285744
285845
|
function isV2Credentials(x) {
|
|
285745
285846
|
return !!(x && typeof x === "object" && x.getPromise);
|
|
285746
285847
|
}
|
|
285747
285848
|
function isV3Credentials(x) {
|
|
285748
285849
|
return !!(x && typeof x === "object" && x.accessKeyId && !isV2Credentials(x));
|
|
285749
285850
|
}
|
|
285750
|
-
var
|
|
285851
|
+
var CredentialPlugins;
|
|
285751
285852
|
var init_credential_plugins = __esm({
|
|
285752
285853
|
"../@aws-cdk/toolkit-lib/lib/api/aws-auth/credential-plugins.ts"() {
|
|
285753
285854
|
"use strict";
|
|
285754
|
-
import_util45 = require("util");
|
|
285755
285855
|
init_provider_caching();
|
|
285756
285856
|
init_toolkit_error();
|
|
285757
285857
|
init_util4();
|
|
@@ -285817,6 +285917,7 @@ var init_credential_plugins = __esm({
|
|
|
285817
285917
|
__name(v3ProviderFromV2Credentials, "v3ProviderFromV2Credentials");
|
|
285818
285918
|
__name(refreshFromPluginProvider, "refreshFromPluginProvider");
|
|
285819
285919
|
__name(isV3Provider, "isV3Provider");
|
|
285920
|
+
__name(describeShape, "describeShape");
|
|
285820
285921
|
__name(isV2Credentials, "isV2Credentials");
|
|
285821
285922
|
__name(isV3Credentials, "isV3Credentials");
|
|
285822
285923
|
}
|
|
@@ -286150,7 +286251,7 @@ function formatSdkLoggerContent(content) {
|
|
|
286150
286251
|
return apiFmt;
|
|
286151
286252
|
}
|
|
286152
286253
|
}
|
|
286153
|
-
return content.map((x) => typeof x === "string" ? x : (0,
|
|
286254
|
+
return content.map((x) => typeof x === "string" ? x : (0, import_util47.inspect)(x)).join("");
|
|
286154
286255
|
}
|
|
286155
286256
|
function formatApiCall(content) {
|
|
286156
286257
|
if (!isSdkApiCallSuccess(content) && !isSdkApiCallError(content)) {
|
|
@@ -286176,11 +286277,11 @@ function isSdkApiCallSuccess(x) {
|
|
|
286176
286277
|
function isSdkApiCallError(x) {
|
|
286177
286278
|
return x && typeof x === "object" && x.commandName && x.error;
|
|
286178
286279
|
}
|
|
286179
|
-
var
|
|
286280
|
+
var import_util47, IoHostSdkLogger;
|
|
286180
286281
|
var init_sdk_logger = __esm({
|
|
286181
286282
|
"../@aws-cdk/toolkit-lib/lib/api/aws-auth/sdk-logger.ts"() {
|
|
286182
286283
|
"use strict";
|
|
286183
|
-
|
|
286284
|
+
import_util47 = require("util");
|
|
286184
286285
|
init_util4();
|
|
286185
286286
|
init_private();
|
|
286186
286287
|
IoHostSdkLogger = class {
|
|
@@ -286192,7 +286293,7 @@ var init_sdk_logger = __esm({
|
|
|
286192
286293
|
this.ioHelper = ioHelper;
|
|
286193
286294
|
}
|
|
286194
286295
|
notify(level, ...content) {
|
|
286195
|
-
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)), {
|
|
286196
286297
|
sdkLevel: level,
|
|
286197
286298
|
content
|
|
286198
286299
|
}));
|
|
@@ -288689,7 +288790,7 @@ var require_placeholders = __commonJS({
|
|
|
288689
288790
|
"use strict";
|
|
288690
288791
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
288691
288792
|
exports2.EnvironmentPlaceholders = void 0;
|
|
288692
|
-
var
|
|
288793
|
+
var EnvironmentPlaceholders5 = class _EnvironmentPlaceholders {
|
|
288693
288794
|
static {
|
|
288694
288795
|
__name(this, "EnvironmentPlaceholders");
|
|
288695
288796
|
}
|
|
@@ -288753,10 +288854,10 @@ var require_placeholders = __commonJS({
|
|
|
288753
288854
|
return ret;
|
|
288754
288855
|
}
|
|
288755
288856
|
};
|
|
288756
|
-
exports2.EnvironmentPlaceholders =
|
|
288757
|
-
|
|
288758
|
-
|
|
288759
|
-
|
|
288857
|
+
exports2.EnvironmentPlaceholders = EnvironmentPlaceholders5;
|
|
288858
|
+
EnvironmentPlaceholders5.CURRENT_REGION = "${AWS::Region}";
|
|
288859
|
+
EnvironmentPlaceholders5.CURRENT_ACCOUNT = "${AWS::AccountId}";
|
|
288860
|
+
EnvironmentPlaceholders5.CURRENT_PARTITION = "${AWS::Partition}";
|
|
288760
288861
|
function replaceAll2(s2, search, replace) {
|
|
288761
288862
|
return s2.split(search).join(replace);
|
|
288762
288863
|
}
|
|
@@ -291276,12 +291377,12 @@ var init_readable_assembly = __esm({
|
|
|
291276
291377
|
});
|
|
291277
291378
|
|
|
291278
291379
|
// ../@aws-cdk/toolkit-lib/lib/api/cloud-assembly/source-builder.ts
|
|
291279
|
-
var path31,
|
|
291380
|
+
var path31, import_util52, cxapi6, fs31, CloudAssemblySourceBuilder;
|
|
291280
291381
|
var init_source_builder = __esm({
|
|
291281
291382
|
"../@aws-cdk/toolkit-lib/lib/api/cloud-assembly/source-builder.ts"() {
|
|
291282
291383
|
"use strict";
|
|
291283
291384
|
path31 = __toESM(require("path"));
|
|
291284
|
-
|
|
291385
|
+
import_util52 = require("util");
|
|
291285
291386
|
cxapi6 = __toESM(require_lib3());
|
|
291286
291387
|
fs31 = __toESM(require_lib4());
|
|
291287
291388
|
init_context_store();
|
|
@@ -291347,7 +291448,7 @@ var init_source_builder = __esm({
|
|
|
291347
291448
|
...await contextStore.read(),
|
|
291348
291449
|
...synthParams.context
|
|
291349
291450
|
};
|
|
291350
|
-
await services.ioHelper.defaults.debug((0,
|
|
291451
|
+
await services.ioHelper.defaults.debug((0, import_util52.format)("context:", fullContext));
|
|
291351
291452
|
const env3 = noUndefined({
|
|
291352
291453
|
// Versioning, outdir, default account and region
|
|
291353
291454
|
...await execution.defaultEnvVars(),
|
|
@@ -291393,6 +291494,14 @@ var init_source_builder = __esm({
|
|
|
291393
291494
|
* the CloudAssembly is being used, no CDK app synthesis can take place into
|
|
291394
291495
|
* that directory.
|
|
291395
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
|
+
*
|
|
291396
291505
|
* @param directory - directory the directory of a already produced Cloud Assembly.
|
|
291397
291506
|
* @returns the CloudAssembly source
|
|
291398
291507
|
*/
|
|
@@ -291486,7 +291595,7 @@ var init_source_builder = __esm({
|
|
|
291486
291595
|
...await contextStore.read(),
|
|
291487
291596
|
...synthParams.context
|
|
291488
291597
|
};
|
|
291489
|
-
await services.ioHelper.defaults.debug((0,
|
|
291598
|
+
await services.ioHelper.defaults.debug((0, import_util52.format)("context:", fullContext));
|
|
291490
291599
|
const env3 = noUndefined({
|
|
291491
291600
|
// Need to start with full env of `writeContextToEnv` will not be able to do the size
|
|
291492
291601
|
// calculation correctly.
|
|
@@ -292506,14 +292615,13 @@ var init_io = __esm({
|
|
|
292506
292615
|
});
|
|
292507
292616
|
|
|
292508
292617
|
// ../@aws-cdk/toolkit-lib/lib/api/logs-monitor/logs-monitor.ts
|
|
292509
|
-
var
|
|
292618
|
+
var import_node_crypto13, util7, import_chalk16, CloudWatchLogEventMonitor;
|
|
292510
292619
|
var init_logs_monitor2 = __esm({
|
|
292511
292620
|
"../@aws-cdk/toolkit-lib/lib/api/logs-monitor/logs-monitor.ts"() {
|
|
292512
292621
|
"use strict";
|
|
292513
|
-
|
|
292622
|
+
import_node_crypto13 = require("node:crypto");
|
|
292514
292623
|
util7 = __toESM(require("node:util"));
|
|
292515
292624
|
import_chalk16 = __toESM(require_source());
|
|
292516
|
-
init_util4();
|
|
292517
292625
|
init_private();
|
|
292518
292626
|
CloudWatchLogEventMonitor = class {
|
|
292519
292627
|
static {
|
|
@@ -292546,7 +292654,7 @@ var init_logs_monitor2 = __esm({
|
|
|
292546
292654
|
* resume reading/printing events
|
|
292547
292655
|
*/
|
|
292548
292656
|
async activate() {
|
|
292549
|
-
this.monitorId = (0,
|
|
292657
|
+
this.monitorId = (0, import_node_crypto13.randomUUID)();
|
|
292550
292658
|
await this.ioHelper.notify(IO.CDK_TOOLKIT_I5032.msg("Start monitoring log groups", {
|
|
292551
292659
|
monitor: this.monitorId,
|
|
292552
292660
|
logGroupNames: this.logGroupNames()
|
|
@@ -292611,27 +292719,44 @@ var init_logs_monitor2 = __esm({
|
|
|
292611
292719
|
return;
|
|
292612
292720
|
}
|
|
292613
292721
|
try {
|
|
292614
|
-
const
|
|
292615
|
-
|
|
292616
|
-
|
|
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
|
+
}
|
|
292617
292730
|
}
|
|
292618
292731
|
if (!this.monitorId) {
|
|
292619
292732
|
return;
|
|
292620
292733
|
}
|
|
292621
292734
|
} catch (e6) {
|
|
292622
|
-
await this.
|
|
292735
|
+
await this.reportError(e6);
|
|
292623
292736
|
}
|
|
292624
292737
|
this.scheduleNextTick();
|
|
292625
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
|
+
}
|
|
292626
292746
|
/**
|
|
292627
292747
|
* Reads all new log events from a set of CloudWatch Log Groups
|
|
292628
292748
|
* in parallel
|
|
292749
|
+
*
|
|
292750
|
+
* A failure for one log group does not discard the events of the other log groups.
|
|
292629
292751
|
*/
|
|
292630
292752
|
async readNewEvents() {
|
|
292631
292753
|
const promises8 = [];
|
|
292632
292754
|
for (const settings of this.envsLogGroupsAccessSettings.values()) {
|
|
292633
292755
|
for (const group4 of Object.keys(settings.logGroupsStartTimes)) {
|
|
292634
|
-
promises8.push(this.readEventsFromLogGroup(settings, group4)
|
|
292756
|
+
promises8.push(this.readEventsFromLogGroup(settings, group4).then(
|
|
292757
|
+
(events) => ({ events }),
|
|
292758
|
+
(error3) => ({ error: error3 })
|
|
292759
|
+
));
|
|
292635
292760
|
}
|
|
292636
292761
|
}
|
|
292637
292762
|
return Promise.all(promises8);
|
|
@@ -292813,11 +292938,11 @@ function removeNonImportResources(stack) {
|
|
|
292813
292938
|
delete template.Outputs;
|
|
292814
292939
|
return template;
|
|
292815
292940
|
}
|
|
292816
|
-
var
|
|
292941
|
+
var import_util55, cfnDiff, import_chalk17, fs32, ResourceImporter;
|
|
292817
292942
|
var init_importer = __esm({
|
|
292818
292943
|
"../@aws-cdk/toolkit-lib/lib/api/resource-import/importer.ts"() {
|
|
292819
292944
|
"use strict";
|
|
292820
|
-
|
|
292945
|
+
import_util55 = require("util");
|
|
292821
292946
|
cfnDiff = __toESM(require_lib9());
|
|
292822
292947
|
import_chalk17 = __toESM(require_source());
|
|
292823
292948
|
fs32 = __toESM(require_lib4());
|
|
@@ -292881,12 +293006,12 @@ var init_importer = __esm({
|
|
|
292881
293006
|
const descr = this.describeResource(resource.logicalId);
|
|
292882
293007
|
const idProps = remaining[resource.logicalId];
|
|
292883
293008
|
if (idProps) {
|
|
292884
|
-
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))));
|
|
292885
293010
|
ret.importResources.push(resource);
|
|
292886
293011
|
ret.resourceMap[resource.logicalId] = idProps;
|
|
292887
293012
|
delete remaining[resource.logicalId];
|
|
292888
293013
|
} else {
|
|
292889
|
-
await this.ioHelper.defaults.info((0,
|
|
293014
|
+
await this.ioHelper.defaults.info((0, import_util55.format)("%s: skipping", import_chalk17.default.blue(descr)));
|
|
292890
293015
|
}
|
|
292891
293016
|
}
|
|
292892
293017
|
const unknown = Object.keys(remaining);
|
|
@@ -292930,9 +293055,9 @@ var init_importer = __esm({
|
|
|
292930
293055
|
});
|
|
292931
293056
|
assertIsSuccessfulDeployStackResult(result2);
|
|
292932
293057
|
const message2 = result2.noOp ? "\u2705 %s (no changes)" : "\u2705 %s";
|
|
292933
|
-
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)));
|
|
292934
293059
|
} catch (e6) {
|
|
292935
|
-
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 }));
|
|
292936
293061
|
throw e6;
|
|
292937
293062
|
}
|
|
292938
293063
|
}
|
|
@@ -293062,7 +293187,7 @@ var init_importer = __esm({
|
|
|
293062
293187
|
for (const idProp of idProps) {
|
|
293063
293188
|
const defaultValue2 = resourceProps[idProp] ?? "";
|
|
293064
293189
|
const response = await this.ioHelper.requestResponse(IO.CDK_TOOLKIT_I3110.req(
|
|
293065
|
-
(0,
|
|
293190
|
+
(0, import_util55.format)(promptPattern, import_chalk17.default.blue(idProp)),
|
|
293066
293191
|
{
|
|
293067
293192
|
resource: {
|
|
293068
293193
|
name: resourceName,
|
|
@@ -293344,10 +293469,11 @@ var init_private4 = __esm({
|
|
|
293344
293469
|
});
|
|
293345
293470
|
|
|
293346
293471
|
// ../@aws-cdk/toolkit-lib/lib/api/orphan/orphaner.ts
|
|
293347
|
-
var ResourceOrphaner;
|
|
293472
|
+
var import_node_crypto14, ResourceOrphaner;
|
|
293348
293473
|
var init_orphaner = __esm({
|
|
293349
293474
|
"../@aws-cdk/toolkit-lib/lib/api/orphan/orphaner.ts"() {
|
|
293350
293475
|
"use strict";
|
|
293476
|
+
import_node_crypto14 = require("node:crypto");
|
|
293351
293477
|
init_private4();
|
|
293352
293478
|
init_toolkit_error();
|
|
293353
293479
|
ResourceOrphaner = class {
|
|
@@ -293402,6 +293528,7 @@ var init_orphaner = __esm({
|
|
|
293402
293528
|
async execute(stack, logicalIds, currentTemplate) {
|
|
293403
293529
|
const env3 = await this.deployments.envs.accessStackForReadOnlyStackOperations(stack);
|
|
293404
293530
|
const cfn = env3.sdk.cloudFormation();
|
|
293531
|
+
const operationId = (0, import_node_crypto14.randomUUID)();
|
|
293405
293532
|
const stackResources = await cfn.listStackResources({ StackName: stack.stackName });
|
|
293406
293533
|
const physicalIds = /* @__PURE__ */ new Map();
|
|
293407
293534
|
for (const res of stackResources) {
|
|
@@ -293410,7 +293537,7 @@ var init_orphaner = __esm({
|
|
|
293410
293537
|
}
|
|
293411
293538
|
}
|
|
293412
293539
|
await this.ioHelper.defaults.info("Step 1/3: Resolving attribute values...");
|
|
293413
|
-
const resolvedValues = await this.resolveGetAttValues(stack, cfn, logicalIds, currentTemplate, physicalIds);
|
|
293540
|
+
const resolvedValues = await this.resolveGetAttValues(stack, cfn, logicalIds, currentTemplate, physicalIds, operationId);
|
|
293414
293541
|
await this.ioHelper.defaults.info("Step 2/3: Decoupling resources...");
|
|
293415
293542
|
const decoupledTemplate = JSON.parse(JSON.stringify(currentTemplate));
|
|
293416
293543
|
for (const id of logicalIds) {
|
|
@@ -293419,7 +293546,7 @@ var init_orphaner = __esm({
|
|
|
293419
293546
|
decoupledTemplate.Resources[id].DeletionPolicy = "Retain";
|
|
293420
293547
|
decoupledTemplate.Resources[id].UpdateReplacePolicy = "Retain";
|
|
293421
293548
|
}
|
|
293422
|
-
const step2Result = await this.deployStack(stack, decoupledTemplate,
|
|
293549
|
+
const step2Result = await this.deployStack(stack, decoupledTemplate, `cdk-orphan-step2-${operationId}`);
|
|
293423
293550
|
assertDeploySucceeded(step2Result, "Step 2");
|
|
293424
293551
|
await this.ioHelper.defaults.info("Step 3/3: Removing resources from stack...");
|
|
293425
293552
|
const removalTemplate = JSON.parse(JSON.stringify(decoupledTemplate));
|
|
@@ -293427,7 +293554,7 @@ var init_orphaner = __esm({
|
|
|
293427
293554
|
delete removalTemplate.Resources[id];
|
|
293428
293555
|
}
|
|
293429
293556
|
ensureNonEmptyResources(removalTemplate);
|
|
293430
|
-
const step3Result = await this.deployStack(stack, removalTemplate,
|
|
293557
|
+
const step3Result = await this.deployStack(stack, removalTemplate, `cdk-orphan-step3-${operationId}`);
|
|
293431
293558
|
assertDeploySucceeded(step3Result, "Step 3");
|
|
293432
293559
|
if (step3Result.noOp) {
|
|
293433
293560
|
throw new ToolkitError(
|
|
@@ -293463,7 +293590,7 @@ var init_orphaner = __esm({
|
|
|
293463
293590
|
*
|
|
293464
293591
|
* Returns a complete map of resolved values (Ref + attrs) for each logical ID.
|
|
293465
293592
|
*/
|
|
293466
|
-
async resolveGetAttValues(stack, cfn, logicalIds, currentTemplate, physicalIds) {
|
|
293593
|
+
async resolveGetAttValues(stack, cfn, logicalIds, currentTemplate, physicalIds, operationId) {
|
|
293467
293594
|
const values = /* @__PURE__ */ new Map();
|
|
293468
293595
|
for (const id of logicalIds) {
|
|
293469
293596
|
const physicalId = physicalIds.get(id);
|
|
@@ -293485,7 +293612,7 @@ var init_orphaner = __esm({
|
|
|
293485
293612
|
Value: { "Fn::GetAtt": [ref.logicalId, ref.attr] }
|
|
293486
293613
|
};
|
|
293487
293614
|
}
|
|
293488
|
-
const step1Result = await this.deployStack(stack, resolveTemplate,
|
|
293615
|
+
const step1Result = await this.deployStack(stack, resolveTemplate, `cdk-orphan-step1-${operationId}`);
|
|
293489
293616
|
assertDeploySucceeded(step1Result, "Step 1");
|
|
293490
293617
|
const stackDesc = await cfn.describeStacks({ StackName: stack.stackName });
|
|
293491
293618
|
for (const output of stackDesc.Stacks?.[0]?.Outputs ?? []) {
|
|
@@ -294436,10 +294563,10 @@ var init_stack_refresh = __esm({
|
|
|
294436
294563
|
if (this.lastRefreshTime >= horizon) {
|
|
294437
294564
|
return Promise.resolve();
|
|
294438
294565
|
}
|
|
294439
|
-
return new Promise((
|
|
294566
|
+
return new Promise((resolve17, reject) => {
|
|
294440
294567
|
const onRefresh = /* @__PURE__ */ __name(() => {
|
|
294441
294568
|
clearTimeout(timeoutHandle);
|
|
294442
|
-
|
|
294569
|
+
resolve17(void 0);
|
|
294443
294570
|
}, "onRefresh");
|
|
294444
294571
|
this.queuedPromises.push(onRefresh);
|
|
294445
294572
|
const timeoutHandle = setTimeout(() => {
|
|
@@ -296068,7 +296195,7 @@ var init_handler = __esm({
|
|
|
296068
296195
|
this._addToNodeFs(path54, initialAdd, wh, depth + 1);
|
|
296069
296196
|
}
|
|
296070
296197
|
}).on(EV.ERROR, this._boundHandleError);
|
|
296071
|
-
return new Promise((
|
|
296198
|
+
return new Promise((resolve17, reject) => {
|
|
296072
296199
|
if (!stream)
|
|
296073
296200
|
return reject();
|
|
296074
296201
|
stream.once(STR_END, () => {
|
|
@@ -296077,7 +296204,7 @@ var init_handler = __esm({
|
|
|
296077
296204
|
return;
|
|
296078
296205
|
}
|
|
296079
296206
|
const wasThrottled = throttler ? throttler.clear() : false;
|
|
296080
|
-
|
|
296207
|
+
resolve17(void 0);
|
|
296081
296208
|
previous.getChildren().filter((item) => {
|
|
296082
296209
|
return item !== directory && !current.has(item);
|
|
296083
296210
|
}).forEach((item) => {
|
|
@@ -298620,7 +298747,7 @@ function partitionByAmbiguity(overrides, moves) {
|
|
|
298620
298747
|
nonAmbiguous.push(move);
|
|
298621
298748
|
} else {
|
|
298622
298749
|
for (const override of overrides) {
|
|
298623
|
-
const resolvedMove =
|
|
298750
|
+
const resolvedMove = resolve17(override, move);
|
|
298624
298751
|
if (resolvedMove != null) {
|
|
298625
298752
|
nonAmbiguous.push(resolvedMove);
|
|
298626
298753
|
move = remove2(override, move);
|
|
@@ -298633,13 +298760,13 @@ function partitionByAmbiguity(overrides, moves) {
|
|
|
298633
298760
|
}
|
|
298634
298761
|
}
|
|
298635
298762
|
}
|
|
298636
|
-
function
|
|
298763
|
+
function resolve17(override, move) {
|
|
298637
298764
|
const [pre, post] = move;
|
|
298638
298765
|
const source = pre.find((loc) => loc.equalTo(override.source));
|
|
298639
298766
|
const destination = post.find((loc) => loc.equalTo(override.destination));
|
|
298640
298767
|
return source && destination ? [[source], [destination]] : void 0;
|
|
298641
298768
|
}
|
|
298642
|
-
__name(
|
|
298769
|
+
__name(resolve17, "resolve");
|
|
298643
298770
|
function remove2(override, move) {
|
|
298644
298771
|
const [pre, post] = move;
|
|
298645
298772
|
return [
|
|
@@ -298650,41 +298777,17 @@ function partitionByAmbiguity(overrides, moves) {
|
|
|
298650
298777
|
__name(remove2, "remove");
|
|
298651
298778
|
return [nonAmbiguous, ambiguous];
|
|
298652
298779
|
}
|
|
298653
|
-
|
|
298654
|
-
let partition4 = /* @__PURE__ */ __name(async () => {
|
|
298655
|
-
const p3 = await aws.discoverPartition();
|
|
298656
|
-
partition4 = /* @__PURE__ */ __name(() => Promise.resolve(p3), "partition");
|
|
298657
|
-
return p3;
|
|
298658
|
-
}, "partition");
|
|
298659
|
-
let account = /* @__PURE__ */ __name(async () => {
|
|
298660
|
-
const a6 = await aws.discoverCurrentAccount();
|
|
298661
|
-
account = /* @__PURE__ */ __name(() => Promise.resolve(a6), "account");
|
|
298662
|
-
return a6;
|
|
298663
|
-
}, "account");
|
|
298664
|
-
return import_cloud_assembly_api13.EnvironmentPlaceholders.replaceAsync(object, {
|
|
298665
|
-
async region() {
|
|
298666
|
-
return object.region ?? aws.discoverDefaultRegion();
|
|
298667
|
-
},
|
|
298668
|
-
async accountId() {
|
|
298669
|
-
return (await account()).accountId;
|
|
298670
|
-
},
|
|
298671
|
-
async partition() {
|
|
298672
|
-
return partition4();
|
|
298673
|
-
}
|
|
298674
|
-
});
|
|
298675
|
-
}
|
|
298676
|
-
var import_cdk_assets_lib5, import_cloud_assembly_api13, RefactoringContext;
|
|
298780
|
+
var RefactoringContext;
|
|
298677
298781
|
var init_context3 = __esm({
|
|
298678
298782
|
"../@aws-cdk/toolkit-lib/lib/api/refactoring/context.ts"() {
|
|
298679
298783
|
"use strict";
|
|
298680
|
-
import_cdk_assets_lib5 = __toESM(require_lib5());
|
|
298681
|
-
import_cloud_assembly_api13 = __toESM(require_lib3());
|
|
298682
298784
|
init_cloudformation4();
|
|
298683
298785
|
init_digest();
|
|
298684
298786
|
init_toolkit_error();
|
|
298685
298787
|
init_sets();
|
|
298686
298788
|
init_cfn_api();
|
|
298687
298789
|
init_environment2();
|
|
298790
|
+
init_placeholders3();
|
|
298688
298791
|
init_plugin2();
|
|
298689
298792
|
RefactoringContext = class {
|
|
298690
298793
|
static {
|
|
@@ -298785,8 +298888,8 @@ var init_context3 = __esm({
|
|
|
298785
298888
|
const arn = Array.from(roleArns)[0];
|
|
298786
298889
|
if (arn != null) {
|
|
298787
298890
|
const resolvedEnv = await sdkProvider.resolveEnvironment(env3);
|
|
298788
|
-
const
|
|
298789
|
-
return
|
|
298891
|
+
const { assumeRoleArn } = await replaceEnvPlaceholders({ assumeRoleArn: arn }, resolvedEnv, sdkProvider);
|
|
298892
|
+
return assumeRoleArn;
|
|
298790
298893
|
}
|
|
298791
298894
|
return void 0;
|
|
298792
298895
|
}
|
|
@@ -298800,7 +298903,6 @@ var init_context3 = __esm({
|
|
|
298800
298903
|
__name(isAmbiguousMove, "isAmbiguousMove");
|
|
298801
298904
|
__name(resourceMappings, "resourceMappings");
|
|
298802
298905
|
__name(partitionByAmbiguity, "partitionByAmbiguity");
|
|
298803
|
-
__name(replaceAwsPlaceholders2, "replaceAwsPlaceholders");
|
|
298804
298906
|
}
|
|
298805
298907
|
});
|
|
298806
298908
|
|
|
@@ -299005,7 +299107,8 @@ async function cfnDiff2(ioHelper, stacks, deployments, options, sdkProvider, inc
|
|
|
299005
299107
|
parameters: methodOptions.parameters ?? {},
|
|
299006
299108
|
failOnError: !(methodOptions.fallbackToTemplate ?? true),
|
|
299007
299109
|
importExistingResources: methodOptions.importExistingResources,
|
|
299008
|
-
|
|
299110
|
+
changeSetName: methodOptions.changeSetName,
|
|
299111
|
+
uuid: (0, import_node_crypto15.randomUUID)()
|
|
299009
299112
|
}))?.changeSet : void 0;
|
|
299010
299113
|
if (changeSet) {
|
|
299011
299114
|
await attachNestedChangeSetData(ioHelper, deployments, stack, changeSet, nestedStacks);
|
|
@@ -299058,11 +299161,11 @@ function appendObject(obj1, obj2) {
|
|
|
299058
299161
|
}
|
|
299059
299162
|
return obj1;
|
|
299060
299163
|
}
|
|
299061
|
-
var
|
|
299164
|
+
var import_node_crypto15, fs34;
|
|
299062
299165
|
var init_helpers5 = __esm({
|
|
299063
299166
|
"../@aws-cdk/toolkit-lib/lib/actions/diff/private/helpers.ts"() {
|
|
299064
299167
|
"use strict";
|
|
299065
|
-
|
|
299168
|
+
import_node_crypto15 = require("node:crypto");
|
|
299066
299169
|
fs34 = __toESM(require_lib4());
|
|
299067
299170
|
init_diff4();
|
|
299068
299171
|
init_change_sets();
|
|
@@ -299092,8 +299195,8 @@ function countAssemblyResults(span, assembly) {
|
|
|
299092
299195
|
const stacksRecursively = assembly.stacksRecursively;
|
|
299093
299196
|
span.incCounter("stacks", stacksRecursively.length);
|
|
299094
299197
|
span.incCounter("assemblies", asmCount(assembly));
|
|
299095
|
-
span.incCounter("errorAnns", sum3(stacksRecursively.map((s2) => s2.messages.filter((m4) => m4.level ===
|
|
299096
|
-
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)));
|
|
299097
299200
|
const annotationErrorCodes = stacksRecursively.flatMap((s2) => Object.values(s2.metadata ?? {}).flatMap((ms) => ms.filter((m4) => m4.type === ANNOTATION_ERROR_CODE_TYPE)));
|
|
299098
299201
|
for (const annotationErrorCode of annotationErrorCodes) {
|
|
299099
299202
|
span.incCounter(`errorAnn:${annotationErrorCode.data}`);
|
|
@@ -299106,11 +299209,11 @@ function countAssemblyResults(span, assembly) {
|
|
|
299106
299209
|
function sum3(xs) {
|
|
299107
299210
|
return xs.reduce((a6, b6) => a6 + b6, 0);
|
|
299108
299211
|
}
|
|
299109
|
-
var
|
|
299212
|
+
var import_cloud_assembly_api13, ANNOTATION_ERROR_CODE_TYPE;
|
|
299110
299213
|
var init_count_assembly_results = __esm({
|
|
299111
299214
|
"../@aws-cdk/toolkit-lib/lib/toolkit/private/count-assembly-results.ts"() {
|
|
299112
299215
|
"use strict";
|
|
299113
|
-
|
|
299216
|
+
import_cloud_assembly_api13 = __toESM(require_lib3());
|
|
299114
299217
|
__name(countAssemblyResults, "countAssemblyResults");
|
|
299115
299218
|
__name(sum3, "sum");
|
|
299116
299219
|
ANNOTATION_ERROR_CODE_TYPE = "aws:cdk:error-code";
|
|
@@ -299438,7 +299541,7 @@ async function waitForDriftDetection(cfn, ioHelper, driftDetectionId) {
|
|
|
299438
299541
|
await ioHelper.defaults.trace("Waiting for drift detection to complete...");
|
|
299439
299542
|
checkIn = Date.now() + timeBetweenOutputs;
|
|
299440
299543
|
}
|
|
299441
|
-
await new Promise((
|
|
299544
|
+
await new Promise((resolve17) => setTimeout(resolve17, timeBetweenApiCalls));
|
|
299442
299545
|
}
|
|
299443
299546
|
}
|
|
299444
299547
|
var import_node_util8;
|
|
@@ -299955,27 +300058,25 @@ function hasWarnings(reports) {
|
|
|
299955
300058
|
return reports.some((r6) => r6.violations.some((v) => v.severity === "warning"));
|
|
299956
300059
|
}
|
|
299957
300060
|
function filterReportsByStacks(reports, selectedStackIds) {
|
|
299958
|
-
|
|
299959
|
-
|
|
299960
|
-
|
|
299961
|
-
|
|
299962
|
-
|
|
299963
|
-
|
|
299964
|
-
|
|
299965
|
-
|
|
299966
|
-
return {
|
|
299967
|
-
...violation,
|
|
299968
|
-
violatingConstructs: violation.violatingConstructs.filter(
|
|
299969
|
-
(c6) => selectedStackIds.has(c6.constructPath?.split("/")[0] ?? "")
|
|
299970
|
-
)
|
|
299971
|
-
};
|
|
299972
|
-
});
|
|
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));
|
|
299973
300069
|
return {
|
|
299974
300070
|
...report,
|
|
299975
300071
|
violations: filteredViolations,
|
|
299976
300072
|
conclusion: filteredViolations.length > 0 ? report.conclusion : "success"
|
|
299977
300073
|
};
|
|
299978
|
-
}
|
|
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");
|
|
299979
300080
|
}
|
|
299980
300081
|
var path34, import_cloud_assembly_schema6, fs35, VALIDATION_REPORT_FILE2, CONSTRUCT_ANNOTATIONS_PLUGINNAME;
|
|
299981
300082
|
var init_validation_report = __esm({
|
|
@@ -300019,12 +300120,12 @@ async function synthAndMeasure(ioHelper, cx, selectStacks) {
|
|
|
300019
300120
|
function zeroTime() {
|
|
300020
300121
|
return { asMs: 0, asSec: 0 };
|
|
300021
300122
|
}
|
|
300022
|
-
var import_dispose_polyfill7,
|
|
300123
|
+
var import_dispose_polyfill7, import_node_crypto16, path35, cxapi11, import_cloud_assembly_schema7, import_chalk29, fs36, FILE_EVENTS, Toolkit;
|
|
300023
300124
|
var init_toolkit = __esm({
|
|
300024
300125
|
"../@aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts"() {
|
|
300025
300126
|
"use strict";
|
|
300026
300127
|
import_dispose_polyfill7 = __toESM(require_dispose_polyfill());
|
|
300027
|
-
|
|
300128
|
+
import_node_crypto16 = require("node:crypto");
|
|
300028
300129
|
path35 = __toESM(require("node:path"));
|
|
300029
300130
|
cxapi11 = __toESM(require_lib3());
|
|
300030
300131
|
import_cloud_assembly_schema7 = __toESM(require_lib2());
|
|
@@ -300586,7 +300687,7 @@ var init_toolkit = __esm({
|
|
|
300586
300687
|
deployments,
|
|
300587
300688
|
stack,
|
|
300588
300689
|
parameters: {},
|
|
300589
|
-
uuid: (0,
|
|
300690
|
+
uuid: (0, import_node_crypto16.randomUUID)(),
|
|
300590
300691
|
failOnError: true
|
|
300591
300692
|
});
|
|
300592
300693
|
const diagnosis = report.diagnosis.result;
|
|
@@ -302588,7 +302689,7 @@ async function getOrCreateInstallationId(ioHelper) {
|
|
|
302588
302689
|
return cachedId;
|
|
302589
302690
|
}
|
|
302590
302691
|
}
|
|
302591
|
-
const newId = (0,
|
|
302692
|
+
const newId = (0, import_node_crypto17.randomUUID)();
|
|
302592
302693
|
try {
|
|
302593
302694
|
await ensureCacheDir();
|
|
302594
302695
|
fs37.writeFileSync(installationIdPath, newId);
|
|
@@ -302598,17 +302699,17 @@ async function getOrCreateInstallationId(ioHelper) {
|
|
|
302598
302699
|
return newId;
|
|
302599
302700
|
} catch (e6) {
|
|
302600
302701
|
await ioHelper.defaults.trace(`Error getting installation ID: ${e6}`);
|
|
302601
|
-
return (0,
|
|
302702
|
+
return (0, import_node_crypto17.randomUUID)();
|
|
302602
302703
|
}
|
|
302603
302704
|
}
|
|
302604
302705
|
async function ensureCacheDir() {
|
|
302605
302706
|
await fs37.promises.mkdir(cdkCacheDir(), { recursive: true });
|
|
302606
302707
|
}
|
|
302607
|
-
var
|
|
302708
|
+
var import_node_crypto17, fs37, path36;
|
|
302608
302709
|
var init_installation_id = __esm({
|
|
302609
302710
|
"lib/cli/telemetry/installation-id.ts"() {
|
|
302610
302711
|
"use strict";
|
|
302611
|
-
|
|
302712
|
+
import_node_crypto17 = require("node:crypto");
|
|
302612
302713
|
fs37 = __toESM(require("node:fs"));
|
|
302613
302714
|
path36 = __toESM(require("node:path"));
|
|
302614
302715
|
init_util9();
|
|
@@ -302830,7 +302931,7 @@ var require_cli_type_registry = __commonJS({
|
|
|
302830
302931
|
"debug-cli": {
|
|
302831
302932
|
type: "boolean",
|
|
302832
302933
|
default: false,
|
|
302833
|
-
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."
|
|
302834
302935
|
},
|
|
302835
302936
|
profile: {
|
|
302836
302937
|
type: "string",
|
|
@@ -303704,6 +303805,10 @@ var require_cli_type_registry = __commonJS({
|
|
|
303704
303805
|
default: true,
|
|
303705
303806
|
deprecated: "use --method instead"
|
|
303706
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
|
+
},
|
|
303707
303812
|
method: {
|
|
303708
303813
|
alias: "m",
|
|
303709
303814
|
type: "string",
|
|
@@ -304317,11 +304422,11 @@ async function tryDetectAmznPackage() {
|
|
|
304317
304422
|
}
|
|
304318
304423
|
return void 0;
|
|
304319
304424
|
}
|
|
304320
|
-
var
|
|
304425
|
+
var import_node_crypto18, fs41, os11, pathlib, import_toolkit_lib3, ABORTED_ERROR_MESSAGE, VALID_USER_AGENTS, TelemetrySession;
|
|
304321
304426
|
var init_session = __esm({
|
|
304322
304427
|
"lib/cli/telemetry/session.ts"() {
|
|
304323
304428
|
"use strict";
|
|
304324
|
-
|
|
304429
|
+
import_node_crypto18 = require("node:crypto");
|
|
304325
304430
|
fs41 = __toESM(require("node:fs/promises"));
|
|
304326
304431
|
os11 = __toESM(require("os"));
|
|
304327
304432
|
pathlib = __toESM(require("path"));
|
|
@@ -304371,7 +304476,7 @@ var init_session = __esm({
|
|
|
304371
304476
|
this._sessionInfo = {
|
|
304372
304477
|
identifiers: {
|
|
304373
304478
|
installationId: await getOrCreateInstallationId(this.ioHost.asIoHelper()),
|
|
304374
|
-
sessionId: (0,
|
|
304479
|
+
sessionId: (0, import_node_crypto18.randomUUID)(),
|
|
304375
304480
|
telemetryVersion: "2.0",
|
|
304376
304481
|
cdkCliVersion: versionNumber2(),
|
|
304377
304482
|
cdkLibraryVersion: await getLibraryVersion(this.ioHost.asIoHelper()),
|
|
@@ -306126,7 +306231,7 @@ async function dotnetAddProject(ioHelper, targetDirectory, context, ext = "cspro
|
|
|
306126
306231
|
if (attempt === MAX_ATTEMPTS) {
|
|
306127
306232
|
throw new import_toolkit_lib10.ToolkitError("DotnetSlnAddFailed", `Could not add project ${pname}.${ext} to solution ${pname}.sln. ${formatErrorMessage(e6)}`);
|
|
306128
306233
|
}
|
|
306129
|
-
await new Promise((
|
|
306234
|
+
await new Promise((resolve17) => setTimeout(resolve17, 1e3));
|
|
306130
306235
|
}
|
|
306131
306236
|
}
|
|
306132
306237
|
}
|
|
@@ -307179,8 +307284,8 @@ function chunks(list2, chunkSize) {
|
|
|
307179
307284
|
}
|
|
307180
307285
|
function setEnvironment(account, region) {
|
|
307181
307286
|
return {
|
|
307182
|
-
account: account ??
|
|
307183
|
-
region: region ??
|
|
307287
|
+
account: account ?? import_cloud_assembly_api14.UNKNOWN_ACCOUNT,
|
|
307288
|
+
region: region ?? import_cloud_assembly_api14.UNKNOWN_REGION,
|
|
307184
307289
|
name: "cdk-migrate-env"
|
|
307185
307290
|
};
|
|
307186
307291
|
}
|
|
@@ -307226,7 +307331,7 @@ async function scanProgressBar(ioHelper, scanId, cfn) {
|
|
|
307226
307331
|
curScan = await cfn.describeResourceScan(scanId);
|
|
307227
307332
|
curProgress = curScan.PercentageCompleted ?? curProgress;
|
|
307228
307333
|
printBar(30, curProgress);
|
|
307229
|
-
await new Promise((
|
|
307334
|
+
await new Promise((resolve17) => setTimeout(resolve17, 2e3));
|
|
307230
307335
|
}
|
|
307231
307336
|
await ioHelper.defaults.info("\n\u2705 Scan Complete!");
|
|
307232
307337
|
}
|
|
@@ -307248,13 +307353,13 @@ function printBar(width, progress) {
|
|
|
307248
307353
|
async function printDots(message2, timeoutx4) {
|
|
307249
307354
|
if (!process.env.MIGRATE_INTEG_TEST) {
|
|
307250
307355
|
rewriteLine(message2 + " .");
|
|
307251
|
-
await new Promise((
|
|
307356
|
+
await new Promise((resolve17) => setTimeout(resolve17, timeoutx4));
|
|
307252
307357
|
rewriteLine(message2 + " ..");
|
|
307253
|
-
await new Promise((
|
|
307358
|
+
await new Promise((resolve17) => setTimeout(resolve17, timeoutx4));
|
|
307254
307359
|
rewriteLine(message2 + " ...");
|
|
307255
|
-
await new Promise((
|
|
307360
|
+
await new Promise((resolve17) => setTimeout(resolve17, timeoutx4));
|
|
307256
307361
|
rewriteLine(message2);
|
|
307257
|
-
await new Promise((
|
|
307362
|
+
await new Promise((resolve17) => setTimeout(resolve17, timeoutx4));
|
|
307258
307363
|
}
|
|
307259
307364
|
}
|
|
307260
307365
|
function rewriteLine(message2) {
|
|
@@ -307363,13 +307468,13 @@ function deduplicateResources(resources) {
|
|
|
307363
307468
|
}
|
|
307364
307469
|
return Object.values(uniqueResources);
|
|
307365
307470
|
}
|
|
307366
|
-
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;
|
|
307367
307472
|
var init_migrate = __esm({
|
|
307368
307473
|
"lib/commands/migrate.ts"() {
|
|
307369
307474
|
"use strict";
|
|
307370
307475
|
fs45 = __toESM(require("fs"));
|
|
307371
307476
|
path43 = __toESM(require("path"));
|
|
307372
|
-
|
|
307477
|
+
import_cloud_assembly_api14 = __toESM(require_lib3());
|
|
307373
307478
|
import_toolkit_lib12 = __toESM(require_lib12());
|
|
307374
307479
|
cdk_from_cfn = __toESM(require_cdk_from_cfn());
|
|
307375
307480
|
import_chalk33 = __toESM(require_source());
|
|
@@ -309635,7 +309740,7 @@ async function execProgram(aws, ioHelper, config2) {
|
|
|
309635
309740
|
...config2.context.all,
|
|
309636
309741
|
...params.context
|
|
309637
309742
|
};
|
|
309638
|
-
await debugFn((0,
|
|
309743
|
+
await debugFn((0, import_util73.format)("context:", context));
|
|
309639
309744
|
if (params.env.CDK_DEBUG === "true") {
|
|
309640
309745
|
await ioHelper.defaults.info("\u{1F50D} Synthesizing with debug information. This may take a bit longer.");
|
|
309641
309746
|
}
|
|
@@ -309685,7 +309790,7 @@ async function execProgram(aws, ioHelper, config2) {
|
|
|
309685
309790
|
const perfCountersFile = path44.join(outdir, "performance-counters.json");
|
|
309686
309791
|
await fs47.promises.rm(perfCountersFile, { force: true });
|
|
309687
309792
|
env3.CDK_PERF_COUNTERS_FILE = perfCountersFile;
|
|
309688
|
-
await debugFn((0,
|
|
309793
|
+
await debugFn((0, import_util73.format)("env:", env3));
|
|
309689
309794
|
const cleanupTemp = writeContextToEnv(env3, context, "add-process-env-later");
|
|
309690
309795
|
try {
|
|
309691
309796
|
await exec2(commandLine);
|
|
@@ -309723,7 +309828,7 @@ async function execProgram(aws, ioHelper, config2) {
|
|
|
309723
309828
|
}
|
|
309724
309829
|
function createAssembly(appDir) {
|
|
309725
309830
|
try {
|
|
309726
|
-
return new
|
|
309831
|
+
return new import_cloud_assembly_api15.CloudAssembly(appDir, {
|
|
309727
309832
|
// We sort as we deploy
|
|
309728
309833
|
topoSort: false
|
|
309729
309834
|
});
|
|
@@ -309738,13 +309843,13 @@ function createAssembly(appDir) {
|
|
|
309738
309843
|
function noUndefined2(xs) {
|
|
309739
309844
|
return Object.fromEntries(Object.entries(xs).filter(([_, v]) => v !== void 0));
|
|
309740
309845
|
}
|
|
309741
|
-
var path44,
|
|
309846
|
+
var path44, import_util73, import_cloud_assembly_api15, cxschema11, cxapi12, import_toolkit_lib15, fs47;
|
|
309742
309847
|
var init_exec2 = __esm({
|
|
309743
309848
|
"lib/cxapp/exec.ts"() {
|
|
309744
309849
|
"use strict";
|
|
309745
309850
|
path44 = __toESM(require("path"));
|
|
309746
|
-
|
|
309747
|
-
|
|
309851
|
+
import_util73 = require("util");
|
|
309852
|
+
import_cloud_assembly_api15 = __toESM(require_lib3());
|
|
309748
309853
|
cxschema11 = __toESM(require_lib2());
|
|
309749
309854
|
cxapi12 = __toESM(require_lib11());
|
|
309750
309855
|
import_toolkit_lib15 = __toESM(require_lib12());
|
|
@@ -309944,11 +310049,11 @@ var require_p_finally = __commonJS({
|
|
|
309944
310049
|
onFinally = onFinally || (() => {
|
|
309945
310050
|
});
|
|
309946
310051
|
return promise.then(
|
|
309947
|
-
(val) => new Promise((
|
|
309948
|
-
|
|
310052
|
+
(val) => new Promise((resolve17) => {
|
|
310053
|
+
resolve17(onFinally());
|
|
309949
310054
|
}).then(() => val),
|
|
309950
|
-
(err) => new Promise((
|
|
309951
|
-
|
|
310055
|
+
(err) => new Promise((resolve17) => {
|
|
310056
|
+
resolve17(onFinally());
|
|
309952
310057
|
}).then(() => {
|
|
309953
310058
|
throw err;
|
|
309954
310059
|
})
|
|
@@ -309971,18 +310076,18 @@ var require_p_timeout = __commonJS({
|
|
|
309971
310076
|
this.name = "TimeoutError";
|
|
309972
310077
|
}
|
|
309973
310078
|
};
|
|
309974
|
-
var pTimeout = /* @__PURE__ */ __name((promise, milliseconds, fallback2) => new Promise((
|
|
310079
|
+
var pTimeout = /* @__PURE__ */ __name((promise, milliseconds, fallback2) => new Promise((resolve17, reject) => {
|
|
309975
310080
|
if (typeof milliseconds !== "number" || milliseconds < 0) {
|
|
309976
310081
|
throw new TypeError("Expected `milliseconds` to be a positive number");
|
|
309977
310082
|
}
|
|
309978
310083
|
if (milliseconds === Infinity) {
|
|
309979
|
-
|
|
310084
|
+
resolve17(promise);
|
|
309980
310085
|
return;
|
|
309981
310086
|
}
|
|
309982
310087
|
const timer = setTimeout(() => {
|
|
309983
310088
|
if (typeof fallback2 === "function") {
|
|
309984
310089
|
try {
|
|
309985
|
-
|
|
310090
|
+
resolve17(fallback2());
|
|
309986
310091
|
} catch (error3) {
|
|
309987
310092
|
reject(error3);
|
|
309988
310093
|
}
|
|
@@ -309997,7 +310102,7 @@ var require_p_timeout = __commonJS({
|
|
|
309997
310102
|
}, milliseconds);
|
|
309998
310103
|
pFinally(
|
|
309999
310104
|
// eslint-disable-next-line promise/prefer-await-to-then
|
|
310000
|
-
promise.then(
|
|
310105
|
+
promise.then(resolve17, reject),
|
|
310001
310106
|
() => {
|
|
310002
310107
|
clearTimeout(timer);
|
|
310003
310108
|
}
|
|
@@ -310222,7 +310327,7 @@ var require_dist3 = __commonJS({
|
|
|
310222
310327
|
Adds a sync or async task to the queue. Always returns a promise.
|
|
310223
310328
|
*/
|
|
310224
310329
|
async add(fn, options = {}) {
|
|
310225
|
-
return new Promise((
|
|
310330
|
+
return new Promise((resolve17, reject) => {
|
|
310226
310331
|
const run5 = /* @__PURE__ */ __name(async () => {
|
|
310227
310332
|
this._pendingCount++;
|
|
310228
310333
|
this._intervalCount++;
|
|
@@ -310233,7 +310338,7 @@ var require_dist3 = __commonJS({
|
|
|
310233
310338
|
}
|
|
310234
310339
|
return void 0;
|
|
310235
310340
|
});
|
|
310236
|
-
|
|
310341
|
+
resolve17(await operation2);
|
|
310237
310342
|
} catch (error3) {
|
|
310238
310343
|
reject(error3);
|
|
310239
310344
|
}
|
|
@@ -310284,11 +310389,11 @@ var require_dist3 = __commonJS({
|
|
|
310284
310389
|
if (this._queue.size === 0) {
|
|
310285
310390
|
return;
|
|
310286
310391
|
}
|
|
310287
|
-
return new Promise((
|
|
310392
|
+
return new Promise((resolve17) => {
|
|
310288
310393
|
const existingResolve = this._resolveEmpty;
|
|
310289
310394
|
this._resolveEmpty = () => {
|
|
310290
310395
|
existingResolve();
|
|
310291
|
-
|
|
310396
|
+
resolve17();
|
|
310292
310397
|
};
|
|
310293
310398
|
});
|
|
310294
310399
|
}
|
|
@@ -310301,11 +310406,11 @@ var require_dist3 = __commonJS({
|
|
|
310301
310406
|
if (this._pendingCount === 0 && this._queue.size === 0) {
|
|
310302
310407
|
return;
|
|
310303
310408
|
}
|
|
310304
|
-
return new Promise((
|
|
310409
|
+
return new Promise((resolve17) => {
|
|
310305
310410
|
const existingResolve = this._resolveIdle;
|
|
310306
310411
|
this._resolveIdle = () => {
|
|
310307
310412
|
existingResolve();
|
|
310308
|
-
|
|
310413
|
+
resolve17();
|
|
310309
310414
|
};
|
|
310310
310415
|
});
|
|
310311
310416
|
}
|
|
@@ -310861,11 +310966,11 @@ async function displayFlagsMessage(ioHost, toolkit, cloudExecutable) {
|
|
|
310861
310966
|
function requiresApproval(requireApproval, permissionChangeType) {
|
|
310862
310967
|
return requireApproval === import_cloud_assembly_schema9.RequireApproval.ANYCHANGE || requireApproval === import_cloud_assembly_schema9.RequireApproval.BROADENING && permissionChangeType === import_toolkit_lib17.PermissionChangeType.BROADENING;
|
|
310863
310968
|
}
|
|
310864
|
-
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;
|
|
310865
310970
|
var init_cdk_toolkit = __esm({
|
|
310866
310971
|
"lib/cli/cdk-toolkit.ts"() {
|
|
310867
310972
|
"use strict";
|
|
310868
|
-
|
|
310973
|
+
import_node_crypto19 = require("node:crypto");
|
|
310869
310974
|
path46 = __toESM(require("node:path"));
|
|
310870
310975
|
import_node_util9 = require("node:util");
|
|
310871
310976
|
cxapi13 = __toESM(require_lib3());
|
|
@@ -311118,12 +311223,13 @@ var init_cdk_toolkit = __esm({
|
|
|
311118
311223
|
}
|
|
311119
311224
|
return cfn_api_exports.createDiffChangeSet(asIoHelper(this.ioHost, "diff"), {
|
|
311120
311225
|
stack,
|
|
311121
|
-
uuid: (0,
|
|
311226
|
+
uuid: (0, import_node_crypto19.randomUUID)(),
|
|
311122
311227
|
deployments: this.props.deployments,
|
|
311123
311228
|
sdkProvider: this.props.sdkProvider,
|
|
311124
311229
|
parameters: Object.assign({}, parameterMap["*"], parameterMap[stack.stackName]),
|
|
311125
311230
|
resourcesToImport,
|
|
311126
311231
|
importExistingResources: options.importExistingResources,
|
|
311232
|
+
changeSetName: options.changeSetName,
|
|
311127
311233
|
failOnError: options.method === "change-set"
|
|
311128
311234
|
});
|
|
311129
311235
|
}
|
|
@@ -311521,10 +311627,8 @@ Do you wish to deploy these changes?`;
|
|
|
311521
311627
|
}
|
|
311522
311628
|
}
|
|
311523
311629
|
await this.ioHost.asIoHelper().defaults.info("%s: importing resources into stack...", import_chalk35.default.bold(stack.displayName));
|
|
311524
|
-
const tags = tagsForStack(stack);
|
|
311525
311630
|
await resourceImporter.importResourcesFromMap(actualImport, {
|
|
311526
311631
|
roleArn: options.roleArn,
|
|
311527
|
-
tags,
|
|
311528
311632
|
deploymentMethod: options.deploymentMethod,
|
|
311529
311633
|
usePreviousParameters: true,
|
|
311530
311634
|
rollback: options.rollback,
|
|
@@ -312281,6 +312385,248 @@ Do you wish to deploy these changes?`;
|
|
|
312281
312385
|
}
|
|
312282
312386
|
});
|
|
312283
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
|
+
|
|
312284
312630
|
// lib/cli/util/console-formatters.ts
|
|
312285
312631
|
function formatAsBanner(msgs) {
|
|
312286
312632
|
const printLen = /* @__PURE__ */ __name((str) => stripAnsi(str).length, "printLen");
|
|
@@ -312329,7 +312675,7 @@ function getJson(url, agent, options = {}) {
|
|
|
312329
312675
|
agent,
|
|
312330
312676
|
headers: { Accept: "application/json" }
|
|
312331
312677
|
};
|
|
312332
|
-
return new Promise((
|
|
312678
|
+
return new Promise((resolve17, reject) => {
|
|
312333
312679
|
let req;
|
|
312334
312680
|
const timer = setTimeout(() => {
|
|
312335
312681
|
if (req) {
|
|
@@ -312340,7 +312686,7 @@ function getJson(url, agent, options = {}) {
|
|
|
312340
312686
|
req = https3.get(url, requestOptions, (res) => {
|
|
312341
312687
|
if (res.statusCode === 404 && options.allowNotFound) {
|
|
312342
312688
|
res.resume();
|
|
312343
|
-
|
|
312689
|
+
resolve17(void 0);
|
|
312344
312690
|
return;
|
|
312345
312691
|
}
|
|
312346
312692
|
if (res.statusCode !== 200) {
|
|
@@ -312355,7 +312701,7 @@ function getJson(url, agent, options = {}) {
|
|
|
312355
312701
|
});
|
|
312356
312702
|
res.on("end", () => {
|
|
312357
312703
|
try {
|
|
312358
|
-
|
|
312704
|
+
resolve17(JSON.parse(rawData));
|
|
312359
312705
|
} catch (e6) {
|
|
312360
312706
|
reject(import_toolkit_lib18.ToolkitError.withCause("NpmRegistryParseError", `could not parse response from ${url}: ${e6.message}`, e6));
|
|
312361
312707
|
}
|
|
@@ -312392,10 +312738,10 @@ async function getVersionMessages(currentVersion, cacheFile, agent) {
|
|
|
312392
312738
|
await cacheFile.update(JSON.stringify(packageInfo));
|
|
312393
312739
|
const versionMessages = [];
|
|
312394
312740
|
if (packageInfo.deprecated) {
|
|
312395
|
-
versionMessages.push(
|
|
312741
|
+
versionMessages.push(import_chalk37.default.red(packageInfo.deprecated));
|
|
312396
312742
|
}
|
|
312397
312743
|
if (semver4.gt(latestVersion, currentVersion)) {
|
|
312398
|
-
versionMessages.push(`Newer version of CDK is available [${
|
|
312744
|
+
versionMessages.push(`Newer version of CDK is available [${import_chalk37.default.green(latestVersion)}]`);
|
|
312399
312745
|
const majorUpgradeMessage = getMajorVersionUpgradeMessage(currentVersion);
|
|
312400
312746
|
if (majorUpgradeMessage) {
|
|
312401
312747
|
versionMessages.push(majorUpgradeMessage);
|
|
@@ -312426,13 +312772,13 @@ async function displayVersionMessage(ioHelper, options = {}) {
|
|
|
312426
312772
|
await ioHelper.defaults.debug(`Could not run version check - ${err.message}`);
|
|
312427
312773
|
}
|
|
312428
312774
|
}
|
|
312429
|
-
var path47, import_toolkit_lib19,
|
|
312775
|
+
var path47, import_toolkit_lib19, import_chalk37, fs50, semver4, ONE_DAY_IN_SECONDS, UPGRADE_DOCUMENTATION_LINKS, VersionCheckTTL;
|
|
312430
312776
|
var init_display_version = __esm({
|
|
312431
312777
|
"lib/cli/display-version.ts"() {
|
|
312432
312778
|
"use strict";
|
|
312433
312779
|
path47 = __toESM(require("path"));
|
|
312434
312780
|
import_toolkit_lib19 = __toESM(require_lib12());
|
|
312435
|
-
|
|
312781
|
+
import_chalk37 = __toESM(require_source());
|
|
312436
312782
|
fs50 = __toESM(require_lib4());
|
|
312437
312783
|
semver4 = __toESM(require_semver4());
|
|
312438
312784
|
init_util9();
|
|
@@ -312769,8 +313115,8 @@ var require_require_directory = __commonJS({
|
|
|
312769
313115
|
"../../node_modules/require-directory/index.js"(exports2, module2) {
|
|
312770
313116
|
"use strict";
|
|
312771
313117
|
var fs58 = require("fs");
|
|
312772
|
-
var
|
|
312773
|
-
var
|
|
313118
|
+
var join53 = require("path").join;
|
|
313119
|
+
var resolve17 = require("path").resolve;
|
|
312774
313120
|
var dirname17 = require("path").dirname;
|
|
312775
313121
|
var defaultOptions2 = {
|
|
312776
313122
|
extensions: ["js", "json", "coffee"],
|
|
@@ -312805,9 +313151,9 @@ var require_require_directory = __commonJS({
|
|
|
312805
313151
|
options[prop] = defaultOptions2[prop];
|
|
312806
313152
|
}
|
|
312807
313153
|
}
|
|
312808
|
-
path54 = !path54 ? dirname17(m4.filename) :
|
|
313154
|
+
path54 = !path54 ? dirname17(m4.filename) : resolve17(dirname17(m4.filename), path54);
|
|
312809
313155
|
fs58.readdirSync(path54).forEach(function(filename) {
|
|
312810
|
-
var joined =
|
|
313156
|
+
var joined = join53(path54, filename), files, key, obj;
|
|
312811
313157
|
if (fs58.statSync(joined).isDirectory() && options.recurse) {
|
|
312812
313158
|
files = requireDirectory(m4, joined, options);
|
|
312813
313159
|
if (Object.keys(files).length) {
|
|
@@ -315843,8 +316189,8 @@ var require_y18n = __commonJS({
|
|
|
315843
316189
|
var require_p_try = __commonJS({
|
|
315844
316190
|
"../../node_modules/p-try/index.js"(exports2, module2) {
|
|
315845
316191
|
"use strict";
|
|
315846
|
-
var pTry = /* @__PURE__ */ __name((fn, ...arguments_) => new Promise((
|
|
315847
|
-
|
|
316192
|
+
var pTry = /* @__PURE__ */ __name((fn, ...arguments_) => new Promise((resolve17) => {
|
|
316193
|
+
resolve17(fn(...arguments_));
|
|
315848
316194
|
}), "pTry");
|
|
315849
316195
|
module2.exports = pTry;
|
|
315850
316196
|
module2.exports.default = pTry;
|
|
@@ -315868,20 +316214,20 @@ var require_p_limit2 = __commonJS({
|
|
|
315868
316214
|
queue.shift()();
|
|
315869
316215
|
}
|
|
315870
316216
|
}, "next");
|
|
315871
|
-
const run5 = /* @__PURE__ */ __name((fn,
|
|
316217
|
+
const run5 = /* @__PURE__ */ __name((fn, resolve17, ...args) => {
|
|
315872
316218
|
activeCount++;
|
|
315873
316219
|
const result2 = pTry(fn, ...args);
|
|
315874
|
-
|
|
316220
|
+
resolve17(result2);
|
|
315875
316221
|
result2.then(next, next);
|
|
315876
316222
|
}, "run");
|
|
315877
|
-
const enqueue = /* @__PURE__ */ __name((fn,
|
|
316223
|
+
const enqueue = /* @__PURE__ */ __name((fn, resolve17, ...args) => {
|
|
315878
316224
|
if (activeCount < concurrency) {
|
|
315879
|
-
run5(fn,
|
|
316225
|
+
run5(fn, resolve17, ...args);
|
|
315880
316226
|
} else {
|
|
315881
|
-
queue.push(run5.bind(null, fn,
|
|
316227
|
+
queue.push(run5.bind(null, fn, resolve17, ...args));
|
|
315882
316228
|
}
|
|
315883
316229
|
}, "enqueue");
|
|
315884
|
-
const generator = /* @__PURE__ */ __name((fn, ...args) => new Promise((
|
|
316230
|
+
const generator = /* @__PURE__ */ __name((fn, ...args) => new Promise((resolve17) => enqueue(fn, resolve17, ...args)), "generator");
|
|
315885
316231
|
Object.defineProperties(generator, {
|
|
315886
316232
|
activeCount: {
|
|
315887
316233
|
get: /* @__PURE__ */ __name(() => activeCount, "get")
|
|
@@ -317359,7 +317705,7 @@ function parseCommandLineArguments(args) {
|
|
|
317359
317705
|
}).option("debug-cli", {
|
|
317360
317706
|
default: false,
|
|
317361
317707
|
type: "boolean",
|
|
317362
|
-
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."
|
|
317363
317709
|
}).option("profile", {
|
|
317364
317710
|
default: void 0,
|
|
317365
317711
|
type: "string",
|
|
@@ -318094,6 +318440,10 @@ function parseCommandLineArguments(args) {
|
|
|
318094
318440
|
alias: "changeset",
|
|
318095
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.",
|
|
318096
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)"
|
|
318097
318447
|
}).option("method", {
|
|
318098
318448
|
default: "auto",
|
|
318099
318449
|
alias: "m",
|
|
@@ -318374,7 +318724,7 @@ var init_platform_warnings = __esm({
|
|
|
318374
318724
|
// lib/cli/pretty-print-error.ts
|
|
318375
318725
|
function prettyPrintError(error3, options = { soft: false, debug: false }) {
|
|
318376
318726
|
const err = ensureError(error3);
|
|
318377
|
-
const errorPaint = options.soft ?
|
|
318727
|
+
const errorPaint = options.soft ? import_chalk38.default.yellow : import_chalk38.default.red;
|
|
318378
318728
|
console.error(errorPaint(err.message));
|
|
318379
318729
|
printCauses(err, options);
|
|
318380
318730
|
if (options.debug) {
|
|
@@ -318384,13 +318734,13 @@ function prettyPrintError(error3, options = { soft: false, debug: false }) {
|
|
|
318384
318734
|
function printCauses(err, options) {
|
|
318385
318735
|
if (err.cause && !options.soft) {
|
|
318386
318736
|
const cause = ensureError(err.cause);
|
|
318387
|
-
console.error(
|
|
318737
|
+
console.error(import_chalk38.default.yellow(`\u2023 ${cause.name}: ${cause.message}`));
|
|
318388
318738
|
printCauses(cause, options);
|
|
318389
318739
|
}
|
|
318390
318740
|
}
|
|
318391
318741
|
function printTraces(err) {
|
|
318392
318742
|
if (err.stack) {
|
|
318393
|
-
console.debug(
|
|
318743
|
+
console.debug(import_chalk38.default.gray(err.stack));
|
|
318394
318744
|
}
|
|
318395
318745
|
if (err.cause) {
|
|
318396
318746
|
printTraces(ensureError(err.cause));
|
|
@@ -318406,11 +318756,11 @@ function ensureError(value2) {
|
|
|
318406
318756
|
const error3 = new Error(`An unexpected error was thrown: ${stringified}`);
|
|
318407
318757
|
return error3;
|
|
318408
318758
|
}
|
|
318409
|
-
var
|
|
318759
|
+
var import_chalk38;
|
|
318410
318760
|
var init_pretty_print_error = __esm({
|
|
318411
318761
|
"lib/cli/pretty-print-error.ts"() {
|
|
318412
318762
|
"use strict";
|
|
318413
|
-
|
|
318763
|
+
import_chalk38 = __toESM(require_source());
|
|
318414
318764
|
__name(prettyPrintError, "prettyPrintError");
|
|
318415
318765
|
__name(printCauses, "printCauses");
|
|
318416
318766
|
__name(printTraces, "printTraces");
|
|
@@ -319258,8 +319608,8 @@ var require_lru_cache = __commonJS({
|
|
|
319258
319608
|
}
|
|
319259
319609
|
return stale ? v.__staleWhileFetching : v.__returned = v;
|
|
319260
319610
|
}
|
|
319261
|
-
const
|
|
319262
|
-
if (!forceRefresh && !
|
|
319611
|
+
const isStale2 = this.isStale(index);
|
|
319612
|
+
if (!forceRefresh && !isStale2) {
|
|
319263
319613
|
if (status) status.fetch = "hit";
|
|
319264
319614
|
this.moveToTail(index);
|
|
319265
319615
|
if (updateAgeOnGet) {
|
|
@@ -319272,8 +319622,8 @@ var require_lru_cache = __commonJS({
|
|
|
319272
319622
|
const hasStale = p3.__staleWhileFetching !== void 0;
|
|
319273
319623
|
const staleVal = hasStale && allowStale;
|
|
319274
319624
|
if (status) {
|
|
319275
|
-
status.fetch = hasStale &&
|
|
319276
|
-
if (staleVal &&
|
|
319625
|
+
status.fetch = hasStale && isStale2 ? "stale" : "refresh";
|
|
319626
|
+
if (staleVal && isStale2) status.returnedStale = true;
|
|
319277
319627
|
}
|
|
319278
319628
|
return staleVal ? p3.__staleWhileFetching : p3.__returned = p3;
|
|
319279
319629
|
}
|
|
@@ -319495,8 +319845,8 @@ var require_helpers2 = __commonJS({
|
|
|
319495
319845
|
function req(url, opts = {}) {
|
|
319496
319846
|
const href = typeof url === "string" ? url : url.href;
|
|
319497
319847
|
const req2 = (href.startsWith("https:") ? https4 : http).request(url, opts);
|
|
319498
|
-
const promise = new Promise((
|
|
319499
|
-
req2.once("response",
|
|
319848
|
+
const promise = new Promise((resolve17, reject) => {
|
|
319849
|
+
req2.once("response", resolve17).once("error", reject).end();
|
|
319500
319850
|
});
|
|
319501
319851
|
req2.then = promise.then.bind(promise);
|
|
319502
319852
|
return req2;
|
|
@@ -320559,7 +320909,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
320559
320909
|
var debug_1 = __importDefault2(require_src2());
|
|
320560
320910
|
var debug2 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
|
|
320561
320911
|
function parseProxyResponse(socket) {
|
|
320562
|
-
return new Promise((
|
|
320912
|
+
return new Promise((resolve17, reject) => {
|
|
320563
320913
|
let buffersLength = 0;
|
|
320564
320914
|
const buffers = [];
|
|
320565
320915
|
function read() {
|
|
@@ -320629,7 +320979,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
320629
320979
|
}
|
|
320630
320980
|
debug2("got proxy server response: %o %o", firstLine, headers);
|
|
320631
320981
|
cleanup();
|
|
320632
|
-
|
|
320982
|
+
resolve17({
|
|
320633
320983
|
connect: {
|
|
320634
320984
|
statusCode,
|
|
320635
320985
|
statusText,
|
|
@@ -324438,12 +324788,12 @@ var require_socksclient = __commonJS({
|
|
|
324438
324788
|
"use strict";
|
|
324439
324789
|
var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
324440
324790
|
function adopt(value2) {
|
|
324441
|
-
return value2 instanceof P ? value2 : new P(function(
|
|
324442
|
-
|
|
324791
|
+
return value2 instanceof P ? value2 : new P(function(resolve17) {
|
|
324792
|
+
resolve17(value2);
|
|
324443
324793
|
});
|
|
324444
324794
|
}
|
|
324445
324795
|
__name(adopt, "adopt");
|
|
324446
|
-
return new (P || (P = Promise))(function(
|
|
324796
|
+
return new (P || (P = Promise))(function(resolve17, reject) {
|
|
324447
324797
|
function fulfilled(value2) {
|
|
324448
324798
|
try {
|
|
324449
324799
|
step(generator.next(value2));
|
|
@@ -324461,7 +324811,7 @@ var require_socksclient = __commonJS({
|
|
|
324461
324811
|
}
|
|
324462
324812
|
__name(rejected, "rejected");
|
|
324463
324813
|
function step(result2) {
|
|
324464
|
-
result2.done ?
|
|
324814
|
+
result2.done ? resolve17(result2.value) : adopt(result2.value).then(fulfilled, rejected);
|
|
324465
324815
|
}
|
|
324466
324816
|
__name(step, "step");
|
|
324467
324817
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
@@ -324499,13 +324849,13 @@ var require_socksclient = __commonJS({
|
|
|
324499
324849
|
* @returns { Promise }
|
|
324500
324850
|
*/
|
|
324501
324851
|
static createConnection(options, callback) {
|
|
324502
|
-
return new Promise((
|
|
324852
|
+
return new Promise((resolve17, reject) => {
|
|
324503
324853
|
try {
|
|
324504
324854
|
(0, helpers_1.validateSocksClientOptions)(options, ["connect"]);
|
|
324505
324855
|
} catch (err) {
|
|
324506
324856
|
if (typeof callback === "function") {
|
|
324507
324857
|
callback(err);
|
|
324508
|
-
return
|
|
324858
|
+
return resolve17(err);
|
|
324509
324859
|
} else {
|
|
324510
324860
|
return reject(err);
|
|
324511
324861
|
}
|
|
@@ -324516,16 +324866,16 @@ var require_socksclient = __commonJS({
|
|
|
324516
324866
|
client.removeAllListeners();
|
|
324517
324867
|
if (typeof callback === "function") {
|
|
324518
324868
|
callback(null, info2);
|
|
324519
|
-
|
|
324869
|
+
resolve17(info2);
|
|
324520
324870
|
} else {
|
|
324521
|
-
|
|
324871
|
+
resolve17(info2);
|
|
324522
324872
|
}
|
|
324523
324873
|
});
|
|
324524
324874
|
client.once("error", (err) => {
|
|
324525
324875
|
client.removeAllListeners();
|
|
324526
324876
|
if (typeof callback === "function") {
|
|
324527
324877
|
callback(err);
|
|
324528
|
-
|
|
324878
|
+
resolve17(err);
|
|
324529
324879
|
} else {
|
|
324530
324880
|
reject(err);
|
|
324531
324881
|
}
|
|
@@ -324542,13 +324892,13 @@ var require_socksclient = __commonJS({
|
|
|
324542
324892
|
* @returns { Promise }
|
|
324543
324893
|
*/
|
|
324544
324894
|
static createConnectionChain(options, callback) {
|
|
324545
|
-
return new Promise((
|
|
324895
|
+
return new Promise((resolve17, reject) => __awaiter2(this, void 0, void 0, function* () {
|
|
324546
324896
|
try {
|
|
324547
324897
|
(0, helpers_1.validateSocksClientChainOptions)(options);
|
|
324548
324898
|
} catch (err) {
|
|
324549
324899
|
if (typeof callback === "function") {
|
|
324550
324900
|
callback(err);
|
|
324551
|
-
return
|
|
324901
|
+
return resolve17(err);
|
|
324552
324902
|
} else {
|
|
324553
324903
|
return reject(err);
|
|
324554
324904
|
}
|
|
@@ -324574,14 +324924,14 @@ var require_socksclient = __commonJS({
|
|
|
324574
324924
|
}
|
|
324575
324925
|
if (typeof callback === "function") {
|
|
324576
324926
|
callback(null, { socket: sock });
|
|
324577
|
-
|
|
324927
|
+
resolve17({ socket: sock });
|
|
324578
324928
|
} else {
|
|
324579
|
-
|
|
324929
|
+
resolve17({ socket: sock });
|
|
324580
324930
|
}
|
|
324581
324931
|
} catch (err) {
|
|
324582
324932
|
if (typeof callback === "function") {
|
|
324583
324933
|
callback(err);
|
|
324584
|
-
|
|
324934
|
+
resolve17(err);
|
|
324585
324935
|
} else {
|
|
324586
324936
|
reject(err);
|
|
324587
324937
|
}
|
|
@@ -325269,12 +325619,12 @@ var require_dist7 = __commonJS({
|
|
|
325269
325619
|
let { host } = opts;
|
|
325270
325620
|
const { port, lookup: lookupFn = dns.lookup } = opts;
|
|
325271
325621
|
if (shouldLookup) {
|
|
325272
|
-
host = await new Promise((
|
|
325622
|
+
host = await new Promise((resolve17, reject) => {
|
|
325273
325623
|
lookupFn(host, {}, (err, res) => {
|
|
325274
325624
|
if (err) {
|
|
325275
325625
|
reject(err);
|
|
325276
325626
|
} else {
|
|
325277
|
-
|
|
325627
|
+
resolve17(res);
|
|
325278
325628
|
}
|
|
325279
325629
|
});
|
|
325280
325630
|
});
|
|
@@ -325968,7 +326318,7 @@ var require_netUtils = __commonJS({
|
|
|
325968
326318
|
}
|
|
325969
326319
|
__name(describeAddress, "describeAddress");
|
|
325970
326320
|
function upgradeSocket(socket, options) {
|
|
325971
|
-
return new Promise((
|
|
326321
|
+
return new Promise((resolve17, reject) => {
|
|
325972
326322
|
const tlsOptions = Object.assign({}, options, {
|
|
325973
326323
|
socket
|
|
325974
326324
|
});
|
|
@@ -325978,7 +326328,7 @@ var require_netUtils = __commonJS({
|
|
|
325978
326328
|
reject(tlsSocket.authorizationError);
|
|
325979
326329
|
} else {
|
|
325980
326330
|
tlsSocket.removeAllListeners("error");
|
|
325981
|
-
|
|
326331
|
+
resolve17(tlsSocket);
|
|
325982
326332
|
}
|
|
325983
326333
|
}).once("error", (error3) => {
|
|
325984
326334
|
reject(error3);
|
|
@@ -326643,7 +326993,7 @@ var require_transfer = __commonJS({
|
|
|
326643
326993
|
}
|
|
326644
326994
|
__name(parsePasvResponse, "parsePasvResponse");
|
|
326645
326995
|
function connectForPassiveTransfer(host, port, ftp) {
|
|
326646
|
-
return new Promise((
|
|
326996
|
+
return new Promise((resolve17, reject) => {
|
|
326647
326997
|
let socket = ftp._newSocket();
|
|
326648
326998
|
const handleConnErr = /* @__PURE__ */ __name(function(err) {
|
|
326649
326999
|
err.message = "Can't open data connection in passive mode: " + err.message;
|
|
@@ -326671,7 +327021,7 @@ var require_transfer = __commonJS({
|
|
|
326671
327021
|
socket.removeListener("error", handleConnErr);
|
|
326672
327022
|
socket.removeListener("timeout", handleTimeout);
|
|
326673
327023
|
ftp.dataSocket = socket;
|
|
326674
|
-
|
|
327024
|
+
resolve17();
|
|
326675
327025
|
});
|
|
326676
327026
|
});
|
|
326677
327027
|
}
|
|
@@ -329139,7 +329489,7 @@ var require_util3 = __commonJS({
|
|
|
329139
329489
|
}
|
|
329140
329490
|
__name(normalize3, "normalize");
|
|
329141
329491
|
exports2.normalize = normalize3;
|
|
329142
|
-
function
|
|
329492
|
+
function join53(aRoot, aPath) {
|
|
329143
329493
|
if (aRoot === "") {
|
|
329144
329494
|
aRoot = ".";
|
|
329145
329495
|
}
|
|
@@ -329171,8 +329521,8 @@ var require_util3 = __commonJS({
|
|
|
329171
329521
|
}
|
|
329172
329522
|
return joined;
|
|
329173
329523
|
}
|
|
329174
|
-
__name(
|
|
329175
|
-
exports2.join =
|
|
329524
|
+
__name(join53, "join");
|
|
329525
|
+
exports2.join = join53;
|
|
329176
329526
|
exports2.isAbsolute = function(aPath) {
|
|
329177
329527
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
329178
329528
|
};
|
|
@@ -329355,7 +329705,7 @@ var require_util3 = __commonJS({
|
|
|
329355
329705
|
parsed.path = parsed.path.substring(0, index + 1);
|
|
329356
329706
|
}
|
|
329357
329707
|
}
|
|
329358
|
-
sourceURL =
|
|
329708
|
+
sourceURL = join53(urlGenerate(parsed), sourceURL);
|
|
329359
329709
|
}
|
|
329360
329710
|
return normalize3(sourceURL);
|
|
329361
329711
|
}
|
|
@@ -331192,7 +331542,7 @@ var require_escodegen = __commonJS({
|
|
|
331192
331542
|
return space ? space : " ";
|
|
331193
331543
|
}
|
|
331194
331544
|
__name(noEmptySpace, "noEmptySpace");
|
|
331195
|
-
function
|
|
331545
|
+
function join53(left, right) {
|
|
331196
331546
|
var leftSource, rightSource, leftCharCode, rightCharCode;
|
|
331197
331547
|
leftSource = toSourceNodeWhenNeeded(left).toString();
|
|
331198
331548
|
if (leftSource.length === 0) {
|
|
@@ -331211,7 +331561,7 @@ var require_escodegen = __commonJS({
|
|
|
331211
331561
|
}
|
|
331212
331562
|
return [left, space, right];
|
|
331213
331563
|
}
|
|
331214
|
-
__name(
|
|
331564
|
+
__name(join53, "join");
|
|
331215
331565
|
function addIndent(stmt) {
|
|
331216
331566
|
return [base, stmt];
|
|
331217
331567
|
}
|
|
@@ -331539,8 +331889,8 @@ var require_escodegen = __commonJS({
|
|
|
331539
331889
|
} else {
|
|
331540
331890
|
result2.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT));
|
|
331541
331891
|
}
|
|
331542
|
-
result2 =
|
|
331543
|
-
result2 = [
|
|
331892
|
+
result2 = join53(result2, operator);
|
|
331893
|
+
result2 = [join53(
|
|
331544
331894
|
result2,
|
|
331545
331895
|
that.generateExpression(stmt.right, Precedence.Assignment, E_TTT)
|
|
331546
331896
|
), ")"];
|
|
@@ -331683,11 +332033,11 @@ var require_escodegen = __commonJS({
|
|
|
331683
332033
|
var result2, fragment;
|
|
331684
332034
|
result2 = ["class"];
|
|
331685
332035
|
if (stmt.id) {
|
|
331686
|
-
result2 =
|
|
332036
|
+
result2 = join53(result2, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
|
|
331687
332037
|
}
|
|
331688
332038
|
if (stmt.superClass) {
|
|
331689
|
-
fragment =
|
|
331690
|
-
result2 =
|
|
332039
|
+
fragment = join53("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT));
|
|
332040
|
+
result2 = join53(result2, fragment);
|
|
331691
332041
|
}
|
|
331692
332042
|
result2.push(space);
|
|
331693
332043
|
result2.push(this.generateStatement(stmt.body, S_TFFT));
|
|
@@ -331700,9 +332050,9 @@ var require_escodegen = __commonJS({
|
|
|
331700
332050
|
return escapeDirective(stmt.directive) + this.semicolon(flags);
|
|
331701
332051
|
}, "DirectiveStatement"),
|
|
331702
332052
|
DoWhileStatement: /* @__PURE__ */ __name(function(stmt, flags) {
|
|
331703
|
-
var result2 =
|
|
332053
|
+
var result2 = join53("do", this.maybeBlock(stmt.body, S_TFFF));
|
|
331704
332054
|
result2 = this.maybeBlockSuffix(stmt.body, result2);
|
|
331705
|
-
return
|
|
332055
|
+
return join53(result2, [
|
|
331706
332056
|
"while" + space + "(",
|
|
331707
332057
|
this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
|
|
331708
332058
|
")" + this.semicolon(flags)
|
|
@@ -331738,11 +332088,11 @@ var require_escodegen = __commonJS({
|
|
|
331738
332088
|
ExportDefaultDeclaration: /* @__PURE__ */ __name(function(stmt, flags) {
|
|
331739
332089
|
var result2 = ["export"], bodyFlags;
|
|
331740
332090
|
bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
|
|
331741
|
-
result2 =
|
|
332091
|
+
result2 = join53(result2, "default");
|
|
331742
332092
|
if (isStatement(stmt.declaration)) {
|
|
331743
|
-
result2 =
|
|
332093
|
+
result2 = join53(result2, this.generateStatement(stmt.declaration, bodyFlags));
|
|
331744
332094
|
} else {
|
|
331745
|
-
result2 =
|
|
332095
|
+
result2 = join53(result2, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
|
|
331746
332096
|
}
|
|
331747
332097
|
return result2;
|
|
331748
332098
|
}, "ExportDefaultDeclaration"),
|
|
@@ -331750,15 +332100,15 @@ var require_escodegen = __commonJS({
|
|
|
331750
332100
|
var result2 = ["export"], bodyFlags, that = this;
|
|
331751
332101
|
bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
|
|
331752
332102
|
if (stmt.declaration) {
|
|
331753
|
-
return
|
|
332103
|
+
return join53(result2, this.generateStatement(stmt.declaration, bodyFlags));
|
|
331754
332104
|
}
|
|
331755
332105
|
if (stmt.specifiers) {
|
|
331756
332106
|
if (stmt.specifiers.length === 0) {
|
|
331757
|
-
result2 =
|
|
332107
|
+
result2 = join53(result2, "{" + space + "}");
|
|
331758
332108
|
} else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) {
|
|
331759
|
-
result2 =
|
|
332109
|
+
result2 = join53(result2, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
|
|
331760
332110
|
} else {
|
|
331761
|
-
result2 =
|
|
332111
|
+
result2 = join53(result2, "{");
|
|
331762
332112
|
withIndent(function(indent2) {
|
|
331763
332113
|
var i6, iz;
|
|
331764
332114
|
result2.push(newline);
|
|
@@ -331776,7 +332126,7 @@ var require_escodegen = __commonJS({
|
|
|
331776
332126
|
result2.push(base + "}");
|
|
331777
332127
|
}
|
|
331778
332128
|
if (stmt.source) {
|
|
331779
|
-
result2 =
|
|
332129
|
+
result2 = join53(result2, [
|
|
331780
332130
|
"from" + space,
|
|
331781
332131
|
// ModuleSpecifier
|
|
331782
332132
|
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
@@ -331867,7 +332217,7 @@ var require_escodegen = __commonJS({
|
|
|
331867
332217
|
];
|
|
331868
332218
|
cursor2 = 0;
|
|
331869
332219
|
if (stmt.specifiers[cursor2].type === Syntax.ImportDefaultSpecifier) {
|
|
331870
|
-
result2 =
|
|
332220
|
+
result2 = join53(result2, [
|
|
331871
332221
|
this.generateExpression(stmt.specifiers[cursor2], Precedence.Sequence, E_TTT)
|
|
331872
332222
|
]);
|
|
331873
332223
|
++cursor2;
|
|
@@ -331877,7 +332227,7 @@ var require_escodegen = __commonJS({
|
|
|
331877
332227
|
result2.push(",");
|
|
331878
332228
|
}
|
|
331879
332229
|
if (stmt.specifiers[cursor2].type === Syntax.ImportNamespaceSpecifier) {
|
|
331880
|
-
result2 =
|
|
332230
|
+
result2 = join53(result2, [
|
|
331881
332231
|
space,
|
|
331882
332232
|
this.generateExpression(stmt.specifiers[cursor2], Precedence.Sequence, E_TTT)
|
|
331883
332233
|
]);
|
|
@@ -331906,7 +332256,7 @@ var require_escodegen = __commonJS({
|
|
|
331906
332256
|
}
|
|
331907
332257
|
}
|
|
331908
332258
|
}
|
|
331909
|
-
result2 =
|
|
332259
|
+
result2 = join53(result2, [
|
|
331910
332260
|
"from" + space,
|
|
331911
332261
|
// ModuleSpecifier
|
|
331912
332262
|
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
@@ -331961,7 +332311,7 @@ var require_escodegen = __commonJS({
|
|
|
331961
332311
|
return result2;
|
|
331962
332312
|
}, "VariableDeclaration"),
|
|
331963
332313
|
ThrowStatement: /* @__PURE__ */ __name(function(stmt, flags) {
|
|
331964
|
-
return [
|
|
332314
|
+
return [join53(
|
|
331965
332315
|
"throw",
|
|
331966
332316
|
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
|
331967
332317
|
), this.semicolon(flags)];
|
|
@@ -331972,7 +332322,7 @@ var require_escodegen = __commonJS({
|
|
|
331972
332322
|
result2 = this.maybeBlockSuffix(stmt.block, result2);
|
|
331973
332323
|
if (stmt.handlers) {
|
|
331974
332324
|
for (i6 = 0, iz = stmt.handlers.length; i6 < iz; ++i6) {
|
|
331975
|
-
result2 =
|
|
332325
|
+
result2 = join53(result2, this.generateStatement(stmt.handlers[i6], S_TFFF));
|
|
331976
332326
|
if (stmt.finalizer || i6 + 1 !== iz) {
|
|
331977
332327
|
result2 = this.maybeBlockSuffix(stmt.handlers[i6].body, result2);
|
|
331978
332328
|
}
|
|
@@ -331980,7 +332330,7 @@ var require_escodegen = __commonJS({
|
|
|
331980
332330
|
} else {
|
|
331981
332331
|
guardedHandlers = stmt.guardedHandlers || [];
|
|
331982
332332
|
for (i6 = 0, iz = guardedHandlers.length; i6 < iz; ++i6) {
|
|
331983
|
-
result2 =
|
|
332333
|
+
result2 = join53(result2, this.generateStatement(guardedHandlers[i6], S_TFFF));
|
|
331984
332334
|
if (stmt.finalizer || i6 + 1 !== iz) {
|
|
331985
332335
|
result2 = this.maybeBlockSuffix(guardedHandlers[i6].body, result2);
|
|
331986
332336
|
}
|
|
@@ -331988,13 +332338,13 @@ var require_escodegen = __commonJS({
|
|
|
331988
332338
|
if (stmt.handler) {
|
|
331989
332339
|
if (Array.isArray(stmt.handler)) {
|
|
331990
332340
|
for (i6 = 0, iz = stmt.handler.length; i6 < iz; ++i6) {
|
|
331991
|
-
result2 =
|
|
332341
|
+
result2 = join53(result2, this.generateStatement(stmt.handler[i6], S_TFFF));
|
|
331992
332342
|
if (stmt.finalizer || i6 + 1 !== iz) {
|
|
331993
332343
|
result2 = this.maybeBlockSuffix(stmt.handler[i6].body, result2);
|
|
331994
332344
|
}
|
|
331995
332345
|
}
|
|
331996
332346
|
} else {
|
|
331997
|
-
result2 =
|
|
332347
|
+
result2 = join53(result2, this.generateStatement(stmt.handler, S_TFFF));
|
|
331998
332348
|
if (stmt.finalizer) {
|
|
331999
332349
|
result2 = this.maybeBlockSuffix(stmt.handler.body, result2);
|
|
332000
332350
|
}
|
|
@@ -332002,7 +332352,7 @@ var require_escodegen = __commonJS({
|
|
|
332002
332352
|
}
|
|
332003
332353
|
}
|
|
332004
332354
|
if (stmt.finalizer) {
|
|
332005
|
-
result2 =
|
|
332355
|
+
result2 = join53(result2, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]);
|
|
332006
332356
|
}
|
|
332007
332357
|
return result2;
|
|
332008
332358
|
}, "TryStatement"),
|
|
@@ -332036,7 +332386,7 @@ var require_escodegen = __commonJS({
|
|
|
332036
332386
|
withIndent(function() {
|
|
332037
332387
|
if (stmt.test) {
|
|
332038
332388
|
result2 = [
|
|
332039
|
-
|
|
332389
|
+
join53("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
|
|
332040
332390
|
":"
|
|
332041
332391
|
];
|
|
332042
332392
|
} else {
|
|
@@ -332084,9 +332434,9 @@ var require_escodegen = __commonJS({
|
|
|
332084
332434
|
result2.push(this.maybeBlock(stmt.consequent, S_TFFF));
|
|
332085
332435
|
result2 = this.maybeBlockSuffix(stmt.consequent, result2);
|
|
332086
332436
|
if (stmt.alternate.type === Syntax.IfStatement) {
|
|
332087
|
-
result2 =
|
|
332437
|
+
result2 = join53(result2, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]);
|
|
332088
332438
|
} else {
|
|
332089
|
-
result2 =
|
|
332439
|
+
result2 = join53(result2, join53("else", this.maybeBlock(stmt.alternate, bodyFlags)));
|
|
332090
332440
|
}
|
|
332091
332441
|
} else {
|
|
332092
332442
|
result2.push(this.maybeBlock(stmt.consequent, bodyFlags));
|
|
@@ -332187,7 +332537,7 @@ var require_escodegen = __commonJS({
|
|
|
332187
332537
|
}, "FunctionDeclaration"),
|
|
332188
332538
|
ReturnStatement: /* @__PURE__ */ __name(function(stmt, flags) {
|
|
332189
332539
|
if (stmt.argument) {
|
|
332190
|
-
return [
|
|
332540
|
+
return [join53(
|
|
332191
332541
|
"return",
|
|
332192
332542
|
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
|
332193
332543
|
), this.semicolon(flags)];
|
|
@@ -332276,14 +332626,14 @@ var require_escodegen = __commonJS({
|
|
|
332276
332626
|
if (leftSource.charCodeAt(leftSource.length - 1) === 47 && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) {
|
|
332277
332627
|
result2 = [fragment, noEmptySpace(), expr.operator];
|
|
332278
332628
|
} else {
|
|
332279
|
-
result2 =
|
|
332629
|
+
result2 = join53(fragment, expr.operator);
|
|
332280
332630
|
}
|
|
332281
332631
|
fragment = this.generateExpression(expr.right, rightPrecedence, flags);
|
|
332282
332632
|
if (expr.operator === "/" && fragment.toString().charAt(0) === "/" || expr.operator.slice(-1) === "<" && fragment.toString().slice(0, 3) === "!--") {
|
|
332283
332633
|
result2.push(noEmptySpace());
|
|
332284
332634
|
result2.push(fragment);
|
|
332285
332635
|
} else {
|
|
332286
|
-
result2 =
|
|
332636
|
+
result2 = join53(result2, fragment);
|
|
332287
332637
|
}
|
|
332288
332638
|
if (expr.operator === "in" && !(flags & F_ALLOW_IN)) {
|
|
332289
332639
|
return ["(", result2, ")"];
|
|
@@ -332323,7 +332673,7 @@ var require_escodegen = __commonJS({
|
|
|
332323
332673
|
var result2, length, i6, iz, itemFlags;
|
|
332324
332674
|
length = expr["arguments"].length;
|
|
332325
332675
|
itemFlags = flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ? E_TFT : E_TFF;
|
|
332326
|
-
result2 =
|
|
332676
|
+
result2 = join53(
|
|
332327
332677
|
"new",
|
|
332328
332678
|
this.generateExpression(expr.callee, Precedence.New, itemFlags)
|
|
332329
332679
|
);
|
|
@@ -332373,11 +332723,11 @@ var require_escodegen = __commonJS({
|
|
|
332373
332723
|
var result2, fragment, rightCharCode, leftSource, leftCharCode;
|
|
332374
332724
|
fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT);
|
|
332375
332725
|
if (space === "") {
|
|
332376
|
-
result2 =
|
|
332726
|
+
result2 = join53(expr.operator, fragment);
|
|
332377
332727
|
} else {
|
|
332378
332728
|
result2 = [expr.operator];
|
|
332379
332729
|
if (expr.operator.length > 2) {
|
|
332380
|
-
result2 =
|
|
332730
|
+
result2 = join53(result2, fragment);
|
|
332381
332731
|
} else {
|
|
332382
332732
|
leftSource = toSourceNodeWhenNeeded(result2).toString();
|
|
332383
332733
|
leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
|
|
@@ -332400,7 +332750,7 @@ var require_escodegen = __commonJS({
|
|
|
332400
332750
|
result2 = "yield";
|
|
332401
332751
|
}
|
|
332402
332752
|
if (expr.argument) {
|
|
332403
|
-
result2 =
|
|
332753
|
+
result2 = join53(
|
|
332404
332754
|
result2,
|
|
332405
332755
|
this.generateExpression(expr.argument, Precedence.Yield, E_TTT)
|
|
332406
332756
|
);
|
|
@@ -332408,7 +332758,7 @@ var require_escodegen = __commonJS({
|
|
|
332408
332758
|
return parenthesize(result2, Precedence.Yield, precedence);
|
|
332409
332759
|
}, "YieldExpression"),
|
|
332410
332760
|
AwaitExpression: /* @__PURE__ */ __name(function(expr, precedence, flags) {
|
|
332411
|
-
var result2 =
|
|
332761
|
+
var result2 = join53(
|
|
332412
332762
|
expr.all ? "await*" : "await",
|
|
332413
332763
|
this.generateExpression(expr.argument, Precedence.Await, E_TTT)
|
|
332414
332764
|
);
|
|
@@ -332491,11 +332841,11 @@ var require_escodegen = __commonJS({
|
|
|
332491
332841
|
var result2, fragment;
|
|
332492
332842
|
result2 = ["class"];
|
|
332493
332843
|
if (expr.id) {
|
|
332494
|
-
result2 =
|
|
332844
|
+
result2 = join53(result2, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
|
|
332495
332845
|
}
|
|
332496
332846
|
if (expr.superClass) {
|
|
332497
|
-
fragment =
|
|
332498
|
-
result2 =
|
|
332847
|
+
fragment = join53("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT));
|
|
332848
|
+
result2 = join53(result2, fragment);
|
|
332499
332849
|
}
|
|
332500
332850
|
result2.push(space);
|
|
332501
332851
|
result2.push(this.generateStatement(expr.body, S_TFFT));
|
|
@@ -332510,7 +332860,7 @@ var require_escodegen = __commonJS({
|
|
|
332510
332860
|
}
|
|
332511
332861
|
if (expr.kind === "get" || expr.kind === "set") {
|
|
332512
332862
|
fragment = [
|
|
332513
|
-
|
|
332863
|
+
join53(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
|
|
332514
332864
|
this.generateFunctionBody(expr.value)
|
|
332515
332865
|
];
|
|
332516
332866
|
} else {
|
|
@@ -332520,7 +332870,7 @@ var require_escodegen = __commonJS({
|
|
|
332520
332870
|
this.generateFunctionBody(expr.value)
|
|
332521
332871
|
];
|
|
332522
332872
|
}
|
|
332523
|
-
return
|
|
332873
|
+
return join53(result2, fragment);
|
|
332524
332874
|
}, "MethodDefinition"),
|
|
332525
332875
|
Property: /* @__PURE__ */ __name(function(expr, precedence, flags) {
|
|
332526
332876
|
if (expr.kind === "get" || expr.kind === "set") {
|
|
@@ -332715,7 +333065,7 @@ var require_escodegen = __commonJS({
|
|
|
332715
333065
|
for (i6 = 0, iz = expr.blocks.length; i6 < iz; ++i6) {
|
|
332716
333066
|
fragment = that.generateExpression(expr.blocks[i6], Precedence.Sequence, E_TTT);
|
|
332717
333067
|
if (i6 > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) {
|
|
332718
|
-
result2 =
|
|
333068
|
+
result2 = join53(result2, fragment);
|
|
332719
333069
|
} else {
|
|
332720
333070
|
result2.push(fragment);
|
|
332721
333071
|
}
|
|
@@ -332723,13 +333073,13 @@ var require_escodegen = __commonJS({
|
|
|
332723
333073
|
});
|
|
332724
333074
|
}
|
|
332725
333075
|
if (expr.filter) {
|
|
332726
|
-
result2 =
|
|
333076
|
+
result2 = join53(result2, "if" + space);
|
|
332727
333077
|
fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT);
|
|
332728
|
-
result2 =
|
|
333078
|
+
result2 = join53(result2, ["(", fragment, ")"]);
|
|
332729
333079
|
}
|
|
332730
333080
|
if (!extra.moz.comprehensionExpressionStartsWithAssignment) {
|
|
332731
333081
|
fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
|
|
332732
|
-
result2 =
|
|
333082
|
+
result2 = join53(result2, fragment);
|
|
332733
333083
|
}
|
|
332734
333084
|
result2.push(expr.type === Syntax.GeneratorExpression ? ")" : "]");
|
|
332735
333085
|
return result2;
|
|
@@ -332745,8 +333095,8 @@ var require_escodegen = __commonJS({
|
|
|
332745
333095
|
} else {
|
|
332746
333096
|
fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT);
|
|
332747
333097
|
}
|
|
332748
|
-
fragment =
|
|
332749
|
-
fragment =
|
|
333098
|
+
fragment = join53(fragment, expr.of ? "of" : "in");
|
|
333099
|
+
fragment = join53(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
|
|
332750
333100
|
return ["for" + space + "(", fragment, ")"];
|
|
332751
333101
|
}, "ComprehensionBlock"),
|
|
332752
333102
|
SpreadElement: /* @__PURE__ */ __name(function(expr, precedence, flags) {
|
|
@@ -339380,12 +339730,12 @@ function __metadata(metadataKey, metadataValue) {
|
|
|
339380
339730
|
}
|
|
339381
339731
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
339382
339732
|
function adopt(value2) {
|
|
339383
|
-
return value2 instanceof P ? value2 : new P(function(
|
|
339384
|
-
|
|
339733
|
+
return value2 instanceof P ? value2 : new P(function(resolve17) {
|
|
339734
|
+
resolve17(value2);
|
|
339385
339735
|
});
|
|
339386
339736
|
}
|
|
339387
339737
|
__name(adopt, "adopt");
|
|
339388
|
-
return new (P || (P = Promise))(function(
|
|
339738
|
+
return new (P || (P = Promise))(function(resolve17, reject) {
|
|
339389
339739
|
function fulfilled(value2) {
|
|
339390
339740
|
try {
|
|
339391
339741
|
step(generator.next(value2));
|
|
@@ -339403,7 +339753,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
339403
339753
|
}
|
|
339404
339754
|
__name(rejected, "rejected");
|
|
339405
339755
|
function step(result2) {
|
|
339406
|
-
result2.done ?
|
|
339756
|
+
result2.done ? resolve17(result2.value) : adopt(result2.value).then(fulfilled, rejected);
|
|
339407
339757
|
}
|
|
339408
339758
|
__name(step, "step");
|
|
339409
339759
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
@@ -339605,15 +339955,15 @@ function __asyncValues(o3) {
|
|
|
339605
339955
|
}, i6);
|
|
339606
339956
|
function verb(n3) {
|
|
339607
339957
|
i6[n3] = o3[n3] && function(v) {
|
|
339608
|
-
return new Promise(function(
|
|
339609
|
-
v = o3[n3](v), settle(
|
|
339958
|
+
return new Promise(function(resolve17, reject) {
|
|
339959
|
+
v = o3[n3](v), settle(resolve17, reject, v.done, v.value);
|
|
339610
339960
|
});
|
|
339611
339961
|
};
|
|
339612
339962
|
}
|
|
339613
339963
|
__name(verb, "verb");
|
|
339614
|
-
function settle(
|
|
339964
|
+
function settle(resolve17, reject, d6, v) {
|
|
339615
339965
|
Promise.resolve(v).then(function(v2) {
|
|
339616
|
-
|
|
339966
|
+
resolve17({ value: v2, done: d6 });
|
|
339617
339967
|
}, reject);
|
|
339618
339968
|
}
|
|
339619
339969
|
__name(settle, "settle");
|
|
@@ -343284,12 +343634,12 @@ var require_util4 = __commonJS({
|
|
|
343284
343634
|
exports2.isGMT = exports2.dnsLookup = void 0;
|
|
343285
343635
|
var dns_1 = require("dns");
|
|
343286
343636
|
function dnsLookup(host, opts) {
|
|
343287
|
-
return new Promise((
|
|
343637
|
+
return new Promise((resolve17, reject) => {
|
|
343288
343638
|
(0, dns_1.lookup)(host, opts, (err, res) => {
|
|
343289
343639
|
if (err) {
|
|
343290
343640
|
reject(err);
|
|
343291
343641
|
} else {
|
|
343292
|
-
|
|
343642
|
+
resolve17(res);
|
|
343293
343643
|
}
|
|
343294
343644
|
});
|
|
343295
343645
|
});
|
|
@@ -343917,10 +344267,10 @@ var require_myIpAddress = __commonJS({
|
|
|
343917
344267
|
var ip_1 = require_ip();
|
|
343918
344268
|
var net_1 = __importDefault2(require("net"));
|
|
343919
344269
|
async function myIpAddress() {
|
|
343920
|
-
return new Promise((
|
|
344270
|
+
return new Promise((resolve17, reject) => {
|
|
343921
344271
|
const socket = net_1.default.connect({ host: "8.8.8.8", port: 53 });
|
|
343922
344272
|
const onError = /* @__PURE__ */ __name(() => {
|
|
343923
|
-
|
|
344273
|
+
resolve17(ip_1.ip.address());
|
|
343924
344274
|
}, "onError");
|
|
343925
344275
|
socket.once("error", onError);
|
|
343926
344276
|
socket.once("connect", () => {
|
|
@@ -343928,9 +344278,9 @@ var require_myIpAddress = __commonJS({
|
|
|
343928
344278
|
const addr = socket.address();
|
|
343929
344279
|
socket.destroy();
|
|
343930
344280
|
if (typeof addr === "string") {
|
|
343931
|
-
|
|
344281
|
+
resolve17(addr);
|
|
343932
344282
|
} else if (addr.address) {
|
|
343933
|
-
|
|
344283
|
+
resolve17(addr.address);
|
|
343934
344284
|
} else {
|
|
343935
344285
|
reject(new Error("Expected a `string`"));
|
|
343936
344286
|
}
|
|
@@ -344569,8 +344919,8 @@ var require_deferred_promise = __commonJS({
|
|
|
344569
344919
|
this.context = args.context;
|
|
344570
344920
|
this.owner = args.context.runtime;
|
|
344571
344921
|
this.handle = args.promiseHandle;
|
|
344572
|
-
this.settled = new Promise((
|
|
344573
|
-
this.onSettled =
|
|
344922
|
+
this.settled = new Promise((resolve17) => {
|
|
344923
|
+
this.onSettled = resolve17;
|
|
344574
344924
|
});
|
|
344575
344925
|
this.resolveHandle = args.resolveHandle;
|
|
344576
344926
|
this.rejectHandle = args.rejectHandle;
|
|
@@ -345103,13 +345453,13 @@ var require_context = __commonJS({
|
|
|
345103
345453
|
if (vmResolveResult.error) {
|
|
345104
345454
|
return Promise.resolve(vmResolveResult);
|
|
345105
345455
|
}
|
|
345106
|
-
return new Promise((
|
|
345456
|
+
return new Promise((resolve17) => {
|
|
345107
345457
|
lifetime_1.Scope.withScope((scope) => {
|
|
345108
345458
|
const resolveHandle = scope.manage(this.newFunction("resolve", (value2) => {
|
|
345109
|
-
|
|
345459
|
+
resolve17({ value: value2 && value2.dup() });
|
|
345110
345460
|
}));
|
|
345111
345461
|
const rejectHandle = scope.manage(this.newFunction("reject", (error3) => {
|
|
345112
|
-
|
|
345462
|
+
resolve17({ error: error3 && error3.dup() });
|
|
345113
345463
|
}));
|
|
345114
345464
|
const promiseHandle = scope.manage(vmResolveResult.value);
|
|
345115
345465
|
const promiseThenHandle = scope.manage(this.getProp(promiseHandle, "then"));
|
|
@@ -347229,7 +347579,7 @@ var require_parse_proxy_response2 = __commonJS({
|
|
|
347229
347579
|
var debug_1 = __importDefault2(require_src2());
|
|
347230
347580
|
var debug2 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
|
|
347231
347581
|
function parseProxyResponse(socket) {
|
|
347232
|
-
return new Promise((
|
|
347582
|
+
return new Promise((resolve17, reject) => {
|
|
347233
347583
|
let buffersLength = 0;
|
|
347234
347584
|
const buffers = [];
|
|
347235
347585
|
function read() {
|
|
@@ -347299,7 +347649,7 @@ var require_parse_proxy_response2 = __commonJS({
|
|
|
347299
347649
|
}
|
|
347300
347650
|
debug2("got proxy server response: %o %o", firstLine, headers);
|
|
347301
347651
|
cleanup();
|
|
347302
|
-
|
|
347652
|
+
resolve17({
|
|
347303
347653
|
connect: {
|
|
347304
347654
|
statusCode,
|
|
347305
347655
|
statusText,
|
|
@@ -347947,19 +348297,19 @@ async function listContext(ioHelper, context, sourceFiles) {
|
|
|
347947
348297
|
await ioHelper.defaults.info("SSM parameters, and so on.");
|
|
347948
348298
|
return;
|
|
347949
348299
|
}
|
|
347950
|
-
const data_out = [[
|
|
348300
|
+
const data_out = [[import_chalk39.default.green("#"), import_chalk39.default.green("Key"), import_chalk39.default.green("Value")]];
|
|
347951
348301
|
for (const [i6, key] of keys) {
|
|
347952
348302
|
const jsonWithoutNewlines = JSON.stringify(context.all[key], void 0, 2).replace(/\s+/g, " ");
|
|
347953
348303
|
data_out.push([i6, key, jsonWithoutNewlines]);
|
|
347954
348304
|
}
|
|
347955
348305
|
if (sourceFiles.length > 0) {
|
|
347956
|
-
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(", "));
|
|
347957
348307
|
} else {
|
|
347958
348308
|
await ioHelper.defaults.info("Context found:");
|
|
347959
348309
|
}
|
|
347960
348310
|
await ioHelper.defaults.info("");
|
|
347961
348311
|
await ioHelper.defaults.info(renderTable(data_out, process.stdout.columns));
|
|
347962
|
-
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.`);
|
|
347963
348313
|
}
|
|
347964
348314
|
async function invalidateContext(ioHelper, context, key, force) {
|
|
347965
348315
|
const i6 = parseInt(key, 10);
|
|
@@ -347969,10 +348319,10 @@ async function invalidateContext(ioHelper, context, key, force) {
|
|
|
347969
348319
|
if (context.has(key)) {
|
|
347970
348320
|
context.unset(key);
|
|
347971
348321
|
if (!context.has(key)) {
|
|
347972
|
-
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));
|
|
347973
348323
|
return;
|
|
347974
348324
|
}
|
|
347975
|
-
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));
|
|
347976
348326
|
if (!force) {
|
|
347977
348327
|
throw new import_toolkit_lib21.ToolkitError("ReadonlyContextKey", `Cannot reset readonly context value with key: ${key}`);
|
|
347978
348328
|
}
|
|
@@ -348008,7 +348358,7 @@ async function printReadonly(ioHelper, readonly) {
|
|
|
348008
348358
|
await ioHelper.defaults.info(" %s", match);
|
|
348009
348359
|
}
|
|
348010
348360
|
await ioHelper.defaults.info("");
|
|
348011
|
-
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));
|
|
348012
348362
|
}
|
|
348013
348363
|
function keysByExpression(context, expression) {
|
|
348014
348364
|
const matchesExpression = picomatch4(expression);
|
|
@@ -348046,12 +348396,12 @@ function enumerate1(xs) {
|
|
|
348046
348396
|
}
|
|
348047
348397
|
return ret;
|
|
348048
348398
|
}
|
|
348049
|
-
var import_toolkit_lib21,
|
|
348399
|
+
var import_toolkit_lib21, import_chalk39, picomatch4;
|
|
348050
348400
|
var init_context5 = __esm({
|
|
348051
348401
|
"lib/commands/context.ts"() {
|
|
348052
348402
|
"use strict";
|
|
348053
348403
|
import_toolkit_lib21 = __toESM(require_lib12());
|
|
348054
|
-
|
|
348404
|
+
import_chalk39 = __toESM(require_source());
|
|
348055
348405
|
init_tables();
|
|
348056
348406
|
init_user_configuration();
|
|
348057
348407
|
picomatch4 = require_picomatch6();
|
|
@@ -348072,9 +348422,9 @@ var init_context5 = __esm({
|
|
|
348072
348422
|
async function docs(options) {
|
|
348073
348423
|
const ioHelper = options.ioHelper;
|
|
348074
348424
|
const url = "https://docs.aws.amazon.com/cdk/api/v2/";
|
|
348075
|
-
await ioHelper.defaults.info(
|
|
348425
|
+
await ioHelper.defaults.info(import_chalk40.default.green(url));
|
|
348076
348426
|
const browserCommand = options.browser.replace(/%u/g, url);
|
|
348077
|
-
await ioHelper.defaults.debug(`Opening documentation ${
|
|
348427
|
+
await ioHelper.defaults.debug(`Opening documentation ${import_chalk40.default.green(browserCommand)}`);
|
|
348078
348428
|
try {
|
|
348079
348429
|
const { stdout: stdout2, stderr } = await (0, tools_exports3.runUserCommandLine)(browserCommand);
|
|
348080
348430
|
if (stdout2) {
|
|
@@ -348089,11 +348439,11 @@ async function docs(options) {
|
|
|
348089
348439
|
}
|
|
348090
348440
|
return 0;
|
|
348091
348441
|
}
|
|
348092
|
-
var
|
|
348442
|
+
var import_chalk40;
|
|
348093
348443
|
var init_docs = __esm({
|
|
348094
348444
|
"lib/commands/docs.ts"() {
|
|
348095
348445
|
"use strict";
|
|
348096
|
-
|
|
348446
|
+
import_chalk40 = __toESM(require_source());
|
|
348097
348447
|
init_tools3();
|
|
348098
348448
|
__name(docs, "docs");
|
|
348099
348449
|
}
|
|
@@ -348121,13 +348471,13 @@ async function displayCliConfiguration(ioHelper, settings) {
|
|
|
348121
348471
|
debug2.push("CLI");
|
|
348122
348472
|
}
|
|
348123
348473
|
const debugging = debug2.length ? `debugging ${debug2.join(" & ")}` : "no debugging";
|
|
348124
|
-
await ioHelper.defaults.info(
|
|
348474
|
+
await ioHelper.defaults.info(import_chalk41.default.gray.italic(
|
|
348125
348475
|
`${verbose}, ${debugging}`
|
|
348126
348476
|
));
|
|
348127
348477
|
return true;
|
|
348128
348478
|
}
|
|
348129
348479
|
async function displayVersionInformation(ioHelper) {
|
|
348130
|
-
await ioHelper.defaults.info(`\u2139\uFE0F CDK CLI Version: ${
|
|
348480
|
+
await ioHelper.defaults.info(`\u2139\uFE0F CDK CLI Version: ${import_chalk41.default.green(versionWithBuild())}`);
|
|
348131
348481
|
return true;
|
|
348132
348482
|
}
|
|
348133
348483
|
async function displayAwsEnvironmentVariables(ioHelper) {
|
|
@@ -348138,7 +348488,7 @@ async function displayAwsEnvironmentVariables(ioHelper) {
|
|
|
348138
348488
|
}
|
|
348139
348489
|
await ioHelper.defaults.info("\u2139\uFE0F AWS environment variables:");
|
|
348140
348490
|
for (const key of keys) {
|
|
348141
|
-
await ioHelper.defaults.info(` - ${
|
|
348491
|
+
await ioHelper.defaults.info(` - ${import_chalk41.default.blue(key)} = ${import_chalk41.default.green(anonymizeAwsVariable(key, process2.env[key]))}`);
|
|
348142
348492
|
}
|
|
348143
348493
|
return true;
|
|
348144
348494
|
}
|
|
@@ -348152,10 +348502,10 @@ async function displayCdkEnvironmentVariables(ioHelper) {
|
|
|
348152
348502
|
let healthy = true;
|
|
348153
348503
|
for (const key of keys.sort()) {
|
|
348154
348504
|
if (key === cxapi14.CONTEXT_ENV || key === cxapi14.CONTEXT_OVERFLOW_LOCATION_ENV || key === cxapi14.OUTDIR_ENV) {
|
|
348155
|
-
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)`);
|
|
348156
348506
|
healthy = false;
|
|
348157
348507
|
} else {
|
|
348158
|
-
await ioHelper.defaults.info(` - ${
|
|
348508
|
+
await ioHelper.defaults.info(` - ${import_chalk41.default.blue(key)} = ${import_chalk41.default.green(process2.env[key])}`);
|
|
348159
348509
|
}
|
|
348160
348510
|
}
|
|
348161
348511
|
return healthy;
|
|
@@ -348169,13 +348519,13 @@ function anonymizeAwsVariable(name, value2) {
|
|
|
348169
348519
|
}
|
|
348170
348520
|
return value2;
|
|
348171
348521
|
}
|
|
348172
|
-
var process2, cxapi14,
|
|
348522
|
+
var process2, cxapi14, import_chalk41, verifications;
|
|
348173
348523
|
var init_doctor = __esm({
|
|
348174
348524
|
"lib/commands/doctor.ts"() {
|
|
348175
348525
|
"use strict";
|
|
348176
348526
|
process2 = __toESM(require("process"));
|
|
348177
348527
|
cxapi14 = __toESM(require_lib11());
|
|
348178
|
-
|
|
348528
|
+
import_chalk41 = __toESM(require_source());
|
|
348179
348529
|
init_display_version();
|
|
348180
348530
|
init_version();
|
|
348181
348531
|
__name(doctor, "doctor");
|
|
@@ -349606,8 +349956,8 @@ var require_prompt2 = __commonJS({
|
|
|
349606
349956
|
throw new Error("expected prompt to have a custom render method");
|
|
349607
349957
|
}
|
|
349608
349958
|
run() {
|
|
349609
|
-
return new Promise(async (
|
|
349610
|
-
this.once("submit",
|
|
349959
|
+
return new Promise(async (resolve17, reject) => {
|
|
349960
|
+
this.once("submit", resolve17);
|
|
349611
349961
|
this.once("cancel", reject);
|
|
349612
349962
|
if (await this.skip()) {
|
|
349613
349963
|
this.render = () => {
|
|
@@ -350133,14 +350483,14 @@ var require_array3 = __commonJS({
|
|
|
350133
350483
|
return this.render();
|
|
350134
350484
|
}, "number");
|
|
350135
350485
|
clearTimeout(this.numberTimeout);
|
|
350136
|
-
return new Promise((
|
|
350486
|
+
return new Promise((resolve17) => {
|
|
350137
350487
|
let len = this.choices.length;
|
|
350138
350488
|
let num = this.num;
|
|
350139
350489
|
let handle = /* @__PURE__ */ __name((val = false, res) => {
|
|
350140
350490
|
clearTimeout(this.numberTimeout);
|
|
350141
350491
|
if (val) res = number(num);
|
|
350142
350492
|
this.num = "";
|
|
350143
|
-
|
|
350493
|
+
resolve17(res);
|
|
350144
350494
|
}, "handle");
|
|
350145
350495
|
if (num === "0" || num.length === 1 && Number(num + "0") > len) {
|
|
350146
350496
|
return handle(true);
|
|
@@ -353341,7 +353691,7 @@ function normalizePath2(url, type) {
|
|
|
353341
353691
|
}
|
|
353342
353692
|
url.path = path54;
|
|
353343
353693
|
}
|
|
353344
|
-
function
|
|
353694
|
+
function resolve14(input, base) {
|
|
353345
353695
|
if (!input && !base)
|
|
353346
353696
|
return "";
|
|
353347
353697
|
const url = parseUrl2(input);
|
|
@@ -353412,7 +353762,7 @@ var init_resolve_uri = __esm({
|
|
|
353412
353762
|
__name(stripPathFilename, "stripPathFilename");
|
|
353413
353763
|
__name(mergePaths, "mergePaths");
|
|
353414
353764
|
__name(normalizePath2, "normalizePath");
|
|
353415
|
-
__name(
|
|
353765
|
+
__name(resolve14, "resolve");
|
|
353416
353766
|
}
|
|
353417
353767
|
});
|
|
353418
353768
|
|
|
@@ -353425,7 +353775,7 @@ function stripFilename(path54) {
|
|
|
353425
353775
|
function resolver(mapUrl, sourceRoot) {
|
|
353426
353776
|
const from = stripFilename(mapUrl);
|
|
353427
353777
|
const prefix = sourceRoot ? sourceRoot + "/" : "";
|
|
353428
|
-
return (source) =>
|
|
353778
|
+
return (source) => resolve14(prefix + (source || ""), from);
|
|
353429
353779
|
}
|
|
353430
353780
|
function maybeSort(mappings, owned) {
|
|
353431
353781
|
const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
|
|
@@ -353603,8 +353953,8 @@ var init_trace_mapping = __esm({
|
|
|
353603
353953
|
this.sources = sources;
|
|
353604
353954
|
this.sourcesContent = sourcesContent;
|
|
353605
353955
|
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
|
|
353606
|
-
const
|
|
353607
|
-
this.resolvedSources = sources.map(
|
|
353956
|
+
const resolve17 = resolver(mapUrl, sourceRoot);
|
|
353957
|
+
this.resolvedSources = sources.map(resolve17);
|
|
353608
353958
|
const { mappings } = parsed;
|
|
353609
353959
|
if (typeof mappings === "string") {
|
|
353610
353960
|
this._encoded = mappings;
|
|
@@ -353975,15 +354325,15 @@ __export(assembly_reader_exports, {
|
|
|
353975
354325
|
readAssembly: () => readAssembly
|
|
353976
354326
|
});
|
|
353977
354327
|
async function readAssembly(assemblyDir) {
|
|
353978
|
-
const manifestPath = path49.join(assemblyDir,
|
|
354328
|
+
const manifestPath = path49.join(assemblyDir, import_cloud_assembly_api16.MANIFEST_FILE);
|
|
353979
354329
|
if (!fs54.existsSync(manifestPath)) {
|
|
353980
354330
|
return { status: "not-found" };
|
|
353981
354331
|
}
|
|
353982
354332
|
try {
|
|
353983
|
-
const assembly = new
|
|
354333
|
+
const assembly = new import_cloud_assembly_api16.CloudAssembly(assemblyDir);
|
|
353984
354334
|
const projectRoot = path49.dirname(assemblyDir);
|
|
353985
354335
|
const sourceResolver = new SourceMapResolver(projectRoot);
|
|
353986
|
-
const tree = await (0,
|
|
354336
|
+
const tree = await (0, import_cloud_assembly_api16.buildConstructTreeAsync)(assembly, async (fields, stack, constructPath) => ({
|
|
353987
354337
|
...fields,
|
|
353988
354338
|
// templateFile comes from the manifest / a nested stack's aws:asset:path,
|
|
353989
354339
|
// both attacker-influenceable if cdk.out is tampered with. Drop any that
|
|
@@ -354012,13 +354362,13 @@ function loadViolations(assemblyDir) {
|
|
|
354012
354362
|
if (!fs54.existsSync(reportPath)) return void 0;
|
|
354013
354363
|
return JSON.parse(fs54.readFileSync(reportPath, "utf-8"));
|
|
354014
354364
|
}
|
|
354015
|
-
var fs54, path49,
|
|
354365
|
+
var fs54, path49, import_cloud_assembly_api16, import_cloud_assembly_schema10;
|
|
354016
354366
|
var init_assembly_reader = __esm({
|
|
354017
354367
|
"../@aws-cdk/cdk-explorer/lib/core/assembly-reader.ts"() {
|
|
354018
354368
|
"use strict";
|
|
354019
354369
|
fs54 = __toESM(require("fs"));
|
|
354020
354370
|
path49 = __toESM(require("path"));
|
|
354021
|
-
|
|
354371
|
+
import_cloud_assembly_api16 = __toESM(require_lib3());
|
|
354022
354372
|
import_cloud_assembly_schema10 = __toESM(require_lib2());
|
|
354023
354373
|
init_api_private2();
|
|
354024
354374
|
init_source_resolver();
|
|
@@ -355187,8 +355537,8 @@ var require_semaphore = __commonJS({
|
|
|
355187
355537
|
this._waiting = [];
|
|
355188
355538
|
}
|
|
355189
355539
|
lock(thunk) {
|
|
355190
|
-
return new Promise((
|
|
355191
|
-
this._waiting.push({ thunk, resolve:
|
|
355540
|
+
return new Promise((resolve17, reject) => {
|
|
355541
|
+
this._waiting.push({ thunk, resolve: resolve17, reject });
|
|
355192
355542
|
this.runNext();
|
|
355193
355543
|
});
|
|
355194
355544
|
}
|
|
@@ -356753,9 +357103,9 @@ ${JSON.stringify(message2, null, 4)}`);
|
|
|
356753
357103
|
if (typeof cancellationStrategy.sender.enableCancellation === "function") {
|
|
356754
357104
|
cancellationStrategy.sender.enableCancellation(requestMessage);
|
|
356755
357105
|
}
|
|
356756
|
-
return new Promise(async (
|
|
357106
|
+
return new Promise(async (resolve17, reject) => {
|
|
356757
357107
|
const resolveWithCleanup = /* @__PURE__ */ __name((r6) => {
|
|
356758
|
-
|
|
357108
|
+
resolve17(r6);
|
|
356759
357109
|
cancellationStrategy.sender.cleanup(id);
|
|
356760
357110
|
disposable?.dispose();
|
|
356761
357111
|
}, "resolveWithCleanup");
|
|
@@ -357177,10 +357527,10 @@ var require_ril = __commonJS({
|
|
|
357177
357527
|
return api_1.Disposable.create(() => this.stream.off("end", listener));
|
|
357178
357528
|
}
|
|
357179
357529
|
write(data, encoding) {
|
|
357180
|
-
return new Promise((
|
|
357530
|
+
return new Promise((resolve17, reject) => {
|
|
357181
357531
|
const callback = /* @__PURE__ */ __name((error3) => {
|
|
357182
357532
|
if (error3 === void 0 || error3 === null) {
|
|
357183
|
-
|
|
357533
|
+
resolve17();
|
|
357184
357534
|
} else {
|
|
357185
357535
|
reject(error3);
|
|
357186
357536
|
}
|
|
@@ -357459,10 +357809,10 @@ var require_main2 = __commonJS({
|
|
|
357459
357809
|
exports2.generateRandomPipeName = generateRandomPipeName;
|
|
357460
357810
|
function createClientPipeTransport(pipeName, encoding = "utf-8") {
|
|
357461
357811
|
let connectResolve;
|
|
357462
|
-
const connected = new Promise((
|
|
357463
|
-
connectResolve =
|
|
357812
|
+
const connected = new Promise((resolve17, _reject) => {
|
|
357813
|
+
connectResolve = resolve17;
|
|
357464
357814
|
});
|
|
357465
|
-
return new Promise((
|
|
357815
|
+
return new Promise((resolve17, reject) => {
|
|
357466
357816
|
let server = (0, net_1.createServer)((socket) => {
|
|
357467
357817
|
server.close();
|
|
357468
357818
|
connectResolve([
|
|
@@ -357473,7 +357823,7 @@ var require_main2 = __commonJS({
|
|
|
357473
357823
|
server.on("error", reject);
|
|
357474
357824
|
server.listen(pipeName, () => {
|
|
357475
357825
|
server.removeListener("error", reject);
|
|
357476
|
-
|
|
357826
|
+
resolve17({
|
|
357477
357827
|
onConnected: /* @__PURE__ */ __name(() => {
|
|
357478
357828
|
return connected;
|
|
357479
357829
|
}, "onConnected")
|
|
@@ -357494,10 +357844,10 @@ var require_main2 = __commonJS({
|
|
|
357494
357844
|
exports2.createServerPipeTransport = createServerPipeTransport;
|
|
357495
357845
|
function createClientSocketTransport(port, encoding = "utf-8") {
|
|
357496
357846
|
let connectResolve;
|
|
357497
|
-
const connected = new Promise((
|
|
357498
|
-
connectResolve =
|
|
357847
|
+
const connected = new Promise((resolve17, _reject) => {
|
|
357848
|
+
connectResolve = resolve17;
|
|
357499
357849
|
});
|
|
357500
|
-
return new Promise((
|
|
357850
|
+
return new Promise((resolve17, reject) => {
|
|
357501
357851
|
const server = (0, net_1.createServer)((socket) => {
|
|
357502
357852
|
server.close();
|
|
357503
357853
|
connectResolve([
|
|
@@ -357508,7 +357858,7 @@ var require_main2 = __commonJS({
|
|
|
357508
357858
|
server.on("error", reject);
|
|
357509
357859
|
server.listen(port, "127.0.0.1", () => {
|
|
357510
357860
|
server.removeListener("error", reject);
|
|
357511
|
-
|
|
357861
|
+
resolve17({
|
|
357512
357862
|
onConnected: /* @__PURE__ */ __name(() => {
|
|
357513
357863
|
return connected;
|
|
357514
357864
|
}, "onConnected")
|
|
@@ -358738,8 +359088,8 @@ var require_semaphore2 = __commonJS({
|
|
|
358738
359088
|
this._waiting = [];
|
|
358739
359089
|
}
|
|
358740
359090
|
lock(thunk) {
|
|
358741
|
-
return new Promise((
|
|
358742
|
-
this._waiting.push({ thunk, resolve:
|
|
359091
|
+
return new Promise((resolve17, reject) => {
|
|
359092
|
+
this._waiting.push({ thunk, resolve: resolve17, reject });
|
|
358743
359093
|
this.runNext();
|
|
358744
359094
|
});
|
|
358745
359095
|
}
|
|
@@ -360304,9 +360654,9 @@ ${JSON.stringify(message2, null, 4)}`);
|
|
|
360304
360654
|
if (typeof cancellationStrategy.sender.enableCancellation === "function") {
|
|
360305
360655
|
cancellationStrategy.sender.enableCancellation(requestMessage);
|
|
360306
360656
|
}
|
|
360307
|
-
return new Promise(async (
|
|
360657
|
+
return new Promise(async (resolve17, reject) => {
|
|
360308
360658
|
const resolveWithCleanup = /* @__PURE__ */ __name((r6) => {
|
|
360309
|
-
|
|
360659
|
+
resolve17(r6);
|
|
360310
360660
|
cancellationStrategy.sender.cleanup(id);
|
|
360311
360661
|
disposable?.dispose();
|
|
360312
360662
|
}, "resolveWithCleanup");
|
|
@@ -360727,10 +361077,10 @@ var require_ril2 = __commonJS({
|
|
|
360727
361077
|
return api_1.Disposable.create(() => this.stream.off("end", listener));
|
|
360728
361078
|
}
|
|
360729
361079
|
write(data, encoding) {
|
|
360730
|
-
return new Promise((
|
|
361080
|
+
return new Promise((resolve17, reject) => {
|
|
360731
361081
|
const callback = /* @__PURE__ */ __name((error3) => {
|
|
360732
361082
|
if (error3 === void 0 || error3 === null) {
|
|
360733
|
-
|
|
361083
|
+
resolve17();
|
|
360734
361084
|
} else {
|
|
360735
361085
|
reject(error3);
|
|
360736
361086
|
}
|
|
@@ -361009,10 +361359,10 @@ var require_main3 = __commonJS({
|
|
|
361009
361359
|
exports2.generateRandomPipeName = generateRandomPipeName;
|
|
361010
361360
|
function createClientPipeTransport(pipeName, encoding = "utf-8") {
|
|
361011
361361
|
let connectResolve;
|
|
361012
|
-
const connected = new Promise((
|
|
361013
|
-
connectResolve =
|
|
361362
|
+
const connected = new Promise((resolve17, _reject) => {
|
|
361363
|
+
connectResolve = resolve17;
|
|
361014
361364
|
});
|
|
361015
|
-
return new Promise((
|
|
361365
|
+
return new Promise((resolve17, reject) => {
|
|
361016
361366
|
let server = (0, net_1.createServer)((socket) => {
|
|
361017
361367
|
server.close();
|
|
361018
361368
|
connectResolve([
|
|
@@ -361023,7 +361373,7 @@ var require_main3 = __commonJS({
|
|
|
361023
361373
|
server.on("error", reject);
|
|
361024
361374
|
server.listen(pipeName, () => {
|
|
361025
361375
|
server.removeListener("error", reject);
|
|
361026
|
-
|
|
361376
|
+
resolve17({
|
|
361027
361377
|
onConnected: /* @__PURE__ */ __name(() => {
|
|
361028
361378
|
return connected;
|
|
361029
361379
|
}, "onConnected")
|
|
@@ -361044,10 +361394,10 @@ var require_main3 = __commonJS({
|
|
|
361044
361394
|
exports2.createServerPipeTransport = createServerPipeTransport;
|
|
361045
361395
|
function createClientSocketTransport(port, encoding = "utf-8") {
|
|
361046
361396
|
let connectResolve;
|
|
361047
|
-
const connected = new Promise((
|
|
361048
|
-
connectResolve =
|
|
361397
|
+
const connected = new Promise((resolve17, _reject) => {
|
|
361398
|
+
connectResolve = resolve17;
|
|
361049
361399
|
});
|
|
361050
|
-
return new Promise((
|
|
361400
|
+
return new Promise((resolve17, reject) => {
|
|
361051
361401
|
const server = (0, net_1.createServer)((socket) => {
|
|
361052
361402
|
server.close();
|
|
361053
361403
|
connectResolve([
|
|
@@ -361058,7 +361408,7 @@ var require_main3 = __commonJS({
|
|
|
361058
361408
|
server.on("error", reject);
|
|
361059
361409
|
server.listen(port, "127.0.0.1", () => {
|
|
361060
361410
|
server.removeListener("error", reject);
|
|
361061
|
-
|
|
361411
|
+
resolve17({
|
|
361062
361412
|
onConnected: /* @__PURE__ */ __name(() => {
|
|
361063
361413
|
return connected;
|
|
361064
361414
|
}, "onConnected")
|
|
@@ -366112,8 +366462,8 @@ var require_server = __commonJS({
|
|
|
366112
366462
|
if (value2 instanceof Promise) {
|
|
366113
366463
|
return value2;
|
|
366114
366464
|
} else if (Is.thenable(value2)) {
|
|
366115
|
-
return new Promise((
|
|
366116
|
-
value2.then((resolved) =>
|
|
366465
|
+
return new Promise((resolve17, reject) => {
|
|
366466
|
+
value2.then((resolved) => resolve17(resolved), (error3) => reject(error3));
|
|
366117
366467
|
});
|
|
366118
366468
|
} else {
|
|
366119
366469
|
return Promise.resolve(value2);
|
|
@@ -366387,7 +366737,7 @@ var require_files = __commonJS({
|
|
|
366387
366737
|
return process.platform === "win32";
|
|
366388
366738
|
}
|
|
366389
366739
|
__name(isWindows2, "isWindows");
|
|
366390
|
-
function
|
|
366740
|
+
function resolve17(moduleName, nodePath, cwd, tracer) {
|
|
366391
366741
|
const nodePathKey = "NODE_PATH";
|
|
366392
366742
|
const app = [
|
|
366393
366743
|
"var p = process;",
|
|
@@ -366406,7 +366756,7 @@ var require_files = __commonJS({
|
|
|
366406
366756
|
"}",
|
|
366407
366757
|
"});"
|
|
366408
366758
|
].join("");
|
|
366409
|
-
return new Promise((
|
|
366759
|
+
return new Promise((resolve18, reject) => {
|
|
366410
366760
|
let env3 = process.env;
|
|
366411
366761
|
let newEnv = /* @__PURE__ */ Object.create(null);
|
|
366412
366762
|
Object.keys(env3).forEach((key) => newEnv[key] = env3[key]);
|
|
@@ -366438,7 +366788,7 @@ var require_files = __commonJS({
|
|
|
366438
366788
|
if (message3.c === "r") {
|
|
366439
366789
|
cp.send({ c: "e" });
|
|
366440
366790
|
if (message3.s) {
|
|
366441
|
-
|
|
366791
|
+
resolve18(message3.r);
|
|
366442
366792
|
} else {
|
|
366443
366793
|
reject(new Error(`Failed to resolve module: ${moduleName}`));
|
|
366444
366794
|
}
|
|
@@ -366454,8 +366804,8 @@ var require_files = __commonJS({
|
|
|
366454
366804
|
}
|
|
366455
366805
|
});
|
|
366456
366806
|
}
|
|
366457
|
-
__name(
|
|
366458
|
-
exports2.resolve =
|
|
366807
|
+
__name(resolve17, "resolve");
|
|
366808
|
+
exports2.resolve = resolve17;
|
|
366459
366809
|
function resolveGlobalNodePath(tracer) {
|
|
366460
366810
|
let npmCommand = "npm";
|
|
366461
366811
|
const env3 = /* @__PURE__ */ Object.create(null);
|
|
@@ -366574,17 +366924,17 @@ var require_files = __commonJS({
|
|
|
366574
366924
|
if (!path54.isAbsolute(nodePath)) {
|
|
366575
366925
|
nodePath = path54.join(workspaceRoot, nodePath);
|
|
366576
366926
|
}
|
|
366577
|
-
return
|
|
366927
|
+
return resolve17(moduleName, nodePath, nodePath, tracer).then((value2) => {
|
|
366578
366928
|
if (FileSystem.isParent(nodePath, value2)) {
|
|
366579
366929
|
return value2;
|
|
366580
366930
|
} else {
|
|
366581
366931
|
return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
|
|
366582
366932
|
}
|
|
366583
366933
|
}).then(void 0, (_error) => {
|
|
366584
|
-
return
|
|
366934
|
+
return resolve17(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
|
|
366585
366935
|
});
|
|
366586
366936
|
} else {
|
|
366587
|
-
return
|
|
366937
|
+
return resolve17(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
|
|
366588
366938
|
}
|
|
366589
366939
|
}
|
|
366590
366940
|
__name(resolveModulePath, "resolveModulePath");
|
|
@@ -367286,7 +367636,7 @@ async function resourceTarget(node) {
|
|
|
367286
367636
|
} catch {
|
|
367287
367637
|
return void 0;
|
|
367288
367638
|
}
|
|
367289
|
-
const block = (0,
|
|
367639
|
+
const block = (0, import_cloud_assembly_api17.resolveResourceRange)(templateText, node.logicalId);
|
|
367290
367640
|
if (block === void 0) {
|
|
367291
367641
|
return void 0;
|
|
367292
367642
|
}
|
|
@@ -367296,7 +367646,7 @@ async function resourceTarget(node) {
|
|
|
367296
367646
|
};
|
|
367297
367647
|
}
|
|
367298
367648
|
function sourceTargetAtTemplateOffset(index, templateFile, templateText, offset) {
|
|
367299
|
-
const logicalId = (0,
|
|
367649
|
+
const logicalId = (0, import_cloud_assembly_api17.resolveLogicalIdAtOffset)(templateText, offset);
|
|
367300
367650
|
if (logicalId === void 0) {
|
|
367301
367651
|
return void 0;
|
|
367302
367652
|
}
|
|
@@ -367310,13 +367660,13 @@ function sourceTargetAtTemplateOffset(index, templateFile, templateText, offset)
|
|
|
367310
367660
|
range: { start: position, end: position }
|
|
367311
367661
|
};
|
|
367312
367662
|
}
|
|
367313
|
-
var fs55, import_url2,
|
|
367663
|
+
var fs55, import_url2, import_cloud_assembly_api17;
|
|
367314
367664
|
var init_template_locator = __esm({
|
|
367315
367665
|
"../@aws-cdk/cdk-explorer/lib/lsp/template-locator.ts"() {
|
|
367316
367666
|
"use strict";
|
|
367317
367667
|
fs55 = __toESM(require("fs"));
|
|
367318
367668
|
import_url2 = require("url");
|
|
367319
|
-
|
|
367669
|
+
import_cloud_assembly_api17 = __toESM(require_lib3());
|
|
367320
367670
|
init_positions();
|
|
367321
367671
|
__name(resourceTarget, "resourceTarget");
|
|
367322
367672
|
__name(sourceTargetAtTemplateOffset, "sourceTargetAtTemplateOffset");
|
|
@@ -367558,7 +367908,7 @@ async function resolveHoverLinks(nodes6, primary, readTemplate) {
|
|
|
367558
367908
|
const resolveOnce = /* @__PURE__ */ __name(async (file) => {
|
|
367559
367909
|
if (!templates.has(file)) {
|
|
367560
367910
|
const text = await readTemplate(file);
|
|
367561
|
-
const ranges = text === void 0 ? void 0 : (0,
|
|
367911
|
+
const ranges = text === void 0 ? void 0 : (0, import_cloud_assembly_api18.indexTemplateRanges)(text);
|
|
367562
367912
|
templates.set(file, text !== void 0 && ranges !== void 0 ? { text, ranges } : void 0);
|
|
367563
367913
|
}
|
|
367564
367914
|
return templates.get(file);
|
|
@@ -367714,12 +368064,12 @@ function histogram(nodes6) {
|
|
|
367714
368064
|
function truncate(text, max) {
|
|
367715
368065
|
return text.length <= max ? text : `${text.slice(0, max - 1)}\u2026`;
|
|
367716
368066
|
}
|
|
367717
|
-
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;
|
|
367718
368068
|
var init_hover = __esm({
|
|
367719
368069
|
"../@aws-cdk/cdk-explorer/lib/lsp/hover.ts"() {
|
|
367720
368070
|
"use strict";
|
|
367721
368071
|
import_url5 = require("url");
|
|
367722
|
-
|
|
368072
|
+
import_cloud_assembly_api18 = __toESM(require_lib3());
|
|
367723
368073
|
import_node2 = __toESM(require_node6());
|
|
367724
368074
|
init_codelens();
|
|
367725
368075
|
init_positions();
|
|
@@ -367846,17 +368196,17 @@ function startAssemblyWatcher(options) {
|
|
|
367846
368196
|
}
|
|
367847
368197
|
};
|
|
367848
368198
|
}
|
|
367849
|
-
var path51,
|
|
368199
|
+
var path51, import_cloud_assembly_api19, import_cloud_assembly_schema11, TREE_FILE, ASSEMBLY_SIGNAL_FILES, DEBOUNCE_MS;
|
|
367850
368200
|
var init_assembly_watcher = __esm({
|
|
367851
368201
|
"../@aws-cdk/cdk-explorer/lib/core/assembly-watcher.ts"() {
|
|
367852
368202
|
"use strict";
|
|
367853
368203
|
path51 = __toESM(require("path"));
|
|
367854
|
-
|
|
368204
|
+
import_cloud_assembly_api19 = __toESM(require_lib3());
|
|
367855
368205
|
import_cloud_assembly_schema11 = __toESM(require_lib2());
|
|
367856
368206
|
init_esm2();
|
|
367857
368207
|
TREE_FILE = "tree.json";
|
|
367858
368208
|
ASSEMBLY_SIGNAL_FILES = /* @__PURE__ */ new Set([
|
|
367859
|
-
|
|
368209
|
+
import_cloud_assembly_api19.MANIFEST_FILE,
|
|
367860
368210
|
TREE_FILE,
|
|
367861
368211
|
import_cloud_assembly_schema11.VALIDATION_REPORT_FILE
|
|
367862
368212
|
]);
|
|
@@ -367873,7 +368223,7 @@ __export(server_exports, {
|
|
|
367873
368223
|
startServer: () => startServer
|
|
367874
368224
|
});
|
|
367875
368225
|
async function sleep3(ms) {
|
|
367876
|
-
return new Promise((
|
|
368226
|
+
return new Promise((resolve17) => setTimeout(resolve17, ms));
|
|
367877
368227
|
}
|
|
367878
368228
|
function handleSynthOnSave(result2, log) {
|
|
367879
368229
|
switch (result2.status) {
|
|
@@ -367914,7 +368264,7 @@ function createLspHandlers(options) {
|
|
|
367914
368264
|
let autoSynthEnabled = false;
|
|
367915
368265
|
let shouldIgnore = /* @__PURE__ */ __name(() => false, "shouldIgnore");
|
|
367916
368266
|
let assemblyWatcher;
|
|
367917
|
-
let cachedIndex =
|
|
368267
|
+
let cachedIndex = import_cloud_assembly_api20.ConstructIndex.fromTree([]);
|
|
367918
368268
|
let cachedTree = [];
|
|
367919
368269
|
let cachedWarnings = [];
|
|
367920
368270
|
let cachedAssemblyDir;
|
|
@@ -367960,7 +368310,7 @@ function createLspHandlers(options) {
|
|
|
367960
368310
|
for (const warning2 of warnings) {
|
|
367961
368311
|
log.warn(warning2);
|
|
367962
368312
|
}
|
|
367963
|
-
cachedIndex =
|
|
368313
|
+
cachedIndex = import_cloud_assembly_api20.ConstructIndex.fromTree(tree);
|
|
367964
368314
|
cachedTree = tree;
|
|
367965
368315
|
cachedWarnings = warnings;
|
|
367966
368316
|
cachedAssemblyDir = assemblyDir;
|
|
@@ -368148,7 +368498,7 @@ function createLspHandlers(options) {
|
|
|
368148
368498
|
const templateRangesFor = /* @__PURE__ */ __name((templateFile) => {
|
|
368149
368499
|
if (!rangesByTemplate.has(templateFile)) {
|
|
368150
368500
|
try {
|
|
368151
|
-
rangesByTemplate.set(templateFile, (0,
|
|
368501
|
+
rangesByTemplate.set(templateFile, (0, import_cloud_assembly_api20.indexTemplateRanges)(fs56.readFileSync(templateFile, "utf-8")));
|
|
368152
368502
|
} catch {
|
|
368153
368503
|
rangesByTemplate.set(templateFile, void 0);
|
|
368154
368504
|
}
|
|
@@ -368242,14 +368592,14 @@ function startServer(options) {
|
|
|
368242
368592
|
connection.onExit(() => process.exit(0));
|
|
368243
368593
|
connection.listen();
|
|
368244
368594
|
}
|
|
368245
|
-
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;
|
|
368246
368596
|
var init_server = __esm({
|
|
368247
368597
|
"../@aws-cdk/cdk-explorer/lib/lsp/server.ts"() {
|
|
368248
368598
|
"use strict";
|
|
368249
368599
|
fs56 = __toESM(require("fs"));
|
|
368250
368600
|
path52 = __toESM(require("path"));
|
|
368251
368601
|
import_url7 = require("url");
|
|
368252
|
-
|
|
368602
|
+
import_cloud_assembly_api20 = __toESM(require_lib3());
|
|
368253
368603
|
import_toolkit_lib22 = __toESM(require_lib12());
|
|
368254
368604
|
import_node4 = __toESM(require_node3());
|
|
368255
368605
|
import_node5 = __toESM(require_node6());
|
|
@@ -368338,7 +368688,7 @@ async function runSynth(options) {
|
|
|
368338
368688
|
} catch (err) {
|
|
368339
368689
|
return classify(err);
|
|
368340
368690
|
}
|
|
368341
|
-
await new Promise((
|
|
368691
|
+
await new Promise((resolve17) => setTimeout(resolve17, READER_HANDOFF_DELAY_MS));
|
|
368342
368692
|
try {
|
|
368343
368693
|
await cached3.dispose();
|
|
368344
368694
|
} catch (err) {
|
|
@@ -368453,8 +368803,8 @@ async function lsp(options = {}) {
|
|
|
368453
368803
|
return 0;
|
|
368454
368804
|
}
|
|
368455
368805
|
(0, import_cdk_explorer.startLspServer)(versionNumber2());
|
|
368456
|
-
await new Promise((
|
|
368457
|
-
const done = /* @__PURE__ */ __name(() =>
|
|
368806
|
+
await new Promise((resolve17) => {
|
|
368807
|
+
const done = /* @__PURE__ */ __name(() => resolve17(), "done");
|
|
368458
368808
|
process3.stdin.once("end", done);
|
|
368459
368809
|
process3.stdin.once("close", done);
|
|
368460
368810
|
});
|
|
@@ -368601,6 +368951,7 @@ __export(cli_exports, {
|
|
|
368601
368951
|
async function exec(args, synthesizer) {
|
|
368602
368952
|
const libraryLoadTime = performance.now();
|
|
368603
368953
|
const argv = await parseCommandLineArguments(args);
|
|
368954
|
+
handleTracker = argv.debugCli ? trackLeakedHandles() : void 0;
|
|
368604
368955
|
argv.language = getLanguageFromAlias(argv.language) ?? argv.language;
|
|
368605
368956
|
if (argv.noColor) {
|
|
368606
368957
|
process.env.FORCE_COLOR = "0";
|
|
@@ -368610,18 +368961,7 @@ async function exec(args, synthesizer) {
|
|
|
368610
368961
|
process.env.FORCE_COLOR = "0";
|
|
368611
368962
|
}
|
|
368612
368963
|
const cmd = argv._[0];
|
|
368613
|
-
|
|
368614
|
-
if (argv.verbose) {
|
|
368615
|
-
switch (argv.verbose) {
|
|
368616
|
-
case 1:
|
|
368617
|
-
ioMessageLevel = "debug";
|
|
368618
|
-
break;
|
|
368619
|
-
case 2:
|
|
368620
|
-
default:
|
|
368621
|
-
ioMessageLevel = "trace";
|
|
368622
|
-
break;
|
|
368623
|
-
}
|
|
368624
|
-
}
|
|
368964
|
+
const ioMessageLevel = determineIoMessageLevel(argv);
|
|
368625
368965
|
const ioHost = CliIoHost.instance({
|
|
368626
368966
|
logLevel: ioMessageLevel,
|
|
368627
368967
|
isTTY: process.stdout.isTTY,
|
|
@@ -368764,7 +369104,7 @@ async function exec(args, synthesizer) {
|
|
|
368764
369104
|
async function main(command6, args2) {
|
|
368765
369105
|
ioHost.currentAction = command6;
|
|
368766
369106
|
const toolkitStackName = ToolkitInfo.determineName(configuration.settings.get(["toolkitStackName"]));
|
|
368767
|
-
await ioHost.defaults.debug(`Toolkit stack: ${
|
|
369107
|
+
await ioHost.defaults.debug(`Toolkit stack: ${import_chalk42.default.bold(toolkitStackName)}`);
|
|
368768
369108
|
const cloudFormation = new Deployments({
|
|
368769
369109
|
sdkProvider,
|
|
368770
369110
|
toolkitStackName,
|
|
@@ -368827,6 +369167,12 @@ async function exec(args, synthesizer) {
|
|
|
368827
369167
|
case "diff":
|
|
368828
369168
|
ioHost.currentAction = "diff";
|
|
368829
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
|
+
}
|
|
368830
369176
|
return cli2.diff({
|
|
368831
369177
|
stackNames: args2.STACKS,
|
|
368832
369178
|
exclusively: args2.exclusively,
|
|
@@ -368837,7 +369183,8 @@ async function exec(args, synthesizer) {
|
|
|
368837
369183
|
fail: args2.fail != null ? args2.fail : !enableDiffNoFail,
|
|
368838
369184
|
compareAgainstProcessedTemplate: args2.processed,
|
|
368839
369185
|
quiet: args2.quiet,
|
|
368840
|
-
method:
|
|
369186
|
+
method: diffMethod,
|
|
369187
|
+
changeSetName: args2.changeSetName,
|
|
368841
369188
|
toolkitStackName,
|
|
368842
369189
|
importExistingResources: args2.importExistingResources,
|
|
368843
369190
|
includeMoves: args2["include-moves"]
|
|
@@ -369136,6 +369483,12 @@ async function exec(args, synthesizer) {
|
|
|
369136
369483
|
}
|
|
369137
369484
|
__name(main, "main");
|
|
369138
369485
|
}
|
|
369486
|
+
function determineIoMessageLevel(argv) {
|
|
369487
|
+
if (argv.verbose) {
|
|
369488
|
+
return argv.verbose === 1 ? "debug" : "trace";
|
|
369489
|
+
}
|
|
369490
|
+
return argv.debugCli ? "debug" : "info";
|
|
369491
|
+
}
|
|
369139
369492
|
async function determineBootstrapVersion(ioHost, args) {
|
|
369140
369493
|
let source;
|
|
369141
369494
|
if (args.template) {
|
|
@@ -369331,18 +369684,23 @@ function cli(args = process.argv.slice(2)) {
|
|
|
369331
369684
|
} catch (e6) {
|
|
369332
369685
|
await CliIoHost.get()?.asIoHelper().defaults.trace(`Ending Telemetry failed: ${e6.message}`);
|
|
369333
369686
|
}
|
|
369687
|
+
const ioHelper = CliIoHost.get()?.asIoHelper();
|
|
369688
|
+
if (ioHelper) {
|
|
369689
|
+
handleTracker?.scheduleReport(ioHelper);
|
|
369690
|
+
}
|
|
369334
369691
|
});
|
|
369335
369692
|
}
|
|
369336
|
-
var cxapi15, import_toolkit_lib25,
|
|
369693
|
+
var cxapi15, import_toolkit_lib25, import_chalk42, handleTracker;
|
|
369337
369694
|
var init_cli = __esm({
|
|
369338
369695
|
"lib/cli/cli.ts"() {
|
|
369339
369696
|
"use strict";
|
|
369340
369697
|
cxapi15 = __toESM(require_lib11());
|
|
369341
369698
|
import_toolkit_lib25 = __toESM(require_lib12());
|
|
369342
|
-
|
|
369699
|
+
import_chalk42 = __toESM(require_source());
|
|
369343
369700
|
init_util9();
|
|
369344
369701
|
init_cdk_toolkit();
|
|
369345
369702
|
init_ci_systems();
|
|
369703
|
+
init_debug_handles();
|
|
369346
369704
|
init_display_version();
|
|
369347
369705
|
init_io_host2();
|
|
369348
369706
|
init_parse_command_line_arguments();
|
|
@@ -369374,6 +369732,7 @@ var init_cli = __esm({
|
|
|
369374
369732
|
init_ci();
|
|
369375
369733
|
init_guess_agent();
|
|
369376
369734
|
__name(exec, "exec");
|
|
369735
|
+
__name(determineIoMessageLevel, "determineIoMessageLevel");
|
|
369377
369736
|
__name(determineBootstrapVersion, "determineBootstrapVersion");
|
|
369378
369737
|
__name(isFeatureEnabled, "isFeatureEnabled");
|
|
369379
369738
|
__name(specificStacksOrAllRecursively, "specificStacksOrAllRecursively");
|