fleetbo-cockpit-cli 1.0.105 → 1.0.106
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/cli.js +12 -14
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -6,32 +6,30 @@ process.stdout.write("\x1b[1A\x1b[2K".repeat(4));
|
|
|
6
6
|
console.clear();
|
|
7
7
|
|
|
8
8
|
// ============================================
|
|
9
|
-
// 1. MOTEUR D'ANIMATION PRÉ-BOOT (
|
|
9
|
+
// 1. MOTEUR D'ANIMATION PRÉ-BOOT (Blindé)
|
|
10
10
|
// ============================================
|
|
11
11
|
class FleetboSpinner {
|
|
12
12
|
constructor() {
|
|
13
13
|
this.frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
14
14
|
this.idx = 0;
|
|
15
15
|
this.timer = null;
|
|
16
|
-
this.currentMessage = "";
|
|
16
|
+
this.currentMessage = "";
|
|
17
17
|
}
|
|
18
18
|
start(message) {
|
|
19
|
-
this.currentMessage = message;
|
|
19
|
+
this.currentMessage = message;
|
|
20
20
|
|
|
21
21
|
if (this.timer) {
|
|
22
|
-
|
|
23
|
-
process.stdout.write(`\r\x1b[2K \x1b[32m${this.frames[this.idx]}\x1b[0m ${this.currentMessage}`);
|
|
22
|
+
process.stdout.write(`\r\x1b[2K \x1b[32m${this.frames[this.idx]}\x1b[0m ${this.currentMessage}`);
|
|
24
23
|
return;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
process.stdout.write('\x1b[?25l');
|
|
26
|
+
process.stdout.write('\x1b[?25l');
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
process.stdout.write(`\r\x1b[2K \x1b[32m${this.frames[this.idx]}\x1b[0m ${this.currentMessage}`);
|
|
28
|
+
process.stdout.write(`\r\x1b[2K \x1b[32m${this.frames[this.idx]}\x1b[0m ${this.currentMessage}`);
|
|
31
29
|
this.idx = (this.idx + 1) % this.frames.length;
|
|
32
30
|
|
|
33
31
|
this.timer = setInterval(() => {
|
|
34
|
-
process.stdout.write(`\r\x1b[2K
|
|
32
|
+
process.stdout.write(`\r\x1b[2K \x1b[32m${this.frames[this.idx]}\x1b[0m ${this.currentMessage}`);
|
|
35
33
|
this.idx = (this.idx + 1) % this.frames.length;
|
|
36
34
|
}, 80);
|
|
37
35
|
}
|
|
@@ -40,7 +38,8 @@ class FleetboSpinner {
|
|
|
40
38
|
clearInterval(this.timer);
|
|
41
39
|
this.timer = null;
|
|
42
40
|
}
|
|
43
|
-
|
|
41
|
+
// 🛡️ HARD-CLEAR : On écrase physiquement avec des espaces pour éviter le Ghosting
|
|
42
|
+
process.stdout.write('\r' + ' '.repeat(60) + '\r\x1b[?25h');
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
const osSpinner = new FleetboSpinner();
|
|
@@ -562,7 +561,7 @@ if (command === 'alex') {
|
|
|
562
561
|
} catch (error) {
|
|
563
562
|
// 🛑 SÉCURITÉ : Arrête le moteur global s'il y a un crash
|
|
564
563
|
osSpinner.stop();
|
|
565
|
-
|
|
564
|
+
|
|
566
565
|
process.stdout.write('\r' + ' '.repeat(50) + '\r');
|
|
567
566
|
console.error('\n\x1b[31m Alex Error:\x1b[0m ' + (error.response?.data?.message || error.message));
|
|
568
567
|
}
|
|
@@ -1051,10 +1050,9 @@ else {
|
|
|
1051
1050
|
}
|
|
1052
1051
|
|
|
1053
1052
|
async function runDevEnvironment() {
|
|
1053
|
+
osSpinner.stop(); // 🛑 Tue le spinner Pre-Boot avant le console.log
|
|
1054
1054
|
console.log(`[Fleetbo] 🛡️ Initializing Dev Environment...`);
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1055
|
+
|
|
1058
1056
|
killNetworkService();
|
|
1059
1057
|
killProcessOnPort(PORT);
|
|
1060
1058
|
|