(id: string)
| 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 |
| 626 | export const isArkFile = (id: string): boolean => { |
| 627 | for (let dir = dirname(id); ; dir = dirname(dir)) { |
| 628 | const manifest = join(dir, "package.json") |
| 629 | if (existsSync(manifest)) { |
| 630 | return arkPackageName.test( |
| 631 | parsePackageManifest(readFileSync(manifest, "utf8"), manifest).name ?? |
| 632 | "" |
| 633 | ) |
| 634 | } |
| 635 | if (dir === dirname(dir)) return false |
| 636 | } |
| 637 | } |
| 638 | |
| 639 | export const isSourceRead = (answer: ProgramAnswer, source: string): boolean => |
| 640 | answer.sourceHash === hashOf(source) |
no test coverage detected