#!/usr/bin/env node import { spawn } from "node:child_process"; import { type PonyCliRuntime } from "./index.js"; import { type PackageCommandRunner } from "./local-package.js"; import { type LatestVersionResolver } from "./upgrade.js"; import { type ProcessSignalTarget } from "./terminal.js"; interface ProcessResult { status: number; stderr: string; stdout: string; } export interface LocalProcessRuntime { captureTerminalState(): () => void; signalTarget: ProcessSignalTarget; spawnProcess(command: string, args: string[], options: { cwd: string; env: NodeJS.ProcessEnv; stdio: "inherit" | ["ignore", "pipe", "pipe"]; }): ReturnType; } export interface LauncherRuntime extends PonyCliRuntime { cwd: string; execPath?: string; nodeVersion?: string; platform?: NodeJS.Platform; readLauncherVersion?: () => Promise; resolveLatestVersion?: LatestVersionResolver; runLocalProcess?: (binPath: string, args: string[], options: { capture: boolean; cwd: string; env: NodeJS.ProcessEnv; }) => Promise; runPackageCommand?: PackageCommandRunner; } /** * Delegated commands inherit the launcher's process group and TTY. Catching * termination signals here prevents the shell from resuming before the local * runtime has stopped its own children and restored terminal state. */ export declare function runLocalProcess(binPath: string, args: string[], options: { capture: boolean; cwd: string; env: NodeJS.ProcessEnv; }, runtime?: LocalProcessRuntime): Promise; export declare function runPonyLauncher(args: string[], runtime?: LauncherRuntime): Promise; export {}; //# sourceMappingURL=launcher.d.ts.map