@go-to-k/cdkd 0.160.0 → 0.161.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.
@@ -11380,6 +11380,36 @@ var InterruptedError = class extends Error {
11380
11380
  this.name = "InterruptedError";
11381
11381
  }
11382
11382
  };
11383
+ /**
11384
+ * Best-effort routing inference for the live-progress task label
11385
+ * (#614 §9). Mirrors the routing decision tree but is purely cosmetic:
11386
+ * errors here never surface — when the inference fails we return
11387
+ * `undefined` and the label gets no `[CC API]` tag. The real
11388
+ * `getProviderFor` call inside the deploy/destroy critical path is the
11389
+ * load-bearing dispatch.
11390
+ *
11391
+ * Inputs:
11392
+ * - CREATE / UPDATE → template-side `desiredProperties` (top-level CFn
11393
+ * property names; intrinsic resolution does not change those, so we
11394
+ * can route ahead of the resolver run).
11395
+ * - DELETE → sticky `provisionedBy` from the existing-state record.
11396
+ *
11397
+ * Exported so {@link DeployEngine.peekRoutingForLabel} stays a 1-line
11398
+ * delegate and the routing-inference logic is directly unit-testable
11399
+ * without standing up a full DeployEngine harness.
11400
+ */
11401
+ function deriveLabelRouting(change, existingState, registry) {
11402
+ try {
11403
+ if (change.changeType === "DELETE") return existingState?.provisionedBy;
11404
+ return registry.getProviderFor({
11405
+ resourceType: change.resourceType,
11406
+ properties: change.desiredProperties,
11407
+ provisionedBy: existingState?.provisionedBy
11408
+ }).provisionedBy;
11409
+ } catch {
11410
+ return;
11411
+ }
11412
+ }
11383
11413
  var DeployEngine = class {
11384
11414
  logger = getLogger().child("DeployEngine");
11385
11415
  resolver;
@@ -12073,7 +12103,7 @@ var DeployEngine = class {
12073
12103
  const resourceType = change.resourceType;
12074
12104
  const renderer = getLiveRenderer();
12075
12105
  const needsReplacement = change.changeType === "UPDATE" && (change.propertyChanges?.some((pc) => pc.requiresReplacement) ?? false);
12076
- const baseLabel = `${change.changeType === "CREATE" ? "Creating" : change.changeType === "DELETE" ? "Deleting" : needsReplacement ? "Replacing" : "Updating"} ${logicalId} (${resourceType})`;
12106
+ const baseLabel = `${change.changeType === "CREATE" ? "Creating" : change.changeType === "DELETE" ? "Deleting" : needsReplacement ? "Replacing" : "Updating"} ${logicalId} (${resourceType})${this.peekRoutingForLabel(change, stateResources[logicalId]) === "cc-api" ? " [CC API]" : ""}`;
12077
12107
  renderer.addTask(logicalId, baseLabel);
12078
12108
  const operationKind = change.changeType === "CREATE" ? "CREATE" : change.changeType === "DELETE" ? "DELETE" : "UPDATE";
12079
12109
  const providerMinTimeoutMs = this.providerRegistry.getProvider(resourceType).getMinResourceTimeoutMs?.() ?? 0;
@@ -12105,6 +12135,9 @@ var DeployEngine = class {
12105
12135
  renderer.removeTask(logicalId);
12106
12136
  }
12107
12137
  }
12138
+ peekRoutingForLabel(change, existingState) {
12139
+ return deriveLabelRouting(change, existingState, this.providerRegistry);
12140
+ }
12108
12141
  /**
12109
12142
  * Inner body of provisionResource, extracted so the outer wrapper can
12110
12143
  * apply the per-resource deadline (`withResourceDeadline`) without
@@ -12503,5 +12536,5 @@ var DeployEngine = class {
12503
12536
  };
12504
12537
 
12505
12538
  //#endregion
12506
- export { CdkdError as $, shouldRetainResource as A, resolveSkipPrefix as B, IntrinsicFunctionResolver as C, TemplateParser as D, DagBuilder as E, Synthesizer as F, CFN_TEMPLATE_URL_LIMIT as G, resolveStateBucketWithDefaultAndSource as H, getDefaultStateBucketName as I, uploadCfnTemplate as J, MIGRATE_TMP_PREFIX as K, getLegacyStateBucketName as L, stringifyValue as M, WorkGraph as N, LockManager as O, buildDockerImage as P, AssetError as Q, resolveApp as R, assertRegionMatch as S, DiffCalculator as T, warnDeprecatedNoPrefixCliFlag as U, resolveStateBucketWithDefault as V, CFN_TEMPLATE_BODY_LIMIT as W, clearBucketRegionCache as X, AssemblyReader as Y, resolveBucketRegion as Z, matchesCdkPath as _, formatError as _t, withRetry as a, LockError as at, ProviderRegistry as b, withErrorHandling as bt, bold as c, PartialFailureError as ct, green as d, ResourceUpdateNotSupportedError as dt, ConfigError as et, red as f, RouteDiscoveryError as ft, CDK_PATH_TAG as g, SynthesisError as gt, collectInlinePolicyNamesManagedBySiblings as h, StateError as ht, withResourceDeadline as i, LocalStartServiceError as it, AssetPublisher as j, S3StateBackend as k, cyan as l, ProvisioningError as lt, IAMRoleProvider as m, StackTerminationProtectionError as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, LocalInvokeBuildError as nt, IMPLICIT_DELETE_DEPENDENCIES as o, MissingCdkCliError as ot, yellow as p, StackHasActiveImportsError as pt, findLargeInlineResources as q, DeployEngine as r, LocalMigrateError as rt, formatResourceLine as s, NestedStackChildDirectDestroyError as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, DependencyError as tt, gray as u, ResourceTimeoutError as ut, normalizeAwsTagsToCfn as v, isCdkdError as vt, applyRoleArnIfSet as w, CloudControlProvider as x, resolveExplicitPhysicalId as y, normalizeAwsError as yt, resolveCaptureObservedState as z };
12507
- //# sourceMappingURL=deploy-engine-BXWv-yRb.js.map
12539
+ 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 };
12540
+ //# sourceMappingURL=deploy-engine-BC1Z7ABm.js.map