hedgequantx 2.4.42 → 2.4.44

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 +40 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.4.42",
3
+ "version": "2.4.44",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
package/src/app.js CHANGED
@@ -143,6 +143,38 @@ const banner = async (clear = true) => {
143
143
 
144
144
  const tagline = isMobile ? `HQX v${version}` : `PROP FUTURES ALGO TRADING v${version}`;
145
145
  console.log(chalk.cyan('║') + chalk.white(centerText(tagline, innerWidth)) + chalk.cyan('║'));
146
+
147
+ // Close box for loading state
148
+ console.log(chalk.cyan('╚' + '═'.repeat(innerWidth) + '╝'));
149
+ };
150
+
151
+ /**
152
+ * Display banner WITHOUT bottom border (for dashboard to continue)
153
+ */
154
+ const bannerOpen = async () => {
155
+ const termWidth = process.stdout.columns || 100;
156
+ const isMobile = termWidth < 60;
157
+ const boxWidth = isMobile ? Math.max(termWidth - 2, 40) : Math.max(getLogoWidth(), 98);
158
+ const innerWidth = boxWidth - 2;
159
+ const version = require('../package.json').version;
160
+
161
+ console.log(chalk.cyan('╔' + '═'.repeat(innerWidth) + '╗'));
162
+
163
+ const logoLines = isMobile ? getMobileLogo() : getFullLogo();
164
+
165
+ for (const [hq, x] of logoLines) {
166
+ const fullLine = chalk.cyan(hq) + chalk.yellow(x);
167
+ const totalLen = hq.length + x.length;
168
+ const padding = innerWidth - totalLen;
169
+ const leftPad = Math.floor(padding / 2);
170
+ console.log(chalk.cyan('║') + ' '.repeat(leftPad) + fullLine + ' '.repeat(padding - leftPad) + chalk.cyan('║'));
171
+ }
172
+
173
+ console.log(chalk.cyan('╠' + '═'.repeat(innerWidth) + '╣'));
174
+
175
+ const tagline = isMobile ? `HQX v${version}` : `PROP FUTURES ALGO TRADING v${version}`;
176
+ console.log(chalk.cyan('║') + chalk.white(centerText(tagline, innerWidth)) + chalk.cyan('║'));
177
+ // NO bottom border - dashboardMenu will continue
146
178
  };
147
179
 
148
180
  /**
@@ -172,13 +204,10 @@ const getMobileLogo = () => [
172
204
  ];
173
205
 
174
206
  /**
175
- * Display banner with closing border
207
+ * Display banner with closing border (alias for banner)
176
208
  */
177
209
  const bannerClosed = async () => {
178
210
  await banner();
179
- const termWidth = process.stdout.columns || 100;
180
- const boxWidth = termWidth < 60 ? Math.max(termWidth - 2, 40) : Math.max(getLogoWidth(), 98);
181
- console.log(chalk.cyan('╚' + '═'.repeat(boxWidth - 2) + '╝'));
182
211
  };
183
212
 
184
213
  // ==================== MENUS ====================
@@ -262,14 +291,17 @@ const run = async () => {
262
291
  await refreshStats();
263
292
  }
264
293
  } else {
265
- // Show spinner while refreshing stats
266
- const spinner = ora({ text: 'LOADING...', color: 'cyan' }).start();
294
+ // Show banner with loading spinner
295
+ console.clear();
296
+ await banner(false);
297
+
298
+ const spinner = ora({ text: 'LOADING DASHBOARD...', color: 'cyan' }).start();
267
299
  await refreshStats();
268
300
  spinner.stop();
269
301
 
270
- // Clear and display dashboard
302
+ // Redraw clean dashboard (banner without bottom border + menu)
271
303
  console.clear();
272
- await banner(false);
304
+ await bannerOpen();
273
305
 
274
306
  const action = await dashboardMenu(currentService);
275
307