/** * Line-ending portability for shell scripts crossing the vault. * * Sync moves bytes verbatim. A script edited or checked out on Windows * carries CRLF, and bash on macOS/Linux then fails on it (`set -euo * pipefail\r` → "pipefail: invalid option name"). Bash on Windows (Git Bash, * MSYS2, WSL) runs LF scripts without complaint, so LF is the one format that * works on every platform HQ supports. * * Scope is deliberately narrow: only files that are scripts by extension or * by shebang. Markdown, YAML and JSON with CRLF are left alone; they are not * executed and rewriting them would churn every text file in the vault. * * Applied at both ends so either side being up to date is enough: * - upload: the body is normalized before PUT, so the vault holds LF; * - download: a POSIX receiver normalizes the staged file before it * replaces the local one, so a CRLF object already in the vault (or one * pushed by an older client) still lands runnable. */ /** True when the key names a shell script by extension. */ export declare function isScriptKey(key: string): boolean; /** * True when the file should get LF normalization: a script by extension, or * any file whose first two bytes are a shebang. A NUL byte anywhere marks the * body binary and opts it out regardless. */ export declare function isPortableScript(key: string, body: Buffer): boolean; /** * CRLF → LF. Returns `null` when the body has no CRLF so callers can skip the * rewrite (and keep the original hash) on the common path. A lone CR is left * untouched; only the two-byte Windows sequence is rewritten. */ export declare function normalizeScriptLineEndings(body: Buffer): Buffer | null; //# sourceMappingURL=script-eol.d.ts.map