hedgequantx 2.7.33 → 2.7.35

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": "2.7.33",
3
+ "version": "2.7.35",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
package/src/app.js CHANGED
@@ -109,7 +109,7 @@ const refreshStats = async () => {
109
109
 
110
110
  // ==================== BANNER ====================
111
111
 
112
- const banner = async () => {
112
+ const banner = async (withLoading = false) => {
113
113
  console.clear();
114
114
 
115
115
  const termWidth = process.stdout.columns || 100;
@@ -134,16 +134,15 @@ const banner = async () => {
134
134
 
135
135
  const tagline = isMobile ? `HQX v${version}` : `Prop Futures Algo Trading v${version}`;
136
136
  console.log(chalk.cyan('║') + chalk.white(centerText(tagline, innerWidth)) + chalk.cyan('║'));
137
- };
138
-
139
- /**
140
- * Display banner with closed bottom (standalone)
141
- */
142
- const bannerClosed = async () => {
143
- await banner();
144
- const termWidth = process.stdout.columns || 100;
145
- const boxWidth = termWidth < 60 ? Math.max(termWidth - 2, 40) : Math.max(getLogoWidth(), 98);
146
- console.log(chalk.cyan('╚' + '═'.repeat(boxWidth - 2) + '╝'));
137
+
138
+ // Show loading message if requested
139
+ if (withLoading) {
140
+ const loadingText = ' LOADING DASHBOARD...';
141
+ const loadingPad = innerWidth - loadingText.length;
142
+ console.log(chalk.cyan('╠' + '═'.repeat(innerWidth) + '╣'));
143
+ console.log(chalk.cyan('║') + chalk.yellow(loadingText) + ' '.repeat(loadingPad) + chalk.cyan('║'));
144
+ console.log(chalk.cyan('╚' + '═'.repeat(innerWidth) + '╝'));
145
+ }
147
146
  };
148
147
 
149
148
  const getFullLogo = () => [
@@ -170,17 +169,8 @@ const run = async () => {
170
169
  try {
171
170
  log.info('Starting HQX CLI');
172
171
 
173
- // First launch - show banner with loading
174
- await banner();
175
- const boxWidth = getLogoWidth();
176
- const innerWidth = boxWidth - 2;
177
-
178
- // Show loading inside the box (no extra borders)
179
- const loadingText = ' LOADING DASHBOARD...';
180
- const loadingPad = innerWidth - loadingText.length;
181
- console.log(chalk.cyan('╠' + '═'.repeat(innerWidth) + '╣'));
182
- console.log(chalk.cyan('║') + chalk.yellow(loadingText) + ' '.repeat(loadingPad) + chalk.cyan('║'));
183
- console.log(chalk.cyan('╚' + '═'.repeat(innerWidth) + '╝'));
172
+ // First launch - show banner with loading (closed box)
173
+ await banner(true);
184
174
 
185
175
  const restored = await connections.restoreFromStorage();
186
176
 
@@ -21,7 +21,8 @@ const INSTALL_DIR = path.join(os.homedir(), '.hqx', 'cliproxy');
21
21
  const BINARY_NAME = process.platform === 'win32' ? 'cli-proxy-api.exe' : 'cli-proxy-api';
22
22
  const BINARY_PATH = path.join(INSTALL_DIR, BINARY_NAME);
23
23
  const PID_FILE = path.join(INSTALL_DIR, 'cliproxy.pid');
24
- const AUTH_DIR = path.join(INSTALL_DIR, 'auths');
24
+ // Use default CLIProxyAPI auth directory (where -claude-login saves tokens)
25
+ const AUTH_DIR = path.join(os.homedir(), '.cli-proxy-api');
25
26
 
26
27
  // Default port
27
28
  const DEFAULT_PORT = 8317;
@@ -210,11 +211,10 @@ const isRunning = async () => {
210
211
  const CONFIG_PATH = path.join(INSTALL_DIR, 'config.yaml');
211
212
 
212
213
  /**
213
- * Create config file if not exists
214
+ * Create or update config file
214
215
  */
215
216
  const ensureConfig = () => {
216
- if (fs.existsSync(CONFIG_PATH)) return;
217
-
217
+ // Always write config to ensure auth-dir is correct
218
218
  const config = `# HQX CLIProxyAPI Config
219
219
  host: "127.0.0.1"
220
220
  port: ${DEFAULT_PORT}