nova-terminal-assistant 0.1.2 → 0.1.3

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/nova.js +15 -9
  2. package/package.json +1 -1
package/bin/nova.js CHANGED
@@ -1,15 +1,21 @@
1
1
  #!/usr/bin/env node
2
+ import { pathToFileURL } from 'url';
3
+ import { spawn } from 'child_process';
4
+ import { fileURLToPath } from 'url';
5
+ import { dirname, join } from 'path';
2
6
 
3
- // Nova CLI Entry Point
4
- // Uses tsx to run TypeScript directly
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = dirname(__filename);
5
9
 
6
- import { register } from 'tsx/esm';
7
- register();
10
+ // Use tsx to run the TypeScript entry point
11
+ const tsxPath = join(__dirname, '../node_modules/tsx/dist/cli.mjs');
12
+ const appPath = join(__dirname, '../src/startup/NovaApp.ts');
8
13
 
9
- import { NovaApp } from '../src/startup/NovaApp.ts';
14
+ const child = spawn(process.executablePath, [tsxPath, appPath, ...process.argv.slice(2)], {
15
+ stdio: 'inherit',
16
+ env: process.env
17
+ });
10
18
 
11
- const app = new NovaApp();
12
- app.run().catch((err) => {
13
- console.error('Fatal error:', err.message);
14
- process.exit(1);
19
+ child.on('close', (code) => {
20
+ process.exit(code || 0);
15
21
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nova-terminal-assistant",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Nova CLI - Next-generation AI-powered terminal assistant",
5
5
  "type": "module",
6
6
  "bin": {