@go-to-k/cdkd 0.223.1 → 0.223.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
@@ -1553,7 +1553,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1553
1553
  const FLUSH_EVENT_THRESHOLD = 50;
1554
1554
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1555
1555
  function getCdkdVersion() {
1556
- return "0.223.1";
1556
+ return "0.223.2";
1557
1557
  }
1558
1558
  /**
1559
1559
  * Generate a time-sortable unique run id, e.g.
@@ -18360,15 +18360,25 @@ var CloudFrontOAIProvider = class {
18360
18360
  //#endregion
18361
18361
  //#region src/provisioning/providers/cloudfront-distribution-provider.ts
18362
18362
  /**
18363
- * Fields in the DistributionConfig that follow the { Quantity, Items } pattern.
18364
- * The CDK template may provide just Items (an array); we wrap it with Quantity.
18363
+ * Top-level `DistributionConfig` fields that are a BARE ARRAY in the CFn
18364
+ * template but a `{ Quantity, Items }` wrapper in the SDK shape — so
18365
+ * `convertToSdkFormat` wraps them and `convertToCfnFormat` unwraps them.
18366
+ *
18367
+ * `OriginGroups` is deliberately NOT here (issue #873): unlike `Origins` /
18368
+ * `CacheBehaviors` / `Aliases` / `CustomErrorResponses` (bare lists in CFn), the
18369
+ * CFn `DistributionConfig.OriginGroups` property is ITSELF a `{ Quantity, Items }`
18370
+ * object, and so are its nested `Members` and `FailoverCriteria.StatusCodes`.
18371
+ * CDK synthesizes that full `{ Quantity, Items }` shape and `GetDistributionConfig`
18372
+ * returns the same, so OriginGroups must pass through UNTOUCHED in both
18373
+ * directions — unwrapping it (it was incorrectly listed here before) turned the
18374
+ * read-back OriginGroups into a bare array that no longer matched the template's
18375
+ * `{ Quantity, Items }`, firing phantom drift.
18365
18376
  */
18366
18377
  const QUANTITY_ITEM_FIELDS = [
18367
18378
  "Origins",
18368
18379
  "CacheBehaviors",
18369
18380
  "CustomErrorResponses",
18370
- "Aliases",
18371
- "OriginGroups"
18381
+ "Aliases"
18372
18382
  ];
18373
18383
  /**
18374
18384
  * Nested fields inside each CacheBehavior / DefaultCacheBehavior that use
@@ -18589,27 +18599,18 @@ var CloudFrontDistributionProvider = class {
18589
18599
  * logging bucket to its `<bucket>.s3.amazonaws.com` regional domain on
18590
18600
  * read, which never matches the bare bucket domain a template may
18591
18601
  * carry; treat it as drift-unknown to avoid a guaranteed mismatch.
18592
- * - `DistributionConfig.OriginGroups`: each origin group carries its own
18593
- * inner `{ Quantity, Items }` wrappers (`Members`,
18594
- * `FailoverCriteria.StatusCodes`) that `convertToCfnFormat` does not yet
18595
- * unwrap symmetrically (only the top-level OriginGroups list is unwrapped;
18596
- * there is no `revertOriginGroup` pass, and `convertToSdkFormat` likewise
18597
- * does not descend into them). Against the observed baseline both sides go
18598
- * through the same `readCurrentState` so this never false-positives on a
18599
- * normal deploy, but against the `properties`-fallback baseline (older
18600
- * state without `observedProperties`) the raw `{ Quantity, Items }` shape
18601
- * would diff the bare-array template form. Suppress it until a dedicated
18602
- * fix lands a `revertOriginGroup` + a real OriginGroups integ fixture
18603
- * (there is no OriginGroups fixture to verify the inner shape today). See
18604
- * the PR #871 review thread.
18602
+ *
18603
+ * NOTE: `DistributionConfig.OriginGroups` is NO LONGER suppressed (issue
18604
+ * #873). The earlier suppression worked around `convertToCfnFormat`
18605
+ * incorrectly unwrapping the top-level OriginGroups `{ Quantity, Items }`
18606
+ * wrapper; the real fix (dropping OriginGroups from `QUANTITY_ITEM_FIELDS` so
18607
+ * it passes through untouched in both directions) makes OriginGroups compare
18608
+ * equal, so it is now drift-checked normally and a real OriginGroups change
18609
+ * IS reported.
18605
18610
  */
18606
18611
  getDriftUnknownPaths(resourceType) {
18607
18612
  if (resourceType !== "AWS::CloudFront::Distribution") return [];
18608
- return [
18609
- "DistributionConfig.CallerReference",
18610
- "DistributionConfig.Logging.Bucket",
18611
- "DistributionConfig.OriginGroups"
18612
- ];
18613
+ return ["DistributionConfig.CallerReference", "DistributionConfig.Logging.Bucket"];
18613
18614
  }
18614
18615
  /**
18615
18616
  * Get resource attribute (for Fn::GetAtt resolution)
@@ -54527,7 +54528,7 @@ function reorderArgs(argv) {
54527
54528
  async function main() {
54528
54529
  installPipeCloseHandler();
54529
54530
  const program = new Command();
54530
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.223.1");
54531
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.223.2");
54531
54532
  program.addCommand(createBootstrapCommand());
54532
54533
  program.addCommand(createSynthCommand());
54533
54534
  program.addCommand(createListCommand());