import { type Result } from "@fjall/generator"; import type { StackOutputsReader } from "./CloudFormationService.js"; import { EcsError } from "./EcsService.js"; /** * One ECS service an app's Compute stack declares deployable through its * `DeployableService` export. `clusterName` and `serviceName` are the * physical names the service ARN carries; `exportName` is the export the * service was read from, which a manifest binds to by exact name. */ export interface DeployableService { serviceArn: string; clusterArn: string; clusterName: string; serviceName: string; exportName: string; } /** * The deployable services of one app, read from its Compute stack. * `stackExists: false` is positive absence (CloudFormation refused the stack * name as not found) and carries no services; a Compute stack that exists * but declares nothing deployable is `stackExists: true` with no services. */ export interface DeployableServiceResolution { stackName: string; stackExists: boolean; services: DeployableService[]; } /** * Resolves the deployable ECS services of an app from the outputs of its * Compute stack. The stack is the one Fjall names for the app, so nothing * is matched by app-name containment, and every output that claims the * `DeployableService` contract is verified against its own value — an * export whose name and value disagree fails the resolution rather than * being read as whichever of the two it appears to say. */ export declare class EcsServiceResolver { private readonly stacks; constructor(stacks: StackOutputsReader); /** * Fails closed: an unreadable stack, an output that claims the contract * and breaks it, or a throw from the reader is a failure, never an empty * resolution. Only a Compute stack CloudFormation reports as not found * resolves to `stackExists: false`. */ resolveDeployableServices(appName: string, abortSignal?: AbortSignal): Promise>; }