@go-to-k/cdkd 0.100.3 → 0.101.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 +11 -4
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-H3Nughua.js → deploy-engine-BzsWm3DG.js} +19 -4
- package/dist/deploy-engine-BzsWm3DG.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/deploy-engine-H3Nughua.js.map +0 -1
|
@@ -3314,6 +3314,20 @@ const STATE_SCHEMA_VERSIONS_READABLE = [
|
|
|
3314
3314
|
4,
|
|
3315
3315
|
5
|
|
3316
3316
|
];
|
|
3317
|
+
/**
|
|
3318
|
+
* Returns true when a recorded `DeletionPolicy` should prevent cdkd from
|
|
3319
|
+
* deleting the underlying AWS resource. `Retain` and `RetainExceptOnCreate`
|
|
3320
|
+
* both keep the resource around; `Delete` / `Snapshot` / undefined all
|
|
3321
|
+
* fall through to the normal delete path. Shared between
|
|
3322
|
+
* `runDestroyForStack` (state-only, no template) and `DeployEngine`'s
|
|
3323
|
+
* DELETE branch (state-preferred, template-fallback) so the two paths
|
|
3324
|
+
* cannot drift on the policy semantics. Lives here (not in
|
|
3325
|
+
* deploy-engine or destroy-runner) because both consumers already
|
|
3326
|
+
* depend on this module — placing it in either would create a cycle.
|
|
3327
|
+
*/
|
|
3328
|
+
function shouldRetainResource(deletionPolicy) {
|
|
3329
|
+
return deletionPolicy === "Retain" || deletionPolicy === "RetainExceptOnCreate";
|
|
3330
|
+
}
|
|
3317
3331
|
|
|
3318
3332
|
//#endregion
|
|
3319
3333
|
//#region src/state/s3-state-backend.ts
|
|
@@ -9292,8 +9306,9 @@ var DeployEngine = class {
|
|
|
9292
9306
|
case "DELETE": {
|
|
9293
9307
|
const currentResource = stateResources[logicalId];
|
|
9294
9308
|
if (!currentResource) throw new Error(`Cannot delete ${logicalId}: resource not found in state`);
|
|
9295
|
-
|
|
9296
|
-
|
|
9309
|
+
const deletionPolicy = currentResource.deletionPolicy ?? template?.Resources?.[logicalId]?.DeletionPolicy;
|
|
9310
|
+
if (shouldRetainResource(deletionPolicy)) {
|
|
9311
|
+
this.logger.info(`Retaining ${logicalId} (${resourceType}) - DeletionPolicy: ${deletionPolicy}`);
|
|
9297
9312
|
delete stateResources[logicalId];
|
|
9298
9313
|
break;
|
|
9299
9314
|
}
|
|
@@ -9507,5 +9522,5 @@ var DeployEngine = class {
|
|
|
9507
9522
|
};
|
|
9508
9523
|
|
|
9509
9524
|
//#endregion
|
|
9510
|
-
export {
|
|
9511
|
-
//# sourceMappingURL=deploy-engine-
|
|
9525
|
+
export { SynthesisError as $, resolveApp as A, CdkdError as B, AssetPublisher as C, Synthesizer as D, buildDockerImage as E, warnDeprecatedNoPrefixCliFlag as F, PartialFailureError as G, DependencyError as H, AssemblyReader as I, ResourceUpdateNotSupportedError as J, ProvisioningError as K, clearBucketRegionCache as L, resolveSkipPrefix as M, resolveStateBucketWithDefault as N, getDefaultStateBucketName as O, resolveStateBucketWithDefaultAndSource as P, StateError as Q, resolveBucketRegion as R, shouldRetainResource as S, WorkGraph as T, LocalInvokeBuildError as U, ConfigError as V, LockError as W, StackHasActiveImportsError as X, RouteDiscoveryError as Y, StackTerminationProtectionError as Z, DiffCalculator as _, withRetry as a, getLogger as at, LockManager as b, collectInlinePolicyNamesManagedBySiblings as c, getLiveRenderer as ct, normalizeAwsTagsToCfn as d, generateResourceName as dt, formatError as et, resolveExplicitPhysicalId as f, generateResourceNameWithFallback as ft, IntrinsicFunctionResolver as g, assertRegionMatch as h, withResourceDeadline as i, ConsoleLogger as it, resolveCaptureObservedState as j, getLegacyStateBucketName as k, CDK_PATH_TAG as l, PATTERN_B_NAME_PROPERTIES as lt, CloudControlProvider as m, withStackName as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, normalizeAwsError as nt, IMPLICIT_DELETE_DEPENDENCIES as o, setLogger as ot, ProviderRegistry as p, withSkipPrefix as pt, ResourceTimeoutError as q, DeployEngine as r, withErrorHandling as rt, IAMRoleProvider as s, runStackBuffered as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, isCdkdError as tt, matchesCdkPath as u, PATTERN_B_RESOURCE_TYPES as ut, DagBuilder as v, stringifyValue as w, S3StateBackend as x, TemplateParser as y, AssetError as z };
|
|
9526
|
+
//# sourceMappingURL=deploy-engine-BzsWm3DG.js.map
|