@go-to-k/cdkd 0.280.26 → 0.280.27

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.
@@ -7985,9 +7985,43 @@ function isIamPropagationError(message) {
7985
7985
  * and the rollback executor's reverse-replacement) — everywhere else it is a
7986
7986
  * genuine conflict that must fail fast. Shared by those sites' collision
7987
7987
  * detection + retry filters so a signature extension lands in one place.
7988
+ *
7989
+ * The optional `s` is load-bearing, not defensive spelling (issue #1625):
7990
+ * Lambda's `CreateFunction` raises `ResourceConflictException: Function
7991
+ * already exist: <name>` — SINGULAR — so the `already exists` form missed it
7992
+ * entirely and NO Lambda function could take the collision path. The
7993
+ * consequence was not a cosmetic message: a property-driven replacement of a
7994
+ * Lambda (dropping `DurableConfig`, changing `TenancyConfig`) create-firsts
7995
+ * into its own still-live name, the raw `ResourceConflictException` escaped
7996
+ * instead of the actionable `NAMED_REPLACEMENT_COLLISION` error, and
7997
+ * `cdkd deploy --replace`'s delete-first fallback never fired — so the
7998
+ * replacement was unperformable by any flag. Verified against real AWS
7999
+ * (us-east-1, 2026-08-12) by creating one function name twice.
8000
+ *
8001
+ * Two fences keep the widened arm from crediting a NON-collision, which
8002
+ * matters because the sites that consult it react DESTRUCTIVELY (the
8003
+ * `--replace` delete-first fallback deletes the old resource):
8004
+ * - `\b` after `exists?` rejects a participle ("already existed as a draft");
8005
+ * - the lookbehind rejects a NEGATED or MODAL phrase — "the bucket does NOT
8006
+ * already exist", "the destination bucket MUST already exist" — which the
8007
+ * bare pattern matched. The modal form is the one that bites: a create
8008
+ * rejected for a missing PREREQUISITE would be reported to the user as a
8009
+ * name collision pointing at `--replace`, and following that advice
8010
+ * deletes the live old resource before the re-create fails again for the
8011
+ * same reason, leaving it absent from AWS with state still recording it.
8012
+ * The error-CODE arm stays exact (`AlreadyExists`): the singular
8013
+ * `AlreadyExist` is not an AWS code spelling, and loosening it would match
8014
+ * inside unrelated identifiers.
8015
+ *
8016
+ * Classification stays MESSAGE-based rather than moving to the exception
8017
+ * NAME, and that is load-bearing here rather than inherited: Lambda raises
8018
+ * `ResourceConflictException` for a function in a PENDING state too (see
8019
+ * `lambda-function-provider.ts`), so keying on the name would classify a
8020
+ * transient state conflict as a collision and delete a live function under
8021
+ * `--replace`.
7988
8022
  */
7989
8023
  function isNameCollisionError(message) {
7990
- return /already exists/i.test(message) || message.includes("AlreadyExists");
8024
+ return /(?<!\b(?:must|not|should|may|cannot)\s)already exists?\b/i.test(message) || message.includes("AlreadyExists");
7991
8025
  }
7992
8026
  /**
7993
8027
  * Match the SQS same-name re-creation cooldown: after `DeleteQueue`, creating
@@ -12836,7 +12870,7 @@ var CloudControlProvider = class {
12836
12870
  if (context?.finalSnapshotIdentifier !== void 0) throw new ProvisioningError(`${logicalId} (${resourceType}) requires a final snapshot (DeletionPolicy: Snapshot), but the Cloud Control API delete route has no final-snapshot parameter. Re-run with --skip-final-snapshot after snapshotting manually, or retain the resource.`, resourceType, logicalId, physicalId);
12837
12871
  if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
12838
12872
  this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
12839
- const { ASGProvider } = await import("./asg-provider-BJsjMRaA.js").then((n) => n.n);
12873
+ const { ASGProvider } = await import("./asg-provider-BFeeVgCN.js").then((n) => n.n);
12840
12874
  await new ASGProvider().delete(logicalId, physicalId, resourceType, _properties, context);
12841
12875
  return;
12842
12876
  }
@@ -19352,7 +19386,7 @@ const FLUSH_INTERVAL_MS = 2e3;
19352
19386
  const FLUSH_EVENT_THRESHOLD = 50;
19353
19387
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
19354
19388
  function getCdkdVersion() {
19355
- return "0.280.26";
19389
+ return "0.280.27";
19356
19390
  }
19357
19391
  /**
19358
19392
  * Generate a time-sortable unique run id, e.g.
@@ -21485,4 +21519,4 @@ var DeployEngine = class {
21485
21519
 
21486
21520
  //#endregion
21487
21521
  export { requireConfigObject as $, AssemblyReader as $t, green as A, __exportAll as An, runDockerForeground as At, disableInstanceApiTermination as B, resolveCaptureObservedState as Bt, MULTI_REGION_RECREATE_BLOCKED_TYPES as C, StackTerminationProtectionError as Cn, getBootstrapMarkerKey as Ct, bold as D, isCdkdError as Dn, buildDockerImage as Dt, formatResourceLine as E, formatError as En, validateContainerRepoName as Et, clearOnUpdateRemoval as F, synthesisStatusMessage as Ft, WAFv2WebACLProvider as G, stateBucketExistenceConfirmed as Gt, IntrinsicFunctionResolver as H, resolveStateBucketWithDefault as Ht, ProviderRegistry as I, getDefaultStateBucketName as It, assertRegionMatch as J, CFN_TEMPLATE_URL_LIMIT as Jt, normalizeAwsTagsToCfn as K, warnDeprecatedNoPrefixCliFlag as Kt, findActionableSilentDrops as L, getLegacyStateBucketName as Lt, yellow as M, AssetManifestLoader as Mt, IAMRoleProvider as N, getDockerImageBySourceHash as Nt, cyan as O, normalizeAwsError as On, formatDockerLoginError as Ot, collectInlinePolicyNamesManagedBySiblings as P, Synthesizer as Pt, requireConfigArray as Q, expectedOwnerParam as Qt, CloudControlProvider as R, resolveApp as Rt, extractDeploymentEventError as S, StackHasActiveImportsError as Sn, ensureAssetStorage as St, renderStatefulReason as T, SynthesisError as Tn, validateAssetBucketName as Tt, cfnRefValueFromPhysicalId as U, resolveStateBucketWithDefaultAndSource as Ut, isTerminationProtectionPropagationError as V, resolveSkipPrefix as Vt, refStateLookupFromResource as W, resolveUseCdkBootstrapAssets as Wt, readConfigString as X, findLargeInlineResources as Xt, configStringRefusal as Y, MIGRATE_TMP_PREFIX as Yt, replayWarn as Z, uploadCfnTemplate as Zt, createPreDeleteFinalSnapshot as _, NestedStackChildDirectDestroyError as _n, createAssetRedirectResolver as _t, DeploymentEventsStore as a, resetAwsClients as an, isRetryableTransientError as at, unsupportedFinalSnapshotError as b, ResourceTimeoutError as bn, AssetModeResolver as bt, replayFailedOperations as c, CdkdError as cn, TemplateParser as ct, IMPLICIT_DELETE_DEPENDENCIES as d, DeployCancelledError as dn, rebuildClientForBucketRegion as dt, processStackMessages as en, requireConfigString as et, computeImplicitDeleteEdges as f, LocalInvokeBuildError as fn, shouldRetainResource as ft, ccRoutedFinalSnapshotError as g, MissingCdkCliError as gn, buildAssetRedirectMap as gt, buildFinalSnapshotIdentifier as h, LockError as hn, WorkGraph as ht, DeploymentEventsReader as i, getAwsClients as in, withRetry as it, red as j, runDockerStreaming as jt, gray as k, withErrorHandling as kn, getDockerCmd as kt, replayRollback as l, ConfigError as ln, LockManager as lt, PRE_DELETE_SNAPSHOT_TYPES as m, LocalStartServiceError as mn, stringifyValue as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, resolveBucketRegion as nn, DiffCalculator as nt, planFailedOps as o, setAwsClients as on, isThrottlingError as ot, ATOMIC_FINAL_SNAPSHOT_TYPES as p, LocalMigrateError as pn, AssetPublisher as pt, resolveExplicitPhysicalId as q, CFN_TEMPLATE_BODY_LIMIT as qt, DeployEngine as r, AwsClients as rn, describeTypeWithThrottleRetry as rt, planRollback as s, AssetError as sn, DagBuilder as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, clearBucketRegionCache as tn, applyRoleArnIfSet as tt, withResourceDeadline as u, DependencyError as un, S3StateBackend as ut, isFinalSnapshotError as v, PartialFailureError as vn, loadPublishableAssetManifest as vt, isStatefulRecreateTargetSync as w, StateError as wn, parseBootstrapMarker as wt, makeCanonicalizePropertiesFn as x, ResourceUpdateNotSupportedError as xn, BOOTSTRAP_MARKER_PREFIX as xt, refusesFinalSnapshot as y, ProvisioningError as yn, rewriteTemplateAssetReferences as yt, slowCcOperationTimeoutMs as z, resolveAutoAssetStorage as zt };
21488
- //# sourceMappingURL=deploy-engine-Sb8KbTlA.js.map
21522
+ //# sourceMappingURL=deploy-engine-Cz2xWrzZ.js.map