@makeshkumar/blueorch-studio 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cli.js +14 -3
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  import { program } from 'commander';
9
9
  import { createRequire } from 'module';
10
- import { fileURLToPath } from 'url';
10
+ import { fileURLToPath, pathToFileURL } from 'url';
11
11
  import { dirname, join } from 'path';
12
12
  import open from 'open';
13
13
 
@@ -25,7 +25,7 @@ program
25
25
  .description(pkg.description)
26
26
  .version(pkg.version)
27
27
  .option('-p, --port <number>', 'Port to run the server on', '3000')
28
- .parse();
28
+ .parse(process.argv);
29
29
 
30
30
  const { port: portStr } = program.opts();
31
31
  const port = Number(portStr);
@@ -44,7 +44,18 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'production';
44
44
  console.log(`[INIT] ${ts()} BlueOrch Studio | port=${port} | NODE_ENV=${process.env.NODE_ENV}`);
45
45
 
46
46
  // ─── Start the Express server ─────────────────────────────────────────────────
47
- await import(join(__dirname, '../server.js'));
47
+ const serverPath = join(__dirname, '../server.js');
48
+ const serverUrl = pathToFileURL(serverPath).href;
49
+
50
+ try {
51
+ // Keep argv intact so any downstream startup logic can still inspect CLI args.
52
+ await import(serverUrl);
53
+ } catch (error) {
54
+ const message = error instanceof Error ? error.stack ?? error.message : String(error);
55
+ console.error(`[ERROR] ${ts()} Failed to start BlueOrch Studio backend`);
56
+ console.error(message);
57
+ process.exit(1);
58
+ }
48
59
 
49
60
  // ─── Open browser once server is healthy ─────────────────────────────────────
50
61
  const appUrl = `http://localhost:${port}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makeshkumar/blueorch-studio",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "BlueOrch Studio — Modular MCP Orchestrator with LLM chat, served as an npx command",
5
5
  "type": "module",
6
6
  "main": "server.js",