feat: run Velum project jobs in the background and process DOCX locally

This commit is contained in:
muena
2026-11-30 16:12:11 +01:00
parent 11ddd6d70f
commit d2ed7130f0
32 changed files with 2325 additions and 462 deletions

View File

@@ -508,3 +508,21 @@ it("erfasst große Textdateien weiterhin, behält aber die Office-Uploadgrenze",
expect(result.files.map((file) => file.relPath)).toEqual(["large.txt"]);
expect(result.skipped).toEqual([{ path: "large.docx", reason: "Datei zu groß (Grenze: 20 MiB)" }]);
});
it("offers large XLSX files for local restoration while keeping the upload limit for pseudonymization", async () => {
const root = await fs.mkdtemp(join(tmpdir(), "velum-large-xlsx-scan-")); roots.push(root);
const source = join(root, "source"); await fs.mkdir(source);
for (const name of ["large.xlsx", "large.docx"]) {
const handle = await fs.open(join(source, name), "w");
await handle.write(Buffer.from([0x50, 0x4b, 0x03, 0x04]));
await handle.truncate(21 * 1024 * 1024); await handle.close();
}
const { run, directory } = await project.createRun(source, join(root, "support"));
run.inPlace = true;
const upload = await project.scanProjectFiles(source);
expect(upload.files).toHaveLength(0);
const restore = await project.scanRestorableCopyFiles(run, directory);
expect(restore.files.map((file) => file.relPath)).toEqual(["large.xlsx"]);
expect(restore.skipped).toBe(1);
});