@aws-cdk/integ-runner 2.203.0 → 2.203.2
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 +75 -33
- package/package.json +4 -4
|
@@ -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.1133.0" };
|
|
4770
4770
|
}
|
|
4771
4771
|
});
|
|
4772
4772
|
|
|
@@ -73912,13 +73912,42 @@ function formatErrorMessage(error4) {
|
|
|
73912
73912
|
return `${error4.message}
|
|
73913
73913
|
${formatErrorMessage(error4.cause)}`;
|
|
73914
73914
|
}
|
|
73915
|
-
|
|
73915
|
+
if (error4?.message) {
|
|
73916
|
+
return error4.message;
|
|
73917
|
+
}
|
|
73918
|
+
const fromSdk = formatSdkError(error4);
|
|
73919
|
+
if (fromSdk) {
|
|
73920
|
+
return fromSdk;
|
|
73921
|
+
}
|
|
73922
|
+
return error4?.toString() || "Unknown error";
|
|
73923
|
+
}
|
|
73924
|
+
function formatSdkError(error4) {
|
|
73925
|
+
const name = error4?.name ?? error4?.code;
|
|
73926
|
+
const metadata = error4?.$metadata ?? {};
|
|
73927
|
+
const details = [];
|
|
73928
|
+
if (typeof metadata.httpStatusCode === "number") {
|
|
73929
|
+
details.push(`HTTP ${metadata.httpStatusCode}`);
|
|
73930
|
+
}
|
|
73931
|
+
if (metadata.requestId) {
|
|
73932
|
+
details.push(`request id: ${metadata.requestId}`);
|
|
73933
|
+
}
|
|
73934
|
+
if (name && details.length > 0) {
|
|
73935
|
+
return `${name} (${details.join(", ")})`;
|
|
73936
|
+
}
|
|
73937
|
+
if (name) {
|
|
73938
|
+
return name;
|
|
73939
|
+
}
|
|
73940
|
+
if (details.length > 0) {
|
|
73941
|
+
return details.join(", ");
|
|
73942
|
+
}
|
|
73943
|
+
return void 0;
|
|
73916
73944
|
}
|
|
73917
73945
|
var init_format_error = __esm({
|
|
73918
73946
|
"../toolkit-lib/lib/util/format-error.ts"() {
|
|
73919
73947
|
"use strict";
|
|
73920
73948
|
init_toolkit_error();
|
|
73921
73949
|
__name(formatErrorMessage, "formatErrorMessage");
|
|
73950
|
+
__name(formatSdkError, "formatSdkError");
|
|
73922
73951
|
}
|
|
73923
73952
|
});
|
|
73924
73953
|
|
|
@@ -270692,7 +270721,13 @@ function synthParametersFromSettings(settings) {
|
|
|
270692
270721
|
return {
|
|
270693
270722
|
context: contextFromSettings(settings),
|
|
270694
270723
|
env: {
|
|
270695
|
-
...settings.get(["debugApp"]) ? debugEnvVars : {}
|
|
270724
|
+
...settings.get(["debugApp"]) ? debugEnvVars : {},
|
|
270725
|
+
// When validation is disabled (e.g. via the CLI's `--no-validation`), forward
|
|
270726
|
+
// it to the app process as an environment variable so framework-side validation
|
|
270727
|
+
// layers can honor it. This is read in framework code that has no access to a
|
|
270728
|
+
// construct tree, which is why it is an environment variable rather than context.
|
|
270729
|
+
// Only an explicit `false` disables it, so a missing setting fails safe (validation on).
|
|
270730
|
+
...settings.get(["validation"]) === false ? { CDK_VALIDATION: "false" } : {}
|
|
270696
270731
|
}
|
|
270697
270732
|
};
|
|
270698
270733
|
}
|
|
@@ -270845,6 +270880,7 @@ function settingsFromSynthOptions(synthOpts = {}) {
|
|
|
270845
270880
|
versionReporting: true,
|
|
270846
270881
|
assetMetadata: true,
|
|
270847
270882
|
assetStaging: true,
|
|
270883
|
+
validation: true,
|
|
270848
270884
|
...synthOpts
|
|
270849
270885
|
}, true);
|
|
270850
270886
|
}
|
|
@@ -285558,14 +285594,16 @@ var init_deploy_stack = __esm({
|
|
|
285558
285594
|
const replacement = hasReplacement(changeSetDescription);
|
|
285559
285595
|
const isPausedFailState = this.cloudFormationStack.stackStatus.isRollbackable;
|
|
285560
285596
|
const rollback = this.options.rollback ?? true;
|
|
285561
|
-
|
|
285597
|
+
if (this.options.express) {
|
|
285598
|
+
return this.executeChangeSet(changeSetDescription);
|
|
285599
|
+
}
|
|
285562
285600
|
if (isPausedFailState && replacement) {
|
|
285563
285601
|
return { type: "failpaused-need-rollback-first", reason: "replacement", status: this.cloudFormationStack.stackStatus.name };
|
|
285564
285602
|
}
|
|
285565
285603
|
if (isPausedFailState && rollback) {
|
|
285566
285604
|
return { type: "failpaused-need-rollback-first", reason: "not-norollback", status: this.cloudFormationStack.stackStatus.name };
|
|
285567
285605
|
}
|
|
285568
|
-
if (
|
|
285606
|
+
if (!rollback && replacement) {
|
|
285569
285607
|
return { type: "replacement-requires-rollback" };
|
|
285570
285608
|
}
|
|
285571
285609
|
return this.executeChangeSet(changeSetDescription);
|
|
@@ -289953,7 +289991,7 @@ function ensureNonEmptyResources(template) {
|
|
|
289953
289991
|
};
|
|
289954
289992
|
}
|
|
289955
289993
|
}
|
|
289956
|
-
function
|
|
289994
|
+
function resolveStackAndConstructPaths(paths, availableStackIds) {
|
|
289957
289995
|
if (paths.length === 0) {
|
|
289958
289996
|
throw new ToolkitError("MissingConstructPath", "At least one construct path is required (e.g. cdk orphan MyStack/MyTable)");
|
|
289959
289997
|
}
|
|
@@ -289961,25 +289999,31 @@ function parseAndValidateConstructPaths(paths) {
|
|
|
289961
289999
|
let stackId;
|
|
289962
290000
|
for (const raw of paths) {
|
|
289963
290001
|
const p3 = raw.replace(/^\//, "");
|
|
289964
|
-
const
|
|
289965
|
-
if (
|
|
289966
|
-
throw new ToolkitError(
|
|
290002
|
+
const matchedStack = availableStackIds.filter((id) => p3 === id || p3.startsWith(`${id}/`)).sort((a6, b6) => b6.length - a6.length)[0];
|
|
290003
|
+
if (!matchedStack) {
|
|
290004
|
+
throw new ToolkitError(
|
|
290005
|
+
"StackNotFound",
|
|
290006
|
+
`No stack found for construct path '${raw}'. Available stacks: ${availableStackIds.join(", ")}`
|
|
290007
|
+
);
|
|
289967
290008
|
}
|
|
289968
|
-
const
|
|
289969
|
-
|
|
289970
|
-
|
|
289971
|
-
|
|
290009
|
+
const constructPath = p3.substring(matchedStack.length + 1);
|
|
290010
|
+
if (constructPath === "") {
|
|
290011
|
+
throw new ToolkitError(
|
|
290012
|
+
"InvalidConstructPath",
|
|
290013
|
+
`Construct path '${raw}' must include a construct path within the stack (e.g. ${matchedStack}/MyTable)`
|
|
290014
|
+
);
|
|
290015
|
+
}
|
|
290016
|
+
if (stackId && matchedStack !== stackId) {
|
|
290017
|
+
throw new ToolkitError("MultipleStacks", `All construct paths must reference the same stack, but got '${stackId}' and '${matchedStack}'`);
|
|
289972
290018
|
}
|
|
289973
|
-
stackId =
|
|
290019
|
+
stackId = matchedStack;
|
|
289974
290020
|
constructPaths.push(constructPath);
|
|
289975
290021
|
}
|
|
289976
290022
|
return { stackId, constructPaths };
|
|
289977
290023
|
}
|
|
289978
|
-
var import_cloud_assembly_api16;
|
|
289979
290024
|
var init_helpers6 = __esm({
|
|
289980
290025
|
"../toolkit-lib/lib/api/orphan/private/helpers.ts"() {
|
|
289981
290026
|
"use strict";
|
|
289982
|
-
import_cloud_assembly_api16 = __toESM(require_lib3());
|
|
289983
290027
|
init_toolkit_error();
|
|
289984
290028
|
__name(walkObject, "walkObject");
|
|
289985
290029
|
__name(replaceInObject, "replaceInObject");
|
|
@@ -289987,7 +290031,7 @@ var init_helpers6 = __esm({
|
|
|
289987
290031
|
__name(removeDependsOn, "removeDependsOn");
|
|
289988
290032
|
__name(assertDeploySucceeded, "assertDeploySucceeded");
|
|
289989
290033
|
__name(ensureNonEmptyResources, "ensureNonEmptyResources");
|
|
289990
|
-
__name(
|
|
290034
|
+
__name(resolveStackAndConstructPaths, "resolveStackAndConstructPaths");
|
|
289991
290035
|
}
|
|
289992
290036
|
});
|
|
289993
290037
|
|
|
@@ -290376,6 +290420,7 @@ function formatValidationReports(fileRoot, reports) {
|
|
|
290376
290420
|
});
|
|
290377
290421
|
return [
|
|
290378
290422
|
...pluginFailures.map(formatPluginFailure),
|
|
290423
|
+
...successfullyExecutedPlugins.flatMap((r6) => r6.preamble ? [`${import_chalk27.default.underline(sanitize(r6.pluginName))}: ${sanitize(r6.preamble)}`] : []),
|
|
290379
290424
|
...violations.map((v) => formatViolationBlock(fileRoot, v))
|
|
290380
290425
|
];
|
|
290381
290426
|
}
|
|
@@ -290452,7 +290497,7 @@ function formatConstructInfo(fileRoot, construct) {
|
|
|
290452
290497
|
const logicalId = sanitize(construct.cloudFormationResource?.logicalId);
|
|
290453
290498
|
if (construct.constructPath) {
|
|
290454
290499
|
const cPath = sanitize(construct.constructPath);
|
|
290455
|
-
parts.push(logicalId ? `${
|
|
290500
|
+
parts.push(logicalId ? `${cPath} (${logicalId})` : cPath);
|
|
290456
290501
|
} else {
|
|
290457
290502
|
if (construct.cloudFormationResource?.templatePath) {
|
|
290458
290503
|
parts.push(humanFriendlyFilename(fileRoot, sanitize(construct.cloudFormationResource.templatePath)));
|
|
@@ -291815,16 +291860,13 @@ ${deployResult.stackArn}`));
|
|
|
291815
291860
|
try {
|
|
291816
291861
|
this.requireUnstableFeature("orphan");
|
|
291817
291862
|
const ioHelper = asIoHelper(this.ioHost, "orphan");
|
|
291818
|
-
const parsed = parseAndValidateConstructPaths(options.constructPaths);
|
|
291819
291863
|
const assembly = __using(_stack, await synthAndMeasure(ioHelper, cx, ALL_STACKS), true);
|
|
291820
291864
|
const allStacks = await assembly.selectStacksV2(ALL_STACKS);
|
|
291865
|
+
const parsed = resolveStackAndConstructPaths(
|
|
291866
|
+
options.constructPaths,
|
|
291867
|
+
allStacks.stackArtifacts.map((s) => s.hierarchicalId)
|
|
291868
|
+
);
|
|
291821
291869
|
const stack = allStacks.stackArtifacts.find((s) => s.hierarchicalId === parsed.stackId);
|
|
291822
|
-
if (!stack) {
|
|
291823
|
-
throw new ToolkitError(
|
|
291824
|
-
"StackNotFound",
|
|
291825
|
-
`No stack found with construct ID '${parsed.stackId}'. Available stacks: ${allStacks.stackArtifacts.map((s) => s.hierarchicalId).join(", ")}`
|
|
291826
|
-
);
|
|
291827
|
-
}
|
|
291828
291870
|
const deployments = await this.deploymentsForAction("orphan");
|
|
291829
291871
|
const orphaner = new ResourceOrphaner({
|
|
291830
291872
|
deployments,
|
|
@@ -321423,12 +321465,12 @@ var init_proxy_agent = __esm({
|
|
|
321423
321465
|
});
|
|
321424
321466
|
|
|
321425
321467
|
// lib/engines/toolkit-lib.ts
|
|
321426
|
-
var path38,
|
|
321468
|
+
var path38, import_cloud_assembly_api16, import_toolkit_lib, import_chalk29, fs41, ToolkitLibRunnerEngine, IntegRunnerIoHost, NoopIoHost;
|
|
321427
321469
|
var init_toolkit_lib = __esm({
|
|
321428
321470
|
"lib/engines/toolkit-lib.ts"() {
|
|
321429
321471
|
"use strict";
|
|
321430
321472
|
path38 = __toESM(require("node:path"));
|
|
321431
|
-
|
|
321473
|
+
import_cloud_assembly_api16 = __toESM(require_lib3());
|
|
321432
321474
|
import_toolkit_lib = __toESM(require_lib11());
|
|
321433
321475
|
import_chalk29 = __toESM(require_source());
|
|
321434
321476
|
fs41 = __toESM(require_lib4());
|
|
@@ -321655,11 +321697,11 @@ var init_toolkit_lib = __esm({
|
|
|
321655
321697
|
* This catches that misconfiguration.
|
|
321656
321698
|
*/
|
|
321657
321699
|
async validateRegion(asm) {
|
|
321658
|
-
if (this.options.region ===
|
|
321700
|
+
if (this.options.region === import_cloud_assembly_api16.UNKNOWN_REGION) {
|
|
321659
321701
|
return;
|
|
321660
321702
|
}
|
|
321661
321703
|
for (const stack of asm.cloudAssembly.stacksRecursively) {
|
|
321662
|
-
if (stack.environment.region !== this.options.region && stack.environment.region !==
|
|
321704
|
+
if (stack.environment.region !== this.options.region && stack.environment.region !== import_cloud_assembly_api16.UNKNOWN_REGION) {
|
|
321663
321705
|
this.ioHost.notify({
|
|
321664
321706
|
action: "deploy",
|
|
321665
321707
|
code: "CDK_RUNNER_W0000",
|
|
@@ -321741,12 +321783,12 @@ var init_files2 = __esm({
|
|
|
321741
321783
|
function currentlyRecommendedAwsCdkLibFlags() {
|
|
321742
321784
|
return recommended_feature_flags_exports;
|
|
321743
321785
|
}
|
|
321744
|
-
var path40,
|
|
321786
|
+
var path40, import_cloud_assembly_api17, import_cloud_assembly_schema11, fs42, DESTRUCTIVE_CHANGES, CdkTestApp, DEFAULT_SYNTH_OPTIONS, DEFAULT_ARGS;
|
|
321745
321787
|
var init_cdk_test_app = __esm({
|
|
321746
321788
|
"lib/runner/cdk-test-app.ts"() {
|
|
321747
321789
|
"use strict";
|
|
321748
321790
|
path40 = __toESM(require("path"));
|
|
321749
|
-
|
|
321791
|
+
import_cloud_assembly_api17 = __toESM(require_lib3());
|
|
321750
321792
|
import_cloud_assembly_schema11 = __toESM(require_lib2());
|
|
321751
321793
|
fs42 = __toESM(require_lib4());
|
|
321752
321794
|
init_integ_test_suite();
|
|
@@ -321763,7 +321805,7 @@ var init_cdk_test_app = __esm({
|
|
|
321763
321805
|
constructor(options, testSpecificContext) {
|
|
321764
321806
|
this.options = options;
|
|
321765
321807
|
this.testSpecificContext = testSpecificContext;
|
|
321766
|
-
this.hasValidRegion = options.region !==
|
|
321808
|
+
this.hasValidRegion = options.region !== import_cloud_assembly_api17.UNKNOWN_REGION;
|
|
321767
321809
|
this.test = options.test;
|
|
321768
321810
|
const outputDirectoryNameTemplate = options.outputDirectoryNameTemplate;
|
|
321769
321811
|
this.outputDirectory = absAwareJoin(this.test.testDirectory, this.test.specializeTemplate(outputDirectoryNameTemplate));
|
|
@@ -322197,7 +322239,7 @@ var init_cdk_test_app = __esm({
|
|
|
322197
322239
|
context: {
|
|
322198
322240
|
// We have traditionally set this, but it's quite a bad idea. It makes region-agnostic stacks undeployable, and there's really no reason for that.
|
|
322199
322241
|
// However, if we unset this, we will break many existing snapshots so we keep it for now.
|
|
322200
|
-
[
|
|
322242
|
+
[import_cloud_assembly_api17.AVAILABILITY_ZONE_FALLBACK_CONTEXT_KEY]: ["test-region-1a", "test-region-1b", "test-region-1c"],
|
|
322201
322243
|
"availability-zones:account=12345678:region=test-region": ["test-region-1a", "test-region-1b", "test-region-1c"],
|
|
322202
322244
|
"ssm:account=12345678:parameterName=/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2:region=test-region": "ami-1234",
|
|
322203
322245
|
"ssm:account=12345678:parameterName=/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2:region=test-region": "ami-1234",
|
package/package.json
CHANGED
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"ts-jest": "^29.4.11",
|
|
65
65
|
"typescript": "5.9",
|
|
66
66
|
"@aws-cdk/aws-service-spec": "^0.1.190",
|
|
67
|
-
"@aws-cdk/cdk-assets-lib": "1.4.
|
|
67
|
+
"@aws-cdk/cdk-assets-lib": "1.4.15",
|
|
68
68
|
"@aws-cdk/cloud-assembly-api": "2.3.0",
|
|
69
|
-
"@aws-cdk/cloud-assembly-schema": ">=54.
|
|
69
|
+
"@aws-cdk/cloud-assembly-schema": ">=54.14.0",
|
|
70
70
|
"@aws-cdk/cloudformation-diff": "2.187.2",
|
|
71
|
-
"@aws-cdk/toolkit-lib": "1.
|
|
71
|
+
"@aws-cdk/toolkit-lib": "1.36.1",
|
|
72
72
|
"@aws-sdk/client-cloudformation": "^3",
|
|
73
73
|
"chalk": "^4",
|
|
74
74
|
"chokidar": "^4",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"publishConfig": {
|
|
101
101
|
"access": "public"
|
|
102
102
|
},
|
|
103
|
-
"version": "2.203.
|
|
103
|
+
"version": "2.203.2",
|
|
104
104
|
"packageManager": "yarn@4.13.0",
|
|
105
105
|
"types": "lib/index.d.ts",
|
|
106
106
|
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"yarn projen\"."
|