@aws-cdk/integ-runner 2.197.23 → 2.197.24
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/lib/workers/extract/index.js +290 -96
- package/package.json +6 -6
|
@@ -1345,6 +1345,13 @@ var init_interfaces = __esm({
|
|
|
1345
1345
|
}
|
|
1346
1346
|
});
|
|
1347
1347
|
|
|
1348
|
+
// ../cloud-assembly-schema/lib/cloud-assembly/validation-report-schema.ts
|
|
1349
|
+
var init_validation_report_schema = __esm({
|
|
1350
|
+
"../cloud-assembly-schema/lib/cloud-assembly/validation-report-schema.ts"() {
|
|
1351
|
+
"use strict";
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
|
|
1348
1355
|
// ../cloud-assembly-schema/lib/cloud-assembly/index.ts
|
|
1349
1356
|
var cloud_assembly_exports = {};
|
|
1350
1357
|
__export(cloud_assembly_exports, {
|
|
@@ -1362,6 +1369,7 @@ var init_cloud_assembly = __esm({
|
|
|
1362
1369
|
init_artifact_schema();
|
|
1363
1370
|
init_context_queries();
|
|
1364
1371
|
init_interfaces();
|
|
1372
|
+
init_validation_report_schema();
|
|
1365
1373
|
}
|
|
1366
1374
|
});
|
|
1367
1375
|
|
|
@@ -4723,7 +4731,7 @@ var require_semver2 = __commonJS({
|
|
|
4723
4731
|
// ../cloud-assembly-schema/cli-version.json
|
|
4724
4732
|
var require_cli_version = __commonJS({
|
|
4725
4733
|
"../cloud-assembly-schema/cli-version.json"(exports2, module2) {
|
|
4726
|
-
module2.exports = { version: "2.1124.
|
|
4734
|
+
module2.exports = { version: "2.1124.1" };
|
|
4727
4735
|
}
|
|
4728
4736
|
});
|
|
4729
4737
|
|
|
@@ -6756,6 +6764,175 @@ var require_integ_schema = __commonJS({
|
|
|
6756
6764
|
}
|
|
6757
6765
|
});
|
|
6758
6766
|
|
|
6767
|
+
// ../cloud-assembly-schema/schema/validation-report.schema.json
|
|
6768
|
+
var require_validation_report_schema = __commonJS({
|
|
6769
|
+
"../cloud-assembly-schema/schema/validation-report.schema.json"(exports2, module2) {
|
|
6770
|
+
module2.exports = {
|
|
6771
|
+
$ref: "#/definitions/PolicyValidationReportJson",
|
|
6772
|
+
definitions: {
|
|
6773
|
+
PolicyValidationReportJson: {
|
|
6774
|
+
description: "The top-level structure of the policy validation report file.",
|
|
6775
|
+
type: "object",
|
|
6776
|
+
properties: {
|
|
6777
|
+
version: {
|
|
6778
|
+
description: "Protocol version",
|
|
6779
|
+
type: "string"
|
|
6780
|
+
},
|
|
6781
|
+
title: {
|
|
6782
|
+
description: "Report title, if present.",
|
|
6783
|
+
type: "string"
|
|
6784
|
+
},
|
|
6785
|
+
pluginReports: {
|
|
6786
|
+
description: "Reports from all validation plugins that ran during synthesis.",
|
|
6787
|
+
type: "array",
|
|
6788
|
+
items: {
|
|
6789
|
+
$ref: "#/definitions/PluginReportJson"
|
|
6790
|
+
}
|
|
6791
|
+
}
|
|
6792
|
+
},
|
|
6793
|
+
required: ["version", "pluginReports"]
|
|
6794
|
+
},
|
|
6795
|
+
PluginReportJson: {
|
|
6796
|
+
description: "A report from a single validation plugin.",
|
|
6797
|
+
type: "object",
|
|
6798
|
+
properties: {
|
|
6799
|
+
pluginName: {
|
|
6800
|
+
description: "The name of the plugin that produced this report.",
|
|
6801
|
+
type: "string"
|
|
6802
|
+
},
|
|
6803
|
+
pluginVersion: {
|
|
6804
|
+
description: "Version of the plugin that produced this report.",
|
|
6805
|
+
type: "string"
|
|
6806
|
+
},
|
|
6807
|
+
conclusion: {
|
|
6808
|
+
description: "Whether the plugin's validation passed or failed.",
|
|
6809
|
+
$ref: "#/definitions/PolicyValidationReportConclusion"
|
|
6810
|
+
},
|
|
6811
|
+
metadata: {
|
|
6812
|
+
description: "Additional plugin-specific metadata.",
|
|
6813
|
+
type: "object",
|
|
6814
|
+
additionalProperties: {
|
|
6815
|
+
type: "string"
|
|
6816
|
+
}
|
|
6817
|
+
},
|
|
6818
|
+
violations: {
|
|
6819
|
+
description: "Violations found by this plugin.",
|
|
6820
|
+
type: "array",
|
|
6821
|
+
items: {
|
|
6822
|
+
$ref: "#/definitions/PolicyViolationJson"
|
|
6823
|
+
}
|
|
6824
|
+
}
|
|
6825
|
+
},
|
|
6826
|
+
required: ["pluginName", "conclusion", "violations"]
|
|
6827
|
+
},
|
|
6828
|
+
PolicyValidationReportConclusion: {
|
|
6829
|
+
description: "The final conclusion of a validation report.",
|
|
6830
|
+
type: "string",
|
|
6831
|
+
enum: ["success", "failure"]
|
|
6832
|
+
},
|
|
6833
|
+
PolicyViolationJson: {
|
|
6834
|
+
description: "A single policy violation found by a validation plugin.",
|
|
6835
|
+
type: "object",
|
|
6836
|
+
properties: {
|
|
6837
|
+
ruleName: {
|
|
6838
|
+
description: "The name of the rule that was violated.",
|
|
6839
|
+
type: "string"
|
|
6840
|
+
},
|
|
6841
|
+
description: {
|
|
6842
|
+
description: "A description of the violation.",
|
|
6843
|
+
type: "string"
|
|
6844
|
+
},
|
|
6845
|
+
suggestedFix: {
|
|
6846
|
+
description: "How to fix the violation.",
|
|
6847
|
+
type: "string"
|
|
6848
|
+
},
|
|
6849
|
+
severity: {
|
|
6850
|
+
description: "The severity of the violation.",
|
|
6851
|
+
$ref: "#/definitions/PolicyViolationSeverity"
|
|
6852
|
+
},
|
|
6853
|
+
customSeverity: {
|
|
6854
|
+
description: "If the plugin wants to report using a non-standard severity, put it here.",
|
|
6855
|
+
type: "string"
|
|
6856
|
+
},
|
|
6857
|
+
ruleMetadata: {
|
|
6858
|
+
description: "Additional rule-specific metadata.",
|
|
6859
|
+
type: "object",
|
|
6860
|
+
additionalProperties: {
|
|
6861
|
+
type: "string"
|
|
6862
|
+
}
|
|
6863
|
+
},
|
|
6864
|
+
violatingConstructs: {
|
|
6865
|
+
description: "Constructs that violated the rule.",
|
|
6866
|
+
type: "array",
|
|
6867
|
+
items: {
|
|
6868
|
+
$ref: "#/definitions/ViolatingConstructJson"
|
|
6869
|
+
}
|
|
6870
|
+
}
|
|
6871
|
+
},
|
|
6872
|
+
required: ["ruleName", "description", "severity", "violatingConstructs"]
|
|
6873
|
+
},
|
|
6874
|
+
PolicyViolationSeverity: {
|
|
6875
|
+
description: "The severity of a policy violation.",
|
|
6876
|
+
type: "string",
|
|
6877
|
+
enum: ["fatal", "error", "warning", "info", "custom"]
|
|
6878
|
+
},
|
|
6879
|
+
ViolatingConstructJson: {
|
|
6880
|
+
description: "A construct that violated a policy rule.",
|
|
6881
|
+
type: "object",
|
|
6882
|
+
properties: {
|
|
6883
|
+
constructPath: {
|
|
6884
|
+
description: "The construct path as defined in the application.",
|
|
6885
|
+
type: "string"
|
|
6886
|
+
},
|
|
6887
|
+
constructFqn: {
|
|
6888
|
+
description: "The fully qualified name of the construct class (includes the library name).",
|
|
6889
|
+
type: "string"
|
|
6890
|
+
},
|
|
6891
|
+
libraryVersion: {
|
|
6892
|
+
description: "The version of the library that contains this construct.",
|
|
6893
|
+
type: "string"
|
|
6894
|
+
},
|
|
6895
|
+
cloudFormationResource: {
|
|
6896
|
+
description: "If this construct violation regards a CloudFormation resource, a reference to the resource details.",
|
|
6897
|
+
$ref: "#/definitions/CloudFormationResourceJson"
|
|
6898
|
+
},
|
|
6899
|
+
stackTraces: {
|
|
6900
|
+
description: "Stack traces associated with this violation.",
|
|
6901
|
+
type: "array",
|
|
6902
|
+
items: {
|
|
6903
|
+
type: "string"
|
|
6904
|
+
}
|
|
6905
|
+
}
|
|
6906
|
+
},
|
|
6907
|
+
required: ["constructPath"]
|
|
6908
|
+
},
|
|
6909
|
+
CloudFormationResourceJson: {
|
|
6910
|
+
description: "CloudFormation resource details for a violating construct.",
|
|
6911
|
+
type: "object",
|
|
6912
|
+
properties: {
|
|
6913
|
+
templatePath: {
|
|
6914
|
+
description: "The path to the CloudFormation template containing this resource.",
|
|
6915
|
+
type: "string"
|
|
6916
|
+
},
|
|
6917
|
+
logicalId: {
|
|
6918
|
+
description: "The logical ID of the resource in the CloudFormation template.",
|
|
6919
|
+
type: "string"
|
|
6920
|
+
},
|
|
6921
|
+
propertyPaths: {
|
|
6922
|
+
description: "Properties within the construct where the violation was detected.",
|
|
6923
|
+
type: "array",
|
|
6924
|
+
items: {
|
|
6925
|
+
type: "string"
|
|
6926
|
+
}
|
|
6927
|
+
}
|
|
6928
|
+
},
|
|
6929
|
+
required: ["templatePath", "logicalId"]
|
|
6930
|
+
}
|
|
6931
|
+
}
|
|
6932
|
+
};
|
|
6933
|
+
}
|
|
6934
|
+
});
|
|
6935
|
+
|
|
6759
6936
|
// ../cloud-assembly-schema/schema/version.json
|
|
6760
6937
|
var require_version = __commonJS({
|
|
6761
6938
|
"../cloud-assembly-schema/schema/version.json"(exports2, module2) {
|
|
@@ -6776,7 +6953,7 @@ __export(manifest_exports, {
|
|
|
6776
6953
|
function stripEnumErrors(errors) {
|
|
6777
6954
|
return errors.filter((e32) => typeof e32.schema === "string" || !("enum" in e32.schema));
|
|
6778
6955
|
}
|
|
6779
|
-
var fs, jsonschema, semver, VERSION_MISMATCH, CLI_VERSION, ASSETS_SCHEMA, ASSEMBLY_SCHEMA, INTEG_SCHEMA, SCHEMA_VERSION, Manifest;
|
|
6956
|
+
var fs, jsonschema, semver, VERSION_MISMATCH, CLI_VERSION, ASSETS_SCHEMA, ASSEMBLY_SCHEMA, INTEG_SCHEMA, VALIDATION_REPORT_SCHEMA, SCHEMA_VERSION, Manifest;
|
|
6780
6957
|
var init_manifest = __esm({
|
|
6781
6958
|
"../cloud-assembly-schema/lib/manifest.ts"() {
|
|
6782
6959
|
"use strict";
|
|
@@ -6789,6 +6966,7 @@ var init_manifest = __esm({
|
|
|
6789
6966
|
ASSETS_SCHEMA = require_assets_schema();
|
|
6790
6967
|
ASSEMBLY_SCHEMA = require_cloud_assembly_schema();
|
|
6791
6968
|
INTEG_SCHEMA = require_integ_schema();
|
|
6969
|
+
VALIDATION_REPORT_SCHEMA = require_validation_report_schema();
|
|
6792
6970
|
SCHEMA_VERSION = require_version();
|
|
6793
6971
|
Manifest = class _Manifest {
|
|
6794
6972
|
static {
|
|
@@ -6849,6 +7027,14 @@ var init_manifest = __esm({
|
|
|
6849
7027
|
testCases: manifest.testCases ?? []
|
|
6850
7028
|
};
|
|
6851
7029
|
}
|
|
7030
|
+
/**
|
|
7031
|
+
* Load and validate the policy validation report from file.
|
|
7032
|
+
*
|
|
7033
|
+
* @param filePath - path to the validation report file.
|
|
7034
|
+
*/
|
|
7035
|
+
static loadValidationReport(filePath) {
|
|
7036
|
+
return _Manifest.loadManifest(filePath, VALIDATION_REPORT_SCHEMA);
|
|
7037
|
+
}
|
|
6852
7038
|
/**
|
|
6853
7039
|
* Fetch the current schema version number.
|
|
6854
7040
|
*/
|
|
@@ -128188,11 +128374,11 @@ var require_randomUUID = __commonJS({
|
|
|
128188
128374
|
var require_dist_cjs40 = __commonJS({
|
|
128189
128375
|
"../../../node_modules/@smithy/uuid/dist-cjs/index.js"(exports2) {
|
|
128190
128376
|
"use strict";
|
|
128191
|
-
var
|
|
128377
|
+
var randomUUID9 = require_randomUUID();
|
|
128192
128378
|
var decimalToHex6 = Array.from({ length: 256 }, (_2, i32) => i32.toString(16).padStart(2, "0"));
|
|
128193
128379
|
var v46 = /* @__PURE__ */ __name(() => {
|
|
128194
|
-
if (
|
|
128195
|
-
return
|
|
128380
|
+
if (randomUUID9.randomUUID) {
|
|
128381
|
+
return randomUUID9.randomUUID();
|
|
128196
128382
|
}
|
|
128197
128383
|
const rnds = new Uint8Array(16);
|
|
128198
128384
|
crypto.getRandomValues(rnds);
|
|
@@ -416427,13 +416613,13 @@ async function waitFor(valueProvider, timeout = 5e3) {
|
|
|
416427
416613
|
async function waitForChangeSet(cfn, ioHelper, stackNameOrArn, changeSetNameOrArn, { fetchAll, diagnoser }) {
|
|
416428
416614
|
const stackDisplayName = stackNameFromArn(stackNameOrArn);
|
|
416429
416615
|
const changeSetDisplayName = changeSetNameFromArn(changeSetNameOrArn);
|
|
416430
|
-
await ioHelper.defaults.debug((0,
|
|
416616
|
+
await ioHelper.defaults.debug((0, import_node_util2.format)("Waiting for changeset %s on stack %s to finish creating...", changeSetDisplayName, stackDisplayName));
|
|
416431
416617
|
const ret = await waitFor(async () => {
|
|
416432
416618
|
const description = await describeChangeSet(cfn, stackNameOrArn, changeSetNameOrArn, {
|
|
416433
416619
|
fetchAll
|
|
416434
416620
|
});
|
|
416435
416621
|
if (description.Status === "CREATE_PENDING" || description.Status === "CREATE_IN_PROGRESS") {
|
|
416436
|
-
await ioHelper.defaults.debug((0,
|
|
416622
|
+
await ioHelper.defaults.debug((0, import_node_util2.format)("Changeset %s on stack %s is still creating", changeSetDisplayName, stackDisplayName));
|
|
416437
416623
|
return void 0;
|
|
416438
416624
|
}
|
|
416439
416625
|
const diag = await diagnoser.diagnoseChangeSet(description);
|
|
@@ -416450,7 +416636,7 @@ async function waitForChangeSet(cfn, ioHelper, stackNameOrArn, changeSetNameOrAr
|
|
|
416450
416636
|
async function waitForChangeSetGone(cfn, ioHelper, stackNameOrArn, changeSetNameOrArn) {
|
|
416451
416637
|
const stackDisplayName = stackNameFromArn(stackNameOrArn);
|
|
416452
416638
|
const changeSetDisplayName = changeSetNameFromArn(changeSetNameOrArn);
|
|
416453
|
-
await ioHelper.defaults.debug((0,
|
|
416639
|
+
await ioHelper.defaults.debug((0, import_node_util2.format)("Waiting for changeset %s on stack %s to finish deleting...", changeSetDisplayName, stackDisplayName));
|
|
416454
416640
|
await waitFor(async () => {
|
|
416455
416641
|
try {
|
|
416456
416642
|
const description = await cfn.describeChangeSet({
|
|
@@ -416512,7 +416698,7 @@ async function uploadBodyParameterAndCreateChangeSet(ioHelper, env2, options) {
|
|
|
416512
416698
|
);
|
|
416513
416699
|
const cfn = env2.sdk.cloudFormation();
|
|
416514
416700
|
const stack = await CloudFormationStack.lookup(cfn, options.stack.stackName, false);
|
|
416515
|
-
const exists = stack.exists && stack.stackStatus.name !== "REVIEW_IN_PROGRESS";
|
|
416701
|
+
const exists = stack.exists && stack.stackStatus.name !== "REVIEW_IN_PROGRESS" && stack.stackStatus.name !== "DELETE_IN_PROGRESS";
|
|
416516
416702
|
const executionRoleArn = await env2.replacePlaceholders(options.stack.cloudFormationExecutionRoleArn);
|
|
416517
416703
|
await ioHelper.defaults.info(
|
|
416518
416704
|
"Hold on while we create a read-only change set to get a diff with accurate replacement information (use --method=template to use a less accurate but faster template-only diff)\n"
|
|
@@ -416578,7 +416764,7 @@ async function createChangeSetAndCleanup(ioHelper, options) {
|
|
|
416578
416764
|
Tags: toCfnTags(options.stack.tags),
|
|
416579
416765
|
Capabilities: ["CAPABILITY_IAM", "CAPABILITY_NAMED_IAM", "CAPABILITY_AUTO_EXPAND"]
|
|
416580
416766
|
});
|
|
416581
|
-
await ioHelper.defaults.debug((0,
|
|
416767
|
+
await ioHelper.defaults.debug((0, import_node_util2.format)("Initiated creation of changeset: %s; waiting for it to finish creating...", changeSet.Id));
|
|
416582
416768
|
const createdChangeSet = await waitForChangeSet(
|
|
416583
416769
|
options.cfn,
|
|
416584
416770
|
ioHelper,
|
|
@@ -416595,6 +416781,13 @@ async function createChangeSetAndCleanup(ioHelper, options) {
|
|
|
416595
416781
|
changeSet.Id ?? options.changeSetName,
|
|
416596
416782
|
changeSet.StackId ?? options.stack.stackName
|
|
416597
416783
|
);
|
|
416784
|
+
if (!options.exists) {
|
|
416785
|
+
await ioHelper.defaults.debug((0, import_node_util2.format)("Deleting empty stack created by diff changeset: %s", changeSet.StackId ?? options.stack.stackName));
|
|
416786
|
+
await options.cfn.deleteStack({
|
|
416787
|
+
StackName: changeSet.StackId ?? options.stack.stackName,
|
|
416788
|
+
ClientRequestToken: (0, import_node_crypto11.randomUUID)()
|
|
416789
|
+
});
|
|
416790
|
+
}
|
|
416598
416791
|
return createdChangeSet;
|
|
416599
416792
|
}
|
|
416600
416793
|
function toCfnTags(tags) {
|
|
@@ -416646,28 +416839,29 @@ async function waitForStackDeploy(cfn, ioHelper, stackName) {
|
|
|
416646
416839
|
}
|
|
416647
416840
|
async function stabilizeStack(cfn, ioHelper, stackNameOrArn) {
|
|
416648
416841
|
const stackDisplayName = stackNameFromArn(stackNameOrArn);
|
|
416649
|
-
await ioHelper.defaults.debug((0,
|
|
416842
|
+
await ioHelper.defaults.debug((0, import_node_util2.format)("Waiting for stack %s to finish creating or updating...", stackDisplayName));
|
|
416650
416843
|
return waitFor(async () => {
|
|
416651
416844
|
const stack = await CloudFormationStack.lookup(cfn, stackNameOrArn);
|
|
416652
416845
|
if (!stack.exists) {
|
|
416653
|
-
await ioHelper.defaults.debug((0,
|
|
416846
|
+
await ioHelper.defaults.debug((0, import_node_util2.format)("Stack %s does not exist", stackDisplayName));
|
|
416654
416847
|
return null;
|
|
416655
416848
|
}
|
|
416656
416849
|
const status = stack.stackStatus;
|
|
416657
416850
|
if (status.isInProgress) {
|
|
416658
|
-
await ioHelper.defaults.debug((0,
|
|
416851
|
+
await ioHelper.defaults.debug((0, import_node_util2.format)("Stack %s has an ongoing operation in progress and is not stable (%s)", stackDisplayName, status));
|
|
416659
416852
|
return void 0;
|
|
416660
416853
|
} else if (status.isReviewInProgress) {
|
|
416661
|
-
await ioHelper.defaults.debug((0,
|
|
416854
|
+
await ioHelper.defaults.debug((0, import_node_util2.format)("Stack %s is in REVIEW_IN_PROGRESS state. Considering this is a stable status (%s)", stackDisplayName, status));
|
|
416662
416855
|
}
|
|
416663
416856
|
return stack;
|
|
416664
416857
|
});
|
|
416665
416858
|
}
|
|
416666
|
-
var
|
|
416859
|
+
var import_node_crypto11, import_node_util2, import_cdk_assets_lib2, cxapi2, import_cloud_assembly_api6, import_client_cloudformation4, TemplateParameters, ParameterValues;
|
|
416667
416860
|
var init_cfn_api = __esm({
|
|
416668
416861
|
"../toolkit-lib/lib/api/deployments/cfn-api.ts"() {
|
|
416669
416862
|
"use strict";
|
|
416670
|
-
|
|
416863
|
+
import_node_crypto11 = require("node:crypto");
|
|
416864
|
+
import_node_util2 = require("node:util");
|
|
416671
416865
|
import_cdk_assets_lib2 = __toESM(require_lib6());
|
|
416672
416866
|
cxapi2 = __toESM(require_lib3());
|
|
416673
416867
|
import_cloud_assembly_api6 = __toESM(require_lib3());
|
|
@@ -416788,11 +416982,11 @@ var init_cfn_api = __esm({
|
|
|
416788
416982
|
});
|
|
416789
416983
|
|
|
416790
416984
|
// ../toolkit-lib/lib/api/toolkit-info.ts
|
|
416791
|
-
var
|
|
416985
|
+
var import_util30, chalk5, DEFAULT_TOOLKIT_STACK_NAME, ToolkitInfo, ExistingToolkitInfo, BootstrapStackNotFoundInfo;
|
|
416792
416986
|
var init_toolkit_info = __esm({
|
|
416793
416987
|
"../toolkit-lib/lib/api/toolkit-info.ts"() {
|
|
416794
416988
|
"use strict";
|
|
416795
|
-
|
|
416989
|
+
import_util30 = require("util");
|
|
416796
416990
|
chalk5 = __toESM(require_source());
|
|
416797
416991
|
init_bootstrap_props();
|
|
416798
416992
|
init_toolkit_error();
|
|
@@ -416812,7 +417006,7 @@ var init_toolkit_info = __esm({
|
|
|
416812
417006
|
const stack = await stabilizeStack(cfn, ioHelper, stackName);
|
|
416813
417007
|
if (!stack) {
|
|
416814
417008
|
await ioHelper.defaults.debug(
|
|
416815
|
-
(0,
|
|
417009
|
+
(0, import_util30.format)(
|
|
416816
417010
|
"The environment %s doesn't have the CDK toolkit stack (%s) installed. Use %s to setup your environment for use with the toolkit.",
|
|
416817
417011
|
environment.name,
|
|
416818
417012
|
stackName,
|
|
@@ -416823,7 +417017,7 @@ var init_toolkit_info = __esm({
|
|
|
416823
417017
|
}
|
|
416824
417018
|
if (stack.stackStatus.isCreationFailure) {
|
|
416825
417019
|
await ioHelper.defaults.debug(
|
|
416826
|
-
(0,
|
|
417020
|
+
(0, import_util30.format)(
|
|
416827
417021
|
"The environment %s has a CDK toolkit stack (%s) that failed to create. Use %s to try provisioning it again.",
|
|
416828
417022
|
environment.name,
|
|
416829
417023
|
stackName,
|
|
@@ -421133,14 +421327,14 @@ function settingsFromSynthOptions(synthOpts = {}) {
|
|
|
421133
421327
|
function parametersFromSynthOptions(synthOptions) {
|
|
421134
421328
|
return synthParametersFromSettings(settingsFromSynthOptions(synthOptions ?? {}));
|
|
421135
421329
|
}
|
|
421136
|
-
var import_dispose_polyfill4, os9, path26,
|
|
421330
|
+
var import_dispose_polyfill4, os9, path26, import_node_util3, import_cloud_assembly_api9, cxschema9, cxapi4, fs28, import_semver, ExecutionEnvironment;
|
|
421137
421331
|
var init_prepare_source = __esm({
|
|
421138
421332
|
"../toolkit-lib/lib/api/cloud-assembly/private/prepare-source.ts"() {
|
|
421139
421333
|
"use strict";
|
|
421140
421334
|
import_dispose_polyfill4 = __toESM(require_dispose_polyfill());
|
|
421141
421335
|
os9 = __toESM(require("node:os"));
|
|
421142
421336
|
path26 = __toESM(require("node:path"));
|
|
421143
|
-
|
|
421337
|
+
import_node_util3 = require("node:util");
|
|
421144
421338
|
import_cloud_assembly_api9 = __toESM(require_lib3());
|
|
421145
421339
|
cxschema9 = __toESM(require_lib2());
|
|
421146
421340
|
cxapi4 = __toESM(require_lib8());
|
|
@@ -421278,10 +421472,10 @@ var init_prepare_source = __esm({
|
|
|
421278
421472
|
const debugFn = /* @__PURE__ */ __name((msg) => this.ioHelper.notify(IO.CDK_ASSEMBLY_I0010.msg(msg)), "debugFn");
|
|
421279
421473
|
const env2 = this.options.resolveDefaultAppEnv ? await prepareDefaultEnvironment(this.sdkProvider, debugFn) : {};
|
|
421280
421474
|
env2[cxapi4.OUTDIR_ENV] = this.outdir;
|
|
421281
|
-
await debugFn((0,
|
|
421475
|
+
await debugFn((0, import_node_util3.format)("outdir:", this.outdir));
|
|
421282
421476
|
env2[cxapi4.CLI_ASM_VERSION_ENV] = cxschema9.Manifest.version();
|
|
421283
421477
|
env2[cxapi4.CLI_VERSION_ENV] = versionNumber();
|
|
421284
|
-
await debugFn((0,
|
|
421478
|
+
await debugFn((0, import_node_util3.format)("env:", env2));
|
|
421285
421479
|
return env2;
|
|
421286
421480
|
}
|
|
421287
421481
|
/**
|
|
@@ -421346,12 +421540,12 @@ var init_readable_assembly = __esm({
|
|
|
421346
421540
|
});
|
|
421347
421541
|
|
|
421348
421542
|
// ../toolkit-lib/lib/api/cloud-assembly/source-builder.ts
|
|
421349
|
-
var path27,
|
|
421543
|
+
var path27, import_util35, cxapi5, fs30, CloudAssemblySourceBuilder;
|
|
421350
421544
|
var init_source_builder = __esm({
|
|
421351
421545
|
"../toolkit-lib/lib/api/cloud-assembly/source-builder.ts"() {
|
|
421352
421546
|
"use strict";
|
|
421353
421547
|
path27 = __toESM(require("path"));
|
|
421354
|
-
|
|
421548
|
+
import_util35 = require("util");
|
|
421355
421549
|
cxapi5 = __toESM(require_lib3());
|
|
421356
421550
|
fs30 = __toESM(require_lib4());
|
|
421357
421551
|
init_context_store();
|
|
@@ -421417,7 +421611,7 @@ var init_source_builder = __esm({
|
|
|
421417
421611
|
...await contextStore.read(),
|
|
421418
421612
|
...synthParams.context
|
|
421419
421613
|
};
|
|
421420
|
-
await services.ioHelper.defaults.debug((0,
|
|
421614
|
+
await services.ioHelper.defaults.debug((0, import_util35.format)("context:", fullContext));
|
|
421421
421615
|
const env2 = noUndefined({
|
|
421422
421616
|
// Versioning, outdir, default account and region
|
|
421423
421617
|
...await execution.defaultEnvVars(),
|
|
@@ -421556,7 +421750,7 @@ var init_source_builder = __esm({
|
|
|
421556
421750
|
...await contextStore.read(),
|
|
421557
421751
|
...synthParams.context
|
|
421558
421752
|
};
|
|
421559
|
-
await services.ioHelper.defaults.debug((0,
|
|
421753
|
+
await services.ioHelper.defaults.debug((0, import_util35.format)("context:", fullContext));
|
|
421560
421754
|
const env2 = noUndefined({
|
|
421561
421755
|
// Need to start with full env of `writeContextToEnv` will not be able to do the size
|
|
421562
421756
|
// calculation correctly.
|
|
@@ -432410,11 +432604,11 @@ function _diffStrings(oldStr, newStr, context) {
|
|
|
432410
432604
|
}
|
|
432411
432605
|
__name(_findIndent, "_findIndent");
|
|
432412
432606
|
}
|
|
432413
|
-
var
|
|
432607
|
+
var import_util46, chalk11, PATH_METADATA_KEY3, structuredPatch, ADDITION2, CONTEXT, UPDATE2, REMOVAL2, IMPORT, Formatter;
|
|
432414
432608
|
var init_format = __esm({
|
|
432415
432609
|
"../cloudformation-diff/lib/format.ts"() {
|
|
432416
432610
|
"use strict";
|
|
432417
|
-
|
|
432611
|
+
import_util46 = require("util");
|
|
432418
432612
|
chalk11 = __toESM(require_source());
|
|
432419
432613
|
init_util6();
|
|
432420
432614
|
init_diff_template();
|
|
@@ -432443,10 +432637,10 @@ var init_format = __esm({
|
|
|
432443
432637
|
__name(this, "Formatter");
|
|
432444
432638
|
}
|
|
432445
432639
|
print(fmt, ...args) {
|
|
432446
|
-
this.stream.write(chalk11.reset((0,
|
|
432640
|
+
this.stream.write(chalk11.reset((0, import_util46.format)(fmt, ...args)) + "\n");
|
|
432447
432641
|
}
|
|
432448
432642
|
warning(fmt, ...args) {
|
|
432449
|
-
this.stream.write(chalk11.yellow((0,
|
|
432643
|
+
this.stream.write(chalk11.yellow((0, import_util46.format)(fmt, ...args)) + "\n");
|
|
432450
432644
|
}
|
|
432451
432645
|
formatSection(title, entryType, collection, formatter = this.formatDifference.bind(this)) {
|
|
432452
432646
|
if (collection.differenceCount === 0) {
|
|
@@ -434881,7 +435075,7 @@ async function applyHotswapOperation(sdk, ioSpan, hotswapOperation) {
|
|
|
434881
435075
|
sdk.appendCustomUserAgent(customUserAgent);
|
|
434882
435076
|
const resourceText = /* @__PURE__ */ __name((r32) => r32.description ?? `${r32.resourceType} '${r32.physicalName ?? r32.logicalId}'`, "resourceText");
|
|
434883
435077
|
await ioSpan.notify(IO.CDK_TOOLKIT_I5402.msg(
|
|
434884
|
-
hotswapOperation.change.resources.map((r32) => (0,
|
|
435078
|
+
hotswapOperation.change.resources.map((r32) => (0, import_util52.format)(` ${ICON} %s`, chalk14.bold(resourceText(r32)))).join("\n"),
|
|
434885
435079
|
hotswapOperation.change
|
|
434886
435080
|
));
|
|
434887
435081
|
try {
|
|
@@ -434896,7 +435090,7 @@ async function applyHotswapOperation(sdk, ioSpan, hotswapOperation) {
|
|
|
434896
435090
|
throw e32;
|
|
434897
435091
|
}
|
|
434898
435092
|
await ioSpan.notify(IO.CDK_TOOLKIT_I5403.msg(
|
|
434899
|
-
hotswapOperation.change.resources.map((r32) => (0,
|
|
435093
|
+
hotswapOperation.change.resources.map((r32) => (0, import_util52.format)(` ${ICON} %s %s`, chalk14.bold(resourceText(r32)), chalk14.green("hotswapped!"))).join("\n"),
|
|
434900
435094
|
hotswapOperation.change
|
|
434901
435095
|
));
|
|
434902
435096
|
sdk.removeCustomUserAgent(customUserAgent);
|
|
@@ -434925,9 +435119,9 @@ async function logRejectedChanges(ioSpan, rejectedChanges, hotswapMode) {
|
|
|
434925
435119
|
}
|
|
434926
435120
|
const messages = [""];
|
|
434927
435121
|
if (hotswapMode === "hotswap-only") {
|
|
434928
|
-
messages.push((0,
|
|
435122
|
+
messages.push((0, import_util52.format)("%s %s", chalk14.red("\u26A0\uFE0F"), chalk14.red("The following non-hotswappable changes were found. To reconcile these using CloudFormation, specify --hotswap-fallback")));
|
|
434929
435123
|
} else {
|
|
434930
|
-
messages.push((0,
|
|
435124
|
+
messages.push((0, import_util52.format)("%s %s", chalk14.red("\u26A0\uFE0F"), chalk14.red("The following non-hotswappable changes were found:")));
|
|
434931
435125
|
}
|
|
434932
435126
|
for (const { change } of rejectedChanges) {
|
|
434933
435127
|
messages.push(" " + nonHotswappableChangeMessage(change));
|
|
@@ -434940,7 +435134,7 @@ function nonHotswappableChangeMessage(change) {
|
|
|
434940
435134
|
const reason = change.description ?? change.reason;
|
|
434941
435135
|
switch (subject.type) {
|
|
434942
435136
|
case "Output":
|
|
434943
|
-
return (0,
|
|
435137
|
+
return (0, import_util52.format)(
|
|
434944
435138
|
"output: %s, reason: %s",
|
|
434945
435139
|
chalk14.bold(subject.logicalId),
|
|
434946
435140
|
chalk14.red(reason)
|
|
@@ -434951,7 +435145,7 @@ function nonHotswappableChangeMessage(change) {
|
|
|
434951
435145
|
}
|
|
434952
435146
|
function nonHotswappableResourceMessage(subject, reason) {
|
|
434953
435147
|
if (subject.rejectedProperties?.length) {
|
|
434954
|
-
return (0,
|
|
435148
|
+
return (0, import_util52.format)(
|
|
434955
435149
|
"resource: %s, type: %s, rejected changes: %s, reason: %s",
|
|
434956
435150
|
chalk14.bold(subject.logicalId),
|
|
434957
435151
|
chalk14.bold(subject.resourceType),
|
|
@@ -434959,18 +435153,18 @@ function nonHotswappableResourceMessage(subject, reason) {
|
|
|
434959
435153
|
chalk14.red(reason)
|
|
434960
435154
|
);
|
|
434961
435155
|
}
|
|
434962
|
-
return (0,
|
|
435156
|
+
return (0, import_util52.format)(
|
|
434963
435157
|
"resource: %s, type: %s, reason: %s",
|
|
434964
435158
|
chalk14.bold(subject.logicalId),
|
|
434965
435159
|
chalk14.bold(subject.resourceType),
|
|
434966
435160
|
chalk14.red(reason)
|
|
434967
435161
|
);
|
|
434968
435162
|
}
|
|
434969
|
-
var
|
|
435163
|
+
var import_util52, cfn_diff, chalk14, pLimit2, RESOURCE_DETECTORS;
|
|
434970
435164
|
var init_hotswap_deployments = __esm({
|
|
434971
435165
|
"../toolkit-lib/lib/api/hotswap/hotswap-deployments.ts"() {
|
|
434972
435166
|
"use strict";
|
|
434973
|
-
|
|
435167
|
+
import_util52 = require("util");
|
|
434974
435168
|
cfn_diff = __toESM(require_lib11());
|
|
434975
435169
|
chalk14 = __toESM(require_source());
|
|
434976
435170
|
init_payloads();
|
|
@@ -435076,7 +435270,7 @@ async function deployStack(options, ioHelper) {
|
|
|
435076
435270
|
await ioHelper.defaults.debug(
|
|
435077
435271
|
`Found existing stack ${deployName} that had previously failed creation. Deleting it before attempting to re-create it.`
|
|
435078
435272
|
);
|
|
435079
|
-
await cfn.deleteStack({ StackName: cloudFormationStack.stackId, ClientRequestToken: (0,
|
|
435273
|
+
await cfn.deleteStack({ StackName: cloudFormationStack.stackId, ClientRequestToken: (0, import_node_crypto12.randomUUID)() });
|
|
435080
435274
|
const deletedStack = await waitForStackDelete(cfn, ioHelper, cloudFormationStack.stackId);
|
|
435081
435275
|
if (deletedStack && deletedStack.stackStatus.name !== "DELETE_COMPLETE") {
|
|
435082
435276
|
throw new DeploymentError(
|
|
@@ -435101,7 +435295,7 @@ async function deployStack(options, ioHelper) {
|
|
|
435101
435295
|
await ioHelper.defaults.debug(`${deployName}: skipping deployment (use --force to override)`);
|
|
435102
435296
|
if (deploymentMethod?.method === "hotswap") {
|
|
435103
435297
|
await ioHelper.defaults.info(
|
|
435104
|
-
(0,
|
|
435298
|
+
(0, import_node_util4.format)(
|
|
435105
435299
|
`
|
|
435106
435300
|
${ICON} %s
|
|
435107
435301
|
`,
|
|
@@ -435155,7 +435349,7 @@ async function deployStack(options, ioHelper) {
|
|
|
435155
435349
|
);
|
|
435156
435350
|
return hotswapDeploymentResult;
|
|
435157
435351
|
}
|
|
435158
|
-
await ioHelper.defaults.info((0,
|
|
435352
|
+
await ioHelper.defaults.info((0, import_node_util4.format)(
|
|
435159
435353
|
"Could not perform a hotswap deployment, as the stack %s contains non-Asset changes",
|
|
435160
435354
|
stackArtifact.displayName
|
|
435161
435355
|
));
|
|
@@ -435163,7 +435357,7 @@ async function deployStack(options, ioHelper) {
|
|
|
435163
435357
|
if (!(e32 instanceof CfnEvaluationException)) {
|
|
435164
435358
|
throw e32;
|
|
435165
435359
|
}
|
|
435166
|
-
await ioHelper.defaults.info((0,
|
|
435360
|
+
await ioHelper.defaults.info((0, import_node_util4.format)(
|
|
435167
435361
|
"Could not perform a hotswap deployment, because the CloudFormation template could not be resolved: %s",
|
|
435168
435362
|
formatErrorMessage(e32)
|
|
435169
435363
|
));
|
|
@@ -435208,7 +435402,7 @@ async function destroyStack(options, ioHelper) {
|
|
|
435208
435402
|
});
|
|
435209
435403
|
await monitor.start();
|
|
435210
435404
|
try {
|
|
435211
|
-
await cfn.deleteStack({ StackName: currentStack.stackId, RoleARN: options.roleArn, ClientRequestToken: (0,
|
|
435405
|
+
await cfn.deleteStack({ StackName: currentStack.stackId, RoleARN: options.roleArn, ClientRequestToken: (0, import_node_crypto12.randomUUID)() });
|
|
435212
435406
|
const destroyedStack = await waitForStackDelete(cfn, ioHelper, currentStack.stackId);
|
|
435213
435407
|
if (destroyedStack && destroyedStack.stackStatus.name !== "DELETE_COMPLETE") {
|
|
435214
435408
|
throw new DeploymentError(`Failed to destroy ${deployName}: ${destroyedStack.stackStatus}`, "StackDestroyFailed");
|
|
@@ -435299,12 +435493,12 @@ function hasReplacement(cs) {
|
|
|
435299
435493
|
return a32 === "ReplaceAndDelete" || a32 === "ReplaceAndRetain" || a32 === "ReplaceAndSnapshot";
|
|
435300
435494
|
});
|
|
435301
435495
|
}
|
|
435302
|
-
var
|
|
435496
|
+
var import_node_crypto12, import_node_util4, chalk15, FullCloudFormationDeployment;
|
|
435303
435497
|
var init_deploy_stack = __esm({
|
|
435304
435498
|
"../toolkit-lib/lib/api/deployments/deploy-stack.ts"() {
|
|
435305
435499
|
"use strict";
|
|
435306
|
-
|
|
435307
|
-
|
|
435500
|
+
import_node_crypto12 = require("node:crypto");
|
|
435501
|
+
import_node_util4 = require("node:util");
|
|
435308
435502
|
chalk15 = __toESM(require_source());
|
|
435309
435503
|
init_asset_manifest_builder();
|
|
435310
435504
|
init_asset_publishing();
|
|
@@ -435338,7 +435532,7 @@ var init_deploy_stack = __esm({
|
|
|
435338
435532
|
this.stackName = options.deployName ?? stackArtifact.stackName;
|
|
435339
435533
|
this.update = cloudFormationStack.exists && cloudFormationStack.stackStatus.name !== "REVIEW_IN_PROGRESS";
|
|
435340
435534
|
this.verb = this.update ? "update" : "create";
|
|
435341
|
-
this.uuid = (0,
|
|
435535
|
+
this.uuid = (0, import_node_crypto12.randomUUID)();
|
|
435342
435536
|
}
|
|
435343
435537
|
deploymentMethod;
|
|
435344
435538
|
options;
|
|
@@ -435379,9 +435573,9 @@ var init_deploy_stack = __esm({
|
|
|
435379
435573
|
const changeSetDescription = await this.createChangeSet(changeSetName, execute, importExistingResources, revertDrift);
|
|
435380
435574
|
await this.updateTerminationProtection();
|
|
435381
435575
|
if (changeSetHasNoChanges(changeSetDescription)) {
|
|
435382
|
-
await this.ioHelper.defaults.debug((0,
|
|
435576
|
+
await this.ioHelper.defaults.debug((0, import_node_util4.format)("No changes are to be performed on %s.", this.stackName));
|
|
435383
435577
|
if (execute) {
|
|
435384
|
-
await this.ioHelper.defaults.debug((0,
|
|
435578
|
+
await this.ioHelper.defaults.debug((0, import_node_util4.format)("Deleting empty change set %s", changeSetDescription.ChangeSetId));
|
|
435385
435579
|
await this.cfn.deleteChangeSet({
|
|
435386
435580
|
StackName: changeSetDescription.StackId ?? this.stackName,
|
|
435387
435581
|
ChangeSetName: changeSetDescription.ChangeSetId ?? changeSetName
|
|
@@ -435406,7 +435600,7 @@ var init_deploy_stack = __esm({
|
|
|
435406
435600
|
};
|
|
435407
435601
|
}
|
|
435408
435602
|
if (!execute) {
|
|
435409
|
-
await this.ioHelper.defaults.info((0,
|
|
435603
|
+
await this.ioHelper.defaults.info((0, import_node_util4.format)(
|
|
435410
435604
|
"Changeset %s created and waiting in review for manual execution (--no-execute)",
|
|
435411
435605
|
changeSetDescription.ChangeSetId
|
|
435412
435606
|
));
|
|
@@ -435457,7 +435651,7 @@ var init_deploy_stack = __esm({
|
|
|
435457
435651
|
async createChangeSet(changeSetName, willExecute, importExistingResources, revertDrift) {
|
|
435458
435652
|
await this.cleanupOldChangeset(changeSetName);
|
|
435459
435653
|
await this.ioHelper.defaults.debug(`Attempting to create ChangeSet with name ${changeSetName} to ${this.verb} stack ${this.stackName}`);
|
|
435460
|
-
await this.ioHelper.defaults.info((0,
|
|
435654
|
+
await this.ioHelper.defaults.info((0, import_node_util4.format)("%s: creating CloudFormation changeset...", chalk15.bold(this.stackName)));
|
|
435461
435655
|
const changeSet = await this.cfn.createChangeSet({
|
|
435462
435656
|
StackName: this.stackName,
|
|
435463
435657
|
ChangeSetName: changeSetName,
|
|
@@ -435470,14 +435664,14 @@ var init_deploy_stack = __esm({
|
|
|
435470
435664
|
IncludeNestedStacks: this.options.resourcesToImport || revertDrift ? void 0 : true,
|
|
435471
435665
|
...this.commonPrepareOptions()
|
|
435472
435666
|
});
|
|
435473
|
-
await this.ioHelper.defaults.debug((0,
|
|
435667
|
+
await this.ioHelper.defaults.debug((0, import_node_util4.format)("Initiated creation of changeset: %s; waiting for it to finish creating...", changeSet.Id));
|
|
435474
435668
|
return waitForChangeSet(this.cfn, this.ioHelper, changeSet.StackId ?? this.stackName, changeSet.Id ?? changeSetName, {
|
|
435475
435669
|
fetchAll: willExecute,
|
|
435476
435670
|
diagnoser: this.diagnoser
|
|
435477
435671
|
});
|
|
435478
435672
|
}
|
|
435479
435673
|
async executeChangeSet(changeSet) {
|
|
435480
|
-
await this.ioHelper.defaults.debug((0,
|
|
435674
|
+
await this.ioHelper.defaults.debug((0, import_node_util4.format)("Initiating execution of changeset %s on stack %s", changeSet.ChangeSetId, this.stackName));
|
|
435481
435675
|
await this.cfn.executeChangeSet({
|
|
435482
435676
|
StackName: changeSet.StackId ?? this.stackName,
|
|
435483
435677
|
ChangeSetName: changeSet.ChangeSetId,
|
|
@@ -435485,7 +435679,7 @@ var init_deploy_stack = __esm({
|
|
|
435485
435679
|
...this.commonExecuteOptions()
|
|
435486
435680
|
});
|
|
435487
435681
|
await this.ioHelper.defaults.debug(
|
|
435488
|
-
(0,
|
|
435682
|
+
(0, import_node_util4.format)(
|
|
435489
435683
|
"Execution of changeset %s on stack %s has started; waiting for the update to complete...",
|
|
435490
435684
|
changeSet.ChangeSetId,
|
|
435491
435685
|
this.stackName
|
|
@@ -435509,7 +435703,7 @@ var init_deploy_stack = __esm({
|
|
|
435509
435703
|
const terminationProtection = this.stackArtifact.terminationProtection ?? false;
|
|
435510
435704
|
if (!!this.cloudFormationStack.terminationProtection !== terminationProtection) {
|
|
435511
435705
|
await this.ioHelper.defaults.debug(
|
|
435512
|
-
(0,
|
|
435706
|
+
(0, import_node_util4.format)(
|
|
435513
435707
|
"Updating termination protection from %s to %s for stack %s",
|
|
435514
435708
|
this.cloudFormationStack.terminationProtection,
|
|
435515
435709
|
terminationProtection,
|
|
@@ -435520,11 +435714,11 @@ var init_deploy_stack = __esm({
|
|
|
435520
435714
|
StackName: this.stackName,
|
|
435521
435715
|
EnableTerminationProtection: terminationProtection
|
|
435522
435716
|
});
|
|
435523
|
-
await this.ioHelper.defaults.debug((0,
|
|
435717
|
+
await this.ioHelper.defaults.debug((0, import_node_util4.format)("Termination protection updated to %s for stack %s", terminationProtection, this.stackName));
|
|
435524
435718
|
}
|
|
435525
435719
|
}
|
|
435526
435720
|
async directDeployment() {
|
|
435527
|
-
await this.ioHelper.defaults.info((0,
|
|
435721
|
+
await this.ioHelper.defaults.info((0, import_node_util4.format)("%s: %s stack...", chalk15.bold(this.stackName), this.update ? "updating" : "creating"));
|
|
435528
435722
|
const startTime = /* @__PURE__ */ new Date();
|
|
435529
435723
|
if (this.update) {
|
|
435530
435724
|
await this.updateTerminationProtection();
|
|
@@ -435538,7 +435732,7 @@ var init_deploy_stack = __esm({
|
|
|
435538
435732
|
return await this.monitorDeployment(startTime, stack.StackId, void 0);
|
|
435539
435733
|
} catch (err) {
|
|
435540
435734
|
if (err.message === "No updates are to be performed.") {
|
|
435541
|
-
await this.ioHelper.defaults.debug((0,
|
|
435735
|
+
await this.ioHelper.defaults.debug((0, import_node_util4.format)("No updates are to be performed for stack %s", this.stackName));
|
|
435542
435736
|
return {
|
|
435543
435737
|
type: "did-deploy-stack",
|
|
435544
435738
|
noOp: true,
|
|
@@ -435589,7 +435783,7 @@ var init_deploy_stack = __esm({
|
|
|
435589
435783
|
} finally {
|
|
435590
435784
|
await monitor.stop();
|
|
435591
435785
|
}
|
|
435592
|
-
await this.ioHelper.defaults.debug((0,
|
|
435786
|
+
await this.ioHelper.defaults.debug((0, import_node_util4.format)("Stack %s has completed updating", this.stackName));
|
|
435593
435787
|
return {
|
|
435594
435788
|
type: "did-deploy-stack",
|
|
435595
435789
|
noOp: false,
|
|
@@ -435638,11 +435832,11 @@ var init_deploy_stack = __esm({
|
|
|
435638
435832
|
function suffixWithErrors2(msg, errors) {
|
|
435639
435833
|
return errors && errors.length > 0 ? `${msg}: ${errors.join(", ")}` : msg;
|
|
435640
435834
|
}
|
|
435641
|
-
var
|
|
435835
|
+
var import_node_crypto13, cdk_assets, chalk16, BOOTSTRAP_STACK_VERSION_FOR_ROLLBACK, Deployments, ParallelSafeAssetProgress;
|
|
435642
435836
|
var init_deployments = __esm({
|
|
435643
435837
|
"../toolkit-lib/lib/api/deployments/deployments.ts"() {
|
|
435644
435838
|
"use strict";
|
|
435645
|
-
|
|
435839
|
+
import_node_crypto13 = require("node:crypto");
|
|
435646
435840
|
cdk_assets = __toESM(require_lib6());
|
|
435647
435841
|
chalk16 = __toESM(require_source());
|
|
435648
435842
|
init_asset_manifest_builder();
|
|
@@ -435813,7 +436007,7 @@ var init_deployments = __esm({
|
|
|
435813
436007
|
}
|
|
435814
436008
|
await cfn.deleteChangeSet({ StackName: deployName, ChangeSetName: changeSetName });
|
|
435815
436009
|
if (cloudFormationStack.stackStatus.name === "REVIEW_IN_PROGRESS") {
|
|
435816
|
-
await cfn.deleteStack({ StackName: deployName, ClientRequestToken: (0,
|
|
436010
|
+
await cfn.deleteStack({ StackName: deployName, ClientRequestToken: (0, import_node_crypto13.randomUUID)() });
|
|
435817
436011
|
await waitForStackDelete(cfn, this.ioHelper, deployName);
|
|
435818
436012
|
}
|
|
435819
436013
|
}
|
|
@@ -435869,7 +436063,7 @@ var init_deployments = __esm({
|
|
|
435869
436063
|
await cfn.rollbackStack({
|
|
435870
436064
|
StackName: stackArn,
|
|
435871
436065
|
RoleARN: executionRoleArn,
|
|
435872
|
-
ClientRequestToken: (0,
|
|
436066
|
+
ClientRequestToken: (0, import_node_crypto13.randomUUID)(),
|
|
435873
436067
|
// Enabling this is just the better overall default, the only reason it isn't the upstream default is backwards compatibility
|
|
435874
436068
|
RetainExceptOnCreate: true
|
|
435875
436069
|
});
|
|
@@ -435887,7 +436081,7 @@ var init_deployments = __esm({
|
|
|
435887
436081
|
await this.ioHelper.defaults.warn(`Continuing rollback of stack ${deployName}${skipDescription}`);
|
|
435888
436082
|
await cfn.continueUpdateRollback({
|
|
435889
436083
|
StackName: stackArn,
|
|
435890
|
-
ClientRequestToken: (0,
|
|
436084
|
+
ClientRequestToken: (0, import_node_crypto13.randomUUID)(),
|
|
435891
436085
|
RoleARN: executionRoleArn,
|
|
435892
436086
|
ResourcesToSkip: resourcesToSkip
|
|
435893
436087
|
});
|
|
@@ -436166,11 +436360,11 @@ function obscureDiff(diff) {
|
|
|
436166
436360
|
});
|
|
436167
436361
|
}
|
|
436168
436362
|
}
|
|
436169
|
-
var
|
|
436363
|
+
var import_node_util5, import_cloudformation_diff, chalk17, DiffFormatter;
|
|
436170
436364
|
var init_diff_formatter = __esm({
|
|
436171
436365
|
"../toolkit-lib/lib/api/diff/diff-formatter.ts"() {
|
|
436172
436366
|
"use strict";
|
|
436173
|
-
|
|
436367
|
+
import_node_util5 = require("node:util");
|
|
436174
436368
|
import_cloudformation_diff = __toESM(require_lib11());
|
|
436175
436369
|
chalk17 = __toESM(require_source());
|
|
436176
436370
|
init_payloads();
|
|
@@ -436254,7 +436448,7 @@ var init_diff_formatter = __esm({
|
|
|
436254
436448
|
let filteredChangesCount = 0;
|
|
436255
436449
|
try {
|
|
436256
436450
|
if (stackName && (!options.quiet || !diff.isEmpty)) {
|
|
436257
|
-
stream.write((0,
|
|
436451
|
+
stream.write((0, import_node_util5.format)(`Stack ${chalk17.bold(stackName)}
|
|
436258
436452
|
`));
|
|
436259
436453
|
}
|
|
436260
436454
|
if (!options.quiet && this.isImport) {
|
|
@@ -436329,7 +436523,7 @@ var init_diff_formatter = __esm({
|
|
|
436329
436523
|
const permissionChangeType = permissionTypeFromDiff(diff);
|
|
436330
436524
|
const stream = new StringWriteStream();
|
|
436331
436525
|
if (!options.quiet || permissionChangeType !== "none" /* NONE */) {
|
|
436332
|
-
stream.write((0,
|
|
436526
|
+
stream.write((0, import_node_util5.format)(`Stack ${chalk17.bold(stackName)}
|
|
436333
436527
|
`));
|
|
436334
436528
|
}
|
|
436335
436529
|
try {
|
|
@@ -436398,11 +436592,11 @@ function removeNonImportResources(stack) {
|
|
|
436398
436592
|
delete template.Outputs;
|
|
436399
436593
|
return template;
|
|
436400
436594
|
}
|
|
436401
|
-
var
|
|
436595
|
+
var import_util56, cfnDiff, chalk18, fs32, ResourceImporter;
|
|
436402
436596
|
var init_importer = __esm({
|
|
436403
436597
|
"../toolkit-lib/lib/api/resource-import/importer.ts"() {
|
|
436404
436598
|
"use strict";
|
|
436405
|
-
|
|
436599
|
+
import_util56 = require("util");
|
|
436406
436600
|
cfnDiff = __toESM(require_lib11());
|
|
436407
436601
|
chalk18 = __toESM(require_source());
|
|
436408
436602
|
fs32 = __toESM(require_lib4());
|
|
@@ -436466,12 +436660,12 @@ var init_importer = __esm({
|
|
|
436466
436660
|
const descr = this.describeResource(resource.logicalId);
|
|
436467
436661
|
const idProps = remaining[resource.logicalId];
|
|
436468
436662
|
if (idProps) {
|
|
436469
|
-
await this.ioHelper.defaults.info((0,
|
|
436663
|
+
await this.ioHelper.defaults.info((0, import_util56.format)("%s: importing using %s", chalk18.blue(descr), chalk18.blue(fmtdict(idProps))));
|
|
436470
436664
|
ret.importResources.push(resource);
|
|
436471
436665
|
ret.resourceMap[resource.logicalId] = idProps;
|
|
436472
436666
|
delete remaining[resource.logicalId];
|
|
436473
436667
|
} else {
|
|
436474
|
-
await this.ioHelper.defaults.info((0,
|
|
436668
|
+
await this.ioHelper.defaults.info((0, import_util56.format)("%s: skipping", chalk18.blue(descr)));
|
|
436475
436669
|
}
|
|
436476
436670
|
}
|
|
436477
436671
|
const unknown = Object.keys(remaining);
|
|
@@ -436515,9 +436709,9 @@ var init_importer = __esm({
|
|
|
436515
436709
|
});
|
|
436516
436710
|
assertIsSuccessfulDeployStackResult(result2);
|
|
436517
436711
|
const message2 = result2.noOp ? " \u2705 %s (no changes)" : " \u2705 %s";
|
|
436518
|
-
await this.ioHelper.defaults.info("\n" + chalk18.green((0,
|
|
436712
|
+
await this.ioHelper.defaults.info("\n" + chalk18.green((0, import_util56.format)(message2, this.stack.displayName)));
|
|
436519
436713
|
} catch (e32) {
|
|
436520
|
-
await this.ioHelper.notify(IO.CDK_TOOLKIT_E3900.msg((0,
|
|
436714
|
+
await this.ioHelper.notify(IO.CDK_TOOLKIT_E3900.msg((0, import_util56.format)("\n \u274C %s failed: %s", chalk18.bold(this.stack.displayName), e32), { error: e32 }));
|
|
436521
436715
|
throw e32;
|
|
436522
436716
|
}
|
|
436523
436717
|
}
|
|
@@ -436647,7 +436841,7 @@ var init_importer = __esm({
|
|
|
436647
436841
|
for (const idProp of idProps) {
|
|
436648
436842
|
const defaultValue = resourceProps[idProp] ?? "";
|
|
436649
436843
|
const response = await this.ioHelper.requestResponse(IO.CDK_TOOLKIT_I3110.req(
|
|
436650
|
-
(0,
|
|
436844
|
+
(0, import_util56.format)(promptPattern, chalk18.blue(idProp)),
|
|
436651
436845
|
{
|
|
436652
436846
|
resource: {
|
|
436653
436847
|
name: resourceName,
|
|
@@ -437578,7 +437772,7 @@ async function cfnDiff2(ioHelper, stacks, deployments, options, sdkProvider, inc
|
|
|
437578
437772
|
parameters: methodOptions.parameters ?? {},
|
|
437579
437773
|
failOnError: !(methodOptions.fallbackToTemplate ?? true),
|
|
437580
437774
|
importExistingResources: methodOptions.importExistingResources,
|
|
437581
|
-
uuid: (0,
|
|
437775
|
+
uuid: (0, import_node_crypto14.randomUUID)(),
|
|
437582
437776
|
willExecute: false
|
|
437583
437777
|
}) : void 0;
|
|
437584
437778
|
if (changeSet) {
|
|
@@ -437629,11 +437823,11 @@ function appendObject(obj1, obj2) {
|
|
|
437629
437823
|
}
|
|
437630
437824
|
return obj1;
|
|
437631
437825
|
}
|
|
437632
|
-
var
|
|
437826
|
+
var import_node_crypto14, fs34;
|
|
437633
437827
|
var init_helpers4 = __esm({
|
|
437634
437828
|
"../toolkit-lib/lib/actions/diff/private/helpers.ts"() {
|
|
437635
437829
|
"use strict";
|
|
437636
|
-
|
|
437830
|
+
import_node_crypto14 = require("node:crypto");
|
|
437637
437831
|
fs34 = __toESM(require_lib4());
|
|
437638
437832
|
init_diff();
|
|
437639
437833
|
init_cfn_api();
|
|
@@ -438484,11 +438678,11 @@ var init_io = __esm({
|
|
|
438484
438678
|
});
|
|
438485
438679
|
|
|
438486
438680
|
// ../toolkit-lib/lib/api/logs-monitor/logs-monitor.ts
|
|
438487
|
-
var
|
|
438681
|
+
var import_node_crypto15, util7, chalk22, CloudWatchLogEventMonitor;
|
|
438488
438682
|
var init_logs_monitor2 = __esm({
|
|
438489
438683
|
"../toolkit-lib/lib/api/logs-monitor/logs-monitor.ts"() {
|
|
438490
438684
|
"use strict";
|
|
438491
|
-
|
|
438685
|
+
import_node_crypto15 = require("node:crypto");
|
|
438492
438686
|
util7 = __toESM(require("node:util"));
|
|
438493
438687
|
chalk22 = __toESM(require_source());
|
|
438494
438688
|
init_util();
|
|
@@ -438524,7 +438718,7 @@ var init_logs_monitor2 = __esm({
|
|
|
438524
438718
|
* resume reading/printing events
|
|
438525
438719
|
*/
|
|
438526
438720
|
async activate() {
|
|
438527
|
-
this.monitorId = (0,
|
|
438721
|
+
this.monitorId = (0, import_node_crypto15.randomUUID)();
|
|
438528
438722
|
await this.ioHelper.notify(IO.CDK_TOOLKIT_I5032.msg("Start monitoring log groups", {
|
|
438529
438723
|
monitor: this.monitorId,
|
|
438530
438724
|
logGroupNames: this.logGroupNames()
|
|
@@ -439388,11 +439582,11 @@ var init_tags2 = __esm({
|
|
|
439388
439582
|
});
|
|
439389
439583
|
|
|
439390
439584
|
// ../toolkit-lib/lib/api/drift/drift-formatter.ts
|
|
439391
|
-
var
|
|
439585
|
+
var import_node_util6, import_cloudformation_diff3, import_client_cloudformation5, chalk23, DriftFormatter, ADDITION3, CONTEXT2, UPDATE3, REMOVAL3;
|
|
439392
439586
|
var init_drift_formatter = __esm({
|
|
439393
439587
|
"../toolkit-lib/lib/api/drift/drift-formatter.ts"() {
|
|
439394
439588
|
"use strict";
|
|
439395
|
-
|
|
439589
|
+
import_node_util6 = require("node:util");
|
|
439396
439590
|
import_cloudformation_diff3 = __toESM(require_lib11());
|
|
439397
439591
|
import_client_cloudformation5 = __toESM(require_dist_cjs103());
|
|
439398
439592
|
chalk23 = __toESM(require_source());
|
|
@@ -439424,7 +439618,7 @@ var init_drift_formatter = __esm({
|
|
|
439424
439618
|
formatStackDrift() {
|
|
439425
439619
|
const formatterOutput = this.formatStackDriftChanges(buildLogicalToPathMap(this.stack).toPath);
|
|
439426
439620
|
const actualDrifts = this.resourceDriftResults.filter((d32) => (d32.StackResourceDriftStatus === "MODIFIED" || d32.StackResourceDriftStatus === "DELETED") && d32.ResourceType !== "AWS::CDK::Metadata");
|
|
439427
|
-
const stackHeader = (0,
|
|
439621
|
+
const stackHeader = (0, import_node_util6.format)(`Stack ${chalk23.bold(this.stackName)}
|
|
439428
439622
|
`);
|
|
439429
439623
|
if (actualDrifts.length === 0) {
|
|
439430
439624
|
const finalResult2 = chalk23.green("No drift detected\n");
|
|
@@ -439546,15 +439740,15 @@ ${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualD
|
|
|
439546
439740
|
return "\n";
|
|
439547
439741
|
}
|
|
439548
439742
|
formatTreeDiff(propertyPath, difference2, isLast) {
|
|
439549
|
-
let result2 = (0,
|
|
439743
|
+
let result2 = (0, import_node_util6.format)(
|
|
439550
439744
|
" %s\u2500 %s %s\n",
|
|
439551
439745
|
isLast ? "\u2514" : "\u251C",
|
|
439552
439746
|
difference2.isAddition ? ADDITION3 : difference2.isRemoval ? REMOVAL3 : UPDATE3,
|
|
439553
439747
|
propertyPath
|
|
439554
439748
|
);
|
|
439555
439749
|
if (difference2.isUpdate) {
|
|
439556
|
-
result2 += (0,
|
|
439557
|
-
result2 += (0,
|
|
439750
|
+
result2 += (0, import_node_util6.format)(" \u251C\u2500 %s %s\n", REMOVAL3, chalk23.red(difference2.oldValue));
|
|
439751
|
+
result2 += (0, import_node_util6.format)(" \u2514\u2500 %s %s\n", ADDITION3, chalk23.green(difference2.newValue));
|
|
439558
439752
|
}
|
|
439559
439753
|
return result2;
|
|
439560
439754
|
}
|
|
@@ -439572,7 +439766,7 @@ async function detectStackDrift(cfn, ioHelper, stackName) {
|
|
|
439572
439766
|
StackName: stackName
|
|
439573
439767
|
});
|
|
439574
439768
|
await ioHelper.defaults.trace(
|
|
439575
|
-
(0,
|
|
439769
|
+
(0, import_node_util7.format)("Detecting drift with ID %s for stack %s...", driftDetection.StackDriftDetectionId, stackName)
|
|
439576
439770
|
);
|
|
439577
439771
|
const driftStatus = await waitForDriftDetection(cfn, ioHelper, driftDetection.StackDriftDetectionId);
|
|
439578
439772
|
if (driftStatus?.StackDriftStatus === "UNKNOWN") {
|
|
@@ -439622,11 +439816,11 @@ async function waitForDriftDetection(cfn, ioHelper, driftDetectionId) {
|
|
|
439622
439816
|
await new Promise((resolve13) => setTimeout(resolve13, timeBetweenApiCalls));
|
|
439623
439817
|
}
|
|
439624
439818
|
}
|
|
439625
|
-
var
|
|
439819
|
+
var import_node_util7;
|
|
439626
439820
|
var init_drift2 = __esm({
|
|
439627
439821
|
"../toolkit-lib/lib/api/drift/drift.ts"() {
|
|
439628
439822
|
"use strict";
|
|
439629
|
-
|
|
439823
|
+
import_node_util7 = require("node:util");
|
|
439630
439824
|
init_toolkit_error();
|
|
439631
439825
|
init_string_manipulation();
|
|
439632
439826
|
__name(detectStackDrift, "detectStackDrift");
|
|
@@ -471145,7 +471339,7 @@ var init_runner_base = __esm({
|
|
|
471145
471339
|
|
|
471146
471340
|
// lib/workers/common.ts
|
|
471147
471341
|
function formatAssertionResults(results) {
|
|
471148
|
-
return Object.entries(results).map(([id, result2]) => (0,
|
|
471342
|
+
return Object.entries(results).map(([id, result2]) => (0, import_util67.format)("%s%s", id, result2.status === "success" ? ` - ${result2.status}` : `
|
|
471149
471343
|
${result2.message}`)).join("\n ");
|
|
471150
471344
|
}
|
|
471151
471345
|
function formatError(error5) {
|
|
@@ -471157,11 +471351,11 @@ ${chalk28.gray("Cause: " + formatError(error5.cause))}`;
|
|
|
471157
471351
|
}
|
|
471158
471352
|
return `${name}: ${message2}`;
|
|
471159
471353
|
}
|
|
471160
|
-
var
|
|
471354
|
+
var import_util67, chalk28;
|
|
471161
471355
|
var init_common14 = __esm({
|
|
471162
471356
|
"lib/workers/common.ts"() {
|
|
471163
471357
|
"use strict";
|
|
471164
|
-
|
|
471358
|
+
import_util67 = require("util");
|
|
471165
471359
|
chalk28 = __toESM(require_source());
|
|
471166
471360
|
init_logger();
|
|
471167
471361
|
__name(formatAssertionResults, "formatAssertionResults");
|
package/package.json
CHANGED
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
"ts-jest": "^29.4.9",
|
|
65
65
|
"typescript": "5.9",
|
|
66
66
|
"@aws-cdk/aws-service-spec": "^0.1.180",
|
|
67
|
-
"@aws-cdk/cdk-assets-lib": "1.4.
|
|
67
|
+
"@aws-cdk/cdk-assets-lib": "1.4.8",
|
|
68
68
|
"@aws-cdk/cloud-assembly-api": "2.2.4",
|
|
69
|
-
"@aws-cdk/cloud-assembly-schema": ">=53.
|
|
69
|
+
"@aws-cdk/cloud-assembly-schema": ">=53.27.0",
|
|
70
70
|
"@aws-cdk/cloudformation-diff": "2.187.1",
|
|
71
|
-
"@aws-cdk/toolkit-lib": "1.26.
|
|
71
|
+
"@aws-cdk/toolkit-lib": "1.26.2",
|
|
72
72
|
"@aws-sdk/client-cloudformation": "^3",
|
|
73
|
-
"aws-cdk": "2.1124.
|
|
73
|
+
"aws-cdk": "2.1124.1",
|
|
74
74
|
"chalk": "^4",
|
|
75
75
|
"chokidar": "^4",
|
|
76
76
|
"fs-extra": "^11",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@aws-cdk/aws-service-spec": "0.1.180",
|
|
83
|
-
"aws-cdk": "2.1124.
|
|
83
|
+
"aws-cdk": "2.1124.1"
|
|
84
84
|
},
|
|
85
85
|
"keywords": [
|
|
86
86
|
"aws",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public"
|
|
104
104
|
},
|
|
105
|
-
"version": "2.197.
|
|
105
|
+
"version": "2.197.24",
|
|
106
106
|
"packageManager": "yarn@4.13.0",
|
|
107
107
|
"types": "lib/index.d.ts",
|
|
108
108
|
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"yarn projen\"."
|