(cwd: string)
| 395 | } |
| 396 | |
| 397 | const resolveAotCli = (cwd: string): string | undefined => { |
| 398 | // Yarn PnP has no node_modules on disk; resolve through Node's module hooks |
| 399 | // (avoiding NODE_PATH leaks from pnpm bin shims in non-PnP environments) |
| 400 | const found = |
| 401 | findAotInNodeModules(cwd) ?? |
| 402 | ("pnp" in process.versions ? findAotViaRequire(cwd) : undefined) |
| 403 | if (!found) return undefined |
| 404 | const { pkgDir } = found |
| 405 | const builtCli = join(pkgDir, "out", "cli.js") |
| 406 | if (existsSync(builtCli)) return builtCli |
| 407 | const srcCli = join(pkgDir, "cli.ts") |
| 408 | if (existsSync(srcCli)) return srcCli |
| 409 | return undefined |
| 410 | } |
| 411 | |
| 412 | const aotSubcommands = new Set(["check", "emit", "declare"]) |
| 413 |
no test coverage detected