@aws-cdk/integ-runner 2.204.3 → 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 +514 -379
- 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
|
*
|
|
@@ -274641,28 +274714,30 @@ async function createChangeSetAndCleanup(ioHelper, options) {
|
|
|
274641
274714
|
Capabilities: ["CAPABILITY_IAM", "CAPABILITY_NAMED_IAM", "CAPABILITY_AUTO_EXPAND"]
|
|
274642
274715
|
});
|
|
274643
274716
|
await ioHelper.defaults.debug((0, import_node_util3.format)("Initiated creation of changeset: %s; waiting for it to finish creating...", changeSet.Id));
|
|
274644
|
-
const
|
|
274645
|
-
|
|
274646
|
-
|
|
274647
|
-
|
|
274648
|
-
|
|
274649
|
-
|
|
274650
|
-
|
|
274651
|
-
|
|
274652
|
-
|
|
274653
|
-
|
|
274654
|
-
ioHelper,
|
|
274655
|
-
changeSet.Id ?? options.changeSetName,
|
|
274656
|
-
changeSet.StackId ?? options.stack.stackName
|
|
274657
|
-
);
|
|
274658
|
-
if (!options.exists) {
|
|
274659
|
-
await ioHelper.defaults.debug((0, import_node_util3.format)("Deleting empty stack created by diff changeset: %s", changeSet.StackId ?? options.stack.stackName));
|
|
274660
|
-
await options.cfn.deleteStack({
|
|
274661
|
-
StackName: changeSet.StackId ?? options.stack.stackName,
|
|
274662
|
-
ClientRequestToken: (0, import_node_crypto9.randomUUID)()
|
|
274717
|
+
const changeSetId = changeSet.Id ?? options.changeSetName;
|
|
274718
|
+
const stackId = changeSet.StackId ?? options.stack.stackName;
|
|
274719
|
+
try {
|
|
274720
|
+
return await new ChangeSetDescriber({
|
|
274721
|
+
cfn: options.cfn,
|
|
274722
|
+
ioHelper,
|
|
274723
|
+
stackNameOrArn: stackId,
|
|
274724
|
+
changeSetNameOrArn: changeSetId
|
|
274725
|
+
}).waitAndThrowOnProblem({
|
|
274726
|
+
diagnoser: options.diagnoser
|
|
274663
274727
|
});
|
|
274728
|
+
} catch (e6) {
|
|
274729
|
+
await ioHelper.defaults.warn((0, import_node_util3.format)("Change set %s failed: %s", changeSetId, e6));
|
|
274730
|
+
throw e6;
|
|
274731
|
+
} finally {
|
|
274732
|
+
await cleanupOldChangeset(options.cfn, ioHelper, changeSetId, stackId);
|
|
274733
|
+
if (!options.exists) {
|
|
274734
|
+
await ioHelper.defaults.debug((0, import_node_util3.format)("Deleting empty stack created by diff changeset: %s", stackId));
|
|
274735
|
+
await options.cfn.deleteStack({
|
|
274736
|
+
StackName: stackId,
|
|
274737
|
+
ClientRequestToken: (0, import_node_crypto9.randomUUID)()
|
|
274738
|
+
});
|
|
274739
|
+
}
|
|
274664
274740
|
}
|
|
274665
|
-
return createdChangeSet;
|
|
274666
274741
|
}
|
|
274667
274742
|
async function createValidationChangeSet(ioHelper, options) {
|
|
274668
274743
|
const { cfn, bodyParameter, exists, stackExistedBefore, executionRoleArn, diagnoser } = await prepareChangeSetEnv(ioHelper, options);
|
|
@@ -274717,7 +274792,7 @@ async function cleanupOldChangeset(cfn, ioHelper, changeSetNameOrArn, stackNameO
|
|
|
274717
274792
|
}
|
|
274718
274793
|
async function waitForStackDelete(cfn, ioHelper, stackNameOrArn, stabilizationPollingInterval) {
|
|
274719
274794
|
const stackDisplayName = stackNameFromArn(stackNameOrArn);
|
|
274720
|
-
const stack = await stabilizeStack(cfn, ioHelper, stackNameOrArn, stabilizationPollingInterval);
|
|
274795
|
+
const stack = await stabilizeStack(cfn, ioHelper, stackNameOrArn, { pollingInterval: stabilizationPollingInterval });
|
|
274721
274796
|
if (!stack) {
|
|
274722
274797
|
return void 0;
|
|
274723
274798
|
}
|
|
@@ -274732,42 +274807,65 @@ async function waitForStackDelete(cfn, ioHelper, stackNameOrArn, stabilizationPo
|
|
|
274732
274807
|
}
|
|
274733
274808
|
return stack;
|
|
274734
274809
|
}
|
|
274735
|
-
async function waitForStackDeploy(cfn, ioHelper,
|
|
274736
|
-
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
|
+
});
|
|
274737
274815
|
if (!stack) {
|
|
274738
274816
|
return void 0;
|
|
274739
274817
|
}
|
|
274818
|
+
const stackDisplayName = stackNameFromArn(stackNameOrArn);
|
|
274740
274819
|
const status = stack.stackStatus;
|
|
274741
274820
|
if (status.isCreationFailure) {
|
|
274742
274821
|
throw new DeploymentError(
|
|
274743
|
-
`The stack named ${
|
|
274822
|
+
`The stack named ${stackDisplayName} failed creation, it may need to be manually deleted from the AWS console: ${status}`,
|
|
274744
274823
|
"StackCreationFailed"
|
|
274745
274824
|
);
|
|
274746
274825
|
} else if (!status.isDeploySuccess) {
|
|
274747
|
-
throw new DeploymentError(`The stack named ${
|
|
274826
|
+
throw new DeploymentError(`The stack named ${stackDisplayName} failed to deploy: ${status}`, "StackDeployFailed");
|
|
274748
274827
|
}
|
|
274749
274828
|
return stack;
|
|
274750
274829
|
}
|
|
274751
|
-
async function stabilizeStack(cfn, ioHelper, stackNameOrArn,
|
|
274830
|
+
async function stabilizeStack(cfn, ioHelper, stackNameOrArn, options = {}) {
|
|
274831
|
+
const { pollingInterval, changeSetExecuted = false } = options;
|
|
274752
274832
|
const stackDisplayName = stackNameFromArn(stackNameOrArn);
|
|
274753
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;
|
|
274754
274837
|
return waitFor(async () => {
|
|
274755
|
-
const stack = await CloudFormationStack.lookup(cfn,
|
|
274838
|
+
const stack = await CloudFormationStack.lookup(cfn, target);
|
|
274756
274839
|
if (!stack.exists) {
|
|
274757
274840
|
await ioHelper.defaults.debug((0, import_node_util3.format)("Stack %s does not exist", stackDisplayName));
|
|
274758
274841
|
return null;
|
|
274759
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;
|
|
274760
274848
|
const status = stack.stackStatus;
|
|
274761
274849
|
if (status.isInProgress) {
|
|
274850
|
+
sawOperationInProgress = true;
|
|
274762
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));
|
|
274763
274852
|
return void 0;
|
|
274764
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
|
+
}
|
|
274765
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));
|
|
274766
274864
|
}
|
|
274767
274865
|
return stack;
|
|
274768
274866
|
}, pollingInterval);
|
|
274769
274867
|
}
|
|
274770
|
-
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;
|
|
274771
274869
|
var init_cfn_api = __esm({
|
|
274772
274870
|
"../toolkit-lib/lib/api/deployments/cfn-api.ts"() {
|
|
274773
274871
|
"use strict";
|
|
@@ -274784,6 +274882,7 @@ var init_cfn_api = __esm({
|
|
|
274784
274882
|
init_cloudformation2();
|
|
274785
274883
|
init_stack_diagnoser();
|
|
274786
274884
|
init_stack_source_tracing();
|
|
274885
|
+
STALE_REVIEW_READ_ATTEMPTS = 3;
|
|
274787
274886
|
__name(createDiffChangeSet, "createDiffChangeSet");
|
|
274788
274887
|
__name(templatesFromAssetManifestArtifact, "templatesFromAssetManifestArtifact");
|
|
274789
274888
|
__name(prepareChangeSetEnv, "prepareChangeSetEnv");
|
|
@@ -274890,12 +274989,12 @@ var init_cfn_api = __esm({
|
|
|
274890
274989
|
});
|
|
274891
274990
|
|
|
274892
274991
|
// ../toolkit-lib/lib/api/toolkit-info.ts
|
|
274893
|
-
var import_util33,
|
|
274992
|
+
var import_util33, import_chalk9, DEFAULT_TOOLKIT_STACK_NAME, ToolkitInfo, ExistingToolkitInfo, BootstrapStackNotFoundInfo;
|
|
274894
274993
|
var init_toolkit_info = __esm({
|
|
274895
274994
|
"../toolkit-lib/lib/api/toolkit-info.ts"() {
|
|
274896
274995
|
"use strict";
|
|
274897
274996
|
import_util33 = require("util");
|
|
274898
|
-
|
|
274997
|
+
import_chalk9 = __toESM(require_source());
|
|
274899
274998
|
init_bootstrap_props();
|
|
274900
274999
|
init_toolkit_error();
|
|
274901
275000
|
init_cfn_api();
|
|
@@ -274918,7 +275017,7 @@ var init_toolkit_info = __esm({
|
|
|
274918
275017
|
"The environment %s doesn't have the CDK toolkit stack (%s) installed. Use %s to setup your environment for use with the toolkit.",
|
|
274919
275018
|
environment.name,
|
|
274920
275019
|
stackName,
|
|
274921
|
-
|
|
275020
|
+
import_chalk9.default.blue(`cdk bootstrap "${environment.name}"`)
|
|
274922
275021
|
)
|
|
274923
275022
|
);
|
|
274924
275023
|
return _ToolkitInfo.bootstrapStackNotFoundInfo(stackName);
|
|
@@ -274929,7 +275028,7 @@ var init_toolkit_info = __esm({
|
|
|
274929
275028
|
"The environment %s has a CDK toolkit stack (%s) that failed to create. Use %s to try provisioning it again.",
|
|
274930
275029
|
environment.name,
|
|
274931
275030
|
stackName,
|
|
274932
|
-
|
|
275031
|
+
import_chalk9.default.blue(`cdk bootstrap "${environment.name}"`)
|
|
274933
275032
|
)
|
|
274934
275033
|
);
|
|
274935
275034
|
return _ToolkitInfo.bootstrapStackNotFoundInfo(stackName);
|
|
@@ -279965,7 +280064,7 @@ async function includeDownstreamStacks(ioHelper, selectedStacks, allStacks) {
|
|
|
279965
280064
|
do {
|
|
279966
280065
|
madeProgress = false;
|
|
279967
280066
|
for (const [id, stack] of allStacks) {
|
|
279968
|
-
if (!selectedStacks.has(id) && (stack.dependencies || []).some((dep) => selectedStacks.has(dep.
|
|
280067
|
+
if (!selectedStacks.has(id) && (stack.dependencies || []).some((dep) => selectedStacks.has(dep.hierarchicalId))) {
|
|
279969
280068
|
selectedStacks.set(id, stack);
|
|
279970
280069
|
added.push(id);
|
|
279971
280070
|
madeProgress = true;
|
|
@@ -279973,7 +280072,7 @@ async function includeDownstreamStacks(ioHelper, selectedStacks, allStacks) {
|
|
|
279973
280072
|
}
|
|
279974
280073
|
} while (madeProgress);
|
|
279975
280074
|
if (added.length > 0) {
|
|
279976
|
-
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(", "))}`));
|
|
279977
280076
|
}
|
|
279978
280077
|
}
|
|
279979
280078
|
async function includeUpstreamStacks(ioHelper, selectedStacks, allStacks) {
|
|
@@ -279992,14 +280091,14 @@ async function includeUpstreamStacks(ioHelper, selectedStacks, allStacks) {
|
|
|
279992
280091
|
}
|
|
279993
280092
|
}
|
|
279994
280093
|
if (added.length > 0) {
|
|
279995
|
-
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(", "))}`));
|
|
279996
280095
|
}
|
|
279997
280096
|
}
|
|
279998
|
-
var
|
|
280097
|
+
var import_chalk10, import_picomatch, BaseStackAssembly;
|
|
279999
280098
|
var init_stack_assembly = __esm({
|
|
280000
280099
|
"../toolkit-lib/lib/api/cloud-assembly/stack-assembly.ts"() {
|
|
280001
280100
|
"use strict";
|
|
280002
|
-
|
|
280101
|
+
import_chalk10 = __toESM(require_source());
|
|
280003
280102
|
import_picomatch = __toESM(require_picomatch4());
|
|
280004
280103
|
init_stack_collection();
|
|
280005
280104
|
init_util4();
|
|
@@ -281699,13 +281798,13 @@ function dependsOnEqual(lvalue, rvalue) {
|
|
|
281699
281798
|
if (lvalue.length !== rvalue.length) {
|
|
281700
281799
|
return false;
|
|
281701
281800
|
}
|
|
281702
|
-
|
|
281703
|
-
|
|
281704
|
-
|
|
281705
|
-
|
|
281706
|
-
|
|
281707
|
-
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;
|
|
281708
281806
|
}
|
|
281807
|
+
unmatched.splice(at, 1);
|
|
281709
281808
|
}
|
|
281710
281809
|
return true;
|
|
281711
281810
|
}
|
|
@@ -282365,12 +282464,12 @@ function defaultResource(resource, statements) {
|
|
|
282365
282464
|
statements.forEach((s2) => s2.resources.replaceStar(resource));
|
|
282366
282465
|
return statements;
|
|
282367
282466
|
}
|
|
282368
|
-
var import_service_spec_types,
|
|
282467
|
+
var import_service_spec_types, import_chalk11, IamChanges;
|
|
282369
282468
|
var init_iam_changes = __esm({
|
|
282370
282469
|
"../cloudformation-diff/lib/iam/iam-changes.ts"() {
|
|
282371
282470
|
"use strict";
|
|
282372
282471
|
import_service_spec_types = __toESM(require_lib9());
|
|
282373
|
-
|
|
282472
|
+
import_chalk11 = __toESM(require_source());
|
|
282374
282473
|
init_iam_identity_center();
|
|
282375
282474
|
init_managed_policy();
|
|
282376
282475
|
init_statement();
|
|
@@ -282440,7 +282539,7 @@ var init_iam_changes = __esm({
|
|
|
282440
282539
|
renderedStatement.action,
|
|
282441
282540
|
renderedStatement.principal,
|
|
282442
282541
|
renderedStatement.condition
|
|
282443
|
-
].map((s2) =>
|
|
282542
|
+
].map((s2) => import_chalk11.default.green(s2)));
|
|
282444
282543
|
}
|
|
282445
282544
|
for (const statement of this.statements.removals) {
|
|
282446
282545
|
const renderedStatement = statement.render();
|
|
@@ -282451,7 +282550,7 @@ var init_iam_changes = __esm({
|
|
|
282451
282550
|
renderedStatement.action,
|
|
282452
282551
|
renderedStatement.principal,
|
|
282453
282552
|
renderedStatement.condition
|
|
282454
|
-
].map((s2) =>
|
|
282553
|
+
].map((s2) => import_chalk11.default.red(s2)));
|
|
282455
282554
|
}
|
|
282456
282555
|
ret.sort(makeComparator((row) => [row[1]]));
|
|
282457
282556
|
ret.splice(0, 0, header);
|
|
@@ -282465,14 +282564,14 @@ var init_iam_changes = __esm({
|
|
|
282465
282564
|
"+",
|
|
282466
282565
|
att.identityArn,
|
|
282467
282566
|
att.managedPolicyArn
|
|
282468
|
-
].map((s2) =>
|
|
282567
|
+
].map((s2) => import_chalk11.default.green(s2)));
|
|
282469
282568
|
}
|
|
282470
282569
|
for (const att of this.managedPolicies.removals) {
|
|
282471
282570
|
ret.push([
|
|
282472
282571
|
"-",
|
|
282473
282572
|
att.identityArn,
|
|
282474
282573
|
att.managedPolicyArn
|
|
282475
|
-
].map((s2) =>
|
|
282574
|
+
].map((s2) => import_chalk11.default.red(s2)));
|
|
282476
282575
|
}
|
|
282477
282576
|
ret.sort(makeComparator((row) => [row[1]]));
|
|
282478
282577
|
ret.splice(0, 0, header);
|
|
@@ -282491,7 +282590,7 @@ var init_iam_changes = __esm({
|
|
|
282491
282590
|
att.principalType || "",
|
|
282492
282591
|
att.targetId || "",
|
|
282493
282592
|
att.targetType || ""
|
|
282494
|
-
].map((s2) =>
|
|
282593
|
+
].map((s2) => import_chalk11.default.green(s2)));
|
|
282495
282594
|
}
|
|
282496
282595
|
for (const att of this.ssoAssignments.removals) {
|
|
282497
282596
|
ret.push([
|
|
@@ -282503,7 +282602,7 @@ var init_iam_changes = __esm({
|
|
|
282503
282602
|
att.principalType || "",
|
|
282504
282603
|
att.targetId || "",
|
|
282505
282604
|
att.targetType || ""
|
|
282506
|
-
].map((s2) =>
|
|
282605
|
+
].map((s2) => import_chalk11.default.red(s2)));
|
|
282507
282606
|
}
|
|
282508
282607
|
ret.sort(makeComparator((row) => [row[1]]));
|
|
282509
282608
|
ret.splice(0, 0, header);
|
|
@@ -282522,7 +282621,7 @@ var init_iam_changes = __esm({
|
|
|
282522
282621
|
att.cfnLogicalId || "",
|
|
282523
282622
|
att.ssoInstanceArn || "",
|
|
282524
282623
|
att.accessControlAttributes?.map(formatAccessControlAttribute).join("\n") || ""
|
|
282525
|
-
].map((s2) =>
|
|
282624
|
+
].map((s2) => import_chalk11.default.green(s2)));
|
|
282526
282625
|
}
|
|
282527
282626
|
for (const att of this.ssoInstanceACAConfigs.removals) {
|
|
282528
282627
|
ret.push([
|
|
@@ -282530,7 +282629,7 @@ var init_iam_changes = __esm({
|
|
|
282530
282629
|
att.cfnLogicalId || "",
|
|
282531
282630
|
att.ssoInstanceArn || "",
|
|
282532
282631
|
att.accessControlAttributes?.map(formatAccessControlAttribute).join("\n") || ""
|
|
282533
|
-
].map((s2) =>
|
|
282632
|
+
].map((s2) => import_chalk11.default.red(s2)));
|
|
282534
282633
|
}
|
|
282535
282634
|
ret.sort(makeComparator((row) => [row[1]]));
|
|
282536
282635
|
ret.splice(0, 0, header);
|
|
@@ -282563,7 +282662,7 @@ var init_iam_changes = __esm({
|
|
|
282563
282662
|
att.name || "",
|
|
282564
282663
|
formatSsoPermissionsBoundary(att.ssoPermissionsBoundary),
|
|
282565
282664
|
att.ssoCustomerManagedPolicyReferences?.map(formatManagedPolicyRef).join("\n") || ""
|
|
282566
|
-
].map((s2) =>
|
|
282665
|
+
].map((s2) => import_chalk11.default.green(s2)));
|
|
282567
282666
|
}
|
|
282568
282667
|
for (const att of this.ssoPermissionSets.removals) {
|
|
282569
282668
|
ret.push([
|
|
@@ -282573,7 +282672,7 @@ var init_iam_changes = __esm({
|
|
|
282573
282672
|
att.name || "",
|
|
282574
282673
|
formatSsoPermissionsBoundary(att.ssoPermissionsBoundary),
|
|
282575
282674
|
att.ssoCustomerManagedPolicyReferences?.map(formatManagedPolicyRef).join("\n") || ""
|
|
282576
|
-
].map((s2) =>
|
|
282675
|
+
].map((s2) => import_chalk11.default.red(s2)));
|
|
282577
282676
|
}
|
|
282578
282677
|
ret.sort(makeComparator((row) => [row[1]]));
|
|
282579
282678
|
ret.splice(0, 0, header);
|
|
@@ -282893,11 +282992,11 @@ var init_security_group_rule = __esm({
|
|
|
282893
282992
|
});
|
|
282894
282993
|
|
|
282895
282994
|
// ../cloudformation-diff/lib/network/security-group-changes.ts
|
|
282896
|
-
var
|
|
282995
|
+
var import_chalk12, SecurityGroupChanges;
|
|
282897
282996
|
var init_security_group_changes = __esm({
|
|
282898
282997
|
"../cloudformation-diff/lib/network/security-group-changes.ts"() {
|
|
282899
282998
|
"use strict";
|
|
282900
|
-
|
|
282999
|
+
import_chalk12 = __toESM(require_source());
|
|
282901
283000
|
init_security_group_rule();
|
|
282902
283001
|
init_diffable();
|
|
282903
283002
|
init_render_intrinsics();
|
|
@@ -282945,7 +283044,7 @@ var init_security_group_changes = __esm({
|
|
|
282945
283044
|
inOut,
|
|
282946
283045
|
rule.describeProtocol(),
|
|
282947
283046
|
rule.describePeer()
|
|
282948
|
-
].map((s2) => plusMin === "+" ?
|
|
283047
|
+
].map((s2) => plusMin === "+" ? import_chalk12.default.green(s2) : import_chalk12.default.red(s2)), "renderRule");
|
|
282949
283048
|
ret.push(...this.ingress.additions.map(renderRule("+", inWord)));
|
|
282950
283049
|
ret.push(...this.egress.additions.map(renderRule("+", outWord)));
|
|
282951
283050
|
ret.push(...this.ingress.removals.map(renderRule("-", inWord)));
|
|
@@ -284220,15 +284319,15 @@ __export(format_foreach_exports, {
|
|
|
284220
284319
|
function isForEachKey(logicalId) {
|
|
284221
284320
|
return logicalId.startsWith("Fn::ForEach::");
|
|
284222
284321
|
}
|
|
284223
|
-
var
|
|
284322
|
+
var import_chalk13, ADDITION, UPDATE, REMOVAL, ForEachDiffFormatter;
|
|
284224
284323
|
var init_format_foreach = __esm({
|
|
284225
284324
|
"../cloudformation-diff/lib/format-foreach.ts"() {
|
|
284226
284325
|
"use strict";
|
|
284227
|
-
|
|
284326
|
+
import_chalk13 = __toESM(require_source());
|
|
284228
284327
|
init_util6();
|
|
284229
|
-
ADDITION =
|
|
284230
|
-
UPDATE =
|
|
284231
|
-
REMOVAL =
|
|
284328
|
+
ADDITION = import_chalk13.default.green("[+]");
|
|
284329
|
+
UPDATE = import_chalk13.default.yellow("[~]");
|
|
284330
|
+
REMOVAL = import_chalk13.default.red("[-]");
|
|
284232
284331
|
ForEachDiffFormatter = class {
|
|
284233
284332
|
static {
|
|
284234
284333
|
__name(this, "ForEachDiffFormatter");
|
|
@@ -284241,24 +284340,24 @@ var init_format_foreach = __esm({
|
|
|
284241
284340
|
const changeType = this.getChangeType(oldValue, newValue);
|
|
284242
284341
|
const value = newValue ?? oldValue;
|
|
284243
284342
|
if (!Array.isArray(value) || value.length < 2) {
|
|
284244
|
-
lines.push(`${this.changeSymbol(changeType)} ${
|
|
284343
|
+
lines.push(`${this.changeSymbol(changeType)} ${import_chalk13.default.cyan(key)} (unrecognized ForEach structure)`);
|
|
284245
284344
|
return lines;
|
|
284246
284345
|
}
|
|
284247
284346
|
const loopName = key.replace("Fn::ForEach::", "");
|
|
284248
284347
|
const [collection, templateObj] = value;
|
|
284249
284348
|
const entries = Object.entries(templateObj);
|
|
284250
284349
|
if (entries.length === 0) {
|
|
284251
|
-
lines.push(`${this.changeSymbol(changeType)} ${
|
|
284350
|
+
lines.push(`${this.changeSymbol(changeType)} ${import_chalk13.default.cyan(key)} (empty ForEach template)`);
|
|
284252
284351
|
return lines;
|
|
284253
284352
|
}
|
|
284254
284353
|
const [[templateKey, templateValue]] = entries;
|
|
284255
284354
|
const count = Array.isArray(collection) ? `${collection.length} resources` : "dynamic count";
|
|
284256
284355
|
lines.push(
|
|
284257
|
-
`${this.changeSymbol(changeType)} ${
|
|
284356
|
+
`${this.changeSymbol(changeType)} ${import_chalk13.default.cyan(key)} (expands to ${count} at deploy time)`
|
|
284258
284357
|
);
|
|
284259
|
-
lines.push(` Loop variable: ${
|
|
284358
|
+
lines.push(` Loop variable: ${import_chalk13.default.blue(loopName)}`);
|
|
284260
284359
|
lines.push(` Collection: ${this.formatCollection(collection)}`);
|
|
284261
|
-
lines.push(` \u2514\u2500\u2500 ${templateKey} ${
|
|
284360
|
+
lines.push(` \u2514\u2500\u2500 ${templateKey} ${import_chalk13.default.cyan(templateValue?.Type ?? "Unknown")}`);
|
|
284262
284361
|
if (changeType === "update" && oldValue && newValue) {
|
|
284263
284362
|
const oldProps = oldValue[1]?.[Object.keys(oldValue[1])[0]]?.Properties ?? {};
|
|
284264
284363
|
const newProps = newValue[1]?.[Object.keys(newValue[1])[0]]?.Properties ?? {};
|
|
@@ -288860,11 +288959,11 @@ function sum(xs) {
|
|
|
288860
288959
|
}
|
|
288861
288960
|
return total;
|
|
288862
288961
|
}
|
|
288863
|
-
var
|
|
288962
|
+
var import_chalk14, import_string_width, table, tableColor, TABLE_BORDER_CHARACTERS;
|
|
288864
288963
|
var init_format_table = __esm({
|
|
288865
288964
|
"../cloudformation-diff/lib/format-table.ts"() {
|
|
288866
288965
|
"use strict";
|
|
288867
|
-
|
|
288966
|
+
import_chalk14 = __toESM(require_source());
|
|
288868
288967
|
import_string_width = __toESM(require_string_width());
|
|
288869
288968
|
table = __toESM(require_src2());
|
|
288870
288969
|
__name(formatTable, "formatTable");
|
|
@@ -288872,7 +288971,7 @@ var init_format_table = __esm({
|
|
|
288872
288971
|
__name(buildColumnConfig, "buildColumnConfig");
|
|
288873
288972
|
__name(calculateColumnWidths, "calculateColumnWidths");
|
|
288874
288973
|
__name(sum, "sum");
|
|
288875
|
-
tableColor =
|
|
288974
|
+
tableColor = import_chalk14.default.gray;
|
|
288876
288975
|
TABLE_BORDER_CHARACTERS = {
|
|
288877
288976
|
topBody: tableColor("\u2500"),
|
|
288878
288977
|
topJoin: tableColor("\u252C"),
|
|
@@ -290959,7 +291058,7 @@ function _diffStrings(oldStr, newStr, context) {
|
|
|
290959
291058
|
const patch = structuredPatch(null, null, oldStr, newStr, null, null, { context });
|
|
290960
291059
|
const result2 = new Array();
|
|
290961
291060
|
for (const hunk of patch.hunks) {
|
|
290962
|
-
result2.push(
|
|
291061
|
+
result2.push(import_chalk15.default.magenta(`@@ -${hunk.oldStart},${hunk.oldLines} +${hunk.newStart},${hunk.newLines} @@`));
|
|
290963
291062
|
const baseIndent = _findIndent(hunk.lines);
|
|
290964
291063
|
for (const line of hunk.lines) {
|
|
290965
291064
|
if (line === "\") {
|
|
@@ -290972,10 +291071,10 @@ function _diffStrings(oldStr, newStr, context) {
|
|
|
290972
291071
|
result2.push(`${CONTEXT} ${text}`);
|
|
290973
291072
|
break;
|
|
290974
291073
|
case "+":
|
|
290975
|
-
result2.push(
|
|
291074
|
+
result2.push(import_chalk15.default.bold(`${ADDITION2} ${import_chalk15.default.green(text)}`));
|
|
290976
291075
|
break;
|
|
290977
291076
|
case "-":
|
|
290978
|
-
result2.push(
|
|
291077
|
+
result2.push(import_chalk15.default.bold(`${REMOVAL2} ${import_chalk15.default.red(text)}`));
|
|
290979
291078
|
break;
|
|
290980
291079
|
default:
|
|
290981
291080
|
throw new Error(`Unexpected diff marker: ${marker} (full line: ${line})`);
|
|
@@ -290997,12 +291096,12 @@ function _diffStrings(oldStr, newStr, context) {
|
|
|
290997
291096
|
}
|
|
290998
291097
|
__name(_findIndent, "_findIndent");
|
|
290999
291098
|
}
|
|
291000
|
-
var import_util50,
|
|
291099
|
+
var import_util50, import_chalk15, PATH_METADATA_KEY3, structuredPatch, ADDITION2, CONTEXT, UPDATE2, REMOVAL2, IMPORT, Formatter;
|
|
291001
291100
|
var init_format = __esm({
|
|
291002
291101
|
"../cloudformation-diff/lib/format.ts"() {
|
|
291003
291102
|
"use strict";
|
|
291004
291103
|
import_util50 = require("util");
|
|
291005
|
-
|
|
291104
|
+
import_chalk15 = __toESM(require_source());
|
|
291006
291105
|
init_util6();
|
|
291007
291106
|
init_diff_template();
|
|
291008
291107
|
init_format_foreach();
|
|
@@ -291012,11 +291111,11 @@ var init_format = __esm({
|
|
|
291012
291111
|
__name(formatDifferences, "formatDifferences");
|
|
291013
291112
|
__name(formatSecurityChanges, "formatSecurityChanges");
|
|
291014
291113
|
__name(formatSecurityChangesWithBanner, "formatSecurityChangesWithBanner");
|
|
291015
|
-
ADDITION2 =
|
|
291016
|
-
CONTEXT =
|
|
291017
|
-
UPDATE2 =
|
|
291018
|
-
REMOVAL2 =
|
|
291019
|
-
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]");
|
|
291020
291119
|
Formatter = class {
|
|
291021
291120
|
constructor(stream, logicalToPathMap, diff, context = 3) {
|
|
291022
291121
|
this.stream = stream;
|
|
@@ -291033,10 +291132,10 @@ var init_format = __esm({
|
|
|
291033
291132
|
__name(this, "Formatter");
|
|
291034
291133
|
}
|
|
291035
291134
|
print(fmt, ...args) {
|
|
291036
|
-
this.stream.write(
|
|
291135
|
+
this.stream.write(import_chalk15.default.reset((0, import_util50.format)(fmt, ...args)) + "\n");
|
|
291037
291136
|
}
|
|
291038
291137
|
warning(fmt, ...args) {
|
|
291039
|
-
this.stream.write(
|
|
291138
|
+
this.stream.write(import_chalk15.default.yellow((0, import_util50.format)(fmt, ...args)) + "\n");
|
|
291040
291139
|
}
|
|
291041
291140
|
formatSection(title, entryType, collection, formatter = this.formatDifference.bind(this)) {
|
|
291042
291141
|
if (collection.differenceCount === 0) {
|
|
@@ -291047,7 +291146,7 @@ var init_format = __esm({
|
|
|
291047
291146
|
this.printSectionFooter();
|
|
291048
291147
|
}
|
|
291049
291148
|
printSectionHeader(title) {
|
|
291050
|
-
this.print(
|
|
291149
|
+
this.print(import_chalk15.default.underline(import_chalk15.default.bold(title)));
|
|
291051
291150
|
}
|
|
291052
291151
|
printSectionFooter() {
|
|
291053
291152
|
this.print("");
|
|
@@ -291063,8 +291162,8 @@ var init_format = __esm({
|
|
|
291063
291162
|
return;
|
|
291064
291163
|
}
|
|
291065
291164
|
let value;
|
|
291066
|
-
const oldValue = this.formatValue(diff.oldValue,
|
|
291067
|
-
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);
|
|
291068
291167
|
if (diff.isAddition) {
|
|
291069
291168
|
value = newValue;
|
|
291070
291169
|
} else if (diff.isUpdate) {
|
|
@@ -291072,7 +291171,7 @@ var init_format = __esm({
|
|
|
291072
291171
|
} else if (diff.isRemoval) {
|
|
291073
291172
|
value = oldValue;
|
|
291074
291173
|
}
|
|
291075
|
-
this.print(`${this.formatPrefix(diff)} ${
|
|
291174
|
+
this.print(`${this.formatPrefix(diff)} ${import_chalk15.default.cyan(type)} ${this.formatLogicalId(logicalId)}: ${value}`);
|
|
291076
291175
|
}
|
|
291077
291176
|
/**
|
|
291078
291177
|
* Print a resource difference for a given logical ID.
|
|
@@ -291095,7 +291194,7 @@ var init_format = __esm({
|
|
|
291095
291194
|
const resourceType = diff.isRemoval ? diff.oldResourceType : diff.newResourceType;
|
|
291096
291195
|
const message2 = [
|
|
291097
291196
|
this.formatResourcePrefix(diff),
|
|
291098
|
-
this.formatValue(resourceType,
|
|
291197
|
+
this.formatValue(resourceType, import_chalk15.default.cyan),
|
|
291099
291198
|
this.formatLogicalId(logicalId),
|
|
291100
291199
|
this.formatImpact(diff.changeImpact),
|
|
291101
291200
|
this.formatMove(diff.move)
|
|
@@ -291126,7 +291225,7 @@ var init_format = __esm({
|
|
|
291126
291225
|
if (diff.isRemoval) {
|
|
291127
291226
|
return REMOVAL2;
|
|
291128
291227
|
}
|
|
291129
|
-
return
|
|
291228
|
+
return import_chalk15.default.reset("[?]");
|
|
291130
291229
|
}
|
|
291131
291230
|
/**
|
|
291132
291231
|
* @param value - the value to be formatted.
|
|
@@ -291150,15 +291249,15 @@ var init_format = __esm({
|
|
|
291150
291249
|
formatImpact(impact) {
|
|
291151
291250
|
switch (impact) {
|
|
291152
291251
|
case "MAY_REPLACE" /* MAY_REPLACE */:
|
|
291153
|
-
return
|
|
291252
|
+
return import_chalk15.default.italic(import_chalk15.default.yellow("may be replaced"));
|
|
291154
291253
|
case "WILL_REPLACE" /* WILL_REPLACE */:
|
|
291155
|
-
return
|
|
291254
|
+
return import_chalk15.default.italic(import_chalk15.default.bold(import_chalk15.default.red("replace")));
|
|
291156
291255
|
case "WILL_DESTROY" /* WILL_DESTROY */:
|
|
291157
|
-
return
|
|
291256
|
+
return import_chalk15.default.italic(import_chalk15.default.bold(import_chalk15.default.red("destroy")));
|
|
291158
291257
|
case "WILL_ORPHAN" /* WILL_ORPHAN */:
|
|
291159
|
-
return
|
|
291258
|
+
return import_chalk15.default.italic(import_chalk15.default.yellow("orphan"));
|
|
291160
291259
|
case "WILL_IMPORT" /* WILL_IMPORT */:
|
|
291161
|
-
return
|
|
291260
|
+
return import_chalk15.default.italic(import_chalk15.default.blue("import"));
|
|
291162
291261
|
case "WILL_UPDATE" /* WILL_UPDATE */:
|
|
291163
291262
|
case "WILL_CREATE" /* WILL_CREATE */:
|
|
291164
291263
|
case "NO_CHANGE" /* NO_CHANGE */:
|
|
@@ -291166,7 +291265,7 @@ var init_format = __esm({
|
|
|
291166
291265
|
}
|
|
291167
291266
|
}
|
|
291168
291267
|
formatMove(move) {
|
|
291169
|
-
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)`);
|
|
291170
291269
|
}
|
|
291171
291270
|
/**
|
|
291172
291271
|
* Renders a tree of differences under a particular name.
|
|
@@ -291205,13 +291304,13 @@ var init_format = __esm({
|
|
|
291205
291304
|
this.print("%s %s %s", linePrefix, i6 === 0 ? "\u2514\u2500" : " ", diff[i6]);
|
|
291206
291305
|
}
|
|
291207
291306
|
} else {
|
|
291208
|
-
this.print("%s \u251C\u2500 %s %s", linePrefix, REMOVAL2, this.formatValue(oldObject,
|
|
291209
|
-
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));
|
|
291210
291309
|
}
|
|
291211
291310
|
} else if (oldObject !== void 0) {
|
|
291212
|
-
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));
|
|
291213
291312
|
} else {
|
|
291214
|
-
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));
|
|
291215
291314
|
}
|
|
291216
291315
|
return;
|
|
291217
291316
|
}
|
|
@@ -291224,12 +291323,12 @@ var init_format = __esm({
|
|
|
291224
291323
|
const newValue = newObject[key];
|
|
291225
291324
|
const treePrefix = key === lastKey ? "\u2514" : "\u251C";
|
|
291226
291325
|
if (oldValue !== void 0 && newValue !== void 0) {
|
|
291227
|
-
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}`));
|
|
291228
291327
|
this.formatObjectDiff(oldValue, newValue, `${linePrefix} ${key === lastKey ? " " : "\u2502"}`);
|
|
291229
291328
|
} else if (oldValue !== void 0) {
|
|
291230
|
-
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}`));
|
|
291231
291330
|
} else {
|
|
291232
|
-
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}`));
|
|
291233
291332
|
}
|
|
291234
291333
|
}
|
|
291235
291334
|
}
|
|
@@ -291273,7 +291372,7 @@ var init_format = __esm({
|
|
|
291273
291372
|
formatLogicalId(logicalId) {
|
|
291274
291373
|
const normalized = this.normalizedLogicalIdPath(logicalId);
|
|
291275
291374
|
if (normalized) {
|
|
291276
|
-
return `${normalized} ${
|
|
291375
|
+
return `${normalized} ${import_chalk15.default.gray(logicalId)}`;
|
|
291277
291376
|
}
|
|
291278
291377
|
return logicalId;
|
|
291279
291378
|
}
|
|
@@ -291365,7 +291464,7 @@ function formatTypedMappings(stream, mappings) {
|
|
|
291365
291464
|
const rows = mappings.map((m4) => [m4.type, m4.sourcePath, m4.destinationPath]);
|
|
291366
291465
|
const formatter = new Formatter(stream, {});
|
|
291367
291466
|
formatter.print("The following resources were moved or renamed:");
|
|
291368
|
-
formatter.print(
|
|
291467
|
+
formatter.print(import_chalk16.default.green(formatTable(header.concat(rows), void 0)));
|
|
291369
291468
|
formatter.print(" ");
|
|
291370
291469
|
}
|
|
291371
291470
|
}
|
|
@@ -291375,18 +291474,18 @@ function formatAmbiguousMappings(stream, pairs) {
|
|
|
291375
291474
|
formatter.print("Detected ambiguities:");
|
|
291376
291475
|
formatter.print(tables.join("\n\n"));
|
|
291377
291476
|
formatter.print(" ");
|
|
291378
|
-
formatter.print(
|
|
291477
|
+
formatter.print(import_chalk16.default.yellow("Please provide an override file to resolve these ambiguous mappings."));
|
|
291379
291478
|
formatter.print(" ");
|
|
291380
291479
|
function renderTable([removed, added]) {
|
|
291381
291480
|
return formatTable([["", "Resource"], renderRemoval(removed), renderAddition(added)], void 0);
|
|
291382
291481
|
}
|
|
291383
291482
|
__name(renderTable, "renderTable");
|
|
291384
291483
|
function renderRemoval(locations) {
|
|
291385
|
-
return [
|
|
291484
|
+
return [import_chalk16.default.red("-"), import_chalk16.default.red(renderLocations(locations))];
|
|
291386
291485
|
}
|
|
291387
291486
|
__name(renderRemoval, "renderRemoval");
|
|
291388
291487
|
function renderAddition(locations) {
|
|
291389
|
-
return [
|
|
291488
|
+
return [import_chalk16.default.green("+"), import_chalk16.default.green(renderLocations(locations))];
|
|
291390
291489
|
}
|
|
291391
291490
|
__name(renderAddition, "renderAddition");
|
|
291392
291491
|
function renderLocations(locs) {
|
|
@@ -291394,11 +291493,11 @@ function formatAmbiguousMappings(stream, pairs) {
|
|
|
291394
291493
|
}
|
|
291395
291494
|
__name(renderLocations, "renderLocations");
|
|
291396
291495
|
}
|
|
291397
|
-
var
|
|
291496
|
+
var import_chalk16;
|
|
291398
291497
|
var init_mappings = __esm({
|
|
291399
291498
|
"../cloudformation-diff/lib/mappings.ts"() {
|
|
291400
291499
|
"use strict";
|
|
291401
|
-
|
|
291500
|
+
import_chalk16 = __toESM(require_source());
|
|
291402
291501
|
init_format();
|
|
291403
291502
|
init_format_table();
|
|
291404
291503
|
__name(formatEnvironmentSectionHeader, "formatEnvironmentSectionHeader");
|
|
@@ -291656,7 +291755,7 @@ async function addMetadataAssetsToManifest(ioHelper, stack, assetManifest, envRe
|
|
|
291656
291755
|
}
|
|
291657
291756
|
const toolkitInfo = await envResources.lookupToolkit();
|
|
291658
291757
|
if (!toolkitInfo.found) {
|
|
291659
|
-
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)}")`);
|
|
291660
291759
|
}
|
|
291661
291760
|
const params = {};
|
|
291662
291761
|
for (const asset of assets) {
|
|
@@ -291736,14 +291835,14 @@ async function prepareDockerImageAsset(asset, assetManifest, envResources) {
|
|
|
291736
291835
|
}
|
|
291737
291836
|
return { [asset.imageNameParameter]: `${repositoryUri2}:${imageTag}` };
|
|
291738
291837
|
}
|
|
291739
|
-
var path31, cxapi6, cxschema10,
|
|
291838
|
+
var path31, cxapi6, cxschema10, import_chalk17;
|
|
291740
291839
|
var init_assets3 = __esm({
|
|
291741
291840
|
"../toolkit-lib/lib/api/deployments/assets.ts"() {
|
|
291742
291841
|
"use strict";
|
|
291743
291842
|
path31 = __toESM(require("path"));
|
|
291744
291843
|
cxapi6 = __toESM(require_lib3());
|
|
291745
291844
|
cxschema10 = __toESM(require_lib2());
|
|
291746
|
-
|
|
291845
|
+
import_chalk17 = __toESM(require_source());
|
|
291747
291846
|
init_toolkit_error();
|
|
291748
291847
|
__name(addMetadataAssetsToManifest, "addMetadataAssetsToManifest");
|
|
291749
291848
|
__name(prepareAsset, "prepareAsset");
|
|
@@ -292579,15 +292678,6 @@ var init_hotswap_template_cache = __esm({
|
|
|
292579
292678
|
}
|
|
292580
292679
|
});
|
|
292581
292680
|
|
|
292582
|
-
// ../toolkit-lib/lib/private/tools.ts
|
|
292583
|
-
var tools_exports2 = {};
|
|
292584
|
-
var init_tools2 = __esm({
|
|
292585
|
-
"../toolkit-lib/lib/private/tools.ts"() {
|
|
292586
|
-
"use strict";
|
|
292587
|
-
__reExport(tools_exports2, __toESM(require_zip()));
|
|
292588
|
-
}
|
|
292589
|
-
});
|
|
292590
|
-
|
|
292591
292681
|
// ../toolkit-lib/lib/api/hotswap/lambda-functions.ts
|
|
292592
292682
|
async function isHotswappableLambdaFunctionChange(logicalId, change, evaluateCfnTemplate) {
|
|
292593
292683
|
if (change.newValue.Type === "AWS::Lambda::Version") {
|
|
@@ -292749,7 +292839,7 @@ async function evaluateLambdaFunctionProps(hotswappablePropChanges, runtime, eva
|
|
|
292749
292839
|
);
|
|
292750
292840
|
}
|
|
292751
292841
|
}
|
|
292752
|
-
const configurations = description || environment ? { description, environment } : void 0;
|
|
292842
|
+
const configurations = description !== void 0 || environment ? { description, environment } : void 0;
|
|
292753
292843
|
return code || configurations ? { code, configurations } : void 0;
|
|
292754
292844
|
}
|
|
292755
292845
|
async function waitForLambdasPropertiesUpdateToFinish(lambda, functionName) {
|
|
@@ -293457,7 +293547,7 @@ async function applyHotswapOperation(sdk, ioSpan, hotswapOperation) {
|
|
|
293457
293547
|
sdk.appendCustomUserAgent(customUserAgent);
|
|
293458
293548
|
const resourceText = /* @__PURE__ */ __name((r6) => r6.description ?? `${r6.resourceType} '${r6.physicalName ?? r6.logicalId}'`, "resourceText");
|
|
293459
293549
|
await ioSpan.notify(IO.CDK_TOOLKIT_I5402.msg(
|
|
293460
|
-
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"),
|
|
293461
293551
|
hotswapOperation.change
|
|
293462
293552
|
));
|
|
293463
293553
|
try {
|
|
@@ -293472,7 +293562,7 @@ async function applyHotswapOperation(sdk, ioSpan, hotswapOperation) {
|
|
|
293472
293562
|
throw e6;
|
|
293473
293563
|
}
|
|
293474
293564
|
await ioSpan.notify(IO.CDK_TOOLKIT_I5403.msg(
|
|
293475
|
-
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"),
|
|
293476
293566
|
hotswapOperation.change
|
|
293477
293567
|
));
|
|
293478
293568
|
sdk.removeCustomUserAgent(customUserAgent);
|
|
@@ -293501,9 +293591,9 @@ async function logRejectedChanges(ioSpan, rejectedChanges, hotswapMode) {
|
|
|
293501
293591
|
}
|
|
293502
293592
|
const messages = [""];
|
|
293503
293593
|
if (hotswapMode === "hotswap-only") {
|
|
293504
|
-
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")));
|
|
293505
293595
|
} else {
|
|
293506
|
-
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:")));
|
|
293507
293597
|
}
|
|
293508
293598
|
for (const { change } of rejectedChanges) {
|
|
293509
293599
|
messages.push(" " + nonHotswappableChangeMessage(change));
|
|
@@ -293518,8 +293608,8 @@ function nonHotswappableChangeMessage(change) {
|
|
|
293518
293608
|
case "Output":
|
|
293519
293609
|
return (0, import_util56.format)(
|
|
293520
293610
|
"output: %s, reason: %s",
|
|
293521
|
-
|
|
293522
|
-
|
|
293611
|
+
import_chalk18.default.bold(subject.logicalId),
|
|
293612
|
+
import_chalk18.default.red(reason)
|
|
293523
293613
|
);
|
|
293524
293614
|
case "Resource":
|
|
293525
293615
|
return nonHotswappableResourceMessage(subject, reason);
|
|
@@ -293529,26 +293619,26 @@ function nonHotswappableResourceMessage(subject, reason) {
|
|
|
293529
293619
|
if (subject.rejectedProperties?.length) {
|
|
293530
293620
|
return (0, import_util56.format)(
|
|
293531
293621
|
"resource: %s, type: %s, rejected changes: %s, reason: %s",
|
|
293532
|
-
|
|
293533
|
-
|
|
293534
|
-
|
|
293535
|
-
|
|
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)
|
|
293536
293626
|
);
|
|
293537
293627
|
}
|
|
293538
293628
|
return (0, import_util56.format)(
|
|
293539
293629
|
"resource: %s, type: %s, reason: %s",
|
|
293540
|
-
|
|
293541
|
-
|
|
293542
|
-
|
|
293630
|
+
import_chalk18.default.bold(subject.logicalId),
|
|
293631
|
+
import_chalk18.default.bold(subject.resourceType),
|
|
293632
|
+
import_chalk18.default.red(reason)
|
|
293543
293633
|
);
|
|
293544
293634
|
}
|
|
293545
|
-
var import_util56, cfn_diff,
|
|
293635
|
+
var import_util56, cfn_diff, import_chalk18, pLimit2, RESOURCE_DETECTORS;
|
|
293546
293636
|
var init_hotswap_deployments = __esm({
|
|
293547
293637
|
"../toolkit-lib/lib/api/hotswap/hotswap-deployments.ts"() {
|
|
293548
293638
|
"use strict";
|
|
293549
293639
|
import_util56 = require("util");
|
|
293550
293640
|
cfn_diff = __toESM(require_lib10());
|
|
293551
|
-
|
|
293641
|
+
import_chalk18 = __toESM(require_source());
|
|
293552
293642
|
init_payloads();
|
|
293553
293643
|
init_util4();
|
|
293554
293644
|
init_cloudformation2();
|
|
@@ -293681,7 +293771,7 @@ async function deployStack(options, ioHelper) {
|
|
|
293681
293771
|
`
|
|
293682
293772
|
${ICON} %s
|
|
293683
293773
|
`,
|
|
293684
|
-
|
|
293774
|
+
import_chalk19.default.bold("hotswap deployment skipped - no changes were detected (use --force to override)")
|
|
293685
293775
|
)
|
|
293686
293776
|
);
|
|
293687
293777
|
}
|
|
@@ -293854,6 +293944,15 @@ async function canSkipDeploy(deployStackOptions, cloudFormationStack, parameterC
|
|
|
293854
293944
|
await ioHelper.defaults.debug(`${deployName}: stack is in a failure state`);
|
|
293855
293945
|
return false;
|
|
293856
293946
|
}
|
|
293947
|
+
const hotswapCache = await readHotswapTemplateCache(
|
|
293948
|
+
deployStackOptions.stack.assembly.directory,
|
|
293949
|
+
deployStackOptions.stack.stackName,
|
|
293950
|
+
deployStackOptions.stack.template
|
|
293951
|
+
);
|
|
293952
|
+
if (hotswapCache && (0, import_cloudformation_diff.diffTemplate)(hotswapCache.deployedRootTemplate, deployStackOptions.stack.template).differenceCount > 0) {
|
|
293953
|
+
await ioHelper.defaults.debug(`${deployName}: template has changed in relation to last successful hotswap deployment`);
|
|
293954
|
+
return false;
|
|
293955
|
+
}
|
|
293857
293956
|
return true;
|
|
293858
293957
|
}
|
|
293859
293958
|
function compareTags(a6, b6) {
|
|
@@ -293880,13 +293979,14 @@ function hasReplacement(report) {
|
|
|
293880
293979
|
return a6 === "ReplaceAndDelete" || a6 === "ReplaceAndRetain" || a6 === "ReplaceAndSnapshot";
|
|
293881
293980
|
});
|
|
293882
293981
|
}
|
|
293883
|
-
var import_node_crypto10, import_node_util5,
|
|
293982
|
+
var import_node_crypto10, import_node_util5, import_cloudformation_diff, import_chalk19, FullCloudFormationDeployment;
|
|
293884
293983
|
var init_deploy_stack = __esm({
|
|
293885
293984
|
"../toolkit-lib/lib/api/deployments/deploy-stack.ts"() {
|
|
293886
293985
|
"use strict";
|
|
293887
293986
|
import_node_crypto10 = require("node:crypto");
|
|
293888
293987
|
import_node_util5 = require("node:util");
|
|
293889
|
-
|
|
293988
|
+
import_cloudformation_diff = __toESM(require_lib10());
|
|
293989
|
+
import_chalk19 = __toESM(require_source());
|
|
293890
293990
|
init_asset_manifest_builder();
|
|
293891
293991
|
init_asset_publishing();
|
|
293892
293992
|
init_assets3();
|
|
@@ -293990,10 +294090,12 @@ var init_deploy_stack = __esm({
|
|
|
293990
294090
|
};
|
|
293991
294091
|
}
|
|
293992
294092
|
if (!execute) {
|
|
293993
|
-
|
|
293994
|
-
|
|
293995
|
-
|
|
293996
|
-
|
|
294093
|
+
if (!this.options.willExecuteChangeSet) {
|
|
294094
|
+
await this.ioHelper.defaults.info((0, import_node_util5.format)(
|
|
294095
|
+
"Changeset %s created and waiting in review for manual execution (--no-execute)",
|
|
294096
|
+
changeSetDescription.ChangeSetId
|
|
294097
|
+
));
|
|
294098
|
+
}
|
|
293997
294099
|
return {
|
|
293998
294100
|
type: "did-deploy-stack",
|
|
293999
294101
|
noOp: false,
|
|
@@ -294061,7 +294163,7 @@ var init_deploy_stack = __esm({
|
|
|
294061
294163
|
async createChangeSet(changeSetName, importExistingResources, revertDrift) {
|
|
294062
294164
|
await this.cleanupOldChangeset(changeSetName);
|
|
294063
294165
|
await this.ioHelper.defaults.debug(`Attempting to create ChangeSet with name ${changeSetName} to ${this.verb} stack ${this.stackName}`);
|
|
294064
|
-
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)));
|
|
294065
294167
|
const changeSet = await this.cfn.createChangeSet({
|
|
294066
294168
|
StackName: this.stackName,
|
|
294067
294169
|
ChangeSetName: changeSetName,
|
|
@@ -294120,7 +294222,7 @@ var init_deploy_stack = __esm({
|
|
|
294120
294222
|
}
|
|
294121
294223
|
}
|
|
294122
294224
|
async directDeployment() {
|
|
294123
|
-
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"));
|
|
294124
294226
|
const startTime = /* @__PURE__ */ new Date();
|
|
294125
294227
|
if (this.update) {
|
|
294126
294228
|
await this.updateTerminationProtection();
|
|
@@ -294173,19 +294275,16 @@ var init_deploy_stack = __esm({
|
|
|
294173
294275
|
pollingInterval: this.options.stackEventPollingInterval
|
|
294174
294276
|
});
|
|
294175
294277
|
await monitor.start();
|
|
294176
|
-
let finalState
|
|
294278
|
+
let finalState;
|
|
294177
294279
|
try {
|
|
294178
|
-
const successStack = await waitForStackDeploy(this.cfn, this.ioHelper,
|
|
294280
|
+
const successStack = await waitForStackDeploy(this.cfn, this.ioHelper, stackArn, this.options.stackEventPollingInterval);
|
|
294179
294281
|
if (!successStack) {
|
|
294180
294282
|
throw new DeploymentError("Stack deploy failed (the stack disappeared while we were deploying it)", DeploymentErrorCodes.STACK_DISAPPEARED_ERROR_CODE);
|
|
294181
294283
|
}
|
|
294182
294284
|
finalState = successStack;
|
|
294183
294285
|
} catch (e6) {
|
|
294184
294286
|
if (ToolkitError.isDeploymentError(e6)) {
|
|
294185
|
-
|
|
294186
|
-
rollbackEnabled: this.options.rollback !== false
|
|
294187
|
-
});
|
|
294188
|
-
diagnosis.throwOnError();
|
|
294287
|
+
await this.diagnoseDeploymentFailure(stackArn, monitor.errors);
|
|
294189
294288
|
}
|
|
294190
294289
|
throw e6;
|
|
294191
294290
|
} finally {
|
|
@@ -294201,6 +294300,25 @@ var init_deploy_stack = __esm({
|
|
|
294201
294300
|
stabilizingResources: monitor.stabilizingResources
|
|
294202
294301
|
};
|
|
294203
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
|
+
}
|
|
294204
294322
|
/**
|
|
294205
294323
|
* Return the options that are shared between CreateStack, UpdateStack and CreateChangeSet
|
|
294206
294324
|
*/
|
|
@@ -294242,13 +294360,13 @@ var init_deploy_stack = __esm({
|
|
|
294242
294360
|
function suffixWithErrors2(msg, errors) {
|
|
294243
294361
|
return errors && errors.length > 0 ? `${msg}: ${errors.join(", ")}` : msg;
|
|
294244
294362
|
}
|
|
294245
|
-
var import_node_crypto11, cdk_assets,
|
|
294363
|
+
var import_node_crypto11, cdk_assets, import_chalk20, BOOTSTRAP_STACK_VERSION_FOR_ROLLBACK, Deployments, ParallelSafeAssetProgress;
|
|
294246
294364
|
var init_deployments = __esm({
|
|
294247
294365
|
"../toolkit-lib/lib/api/deployments/deployments.ts"() {
|
|
294248
294366
|
"use strict";
|
|
294249
294367
|
import_node_crypto11 = require("node:crypto");
|
|
294250
294368
|
cdk_assets = __toESM(require_lib5());
|
|
294251
|
-
|
|
294369
|
+
import_chalk20 = __toESM(require_source());
|
|
294252
294370
|
init_asset_manifest_builder();
|
|
294253
294371
|
init_asset_publishing();
|
|
294254
294372
|
init_cfn_api();
|
|
@@ -294367,6 +294485,7 @@ var init_deployments = __esm({
|
|
|
294367
294485
|
envResources: env2.resources,
|
|
294368
294486
|
tags: options.tags,
|
|
294369
294487
|
deploymentMethod: options.deploymentMethod,
|
|
294488
|
+
willExecuteChangeSet: options.willExecuteChangeSet,
|
|
294370
294489
|
forceDeployment: options.forceDeployment,
|
|
294371
294490
|
parameters: options.parameters,
|
|
294372
294491
|
usePreviousParameters: options.usePreviousParameters,
|
|
@@ -294401,7 +294520,7 @@ var init_deployments = __esm({
|
|
|
294401
294520
|
if (result2.type !== "did-deploy-stack") {
|
|
294402
294521
|
return void 0;
|
|
294403
294522
|
}
|
|
294404
|
-
if (result2.noOp && options.
|
|
294523
|
+
if (result2.noOp && options.willExecuteChangeSet) {
|
|
294405
294524
|
const changeSetName = options.deploymentMethod.changeSetName ?? DEFAULT_DEPLOY_CHANGE_SET_NAME;
|
|
294406
294525
|
await this.cleanupChangeSet(options.stack, changeSetName, options.stackEventPollingInterval);
|
|
294407
294526
|
}
|
|
@@ -294523,7 +294642,7 @@ var init_deployments = __esm({
|
|
|
294523
294642
|
let stackErrorMessage = void 0;
|
|
294524
294643
|
let finalStackState = cloudFormationStack;
|
|
294525
294644
|
try {
|
|
294526
|
-
const successStack = await stabilizeStack(cfn, this.ioHelper,
|
|
294645
|
+
const successStack = await stabilizeStack(cfn, this.ioHelper, stackArn);
|
|
294527
294646
|
if (!successStack) {
|
|
294528
294647
|
throw new ToolkitError("StackDisappeared", "Stack deploy failed (the stack disappeared while we were rolling it back)");
|
|
294529
294648
|
}
|
|
@@ -294642,18 +294761,24 @@ var init_deployments = __esm({
|
|
|
294642
294761
|
}
|
|
294643
294762
|
}
|
|
294644
294763
|
cachedPublisher(assetManifest, env2, stackName) {
|
|
294645
|
-
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);
|
|
294646
294771
|
if (existing) {
|
|
294647
294772
|
return existing;
|
|
294648
294773
|
}
|
|
294649
|
-
const prefix = stackName ? `${
|
|
294774
|
+
const prefix = stackName ? `${import_chalk20.default.bold(stackName)}: ` : "";
|
|
294650
294775
|
const publisher = new cdk_assets.AssetPublishing(assetManifest, {
|
|
294651
294776
|
// The AssetPublishing class takes care of role assuming etc, so it's okay to
|
|
294652
294777
|
// give it a direct `SdkProvider`.
|
|
294653
294778
|
aws: new PublishingAws(this.assetSdkProvider, env2),
|
|
294654
294779
|
progressListener: new ParallelSafeAssetProgress(prefix, this.ioHelper)
|
|
294655
294780
|
});
|
|
294656
|
-
|
|
294781
|
+
byEnv.set(envKey, publisher);
|
|
294657
294782
|
return publisher;
|
|
294658
294783
|
}
|
|
294659
294784
|
};
|
|
@@ -294785,13 +294910,13 @@ function obscureDiff(diff) {
|
|
|
294785
294910
|
});
|
|
294786
294911
|
}
|
|
294787
294912
|
}
|
|
294788
|
-
var import_node_util6,
|
|
294913
|
+
var import_node_util6, import_cloudformation_diff2, import_chalk21, DiffFormatter;
|
|
294789
294914
|
var init_diff_formatter = __esm({
|
|
294790
294915
|
"../toolkit-lib/lib/api/diff/diff-formatter.ts"() {
|
|
294791
294916
|
"use strict";
|
|
294792
294917
|
import_node_util6 = require("node:util");
|
|
294793
|
-
|
|
294794
|
-
|
|
294918
|
+
import_cloudformation_diff2 = __toESM(require_lib10());
|
|
294919
|
+
import_chalk21 = __toESM(require_source());
|
|
294795
294920
|
init_payloads();
|
|
294796
294921
|
init_logical_id_map();
|
|
294797
294922
|
init_streams();
|
|
@@ -294827,7 +294952,7 @@ var init_diff_formatter = __esm({
|
|
|
294827
294952
|
*/
|
|
294828
294953
|
computeDiff(stackName, oldTemplate, newTemplate, changeSet, mappings) {
|
|
294829
294954
|
if (!this.cache.has(stackName)) {
|
|
294830
|
-
const templateDiff = (0,
|
|
294955
|
+
const templateDiff = (0, import_cloudformation_diff2.fullDiff)(oldTemplate, newTemplate, changeSet, this.isImport);
|
|
294831
294956
|
const setMove = /* @__PURE__ */ __name((change, direction, location) => {
|
|
294832
294957
|
if (location != null) {
|
|
294833
294958
|
const [sourceStackName, sourceLogicalId] = location.split(".");
|
|
@@ -294873,7 +294998,7 @@ var init_diff_formatter = __esm({
|
|
|
294873
294998
|
let filteredChangesCount = 0;
|
|
294874
294999
|
try {
|
|
294875
295000
|
if (stackName && (!options.quiet || !diff.isEmpty)) {
|
|
294876
|
-
stream.write((0, import_node_util6.format)(`Stack ${
|
|
295001
|
+
stream.write((0, import_node_util6.format)(`Stack ${import_chalk21.default.bold(stackName)}
|
|
294877
295002
|
`));
|
|
294878
295003
|
}
|
|
294879
295004
|
if (!options.quiet && this.isImport) {
|
|
@@ -294881,8 +295006,8 @@ var init_diff_formatter = __esm({
|
|
|
294881
295006
|
}
|
|
294882
295007
|
let activeDiff = diff;
|
|
294883
295008
|
if (diff.differenceCount && !options.strict) {
|
|
294884
|
-
const mangledNewTemplate = JSON.parse((0,
|
|
294885
|
-
const mangledDiff = (0,
|
|
295009
|
+
const mangledNewTemplate = JSON.parse((0, import_cloudformation_diff2.mangleLikeCloudFormation)(JSON.stringify(newTemplate)));
|
|
295010
|
+
const mangledDiff = (0, import_cloudformation_diff2.fullDiff)(oldTemplate, mangledNewTemplate, changeSet);
|
|
294886
295011
|
filteredChangesCount = Math.max(0, diff.differenceCount - mangledDiff.differenceCount);
|
|
294887
295012
|
if (filteredChangesCount > 0) {
|
|
294888
295013
|
activeDiff = mangledDiff;
|
|
@@ -294895,18 +295020,18 @@ var init_diff_formatter = __esm({
|
|
|
294895
295020
|
const metadataWasFiltered = diffWasNonEmpty && activeDiff.isEmpty;
|
|
294896
295021
|
if (!activeDiff.isEmpty) {
|
|
294897
295022
|
numStacksWithChanges++;
|
|
294898
|
-
(0,
|
|
295023
|
+
(0, import_cloudformation_diff2.formatDifferences)(stream, activeDiff, {
|
|
294899
295024
|
...logicalIdMapFromTemplate(oldTemplate),
|
|
294900
295025
|
...logicalIdMapFromTemplate(newTemplate),
|
|
294901
295026
|
...logicalIdMap
|
|
294902
295027
|
}, options.contextLines);
|
|
294903
295028
|
} else if (!options.quiet) {
|
|
294904
|
-
const hint = metadataWasFiltered ?
|
|
294905
|
-
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}
|
|
294906
295031
|
`);
|
|
294907
295032
|
}
|
|
294908
295033
|
if (filteredChangesCount > 0) {
|
|
294909
|
-
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.
|
|
294910
295035
|
`));
|
|
294911
295036
|
}
|
|
294912
295037
|
} finally {
|
|
@@ -294948,11 +295073,11 @@ var init_diff_formatter = __esm({
|
|
|
294948
295073
|
const permissionChangeType = permissionTypeFromDiff(diff);
|
|
294949
295074
|
const stream = new StringWriteStream();
|
|
294950
295075
|
if (!options.quiet || permissionChangeType !== "none" /* NONE */) {
|
|
294951
|
-
stream.write((0, import_node_util6.format)(`Stack ${
|
|
295076
|
+
stream.write((0, import_node_util6.format)(`Stack ${import_chalk21.default.bold(stackName)}
|
|
294952
295077
|
`));
|
|
294953
295078
|
}
|
|
294954
295079
|
try {
|
|
294955
|
-
(0,
|
|
295080
|
+
(0, import_cloudformation_diff2.formatSecurityChanges)(stream, diff, {
|
|
294956
295081
|
...logicalIdMapFromTemplate(newTemplate),
|
|
294957
295082
|
...logicalIdMap
|
|
294958
295083
|
});
|
|
@@ -294961,7 +295086,7 @@ var init_diff_formatter = __esm({
|
|
|
294961
295086
|
}
|
|
294962
295087
|
let formattedDiff = stream.toString();
|
|
294963
295088
|
if (!options.quiet && permissionChangeType === "none" /* NONE */) {
|
|
294964
|
-
formattedDiff +=
|
|
295089
|
+
formattedDiff += import_chalk21.default.green("There were no security-related changes (limitations: https://github.com/aws/aws-cdk/issues/1299)\n");
|
|
294965
295090
|
}
|
|
294966
295091
|
let numStacksWithChanges = permissionChangeType !== "none" /* NONE */ ? 1 : 0;
|
|
294967
295092
|
let escalatedPermissionType = permissionChangeType;
|
|
@@ -295017,13 +295142,13 @@ function removeNonImportResources(stack) {
|
|
|
295017
295142
|
delete template.Outputs;
|
|
295018
295143
|
return template;
|
|
295019
295144
|
}
|
|
295020
|
-
var import_util60, cfnDiff,
|
|
295145
|
+
var import_util60, cfnDiff, import_chalk22, fs34, ResourceImporter;
|
|
295021
295146
|
var init_importer = __esm({
|
|
295022
295147
|
"../toolkit-lib/lib/api/resource-import/importer.ts"() {
|
|
295023
295148
|
"use strict";
|
|
295024
295149
|
import_util60 = require("util");
|
|
295025
295150
|
cfnDiff = __toESM(require_lib10());
|
|
295026
|
-
|
|
295151
|
+
import_chalk22 = __toESM(require_source());
|
|
295027
295152
|
fs34 = __toESM(require_lib4());
|
|
295028
295153
|
init_toolkit_error();
|
|
295029
295154
|
init_deployments2();
|
|
@@ -295085,12 +295210,12 @@ var init_importer = __esm({
|
|
|
295085
295210
|
const descr = this.describeResource(resource.logicalId);
|
|
295086
295211
|
const idProps = remaining[resource.logicalId];
|
|
295087
295212
|
if (idProps) {
|
|
295088
|
-
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))));
|
|
295089
295214
|
ret.importResources.push(resource);
|
|
295090
295215
|
ret.resourceMap[resource.logicalId] = idProps;
|
|
295091
295216
|
delete remaining[resource.logicalId];
|
|
295092
295217
|
} else {
|
|
295093
|
-
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)));
|
|
295094
295219
|
}
|
|
295095
295220
|
}
|
|
295096
295221
|
const unknown = Object.keys(remaining);
|
|
@@ -295103,7 +295228,7 @@ var init_importer = __esm({
|
|
|
295103
295228
|
* Based on the provided resource mapping, prepare CFN structures for import (template,
|
|
295104
295229
|
* ResourcesToImport structure) and perform the import operation (CloudFormation deployment)
|
|
295105
295230
|
*
|
|
295106
|
-
* @param importMap - Mapping from
|
|
295231
|
+
* @param importMap - Mapping from CloudFormation logical ID to physical resource import identifiers
|
|
295107
295232
|
* @param options - Options to pass to CloudFormation deploy operation
|
|
295108
295233
|
*/
|
|
295109
295234
|
async importResourcesFromMap(importMap, options = {}) {
|
|
@@ -295134,9 +295259,9 @@ var init_importer = __esm({
|
|
|
295134
295259
|
});
|
|
295135
295260
|
assertIsSuccessfulDeployStackResult(result2);
|
|
295136
295261
|
const message2 = result2.noOp ? "\u2705 %s (no changes)" : "\u2705 %s";
|
|
295137
|
-
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)));
|
|
295138
295263
|
} catch (e6) {
|
|
295139
|
-
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 }));
|
|
295140
295265
|
throw e6;
|
|
295141
295266
|
}
|
|
295142
295267
|
}
|
|
@@ -295240,7 +295365,7 @@ var init_importer = __esm({
|
|
|
295240
295365
|
for (const satisfiedPropSet of satisfiedPropSets) {
|
|
295241
295366
|
const candidateProps = Object.fromEntries(satisfiedPropSet.map((p3) => [p3, resourceProps[p3]]));
|
|
295242
295367
|
const displayCandidateProps = fmtdict(candidateProps);
|
|
295243
|
-
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)}`, {
|
|
295244
295369
|
resource: {
|
|
295245
295370
|
type: resourceType,
|
|
295246
295371
|
props: candidateProps,
|
|
@@ -295252,13 +295377,13 @@ var init_importer = __esm({
|
|
|
295252
295377
|
}
|
|
295253
295378
|
}
|
|
295254
295379
|
if (satisfiedPropSets.length > 0) {
|
|
295255
|
-
await this.ioHelper.defaults.info(
|
|
295380
|
+
await this.ioHelper.defaults.info(import_chalk22.default.grey(`Skipping import of ${resourceName}`));
|
|
295256
295381
|
return void 0;
|
|
295257
295382
|
}
|
|
295258
|
-
const prefix = `${
|
|
295383
|
+
const prefix = `${import_chalk22.default.blue(resourceName)} (${resourceType})`;
|
|
295259
295384
|
const promptPattern = `${prefix}: enter %s`;
|
|
295260
295385
|
if (idPropSets.length > 1) {
|
|
295261
|
-
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)`;
|
|
295262
295387
|
await this.ioHelper.defaults.info(preamble);
|
|
295263
295388
|
}
|
|
295264
295389
|
for (const idProps of idPropSets) {
|
|
@@ -295266,7 +295391,7 @@ var init_importer = __esm({
|
|
|
295266
295391
|
for (const idProp of idProps) {
|
|
295267
295392
|
const defaultValue = resourceProps[idProp] ?? "";
|
|
295268
295393
|
const response = await this.ioHelper.requestResponse(IO.CDK_TOOLKIT_I3110.req(
|
|
295269
|
-
(0, import_util60.format)(promptPattern,
|
|
295394
|
+
(0, import_util60.format)(promptPattern, import_chalk22.default.blue(idProp)),
|
|
295270
295395
|
{
|
|
295271
295396
|
resource: {
|
|
295272
295397
|
name: resourceName,
|
|
@@ -295287,7 +295412,7 @@ var init_importer = __esm({
|
|
|
295287
295412
|
return input;
|
|
295288
295413
|
}
|
|
295289
295414
|
}
|
|
295290
|
-
await this.ioHelper.defaults.info(
|
|
295415
|
+
await this.ioHelper.defaults.info(import_chalk22.default.grey(`Skipping import of ${resourceName}`));
|
|
295291
295416
|
return void 0;
|
|
295292
295417
|
}
|
|
295293
295418
|
/**
|
|
@@ -295324,11 +295449,11 @@ var init_importer = __esm({
|
|
|
295324
295449
|
});
|
|
295325
295450
|
|
|
295326
295451
|
// ../toolkit-lib/lib/api/resource-import/migrator.ts
|
|
295327
|
-
var
|
|
295452
|
+
var import_chalk23, fs35, ResourceMigrator;
|
|
295328
295453
|
var init_migrator = __esm({
|
|
295329
295454
|
"../toolkit-lib/lib/api/resource-import/migrator.ts"() {
|
|
295330
295455
|
"use strict";
|
|
295331
|
-
|
|
295456
|
+
import_chalk23 = __toESM(require_source());
|
|
295332
295457
|
fs35 = __toESM(require_lib4());
|
|
295333
295458
|
init_importer();
|
|
295334
295459
|
init_util4();
|
|
@@ -295357,11 +295482,11 @@ var init_migrator = __esm({
|
|
|
295357
295482
|
});
|
|
295358
295483
|
const resourcesToImport = await this.tryGetResources(await migrateDeployment.resolveEnvironment());
|
|
295359
295484
|
if (resourcesToImport) {
|
|
295360
|
-
await this.ioHelper.defaults.info(`${
|
|
295361
|
-
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...`);
|
|
295362
295487
|
await this.performResourceMigration(migrateDeployment, resourcesToImport, options);
|
|
295363
295488
|
fs35.rmSync("migrate.json");
|
|
295364
|
-
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)...`);
|
|
295365
295490
|
}
|
|
295366
295491
|
}
|
|
295367
295492
|
/**
|
|
@@ -295703,9 +295828,8 @@ function stripConstructPath(resource) {
|
|
|
295703
295828
|
if (resource?.Metadata?.["aws:cdk:path"] == null) {
|
|
295704
295829
|
return resource;
|
|
295705
295830
|
}
|
|
295706
|
-
const
|
|
295707
|
-
|
|
295708
|
-
return copy;
|
|
295831
|
+
const { "aws:cdk:path": _, ...metadata } = resource.Metadata;
|
|
295832
|
+
return { ...resource, Metadata: metadata };
|
|
295709
295833
|
}
|
|
295710
295834
|
var crypto3;
|
|
295711
295835
|
var init_digest = __esm({
|
|
@@ -296055,13 +296179,13 @@ async function listStacks(sdkProvider, environment) {
|
|
|
296055
296179
|
}
|
|
296056
296180
|
function formatEnvironmentSectionHeader2(environment) {
|
|
296057
296181
|
const env2 = `aws://${environment.account}/${environment.region}`;
|
|
296058
|
-
return formatToStream((stream) => (0,
|
|
296182
|
+
return formatToStream((stream) => (0, import_cloudformation_diff3.formatEnvironmentSectionHeader)(stream, env2));
|
|
296059
296183
|
}
|
|
296060
296184
|
function formatTypedMappings2(mappings) {
|
|
296061
|
-
return formatToStream((stream) => (0,
|
|
296185
|
+
return formatToStream((stream) => (0, import_cloudformation_diff3.formatTypedMappings)(stream, mappings));
|
|
296062
296186
|
}
|
|
296063
296187
|
function formatAmbiguousMappings2(paths) {
|
|
296064
|
-
return formatToStream((stream) => (0,
|
|
296188
|
+
return formatToStream((stream) => (0, import_cloudformation_diff3.formatAmbiguousMappings)(stream, paths));
|
|
296065
296189
|
}
|
|
296066
296190
|
function formatToStream(cb) {
|
|
296067
296191
|
const stream = new StringWriteStream();
|
|
@@ -296096,11 +296220,11 @@ async function groupStacks(sdkProvider, localStacks, additionalStackNames) {
|
|
|
296096
296220
|
}
|
|
296097
296221
|
return groups;
|
|
296098
296222
|
}
|
|
296099
|
-
var
|
|
296223
|
+
var import_cloudformation_diff3;
|
|
296100
296224
|
var init_refactoring = __esm({
|
|
296101
296225
|
"../toolkit-lib/lib/api/refactoring/index.ts"() {
|
|
296102
296226
|
"use strict";
|
|
296103
|
-
|
|
296227
|
+
import_cloudformation_diff3 = __toESM(require_lib10());
|
|
296104
296228
|
init_util4();
|
|
296105
296229
|
init_plugin2();
|
|
296106
296230
|
init_streams();
|
|
@@ -297028,11 +297152,11 @@ var init_bootstrap3 = __esm({
|
|
|
297028
297152
|
});
|
|
297029
297153
|
|
|
297030
297154
|
// ../toolkit-lib/lib/api/garbage-collection/progress-printer.ts
|
|
297031
|
-
var
|
|
297155
|
+
var import_chalk24;
|
|
297032
297156
|
var init_progress_printer = __esm({
|
|
297033
297157
|
"../toolkit-lib/lib/api/garbage-collection/progress-printer.ts"() {
|
|
297034
297158
|
"use strict";
|
|
297035
|
-
|
|
297159
|
+
import_chalk24 = __toESM(require_source());
|
|
297036
297160
|
init_toolkit_error();
|
|
297037
297161
|
}
|
|
297038
297162
|
});
|
|
@@ -297046,11 +297170,12 @@ var init_stack_refresh = __esm({
|
|
|
297046
297170
|
});
|
|
297047
297171
|
|
|
297048
297172
|
// ../toolkit-lib/lib/api/garbage-collection/garbage-collector.ts
|
|
297049
|
-
var
|
|
297173
|
+
var import_chalk25, pLimit4, DAY;
|
|
297050
297174
|
var init_garbage_collector = __esm({
|
|
297051
297175
|
"../toolkit-lib/lib/api/garbage-collection/garbage-collector.ts"() {
|
|
297052
297176
|
"use strict";
|
|
297053
|
-
|
|
297177
|
+
import_chalk25 = __toESM(require_source());
|
|
297178
|
+
init_util5();
|
|
297054
297179
|
init_toolkit_info();
|
|
297055
297180
|
init_progress_printer();
|
|
297056
297181
|
init_stack_refresh();
|
|
@@ -297114,13 +297239,13 @@ var init_io = __esm({
|
|
|
297114
297239
|
});
|
|
297115
297240
|
|
|
297116
297241
|
// ../toolkit-lib/lib/api/logs-monitor/logs-monitor.ts
|
|
297117
|
-
var import_node_crypto13, util10,
|
|
297242
|
+
var import_node_crypto13, util10, import_chalk26, CloudWatchLogEventMonitor;
|
|
297118
297243
|
var init_logs_monitor2 = __esm({
|
|
297119
297244
|
"../toolkit-lib/lib/api/logs-monitor/logs-monitor.ts"() {
|
|
297120
297245
|
"use strict";
|
|
297121
297246
|
import_node_crypto13 = require("node:crypto");
|
|
297122
297247
|
util10 = __toESM(require("node:util"));
|
|
297123
|
-
|
|
297248
|
+
import_chalk26 = __toESM(require_source());
|
|
297124
297249
|
init_util4();
|
|
297125
297250
|
init_private();
|
|
297126
297251
|
CloudWatchLogEventMonitor = class {
|
|
@@ -297251,8 +297376,8 @@ var init_logs_monitor2 = __esm({
|
|
|
297251
297376
|
await this.ioHelper.notify(IO.CDK_TOOLKIT_I5033.msg(
|
|
297252
297377
|
util10.format(
|
|
297253
297378
|
"[%s] %s %s",
|
|
297254
|
-
|
|
297255
|
-
|
|
297379
|
+
import_chalk26.default.blue(event.logGroupName),
|
|
297380
|
+
import_chalk26.default.yellow(event.timestamp.toLocaleTimeString()),
|
|
297256
297381
|
event.message.trim()
|
|
297257
297382
|
),
|
|
297258
297383
|
event
|
|
@@ -298053,14 +298178,14 @@ var init_tags2 = __esm({
|
|
|
298053
298178
|
});
|
|
298054
298179
|
|
|
298055
298180
|
// ../toolkit-lib/lib/api/drift/drift-formatter.ts
|
|
298056
|
-
var import_node_util7,
|
|
298181
|
+
var import_node_util7, import_cloudformation_diff4, import_client_cloudformation7, import_chalk27, DriftFormatter, ADDITION3, CONTEXT2, UPDATE3, REMOVAL3;
|
|
298057
298182
|
var init_drift_formatter = __esm({
|
|
298058
298183
|
"../toolkit-lib/lib/api/drift/drift-formatter.ts"() {
|
|
298059
298184
|
"use strict";
|
|
298060
298185
|
import_node_util7 = require("node:util");
|
|
298061
|
-
|
|
298186
|
+
import_cloudformation_diff4 = __toESM(require_lib10());
|
|
298062
298187
|
import_client_cloudformation7 = __toESM(require_dist_cjs28());
|
|
298063
|
-
|
|
298188
|
+
import_chalk27 = __toESM(require_source());
|
|
298064
298189
|
init_logical_id_map();
|
|
298065
298190
|
DriftFormatter = class {
|
|
298066
298191
|
static {
|
|
@@ -298083,30 +298208,43 @@ var init_drift_formatter = __esm({
|
|
|
298083
298208
|
this.allStackResources.set(id, resource.Type);
|
|
298084
298209
|
});
|
|
298085
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
|
+
}
|
|
298086
298224
|
/**
|
|
298087
298225
|
* Format the stack drift detection results
|
|
298088
298226
|
*/
|
|
298089
298227
|
formatStackDrift() {
|
|
298090
298228
|
const formatterOutput = this.formatStackDriftChanges(buildLogicalToPathMap(this.stack).toPath);
|
|
298091
298229
|
const actualDrifts = this.resourceDriftResults.filter((d6) => (d6.StackResourceDriftStatus === "MODIFIED" || d6.StackResourceDriftStatus === "DELETED") && d6.ResourceType !== "AWS::CDK::Metadata");
|
|
298092
|
-
const stackHeader = (0, import_node_util7.format)(`Stack ${
|
|
298230
|
+
const stackHeader = (0, import_node_util7.format)(`Stack ${import_chalk27.default.bold(this.stackName)}
|
|
298093
298231
|
`);
|
|
298094
298232
|
if (actualDrifts.length === 0) {
|
|
298095
|
-
const finalResult2 =
|
|
298233
|
+
const finalResult2 = import_chalk27.default.green("No drift detected\n");
|
|
298096
298234
|
return {
|
|
298097
298235
|
numResourcesWithDrift: 0,
|
|
298098
|
-
numResourcesUnchecked: this.
|
|
298236
|
+
numResourcesUnchecked: this.getUncheckedResources().length,
|
|
298099
298237
|
stackHeader,
|
|
298100
298238
|
unchecked: formatterOutput.unchecked,
|
|
298101
298239
|
summary: finalResult2
|
|
298102
298240
|
};
|
|
298103
298241
|
}
|
|
298104
|
-
const finalResult =
|
|
298242
|
+
const finalResult = import_chalk27.default.yellow(`
|
|
298105
298243
|
${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualDrifts.length === 1 ? "has" : "have"} drifted from their expected configuration
|
|
298106
298244
|
`);
|
|
298107
298245
|
return {
|
|
298108
298246
|
numResourcesWithDrift: actualDrifts.length,
|
|
298109
|
-
numResourcesUnchecked: this.
|
|
298247
|
+
numResourcesUnchecked: this.getUncheckedResources().length,
|
|
298110
298248
|
stackHeader,
|
|
298111
298249
|
unchanged: formatterOutput.unchanged,
|
|
298112
298250
|
unchecked: formatterOutput.unchecked,
|
|
@@ -298134,20 +298272,17 @@ ${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualD
|
|
|
298134
298272
|
unchanged = this.printSectionHeader("Resources In Sync");
|
|
298135
298273
|
for (const drift of unchangedResources) {
|
|
298136
298274
|
if (!drift.LogicalResourceId || !drift.ResourceType) continue;
|
|
298137
|
-
unchanged += `${CONTEXT2} ${
|
|
298275
|
+
unchanged += `${CONTEXT2} ${import_chalk27.default.cyan(drift.ResourceType)} ${this.formatLogicalId(logicalToPathMap, drift.LogicalResourceId)}
|
|
298138
298276
|
`;
|
|
298139
298277
|
}
|
|
298140
298278
|
unchanged += this.printSectionFooter();
|
|
298141
298279
|
}
|
|
298142
|
-
const uncheckedResources =
|
|
298143
|
-
const drift = drifts.find((d6) => d6.LogicalResourceId === logicalId);
|
|
298144
|
-
return !drift || drift.StackResourceDriftStatus === import_client_cloudformation7.StackResourceDriftStatus.UNKNOWN;
|
|
298145
|
-
});
|
|
298280
|
+
const uncheckedResources = this.getUncheckedResources();
|
|
298146
298281
|
if (uncheckedResources.length > 0) {
|
|
298147
298282
|
unchecked = this.printSectionHeader("Unchecked Resources");
|
|
298148
298283
|
for (const logicalId of uncheckedResources) {
|
|
298149
298284
|
const resourceType = this.allStackResources.get(logicalId);
|
|
298150
|
-
unchecked += `${CONTEXT2} ${
|
|
298285
|
+
unchecked += `${CONTEXT2} ${import_chalk27.default.cyan(resourceType)} ${this.formatLogicalId(logicalToPathMap, logicalId)}
|
|
298151
298286
|
`;
|
|
298152
298287
|
}
|
|
298153
298288
|
unchecked += this.printSectionFooter();
|
|
@@ -298157,14 +298292,14 @@ ${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualD
|
|
|
298157
298292
|
modified = this.printSectionHeader("Modified Resources");
|
|
298158
298293
|
for (const drift of modifiedResources) {
|
|
298159
298294
|
if (!drift.LogicalResourceId || !drift.ResourceType) continue;
|
|
298160
|
-
modified += `${UPDATE3} ${
|
|
298295
|
+
modified += `${UPDATE3} ${import_chalk27.default.cyan(drift.ResourceType)} ${this.formatLogicalId(logicalToPathMap, drift.LogicalResourceId)}
|
|
298161
298296
|
`;
|
|
298162
298297
|
if (drift.PropertyDifferences) {
|
|
298163
298298
|
const propDiffs = drift.PropertyDifferences;
|
|
298164
298299
|
for (let i6 = 0; i6 < propDiffs.length; i6++) {
|
|
298165
298300
|
const diff = propDiffs[i6];
|
|
298166
298301
|
if (!diff.PropertyPath) continue;
|
|
298167
|
-
const difference2 = new
|
|
298302
|
+
const difference2 = new import_cloudformation_diff4.Difference(diff.ExpectedValue, diff.ActualValue);
|
|
298168
298303
|
modified += this.formatTreeDiff(diff.PropertyPath, difference2, i6 === propDiffs.length - 1);
|
|
298169
298304
|
}
|
|
298170
298305
|
}
|
|
@@ -298176,7 +298311,7 @@ ${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualD
|
|
|
298176
298311
|
deleted = this.printSectionHeader("Deleted Resources");
|
|
298177
298312
|
for (const drift of deletedResources) {
|
|
298178
298313
|
if (!drift.LogicalResourceId || !drift.ResourceType) continue;
|
|
298179
|
-
deleted += `${REMOVAL3} ${
|
|
298314
|
+
deleted += `${REMOVAL3} ${import_chalk27.default.cyan(drift.ResourceType)} ${this.formatLogicalId(logicalToPathMap, drift.LogicalResourceId)}
|
|
298180
298315
|
`;
|
|
298181
298316
|
}
|
|
298182
298317
|
deleted += this.printSectionFooter();
|
|
@@ -298201,10 +298336,10 @@ ${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualD
|
|
|
298201
298336
|
}
|
|
298202
298337
|
normalizedPath = parts.join("/");
|
|
298203
298338
|
}
|
|
298204
|
-
return `${normalizedPath} ${
|
|
298339
|
+
return `${normalizedPath} ${import_chalk27.default.gray(logicalId)}`;
|
|
298205
298340
|
}
|
|
298206
298341
|
printSectionHeader(title) {
|
|
298207
|
-
return `${
|
|
298342
|
+
return `${import_chalk27.default.underline(import_chalk27.default.bold(title))}
|
|
298208
298343
|
`;
|
|
298209
298344
|
}
|
|
298210
298345
|
printSectionFooter() {
|
|
@@ -298218,16 +298353,16 @@ ${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualD
|
|
|
298218
298353
|
propertyPath
|
|
298219
298354
|
);
|
|
298220
298355
|
if (difference2.isUpdate) {
|
|
298221
|
-
result2 += (0, import_node_util7.format)(" \u251C\u2500 %s %s\n", REMOVAL3,
|
|
298222
|
-
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));
|
|
298223
298358
|
}
|
|
298224
298359
|
return result2;
|
|
298225
298360
|
}
|
|
298226
298361
|
};
|
|
298227
|
-
ADDITION3 =
|
|
298228
|
-
CONTEXT2 =
|
|
298229
|
-
UPDATE3 =
|
|
298230
|
-
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("[-]");
|
|
298231
298366
|
}
|
|
298232
298367
|
});
|
|
298233
298368
|
|
|
@@ -298784,7 +298919,7 @@ async function generateStackDefinitions(mappings, deployedStacks, localStacks, e
|
|
|
298784
298919
|
Run the following command in order to setup an S3 bucket in this environment, and then re-refactor:
|
|
298785
298920
|
|
|
298786
298921
|
`,
|
|
298787
|
-
|
|
298922
|
+
import_chalk28.default.blue(` $ cdk bootstrap ${environment.name}
|
|
298788
298923
|
`)
|
|
298789
298924
|
)
|
|
298790
298925
|
);
|
|
@@ -298818,12 +298953,12 @@ Run the following command in order to setup an S3 bucket in this environment, an
|
|
|
298818
298953
|
}
|
|
298819
298954
|
return stackDefinitions;
|
|
298820
298955
|
}
|
|
298821
|
-
var util11,
|
|
298956
|
+
var util11, import_chalk28, deepEqual4, LARGE_TEMPLATE_SIZE_KB2, LARGE_TEMPLATE_SIZE_BYTES;
|
|
298822
298957
|
var init_stack_definitions = __esm({
|
|
298823
298958
|
"../toolkit-lib/lib/api/refactoring/stack-definitions.ts"() {
|
|
298824
298959
|
"use strict";
|
|
298825
298960
|
util11 = __toESM(require("node:util"));
|
|
298826
|
-
|
|
298961
|
+
import_chalk28 = __toESM(require_source());
|
|
298827
298962
|
init_toolkit_error();
|
|
298828
298963
|
init_util4();
|
|
298829
298964
|
init_environment2();
|
|
@@ -298872,7 +299007,7 @@ function formatValidationReports(fileRoot, reports) {
|
|
|
298872
299007
|
});
|
|
298873
299008
|
return [
|
|
298874
299009
|
...pluginFailures.map(formatPluginFailure),
|
|
298875
|
-
...successfullyExecutedPlugins.flatMap((r6) => r6.preamble ? [`${
|
|
299010
|
+
...successfullyExecutedPlugins.flatMap((r6) => r6.preamble ? [`${import_chalk29.default.underline(sanitize(r6.pluginName))}: ${sanitize(r6.preamble)}`] : []),
|
|
298876
299011
|
...violations.map((v) => formatViolationBlock(fileRoot, v))
|
|
298877
299012
|
];
|
|
298878
299013
|
}
|
|
@@ -298907,14 +299042,14 @@ function formatViolationBlock(fileRoot, v) {
|
|
|
298907
299042
|
const lines = [];
|
|
298908
299043
|
const location = sourceLocation(fileRoot, v.construct.stackTraces);
|
|
298909
299044
|
if (location) {
|
|
298910
|
-
lines.push(
|
|
299045
|
+
lines.push(import_chalk29.default.underline(sanitize(location)));
|
|
298911
299046
|
}
|
|
298912
299047
|
const ruleName = v.ruleName.includes("::") ? v.ruleName : `${v.pluginName}::${v.ruleName}`;
|
|
298913
299048
|
const namespace = ruleName.split("::")[0];
|
|
298914
299049
|
lines.push([
|
|
298915
|
-
|
|
298916
|
-
|
|
298917
|
-
|
|
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)})`)
|
|
298918
299053
|
].join(" "));
|
|
298919
299054
|
const constructInfo = formatConstructInfo(fileRoot, v.construct);
|
|
298920
299055
|
lines.push(` ${constructInfo}`);
|
|
@@ -298923,26 +299058,26 @@ function formatViolationBlock(fileRoot, v) {
|
|
|
298923
299058
|
}
|
|
298924
299059
|
const ackId = `${sanitize(ruleName)}`.replace(/ /g, "-");
|
|
298925
299060
|
if (isSuppressibleViolation(v)) {
|
|
298926
|
-
lines.push(` ${
|
|
299061
|
+
lines.push(` ${import_chalk29.default.grey(`Acknowledge with '${ackId}'`)}`);
|
|
298927
299062
|
} else {
|
|
298928
|
-
lines.push(` ${
|
|
299063
|
+
lines.push(` ${import_chalk29.default.grey(`Rule ${sanitize(ackId)}`)}`);
|
|
298929
299064
|
}
|
|
298930
299065
|
return lines.join("\n");
|
|
298931
299066
|
}
|
|
298932
299067
|
function getSeverityColor(severity) {
|
|
298933
299068
|
switch (severity.toLowerCase()) {
|
|
298934
299069
|
case "fatal":
|
|
298935
|
-
return
|
|
299070
|
+
return import_chalk29.default.red;
|
|
298936
299071
|
case "error":
|
|
298937
|
-
return
|
|
299072
|
+
return import_chalk29.default.ansi256(208);
|
|
298938
299073
|
case "warning":
|
|
298939
|
-
return
|
|
299074
|
+
return import_chalk29.default.yellow;
|
|
298940
299075
|
default:
|
|
298941
|
-
return
|
|
299076
|
+
return import_chalk29.default.blue;
|
|
298942
299077
|
}
|
|
298943
299078
|
}
|
|
298944
299079
|
function formatPluginFailure(f6) {
|
|
298945
|
-
return `${
|
|
299080
|
+
return `${import_chalk29.default.ansi256(208)("ERROR")} ${sanitize(f6.error)}`;
|
|
298946
299081
|
}
|
|
298947
299082
|
function formatConstructInfo(fileRoot, construct) {
|
|
298948
299083
|
const parts = [];
|
|
@@ -298955,11 +299090,11 @@ function formatConstructInfo(fileRoot, construct) {
|
|
|
298955
299090
|
parts.push(humanFriendlyFilename(fileRoot, sanitize(construct.cloudFormationResource.templatePath)));
|
|
298956
299091
|
}
|
|
298957
299092
|
if (logicalId) {
|
|
298958
|
-
parts.push(
|
|
299093
|
+
parts.push(import_chalk29.default.bold(logicalId));
|
|
298959
299094
|
}
|
|
298960
299095
|
}
|
|
298961
299096
|
if (construct.constructFqn) {
|
|
298962
|
-
parts.push(
|
|
299097
|
+
parts.push(import_chalk29.default.grey(sanitize(construct.constructFqn)));
|
|
298963
299098
|
}
|
|
298964
299099
|
return parts.join(" ");
|
|
298965
299100
|
}
|
|
@@ -299003,12 +299138,12 @@ function isSuppressibleViolation(violation) {
|
|
|
299003
299138
|
const isErrorAnnotation = violation.ruleMetadata?.["cdk:annotation"] && violation.severity?.toLowerCase() === "error";
|
|
299004
299139
|
return !isFatal && !isErrorAnnotation;
|
|
299005
299140
|
}
|
|
299006
|
-
var path35,
|
|
299141
|
+
var path35, import_chalk29, CONTROL_CHARS, SEVERITY_ORDER;
|
|
299007
299142
|
var init_validate_formatting = __esm({
|
|
299008
299143
|
"../toolkit-lib/lib/api/validate/validate-formatting.ts"() {
|
|
299009
299144
|
"use strict";
|
|
299010
299145
|
path35 = __toESM(require("node:path"));
|
|
299011
|
-
|
|
299146
|
+
import_chalk29 = __toESM(require_source());
|
|
299012
299147
|
init_private();
|
|
299013
299148
|
__name(hostMessageFromValidation, "hostMessageFromValidation");
|
|
299014
299149
|
__name(formatValidateResult, "formatValidateResult");
|
|
@@ -299229,7 +299364,7 @@ async function synthAndMeasure(ioHelper, cx, selectStacks) {
|
|
|
299229
299364
|
function zeroTime() {
|
|
299230
299365
|
return { asMs: 0, asSec: 0 };
|
|
299231
299366
|
}
|
|
299232
|
-
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;
|
|
299233
299368
|
var init_toolkit = __esm({
|
|
299234
299369
|
"../toolkit-lib/lib/toolkit/toolkit.ts"() {
|
|
299235
299370
|
"use strict";
|
|
@@ -299238,7 +299373,7 @@ var init_toolkit = __esm({
|
|
|
299238
299373
|
path37 = __toESM(require("node:path"));
|
|
299239
299374
|
cxapi10 = __toESM(require_lib3());
|
|
299240
299375
|
import_cloud_assembly_schema10 = __toESM(require_lib2());
|
|
299241
|
-
|
|
299376
|
+
import_chalk30 = __toESM(require_source());
|
|
299242
299377
|
init_esm2();
|
|
299243
299378
|
init_handler();
|
|
299244
299379
|
fs39 = __toESM(require_lib4());
|
|
@@ -299376,7 +299511,7 @@ var init_toolkit = __esm({
|
|
|
299376
299511
|
const sdkProvider = await this.sdkProvider("bootstrap");
|
|
299377
299512
|
const limit = pLimit3(20);
|
|
299378
299513
|
await Promise.all(bootstrapEnvironments.map((environment, currentIdx) => limit(async () => {
|
|
299379
|
-
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...`, {
|
|
299380
299515
|
total: bootstrapEnvironments.length,
|
|
299381
299516
|
current: currentIdx + 1,
|
|
299382
299517
|
environment
|
|
@@ -299394,7 +299529,7 @@ var init_toolkit = __esm({
|
|
|
299394
299529
|
}
|
|
299395
299530
|
);
|
|
299396
299531
|
const message2 = bootstrapResult.noOp ? `\u2705 ${environment.name} (no changes)` : `\u2705 ${environment.name}`;
|
|
299397
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I9900.msg(
|
|
299532
|
+
await ioHelper.notify(IO.CDK_TOOLKIT_I9900.msg(import_chalk30.default.green("\n" + message2), { environment }));
|
|
299398
299533
|
if (options.express) {
|
|
299399
299534
|
const warning3 = formatExpressStabilizationWarning(bootstrapResult.stabilizingResources, "bootstrap");
|
|
299400
299535
|
if (warning3) {
|
|
@@ -299410,7 +299545,7 @@ var init_toolkit = __esm({
|
|
|
299410
299545
|
results.push(result2);
|
|
299411
299546
|
} catch (e6) {
|
|
299412
299547
|
await ioHelper.notify(IO.CDK_TOOLKIT_E9900.msg(`
|
|
299413
|
-
\u274C ${
|
|
299548
|
+
\u274C ${import_chalk30.default.bold(environment.name)} failed: ${formatErrorMessage(e6)}`, { error: e6 }));
|
|
299414
299549
|
throw e6;
|
|
299415
299550
|
}
|
|
299416
299551
|
})));
|
|
@@ -299433,7 +299568,7 @@ var init_toolkit = __esm({
|
|
|
299433
299568
|
const stacks = await assembly.value.selectStacksV2(stacksOpt(options));
|
|
299434
299569
|
const autoValidateStacks = options.validateStacks ? [assembly.value.selectStacksForValidation()] : [];
|
|
299435
299570
|
await throwIfValidationFailures(assembly.value, stacks.concat(...autoValidateStacks), this.assemblyFailureAt, ioHelper);
|
|
299436
|
-
const message2 = `Successfully synthesized to ${
|
|
299571
|
+
const message2 = `Successfully synthesized to ${import_chalk30.default.blue(path37.resolve(stacks.assembly.directory))}`;
|
|
299437
299572
|
const assemblyData = {
|
|
299438
299573
|
assemblyDirectory: stacks.assembly.directory,
|
|
299439
299574
|
stacksCount: stacks.stackCount,
|
|
@@ -299454,8 +299589,8 @@ var init_toolkit = __esm({
|
|
|
299454
299589
|
}
|
|
299455
299590
|
}));
|
|
299456
299591
|
} else {
|
|
299457
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I1902.msg(
|
|
299458
|
-
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.`);
|
|
299459
299594
|
}
|
|
299460
299595
|
return new CachedCloudAssembly(assembly.take());
|
|
299461
299596
|
} catch (_) {
|
|
@@ -299627,7 +299762,7 @@ var init_toolkit = __esm({
|
|
|
299627
299762
|
}
|
|
299628
299763
|
const assetNodes = Object.values(workGraph.nodes).filter((n3) => n3.type === "asset-publish");
|
|
299629
299764
|
if (assetNodes.length === 0) {
|
|
299630
|
-
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")));
|
|
299631
299766
|
return {
|
|
299632
299767
|
publishedAssets: []
|
|
299633
299768
|
};
|
|
@@ -299648,7 +299783,7 @@ var init_toolkit = __esm({
|
|
|
299648
299783
|
publishAsset: this.createPublishAssetFunction(ioHelper, deployments, void 0, options.force),
|
|
299649
299784
|
marker: WorkGraph.NOOP
|
|
299650
299785
|
});
|
|
299651
|
-
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 }));
|
|
299652
299787
|
return {
|
|
299653
299788
|
publishedAssets: assets
|
|
299654
299789
|
};
|
|
@@ -299885,7 +300020,7 @@ var init_toolkit = __esm({
|
|
|
299885
300020
|
const deployStack2 = /* @__PURE__ */ __name(async (stackNode) => {
|
|
299886
300021
|
const stack = stackNode.stack;
|
|
299887
300022
|
if (stackCollection.stackCount !== 1) {
|
|
299888
|
-
await ioHelper.defaults.info(
|
|
300023
|
+
await ioHelper.defaults.info(import_chalk30.default.bold(stack.displayName));
|
|
299889
300024
|
}
|
|
299890
300025
|
if (!stack.environment) {
|
|
299891
300026
|
throw new ToolkitError(
|
|
@@ -299897,9 +300032,9 @@ var init_toolkit = __esm({
|
|
|
299897
300032
|
if (resourceCount === 0) {
|
|
299898
300033
|
const stackExists = await deployments.stackExists({ stack });
|
|
299899
300034
|
if (!stackExists) {
|
|
299900
|
-
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.`));
|
|
299901
300036
|
}
|
|
299902
|
-
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.`));
|
|
299903
300038
|
await this._destroy(assembly, "deploy", {
|
|
299904
300039
|
stacks: { patterns: [stack.hierarchicalId], strategy: "pattern-must-match-single" /* PATTERN_MUST_MATCH_SINGLE */ },
|
|
299905
300040
|
roleArn: options.roleArn
|
|
@@ -299933,7 +300068,7 @@ var init_toolkit = __esm({
|
|
|
299933
300068
|
const prepareResult = isChangeSetDeployment(options.deploymentMethod) ? await deployments.prepareStack({
|
|
299934
300069
|
...sharedDeployOptions,
|
|
299935
300070
|
deploymentMethod: options.deploymentMethod,
|
|
299936
|
-
|
|
300071
|
+
willExecuteChangeSet: isExecutingChangeSetDeployment(options.deploymentMethod)
|
|
299937
300072
|
}) : void 0;
|
|
299938
300073
|
if (!prepareResult?.noOp) {
|
|
299939
300074
|
const diffChangeSet = isExecuteChangeSetDeployment(options.deploymentMethod) ? (await deployments.describeChangeSet(stack, options.deploymentMethod.changeSetName, prepareResult?.stackArn)).changeSet : prepareResult?.changeSet;
|
|
@@ -299966,7 +300101,7 @@ ${deployMotivation}. Do you wish to deploy these changes?`;
|
|
|
299966
300101
|
}
|
|
299967
300102
|
}
|
|
299968
300103
|
const stackIndex = stacks.indexOf(stack) + 1;
|
|
299969
|
-
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}]`, {
|
|
299970
300105
|
total: stackCollection.stackCount,
|
|
299971
300106
|
current: stackIndex,
|
|
299972
300107
|
stack
|
|
@@ -300031,7 +300166,7 @@ ${deployMotivation}. Do you wish to deploy these changes?`;
|
|
|
300031
300166
|
}
|
|
300032
300167
|
}
|
|
300033
300168
|
const message2 = deployResult.noOp ? `\u2705 ${stack.displayName} (no changes)` : `\u2705 ${stack.displayName}`;
|
|
300034
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I5900.msg(
|
|
300169
|
+
await ioHelper.notify(IO.CDK_TOOLKIT_I5900.msg(import_chalk30.default.green("\n" + message2), deployResult));
|
|
300035
300170
|
deployDuration = await deploySpan.timing(IO.CDK_TOOLKIT_I5000);
|
|
300036
300171
|
if (options.express) {
|
|
300037
300172
|
const warning3 = formatExpressStabilizationWarning(deployResult.stabilizingResources, "deploy");
|
|
@@ -300044,7 +300179,7 @@ ${deployMotivation}. Do you wish to deploy these changes?`;
|
|
|
300044
300179
|
stackOutputs[stack.stackName] = deployResult.outputs;
|
|
300045
300180
|
for (const name of Object.keys(deployResult.outputs).sort()) {
|
|
300046
300181
|
const value = deployResult.outputs[name];
|
|
300047
|
-
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))}`);
|
|
300048
300183
|
}
|
|
300049
300184
|
await ioHelper.notify(IO.CDK_TOOLKIT_I5901.msg(buffer.join("\n")));
|
|
300050
300185
|
}
|
|
@@ -300063,7 +300198,7 @@ ${deployResult.stackArn}`));
|
|
|
300063
300198
|
});
|
|
300064
300199
|
} catch (e6) {
|
|
300065
300200
|
const code = ToolkitError.isToolkitError(e6) ? e6.name : "DeployStackFailed";
|
|
300066
|
-
const newMessage = [`\u274C ${
|
|
300201
|
+
const newMessage = [`\u274C ${import_chalk30.default.bold(stack.stackName)} failed:`, ...e6.name ? [`${e6.name}:`] : [], e6.message].join(" ");
|
|
300067
300202
|
throw new ToolkitError(code, newMessage);
|
|
300068
300203
|
} finally {
|
|
300069
300204
|
if (options.traceLogs) {
|
|
@@ -300358,7 +300493,7 @@ ${deployResult.stackArn}`));
|
|
|
300358
300493
|
}
|
|
300359
300494
|
let anyRollbackable = false;
|
|
300360
300495
|
for (const [index, stack] of stacks.stackArtifacts.entries()) {
|
|
300361
|
-
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)}`, {
|
|
300362
300497
|
total: stacks.stackCount,
|
|
300363
300498
|
current: index + 1,
|
|
300364
300499
|
stack
|
|
@@ -300388,7 +300523,7 @@ ${deployResult.stackArn}`));
|
|
|
300388
300523
|
});
|
|
300389
300524
|
} catch (e6) {
|
|
300390
300525
|
await ioHelper.notify(IO.CDK_TOOLKIT_E6900.msg(`
|
|
300391
|
-
\u274C ${
|
|
300526
|
+
\u274C ${import_chalk30.default.bold(stack.displayName)} failed: ${formatErrorMessage(e6)}`, { error: e6 }));
|
|
300392
300527
|
throw ToolkitError.withCause("RollbackFailed", "Rollback failed (use --force to orphan failing resources)", e6);
|
|
300393
300528
|
}
|
|
300394
300529
|
}
|
|
@@ -300480,7 +300615,7 @@ Next steps:
|
|
|
300480
300615
|
`;
|
|
300481
300616
|
message2 += "Creation of new stacks is not yet supported by the refactor command. ";
|
|
300482
300617
|
message2 += "Please deploy any new stacks separately before refactoring your stacks.";
|
|
300483
|
-
await ioHelper.defaults.error(
|
|
300618
|
+
await ioHelper.defaults.error(import_chalk30.default.red(message2));
|
|
300484
300619
|
continue;
|
|
300485
300620
|
}
|
|
300486
300621
|
try {
|
|
@@ -300519,7 +300654,7 @@ Next steps:
|
|
|
300519
300654
|
continue;
|
|
300520
300655
|
}
|
|
300521
300656
|
if (process.stdout.isTTY && !await confirm2(options.force ?? false)) {
|
|
300522
|
-
await ioHelper.defaults.info(
|
|
300657
|
+
await ioHelper.defaults.info(import_chalk30.default.red(`Refactoring canceled for environment aws://${environment.account}/${environment.region}
|
|
300523
300658
|
`));
|
|
300524
300659
|
continue;
|
|
300525
300660
|
}
|
|
@@ -300626,7 +300761,7 @@ Next steps:
|
|
|
300626
300761
|
stacks: []
|
|
300627
300762
|
};
|
|
300628
300763
|
const motivation = "Destroying stacks is an irreversible action";
|
|
300629
|
-
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(", "))}`;
|
|
300630
300765
|
const confirmed = await ioHelper.requestResponse(IO.CDK_TOOLKIT_I7010.req(question2, { motivation }));
|
|
300631
300766
|
if (!confirmed) {
|
|
300632
300767
|
await ioHelper.notify(IO.CDK_TOOLKIT_E7010.msg("Aborted by user"));
|
|
@@ -300642,7 +300777,7 @@ Next steps:
|
|
|
300642
300777
|
const stack = stackNode.stack;
|
|
300643
300778
|
destroyCount++;
|
|
300644
300779
|
try {
|
|
300645
|
-
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}]`), {
|
|
300646
300781
|
total: stacks.stackCount,
|
|
300647
300782
|
current: destroyCount,
|
|
300648
300783
|
stack
|
|
@@ -300664,8 +300799,8 @@ Next steps:
|
|
|
300664
300799
|
stackArn: result2.stackArn,
|
|
300665
300800
|
stackExisted: result2.stackArn !== void 0
|
|
300666
300801
|
});
|
|
300667
|
-
await ioHelper.notify(IO.CDK_TOOLKIT_I7900.msg(
|
|
300668
|
-
\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));
|
|
300669
300804
|
if (options.express) {
|
|
300670
300805
|
const warning3 = formatExpressStabilizationWarning(result2.stabilizingResources, "destroy");
|
|
300671
300806
|
if (warning3) {
|
|
@@ -300675,7 +300810,7 @@ Next steps:
|
|
|
300675
300810
|
await singleDestroySpan.end();
|
|
300676
300811
|
} catch (e6) {
|
|
300677
300812
|
await ioHelper.notify(IO.CDK_TOOLKIT_E7900.msg(`
|
|
300678
|
-
\u274C ${
|
|
300813
|
+
\u274C ${import_chalk30.default.blue(stack.displayName)}: ${action} failed ${e6}`, { error: e6 }));
|
|
300679
300814
|
throw e6;
|
|
300680
300815
|
}
|
|
300681
300816
|
}, "destroyStack");
|
|
@@ -330406,14 +330541,14 @@ var init_proxy_agent = __esm({
|
|
|
330406
330541
|
});
|
|
330407
330542
|
|
|
330408
330543
|
// lib/engines/toolkit-lib.ts
|
|
330409
|
-
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;
|
|
330410
330545
|
var init_toolkit_lib = __esm({
|
|
330411
330546
|
"lib/engines/toolkit-lib.ts"() {
|
|
330412
330547
|
"use strict";
|
|
330413
330548
|
path38 = __toESM(require("node:path"));
|
|
330414
330549
|
import_cloud_assembly_api16 = __toESM(require_lib3());
|
|
330415
330550
|
import_toolkit_lib = __toESM(require_lib11());
|
|
330416
|
-
|
|
330551
|
+
import_chalk31 = __toESM(require_source());
|
|
330417
330552
|
fs41 = __toESM(require_lib4());
|
|
330418
330553
|
init_proxy_agent();
|
|
330419
330554
|
ToolkitLibRunnerEngine = class {
|
|
@@ -330677,13 +330812,13 @@ var init_toolkit_lib = __esm({
|
|
|
330677
330812
|
let color;
|
|
330678
330813
|
switch (msg.level) {
|
|
330679
330814
|
case "error":
|
|
330680
|
-
color =
|
|
330815
|
+
color = import_chalk31.default.red;
|
|
330681
330816
|
break;
|
|
330682
330817
|
case "warn":
|
|
330683
|
-
color =
|
|
330818
|
+
color = import_chalk31.default.yellow;
|
|
330684
330819
|
break;
|
|
330685
330820
|
default:
|
|
330686
|
-
color =
|
|
330821
|
+
color = import_chalk31.default.gray;
|
|
330687
330822
|
}
|
|
330688
330823
|
return super.notify({
|
|
330689
330824
|
...msg,
|
|
@@ -331235,7 +331370,7 @@ var init_cdk_test_app = __esm({
|
|
|
331235
331370
|
|
|
331236
331371
|
// lib/workers/common.ts
|
|
331237
331372
|
function formatAssertionResults(results) {
|
|
331238
|
-
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}` : `
|
|
331239
331374
|
${result2.message}`)).join("\n ");
|
|
331240
331375
|
}
|
|
331241
331376
|
function formatError(error4) {
|
|
@@ -331243,16 +331378,16 @@ function formatError(error4) {
|
|
|
331243
331378
|
const message2 = error4.message || String(error4);
|
|
331244
331379
|
if (error4.cause) {
|
|
331245
331380
|
return `${name}: ${message2}
|
|
331246
|
-
${
|
|
331381
|
+
${import_chalk32.default.gray("Cause: " + formatError(error4.cause))}`;
|
|
331247
331382
|
}
|
|
331248
331383
|
return `${name}: ${message2}`;
|
|
331249
331384
|
}
|
|
331250
|
-
var
|
|
331385
|
+
var import_util72, import_chalk32;
|
|
331251
331386
|
var init_common4 = __esm({
|
|
331252
331387
|
"lib/workers/common.ts"() {
|
|
331253
331388
|
"use strict";
|
|
331254
|
-
|
|
331255
|
-
|
|
331389
|
+
import_util72 = require("util");
|
|
331390
|
+
import_chalk32 = __toESM(require_source());
|
|
331256
331391
|
init_logger();
|
|
331257
331392
|
__name(formatAssertionResults, "formatAssertionResults");
|
|
331258
331393
|
__name(formatError, "formatError");
|
|
@@ -331783,14 +331918,14 @@ These resources are no longer managed by CloudFormation but still exist and may
|
|
|
331783
331918
|
});
|
|
331784
331919
|
|
|
331785
331920
|
// lib/runner/snapshot-test-runner.ts
|
|
331786
|
-
var path42, import_stream, import_string_decoder,
|
|
331921
|
+
var path42, import_stream, import_string_decoder, import_cloudformation_diff5, IntegSnapshotRunner, StringWritable;
|
|
331787
331922
|
var init_snapshot_test_runner = __esm({
|
|
331788
331923
|
"lib/runner/snapshot-test-runner.ts"() {
|
|
331789
331924
|
"use strict";
|
|
331790
331925
|
path42 = __toESM(require("path"));
|
|
331791
331926
|
import_stream = require("stream");
|
|
331792
331927
|
import_string_decoder = require("string_decoder");
|
|
331793
|
-
|
|
331928
|
+
import_cloudformation_diff5 = __toESM(require_lib10());
|
|
331794
331929
|
init_cdk_test_app();
|
|
331795
331930
|
init_common4();
|
|
331796
331931
|
IntegSnapshotRunner = class {
|
|
@@ -331915,7 +332050,7 @@ var init_snapshot_test_runner = __esm({
|
|
|
331915
332050
|
actualTemplate = this.canonicalizeTemplate(actualTemplate, actual[stackId].assets);
|
|
331916
332051
|
expectedTemplate = this.canonicalizeTemplate(expectedTemplate, expected[stackId].assets);
|
|
331917
332052
|
}
|
|
331918
|
-
const templateDiff = (0,
|
|
332053
|
+
const templateDiff = (0, import_cloudformation_diff5.fullDiff)(expectedTemplate, actualTemplate);
|
|
331919
332054
|
if (!templateDiff.isEmpty) {
|
|
331920
332055
|
const allowedDestroyTypes = await this.getAllowedDestroyTypesForStack(actualApp, stackId) ?? [];
|
|
331921
332056
|
templateDiff.resources.forEachDifference((logicalId, change) => {
|
|
@@ -331925,16 +332060,16 @@ var init_snapshot_test_runner = __esm({
|
|
|
331925
332060
|
}
|
|
331926
332061
|
if (change.isRemoval) {
|
|
331927
332062
|
destructiveChanges.push({
|
|
331928
|
-
impact:
|
|
332063
|
+
impact: import_cloudformation_diff5.ResourceImpact.WILL_DESTROY,
|
|
331929
332064
|
logicalId,
|
|
331930
332065
|
stackName: templateId
|
|
331931
332066
|
});
|
|
331932
332067
|
} else {
|
|
331933
332068
|
switch (change.changeImpact) {
|
|
331934
|
-
case
|
|
331935
|
-
case
|
|
331936
|
-
case
|
|
331937
|
-
case
|
|
332069
|
+
case import_cloudformation_diff5.ResourceImpact.MAY_REPLACE:
|
|
332070
|
+
case import_cloudformation_diff5.ResourceImpact.WILL_ORPHAN:
|
|
332071
|
+
case import_cloudformation_diff5.ResourceImpact.WILL_DESTROY:
|
|
332072
|
+
case import_cloudformation_diff5.ResourceImpact.WILL_REPLACE:
|
|
331938
332073
|
destructiveChanges.push({
|
|
331939
332074
|
impact: change.changeImpact,
|
|
331940
332075
|
logicalId,
|
|
@@ -331945,7 +332080,7 @@ var init_snapshot_test_runner = __esm({
|
|
|
331945
332080
|
}
|
|
331946
332081
|
});
|
|
331947
332082
|
const writable = new StringWritable({});
|
|
331948
|
-
(0,
|
|
332083
|
+
(0, import_cloudformation_diff5.formatDifferences)(writable, templateDiff);
|
|
331949
332084
|
failures.push({
|
|
331950
332085
|
reason: "SNAPSHOT_FAILED" /* SNAPSHOT_FAILED */,
|
|
331951
332086
|
message: writable.data,
|