@go-to-k/cdkd 0.51.9 → 0.51.10

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
@@ -13792,10 +13792,15 @@ var SNSTopicProvider = class {
13792
13792
  * `create()`'s behavior of only sending Tags when the template carries
13793
13793
  * them).
13794
13794
  *
13795
- * `DeliveryStatusLogging` is intentionally omitted: it fans out into
13796
- * per-protocol attributes (`{Protocol}SuccessFeedbackRoleArn`, etc.) whose
13797
- * round-trip back to the CFn array shape needs more thought than fits in
13798
- * this PR.
13795
+ * `DeliveryStatusLogging` is reverse-mapped from per-protocol flat
13796
+ * attributes (`{Protocol}SuccessFeedbackRoleArn` etc.) back to the CFn
13797
+ * array shape `[{Protocol, SuccessFeedbackRoleArn?, SuccessFeedbackSampleRate?,
13798
+ * FailureFeedbackRoleArn?}]`. Walks the known protocol prefix list
13799
+ * (`HTTP` / `HTTPS` / `SQS` / `Lambda` / `Firehose` / `Application`); a
13800
+ * protocol is included in the result iff at least one of its three
13801
+ * sub-attributes is set on the topic. Entries are sorted by `Protocol`
13802
+ * for stable positional compare (AWS does not preserve template order
13803
+ * across `GetTopicAttributes` calls).
13799
13804
  *
13800
13805
  * `Subscription` is omitted because CDK manages it via separate
13801
13806
  * `AWS::SNS::Subscription` resources, not as a Topic property.
@@ -13844,6 +13849,7 @@ var SNSTopicProvider = class {
13844
13849
  }
13845
13850
  }
13846
13851
  }
13852
+ result["DeliveryStatusLogging"] = mapDeliveryStatusLogging(attrs);
13847
13853
  try {
13848
13854
  const tagsResp = await this.snsClient.send(
13849
13855
  new ListTagsForResourceCommand({ ResourceArn: physicalId })
@@ -13858,16 +13864,13 @@ var SNSTopicProvider = class {
13858
13864
  return result;
13859
13865
  }
13860
13866
  /**
13861
- * `DeliveryStatusLogging` fans out to per-protocol attributes
13862
- * (`{Protocol}SuccessFeedbackRoleArn` etc.) whose round-trip back to the
13863
- * CFn array shape is not yet implemented; `Subscription` is managed via
13864
- * separate `AWS::SNS::Subscription` resources rather than the Topic
13865
- * itself. Both are absent from `readCurrentState`, so tell the drift
13866
- * comparator to skip them and avoid the guaranteed false-positive that
13867
- * would fire on every clean run when the user did template either.
13867
+ * Only `Subscription` remains drift-unknown CDK manages topic
13868
+ * subscriptions via separate `AWS::SNS::Subscription` resources, so the
13869
+ * inline `Topic.Subscription` property is intentionally not surfaced.
13870
+ * `DeliveryStatusLogging` is now reverse-mapped (see `readCurrentState`).
13868
13871
  */
13869
13872
  getDriftUnknownPaths() {
13870
- return ["DeliveryStatusLogging", "Subscription"];
13873
+ return ["Subscription"];
13871
13874
  }
13872
13875
  /**
13873
13876
  * Adopt an existing SNS topic into cdkd state.
@@ -13927,6 +13930,33 @@ var SNSTopicProvider = class {
13927
13930
  return null;
13928
13931
  }
13929
13932
  };
13933
+ var SNS_DELIVERY_STATUS_PROTOCOLS = [
13934
+ "Application",
13935
+ "Firehose",
13936
+ "HTTP",
13937
+ "HTTPS",
13938
+ "Lambda",
13939
+ "SQS"
13940
+ ];
13941
+ function mapDeliveryStatusLogging(attrs) {
13942
+ const result = [];
13943
+ for (const protocol of SNS_DELIVERY_STATUS_PROTOCOLS) {
13944
+ const success = attrs[`${protocol}SuccessFeedbackRoleArn`];
13945
+ const sample = attrs[`${protocol}SuccessFeedbackSampleRate`];
13946
+ const failure = attrs[`${protocol}FailureFeedbackRoleArn`];
13947
+ if (success === void 0 && sample === void 0 && failure === void 0)
13948
+ continue;
13949
+ const entry = { Protocol: protocol };
13950
+ if (success !== void 0)
13951
+ entry["SuccessFeedbackRoleArn"] = success;
13952
+ if (sample !== void 0)
13953
+ entry["SuccessFeedbackSampleRate"] = sample;
13954
+ if (failure !== void 0)
13955
+ entry["FailureFeedbackRoleArn"] = failure;
13956
+ result.push(entry);
13957
+ }
13958
+ return result;
13959
+ }
13930
13960
 
13931
13961
  // src/provisioning/providers/sns-subscription-provider.ts
13932
13962
  import {
@@ -45210,7 +45240,7 @@ function reorderArgs(argv) {
45210
45240
  }
45211
45241
  async function main() {
45212
45242
  const program = new Command14();
45213
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.51.9");
45243
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.51.10");
45214
45244
  program.addCommand(createBootstrapCommand());
45215
45245
  program.addCommand(createSynthCommand());
45216
45246
  program.addCommand(createListCommand());