cdk-real-drift 0.7.3 → 0.7.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/dist/cli.js CHANGED
@@ -4011,7 +4011,7 @@ function partitionForRegion(region) {
4011
4011
  urlSuffix: "amazonaws.com"
4012
4012
  };
4013
4013
  }
4014
- function buildResolverContext(template, stackParams, physIds, region, accountId, stackName, stackId) {
4014
+ function buildResolverContext(template, stackParams, physIds, region, accountId, stackName, stackId, preDeploy = false) {
4015
4015
  const paramDefs = template.Parameters ?? {};
4016
4016
  const isList = (k) => {
4017
4017
  const t = paramDefs[k]?.Type ?? "";
@@ -4024,7 +4024,9 @@ function buildResolverContext(template, stackParams, physIds, region, accountId,
4024
4024
  if ((def?.Type ?? "").includes("::Parameter::Value<")) continue;
4025
4025
  if (def && "Default" in def) params[k] = toParam(k, String(def.Default));
4026
4026
  }
4027
- for (const [k, v] of Object.entries(stackParams)) params[k] = toParam(k, v);
4027
+ if (preDeploy) {
4028
+ for (const [k, v] of Object.entries(stackParams)) if (!(k in params)) params[k] = toParam(k, v);
4029
+ } else for (const [k, v] of Object.entries(stackParams)) params[k] = toParam(k, v);
4028
4030
  const templateResources = template.Resources ?? {};
4029
4031
  const typeOf = {};
4030
4032
  const declaredRawProps = {};
@@ -4120,7 +4122,7 @@ async function loadDesired(client, stackName, region, templateOverride, recovery
4120
4122
  const replaceInfo = typeChangeReplaceInfo([...typeChanged].sort(), templateResourcesForTypeCheck, deployedTypeOf, stackName);
4121
4123
  if (replaceInfo) console.error(replaceInfo);
4122
4124
  }
4123
- const ctx = buildResolverContext(template, stackParams, physIds, region, accountId, stackName, stackId);
4125
+ const ctx = buildResolverContext(template, stackParams, physIds, region, accountId, stackName, stackId, !!templateOverride);
4124
4126
  const notificationArns = stack?.NotificationARNs ?? [];
4125
4127
  if (notificationArns.length > 0) ctx.params["AWS::NotificationARNs"] = notificationArns;
4126
4128
  if (JSON.stringify(template).includes("Fn::ImportValue")) try {