@go-to-k/cdkd 0.231.6 → 0.231.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
@@ -1445,7 +1445,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1445
1445
  const FLUSH_EVENT_THRESHOLD = 50;
1446
1446
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1447
1447
  function getCdkdVersion() {
1448
- return "0.231.6";
1448
+ return "0.231.7";
1449
1449
  }
1450
1450
  /**
1451
1451
  * Generate a time-sortable unique run id, e.g.
@@ -20131,9 +20131,9 @@ var StepFunctionsProvider = class {
20131
20131
  this.logger.debug(`Updating Step Functions state machine ${logicalId}: ${physicalId}`);
20132
20132
  try {
20133
20133
  const definitionString = await this.buildDefinitionString(properties);
20134
- const encryptionConfiguration = mapEncryptionConfiguration(properties["EncryptionConfiguration"]);
20135
- const loggingConfiguration = mapLoggingConfiguration(properties["LoggingConfiguration"]);
20136
- const tracingConfiguration = mapTracingConfiguration(properties["TracingConfiguration"]);
20134
+ const encryptionConfiguration = mapEncryptionConfiguration(properties["EncryptionConfiguration"]) ?? disabledEncryptionConfigurationOnRemoval(previousProperties["EncryptionConfiguration"], properties["EncryptionConfiguration"]);
20135
+ const loggingConfiguration = mapLoggingConfiguration(properties["LoggingConfiguration"]) ?? disabledLoggingConfigurationOnRemoval(previousProperties["LoggingConfiguration"], properties["LoggingConfiguration"]);
20136
+ const tracingConfiguration = mapTracingConfiguration(properties["TracingConfiguration"]) ?? disabledTracingConfigurationOnRemoval(previousProperties["TracingConfiguration"], properties["TracingConfiguration"]);
20137
20137
  await this.getClient().send(new UpdateStateMachineCommand({
20138
20138
  stateMachineArn: physicalId,
20139
20139
  definition: definitionString,
@@ -20457,6 +20457,59 @@ function mapTracingConfiguration(value) {
20457
20457
  if (cfg["Enabled"] === void 0) return void 0;
20458
20458
  return { enabled: cfg["Enabled"] };
20459
20459
  }
20460
+ /**
20461
+ * Return the SDK disable payload for `EncryptionConfiguration` when it was
20462
+ * present+configured in the previous properties but is absent/placeholder in
20463
+ * the new ones; otherwise `undefined` (no clear needed). `AWS_OWNED_KEY` is
20464
+ * the AWS default, so this resets a customer-managed-key config back to default.
20465
+ */
20466
+ function disabledEncryptionConfigurationOnRemoval(previous, next) {
20467
+ if (!wasMeaningfullyConfigured(previous, "Type")) return void 0;
20468
+ if (mapEncryptionConfiguration(next) !== void 0) return void 0;
20469
+ return { type: "AWS_OWNED_KEY" };
20470
+ }
20471
+ /**
20472
+ * Return the SDK disable payload for `LoggingConfiguration` when it was
20473
+ * present+configured in the previous properties but is absent/placeholder in
20474
+ * the new ones; otherwise `undefined`. `level: OFF` disables logging;
20475
+ * `destinations: []` clears the log destinations (only required when level is
20476
+ * not OFF, so an empty list is accepted alongside OFF).
20477
+ */
20478
+ function disabledLoggingConfigurationOnRemoval(previous, next) {
20479
+ if (!wasMeaningfullyConfigured(previous, "Level")) return void 0;
20480
+ if (mapLoggingConfiguration(next) !== void 0) return void 0;
20481
+ return {
20482
+ level: "OFF",
20483
+ includeExecutionData: false,
20484
+ destinations: []
20485
+ };
20486
+ }
20487
+ /**
20488
+ * Return the SDK disable payload for `TracingConfiguration` when it was
20489
+ * present+enabled in the previous properties but is absent/placeholder in the
20490
+ * new ones; otherwise `undefined`. `enabled: false` turns X-Ray tracing off.
20491
+ *
20492
+ * Unlike logging/encryption, the "meaningful" signal here is `Enabled === true`
20493
+ * (a previous `{ Enabled: false }` is already the AWS default, so there is
20494
+ * nothing to clear).
20495
+ */
20496
+ function disabledTracingConfigurationOnRemoval(previous, next) {
20497
+ if (previous === null || typeof previous !== "object") return void 0;
20498
+ if (previous["Enabled"] !== true) return void 0;
20499
+ if (mapTracingConfiguration(next) !== void 0) return void 0;
20500
+ return { enabled: false };
20501
+ }
20502
+ /**
20503
+ * True when `value` is an object that carries a defined `discriminatorKey`
20504
+ * field (`Level` for logging, `Type` for encryption) — i.e. it was a real,
20505
+ * non-placeholder config in the previous properties. The empty-placeholder
20506
+ * shape `{}` that `readCurrentState` emits has no discriminator, so it returns
20507
+ * false and no clear is emitted.
20508
+ */
20509
+ function wasMeaningfullyConfigured(value, discriminatorKey) {
20510
+ if (value === null || typeof value !== "object") return false;
20511
+ return value[discriminatorKey] !== void 0;
20512
+ }
20460
20513
 
20461
20514
  //#endregion
20462
20515
  //#region src/provisioning/providers/ecs-provider.ts
@@ -55594,7 +55647,7 @@ function reorderArgs(argv) {
55594
55647
  async function main() {
55595
55648
  installPipeCloseHandler();
55596
55649
  const program = new Command();
55597
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.231.6");
55650
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.231.7");
55598
55651
  program.addCommand(createBootstrapCommand());
55599
55652
  program.addCommand(createSynthCommand());
55600
55653
  program.addCommand(createListCommand());