export * from "./worker-host"; /** * Strict shell-identifier shape. Used for dotenv keys we accept into * `Bun.env` — those should be referenceable as `$NAME` from POSIX shells, * so we reject anything outside `[A-Za-z_][A-Za-z0-9_]*`. */ export declare function isValidEnvName(name: string): boolean; /** * The only names that are genuinely unsafe to forward to a native `execve` * spawn: empty, containing `=` (would corrupt the `KEY=VALUE` framing) or * NUL (terminates the C string mid-entry). Windows ships standard variables * whose names contain parentheses (e.g. `ProgramFiles(x86)`, `CommonProgramFiles(x86)`) * — those MUST survive the scrub so downstream resolvers (Git Bash discovery * in `procmgr.ts`, etc.) can still read them. */ export declare function isSafeEnvName(name: string): boolean; export declare function isSafeEnvValue(value: string): boolean; export declare function isMacosMallocStackLoggingEnvName(name: string): boolean; export declare function filterProcessEnv(env: Record): Record; /** * Parses a .env file synchronously and extracts key-value string pairs. * Ignores lines that are empty or start with '#'. Trims whitespace. * Allows values to be quoted with single or double quotes. * Returns an object of key-value pairs. */ export declare function parseEnvFile(filePath: string): Record; /** * Intentional re-export of Bun.env. * * All users should import this env module (import { $env } from "jeopi-utils") * before using environment variables. This ensures that .env files have been loaded and * overrides (project, home) have been applied, so $env always reflects the correct values. */ export declare const $env: Record; /** * Resolve the first environment variable value from the given keys. * @param keys - The keys to resolve. * @returns The first environment variable value, or undefined if no value is found. */ export declare function $pickenv(...keys: string[]): string | undefined; /** * Parses a positive decimal integer from `$env[name]`. * Empty, invalid, NaN, zero, or negative values return `defaultValue`. */ export declare function $envpos(name: string, defaultValue: number): number; /** True when `BUN_ENV` or `NODE_ENV` is the string `test`. */ export declare function isBunTestRuntime(): boolean; /** * True when real-terminal side effects must be suppressed: stdout escape/frame * writes, stdin raw-mode + resume, CSI/OSC capability probes, SIGWINCH, window * title changes, and emergency restore. Defaults to {@link isBunTestRuntime} so * `bun test` launched inside a real TTY never paints the TUI, leaks probe * queries, or hijacks the developer's stdin; production runtimes stay * interactive. * * Terminal-contract tests that must exercise the real I/O path opt out with * `setTerminalHeadless(false)` and restore it afterwards. */ export declare function isTerminalHeadless(): boolean; /** * Override the {@link isTerminalHeadless} default and return the previous value * so callers can restore exact prior state (`const prev = setTerminalHeadless(false); … setTerminalHeadless(prev);`). */ export declare function setTerminalHeadless(headless: boolean): boolean; /** * True when this code is running inside a `bun build --compile` standalone * binary. Detects via the embedded virtual-filesystem path markers * (`$bunfs`, `~BUN`, or its URL-encoded form `%7EBUN`) in `import.meta.url`, * which Bun rewrites for every module bundled into the executable. The * `PI_COMPILED` env var (set by the build script's `--define`) is checked * first for cheap fast-path detection. */ export declare function isCompiledBinary(): boolean; export declare function $flag(name: string, def?: boolean): boolean;