@go-to-k/cdkd 0.227.0 → 0.227.1

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.
@@ -4771,6 +4771,35 @@ var DagBuilder = class {
4771
4771
  * https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html
4772
4772
  */
4773
4773
  /**
4774
+ * Conditional-replacement predicate for `AWS::DynamoDB::Table.AttributeDefinitions`.
4775
+ *
4776
+ * Returns true only when an attribute present in BOTH the old and new definition
4777
+ * lists changed its `AttributeType` (e.g. `S` -> `N`). Adding a brand-new attribute
4778
+ * (to back a new GSI) or removing one (when a GSI is dropped) returns false — those
4779
+ * are in-place `UpdateTable` operations, matching CloudFormation's "No interruption"
4780
+ * update behavior for this property.
4781
+ */
4782
+ function attributeTypeChangedForSharedAttribute(oldValue, newValue) {
4783
+ const toTypeMap = (value) => {
4784
+ const map = /* @__PURE__ */ new Map();
4785
+ if (Array.isArray(value)) {
4786
+ for (const def of value) if (def && typeof def === "object") {
4787
+ const name = def["AttributeName"];
4788
+ const type = def["AttributeType"];
4789
+ if (typeof name === "string" && typeof type === "string") map.set(name, type);
4790
+ }
4791
+ }
4792
+ return map;
4793
+ };
4794
+ const oldTypes = toTypeMap(oldValue);
4795
+ const newTypes = toTypeMap(newValue);
4796
+ for (const [name, oldType] of oldTypes) {
4797
+ const newType = newTypes.get(name);
4798
+ if (newType !== void 0 && newType !== oldType) return true;
4799
+ }
4800
+ return false;
4801
+ }
4802
+ /**
4774
4803
  * Replacement rules registry
4775
4804
  *
4776
4805
  * Maps resource types to their replacement rules
@@ -4843,11 +4872,7 @@ var ReplacementRulesRegistry = class {
4843
4872
  ])
4844
4873
  });
4845
4874
  this.rules.set("AWS::DynamoDB::Table", {
4846
- replacementProperties: new Set([
4847
- "TableName",
4848
- "KeySchema",
4849
- "AttributeDefinitions"
4850
- ]),
4875
+ replacementProperties: new Set(["TableName", "KeySchema"]),
4851
4876
  updateableProperties: new Set([
4852
4877
  "BillingMode",
4853
4878
  "ProvisionedThroughput",
@@ -4858,7 +4883,8 @@ var ReplacementRulesRegistry = class {
4858
4883
  "Tags",
4859
4884
  "TimeToLiveSpecification",
4860
4885
  "PointInTimeRecoverySpecification"
4861
- ])
4886
+ ]),
4887
+ conditionalReplacements: new Map([["AttributeDefinitions", attributeTypeChangedForSharedAttribute]])
4862
4888
  });
4863
4889
  this.rules.set("AWS::SQS::Queue", {
4864
4890
  replacementProperties: new Set([
@@ -13385,4 +13411,4 @@ var DeployEngine = class {
13385
13411
 
13386
13412
  //#endregion
13387
13413
  export { findLargeInlineResources as $, shouldRetainResource as A, getDockerImageBySourceHash as B, applyRoleArnIfSet as C, LockManager as D, TemplateParser as E, formatDockerLoginError as F, resolveCaptureObservedState as G, getDefaultStateBucketName as H, getDockerCmd as I, resolveStateBucketWithDefaultAndSource as J, resolveSkipPrefix as K, runDockerForeground as L, stringifyValue as M, WorkGraph as N, S3StateBackend as O, buildDockerImage as P, MIGRATE_TMP_PREFIX as Q, runDockerStreaming as R, IntrinsicFunctionResolver as S, DagBuilder as T, getLegacyStateBucketName as U, Synthesizer as V, resolveApp as W, CFN_TEMPLATE_BODY_LIMIT as X, warnDeprecatedNoPrefixCliFlag as Y, CFN_TEMPLATE_URL_LIMIT as Z, IAMRoleProvider as _, withRetry as a, findActionableSilentDrops as b, computeImplicitDeleteEdges as c, bold as d, uploadCfnTemplate as et, cyan as f, yellow as g, red as h, withResourceDeadline as i, AssetPublisher as j, rebuildClientForBucketRegion as k, extractDeploymentEventError as l, green as m, DEFAULT_RESOURCE_WARN_AFTER_MS as n, clearBucketRegionCache as nt, isRetryableTransientError as o, gray as p, resolveStateBucketWithDefault as q, DeployEngine as r, resolveBucketRegion as rt, IMPLICIT_DELETE_DEPENDENCIES as s, DEFAULT_RESOURCE_TIMEOUT_MS as t, AssemblyReader as tt, formatResourceLine as u, collectInlinePolicyNamesManagedBySiblings as v, DiffCalculator as w, CloudControlProvider as x, ProviderRegistry as y, AssetManifestLoader as z };
13388
- //# sourceMappingURL=deploy-engine-CBzCsd24.js.map
13414
+ //# sourceMappingURL=deploy-engine-Bl_Ka0hj.js.map