hedgequantx 1.2.118 → 1.2.120

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "1.2.118",
3
+ "version": "1.2.120",
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": {
package/src/app.js CHANGED
@@ -7,7 +7,7 @@ const chalk = require('chalk');
7
7
  const inquirer = require('inquirer');
8
8
  const ora = require('ora');
9
9
  const figlet = require('figlet');
10
- const { execSync } = require('child_process');
10
+ const { execSync, spawn } = require('child_process');
11
11
  const path = require('path');
12
12
 
13
13
  const { ProjectXService, connections } = require('./services');
@@ -691,32 +691,22 @@ const handleUpdate = async () => {
691
691
  // Update via npm
692
692
  spinner.text = `Updating v${currentVersion} -> v${latestVersion}...`;
693
693
  try {
694
- exec('npm install -g hedgequantx@latest', { stdio: 'pipe' });
694
+ execSync('npm install -g hedgequantx@latest', { stdio: 'pipe' });
695
695
  } catch (e) {
696
696
  spinner.fail('Update failed - try manually: npm install -g hedgequantx@latest');
697
+ console.log(chalk.gray(` Error: ${e.message}`));
697
698
  return;
698
699
  }
699
700
 
700
701
  spinner.succeed('CLI updated!');
701
702
  console.log();
702
- console.log(chalk.green(` Version: v${currentVersion} -> v${latestVersion}`));
703
+ console.log(chalk.green(` Updated: v${currentVersion} -> v${latestVersion}`));
703
704
  console.log();
704
- console.log(chalk.cyan(' Restarting...'));
705
+ console.log(chalk.cyan(' Please restart HQX to apply changes.'));
705
706
  console.log();
706
707
 
707
- // Restart CLI
708
- const cliPath = exec('npm root -g', { stdio: 'pipe' }).toString().trim();
709
- const child = spawn(process.argv[0], [path.join(cliPath, 'hedgequantx', 'bin', 'cli.js')], {
710
- stdio: 'inherit',
711
- shell: true
712
- });
713
-
714
- child.on('exit', (code) => {
715
- process.exit(code);
716
- });
717
-
718
- // Stop current process loop
719
- return 'restart';
708
+ // Exit so user can restart
709
+ process.exit(0);
720
710
 
721
711
  } catch (error) {
722
712
  spinner.fail('Update failed: ' + error.message);
package/src/pages/algo.js CHANGED
@@ -237,7 +237,7 @@ const selectSymbolMenu = async (service, account) => {
237
237
  name: 'selectedSymbol',
238
238
  message: chalk.white.bold('Select Symbol:'),
239
239
  choices: symbolChoices,
240
- pageSize: 20,
240
+ pageSize: 50,
241
241
  loop: false
242
242
  }
243
243
  ]);