@go-to-k/cdkd 0.229.5 → 0.229.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
@@ -1556,7 +1556,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1556
1556
  const FLUSH_EVENT_THRESHOLD = 50;
1557
1557
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1558
1558
  function getCdkdVersion() {
1559
- return "0.229.5";
1559
+ return "0.229.7";
1560
1560
  }
1561
1561
  /**
1562
1562
  * Generate a time-sortable unique run id, e.g.
@@ -9780,6 +9780,29 @@ var LambdaLayerVersionProvider = class {
9780
9780
  * intervals, eliminating the CC API intermediary overhead and reducing total
9781
9781
  * wait time.
9782
9782
  */
9783
+ /**
9784
+ * Map CloudFormation's `SSESpecification` shape to the DynamoDB SDK's.
9785
+ *
9786
+ * The CFn property names the enable flag `SSEEnabled`, but the SDK
9787
+ * `CreateTableCommandInput.SSESpecification` field is `Enabled`. Passing the
9788
+ * CFn shape verbatim makes the SDK silently ignore the unknown `SSEEnabled`
9789
+ * key, so the table is created with AWS-owned (default) encryption instead of
9790
+ * the requested AWS-managed / customer-managed KMS encryption — a silent
9791
+ * security downgrade with no error. `SSEType` and `KMSMasterKeyId` keep the
9792
+ * same names across CFn and the SDK.
9793
+ *
9794
+ * Returns `undefined` for an absent / non-object value so the caller omits the
9795
+ * field entirely. Exported for unit testing.
9796
+ */
9797
+ function mapSSESpecification(raw) {
9798
+ if (raw === null || typeof raw !== "object") return;
9799
+ const cfn = raw;
9800
+ const out = {};
9801
+ if (cfn.SSEEnabled !== void 0) out.Enabled = cfn.SSEEnabled === true || cfn.SSEEnabled === "true";
9802
+ if (typeof cfn.SSEType === "string") out.SSEType = cfn.SSEType;
9803
+ if (typeof cfn.KMSMasterKeyId === "string") out.KMSMasterKeyId = cfn.KMSMasterKeyId;
9804
+ return out;
9805
+ }
9783
9806
  var DynamoDBTableProvider = class {
9784
9807
  dynamoDBClient;
9785
9808
  logger = getLogger().child("DynamoDBTableProvider");
@@ -9843,7 +9866,8 @@ var DynamoDBTableProvider = class {
9843
9866
  };
9844
9867
  if (properties["GlobalSecondaryIndexes"]) createParams.GlobalSecondaryIndexes = properties["GlobalSecondaryIndexes"];
9845
9868
  if (properties["LocalSecondaryIndexes"]) createParams.LocalSecondaryIndexes = properties["LocalSecondaryIndexes"];
9846
- if (properties["SSESpecification"]) createParams.SSESpecification = properties["SSESpecification"];
9869
+ const sse = mapSSESpecification(properties["SSESpecification"]);
9870
+ if (sse && Object.keys(sse).length > 0) createParams.SSESpecification = sse;
9847
9871
  if (properties["Tags"]) createParams.Tags = properties["Tags"];
9848
9872
  if (properties["DeletionProtectionEnabled"] !== void 0) createParams.DeletionProtectionEnabled = properties["DeletionProtectionEnabled"];
9849
9873
  if (properties["TableClass"]) createParams.TableClass = properties["TableClass"];
@@ -9924,6 +9948,17 @@ var DynamoDBTableProvider = class {
9924
9948
  this.logger.debug(`Updated WarmThroughput on DynamoDB table ${physicalId}`);
9925
9949
  }
9926
9950
  }
9951
+ if (JSON.stringify(properties["SSESpecification"]) !== JSON.stringify(previousProperties["SSESpecification"])) {
9952
+ const sseUpdate = mapSSESpecification(properties["SSESpecification"]);
9953
+ if (sseUpdate && Object.keys(sseUpdate).length > 0) {
9954
+ await this.dynamoDBClient.send(new UpdateTableCommand({
9955
+ TableName: physicalId,
9956
+ SSESpecification: sseUpdate
9957
+ }));
9958
+ await this.waitForTableActiveAfterUpdate(physicalId);
9959
+ this.logger.debug(`Updated SSESpecification on DynamoDB table ${physicalId}`);
9960
+ }
9961
+ }
9927
9962
  if (JSON.stringify(properties["GlobalSecondaryIndexes"]) !== JSON.stringify(previousProperties["GlobalSecondaryIndexes"])) await this.applyGsiUpdates(physicalId, resourceType, logicalId, previousProperties["GlobalSecondaryIndexes"], properties["GlobalSecondaryIndexes"], properties["AttributeDefinitions"]);
9928
9963
  if (JSON.stringify(properties["PointInTimeRecoverySpecification"]) !== JSON.stringify(previousProperties["PointInTimeRecoverySpecification"])) await this.applyPointInTimeRecovery(physicalId, properties["PointInTimeRecoverySpecification"], previousProperties["PointInTimeRecoverySpecification"]);
9929
9964
  if (JSON.stringify(properties["TimeToLiveSpecification"]) !== JSON.stringify(previousProperties["TimeToLiveSpecification"])) await this.applyTimeToLive(physicalId, properties["TimeToLiveSpecification"], previousProperties["TimeToLiveSpecification"]);
@@ -55032,7 +55067,7 @@ function reorderArgs(argv) {
55032
55067
  async function main() {
55033
55068
  installPipeCloseHandler();
55034
55069
  const program = new Command();
55035
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.229.5");
55070
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.229.7");
55036
55071
  program.addCommand(createBootstrapCommand());
55037
55072
  program.addCommand(createSynthCommand());
55038
55073
  program.addCommand(createListCommand());