namespace Daemon

Daemon control: start, stop, status, and a test that reuses the daemon's warm browser and returns the same RunResult a local run does.

import * as Daemon from './daemon.ts';

// Defined, not invoked: spawns and talks to a real background process.
async function warmRun() {
  await Daemon.start();
  return await Daemon.test({ inputs: ['test/'] });
}

Functions

f
Daemon.start(): Task<boolean, never>

Ensures a daemon is running for this project, spawning one if there isn't.

f
Daemon.status(): Task<DaemonStatus, never>

Probes this project's daemon. An actual round-trip over the socket, not a look at the sentinel file, so a crashed daemon that left its files behind reports { running: false }.

f
Daemon.stop(): Task<boolean, never>

Stops this project's daemon. Resolves true if one was running, false if there was nothing to stop — either way, no daemon is running afterwards.

f
Daemon.test(options?: DaemonRunOptions): Task<RunResult, Client.DaemonRunFailure>

Runs the suite inside this project's daemon and resolves with the same RunResult a local run would produce — reusing the daemon's browser and warm bundle instead of paying for a fresh one.

Interfaces

I
DaemonRunOptions

The options a daemon run accepts: everything from UserRunOptions that survives a socket.

Type Aliases