/** * @file Safe call-through accessors for the `process` global's methods and * value reads. The `process` object reference is captured once at module load * (immune to a later `globalThis.process = …` reassignment), but each method * is CALLED at access time off that captured object — so `vi.spyOn(process, * 'cwd')`, which mutates the same captured object, still intercepts. Binding * the method reference instead (`process.cwd.bind(process)`) would freeze it * and break that test injection point, so we deliberately keep the late call. * Consumers read cwd / platform / env / argv through these instead of * touching `process` directly; enforced Socket-wide by * `socket/prefer-process-primordial`. This is the `process` leaf of the * node-module primordials: where `node/fs` / `node/path` lazy-load a `node:` * module behind a function, this captures the always-present `process` global * and routes its hot reads through one tamper-resistant surface. */ /** * The CPU architecture token (`'x64'` / `'arm64'` / …). */ export declare function processArch(): string; /** * The argv array (`[execPath, scriptPath, ...args]`). * * @example * ;```typescript * const entry = processArgv()[1] * ``` */ export declare function processArgv(): string[]; /** * The current working directory. Call-through to the captured process's `cwd` — * late-bound so test spies still intercept. * * @example * ;```typescript * const dir = processCwd() * ``` */ export declare function processCwd(): string; /** * Emit a process warning. Call-through so a test spy on `process.emitWarning` * still intercepts. */ export declare function processEmitWarning(...args: Parameters): void; /** * The process environment object. Returns the live `process.env` off the * captured process (call-through, so a test that swaps `process.env` is seen). * * @example * ;```typescript * const token = processEnv()['SOCKET_API_TOKEN'] * ``` */ export declare function processEnv(): NodeJS.ProcessEnv; /** * The absolute path to the Node executable (`process.execPath`). */ export declare function processExecPath(): string; /** * Schedule a callback on the next tick. Call-through (late-bound). */ export declare function processNextTick(...args: Parameters): void; /** * The process id. */ export declare function processPid(): number; /** * The OS platform token (`'darwin'` / `'linux'` / `'win32'` / …). * * @example * ;```typescript * if (processPlatform() === 'win32') { … } * ``` */ export declare function processPlatform(): NodeJS.Platform; /** * The standard error stream. Returned off the captured process so a test that * spies on `process.stderr.write` still intercepts. */ export declare function processStderr(): NodeJS.WriteStream; /** * The standard output stream. Returned off the captured process so a test that * spies on `process.stdout.write` still intercepts. */ export declare function processStdout(): NodeJS.WriteStream; /** * The Node version string (`process.version`, e.g. `'v26.2.0'`). */ export declare function processVersion(): string;