@go-to-k/cdkd 0.50.1 → 0.50.2

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
@@ -17088,15 +17088,10 @@ var CloudWatchAlarmProvider = class {
17088
17088
  const result = {};
17089
17089
  if (alarm.AlarmName !== void 0)
17090
17090
  result["AlarmName"] = alarm.AlarmName;
17091
- if (alarm.AlarmDescription !== void 0 && alarm.AlarmDescription !== "") {
17092
- result["AlarmDescription"] = alarm.AlarmDescription;
17093
- }
17094
- if (alarm.MetricName !== void 0)
17095
- result["MetricName"] = alarm.MetricName;
17096
- if (alarm.Namespace !== void 0)
17097
- result["Namespace"] = alarm.Namespace;
17098
- if (alarm.Statistic !== void 0)
17099
- result["Statistic"] = alarm.Statistic;
17091
+ result["AlarmDescription"] = alarm.AlarmDescription ?? "";
17092
+ result["MetricName"] = alarm.MetricName ?? "";
17093
+ result["Namespace"] = alarm.Namespace ?? "";
17094
+ result["Statistic"] = alarm.Statistic ?? "";
17100
17095
  if (alarm.ComparisonOperator !== void 0) {
17101
17096
  result["ComparisonOperator"] = alarm.ComparisonOperator;
17102
17097
  }
@@ -17110,31 +17105,17 @@ var CloudWatchAlarmProvider = class {
17110
17105
  if (alarm.DatapointsToAlarm !== void 0) {
17111
17106
  result["DatapointsToAlarm"] = alarm.DatapointsToAlarm;
17112
17107
  }
17113
- if (alarm.ActionsEnabled !== void 0)
17114
- result["ActionsEnabled"] = alarm.ActionsEnabled;
17115
- if (alarm.AlarmActions && alarm.AlarmActions.length > 0) {
17116
- result["AlarmActions"] = [...alarm.AlarmActions];
17117
- }
17118
- if (alarm.OKActions && alarm.OKActions.length > 0) {
17119
- result["OKActions"] = [...alarm.OKActions];
17120
- }
17121
- if (alarm.InsufficientDataActions && alarm.InsufficientDataActions.length > 0) {
17122
- result["InsufficientDataActions"] = [...alarm.InsufficientDataActions];
17123
- }
17124
- if (alarm.TreatMissingData !== void 0) {
17125
- result["TreatMissingData"] = alarm.TreatMissingData;
17126
- }
17127
- if (alarm.Unit !== void 0)
17128
- result["Unit"] = alarm.Unit;
17129
- if (alarm.Dimensions && alarm.Dimensions.length > 0) {
17130
- result["Dimensions"] = alarm.Dimensions.map((d) => ({
17131
- ...d.Name !== void 0 ? { Name: d.Name } : {},
17132
- ...d.Value !== void 0 ? { Value: d.Value } : {}
17133
- }));
17134
- }
17135
- if (alarm.Metrics && alarm.Metrics.length > 0) {
17136
- result["Metrics"] = alarm.Metrics.map((m) => m);
17137
- }
17108
+ result["ActionsEnabled"] = alarm.ActionsEnabled ?? true;
17109
+ result["AlarmActions"] = alarm.AlarmActions ? [...alarm.AlarmActions] : [];
17110
+ result["OKActions"] = alarm.OKActions ? [...alarm.OKActions] : [];
17111
+ result["InsufficientDataActions"] = alarm.InsufficientDataActions ? [...alarm.InsufficientDataActions] : [];
17112
+ result["TreatMissingData"] = alarm.TreatMissingData ?? "";
17113
+ result["Unit"] = alarm.Unit ?? "";
17114
+ result["Dimensions"] = (alarm.Dimensions ?? []).map((d) => ({
17115
+ ...d.Name !== void 0 ? { Name: d.Name } : {},
17116
+ ...d.Value !== void 0 ? { Value: d.Value } : {}
17117
+ }));
17118
+ result["Metrics"] = (alarm.Metrics ?? []).map((m) => m);
17138
17119
  if (alarm.AlarmArn) {
17139
17120
  try {
17140
17121
  const tagsResp = await this.cloudWatchClient.send(
@@ -34583,105 +34564,93 @@ var CodeBuildProvider = class {
34583
34564
  const result = {};
34584
34565
  if (project.name !== void 0)
34585
34566
  result["Name"] = project.name;
34586
- if (project.description !== void 0 && project.description !== "") {
34587
- result["Description"] = project.description;
34588
- }
34589
- if (project.serviceRole !== void 0)
34590
- result["ServiceRole"] = project.serviceRole;
34567
+ result["Description"] = project.description ?? "";
34568
+ result["ServiceRole"] = project.serviceRole ?? "";
34591
34569
  if (project.timeoutInMinutes !== void 0) {
34592
34570
  result["TimeoutInMinutes"] = project.timeoutInMinutes;
34593
34571
  }
34594
34572
  if (project.queuedTimeoutInMinutes !== void 0) {
34595
34573
  result["QueuedTimeoutInMinutes"] = project.queuedTimeoutInMinutes;
34596
34574
  }
34597
- if (project.encryptionKey !== void 0)
34598
- result["EncryptionKey"] = project.encryptionKey;
34575
+ result["EncryptionKey"] = project.encryptionKey ?? "";
34599
34576
  if (project.concurrentBuildLimit !== void 0) {
34600
34577
  result["ConcurrentBuildLimit"] = project.concurrentBuildLimit;
34601
34578
  }
34602
- if (project.badge?.badgeEnabled !== void 0) {
34603
- result["BadgeEnabled"] = project.badge.badgeEnabled;
34604
- }
34605
- if (project.sourceVersion !== void 0)
34606
- result["SourceVersion"] = project.sourceVersion;
34607
- if (project.source) {
34579
+ result["BadgeEnabled"] = project.badge?.badgeEnabled ?? false;
34580
+ result["SourceVersion"] = project.sourceVersion ?? "";
34581
+ {
34608
34582
  const src = {};
34609
- if (project.source.type !== void 0)
34583
+ if (project.source?.type !== void 0)
34610
34584
  src["Type"] = project.source.type;
34611
- if (project.source.location !== void 0)
34585
+ if (project.source?.location !== void 0)
34612
34586
  src["Location"] = project.source.location;
34613
- if (project.source.buildspec !== void 0)
34587
+ if (project.source?.buildspec !== void 0)
34614
34588
  src["BuildSpec"] = project.source.buildspec;
34615
- if (project.source.gitCloneDepth !== void 0) {
34589
+ if (project.source?.gitCloneDepth !== void 0) {
34616
34590
  src["GitCloneDepth"] = project.source.gitCloneDepth;
34617
34591
  }
34618
- if (project.source.insecureSsl !== void 0)
34592
+ if (project.source?.insecureSsl !== void 0)
34619
34593
  src["InsecureSsl"] = project.source.insecureSsl;
34620
- if (project.source.reportBuildStatus !== void 0) {
34594
+ if (project.source?.reportBuildStatus !== void 0) {
34621
34595
  src["ReportBuildStatus"] = project.source.reportBuildStatus;
34622
34596
  }
34623
- if (Object.keys(src).length > 0)
34624
- result["Source"] = src;
34597
+ result["Source"] = src;
34625
34598
  }
34626
- if (project.artifacts) {
34599
+ {
34627
34600
  const art = {};
34628
- if (project.artifacts.type !== void 0)
34601
+ if (project.artifacts?.type !== void 0)
34629
34602
  art["Type"] = project.artifacts.type;
34630
- if (project.artifacts.location !== void 0)
34603
+ if (project.artifacts?.location !== void 0)
34631
34604
  art["Location"] = project.artifacts.location;
34632
- if (project.artifacts.path !== void 0)
34605
+ if (project.artifacts?.path !== void 0)
34633
34606
  art["Path"] = project.artifacts.path;
34634
- if (project.artifacts.name !== void 0)
34607
+ if (project.artifacts?.name !== void 0)
34635
34608
  art["Name"] = project.artifacts.name;
34636
- if (project.artifacts.namespaceType !== void 0) {
34609
+ if (project.artifacts?.namespaceType !== void 0) {
34637
34610
  art["NamespaceType"] = project.artifacts.namespaceType;
34638
34611
  }
34639
- if (project.artifacts.packaging !== void 0)
34612
+ if (project.artifacts?.packaging !== void 0)
34640
34613
  art["Packaging"] = project.artifacts.packaging;
34641
- if (project.artifacts.encryptionDisabled !== void 0) {
34614
+ if (project.artifacts?.encryptionDisabled !== void 0) {
34642
34615
  art["EncryptionDisabled"] = project.artifacts.encryptionDisabled;
34643
34616
  }
34644
- if (project.artifacts.overrideArtifactName !== void 0) {
34617
+ if (project.artifacts?.overrideArtifactName !== void 0) {
34645
34618
  art["OverrideArtifactName"] = project.artifacts.overrideArtifactName;
34646
34619
  }
34647
- if (project.artifacts.artifactIdentifier !== void 0) {
34620
+ if (project.artifacts?.artifactIdentifier !== void 0) {
34648
34621
  art["ArtifactIdentifier"] = project.artifacts.artifactIdentifier;
34649
34622
  }
34650
- if (Object.keys(art).length > 0)
34651
- result["Artifacts"] = art;
34623
+ result["Artifacts"] = art;
34652
34624
  }
34653
- if (project.environment) {
34625
+ {
34654
34626
  const env = {};
34655
- if (project.environment.type !== void 0)
34627
+ if (project.environment?.type !== void 0)
34656
34628
  env["Type"] = project.environment.type;
34657
- if (project.environment.image !== void 0)
34629
+ if (project.environment?.image !== void 0)
34658
34630
  env["Image"] = project.environment.image;
34659
- if (project.environment.computeType !== void 0) {
34631
+ if (project.environment?.computeType !== void 0) {
34660
34632
  env["ComputeType"] = project.environment.computeType;
34661
34633
  }
34662
- if (project.environment.privilegedMode !== void 0) {
34634
+ if (project.environment?.privilegedMode !== void 0) {
34663
34635
  env["PrivilegedMode"] = project.environment.privilegedMode;
34664
34636
  }
34665
- if (project.environment.imagePullCredentialsType !== void 0) {
34637
+ if (project.environment?.imagePullCredentialsType !== void 0) {
34666
34638
  env["ImagePullCredentialsType"] = project.environment.imagePullCredentialsType;
34667
34639
  }
34668
- if (project.environment.certificate !== void 0) {
34640
+ if (project.environment?.certificate !== void 0) {
34669
34641
  env["Certificate"] = project.environment.certificate;
34670
34642
  }
34671
- if (project.environment.environmentVariables && project.environment.environmentVariables.length > 0) {
34672
- env["EnvironmentVariables"] = project.environment.environmentVariables.map((ev) => {
34673
- const out = {};
34674
- if (ev.name !== void 0)
34675
- out["Name"] = ev.name;
34676
- if (ev.value !== void 0)
34677
- out["Value"] = ev.value;
34678
- if (ev.type !== void 0)
34679
- out["Type"] = ev.type;
34680
- return out;
34681
- });
34682
- }
34683
- if (Object.keys(env).length > 0)
34684
- result["Environment"] = env;
34643
+ env["EnvironmentVariables"] = (project.environment?.environmentVariables ?? []).map((ev) => {
34644
+ const out = {};
34645
+ if (ev.name !== void 0)
34646
+ out["Name"] = ev.name;
34647
+ if (ev.value !== void 0)
34648
+ out["Value"] = ev.value;
34649
+ if (ev.type !== void 0)
34650
+ out["Type"] = ev.type;
34651
+ return out;
34652
+ });
34653
+ result["Environment"] = env;
34685
34654
  }
34686
34655
  const tags = normalizeAwsTagsToCfn(project.tags);
34687
34656
  result["Tags"] = tags;
@@ -42690,7 +42659,7 @@ function reorderArgs(argv) {
42690
42659
  }
42691
42660
  async function main() {
42692
42661
  const program = new Command14();
42693
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.50.1");
42662
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.50.2");
42694
42663
  program.addCommand(createBootstrapCommand());
42695
42664
  program.addCommand(createSynthCommand());
42696
42665
  program.addCommand(createListCommand());