@go-to-k/cdkd 0.281.19 → 0.281.20

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 configStringRefusal, $t as CFN_TEMPLATE_URL_LIMIT, A as green, At as validateContainerRepoName, B as slowCcOperationTimeoutMs, Bt as synthesisStatusMessage, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as PartialFailureError, Ct as rewriteTemplateAssetReferences, D as bold, Dn as StackHasActiveImportsError, Dt as getBootstrapMarkerKey, E as formatResourceLine, En as ResourceUpdateNotSupportedError, Et as ensureAssetStorage, F as clearOnUpdateRemoval, Ft as runDockerForeground, G as getAccountInfo, Gt as resolveCaptureObservedState, H as isTerminationProtectionPropagationError, Ht as getLegacyStateBucketName, I as ProviderRegistry, It as runDockerStreaming, J as normalizeAwsTagsToCfn, Jt as resolveStateBucketWithDefaultAndSource, K as refStateLookupFromResource, Kt as resolveSkipPrefix, L as findActionableSilentDrops, Lt as AssetManifestLoader, M as yellow, Mt as buildDockerImage, N as IAMRoleProvider, Nn as normalizeAwsError, Nt as formatDockerLoginError, O as cyan, On as StackTerminationProtectionError, Ot as parseBootstrapMarker, P as collectInlinePolicyNamesManagedBySiblings, Pn as withErrorHandling, Pt as getDockerCmd, Q as configBooleanRefusal, Qt as CFN_TEMPLATE_BODY_LIMIT, R as findSilentDropProperties, Rt as getDockerImageBySourceHash, S as extractDeploymentEventError, Sn as NestedStackChildDirectDestroyError, St as loadPublishableAssetManifest, T as renderStatefulReason, Tn as ResourceTimeoutError, Tt as BOOTSTRAP_MARKER_PREFIX, U as IntrinsicFunctionResolver, Ut as resolveApp, V as disableInstanceApiTermination, Vt as getDefaultStateBucketName, W as cfnRefValueFromPhysicalId, Wt as resolveAutoAssetStorage, X as assertRegionMatch, Xt as stateBucketExistenceConfirmed, Y as resolveExplicitPhysicalId, Yt as resolveUseCdkBootstrapAssets, Z as coerceCfnBoolean, Zt as warnDeprecatedNoPrefixCliFlag, _ as createPreDeleteFinalSnapshot, _n as LocalInvokeBuildError$1, _t as AssetPublisher, a as DeploymentEventsStore, an as processStackMessages, at as applyRoleArnIfSet, b as unsupportedFinalSnapshotError, bt as buildAssetRedirectMap, c as replayFailedOperations, cn as AwsClients, ct as withRetry, d as IMPLICIT_DELETE_DEPENDENCIES, dn as setAwsClients, dt as DagBuilder, en as MIGRATE_TMP_PREFIX, et as readConfigString, f as computeImplicitDeleteEdges, ft as TemplateParser, g as ccRoutedFinalSnapshotError, gn as DeployCancelledError, gt as shouldRetainResource, h as buildFinalSnapshotIdentifier, ht as rebuildClientForBucketRegion, i as DeploymentEventsReader, in as AssemblyReader, it as requireConfigString, j as red, jt as derivePartitionAndUrlSuffix, k as gray, kt as validateAssetBucketName, l as replayRollback, ln as getAwsClients, lt as isRetryableTransientError, m as PRE_DELETE_SNAPSHOT_TYPES, mt as S3StateBackend, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as uploadCfnTemplate, nt as requireConfigArray, o as planFailedOps, ot as DiffCalculator, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as CdkdError, pt as LockManager, q as WAFv2WebACLProvider, qt as resolveStateBucketWithDefault, r as DeployEngine, rn as expectedOwnerParam, rt as requireConfigObject, s as planRollback, sn as resolveBucketRegion, st as describeTypeWithThrottleRetry, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as findLargeInlineResources, tt as replayWarn, u as withResourceDeadline, un as resetAwsClients, ut as isThrottlingError, v as isFinalSnapshotError, vn as LocalMigrateError, vt as stringifyValue, w as isStatefulRecreateTargetSync, wn as ProvisioningError, wt as AssetModeResolver, x as makeCanonicalizePropertiesFn, xn as MissingCdkCliError, xt as createAssetRedirectResolver, y as refusesFinalSnapshot, yn as LocalStartServiceError, yt as WorkGraph, z as CloudControlProvider, zt as Synthesizer } from "./deploy-engine-DPnxkjWi.js";
2
+ import { $ as configStringRefusal, $t as CFN_TEMPLATE_URL_LIMIT, A as green, At as validateContainerRepoName, B as slowCcOperationTimeoutMs, Bt as synthesisStatusMessage, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as PartialFailureError, Ct as rewriteTemplateAssetReferences, D as bold, Dn as StackHasActiveImportsError, Dt as getBootstrapMarkerKey, E as formatResourceLine, En as ResourceUpdateNotSupportedError, Et as ensureAssetStorage, F as clearOnUpdateRemoval, Ft as runDockerForeground, G as getAccountInfo, Gt as resolveCaptureObservedState, H as isTerminationProtectionPropagationError, Ht as getLegacyStateBucketName, I as ProviderRegistry, It as runDockerStreaming, J as normalizeAwsTagsToCfn, Jt as resolveStateBucketWithDefaultAndSource, K as refStateLookupFromResource, Kt as resolveSkipPrefix, L as findActionableSilentDrops, Lt as AssetManifestLoader, M as yellow, Mt as buildDockerImage, N as IAMRoleProvider, Nn as normalizeAwsError, Nt as formatDockerLoginError, O as cyan, On as StackTerminationProtectionError, Ot as parseBootstrapMarker, P as collectInlinePolicyNamesManagedBySiblings, Pn as withErrorHandling, Pt as getDockerCmd, Q as configBooleanRefusal, Qt as CFN_TEMPLATE_BODY_LIMIT, R as findSilentDropProperties, Rt as getDockerImageBySourceHash, S as extractDeploymentEventError, Sn as NestedStackChildDirectDestroyError, St as loadPublishableAssetManifest, T as renderStatefulReason, Tn as ResourceTimeoutError, Tt as BOOTSTRAP_MARKER_PREFIX, U as IntrinsicFunctionResolver, Ut as resolveApp, V as disableInstanceApiTermination, Vt as getDefaultStateBucketName, W as cfnRefValueFromPhysicalId, Wt as resolveAutoAssetStorage, X as assertRegionMatch, Xt as stateBucketExistenceConfirmed, Y as resolveExplicitPhysicalId, Yt as resolveUseCdkBootstrapAssets, Z as coerceCfnBoolean, Zt as warnDeprecatedNoPrefixCliFlag, _ as createPreDeleteFinalSnapshot, _n as LocalInvokeBuildError$1, _t as AssetPublisher, a as DeploymentEventsStore, an as processStackMessages, at as applyRoleArnIfSet, b as unsupportedFinalSnapshotError, bt as buildAssetRedirectMap, c as replayFailedOperations, cn as AwsClients, ct as withRetry, d as IMPLICIT_DELETE_DEPENDENCIES, dn as setAwsClients, dt as DagBuilder, en as MIGRATE_TMP_PREFIX, et as readConfigString, f as computeImplicitDeleteEdges, ft as TemplateParser, g as ccRoutedFinalSnapshotError, gn as DeployCancelledError, gt as shouldRetainResource, h as buildFinalSnapshotIdentifier, ht as rebuildClientForBucketRegion, i as DeploymentEventsReader, in as AssemblyReader, it as requireConfigString, j as red, jt as derivePartitionAndUrlSuffix, k as gray, kt as validateAssetBucketName, l as replayRollback, ln as getAwsClients, lt as isRetryableTransientError, m as PRE_DELETE_SNAPSHOT_TYPES, mt as S3StateBackend, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as uploadCfnTemplate, nt as requireConfigArray, o as planFailedOps, ot as DiffCalculator, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as CdkdError, pt as LockManager, q as WAFv2WebACLProvider, qt as resolveStateBucketWithDefault, r as DeployEngine, rn as expectedOwnerParam, rt as requireConfigObject, s as planRollback, sn as resolveBucketRegion, st as describeTypeWithThrottleRetry, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as findLargeInlineResources, tt as replayWarn, u as withResourceDeadline, un as resetAwsClients, ut as isThrottlingError, v as isFinalSnapshotError, vn as LocalMigrateError, vt as stringifyValue, w as isStatefulRecreateTargetSync, wn as ProvisioningError, wt as AssetModeResolver, x as makeCanonicalizePropertiesFn, xn as MissingCdkCliError, xt as createAssetRedirectResolver, y as refusesFinalSnapshot, yn as LocalStartServiceError, yt as WorkGraph, z as CloudControlProvider, zt as Synthesizer } from "./deploy-engine-C3-CvvrB.js";
3
3
  import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, h as withStackName, i as runStackBuffered, m as withSkipPrefix, n as getLogger, o as PATTERN_B_NAME_OPTIONS, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-zRrlbaQt.js";
4
- import { t as ASGProvider } from "./asg-provider-CE-lwlgZ.js";
4
+ import { t as ASGProvider } from "./asg-provider-Cv9YCLsx.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";
@@ -14572,6 +14572,18 @@ var DynamoDBGlobalTableProvider = class {
14572
14572
  delete copy["GlobalSecondaryIndexes"];
14573
14573
  return copy;
14574
14574
  });
14575
+ const keptKeyAttributes = collectDesiredKeyAttributeNames(properties, { indexListKeys: ["LocalSecondaryIndexes"] });
14576
+ if (keptKeyAttributes.size > 0 && Array.isArray(attributeDefinitions)) {
14577
+ const prunedAttributeDefinitions = attributeDefinitions.filter((definition) => {
14578
+ const name = asRecord$1(definition)?.["AttributeName"];
14579
+ if (typeof name !== "string") return true;
14580
+ return keptKeyAttributes.has(name);
14581
+ });
14582
+ if (prunedAttributeDefinitions.length !== attributeDefinitions.length) {
14583
+ createParams.AttributeDefinitions = prunedAttributeDefinitions;
14584
+ effectiveProperties["AttributeDefinitions"] = [...prunedAttributeDefinitions];
14585
+ }
14586
+ }
14575
14587
  }
14576
14588
  if (sdkIndexes.length > 0) createParams.GlobalSecondaryIndexes = sdkIndexes;
14577
14589
  if (properties["LocalSecondaryIndexes"]) createParams.LocalSecondaryIndexes = properties["LocalSecondaryIndexes"];
@@ -15945,6 +15957,31 @@ var DynamoDBGlobalTableProvider = class {
15945
15957
  return [];
15946
15958
  }
15947
15959
  /**
15960
+ * `AttributeDefinitions` is an unordered SET, and the comparator compares
15961
+ * arrays positionally (issue #1742).
15962
+ *
15963
+ * `DescribeTable` returns the definitions in an order matching neither the
15964
+ * request nor alphabetical — measured us-east-1 2026-08-13 on the
15965
+ * `rollback-replay-effective-props` fixture, where a table declaring
15966
+ * `[pk, gsipk]` read back as `[gsipk, pk]` — so an UNTOUCHED table drifted
15967
+ * forever. Sorting cannot hide a real change here because the list is a
15968
+ * genuine set: members are keyed by `AttributeName`, so adding, removing or
15969
+ * retyping one still changes the canonicalized form.
15970
+ *
15971
+ * Reachable whenever the drift baseline is `properties` rather than
15972
+ * `observedProperties` — i.e. after any reverse-replacement rollback, which
15973
+ * `rollback-executor.ts` strips `observedProperties` on. That is also why it
15974
+ * went unseen: on the ordinary path both sides come from the same readback.
15975
+ *
15976
+ * `KeySchema` is deliberately NOT declared, at the table level or per index:
15977
+ * it is order-SIGNIFICANT (HASH before RANGE), so sorting it would silently
15978
+ * hide a real key change — the failure direction this file's sibling rules
15979
+ * call the worse one.
15980
+ */
15981
+ getDriftUnorderedPaths(_resourceType) {
15982
+ return ["AttributeDefinitions"];
15983
+ }
15984
+ /**
15948
15985
  * Adopt an existing DynamoDB GlobalTable into cdkd state.
15949
15986
  *
15950
15987
  * Lookup order:
@@ -16293,12 +16330,21 @@ function collectAutoScalingTargets(properties, localRegion) {
16293
16330
  * redefine-in-place (replacement required); one outside it is the normal
16294
16331
  * bookkeeping of a GSI deletion and must NOT force a replacement.
16295
16332
  *
16296
- * Malformed / intrinsic-valued entries contribute nothing, which errs on the
16297
- * PERMISSIVE side of the guard — correct here, because the guard's failure
16298
- * mode is a forced replacement of a live table, and AWS itself still rejects
16299
- * a genuinely-bad `UpdateTable` loudly.
16300
- */
16301
- function collectDesiredKeyAttributeNames(properties) {
16333
+ * Malformed / intrinsic-valued entries contribute nothing. For the `update()`
16334
+ * guard that errs on the PERMISSIVE side — correct there, because that guard's
16335
+ * failure mode is a forced replacement of a live table, and AWS still rejects a
16336
+ * genuinely-bad `UpdateTable` loudly. For the create-path prune below it errs
16337
+ * the other way (an unreadable LSI key schema prunes MORE), which is only
16338
+ * reachable on a bag AWS would reject anyway.
16339
+ *
16340
+ * `options.indexListKeys` narrows which index lists contribute, for the ONE
16341
+ * caller whose question is not "what does the template reference" but "what
16342
+ * will this call actually key on" — `create()`'s replay-CREATE GSI omit arm
16343
+ * (issue #1741), which sends NO indexes and therefore must not count the
16344
+ * omitted block's key attributes as still-referenced. It defaults to BOTH
16345
+ * lists, so the `update()` guard above reads exactly as it did before.
16346
+ */
16347
+ function collectDesiredKeyAttributeNames(properties, options) {
16302
16348
  const names = /* @__PURE__ */ new Set();
16303
16349
  const addKeySchema = (value) => {
16304
16350
  if (!Array.isArray(value)) return;
@@ -16308,7 +16354,8 @@ function collectDesiredKeyAttributeNames(properties) {
16308
16354
  }
16309
16355
  };
16310
16356
  addKeySchema(properties["KeySchema"]);
16311
- for (const indexListKey of ["GlobalSecondaryIndexes", "LocalSecondaryIndexes"]) {
16357
+ const indexListKeys = options?.indexListKeys ?? ["GlobalSecondaryIndexes", "LocalSecondaryIndexes"];
16358
+ for (const indexListKey of indexListKeys) {
16312
16359
  const indexes = properties[indexListKey];
16313
16360
  if (!Array.isArray(indexes)) continue;
16314
16361
  for (const index of indexes) addKeySchema(asRecord$1(index)?.["KeySchema"]);
@@ -74299,7 +74346,7 @@ function createMigrateCommand() {
74299
74346
  */
74300
74347
  function buildProgram() {
74301
74348
  const program = new Command();
74302
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.19");
74349
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.20");
74303
74350
  program.hook("preAction", (_thisCommand, actionCommand) => {
74304
74351
  const { profile } = actionCommand.optsWithGlobals();
74305
74352
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;