export type LocalFileOptions = { /** Path to the file on disk (relative paths resolve against cwd). */ file: string; /** Optional override for the upload's user-facing filename. Defaults to `basename(file)`. */ fileName?: string; }; /** * Open a local file as a streaming `Blob` for upload, with CLI-grade * error reporting. The returned Blob is file-backed — undici reads it * lazily when serializing the multipart request body, so the payload * never has to fit in memory all at once. * * Returns the resolved absolute path and the effective `fileName` * (caller's override, falling back to `basename(filePath)`) so call * sites don't have to recompute either. * * On the happy path this is a single `openAsBlob` — no separate readability * probe, so no extra filesystem open and no time-of-check/time-of-use window. * The probe only runs when `openAsBlob` fails: it rewraps fs errors as an * opaque `ERR_INVALID_ARG_VALUE` TypeError (it does *not* preserve `ENOENT`), * so we re-open with `fs.open` to recover the real errno and map it to a * precise `FILE_NOT_FOUND` vs `FILE_READ_ERROR`. */ export declare function openLocalFileAsBlob(options: LocalFileOptions): Promise<{ blob: Blob; filePath: string; fileName: string; }>; //# sourceMappingURL=local-file.d.ts.map