All files / apps/developer-portal/tools/lib snapshotStamp.ts

0% Statements 0/3
100% Branches 0/0
100% Functions 0/0
0% Lines 0/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14                           
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { SNAPSHOT_DIR } from "./paths.ts";
 
/**
 * Nx hashes this stdout as the `runtime` input on the build. `.report/` is gitignored, so it is
 * absent from Nx's file map and a file input over it hashes nothing at all.
 */
try {
    process.stdout.write(readFileSync(resolve(SNAPSHOT_DIR, "manifest.json"), "utf8"));
} catch {
    process.stdout.write("no-snapshot");
}