/** * Maximum bytes a single source file may occupy when read for parsing (10 MB). * Mirrors the fitness engine's `FileAccessor` `FILE_TOO_LARGE` ceiling. */ export declare const MAX_SOURCE_FILE_BYTES = 10000000; /** * Read a source file as UTF-8 with a per-file size guard. Throws if the file * exceeds `maxBytes` (default {@link MAX_SOURCE_FILE_BYTES}) — by `statSync` * size (checked before the read, so an oversized file is never loaded) or by * post-read length (closing the stat→read TOCTOU window). A missing/unreadable * file surfaces the underlying `statSync` error, exactly as the prior direct * `readFileSync` surfaced its own. * * @throws {Error} When the file exceeds `maxBytes` (by `statSync` size or * post-read length), or when the underlying `statSync`/`readFileSync` fails * (e.g. a missing or unreadable file). Adapter parse loops catch this per file * and record a `ParseError`, so the throw is non-fatal. */ export declare function readSourceFileGuarded(path: string, maxBytes?: number): string; //# sourceMappingURL=read-source.d.ts.map