create-fleetbo-project 1.0.10 → 1.0.11
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.
|
@@ -44,16 +44,11 @@ async function setupProject() {
|
|
|
44
44
|
responseStream.pipe(unzipper.Extract({ path: '.' }))
|
|
45
45
|
.on('finish', resolve).on('error', reject);
|
|
46
46
|
});
|
|
47
|
-
|
|
48
|
-
// Dynamically find the name of the extracted directory
|
|
49
47
|
const files = fs.readdirSync('.');
|
|
50
|
-
// Find the first (and only) directory created by the unzipper
|
|
51
48
|
const extractedDirName = files.find(file => fs.statSync(file).isDirectory());
|
|
52
|
-
|
|
53
49
|
if (!extractedDirName) {
|
|
54
50
|
throw new Error("Could not find the extracted template directory after unzipping.");
|
|
55
51
|
}
|
|
56
|
-
|
|
57
52
|
fs.renameSync(extractedDirName, projectName);
|
|
58
53
|
spinner.succeed(chalk.green('Fichiers décompressés.'));
|
|
59
54
|
|