cdk-real-drift 0.3.1 → 0.3.3
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/dist/cli.js +18 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -122,6 +122,7 @@ const NOT_FOUND_ERROR_NAMES = new Set([
|
|
|
122
122
|
"InvalidAddress.NotFound",
|
|
123
123
|
"InvalidLaunchTemplateId.NotFound",
|
|
124
124
|
"InvalidNetworkAclID.NotFound",
|
|
125
|
+
"InvalidClientVpnEndpointId.NotFound",
|
|
125
126
|
"EntityNotFoundException",
|
|
126
127
|
"DBClusterNotFoundFault",
|
|
127
128
|
"DBInstanceNotFoundFault",
|
|
@@ -609,7 +610,7 @@ function validateIgnoreEntry(entry, index) {
|
|
|
609
610
|
* human-friendly constructPath, whose path IS unique.
|
|
610
611
|
*/
|
|
611
612
|
function ignoreRuleFor(finding, stackName = "", accountId = "", region = "") {
|
|
612
|
-
const id = finding.constructPath && finding.tier !== "added" ? withinStackPath(finding.constructPath, stackName) : finding.logicalId;
|
|
613
|
+
const id = (finding.constructPath && finding.tier !== "added" ? withinStackPath(finding.constructPath, stackName) : finding.logicalId) || finding.logicalId;
|
|
613
614
|
const rule = { path: escapeGlobLiterals(finding.path ? `${id}.${finding.path}` : id) };
|
|
614
615
|
if (stackName) rule.stack = stackName;
|
|
615
616
|
if (accountId) rule.account = accountId;
|
|
@@ -699,6 +700,7 @@ function appendRulesToYaml(existingRaw, added) {
|
|
|
699
700
|
*/
|
|
700
701
|
async function addIgnoreRules(newRules) {
|
|
701
702
|
const { added, alreadyPresent } = mergeIgnoreRules((await loadConfig()).ignore, newRules);
|
|
703
|
+
added.forEach((rule, i) => validateIgnoreEntry(rule, i));
|
|
702
704
|
if (added.length > 0) {
|
|
703
705
|
let existingRaw;
|
|
704
706
|
try {
|
|
@@ -835,6 +837,18 @@ var QuietIoHost = class extends NonInteractiveIoHost {
|
|
|
835
837
|
|
|
836
838
|
//#endregion
|
|
837
839
|
//#region src/synth/missing-context.ts
|
|
840
|
+
/**
|
|
841
|
+
* Collect `missing` context entries across the top-level assembly AND every nested assembly
|
|
842
|
+
* (recursively — a Stage-in-Stage app nests arbitrarily deep). Mirrors how `stacksRecursively`
|
|
843
|
+
* descends `nestedAssemblies` so a dummy `vpc-12345` lookup inside a staged stack is not missed
|
|
844
|
+
* (#987 — the top-level-only read in #907 let one slip past `--pre-deploy`). Concatenates each
|
|
845
|
+
* assembly's raw entries; dedup/sort is left to `missingContextKeys`.
|
|
846
|
+
*/
|
|
847
|
+
function collectMissingRecursively(assembly) {
|
|
848
|
+
const out = [...assembly.manifest.missing ?? []];
|
|
849
|
+
for (const nested of assembly.nestedAssemblies) out.push(...collectMissingRecursively(nested.nestedAssembly));
|
|
850
|
+
return out;
|
|
851
|
+
}
|
|
838
852
|
/** Unique, sorted missing-context keys (dedup by key). Empty array when nothing is missing. */
|
|
839
853
|
function missingContextKeys(missing) {
|
|
840
854
|
if (!missing || missing.length === 0) return [];
|
|
@@ -887,7 +901,7 @@ async function synthApp(app, opts = {}) {
|
|
|
887
901
|
}
|
|
888
902
|
const cached = await toolkit.synth(source);
|
|
889
903
|
try {
|
|
890
|
-
const missingKeys = missingContextKeys(cached.cloudAssembly
|
|
904
|
+
const missingKeys = missingContextKeys(collectMissingRecursively(cached.cloudAssembly));
|
|
891
905
|
if (missingKeys.length > 0) {
|
|
892
906
|
const msg = missingContextWarning(missingKeys, { preDeploy: opts.preDeploy });
|
|
893
907
|
if (opts.preDeploy) throw new Error(msg ?? "unresolved CDK context lookups");
|
|
@@ -1946,6 +1960,7 @@ const KNOWN_DEFAULTS = {
|
|
|
1946
1960
|
CapacityReservationSpecification: { CapacityReservationPreference: "default" }
|
|
1947
1961
|
},
|
|
1948
1962
|
"AWS::AutoScaling::WarmPool": { MinSize: 0 },
|
|
1963
|
+
"AWS::AutoScaling::ScheduledAction": { EndTime: "null" },
|
|
1949
1964
|
"AWS::DocDB::DBCluster": {
|
|
1950
1965
|
Port: 27017,
|
|
1951
1966
|
BackupRetentionPeriod: 1
|
|
@@ -2650,7 +2665,7 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
|
|
|
2650
2665
|
"AWS::AppConfig::ExtensionAssociation": new Set(["ExtensionVersionNumber"]),
|
|
2651
2666
|
"AWS::StepFunctions::StateMachineVersion": new Set(["StateMachineRevisionId"]),
|
|
2652
2667
|
"AWS::StepFunctions::StateMachineAlias": new Set(["StateMachineArn"]),
|
|
2653
|
-
"AWS::AutoScaling::ScheduledAction": new Set(["StartTime"
|
|
2668
|
+
"AWS::AutoScaling::ScheduledAction": new Set(["StartTime"])
|
|
2654
2669
|
};
|
|
2655
2670
|
function isPhysicalIdSegment(value, physicalId) {
|
|
2656
2671
|
if (typeof value !== "string" || physicalId === void 0) return false;
|