import { readFile, stat } from "node:fs/promises"; import path from "node:path"; import { projectRef } from "@/lib/projects"; import { kickQueue, queueDir } from "@/lib/queue/runner"; import { addStep, listSteps, resolveStep } from "@/lib/queue/store.mjs"; import { rangeResponse } from "@/lib/report/serve.mjs"; import { fastKindOf, fastRenders, previewPaths } from "@/lib/report/takePreview.mjs"; import { isTakeId } from "@/lib/report/takes.mjs"; export const dynamic = "force-dynamic"; // A TAKE'S FAST-FEEDBACK RENDERS (lib/report/takePreview.mjs): its preview at the preview tier and its // changes reel, never its deliverable. // // GET ?project&take { preview, changes, from, steps }: each one's record and output // (local path), the queue step still to run one, the take the // reel compares with by default // GET ?project&take&file=preview|changes the mp4, range-served (to a