import { Context } from "../../../bundler/context.js"; import { LocalDeploymentKind } from "./filePaths.js"; import { DeploymentType, DetailedDeploymentCredentials } from "../api.js"; export declare function runLocalBackend(ctx: Context, args: { ports: { cloud: number; site: number; }; deploymentKind: LocalDeploymentKind; deploymentName: string; binaryPath: string; instanceSecret: string; isLatestVersion: boolean; }): Promise<{ cleanupHandle: string; }>; /** Crash if correct local backend is not currently listening on the expected port. */ export declare function assertLocalBackendRunning(ctx: Context, args: { url: string; deploymentName: string; }): Promise; /** Wait for up to maxTimeSecs for the correct local backend to be running on the expected port. */ export declare function ensureBackendRunning(ctx: Context, args: { cloudPort: number; deploymentName: string; maxTimeSecs: number; }): Promise; export declare function ensureBackendStopped(ctx: Context, args: { ports: { cloud: number; site?: number; }; maxTimeSecs: number; deploymentName: string; allowOtherDeployments: boolean; }): Promise; export declare function localDeploymentUrl(cloudPort: number): string; export declare function selfHostedEventTag(deploymentKind: LocalDeploymentKind): string; type LocalBackendStatus = { kind: "running"; } | { kind: "error"; resp: Response; } | { kind: "different"; name: string; } | { kind: "not-running"; }; export declare function fetchLocalBackendStatus(args: { url: string; deploymentName: string; }): Promise; /** Returns true if the correct local backend is listening. */ export declare function isLocalBackendRunning(url: string, deploymentName: string): Promise; export declare function shouldUseLocalDeployment(deploymentType: DeploymentType): boolean; interface WithRunningBackendArgs { ctx: Context; deployment: { deploymentUrl: string; deploymentFields: DetailedDeploymentCredentials["deploymentFields"]; }; action: () => Promise; } /** * If the deployment is a local deployment and not already running, start it * for the duration of the action, then stop it. */ export declare function withRunningBackend({ ctx, deployment, action, }: WithRunningBackendArgs): Promise; export {}; //# sourceMappingURL=run.d.ts.map