| | |
| | | import { Mutex } from "async-mutex" |
| | | import DepGraph from "./depgraph" |
| | | import { getStaticResourcesFromPlugins } from "./plugins" |
| | | import { randomIdNonSecure } from "./util/random" |
| | | |
| | | type Dependencies = Record<string, DepGraph<FilePath> | null> |
| | | |
| | |
| | | |
| | | type FileEvent = "add" | "change" | "delete" |
| | | |
| | | function newBuildId() { |
| | | return Math.random().toString(36).substring(2, 8) |
| | | } |
| | | |
| | | async function buildQuartz(argv: Argv, mut: Mutex, clientRefresh: () => void) { |
| | | const ctx: BuildCtx = { |
| | | buildId: newBuildId(), |
| | | buildId: randomIdNonSecure(), |
| | | argv, |
| | | cfg, |
| | | allSlugs: [], |
| | |
| | | return |
| | | } |
| | | |
| | | const buildId = newBuildId() |
| | | const buildId = randomIdNonSecure() |
| | | ctx.buildId = buildId |
| | | buildData.lastBuildMs = new Date().getTime() |
| | | const release = await mut.acquire() |
| | |
| | | toRemove.add(filePath) |
| | | } |
| | | |
| | | const buildId = newBuildId() |
| | | const buildId = randomIdNonSecure() |
| | | ctx.buildId = buildId |
| | | buildData.lastBuildMs = new Date().getTime() |
| | | const release = await mut.acquire() |