Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

Commit 21c9fc4

Browse files
committed
Merge branch 'beta' into feat/mcp-ui-apps
2 parents cca5f43 + 93d07da commit 21c9fc4

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

packages/cli/src/index.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,14 @@
22
import { Command } from 'commander';
33
import { buildWidgets } from './build';
44
import { spawn } from 'node:child_process';
5-
import { existsSync, readFileSync } from 'node:fs';
5+
import { readFileSync } from 'node:fs';
66
import { access } from 'node:fs/promises';
77
import path from 'node:path';
88
import open from 'open';
99
const program = new Command();
1010

1111

12-
// Find the CLI package.json file
13-
function findPackageJson() {
14-
const possiblePaths = [
15-
path.join(__dirname, '../package.json'), // From dist/
16-
path.join(__dirname, '../../package.json'), // From dist/
17-
path.join(process.cwd(), 'package.json'), // Current working directory
18-
]
19-
20-
for (const packagePath of possiblePaths) {
21-
if (existsSync(packagePath)) {
22-
return packagePath
23-
}
24-
}
25-
26-
throw new Error('Could not find package.json file')
27-
}
28-
29-
const packageContent = readFileSync(findPackageJson(), 'utf-8')
12+
const packageContent = readFileSync(path.join(__dirname, '../package.json'), 'utf-8')
3013
const packageJson = JSON.parse(packageContent)
3114
const packageVersion = packageJson.version || 'unknown'
3215

0 commit comments

Comments
 (0)