cdk-real-drift 0.3.2 → 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 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.manifest.missing);
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");