hedgequantx 2.6.14 → 2.6.15

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.6.14",
3
+ "version": "2.6.15",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -219,10 +219,24 @@ const handleUpdate = async () => {
219
219
  }
220
220
 
221
221
  spinner.succeed(`UPDATED TO v${latestVersion}!`);
222
- console.log(chalk.green('\n UPDATE COMPLETE!'));
223
- console.log(chalk.yellow(' PLEASE RESTART HQX TO USE NEW VERSION:'));
224
- console.log(chalk.white(' hqx\n'));
225
- await prompts.waitForEnter();
222
+ console.log(chalk.cyan('\n RESTARTING HQX...\n'));
223
+
224
+ // Clean terminal state before restart
225
+ if (process.stdin.isTTY) {
226
+ process.stdin.setRawMode(false);
227
+ }
228
+ process.stdin.pause();
229
+
230
+ // Small delay then restart with clean stdio
231
+ await new Promise(r => setTimeout(r, 500));
232
+
233
+ // Use spawnSync to restart - replaces current process
234
+ const { spawnSync } = require('child_process');
235
+ spawnSync('hqx', [], {
236
+ stdio: 'inherit',
237
+ shell: true
238
+ });
239
+
226
240
  process.exit(0);
227
241
 
228
242
  } catch (error) {