hedgequantx 1.8.3 → 1.8.4

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.3",
3
+ "version": "1.8.4",
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": {
@@ -91,36 +91,27 @@ const numberInput = async (message, defaultVal = 1, min = 1, max = 1000) => {
91
91
  };
92
92
 
93
93
  /**
94
- * Select - display options and text input, map to value
94
+ * Select - arrow keys navigation
95
95
  */
96
96
  const selectOption = async (message, options) => {
97
97
  prepareStdin();
98
98
 
99
- // Display options
100
- options.forEach((opt, i) => {
101
- console.log(` [${i + 1}] ${opt.label}`);
102
- });
103
- console.log();
99
+ const choices = options.map(opt => ({
100
+ name: opt.label,
101
+ value: opt.value
102
+ }));
104
103
 
105
104
  const { value } = await inquirer.prompt([{
106
- type: 'input',
105
+ type: 'list',
107
106
  name: 'value',
108
107
  message,
109
- prefix: ''
108
+ choices,
109
+ prefix: '',
110
+ loop: false,
111
+ pageSize: 15
110
112
  }]);
111
113
 
112
- const input = (value || '').toLowerCase().trim();
113
-
114
- // Find by value
115
- for (const opt of options) {
116
- if (String(opt.value).toLowerCase() === input) return opt.value;
117
- }
118
-
119
- // Find by index (1-based)
120
- const idx = parseInt(input) - 1;
121
- if (idx >= 0 && idx < options.length) return options[idx].value;
122
-
123
- return null;
114
+ return value;
124
115
  };
125
116
 
126
117
  module.exports = {