@go-to-k/cdkd 0.260.2 → 0.260.3

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
@@ -1901,7 +1901,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1901
1901
  const FLUSH_EVENT_THRESHOLD = 50;
1902
1902
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1903
1903
  function getCdkdVersion() {
1904
- return "0.260.2";
1904
+ return "0.260.3";
1905
1905
  }
1906
1906
  /**
1907
1907
  * Generate a time-sortable unique run id, e.g.
@@ -22168,6 +22168,14 @@ var ECSProvider = class {
22168
22168
  if (!isEcsController && (loadBalancersChanged || serviceRegistriesChanged)) throw new ProvisioningError(`AWS::ECS::Service '${logicalId}' changes LoadBalancers/ServiceRegistries under the '${deploymentControllerType}' deployment controller, which applies them via a new CodeDeploy deployment / task set rather than UpdateService. cdkd does not support updating these under a non-ECS controller; recreate the service or manage the blue/green deployment out-of-band.`, resourceType, logicalId, physicalId);
22169
22169
  const loadBalancersInput = isEcsController && loadBalancersChanged ? this.convertLoadBalancers(properties["LoadBalancers"]) ?? [] : void 0;
22170
22170
  const serviceRegistriesInput = isEcsController && serviceRegistriesChanged ? properties["ServiceRegistries"] ?? [] : void 0;
22171
+ const capacityProviderStrategyInput = this.clearOnUpdateRemoval(properties["CapacityProviderStrategy"], previousProperties["CapacityProviderStrategy"], []);
22172
+ const placementConstraintsInput = this.clearOnUpdateRemoval(properties["PlacementConstraints"], previousProperties["PlacementConstraints"], []);
22173
+ const placementStrategyInput = this.clearOnUpdateRemoval(properties["PlacementStrategies"] ?? properties["PlacementStrategy"], previousProperties["PlacementStrategies"] ?? previousProperties["PlacementStrategy"], []);
22174
+ const platformVersionInput = this.clearOnUpdateRemoval(properties["PlatformVersion"], previousProperties["PlatformVersion"], "LATEST");
22175
+ const healthCheckGracePeriodSecondsInput = this.clearOnUpdateRemoval(properties["HealthCheckGracePeriodSeconds"], previousProperties["HealthCheckGracePeriodSeconds"], 0);
22176
+ const enableECSManagedTagsInput = this.clearOnUpdateRemoval(properties["EnableECSManagedTags"], previousProperties["EnableECSManagedTags"], false);
22177
+ const propagateTagsInput = this.clearOnUpdateRemoval(properties["PropagateTags"], previousProperties["PropagateTags"], "NONE");
22178
+ const enableExecuteCommandInput = this.clearOnUpdateRemoval(properties["EnableExecuteCommand"], previousProperties["EnableExecuteCommand"], false);
22171
22179
  try {
22172
22180
  const service = (await client.send(new UpdateServiceCommand({
22173
22181
  cluster: properties["Cluster"],
@@ -22175,15 +22183,15 @@ var ECSProvider = class {
22175
22183
  taskDefinition: properties["TaskDefinition"],
22176
22184
  desiredCount: properties["DesiredCount"],
22177
22185
  networkConfiguration: this.convertNetworkConfiguration(properties["NetworkConfiguration"]),
22178
- capacityProviderStrategy: properties["CapacityProviderStrategy"],
22186
+ capacityProviderStrategy: capacityProviderStrategyInput,
22179
22187
  deploymentConfiguration: properties["DeploymentConfiguration"],
22180
- placementConstraints: properties["PlacementConstraints"],
22181
- placementStrategy: properties["PlacementStrategies"] ?? properties["PlacementStrategy"],
22182
- platformVersion: properties["PlatformVersion"],
22183
- healthCheckGracePeriodSeconds: properties["HealthCheckGracePeriodSeconds"],
22184
- enableECSManagedTags: properties["EnableECSManagedTags"],
22185
- propagateTags: properties["PropagateTags"],
22186
- enableExecuteCommand: properties["EnableExecuteCommand"],
22188
+ placementConstraints: placementConstraintsInput,
22189
+ placementStrategy: placementStrategyInput,
22190
+ platformVersion: platformVersionInput,
22191
+ healthCheckGracePeriodSeconds: healthCheckGracePeriodSecondsInput,
22192
+ enableECSManagedTags: enableECSManagedTagsInput,
22193
+ propagateTags: propagateTagsInput,
22194
+ enableExecuteCommand: enableExecuteCommandInput,
22187
22195
  loadBalancers: loadBalancersInput,
22188
22196
  serviceRegistries: serviceRegistriesInput
22189
22197
  }))).service;
@@ -22201,6 +22209,20 @@ var ECSProvider = class {
22201
22209
  throw new ProvisioningError(`Failed to update ECS service ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
22202
22210
  }
22203
22211
  }
22212
+ /**
22213
+ * Resolve an optional UpdateService field so that a property REMOVED from the
22214
+ * template is reset to its CloudFormation default instead of silently
22215
+ * retaining the old live value (issue #1160 — the absent-field removal
22216
+ * silent-drop bug class; reference fix `LambdaFunctionProvider`, #1157).
22217
+ *
22218
+ * Returns `newValue` when present, the `clearValue` when the field was
22219
+ * present before and is now absent (removal), and `undefined` when it was
22220
+ * never present (so a genuinely-absent field stays absent = no change).
22221
+ */
22222
+ clearOnUpdateRemoval(newValue, previousValue, clearValue) {
22223
+ if (newValue !== void 0) return newValue;
22224
+ if (previousValue !== void 0) return clearValue;
22225
+ }
22204
22226
  async deleteService(logicalId, physicalId, resourceType, properties, context) {
22205
22227
  this.logger.debug(`Deleting ECS service ${logicalId}: ${physicalId}`);
22206
22228
  const client = this.getClient();
@@ -61483,7 +61505,7 @@ function createMigrateCommand() {
61483
61505
  */
61484
61506
  function buildProgram() {
61485
61507
  const program = new Command();
61486
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.260.2");
61508
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.260.3");
61487
61509
  program.addCommand(createBootstrapCommand());
61488
61510
  program.addCommand(createSynthCommand());
61489
61511
  program.addCommand(createListCommand());