/** * File Server for Render Mode * * Lightweight HTTP server that serves the project directory inside Docker. * Key responsibility: inject the verified Hyperframe runtime + render mode extension * into index.html on-the-fly, so Puppeteer can load the composition with * all relative URLs (compositions, CSS, JS, assets) resolving correctly. */ import { injectScriptsAtHeadStart, injectScriptsIntoHtml } from "@hyperframes/core/compiler"; export { injectScriptsAtHeadStart, injectScriptsIntoHtml }; type PathModuleLike = { resolve: (...segments: string[]) => string; sep: string; }; type IsPathInsideOptions = { resolveSymlinks?: boolean; /** * Path module used for resolution and separator comparison. Defaults to * `node:path` for the running platform. Tests inject `path.win32` / * `path.posix` to exercise cross-platform behavior on a single OS. */ pathModule?: PathModuleLike; }; /** * Returns true iff `child` is the same as, or nested inside, `parent` after * path normalization. Used to reject path-traversal attempts (e.g. * GET `/../etc/passwd`) before opening any file. * * `path.join(root, "..")` normalizes traversal segments and can escape `root` * entirely, so the join return value alone is not a safe guard. Callers must * resolve both sides and compare prefixes with the platform separator * appended to `parent` to avoid `/foo` matching `/foobar`. * * Exported for unit tests; not part of the public package surface. */ export declare function isPathInside(child: string, parent: string, options?: IsPathInsideOptions): boolean; declare const VIRTUAL_TIME_SHIM: string; /** * Early stub: ensures `window.__hf` exists *before* any user `