/** * Types for bin/lifecycle.mjs. * * Hand-written rather than inferred: turning on `allowJs` would pull bin/*.mjs into the compiled * program and emit it under dist/, changing the packaged layout for the sake of a type check. This * file exists so `tsc --noEmit` can see the module the tests import, and emits nothing. * * It is a DECLARATION, so it cannot drift silently in the direction that matters: if a signature * here stops matching the implementation, the tests that call it stop compiling. */ /** The pid listening on `port` in `netstat -ano -p TCP` output, or null. */ export function parseNetstatListener(stdout: string, port: number | string): number | null; /** The xmesh entrypoint inside a process command line, or null. */ export function parseEntrypoint(commandLine: string | null | undefined): string | null; /** This CLI's own entrypoint path. */ export function ownEntry(): string; /** Whether an entrypoint's package can actually boot (has a built dist). */ export function bootable(entry: string): { ok: true } | { ok: false; why: string }; /** Spawn a detached runtime from `entry` (default: this CLI's own). Returns its pid. */ export function startDetached(entry?: string): number | undefined; export function stop(opts?: { quiet?: boolean }): Promise<{ stopped: boolean; reason?: string; port?: number; supervised?: string; }>; export function restart(): Promise<{ version: string; tree?: string } | null>; export function update(opts?: { check?: boolean }): Promise< | { installed: string; latest: string; running: string | null; where: string; root: string } | { ok: false; reason?: string } | null >;