import { U as DevframeRpcClientFunctions, W as DevframeRpcServerFunctions, d as DevframeNodeContext } from "./devframe-BuR6n9ZD.mjs"; import { BirpcGroup } from "birpc"; import { WebSocketServer } from "ws"; import { H3 } from "h3"; //#region src/node/server.d.ts interface StartHttpAndWsOptions { context: DevframeNodeContext; host?: string; port: number; /** * Optional h3 app to mount on. When omitted a fresh one is created; * when provided, callers can add their own routes (static handlers, * auth middleware, etc.) first. */ app?: H3; /** * When `false`, the RPC server is started without a trust handshake. * Intended for single-user localhost tools where an auth round-trip * would only get in the way. The Vite-flavoured auth layer in * `@vitejs/devtools` already honors the equivalent * `devtools.clientAuth` setting; devframe records the intent here so * future auth plumbing can consult it without another API change. * * Default: `true`. */ auth?: boolean; /** * Called once the WS server is bound so callers can mount static * handlers whose origin depends on the resolved port, or print their * own startup banner. Devframe does not print one itself. */ onReady?: (info: { origin: string; port: number; app: H3; }) => void | Promise; } interface StartedServer { /** Listening origin, e.g. `http://localhost:9999`. */ origin: string; port: number; app: H3; wss: WebSocketServer; rpcGroup: BirpcGroup; close: () => Promise; } /** * Compose an h3 + WebSocket server for a devframe context. The RPC * group is bound to `context.rpc.functions`; the WS endpoint lives on * the same port as the HTTP server. */ declare function startHttpAndWs(options: StartHttpAndWsOptions): Promise; //#endregion export { StartedServer as n, startHttpAndWs as r, StartHttpAndWsOptions as t };