()
| 8 | * Works for both tsx dev (src/) and bundled (dist/). |
| 9 | */ |
| 10 | export function getVersion(): string { |
| 11 | if (cached) return cached |
| 12 | try { |
| 13 | const pkgPath = resolveCliPath('package.json') |
| 14 | cached = JSON.parse(readFileSync(pkgPath, 'utf-8')).version |
| 15 | } catch { |
| 16 | cached = '0.0.0-dev' |
| 17 | } |
| 18 | return cached! |
| 19 | } |
no test coverage detected