hedgequantx 2.9.6 → 2.9.8

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": "2.9.6",
3
+ "version": "2.9.8",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
package/src/app.js CHANGED
@@ -320,7 +320,10 @@ const run = async () => {
320
320
  break;
321
321
 
322
322
  case 'update':
323
- await handleUpdate();
323
+ const updateResult = await handleUpdate();
324
+ if (updateResult === 'exit') {
325
+ running = false;
326
+ }
324
327
  break;
325
328
 
326
329
  case 'disconnect':
@@ -243,10 +243,10 @@ const handleUpdate = async () => {
243
243
  spinner.succeed(`UPDATED TO V${latestVersion}!`);
244
244
  console.log(chalk.green('\n ✓ UPDATE SUCCESSFUL!'));
245
245
  console.log(chalk.yellow('\n Please restart HQX to use the new version.'));
246
- console.log(chalk.cyan(' Run: hqx'));
247
- console.log();
246
+ console.log(chalk.cyan(' Run: hqx\n'));
248
247
  await prompts.waitForEnter();
249
- process.exit(0);
248
+ // Return to let the app exit naturally from the menu loop
249
+ return 'exit';
250
250
 
251
251
  } catch (error) {
252
252
  if (spinner) spinner.fail('UPDATE ERROR');