hedgequantx 1.2.136 → 1.2.137

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 +15 -1
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -27,7 +27,8 @@ process.on('unhandledRejection', (err) => {
27
27
  program
28
28
  .name('hedgequantx')
29
29
  .description('Prop Futures Algo Trading CLI')
30
- .version(pkg.version);
30
+ .version(pkg.version)
31
+ .option('-u, --update', 'Update HQX to latest version');
31
32
 
32
33
  program
33
34
  .command('start', { isDefault: true })
@@ -44,5 +45,18 @@ program
44
45
  console.log(`HedgeQuantX CLI v${pkg.version}`);
45
46
  });
46
47
 
48
+ // Handle -u flag before parsing commands
49
+ if (process.argv.includes('-u') || process.argv.includes('--update')) {
50
+ const { execSync } = require('child_process');
51
+ console.log('Updating HedgeQuantX...');
52
+ try {
53
+ execSync('npm install -g hedgequantx@latest', { stdio: 'inherit' });
54
+ console.log('Update complete! Run "hqx" to start.');
55
+ } catch (e) {
56
+ console.error('Update failed:', e.message);
57
+ }
58
+ process.exit(0);
59
+ }
60
+
47
61
  // Parse and run
48
62
  program.parse(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "1.2.136",
3
+ "version": "1.2.137",
4
4
  "description": "Prop Futures Algo Trading CLI - Connect to Topstep, Alpha Futures, and other prop firms",
5
5
  "main": "src/app.js",
6
6
  "bin": {