(dir: string)
| 65 | join(arktypeRoot, "skills", "arktype") |
| 66 | |
| 67 | const readManifest = (dir: string): PackageManifest | undefined => { |
| 68 | const path = join(dir, "package.json") |
| 69 | if (!existsSync(path)) return undefined |
| 70 | try { |
| 71 | return JSON.parse( |
| 72 | readFileSync(path, "utf8").replace(/^\uFEFF/, "") |
| 73 | ) as PackageManifest |
| 74 | } catch { |
| 75 | return undefined |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | const locateProjectRoot = (startDir: string): string | undefined => { |
| 80 | for (let dir = resolve(startDir); ; dir = dirname(dir)) { |
no test coverage detected