Minimal interface covering the Bun-specific operations used by this adapter. Inject this interface to test the adapter without real Bun.
version: string
Bun version string.
hostname: string
Returns the host name.
env: { [key: string]: string | undefined; }
Environment variable map.
exit: (code?: number) => never
Exit the process.
onSignal: (signal: RuntimeSignal,handler: () => void) => void
Registers a process-termination signal listener.
Sourced from node:process, not the Bun global — see this module's own
header for why the global cannot be trusted to carry these members.
readFile: (path: string) => Uint8Array | null
Read file as bytes.
realPath: (path: string) => string | null
Resolve a path to its canonical absolute form (null when it cannot be resolved).
writeFile: (path: string,data: Uint8Array) => void
Write bytes to a file.
stat: (path: string) => BunFileInfo | null
Get file/directory info.
readdir: (path: string) => readonly string[] | null
List directory entries.
mkdir: (path: string,options?: { recursive?: boolean; }) => boolean
Create a directory.
rm: (path: string,options?: { recursive?: boolean; }) => boolean
Remove a file or directory.
optional
createReadStream: (path: string,options?: { start?: number; end?: number; }) => NodeJS.ReadableStream | null
Create a read stream for a file. Returns null if the file cannot be opened.