@aws-cdk/integ-runner 2.204.3 → 2.204.4
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 +67 -52
- package/package.json +3 -3
|
@@ -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.1137.0" };
|
|
4770
4770
|
}
|
|
4771
4771
|
});
|
|
4772
4772
|
|
|
@@ -274641,28 +274641,30 @@ async function createChangeSetAndCleanup(ioHelper, options) {
|
|
|
274641
274641
|
Capabilities: ["CAPABILITY_IAM", "CAPABILITY_NAMED_IAM", "CAPABILITY_AUTO_EXPAND"]
|
|
274642
274642
|
});
|
|
274643
274643
|
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)()
|
|
274644
|
+
const changeSetId = changeSet.Id ?? options.changeSetName;
|
|
274645
|
+
const stackId = changeSet.StackId ?? options.stack.stackName;
|
|
274646
|
+
try {
|
|
274647
|
+
return await new ChangeSetDescriber({
|
|
274648
|
+
cfn: options.cfn,
|
|
274649
|
+
ioHelper,
|
|
274650
|
+
stackNameOrArn: stackId,
|
|
274651
|
+
changeSetNameOrArn: changeSetId
|
|
274652
|
+
}).waitAndThrowOnProblem({
|
|
274653
|
+
diagnoser: options.diagnoser
|
|
274663
274654
|
});
|
|
274655
|
+
} catch (e6) {
|
|
274656
|
+
await ioHelper.defaults.warn((0, import_node_util3.format)("Change set %s failed: %s", changeSetId, e6));
|
|
274657
|
+
throw e6;
|
|
274658
|
+
} finally {
|
|
274659
|
+
await cleanupOldChangeset(options.cfn, ioHelper, changeSetId, stackId);
|
|
274660
|
+
if (!options.exists) {
|
|
274661
|
+
await ioHelper.defaults.debug((0, import_node_util3.format)("Deleting empty stack created by diff changeset: %s", stackId));
|
|
274662
|
+
await options.cfn.deleteStack({
|
|
274663
|
+
StackName: stackId,
|
|
274664
|
+
ClientRequestToken: (0, import_node_crypto9.randomUUID)()
|
|
274665
|
+
});
|
|
274666
|
+
}
|
|
274664
274667
|
}
|
|
274665
|
-
return createdChangeSet;
|
|
274666
274668
|
}
|
|
274667
274669
|
async function createValidationChangeSet(ioHelper, options) {
|
|
274668
274670
|
const { cfn, bodyParameter, exists, stackExistedBefore, executionRoleArn, diagnoser } = await prepareChangeSetEnv(ioHelper, options);
|
|
@@ -293854,6 +293856,15 @@ async function canSkipDeploy(deployStackOptions, cloudFormationStack, parameterC
|
|
|
293854
293856
|
await ioHelper.defaults.debug(`${deployName}: stack is in a failure state`);
|
|
293855
293857
|
return false;
|
|
293856
293858
|
}
|
|
293859
|
+
const hotswapCache = await readHotswapTemplateCache(
|
|
293860
|
+
deployStackOptions.stack.assembly.directory,
|
|
293861
|
+
deployStackOptions.stack.stackName,
|
|
293862
|
+
deployStackOptions.stack.template
|
|
293863
|
+
);
|
|
293864
|
+
if (hotswapCache && (0, import_cloudformation_diff.diffTemplate)(hotswapCache.deployedRootTemplate, deployStackOptions.stack.template).differenceCount > 0) {
|
|
293865
|
+
await ioHelper.defaults.debug(`${deployName}: template has changed in relation to last successful hotswap deployment`);
|
|
293866
|
+
return false;
|
|
293867
|
+
}
|
|
293857
293868
|
return true;
|
|
293858
293869
|
}
|
|
293859
293870
|
function compareTags(a6, b6) {
|
|
@@ -293880,12 +293891,13 @@ function hasReplacement(report) {
|
|
|
293880
293891
|
return a6 === "ReplaceAndDelete" || a6 === "ReplaceAndRetain" || a6 === "ReplaceAndSnapshot";
|
|
293881
293892
|
});
|
|
293882
293893
|
}
|
|
293883
|
-
var import_node_crypto10, import_node_util5, import_chalk17, FullCloudFormationDeployment;
|
|
293894
|
+
var import_node_crypto10, import_node_util5, import_cloudformation_diff, import_chalk17, FullCloudFormationDeployment;
|
|
293884
293895
|
var init_deploy_stack = __esm({
|
|
293885
293896
|
"../toolkit-lib/lib/api/deployments/deploy-stack.ts"() {
|
|
293886
293897
|
"use strict";
|
|
293887
293898
|
import_node_crypto10 = require("node:crypto");
|
|
293888
293899
|
import_node_util5 = require("node:util");
|
|
293900
|
+
import_cloudformation_diff = __toESM(require_lib10());
|
|
293889
293901
|
import_chalk17 = __toESM(require_source());
|
|
293890
293902
|
init_asset_manifest_builder();
|
|
293891
293903
|
init_asset_publishing();
|
|
@@ -293990,10 +294002,12 @@ var init_deploy_stack = __esm({
|
|
|
293990
294002
|
};
|
|
293991
294003
|
}
|
|
293992
294004
|
if (!execute) {
|
|
293993
|
-
|
|
293994
|
-
|
|
293995
|
-
|
|
293996
|
-
|
|
294005
|
+
if (!this.options.willExecuteChangeSet) {
|
|
294006
|
+
await this.ioHelper.defaults.info((0, import_node_util5.format)(
|
|
294007
|
+
"Changeset %s created and waiting in review for manual execution (--no-execute)",
|
|
294008
|
+
changeSetDescription.ChangeSetId
|
|
294009
|
+
));
|
|
294010
|
+
}
|
|
293997
294011
|
return {
|
|
293998
294012
|
type: "did-deploy-stack",
|
|
293999
294013
|
noOp: false,
|
|
@@ -294367,6 +294381,7 @@ var init_deployments = __esm({
|
|
|
294367
294381
|
envResources: env2.resources,
|
|
294368
294382
|
tags: options.tags,
|
|
294369
294383
|
deploymentMethod: options.deploymentMethod,
|
|
294384
|
+
willExecuteChangeSet: options.willExecuteChangeSet,
|
|
294370
294385
|
forceDeployment: options.forceDeployment,
|
|
294371
294386
|
parameters: options.parameters,
|
|
294372
294387
|
usePreviousParameters: options.usePreviousParameters,
|
|
@@ -294401,7 +294416,7 @@ var init_deployments = __esm({
|
|
|
294401
294416
|
if (result2.type !== "did-deploy-stack") {
|
|
294402
294417
|
return void 0;
|
|
294403
294418
|
}
|
|
294404
|
-
if (result2.noOp && options.
|
|
294419
|
+
if (result2.noOp && options.willExecuteChangeSet) {
|
|
294405
294420
|
const changeSetName = options.deploymentMethod.changeSetName ?? DEFAULT_DEPLOY_CHANGE_SET_NAME;
|
|
294406
294421
|
await this.cleanupChangeSet(options.stack, changeSetName, options.stackEventPollingInterval);
|
|
294407
294422
|
}
|
|
@@ -294785,12 +294800,12 @@ function obscureDiff(diff) {
|
|
|
294785
294800
|
});
|
|
294786
294801
|
}
|
|
294787
294802
|
}
|
|
294788
|
-
var import_node_util6,
|
|
294803
|
+
var import_node_util6, import_cloudformation_diff2, import_chalk19, DiffFormatter;
|
|
294789
294804
|
var init_diff_formatter = __esm({
|
|
294790
294805
|
"../toolkit-lib/lib/api/diff/diff-formatter.ts"() {
|
|
294791
294806
|
"use strict";
|
|
294792
294807
|
import_node_util6 = require("node:util");
|
|
294793
|
-
|
|
294808
|
+
import_cloudformation_diff2 = __toESM(require_lib10());
|
|
294794
294809
|
import_chalk19 = __toESM(require_source());
|
|
294795
294810
|
init_payloads();
|
|
294796
294811
|
init_logical_id_map();
|
|
@@ -294827,7 +294842,7 @@ var init_diff_formatter = __esm({
|
|
|
294827
294842
|
*/
|
|
294828
294843
|
computeDiff(stackName, oldTemplate, newTemplate, changeSet, mappings) {
|
|
294829
294844
|
if (!this.cache.has(stackName)) {
|
|
294830
|
-
const templateDiff = (0,
|
|
294845
|
+
const templateDiff = (0, import_cloudformation_diff2.fullDiff)(oldTemplate, newTemplate, changeSet, this.isImport);
|
|
294831
294846
|
const setMove = /* @__PURE__ */ __name((change, direction, location) => {
|
|
294832
294847
|
if (location != null) {
|
|
294833
294848
|
const [sourceStackName, sourceLogicalId] = location.split(".");
|
|
@@ -294881,8 +294896,8 @@ var init_diff_formatter = __esm({
|
|
|
294881
294896
|
}
|
|
294882
294897
|
let activeDiff = diff;
|
|
294883
294898
|
if (diff.differenceCount && !options.strict) {
|
|
294884
|
-
const mangledNewTemplate = JSON.parse((0,
|
|
294885
|
-
const mangledDiff = (0,
|
|
294899
|
+
const mangledNewTemplate = JSON.parse((0, import_cloudformation_diff2.mangleLikeCloudFormation)(JSON.stringify(newTemplate)));
|
|
294900
|
+
const mangledDiff = (0, import_cloudformation_diff2.fullDiff)(oldTemplate, mangledNewTemplate, changeSet);
|
|
294886
294901
|
filteredChangesCount = Math.max(0, diff.differenceCount - mangledDiff.differenceCount);
|
|
294887
294902
|
if (filteredChangesCount > 0) {
|
|
294888
294903
|
activeDiff = mangledDiff;
|
|
@@ -294895,7 +294910,7 @@ var init_diff_formatter = __esm({
|
|
|
294895
294910
|
const metadataWasFiltered = diffWasNonEmpty && activeDiff.isEmpty;
|
|
294896
294911
|
if (!activeDiff.isEmpty) {
|
|
294897
294912
|
numStacksWithChanges++;
|
|
294898
|
-
(0,
|
|
294913
|
+
(0, import_cloudformation_diff2.formatDifferences)(stream, activeDiff, {
|
|
294899
294914
|
...logicalIdMapFromTemplate(oldTemplate),
|
|
294900
294915
|
...logicalIdMapFromTemplate(newTemplate),
|
|
294901
294916
|
...logicalIdMap
|
|
@@ -294952,7 +294967,7 @@ var init_diff_formatter = __esm({
|
|
|
294952
294967
|
`));
|
|
294953
294968
|
}
|
|
294954
294969
|
try {
|
|
294955
|
-
(0,
|
|
294970
|
+
(0, import_cloudformation_diff2.formatSecurityChanges)(stream, diff, {
|
|
294956
294971
|
...logicalIdMapFromTemplate(newTemplate),
|
|
294957
294972
|
...logicalIdMap
|
|
294958
294973
|
});
|
|
@@ -296055,13 +296070,13 @@ async function listStacks(sdkProvider, environment) {
|
|
|
296055
296070
|
}
|
|
296056
296071
|
function formatEnvironmentSectionHeader2(environment) {
|
|
296057
296072
|
const env2 = `aws://${environment.account}/${environment.region}`;
|
|
296058
|
-
return formatToStream((stream) => (0,
|
|
296073
|
+
return formatToStream((stream) => (0, import_cloudformation_diff3.formatEnvironmentSectionHeader)(stream, env2));
|
|
296059
296074
|
}
|
|
296060
296075
|
function formatTypedMappings2(mappings) {
|
|
296061
|
-
return formatToStream((stream) => (0,
|
|
296076
|
+
return formatToStream((stream) => (0, import_cloudformation_diff3.formatTypedMappings)(stream, mappings));
|
|
296062
296077
|
}
|
|
296063
296078
|
function formatAmbiguousMappings2(paths) {
|
|
296064
|
-
return formatToStream((stream) => (0,
|
|
296079
|
+
return formatToStream((stream) => (0, import_cloudformation_diff3.formatAmbiguousMappings)(stream, paths));
|
|
296065
296080
|
}
|
|
296066
296081
|
function formatToStream(cb) {
|
|
296067
296082
|
const stream = new StringWriteStream();
|
|
@@ -296096,11 +296111,11 @@ async function groupStacks(sdkProvider, localStacks, additionalStackNames) {
|
|
|
296096
296111
|
}
|
|
296097
296112
|
return groups;
|
|
296098
296113
|
}
|
|
296099
|
-
var
|
|
296114
|
+
var import_cloudformation_diff3;
|
|
296100
296115
|
var init_refactoring = __esm({
|
|
296101
296116
|
"../toolkit-lib/lib/api/refactoring/index.ts"() {
|
|
296102
296117
|
"use strict";
|
|
296103
|
-
|
|
296118
|
+
import_cloudformation_diff3 = __toESM(require_lib10());
|
|
296104
296119
|
init_util4();
|
|
296105
296120
|
init_plugin2();
|
|
296106
296121
|
init_streams();
|
|
@@ -298053,12 +298068,12 @@ var init_tags2 = __esm({
|
|
|
298053
298068
|
});
|
|
298054
298069
|
|
|
298055
298070
|
// ../toolkit-lib/lib/api/drift/drift-formatter.ts
|
|
298056
|
-
var import_node_util7,
|
|
298071
|
+
var import_node_util7, import_cloudformation_diff4, import_client_cloudformation7, import_chalk25, DriftFormatter, ADDITION3, CONTEXT2, UPDATE3, REMOVAL3;
|
|
298057
298072
|
var init_drift_formatter = __esm({
|
|
298058
298073
|
"../toolkit-lib/lib/api/drift/drift-formatter.ts"() {
|
|
298059
298074
|
"use strict";
|
|
298060
298075
|
import_node_util7 = require("node:util");
|
|
298061
|
-
|
|
298076
|
+
import_cloudformation_diff4 = __toESM(require_lib10());
|
|
298062
298077
|
import_client_cloudformation7 = __toESM(require_dist_cjs28());
|
|
298063
298078
|
import_chalk25 = __toESM(require_source());
|
|
298064
298079
|
init_logical_id_map();
|
|
@@ -298164,7 +298179,7 @@ ${actualDrifts.length} resource${actualDrifts.length === 1 ? "" : "s"} ${actualD
|
|
|
298164
298179
|
for (let i6 = 0; i6 < propDiffs.length; i6++) {
|
|
298165
298180
|
const diff = propDiffs[i6];
|
|
298166
298181
|
if (!diff.PropertyPath) continue;
|
|
298167
|
-
const difference2 = new
|
|
298182
|
+
const difference2 = new import_cloudformation_diff4.Difference(diff.ExpectedValue, diff.ActualValue);
|
|
298168
298183
|
modified += this.formatTreeDiff(diff.PropertyPath, difference2, i6 === propDiffs.length - 1);
|
|
298169
298184
|
}
|
|
298170
298185
|
}
|
|
@@ -299933,7 +299948,7 @@ var init_toolkit = __esm({
|
|
|
299933
299948
|
const prepareResult = isChangeSetDeployment(options.deploymentMethod) ? await deployments.prepareStack({
|
|
299934
299949
|
...sharedDeployOptions,
|
|
299935
299950
|
deploymentMethod: options.deploymentMethod,
|
|
299936
|
-
|
|
299951
|
+
willExecuteChangeSet: isExecutingChangeSetDeployment(options.deploymentMethod)
|
|
299937
299952
|
}) : void 0;
|
|
299938
299953
|
if (!prepareResult?.noOp) {
|
|
299939
299954
|
const diffChangeSet = isExecuteChangeSetDeployment(options.deploymentMethod) ? (await deployments.describeChangeSet(stack, options.deploymentMethod.changeSetName, prepareResult?.stackArn)).changeSet : prepareResult?.changeSet;
|
|
@@ -331783,14 +331798,14 @@ These resources are no longer managed by CloudFormation but still exist and may
|
|
|
331783
331798
|
});
|
|
331784
331799
|
|
|
331785
331800
|
// lib/runner/snapshot-test-runner.ts
|
|
331786
|
-
var path42, import_stream, import_string_decoder,
|
|
331801
|
+
var path42, import_stream, import_string_decoder, import_cloudformation_diff5, IntegSnapshotRunner, StringWritable;
|
|
331787
331802
|
var init_snapshot_test_runner = __esm({
|
|
331788
331803
|
"lib/runner/snapshot-test-runner.ts"() {
|
|
331789
331804
|
"use strict";
|
|
331790
331805
|
path42 = __toESM(require("path"));
|
|
331791
331806
|
import_stream = require("stream");
|
|
331792
331807
|
import_string_decoder = require("string_decoder");
|
|
331793
|
-
|
|
331808
|
+
import_cloudformation_diff5 = __toESM(require_lib10());
|
|
331794
331809
|
init_cdk_test_app();
|
|
331795
331810
|
init_common4();
|
|
331796
331811
|
IntegSnapshotRunner = class {
|
|
@@ -331915,7 +331930,7 @@ var init_snapshot_test_runner = __esm({
|
|
|
331915
331930
|
actualTemplate = this.canonicalizeTemplate(actualTemplate, actual[stackId].assets);
|
|
331916
331931
|
expectedTemplate = this.canonicalizeTemplate(expectedTemplate, expected[stackId].assets);
|
|
331917
331932
|
}
|
|
331918
|
-
const templateDiff = (0,
|
|
331933
|
+
const templateDiff = (0, import_cloudformation_diff5.fullDiff)(expectedTemplate, actualTemplate);
|
|
331919
331934
|
if (!templateDiff.isEmpty) {
|
|
331920
331935
|
const allowedDestroyTypes = await this.getAllowedDestroyTypesForStack(actualApp, stackId) ?? [];
|
|
331921
331936
|
templateDiff.resources.forEachDifference((logicalId, change) => {
|
|
@@ -331925,16 +331940,16 @@ var init_snapshot_test_runner = __esm({
|
|
|
331925
331940
|
}
|
|
331926
331941
|
if (change.isRemoval) {
|
|
331927
331942
|
destructiveChanges.push({
|
|
331928
|
-
impact:
|
|
331943
|
+
impact: import_cloudformation_diff5.ResourceImpact.WILL_DESTROY,
|
|
331929
331944
|
logicalId,
|
|
331930
331945
|
stackName: templateId
|
|
331931
331946
|
});
|
|
331932
331947
|
} else {
|
|
331933
331948
|
switch (change.changeImpact) {
|
|
331934
|
-
case
|
|
331935
|
-
case
|
|
331936
|
-
case
|
|
331937
|
-
case
|
|
331949
|
+
case import_cloudformation_diff5.ResourceImpact.MAY_REPLACE:
|
|
331950
|
+
case import_cloudformation_diff5.ResourceImpact.WILL_ORPHAN:
|
|
331951
|
+
case import_cloudformation_diff5.ResourceImpact.WILL_DESTROY:
|
|
331952
|
+
case import_cloudformation_diff5.ResourceImpact.WILL_REPLACE:
|
|
331938
331953
|
destructiveChanges.push({
|
|
331939
331954
|
impact: change.changeImpact,
|
|
331940
331955
|
logicalId,
|
|
@@ -331945,7 +331960,7 @@ var init_snapshot_test_runner = __esm({
|
|
|
331945
331960
|
}
|
|
331946
331961
|
});
|
|
331947
331962
|
const writable = new StringWritable({});
|
|
331948
|
-
(0,
|
|
331963
|
+
(0, import_cloudformation_diff5.formatDifferences)(writable, templateDiff);
|
|
331949
331964
|
failures.push({
|
|
331950
331965
|
reason: "SNAPSHOT_FAILED" /* SNAPSHOT_FAILED */,
|
|
331951
331966
|
message: writable.data,
|
package/package.json
CHANGED
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"@aws-cdk/aws-service-spec": "^0.1.200",
|
|
69
69
|
"@aws-cdk/cdk-assets-lib": "1.4.15",
|
|
70
70
|
"@aws-cdk/cloud-assembly-api": "2.3.0",
|
|
71
|
-
"@aws-cdk/cloud-assembly-schema": ">=54.
|
|
71
|
+
"@aws-cdk/cloud-assembly-schema": ">=54.19.0",
|
|
72
72
|
"@aws-cdk/cloudformation-diff": "2.187.2",
|
|
73
|
-
"@aws-cdk/toolkit-lib": "1.38.
|
|
73
|
+
"@aws-cdk/toolkit-lib": "1.38.3",
|
|
74
74
|
"@aws-sdk/client-cloudformation": "^3",
|
|
75
75
|
"chalk": "^4",
|
|
76
76
|
"chokidar": "^4",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public"
|
|
104
104
|
},
|
|
105
|
-
"version": "2.204.
|
|
105
|
+
"version": "2.204.4",
|
|
106
106
|
"packageManager": "yarn@4.17.1",
|
|
107
107
|
"types": "lib/index.d.ts",
|
|
108
108
|
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"yarn projen\"."
|