create-fleetbo-project 1.0.44 → 1.0.45
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.
|
@@ -70,32 +70,32 @@ async function setupProject() {
|
|
|
70
70
|
|
|
71
71
|
try {
|
|
72
72
|
// Étape 1 : Télécharger la structure de base du projet
|
|
73
|
-
console.log(' [1/5]
|
|
73
|
+
console.log(' [1/5] Initialisation de la structure du projet...');
|
|
74
74
|
// On redirige la sortie d'erreur (stderr) vers null pour masquer les messages de progression de Git
|
|
75
75
|
execSync(`git clone --depth 1 --branch ${branchName} ${repoGitUrl} "${projectName}" 2> /dev/null`);
|
|
76
76
|
|
|
77
77
|
// Étape 2 : Se déplacer dans le dossier du projet et nettoyer
|
|
78
|
-
console.log(' [2/5]
|
|
78
|
+
console.log(' [2/5] Structure du projet initialisée. Configuration en cours...');
|
|
79
79
|
process.chdir(projectDir);
|
|
80
80
|
|
|
81
81
|
// Supprimer l'historique Git pour commencer avec un projet propre
|
|
82
82
|
fs.rmSync(path.join(projectDir, '.git'), { recursive: true, force: true });
|
|
83
83
|
|
|
84
84
|
// Étape 3 : Récupération des clés de projet
|
|
85
|
-
console.log(' [3/5]
|
|
85
|
+
console.log(' [3/5] Récupération des clés de projet...');
|
|
86
86
|
const keys = await fetchProjectKeys(bootstrapToken);
|
|
87
87
|
if (!keys.enterpriseId || !keys.fleetboDBKey) {
|
|
88
88
|
throw new Error("Les clés reçues du serveur sont invalides.");
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
// Étape 4 : Configuration du fichier .env
|
|
92
|
-
console.log(' [4/5]
|
|
92
|
+
console.log(' [4/5] Fichier .env configuré avec succès.');
|
|
93
93
|
//const envContent = `REACT_APP_FLEETBO_DB_KEY=${keys.fleetboDBKey}\nREACT_APP_ENTERPRISE_ID=${keys.enterpriseId}\n`; //99b426483d543b042209671dd53fb18
|
|
94
94
|
const envContent = `REACT_APP_FLEETBO_DB_KEY=${keys.fleetboDBKey}\nREACT_APP_ENTERPRISE_ID=99b426483d543b042209671dd53fb18\n`;
|
|
95
95
|
fs.writeFileSync(path.join(projectDir, '.env'), envContent, 'utf8');
|
|
96
96
|
|
|
97
97
|
// Étape 5 : Installation des dépendances
|
|
98
|
-
console.log(' [5/5]
|
|
98
|
+
console.log(' [5/5] Installation des dépendances...');
|
|
99
99
|
execSync('npm install', { stdio: 'inherit' });
|
|
100
100
|
|
|
101
101
|
// Personnalisation du package.json
|