@go-to-k/cdkd 0.278.29 → 0.278.31

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 withRetry, $t as getAwsClients, A as red, At as synthesisStatusMessage, B as isTerminationProtectionPropagationError, Bt as stateBucketExistenceConfirmed, C as isStatefulRecreateTargetSync, Cn as normalizeAwsError, Ct as formatDockerLoginError, D as cyan, Dt as AssetManifestLoader, E as bold, Et as runDockerStreaming, F as ProviderRegistry, Ft as resolveCaptureObservedState, G as normalizeAwsTagsToCfn, Gt as findLargeInlineResources, H as cfnRefValueFromPhysicalId, Ht as CFN_TEMPLATE_BODY_LIMIT, I as findActionableSilentDrops, It as resolveSkipPrefix, J as readConfigString, Jt as AssemblyReader, K as resolveExplicitPhysicalId, Kt as uploadCfnTemplate, L as CloudControlProvider, Lt as resolveStateBucketWithDefault, M as IAMRoleProvider, Mt as getLegacyStateBucketName, N as collectInlinePolicyNamesManagedBySiblings, Nt as resolveApp, O as gray, Ot as getDockerImageBySourceHash, P as clearOnUpdateRemoval, Pt as resolveAutoAssetStorage, Q as describeTypeWithThrottleRetry, Qt as AwsClients, R as slowCcOperationTimeoutMs, Rt as resolveStateBucketWithDefaultAndSource, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as buildDockerImage, T as formatResourceLine, Tt as runDockerForeground, U as refStateLookupFromResource, Ut as CFN_TEMPLATE_URL_LIMIT, V as IntrinsicFunctionResolver, Vt as warnDeprecatedNoPrefixCliFlag, W as WAFv2WebACLProvider, Wt as MIGRATE_TMP_PREFIX, X as applyRoleArnIfSet, Y as requireConfigString, Yt as processStackMessages, Z as DiffCalculator, Zt as resolveBucketRegion, _ as createPreDeleteFinalSnapshot, _n as StackHasActiveImportsError, _t as ensureAssetStorage, a as DeploymentEventsStore, at as S3StateBackend, b as unsupportedFinalSnapshotError, bt as validateAssetBucketName, c as replayFailedOperations, cn as LocalMigrateError, ct as AssetPublisher, d as IMPLICIT_DELETE_DEPENDENCIES, dn as MissingCdkCliError, dt as buildAssetRedirectMap, en as resetAwsClients, et as isRetryableTransientError, f as computeImplicitDeleteEdges, fn as NestedStackChildDirectDestroyError, ft as createAssetRedirectResolver, g as ccRoutedFinalSnapshotError, gn as ResourceUpdateNotSupportedError, gt as BOOTSTRAP_MARKER_PREFIX, h as buildFinalSnapshotIdentifier, hn as ResourceTimeoutError, ht as AssetModeResolver, i as DeploymentEventsReader, it as LockManager, j as yellow, jt as getDefaultStateBucketName, k as green, kt as Synthesizer, l as replayRollback, ln as LocalStartServiceError, lt as stringifyValue, m as PRE_DELETE_SNAPSHOT_TYPES, mn as ProvisioningError, mt as rewriteTemplateAssetReferences, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as DagBuilder, o as planFailedOps, on as DeployCancelledError, ot as rebuildClientForBucketRegion, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as PartialFailureError, pt as loadPublishableAssetManifest, q as assertRegionMatch, qt as expectedOwnerParam, r as DeployEngine, rn as CdkdError, rt as TemplateParser, s as planRollback, sn as LocalInvokeBuildError$1, st as shouldRetainResource, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as setAwsClients, tt as isThrottlingError, u as withResourceDeadline, ut as WorkGraph, v as isFinalSnapshotError, vn as StackTerminationProtectionError, vt as getBootstrapMarkerKey, w as renderStatefulReason, wn as withErrorHandling, wt as getDockerCmd, x as extractDeploymentEventError, xt as validateContainerRepoName, y as refusesFinalSnapshot, yt as parseBootstrapMarker, z as disableInstanceApiTermination, zt as resolveUseCdkBootstrapAssets } from "./deploy-engine-B3AUwwq_.js";
2
+ import { $ as withRetry, $t as getAwsClients, A as red, At as synthesisStatusMessage, B as isTerminationProtectionPropagationError, Bt as stateBucketExistenceConfirmed, C as isStatefulRecreateTargetSync, Cn as normalizeAwsError, Ct as formatDockerLoginError, D as cyan, Dt as AssetManifestLoader, E as bold, Et as runDockerStreaming, F as ProviderRegistry, Ft as resolveCaptureObservedState, G as normalizeAwsTagsToCfn, Gt as findLargeInlineResources, H as cfnRefValueFromPhysicalId, Ht as CFN_TEMPLATE_BODY_LIMIT, I as findActionableSilentDrops, It as resolveSkipPrefix, J as readConfigString, Jt as AssemblyReader, K as resolveExplicitPhysicalId, Kt as uploadCfnTemplate, L as CloudControlProvider, Lt as resolveStateBucketWithDefault, M as IAMRoleProvider, Mt as getLegacyStateBucketName, N as collectInlinePolicyNamesManagedBySiblings, Nt as resolveApp, O as gray, Ot as getDockerImageBySourceHash, P as clearOnUpdateRemoval, Pt as resolveAutoAssetStorage, Q as describeTypeWithThrottleRetry, Qt as AwsClients, R as slowCcOperationTimeoutMs, Rt as resolveStateBucketWithDefaultAndSource, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as buildDockerImage, T as formatResourceLine, Tt as runDockerForeground, U as refStateLookupFromResource, Ut as CFN_TEMPLATE_URL_LIMIT, V as IntrinsicFunctionResolver, Vt as warnDeprecatedNoPrefixCliFlag, W as WAFv2WebACLProvider, Wt as MIGRATE_TMP_PREFIX, X as applyRoleArnIfSet, Y as requireConfigString, Yt as processStackMessages, Z as DiffCalculator, Zt as resolveBucketRegion, _ as createPreDeleteFinalSnapshot, _n as StackHasActiveImportsError, _t as ensureAssetStorage, a as DeploymentEventsStore, at as S3StateBackend, b as unsupportedFinalSnapshotError, bt as validateAssetBucketName, c as replayFailedOperations, cn as LocalMigrateError, ct as AssetPublisher, d as IMPLICIT_DELETE_DEPENDENCIES, dn as MissingCdkCliError, dt as buildAssetRedirectMap, en as resetAwsClients, et as isRetryableTransientError, f as computeImplicitDeleteEdges, fn as NestedStackChildDirectDestroyError, ft as createAssetRedirectResolver, g as ccRoutedFinalSnapshotError, gn as ResourceUpdateNotSupportedError, gt as BOOTSTRAP_MARKER_PREFIX, h as buildFinalSnapshotIdentifier, hn as ResourceTimeoutError, ht as AssetModeResolver, i as DeploymentEventsReader, it as LockManager, j as yellow, jt as getDefaultStateBucketName, k as green, kt as Synthesizer, l as replayRollback, ln as LocalStartServiceError, lt as stringifyValue, m as PRE_DELETE_SNAPSHOT_TYPES, mn as ProvisioningError, mt as rewriteTemplateAssetReferences, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as DagBuilder, o as planFailedOps, on as DeployCancelledError, ot as rebuildClientForBucketRegion, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as PartialFailureError, pt as loadPublishableAssetManifest, q as assertRegionMatch, qt as expectedOwnerParam, r as DeployEngine, rn as CdkdError, rt as TemplateParser, s as planRollback, sn as LocalInvokeBuildError$1, st as shouldRetainResource, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as setAwsClients, tt as isThrottlingError, u as withResourceDeadline, ut as WorkGraph, v as isFinalSnapshotError, vn as StackTerminationProtectionError, vt as getBootstrapMarkerKey, w as renderStatefulReason, wn as withErrorHandling, wt as getDockerCmd, x as extractDeploymentEventError, xt as validateContainerRepoName, y as refusesFinalSnapshot, yt as parseBootstrapMarker, z as disableInstanceApiTermination, zt as resolveUseCdkBootstrapAssets } from "./deploy-engine-ChGbsbXm.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-g1CP9a99.js";
4
+ import { t as ASGProvider } from "./asg-provider-BP1bo1ac.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, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, 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";
@@ -13691,8 +13691,8 @@ function extractLocalDeletionProtection(props, region) {
13691
13691
  */
13692
13692
  function derivePerCallProvisionedThroughput(properties, region, source = "min") {
13693
13693
  return {
13694
- ReadCapacityUnits: deriveReadCapacityUnits(asRecord((properties["Replicas"] ?? []).find((r) => r["Region"] === region)?.["ReadProvisionedThroughputSettings"]), source) ?? DEFAULT_CAPACITY_UNITS,
13695
- WriteCapacityUnits: deriveWriteCapacityUnits(asRecord(properties["WriteProvisionedThroughputSettings"]), source) ?? DEFAULT_CAPACITY_UNITS
13694
+ ReadCapacityUnits: deriveReadCapacityUnits(asRecord$1((properties["Replicas"] ?? []).find((r) => r["Region"] === region)?.["ReadProvisionedThroughputSettings"]), source) ?? DEFAULT_CAPACITY_UNITS,
13695
+ WriteCapacityUnits: deriveWriteCapacityUnits(asRecord$1(properties["WriteProvisionedThroughputSettings"]), source) ?? DEFAULT_CAPACITY_UNITS
13696
13696
  };
13697
13697
  }
13698
13698
  /**
@@ -13757,7 +13757,7 @@ const DESCRIBE_SCALABLE_TARGETS_BATCH = 50;
13757
13757
  */
13758
13758
  function collectAutoScalingTargets(properties, localRegion) {
13759
13759
  const specs = [];
13760
- const tableWrite = asRecord(asRecord(properties["WriteProvisionedThroughputSettings"])?.["WriteCapacityAutoScalingSettings"]);
13760
+ const tableWrite = asRecord$1(asRecord$1(properties["WriteProvisionedThroughputSettings"])?.["WriteCapacityAutoScalingSettings"]);
13761
13761
  if (tableWrite) specs.push({
13762
13762
  dimension: "dynamodb:table:WriteCapacityUnits",
13763
13763
  region: localRegion,
@@ -13765,10 +13765,10 @@ function collectAutoScalingTargets(properties, localRegion) {
13765
13765
  });
13766
13766
  const cfnIndexes = properties["GlobalSecondaryIndexes"];
13767
13767
  if (Array.isArray(cfnIndexes)) for (const entry of cfnIndexes) {
13768
- const gsi = asRecord(entry);
13768
+ const gsi = asRecord$1(entry);
13769
13769
  const indexName = gsi?.["IndexName"];
13770
13770
  if (!gsi || typeof indexName !== "string") continue;
13771
- const indexWrite = asRecord(asRecord(gsi["WriteProvisionedThroughputSettings"])?.["WriteCapacityAutoScalingSettings"]);
13771
+ const indexWrite = asRecord$1(asRecord$1(gsi["WriteProvisionedThroughputSettings"])?.["WriteCapacityAutoScalingSettings"]);
13772
13772
  if (indexWrite) specs.push({
13773
13773
  dimension: "dynamodb:index:WriteCapacityUnits",
13774
13774
  indexName,
@@ -13778,10 +13778,10 @@ function collectAutoScalingTargets(properties, localRegion) {
13778
13778
  }
13779
13779
  const replicas = properties["Replicas"];
13780
13780
  if (Array.isArray(replicas)) for (const replicaEntry of replicas) {
13781
- const replica = asRecord(replicaEntry);
13781
+ const replica = asRecord$1(replicaEntry);
13782
13782
  const region = replica?.["Region"];
13783
13783
  if (!replica || typeof region !== "string") continue;
13784
- const replicaRead = asRecord(asRecord(replica["ReadProvisionedThroughputSettings"])?.["ReadCapacityAutoScalingSettings"]);
13784
+ const replicaRead = asRecord$1(asRecord$1(replica["ReadProvisionedThroughputSettings"])?.["ReadCapacityAutoScalingSettings"]);
13785
13785
  if (replicaRead) specs.push({
13786
13786
  dimension: "dynamodb:table:ReadCapacityUnits",
13787
13787
  region,
@@ -13790,10 +13790,10 @@ function collectAutoScalingTargets(properties, localRegion) {
13790
13790
  const replicaIndexes = replica["GlobalSecondaryIndexes"];
13791
13791
  if (!Array.isArray(replicaIndexes)) continue;
13792
13792
  for (const entry of replicaIndexes) {
13793
- const replicaIndex = asRecord(entry);
13793
+ const replicaIndex = asRecord$1(entry);
13794
13794
  const indexName = replicaIndex?.["IndexName"];
13795
13795
  if (!replicaIndex || typeof indexName !== "string") continue;
13796
- const indexRead = asRecord(asRecord(replicaIndex["ReadProvisionedThroughputSettings"])?.["ReadCapacityAutoScalingSettings"]);
13796
+ const indexRead = asRecord$1(asRecord$1(replicaIndex["ReadProvisionedThroughputSettings"])?.["ReadCapacityAutoScalingSettings"]);
13797
13797
  if (indexRead) specs.push({
13798
13798
  dimension: "dynamodb:index:ReadCapacityUnits",
13799
13799
  indexName,
@@ -13805,7 +13805,7 @@ function collectAutoScalingTargets(properties, localRegion) {
13805
13805
  return specs;
13806
13806
  }
13807
13807
  /** Narrow an unknown CFn sub-object to a record (or `undefined`). */
13808
- function asRecord(value) {
13808
+ function asRecord$1(value) {
13809
13809
  return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
13810
13810
  }
13811
13811
  /**
@@ -13849,7 +13849,7 @@ function deriveWriteCapacityUnits(settings, source = "min") {
13849
13849
  if (!settings) return void 0;
13850
13850
  const literal = toFiniteNumber(settings["WriteCapacityUnits"]);
13851
13851
  if (literal !== void 0) return literal;
13852
- const autoScaling = asRecord(settings["WriteCapacityAutoScalingSettings"]);
13852
+ const autoScaling = asRecord$1(settings["WriteCapacityAutoScalingSettings"]);
13853
13853
  if (!autoScaling) return void 0;
13854
13854
  return pickAutoScalingCapacity(autoScaling, source);
13855
13855
  }
@@ -13865,7 +13865,7 @@ function deriveReadCapacityUnits(settings, source = "min") {
13865
13865
  if (!settings) return void 0;
13866
13866
  const literal = toFiniteNumber(settings["ReadCapacityUnits"]);
13867
13867
  if (literal !== void 0) return literal;
13868
- const autoScaling = asRecord(settings["ReadCapacityAutoScalingSettings"]);
13868
+ const autoScaling = asRecord$1(settings["ReadCapacityAutoScalingSettings"]);
13869
13869
  if (!autoScaling) return void 0;
13870
13870
  return pickAutoScalingCapacity(autoScaling, source);
13871
13871
  }
@@ -13918,16 +13918,16 @@ function toSdkGlobalSecondaryIndexes(properties, region, billingMode, source = "
13918
13918
  const cfnIndexes = rawIndexes ?? [];
13919
13919
  if (cfnIndexes.length === 0) return [];
13920
13920
  const replicas = properties["Replicas"] ?? [];
13921
- const localReplicaIndexes = (Array.isArray(replicas) ? replicas.find((r) => asRecord(r)?.["Region"] === region) : void 0)?.["GlobalSecondaryIndexes"] ?? [];
13921
+ const localReplicaIndexes = (Array.isArray(replicas) ? replicas.find((r) => asRecord$1(r)?.["Region"] === region) : void 0)?.["GlobalSecondaryIndexes"] ?? [];
13922
13922
  const localByName = /* @__PURE__ */ new Map();
13923
13923
  if (Array.isArray(localReplicaIndexes)) for (const entry of localReplicaIndexes) {
13924
- const record = asRecord(entry);
13924
+ const record = asRecord$1(entry);
13925
13925
  const name = record?.["IndexName"];
13926
13926
  if (record && typeof name === "string") localByName.set(name, record);
13927
13927
  }
13928
13928
  const result = [];
13929
13929
  for (const entry of cfnIndexes) {
13930
- const gsi = asRecord(entry);
13930
+ const gsi = asRecord$1(entry);
13931
13931
  if (!gsi) {
13932
13932
  result.push(entry);
13933
13933
  continue;
@@ -13940,17 +13940,17 @@ function toSdkGlobalSecondaryIndexes(properties, region, billingMode, source = "
13940
13940
  Projection: gsi["Projection"]
13941
13941
  };
13942
13942
  if (gsi["WarmThroughput"] !== void 0) sdk.WarmThroughput = gsi["WarmThroughput"];
13943
- const explicitProvisioned = asRecord(gsi["ProvisionedThroughput"]);
13944
- const explicitOnDemand = asRecord(gsi["OnDemandThroughput"]);
13943
+ const explicitProvisioned = asRecord$1(gsi["ProvisionedThroughput"]);
13944
+ const explicitOnDemand = asRecord$1(gsi["OnDemandThroughput"]);
13945
13945
  if (explicitProvisioned) sdk.ProvisionedThroughput = explicitProvisioned;
13946
13946
  else if (billingMode === "PROVISIONED") sdk.ProvisionedThroughput = {
13947
- ReadCapacityUnits: deriveReadCapacityUnits(asRecord(localEntry?.["ReadProvisionedThroughputSettings"]), source) ?? deriveReadCapacityUnits(asRecord(gsi["ReadProvisionedThroughputSettings"]), source) ?? DEFAULT_CAPACITY_UNITS,
13948
- WriteCapacityUnits: deriveWriteCapacityUnits(asRecord(gsi["WriteProvisionedThroughputSettings"]), source) ?? DEFAULT_CAPACITY_UNITS
13947
+ ReadCapacityUnits: deriveReadCapacityUnits(asRecord$1(localEntry?.["ReadProvisionedThroughputSettings"]), source) ?? deriveReadCapacityUnits(asRecord$1(gsi["ReadProvisionedThroughputSettings"]), source) ?? DEFAULT_CAPACITY_UNITS,
13948
+ WriteCapacityUnits: deriveWriteCapacityUnits(asRecord$1(gsi["WriteProvisionedThroughputSettings"]), source) ?? DEFAULT_CAPACITY_UNITS
13949
13949
  };
13950
13950
  if (explicitOnDemand) sdk.OnDemandThroughput = explicitOnDemand;
13951
13951
  else if (billingMode !== "PROVISIONED") {
13952
- const maxWrite = toFiniteNumber(asRecord(gsi["WriteOnDemandThroughputSettings"])?.["MaxWriteRequestUnits"]);
13953
- const maxRead = toFiniteNumber(asRecord(localEntry?.["ReadOnDemandThroughputSettings"])?.["MaxReadRequestUnits"]) ?? toFiniteNumber(asRecord(gsi["ReadOnDemandThroughputSettings"])?.["MaxReadRequestUnits"]);
13952
+ const maxWrite = toFiniteNumber(asRecord$1(gsi["WriteOnDemandThroughputSettings"])?.["MaxWriteRequestUnits"]);
13953
+ const maxRead = toFiniteNumber(asRecord$1(localEntry?.["ReadOnDemandThroughputSettings"])?.["MaxReadRequestUnits"]) ?? toFiniteNumber(asRecord$1(gsi["ReadOnDemandThroughputSettings"])?.["MaxReadRequestUnits"]);
13954
13954
  if (maxWrite !== void 0 || maxRead !== void 0) sdk.OnDemandThroughput = {
13955
13955
  ...maxRead !== void 0 && { MaxReadRequestUnits: maxRead },
13956
13956
  ...maxWrite !== void 0 && { MaxWriteRequestUnits: maxWrite }
@@ -13972,7 +13972,7 @@ function toSdkGlobalSecondaryIndexes(properties, region, billingMode, source = "
13972
13972
  * is issue #1440 one level up from where the member test looks.
13973
13973
  */
13974
13974
  function isUnresolvedIntrinsicBlock(value) {
13975
- const record = asRecord(value);
13975
+ const record = asRecord$1(value);
13976
13976
  if (!record) return false;
13977
13977
  const keys = Object.keys(record);
13978
13978
  return keys.length > 0 && keys.every((k) => k === "Ref" || k.startsWith("Fn::"));
@@ -14014,19 +14014,19 @@ function collectRawOnDemandDeclarations(properties, region) {
14014
14014
  const rawIndexes = properties["GlobalSecondaryIndexes"];
14015
14015
  if (!Array.isArray(rawIndexes)) return out;
14016
14016
  const replicas = properties["Replicas"];
14017
- const localReplicaIndexes = asRecord(Array.isArray(replicas) ? replicas.find((r) => asRecord(r)?.["Region"] === region) : void 0)?.["GlobalSecondaryIndexes"];
14017
+ const localReplicaIndexes = asRecord$1(Array.isArray(replicas) ? replicas.find((r) => asRecord$1(r)?.["Region"] === region) : void 0)?.["GlobalSecondaryIndexes"];
14018
14018
  const localByName = /* @__PURE__ */ new Map();
14019
14019
  if (Array.isArray(localReplicaIndexes)) for (const entry of localReplicaIndexes) {
14020
- const record = asRecord(entry);
14020
+ const record = asRecord$1(entry);
14021
14021
  const name = record?.["IndexName"];
14022
14022
  if (record && typeof name === "string") localByName.set(name, record);
14023
14023
  }
14024
14024
  for (const entry of rawIndexes) {
14025
- const gsi = asRecord(entry);
14025
+ const gsi = asRecord$1(entry);
14026
14026
  const name = gsi?.["IndexName"];
14027
14027
  if (!gsi || typeof name !== "string") continue;
14028
14028
  const localEntry = localByName.get(name);
14029
- const explicitOnDemand = asRecord(gsi["OnDemandThroughput"]);
14029
+ const explicitOnDemand = asRecord$1(gsi["OnDemandThroughput"]);
14030
14030
  if (explicitOnDemand) {
14031
14031
  out.set(name, {
14032
14032
  readDeclared: explicitOnDemand["MaxReadRequestUnits"] !== void 0,
@@ -14037,8 +14037,8 @@ function collectRawOnDemandDeclarations(properties, region) {
14037
14037
  const readBlocks = [localEntry?.["ReadOnDemandThroughputSettings"], gsi["ReadOnDemandThroughputSettings"]];
14038
14038
  const writeBlock = gsi["WriteOnDemandThroughputSettings"];
14039
14039
  out.set(name, {
14040
- readDeclared: readBlocks.some((block) => asRecord(block)?.["MaxReadRequestUnits"] !== void 0 || isUnresolvedIntrinsicBlock(block)),
14041
- writeDeclared: asRecord(writeBlock)?.["MaxWriteRequestUnits"] !== void 0 || isUnresolvedIntrinsicBlock(writeBlock)
14040
+ readDeclared: readBlocks.some((block) => asRecord$1(block)?.["MaxReadRequestUnits"] !== void 0 || isUnresolvedIntrinsicBlock(block)),
14041
+ writeDeclared: asRecord$1(writeBlock)?.["MaxWriteRequestUnits"] !== void 0 || isUnresolvedIntrinsicBlock(writeBlock)
14042
14042
  });
14043
14043
  }
14044
14044
  return out;
@@ -14066,13 +14066,13 @@ function collectRawOnDemandDeclarations(properties, region) {
14066
14066
  function toSdkReplicaGlobalSecondaryIndexes(replicaIndexes) {
14067
14067
  if (!Array.isArray(replicaIndexes) || replicaIndexes.length === 0) return void 0;
14068
14068
  return replicaIndexes.map((entry) => {
14069
- const cfn = asRecord(entry);
14069
+ const cfn = asRecord$1(entry);
14070
14070
  if (!cfn) return entry;
14071
14071
  const sdk = { IndexName: cfn["IndexName"] };
14072
- const explicitProvisioned = asRecord(cfn["ProvisionedThroughputOverride"]);
14073
- const explicitOnDemand = asRecord(cfn["OnDemandThroughputOverride"]);
14074
- const readCapacity = deriveReadCapacityUnits(asRecord(cfn["ReadProvisionedThroughputSettings"]));
14075
- const maxReadRequestUnits = toFiniteNumber(asRecord(cfn["ReadOnDemandThroughputSettings"])?.["MaxReadRequestUnits"]);
14072
+ const explicitProvisioned = asRecord$1(cfn["ProvisionedThroughputOverride"]);
14073
+ const explicitOnDemand = asRecord$1(cfn["OnDemandThroughputOverride"]);
14074
+ const readCapacity = deriveReadCapacityUnits(asRecord$1(cfn["ReadProvisionedThroughputSettings"]));
14075
+ const maxReadRequestUnits = toFiniteNumber(asRecord$1(cfn["ReadOnDemandThroughputSettings"])?.["MaxReadRequestUnits"]);
14076
14076
  if (explicitProvisioned) sdk.ProvisionedThroughputOverride = explicitProvisioned;
14077
14077
  else if (readCapacity !== void 0) sdk.ProvisionedThroughputOverride = { ReadCapacityUnits: readCapacity };
14078
14078
  if (explicitOnDemand) sdk.OnDemandThroughputOverride = explicitOnDemand;
@@ -33237,6 +33237,7 @@ var GlueProvider = class {
33237
33237
  try {
33238
33238
  const builtTableInput = this.buildTableInput(tableInput, tableName);
33239
33239
  this.preserveAwsManagedParameters(builtTableInput, tableInput["Parameters"], (previousProperties?.["TableInput"])?.["Parameters"], live.parameters);
33240
+ this.preserveAwsManagedStorageDescriptor(builtTableInput, tableInput, previousProperties?.["TableInput"], live.storageDescriptor);
33240
33241
  await this.getClient().send(new UpdateTableCommand$1({
33241
33242
  ...catalogId !== void 0 && { CatalogId: catalogId },
33242
33243
  DatabaseName: databaseName,
@@ -33253,7 +33254,7 @@ var GlueProvider = class {
33253
33254
  let message = `Failed to update Glue Table ${logicalId}: ${error instanceof Error ? error.message : String(error)}`;
33254
33255
  if (error instanceof ConcurrentModificationException) {
33255
33256
  message += ". Another writer changed the table between cdkd's pre-update read and its UpdateTable call.";
33256
- message += live.versionId !== void 0 ? ` cdkd sent the version it read (${live.versionId}) as a precondition and AWS rejected the write, rather than let it put back the AWS-managed Parameters read a moment earlier — which for an Apache Iceberg table would have pinned it to an older metadata_location (an effective snapshot rollback).` : " AWS returned no VersionId on the pre-update read, so cdkd could not attach a precondition; AWS rejected the write on its own.";
33257
+ message += live.versionId !== void 0 ? ` cdkd sent the version it read (${live.versionId}) as a precondition and AWS rejected the write, rather than let it put back the AWS-managed Parameters and StorageDescriptor members read a moment earlier — which for an Apache Iceberg table would have pinned it to an older metadata_location (an effective snapshot rollback).` : " AWS returned no VersionId on the pre-update read, so cdkd could not attach a precondition; AWS rejected the write on its own.";
33257
33258
  message += ` Re-run the deploy to pick up the current values.`;
33258
33259
  }
33259
33260
  throw new ProvisioningError(message, resourceType, logicalId, physicalId, cause);
@@ -33343,8 +33344,91 @@ var GlueProvider = class {
33343
33344
  };
33344
33345
  }
33345
33346
  /**
33346
- * The live table state {@link preserveAwsManagedParameters} needs: its
33347
- * current `Parameters` plus the `VersionId` that pins them.
33347
+ * Read-merge-write for out-of-band-authored `TableInput.StorageDescriptor`
33348
+ * members (issue #1479) — the subtree sibling of
33349
+ * {@link preserveAwsManagedParameters}, applied per SD MEMBER, with the two
33350
+ * nested bags (`StorageDescriptor.Parameters`, `SerdeInfo.Parameters`)
33351
+ * getting the same per-KEY rule one level down.
33352
+ *
33353
+ * Live probes (2026-08-10, us-east-1 — recorded on issue #1479) established
33354
+ * WHO authors what, which is why this is per-member rather than a blanket
33355
+ * merge:
33356
+ *
33357
+ * - A USER-authored `EXTERNAL_TABLE`: re-sending the template verbatim
33358
+ * reads back identical — the service itself authors only scalar defaults
33359
+ * (`Compressed: false`, `NumberOfBuckets: 0`, ...). Full-replace is
33360
+ * CORRECT for template-declared members, and `drift --revert` depends on
33361
+ * it to clear console-side edits.
33362
+ * - A CRAWLER-populated table: the crawler authors `Columns`,
33363
+ * `InputFormat` / `OutputFormat`, `SerdeInfo` (incl. its `Parameters`
33364
+ * bag), and `StorageDescriptor.Parameters`; an UpdateTable restating only
33365
+ * a minimal template wiped ALL of them (`Columns` -> `[]`, `SerdeInfo`
33366
+ * gone) while reporting success.
33367
+ * - An ICEBERG table: an UpdateTable omitting `Columns` was ACCEPTED and
33368
+ * wiped the catalog schema to `[]` (Glue re-derives Iceberg columns from
33369
+ * table metadata, so the catalog copy is metadata-authored between
33370
+ * engine commits).
33371
+ *
33372
+ * The preservation key is the SAME "present in NEITHER template side" test
33373
+ * as {@link preserveAwsManagedParameters}, per member:
33374
+ *
33375
+ * | member in desired | member in previous | outcome |
33376
+ * | ----------------- | ------------------ | ---------------------------------- |
33377
+ * | yes | (either) | template wins |
33378
+ * | no | yes | the USER REMOVED it -> stays removed |
33379
+ * | no | no | out-of-band authored -> carried forward from live |
33380
+ *
33381
+ * A template that never declared `StorageDescriptor` on EITHER side (a
33382
+ * crawler-managed table adopted into a minimal template) carries the whole
33383
+ * live block forward. Deliberately scoped to the `StorageDescriptor`
33384
+ * subtree per issue #1479 — the crawler also authors `PartitionKeys` /
33385
+ * `Owner`, but widening beyond the issue's member set is a separate
33386
+ * decision (recorded there).
33387
+ *
33388
+ * TOCTOU: the write rides the same unconditional `VersionId` precondition
33389
+ * as the Parameters merge (see {@link readLiveTableState}), so a concurrent
33390
+ * out-of-band write fails the update loudly instead of being clobbered.
33391
+ */
33392
+ preserveAwsManagedStorageDescriptor(built, desiredTableInput, previousTableInput, liveSd) {
33393
+ if (!liveSd || Object.keys(liveSd).length === 0) return;
33394
+ const desiredSdRaw = desiredTableInput["StorageDescriptor"];
33395
+ const previousSdRaw = asRecord(previousTableInput)?.["StorageDescriptor"];
33396
+ if (desiredSdRaw === void 0 && previousSdRaw === void 0) {
33397
+ built.StorageDescriptor = liveSd;
33398
+ return;
33399
+ }
33400
+ const desiredKeys = parameterKeySet(desiredSdRaw);
33401
+ const previousKeys = parameterKeySet(previousSdRaw);
33402
+ const sdOut = { ...built.StorageDescriptor ?? {} };
33403
+ for (const [member, liveValue] of Object.entries(liveSd)) {
33404
+ if (liveValue === void 0) continue;
33405
+ if (desiredKeys.has(member) || previousKeys.has(member)) continue;
33406
+ sdOut[member] = liveValue;
33407
+ }
33408
+ const desiredSd = asRecord(desiredSdRaw);
33409
+ const previousSd = asRecord(previousSdRaw);
33410
+ if (desiredKeys.has("Parameters") || previousKeys.has("Parameters")) this.preserveAwsManagedParameters(sdOut, desiredSd?.["Parameters"], previousSd?.["Parameters"], liveSd.Parameters);
33411
+ if (desiredKeys.has("SerdeInfo") && liveSd.SerdeInfo) {
33412
+ const desiredSerde = asRecord(desiredSd?.["SerdeInfo"]);
33413
+ const previousSerde = asRecord(previousSd?.["SerdeInfo"]);
33414
+ const desiredSerdeKeys = parameterKeySet(desiredSerde);
33415
+ const previousSerdeKeys = parameterKeySet(previousSerde);
33416
+ const serdeOut = { ...sdOut["SerdeInfo"] ?? {} };
33417
+ for (const [member, liveValue] of Object.entries(liveSd.SerdeInfo)) {
33418
+ if (liveValue === void 0) continue;
33419
+ if (desiredSerdeKeys.has(member) || previousSerdeKeys.has(member)) continue;
33420
+ serdeOut[member] = liveValue;
33421
+ }
33422
+ if (desiredSerdeKeys.has("Parameters") || previousSerdeKeys.has("Parameters")) this.preserveAwsManagedParameters(serdeOut, desiredSerde?.["Parameters"], previousSerde?.["Parameters"], liveSd.SerdeInfo.Parameters);
33423
+ if (Object.keys(serdeOut).length > 0) sdOut["SerdeInfo"] = serdeOut;
33424
+ }
33425
+ if (Object.keys(sdOut).length > 0) built.StorageDescriptor = sdOut;
33426
+ }
33427
+ /**
33428
+ * The live table state the two merges need: its current `Parameters` (for
33429
+ * {@link preserveAwsManagedParameters}), its `StorageDescriptor` (for
33430
+ * {@link preserveAwsManagedStorageDescriptor}, issue #1479), plus the
33431
+ * `VersionId` that pins both.
33348
33432
  *
33349
33433
  * A missing table returns empty rather than throwing: `UpdateTable` is about
33350
33434
  * to surface the real, more actionable error. Any OTHER failure is fatal by
@@ -33393,11 +33477,13 @@ var GlueProvider = class {
33393
33477
  }));
33394
33478
  return {
33395
33479
  parameters: resp.Table?.Parameters,
33480
+ storageDescriptor: resp.Table?.StorageDescriptor,
33396
33481
  versionId: resp.Table?.VersionId
33397
33482
  };
33398
33483
  } catch (error) {
33399
33484
  if (error instanceof EntityNotFoundException) return {
33400
33485
  parameters: void 0,
33486
+ storageDescriptor: void 0,
33401
33487
  versionId: void 0
33402
33488
  };
33403
33489
  throw new ProvisioningError(preUpdateReadFailureMessage("Table", "glue:GetTable", logicalId, error), resourceType, logicalId, physicalId, error instanceof Error ? error : void 0);
@@ -34433,6 +34519,19 @@ function parameterKeySet(value) {
34433
34519
  return new Set(Object.keys(value));
34434
34520
  }
34435
34521
  /**
34522
+ * Narrow an unknown template / state value to a plain object, or `undefined`.
34523
+ * A malformed side (string / array / null) yields `undefined` and therefore
34524
+ * an empty key set — the tolerant treatment `parameterKeySet` already gives
34525
+ * bags, extended to the StorageDescriptor merge's containers. (An unresolved
34526
+ * intrinsic is itself a plain object, so it passes through and contributes
34527
+ * its `Fn::*`/`Ref` key — harmless here, since providers only ever see
34528
+ * resolved values.)
34529
+ */
34530
+ function asRecord(value) {
34531
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return;
34532
+ return value;
34533
+ }
34534
+ /**
34436
34535
  * Message for a failed pre-update `Get*` read (issue #1461). Names the IAM
34437
34536
  * action so a permission gap is one line away from fixed, and says what the
34438
34537
  * read is FOR so the failure does not read as gratuitous.
@@ -48216,6 +48315,46 @@ function calculateResourceDrift(stateProperties, awsProperties, options) {
48216
48315
  return drifts;
48217
48316
  }
48218
48317
  /**
48318
+ * Top-level keys of an `observedProperties` drift baseline that must NOT be
48319
+ * compared: keys the user never declared in the template (`declared` is the
48320
+ * state record's `properties` — the template intent) whose captured value was
48321
+ * EMPTY (absent container / `null` / `[]` / `{}`) at deploy time.
48322
+ *
48323
+ * WHY (issue #1498): the observed snapshot is captured per-resource right
48324
+ * after THAT resource settles, which is structurally BEFORE dependent sibling
48325
+ * resources run. A parent property that a separate resource type materializes
48326
+ * later — `AWS::ECS::ClusterCapacityProviderAssociations` populating
48327
+ * `Cluster.CapacityProviders`, `AWS::AutoScaling::LifecycleHook` populating
48328
+ * the ASG's `LifecycleHookSpecificationList`, standalone
48329
+ * `AWS::EC2::SecurityGroupIngress` rules populating the group's ingress list —
48330
+ * is therefore captured empty and later populated, producing PERMANENT
48331
+ * phantom drift on a fresh, untouched stack. Worse, `drift --revert` then
48332
+ * strips that sibling-managed configuration from AWS. AWS services author the
48333
+ * same shape asynchronously (ECS attaches the `AmazonECSManaged` tag + its
48334
+ * managed draining hook when a capacity provider binds an ASG).
48335
+ *
48336
+ * CloudFormation's drift detection only compares property values explicitly
48337
+ * set in the template, so none of this class fires there. Skipping exactly
48338
+ * the "undeclared AND captured-empty" keys restores that parity for the
48339
+ * phantom class while keeping the observed baseline's extra power: an
48340
+ * undeclared key captured with a REAL value (an AWS-side default such as a
48341
+ * cluster setting) is still compared, so a console-side change to it still
48342
+ * surfaces as drift.
48343
+ *
48344
+ * Returned keys are fed into `calculateResourceDrift`'s `ignorePaths`, so
48345
+ * they are excluded as whole subtrees from detection — and therefore from
48346
+ * `--revert` / `--accept`, which operate on the detected changes.
48347
+ */
48348
+ function undeclaredEmptyObservedKeys(observed, declared) {
48349
+ const keys = [];
48350
+ for (const key of Object.keys(observed)) {
48351
+ if (key in declared) continue;
48352
+ const value = observed[key];
48353
+ if (value === null || value === void 0 || Array.isArray(value) && value.length === 0 || isPlainObject(value) && Object.keys(value).length === 0) keys.push(key);
48354
+ }
48355
+ return keys;
48356
+ }
48357
+ /**
48219
48358
  * Thin alias over the shared {@link matchesPathPrefix} rule, kept as a named
48220
48359
  * function because "ignored" is what the path list means at these call sites.
48221
48360
  * Sharing the implementation with `getDriftUnorderedPaths` is deliberate: both
@@ -48627,8 +48766,10 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
48627
48766
  const ignorePaths = provider.getDriftUnknownPaths ? provider.getDriftUnknownPaths(resource.resourceType) : [];
48628
48767
  const unorderedPaths = provider.getDriftUnorderedPaths ? provider.getDriftUnorderedPaths(resource.resourceType) : [];
48629
48768
  const useObserved = resource.observedProperties !== void 0;
48630
- const changes = calculateResourceDrift(useObserved ? resource.observedProperties : resource.properties ?? {}, aws, {
48631
- ignorePaths,
48769
+ const baseline = useObserved ? resource.observedProperties : resource.properties ?? {};
48770
+ const observedIgnorePaths = useObserved ? undeclaredEmptyObservedKeys(resource.observedProperties, resource.properties ?? {}) : [];
48771
+ const changes = calculateResourceDrift(baseline, aws, {
48772
+ ignorePaths: observedIgnorePaths.length ? [...ignorePaths, ...observedIgnorePaths] : ignorePaths,
48632
48773
  unionWalkObjects: useObserved,
48633
48774
  unorderedPaths
48634
48775
  });
@@ -65966,7 +66107,7 @@ function createMigrateCommand() {
65966
66107
  */
65967
66108
  function buildProgram() {
65968
66109
  const program = new Command();
65969
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.29");
66110
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.31");
65970
66111
  program.hook("preAction", (_thisCommand, actionCommand) => {
65971
66112
  const { profile } = actionCommand.optsWithGlobals();
65972
66113
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;