import type { CaddyRoute } from '../config/caddy-config.js'; import type { CliContext } from '../context/create-context.js'; import type { OutputWriter } from './output-target.js'; import { buildPorts } from '../context/ports.js'; export type CaddyRouteOptions = { routes: CaddyRoute[]; tlsSubjects: string[]; }; type Domains = { dashboard: string; api: string; renderer: string; registration?: string; webshop?: string; }; export type InstanceManifest = { version: string; name: string; kind?: RouteManifestKind; pid?: number; env: string; workspace: string; primary: boolean; prefix: string; portOffset: number; startedAt: string; rootPath: string; domains: Domains; ports: ReturnType; reservedPorts?: number[]; caddy?: CaddyRouteOptions; }; export type RouteManifestKind = 'instance' | 'playwright-worker'; export type RouteManifest = { version: string; name: string; kind: RouteManifestKind; pid?: number; startedAt: string; expiresAt?: string; rootPath: string; workspace: string; /** * Every host port this manifest claims for as long as it is active. Other processes read these * to pick a port range of their own without scanning the route configs, see * `CaddyService.findRouteManifestConflicts`. */ reservedPorts?: number[]; caddy: CaddyRouteOptions; }; export declare function writeInstanceManifest(context: CliContext, options: { domains: Domains; caddy?: CaddyRouteOptions; }): Promise; export declare function removeInstanceManifest(context: CliContext): Promise; /** * The fields a caller provides: the manifest version is stamped here, so writers never have to * know which version the store is on. */ export type RouteManifestInput = Omit; export declare function writeRouteManifest(context: CliContext, manifest: RouteManifestInput): Promise; export declare function removeRouteManifest(context: CliContext, name: string): Promise; /** * Remove every manifest of a kind that was written by this same process. Manifests of other * processes are never touched: they may belong to an e2e run or dev session that is still using * those routes and ports. */ export declare function removeOwnRouteManifests(context: CliContext, kind: RouteManifestKind): Promise; export declare function pruneStaleRouteManifests(context: CliContext): Promise; export declare function listActiveRouteManifests(context: CliContext, options?: { writeOutputLine?: OutputWriter; }): Promise; export declare function listInstanceManifests(context: CliContext, options?: { writeOutputLine?: OutputWriter; }): Promise; export declare function listActiveInstanceManifests(context: CliContext, options?: { writeOutputLine?: OutputWriter; }): Promise; export declare function instanceManifestToRouteManifest(manifest: InstanceManifest): RouteManifest; export declare function sharedDir(context: CliContext): string; export declare function logsDir(context: CliContext): string; export {}; //# sourceMappingURL=manifest-store.d.ts.map