hedgequantx 2.7.62 → 2.7.64

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.7.62",
3
+ "version": "2.7.64",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -232,13 +232,22 @@ const handleCliProxyConnection = async (provider, config, boxWidth) => {
232
232
  await prompts.waitForEnter();
233
233
  }
234
234
 
235
- // Kill the login child process if still running
235
+ // Wait for login process to save the auth file (it exits on its own after saving)
236
+ const spinner = ora({ text: 'SAVING CREDENTIALS...', color: 'yellow' }).start();
236
237
  if (loginResult.childProcess) {
237
- try { loginResult.childProcess.kill(); } catch (e) { /* ignore */ }
238
+ await new Promise((resolve) => {
239
+ const timeout = setTimeout(() => {
240
+ try { loginResult.childProcess.kill(); } catch (e) { /* ignore */ }
241
+ resolve();
242
+ }, 10000);
243
+ loginResult.childProcess.on('exit', () => {
244
+ clearTimeout(timeout);
245
+ resolve();
246
+ });
247
+ });
238
248
  }
239
-
240
- // Fetch models from CLIProxy
241
- const spinner = ora({ text: 'LOADING MODELS...', color: 'yellow' }).start();
249
+ spinner.text = 'LOADING MODELS...';
250
+ await new Promise(r => setTimeout(r, 1000));
242
251
  const modelsResult = await cliproxy.fetchProviderModels(provider.id);
243
252
  spinner.stop();
244
253
 
@@ -354,9 +354,9 @@ const getLoginUrl = async (provider) => {
354
354
 
355
355
  const headless = isHeadless();
356
356
 
357
- // For headless/VPS, use -no-browser flag
357
+ // For headless/VPS, use -no-browser flag and specify auth-dir
358
358
  return new Promise((resolve) => {
359
- const args = [flag, '-no-browser'];
359
+ const args = [flag, '-no-browser', '-auth-dir', AUTH_DIR];
360
360
  const child = spawn(BINARY_PATH, args, {
361
361
  cwd: INSTALL_DIR
362
362
  });