@go-to-k/cdkd 0.230.18 → 0.230.20

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.
@@ -2007,6 +2007,18 @@ function isPreSynthesizedAssembly(app) {
2007
2007
  return existsSync(appPath) && statSync(appPath).isDirectory();
2008
2008
  }
2009
2009
  /**
2010
+ * Pick the user-facing status line a command prints right before it invokes
2011
+ * {@link Synthesizer.synthesize}. When `--app` is a pre-synthesized assembly
2012
+ * directory, synthesis is skipped, so "Reading cloud assembly..." is accurate;
2013
+ * otherwise the command's own `synthesizingMessage` (e.g. "Synthesizing CDK
2014
+ * app...") is used. `app` may be undefined (the synthesize() call will then
2015
+ * throw the usual "no app specified" error) — that case keeps the synthesizing
2016
+ * message.
2017
+ */
2018
+ function synthesisStatusMessage(app, synthesizingMessage) {
2019
+ return app !== void 0 && isPreSynthesizedAssembly(app) ? "Reading cloud assembly..." : synthesizingMessage;
2020
+ }
2021
+ /**
2010
2022
  * CDK app synthesizer
2011
2023
  *
2012
2024
  * Replaces @aws-cdk/toolkit-lib with self-implemented:
@@ -12523,6 +12535,7 @@ const RETRYABLE_ERROR_MESSAGE_PATTERNS = [
12523
12535
  "Invalid value for the parameter Policy",
12524
12536
  "required permissions for: ENHANCED_MONITORING",
12525
12537
  "Caught ServiceAccessDeniedException",
12538
+ "permissions required to assume the role",
12526
12539
  "conflicting conditional operation",
12527
12540
  "scheduled for deletion",
12528
12541
  "Cannot access stream",
@@ -12730,32 +12743,9 @@ const DEFAULT_RESOURCE_WARN_AFTER_MS = 300 * 1e3;
12730
12743
  * explicitly because the Custom Resource provider's polling cap is 1h.
12731
12744
  */
12732
12745
  const DEFAULT_RESOURCE_TIMEOUT_MS = 1800 * 1e3;
12733
- /**
12734
- * Deploy engine orchestrates the entire deployment process
12735
- *
12736
- * Responsibilities:
12737
- * 1. Acquire stack lock
12738
- * 2. Load current state
12739
- * 3. Calculate diff
12740
- * 4. Validate resource types
12741
- * 5. Execute deployment in DAG order
12742
- * 6. Save new state
12743
- * 7. Release lock
12744
- *
12745
- * Rollback mechanism:
12746
- * - Tracks completed operations during deployment
12747
- * - On failure, rolls back in reverse order (best-effort)
12748
- * - Supports --no-rollback flag to skip rollback (saves partial state and fails)
12749
- * - CREATE → delete the newly created resource
12750
- * - UPDATE → restore previous properties
12751
- * - DELETE → cannot rollback (log warning)
12752
- */
12753
- /**
12754
- * Error thrown when deployment is interrupted by SIGINT
12755
- */
12756
12746
  var InterruptedError = class extends Error {
12757
- constructor() {
12758
- super("Deployment interrupted by user (Ctrl+C)");
12747
+ constructor(reason = "user") {
12748
+ super(reason === "user" ? "Deployment interrupted by user (Ctrl+C)" : "Deployment aborted after another resource failed");
12759
12749
  this.name = "InterruptedError";
12760
12750
  }
12761
12751
  };
@@ -12824,6 +12814,13 @@ var DeployEngine = class {
12824
12814
  resolver;
12825
12815
  interrupted = false;
12826
12816
  /**
12817
+ * Why `interrupted` was set — first cause wins. `'user'` = SIGINT;
12818
+ * `'sibling-failure'` = a resource failed and the remaining work is being
12819
+ * cancelled. Drives the {@link InterruptedError} message so cancelled
12820
+ * siblings don't misreport a Ctrl+C nobody pressed.
12821
+ */
12822
+ interruptCause = null;
12823
+ /**
12827
12824
  * In-flight `provider.readCurrentState` promises kicked off after a
12828
12825
  * successful CREATE / UPDATE. The deploy critical path does NOT
12829
12826
  * `await` these; instead they're drained at the end of `doDeploy`
@@ -13114,11 +13111,13 @@ var DeployEngine = class {
13114
13111
  const renderer = getLiveRenderer();
13115
13112
  renderer.start();
13116
13113
  this.interrupted = false;
13114
+ this.interruptCause = null;
13117
13115
  const sigintHandler = () => {
13118
13116
  renderer.printAbove(() => {
13119
13117
  process.stderr.write("\nInterrupted — saving partial state after current operations complete...\n");
13120
13118
  });
13121
13119
  this.interrupted = true;
13120
+ this.interruptCause ??= "user";
13122
13121
  };
13123
13122
  process.on("SIGINT", sigintHandler);
13124
13123
  try {
@@ -13338,6 +13337,7 @@ var DeployEngine = class {
13338
13337
  await this.provisionResource(logicalId, change, newResources, stackName, template, parameterValues, conditions, actualCounts, progress);
13339
13338
  } catch (provisionError) {
13340
13339
  this.interrupted = true;
13340
+ this.interruptCause ??= "sibling-failure";
13341
13341
  throw provisionError;
13342
13342
  }
13343
13343
  completedOperations.push({
@@ -13354,7 +13354,7 @@ var DeployEngine = class {
13354
13354
  } finally {
13355
13355
  await saveChain;
13356
13356
  }
13357
- if (this.interrupted && this.hasPending(createUpdateExecutor)) throw new InterruptedError();
13357
+ if (this.interrupted && this.hasPending(createUpdateExecutor)) throw new InterruptedError(this.interruptCause ?? "user");
13358
13358
  }
13359
13359
  if (deleteChanges.size > 0) {
13360
13360
  this.logger.info(`${red("Deleting")} ${red(deleteChanges.size)} resource(s)`);
@@ -13375,6 +13375,7 @@ var DeployEngine = class {
13375
13375
  await this.provisionResource(logicalId, change, newResources, stackName, template, parameterValues, conditions, actualCounts, progress);
13376
13376
  } catch (provisionError) {
13377
13377
  this.interrupted = true;
13378
+ this.interruptCause ??= "sibling-failure";
13378
13379
  throw provisionError;
13379
13380
  }
13380
13381
  completedOperations.push({
@@ -13389,7 +13390,7 @@ var DeployEngine = class {
13389
13390
  } finally {
13390
13391
  await saveChain;
13391
13392
  }
13392
- if (this.interrupted && this.hasPending(deleteExecutor)) throw new InterruptedError();
13393
+ if (this.interrupted && this.hasPending(deleteExecutor)) throw new InterruptedError(this.interruptCause ?? "user");
13393
13394
  }
13394
13395
  } catch (error) {
13395
13396
  try {
@@ -14133,7 +14134,7 @@ var DeployEngine = class {
14133
14134
  ...initialDelayMs !== void 0 && { initialDelayMs },
14134
14135
  logger: this.logger,
14135
14136
  isInterrupted: () => this.interrupted,
14136
- onInterrupted: () => new InterruptedError()
14137
+ onInterrupted: () => new InterruptedError(this.interruptCause ?? "user")
14137
14138
  });
14138
14139
  }
14139
14140
  /**
@@ -14175,5 +14176,5 @@ var DeployEngine = class {
14175
14176
  };
14176
14177
 
14177
14178
  //#endregion
14178
- export { warnDeprecatedNoPrefixCliFlag as $, LockManager as A, runDockerForeground as B, findActionableSilentDrops as C, DiffCalculator as D, applyRoleArnIfSet as E, stringifyValue as F, isPreSynthesizedAssembly as G, AssetManifestLoader as H, WorkGraph as I, resolveApp as J, getDefaultStateBucketName as K, buildDockerImage as L, rebuildClientForBucketRegion as M, shouldRetainResource as N, DagBuilder as O, AssetPublisher as P, resolveStateBucketWithDefaultAndSource as Q, formatDockerLoginError as R, ProviderRegistry as S, IntrinsicFunctionResolver as T, getDockerImageBySourceHash as U, runDockerStreaming as V, Synthesizer as W, resolveSkipPrefix as X, resolveCaptureObservedState as Y, resolveStateBucketWithDefault as Z, green as _, withRetry as a, AssemblyReader as at, IAMRoleProvider as b, computeImplicitDeleteEdges as c, isStatefulRecreateTargetSync as d, CFN_TEMPLATE_BODY_LIMIT as et, renderStatefulReason as f, gray as g, cyan as h, withResourceDeadline as i, uploadCfnTemplate as it, S3StateBackend as j, TemplateParser as k, extractDeploymentEventError as l, bold as m, DEFAULT_RESOURCE_WARN_AFTER_MS as n, MIGRATE_TMP_PREFIX as nt, isRetryableTransientError as o, clearBucketRegionCache as ot, formatResourceLine as p, getLegacyStateBucketName as q, DeployEngine as r, findLargeInlineResources as rt, IMPLICIT_DELETE_DEPENDENCIES as s, resolveBucketRegion as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, CFN_TEMPLATE_URL_LIMIT as tt, MULTI_REGION_RECREATE_BLOCKED_TYPES as u, red as v, CloudControlProvider as w, collectInlinePolicyNamesManagedBySiblings as x, yellow as y, getDockerCmd as z };
14179
- //# sourceMappingURL=deploy-engine-CXgQSFYL.js.map
14179
+ export { warnDeprecatedNoPrefixCliFlag as $, LockManager as A, runDockerForeground as B, findActionableSilentDrops as C, DiffCalculator as D, applyRoleArnIfSet as E, stringifyValue as F, synthesisStatusMessage as G, AssetManifestLoader as H, WorkGraph as I, resolveApp as J, getDefaultStateBucketName as K, buildDockerImage as L, rebuildClientForBucketRegion as M, shouldRetainResource as N, DagBuilder as O, AssetPublisher as P, resolveStateBucketWithDefaultAndSource as Q, formatDockerLoginError as R, ProviderRegistry as S, IntrinsicFunctionResolver as T, getDockerImageBySourceHash as U, runDockerStreaming as V, Synthesizer as W, resolveSkipPrefix as X, resolveCaptureObservedState as Y, resolveStateBucketWithDefault as Z, green as _, withRetry as a, AssemblyReader as at, IAMRoleProvider as b, computeImplicitDeleteEdges as c, isStatefulRecreateTargetSync as d, CFN_TEMPLATE_BODY_LIMIT as et, renderStatefulReason as f, gray as g, cyan as h, withResourceDeadline as i, uploadCfnTemplate as it, S3StateBackend as j, TemplateParser as k, extractDeploymentEventError as l, bold as m, DEFAULT_RESOURCE_WARN_AFTER_MS as n, MIGRATE_TMP_PREFIX as nt, isRetryableTransientError as o, clearBucketRegionCache as ot, formatResourceLine as p, getLegacyStateBucketName as q, DeployEngine as r, findLargeInlineResources as rt, IMPLICIT_DELETE_DEPENDENCIES as s, resolveBucketRegion as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, CFN_TEMPLATE_URL_LIMIT as tt, MULTI_REGION_RECREATE_BLOCKED_TYPES as u, red as v, CloudControlProvider as w, collectInlinePolicyNamesManagedBySiblings as x, yellow as y, getDockerCmd as z };
14180
+ //# sourceMappingURL=deploy-engine-B0o5NN21.js.map