fleetbo-cockpit-cli 1.0.60 → 1.0.62
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 +14 -48
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -276,12 +276,6 @@ if (command === 'alex') {
|
|
|
276
276
|
try { aiData = JSON.parse(aiData); } catch (_) {}
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
// 🟢 AFFICHAGE DU RAISONNEMENT DANS LE TERMINAL
|
|
280
|
-
if (aiData.thinking_process) {
|
|
281
|
-
// Affiche le début du raisonnement en gris pour info
|
|
282
|
-
console.log(` \x1b[90m🧠 Analyse Alex : ${aiData.thinking_process.substring(0, 150)}...\x1b[0m`);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
279
|
process.stdout.write('\x1b[A\r' + ' '.repeat(50) + '\r');
|
|
286
280
|
|
|
287
281
|
if (aiData.status === 'quota_exceeded') {
|
|
@@ -487,7 +481,7 @@ if (command === 'alex') {
|
|
|
487
481
|
inputBuffer = "";
|
|
488
482
|
|
|
489
483
|
if (finalPrompt.length > 1000) {
|
|
490
|
-
console.log(`\n\x1b[31m⛔ [Alex Safety] Mission
|
|
484
|
+
console.log(`\n\x1b[31m⛔ [Alex Safety] Mission rejetée : Taille excessive (${finalPrompt.length}/1000 caractères).\x1b[0m`);
|
|
491
485
|
rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
|
|
492
486
|
rl.prompt();
|
|
493
487
|
return;
|
|
@@ -802,13 +796,13 @@ else {
|
|
|
802
796
|
try {
|
|
803
797
|
await axios.post(UPDATE_NETWORK_URL, { keyApp, networkUrl, tester: testerEmail });
|
|
804
798
|
console.log('\n\x1b[32mEngine started successfully\x1b[0m');
|
|
805
|
-
console.log(`\x1b[
|
|
806
|
-
console.log('\x1b[
|
|
807
|
-
console.log('\x1b[
|
|
808
|
-
console.log(`\x1b[
|
|
809
|
-
console.log(`\x1b[34mPilot Instruction ❯\x1b[0m
|
|
799
|
+
console.log(`\x1b[32m[Fleetbo]\x1b[0m -------------------------------------------------------------`);
|
|
800
|
+
console.log('\x1b[32m[Fleetbo] \x1b[1mGO GO GO ! FLEETBO COCKPIT IS READY\x1b[0m');
|
|
801
|
+
console.log('\x1b[32m[Fleetbo] You can now start coding and previewing in Studio. 🚀\x1b[0m');
|
|
802
|
+
console.log(`\x1b[32m[Fleetbo]\x1b[0m -------------------------------------------------------------`);
|
|
803
|
+
console.log(`\x1b[34mPilot Instruction ❯\x1b[0m Switch to your Fleetbo Cockpit tab to begin.\n`);
|
|
810
804
|
} catch (err) {
|
|
811
|
-
console.error(
|
|
805
|
+
console.error(`[Fleetbo] Sync Error: ${err.message}`);
|
|
812
806
|
}
|
|
813
807
|
}
|
|
814
808
|
|
|
@@ -845,7 +839,7 @@ else {
|
|
|
845
839
|
}
|
|
846
840
|
});
|
|
847
841
|
|
|
848
|
-
|
|
842
|
+
devServer.stdout.pipe(process.stdout);
|
|
849
843
|
devServer.stderr.pipe(process.stderr);
|
|
850
844
|
|
|
851
845
|
let connectionStarted = false;
|
|
@@ -853,39 +847,13 @@ else {
|
|
|
853
847
|
devServer.stdout.on('data', (data) => {
|
|
854
848
|
const output = data.toString();
|
|
855
849
|
|
|
856
|
-
// 🛡️ FILTRE ANTI-PLOMBERIE FLEETBO
|
|
857
|
-
const lines = output.split('\n');
|
|
858
|
-
const forbiddenTerms = [
|
|
859
|
-
'Attempting to bind to HOST',
|
|
860
|
-
'If this was unintentional',
|
|
861
|
-
'Learn more here:',
|
|
862
|
-
'Starting the development server',
|
|
863
|
-
'You can now view',
|
|
864
|
-
'Local:',
|
|
865
|
-
'On Your Network:',
|
|
866
|
-
'Note that the development build',
|
|
867
|
-
'To create a production build',
|
|
868
|
-
'webpack compiled successfully'
|
|
869
|
-
];
|
|
870
|
-
|
|
871
|
-
// On filtre les lignes pour ne garder que le vrai code/debug
|
|
872
|
-
const filteredOutput = lines.filter(line => {
|
|
873
|
-
return !forbiddenTerms.some(term => line.includes(term));
|
|
874
|
-
}).join('\n');
|
|
875
|
-
|
|
876
|
-
// S'il reste quelque chose d'utile (un console.log du dev, un warning, une vraie erreur), on l'affiche
|
|
877
|
-
if (filteredOutput.trim() !== '') {
|
|
878
|
-
process.stdout.write(filteredOutput + '\n');
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
// 🚀 DÉTECTION DU DÉMARRAGE ET LANCEMENT DE L'UPLINK
|
|
882
850
|
if (!connectionStarted && (output.includes('Local:') || output.includes('Compiled successfully'))) {
|
|
883
851
|
connectionStarted = true;
|
|
884
852
|
|
|
885
|
-
console.log('\
|
|
886
|
-
console.log(
|
|
887
|
-
console.log(
|
|
888
|
-
console.log('
|
|
853
|
+
console.log('\n[Fleetbo] ---------------------------------------------------');
|
|
854
|
+
console.log(`[Fleetbo] 🔗 Establishing Secure Uplink...`);
|
|
855
|
+
console.log(`[Fleetbo] ⏳ Please wait for the green message...`);
|
|
856
|
+
console.log('[Fleetbo] ---------------------------------------------------');
|
|
889
857
|
|
|
890
858
|
// ============================================
|
|
891
859
|
// UPLINK avec auto-retry (Fleetbo OS Resilience)
|
|
@@ -917,13 +885,11 @@ else {
|
|
|
917
885
|
const match = text.match(/https:\/\/[a-zA-Z0-9-]+\.trycloudflare\.com/);
|
|
918
886
|
if (match) {
|
|
919
887
|
uplinkFound = true;
|
|
920
|
-
|
|
921
|
-
setTimeout(() => {
|
|
922
|
-
syncFirebase(process.env.REACT_KEY_APP, match[0], process.env.REACT_APP_TESTER_EMAIL);
|
|
923
|
-
}, 1500);
|
|
888
|
+
syncFirebase(process.env.REACT_KEY_APP, match[0], process.env.REACT_APP_TESTER_EMAIL);
|
|
924
889
|
}
|
|
925
890
|
};
|
|
926
891
|
|
|
892
|
+
// Écoute sur les deux flux (stdout + stderr)
|
|
927
893
|
uplinkProcess.stdout.on('data', handleUplinkOutput);
|
|
928
894
|
uplinkProcess.stderr.on('data', handleUplinkOutput);
|
|
929
895
|
|