hedgequantx 1.8.15 → 1.8.17

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.8.15",
3
+ "version": "1.8.17",
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": {
@@ -186,9 +186,9 @@ class AlgoUI {
186
186
 
187
187
  this._line(chalk.cyan(GM));
188
188
 
189
- // Row 5: Latency | Platform
189
+ // Row 5: Latency | Propfirm
190
190
  const r5c1 = buildCell('Latency', `${stats.latency || 0}ms`, latencyColor, colL);
191
- const r5c2 = buildCell('Platform', stats.platform || 'N/A', chalk.cyan, colR);
191
+ const r5c2 = buildCell('Propfirm', stats.propfirm || 'N/A', chalk.cyan, colR);
192
192
  row(r5c1.padded, r5c2.padded);
193
193
 
194
194
  this._line(chalk.cyan(GB));
@@ -6,12 +6,27 @@
6
6
  const inquirer = require('inquirer');
7
7
 
8
8
  /**
9
- * Ensure stdin is ready
9
+ * Ensure stdin is ready and clear any buffered input
10
10
  */
11
11
  const prepareStdin = () => {
12
12
  try {
13
+ // Resume if paused
13
14
  if (process.stdin.isPaused()) process.stdin.resume();
14
- if (process.stdin.isTTY && process.stdin.isRaw) process.stdin.setRawMode(false);
15
+
16
+ // Ensure raw mode is off for line-based input
17
+ if (process.stdin.isTTY && process.stdin.setRawMode) {
18
+ process.stdin.setRawMode(false);
19
+ }
20
+
21
+ // Clear any buffered data by removing all listeners temporarily
22
+ const listeners = process.stdin.listeners('data');
23
+ process.stdin.removeAllListeners('data');
24
+
25
+ // Drain any pending input
26
+ process.stdin.read();
27
+
28
+ // Restore listeners
29
+ listeners.forEach(l => process.stdin.on('data', l));
15
30
  } catch (e) {}
16
31
  };
17
32