Write JSON marker via rename, ensures atomic dirs, updates covers.
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
import { homedir } from "node:os";
import { dirname, join, resolve } from "node:path";
import { spawn } from "node:child_process";
interface DoDCheckResult {
id: string;
passed: boolean;
detail: string;
}
type DoDStatus = "DONE" | "NOT_DONE";
interface DoDStatusArtifact {
generatedAt: string;
runtimeDir: string;
status: DoDStatus;
passed: boolean;
checks: DoDCheckResult[];
}
interface WorkerProgress {
cycle?: number;
lastStep?: {
id?: string;
exitCode?: number;
};
}
interface ProductDoDDefinition {
fullChinese: boolean;
nonTechnicalCopy: boolean;
middleSchoolReadable: boolean;
globalVisibility: boolean;
appleNativeUI?: boolean;
realSubscriptionConnected?: boolean;
tiAppro
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key