feat(import): admin UI at /admin/import, dev server, extraction cleanup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas WintherandClaude Opus 5.5 committed 2026-10-30 03:20:40 +01:00
1 parent 9f96e293e1
commit 90a477691b
5 files changed
+246 -3

No files matched your search

@@ -26,6 +26,7 @@ test("imports a Packt zip into a restricted course with sections, titles and med
expect(env.deps.ctx.courses.resolvePath("docker-test", "media/video2_1.mp4")).toBeTruthy();
expect(m.cover).toBe("media/cover.jpg");
expect((await readdir(join(env.dataDir, "cache/covers/docker-test"))).sort()).toEqual(["frame-1.jpg", "frame-2.jpg", "frame-3.jpg"]);
expect((await readdir(c.root)).sort()).toEqual(["media", "stcourse.yaml"]); // no extraction leftovers
expect(await readdir(join(env.dataDir, "tmp"))).toEqual([]); // scratch removed
expect(Buffer.compare(await readFile(zip), before)).toBe(0); // original untouched
expect(env.progress.at(-1)![0]).toBe(1);