/** The apps section of a project manifest, as much of it as folding needs. */ export interface FoldableManifest { apps?: Record; } export interface FoldOptions { projectRoot: string; manifest: FoldableManifest; /** The backend bundle directory, already written. */ bundleDir: string; /** Skip running each app's own build command; fold what is already built. */ skipBuild?: boolean; log?: (message: string) => void; } export interface FoldOutcome { appName: string; fileCount: number; /** Public base path this app was folded in at. */ path: string; } /** A static app as folding sees it, with the manifest's defaults applied. */ export interface FoldableApp { name: string; build?: string; output?: string; /** Public base path, defaulted to `/`. */ path: string; /** SPA fallback, defaulted to `true`. */ spa: boolean; } /** * Every static app in the manifest, in mount order. * * Longest path first, so the `/`-rooted app is registered last — its catch-all * would otherwise claim its siblings' URLs. Pure, so the ordering is testable * without a filesystem. */ export declare function foldableApps(manifest: FoldableManifest): { apps: FoldableApp[]; /** Apps that cannot be folded, and why. */ skipped: { name: string; reason: string; }[]; }; /** * Assert a built app's assets are actually rooted at the path it is served from. * * An app mounted at `/admin` but built with Vite's default `base: "/"` emits * `