fleetbo-cockpit-cli 1.0.54 → 1.0.55

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 +32 -7
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -839,7 +839,7 @@ else {
839
839
  }
840
840
  });
841
841
 
842
- devServer.stdout.pipe(process.stdout);
842
+ //devServer.stdout.pipe(process.stdout);
843
843
  devServer.stderr.pipe(process.stderr);
844
844
 
845
845
  let connectionStarted = false;
@@ -847,13 +847,39 @@ else {
847
847
  devServer.stdout.on('data', (data) => {
848
848
  const output = data.toString();
849
849
 
850
+ // 🛡️ FILTRE ANTI-PLOMBERIE FLEETBO
851
+ const lines = output.split('\n');
852
+ const forbiddenTerms = [
853
+ 'Attempting to bind to HOST',
854
+ 'If this was unintentional',
855
+ 'Learn more here:',
856
+ 'Starting the development server',
857
+ 'You can now view',
858
+ 'Local:',
859
+ 'On Your Network:',
860
+ 'Note that the development build',
861
+ 'To create a production build',
862
+ 'webpack compiled successfully'
863
+ ];
864
+
865
+ // On filtre les lignes pour ne garder que le vrai code/debug
866
+ const filteredOutput = lines.filter(line => {
867
+ return !forbiddenTerms.some(term => line.includes(term));
868
+ }).join('\n');
869
+
870
+ // S'il reste quelque chose d'utile (un console.log du dev, un warning, une vraie erreur), on l'affiche
871
+ if (filteredOutput.trim() !== '') {
872
+ process.stdout.write(filteredOutput + '\n');
873
+ }
874
+
875
+ // 🚀 DÉTECTION DU DÉMARRAGE ET LANCEMENT DE L'UPLINK
850
876
  if (!connectionStarted && (output.includes('Local:') || output.includes('Compiled successfully'))) {
851
877
  connectionStarted = true;
852
878
 
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] ---------------------------------------------------');
879
+ console.log('\n\x1b[36m[Fleetbo]\x1b[0m ---------------------------------------------------');
880
+ console.log(`\x1b[36m[Fleetbo]\x1b[0m 🔗 Establishing Secure Uplink...`);
881
+ console.log(`\x1b[36m[Fleetbo]\x1b[0m ⏳ Please wait for the green message...`);
882
+ console.log('\x1b[36m[Fleetbo]\x1b[0m ---------------------------------------------------');
857
883
 
858
884
  // ============================================
859
885
  // UPLINK avec auto-retry (Fleetbo OS Resilience)
@@ -885,14 +911,13 @@ else {
885
911
  const match = text.match(/https:\/\/[a-zA-Z0-9-]+\.trycloudflare\.com/);
886
912
  if (match) {
887
913
  uplinkFound = true;
888
- // ⚡ Stabilisation du noyau : on attend 1.5s que les routes soient forgées
914
+ // ⚡ Stabilisation du noyau : on attend 1.5s
889
915
  setTimeout(() => {
890
916
  syncFirebase(process.env.REACT_KEY_APP, match[0], process.env.REACT_APP_TESTER_EMAIL);
891
917
  }, 1500);
892
918
  }
893
919
  };
894
920
 
895
- // Écoute sur les deux flux (stdout + stderr)
896
921
  uplinkProcess.stdout.on('data', handleUplinkOutput);
897
922
  uplinkProcess.stderr.on('data', handleUplinkOutput);
898
923
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",