@aws-cdk/integ-runner 2.197.4 → 2.197.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/lib/workers/extract/index.js +185 -78
- package/package.json +5 -5
|
@@ -1420,8 +1420,8 @@ var require_helpers = __commonJS({
|
|
|
1420
1420
|
var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message2, instance, schema, path38, name, argument) {
|
|
1421
1421
|
if (Array.isArray(path38)) {
|
|
1422
1422
|
this.path = path38;
|
|
1423
|
-
this.property = path38.reduce(function(
|
|
1424
|
-
return
|
|
1423
|
+
this.property = path38.reduce(function(sum4, item) {
|
|
1424
|
+
return sum4 + makeSuffix(item);
|
|
1425
1425
|
}, "instance");
|
|
1426
1426
|
} else if (path38 !== void 0) {
|
|
1427
1427
|
this.property = path38;
|
|
@@ -1522,8 +1522,8 @@ var require_helpers = __commonJS({
|
|
|
1522
1522
|
this.options = options;
|
|
1523
1523
|
if (Array.isArray(path38)) {
|
|
1524
1524
|
this.path = path38;
|
|
1525
|
-
this.propertyPath = path38.reduce(function(
|
|
1526
|
-
return
|
|
1525
|
+
this.propertyPath = path38.reduce(function(sum4, item) {
|
|
1526
|
+
return sum4 + makeSuffix(item);
|
|
1527
1527
|
}, "instance");
|
|
1528
1528
|
} else {
|
|
1529
1529
|
this.propertyPath = path38;
|
|
@@ -4670,7 +4670,7 @@ var require_semver2 = __commonJS({
|
|
|
4670
4670
|
// ../cloud-assembly-schema/cli-version.json
|
|
4671
4671
|
var require_cli_version = __commonJS({
|
|
4672
4672
|
"../cloud-assembly-schema/cli-version.json"(exports2, module2) {
|
|
4673
|
-
module2.exports = { version: "2.
|
|
4673
|
+
module2.exports = { version: "2.1112.0" };
|
|
4674
4674
|
}
|
|
4675
4675
|
});
|
|
4676
4676
|
|
|
@@ -7028,11 +7028,11 @@ var init_metadata = __esm({
|
|
|
7028
7028
|
"../cloud-assembly-api/lib/metadata.ts"() {
|
|
7029
7029
|
"use strict";
|
|
7030
7030
|
PATH_METADATA_KEY = "aws:cdk:path";
|
|
7031
|
-
SynthesisMessageLevel = /* @__PURE__ */ ((
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
return
|
|
7031
|
+
SynthesisMessageLevel = /* @__PURE__ */ ((SynthesisMessageLevel4) => {
|
|
7032
|
+
SynthesisMessageLevel4["INFO"] = "info";
|
|
7033
|
+
SynthesisMessageLevel4["WARNING"] = "warning";
|
|
7034
|
+
SynthesisMessageLevel4["ERROR"] = "error";
|
|
7035
|
+
return SynthesisMessageLevel4;
|
|
7036
7036
|
})(SynthesisMessageLevel || {});
|
|
7037
7037
|
}
|
|
7038
7038
|
});
|
|
@@ -8250,12 +8250,12 @@ var require_metadata = __commonJS({
|
|
|
8250
8250
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8251
8251
|
exports2.SynthesisMessageLevel = exports2.PATH_METADATA_KEY = void 0;
|
|
8252
8252
|
exports2.PATH_METADATA_KEY = "aws:cdk:path";
|
|
8253
|
-
var
|
|
8254
|
-
(function(
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
})(
|
|
8253
|
+
var SynthesisMessageLevel4;
|
|
8254
|
+
(function(SynthesisMessageLevel5) {
|
|
8255
|
+
SynthesisMessageLevel5["INFO"] = "info";
|
|
8256
|
+
SynthesisMessageLevel5["WARNING"] = "warning";
|
|
8257
|
+
SynthesisMessageLevel5["ERROR"] = "error";
|
|
8258
|
+
})(SynthesisMessageLevel4 || (exports2.SynthesisMessageLevel = SynthesisMessageLevel4 = {}));
|
|
8259
8259
|
}
|
|
8260
8260
|
});
|
|
8261
8261
|
|
|
@@ -8557,7 +8557,7 @@ var require_cloudformation_artifact = __commonJS({
|
|
|
8557
8557
|
var environment_1 = require_environment2();
|
|
8558
8558
|
var error_1 = require_error();
|
|
8559
8559
|
var CLOUDFORMATION_STACK_ARTIFACT_SYM2 = /* @__PURE__ */ Symbol.for("@aws-cdk/cx-api.CloudFormationStackArtifact");
|
|
8560
|
-
var
|
|
8560
|
+
var CloudFormationStackArtifact4 = class extends cloud_artifact_1.CloudArtifact {
|
|
8561
8561
|
static {
|
|
8562
8562
|
__name(this, "CloudFormationStackArtifact");
|
|
8563
8563
|
}
|
|
@@ -8627,8 +8627,8 @@ var require_cloudformation_artifact = __commonJS({
|
|
|
8627
8627
|
return this._template;
|
|
8628
8628
|
}
|
|
8629
8629
|
};
|
|
8630
|
-
exports2.CloudFormationStackArtifact =
|
|
8631
|
-
Object.defineProperty(
|
|
8630
|
+
exports2.CloudFormationStackArtifact = CloudFormationStackArtifact4;
|
|
8631
|
+
Object.defineProperty(CloudFormationStackArtifact4.prototype, CLOUDFORMATION_STACK_ARTIFACT_SYM2, {
|
|
8632
8632
|
value: true,
|
|
8633
8633
|
enumerable: false,
|
|
8634
8634
|
writable: false
|
|
@@ -9412,12 +9412,12 @@ var require_legacy_moved = __commonJS({
|
|
|
9412
9412
|
Object.defineProperty(exports2, "UNKNOWN_REGION", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
9413
9413
|
return cloud_assembly_api_1.UNKNOWN_REGION;
|
|
9414
9414
|
}, "get") });
|
|
9415
|
-
var
|
|
9416
|
-
(function(
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
})(
|
|
9415
|
+
var SynthesisMessageLevel4;
|
|
9416
|
+
(function(SynthesisMessageLevel5) {
|
|
9417
|
+
SynthesisMessageLevel5["INFO"] = "info";
|
|
9418
|
+
SynthesisMessageLevel5["WARNING"] = "warning";
|
|
9419
|
+
SynthesisMessageLevel5["ERROR"] = "error";
|
|
9420
|
+
})(SynthesisMessageLevel4 || (exports2.SynthesisMessageLevel = SynthesisMessageLevel4 = {}));
|
|
9421
9421
|
exports2.CloudAssembly = cloud_assembly_api_1.CloudAssembly;
|
|
9422
9422
|
exports2.CloudArtifact = cloud_assembly_api_1.CloudArtifact;
|
|
9423
9423
|
exports2.CloudFormationStackArtifact = cloud_assembly_api_1.CloudFormationStackArtifact;
|
|
@@ -66948,10 +66948,10 @@ var require_headers = __commonJS({
|
|
|
66948
66948
|
}
|
|
66949
66949
|
__name(indexOf, "indexOf");
|
|
66950
66950
|
function cksum(block) {
|
|
66951
|
-
let
|
|
66952
|
-
for (let i10 = 0; i10 < 148; i10++)
|
|
66953
|
-
for (let j10 = 156; j10 < 512; j10++)
|
|
66954
|
-
return
|
|
66951
|
+
let sum4 = 8 * 32;
|
|
66952
|
+
for (let i10 = 0; i10 < 148; i10++) sum4 += block[i10];
|
|
66953
|
+
for (let j10 = 156; j10 < 512; j10++) sum4 += block[j10];
|
|
66954
|
+
return sum4;
|
|
66955
66955
|
}
|
|
66956
66956
|
__name(cksum, "cksum");
|
|
66957
66957
|
function encodeOct(val, n10) {
|
|
@@ -66988,12 +66988,12 @@ var require_headers = __commonJS({
|
|
|
66988
66988
|
if (positive) tuple.push(byte);
|
|
66989
66989
|
else tuple.push(255 - byte);
|
|
66990
66990
|
}
|
|
66991
|
-
let
|
|
66991
|
+
let sum4 = 0;
|
|
66992
66992
|
const l10 = tuple.length;
|
|
66993
66993
|
for (i10 = 0; i10 < l10; i10++) {
|
|
66994
|
-
|
|
66994
|
+
sum4 += tuple[i10] * Math.pow(256, i10);
|
|
66995
66995
|
}
|
|
66996
|
-
return positive ?
|
|
66996
|
+
return positive ? sum4 : -1 * sum4;
|
|
66997
66997
|
}
|
|
66998
66998
|
__name(parse256, "parse256");
|
|
66999
66999
|
function decodeOct(val, offset, length) {
|
|
@@ -72614,7 +72614,7 @@ ${indent}${str}`;
|
|
|
72614
72614
|
end
|
|
72615
72615
|
} = flowChars;
|
|
72616
72616
|
const strings = nodes.map((n10) => n10.str);
|
|
72617
|
-
if (hasItemWithNewLine || strings.reduce((
|
|
72617
|
+
if (hasItemWithNewLine || strings.reduce((sum4, str2) => sum4 + str2.length + 2, 2) > _Collection.maxFlowStringSingleLineLength) {
|
|
72618
72618
|
str = start;
|
|
72619
72619
|
for (const s10 of strings) {
|
|
72620
72620
|
str += s10 ? `
|
|
@@ -78081,6 +78081,8 @@ var init_span = __esm({
|
|
|
78081
78081
|
spanId;
|
|
78082
78082
|
startTime;
|
|
78083
78083
|
timingMsgTemplate;
|
|
78084
|
+
counters = {};
|
|
78085
|
+
openTimers = /* @__PURE__ */ new Set();
|
|
78084
78086
|
constructor(ioHelper, definition, makeHelper) {
|
|
78085
78087
|
this.definition = definition;
|
|
78086
78088
|
this.ioHelper = ioHelper;
|
|
@@ -78108,6 +78110,10 @@ var init_span = __esm({
|
|
|
78108
78110
|
}
|
|
78109
78111
|
async end(x10, y4) {
|
|
78110
78112
|
const duration = this.time();
|
|
78113
|
+
for (const t10 of this.openTimers) {
|
|
78114
|
+
t10.stop();
|
|
78115
|
+
}
|
|
78116
|
+
this.openTimers.clear();
|
|
78111
78117
|
const endInput = parseArgs(x10, y4);
|
|
78112
78118
|
const endMsg = endInput.message ?? util2.format(this.timingMsgTemplate, this.definition.name, duration.asSec);
|
|
78113
78119
|
const endPayload = endInput.payload;
|
|
@@ -78115,14 +78121,30 @@ var init_span = __esm({
|
|
|
78115
78121
|
endMsg,
|
|
78116
78122
|
{
|
|
78117
78123
|
duration: duration.asMs,
|
|
78124
|
+
...Object.keys(this.counters).length > 0 ? { counters: this.counters } : {},
|
|
78118
78125
|
...endPayload
|
|
78119
78126
|
}
|
|
78120
78127
|
));
|
|
78121
78128
|
return duration;
|
|
78122
78129
|
}
|
|
78130
|
+
incCounter(name, delta = 1) {
|
|
78131
|
+
this.counters[name] = (this.counters[name] ?? 0) + delta;
|
|
78132
|
+
}
|
|
78123
78133
|
async requestResponse(msg) {
|
|
78124
78134
|
return this.ioHelper.requestResponse(withSpanId(this.spanId, msg));
|
|
78125
78135
|
}
|
|
78136
|
+
startTimer(name) {
|
|
78137
|
+
const start = Date.now();
|
|
78138
|
+
const t10 = {
|
|
78139
|
+
stop: /* @__PURE__ */ __name(() => {
|
|
78140
|
+
this.openTimers.delete(t10);
|
|
78141
|
+
this.incCounter(`${name}_ms`, Math.floor(Date.now() - start) / 1e3);
|
|
78142
|
+
this.incCounter(`${name}_cnt`, 1);
|
|
78143
|
+
}, "stop")
|
|
78144
|
+
};
|
|
78145
|
+
this.openTimers.add(t10);
|
|
78146
|
+
return t10;
|
|
78147
|
+
}
|
|
78126
78148
|
time() {
|
|
78127
78149
|
const elapsedTime = (/* @__PURE__ */ new Date()).getTime() - this.startTime;
|
|
78128
78150
|
return {
|
|
@@ -295027,7 +295049,7 @@ async function loadTree(assembly, trace3) {
|
|
|
295027
295049
|
try {
|
|
295028
295050
|
const outdir = assembly.directory;
|
|
295029
295051
|
const fileName = assembly.tree()?.file;
|
|
295030
|
-
return fileName ? fs17.readJSONSync(path13.join(outdir, fileName)).tree :
|
|
295052
|
+
return fileName ? fs17.readJSONSync(path13.join(outdir, fileName)).tree : void 0;
|
|
295031
295053
|
} catch (e10) {
|
|
295032
295054
|
await trace3(`Failed to get tree.json file: ${e10}. Proceeding with empty tree.`);
|
|
295033
295055
|
return void 0;
|
|
@@ -300301,19 +300323,27 @@ function writeContextToEnv(env, context, completeness) {
|
|
|
300301
300323
|
}
|
|
300302
300324
|
};
|
|
300303
300325
|
}
|
|
300304
|
-
async function checkContextOverflowSupport(
|
|
300305
|
-
const traceFn = /* @__PURE__ */ __name((msg) => ioHelper.defaults.trace(msg), "traceFn");
|
|
300306
|
-
const tree = await loadTree(assembly, traceFn);
|
|
300326
|
+
async function checkContextOverflowSupport(tree, ioHelper) {
|
|
300307
300327
|
if (!frameworkSupportsContextOverflow(tree)) {
|
|
300308
300328
|
await ioHelper.notify(IO.CDK_ASSEMBLY_W0010.msg("Part of the context could not be sent to the application. Please update the AWS CDK library to the latest version."));
|
|
300309
300329
|
}
|
|
300310
300330
|
}
|
|
300311
|
-
function
|
|
300312
|
-
|
|
300331
|
+
function findConstructLibraryVersion(tree) {
|
|
300332
|
+
let ret = void 0;
|
|
300333
|
+
some(tree, (node) => {
|
|
300313
300334
|
const fqn = node.constructInfo?.fqn;
|
|
300314
300335
|
const version = node.constructInfo?.version;
|
|
300315
|
-
|
|
300336
|
+
if (fqn?.startsWith("aws-cdk-lib.") || fqn?.startsWith("@aws-cdk/core.")) {
|
|
300337
|
+
ret = version;
|
|
300338
|
+
return true;
|
|
300339
|
+
}
|
|
300340
|
+
return false;
|
|
300316
300341
|
});
|
|
300342
|
+
return ret !== "0.0.0" ? ret : void 0;
|
|
300343
|
+
}
|
|
300344
|
+
function frameworkSupportsContextOverflow(tree) {
|
|
300345
|
+
const version = findConstructLibraryVersion(tree);
|
|
300346
|
+
return !version || !(0, import_semver.lte)(version, "2.38.0");
|
|
300317
300347
|
}
|
|
300318
300348
|
async function assemblyFromDirectory(assemblyDir, ioHelper, loadOptions = {}) {
|
|
300319
300349
|
try {
|
|
@@ -300323,7 +300353,8 @@ async function assemblyFromDirectory(assemblyDir, ioHelper, loadOptions = {}) {
|
|
|
300323
300353
|
// We sort as we deploy
|
|
300324
300354
|
topoSort: false
|
|
300325
300355
|
});
|
|
300326
|
-
await
|
|
300356
|
+
const tree = await loadTree(assembly, ioHelper.defaults.trace.bind(ioHelper.defaults));
|
|
300357
|
+
await checkContextOverflowSupport(tree, ioHelper);
|
|
300327
300358
|
return assembly;
|
|
300328
300359
|
} catch (err) {
|
|
300329
300360
|
if (err.message.includes(cxschema7.VERSION_MISMATCH)) {
|
|
@@ -300518,6 +300549,7 @@ var init_prepare_source = __esm({
|
|
|
300518
300549
|
};
|
|
300519
300550
|
__name(writeContextToEnv, "writeContextToEnv");
|
|
300520
300551
|
__name(checkContextOverflowSupport, "checkContextOverflowSupport");
|
|
300552
|
+
__name(findConstructLibraryVersion, "findConstructLibraryVersion");
|
|
300521
300553
|
__name(frameworkSupportsContextOverflow, "frameworkSupportsContextOverflow");
|
|
300522
300554
|
__name(assemblyFromDirectory, "assemblyFromDirectory");
|
|
300523
300555
|
__name(settingsFromSynthOptions, "settingsFromSynthOptions");
|
|
@@ -305154,10 +305186,10 @@ var require_utils11 = __commonJS({
|
|
|
305154
305186
|
return (_b = (_a3 = input.match(/\s+/g)) === null || _a3 === void 0 ? void 0 : _a3.length) !== null && _b !== void 0 ? _b : 0;
|
|
305155
305187
|
}, "countSpaceSequence");
|
|
305156
305188
|
exports2.countSpaceSequence = countSpaceSequence;
|
|
305157
|
-
var distributeUnevenly = /* @__PURE__ */ __name((
|
|
305158
|
-
const result2 = Array.from({ length }).fill(Math.floor(
|
|
305189
|
+
var distributeUnevenly = /* @__PURE__ */ __name((sum4, length) => {
|
|
305190
|
+
const result2 = Array.from({ length }).fill(Math.floor(sum4 / length));
|
|
305159
305191
|
return result2.map((element, index) => {
|
|
305160
|
-
return element + (index <
|
|
305192
|
+
return element + (index < sum4 % length ? 1 : 0);
|
|
305161
305193
|
});
|
|
305162
305194
|
}, "distributeUnevenly");
|
|
305163
305195
|
exports2.distributeUnevenly = distributeUnevenly;
|
|
@@ -317189,7 +317221,7 @@ var init_diff_formatter = __esm({
|
|
|
317189
317221
|
}
|
|
317190
317222
|
if (diff.differenceCount && !options.strict) {
|
|
317191
317223
|
const mangledNewTemplate = JSON.parse((0, import_cloudformation_diff2.mangleLikeCloudFormation)(JSON.stringify(this.newTemplate.template)));
|
|
317192
|
-
const mangledDiff = (0, import_cloudformation_diff2.fullDiff)(
|
|
317224
|
+
const mangledDiff = (0, import_cloudformation_diff2.fullDiff)(oldTemplate, mangledNewTemplate, this.changeSet);
|
|
317193
317225
|
filteredChangesCount = Math.max(0, diff.differenceCount - mangledDiff.differenceCount);
|
|
317194
317226
|
if (filteredChangesCount > 0) {
|
|
317195
317227
|
diff = mangledDiff;
|
|
@@ -318083,6 +318115,20 @@ var init_work_graph = __esm({
|
|
|
318083
318115
|
}
|
|
318084
318116
|
});
|
|
318085
318117
|
}
|
|
318118
|
+
/**
|
|
318119
|
+
* Execute all stack nodes in dependency order with the given concurrency.
|
|
318120
|
+
*
|
|
318121
|
+
* Unlike `doParallel`, this method only handles stack nodes and takes a
|
|
318122
|
+
* simple callback. Intended for destroy where there are no asset nodes.
|
|
318123
|
+
*/
|
|
318124
|
+
processStacks(concurrency, fn) {
|
|
318125
|
+
return this.forAllArtifacts(concurrency, async (x10) => {
|
|
318126
|
+
if (x10.type !== "stack") {
|
|
318127
|
+
return;
|
|
318128
|
+
}
|
|
318129
|
+
await fn(x10);
|
|
318130
|
+
});
|
|
318131
|
+
}
|
|
318086
318132
|
/**
|
|
318087
318133
|
* Return the set of unblocked nodes
|
|
318088
318134
|
*/
|
|
@@ -318310,11 +318356,45 @@ var init_work_graph = __esm({
|
|
|
318310
318356
|
}
|
|
318311
318357
|
});
|
|
318312
318358
|
|
|
318359
|
+
// ../toolkit-lib/lib/api/work-graph/build-destroy-work-graph.ts
|
|
318360
|
+
function buildDestroyWorkGraph(stacks, ioHelper) {
|
|
318361
|
+
const graph = new WorkGraph({}, ioHelper);
|
|
318362
|
+
const selectedIds = new Set(stacks.map((s10) => s10.id));
|
|
318363
|
+
for (const stack of stacks) {
|
|
318364
|
+
graph.addNodes({
|
|
318365
|
+
type: "stack",
|
|
318366
|
+
id: stack.id,
|
|
318367
|
+
dependencies: /* @__PURE__ */ new Set(),
|
|
318368
|
+
stack,
|
|
318369
|
+
deploymentState: "pending" /* PENDING */,
|
|
318370
|
+
priority: 0
|
|
318371
|
+
});
|
|
318372
|
+
}
|
|
318373
|
+
for (const stack of stacks) {
|
|
318374
|
+
for (const dep of stack.dependencies) {
|
|
318375
|
+
if (cxapi6.CloudFormationStackArtifact.isCloudFormationStackArtifact(dep) && selectedIds.has(dep.id)) {
|
|
318376
|
+
graph.addDependency(dep.id, stack.id);
|
|
318377
|
+
}
|
|
318378
|
+
}
|
|
318379
|
+
}
|
|
318380
|
+
return graph;
|
|
318381
|
+
}
|
|
318382
|
+
var cxapi6;
|
|
318383
|
+
var init_build_destroy_work_graph = __esm({
|
|
318384
|
+
"../toolkit-lib/lib/api/work-graph/build-destroy-work-graph.ts"() {
|
|
318385
|
+
"use strict";
|
|
318386
|
+
cxapi6 = __toESM(require_lib3());
|
|
318387
|
+
init_work_graph();
|
|
318388
|
+
init_work_graph_types();
|
|
318389
|
+
__name(buildDestroyWorkGraph, "buildDestroyWorkGraph");
|
|
318390
|
+
}
|
|
318391
|
+
});
|
|
318392
|
+
|
|
318313
318393
|
// ../toolkit-lib/lib/api/work-graph/work-graph-builder.ts
|
|
318314
318394
|
function stacksFromAssets(artifacts) {
|
|
318315
318395
|
const ret = /* @__PURE__ */ new Map();
|
|
318316
|
-
for (const stack of artifacts.filter((x10) =>
|
|
318317
|
-
const assetArtifacts = stack.dependencies.filter((x10) =>
|
|
318396
|
+
for (const stack of artifacts.filter((x10) => cxapi7.CloudFormationStackArtifact.isCloudFormationStackArtifact(x10))) {
|
|
318397
|
+
const assetArtifacts = stack.dependencies.filter((x10) => cxapi7.AssetManifestArtifact.isAssetManifestArtifact(x10));
|
|
318318
318398
|
for (const art of assetArtifacts) {
|
|
318319
318399
|
ret.set(art, stack);
|
|
318320
318400
|
}
|
|
@@ -318322,14 +318402,14 @@ function stacksFromAssets(artifacts) {
|
|
|
318322
318402
|
return ret;
|
|
318323
318403
|
}
|
|
318324
318404
|
function onlyStacks(artifacts) {
|
|
318325
|
-
return artifacts.filter((x10) =>
|
|
318405
|
+
return artifacts.filter((x10) => cxapi7.CloudFormationStackArtifact.isCloudFormationStackArtifact(x10));
|
|
318326
318406
|
}
|
|
318327
|
-
var import_cdk_assets_lib5,
|
|
318407
|
+
var import_cdk_assets_lib5, cxapi7, WorkGraphBuilder;
|
|
318328
318408
|
var init_work_graph_builder = __esm({
|
|
318329
318409
|
"../toolkit-lib/lib/api/work-graph/work-graph-builder.ts"() {
|
|
318330
318410
|
"use strict";
|
|
318331
318411
|
import_cdk_assets_lib5 = __toESM(require_lib9());
|
|
318332
|
-
|
|
318412
|
+
cxapi7 = __toESM(require_lib3());
|
|
318333
318413
|
init_work_graph();
|
|
318334
318414
|
init_work_graph_types();
|
|
318335
318415
|
init_toolkit_error();
|
|
@@ -318422,9 +318502,9 @@ var init_work_graph_builder = __esm({
|
|
|
318422
318502
|
build(artifacts) {
|
|
318423
318503
|
const parentStacks = stacksFromAssets(artifacts);
|
|
318424
318504
|
for (const artifact of artifacts) {
|
|
318425
|
-
if (
|
|
318505
|
+
if (cxapi7.CloudFormationStackArtifact.isCloudFormationStackArtifact(artifact)) {
|
|
318426
318506
|
this.addStack(artifact);
|
|
318427
|
-
} else if (
|
|
318507
|
+
} else if (cxapi7.AssetManifestArtifact.isAssetManifestArtifact(artifact)) {
|
|
318428
318508
|
const manifest = import_cdk_assets_lib5.AssetManifest.fromFile(artifact.file);
|
|
318429
318509
|
for (const entry of manifest.entries) {
|
|
318430
318510
|
const parentStack = parentStacks.get(artifact);
|
|
@@ -318433,8 +318513,8 @@ var init_work_graph_builder = __esm({
|
|
|
318433
318513
|
}
|
|
318434
318514
|
this.addAsset(parentStack, artifact, manifest, entry);
|
|
318435
318515
|
}
|
|
318436
|
-
} else if (
|
|
318437
|
-
const assembly = new
|
|
318516
|
+
} else if (cxapi7.NestedCloudAssemblyArtifact.isNestedCloudAssemblyArtifact(artifact)) {
|
|
318517
|
+
const assembly = new cxapi7.CloudAssembly(artifact.fullPath, { topoSort: false });
|
|
318438
318518
|
const nestedGraph = new _WorkGraphBuilder(
|
|
318439
318519
|
this.ioHelper,
|
|
318440
318520
|
this.prebuildAssets,
|
|
@@ -318449,10 +318529,10 @@ var init_work_graph_builder = __esm({
|
|
|
318449
318529
|
return this.graph;
|
|
318450
318530
|
}
|
|
318451
318531
|
stackArtifactIds(deps) {
|
|
318452
|
-
return deps.flatMap((d10) =>
|
|
318532
|
+
return deps.flatMap((d10) => cxapi7.CloudFormationStackArtifact.isCloudFormationStackArtifact(d10) ? [this.stackArtifactId(d10)] : []);
|
|
318453
318533
|
}
|
|
318454
318534
|
stackArtifactId(artifact) {
|
|
318455
|
-
if (!
|
|
318535
|
+
if (!cxapi7.CloudFormationStackArtifact.isCloudFormationStackArtifact(artifact)) {
|
|
318456
318536
|
throw new ToolkitError(`Can only call this on CloudFormationStackArtifact, got: ${artifact.constructor.name}`);
|
|
318457
318537
|
}
|
|
318458
318538
|
return `${this.idPrefix}${artifact.id}`;
|
|
@@ -318481,6 +318561,7 @@ var init_work_graph_builder = __esm({
|
|
|
318481
318561
|
var init_work_graph2 = __esm({
|
|
318482
318562
|
"../toolkit-lib/lib/api/work-graph/index.ts"() {
|
|
318483
318563
|
"use strict";
|
|
318564
|
+
init_build_destroy_work_graph();
|
|
318484
318565
|
init_work_graph();
|
|
318485
318566
|
init_work_graph_builder();
|
|
318486
318567
|
init_work_graph_types();
|
|
@@ -318514,6 +318595,7 @@ async function synthAndMeasure(ioHelper, cx, selectStacks) {
|
|
|
318514
318595
|
const synthSpan = await ioHelper.span(SPAN.SYNTH_ASSEMBLY).begin({ stacks: selectStacks });
|
|
318515
318596
|
try {
|
|
318516
318597
|
const ret = await assemblyFromSource(synthSpan.asHelper, cx);
|
|
318598
|
+
countAssemblyResults(synthSpan, ret.assembly);
|
|
318517
318599
|
const synthDuration = await synthSpan.end({});
|
|
318518
318600
|
return Object.assign(ret, { synthDuration });
|
|
318519
318601
|
} catch (error4) {
|
|
@@ -318524,13 +318606,28 @@ async function synthAndMeasure(ioHelper, cx, selectStacks) {
|
|
|
318524
318606
|
function zeroTime() {
|
|
318525
318607
|
return { asMs: 0, asSec: 0 };
|
|
318526
318608
|
}
|
|
318527
|
-
|
|
318609
|
+
function countAssemblyResults(span, assembly) {
|
|
318610
|
+
const stacksRecursively = assembly.stacksRecursively;
|
|
318611
|
+
span.incCounter("stacks", stacksRecursively.length);
|
|
318612
|
+
span.incCounter("assemblies", asmCount(assembly));
|
|
318613
|
+
span.incCounter("errorAnns", sum3(stacksRecursively.map((s10) => s10.messages.filter((m10) => m10.level === import_cloud_assembly_api14.SynthesisMessageLevel.ERROR).length)));
|
|
318614
|
+
span.incCounter("warnings", sum3(stacksRecursively.map((s10) => s10.messages.filter((m10) => m10.level === import_cloud_assembly_api14.SynthesisMessageLevel.WARNING).length)));
|
|
318615
|
+
function asmCount(x10) {
|
|
318616
|
+
return 1 + x10.nestedAssemblies.reduce((acc, asm) => acc + asmCount(asm.nestedAssembly), 0);
|
|
318617
|
+
}
|
|
318618
|
+
__name(asmCount, "asmCount");
|
|
318619
|
+
}
|
|
318620
|
+
function sum3(xs) {
|
|
318621
|
+
return xs.reduce((a10, b10) => a10 + b10, 0);
|
|
318622
|
+
}
|
|
318623
|
+
var import_dispose_polyfill5, path31, cxapi8, import_cloud_assembly_api14, import_cloud_assembly_schema7, chalk23, fs35, FILE_EVENTS, Toolkit;
|
|
318528
318624
|
var init_toolkit = __esm({
|
|
318529
318625
|
"../toolkit-lib/lib/toolkit/toolkit.ts"() {
|
|
318530
318626
|
"use strict";
|
|
318531
318627
|
import_dispose_polyfill5 = __toESM(require_dispose_polyfill());
|
|
318532
318628
|
path31 = __toESM(require("node:path"));
|
|
318533
|
-
|
|
318629
|
+
cxapi8 = __toESM(require_lib3());
|
|
318630
|
+
import_cloud_assembly_api14 = __toESM(require_lib3());
|
|
318534
318631
|
import_cloud_assembly_schema7 = __toESM(require_lib2());
|
|
318535
318632
|
chalk23 = __toESM(require_source());
|
|
318536
318633
|
init_esm2();
|
|
@@ -318960,7 +319057,8 @@ var init_toolkit = __esm({
|
|
|
318960
319057
|
`Stack ${stack.displayName} does not define an environment, and AWS credentials could not be obtained from standard locations or no region was configured.`
|
|
318961
319058
|
);
|
|
318962
319059
|
}
|
|
318963
|
-
|
|
319060
|
+
const resourceCount = Object.keys(stack.template.Resources || {}).length;
|
|
319061
|
+
if (resourceCount === 0) {
|
|
318964
319062
|
const stackExists = await deployments.stackExists({ stack });
|
|
318965
319063
|
if (!stackExists) {
|
|
318966
319064
|
return ioHelper.notify(IO.CDK_TOOLKIT_W5021.msg(`${chalk23.bold(stack.displayName)}: stack has no resources, skipping deployment.`));
|
|
@@ -319006,6 +319104,7 @@ Do you wish to deploy these changes`;
|
|
|
319006
319104
|
current: stackIndex,
|
|
319007
319105
|
stack
|
|
319008
319106
|
});
|
|
319107
|
+
deploySpan.incCounter("resources", resourceCount);
|
|
319009
319108
|
let tags = options.tags;
|
|
319010
319109
|
if (!tags || tags.length === 0) {
|
|
319011
319110
|
tags = tagsForStack(stack);
|
|
@@ -319133,7 +319232,7 @@ ${deployResult.stackArn}`));
|
|
|
319133
319232
|
const concurrency = options.concurrency || 1;
|
|
319134
319233
|
const stacksAndTheirAssetManifests = stacks.flatMap((stack) => [
|
|
319135
319234
|
stack,
|
|
319136
|
-
...stack.dependencies.filter((x10) =>
|
|
319235
|
+
...stack.dependencies.filter((x10) => cxapi8.AssetManifestArtifact.isAssetManifestArtifact(x10))
|
|
319137
319236
|
]);
|
|
319138
319237
|
const workGraph = new WorkGraphBuilder(ioHelper, prebuildAssets).build(stacksAndTheirAssetManifests);
|
|
319139
319238
|
if (!options.forceAssetPublishing) {
|
|
@@ -319483,7 +319582,7 @@ ${deployResult.stackArn}`));
|
|
|
319483
319582
|
async _destroy(assembly, action, options) {
|
|
319484
319583
|
const selectStacks = stacksOpt(options);
|
|
319485
319584
|
const ioHelper = asIoHelper(this.ioHost, action);
|
|
319486
|
-
const stacks =
|
|
319585
|
+
const stacks = await assembly.selectStacksV2(selectStacks);
|
|
319487
319586
|
const ret = {
|
|
319488
319587
|
stacks: []
|
|
319489
319588
|
};
|
|
@@ -319494,15 +319593,19 @@ ${deployResult.stackArn}`));
|
|
|
319494
319593
|
await ioHelper.notify(IO.CDK_TOOLKIT_E7010.msg("Aborted by user"));
|
|
319495
319594
|
return ret;
|
|
319496
319595
|
}
|
|
319596
|
+
const concurrency = options.concurrency || 1;
|
|
319597
|
+
let destroyCount = 0;
|
|
319497
319598
|
const destroySpan = await ioHelper.span(SPAN.DESTROY_ACTION).begin({
|
|
319498
319599
|
stacks: stacks.stackArtifacts
|
|
319499
319600
|
});
|
|
319500
319601
|
try {
|
|
319501
|
-
|
|
319602
|
+
const destroyStack2 = /* @__PURE__ */ __name(async (stackNode) => {
|
|
319603
|
+
const stack = stackNode.stack;
|
|
319604
|
+
destroyCount++;
|
|
319502
319605
|
try {
|
|
319503
|
-
const singleDestroySpan = await ioHelper.span(SPAN.DESTROY_STACK).begin(chalk23.green(`${chalk23.blue(stack.displayName)}: destroying... [${
|
|
319606
|
+
const singleDestroySpan = await ioHelper.span(SPAN.DESTROY_STACK).begin(chalk23.green(`${chalk23.blue(stack.displayName)}: destroying... [${destroyCount}/${stacks.stackCount}]`), {
|
|
319504
319607
|
total: stacks.stackCount,
|
|
319505
|
-
current:
|
|
319608
|
+
current: destroyCount,
|
|
319506
319609
|
stack
|
|
319507
319610
|
});
|
|
319508
319611
|
const deployments = await this.deploymentsForAction(action);
|
|
@@ -319528,7 +319631,9 @@ ${deployResult.stackArn}`));
|
|
|
319528
319631
|
\u274C ${chalk23.blue(stack.displayName)}: ${action} failed ${e10}`, { error: e10 }));
|
|
319529
319632
|
throw e10;
|
|
319530
319633
|
}
|
|
319531
|
-
}
|
|
319634
|
+
}, "destroyStack");
|
|
319635
|
+
const workGraph = buildDestroyWorkGraph(stacks.stackArtifacts, ioHelper);
|
|
319636
|
+
await workGraph.processStacks(concurrency, destroyStack2);
|
|
319532
319637
|
return ret;
|
|
319533
319638
|
} finally {
|
|
319534
319639
|
await destroySpan.end();
|
|
@@ -319628,6 +319733,8 @@ ${deployResult.stackArn}`));
|
|
|
319628
319733
|
__name(stacksOpt, "stacksOpt");
|
|
319629
319734
|
__name(synthAndMeasure, "synthAndMeasure");
|
|
319630
319735
|
__name(zeroTime, "zeroTime");
|
|
319736
|
+
__name(countAssemblyResults, "countAssemblyResults");
|
|
319737
|
+
__name(sum3, "sum");
|
|
319631
319738
|
}
|
|
319632
319739
|
});
|
|
319633
319740
|
|
|
@@ -319812,12 +319919,12 @@ var require_lib13 = __commonJS({
|
|
|
319812
319919
|
});
|
|
319813
319920
|
|
|
319814
319921
|
// lib/engines/toolkit-lib.ts
|
|
319815
|
-
var path32,
|
|
319922
|
+
var path32, import_cloud_assembly_api15, import_toolkit_lib, chalk24, fs36, ToolkitLibRunnerEngine, IntegRunnerIoHost, NoopIoHost;
|
|
319816
319923
|
var init_toolkit_lib = __esm({
|
|
319817
319924
|
"lib/engines/toolkit-lib.ts"() {
|
|
319818
319925
|
"use strict";
|
|
319819
319926
|
path32 = __toESM(require("node:path"));
|
|
319820
|
-
|
|
319927
|
+
import_cloud_assembly_api15 = __toESM(require_lib3());
|
|
319821
319928
|
import_toolkit_lib = __toESM(require_lib13());
|
|
319822
319929
|
chalk24 = __toESM(require_source());
|
|
319823
319930
|
fs36 = __toESM(require_lib6());
|
|
@@ -320022,11 +320129,11 @@ var init_toolkit_lib = __esm({
|
|
|
320022
320129
|
* This catches that misconfiguration.
|
|
320023
320130
|
*/
|
|
320024
320131
|
async validateRegion(asm) {
|
|
320025
|
-
if (this.options.region ===
|
|
320132
|
+
if (this.options.region === import_cloud_assembly_api15.UNKNOWN_REGION) {
|
|
320026
320133
|
return;
|
|
320027
320134
|
}
|
|
320028
320135
|
for (const stack of asm.cloudAssembly.stacksRecursively) {
|
|
320029
|
-
if (stack.environment.region !== this.options.region && stack.environment.region !==
|
|
320136
|
+
if (stack.environment.region !== this.options.region && stack.environment.region !== import_cloud_assembly_api15.UNKNOWN_REGION) {
|
|
320030
320137
|
this.ioHost.notify({
|
|
320031
320138
|
action: "deploy",
|
|
320032
320139
|
code: "CDK_RUNNER_W0000",
|
|
@@ -320131,13 +320238,13 @@ var init_logger = __esm({
|
|
|
320131
320238
|
});
|
|
320132
320239
|
|
|
320133
320240
|
// lib/runner/private/cloud-assembly.ts
|
|
320134
|
-
var path33, import_cdk_assets_lib6,
|
|
320241
|
+
var path33, import_cdk_assets_lib6, import_cloud_assembly_api16, import_cloud_assembly_schema8, fs37, AssemblyManifestReader;
|
|
320135
320242
|
var init_cloud_assembly4 = __esm({
|
|
320136
320243
|
"lib/runner/private/cloud-assembly.ts"() {
|
|
320137
320244
|
"use strict";
|
|
320138
320245
|
path33 = __toESM(require("path"));
|
|
320139
320246
|
import_cdk_assets_lib6 = __toESM(require_lib9());
|
|
320140
|
-
|
|
320247
|
+
import_cloud_assembly_api16 = __toESM(require_lib3());
|
|
320141
320248
|
import_cloud_assembly_schema8 = __toESM(require_lib2());
|
|
320142
320249
|
fs37 = __toESM(require_lib6());
|
|
320143
320250
|
AssemblyManifestReader = class _AssemblyManifestReader {
|
|
@@ -320271,7 +320378,7 @@ var init_cloud_assembly4 = __esm({
|
|
|
320271
320378
|
*/
|
|
320272
320379
|
assetsFromAssemblyManifest(artifact) {
|
|
320273
320380
|
const assets = [];
|
|
320274
|
-
for (const metadata of Object.values(
|
|
320381
|
+
for (const metadata of Object.values(import_cloud_assembly_api16.CloudArtifact.readMetadata(this.directory, artifact) ?? {})) {
|
|
320275
320382
|
metadata.forEach((data2) => {
|
|
320276
320383
|
if (data2.type === import_cloud_assembly_schema8.ArtifactMetadataEntryType.ASSET) {
|
|
320277
320384
|
const asset = data2.data;
|
|
@@ -320372,12 +320479,12 @@ var init_cloud_assembly4 = __esm({
|
|
|
320372
320479
|
function currentlyRecommendedAwsCdkLibFlags() {
|
|
320373
320480
|
return recommended_feature_flags_exports;
|
|
320374
320481
|
}
|
|
320375
|
-
var path34,
|
|
320482
|
+
var path34, import_cloud_assembly_api17, import_cx_api, fs38, DESTRUCTIVE_CHANGES, IntegRunner, DEFAULT_SYNTH_OPTIONS;
|
|
320376
320483
|
var init_runner_base = __esm({
|
|
320377
320484
|
"lib/runner/runner-base.ts"() {
|
|
320378
320485
|
"use strict";
|
|
320379
320486
|
path34 = __toESM(require("path"));
|
|
320380
|
-
|
|
320487
|
+
import_cloud_assembly_api17 = __toESM(require_lib3());
|
|
320381
320488
|
import_cx_api = __toESM(require_lib5());
|
|
320382
320489
|
fs38 = __toESM(require_lib6());
|
|
320383
320490
|
init_integ_test_suite();
|
|
@@ -320683,7 +320790,7 @@ var init_runner_base = __esm({
|
|
|
320683
320790
|
};
|
|
320684
320791
|
DEFAULT_SYNTH_OPTIONS = {
|
|
320685
320792
|
context: {
|
|
320686
|
-
[
|
|
320793
|
+
[import_cloud_assembly_api17.AVAILABILITY_ZONE_FALLBACK_CONTEXT_KEY]: ["test-region-1a", "test-region-1b", "test-region-1c"],
|
|
320687
320794
|
"availability-zones:account=12345678:region=test-region": ["test-region-1a", "test-region-1b", "test-region-1c"],
|
|
320688
320795
|
"ssm:account=12345678:parameterName=/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2:region=test-region": "ami-1234",
|
|
320689
320796
|
"ssm:account=12345678:parameterName=/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2:region=test-region": "ami-1234",
|
|
@@ -321234,14 +321341,14 @@ https://github.com/aws/aws-cdk/tree/main/packages/%40aws-cdk/integ-tests-alpha`
|
|
|
321234
321341
|
});
|
|
321235
321342
|
|
|
321236
321343
|
// lib/runner/snapshot-test-runner.ts
|
|
321237
|
-
var path36, import_stream2, import_string_decoder,
|
|
321344
|
+
var path36, import_stream2, import_string_decoder, import_cloud_assembly_api18, import_cloudformation_diff4, IntegSnapshotRunner, StringWritable;
|
|
321238
321345
|
var init_snapshot_test_runner = __esm({
|
|
321239
321346
|
"lib/runner/snapshot-test-runner.ts"() {
|
|
321240
321347
|
"use strict";
|
|
321241
321348
|
path36 = __toESM(require("path"));
|
|
321242
321349
|
import_stream2 = require("stream");
|
|
321243
321350
|
import_string_decoder = require("string_decoder");
|
|
321244
|
-
|
|
321351
|
+
import_cloud_assembly_api18 = __toESM(require_lib3());
|
|
321245
321352
|
import_cloudformation_diff4 = __toESM(require_lib12());
|
|
321246
321353
|
init_cloud_assembly4();
|
|
321247
321354
|
init_runner_base();
|
|
@@ -321253,7 +321360,7 @@ var init_snapshot_test_runner = __esm({
|
|
|
321253
321360
|
constructor(options) {
|
|
321254
321361
|
super({
|
|
321255
321362
|
...options,
|
|
321256
|
-
region:
|
|
321363
|
+
region: import_cloud_assembly_api18.UNKNOWN_REGION
|
|
321257
321364
|
});
|
|
321258
321365
|
}
|
|
321259
321366
|
/**
|
package/package.json
CHANGED
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"@aws-cdk/aws-service-spec": "^0.1.161",
|
|
67
67
|
"@aws-cdk/cdk-assets-lib": "1.4.1",
|
|
68
68
|
"@aws-cdk/cloud-assembly-api": "2.2.0",
|
|
69
|
-
"@aws-cdk/cloud-assembly-schema": ">=53.
|
|
69
|
+
"@aws-cdk/cloud-assembly-schema": ">=53.6.0",
|
|
70
70
|
"@aws-cdk/cloudformation-diff": "2.186.0",
|
|
71
71
|
"@aws-cdk/cx-api": "^2",
|
|
72
|
-
"@aws-cdk/toolkit-lib": "1.
|
|
72
|
+
"@aws-cdk/toolkit-lib": "1.19.0",
|
|
73
73
|
"@aws-sdk/client-cloudformation": "^3",
|
|
74
|
-
"aws-cdk": "2.
|
|
74
|
+
"aws-cdk": "2.1112.0",
|
|
75
75
|
"chalk": "^4",
|
|
76
76
|
"chokidar": "^4",
|
|
77
77
|
"fs-extra": "^9",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@aws-cdk/aws-service-spec": "0.1.161",
|
|
83
|
-
"aws-cdk": "2.
|
|
83
|
+
"aws-cdk": "2.1112.0"
|
|
84
84
|
},
|
|
85
85
|
"keywords": [
|
|
86
86
|
"aws",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"publishConfig": {
|
|
96
96
|
"access": "public"
|
|
97
97
|
},
|
|
98
|
-
"version": "2.197.
|
|
98
|
+
"version": "2.197.5",
|
|
99
99
|
"types": "lib/index.d.ts",
|
|
100
100
|
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"."
|
|
101
101
|
}
|