import { type ChildProcess } from "node:child_process"; import type { FrontendBuildResult, FrontendStaticMount } from "../types.js"; interface RunCommandOptions { cwd?: string; env?: NodeJS.ProcessEnv; } type RunCommandFn = (command: string, options?: RunCommandOptions) => Promise; interface SiteFrontendConfig { root: string; outDir: string; basePath?: string; spaFallback?: boolean; devPort?: number; env?: Record; } interface Site { siteId: string; domains?: string[]; frontend?: SiteFrontendConfig; } interface ViteFrontendOptions { name?: string; buildCommand?: string; devCommand?: string; devPort?: number; runCommand?: RunCommandFn; } interface DevSiteResult { siteId: string; proxyTarget: string; port: number; process: ChildProcess; } interface ViteFrontendPlugin { name: string; capabilities: readonly ["frontend-build", "static-serve", "frontend-dev"]; validate: () => void; dispose: () => void; buildSite: (ctx: Record, site: Site) => Promise; staticMounts: (ctx: Record, site: Site) => Promise; devSite: (ctx: Record, site: Site) => Promise; } /** * Reference frontend plugin for Vite-based apps. * * It intentionally shells out to project scripts (build/dev) instead of * linking to Vite APIs directly, which keeps the core runtime dependency-free. */ export declare function viteFrontend(options?: ViteFrontendOptions): ViteFrontendPlugin; export {}; //# sourceMappingURL=viteFrontend.d.ts.map