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