nestcraftx 0.1.1 → 0.1.4
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/commands/start.js +11 -0
- package/package.json +3 -3
- package/setup.js +1 -0
- package/utils/userInput.js +2 -1
package/commands/start.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
const { execSync } = require("child_process");
|
|
1
2
|
const path = require("path");
|
|
2
3
|
|
|
4
|
+
// 🔐 Forcer UTF-8 uniquement sur Windows
|
|
5
|
+
if (process.platform === "win32") {
|
|
6
|
+
try {
|
|
7
|
+
execSync("chcp 65001", { stdio: "ignore" }); // Changer l'encodage de la console
|
|
8
|
+
} catch (err) {
|
|
9
|
+
const message = `⚠️ Impossible de forcer UTF-8 dans le terminal Windows: ${err}`;
|
|
10
|
+
console.warn(message);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
3
14
|
module.exports = function () {
|
|
4
15
|
console.log("🚀 Lancement de la génération NestJS...");
|
|
5
16
|
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nestcraftx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "CLI to generate scalable NestJS projects with Clean Architecture and Clean Code",
|
|
5
5
|
"main": "bin/nestcraft.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"nestcraftx": "
|
|
7
|
+
"nestcraftx": "bin/nestcraft.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "nestcraftx test"
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/august-dev-pro/NestCraftX"
|
|
14
|
+
"url": "git+https://github.com/august-dev-pro/NestCraftX.git"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
17
|
"nestjs",
|
package/setup.js
CHANGED
package/utils/userInput.js
CHANGED
|
@@ -204,7 +204,8 @@ export async function getUserInputs2() {
|
|
|
204
204
|
let usedDB = readline.question(
|
|
205
205
|
`Quelle base de donnée voulez-vous utiliser ? (${dataBases
|
|
206
206
|
.map((db) => db.name)
|
|
207
|
-
.join(", ")}) :
|
|
207
|
+
.join(", ")}) : `,
|
|
208
|
+
{ defaultInput: "postgresql" }
|
|
208
209
|
);
|
|
209
210
|
|
|
210
211
|
let selectedDB = dataBases.find(
|