@go-to-k/cdkd 0.283.4 → 0.283.6

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.
@@ -13937,7 +13937,7 @@ var CloudControlProvider = class {
13937
13937
  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);
13938
13938
  if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
13939
13939
  this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
13940
- const { ASGProvider } = await import("./asg-provider-CZQewQcH.js").then((n) => n.n);
13940
+ const { ASGProvider } = await import("./asg-provider-BA2wc324.js").then((n) => n.n);
13941
13941
  return await new ASGProvider().delete(logicalId, physicalId, resourceType, _properties, context);
13942
13942
  }
13943
13943
  const isProtectedEc2Instance = context?.removeProtection === true && resourceType === "AWS::EC2::Instance";
@@ -14597,6 +14597,32 @@ var CloudControlProvider = class {
14597
14597
  //#endregion
14598
14598
  //#region src/provisioning/providers/custom-resource-provider.ts
14599
14599
  /**
14600
+ * The short `ResourceDeleteResult.reason` the no-properties DELETE arm reports
14601
+ * (issue [#1770](https://github.com/go-to-k/cdkd/issues/1770)).
14602
+ *
14603
+ * Rendered inline on the destroy status line, so it is the SHORT form; the full
14604
+ * remediation sentence goes out as the `logger.warn` beside it.
14605
+ */
14606
+ const CR_NO_PROPERTIES_SKIP_REASON = "no properties in state — Delete handler not invoked";
14607
+ /**
14608
+ * Sibling of {@link CR_NO_PROPERTIES_SKIP_REASON} for the arm where properties
14609
+ * exist but carry no `ServiceToken`. Distinct because the repair differs: one
14610
+ * record lost everything, the other lost the one field that names the handler.
14611
+ */
14612
+ const CR_NO_SERVICE_TOKEN_SKIP_REASON = "no ServiceToken in state — Delete handler not invoked";
14613
+ /**
14614
+ * The deploy-side caveat both skip warnings in this file carry (issue
14615
+ * [#1762](https://github.com/go-to-k/cdkd/issues/1762)).
14616
+ *
14617
+ * "Repair state.json and re-run" is only true on DESTROY, where the skip KEEPS
14618
+ * the record. The same arms are ALSO reached from `deploy-engine.ts` and
14619
+ * `rollback-executor.ts`, which discard the delete result and DROP the record —
14620
+ * there the id is gone, so re-running cannot help and the resource has to be
14621
+ * torn down by hand. Mirrors the caveat `compositeIdFormatMessage` already
14622
+ * carries for the composite-id family.
14623
+ */
14624
+ const DEPLOY_SKIP_CAVEAT = "NOTE this arm is ALSO reached from cdkd deploy (the DELETE of a resource removed from the template, plus the replacement / rollback deletes), which DROP the state record and report success (https://github.com/go-to-k/cdkd/issues/1762) — there, tear the resource down by hand.";
14625
+ /**
14600
14626
  * Type guard to validate Lambda response payload structure
14601
14627
  */
14602
14628
  function isCustomResourceResponsePayload(value) {
@@ -15022,13 +15048,19 @@ var CustomResourceProvider = class CustomResourceProvider {
15022
15048
  async delete(logicalId, physicalId, resourceType, properties, _context) {
15023
15049
  this.logger.debug(`Deleting custom resource ${logicalId}: ${physicalId} (${resourceType})`);
15024
15050
  if (!properties) {
15025
- this.logger.warn(`No properties available for custom resource ${logicalId}, skipping deletion`);
15026
- return;
15051
+ this.logger.warn(`No properties available for custom resource ${logicalId}, skipping deletion — the handler is never invoked, so anything this custom resource manages is LEFT IN PLACE. Restore the record's properties in state.json and re-run, or tear the resource down by hand. ${DEPLOY_SKIP_CAVEAT}`);
15052
+ return {
15053
+ outcome: "skipped",
15054
+ reason: CR_NO_PROPERTIES_SKIP_REASON
15055
+ };
15027
15056
  }
15028
15057
  const serviceToken = properties["ServiceToken"];
15029
15058
  if (!serviceToken) {
15030
- this.logger.warn(`No ServiceToken found for custom resource ${logicalId}, skipping deletion`);
15031
- return;
15059
+ this.logger.warn(`No ServiceToken found for custom resource ${logicalId}, skipping deletion — there is no handler to send the Delete request to, so anything this custom resource manages is LEFT IN PLACE. Restore ServiceToken in state.json and re-run, or tear the resource down by hand. ${DEPLOY_SKIP_CAVEAT}`);
15060
+ return {
15061
+ outcome: "skipped",
15062
+ reason: CR_NO_SERVICE_TOKEN_SKIP_REASON
15063
+ };
15032
15064
  }
15033
15065
  if (typeof serviceToken !== "string") throw new ProvisioningError(`Custom Resource ${logicalId}: ServiceToken is not a resolved string ARN (got ${typeof serviceToken}). This usually indicates state was written by a pre-fix cdkd import; re-run \`cdkd import\` or \`cdkd state orphan <stack>\` to recover.`, resourceType, logicalId, physicalId);
15034
15066
  if (!this.isSnsServiceToken(serviceToken) && await this.isBackingLambdaGone(serviceToken)) {
@@ -20869,7 +20901,7 @@ const FLUSH_INTERVAL_MS = 2e3;
20869
20901
  const FLUSH_EVENT_THRESHOLD = 50;
20870
20902
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
20871
20903
  function getCdkdVersion() {
20872
- return "0.283.4";
20904
+ return "0.283.6";
20873
20905
  }
20874
20906
  /**
20875
20907
  * Generate a time-sortable unique run id, e.g.
@@ -23038,4 +23070,4 @@ var DeployEngine = class {
23038
23070
 
23039
23071
  //#endregion
23040
23072
  export { configStringRefusal as $, resolveSkipPrefix as $t, green as A, LockError as An, rewriteTemplateAssetReferences as At, slowCcOperationTimeoutMs as B, SynthesisError as Bn, formatDockerLoginError as Bt, MULTI_REGION_RECREATE_BLOCKED_TYPES as C, CdkdError as Cn, shouldRetainResource as Ct, bold as D, LocalInvokeBuildError as Dn, buildAssetRedirectMap as Dt, formatResourceLine as E, DeployCancelledError as En, WorkGraph as Et, clearOnUpdateRemoval as F, ResourceTimeoutError as Fn, parseBootstrapMarker as Ft, getAccountInfo as G, __exportAll as Gn, getDockerImageBySourceHash as Gt, isTerminationProtectionPropagationError as H, isCdkdError as Hn, runDockerForeground as Ht, ProviderRegistry as I, ResourceUpdateNotSupportedError as In, validateAssetBucketName as It, normalizeAwsTagsToCfn as J, getDefaultStateBucketName as Jt, refStateLookupFromResource as K, Synthesizer as Kt, findActionableSilentDrops as L, StackHasActiveImportsError as Ln, validateContainerRepoName as Lt, yellow as M, NestedStackChildDirectDestroyError as Mn, BOOTSTRAP_MARKER_PREFIX as Mt, IAMRoleProvider as N, PartialFailureError as Nn, ensureAssetStorage as Nt, cyan as O, LocalMigrateError as On, createAssetRedirectResolver as Ot, collectInlinePolicyNamesManagedBySiblings as P, ProvisioningError as Pn, getBootstrapMarkerKey as Pt, configBooleanRefusal as Q, resolveCaptureObservedState as Qt, findSilentDropProperties as R, StackTerminationProtectionError as Rn, buildDenyExternalAccessPolicy as Rt, extractDeploymentEventError as S, AssetError as Sn, rebuildClientForBucketRegion as St, renderStatefulReason as T, DependencyError as Tn, stringifyValue as Tt, IntrinsicFunctionResolver as U, normalizeAwsError as Un, runDockerStreaming as Ut, disableInstanceApiTermination as V, formatError as Vn, getDockerCmd as Vt, cfnRefValueFromPhysicalId as W, withErrorHandling as Wn, AssetManifestLoader as Wt, assertRegionMatch as X, resolveApp as Xt, resolveExplicitPhysicalId as Y, getLegacyStateBucketName as Yt, coerceCfnBoolean as Z, resolveAutoAssetStorage as Zt, createPreDeleteFinalSnapshot as _, resolveBucketRegion as _n, markNonRetryable as _t, DeploymentEventsStore as a, CFN_TEMPLATE_BODY_LIMIT as an, s3BucketArn as at, unsupportedFinalSnapshotError as b, resetAwsClients as bn, LockManager as bt, replayFailedOperations as c, findLargeInlineResources as cn, s3BucketRegionalDomainName as ct, IMPLICIT_DELETE_DEPENDENCIES as d, PARTITION_TABLE as dn, DiffCalculator as dt, resolveStateBucketWithDefault as en, readConfigString as et, computeImplicitDeleteEdges as f, canonicalizeRegion as fn, describeTypeWithThrottleRetry as ft, ccRoutedFinalSnapshotError as g, clearBucketRegionCache as gn, isThrottlingError as gt, buildFinalSnapshotIdentifier as h, processStackMessages as hn, isRetryableTransientError as ht, DeploymentEventsReader as i, warnDeprecatedNoPrefixCliFlag as in, requireConfigString as it, red as j, MissingCdkCliError as jn, AssetModeResolver as jt, gray as k, LocalStartServiceError as kn, loadPublishableAssetManifest as kt, replayRollback as l, uploadCfnTemplate as ln, s3BucketWebsiteUrl as lt, PRE_DELETE_SNAPSHOT_TYPES as m, AssemblyReader as mn, isMarkedNonRetryable as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, resolveUseCdkBootstrapAssets as nn, requireConfigArray as nt, planFailedOps as o, CFN_TEMPLATE_URL_LIMIT as on, s3BucketDomainName as ot, ATOMIC_FINAL_SNAPSHOT_TYPES as p, derivePartitionAndUrlSuffix as pn, withRetry as pt, WAFv2WebACLProvider as q, synthesisStatusMessage as qt, DeployEngine as r, stateBucketExistenceConfirmed as rn, requireConfigObject as rt, planRollback as s, MIGRATE_TMP_PREFIX as sn, s3BucketDualStackDomainName as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, resolveStateBucketWithDefaultAndSource as tn, replayWarn as tt, withResourceDeadline as u, expectedOwnerParam as un, applyRoleArnIfSet as ut, isFinalSnapshotError as v, AwsClients as vn, DagBuilder as vt, isStatefulRecreateTargetSync as w, ConfigError as wn, AssetPublisher as wt, makeCanonicalizePropertiesFn as x, setAwsClients as xn, S3StateBackend as xt, refusesFinalSnapshot as y, getAwsClients as yn, TemplateParser as yt, CloudControlProvider as z, StateError as zn, buildDockerImage as zt };
23041
- //# sourceMappingURL=deploy-engine-C605sBVJ.js.map
23073
+ //# sourceMappingURL=deploy-engine-DaEsg4mn.js.map