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.
- package/install-react-template.js +23 -22
- package/package.json +1 -1
|
@@ -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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
58
|
-
currentLine = words[
|
|
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
|
-
|
|
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');
|