(cwd: string)
| 376 | } |
| 377 | |
| 378 | const findAotViaRequire = (cwd: string): FoundAotPackage | undefined => { |
| 379 | const req = createRequire(join(resolve(cwd), "package.json")) |
| 380 | try { |
| 381 | const found = findAotManifest(dirname(req.resolve("@ark/aot"))) |
| 382 | if (found) return found |
| 383 | } catch { |
| 384 | // fall back to resolving package.json directly when root entry isn't available |
| 385 | } |
| 386 | try { |
| 387 | const pkgPath = req.resolve("@ark/aot/package.json") |
| 388 | const pkgDir = dirname(pkgPath) |
| 389 | const manifest = readManifest(pkgDir) |
| 390 | if (manifest) return { pkgDir, manifest } |
| 391 | } catch { |
| 392 | return undefined |
| 393 | } |
| 394 | return undefined |
| 395 | } |
| 396 | |
| 397 | const resolveAotCli = (cwd: string): string | undefined => { |
| 398 | // Yarn PnP has no node_modules on disk; resolve through Node's module hooks |
no test coverage detected