import { type Server } from "node:http"; import { scanRoutes } from "../router/route-scanner.js"; import { type ActionSecurityOptions } from "../action/server.js"; export interface SsrServerOptions { /** Absolute path to the app directory (e.g. /project/src/app). */ appDir: string; /** Absolute path to the project root. When provided, action paths in the * serialized HTML shell are made relative to this root. */ root?: string; /** Absolute path to the public directory for static files (optional). */ publicDir?: string; /** Base path for the client entry module, e.g. "/_nix-js/entry-client.js". */ clientEntry?: string; /** Default language for the HTML shell. */ lang?: string; port?: number; host?: string; /** Absolute path to the ISR cache directory (optional). */ cacheDir?: string; /** Default revalidate interval in seconds when a page does not export one. */ defaultRevalidate?: number; /** If true, render pages with loading.ts boundaries using streaming. */ streaming?: boolean; /** CSRF / origin policy applied to the server actions endpoint. */ actionSecurity?: ActionSecurityOptions; } export interface SsrServer { server: Server; listen(): Promise; close(): Promise; } /** * Create an SSR server that renders pages on demand and serves static files. */ export declare function createSsrServer(options: SsrServerOptions): Promise; /** * Maps a concrete page path (e.g. `/movies/inception`) to the route pattern * key used by the action registry (e.g. `/movies/:slug`). Falls back to the * path itself when it matches an exact registry key. */ export declare function resolveActionPageKey(page: string | undefined, routes: Awaited>): string | undefined;