fleetbo-cockpit-cli 1.0.61 → 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.
Files changed (2) hide show
  1. package/cli.js +16 -58
  2. 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') {
@@ -330,17 +324,9 @@ if (command === 'alex') {
330
324
 
331
325
  // --- C'EST ICI QUE LES FICHIERS SONT CRÉÉS ---
332
326
  if (aiData.status === 'success' && aiData.moduleData) {
333
- let { fileName, code, mockFileName, mockCode, moduleName, instructions, config_offload } = aiData.moduleData;
334
-
335
- // 🛡️ BOUCLIER ANTI-DUMP (Empêche l'explosion du terminal)
336
- if (moduleName) {
337
- // Si l'IA met des sauts de ligne ou un texte trop long dans le nom, on coupe.
338
- moduleName = moduleName.split('\n')[0].replace(/["'{}]/g, '').trim();
339
- if (moduleName.length > 40) moduleName = moduleName.substring(0, 40) + "...";
340
- }
341
-
327
+ const { fileName, code, mockFileName, mockCode, moduleName, instructions, config_offload } = aiData.moduleData;
342
328
  console.log(` \x1b[90m Architecting: ${moduleName}\x1b[0m`);
343
-
329
+
344
330
  const writeFile = (dir, name, content) => {
345
331
  const fullPath = path.join(process.cwd(), dir);
346
332
  const filePath = path.join(fullPath, name);
@@ -495,7 +481,7 @@ if (command === 'alex') {
495
481
  inputBuffer = "";
496
482
 
497
483
  if (finalPrompt.length > 1000) {
498
- console.log(`\n\x1b[31m⛔ [Alex Safety] Mission rejected: Excessive size (${finalPrompt.length}/1000 characters).\x1b[0m`);
484
+ console.log(`\n\x1b[31m⛔ [Alex Safety] Mission rejetée : Taille excessive (${finalPrompt.length}/1000 caractères).\x1b[0m`);
499
485
  rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
500
486
  rl.prompt();
501
487
  return;
@@ -810,13 +796,13 @@ else {
810
796
  try {
811
797
  await axios.post(UPDATE_NETWORK_URL, { keyApp, networkUrl, tester: testerEmail });
812
798
  console.log('\n\x1b[32mEngine started successfully\x1b[0m');
813
- console.log(`\x1b[32mFleetbo OS ❯\x1b[0m -------------------------------------------------------------`);
814
- console.log('\x1b[32mFleetbo OS ❯\x1b[0m \x1b[1mGO GO GO ! OS IS READY\x1b[0m');
815
- console.log('\x1b[32mFleetbo OS ❯\x1b[0m You can now start coding and previewing. 🚀');
816
- console.log(`\x1b[32mFleetbo OS ❯\x1b[0m -------------------------------------------------------------`);
817
- console.log(`\x1b[34mPilot Instruction ❯\x1b[0m Return to the Workspace. The Engine is ready for your orders.\n`);
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`);
818
804
  } catch (err) {
819
- console.error(`\x1b[31mFleetbo OS ❯\x1b[0m Sync Error: ${err.message}`);
805
+ console.error(`[Fleetbo] Sync Error: ${err.message}`);
820
806
  }
821
807
  }
822
808
 
@@ -853,7 +839,7 @@ else {
853
839
  }
854
840
  });
855
841
 
856
- //devServer.stdout.pipe(process.stdout);
842
+ devServer.stdout.pipe(process.stdout);
857
843
  devServer.stderr.pipe(process.stderr);
858
844
 
859
845
  let connectionStarted = false;
@@ -861,39 +847,13 @@ else {
861
847
  devServer.stdout.on('data', (data) => {
862
848
  const output = data.toString();
863
849
 
864
- // 🛡️ FILTRE ANTI-PLOMBERIE FLEETBO
865
- const lines = output.split('\n');
866
- const forbiddenTerms = [
867
- 'Attempting to bind to HOST',
868
- 'If this was unintentional',
869
- 'Learn more here:',
870
- 'Starting the development server',
871
- 'You can now view',
872
- 'Local:',
873
- 'On Your Network:',
874
- 'Note that the development build',
875
- 'To create a production build',
876
- 'webpack compiled successfully'
877
- ];
878
-
879
- // On filtre les lignes pour ne garder que le vrai code/debug
880
- const filteredOutput = lines.filter(line => {
881
- return !forbiddenTerms.some(term => line.includes(term));
882
- }).join('\n');
883
-
884
- // S'il reste quelque chose d'utile (un console.log du dev, un warning, une vraie erreur), on l'affiche
885
- if (filteredOutput.trim() !== '') {
886
- process.stdout.write(filteredOutput + '\n');
887
- }
888
-
889
- // 🚀 DÉTECTION DU DÉMARRAGE ET LANCEMENT DE L'UPLINK
890
850
  if (!connectionStarted && (output.includes('Local:') || output.includes('Compiled successfully'))) {
891
851
  connectionStarted = true;
892
852
 
893
- console.log('\x1b[33mFleetbo OS ❯\x1b[0m ---------------------------------------------------');
894
- console.log(`\x1b[33mFleetbo OS ❯\x1b[0m 🔗 Establishing Secure Uplink...`);
895
- console.log(`\x1b[33mFleetbo OS ❯\x1b[0m ⏳ Please wait for the green message...`);
896
- console.log('\x1b[33mFleetbo OS ❯\x1b[0m ---------------------------------------------------');
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] ---------------------------------------------------');
897
857
 
898
858
  // ============================================
899
859
  // UPLINK avec auto-retry (Fleetbo OS Resilience)
@@ -925,13 +885,11 @@ else {
925
885
  const match = text.match(/https:\/\/[a-zA-Z0-9-]+\.trycloudflare\.com/);
926
886
  if (match) {
927
887
  uplinkFound = true;
928
- // Stabilisation du noyau : on attend 1.5s
929
- setTimeout(() => {
930
- syncFirebase(process.env.REACT_KEY_APP, match[0], process.env.REACT_APP_TESTER_EMAIL);
931
- }, 1500);
888
+ syncFirebase(process.env.REACT_KEY_APP, match[0], process.env.REACT_APP_TESTER_EMAIL);
932
889
  }
933
890
  };
934
891
 
892
+ // Écoute sur les deux flux (stdout + stderr)
935
893
  uplinkProcess.stdout.on('data', handleUplinkOutput);
936
894
  uplinkProcess.stderr.on('data', handleUplinkOutput);
937
895
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.61",
3
+ "version": "1.0.62",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",