Files
nodarium/app/src/lib/runtime/worker-runtime-executor.ts
release-bot 15e08a8163
All checks were successful
🚀 Lint & Test & Deploy / release (pull_request) Successful in 3m53s
feat: implement debug node
Closes #39
2026-02-12 21:33:47 +01:00

25 lines
794 B
TypeScript

/// <reference types="vite-plugin-comlink/client" />
import type { Graph, RuntimeExecutor } from '@nodarium/types';
export class WorkerRuntimeExecutor implements RuntimeExecutor {
private worker = new ComlinkWorker<typeof import('./worker-runtime-executor-backend.ts')>(
new URL(`./worker-runtime-executor-backend.ts`, import.meta.url)
);
execute(graph: Graph, settings: Record<string, unknown>) {
return this.worker.executeGraph(graph, settings);
}
getPerformanceData() {
return this.worker.getPerformanceData();
}
getDebugData() {
return this.worker.getDebugData();
}
set useRuntimeCache(useCache: boolean) {
this.worker.setUseRuntimeCache(useCache);
}
set useRegistryCache(useCache: boolean) {
this.worker.setUseRegistryCache(useCache);
}
}