create-fleetbo-project 1.2.64 → 1.2.65

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.
@@ -38,30 +38,31 @@ const keyApp = process.env.REACT_KEY_APP;
38
38
  const testerEmail = process.env.REACT_APP_TESTER_EMAIL;
39
39
  const wrapText = (text, maxWidth) => {
40
40
  if (!text) return "";
41
-
42
- // 1. Nettoyage : On remplace les sauts de ligne de l'IA par des espaces pour recréer le flux
43
- // Cela évite les cassures "en escalier" dans le terminal
44
- const cleanText = text.replace(/(\r\n|\n|\r)/gm, " ");
45
-
46
- // 2. Découpage propre par mot (gère les espaces multiples)
47
- const words = cleanText.split(/\s+/).filter(w => w.length > 0);
48
-
49
- let lines = [];
50
- let currentLine = words[0] || "";
51
-
52
- for (let i = 1; i < words.length; i++) {
53
- // On vérifie si on dépasse la largeur (85)
54
- if (currentLine.length + 1 + words[i].length <= maxWidth) {
55
- currentLine += " " + words[i];
41
+ const rawLines = text.split('\\n');
42
+ let formattedLines = [];
43
+ rawLines.forEach(line => {
44
+ if (line.trim().length === 0) {
45
+ formattedLines.push("");
46
+ return;
47
+ }
48
+ const isSpecialFormat = /^[\\s]*[-*•\\d]/.test(line) || line.startsWith(" ");
49
+ if (isSpecialFormat) {
50
+ formattedLines.push(line);
56
51
  } else {
57
- lines.push(currentLine);
58
- currentLine = words[i];
52
+ const words = line.split(" ");
53
+ let currentLine = words[0];
54
+ for (let i = 1; i < words.length; i++) {
55
+ if (currentLine.length + 1 + words[i].length <= maxWidth) {
56
+ currentLine += " " + words[i];
57
+ } else {
58
+ formattedLines.push(currentLine);
59
+ currentLine = words[i];
60
+ }
61
+ }
62
+ formattedLines.push(currentLine);
59
63
  }
60
- }
61
- lines.push(currentLine);
62
-
63
- // 3. Re-assemblage avec indentation alignée (3 espaces)
64
- return lines.join('\n ');
64
+ });
65
+ return formattedLines.join('\\n ');
65
66
  };
66
67
  const checkGitSecurity = () => {
67
68
  const gitDir = path.join(process.cwd(), '.git');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fleetbo-project",
3
- "version": "1.2.64",
3
+ "version": "1.2.65",
4
4
  "description": "Creates a new Fleetbo project.",
5
5
  "main": "install-react-template.js",
6
6
  "bin": {