import { readWorkerDefaults } from "yt-dlp-transcript-common/jobs/workerDefaults"; import { buildWorkersPayload as build, type WorkersPayload, } from "yt-dlp-transcript-common/views/workers"; import { liveInputs } from "../lib/liveInputs"; // THE SHELL. The payload is `common/views/workers.ts`, a pure function of its // arguments; this is the editor half that fetches them — the singletons through // `liveInputs()`, and the persisted launch default off disk (a synchronous read // a view is not allowed to make). export function buildWorkersPayload(): WorkersPayload { const i = liveInputs(); return build({ registry: i.registry, pool: i.pool, settings: i.settings, workerDefaults: readWorkerDefaults(i.paths), }); }