@go-to-k/cdkd 0.278.1 → 0.278.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
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $ as DagBuilder, A as red, At as resolveApp, B as isTerminationProtectionPropagationError, Bt as CFN_TEMPLATE_URL_LIMIT, C as isStatefulRecreateTargetSync, Ct as runDockerStreaming, D as cyan, Dt as synthesisStatusMessage, E as bold, Et as Synthesizer, F as ProviderRegistry, Ft as resolveStateBucketWithDefaultAndSource, G as normalizeAwsTagsToCfn, Gt as AssemblyReader, H as cfnRefValueFromPhysicalId, Ht as findLargeInlineResources, I as findActionableSilentDrops, It as resolveUseCdkBootstrapAssets, J as applyRoleArnIfSet, Jt as resolveBucketRegion, K as resolveExplicitPhysicalId, Kt as processStackMessages, L as CloudControlProvider, Lt as stateBucketExistenceConfirmed, M as IAMRoleProvider, Mt as resolveCaptureObservedState, N as collectInlinePolicyNamesManagedBySiblings, Nt as resolveSkipPrefix, O as gray, Ot as getDefaultStateBucketName, P as clearOnUpdateRemoval, Pt as resolveStateBucketWithDefault, Q as isRetryableTransientError, Qt as setAwsClients, R as slowCcOperationTimeoutMs, Rt as warnDeprecatedNoPrefixCliFlag, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as runDockerForeground, T as formatResourceLine, Tt as getDockerImageBySourceHash, U as refStateLookupFromResource, Ut as uploadCfnTemplate, V as IntrinsicFunctionResolver, Vt as MIGRATE_TMP_PREFIX, W as WAFv2WebACLProvider, Wt as expectedOwnerParam, X as describeTypeWithThrottleRetry, Xt as getAwsClients, Y as DiffCalculator, Yt as AwsClients, Z as withRetry, Zt as resetAwsClients, _ as createPreDeleteFinalSnapshot, _t as validateAssetBucketName, a as DeploymentEventsStore, an as LocalMigrateError, at as AssetPublisher, b as unsupportedFinalSnapshotError, bn as normalizeAwsError, bt as formatDockerLoginError, c as replayFailedOperations, cn as MissingCdkCliError, ct as buildAssetRedirectMap, d as IMPLICIT_DELETE_DEPENDENCIES, dn as ProvisioningError, dt as rewriteTemplateAssetReferences, en as CdkdError, et as TemplateParser, f as computeImplicitDeleteEdges, fn as ResourceTimeoutError, ft as AssetModeResolver, g as ccRoutedFinalSnapshotError, gt as parseBootstrapMarker, h as buildFinalSnapshotIdentifier, hn as StackTerminationProtectionError, ht as getBootstrapMarkerKey, i as DeploymentEventsReader, in as LocalInvokeBuildError$1, it as shouldRetainResource, j as yellow, jt as resolveAutoAssetStorage, k as green, kt as getLegacyStateBucketName, l as replayRollback, ln as NestedStackChildDirectDestroyError, lt as createAssetRedirectResolver, m as PRE_DELETE_SNAPSHOT_TYPES, mn as StackHasActiveImportsError, mt as ensureAssetStorage, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as S3StateBackend, o as planFailedOps, on as LocalStartServiceError, ot as stringifyValue, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as ResourceUpdateNotSupportedError, pt as BOOTSTRAP_MARKER_PREFIX, q as assertRegionMatch, r as DeployEngine, rn as DeployCancelledError, rt as rebuildClientForBucketRegion, s as planRollback, st as WorkGraph, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as LockManager, u as withResourceDeadline, un as PartialFailureError, ut as loadPublishableAssetManifest, v as isFinalSnapshotError, vt as validateContainerRepoName, w as renderStatefulReason, wt as AssetManifestLoader, x as extractDeploymentEventError, xn as withErrorHandling, xt as getDockerCmd, y as refusesFinalSnapshot, yt as buildDockerImage, z as disableInstanceApiTermination, zt as CFN_TEMPLATE_BODY_LIMIT } from "./deploy-engine-BLJ1_r55.js";
2
+ import { $ as DagBuilder, A as red, At as resolveApp, B as isTerminationProtectionPropagationError, Bt as CFN_TEMPLATE_URL_LIMIT, C as isStatefulRecreateTargetSync, Ct as runDockerStreaming, D as cyan, Dt as synthesisStatusMessage, E as bold, Et as Synthesizer, F as ProviderRegistry, Ft as resolveStateBucketWithDefaultAndSource, G as normalizeAwsTagsToCfn, Gt as AssemblyReader, H as cfnRefValueFromPhysicalId, Ht as findLargeInlineResources, I as findActionableSilentDrops, It as resolveUseCdkBootstrapAssets, J as applyRoleArnIfSet, Jt as resolveBucketRegion, K as resolveExplicitPhysicalId, Kt as processStackMessages, L as CloudControlProvider, Lt as stateBucketExistenceConfirmed, M as IAMRoleProvider, Mt as resolveCaptureObservedState, N as collectInlinePolicyNamesManagedBySiblings, Nt as resolveSkipPrefix, O as gray, Ot as getDefaultStateBucketName, P as clearOnUpdateRemoval, Pt as resolveStateBucketWithDefault, Q as isRetryableTransientError, Qt as setAwsClients, R as slowCcOperationTimeoutMs, Rt as warnDeprecatedNoPrefixCliFlag, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as runDockerForeground, T as formatResourceLine, Tt as getDockerImageBySourceHash, U as refStateLookupFromResource, Ut as uploadCfnTemplate, V as IntrinsicFunctionResolver, Vt as MIGRATE_TMP_PREFIX, W as WAFv2WebACLProvider, Wt as expectedOwnerParam, X as describeTypeWithThrottleRetry, Xt as getAwsClients, Y as DiffCalculator, Yt as AwsClients, Z as withRetry, Zt as resetAwsClients, _ as createPreDeleteFinalSnapshot, _t as validateAssetBucketName, a as DeploymentEventsStore, an as LocalMigrateError, at as AssetPublisher, b as unsupportedFinalSnapshotError, bn as normalizeAwsError, bt as formatDockerLoginError, c as replayFailedOperations, cn as MissingCdkCliError, ct as buildAssetRedirectMap, d as IMPLICIT_DELETE_DEPENDENCIES, dn as ProvisioningError, dt as rewriteTemplateAssetReferences, en as CdkdError, et as TemplateParser, f as computeImplicitDeleteEdges, fn as ResourceTimeoutError, ft as AssetModeResolver, g as ccRoutedFinalSnapshotError, gt as parseBootstrapMarker, h as buildFinalSnapshotIdentifier, hn as StackTerminationProtectionError, ht as getBootstrapMarkerKey, i as DeploymentEventsReader, in as LocalInvokeBuildError$1, it as shouldRetainResource, j as yellow, jt as resolveAutoAssetStorage, k as green, kt as getLegacyStateBucketName, l as replayRollback, ln as NestedStackChildDirectDestroyError, lt as createAssetRedirectResolver, m as PRE_DELETE_SNAPSHOT_TYPES, mn as StackHasActiveImportsError, mt as ensureAssetStorage, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as S3StateBackend, o as planFailedOps, on as LocalStartServiceError, ot as stringifyValue, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as ResourceUpdateNotSupportedError, pt as BOOTSTRAP_MARKER_PREFIX, q as assertRegionMatch, r as DeployEngine, rn as DeployCancelledError, rt as rebuildClientForBucketRegion, s as planRollback, st as WorkGraph, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as LockManager, u as withResourceDeadline, un as PartialFailureError, ut as loadPublishableAssetManifest, v as isFinalSnapshotError, vt as validateContainerRepoName, w as renderStatefulReason, wt as AssetManifestLoader, x as extractDeploymentEventError, xn as withErrorHandling, xt as getDockerCmd, y as refusesFinalSnapshot, yt as buildDockerImage, z as disableInstanceApiTermination, zt as CFN_TEMPLATE_BODY_LIMIT } from "./deploy-engine-BemRUhiN.js";
3
3
  import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as withSkipPrefix, i as runStackBuffered, n as getLogger, o as PATTERN_B_NAME_OPTIONS, p as withStackName, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-BYMEE-BS.js";
4
- import { t as ASGProvider } from "./asg-provider-CaViRSIU.js";
4
+ import { t as ASGProvider } from "./asg-provider-ACQwFzcN.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { createHash, randomBytes, randomUUID } from "node:crypto";
7
7
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -10946,15 +10946,15 @@ function buildCommonImageInput(properties) {
10946
10946
  return input;
10947
10947
  }
10948
10948
  function mapCodeArtifact(value) {
10949
- if (!isRecord(value)) return void 0;
10949
+ if (!isRecord$1(value)) return void 0;
10950
10950
  const uri = value["Uri"];
10951
10951
  return typeof uri === "string" ? { uri } : void 0;
10952
10952
  }
10953
10953
  function mapLogging(value) {
10954
- if (!isRecord(value)) return void 0;
10954
+ if (!isRecord$1(value)) return void 0;
10955
10955
  if (value["Disabled"] === true) return { disabled: {} };
10956
10956
  const cloudWatch = value["CloudWatch"];
10957
- if (isRecord(cloudWatch)) {
10957
+ if (isRecord$1(cloudWatch)) {
10958
10958
  const cw = {};
10959
10959
  if (typeof cloudWatch["LogGroup"] === "string") cw.logGroup = cloudWatch["LogGroup"];
10960
10960
  if (typeof cloudWatch["LogStream"] === "string") cw.logStream = cloudWatch["LogStream"];
@@ -10963,11 +10963,11 @@ function mapLogging(value) {
10963
10963
  }
10964
10964
  function mapCpuConfigurations(value) {
10965
10965
  if (!Array.isArray(value)) return void 0;
10966
- return value.filter(isRecord).map((c) => ({ architecture: c["Architecture"] }));
10966
+ return value.filter(isRecord$1).map((c) => ({ architecture: c["Architecture"] }));
10967
10967
  }
10968
10968
  function mapResources(value) {
10969
10969
  if (!Array.isArray(value)) return void 0;
10970
- return value.filter(isRecord).map((r) => Number(r["MinimumMemoryInMiB"])).filter((n) => Number.isFinite(n)).map((minimumMemoryInMiB) => ({ minimumMemoryInMiB }));
10970
+ return value.filter(isRecord$1).map((r) => Number(r["MinimumMemoryInMiB"])).filter((n) => Number.isFinite(n)).map((minimumMemoryInMiB) => ({ minimumMemoryInMiB }));
10971
10971
  }
10972
10972
  /**
10973
10973
  * Translate the CFn `Hooks` structure (PascalCase keys throughout, all leaf
@@ -10976,7 +10976,7 @@ function mapResources(value) {
10976
10976
  * carries no tagged unions and no array-of-record members.
10977
10977
  */
10978
10978
  function mapHooks(value) {
10979
- if (!isRecord(value)) return void 0;
10979
+ if (!isRecord$1(value)) return void 0;
10980
10980
  return lowerFirstKeysDeep(value);
10981
10981
  }
10982
10982
  /**
@@ -10987,19 +10987,19 @@ function mapHooks(value) {
10987
10987
  function mapKeyValueListToRecord(value) {
10988
10988
  if (!Array.isArray(value)) return void 0;
10989
10989
  const out = {};
10990
- for (const entry of value) if (isRecord(entry) && typeof entry["Key"] === "string") out[entry["Key"]] = typeof entry["Value"] === "string" ? entry["Value"] : "";
10990
+ for (const entry of value) if (isRecord$1(entry) && typeof entry["Key"] === "string") out[entry["Key"]] = typeof entry["Value"] === "string" ? entry["Value"] : "";
10991
10991
  return Object.keys(out).length > 0 ? out : void 0;
10992
10992
  }
10993
10993
  function lowerFirstKeysDeep(value) {
10994
10994
  if (Array.isArray(value)) return value.map(lowerFirstKeysDeep);
10995
- if (isRecord(value)) {
10995
+ if (isRecord$1(value)) {
10996
10996
  const out = {};
10997
10997
  for (const [k, v] of Object.entries(value)) out[k.charAt(0).toLowerCase() + k.slice(1)] = lowerFirstKeysDeep(v);
10998
10998
  return out;
10999
10999
  }
11000
11000
  return value;
11001
11001
  }
11002
- function isRecord(value) {
11002
+ function isRecord$1(value) {
11003
11003
  return typeof value === "object" && value !== null && !Array.isArray(value);
11004
11004
  }
11005
11005
 
@@ -14790,6 +14790,112 @@ var EventBridgeRuleProvider = class {
14790
14790
  this.eventBridgeClient = awsClients.eventBridge;
14791
14791
  }
14792
14792
  /**
14793
+ * Convert each target's CFn-shaped `EcsParameters` to the SDK shape
14794
+ * (issue #1381). The `AWS::Events::Rule` schema and
14795
+ * `@aws-sdk/client-eventbridge` diverge on several ECS sub-shape
14796
+ * spellings, and the SDK serializer silently drops unknown keys — a
14797
+ * Fargate target's `NetworkConfiguration.AwsVpcConfiguration` never
14798
+ * reached AWS, so PutTargets rejected with "Parameter
14799
+ * NetworkConfiguration must be specified".
14800
+ */
14801
+ toSdkTargets(targets) {
14802
+ return targets.map((target) => {
14803
+ const ecs = target["EcsParameters"];
14804
+ if (!ecs) return target;
14805
+ return {
14806
+ ...target,
14807
+ EcsParameters: this.toSdkEcsParameters(ecs)
14808
+ };
14809
+ });
14810
+ }
14811
+ toSdkEcsParameters(ecs) {
14812
+ const result = { ...ecs };
14813
+ const network = result["NetworkConfiguration"];
14814
+ if (network && network["AwsVpcConfiguration"] !== void 0) {
14815
+ const { AwsVpcConfiguration, ...restNetwork } = network;
14816
+ result["NetworkConfiguration"] = {
14817
+ ...restNetwork,
14818
+ awsvpcConfiguration: AwsVpcConfiguration
14819
+ };
14820
+ }
14821
+ if (result["TagList"] !== void 0) {
14822
+ result["Tags"] = result["TagList"];
14823
+ delete result["TagList"];
14824
+ }
14825
+ if (Array.isArray(result["PlacementStrategies"])) {
14826
+ result["PlacementStrategy"] = result["PlacementStrategies"].map((item) => this.lowerCaseItemKeys(item, ["Type", "Field"]));
14827
+ delete result["PlacementStrategies"];
14828
+ }
14829
+ if (Array.isArray(result["PlacementConstraints"])) result["PlacementConstraints"] = result["PlacementConstraints"].map((item) => this.lowerCaseItemKeys(item, ["Type", "Expression"]));
14830
+ if (Array.isArray(result["CapacityProviderStrategy"])) result["CapacityProviderStrategy"] = result["CapacityProviderStrategy"].map((item) => this.lowerCaseItemKeys(item, [
14831
+ "CapacityProvider",
14832
+ "Weight",
14833
+ "Base"
14834
+ ]));
14835
+ return result;
14836
+ }
14837
+ /**
14838
+ * Inverse of {@link toSdkEcsParameters} for `readCurrentState`:
14839
+ * ListTargetsByRule returns the SDK spellings, but drift compares the
14840
+ * whole `Targets` array against state's CFn spellings — without the
14841
+ * re-map every ECS Fargate rule target would report phantom drift on
14842
+ * `AwsVpcConfiguration` / `TagList` / `PlacementStrategies` under the
14843
+ * `properties`-fallback baseline.
14844
+ */
14845
+ toCfnTargets(targets) {
14846
+ return targets.map((target) => {
14847
+ const ecs = target["EcsParameters"];
14848
+ if (!ecs) return target;
14849
+ return {
14850
+ ...target,
14851
+ EcsParameters: this.toCfnEcsParameters(ecs)
14852
+ };
14853
+ });
14854
+ }
14855
+ toCfnEcsParameters(ecs) {
14856
+ const result = { ...ecs };
14857
+ const network = result["NetworkConfiguration"];
14858
+ if (network && network["awsvpcConfiguration"] !== void 0) {
14859
+ const { awsvpcConfiguration, ...restNetwork } = network;
14860
+ result["NetworkConfiguration"] = {
14861
+ ...restNetwork,
14862
+ AwsVpcConfiguration: awsvpcConfiguration
14863
+ };
14864
+ }
14865
+ if (result["Tags"] !== void 0) {
14866
+ result["TagList"] = result["Tags"];
14867
+ delete result["Tags"];
14868
+ }
14869
+ if (Array.isArray(result["PlacementStrategy"])) {
14870
+ result["PlacementStrategies"] = result["PlacementStrategy"].map((item) => this.renameItemKeys(item, ["type", "field"], "upper"));
14871
+ delete result["PlacementStrategy"];
14872
+ }
14873
+ if (Array.isArray(result["PlacementConstraints"])) result["PlacementConstraints"] = result["PlacementConstraints"].map((item) => this.renameItemKeys(item, ["type", "expression"], "upper"));
14874
+ if (Array.isArray(result["CapacityProviderStrategy"])) result["CapacityProviderStrategy"] = result["CapacityProviderStrategy"].map((item) => this.renameItemKeys(item, [
14875
+ "capacityProvider",
14876
+ "weight",
14877
+ "base"
14878
+ ], "upper"));
14879
+ return result;
14880
+ }
14881
+ lowerCaseItemKeys(item, keys) {
14882
+ return this.renameItemKeys(item, keys, "lower");
14883
+ }
14884
+ /**
14885
+ * Flip the first letter's case on the listed keys of one array item
14886
+ * (`Type` <-> `type`, `CapacityProvider` <-> `capacityProvider`); keys
14887
+ * not listed (or absent) pass through unchanged.
14888
+ */
14889
+ renameItemKeys(item, keys, direction) {
14890
+ const result = { ...item };
14891
+ for (const key of keys) if (result[key] !== void 0) {
14892
+ const flipped = direction === "lower" ? key.charAt(0).toLowerCase() + key.slice(1) : key.charAt(0).toUpperCase() + key.slice(1);
14893
+ result[flipped] = result[key];
14894
+ delete result[key];
14895
+ }
14896
+ return result;
14897
+ }
14898
+ /**
14793
14899
  * Create an EventBridge rule
14794
14900
  */
14795
14901
  async create(logicalId, resourceType, properties) {
@@ -14813,7 +14919,7 @@ var EventBridgeRuleProvider = class {
14813
14919
  await this.eventBridgeClient.send(new PutTargetsCommand({
14814
14920
  Rule: ruleName,
14815
14921
  EventBusName: eventBusName,
14816
- Targets: targets
14922
+ Targets: this.toSdkTargets(targets)
14817
14923
  }));
14818
14924
  this.logger.debug(`Added ${targets.length} targets to rule ${ruleName}`);
14819
14925
  }
@@ -14881,7 +14987,7 @@ var EventBridgeRuleProvider = class {
14881
14987
  await this.eventBridgeClient.send(new PutTargetsCommand({
14882
14988
  Rule: ruleName,
14883
14989
  EventBusName: eventBusName,
14884
- Targets: newTargets
14990
+ Targets: this.toSdkTargets(newTargets)
14885
14991
  }));
14886
14992
  this.logger.debug(`Updated ${newTargets.length} targets on rule ${ruleName}`);
14887
14993
  }
@@ -15014,10 +15120,11 @@ var EventBridgeRuleProvider = class {
15014
15120
  if (resp.State !== void 0) result["State"] = resp.State;
15015
15121
  if (resp.RoleArn !== void 0) result["RoleArn"] = resp.RoleArn;
15016
15122
  try {
15017
- result["Targets"] = (await this.eventBridgeClient.send(new ListTargetsByRuleCommand({
15123
+ const targetsResp = await this.eventBridgeClient.send(new ListTargetsByRuleCommand({
15018
15124
  Rule: ruleName,
15019
15125
  ...busParam
15020
- }))).Targets ?? [];
15126
+ }));
15127
+ result["Targets"] = this.toCfnTargets(targetsResp.Targets ?? []);
15021
15128
  } catch (err) {
15022
15129
  if (!(err instanceof ResourceNotFoundException$2)) throw err;
15023
15130
  }
@@ -35277,14 +35384,16 @@ var SchedulerScheduleProvider = class {
35277
35384
  }
35278
35385
  /**
35279
35386
  * Map the CFn property shape to the Scheduler SDK input shape. The two
35280
- * are PascalCase-identical except `StartDate` / `EndDate`, which CFn
35281
- * carries as ISO strings and the SDK types as `Date`.
35387
+ * are PascalCase-identical except `StartDate` / `EndDate` (CFn carries
35388
+ * ISO strings, the SDK types `Date`) and the Target's ECS sub-shapes
35389
+ * (camelCase islands in the SDK model — see {@link toSdkTarget},
35390
+ * issue #1382).
35282
35391
  */
35283
35392
  toSdkFields(properties) {
35284
35393
  return {
35285
35394
  ScheduleExpression: properties["ScheduleExpression"],
35286
35395
  FlexibleTimeWindow: properties["FlexibleTimeWindow"],
35287
- Target: properties["Target"],
35396
+ Target: this.toSdkTarget(properties["Target"]),
35288
35397
  ...properties["Description"] !== void 0 && { Description: properties["Description"] },
35289
35398
  ...properties["ScheduleExpressionTimezone"] !== void 0 && { ScheduleExpressionTimezone: properties["ScheduleExpressionTimezone"] },
35290
35399
  ...properties["StartDate"] !== void 0 && { StartDate: new Date(properties["StartDate"]) },
@@ -35293,6 +35402,84 @@ var SchedulerScheduleProvider = class {
35293
35402
  ...properties["KmsKeyArn"] !== void 0 && { KmsKeyArn: properties["KmsKeyArn"] }
35294
35403
  };
35295
35404
  }
35405
+ /**
35406
+ * Convert the CFn-shaped `Target` blob's ECS sub-shapes to the SDK shape
35407
+ * (issue #1382). `@aws-sdk/client-scheduler` is PascalCase except a few
35408
+ * camelCase islands the CFn schema spells PascalCase; the SDK serializer
35409
+ * silently drops unknown keys, so a Fargate target's
35410
+ * `NetworkConfiguration.AwsvpcConfiguration` never reached AWS and
35411
+ * CreateSchedule rejected with "Parameter NetworkConfiguration must be
35412
+ * specified".
35413
+ */
35414
+ toSdkTarget(target) {
35415
+ const ecs = target["EcsParameters"];
35416
+ if (!ecs) return target;
35417
+ const result = { ...ecs };
35418
+ const network = result["NetworkConfiguration"];
35419
+ if (network && network["AwsvpcConfiguration"] !== void 0) {
35420
+ const { AwsvpcConfiguration, ...restNetwork } = network;
35421
+ result["NetworkConfiguration"] = {
35422
+ ...restNetwork,
35423
+ awsvpcConfiguration: AwsvpcConfiguration
35424
+ };
35425
+ }
35426
+ if (Array.isArray(result["PlacementStrategy"])) result["PlacementStrategy"] = result["PlacementStrategy"].map((item) => this.renameItemKeys(item, ["Type", "Field"], "lower"));
35427
+ if (Array.isArray(result["PlacementConstraints"])) result["PlacementConstraints"] = result["PlacementConstraints"].map((item) => this.renameItemKeys(item, ["Type", "Expression"], "lower"));
35428
+ if (Array.isArray(result["CapacityProviderStrategy"])) result["CapacityProviderStrategy"] = result["CapacityProviderStrategy"].map((item) => this.renameItemKeys(item, [
35429
+ "CapacityProvider",
35430
+ "Weight",
35431
+ "Base"
35432
+ ], "lower"));
35433
+ return {
35434
+ ...target,
35435
+ EcsParameters: result
35436
+ };
35437
+ }
35438
+ /**
35439
+ * Inverse of {@link toSdkTarget} for `readCurrentState`: GetSchedule
35440
+ * returns the SDK spellings, but drift compares against the state's CFn
35441
+ * spellings — without the re-map every ECS Fargate schedule would report
35442
+ * phantom drift on `AwsvpcConfiguration` after deploy.
35443
+ */
35444
+ toCfnTarget(target) {
35445
+ const raw = target;
35446
+ const ecs = raw["EcsParameters"];
35447
+ if (!ecs) return raw;
35448
+ const result = { ...ecs };
35449
+ const network = result["NetworkConfiguration"];
35450
+ if (network && network["awsvpcConfiguration"] !== void 0) {
35451
+ const { awsvpcConfiguration, ...restNetwork } = network;
35452
+ result["NetworkConfiguration"] = {
35453
+ ...restNetwork,
35454
+ AwsvpcConfiguration: awsvpcConfiguration
35455
+ };
35456
+ }
35457
+ if (Array.isArray(result["PlacementStrategy"])) result["PlacementStrategy"] = result["PlacementStrategy"].map((item) => this.renameItemKeys(item, ["type", "field"], "upper"));
35458
+ if (Array.isArray(result["PlacementConstraints"])) result["PlacementConstraints"] = result["PlacementConstraints"].map((item) => this.renameItemKeys(item, ["type", "expression"], "upper"));
35459
+ if (Array.isArray(result["CapacityProviderStrategy"])) result["CapacityProviderStrategy"] = result["CapacityProviderStrategy"].map((item) => this.renameItemKeys(item, [
35460
+ "capacityProvider",
35461
+ "weight",
35462
+ "base"
35463
+ ], "upper"));
35464
+ return {
35465
+ ...raw,
35466
+ EcsParameters: result
35467
+ };
35468
+ }
35469
+ /**
35470
+ * Flip the first letter's case on the listed keys of one array item
35471
+ * (`Type` <-> `type`, `CapacityProvider` <-> `capacityProvider`); keys
35472
+ * not listed (or absent) pass through unchanged.
35473
+ */
35474
+ renameItemKeys(item, keys, direction) {
35475
+ const result = { ...item };
35476
+ for (const key of keys) if (result[key] !== void 0) {
35477
+ const flipped = direction === "lower" ? key.charAt(0).toLowerCase() + key.slice(1) : key.charAt(0).toUpperCase() + key.slice(1);
35478
+ result[flipped] = result[key];
35479
+ delete result[key];
35480
+ }
35481
+ return result;
35482
+ }
35296
35483
  async create(logicalId, resourceType, properties) {
35297
35484
  const name = properties["Name"] ?? generateResourceName(logicalId, { maxLength: 64 });
35298
35485
  const groupName = this.groupNameOf(properties);
@@ -35395,7 +35582,7 @@ var SchedulerScheduleProvider = class {
35395
35582
  ...response.State !== void 0 && { State: response.State },
35396
35583
  ...response.KmsKeyArn !== void 0 && { KmsKeyArn: response.KmsKeyArn },
35397
35584
  ...response.FlexibleTimeWindow !== void 0 && { FlexibleTimeWindow: response.FlexibleTimeWindow },
35398
- ...response.Target !== void 0 && { Target: response.Target }
35585
+ ...response.Target !== void 0 && { Target: this.toCfnTarget(response.Target) }
35399
35586
  };
35400
35587
  } catch (error) {
35401
35588
  if (error instanceof ResourceNotFoundException$11) return;
@@ -37197,6 +37384,87 @@ var FSxFileSystemProvider = class {
37197
37384
  }
37198
37385
  };
37199
37386
 
37387
+ //#endregion
37388
+ //#region src/provisioning/emr-configuration.ts
37389
+ /**
37390
+ * CFn -> SDK shape converters for the two `AWS::EMR::*` nested blobs whose CFn
37391
+ * key spelling diverges from the `@aws-sdk/client-emr` model (issue #1383).
37392
+ *
37393
+ * | CFn key | SDK member |
37394
+ * | ------------------------------------------------ | ------------------------------ |
37395
+ * | `Configuration.ConfigurationProperties` | `Configuration.Properties` |
37396
+ * | `HadoopJarStepConfig.StepProperties` | `HadoopJarStepConfig.Properties` |
37397
+ *
37398
+ * Both are plain renames — the VALUE shapes already match (`Record<string,string>`
37399
+ * for the former, `KeyValue[]` for the latter, verified against the live CFn
37400
+ * registry schema on 2026-08-09). The AWS SDK v3 serializer drops unknown
37401
+ * members, so before this conversion every EMR application configuration
37402
+ * (spark-defaults / hive-site / yarn-site ...) silently vanished while cdkd
37403
+ * reported the deploy as successful.
37404
+ *
37405
+ * `Configurations` nests into itself, so the rename is applied at EVERY level.
37406
+ * Non-object / non-array inputs (an unresolved intrinsic, a malformed template)
37407
+ * pass through untouched so this layer never turns a bad template into a
37408
+ * confusing crash — AWS surfaces the real validation error instead.
37409
+ */
37410
+ function isRecord(value) {
37411
+ return typeof value === "object" && value !== null && !Array.isArray(value);
37412
+ }
37413
+ function toSdkConfiguration(raw) {
37414
+ if (!isRecord(raw)) return raw;
37415
+ const { ConfigurationProperties, Configurations, ...rest } = raw;
37416
+ return {
37417
+ ...rest,
37418
+ ...ConfigurationProperties !== void 0 ? { Properties: ConfigurationProperties } : {},
37419
+ ...Configurations !== void 0 ? { Configurations: toSdkConfigurations(Configurations) } : {}
37420
+ };
37421
+ }
37422
+ /**
37423
+ * CFn `Configurations` list -> SDK `Configuration[]`, renaming
37424
+ * `ConfigurationProperties` -> `Properties` at every nesting level.
37425
+ */
37426
+ function toSdkConfigurations(value) {
37427
+ if (value === void 0) return void 0;
37428
+ if (!Array.isArray(value)) return value;
37429
+ return value.map(toSdkConfiguration);
37430
+ }
37431
+ /**
37432
+ * CFn `Steps` list -> SDK `StepConfig[]`, renaming
37433
+ * `HadoopJarStep.StepProperties` -> `HadoopJarStep.Properties`.
37434
+ */
37435
+ function toSdkStepConfigs(value) {
37436
+ if (value === void 0) return void 0;
37437
+ if (!Array.isArray(value)) return value;
37438
+ return value.map((step) => {
37439
+ if (!isRecord(step)) return step;
37440
+ const hadoopJarStep = step["HadoopJarStep"];
37441
+ if (!isRecord(hadoopJarStep) || hadoopJarStep["StepProperties"] === void 0) return step;
37442
+ const { StepProperties, ...restHadoopJarStep } = hadoopJarStep;
37443
+ return {
37444
+ ...step,
37445
+ HadoopJarStep: {
37446
+ ...restHadoopJarStep,
37447
+ Properties: StepProperties
37448
+ }
37449
+ };
37450
+ });
37451
+ }
37452
+ /**
37453
+ * CFn `InstanceTypeConfigs` list -> SDK `InstanceTypeConfig[]`, converting each
37454
+ * element's nested per-instance-type `Configurations`.
37455
+ */
37456
+ function toSdkInstanceTypeConfigs(value) {
37457
+ if (value === void 0) return void 0;
37458
+ if (!Array.isArray(value)) return value;
37459
+ return value.map((instanceTypeConfig) => {
37460
+ if (!isRecord(instanceTypeConfig) || instanceTypeConfig["Configurations"] === void 0) return instanceTypeConfig;
37461
+ return {
37462
+ ...instanceTypeConfig,
37463
+ Configurations: toSdkConfigurations(instanceTypeConfig["Configurations"])
37464
+ };
37465
+ });
37466
+ }
37467
+
37200
37468
  //#endregion
37201
37469
  //#region src/provisioning/providers/emr-cluster-provider.ts
37202
37470
  /**
@@ -37365,9 +37633,9 @@ var EMRClusterProvider = class {
37365
37633
  StepConcurrencyLevel: toNumber$2(properties["StepConcurrencyLevel"]),
37366
37634
  VisibleToAllUsers: toBoolean(properties["VisibleToAllUsers"]),
37367
37635
  Applications: properties["Applications"],
37368
- Configurations: properties["Configurations"],
37636
+ Configurations: toSdkConfigurations(properties["Configurations"]),
37369
37637
  BootstrapActions: properties["BootstrapActions"],
37370
- Steps: properties["Steps"],
37638
+ Steps: toSdkStepConfigs(properties["Steps"]),
37371
37639
  KerberosAttributes: properties["KerberosAttributes"],
37372
37640
  PlacementGroupConfigs: properties["PlacementGroupConfigs"],
37373
37641
  ManagedScalingPolicy: this.toManagedScalingPolicy(properties["ManagedScalingPolicy"]),
@@ -37455,7 +37723,7 @@ var EMRClusterProvider = class {
37455
37723
  Name: raw["Name"],
37456
37724
  Market: raw["Market"],
37457
37725
  BidPrice: raw["BidPrice"],
37458
- Configurations: raw["Configurations"],
37726
+ Configurations: toSdkConfigurations(raw["Configurations"]),
37459
37727
  EbsConfiguration: raw["EbsConfiguration"],
37460
37728
  AutoScalingPolicy: raw["AutoScalingPolicy"],
37461
37729
  CustomAmiId: raw["CustomAmiId"]
@@ -37467,7 +37735,7 @@ var EMRClusterProvider = class {
37467
37735
  Name: raw["Name"],
37468
37736
  TargetOnDemandCapacity: toNumber$2(raw["TargetOnDemandCapacity"]),
37469
37737
  TargetSpotCapacity: toNumber$2(raw["TargetSpotCapacity"]),
37470
- InstanceTypeConfigs: raw["InstanceTypeConfigs"],
37738
+ InstanceTypeConfigs: toSdkInstanceTypeConfigs(raw["InstanceTypeConfigs"]),
37471
37739
  LaunchSpecifications: raw["LaunchSpecifications"],
37472
37740
  ResizeSpecifications: raw["ResizeSpecifications"]
37473
37741
  };
@@ -38119,7 +38387,7 @@ var EMRInstanceGroupConfigProvider = class {
38119
38387
  Name: properties["Name"],
38120
38388
  Market: properties["Market"],
38121
38389
  BidPrice: properties["BidPrice"],
38122
- Configurations: properties["Configurations"],
38390
+ Configurations: toSdkConfigurations(properties["Configurations"]),
38123
38391
  EbsConfiguration: properties["EbsConfiguration"],
38124
38392
  AutoScalingPolicy: properties["AutoScalingPolicy"],
38125
38393
  CustomAmiId: properties["CustomAmiId"]
@@ -38430,7 +38698,7 @@ var EMRInstanceFleetConfigProvider = class {
38430
38698
  Name: properties["Name"],
38431
38699
  TargetOnDemandCapacity: toNumber(properties["TargetOnDemandCapacity"]),
38432
38700
  TargetSpotCapacity: toNumber(properties["TargetSpotCapacity"]),
38433
- InstanceTypeConfigs: properties["InstanceTypeConfigs"],
38701
+ InstanceTypeConfigs: toSdkInstanceTypeConfigs(properties["InstanceTypeConfigs"]),
38434
38702
  LaunchSpecifications: properties["LaunchSpecifications"],
38435
38703
  ResizeSpecifications: properties["ResizeSpecifications"]
38436
38704
  };
@@ -38466,7 +38734,7 @@ var EMRInstanceFleetConfigProvider = class {
38466
38734
  TargetOnDemandCapacity: toNumber(properties["TargetOnDemandCapacity"]),
38467
38735
  TargetSpotCapacity: toNumber(properties["TargetSpotCapacity"]),
38468
38736
  ResizeSpecifications: properties["ResizeSpecifications"],
38469
- InstanceTypeConfigs: properties["InstanceTypeConfigs"]
38737
+ InstanceTypeConfigs: toSdkInstanceTypeConfigs(properties["InstanceTypeConfigs"])
38470
38738
  };
38471
38739
  await this.getClient().send(new ModifyInstanceFleetCommand({
38472
38740
  ClusterId: clusterId,
@@ -64098,7 +64366,7 @@ function createMigrateCommand() {
64098
64366
  */
64099
64367
  function buildProgram() {
64100
64368
  const program = new Command();
64101
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.1");
64369
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.3");
64102
64370
  program.hook("preAction", (_thisCommand, actionCommand) => {
64103
64371
  const { profile } = actionCommand.optsWithGlobals();
64104
64372
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;