/** * Deploy-plan loading — reads each changed stack's synthesised template from * cdk.out and delegates to {@link computeDeployPlan} (live-template diff + * registry overlay). Extracted from the approval gate so the unconditional * destruction gate shares the SAME computation: `createMemoisedPlanLoader` * guarantees a plan-gated deploy never diffs twice, while a non-engaged deploy * computes the plan exactly once for the destruction gate. */ import { type Result } from "@fjall/generator"; import type { CfnRegistrySummaryReader } from "../../../services/infrastructure/CfnRegistryService.js"; import type { ChangeSetProbeRunner } from "../../../services/infrastructure/changeSetProbe.js"; import { type CfnTemplateReader } from "./computeDeployPlan.js"; import type { DeployPlan } from "./types.js"; export interface LoadDeployPlanParams { cfnService: CfnTemplateReader; cdkOutPath: string; changedStacks: string[]; /** * The region a changed stack's live template is read from, when not the * reader's own (the `UsEast1*` stacks); `undefined` reads the reader's. */ regionFor?: (stackName: string) => string | undefined; assemblyDigest: string; registry?: CfnRegistrySummaryReader; changeSetProbe?: ChangeSetProbeRunner; abortSignal?: AbortSignal; } /** A zero-argument plan supplier shared between the gates. */ export type DeployPlanLoader = () => Promise>; export declare function loadDeployPlan(params: LoadDeployPlanParams): Promise>; /** * Memoise the plan computation for one deploy invocation: the first call * computes (template reads + live diff + registry overlay), every later call * returns the same settled promise — including a failure, which both gates * must observe identically. */ export declare function createMemoisedPlanLoader(params: LoadDeployPlanParams): DeployPlanLoader;