export type WindowsNpmShimResolution = { ok: true; command: string; args: string[]; shimPath: string; entryPath: string; } | { ok: false; error: string; }; export interface WindowsNpmShimDeps { env?: NodeJS.ProcessEnv; cwd: string; nodeExecutable?: string; isFile?: (path: string) => boolean; readText?: (path: string) => string; onPath?: (command: string, env: NodeJS.ProcessEnv) => string | undefined; } /** * Find the Node entrypoint referenced by npm's PowerShell companion shim. * * This is intentionally a parser for a CLOSED generated form, not a PowerShell evaluator. A shim * that does not expose a literal $basedir path is unsupported and fails closed. */ export declare function npmPowerShellEntrypoint(shimPath: string, text: string, isFile?: (path: string) => boolean, readText?: (path: string) => string): string | undefined; /** * Resolve one failed Windows command to a shell-free Node invocation. * * Only npm-style .cmd/.bat shims (or an explicitly named .ps1 companion) are accepted. Unknown * batch files fail instead of reintroducing cmd.exe. */ export declare function resolveWindowsNpmShim(command: string, args: readonly string[], deps: WindowsNpmShimDeps): WindowsNpmShimResolution;