@go-to-k/cdkd 0.99.2 → 0.99.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
@@ -654,6 +654,16 @@ function toYaml(obj, indent = 0) {
654
654
  //#endregion
655
655
  //#region src/cli/commands/synth.ts
656
656
  /**
657
+ * Count deployable resources in a synth template.
658
+ *
659
+ * Excludes `AWS::CDK::Metadata` (CDK-injected construct-tree marker; cdkd deploy
660
+ * also filters this out, so the two commands stay in sync — see
661
+ * deploy-engine.ts `validateResourceTypes` call site).
662
+ */
663
+ function countDeployableResources(template) {
664
+ return Object.values(template.Resources ?? {}).filter((r) => r.Type !== "AWS::CDK::Metadata").length;
665
+ }
666
+ /**
657
667
  * Synth command implementation
658
668
  */
659
669
  async function synthCommand(options) {
@@ -687,7 +697,7 @@ async function synthCommand(options) {
687
697
  }
688
698
  logger.info(`\n✅ Synthesis complete! Found ${stacks.length} stack(s):`);
689
699
  for (const stack of stacks) {
690
- const resourceCount = Object.keys(stack.template.Resources ?? {}).length;
700
+ const resourceCount = countDeployableResources(stack.template);
691
701
  const outputCount = Object.keys(stack.template.Outputs ?? {}).length;
692
702
  logger.info(` • ${stack.stackName}`);
693
703
  logger.info(` - Resources: ${resourceCount}`);
@@ -42594,7 +42604,7 @@ function reorderArgs(argv) {
42594
42604
  */
42595
42605
  async function main() {
42596
42606
  const program = new Command();
42597
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.99.1");
42607
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.99.2");
42598
42608
  program.addCommand(createBootstrapCommand());
42599
42609
  program.addCommand(createSynthCommand());
42600
42610
  program.addCommand(createListCommand());