Functions

f
cleanupDir(dirPath: string): Promise<void>

Kills all surviving processes that reference dirPath (checked via cwd, cmdline, and open file descriptors), then retries fs.rm() until it succeeds or a 5-second deadline expires. Re-scans /proc on each failed rm() attempt to catch processes that appear after the initial scan (e.g. late-forked Chrome helpers).

f
find(): Promise<string | null>

Resolves the Chrome/Chromium executable path. Returns a Promise for API compatibility with callers, but the resolution is synchronous.

f
spawn(
chromePath: string | null | undefined,
args: string[],
headless?: boolean,
onSpawn?: (handle: ChromeHandle) => void
): Promise<EarlyChrome | null>

Spawns a headless Chrome process with --remote-debugging-port=0 and resolves once the CDP WebSocket endpoint appears on stderr. Returns null if Chrome is unavailable or fails to start, so callers can fall back to playwright's normal chromium.launch().

Variables

v
CHROMIUM_ARGS: string[]

Launch args passed to Chromium for both the CDP pre-launch spawn and the playwright fallback launch.