import type { BackendInfo, RunRequest, RunResult, Runner } from "./types"; import { executeBundle, numblVersion } from "./execute"; /** * Runs numbl in the current Node process. Used by tests and scripts; cannot * cancel. */ export class NodeRunner implements Runner { private readonly info: BackendInfo = { engine: "numbl", version: numblVersion(), optimization: "1", host: "node", }; readonly backend = Promise.resolve(this.info); run(req: RunRequest, onOutput?: (text: string) => void): Promise { return Promise.resolve(executeBundle(req, this.info, onOutput)); } cancel(): void { /* synchronous host: nothing in flight between awaits */ } dispose(): void { /* nothing to release */ } }