fleetbo-cockpit-cli 1.0.41 → 1.0.42

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 +9 -18
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -459,13 +459,12 @@ if (command === 'alex') {
459
459
  process.stdout.write('\n\x1b[F');
460
460
  rl.prompt();
461
461
 
462
- // --- MULTI-LINE BUFFER (ANTI-GLITCH VISUEL) ---
462
+ // --- NATURAL MULTI-LINE BUFFER (ZERO GLITCH) ---
463
463
  let inputBuffer = "";
464
464
  let isProcessing = false;
465
- let promptTimeout = null; // 🛡️ Le sauveur de l'affichage
466
465
 
467
466
  rl.on('line', async (line) => {
468
- if (isProcessing) return;
467
+ if (isProcessing) return; // Verrou pendant la forge
469
468
 
470
469
  const trimmedLine = line.trim();
471
470
 
@@ -476,26 +475,19 @@ if (command === 'alex') {
476
475
  return;
477
476
  }
478
477
 
479
- // 2. ACCUMULATION (Si la ligne n'est pas vide)
478
+ // 2. ACCUMULATION NATURELLE ET SILENCIEUSE
480
479
  if (trimmedLine !== "") {
481
480
  inputBuffer += (inputBuffer ? "\n" : "") + line;
482
- rl.setPrompt(`\x1b[34m > \x1b[0m`);
483
481
 
484
- // 🛡️ ANTI-GLITCH : On laisse le terminal afficher tout le collage d'un coup.
485
- // On ne redessine le chevron qu'après 50ms de silence.
486
- clearTimeout(promptTimeout);
487
- promptTimeout = setTimeout(() => {
488
- rl.prompt();
489
- }, 50);
482
+ // 🛡️ MAGIE ICI : On ne fait RIEN visuellement.
483
+ // On ne change pas le prompt, on ne met pas de timer.
484
+ // On laisse le terminal macOS/Windows afficher le texte naturellement.
490
485
  }
491
486
  // 3. VALIDATION (Touche Entrée sur une ligne vide)
492
487
  else {
493
488
  if (inputBuffer.trim() !== "") {
494
489
  const finalPrompt = inputBuffer.trim();
495
- inputBuffer = "";
496
-
497
- rl.setPrompt(`\x1b[34m${dynamicUsername} ❯ \x1b[0m`);
498
- clearTimeout(promptTimeout); // On annule tout dessin en cours
490
+ inputBuffer = ""; // Reset de la mémoire
499
491
 
500
492
  // 🛑 COUPE-CIRCUIT STRICT (1000 caractères)
501
493
  if (finalPrompt.length > 1000) {
@@ -511,10 +503,9 @@ if (command === 'alex') {
511
503
  isProcessing = false;
512
504
 
513
505
  console.log('');
514
- rl.prompt();
506
+ rl.prompt(); // On remet le prompt du pilote pour la prochaine mission
515
507
  } else {
516
- rl.setPrompt(`\x1b[34m${dynamicUsername} \x1b[0m`);
517
- rl.prompt(); // Entrée dans le vide
508
+ rl.prompt(); // Si le pilote appuie sur Entrée dans le vide
518
509
  }
519
510
  }
520
511
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",