INNER CODE UNIT · TypeScript

readJudgments

runvendo/vendo · packages/vendo/src/actions/sync/index.ts:221

async function readJudgments(file: string): Promise<JudgmentsFile | null> {
  let raw: string;
  try {
    raw = await fs.readFile(file, "utf8");
  } catch {
    return null;
  }
  try {
    return judgmentsFileSchema.parse(JSON.parse(raw));
  } catch {
    return null;
  }
}

/** The previous machine layer + the authored layer of `.vendo/`. */
interface VendoDirState {
  previousTools: ExtractedTool[];
  overrides: OverridesFile | null;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…