hedgequantx 2.7.41 → 2.7.42
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 +1 -1
- package/src/app.js +10 -11
package/package.json
CHANGED
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 () => {
|
|
113
113
|
console.clear();
|
|
114
114
|
|
|
115
115
|
const termWidth = process.stdout.columns || 100;
|
|
@@ -135,14 +135,6 @@ const banner = async (withLoading = false) => {
|
|
|
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
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
|
-
}
|
|
145
|
-
|
|
146
138
|
// ALWAYS close the banner
|
|
147
139
|
console.log(chalk.cyan('╚' + '═'.repeat(innerWidth) + '╝'));
|
|
148
140
|
};
|
|
@@ -171,15 +163,22 @@ const run = async () => {
|
|
|
171
163
|
try {
|
|
172
164
|
log.info('Starting HQX CLI');
|
|
173
165
|
|
|
174
|
-
// First launch - show banner
|
|
175
|
-
await banner(
|
|
166
|
+
// First launch - show banner then spinner
|
|
167
|
+
await banner();
|
|
168
|
+
|
|
169
|
+
const spinner = ora({ text: 'LOADING DASHBOARD...', color: 'yellow' }).start();
|
|
176
170
|
|
|
177
171
|
const restored = await connections.restoreFromStorage();
|
|
178
172
|
|
|
179
173
|
if (restored) {
|
|
180
174
|
currentService = connections.getAll()[0].service;
|
|
181
175
|
await refreshStats();
|
|
176
|
+
spinner.succeed('SESSION RESTORED');
|
|
177
|
+
} else {
|
|
178
|
+
spinner.stop();
|
|
182
179
|
}
|
|
180
|
+
|
|
181
|
+
await new Promise(r => setTimeout(r, 500));
|
|
183
182
|
|
|
184
183
|
// Main loop
|
|
185
184
|
while (true) {
|