UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

25 lines 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FileUploadsApi = void 0; const fileUploadWorkerRegistry_1 = require("../persistence/files/fileUploadWorkerRegistry"); /** * Admin endpoints for observing the local file upload queue. Used by the * desktop app's quit flow: query status, surface to the user, let them * decide between waiting for drain and quitting anyway. * * No mutating endpoint is needed — the worker is always trying to drain. * Callers wanting a "wait for drain" UX poll this until the active count * hits zero, then exit the backend. */ class FileUploadsApi { /** * GET /api/uploads/status — returns total + per-platform counts of files * pending upload, currently in-flight, or failed. */ async getStatus(_req, res) { const status = await (0, fileUploadWorkerRegistry_1.getFileUploadAggregateStatus)(); res.json(status); } } exports.FileUploadsApi = FileUploadsApi; //# sourceMappingURL=FileUploadsApi.js.map