INNER CODE UNIT · TypeScript

parseStartCliOptions

lidge-jun/opencodex · src/cli/index.ts:245

function parseStartCliOptions(): ReturnType<typeof parseStartOptions> {
  try {
    return parseStartOptions(args.slice(1));
  } catch (error) {
    console.error(error instanceof StartArgsError ? error.message : String(error));
    process.exit(1);
  }
}

async function waitForProxy(timeoutMs = 8_000, keepWaiting?: () => boolean): Promise<LiveProxy | null> {
  // Runtime-state-first with identity: finds the proxy even when it started on a
  // fallback port, and never mistakes a foreign 200 for our proxy.
  return waitForLiveProxy({ find: findLiveProxy, timeoutMs, keepWaiting });
}

class StartCommandExit extends Error {
  constructor(readonly exitCode: number) {
    super(`start command exited with code ${exitCode}`);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…