(
{ dir }: ReadProgramDir,
id: string
)
| 612 | // a module the read holds, or undefined where it left it; what doesn't match is |
| 613 | // the build reaching a validator the read didn't see |
| 614 | export const programAnswerOf = ( |
| 615 | { dir }: ReadProgramDir, |
| 616 | id: string |
| 617 | ): ProgramAnswer | undefined => { |
| 618 | const path = answerFileOf(dir, id) |
| 619 | return existsSync(path) ? |
| 620 | (JSON.parse(readFileSync(path, "utf8")) as ProgramAnswer) |
| 621 | : undefined |
| 622 | } |
| 623 | |
| 624 | // arktype's own, which a linked install resolves out of node_modules, and the |
| 625 | // read doesn't follow as its modules never import a program's |
no test coverage detected