@go-to-k/cdkd 0.165.0 → 0.166.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.
- package/dist/cli.js +167 -25
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-DEbogepd.js → deploy-engine-BQkk03hJ.js} +14 -7
- package/dist/{deploy-engine-DEbogepd.js.map → deploy-engine-BQkk03hJ.js.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -12217,15 +12217,21 @@ var DeployEngine = class {
|
|
|
12217
12217
|
}
|
|
12218
12218
|
const propertyDrivenReplacement = change.propertyChanges?.some((pc) => pc.requiresReplacement);
|
|
12219
12219
|
const recreateViaCcApi = this.options.recreateViaCcApiTargets?.has(logicalId) ?? false;
|
|
12220
|
-
const
|
|
12220
|
+
const recreateViaSdkProvider = this.options.recreateViaSdkProviderTargets?.has(logicalId) ?? false;
|
|
12221
|
+
const recreateFlagged = recreateViaCcApi || recreateViaSdkProvider;
|
|
12222
|
+
const needsReplacement = propertyDrivenReplacement || recreateFlagged;
|
|
12221
12223
|
const dependencies = this.extractAllDependencies(template, logicalId);
|
|
12222
12224
|
if (needsReplacement) {
|
|
12223
|
-
|
|
12225
|
+
let replacementReason;
|
|
12226
|
+
if (recreateViaCcApi) replacementReason = "--recreate-via-cc-api flag (mid-life SDK→CC migration)";
|
|
12227
|
+
else if (recreateViaSdkProvider) replacementReason = "--recreate-via-sdk-provider flag (mid-life CC→SDK migration)";
|
|
12228
|
+
else replacementReason = `immutable properties changed: ${change.propertyChanges?.filter((pc) => pc.requiresReplacement).map((pc) => pc.path).join(", ")}`;
|
|
12224
12229
|
this.logger.info(`Replacing ${logicalId} (${resourceType}) - ${replacementReason}`);
|
|
12230
|
+
const recreateDirectionHint = recreateViaCcApi ? "cc-api" : recreateViaSdkProvider ? "sdk" : void 0;
|
|
12225
12231
|
const replaceDecision = this.providerRegistry.getProviderFor({
|
|
12226
12232
|
resourceType,
|
|
12227
12233
|
properties: resolvedProps,
|
|
12228
|
-
...
|
|
12234
|
+
...recreateDirectionHint && { provisionedBy: recreateDirectionHint }
|
|
12229
12235
|
});
|
|
12230
12236
|
const replaceProvider = replaceDecision.provider;
|
|
12231
12237
|
const replaceProps = replaceDecision.provisionedBy === "cc-api" ? this.preparePropertiesForCcApi(resourceType, resolvedProps, logicalId) : resolvedProps;
|
|
@@ -12235,15 +12241,16 @@ var DeployEngine = class {
|
|
|
12235
12241
|
provisionedBy: currentResource.provisionedBy
|
|
12236
12242
|
}).provider;
|
|
12237
12243
|
let createResult;
|
|
12238
|
-
if (
|
|
12239
|
-
|
|
12244
|
+
if (recreateFlagged) {
|
|
12245
|
+
const recreateFlagName = recreateViaCcApi ? "--recreate-via-cc-api" : "--recreate-via-sdk-provider";
|
|
12246
|
+
if (updateReplacePolicy === "Retain") this.logger.warn(` ⚠ ${logicalId} has UpdateReplacePolicy: Retain — ${recreateFlagName} will leak the old physical resource (${currentResource.physicalId}). The new resource shares the same name where applicable; if the type has user-supplied names (e.g. functionName, bucketName), the create will deterministically collide with the retained orphan.`);
|
|
12240
12247
|
else {
|
|
12241
12248
|
this.logger.info(` Destroying old ${logicalId} (${currentResource.physicalId}) before recreate...`);
|
|
12242
12249
|
try {
|
|
12243
12250
|
await oldDeleteProvider.delete(logicalId, currentResource.physicalId, resourceType, currentResource.properties, { expectedRegion: this.stackRegion });
|
|
12244
12251
|
this.logger.info(` ${green("✓")} Old resource deleted`);
|
|
12245
12252
|
} catch (deleteError) {
|
|
12246
|
-
throw new Error(`Failed to destroy old resource ${logicalId} (${currentResource.physicalId}) during
|
|
12253
|
+
throw new Error(`Failed to destroy old resource ${logicalId} (${currentResource.physicalId}) during ${recreateFlagName}: ${deleteError instanceof Error ? deleteError.message : String(deleteError)}`);
|
|
12247
12254
|
}
|
|
12248
12255
|
}
|
|
12249
12256
|
this.logger.info(` Creating new ${logicalId}...`);
|
|
@@ -12556,4 +12563,4 @@ var DeployEngine = class {
|
|
|
12556
12563
|
|
|
12557
12564
|
//#endregion
|
|
12558
12565
|
export { AssetError as $, S3StateBackend as A, resolveCaptureObservedState as B, assertRegionMatch as C, DagBuilder as D, DiffCalculator as E, buildDockerImage as F, CFN_TEMPLATE_BODY_LIMIT as G, resolveStateBucketWithDefault as H, Synthesizer as I, findLargeInlineResources as J, CFN_TEMPLATE_URL_LIMIT as K, getDefaultStateBucketName as L, AssetPublisher as M, stringifyValue as N, TemplateParser as O, WorkGraph as P, resolveBucketRegion as Q, getLegacyStateBucketName as R, CloudControlProvider as S, applyRoleArnIfSet as T, resolveStateBucketWithDefaultAndSource as U, resolveSkipPrefix as V, warnDeprecatedNoPrefixCliFlag as W, AssemblyReader as X, uploadCfnTemplate as Y, clearBucketRegionCache as Z, matchesCdkPath as _, SynthesisError as _t, withRetry as a, LocalStartServiceError as at, ProviderRegistry as b, normalizeAwsError as bt, bold as c, NestedStackChildDirectDestroyError as ct, green as d, ResourceTimeoutError as dt, CdkdError as et, red as f, ResourceUpdateNotSupportedError as ft, CDK_PATH_TAG as g, StateError as gt, collectInlinePolicyNamesManagedBySiblings as h, StackTerminationProtectionError as ht, withResourceDeadline as i, LocalMigrateError as it, shouldRetainResource as j, LockManager as k, cyan as l, PartialFailureError as lt, IAMRoleProvider as m, StackHasActiveImportsError as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, DependencyError as nt, IMPLICIT_DELETE_DEPENDENCIES as o, LockError as ot, yellow as p, RouteDiscoveryError as pt, MIGRATE_TMP_PREFIX as q, DeployEngine as r, LocalInvokeBuildError as rt, formatResourceLine as s, MissingCdkCliError as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, ConfigError as tt, gray as u, ProvisioningError as ut, normalizeAwsTagsToCfn as v, formatError as vt, IntrinsicFunctionResolver as w, findActionableSilentDrops as x, withErrorHandling as xt, resolveExplicitPhysicalId as y, isCdkdError as yt, resolveApp as z };
|
|
12559
|
-
//# sourceMappingURL=deploy-engine-
|
|
12566
|
+
//# sourceMappingURL=deploy-engine-BQkk03hJ.js.map
|