fleetbo-cockpit-cli 1.0.199 → 1.0.201
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 +23 -7
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -303,8 +303,8 @@ if (command === 'alex') {
|
|
|
303
303
|
|
|
304
304
|
if (partialPatchMatch && !patchMatch) {
|
|
305
305
|
console.log(`\n\x1b[31m⛔ REJECTED: Ambiguous command.\x1b[0m The platform is mandatory to avoid any Metal corruption.`);
|
|
306
|
-
console.log(`\x1b[36m Type:\x1b[
|
|
307
|
-
console.log(`\x1b[36m Or:\x1b[
|
|
306
|
+
console.log(`\x1b[36m Type:\x1b[0mpatch module ${partialPatchMatch[1]} android`);
|
|
307
|
+
console.log(`\x1b[36m Or:\x1b[0mpatch module ${partialPatchMatch[1]} ios`);
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
|
|
@@ -590,7 +590,7 @@ if (command === 'alex') {
|
|
|
590
590
|
mockFileName: mockFileName,
|
|
591
591
|
mockCode: mockCode,
|
|
592
592
|
config_offload: config_offload || { dependencies: [], permissions: [] },
|
|
593
|
-
dataSchema: dataSchema || null,
|
|
593
|
+
dataSchema: dataSchema || null,
|
|
594
594
|
uiSchema: uiSchema || null
|
|
595
595
|
}
|
|
596
596
|
});
|
|
@@ -604,12 +604,12 @@ if (command === 'alex') {
|
|
|
604
604
|
console.log('');
|
|
605
605
|
|
|
606
606
|
// Astuce 1 : Le Patch manuel
|
|
607
|
-
console.log(
|
|
608
|
-
console.log(
|
|
607
|
+
console.log(`\x1b[90m If you manually edit the native code, sync it to the Cloud OS:\x1b[0m`);
|
|
608
|
+
console.log(`\x1b[33m patch module\x1b[0m \x1b[36m${moduleName}\x1b[0m \x1b[33mandroid\x1b[0m \x1b[90m(or ios)\x1b[0m`);
|
|
609
609
|
|
|
610
610
|
// Astuce 2 : L'éradication
|
|
611
|
-
console.log(
|
|
612
|
-
console.log(
|
|
611
|
+
console.log(`\x1b[90m To eradicate this module later, open a new terminal and type:\x1b[0m`);
|
|
612
|
+
console.log(`\x1b[31m npm run fleetbo rm\x1b[0m \x1b[36m${moduleName}\x1b[0m`);
|
|
613
613
|
|
|
614
614
|
|
|
615
615
|
} else if (aiData.status === 'success' && !aiData.moduleData) {
|
|
@@ -640,6 +640,11 @@ if (command === 'alex') {
|
|
|
640
640
|
let hasAiKey = false;
|
|
641
641
|
let aiProvider = null;
|
|
642
642
|
let aiModel = null;
|
|
643
|
+
|
|
644
|
+
// ASTUCE : On demande gentiment à l'IDE de noter qu'Alex est en cours de démarrage
|
|
645
|
+
if (process.env.VITE_FLEETBO_DEV === 'true' || true) { // Force l'exécution en dev
|
|
646
|
+
process.stdout.write('[ALEX_BOOTING]\n');
|
|
647
|
+
}
|
|
643
648
|
|
|
644
649
|
while (attempts < maxAttempts && !isReady) {
|
|
645
650
|
try {
|
|
@@ -649,6 +654,8 @@ if (command === 'alex') {
|
|
|
649
654
|
|
|
650
655
|
if (validation.data?.isRunning) {
|
|
651
656
|
isReady = true;
|
|
657
|
+
// 🟢 ASTUCE : On confirme que le moteur est allumé
|
|
658
|
+
process.stdout.write('[ALEX_ONLINE]\n');
|
|
652
659
|
dynamicUsername = validation.data.username || 'Pilot';
|
|
653
660
|
hasAiKey = validation.data.hasAiKey || false;
|
|
654
661
|
aiProvider = validation.data.aiProvider || null;
|
|
@@ -756,6 +763,14 @@ if (command === 'alex') {
|
|
|
756
763
|
process.stdout.write('\n\x1b[F');
|
|
757
764
|
rl.prompt();
|
|
758
765
|
|
|
766
|
+
// LE BOUCLIER ANTI CTRL+C (SIGINT)
|
|
767
|
+
rl.on('SIGINT', () => {
|
|
768
|
+
console.log('\n\x1b[90m Alex session aborted (Ctrl+C).\x1b[0m');
|
|
769
|
+
process.stdout.write('[ALEX_OFFLINE]\n'); // Prévient React !
|
|
770
|
+
rl.close();
|
|
771
|
+
process.exit(0); // Coupe proprement le processus
|
|
772
|
+
});
|
|
773
|
+
|
|
759
774
|
let standardBuffer = [];
|
|
760
775
|
let isProcessing = false;
|
|
761
776
|
let isPasteMode = false;
|
|
@@ -764,6 +779,7 @@ if (command === 'alex') {
|
|
|
764
779
|
const executePrompt = async (text) => {
|
|
765
780
|
if (['exit', 'quit'].includes(text.toLowerCase())) {
|
|
766
781
|
console.log('\n\x1b[90m Alex session closed.\x1b[0m');
|
|
782
|
+
process.stdout.write('[ALEX_OFFLINE]\n'); // ASTUCE : Moteur coupé
|
|
767
783
|
rl.close();
|
|
768
784
|
return;
|
|
769
785
|
}
|