@go-to-k/cdkd 0.94.6 → 0.94.7

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
@@ -80499,10 +80499,11 @@ The CloudFormation stack '${cfnStackName}' contains the phase-1 imports but the
80499
80499
  const phase2Count = phase2Creates.length + recreateBeforePhase2.length;
80500
80500
  if (phase2Count > 0) {
80501
80501
  try {
80502
+ const phase2Template = applyImportOverlayForPhase2(template, phase1Imports);
80502
80503
  await executeUpdateChangeSet(
80503
80504
  awsClients.cloudFormation,
80504
80505
  cfnStackName,
80505
- template,
80506
+ phase2Template,
80506
80507
  cfnParameters
80507
80508
  );
80508
80509
  const parts = [];
@@ -80874,6 +80875,21 @@ function overlayResourceIdentifierOnProperties(resource, entry) {
80874
80875
  }
80875
80876
  return { ...r, Properties: properties };
80876
80877
  }
80878
+ function applyImportOverlayForPhase2(template, phase1Imports) {
80879
+ const result = JSON.parse(JSON.stringify(template));
80880
+ const resources = result["Resources"];
80881
+ if (!resources || typeof resources !== "object" || Array.isArray(resources)) {
80882
+ return result;
80883
+ }
80884
+ const resourcesMap = resources;
80885
+ for (const entry of phase1Imports) {
80886
+ const r = resourcesMap[entry.logicalId];
80887
+ if (r !== void 0) {
80888
+ resourcesMap[entry.logicalId] = overlayResourceIdentifierOnProperties(r, entry);
80889
+ }
80890
+ }
80891
+ return result;
80892
+ }
80877
80893
  function reportDriftBaselineGaps(state, logger) {
80878
80894
  const entries = Object.entries(state.resources ?? {});
80879
80895
  if (entries.length === 0)
@@ -81240,7 +81256,7 @@ function reorderArgs(argv) {
81240
81256
  }
81241
81257
  async function main() {
81242
81258
  const program = new Command18();
81243
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.94.6");
81259
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.94.7");
81244
81260
  program.addCommand(createBootstrapCommand());
81245
81261
  program.addCommand(createSynthCommand());
81246
81262
  program.addCommand(createListCommand());