/** * The demo's dev-server step. * * Lives apart from `demo.ts` so the address the demo shows and opens can be * tested without booting a dev server, a browser, or stdin. * * @module cli/commands/demo/dev-step */ import type { DevCommandResult } from "../dev/index.js"; export interface DemoDevStepDeps { /** Starts the dev server. */ start: () => Promise; /** Opens the demo's browser at the given URL. */ open: (url: string) => Promise; /** Resolves when the viewer asks for the dev server to stop. */ waitForStop: () => Promise; /** Writes one line of demo output. */ log: (line: string) => void; } /** * Shows the running dev server, opens it, then stops it on request. * * Both the printed URL and the opened URL come from `result.port` - the port * the server actually bound. `veryfront dev` asks for 3000 but falls forward * when that is taken, so keying off the requested port would send the viewer to * whatever process caused the collision instead of to the demo. */ export declare function runDemoDevStep(deps: DemoDevStepDeps): Promise; //# sourceMappingURL=dev-step.d.ts.map