MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / loadPackageVersion

Function loadPackageVersion

cli/src/index.tsx:53–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51const require = createRequire(import.meta.url)
52
53function loadPackageVersion(): string {
54 const env = getCliEnv()
55 if (env.CODEBUFF_CLI_VERSION) {
56 return env.CODEBUFF_CLI_VERSION
57 }
58
59 try {
60 const pkg = require('../package.json') as { version?: string }
61 if (pkg.version) {
62 return pkg.version
63 }
64 } catch {
65 // Continue to dev fallback
66 }
67
68 return 'dev'
69}
70
71// Configure TanStack Query's focusManager for terminal environments
72// This is required because there's no browser visibility API in terminal apps

Callers 2

parseArgsFunction · 0.85
mainFunction · 0.85

Calls 1

getCliEnvFunction · 0.90

Tested by

no test coverage detected