feat(cli): route runtime commands and add bd diagnostics to status
This commit is contained in:
parent
654c8eb4c8
commit
34c2b7f4eb
5 changed files with 78 additions and 3 deletions
|
|
@ -5,7 +5,14 @@ const { spawnSync } = require('node:child_process');
|
|||
const path = require('node:path');
|
||||
|
||||
const cliPath = path.resolve(__dirname, '../src/cli/beadboard-cli.ts');
|
||||
const result = spawnSync(process.execPath, ['--import', 'tsx', cliPath, ...process.argv.slice(2)], {
|
||||
const launcherPath = path.resolve(__dirname, '../install/beadboard.mjs');
|
||||
const command = process.argv[2] || 'help';
|
||||
const launcherCommands = new Set(['start', 'open', 'status']);
|
||||
const targetArgs = launcherCommands.has(command)
|
||||
? [launcherPath, ...process.argv.slice(2)]
|
||||
: ['--import', 'tsx', cliPath, ...process.argv.slice(2)];
|
||||
|
||||
const result = spawnSync(process.execPath, targetArgs, {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue