()
| 44 | } |
| 45 | |
| 46 | export function isRunningFromSourceBuild(): boolean { |
| 47 | const invokedPath = process.argv[1] || '' |
| 48 | const normalizedInvokedPath = normalizeRuntimePath(invokedPath) |
| 49 | if (!normalizedInvokedPath.endsWith('/dist/cli.js')) { |
| 50 | return false |
| 51 | } |
| 52 | |
| 53 | try { |
| 54 | const repoRoot = resolve(dirname(invokedPath), '..') |
| 55 | return ( |
| 56 | existsSync(join(repoRoot, 'src', 'entrypoints', 'cli.tsx')) && |
| 57 | existsSync(join(repoRoot, 'build', 'build.mjs')) |
| 58 | ) |
| 59 | } catch { |
| 60 | return false |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | export function isDevelopmentLikeBuild(): boolean { |
| 65 | return ( |
no test coverage detected