@aws-cdk/integ-runner 2.204.4 → 2.204.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_LICENSES +17 -17
- package/lib/workers/extract/index.js +451 -331
- package/package.json +12 -12
|
@@ -4766,7 +4766,7 @@ var require_semver2 = __commonJS({
|
|
|
4766
4766
|
// ../cloud-assembly-schema/cli-version.json
|
|
4767
4767
|
var require_cli_version = __commonJS({
|
|
4768
4768
|
"../cloud-assembly-schema/cli-version.json"(exports2, module2) {
|
|
4769
|
-
module2.exports = { version: "2.
|
|
4769
|
+
module2.exports = { version: "2.1138.0" };
|
|
4770
4770
|
}
|
|
4771
4771
|
});
|
|
4772
4772
|
|
|
@@ -13382,14 +13382,14 @@ var require_templates = __commonJS({
|
|
|
13382
13382
|
return results;
|
|
13383
13383
|
}
|
|
13384
13384
|
__name(parseStyle, "parseStyle");
|
|
13385
|
-
function buildStyle(
|
|
13385
|
+
function buildStyle(chalk33, styles) {
|
|
13386
13386
|
const enabled = {};
|
|
13387
13387
|
for (const layer of styles) {
|
|
13388
13388
|
for (const style of layer.styles) {
|
|
13389
13389
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
13390
13390
|
}
|
|
13391
13391
|
}
|
|
13392
|
-
let current =
|
|
13392
|
+
let current = chalk33;
|
|
13393
13393
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
13394
13394
|
if (!Array.isArray(styles2)) {
|
|
13395
13395
|
continue;
|
|
@@ -13402,7 +13402,7 @@ var require_templates = __commonJS({
|
|
|
13402
13402
|
return current;
|
|
13403
13403
|
}
|
|
13404
13404
|
__name(buildStyle, "buildStyle");
|
|
13405
|
-
module2.exports = (
|
|
13405
|
+
module2.exports = (chalk33, temporary) => {
|
|
13406
13406
|
const styles = [];
|
|
13407
13407
|
const chunks2 = [];
|
|
13408
13408
|
let chunk = [];
|
|
@@ -13412,13 +13412,13 @@ var require_templates = __commonJS({
|
|
|
13412
13412
|
} else if (style) {
|
|
13413
13413
|
const string = chunk.join("");
|
|
13414
13414
|
chunk = [];
|
|
13415
|
-
chunks2.push(styles.length === 0 ? string : buildStyle(
|
|
13415
|
+
chunks2.push(styles.length === 0 ? string : buildStyle(chalk33, styles)(string));
|
|
13416
13416
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
13417
13417
|
} else if (close) {
|
|
13418
13418
|
if (styles.length === 0) {
|
|
13419
13419
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
13420
13420
|
}
|
|
13421
|
-
chunks2.push(buildStyle(
|
|
13421
|
+
chunks2.push(buildStyle(chalk33, styles)(chunk.join("")));
|
|
13422
13422
|
chunk = [];
|
|
13423
13423
|
styles.pop();
|
|
13424
13424
|
} else {
|
|
@@ -13469,16 +13469,16 @@ var require_source = __commonJS({
|
|
|
13469
13469
|
}
|
|
13470
13470
|
};
|
|
13471
13471
|
var chalkFactory = /* @__PURE__ */ __name((options) => {
|
|
13472
|
-
const
|
|
13473
|
-
applyOptions(
|
|
13474
|
-
|
|
13475
|
-
Object.setPrototypeOf(
|
|
13476
|
-
Object.setPrototypeOf(
|
|
13477
|
-
|
|
13472
|
+
const chalk34 = {};
|
|
13473
|
+
applyOptions(chalk34, options);
|
|
13474
|
+
chalk34.template = (...arguments_) => chalkTag(chalk34.template, ...arguments_);
|
|
13475
|
+
Object.setPrototypeOf(chalk34, Chalk.prototype);
|
|
13476
|
+
Object.setPrototypeOf(chalk34.template, chalk34);
|
|
13477
|
+
chalk34.template.constructor = () => {
|
|
13478
13478
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
13479
13479
|
};
|
|
13480
|
-
|
|
13481
|
-
return
|
|
13480
|
+
chalk34.template.Instance = ChalkClass;
|
|
13481
|
+
return chalk34.template;
|
|
13482
13482
|
}, "chalkFactory");
|
|
13483
13483
|
function Chalk(options) {
|
|
13484
13484
|
return chalkFactory(options);
|
|
@@ -13590,7 +13590,7 @@ var require_source = __commonJS({
|
|
|
13590
13590
|
return openAll + string + closeAll;
|
|
13591
13591
|
}, "applyStyle");
|
|
13592
13592
|
var template;
|
|
13593
|
-
var chalkTag = /* @__PURE__ */ __name((
|
|
13593
|
+
var chalkTag = /* @__PURE__ */ __name((chalk34, ...strings) => {
|
|
13594
13594
|
const [firstString] = strings;
|
|
13595
13595
|
if (!isArray2(firstString) || !isArray2(firstString.raw)) {
|
|
13596
13596
|
return strings.join(" ");
|
|
@@ -13606,14 +13606,14 @@ var require_source = __commonJS({
|
|
|
13606
13606
|
if (template === void 0) {
|
|
13607
13607
|
template = require_templates();
|
|
13608
13608
|
}
|
|
13609
|
-
return template(
|
|
13609
|
+
return template(chalk34, parts.join(""));
|
|
13610
13610
|
}, "chalkTag");
|
|
13611
13611
|
Object.defineProperties(Chalk.prototype, styles);
|
|
13612
|
-
var
|
|
13613
|
-
|
|
13614
|
-
|
|
13615
|
-
|
|
13616
|
-
module2.exports =
|
|
13612
|
+
var chalk33 = Chalk();
|
|
13613
|
+
chalk33.supportsColor = stdoutColor;
|
|
13614
|
+
chalk33.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
13615
|
+
chalk33.stderr.supportsColor = stderrColor;
|
|
13616
|
+
module2.exports = chalk33;
|
|
13617
13617
|
}
|
|
13618
13618
|
});
|
|
13619
13619
|
|
|
@@ -21936,12 +21936,44 @@ var require_zip = __commonJS({
|
|
|
21936
21936
|
}
|
|
21937
21937
|
});
|
|
21938
21938
|
|
|
21939
|
+
// ../private-tools/lib/s3-path-style/index.js
|
|
21940
|
+
var require_s3_path_style = __commonJS({
|
|
21941
|
+
"../private-tools/lib/s3-path-style/index.js"(exports2) {
|
|
21942
|
+
"use strict";
|
|
21943
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
21944
|
+
exports2.forceS3PathStyle = forceS3PathStyle3;
|
|
21945
|
+
function forceS3PathStyle3() {
|
|
21946
|
+
if (process.env.CDK_S3_FORCE_PATH_STYLE) {
|
|
21947
|
+
return true;
|
|
21948
|
+
}
|
|
21949
|
+
const endpoint = process.env.AWS_ENDPOINT_URL_S3 ?? process.env.AWS_ENDPOINT_URL;
|
|
21950
|
+
if (endpoint && isLoopbackEndpoint(endpoint)) {
|
|
21951
|
+
return true;
|
|
21952
|
+
}
|
|
21953
|
+
return void 0;
|
|
21954
|
+
}
|
|
21955
|
+
__name(forceS3PathStyle3, "forceS3PathStyle");
|
|
21956
|
+
function isLoopbackEndpoint(endpoint) {
|
|
21957
|
+
let host;
|
|
21958
|
+
try {
|
|
21959
|
+
host = new URL(endpoint).hostname;
|
|
21960
|
+
} catch {
|
|
21961
|
+
return false;
|
|
21962
|
+
}
|
|
21963
|
+
const normalized = host.replace(/^\[|\]$/g, "").toLowerCase();
|
|
21964
|
+
return normalized === "localhost" || normalized.startsWith("127.") || normalized === "::1";
|
|
21965
|
+
}
|
|
21966
|
+
__name(isLoopbackEndpoint, "isLoopbackEndpoint");
|
|
21967
|
+
}
|
|
21968
|
+
});
|
|
21969
|
+
|
|
21939
21970
|
// ../cdk-assets-lib/lib/private/tools.ts
|
|
21940
21971
|
var tools_exports = {};
|
|
21941
21972
|
var init_tools = __esm({
|
|
21942
21973
|
"../cdk-assets-lib/lib/private/tools.ts"() {
|
|
21943
21974
|
"use strict";
|
|
21944
21975
|
__reExport(tools_exports, __toESM(require_zip()));
|
|
21976
|
+
__reExport(tools_exports, __toESM(require_s3_path_style()));
|
|
21945
21977
|
}
|
|
21946
21978
|
});
|
|
21947
21979
|
|
|
@@ -23972,8 +24004,6 @@ var init_ListSchema = __esm({
|
|
|
23972
24004
|
__name(this, "ListSchema");
|
|
23973
24005
|
}
|
|
23974
24006
|
static symbol = /* @__PURE__ */ Symbol.for("@smithy/lis");
|
|
23975
|
-
name;
|
|
23976
|
-
traits;
|
|
23977
24007
|
valueSchema;
|
|
23978
24008
|
symbol = _ListSchema.symbol;
|
|
23979
24009
|
};
|
|
@@ -23996,8 +24026,6 @@ var init_MapSchema = __esm({
|
|
|
23996
24026
|
__name(this, "MapSchema");
|
|
23997
24027
|
}
|
|
23998
24028
|
static symbol = /* @__PURE__ */ Symbol.for("@smithy/map");
|
|
23999
|
-
name;
|
|
24000
|
-
traits;
|
|
24001
24029
|
keySchema;
|
|
24002
24030
|
valueSchema;
|
|
24003
24031
|
symbol = _MapSchema.symbol;
|
|
@@ -24022,8 +24050,6 @@ var init_OperationSchema = __esm({
|
|
|
24022
24050
|
__name(this, "OperationSchema");
|
|
24023
24051
|
}
|
|
24024
24052
|
static symbol = /* @__PURE__ */ Symbol.for("@smithy/ope");
|
|
24025
|
-
name;
|
|
24026
|
-
traits;
|
|
24027
24053
|
input;
|
|
24028
24054
|
output;
|
|
24029
24055
|
symbol = _OperationSchema.symbol;
|
|
@@ -24048,8 +24074,6 @@ var init_StructureSchema = __esm({
|
|
|
24048
24074
|
__name(this, "StructureSchema");
|
|
24049
24075
|
}
|
|
24050
24076
|
static symbol = /* @__PURE__ */ Symbol.for("@smithy/str");
|
|
24051
|
-
name;
|
|
24052
|
-
traits;
|
|
24053
24077
|
memberNames;
|
|
24054
24078
|
memberList;
|
|
24055
24079
|
symbol = _StructureSchema.symbol;
|
|
@@ -24426,9 +24450,7 @@ var init_SimpleSchema = __esm({
|
|
|
24426
24450
|
__name(this, "SimpleSchema");
|
|
24427
24451
|
}
|
|
24428
24452
|
static symbol = /* @__PURE__ */ Symbol.for("@smithy/sim");
|
|
24429
|
-
name;
|
|
24430
24453
|
schemaRef;
|
|
24431
|
-
traits;
|
|
24432
24454
|
symbol = _SimpleSchema.symbol;
|
|
24433
24455
|
};
|
|
24434
24456
|
sim = /* @__PURE__ */ __name((namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), {
|
|
@@ -32736,24 +32758,27 @@ var getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig;
|
|
|
32736
32758
|
var init_httpExtensionConfiguration = __esm({
|
|
32737
32759
|
"../../../node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js"() {
|
|
32738
32760
|
getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
|
|
32761
|
+
if (runtimeConfig.logger && runtimeConfig.logger.constructor?.name !== "NoOpLogger") {
|
|
32762
|
+
runtimeConfig.requestHandler?.updateHttpClientConfig?.(/* @__PURE__ */ Symbol.for("logger"), runtimeConfig.logger);
|
|
32763
|
+
}
|
|
32739
32764
|
return {
|
|
32740
32765
|
setHttpHandler(handler) {
|
|
32741
|
-
runtimeConfig.
|
|
32766
|
+
runtimeConfig.requestHandler = handler;
|
|
32742
32767
|
},
|
|
32743
32768
|
httpHandler() {
|
|
32744
|
-
return runtimeConfig.
|
|
32769
|
+
return runtimeConfig.requestHandler;
|
|
32745
32770
|
},
|
|
32746
32771
|
updateHttpClientConfig(key, value) {
|
|
32747
|
-
runtimeConfig.
|
|
32772
|
+
runtimeConfig.requestHandler?.updateHttpClientConfig(key, value);
|
|
32748
32773
|
},
|
|
32749
32774
|
httpHandlerConfigs() {
|
|
32750
|
-
return runtimeConfig.
|
|
32775
|
+
return runtimeConfig.requestHandler.httpHandlerConfigs();
|
|
32751
32776
|
}
|
|
32752
32777
|
};
|
|
32753
32778
|
}, "getHttpHandlerExtensionConfiguration");
|
|
32754
32779
|
resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {
|
|
32755
32780
|
return {
|
|
32756
|
-
|
|
32781
|
+
requestHandler: httpHandlerExtensionConfiguration.httpHandler()
|
|
32757
32782
|
};
|
|
32758
32783
|
}, "resolveHttpHandlerRuntimeConfig");
|
|
32759
32784
|
}
|
|
@@ -39029,7 +39054,7 @@ var init_package = __esm({
|
|
|
39029
39054
|
"../../../node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
39030
39055
|
package_default = {
|
|
39031
39056
|
name: "@aws-sdk/nested-clients",
|
|
39032
|
-
version: "3.997.
|
|
39057
|
+
version: "3.997.43",
|
|
39033
39058
|
description: "Nested clients for AWS SDK packages.",
|
|
39034
39059
|
homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
|
|
39035
39060
|
license: "Apache-2.0",
|
|
@@ -39129,9 +39154,9 @@ var init_package = __esm({
|
|
|
39129
39154
|
"test:watch": "yarn g:vitest watch"
|
|
39130
39155
|
},
|
|
39131
39156
|
dependencies: {
|
|
39132
|
-
"@aws-sdk/core": "^3.977.
|
|
39133
|
-
"@aws-sdk/signature-v4-multi-region": "^3.996.
|
|
39134
|
-
"@aws-sdk/types": "^3.974.
|
|
39157
|
+
"@aws-sdk/core": "^3.977.8",
|
|
39158
|
+
"@aws-sdk/signature-v4-multi-region": "^3.996.45",
|
|
39159
|
+
"@aws-sdk/types": "^3.974.4",
|
|
39135
39160
|
"@smithy/core": "^3.31.1",
|
|
39136
39161
|
"@smithy/fetch-http-handler": "^5.6.13",
|
|
39137
39162
|
"@smithy/node-http-handler": "^4.9.13",
|
|
@@ -39142,7 +39167,7 @@ var init_package = __esm({
|
|
|
39142
39167
|
concurrently: "7.0.0",
|
|
39143
39168
|
"downlevel-dts": "0.10.1",
|
|
39144
39169
|
premove: "4.0.0",
|
|
39145
|
-
typescript: "~
|
|
39170
|
+
typescript: "~7.0.2"
|
|
39146
39171
|
},
|
|
39147
39172
|
engines: {
|
|
39148
39173
|
node: ">=20.0.0"
|
|
@@ -72504,6 +72529,7 @@ var init_aws2 = __esm({
|
|
|
72504
72529
|
import_lib_storage = __toESM(require_dist_cjs22());
|
|
72505
72530
|
import_config_resolver = __toESM(require_dist_cjs23());
|
|
72506
72531
|
import_node_config_provider = __toESM(require_dist_cjs24());
|
|
72532
|
+
init_tools();
|
|
72507
72533
|
USER_AGENT2 = "cdk-assets";
|
|
72508
72534
|
DefaultAwsClient = class {
|
|
72509
72535
|
constructor(profile) {
|
|
@@ -72528,7 +72554,11 @@ var init_aws2 = __esm({
|
|
|
72528
72554
|
config;
|
|
72529
72555
|
mainCredentials;
|
|
72530
72556
|
async s3Client(options) {
|
|
72531
|
-
const client = new import_client_s3.S3Client(
|
|
72557
|
+
const client = new import_client_s3.S3Client({
|
|
72558
|
+
...await this.awsOptions(options),
|
|
72559
|
+
// Use path-style addressing for explicit opt-in or loopback endpoints.
|
|
72560
|
+
forcePathStyle: (0, tools_exports.forceS3PathStyle)()
|
|
72561
|
+
});
|
|
72532
72562
|
return {
|
|
72533
72563
|
getBucketEncryption: /* @__PURE__ */ __name((input) => client.send(new import_client_s3.GetBucketEncryptionCommand(input)), "getBucketEncryption"),
|
|
72534
72564
|
getBucketLocation: /* @__PURE__ */ __name((input) => client.send(new import_client_s3.GetBucketLocationCommand(input)), "getBucketLocation"),
|
|
@@ -86366,10 +86396,11 @@ var init_private = __esm({
|
|
|
86366
86396
|
});
|
|
86367
86397
|
|
|
86368
86398
|
// ../toolkit-lib/lib/private/activity-printer/base.ts
|
|
86369
|
-
var ActivityPrinterBase;
|
|
86399
|
+
var import_chalk3, ActivityPrinterBase;
|
|
86370
86400
|
var init_base = __esm({
|
|
86371
86401
|
"../toolkit-lib/lib/private/activity-printer/base.ts"() {
|
|
86372
86402
|
"use strict";
|
|
86403
|
+
import_chalk3 = __toESM(require_source());
|
|
86373
86404
|
init_private();
|
|
86374
86405
|
init_util4();
|
|
86375
86406
|
ActivityPrinterBase = class {
|
|
@@ -86491,6 +86522,15 @@ var init_base = __esm({
|
|
|
86491
86522
|
isProvisionalFailure(activity) {
|
|
86492
86523
|
return this.isStackUpdate && activity.event.ResourceStatus === "DELETE_FAILED";
|
|
86493
86524
|
}
|
|
86525
|
+
/**
|
|
86526
|
+
* A warning about resources that failed to delete but were skipped, if there were any.
|
|
86527
|
+
*/
|
|
86528
|
+
skippedDeletesWarning() {
|
|
86529
|
+
if (this.failures.some((f6) => this.isProvisionalFailure(f6))) {
|
|
86530
|
+
return import_chalk3.default.yellow("\n \u26A0\uFE0F Some resources failed to delete but were skipped. These resources may still exist and could incur charges. Clean them up manually.\n");
|
|
86531
|
+
}
|
|
86532
|
+
return void 0;
|
|
86533
|
+
}
|
|
86494
86534
|
};
|
|
86495
86535
|
}
|
|
86496
86536
|
});
|
|
@@ -86498,25 +86538,25 @@ var init_base = __esm({
|
|
|
86498
86538
|
// ../toolkit-lib/lib/private/activity-printer/history.ts
|
|
86499
86539
|
function colorFromStatusResult(status) {
|
|
86500
86540
|
if (!status) {
|
|
86501
|
-
return
|
|
86541
|
+
return import_chalk4.default.reset;
|
|
86502
86542
|
}
|
|
86503
86543
|
if (status.indexOf("FAILED") !== -1) {
|
|
86504
|
-
return
|
|
86544
|
+
return import_chalk4.default.red;
|
|
86505
86545
|
}
|
|
86506
86546
|
if (status.indexOf("ROLLBACK") !== -1) {
|
|
86507
|
-
return
|
|
86547
|
+
return import_chalk4.default.yellow;
|
|
86508
86548
|
}
|
|
86509
86549
|
if (status.indexOf("COMPLETE") !== -1) {
|
|
86510
|
-
return
|
|
86550
|
+
return import_chalk4.default.green;
|
|
86511
86551
|
}
|
|
86512
|
-
return
|
|
86552
|
+
return import_chalk4.default.reset;
|
|
86513
86553
|
}
|
|
86514
|
-
var util4,
|
|
86554
|
+
var util4, import_chalk4, HistoryActivityPrinter;
|
|
86515
86555
|
var init_history = __esm({
|
|
86516
86556
|
"../toolkit-lib/lib/private/activity-printer/history.ts"() {
|
|
86517
86557
|
"use strict";
|
|
86518
86558
|
util4 = __toESM(require("util"));
|
|
86519
|
-
|
|
86559
|
+
import_chalk4 = __toESM(require_source());
|
|
86520
86560
|
init_base();
|
|
86521
86561
|
init_util4();
|
|
86522
86562
|
HistoryActivityPrinter = class _HistoryActivityPrinter extends ActivityPrinterBase {
|
|
@@ -86553,8 +86593,9 @@ var init_history = __esm({
|
|
|
86553
86593
|
this.printOne(failure, false);
|
|
86554
86594
|
}
|
|
86555
86595
|
}
|
|
86556
|
-
|
|
86557
|
-
|
|
86596
|
+
const warning3 = this.skippedDeletesWarning();
|
|
86597
|
+
if (warning3) {
|
|
86598
|
+
this.stream.write(warning3);
|
|
86558
86599
|
}
|
|
86559
86600
|
}
|
|
86560
86601
|
print() {
|
|
@@ -86568,8 +86609,8 @@ var init_history = __esm({
|
|
|
86568
86609
|
printOne(activity, progress) {
|
|
86569
86610
|
const event = activity.event;
|
|
86570
86611
|
const provisional = this.isProvisionalFailure(activity);
|
|
86571
|
-
const color = provisional ?
|
|
86572
|
-
let reasonColor =
|
|
86612
|
+
const color = provisional ? import_chalk4.default.yellow : colorFromStatusResult(event.ResourceStatus);
|
|
86613
|
+
let reasonColor = import_chalk4.default.cyan;
|
|
86573
86614
|
let stackTrace = "";
|
|
86574
86615
|
const metadata = activity.metadata;
|
|
86575
86616
|
if (!provisional && event.ResourceStatus && event.ResourceStatus.indexOf("FAILED") !== -1) {
|
|
@@ -86580,7 +86621,7 @@ var init_history = __esm({
|
|
|
86580
86621
|
stackTrace = metadata.entry.trace ? `
|
|
86581
86622
|
${metadata.entry.trace.join("\n \\_ ")}` : "";
|
|
86582
86623
|
}
|
|
86583
|
-
reasonColor =
|
|
86624
|
+
reasonColor = import_chalk4.default.red;
|
|
86584
86625
|
}
|
|
86585
86626
|
const resourceName = metadata ? metadata.constructPath : event.LogicalResourceId || "";
|
|
86586
86627
|
const logicalId = resourceName !== event.LogicalResourceId ? `(${event.LogicalResourceId}) ` : "";
|
|
@@ -86593,9 +86634,9 @@ var init_history = __esm({
|
|
|
86593
86634
|
new Date(event.Timestamp).toLocaleTimeString(),
|
|
86594
86635
|
color(padRight(_HistoryActivityPrinter.STATUS_WIDTH, statusText)),
|
|
86595
86636
|
padRight(this.resourceTypeColumnWidth, event.ResourceType || ""),
|
|
86596
|
-
color(
|
|
86637
|
+
color(import_chalk4.default.bold(resourceName)),
|
|
86597
86638
|
logicalId,
|
|
86598
|
-
provisional ? "(this will take a few minutes to recover)" : reasonColor(
|
|
86639
|
+
provisional ? "(this will take a few minutes to recover)" : reasonColor(import_chalk4.default.bold(event.ResourceStatusReason ? event.ResourceStatusReason : "")),
|
|
86599
86640
|
provisional ? "" : reasonColor(stackTrace)
|
|
86600
86641
|
)
|
|
86601
86642
|
);
|
|
@@ -86613,7 +86654,7 @@ var init_history = __esm({
|
|
|
86613
86654
|
util4.format(
|
|
86614
86655
|
"%s Currently in progress: %s\n",
|
|
86615
86656
|
progress,
|
|
86616
|
-
|
|
86657
|
+
import_chalk4.default.bold(Object.keys(this.resourcesInProgress).join(", "))
|
|
86617
86658
|
)
|
|
86618
86659
|
);
|
|
86619
86660
|
}
|
|
@@ -86896,11 +86937,11 @@ var init_display = __esm({
|
|
|
86896
86937
|
});
|
|
86897
86938
|
|
|
86898
86939
|
// ../toolkit-lib/lib/private/activity-printer/current.ts
|
|
86899
|
-
var
|
|
86940
|
+
var import_chalk5, PROGRESSBAR_EXTRA_SPACE;
|
|
86900
86941
|
var init_current = __esm({
|
|
86901
86942
|
"../toolkit-lib/lib/private/activity-printer/current.ts"() {
|
|
86902
86943
|
"use strict";
|
|
86903
|
-
|
|
86944
|
+
import_chalk5 = __toESM(require_source());
|
|
86904
86945
|
init_base();
|
|
86905
86946
|
init_display();
|
|
86906
86947
|
init_util4();
|
|
@@ -86908,6 +86949,16 @@ var init_current = __esm({
|
|
|
86908
86949
|
}
|
|
86909
86950
|
});
|
|
86910
86951
|
|
|
86952
|
+
// ../toolkit-lib/lib/private/activity-printer/errors-only.ts
|
|
86953
|
+
var import_chalk6;
|
|
86954
|
+
var init_errors_only = __esm({
|
|
86955
|
+
"../toolkit-lib/lib/private/activity-printer/errors-only.ts"() {
|
|
86956
|
+
"use strict";
|
|
86957
|
+
import_chalk6 = __toESM(require_source());
|
|
86958
|
+
init_base();
|
|
86959
|
+
}
|
|
86960
|
+
});
|
|
86961
|
+
|
|
86911
86962
|
// ../toolkit-lib/lib/private/activity-printer/index.ts
|
|
86912
86963
|
var init_activity_printer = __esm({
|
|
86913
86964
|
"../toolkit-lib/lib/private/activity-printer/index.ts"() {
|
|
@@ -86915,6 +86966,7 @@ var init_activity_printer = __esm({
|
|
|
86915
86966
|
init_base();
|
|
86916
86967
|
init_history();
|
|
86917
86968
|
init_current();
|
|
86969
|
+
init_errors_only();
|
|
86918
86970
|
}
|
|
86919
86971
|
});
|
|
86920
86972
|
|
|
@@ -86941,12 +86993,12 @@ function isStackActivity(msg) {
|
|
|
86941
86993
|
"CDK_TOOLKIT_I5503"
|
|
86942
86994
|
].includes(msg.code);
|
|
86943
86995
|
}
|
|
86944
|
-
var util5,
|
|
86996
|
+
var util5, import_chalk7, NonInteractiveIoHost, styleMap;
|
|
86945
86997
|
var init_non_interactive_io_host = __esm({
|
|
86946
86998
|
"../toolkit-lib/lib/toolkit/non-interactive-io-host.ts"() {
|
|
86947
86999
|
"use strict";
|
|
86948
87000
|
util5 = __toESM(require("node:util"));
|
|
86949
|
-
|
|
87001
|
+
import_chalk7 = __toESM(require_source());
|
|
86950
87002
|
init_private();
|
|
86951
87003
|
init_activity_printer();
|
|
86952
87004
|
init_shell_env();
|
|
@@ -87046,12 +87098,12 @@ var init_non_interactive_io_host = __esm({
|
|
|
87046
87098
|
}
|
|
87047
87099
|
};
|
|
87048
87100
|
styleMap = {
|
|
87049
|
-
error:
|
|
87050
|
-
warn:
|
|
87051
|
-
result:
|
|
87052
|
-
info:
|
|
87053
|
-
debug:
|
|
87054
|
-
trace:
|
|
87101
|
+
error: import_chalk7.default.red,
|
|
87102
|
+
warn: import_chalk7.default.yellow,
|
|
87103
|
+
result: import_chalk7.default.reset,
|
|
87104
|
+
info: import_chalk7.default.reset,
|
|
87105
|
+
debug: import_chalk7.default.gray,
|
|
87106
|
+
trace: import_chalk7.default.gray
|
|
87055
87107
|
};
|
|
87056
87108
|
__name(isStackActivity, "isStackActivity");
|
|
87057
87109
|
}
|
|
@@ -267029,6 +267081,16 @@ var init_user_agent = __esm({
|
|
|
267029
267081
|
}
|
|
267030
267082
|
});
|
|
267031
267083
|
|
|
267084
|
+
// ../toolkit-lib/lib/private/tools.ts
|
|
267085
|
+
var tools_exports2 = {};
|
|
267086
|
+
var init_tools2 = __esm({
|
|
267087
|
+
"../toolkit-lib/lib/private/tools.ts"() {
|
|
267088
|
+
"use strict";
|
|
267089
|
+
__reExport(tools_exports2, __toESM(require_zip()));
|
|
267090
|
+
__reExport(tools_exports2, __toESM(require_s3_path_style()));
|
|
267091
|
+
}
|
|
267092
|
+
});
|
|
267093
|
+
|
|
267032
267094
|
// ../toolkit-lib/lib/api/aws-auth/sdk.ts
|
|
267033
267095
|
function makeSdkLoggerSafeByBindingThis(logger3) {
|
|
267034
267096
|
return {
|
|
@@ -267072,6 +267134,7 @@ var init_sdk = __esm({
|
|
|
267072
267134
|
init_cached();
|
|
267073
267135
|
init_tracing();
|
|
267074
267136
|
init_user_agent();
|
|
267137
|
+
init_tools2();
|
|
267075
267138
|
init_toolkit_error();
|
|
267076
267139
|
init_util4();
|
|
267077
267140
|
SDK = class {
|
|
@@ -267394,7 +267457,11 @@ var init_sdk = __esm({
|
|
|
267394
267457
|
};
|
|
267395
267458
|
}
|
|
267396
267459
|
s3() {
|
|
267397
|
-
const client = new import_client_s32.S3Client(
|
|
267460
|
+
const client = new import_client_s32.S3Client({
|
|
267461
|
+
...this.config,
|
|
267462
|
+
// Use path-style addressing for explicit opt-in or loopback endpoints.
|
|
267463
|
+
forcePathStyle: (0, tools_exports2.forceS3PathStyle)()
|
|
267464
|
+
});
|
|
267398
267465
|
return {
|
|
267399
267466
|
deleteObjects: /* @__PURE__ */ __name((input) => client.send(new import_client_s32.DeleteObjectsCommand({
|
|
267400
267467
|
...input,
|
|
@@ -270824,6 +270891,16 @@ var init_resource_metadata2 = __esm({
|
|
|
270824
270891
|
});
|
|
270825
270892
|
|
|
270826
270893
|
// ../toolkit-lib/lib/api/cloudformation/evaluate-cloudformation-template.ts
|
|
270894
|
+
function assertEvaluatesToArray(intrinsic, value) {
|
|
270895
|
+
if (!Array.isArray(value)) {
|
|
270896
|
+
throw new CfnEvaluationException(`${intrinsic}: expected an array, got ${JSON.stringify(value)}`);
|
|
270897
|
+
}
|
|
270898
|
+
}
|
|
270899
|
+
function assertEvaluatesToString(intrinsic, value) {
|
|
270900
|
+
if (typeof value !== "string") {
|
|
270901
|
+
throw new CfnEvaluationException(`${intrinsic}: expected a string, got ${JSON.stringify(value)}`);
|
|
270902
|
+
}
|
|
270903
|
+
}
|
|
270827
270904
|
function iamArnFmt(parts) {
|
|
270828
270905
|
return `arn:${parts.partition}:${parts.service}::${parts.account}:${parts.resourceType}/${parts.resourceName}`;
|
|
270829
270906
|
}
|
|
@@ -270933,6 +271010,8 @@ var init_evaluate_cloudformation_template = __esm({
|
|
|
270933
271010
|
__name(this, "CfnEvaluationException");
|
|
270934
271011
|
}
|
|
270935
271012
|
};
|
|
271013
|
+
__name(assertEvaluatesToArray, "assertEvaluatesToArray");
|
|
271014
|
+
__name(assertEvaluatesToString, "assertEvaluatesToString");
|
|
270936
271015
|
EvaluateCloudFormationTemplate = class _EvaluateCloudFormationTemplate {
|
|
270937
271016
|
static {
|
|
270938
271017
|
__name(this, "EvaluateCloudFormationTemplate");
|
|
@@ -271037,14 +271116,17 @@ var init_evaluate_cloudformation_template = __esm({
|
|
|
271037
271116
|
}
|
|
271038
271117
|
async "Fn::Join"(separator, args) {
|
|
271039
271118
|
const evaluatedArgs = await self2.evaluateCfnExpression(args);
|
|
271119
|
+
assertEvaluatesToArray("Fn::Join", evaluatedArgs);
|
|
271040
271120
|
return evaluatedArgs.join(separator);
|
|
271041
271121
|
}
|
|
271042
271122
|
async "Fn::Split"(separator, args) {
|
|
271043
271123
|
const evaluatedArgs = await self2.evaluateCfnExpression(args);
|
|
271124
|
+
assertEvaluatesToString("Fn::Split", evaluatedArgs);
|
|
271044
271125
|
return evaluatedArgs.split(separator);
|
|
271045
271126
|
}
|
|
271046
271127
|
async "Fn::Select"(index, args) {
|
|
271047
271128
|
const evaluatedArgs = await self2.evaluateCfnExpression(args);
|
|
271129
|
+
assertEvaluatesToArray("Fn::Select", evaluatedArgs);
|
|
271048
271130
|
return evaluatedArgs[index];
|
|
271049
271131
|
}
|
|
271050
271132
|
async Ref(logicalId) {
|
|
@@ -271207,7 +271289,7 @@ var init_evaluate_cloudformation_template = __esm({
|
|
|
271207
271289
|
const evaluateCfnTemplate = await this.createNestedEvaluateCloudFormationTemplate(
|
|
271208
271290
|
dependantStack.physicalName,
|
|
271209
271291
|
dependantStack.generatedTemplate,
|
|
271210
|
-
|
|
271292
|
+
this.template.Resources?.[logicalId]?.Properties?.Parameters ?? {}
|
|
271211
271293
|
);
|
|
271212
271294
|
return evaluateCfnTemplate.evaluateCfnExpression({
|
|
271213
271295
|
"Fn::GetAtt": attribute.split(/\.(.*)/s)
|
|
@@ -271401,7 +271483,7 @@ async function makeBodyParameter(ioHelper, stack, resolvedEnvironment, assetMani
|
|
|
271401
271483
|
Run the following command in order to setup an S3 bucket in this environment, and then re-deploy:
|
|
271402
271484
|
|
|
271403
271485
|
`,
|
|
271404
|
-
|
|
271486
|
+
import_chalk8.default.blue(` $ cdk bootstrap ${resolvedEnvironment.name}
|
|
271405
271487
|
`)
|
|
271406
271488
|
)
|
|
271407
271489
|
);
|
|
@@ -271486,7 +271568,7 @@ function setEnv(name, value) {
|
|
|
271486
271568
|
delete process.env[name];
|
|
271487
271569
|
}
|
|
271488
271570
|
}
|
|
271489
|
-
var fs26, path24, util6, import_cloud_assembly_api6, import_client_s33, import_middleware_endpoint2,
|
|
271571
|
+
var fs26, path24, util6, import_cloud_assembly_api6, import_client_s33, import_middleware_endpoint2, import_chalk8, LARGE_TEMPLATE_SIZE_KB;
|
|
271490
271572
|
var init_template_body_parameter = __esm({
|
|
271491
271573
|
"../toolkit-lib/lib/api/cloudformation/template-body-parameter.ts"() {
|
|
271492
271574
|
"use strict";
|
|
@@ -271496,7 +271578,7 @@ var init_template_body_parameter = __esm({
|
|
|
271496
271578
|
import_cloud_assembly_api6 = __toESM(require_lib3());
|
|
271497
271579
|
import_client_s33 = __toESM(require_dist_cjs17());
|
|
271498
271580
|
import_middleware_endpoint2 = __toESM(require_dist_cjs43());
|
|
271499
|
-
|
|
271581
|
+
import_chalk8 = __toESM(require_source());
|
|
271500
271582
|
init_toolkit_error();
|
|
271501
271583
|
init_util4();
|
|
271502
271584
|
LARGE_TEMPLATE_SIZE_KB = 50;
|
|
@@ -272445,15 +272527,6 @@ var init_stack_helpers = __esm({
|
|
|
272445
272527
|
return new _CloudFormationStack(cfn, stackName, stack);
|
|
272446
272528
|
}
|
|
272447
272529
|
_template;
|
|
272448
|
-
/**
|
|
272449
|
-
* Returns the Stack object returned from the CloudFormation service response that this decorating object wraps
|
|
272450
|
-
*/
|
|
272451
|
-
get wrapped() {
|
|
272452
|
-
if (!this.stack) {
|
|
272453
|
-
throw new ToolkitError("NoStack", "CloudFormationStack object does not hold a stack");
|
|
272454
|
-
}
|
|
272455
|
-
return this.stack;
|
|
272456
|
-
}
|
|
272457
272530
|
/**
|
|
272458
272531
|
* Retrieve the stack's deployed template
|
|
272459
272532
|
*
|
|
@@ -274719,7 +274792,7 @@ async function cleanupOldChangeset(cfn, ioHelper, changeSetNameOrArn, stackNameO
|
|
|
274719
274792
|
}
|
|
274720
274793
|
async function waitForStackDelete(cfn, ioHelper, stackNameOrArn, stabilizationPollingInterval) {
|
|
274721
274794
|
const stackDisplayName = stackNameFromArn(stackNameOrArn);
|
|
274722
|
-
const stack = await stabilizeStack(cfn, ioHelper, stackNameOrArn, stabilizationPollingInterval);
|
|
274795
|
+
const stack = await stabilizeStack(cfn, ioHelper, stackNameOrArn, { pollingInterval: stabilizationPollingInterval });
|
|
274723
274796
|
if (!stack) {
|
|
274724
274797
|
return void 0;
|
|
274725
274798
|
}
|
|
@@ -274734,42 +274807,65 @@ async function waitForStackDelete(cfn, ioHelper, stackNameOrArn, stabilizationPo
|
|
|
274734
274807
|
}
|
|
274735
274808
|
return stack;
|
|
274736
274809
|
}
|
|
274737
|
-
async function waitForStackDeploy(cfn, ioHelper,
|
|
274738
|
-
const stack = await stabilizeStack(cfn, ioHelper,
|
|
274810
|
+
async function waitForStackDeploy(cfn, ioHelper, stackNameOrArn, stabilizationPollingInterval) {
|
|
274811
|
+
const stack = await stabilizeStack(cfn, ioHelper, stackNameOrArn, {
|
|
274812
|
+
pollingInterval: stabilizationPollingInterval,
|
|
274813
|
+
changeSetExecuted: true
|
|
274814
|
+
});
|
|
274739
274815
|
if (!stack) {
|
|
274740
274816
|
return void 0;
|
|
274741
274817
|
}
|
|
274818
|
+
const stackDisplayName = stackNameFromArn(stackNameOrArn);
|
|
274742
274819
|
const status = stack.stackStatus;
|
|
274743
274820
|
if (status.isCreationFailure) {
|
|
274744
274821
|
throw new DeploymentError(
|
|
274745
|
-
`The stack named ${
|
|
274822
|
+
`The stack named ${stackDisplayName} failed creation, it may need to be manually deleted from the AWS console: ${status}`,
|
|
274746
274823
|
"StackCreationFailed"
|
|
274747
274824
|
);
|
|
274748
274825
|
} else if (!status.isDeploySuccess) {
|
|
274749
|
-
throw new DeploymentError(`The stack named ${
|
|
274826
|
+
throw new DeploymentError(`The stack named ${stackDisplayName} failed to deploy: ${status}`, "StackDeployFailed");
|
|
274750
274827
|
}
|
|
274751
274828
|
return stack;
|
|
274752
274829
|
}
|
|
274753
|
-
async function stabilizeStack(cfn, ioHelper, stackNameOrArn,
|
|
274830
|
+
async function stabilizeStack(cfn, ioHelper, stackNameOrArn, options = {}) {
|
|
274831
|
+
const { pollingInterval, changeSetExecuted = false } = options;
|
|
274754
274832
|
const stackDisplayName = stackNameFromArn(stackNameOrArn);
|
|
274755
274833
|
await ioHelper.defaults.debug((0, import_node_util3.format)("Waiting for stack %s to finish creating or updating...", stackDisplayName));
|
|
274834
|
+
let target = stackNameOrArn;
|
|
274835
|
+
let sawOperationInProgress = false;
|
|
274836
|
+
let leadingReviewReads = 0;
|
|
274756
274837
|
return waitFor(async () => {
|
|
274757
|
-
const stack = await CloudFormationStack.lookup(cfn,
|
|
274838
|
+
const stack = await CloudFormationStack.lookup(cfn, target);
|
|
274758
274839
|
if (!stack.exists) {
|
|
274759
274840
|
await ioHelper.defaults.debug((0, import_node_util3.format)("Stack %s does not exist", stackDisplayName));
|
|
274760
274841
|
return null;
|
|
274761
274842
|
}
|
|
274843
|
+
if (stack.stackStatus.isDeleted && stack.stackStatus.name === "DELETE_COMPLETE") {
|
|
274844
|
+
await ioHelper.defaults.debug((0, import_node_util3.format)("Stack %s has been deleted", stackDisplayName));
|
|
274845
|
+
return null;
|
|
274846
|
+
}
|
|
274847
|
+
target = stack.stackId;
|
|
274762
274848
|
const status = stack.stackStatus;
|
|
274763
274849
|
if (status.isInProgress) {
|
|
274850
|
+
sawOperationInProgress = true;
|
|
274764
274851
|
await ioHelper.defaults.debug((0, import_node_util3.format)("Stack %s has an ongoing operation in progress and is not stable (%s)", stackDisplayName, status));
|
|
274765
274852
|
return void 0;
|
|
274766
274853
|
} else if (status.isReviewInProgress) {
|
|
274854
|
+
if (changeSetExecuted && sawOperationInProgress) {
|
|
274855
|
+
await ioHelper.defaults.debug((0, import_node_util3.format)("Stack %s reported REVIEW_IN_PROGRESS after an operation was in progress; treating as a stale read and polling again (%s)", stackDisplayName, status));
|
|
274856
|
+
return void 0;
|
|
274857
|
+
}
|
|
274858
|
+
if (changeSetExecuted && leadingReviewReads < STALE_REVIEW_READ_ATTEMPTS) {
|
|
274859
|
+
leadingReviewReads++;
|
|
274860
|
+
await ioHelper.defaults.debug((0, import_node_util3.format)("Stack %s reported REVIEW_IN_PROGRESS, which may be a stale read; polling again (%s)", stackDisplayName, status));
|
|
274861
|
+
return void 0;
|
|
274862
|
+
}
|
|
274767
274863
|
await ioHelper.defaults.debug((0, import_node_util3.format)("Stack %s is in REVIEW_IN_PROGRESS state. Considering this is a stable status (%s)", stackDisplayName, status));
|
|
274768
274864
|
}
|
|
274769
274865
|
return stack;
|
|
274770
274866
|
}, pollingInterval);
|
|
274771
274867
|
}
|
|
274772
|
-
var import_node_crypto9, import_node_util3, import_cdk_assets_lib3, cxapi2, import_cloud_assembly_api7, TemplateParameters, ParameterValues;
|
|
274868
|
+
var import_node_crypto9, import_node_util3, import_cdk_assets_lib3, cxapi2, import_cloud_assembly_api7, STALE_REVIEW_READ_ATTEMPTS, TemplateParameters, ParameterValues;
|
|
274773
274869
|
var init_cfn_api = __esm({
|
|
274774
274870
|
"../toolkit-lib/lib/api/deployments/cfn-api.ts"() {
|
|
274775
274871
|
"use strict";
|
|
@@ -274786,6 +274882,7 @@ var init_cfn_api = __esm({
|
|
|
274786
274882
|
init_cloudformation2();
|
|
274787
274883
|
init_stack_diagnoser();
|
|
274788
274884
|
init_stack_source_tracing();
|
|
274885
|
+
STALE_REVIEW_READ_ATTEMPTS = 3;
|
|
274789
274886
|
__name(createDiffChangeSet, "createDiffChangeSet");
|
|
274790
274887
|
__name(templatesFromAssetManifestArtifact, "templatesFromAssetManifestArtifact");
|
|
274791
274888
|
__name(prepareChangeSetEnv, "prepareChangeSetEnv");
|
|
@@ -274892,12 +274989,12 @@ var init_cfn_api = __esm({
|
|
|
274892
274989
|
});
|
|
274893
274990
|
|
|
274894
274991
|
// ../toolkit-lib/lib/api/toolkit-info.ts
|
|
274895
|
-
var import_util33,
|
|
274992
|
+
var import_util33, import_chalk9, DEFAULT_TOOLKIT_STACK_NAME, ToolkitInfo, ExistingToolkitInfo, BootstrapStackNotFoundInfo;
|
|
274896
274993
|
var init_toolkit_info = __esm({
|
|
274897
274994
|
"../toolkit-lib/lib/api/toolkit-info.ts"() {
|
|
274898
274995
|
"use strict";
|
|
274899
274996
|
import_util33 = require("util");
|
|
274900
|
-
|
|
274997
|
+
import_chalk9 = __toESM(require_source());
|
|
274901
274998
|
init_bootstrap_props();
|
|
274902
274999
|
init_toolkit_error();
|
|
274903
275000
|
init_cfn_api();
|
|
@@ -274920,7 +275017,7 @@ var init_toolkit_info = __esm({
|
|
|
274920
275017
|
"The environment %s doesn't have the CDK toolkit stack (%s) installed. Use %s to setup your environment for use with the toolkit.",
|
|
274921
275018
|
environment.name,
|
|
274922
275019
|
stackName,
|
|
274923
|
-
|
|
275020
|
+
import_chalk9.default.blue(`cdk bootstrap "${environment.name}"`)
|
|
274924
275021
|
)
|
|
274925
275022
|
);
|
|
274926
275023
|
return _ToolkitInfo.bootstrapStackNotFoundInfo(stackName);
|
|
@@ -274931,7 +275028,7 @@ var init_toolkit_info = __esm({
|
|
|
274931
275028
|
"The environment %s has a CDK toolkit stack (%s) that failed to create. Use %s to try provisioning it again.",
|
|
274932
275029
|
environment.name,
|
|
274933
275030
|
stackName,
|
|
274934
|
-
|
|
275031
|
+
import_chalk9.default.blue(`cdk bootstrap "${environment.name}"`)
|
|
274935
275032
|
)
|
|
274936
275033
|
);
|
|
274937
275034
|
return _ToolkitInfo.bootstrapStackNotFoundInfo(stackName);
|
|
@@ -279967,7 +280064,7 @@ async function includeDownstreamStacks(ioHelper, selectedStacks, allStacks) {
|
|
|
279967
280064
|
do {
|
|
279968
280065
|
madeProgress = false;
|
|
279969
280066
|
for (const [id, stack] of allStacks) {
|
|
279970
|
-
if (!selectedStacks.has(id) && (stack.dependencies || []).some((dep) => selectedStacks.has(dep.
|
|
280067
|
+
if (!selectedStacks.has(id) && (stack.dependencies || []).some((dep) => selectedStacks.has(dep.hierarchicalId))) {
|
|
279971
280068
|
selectedStacks.set(id, stack);
|
|
279972
280069
|
added.push(id);
|
|
279973
280070
|
madeProgress = true;
|
|
@@ -279975,7 +280072,7 @@ async function includeDownstreamStacks(ioHelper, selectedStacks, allStacks) {
|
|
|
279975
280072
|
}
|
|
279976
280073
|
} while (madeProgress);
|
|
279977
280074
|
if (added.length > 0) {
|
|
279978
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I1003.msg(`Including depending stacks: ${
|
|
280075
|
+
await ioHelper.notify(IO.CDK_TOOLKIT_I1003.msg(`Including depending stacks: ${import_chalk10.default.bold(added.join(", "))}`));
|
|
279979
280076
|
}
|
|
279980
280077
|
}
|
|
279981
280078
|
async function includeUpstreamStacks(ioHelper, selectedStacks, allStacks) {
|
|
@@ -279994,14 +280091,14 @@ async function includeUpstreamStacks(ioHelper, selectedStacks, allStacks) {
|
|
|
279994
280091
|
}
|
|
279995
280092
|
}
|
|
279996
280093
|
if (added.length > 0) {
|
|
279997
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I1002.msg(`Including dependency stacks: ${
|
|
280094
|
+
await ioHelper.notify(IO.CDK_TOOLKIT_I1002.msg(`Including dependency stacks: ${import_chalk10.default.bold(added.join(", "))}`));
|
|
279998
280095
|
}
|
|
279999
280096
|
}
|
|
280000
|
-
var
|
|
280097
|
+
var import_chalk10, import_picomatch, BaseStackAssembly;
|
|
280001
280098
|
var init_stack_assembly = __esm({
|
|
280002
280099
|
"../toolkit-lib/lib/api/cloud-assembly/stack-assembly.ts"() {
|
|
280003
280100
|
"use strict";
|
|
280004
|
-
|
|
280101
|
+
import_chalk10 = __toESM(require_source());
|
|
280005
280102
|
import_picomatch = __toESM(require_picomatch4());
|
|
280006
280103
|
init_stack_collection();
|
|
280007
280104
|
init_util4();
|
|
@@ -281701,13 +281798,13 @@ function dependsOnEqual(lvalue, rvalue) {
|
|
|
281701
281798
|
if (lvalue.length !== rvalue.length) {
|
|
281702
281799
|
return false;
|
|
281703
281800
|
}
|
|
281704
|
-
|
|
281705
|
-
|
|
281706
|
-
|
|
281707
|
-
|
|
281708
|
-
|
|
281709
|
-
break;
|
|
281801
|
+
const unmatched = rvalue.map((_, i6) => i6);
|
|
281802
|
+
for (const l4 of lvalue) {
|
|
281803
|
+
const at = unmatched.findIndex((i6) => deepEqual(l4, rvalue[i6]));
|
|
281804
|
+
if (at === -1) {
|
|
281805
|
+
return false;
|
|
281710
281806
|
}
|
|
281807
|
+
unmatched.splice(at, 1);
|
|
281711
281808
|
}
|
|
281712
281809
|
return true;
|
|
281713
281810
|
}
|
|
@@ -282367,12 +282464,12 @@ function defaultResource(resource, statements) {
|
|
|
282367
282464
|
statements.forEach((s2) => s2.resources.replaceStar(resource));
|
|
282368
282465
|
return statements;
|
|
282369
282466
|
}
|
|
282370
|
-
var import_service_spec_types,
|
|
282467
|
+
var import_service_spec_types, import_chalk11, IamChanges;
|
|
282371
282468
|
var init_iam_changes = __esm({
|
|
282372
282469
|
"../cloudformation-diff/lib/iam/iam-changes.ts"() {
|
|
282373
282470
|
"use strict";
|
|
282374
282471
|
import_service_spec_types = __toESM(require_lib9());
|
|
282375
|
-
|
|
282472
|
+
import_chalk11 = __toESM(require_source());
|
|
282376
282473
|
init_iam_identity_center();
|
|
282377
282474
|
init_managed_policy();
|
|
282378
282475
|
init_statement();
|
|
@@ -282442,7 +282539,7 @@ var init_iam_changes = __esm({
|
|
|
282442
282539
|
renderedStatement.action,
|
|
282443
282540
|
renderedStatement.principal,
|
|
282444
282541
|
renderedStatement.condition
|
|
282445
|
-
].map((s2) =>
|
|
282542
|
+
].map((s2) => import_chalk11.default.green(s2)));
|
|
282446
282543
|
}
|
|
282447
282544
|
for (const statement of this.statements.removals) {
|
|
282448
282545
|
const renderedStatement = statement.render();
|
|
@@ -282453,7 +282550,7 @@ var init_iam_changes = __esm({
|
|
|
282453
282550
|
renderedStatement.action,
|
|
282454
282551
|
renderedStatement.principal,
|
|
282455
282552
|
renderedStatement.condition
|
|
282456
|
-
].map((s2) =>
|
|
282553
|
+
].map((s2) => import_chalk11.default.red(s2)));
|
|
282457
282554
|
}
|
|
282458
282555
|
ret.sort(makeComparator((row) => [row[1]]));
|
|
282459
282556
|
ret.splice(0, 0, header);
|
|
@@ -282467,14 +282564,14 @@ var init_iam_changes = __esm({
|
|
|
282467
282564
|
"+",
|
|
282468
282565
|
att.identityArn,
|
|
282469
282566
|
att.managedPolicyArn
|
|
282470
|
-
].map((s2) =>
|
|
282567
|
+
].map((s2) => import_chalk11.default.green(s2)));
|
|
282471
282568
|
}
|
|
282472
282569
|
for (const att of this.managedPolicies.removals) {
|
|
282473
282570
|
ret.push([
|
|
282474
282571
|
"-",
|
|
282475
282572
|
att.identityArn,
|
|
282476
282573
|
att.managedPolicyArn
|
|
282477
|
-
].map((s2) =>
|
|
282574
|
+
].map((s2) => import_chalk11.default.red(s2)));
|
|
282478
282575
|
}
|
|
282479
282576
|
ret.sort(makeComparator((row) => [row[1]]));
|
|
282480
282577
|
ret.splice(0, 0, header);
|
|
@@ -282493,7 +282590,7 @@ var init_iam_changes = __esm({
|
|
|
282493
282590
|
att.principalType || "",
|
|
282494
282591
|
att.targetId || "",
|
|
282495
282592
|
att.targetType || ""
|
|
282496
|
-
].map((s2) =>
|
|
282593
|
+
].map((s2) => import_chalk11.default.green(s2)));
|
|
282497
282594
|
}
|
|
282498
282595
|
for (const att of this.ssoAssignments.removals) {
|
|
282499
282596
|
ret.push([
|
|
@@ -282505,7 +282602,7 @@ var init_iam_changes = __esm({
|
|
|
282505
282602
|
att.principalType || "",
|
|
282506
282603
|
att.targetId || "",
|
|
282507
282604
|
att.targetType || ""
|
|
282508
|
-
].map((s2) =>
|
|
282605
|
+
].map((s2) => import_chalk11.default.red(s2)));
|
|
282509
282606
|
}
|
|
282510
282607
|
ret.sort(makeComparator((row) => [row[1]]));
|
|
282511
282608
|
ret.splice(0, 0, header);
|
|
@@ -282524,7 +282621,7 @@ var init_iam_changes = __esm({
|
|
|
282524
282621
|
att.cfnLogicalId || "",
|
|
282525
282622
|
att.ssoInstanceArn || "",
|
|
282526
282623
|
att.accessControlAttributes?.map(formatAccessControlAttribute).join("\n") || ""
|
|
282527
|
-
].map((s2) =>
|
|
282624
|
+
].map((s2) => import_chalk11.default.green(s2)));
|
|
282528
282625
|
}
|
|
282529
282626
|
for (const att of this.ssoInstanceACAConfigs.removals) {
|
|
282530
282627
|
ret.push([
|
|
@@ -282532,7 +282629,7 @@ var init_iam_changes = __esm({
|
|
|
282532
282629
|
att.cfnLogicalId || "",
|
|
282533
282630
|
att.ssoInstanceArn || "",
|
|
282534
282631
|
att.accessControlAttributes?.map(formatAccessControlAttribute).join("\n") || ""
|
|
282535
|
-
].map((s2) =>
|
|
282632
|
+
].map((s2) => import_chalk11.default.red(s2)));
|
|
282536
282633
|
}
|
|
282537
282634
|
ret.sort(makeComparator((row) => [row[1]]));
|
|
282538
282635
|
ret.splice(0, 0, header);
|
|
@@ -282565,7 +282662,7 @@ var init_iam_changes = __esm({
|
|
|
282565
282662
|
att.name || "",
|
|
282566
282663
|
formatSsoPermissionsBoundary(att.ssoPermissionsBoundary),
|
|
282567
282664
|
att.ssoCustomerManagedPolicyReferences?.map(formatManagedPolicyRef).join("\n") || ""
|
|
282568
|
-
].map((s2) =>
|
|
282665
|
+
].map((s2) => import_chalk11.default.green(s2)));
|
|
282569
282666
|
}
|
|
282570
282667
|
for (const att of this.ssoPermissionSets.removals) {
|
|
282571
282668
|
ret.push([
|
|
@@ -282575,7 +282672,7 @@ var init_iam_changes = __esm({
|
|
|
282575
282672
|
att.name || "",
|
|
282576
282673
|
formatSsoPermissionsBoundary(att.ssoPermissionsBoundary),
|
|
282577
282674
|
att.ssoCustomerManagedPolicyReferences?.map(formatManagedPolicyRef).join("\n") || ""
|
|
282578
|
-
].map((s2) =>
|
|
282675
|
+
].map((s2) => import_chalk11.default.red(s2)));
|
|
282579
282676
|
}
|
|
282580
282677
|
ret.sort(makeComparator((row) => [row[1]]));
|
|
282581
282678
|
ret.splice(0, 0, header);
|
|
@@ -282895,11 +282992,11 @@ var init_security_group_rule = __esm({
|
|
|
282895
282992
|
});
|
|
282896
282993
|
|
|
282897
282994
|
// ../cloudformation-diff/lib/network/security-group-changes.ts
|
|
282898
|
-
var
|
|
282995
|
+
var import_chalk12, SecurityGroupChanges;
|
|
282899
282996
|
var init_security_group_changes = __esm({
|
|
282900
282997
|
"../cloudformation-diff/lib/network/security-group-changes.ts"() {
|
|
282901
282998
|
"use strict";
|
|
282902
|
-
|
|
282999
|
+
import_chalk12 = __toESM(require_source());
|
|
282903
283000
|
init_security_group_rule();
|
|
282904
283001
|
init_diffable();
|
|
282905
283002
|
init_render_intrinsics();
|
|
@@ -282947,7 +283044,7 @@ var init_security_group_changes = __esm({
|
|
|
282947
283044
|
inOut,
|
|
282948
283045
|
rule.describeProtocol(),
|
|
282949
283046
|
rule.describePeer()
|
|
282950
|
-
].map((s2) => plusMin === "+" ?
|
|
283047
|
+
].map((s2) => plusMin === "+" ? import_chalk12.default.green(s2) : import_chalk12.default.red(s2)), "renderRule");
|
|
282951
283048
|
ret.push(...this.ingress.additions.map(renderRule("+", inWord)));
|
|
282952
283049
|
ret.push(...this.egress.additions.map(renderRule("+", outWord)));
|
|
282953
283050
|
ret.push(...this.ingress.removals.map(renderRule("-", inWord)));
|
|
@@ -284222,15 +284319,15 @@ __export(format_foreach_exports, {
|
|
|
284222
284319
|
function isForEachKey(logicalId) {
|
|
284223
284320
|
return logicalId.startsWith("Fn::ForEach::");
|
|
284224
284321
|
}
|
|
284225
|
-
var
|
|
284322
|
+
var import_chalk13, ADDITION, UPDATE, REMOVAL, ForEachDiffFormatter;
|
|
284226
284323
|
var init_format_foreach = __esm({
|
|
284227
284324
|
"../cloudformation-diff/lib/format-foreach.ts"() {
|
|
284228
284325
|
"use strict";
|
|
284229
|
-
|
|
284326
|
+
import_chalk13 = __toESM(require_source());
|
|
284230
284327
|
init_util6();
|
|
284231
|
-
ADDITION =
|
|
284232
|
-
UPDATE =
|
|
284233
|
-
REMOVAL =
|
|
284328
|
+
ADDITION = import_chalk13.default.green("[+]");
|
|
284329
|
+
UPDATE = import_chalk13.default.yellow("[~]");
|
|
284330
|
+
REMOVAL = import_chalk13.default.red("[-]");
|
|
284234
284331
|
ForEachDiffFormatter = class {
|
|
284235
284332
|
static {
|
|
284236
284333
|
__name(this, "ForEachDiffFormatter");
|
|
@@ -284243,24 +284340,24 @@ var init_format_foreach = __esm({
|
|
|
284243
284340
|
const changeType = this.getChangeType(oldValue, newValue);
|
|
284244
284341
|
const value = newValue ?? oldValue;
|
|
284245
284342
|
if (!Array.isArray(value) || value.length < 2) {
|
|
284246
|
-
lines.push(`${this.changeSymbol(changeType)} ${
|
|
284343
|
+
lines.push(`${this.changeSymbol(changeType)} ${import_chalk13.default.cyan(key)} (unrecognized ForEach structure)`);
|
|
284247
284344
|
return lines;
|
|
284248
284345
|
}
|
|
284249
284346
|
const loopName = key.replace("Fn::ForEach::", "");
|
|
284250
284347
|
const [collection, templateObj] = value;
|
|
284251
284348
|
const entries = Object.entries(templateObj);
|
|
284252
284349
|
if (entries.length === 0) {
|
|
284253
|
-
lines.push(`${this.changeSymbol(changeType)} ${
|
|
284350
|
+
lines.push(`${this.changeSymbol(changeType)} ${import_chalk13.default.cyan(key)} (empty ForEach template)`);
|
|
284254
284351
|
return lines;
|
|
284255
284352
|
}
|
|
284256
284353
|
const [[templateKey, templateValue]] = entries;
|
|
284257
284354
|
const count = Array.isArray(collection) ? `${collection.length} resources` : "dynamic count";
|
|
284258
284355
|
lines.push(
|
|
284259
|
-
`${this.changeSymbol(changeType)} ${
|
|
284356
|
+
`${this.changeSymbol(changeType)} ${import_chalk13.default.cyan(key)} (expands to ${count} at deploy time)`
|
|
284260
284357
|
);
|
|
284261
|
-
lines.push(` Loop variable: ${
|
|
284358
|
+
lines.push(` Loop variable: ${import_chalk13.default.blue(loopName)}`);
|
|
284262
284359
|
lines.push(` Collection: ${this.formatCollection(collection)}`);
|
|
284263
|
-
lines.push(` \u2514\u2500\u2500 ${templateKey} ${
|
|
284360
|
+
lines.push(` \u2514\u2500\u2500 ${templateKey} ${import_chalk13.default.cyan(templateValue?.Type ?? "Unknown")}`);
|
|
284264
284361
|
if (changeType === "update" && oldValue && newValue) {
|
|
284265
284362
|
const oldProps = oldValue[1]?.[Object.keys(oldValue[1])[0]]?.Properties ?? {};
|
|
284266
284363
|
const newProps = newValue[1]?.[Object.keys(newValue[1])[0]]?.Properties ?? {};
|
|
@@ -288862,11 +288959,11 @@ function sum(xs) {
|
|
|
288862
288959
|
}
|
|
288863
288960
|
return total;
|
|
288864
288961
|
}
|
|
288865
|
-
var
|
|
288962
|
+
var import_chalk14, import_string_width, table, tableColor, TABLE_BORDER_CHARACTERS;
|
|
288866
288963
|
var init_format_table = __esm({
|
|
288867
288964
|
"../cloudformation-diff/lib/format-table.ts"() {
|
|
288868
288965
|
"use strict";
|
|
288869
|
-
|
|
288966
|
+
import_chalk14 = __toESM(require_source());
|
|
288870
288967
|
import_string_width = __toESM(require_string_width());
|
|
288871
288968
|
table = __toESM(require_src2());
|
|
288872
288969
|
__name(formatTable, "formatTable");
|
|
@@ -288874,7 +288971,7 @@ var init_format_table = __esm({
|
|
|
288874
288971
|
__name(buildColumnConfig, "buildColumnConfig");
|
|
288875
288972
|
__name(calculateColumnWidths, "calculateColumnWidths");
|
|
288876
288973
|
__name(sum, "sum");
|
|
288877
|
-
tableColor =
|
|
288974
|
+
tableColor = import_chalk14.default.gray;
|
|
288878
288975
|
TABLE_BORDER_CHARACTERS = {
|
|
288879
288976
|
topBody: tableColor("\u2500"),
|
|
288880
288977
|
topJoin: tableColor("\u252C"),
|
|
@@ -290961,7 +291058,7 @@ function _diffStrings(oldStr, newStr, context) {
|
|
|
290961
291058
|
const patch = structuredPatch(null, null, oldStr, newStr, null, null, { context });
|
|
290962
291059
|
const result2 = new Array();
|
|
290963
291060
|
for (const hunk of patch.hunks) {
|
|
290964
|
-
result2.push(
|
|
291061
|
+
result2.push(import_chalk15.default.magenta(`@@ -${hunk.oldStart},${hunk.oldLines} +${hunk.newStart},${hunk.newLines} @@`));
|
|
290965
291062
|
const baseIndent = _findIndent(hunk.lines);
|
|
290966
291063
|
for (const line of hunk.lines) {
|
|
290967
291064
|
if (line === "\") {
|
|
@@ -290974,10 +291071,10 @@ function _diffStrings(oldStr, newStr, context) {
|
|
|
290974
291071
|
result2.push(`${CONTEXT} ${text}`);
|
|
290975
291072
|
break;
|
|
290976
291073
|
case "+":
|
|
290977
|
-
result2.push(
|
|
291074
|
+
result2.push(import_chalk15.default.bold(`${ADDITION2} ${import_chalk15.default.green(text)}`));
|
|
290978
291075
|
break;
|
|
290979
291076
|
case "-":
|
|
290980
|
-
result2.push(
|
|
291077
|
+
result2.push(import_chalk15.default.bold(`${REMOVAL2} ${import_chalk15.default.red(text)}`));
|
|
290981
291078
|
break;
|
|
290982
291079
|
default:
|
|
290983
291080
|
throw new Error(`Unexpected diff marker: ${marker} (full line: ${line})`);
|
|
@@ -290999,12 +291096,12 @@ function _diffStrings(oldStr, newStr, context) {
|
|
|
290999
291096
|
}
|
|
291000
291097
|
__name(_findIndent, "_findIndent");
|
|
291001
291098
|
}
|
|
291002
|
-
var import_util50,
|
|
291099
|
+
var import_util50, import_chalk15, PATH_METADATA_KEY3, structuredPatch, ADDITION2, CONTEXT, UPDATE2, REMOVAL2, IMPORT, Formatter;
|
|
291003
291100
|
var init_format = __esm({
|
|
291004
291101
|
"../cloudformation-diff/lib/format.ts"() {
|
|
291005
291102
|
"use strict";
|
|
291006
291103
|
import_util50 = require("util");
|
|
291007
|
-
|
|
291104
|
+
import_chalk15 = __toESM(require_source());
|
|
291008
291105
|
init_util6();
|
|
291009
291106
|
init_diff_template();
|
|
291010
291107
|
init_format_foreach();
|
|
@@ -291014,11 +291111,11 @@ var init_format = __esm({
|
|
|
291014
291111
|
__name(formatDifferences, "formatDifferences");
|
|
291015
291112
|
__name(formatSecurityChanges, "formatSecurityChanges");
|
|
291016
291113
|
__name(formatSecurityChangesWithBanner, "formatSecurityChangesWithBanner");
|
|
291017
|
-
ADDITION2 =
|
|
291018
|
-
CONTEXT =
|
|
291019
|
-
UPDATE2 =
|
|
291020
|
-
REMOVAL2 =
|
|
291021
|
-
IMPORT =
|
|
291114
|
+
ADDITION2 = import_chalk15.default.green("[+]");
|
|
291115
|
+
CONTEXT = import_chalk15.default.grey("[ ]");
|
|
291116
|
+
UPDATE2 = import_chalk15.default.yellow("[~]");
|
|
291117
|
+
REMOVAL2 = import_chalk15.default.red("[-]");
|
|
291118
|
+
IMPORT = import_chalk15.default.blue("[\u2190]");
|
|
291022
291119
|
Formatter = class {
|
|
291023
291120
|
constructor(stream, logicalToPathMap, diff, context = 3) {
|
|
291024
291121
|
this.stream = stream;
|
|
@@ -291035,10 +291132,10 @@ var init_format = __esm({
|
|
|
291035
291132
|
__name(this, "Formatter");
|
|
291036
291133
|
}
|
|
291037
291134
|
print(fmt, ...args) {
|
|
291038
|
-
this.stream.write(
|
|
291135
|
+
this.stream.write(import_chalk15.default.reset((0, import_util50.format)(fmt, ...args)) + "\n");
|
|
291039
291136
|
}
|
|
291040
291137
|
warning(fmt, ...args) {
|
|
291041
|
-
this.stream.write(
|
|
291138
|
+
this.stream.write(import_chalk15.default.yellow((0, import_util50.format)(fmt, ...args)) + "\n");
|
|
291042
291139
|
}
|
|
291043
291140
|
formatSection(title, entryType, collection, formatter = this.formatDifference.bind(this)) {
|
|
291044
291141
|
if (collection.differenceCount === 0) {
|
|
@@ -291049,7 +291146,7 @@ var init_format = __esm({
|
|
|
291049
291146
|
this.printSectionFooter();
|
|
291050
291147
|
}
|
|
291051
291148
|
printSectionHeader(title) {
|
|
291052
|
-
this.print(
|
|
291149
|
+
this.print(import_chalk15.default.underline(import_chalk15.default.bold(title)));
|
|
291053
291150
|
}
|
|
291054
291151
|
printSectionFooter() {
|
|
291055
291152
|
this.print("");
|
|
@@ -291065,8 +291162,8 @@ var init_format = __esm({
|
|
|
291065
291162
|
return;
|
|
291066
291163
|
}
|
|
291067
291164
|
let value;
|
|
291068
|
-
const oldValue = this.formatValue(diff.oldValue,
|
|
291069
|
-
const newValue = this.formatValue(diff.newValue,
|
|
291165
|
+
const oldValue = this.formatValue(diff.oldValue, import_chalk15.default.red);
|
|
291166
|
+
const newValue = this.formatValue(diff.newValue, import_chalk15.default.green);
|
|
291070
291167
|
if (diff.isAddition) {
|
|
291071
291168
|
value = newValue;
|
|
291072
291169
|
} else if (diff.isUpdate) {
|
|
@@ -291074,7 +291171,7 @@ var init_format = __esm({
|
|
|
291074
291171
|
} else if (diff.isRemoval) {
|
|
291075
291172
|
value = oldValue;
|
|
291076
291173
|
}
|
|
291077
|
-
this.print(`${this.formatPrefix(diff)} ${
|
|
291174
|
+
this.print(`${this.formatPrefix(diff)} ${import_chalk15.default.cyan(type)} ${this.formatLogicalId(logicalId)}: ${value}`);
|
|
291078
291175
|
}
|
|
291079
291176
|
/**
|
|
291080
291177
|
* Print a resource difference for a given logical ID.
|
|
@@ -291097,7 +291194,7 @@ var init_format = __esm({
|
|
|
291097
291194
|
const resourceType = diff.isRemoval ? diff.oldResourceType : diff.newResourceType;
|
|
291098
291195
|
const message2 = [
|
|
291099
291196
|
this.formatResourcePrefix(diff),
|
|
291100
|
-
this.formatValue(resourceType,
|
|
291197
|
+
this.formatValue(resourceType, import_chalk15.default.cyan),
|
|
291101
291198
|
this.formatLogicalId(logicalId),
|
|
291102
291199
|
this.formatImpact(diff.changeImpact),
|
|
291103
291200
|
this.formatMove(diff.move)
|
|
@@ -291128,7 +291225,7 @@ var init_format = __esm({
|
|
|
291128
291225
|
if (diff.isRemoval) {
|
|
291129
291226
|
return REMOVAL2;
|
|
291130
291227
|
}
|
|
291131
|
-
return
|
|
291228
|
+
return import_chalk15.default.reset("[?]");
|
|
291132
291229
|
}
|
|
291133
291230
|
/**
|
|
291134
291231
|
* @param value - the value to be formatted.
|
|
@@ -291152,15 +291249,15 @@ var init_format = __esm({
|
|
|
291152
291249
|
formatImpact(impact) {
|
|
291153
291250
|
switch (impact) {
|
|
291154
291251
|
case "MAY_REPLACE" /* MAY_REPLACE */:
|
|
291155
|
-
return
|
|
291252
|
+
return import_chalk15.default.italic(import_chalk15.default.yellow("may be replaced"));
|
|
291156
291253
|
case "WILL_REPLACE" /* WILL_REPLACE */:
|
|
291157
|
-
return
|
|
291254
|
+
return import_chalk15.default.italic(import_chalk15.default.bold(import_chalk15.default.red("replace")));
|
|
291158
291255
|
case "WILL_DESTROY" /* WILL_DESTROY */:
|
|
291159
|
-
return
|
|
291256
|
+
return import_chalk15.default.italic(import_chalk15.default.bold(import_chalk15.default.red("destroy")));
|
|
291160
291257
|
case "WILL_ORPHAN" /* WILL_ORPHAN */:
|
|
291161
|
-
return
|
|
291258
|
+
return import_chalk15.default.italic(import_chalk15.default.yellow("orphan"));
|
|
291162
291259
|
case "WILL_IMPORT" /* WILL_IMPORT */:
|
|
291163
|
-
return
|
|
291260
|
+
return import_chalk15.default.italic(import_chalk15.default.blue("import"));
|
|
291164
291261
|
case "WILL_UPDATE" /* WILL_UPDATE */:
|
|
291165
291262
|
case "WILL_CREATE" /* WILL_CREATE */:
|
|
291166
291263
|
case "NO_CHANGE" /* NO_CHANGE */:
|
|
@@ -291168,7 +291265,7 @@ var init_format = __esm({
|
|
|
291168
291265
|
}
|
|
291169
291266
|
}
|
|
291170
291267
|
formatMove(move) {
|
|
291171
|
-
return !move ? "" :
|
|
291268
|
+
return !move ? "" : import_chalk15.default.yellow("(OR", import_chalk15.default.italic(import_chalk15.default.bold("move")), `${move.direction} ${move.stackName}.${move.resourceLogicalId} via refactoring)`);
|
|
291172
291269
|
}
|
|
291173
291270
|
/**
|
|
291174
291271
|
* Renders a tree of differences under a particular name.
|
|
@@ -291207,13 +291304,13 @@ var init_format = __esm({
|
|
|
291207
291304
|
this.print("%s %s %s", linePrefix, i6 === 0 ? "\u2514\u2500" : " ", diff[i6]);
|
|
291208
291305
|
}
|
|
291209
291306
|
} else {
|
|
291210
|
-
this.print("%s \u251C\u2500 %s %s", linePrefix, REMOVAL2, this.formatValue(oldObject,
|
|
291211
|
-
this.print("%s \u2514\u2500 %s %s", linePrefix, ADDITION2, this.formatValue(newObject,
|
|
291307
|
+
this.print("%s \u251C\u2500 %s %s", linePrefix, REMOVAL2, this.formatValue(oldObject, import_chalk15.default.red));
|
|
291308
|
+
this.print("%s \u2514\u2500 %s %s", linePrefix, ADDITION2, this.formatValue(newObject, import_chalk15.default.green));
|
|
291212
291309
|
}
|
|
291213
291310
|
} else if (oldObject !== void 0) {
|
|
291214
|
-
this.print("%s \u2514\u2500 %s", linePrefix, this.formatValue(oldObject,
|
|
291311
|
+
this.print("%s \u2514\u2500 %s", linePrefix, this.formatValue(oldObject, import_chalk15.default.red));
|
|
291215
291312
|
} else {
|
|
291216
|
-
this.print("%s \u2514\u2500 %s", linePrefix, this.formatValue(newObject,
|
|
291313
|
+
this.print("%s \u2514\u2500 %s", linePrefix, this.formatValue(newObject, import_chalk15.default.green));
|
|
291217
291314
|
}
|
|
291218
291315
|
return;
|
|
291219
291316
|
}
|
|
@@ -291226,12 +291323,12 @@ var init_format = __esm({
|
|
|
291226
291323
|
const newValue = newObject[key];
|
|
291227
291324
|
const treePrefix = key === lastKey ? "\u2514" : "\u251C";
|
|
291228
291325
|
if (oldValue !== void 0 && newValue !== void 0) {
|
|
291229
|
-
this.print("%s %s\u2500 %s %s:", linePrefix, treePrefix, this.changeTag(oldValue, newValue),
|
|
291326
|
+
this.print("%s %s\u2500 %s %s:", linePrefix, treePrefix, this.changeTag(oldValue, newValue), import_chalk15.default.blue(`.${key}`));
|
|
291230
291327
|
this.formatObjectDiff(oldValue, newValue, `${linePrefix} ${key === lastKey ? " " : "\u2502"}`);
|
|
291231
291328
|
} else if (oldValue !== void 0) {
|
|
291232
|
-
this.print("%s %s\u2500 %s Removed: %s", linePrefix, treePrefix, REMOVAL2,
|
|
291329
|
+
this.print("%s %s\u2500 %s Removed: %s", linePrefix, treePrefix, REMOVAL2, import_chalk15.default.blue(`.${key}`));
|
|
291233
291330
|
} else {
|
|
291234
|
-
this.print("%s %s\u2500 %s Added: %s", linePrefix, treePrefix, ADDITION2,
|
|
291331
|
+
this.print("%s %s\u2500 %s Added: %s", linePrefix, treePrefix, ADDITION2, import_chalk15.default.blue(`.${key}`));
|
|
291235
291332
|
}
|
|
291236
291333
|
}
|
|
291237
291334
|
}
|
|
@@ -291275,7 +291372,7 @@ var init_format = __esm({
|
|
|
291275
291372
|
formatLogicalId(logicalId) {
|
|
291276
291373
|
const normalized = this.normalizedLogicalIdPath(logicalId);
|
|
291277
291374
|
if (normalized) {
|
|
291278
|
-
return `${normalized} ${
|
|
291375
|
+
return `${normalized} ${import_chalk15.default.gray(logicalId)}`;
|
|
291279
291376
|
}
|
|
291280
291377
|
return logicalId;
|
|
291281
291378
|
}
|
|
@@ -291367,7 +291464,7 @@ function formatTypedMappings(stream, mappings) {
|
|
|
291367
291464
|
const rows = mappings.map((m4) => [m4.type, m4.sourcePath, m4.destinationPath]);
|
|
291368
291465
|
const formatter = new Formatter(stream, {});
|
|
291369
291466
|
formatter.print("The following resources were moved or renamed:");
|
|
291370
|
-
formatter.print(
|
|
291467
|
+
formatter.print(import_chalk16.default.green(formatTable(header.concat(rows), void 0)));
|
|
291371
291468
|
formatter.print(" ");
|
|
291372
291469
|
}
|
|
291373
291470
|
}
|
|
@@ -291377,18 +291474,18 @@ function formatAmbiguousMappings(stream, pairs) {
|
|
|
291377
291474
|
formatter.print("Detected ambiguities:");
|
|
291378
291475
|
formatter.print(tables.join("\n\n"));
|
|
291379
291476
|
formatter.print(" ");
|
|
291380
|
-
formatter.print(
|
|
291477
|
+
formatter.print(import_chalk16.default.yellow("Please provide an override file to resolve these ambiguous mappings."));
|
|
291381
291478
|
formatter.print(" ");
|
|
291382
291479
|
function renderTable([removed, added]) {
|
|
291383
291480
|
return formatTable([["", "Resource"], renderRemoval(removed), renderAddition(added)], void 0);
|
|
291384
291481
|
}
|
|
291385
291482
|
__name(renderTable, "renderTable");
|
|
291386
291483
|
function renderRemoval(locations) {
|
|
291387
|
-
return [
|
|
291484
|
+
return [import_chalk16.default.red("-"), import_chalk16.default.red(renderLocations(locations))];
|
|
291388
291485
|
}
|
|
291389
291486
|
__name(renderRemoval, "renderRemoval");
|
|
291390
291487
|
function renderAddition(locations) {
|
|
291391
|
-
return [
|
|
291488
|
+
return [import_chalk16.default.green("+"), import_chalk16.default.green(renderLocations(locations))];
|
|
291392
291489
|
}
|
|
291393
291490
|
__name(renderAddition, "renderAddition");
|
|
291394
291491
|
function renderLocations(locs) {
|
|
@@ -291396,11 +291493,11 @@ function formatAmbiguousMappings(stream, pairs) {
|
|
|
291396
291493
|
}
|
|
291397
291494
|
__name(renderLocations, "renderLocations");
|
|
291398
291495
|
}
|
|
291399
|
-
var
|
|
291496
|
+
var import_chalk16;
|
|
291400
291497
|
var init_mappings = __esm({
|
|
291401
291498
|
"../cloudformation-diff/lib/mappings.ts"() {
|
|
291402
291499
|
"use strict";
|
|
291403
|
-
|
|
291500
|
+
import_chalk16 = __toESM(require_source());
|
|
291404
291501
|
init_format();
|
|
291405
291502
|
init_format_table();
|
|
291406
291503
|
__name(formatEnvironmentSectionHeader, "formatEnvironmentSectionHeader");
|
|
@@ -291658,7 +291755,7 @@ async function addMetadataAssetsToManifest(ioHelper, stack, assetManifest, envRe
|
|
|
291658
291755
|
}
|
|
291659
291756
|
const toolkitInfo = await envResources.lookupToolkit();
|
|
291660
291757
|
if (!toolkitInfo.found) {
|
|
291661
|
-
throw new ToolkitError("BootstrapStackRequired", `This stack uses assets, so the toolkit stack must be deployed to the environment (Run "${
|
|
291758
|
+
throw new ToolkitError("BootstrapStackRequired", `This stack uses assets, so the toolkit stack must be deployed to the environment (Run "${import_chalk17.default.blue("cdk bootstrap " + stack.environment.name)}")`);
|
|
291662
291759
|
}
|
|
291663
291760
|
const params = {};
|
|
291664
291761
|
for (const asset of assets) {
|
|
@@ -291738,14 +291835,14 @@ async function prepareDockerImageAsset(asset, assetManifest, envResources) {
|
|
|
291738
291835
|
}
|
|
291739
291836
|
return { [asset.imageNameParameter]: `${repositoryUri2}:${imageTag}` };
|
|
291740
291837
|
}
|
|
291741
|
-
var path31, cxapi6, cxschema10,
|
|
291838
|
+
var path31, cxapi6, cxschema10, import_chalk17;
|
|
291742
291839
|
var init_assets3 = __esm({
|
|
291743
291840
|
"../toolkit-lib/lib/api/deployments/assets.ts"() {
|
|
291744
291841
|
"use strict";
|
|
291745
291842
|
path31 = __toESM(require("path"));
|
|
291746
291843
|
cxapi6 = __toESM(require_lib3());
|
|
291747
291844
|
cxschema10 = __toESM(require_lib2());
|
|
291748
|
-
|
|
291845
|
+
import_chalk17 = __toESM(require_source());
|
|
291749
291846
|
init_toolkit_error();
|
|
291750
291847
|
__name(addMetadataAssetsToManifest, "addMetadataAssetsToManifest");
|
|
291751
291848
|
__name(prepareAsset, "prepareAsset");
|
|
@@ -292581,15 +292678,6 @@ var init_hotswap_template_cache = __esm({
|
|
|
292581
292678
|
}
|
|
292582
292679
|
});
|
|
292583
292680
|
|
|
292584
|
-
// ../toolkit-lib/lib/private/tools.ts
|
|
292585
|
-
var tools_exports2 = {};
|
|
292586
|
-
var init_tools2 = __esm({
|
|
292587
|
-
"../toolkit-lib/lib/private/tools.ts"() {
|
|
292588
|
-
"use strict";
|
|
292589
|
-
__reExport(tools_exports2, __toESM(require_zip()));
|
|
292590
|
-
}
|
|
292591
|
-
});
|
|
292592
|
-
|
|
292593
292681
|
// ../toolkit-lib/lib/api/hotswap/lambda-functions.ts
|
|
292594
292682
|
async function isHotswappableLambdaFunctionChange(logicalId, change, evaluateCfnTemplate) {
|
|
292595
292683
|
if (change.newValue.Type === "AWS::Lambda::Version") {
|
|
@@ -292751,7 +292839,7 @@ async function evaluateLambdaFunctionProps(hotswappablePropChanges, runtime, eva
|
|
|
292751
292839
|
);
|
|
292752
292840
|
}
|
|
292753
292841
|
}
|
|
292754
|
-
const configurations = description || environment ? { description, environment } : void 0;
|
|
292842
|
+
const configurations = description !== void 0 || environment ? { description, environment } : void 0;
|
|
292755
292843
|
return code || configurations ? { code, configurations } : void 0;
|
|
292756
292844
|
}
|
|
292757
292845
|
async function waitForLambdasPropertiesUpdateToFinish(lambda, functionName) {
|
|
@@ -293459,7 +293547,7 @@ async function applyHotswapOperation(sdk, ioSpan, hotswapOperation) {
|
|
|
293459
293547
|
sdk.appendCustomUserAgent(customUserAgent);
|
|
293460
293548
|
const resourceText = /* @__PURE__ */ __name((r6) => r6.description ?? `${r6.resourceType} '${r6.physicalName ?? r6.logicalId}'`, "resourceText");
|
|
293461
293549
|
await ioSpan.notify(IO.CDK_TOOLKIT_I5402.msg(
|
|
293462
|
-
hotswapOperation.change.resources.map((r6) => (0, import_util56.format)(` ${ICON} %s`,
|
|
293550
|
+
hotswapOperation.change.resources.map((r6) => (0, import_util56.format)(` ${ICON} %s`, import_chalk18.default.bold(resourceText(r6)))).join("\n"),
|
|
293463
293551
|
hotswapOperation.change
|
|
293464
293552
|
));
|
|
293465
293553
|
try {
|
|
@@ -293474,7 +293562,7 @@ async function applyHotswapOperation(sdk, ioSpan, hotswapOperation) {
|
|
|
293474
293562
|
throw e6;
|
|
293475
293563
|
}
|
|
293476
293564
|
await ioSpan.notify(IO.CDK_TOOLKIT_I5403.msg(
|
|
293477
|
-
hotswapOperation.change.resources.map((r6) => (0, import_util56.format)(` ${ICON} %s %s`,
|
|
293565
|
+
hotswapOperation.change.resources.map((r6) => (0, import_util56.format)(` ${ICON} %s %s`, import_chalk18.default.bold(resourceText(r6)), import_chalk18.default.green("hotswapped!"))).join("\n"),
|
|
293478
293566
|
hotswapOperation.change
|
|
293479
293567
|
));
|
|
293480
293568
|
sdk.removeCustomUserAgent(customUserAgent);
|
|
@@ -293503,9 +293591,9 @@ async function logRejectedChanges(ioSpan, rejectedChanges, hotswapMode) {
|
|
|
293503
293591
|
}
|
|
293504
293592
|
const messages = [""];
|
|
293505
293593
|
if (hotswapMode === "hotswap-only") {
|
|
293506
|
-
messages.push((0, import_util56.format)("%s %s",
|
|
293594
|
+
messages.push((0, import_util56.format)("%s %s", import_chalk18.default.red("\u26A0\uFE0F"), import_chalk18.default.red("The following non-hotswappable changes were found. To reconcile these using CloudFormation, specify --hotswap-fallback")));
|
|
293507
293595
|
} else {
|
|
293508
|
-
messages.push((0, import_util56.format)("%s %s",
|
|
293596
|
+
messages.push((0, import_util56.format)("%s %s", import_chalk18.default.red("\u26A0\uFE0F"), import_chalk18.default.red("The following non-hotswappable changes were found:")));
|
|
293509
293597
|
}
|
|
293510
293598
|
for (const { change } of rejectedChanges) {
|
|
293511
293599
|
messages.push(" " + nonHotswappableChangeMessage(change));
|
|
@@ -293520,8 +293608,8 @@ function nonHotswappableChangeMessage(change) {
|
|
|
293520
293608
|
case "Output":
|
|
293521
293609
|
return (0, import_util56.format)(
|
|
293522
293610
|
"output: %s, reason: %s",
|
|
293523
|
-
|
|
293524
|
-
|
|
293611
|
+
import_chalk18.default.bold(subject.logicalId),
|
|
293612
|
+
import_chalk18.default.red(reason)
|
|
293525
293613
|
);
|
|
293526
293614
|
case "Resource":
|
|
293527
293615
|
return nonHotswappableResourceMessage(subject, reason);
|
|
@@ -293531,26 +293619,26 @@ function nonHotswappableResourceMessage(subject, reason) {
|
|
|
293531
293619
|
if (subject.rejectedProperties?.length) {
|
|
293532
293620
|
return (0, import_util56.format)(
|
|
293533
293621
|
"resource: %s, type: %s, rejected changes: %s, reason: %s",
|
|
293534
|
-
|
|
293535
|
-
|
|
293536
|
-
|
|
293537
|
-
|
|
293622
|
+
import_chalk18.default.bold(subject.logicalId),
|
|
293623
|
+
import_chalk18.default.bold(subject.resourceType),
|
|
293624
|
+
import_chalk18.default.bold(subject.rejectedProperties),
|
|
293625
|
+
import_chalk18.default.red(reason)
|
|
293538
293626
|
);
|
|
293539
293627
|
}
|
|
293540
293628
|
return (0, import_util56.format)(
|
|
293541
293629
|
"resource: %s, type: %s, reason: %s",
|
|
293542
|
-
|
|
293543
|
-
|
|
293544
|
-
|
|
293630
|
+
import_chalk18.default.bold(subject.logicalId),
|
|
293631
|
+
import_chalk18.default.bold(subject.resourceType),
|
|
293632
|
+
import_chalk18.default.red(reason)
|
|
293545
293633
|
);
|
|
293546
293634
|
}
|
|
293547
|
-
var import_util56, cfn_diff,
|
|
293635
|
+
var import_util56, cfn_diff, import_chalk18, pLimit2, RESOURCE_DETECTORS;
|
|
293548
293636
|
var init_hotswap_deployments = __esm({
|
|
293549
293637
|
"../toolkit-lib/lib/api/hotswap/hotswap-deployments.ts"() {
|
|
293550
293638
|
"use strict";
|
|
293551
293639
|
import_util56 = require("util");
|
|
293552
293640
|
cfn_diff = __toESM(require_lib10());
|
|
293553
|
-
|
|
293641
|
+
import_chalk18 = __toESM(require_source());
|
|
293554
293642
|
init_payloads();
|
|
293555
293643
|
init_util4();
|
|
293556
293644
|
init_cloudformation2();
|
|
@@ -293683,7 +293771,7 @@ async function deployStack(options, ioHelper) {
|
|
|
293683
293771
|
`
|
|
293684
293772
|
${ICON} %s
|
|
293685
293773
|
`,
|
|
293686
|
-
|
|
293774
|
+
import_chalk19.default.bold("hotswap deployment skipped - no changes were detected (use --force to override)")
|
|
293687
293775
|
)
|
|
293688
293776
|
);
|
|
293689
293777
|
}
|
|
@@ -293891,14 +293979,14 @@ function hasReplacement(report) {
|
|
|
293891
293979
|
return a6 === "ReplaceAndDelete" || a6 === "ReplaceAndRetain" || a6 === "ReplaceAndSnapshot";
|
|
293892
293980
|
});
|
|
293893
293981
|
}
|
|
293894
|
-
var import_node_crypto10, import_node_util5, import_cloudformation_diff,
|
|
293982
|
+
var import_node_crypto10, import_node_util5, import_cloudformation_diff, import_chalk19, FullCloudFormationDeployment;
|
|
293895
293983
|
var init_deploy_stack = __esm({
|
|
293896
293984
|
"../toolkit-lib/lib/api/deployments/deploy-stack.ts"() {
|
|
293897
293985
|
"use strict";
|
|
293898
293986
|
import_node_crypto10 = require("node:crypto");
|
|
293899
293987
|
import_node_util5 = require("node:util");
|
|
293900
293988
|
import_cloudformation_diff = __toESM(require_lib10());
|
|
293901
|
-
|
|
293989
|
+
import_chalk19 = __toESM(require_source());
|
|
293902
293990
|
init_asset_manifest_builder();
|
|
293903
293991
|
init_asset_publishing();
|
|
293904
293992
|
init_assets3();
|
|
@@ -294075,7 +294163,7 @@ var init_deploy_stack = __esm({
|
|
|
294075
294163
|
async createChangeSet(changeSetName, importExistingResources, revertDrift) {
|
|
294076
294164
|
await this.cleanupOldChangeset(changeSetName);
|
|
294077
294165
|
await this.ioHelper.defaults.debug(`Attempting to create ChangeSet with name ${changeSetName} to ${this.verb} stack ${this.stackName}`);
|
|
294078
|
-
await this.ioHelper.defaults.info((0, import_node_util5.format)("%s: creating CloudFormation changeset...",
|
|
294166
|
+
await this.ioHelper.defaults.info((0, import_node_util5.format)("%s: creating CloudFormation changeset...", import_chalk19.default.bold(this.stackName)));
|
|
294079
294167
|
const changeSet = await this.cfn.createChangeSet({
|
|
294080
294168
|
StackName: this.stackName,
|
|
294081
294169
|
ChangeSetName: changeSetName,
|
|
@@ -294134,7 +294222,7 @@ var init_deploy_stack = __esm({
|
|
|
294134
294222
|
}
|
|
294135
294223
|
}
|
|
294136
294224
|
async directDeployment() {
|
|
294137
|
-
await this.ioHelper.defaults.info((0, import_node_util5.format)("%s: %s stack...",
|
|
294225
|
+
await this.ioHelper.defaults.info((0, import_node_util5.format)("%s: %s stack...", import_chalk19.default.bold(this.stackName), this.update ? "updating" : "creating"));
|
|
294138
294226
|
const startTime = /* @__PURE__ */ new Date();
|
|
294139
294227
|
if (this.update) {
|
|
294140
294228
|
await this.updateTerminationProtection();
|
|
@@ -294187,19 +294275,16 @@ var init_deploy_stack = __esm({
|
|
|
294187
294275
|
pollingInterval: this.options.stackEventPollingInterval
|
|
294188
294276
|
});
|
|
294189
294277
|
await monitor.start();
|
|
294190
|
-
let finalState
|
|
294278
|
+
let finalState;
|
|
294191
294279
|
try {
|
|
294192
|
-
const successStack = await waitForStackDeploy(this.cfn, this.ioHelper,
|
|
294280
|
+
const successStack = await waitForStackDeploy(this.cfn, this.ioHelper, stackArn, this.options.stackEventPollingInterval);
|
|
294193
294281
|
if (!successStack) {
|
|
294194
294282
|
throw new DeploymentError("Stack deploy failed (the stack disappeared while we were deploying it)", DeploymentErrorCodes.STACK_DISAPPEARED_ERROR_CODE);
|
|
294195
294283
|
}
|
|
294196
294284
|
finalState = successStack;
|
|
294197
294285
|
} catch (e6) {
|
|
294198
294286
|
if (ToolkitError.isDeploymentError(e6)) {
|
|
294199
|
-
|
|
294200
|
-
rollbackEnabled: this.options.rollback !== false
|
|
294201
|
-
});
|
|
294202
|
-
diagnosis.throwOnError();
|
|
294287
|
+
await this.diagnoseDeploymentFailure(stackArn, monitor.errors);
|
|
294203
294288
|
}
|
|
294204
294289
|
throw e6;
|
|
294205
294290
|
} finally {
|
|
@@ -294215,6 +294300,25 @@ var init_deploy_stack = __esm({
|
|
|
294215
294300
|
stabilizingResources: monitor.stabilizingResources
|
|
294216
294301
|
};
|
|
294217
294302
|
}
|
|
294303
|
+
/**
|
|
294304
|
+
* Throw a `DeploymentError` describing why the deployment failed, if we can establish that
|
|
294305
|
+
*
|
|
294306
|
+
* Returns normally when no cause could be established, leaving the caller's original error as the better
|
|
294307
|
+
* one to report.
|
|
294308
|
+
*/
|
|
294309
|
+
async diagnoseDeploymentFailure(stackArn, errors) {
|
|
294310
|
+
const deployedState = await this.cfn.describeStacks({ StackName: stackArn }).then((response) => response.Stacks?.[0]).catch(async (e6) => {
|
|
294311
|
+
await this.ioHelper.defaults.debug(`Could not describe ${stackArn} to diagnose the failure: ${formatErrorMessage(e6)}`);
|
|
294312
|
+
return void 0;
|
|
294313
|
+
});
|
|
294314
|
+
if (!deployedState) {
|
|
294315
|
+
return;
|
|
294316
|
+
}
|
|
294317
|
+
const diagnosis = await this.diagnoser.diagnoseFromErrorCollection(errors, deployedState, true, {
|
|
294318
|
+
rollbackEnabled: this.options.rollback !== false
|
|
294319
|
+
});
|
|
294320
|
+
diagnosis.throwOnError();
|
|
294321
|
+
}
|
|
294218
294322
|
/**
|
|
294219
294323
|
* Return the options that are shared between CreateStack, UpdateStack and CreateChangeSet
|
|
294220
294324
|
*/
|
|
@@ -294256,13 +294360,13 @@ var init_deploy_stack = __esm({
|
|
|
294256
294360
|
function suffixWithErrors2(msg, errors) {
|
|
294257
294361
|
return errors && errors.length > 0 ? `${msg}: ${errors.join(", ")}` : msg;
|
|
294258
294362
|
}
|
|
294259
|
-
var import_node_crypto11, cdk_assets,
|
|
294363
|
+
var import_node_crypto11, cdk_assets, import_chalk20, BOOTSTRAP_STACK_VERSION_FOR_ROLLBACK, Deployments, ParallelSafeAssetProgress;
|
|
294260
294364
|
var init_deployments = __esm({
|
|
294261
294365
|
"../toolkit-lib/lib/api/deployments/deployments.ts"() {
|
|
294262
294366
|
"use strict";
|
|
294263
294367
|
import_node_crypto11 = require("node:crypto");
|
|
294264
294368
|
cdk_assets = __toESM(require_lib5());
|
|
294265
|
-
|
|
294369
|
+
import_chalk20 = __toESM(require_source());
|
|
294266
294370
|
init_asset_manifest_builder();
|
|
294267
294371
|
init_asset_publishing();
|
|
294268
294372
|
init_cfn_api();
|
|
@@ -294538,7 +294642,7 @@ var init_deployments = __esm({
|
|
|
294538
294642
|
let stackErrorMessage = void 0;
|
|
294539
294643
|
let finalStackState = cloudFormationStack;
|
|
294540
294644
|
try {
|
|
294541
|
-
const successStack = await stabilizeStack(cfn, this.ioHelper,
|
|
294645
|
+
const successStack = await stabilizeStack(cfn, this.ioHelper, stackArn);
|
|
294542
294646
|
if (!successStack) {
|
|
294543
294647
|
throw new ToolkitError("StackDisappeared", "Stack deploy failed (the stack disappeared while we were rolling it back)");
|
|
294544
294648
|
}
|
|
@@ -294657,18 +294761,24 @@ var init_deployments = __esm({
|
|
|
294657
294761
|
}
|
|
294658
294762
|
}
|
|
294659
294763
|
cachedPublisher(assetManifest, env2, stackName) {
|
|
294660
|
-
const
|
|
294764
|
+
const envKey = `${env2.account}:${env2.region}`;
|
|
294765
|
+
let byEnv = this.publisherCache.get(assetManifest);
|
|
294766
|
+
if (!byEnv) {
|
|
294767
|
+
byEnv = /* @__PURE__ */ new Map();
|
|
294768
|
+
this.publisherCache.set(assetManifest, byEnv);
|
|
294769
|
+
}
|
|
294770
|
+
const existing = byEnv.get(envKey);
|
|
294661
294771
|
if (existing) {
|
|
294662
294772
|
return existing;
|
|
294663
294773
|
}
|
|
294664
|
-
const prefix = stackName ? `${
|
|
294774
|
+
const prefix = stackName ? `${import_chalk20.default.bold(stackName)}: ` : "";
|
|
294665
294775
|
const publisher = new cdk_assets.AssetPublishing(assetManifest, {
|
|
294666
294776
|
// The AssetPublishing class takes care of role assuming etc, so it's okay to
|
|
294667
294777
|
// give it a direct `SdkProvider`.
|
|
294668
294778
|
aws: new PublishingAws(this.assetSdkProvider, env2),
|
|
294669
294779
|
progressListener: new ParallelSafeAssetProgress(prefix, this.ioHelper)
|
|
294670
294780
|
});
|
|
294671
|
-
|
|
294781
|
+
byEnv.set(envKey, publisher);
|
|
294672
294782
|
return publisher;
|
|
294673
294783
|
}
|
|
294674
294784
|
};
|
|
@@ -294800,13 +294910,13 @@ function obscureDiff(diff) {
|
|
|
294800
294910
|
});
|
|
294801
294911
|
}
|
|
294802
294912
|
}
|
|
294803
|
-
var import_node_util6, import_cloudformation_diff2,
|
|
294913
|
+
var import_node_util6, import_cloudformation_diff2, import_chalk21, DiffFormatter;
|
|
294804
294914
|
var init_diff_formatter = __esm({
|
|
294805
294915
|
"../toolkit-lib/lib/api/diff/diff-formatter.ts"() {
|
|
294806
294916
|
"use strict";
|
|
294807
294917
|
import_node_util6 = require("node:util");
|
|
294808
294918
|
import_cloudformation_diff2 = __toESM(require_lib10());
|
|
294809
|
-
|
|
294919
|
+
import_chalk21 = __toESM(require_source());
|
|
294810
294920
|
init_payloads();
|
|
294811
294921
|
init_logical_id_map();
|
|
294812
294922
|
init_streams();
|
|
@@ -294888,7 +294998,7 @@ var init_diff_formatter = __esm({
|
|
|
294888
294998
|
let filteredChangesCount = 0;
|
|
294889
294999
|
try {
|
|
294890
295000
|
if (stackName && (!options.quiet || !diff.isEmpty)) {
|
|
294891
|
-
stream.write((0, import_node_util6.format)(`Stack ${
|
|
295001
|
+
stream.write((0, import_node_util6.format)(`Stack ${import_chalk21.default.bold(stackName)}
|
|
294892
295002
|
`));
|
|
294893
295003
|
}
|
|
294894
295004
|
if (!options.quiet && this.isImport) {
|
|
@@ -294916,12 +295026,12 @@ var init_diff_formatter = __esm({
|
|
|
294916
295026
|
...logicalIdMap
|
|
294917
295027
|
}, options.contextLines);
|
|
294918
295028
|
} else if (!options.quiet) {
|
|
294919
|
-
const hint = metadataWasFiltered ?
|
|
294920
|
-
stream.write(`${
|
|
295029
|
+
const hint = metadataWasFiltered ? import_chalk21.default.grey(" (CDK metadata changes were hidden, run cdk diff --strict to show)") : "";
|
|
295030
|
+
stream.write(`${import_chalk21.default.green("There were no differences")}${hint}
|
|
294921
295031
|
`);
|
|
294922
295032
|
}
|
|
294923
295033
|
if (filteredChangesCount > 0) {
|
|
294924
|
-
stream.write(
|
|
295034
|
+
stream.write(import_chalk21.default.yellow(`Omitted ${filteredChangesCount} changes because they are likely mangled non-ASCII characters. Use --strict to print them.
|
|
294925
295035
|
`));
|
|
294926
295036
|
}
|
|
294927
295037
|
} finally {
|
|
@@ -294963,7 +295073,7 @@ var init_diff_formatter = __esm({
|
|
|
294963
295073
|
const permissionChangeType = permissionTypeFromDiff(diff);
|
|
294964
295074
|
const stream = new StringWriteStream();
|
|
294965
295075
|
if (!options.quiet || permissionChangeType !== "none" /* NONE */) {
|
|
294966
|
-
stream.write((0, import_node_util6.format)(`Stack ${
|
|
295076
|
+
stream.write((0, import_node_util6.format)(`Stack ${import_chalk21.default.bold(stackName)}
|
|
294967
295077
|
`));
|
|
294968
295078
|
}
|
|
294969
295079
|
try {
|
|
@@ -294976,7 +295086,7 @@ var init_diff_formatter = __esm({
|
|
|
294976
295086
|
}
|
|
294977
295087
|
let formattedDiff = stream.toString();
|
|
294978
295088
|
if (!options.quiet && permissionChangeType === "none" /* NONE */) {
|
|
294979
|
-
formattedDiff +=
|
|
295089
|
+
formattedDiff += import_chalk21.default.green("There were no security-related changes (limitations: https://github.com/aws/aws-cdk/issues/1299)\n");
|
|
294980
295090
|
}
|
|
294981
295091
|
let numStacksWithChanges = permissionChangeType !== "none" /* NONE */ ? 1 : 0;
|
|
294982
295092
|
let escalatedPermissionType = permissionChangeType;
|
|
@@ -295032,13 +295142,13 @@ function removeNonImportResources(stack) {
|
|
|
295032
295142
|
delete template.Outputs;
|
|
295033
295143
|
return template;
|
|
295034
295144
|
}
|
|
295035
|
-
var import_util60, cfnDiff,
|
|
295145
|
+
var import_util60, cfnDiff, import_chalk22, fs34, ResourceImporter;
|
|
295036
295146
|
var init_importer = __esm({
|
|
295037
295147
|
"../toolkit-lib/lib/api/resource-import/importer.ts"() {
|
|
295038
295148
|
"use strict";
|
|
295039
295149
|
import_util60 = require("util");
|
|
295040
295150
|
cfnDiff = __toESM(require_lib10());
|
|
295041
|
-
|
|
295151
|
+
import_chalk22 = __toESM(require_source());
|
|
295042
295152
|
fs34 = __toESM(require_lib4());
|
|
295043
295153
|
init_toolkit_error();
|
|
295044
295154
|
init_deployments2();
|
|
@@ -295100,12 +295210,12 @@ var init_importer = __esm({
|
|
|
295100
295210
|
const descr = this.describeResource(resource.logicalId);
|
|
295101
295211
|
const idProps = remaining[resource.logicalId];
|
|
295102
295212
|
if (idProps) {
|
|
295103
|
-
await this.ioHelper.defaults.info((0, import_util60.format)("%s: importing using %s",
|
|
295213
|
+
await this.ioHelper.defaults.info((0, import_util60.format)("%s: importing using %s", import_chalk22.default.blue(descr), import_chalk22.default.blue(fmtdict(idProps))));
|
|
295104
295214
|
ret.importResources.push(resource);
|
|
295105
295215
|
ret.resourceMap[resource.logicalId] = idProps;
|
|
295106
295216
|
delete remaining[resource.logicalId];
|
|
295107
295217
|
} else {
|
|
295108
|
-
await this.ioHelper.defaults.info((0, import_util60.format)("%s: skipping",
|
|
295218
|
+
await this.ioHelper.defaults.info((0, import_util60.format)("%s: skipping", import_chalk22.default.blue(descr)));
|
|
295109
295219
|
}
|
|
295110
295220
|
}
|
|
295111
295221
|
const unknown = Object.keys(remaining);
|
|
@@ -295118,7 +295228,7 @@ var init_importer = __esm({
|
|
|
295118
295228
|
* Based on the provided resource mapping, prepare CFN structures for import (template,
|
|
295119
295229
|
* ResourcesToImport structure) and perform the import operation (CloudFormation deployment)
|
|
295120
295230
|
*
|
|
295121
|
-
* @param importMap - Mapping from
|
|
295231
|
+
* @param importMap - Mapping from CloudFormation logical ID to physical resource import identifiers
|
|
295122
295232
|
* @param options - Options to pass to CloudFormation deploy operation
|
|
295123
295233
|
*/
|
|
295124
295234
|
async importResourcesFromMap(importMap, options = {}) {
|
|
@@ -295149,9 +295259,9 @@ var init_importer = __esm({
|
|
|
295149
295259
|
});
|
|
295150
295260
|
assertIsSuccessfulDeployStackResult(result2);
|
|
295151
295261
|
const message2 = result2.noOp ? "\u2705 %s (no changes)" : "\u2705 %s";
|
|
295152
|
-
await this.ioHelper.defaults.info("\n" +
|
|
295262
|
+
await this.ioHelper.defaults.info("\n" + import_chalk22.default.green((0, import_util60.format)(message2, this.stack.displayName)));
|
|
295153
295263
|
} catch (e6) {
|
|
295154
|
-
await this.ioHelper.notify(IO.CDK_TOOLKIT_E3900.msg((0, import_util60.format)("\n \u274C %s failed: %s",
|
|
295264
|
+
await this.ioHelper.notify(IO.CDK_TOOLKIT_E3900.msg((0, import_util60.format)("\n \u274C %s failed: %s", import_chalk22.default.bold(this.stack.displayName), e6), { error: e6 }));
|
|
295155
295265
|
throw e6;
|
|
295156
295266
|
}
|
|
295157
295267
|
}
|
|
@@ -295255,7 +295365,7 @@ var init_importer = __esm({
|
|
|
295255
295365
|
for (const satisfiedPropSet of satisfiedPropSets) {
|
|
295256
295366
|
const candidateProps = Object.fromEntries(satisfiedPropSet.map((p3) => [p3, resourceProps[p3]]));
|
|
295257
295367
|
const displayCandidateProps = fmtdict(candidateProps);
|
|
295258
|
-
const importTheResource = await this.ioHelper.requestResponse(IO.CDK_TOOLKIT_I3100.req(`${
|
|
295368
|
+
const importTheResource = await this.ioHelper.requestResponse(IO.CDK_TOOLKIT_I3100.req(`${import_chalk22.default.blue(resourceName)} (${resourceType}): import with ${import_chalk22.default.yellow(displayCandidateProps)}`, {
|
|
295259
295369
|
resource: {
|
|
295260
295370
|
type: resourceType,
|
|
295261
295371
|
props: candidateProps,
|
|
@@ -295267,13 +295377,13 @@ var init_importer = __esm({
|
|
|
295267
295377
|
}
|
|
295268
295378
|
}
|
|
295269
295379
|
if (satisfiedPropSets.length > 0) {
|
|
295270
|
-
await this.ioHelper.defaults.info(
|
|
295380
|
+
await this.ioHelper.defaults.info(import_chalk22.default.grey(`Skipping import of ${resourceName}`));
|
|
295271
295381
|
return void 0;
|
|
295272
295382
|
}
|
|
295273
|
-
const prefix = `${
|
|
295383
|
+
const prefix = `${import_chalk22.default.blue(resourceName)} (${resourceType})`;
|
|
295274
295384
|
const promptPattern = `${prefix}: enter %s`;
|
|
295275
295385
|
if (idPropSets.length > 1) {
|
|
295276
|
-
const preamble = `${prefix}: enter one of ${idPropSets.map((x) =>
|
|
295386
|
+
const preamble = `${prefix}: enter one of ${idPropSets.map((x) => import_chalk22.default.blue(x.join("+"))).join(", ")} to import (leave all empty to skip)`;
|
|
295277
295387
|
await this.ioHelper.defaults.info(preamble);
|
|
295278
295388
|
}
|
|
295279
295389
|
for (const idProps of idPropSets) {
|
|
@@ -295281,7 +295391,7 @@ var init_importer = __esm({
|
|
|
295281
295391
|
for (const idProp of idProps) {
|
|
295282
295392
|
const defaultValue = resourceProps[idProp] ?? "";
|
|
295283
295393
|
const response = await this.ioHelper.requestResponse(IO.CDK_TOOLKIT_I3110.req(
|
|
295284
|
-
(0, import_util60.format)(promptPattern,
|
|
295394
|
+
(0, import_util60.format)(promptPattern, import_chalk22.default.blue(idProp)),
|
|
295285
295395
|
{
|
|
295286
295396
|
resource: {
|
|
295287
295397
|
name: resourceName,
|
|
@@ -295302,7 +295412,7 @@ var init_importer = __esm({
|
|
|
295302
295412
|
return input;
|
|
295303
295413
|
}
|
|
295304
295414
|
}
|
|
295305
|
-
await this.ioHelper.defaults.info(
|
|
295415
|
+
await this.ioHelper.defaults.info(import_chalk22.default.grey(`Skipping import of ${resourceName}`));
|
|
295306
295416
|
return void 0;
|
|
295307
295417
|
}
|
|
295308
295418
|
/**
|
|
@@ -295339,11 +295449,11 @@ var init_importer = __esm({
|
|
|
295339
295449
|
});
|
|
295340
295450
|
|
|
295341
295451
|
// ../toolkit-lib/lib/api/resource-import/migrator.ts
|
|
295342
|
-
var
|
|
295452
|
+
var import_chalk23, fs35, ResourceMigrator;
|
|
295343
295453
|
var init_migrator = __esm({
|
|
295344
295454
|
"../toolkit-lib/lib/api/resource-import/migrator.ts"() {
|
|
295345
295455
|
"use strict";
|
|
295346
|
-
|
|
295456
|
+
import_chalk23 = __toESM(require_source());
|
|
295347
295457
|
fs35 = __toESM(require_lib4());
|
|
295348
295458
|
init_importer();
|
|
295349
295459
|
init_util4();
|
|
@@ -295372,11 +295482,11 @@ var init_migrator = __esm({
|
|
|
295372
295482
|
});
|
|
295373
295483
|
const resourcesToImport = await this.tryGetResources(await migrateDeployment.resolveEnvironment());
|
|
295374
295484
|
if (resourcesToImport) {
|
|
295375
|
-
await this.ioHelper.defaults.info(`${
|
|
295376
|
-
await this.ioHelper.defaults.info(`${
|
|
295485
|
+
await this.ioHelper.defaults.info(`${import_chalk23.default.bold(stack.displayName)}: creating stack for resource migration...`);
|
|
295486
|
+
await this.ioHelper.defaults.info(`${import_chalk23.default.bold(stack.displayName)}: importing resources into stack...`);
|
|
295377
295487
|
await this.performResourceMigration(migrateDeployment, resourcesToImport, options);
|
|
295378
295488
|
fs35.rmSync("migrate.json");
|
|
295379
|
-
await this.ioHelper.defaults.info(`${
|
|
295489
|
+
await this.ioHelper.defaults.info(`${import_chalk23.default.bold(stack.displayName)}: applying CDKMetadata and Outputs to stack (if applicable)...`);
|
|
295380
295490
|
}
|
|
295381
295491
|
}
|
|
295382
295492
|
/**
|
|
@@ -295718,9 +295828,8 @@ function stripConstructPath(resource) {
|
|
|
295718
295828
|
if (resource?.Metadata?.["aws:cdk:path"] == null) {
|
|
295719
295829
|
return resource;
|
|
295720
295830
|
}
|
|
295721
|
-
const
|
|
295722
|
-
|
|
295723
|
-
return copy;
|
|
295831
|
+
const { "aws:cdk:path": _, ...metadata } = resource.Metadata;
|
|
295832
|
+
return { ...resource, Metadata: metadata };
|
|
295724
295833
|
}
|
|
295725
295834
|
var crypto3;
|
|
295726
295835
|
var init_digest = __esm({
|
|
@@ -297043,11 +297152,11 @@ var init_bootstrap3 = __esm({
|
|
|
297043
297152
|
});
|
|
297044
297153
|
|
|
297045
297154
|
// ../toolkit-lib/lib/api/garbage-collection/progress-printer.ts
|
|
297046
|
-
var
|
|
297155
|
+
var import_chalk24;
|
|
297047
297156
|
var init_progress_printer = __esm({
|
|
297048
297157
|
"../toolkit-lib/lib/api/garbage-collection/progress-printer.ts"() {
|
|
297049
297158
|
"use strict";
|
|
297050
|
-
|
|
297159
|
+
import_chalk24 = __toESM(require_source());
|
|
297051
297160
|
init_toolkit_error();
|
|
297052
297161
|
}
|
|
297053
297162
|
});
|
|
@@ -297061,11 +297170,12 @@ var init_stack_refresh = __esm({
|
|
|
297061
297170
|
});
|
|
297062
297171
|
|
|
297063
297172
|
// ../toolkit-lib/lib/api/garbage-collection/garbage-collector.ts
|
|
297064
|
-
var
|
|
297173
|
+
var import_chalk25, pLimit4, DAY;
|
|
297065
297174
|
var init_garbage_collector = __esm({
|
|
297066
297175
|
"../toolkit-lib/lib/api/garbage-collection/garbage-collector.ts"() {
|
|
297067
297176
|
"use strict";
|
|
297068
|
-
|
|
297177
|
+
import_chalk25 = __toESM(require_source());
|
|
297178
|
+
init_util5();
|
|
297069
297179
|
init_toolkit_info();
|
|
297070
297180
|
init_progress_printer();
|
|
297071
297181
|
init_stack_refresh();
|
|
@@ -297129,13 +297239,13 @@ var init_io = __esm({
|
|
|
297129
297239
|
});
|
|
297130
297240
|
|
|
297131
297241
|
// ../toolkit-lib/lib/api/logs-monitor/logs-monitor.ts
|
|
297132
|
-
var import_node_crypto13, util10,
|
|
297242
|
+
var import_node_crypto13, util10, import_chalk26, CloudWatchLogEventMonitor;
|
|
297133
297243
|
var init_logs_monitor2 = __esm({
|
|
297134
297244
|
"../toolkit-lib/lib/api/logs-monitor/logs-monitor.ts"() {
|
|
297135
297245
|
"use strict";
|
|
297136
297246
|
import_node_crypto13 = require("node:crypto");
|
|
297137
297247
|
util10 = __toESM(require("node:util"));
|
|
297138
|
-
|
|
297248
|
+
import_chalk26 = __toESM(require_source());
|
|
297139
297249
|
init_util4();
|
|
297140
297250
|
init_private();
|
|
297141
297251
|
CloudWatchLogEventMonitor = class {
|
|
@@ -297266,8 +297376,8 @@ var init_logs_monitor2 = __esm({
|
|
|
297266
297376
|
await this.ioHelper.notify(IO.CDK_TOOLKIT_I5033.msg(
|
|
297267
297377
|
util10.format(
|
|
297268
297378
|
"[%s] %s %s",
|
|
297269
|
-
|
|
297270
|
-
|
|
297379
|
+
import_chalk26.default.blue(event.logGroupName),
|
|
297380
|
+
import_chalk26.default.yellow(event.timestamp.toLocaleTimeString()),
|
|
297271
297381
|
event.message.trim()
|
|
297272
297382
|
),
|
|
297273
297383
|
event
|
|
@@ -298068,14 +298178,14 @@ var init_tags2 = __esm({
|
|
|
298068
298178
|
});
|
|
298069
298179
|
|
|
298070
298180
|
// ../toolkit-lib/lib/api/drift/drift-formatter.ts
|
|
298071
|
-
var import_node_util7, import_cloudformation_diff4, import_client_cloudformation7,
|
|
298181
|
+
var import_node_util7, import_cloudformation_diff4, import_client_cloudformation7, import_chalk27, DriftFormatter, ADDITION3, CONTEXT2, UPDATE3, REMOVAL3;
|
|
298072
298182
|
var init_drift_formatter = __esm({
|
|
298073
298183
|
"../toolkit-lib/lib/api/drift/drift-formatter.ts"() {
|
|
298074
298184
|
"use strict";
|
|
298075
298185
|
import_node_util7 = require("node:util");
|
|
298076
298186
|
import_cloudformation_diff4 = __toESM(require_lib10());
|
|
298077
298187
|
import_client_cloudformation7 = __toESM(require_dist_cjs28());
|
|
298078
|
-
|
|
298188
|
+
import_chalk27 = __toESM(require_source());
|
|
298079
298189
|
init_logical_id_map();
|
|
298080
298190
|
DriftFormatter = class {
|
|
298081
298191
|
static {
|
|
@@ -298098,30 +298208,43 @@ var init_drift_formatter = __esm({
|
|
|
298098
298208
|
this.allStackResources.set(id, resource.Type);
|
|
298099
298209
|
});
|
|
298100
298210
|
}
|
|
298211
|
+
/**
|
|
298212
|
+
* Resources that were not checked for drift: either CloudFormation returned
|
|
298213
|
+
* no drift record for them at all, or it returned one with an UNKNOWN
|
|
298214
|
+
* status (e.g. due to missing permissions or lack of drift-detection
|
|
298215
|
+
* support for that resource type).
|
|
298216
|
+
*/
|
|
298217
|
+
getUncheckedResources() {
|
|
298218
|
+
const drifts = this.resourceDriftResults;
|
|
298219
|
+
return Array.from(this.allStackResources.keys()).filter((logicalId) => {
|
|
298220
|
+
const drift = drifts.find((d6) => d6.LogicalResourceId === logicalId);
|
|
298221
|
+
return !drift || drift.StackResourceDriftStatus === import_client_cloudformation7.StackResourceDriftStatus.UNKNOWN;
|
|
298222
|
+
});
|
|
298223
|
+
}
|
|
298101
298224
|
/**
|
|
298102
298225
|
* Format the stack drift detection results
|
|
298103
298226
|
*/
|
|
298104
298227
|
formatStackDrift() {
|
|
298105
298228
|
const formatterOutput = this.formatStackDriftChanges(buildLogicalToPathMap(this.stack).toPath);
|
|
298106
298229
|
const actualDrifts = this.resourceDriftResults.filter((d6) => (d6.StackResourceDriftStatus === "MODIFIED" || d6.StackResourceDriftStatus === "DELETED") && d6.ResourceType !== "AWS::CDK::Metadata");
|
|
298107
|
-
const stackHeader = (0, import_node_util7.format)(`Stack ${
|
|
298230
|
+
const stackHeader = (0, import_node_util7.format)(`Stack ${import_chalk27.default.bold(this.stackName)}
|
|
298108
298231
|
`);
|
|
298109
298232
|
if (actualDrifts.length === 0) {
|
|
298110
|
-
const finalResult2 =
|
|
298233
|
+
const finalResult2 = import_chalk27.default.green("No drift detected\n");
|
|
298111
298234
|
return {
|
|
298112
298235
|
numResourcesWithDrift: 0,
|
|
298113
|
-
numResourcesUnchecked: this.
|
|
298236
|
+
numResourcesUnchecked: this.getUncheckedResources().length,
|
|
298114
298237
|
stackHeader,
|
|
298115
298238
|
unchecked: formatterOutput.unchecked,
|
|
298116
298239
|
summary: finalResult2
|
|
298117
298240
|
};
|
|
298118
298241
|
}
|
|
298119
|
-
const finalResult =
|
|
298242
|
+
const finalResult = import_chalk27.default.yellow(`
|
|
298120
298243
|
${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualDrifts.length === 1 ? "has" : "have"} drifted from their expected configuration
|
|
298121
298244
|
`);
|
|
298122
298245
|
return {
|
|
298123
298246
|
numResourcesWithDrift: actualDrifts.length,
|
|
298124
|
-
numResourcesUnchecked: this.
|
|
298247
|
+
numResourcesUnchecked: this.getUncheckedResources().length,
|
|
298125
298248
|
stackHeader,
|
|
298126
298249
|
unchanged: formatterOutput.unchanged,
|
|
298127
298250
|
unchecked: formatterOutput.unchecked,
|
|
@@ -298149,20 +298272,17 @@ ${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualD
|
|
|
298149
298272
|
unchanged = this.printSectionHeader("Resources In Sync");
|
|
298150
298273
|
for (const drift of unchangedResources) {
|
|
298151
298274
|
if (!drift.LogicalResourceId || !drift.ResourceType) continue;
|
|
298152
|
-
unchanged += `${CONTEXT2} ${
|
|
298275
|
+
unchanged += `${CONTEXT2} ${import_chalk27.default.cyan(drift.ResourceType)} ${this.formatLogicalId(logicalToPathMap, drift.LogicalResourceId)}
|
|
298153
298276
|
`;
|
|
298154
298277
|
}
|
|
298155
298278
|
unchanged += this.printSectionFooter();
|
|
298156
298279
|
}
|
|
298157
|
-
const uncheckedResources =
|
|
298158
|
-
const drift = drifts.find((d6) => d6.LogicalResourceId === logicalId);
|
|
298159
|
-
return !drift || drift.StackResourceDriftStatus === import_client_cloudformation7.StackResourceDriftStatus.UNKNOWN;
|
|
298160
|
-
});
|
|
298280
|
+
const uncheckedResources = this.getUncheckedResources();
|
|
298161
298281
|
if (uncheckedResources.length > 0) {
|
|
298162
298282
|
unchecked = this.printSectionHeader("Unchecked Resources");
|
|
298163
298283
|
for (const logicalId of uncheckedResources) {
|
|
298164
298284
|
const resourceType = this.allStackResources.get(logicalId);
|
|
298165
|
-
unchecked += `${CONTEXT2} ${
|
|
298285
|
+
unchecked += `${CONTEXT2} ${import_chalk27.default.cyan(resourceType)} ${this.formatLogicalId(logicalToPathMap, logicalId)}
|
|
298166
298286
|
`;
|
|
298167
298287
|
}
|
|
298168
298288
|
unchecked += this.printSectionFooter();
|
|
@@ -298172,7 +298292,7 @@ ${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualD
|
|
|
298172
298292
|
modified = this.printSectionHeader("Modified Resources");
|
|
298173
298293
|
for (const drift of modifiedResources) {
|
|
298174
298294
|
if (!drift.LogicalResourceId || !drift.ResourceType) continue;
|
|
298175
|
-
modified += `${UPDATE3} ${
|
|
298295
|
+
modified += `${UPDATE3} ${import_chalk27.default.cyan(drift.ResourceType)} ${this.formatLogicalId(logicalToPathMap, drift.LogicalResourceId)}
|
|
298176
298296
|
`;
|
|
298177
298297
|
if (drift.PropertyDifferences) {
|
|
298178
298298
|
const propDiffs = drift.PropertyDifferences;
|
|
@@ -298191,7 +298311,7 @@ ${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualD
|
|
|
298191
298311
|
deleted = this.printSectionHeader("Deleted Resources");
|
|
298192
298312
|
for (const drift of deletedResources) {
|
|
298193
298313
|
if (!drift.LogicalResourceId || !drift.ResourceType) continue;
|
|
298194
|
-
deleted += `${REMOVAL3} ${
|
|
298314
|
+
deleted += `${REMOVAL3} ${import_chalk27.default.cyan(drift.ResourceType)} ${this.formatLogicalId(logicalToPathMap, drift.LogicalResourceId)}
|
|
298195
298315
|
`;
|
|
298196
298316
|
}
|
|
298197
298317
|
deleted += this.printSectionFooter();
|
|
@@ -298216,10 +298336,10 @@ ${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualD
|
|
|
298216
298336
|
}
|
|
298217
298337
|
normalizedPath = parts.join("/");
|
|
298218
298338
|
}
|
|
298219
|
-
return `${normalizedPath} ${
|
|
298339
|
+
return `${normalizedPath} ${import_chalk27.default.gray(logicalId)}`;
|
|
298220
298340
|
}
|
|
298221
298341
|
printSectionHeader(title) {
|
|
298222
|
-
return `${
|
|
298342
|
+
return `${import_chalk27.default.underline(import_chalk27.default.bold(title))}
|
|
298223
298343
|
`;
|
|
298224
298344
|
}
|
|
298225
298345
|
printSectionFooter() {
|
|
@@ -298233,16 +298353,16 @@ ${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualD
|
|
|
298233
298353
|
propertyPath
|
|
298234
298354
|
);
|
|
298235
298355
|
if (difference2.isUpdate) {
|
|
298236
|
-
result2 += (0, import_node_util7.format)(" \u251C\u2500 %s %s\n", REMOVAL3,
|
|
298237
|
-
result2 += (0, import_node_util7.format)(" \u2514\u2500 %s %s\n", ADDITION3,
|
|
298356
|
+
result2 += (0, import_node_util7.format)(" \u251C\u2500 %s %s\n", REMOVAL3, import_chalk27.default.red(difference2.oldValue));
|
|
298357
|
+
result2 += (0, import_node_util7.format)(" \u2514\u2500 %s %s\n", ADDITION3, import_chalk27.default.green(difference2.newValue));
|
|
298238
298358
|
}
|
|
298239
298359
|
return result2;
|
|
298240
298360
|
}
|
|
298241
298361
|
};
|
|
298242
|
-
ADDITION3 =
|
|
298243
|
-
CONTEXT2 =
|
|
298244
|
-
UPDATE3 =
|
|
298245
|
-
REMOVAL3 =
|
|
298362
|
+
ADDITION3 = import_chalk27.default.green("[+]");
|
|
298363
|
+
CONTEXT2 = import_chalk27.default.grey("[ ]");
|
|
298364
|
+
UPDATE3 = import_chalk27.default.yellow("[~]");
|
|
298365
|
+
REMOVAL3 = import_chalk27.default.red("[-]");
|
|
298246
298366
|
}
|
|
298247
298367
|
});
|
|
298248
298368
|
|
|
@@ -298799,7 +298919,7 @@ async function generateStackDefinitions(mappings, deployedStacks, localStacks, e
|
|
|
298799
298919
|
Run the following command in order to setup an S3 bucket in this environment, and then re-refactor:
|
|
298800
298920
|
|
|
298801
298921
|
`,
|
|
298802
|
-
|
|
298922
|
+
import_chalk28.default.blue(` $ cdk bootstrap ${environment.name}
|
|
298803
298923
|
`)
|
|
298804
298924
|
)
|
|
298805
298925
|
);
|
|
@@ -298833,12 +298953,12 @@ Run the following command in order to setup an S3 bucket in this environment, an
|
|
|
298833
298953
|
}
|
|
298834
298954
|
return stackDefinitions;
|
|
298835
298955
|
}
|
|
298836
|
-
var util11,
|
|
298956
|
+
var util11, import_chalk28, deepEqual4, LARGE_TEMPLATE_SIZE_KB2, LARGE_TEMPLATE_SIZE_BYTES;
|
|
298837
298957
|
var init_stack_definitions = __esm({
|
|
298838
298958
|
"../toolkit-lib/lib/api/refactoring/stack-definitions.ts"() {
|
|
298839
298959
|
"use strict";
|
|
298840
298960
|
util11 = __toESM(require("node:util"));
|
|
298841
|
-
|
|
298961
|
+
import_chalk28 = __toESM(require_source());
|
|
298842
298962
|
init_toolkit_error();
|
|
298843
298963
|
init_util4();
|
|
298844
298964
|
init_environment2();
|
|
@@ -298887,7 +299007,7 @@ function formatValidationReports(fileRoot, reports) {
|
|
|
298887
299007
|
});
|
|
298888
299008
|
return [
|
|
298889
299009
|
...pluginFailures.map(formatPluginFailure),
|
|
298890
|
-
...successfullyExecutedPlugins.flatMap((r6) => r6.preamble ? [`${
|
|
299010
|
+
...successfullyExecutedPlugins.flatMap((r6) => r6.preamble ? [`${import_chalk29.default.underline(sanitize(r6.pluginName))}: ${sanitize(r6.preamble)}`] : []),
|
|
298891
299011
|
...violations.map((v) => formatViolationBlock(fileRoot, v))
|
|
298892
299012
|
];
|
|
298893
299013
|
}
|
|
@@ -298922,14 +299042,14 @@ function formatViolationBlock(fileRoot, v) {
|
|
|
298922
299042
|
const lines = [];
|
|
298923
299043
|
const location = sourceLocation(fileRoot, v.construct.stackTraces);
|
|
298924
299044
|
if (location) {
|
|
298925
|
-
lines.push(
|
|
299045
|
+
lines.push(import_chalk29.default.underline(sanitize(location)));
|
|
298926
299046
|
}
|
|
298927
299047
|
const ruleName = v.ruleName.includes("::") ? v.ruleName : `${v.pluginName}::${v.ruleName}`;
|
|
298928
299048
|
const namespace = ruleName.split("::")[0];
|
|
298929
299049
|
lines.push([
|
|
298930
|
-
|
|
298931
|
-
|
|
298932
|
-
|
|
299050
|
+
import_chalk29.default.bold(getSeverityColor(v.severity)(sanitize(v.severity))),
|
|
299051
|
+
import_chalk29.default.bold(stripAckTag(sanitize(v.description))),
|
|
299052
|
+
import_chalk29.default.grey(`(${sanitize(namespace)})`)
|
|
298933
299053
|
].join(" "));
|
|
298934
299054
|
const constructInfo = formatConstructInfo(fileRoot, v.construct);
|
|
298935
299055
|
lines.push(` ${constructInfo}`);
|
|
@@ -298938,26 +299058,26 @@ function formatViolationBlock(fileRoot, v) {
|
|
|
298938
299058
|
}
|
|
298939
299059
|
const ackId = `${sanitize(ruleName)}`.replace(/ /g, "-");
|
|
298940
299060
|
if (isSuppressibleViolation(v)) {
|
|
298941
|
-
lines.push(` ${
|
|
299061
|
+
lines.push(` ${import_chalk29.default.grey(`Acknowledge with '${ackId}'`)}`);
|
|
298942
299062
|
} else {
|
|
298943
|
-
lines.push(` ${
|
|
299063
|
+
lines.push(` ${import_chalk29.default.grey(`Rule ${sanitize(ackId)}`)}`);
|
|
298944
299064
|
}
|
|
298945
299065
|
return lines.join("\n");
|
|
298946
299066
|
}
|
|
298947
299067
|
function getSeverityColor(severity) {
|
|
298948
299068
|
switch (severity.toLowerCase()) {
|
|
298949
299069
|
case "fatal":
|
|
298950
|
-
return
|
|
299070
|
+
return import_chalk29.default.red;
|
|
298951
299071
|
case "error":
|
|
298952
|
-
return
|
|
299072
|
+
return import_chalk29.default.ansi256(208);
|
|
298953
299073
|
case "warning":
|
|
298954
|
-
return
|
|
299074
|
+
return import_chalk29.default.yellow;
|
|
298955
299075
|
default:
|
|
298956
|
-
return
|
|
299076
|
+
return import_chalk29.default.blue;
|
|
298957
299077
|
}
|
|
298958
299078
|
}
|
|
298959
299079
|
function formatPluginFailure(f6) {
|
|
298960
|
-
return `${
|
|
299080
|
+
return `${import_chalk29.default.ansi256(208)("ERROR")} ${sanitize(f6.error)}`;
|
|
298961
299081
|
}
|
|
298962
299082
|
function formatConstructInfo(fileRoot, construct) {
|
|
298963
299083
|
const parts = [];
|
|
@@ -298970,11 +299090,11 @@ function formatConstructInfo(fileRoot, construct) {
|
|
|
298970
299090
|
parts.push(humanFriendlyFilename(fileRoot, sanitize(construct.cloudFormationResource.templatePath)));
|
|
298971
299091
|
}
|
|
298972
299092
|
if (logicalId) {
|
|
298973
|
-
parts.push(
|
|
299093
|
+
parts.push(import_chalk29.default.bold(logicalId));
|
|
298974
299094
|
}
|
|
298975
299095
|
}
|
|
298976
299096
|
if (construct.constructFqn) {
|
|
298977
|
-
parts.push(
|
|
299097
|
+
parts.push(import_chalk29.default.grey(sanitize(construct.constructFqn)));
|
|
298978
299098
|
}
|
|
298979
299099
|
return parts.join(" ");
|
|
298980
299100
|
}
|
|
@@ -299018,12 +299138,12 @@ function isSuppressibleViolation(violation) {
|
|
|
299018
299138
|
const isErrorAnnotation = violation.ruleMetadata?.["cdk:annotation"] && violation.severity?.toLowerCase() === "error";
|
|
299019
299139
|
return !isFatal && !isErrorAnnotation;
|
|
299020
299140
|
}
|
|
299021
|
-
var path35,
|
|
299141
|
+
var path35, import_chalk29, CONTROL_CHARS, SEVERITY_ORDER;
|
|
299022
299142
|
var init_validate_formatting = __esm({
|
|
299023
299143
|
"../toolkit-lib/lib/api/validate/validate-formatting.ts"() {
|
|
299024
299144
|
"use strict";
|
|
299025
299145
|
path35 = __toESM(require("node:path"));
|
|
299026
|
-
|
|
299146
|
+
import_chalk29 = __toESM(require_source());
|
|
299027
299147
|
init_private();
|
|
299028
299148
|
__name(hostMessageFromValidation, "hostMessageFromValidation");
|
|
299029
299149
|
__name(formatValidateResult, "formatValidateResult");
|
|
@@ -299244,7 +299364,7 @@ async function synthAndMeasure(ioHelper, cx, selectStacks) {
|
|
|
299244
299364
|
function zeroTime() {
|
|
299245
299365
|
return { asMs: 0, asSec: 0 };
|
|
299246
299366
|
}
|
|
299247
|
-
var import_dispose_polyfill7, import_node_crypto14, path37, cxapi10, import_cloud_assembly_schema10,
|
|
299367
|
+
var import_dispose_polyfill7, import_node_crypto14, path37, cxapi10, import_cloud_assembly_schema10, import_chalk30, fs39, FILE_EVENTS, Toolkit;
|
|
299248
299368
|
var init_toolkit = __esm({
|
|
299249
299369
|
"../toolkit-lib/lib/toolkit/toolkit.ts"() {
|
|
299250
299370
|
"use strict";
|
|
@@ -299253,7 +299373,7 @@ var init_toolkit = __esm({
|
|
|
299253
299373
|
path37 = __toESM(require("node:path"));
|
|
299254
299374
|
cxapi10 = __toESM(require_lib3());
|
|
299255
299375
|
import_cloud_assembly_schema10 = __toESM(require_lib2());
|
|
299256
|
-
|
|
299376
|
+
import_chalk30 = __toESM(require_source());
|
|
299257
299377
|
init_esm2();
|
|
299258
299378
|
init_handler();
|
|
299259
299379
|
fs39 = __toESM(require_lib4());
|
|
@@ -299391,7 +299511,7 @@ var init_toolkit = __esm({
|
|
|
299391
299511
|
const sdkProvider = await this.sdkProvider("bootstrap");
|
|
299392
299512
|
const limit = pLimit3(20);
|
|
299393
299513
|
await Promise.all(bootstrapEnvironments.map((environment, currentIdx) => limit(async () => {
|
|
299394
|
-
const bootstrapSpan = await ioHelper.span(SPAN.BOOTSTRAP_SINGLE).begin(`${
|
|
299514
|
+
const bootstrapSpan = await ioHelper.span(SPAN.BOOTSTRAP_SINGLE).begin(`${import_chalk30.default.bold(environment.name)}: bootstrapping...`, {
|
|
299395
299515
|
total: bootstrapEnvironments.length,
|
|
299396
299516
|
current: currentIdx + 1,
|
|
299397
299517
|
environment
|
|
@@ -299409,7 +299529,7 @@ var init_toolkit = __esm({
|
|
|
299409
299529
|
}
|
|
299410
299530
|
);
|
|
299411
299531
|
const message2 = bootstrapResult.noOp ? `\u2705 ${environment.name} (no changes)` : `\u2705 ${environment.name}`;
|
|
299412
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I9900.msg(
|
|
299532
|
+
await ioHelper.notify(IO.CDK_TOOLKIT_I9900.msg(import_chalk30.default.green("\n" + message2), { environment }));
|
|
299413
299533
|
if (options.express) {
|
|
299414
299534
|
const warning3 = formatExpressStabilizationWarning(bootstrapResult.stabilizingResources, "bootstrap");
|
|
299415
299535
|
if (warning3) {
|
|
@@ -299425,7 +299545,7 @@ var init_toolkit = __esm({
|
|
|
299425
299545
|
results.push(result2);
|
|
299426
299546
|
} catch (e6) {
|
|
299427
299547
|
await ioHelper.notify(IO.CDK_TOOLKIT_E9900.msg(`
|
|
299428
|
-
\u274C ${
|
|
299548
|
+
\u274C ${import_chalk30.default.bold(environment.name)} failed: ${formatErrorMessage(e6)}`, { error: e6 }));
|
|
299429
299549
|
throw e6;
|
|
299430
299550
|
}
|
|
299431
299551
|
})));
|
|
@@ -299448,7 +299568,7 @@ var init_toolkit = __esm({
|
|
|
299448
299568
|
const stacks = await assembly.value.selectStacksV2(stacksOpt(options));
|
|
299449
299569
|
const autoValidateStacks = options.validateStacks ? [assembly.value.selectStacksForValidation()] : [];
|
|
299450
299570
|
await throwIfValidationFailures(assembly.value, stacks.concat(...autoValidateStacks), this.assemblyFailureAt, ioHelper);
|
|
299451
|
-
const message2 = `Successfully synthesized to ${
|
|
299571
|
+
const message2 = `Successfully synthesized to ${import_chalk30.default.blue(path37.resolve(stacks.assembly.directory))}`;
|
|
299452
299572
|
const assemblyData = {
|
|
299453
299573
|
assemblyDirectory: stacks.assembly.directory,
|
|
299454
299574
|
stacksCount: stacks.stackCount,
|
|
@@ -299469,8 +299589,8 @@ var init_toolkit = __esm({
|
|
|
299469
299589
|
}
|
|
299470
299590
|
}));
|
|
299471
299591
|
} else {
|
|
299472
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I1902.msg(
|
|
299473
|
-
await ioHelper.defaults.info(`Supply a stack id (${stacks.stackArtifacts.map((s2) =>
|
|
299592
|
+
await ioHelper.notify(IO.CDK_TOOLKIT_I1902.msg(import_chalk30.default.green(message2), assemblyData));
|
|
299593
|
+
await ioHelper.defaults.info(`Supply a stack id (${stacks.stackArtifacts.map((s2) => import_chalk30.default.green(s2.hierarchicalId)).join(", ")}) to display its template.`);
|
|
299474
299594
|
}
|
|
299475
299595
|
return new CachedCloudAssembly(assembly.take());
|
|
299476
299596
|
} catch (_) {
|
|
@@ -299642,7 +299762,7 @@ var init_toolkit = __esm({
|
|
|
299642
299762
|
}
|
|
299643
299763
|
const assetNodes = Object.values(workGraph.nodes).filter((n3) => n3.type === "asset-publish");
|
|
299644
299764
|
if (assetNodes.length === 0) {
|
|
299645
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I9400.msg(
|
|
299765
|
+
await ioHelper.notify(IO.CDK_TOOLKIT_I9400.msg(import_chalk30.default.green("\n\u2728 All assets are already published\n")));
|
|
299646
299766
|
return {
|
|
299647
299767
|
publishedAssets: []
|
|
299648
299768
|
};
|
|
@@ -299663,7 +299783,7 @@ var init_toolkit = __esm({
|
|
|
299663
299783
|
publishAsset: this.createPublishAssetFunction(ioHelper, deployments, void 0, options.force),
|
|
299664
299784
|
marker: WorkGraph.NOOP
|
|
299665
299785
|
});
|
|
299666
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I9402.msg(
|
|
299786
|
+
await ioHelper.notify(IO.CDK_TOOLKIT_I9402.msg(import_chalk30.default.green("\n\u2728 Assets published successfully\n"), { assets }));
|
|
299667
299787
|
return {
|
|
299668
299788
|
publishedAssets: assets
|
|
299669
299789
|
};
|
|
@@ -299900,7 +300020,7 @@ var init_toolkit = __esm({
|
|
|
299900
300020
|
const deployStack2 = /* @__PURE__ */ __name(async (stackNode) => {
|
|
299901
300021
|
const stack = stackNode.stack;
|
|
299902
300022
|
if (stackCollection.stackCount !== 1) {
|
|
299903
|
-
await ioHelper.defaults.info(
|
|
300023
|
+
await ioHelper.defaults.info(import_chalk30.default.bold(stack.displayName));
|
|
299904
300024
|
}
|
|
299905
300025
|
if (!stack.environment) {
|
|
299906
300026
|
throw new ToolkitError(
|
|
@@ -299912,9 +300032,9 @@ var init_toolkit = __esm({
|
|
|
299912
300032
|
if (resourceCount === 0) {
|
|
299913
300033
|
const stackExists = await deployments.stackExists({ stack });
|
|
299914
300034
|
if (!stackExists) {
|
|
299915
|
-
return ioHelper.notify(IO.CDK_TOOLKIT_W5021.msg(`${
|
|
300035
|
+
return ioHelper.notify(IO.CDK_TOOLKIT_W5021.msg(`${import_chalk30.default.bold(stack.displayName)}: stack has no resources, skipping deployment.`));
|
|
299916
300036
|
}
|
|
299917
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_W5022.msg(`${
|
|
300037
|
+
await ioHelper.notify(IO.CDK_TOOLKIT_W5022.msg(`${import_chalk30.default.bold(stack.displayName)}: stack has no resources, deleting existing stack.`));
|
|
299918
300038
|
await this._destroy(assembly, "deploy", {
|
|
299919
300039
|
stacks: { patterns: [stack.hierarchicalId], strategy: "pattern-must-match-single" /* PATTERN_MUST_MATCH_SINGLE */ },
|
|
299920
300040
|
roleArn: options.roleArn
|
|
@@ -299981,7 +300101,7 @@ ${deployMotivation}. Do you wish to deploy these changes?`;
|
|
|
299981
300101
|
}
|
|
299982
300102
|
}
|
|
299983
300103
|
const stackIndex = stacks.indexOf(stack) + 1;
|
|
299984
|
-
const deploySpan = await ioHelper.span(SPAN.DEPLOY_STACK).begin(`${
|
|
300104
|
+
const deploySpan = await ioHelper.span(SPAN.DEPLOY_STACK).begin(`${import_chalk30.default.bold(stack.displayName)}: deploying... [${stackIndex}/${stackCollection.stackCount}]`, {
|
|
299985
300105
|
total: stackCollection.stackCount,
|
|
299986
300106
|
current: stackIndex,
|
|
299987
300107
|
stack
|
|
@@ -300046,7 +300166,7 @@ ${deployMotivation}. Do you wish to deploy these changes?`;
|
|
|
300046
300166
|
}
|
|
300047
300167
|
}
|
|
300048
300168
|
const message2 = deployResult.noOp ? `\u2705 ${stack.displayName} (no changes)` : `\u2705 ${stack.displayName}`;
|
|
300049
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I5900.msg(
|
|
300169
|
+
await ioHelper.notify(IO.CDK_TOOLKIT_I5900.msg(import_chalk30.default.green("\n" + message2), deployResult));
|
|
300050
300170
|
deployDuration = await deploySpan.timing(IO.CDK_TOOLKIT_I5000);
|
|
300051
300171
|
if (options.express) {
|
|
300052
300172
|
const warning3 = formatExpressStabilizationWarning(deployResult.stabilizingResources, "deploy");
|
|
@@ -300059,7 +300179,7 @@ ${deployMotivation}. Do you wish to deploy these changes?`;
|
|
|
300059
300179
|
stackOutputs[stack.stackName] = deployResult.outputs;
|
|
300060
300180
|
for (const name of Object.keys(deployResult.outputs).sort()) {
|
|
300061
300181
|
const value = deployResult.outputs[name];
|
|
300062
|
-
buffer.push(`${
|
|
300182
|
+
buffer.push(`${import_chalk30.default.cyan(stack.id)}.${import_chalk30.default.cyan(name)} = ${import_chalk30.default.underline(import_chalk30.default.cyan(value))}`);
|
|
300063
300183
|
}
|
|
300064
300184
|
await ioHelper.notify(IO.CDK_TOOLKIT_I5901.msg(buffer.join("\n")));
|
|
300065
300185
|
}
|
|
@@ -300078,7 +300198,7 @@ ${deployResult.stackArn}`));
|
|
|
300078
300198
|
});
|
|
300079
300199
|
} catch (e6) {
|
|
300080
300200
|
const code = ToolkitError.isToolkitError(e6) ? e6.name : "DeployStackFailed";
|
|
300081
|
-
const newMessage = [`\u274C ${
|
|
300201
|
+
const newMessage = [`\u274C ${import_chalk30.default.bold(stack.stackName)} failed:`, ...e6.name ? [`${e6.name}:`] : [], e6.message].join(" ");
|
|
300082
300202
|
throw new ToolkitError(code, newMessage);
|
|
300083
300203
|
} finally {
|
|
300084
300204
|
if (options.traceLogs) {
|
|
@@ -300373,7 +300493,7 @@ ${deployResult.stackArn}`));
|
|
|
300373
300493
|
}
|
|
300374
300494
|
let anyRollbackable = false;
|
|
300375
300495
|
for (const [index, stack] of stacks.stackArtifacts.entries()) {
|
|
300376
|
-
const rollbackSpan = await ioHelper.span(SPAN.ROLLBACK_STACK).begin(`Rolling back ${
|
|
300496
|
+
const rollbackSpan = await ioHelper.span(SPAN.ROLLBACK_STACK).begin(`Rolling back ${import_chalk30.default.bold(stack.displayName)}`, {
|
|
300377
300497
|
total: stacks.stackCount,
|
|
300378
300498
|
current: index + 1,
|
|
300379
300499
|
stack
|
|
@@ -300403,7 +300523,7 @@ ${deployResult.stackArn}`));
|
|
|
300403
300523
|
});
|
|
300404
300524
|
} catch (e6) {
|
|
300405
300525
|
await ioHelper.notify(IO.CDK_TOOLKIT_E6900.msg(`
|
|
300406
|
-
\u274C ${
|
|
300526
|
+
\u274C ${import_chalk30.default.bold(stack.displayName)} failed: ${formatErrorMessage(e6)}`, { error: e6 }));
|
|
300407
300527
|
throw ToolkitError.withCause("RollbackFailed", "Rollback failed (use --force to orphan failing resources)", e6);
|
|
300408
300528
|
}
|
|
300409
300529
|
}
|
|
@@ -300495,7 +300615,7 @@ Next steps:
|
|
|
300495
300615
|
`;
|
|
300496
300616
|
message2 += "Creation of new stacks is not yet supported by the refactor command. ";
|
|
300497
300617
|
message2 += "Please deploy any new stacks separately before refactoring your stacks.";
|
|
300498
|
-
await ioHelper.defaults.error(
|
|
300618
|
+
await ioHelper.defaults.error(import_chalk30.default.red(message2));
|
|
300499
300619
|
continue;
|
|
300500
300620
|
}
|
|
300501
300621
|
try {
|
|
@@ -300534,7 +300654,7 @@ Next steps:
|
|
|
300534
300654
|
continue;
|
|
300535
300655
|
}
|
|
300536
300656
|
if (process.stdout.isTTY && !await confirm2(options.force ?? false)) {
|
|
300537
|
-
await ioHelper.defaults.info(
|
|
300657
|
+
await ioHelper.defaults.info(import_chalk30.default.red(`Refactoring canceled for environment aws://${environment.account}/${environment.region}
|
|
300538
300658
|
`));
|
|
300539
300659
|
continue;
|
|
300540
300660
|
}
|
|
@@ -300641,7 +300761,7 @@ Next steps:
|
|
|
300641
300761
|
stacks: []
|
|
300642
300762
|
};
|
|
300643
300763
|
const motivation = "Destroying stacks is an irreversible action";
|
|
300644
|
-
const question2 = `Are you sure you want to delete: ${
|
|
300764
|
+
const question2 = `Are you sure you want to delete: ${import_chalk30.default.red(stacks.hierarchicalIds.join(", "))}`;
|
|
300645
300765
|
const confirmed = await ioHelper.requestResponse(IO.CDK_TOOLKIT_I7010.req(question2, { motivation }));
|
|
300646
300766
|
if (!confirmed) {
|
|
300647
300767
|
await ioHelper.notify(IO.CDK_TOOLKIT_E7010.msg("Aborted by user"));
|
|
@@ -300657,7 +300777,7 @@ Next steps:
|
|
|
300657
300777
|
const stack = stackNode.stack;
|
|
300658
300778
|
destroyCount++;
|
|
300659
300779
|
try {
|
|
300660
|
-
const singleDestroySpan = await ioHelper.span(SPAN.DESTROY_STACK).begin(
|
|
300780
|
+
const singleDestroySpan = await ioHelper.span(SPAN.DESTROY_STACK).begin(import_chalk30.default.green(`${import_chalk30.default.blue(stack.displayName)}: destroying... [${destroyCount}/${stacks.stackCount}]`), {
|
|
300661
300781
|
total: stacks.stackCount,
|
|
300662
300782
|
current: destroyCount,
|
|
300663
300783
|
stack
|
|
@@ -300679,8 +300799,8 @@ Next steps:
|
|
|
300679
300799
|
stackArn: result2.stackArn,
|
|
300680
300800
|
stackExisted: result2.stackArn !== void 0
|
|
300681
300801
|
});
|
|
300682
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I7900.msg(
|
|
300683
|
-
\u2705 ${
|
|
300802
|
+
await ioHelper.notify(IO.CDK_TOOLKIT_I7900.msg(import_chalk30.default.green(`
|
|
300803
|
+
\u2705 ${import_chalk30.default.blue(stack.displayName)}: ${action}ed`), stack));
|
|
300684
300804
|
if (options.express) {
|
|
300685
300805
|
const warning3 = formatExpressStabilizationWarning(result2.stabilizingResources, "destroy");
|
|
300686
300806
|
if (warning3) {
|
|
@@ -300690,7 +300810,7 @@ Next steps:
|
|
|
300690
300810
|
await singleDestroySpan.end();
|
|
300691
300811
|
} catch (e6) {
|
|
300692
300812
|
await ioHelper.notify(IO.CDK_TOOLKIT_E7900.msg(`
|
|
300693
|
-
\u274C ${
|
|
300813
|
+
\u274C ${import_chalk30.default.blue(stack.displayName)}: ${action} failed ${e6}`, { error: e6 }));
|
|
300694
300814
|
throw e6;
|
|
300695
300815
|
}
|
|
300696
300816
|
}, "destroyStack");
|
|
@@ -330421,14 +330541,14 @@ var init_proxy_agent = __esm({
|
|
|
330421
330541
|
});
|
|
330422
330542
|
|
|
330423
330543
|
// lib/engines/toolkit-lib.ts
|
|
330424
|
-
var path38, import_cloud_assembly_api16, import_toolkit_lib,
|
|
330544
|
+
var path38, import_cloud_assembly_api16, import_toolkit_lib, import_chalk31, fs41, ToolkitLibRunnerEngine, IntegRunnerIoHost, NoopIoHost;
|
|
330425
330545
|
var init_toolkit_lib = __esm({
|
|
330426
330546
|
"lib/engines/toolkit-lib.ts"() {
|
|
330427
330547
|
"use strict";
|
|
330428
330548
|
path38 = __toESM(require("node:path"));
|
|
330429
330549
|
import_cloud_assembly_api16 = __toESM(require_lib3());
|
|
330430
330550
|
import_toolkit_lib = __toESM(require_lib11());
|
|
330431
|
-
|
|
330551
|
+
import_chalk31 = __toESM(require_source());
|
|
330432
330552
|
fs41 = __toESM(require_lib4());
|
|
330433
330553
|
init_proxy_agent();
|
|
330434
330554
|
ToolkitLibRunnerEngine = class {
|
|
@@ -330692,13 +330812,13 @@ var init_toolkit_lib = __esm({
|
|
|
330692
330812
|
let color;
|
|
330693
330813
|
switch (msg.level) {
|
|
330694
330814
|
case "error":
|
|
330695
|
-
color =
|
|
330815
|
+
color = import_chalk31.default.red;
|
|
330696
330816
|
break;
|
|
330697
330817
|
case "warn":
|
|
330698
|
-
color =
|
|
330818
|
+
color = import_chalk31.default.yellow;
|
|
330699
330819
|
break;
|
|
330700
330820
|
default:
|
|
330701
|
-
color =
|
|
330821
|
+
color = import_chalk31.default.gray;
|
|
330702
330822
|
}
|
|
330703
330823
|
return super.notify({
|
|
330704
330824
|
...msg,
|
|
@@ -331250,7 +331370,7 @@ var init_cdk_test_app = __esm({
|
|
|
331250
331370
|
|
|
331251
331371
|
// lib/workers/common.ts
|
|
331252
331372
|
function formatAssertionResults(results) {
|
|
331253
|
-
return Object.entries(results).map(([id, result2]) => (0,
|
|
331373
|
+
return Object.entries(results).map(([id, result2]) => (0, import_util72.format)("%s%s", id, result2.status === "success" ? ` - ${result2.status}` : `
|
|
331254
331374
|
${result2.message}`)).join("\n ");
|
|
331255
331375
|
}
|
|
331256
331376
|
function formatError(error4) {
|
|
@@ -331258,16 +331378,16 @@ function formatError(error4) {
|
|
|
331258
331378
|
const message2 = error4.message || String(error4);
|
|
331259
331379
|
if (error4.cause) {
|
|
331260
331380
|
return `${name}: ${message2}
|
|
331261
|
-
${
|
|
331381
|
+
${import_chalk32.default.gray("Cause: " + formatError(error4.cause))}`;
|
|
331262
331382
|
}
|
|
331263
331383
|
return `${name}: ${message2}`;
|
|
331264
331384
|
}
|
|
331265
|
-
var
|
|
331385
|
+
var import_util72, import_chalk32;
|
|
331266
331386
|
var init_common4 = __esm({
|
|
331267
331387
|
"lib/workers/common.ts"() {
|
|
331268
331388
|
"use strict";
|
|
331269
|
-
|
|
331270
|
-
|
|
331389
|
+
import_util72 = require("util");
|
|
331390
|
+
import_chalk32 = __toESM(require_source());
|
|
331271
331391
|
init_logger();
|
|
331272
331392
|
__name(formatAssertionResults, "formatAssertionResults");
|
|
331273
331393
|
__name(formatError, "formatError");
|