(cwd: string)
| 366 | } |
| 367 | |
| 368 | const findAotInNodeModules = (cwd: string): FoundAotPackage | undefined => { |
| 369 | for (let dir = resolve(cwd); ; dir = dirname(dir)) { |
| 370 | const pkgDir = join(dir, "node_modules", "@ark", "aot") |
| 371 | const manifest = readManifest(pkgDir) |
| 372 | if (manifest?.name === "@ark/aot") return { pkgDir, manifest } |
| 373 | const parent = dirname(dir) |
| 374 | if (parent === dir) return undefined |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | const findAotViaRequire = (cwd: string): FoundAotPackage | undefined => { |
| 379 | const req = createRequire(join(resolve(cwd), "package.json")) |
no test coverage detected