@go-to-k/cdkd 0.51.6 → 0.51.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
@@ -35710,22 +35710,28 @@ var FirehoseProvider = class {
35710
35710
  * `KinesisStreamSourceConfiguration` parent fields when present (the
35711
35711
  * `DescribeDeliveryStream` response splits source under `Source.KinesisStreamSourceDescription`).
35712
35712
  *
35713
- * **Destination configurations**: partial coverage. AWS returns destination
35714
- * config under `Destinations[0].*DestinationDescription` (note:
35715
- * `Description`, not `Configuration`). For S3 / ExtendedS3 destinations
35716
- * the top-level fields with a clean reverse-mapping are surfaced —
35717
- * `BucketARN`, `RoleARN`, `Prefix`, `ErrorOutputPrefix`, `BufferingHints`,
35718
- * `CompressionFormat`, plus `S3BackupMode` for Extended. Inner nested
35719
- * fields (`EncryptionConfiguration`, `CloudWatchLoggingOptions`,
35720
- * `ProcessingConfiguration`, `DataFormatConversionConfiguration`,
35721
- * `DynamicPartitioningConfiguration`, `S3BackupConfiguration`) are not
35722
- * re-shaped AWS auto-defaults / extra-metadata / write-only redaction
35723
- * (`Password`) make the round-trip unsafe; they're declared via
35724
- * `getDriftUnknownPaths()` so the comparator skips them instead of firing
35725
- * false drift. Non-S3 destination types
35713
+ * **Destination configurations**: full coverage for S3 / ExtendedS3.
35714
+ * AWS returns destination config under `Destinations[0].*DestinationDescription`
35715
+ * (note: `Description`, not `Configuration`); the SDK reuses the same
35716
+ * type as the corresponding `*Configuration` input for the inner
35717
+ * sub-shapes, so reverse-mapping is a `pickDefinedDeep` pass-through.
35718
+ *
35719
+ * Surfaced top-level fields: `BucketARN`, `RoleARN`, `Prefix`,
35720
+ * `ErrorOutputPrefix`, `BufferingHints`, `CompressionFormat`, plus
35721
+ * `S3BackupMode` for Extended. Surfaced inner nested fields:
35722
+ * `EncryptionConfiguration`, `CloudWatchLoggingOptions` (both shapes);
35723
+ * additionally for Extended `ProcessingConfiguration`,
35724
+ * `DataFormatConversionConfiguration`, `DynamicPartitioningConfiguration`,
35725
+ * `S3BackupConfiguration` (reverse-mapped from the AWS-side
35726
+ * `S3BackupDescription`). Each inner subtree is always emitted (even
35727
+ * as `{}` placeholder) so the v3 `observedProperties` baseline catches
35728
+ * console-side ADDs to a previously-default sub-shape.
35729
+ *
35730
+ * Non-S3 destination types
35726
35731
  * (`Redshift`/`Elasticsearch`/`Amazonopensearchservice`/`Splunk`/`HttpEndpoint`/`AmazonOpenSearchServerless`)
35727
- * stay drift-unknown for v1 same shape-divergence problem at scale.
35728
- * `DeliveryStreamEncryptionConfigurationInput` also drift-unknown.
35732
+ * stay drift-unknown — declared via `getDriftUnknownPaths()` until
35733
+ * per-destination reverse-map lands. `DeliveryStreamEncryptionConfigurationInput`
35734
+ * also drift-unknown.
35729
35735
  *
35730
35736
  * Tags are surfaced via a follow-up `ListTagsForDeliveryStream` call
35731
35737
  * with `aws:*` filtered out and always emitted as `[]` placeholder when
@@ -35767,57 +35773,13 @@ var FirehoseProvider = class {
35767
35773
  }
35768
35774
  const dest = desc.Destinations?.[0];
35769
35775
  if (dest?.ExtendedS3DestinationDescription) {
35770
- const ext = dest.ExtendedS3DestinationDescription;
35771
- const out = {};
35772
- if (ext.BucketARN !== void 0)
35773
- out["BucketARN"] = ext.BucketARN;
35774
- if (ext.RoleARN !== void 0)
35775
- out["RoleARN"] = ext.RoleARN;
35776
- if (ext.Prefix !== void 0)
35777
- out["Prefix"] = ext.Prefix;
35778
- if (ext.ErrorOutputPrefix !== void 0)
35779
- out["ErrorOutputPrefix"] = ext.ErrorOutputPrefix;
35780
- if (ext.CompressionFormat !== void 0)
35781
- out["CompressionFormat"] = ext.CompressionFormat;
35782
- if (ext.BufferingHints) {
35783
- const hints = {};
35784
- if (ext.BufferingHints.SizeInMBs !== void 0)
35785
- hints["SizeInMBs"] = ext.BufferingHints.SizeInMBs;
35786
- if (ext.BufferingHints.IntervalInSeconds !== void 0)
35787
- hints["IntervalInSeconds"] = ext.BufferingHints.IntervalInSeconds;
35788
- if (Object.keys(hints).length > 0)
35789
- out["BufferingHints"] = hints;
35790
- }
35791
- if (ext.S3BackupMode !== void 0)
35792
- out["S3BackupMode"] = ext.S3BackupMode;
35793
- if (Object.keys(out).length > 0) {
35794
- result["ExtendedS3DestinationConfiguration"] = out;
35795
- }
35776
+ result["ExtendedS3DestinationConfiguration"] = mapExtendedS3DescriptionToCfn(
35777
+ dest.ExtendedS3DestinationDescription
35778
+ );
35796
35779
  } else if (dest?.S3DestinationDescription) {
35797
- const s3 = dest.S3DestinationDescription;
35798
- const out = {};
35799
- if (s3.BucketARN !== void 0)
35800
- out["BucketARN"] = s3.BucketARN;
35801
- if (s3.RoleARN !== void 0)
35802
- out["RoleARN"] = s3.RoleARN;
35803
- if (s3.Prefix !== void 0)
35804
- out["Prefix"] = s3.Prefix;
35805
- if (s3.ErrorOutputPrefix !== void 0)
35806
- out["ErrorOutputPrefix"] = s3.ErrorOutputPrefix;
35807
- if (s3.CompressionFormat !== void 0)
35808
- out["CompressionFormat"] = s3.CompressionFormat;
35809
- if (s3.BufferingHints) {
35810
- const hints = {};
35811
- if (s3.BufferingHints.SizeInMBs !== void 0)
35812
- hints["SizeInMBs"] = s3.BufferingHints.SizeInMBs;
35813
- if (s3.BufferingHints.IntervalInSeconds !== void 0)
35814
- hints["IntervalInSeconds"] = s3.BufferingHints.IntervalInSeconds;
35815
- if (Object.keys(hints).length > 0)
35816
- out["BufferingHints"] = hints;
35817
- }
35818
- if (Object.keys(out).length > 0) {
35819
- result["S3DestinationConfiguration"] = out;
35820
- }
35780
+ result["S3DestinationConfiguration"] = mapS3DescriptionToCfn(
35781
+ dest.S3DestinationDescription
35782
+ );
35821
35783
  }
35822
35784
  try {
35823
35785
  const tagsResp = await this.getClient().send(
@@ -35842,27 +35804,23 @@ var FirehoseProvider = class {
35842
35804
  * docstring for the full rationale per category.
35843
35805
  *
35844
35806
  * Categories:
35845
- * - Inner nested fields under S3 / ExtendedS3 destinations: shape
35846
- * divergence between `Configuration` (CFn input) and `Description`
35847
- * (AWS read), AWS auto-defaults, write-only fields.
35848
- * - Non-S3 destination types: same shape-divergence problem at scale,
35849
- * deferred to a follow-up.
35807
+ * - Non-S3 destination types: shape divergence at scale (Description
35808
+ * vs Configuration field naming, write-only redacted fields like
35809
+ * Redshift `Password`); reverse-mapping is feasible per-destination
35810
+ * but deferred until per-shape user demand emerges.
35850
35811
  * - `DeliveryStreamEncryptionConfigurationInput`: input-only shape
35851
35812
  * (`KeyARN` + `KeyType`) vs. read-side `DeliveryStreamEncryptionConfiguration`
35852
35813
  * (extra status / failure fields); not yet round-tripped.
35814
+ *
35815
+ * S3 / ExtendedS3 inner nested fields (`EncryptionConfiguration` /
35816
+ * `CloudWatchLoggingOptions` / `ProcessingConfiguration` /
35817
+ * `DataFormatConversionConfiguration` / `DynamicPartitioningConfiguration` /
35818
+ * `S3BackupConfiguration`) are now surfaced via `mapS3DescriptionToCfn`
35819
+ * / `mapExtendedS3DescriptionToCfn` and no longer drift-unknown.
35853
35820
  */
35854
35821
  getDriftUnknownPaths() {
35855
35822
  return [
35856
- // S3 / ExtendedS3 nested fields with shape divergence
35857
- "S3DestinationConfiguration.EncryptionConfiguration",
35858
- "S3DestinationConfiguration.CloudWatchLoggingOptions",
35859
- "ExtendedS3DestinationConfiguration.EncryptionConfiguration",
35860
- "ExtendedS3DestinationConfiguration.CloudWatchLoggingOptions",
35861
- "ExtendedS3DestinationConfiguration.ProcessingConfiguration",
35862
- "ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration",
35863
- "ExtendedS3DestinationConfiguration.DynamicPartitioningConfiguration",
35864
- "ExtendedS3DestinationConfiguration.S3BackupConfiguration",
35865
- // Non-S3 destinations (drift-unknown for v1)
35823
+ // Non-S3 destinations (drift-unknown until per-destination reverse-map lands)
35866
35824
  "RedshiftDestinationConfiguration",
35867
35825
  "ElasticsearchDestinationConfiguration",
35868
35826
  "AmazonopensearchserviceDestinationConfiguration",
@@ -35936,6 +35894,68 @@ var FirehoseProvider = class {
35936
35894
  this.logger.warn(`Firehose ${logicalId} did not reach ACTIVE after ${maxAttempts} attempts`);
35937
35895
  }
35938
35896
  };
35897
+ function pickDefinedDeep(input) {
35898
+ if (input === void 0 || input === null)
35899
+ return void 0;
35900
+ if (typeof input !== "object")
35901
+ return input;
35902
+ if (Array.isArray(input)) {
35903
+ return input.map((v) => pickDefinedDeep(v));
35904
+ }
35905
+ const out = {};
35906
+ for (const [k, v] of Object.entries(input)) {
35907
+ if (v === void 0)
35908
+ continue;
35909
+ const cleaned = pickDefinedDeep(v);
35910
+ if (cleaned === void 0)
35911
+ continue;
35912
+ if (cleaned !== null && typeof cleaned === "object" && !Array.isArray(cleaned) && Object.keys(cleaned).length === 0) {
35913
+ continue;
35914
+ }
35915
+ out[k] = cleaned;
35916
+ }
35917
+ return out;
35918
+ }
35919
+ function mapS3DescriptionToCfn(desc) {
35920
+ const out = {};
35921
+ if (desc["BucketARN"] !== void 0)
35922
+ out["BucketARN"] = desc["BucketARN"];
35923
+ if (desc["RoleARN"] !== void 0)
35924
+ out["RoleARN"] = desc["RoleARN"];
35925
+ if (desc["Prefix"] !== void 0)
35926
+ out["Prefix"] = desc["Prefix"];
35927
+ if (desc["ErrorOutputPrefix"] !== void 0) {
35928
+ out["ErrorOutputPrefix"] = desc["ErrorOutputPrefix"];
35929
+ }
35930
+ if (desc["CompressionFormat"] !== void 0) {
35931
+ out["CompressionFormat"] = desc["CompressionFormat"];
35932
+ }
35933
+ if (desc["BufferingHints"]) {
35934
+ const hints = pickDefinedDeep(desc["BufferingHints"]);
35935
+ if (hints && typeof hints === "object" && Object.keys(hints).length > 0) {
35936
+ out["BufferingHints"] = hints;
35937
+ }
35938
+ }
35939
+ out["EncryptionConfiguration"] = pickDefinedDeep(desc["EncryptionConfiguration"]) ?? {};
35940
+ out["CloudWatchLoggingOptions"] = pickDefinedDeep(desc["CloudWatchLoggingOptions"]) ?? {};
35941
+ return out;
35942
+ }
35943
+ function mapExtendedS3DescriptionToCfn(desc) {
35944
+ const out = mapS3DescriptionToCfn(desc);
35945
+ if (desc["S3BackupMode"] !== void 0)
35946
+ out["S3BackupMode"] = desc["S3BackupMode"];
35947
+ out["ProcessingConfiguration"] = pickDefinedDeep(desc["ProcessingConfiguration"]) ?? {};
35948
+ out["DataFormatConversionConfiguration"] = pickDefinedDeep(desc["DataFormatConversionConfiguration"]) ?? {};
35949
+ out["DynamicPartitioningConfiguration"] = pickDefinedDeep(desc["DynamicPartitioningConfiguration"]) ?? {};
35950
+ if (desc["S3BackupDescription"]) {
35951
+ out["S3BackupConfiguration"] = mapS3DescriptionToCfn(
35952
+ desc["S3BackupDescription"]
35953
+ );
35954
+ } else {
35955
+ out["S3BackupConfiguration"] = {};
35956
+ }
35957
+ return out;
35958
+ }
35939
35959
 
35940
35960
  // src/provisioning/providers/cloudtrail-provider.ts
35941
35961
  import {
@@ -45073,7 +45093,7 @@ function reorderArgs(argv) {
45073
45093
  }
45074
45094
  async function main() {
45075
45095
  const program = new Command14();
45076
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.51.6");
45096
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.51.7");
45077
45097
  program.addCommand(createBootstrapCommand());
45078
45098
  program.addCommand(createSynthCommand());
45079
45099
  program.addCommand(createListCommand());