hedgequantx 1.2.33 → 1.2.34

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/app.js +7 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "1.2.33",
3
+ "version": "1.2.34",
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": {
package/src/app.js CHANGED
@@ -193,17 +193,20 @@ const projectXMenu = async () => {
193
193
  console.log(chalk.cyan('║') + chalk.white.bold(centerText('SELECT PROPFIRM', innerWidth)) + chalk.cyan('║'));
194
194
  console.log(chalk.cyan('║') + ' '.repeat(innerWidth) + chalk.cyan('║'));
195
195
 
196
- // Display in 3 columns
196
+ // Display in 3 columns with fixed width alignment
197
197
  const rows = Math.ceil(numbered.length / numCols);
198
+ const maxNum = numbered.length;
199
+ const numWidth = maxNum >= 10 ? 4 : 3; // [XX] or [X]
200
+
198
201
  for (let row = 0; row < rows; row++) {
199
202
  let line = '';
200
203
  for (let col = 0; col < numCols; col++) {
201
204
  const idx = row + col * rows;
202
205
  if (idx < numbered.length) {
203
206
  const item = numbered[idx];
204
- const text = `[${item.num}] ${item.name}`;
205
- const coloredText = chalk.cyan(`[${item.num}]`) + ' ' + chalk.white(item.name);
206
- const textLen = text.length;
207
+ const numStr = item.num.toString().padStart(2, ' ');
208
+ const coloredText = chalk.cyan(`[${numStr}]`) + ' ' + chalk.white(item.name);
209
+ const textLen = 4 + 1 + item.name.length; // [XX] + space + name
207
210
  const padding = colWidth - textLen - 2;
208
211
  line += ' ' + coloredText + ' '.repeat(Math.max(0, padding));
209
212
  } else {