hedgequantx 1.2.136 → 1.2.138

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/bin/cli.js CHANGED
@@ -27,7 +27,8 @@ process.on('unhandledRejection', (err) => {
27
27
  program
28
28
  .name('hedgequantx')
29
29
  .description('Prop Futures Algo Trading CLI')
30
- .version(pkg.version);
30
+ .version(pkg.version)
31
+ .option('-u, --update', 'Update HQX to latest version');
31
32
 
32
33
  program
33
34
  .command('start', { isDefault: true })
@@ -44,5 +45,18 @@ program
44
45
  console.log(`HedgeQuantX CLI v${pkg.version}`);
45
46
  });
46
47
 
48
+ // Handle -u flag before parsing commands
49
+ if (process.argv.includes('-u') || process.argv.includes('--update')) {
50
+ const { execSync } = require('child_process');
51
+ console.log('Updating HedgeQuantX...');
52
+ try {
53
+ execSync('npm install -g hedgequantx@latest', { stdio: 'inherit' });
54
+ console.log('Update complete! Run "hqx" to start.');
55
+ } catch (e) {
56
+ console.error('Update failed:', e.message);
57
+ }
58
+ process.exit(0);
59
+ }
60
+
47
61
  // Parse and run
48
62
  program.parse(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "1.2.136",
3
+ "version": "1.2.138",
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
@@ -101,40 +101,74 @@ const banner = async () => {
101
101
  }
102
102
  }
103
103
 
104
- // Draw logo HEDGEQUANTX
104
+ // Draw logo - compact for mobile, full for desktop
105
+ const termWidth = process.stdout.columns || 80;
106
+ const isMobile = termWidth < 60;
107
+
105
108
  console.log(chalk.cyan('╔' + '═'.repeat(innerWidth) + '╗'));
106
109
 
107
- const logo = [
108
- '██╗ ██╗███████╗██████╗ ██████╗ ███████╗ ██████╗ ██╗ ██╗ █████╗ ███╗ ██╗████████╗',
109
- '██║ ██║██╔════╝██╔══██╗██╔════╝ ██╔════╝██╔═══██╗██║ ██║██╔══██╗████╗ ██║╚══██╔══╝',
110
- '███████║█████╗ ██║ ██║██║ ███╗█████╗ ██║ ██║██║ ██║███████║██╔██╗ ██║ ██║ ',
111
- '██╔══██║██╔══╝ ██║ ██║██║ ██║██╔══╝ ██║▄▄ ██║██║ ██║██╔══██║██║╚██╗██║ ██║ ',
112
- '██║ ██║███████╗██████╔╝╚██████╔╝███████╗╚██████╔╝╚██████╔╝██║ ██║██║ ╚████║ ██║ ',
113
- '╚═╝ ╚═╝╚══════╝╚═════╝ ╚═════╝ ╚══════╝ ╚══▀▀═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ '
114
- ];
115
- const logoX = [
116
- '██╗ ██╗',
117
- '╚██╗██╔╝',
118
- ' ╚███╔╝ ',
119
- ' ██╔██╗ ',
120
- '██╔╝ ██╗',
121
- '╚═╝ ╚═╝'
122
- ];
123
-
124
- logo.forEach((line, i) => {
125
- const mainPart = chalk.cyan(line);
126
- const xPart = chalk.yellow(logoX[i]);
127
- const fullLine = mainPart + xPart;
128
- const totalLen = line.length + logoX[i].length;
129
- const padding = innerWidth - totalLen;
130
- const leftPad = Math.floor(padding / 2);
131
- const rightPad = padding - leftPad;
132
- console.log(chalk.cyan('║') + ' '.repeat(leftPad) + fullLine + ' '.repeat(rightPad) + chalk.cyan('║'));
133
- });
110
+ if (isMobile) {
111
+ // Compact HQX logo for mobile - X in yellow
112
+ const logoHQ = [
113
+ '██╗ ██╗ ██████╗ ',
114
+ '██║ ██║██╔═══██╗',
115
+ '███████║██║ ██║',
116
+ '██╔══██║██║▄▄ ██║',
117
+ '██║ ██║╚██████╔╝',
118
+ '╚═╝ ╚═╝ ╚══▀▀═╝ '
119
+ ];
120
+ const logoX = [
121
+ '██╗ ██╗',
122
+ '╚██╗██╔╝',
123
+ ' ╚███╔╝ ',
124
+ ' ██╔██╗ ',
125
+ '██╔╝ ██╗',
126
+ '╚═╝ ╚═╝'
127
+ ];
128
+
129
+ logoHQ.forEach((line, i) => {
130
+ const fullLine = chalk.cyan(line) + chalk.yellow(logoX[i]);
131
+ const totalLen = line.length + logoX[i].length;
132
+ const padding = innerWidth - totalLen;
133
+ const leftPad = Math.floor(padding / 2);
134
+ const rightPad = padding - leftPad;
135
+ console.log(chalk.cyan('║') + ' '.repeat(leftPad) + fullLine + ' '.repeat(rightPad) + chalk.cyan('║'));
136
+ });
137
+ } else {
138
+ // Full HEDGEQUANTX logo for desktop
139
+ const logo = [
140
+ '██╗ ██╗███████╗██████╗ ██████╗ ███████╗ ██████╗ ██╗ ██╗ █████╗ ███╗ ██╗████████╗',
141
+ '██║ ██║██╔════╝██╔══██╗██╔════╝ ██╔════╝██╔═══██╗██║ ██║██╔══██╗████╗ ██║╚══██╔══╝',
142
+ '███████║█████╗ ██║ ██║██║ ███╗█████╗ ██║ ██║██║ ██║███████║██╔██╗ ██║ ██║ ',
143
+ '██╔══██║██╔══╝ ██║ ██║██║ ██║██╔══╝ ██║▄▄ ██║██║ ██║██╔══██║██║╚██╗██║ ██║ ',
144
+ '██║ ██║███████╗██████╔╝╚██████╔╝███████╗╚██████╔╝╚██████╔╝██║ ██║██║ ╚████║ ██║ ',
145
+ '╚═╝ ╚═╝╚══════╝╚═════╝ ╚═════╝ ╚══════╝ ╚══▀▀═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ '
146
+ ];
147
+ const logoX = [
148
+ '██╗ ██╗',
149
+ '╚██╗██╔╝',
150
+ ' ╚███╔╝ ',
151
+ ' ██╔██╗ ',
152
+ '██╔╝ ██╗',
153
+ '╚═╝ ╚═╝'
154
+ ];
155
+
156
+ logo.forEach((line, i) => {
157
+ const mainPart = chalk.cyan(line);
158
+ const xPart = chalk.yellow(logoX[i]);
159
+ const fullLine = mainPart + xPart;
160
+ const totalLen = line.length + logoX[i].length;
161
+ const padding = innerWidth - totalLen;
162
+ const leftPad = Math.floor(padding / 2);
163
+ const rightPad = padding - leftPad;
164
+ console.log(chalk.cyan('║') + ' '.repeat(leftPad) + fullLine + ' '.repeat(rightPad) + chalk.cyan('║'));
165
+ });
166
+ }
134
167
 
135
168
  // Tagline
136
169
  console.log(chalk.cyan('╠' + '═'.repeat(innerWidth) + '╣'));
137
- console.log(chalk.cyan('║') + chalk.white(centerText(`Prop Futures Algo Trading v${version}`, innerWidth)) + chalk.cyan('║'));
170
+ const tagline = isMobile ? `HQX v${version}` : `Prop Futures Algo Trading v${version}`;
171
+ console.log(chalk.cyan('║') + chalk.white(centerText(tagline, innerWidth)) + chalk.cyan('║'));
138
172
 
139
173
  // Stats bar if connected
140
174
  if (statsInfo) {
package/src/ui/box.js CHANGED
@@ -10,14 +10,23 @@ let logoWidth = null;
10
10
 
11
11
  /**
12
12
  * Get logo width for consistent box sizing
13
+ * Adapts to terminal width for mobile devices
13
14
  */
14
15
  const getLogoWidth = () => {
16
+ const termWidth = process.stdout.columns || 80;
17
+
18
+ // Mobile: use terminal width
19
+ if (termWidth < 60) {
20
+ return Math.max(termWidth - 2, 40);
21
+ }
22
+
23
+ // Desktop: use logo width
15
24
  if (!logoWidth) {
16
25
  const logoText = figlet.textSync('HEDGEQUANTX', { font: 'ANSI Shadow' });
17
26
  const lines = logoText.split('\n').filter(line => line.trim().length > 0);
18
27
  logoWidth = Math.max(...lines.map(line => line.length)) + 4;
19
28
  }
20
- return logoWidth;
29
+ return Math.min(logoWidth, termWidth - 2);
21
30
  };
22
31
 
23
32
  /**