nestcraftx 0.1.1 → 0.1.5
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/{readme → readme.md} +12 -11
- package/setup.js +1 -0
- package/utils/userInput.js +3 -2
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.5",
|
|
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": "https://github.com/august-dev-pro/NestCraftX.git"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
17
|
"nestjs",
|
package/{readme → readme.md}
RENAMED
|
@@ -11,15 +11,14 @@ Bienvenue dans **NestCraftX**, un CLI Node.js puissant pour générer automatiqu
|
|
|
11
11
|
|
|
12
12
|
## 📑 Sommaire
|
|
13
13
|
|
|
14
|
-
- [✨ Objectif du projet](
|
|
15
|
-
- [📦 Prérequis](
|
|
16
|
-
- [🚀 Installation et utilisation](
|
|
17
|
-
- [🧰 Ce que la commande configure automatiquement](
|
|
18
|
-
- [📁 Exemple d’architecture générée](
|
|
19
|
-
- [📌 À venir](
|
|
20
|
-
- [❤️ Contribuer](
|
|
21
|
-
- [📜 Licence](
|
|
22
|
-
|
|
14
|
+
- [✨ Objectif du projet](#objectif-du-projet)
|
|
15
|
+
- [📦 Prérequis](#prérequis)
|
|
16
|
+
- [🚀 Installation et utilisation](#installation-et-utilisation)
|
|
17
|
+
- [🧰 Ce que la commande configure automatiquement](#ce-que-la-commande-configure-automatiquement)
|
|
18
|
+
- [📁 Exemple d’architecture générée](#exemple-darchitecture-générée)
|
|
19
|
+
- [📌 À venir](#à-venir)
|
|
20
|
+
- [❤️ Contribuer](#️contribuer)
|
|
21
|
+
- [📜 Licence](#licence)
|
|
23
22
|
|
|
24
23
|
---
|
|
25
24
|
|
|
@@ -43,7 +42,6 @@ Bienvenue dans **NestCraftX**, un CLI Node.js puissant pour générer automatiqu
|
|
|
43
42
|
- **Docker** (pour l intégration avec la base de données)
|
|
44
43
|
- **Git** (optionnel pour init un repo)
|
|
45
44
|
|
|
46
|
-
|
|
47
45
|
---
|
|
48
46
|
|
|
49
47
|
## 🚀 Installation et utilisation
|
|
@@ -91,7 +89,6 @@ Bienvenue dans **NestCraftX**, un CLI Node.js puissant pour générer automatiqu
|
|
|
91
89
|
|
|
92
90
|
Cela te permet d’utiliser nestcraftx en CLI localement pendant que tu développes.
|
|
93
91
|
|
|
94
|
-
|
|
95
92
|
---
|
|
96
93
|
|
|
97
94
|
## 🧰 Ce que la commande configure automatiquement :
|
|
@@ -113,6 +110,7 @@ Bienvenue dans **NestCraftX**, un CLI Node.js puissant pour générer automatiqu
|
|
|
113
110
|
---
|
|
114
111
|
|
|
115
112
|
## 📁 Exemple d’architecture générée
|
|
113
|
+
|
|
116
114
|
```bash
|
|
117
115
|
my-app/
|
|
118
116
|
├── src/
|
|
@@ -189,6 +187,7 @@ Bienvenue dans **NestCraftX**, un CLI Node.js puissant pour générer automatiqu
|
|
|
189
187
|
└── README.md
|
|
190
188
|
|
|
191
189
|
```
|
|
190
|
+
|
|
192
191
|
---
|
|
193
192
|
|
|
194
193
|
## 📌 À venir
|
|
@@ -206,12 +205,14 @@ Bienvenue dans **NestCraftX**, un CLI Node.js puissant pour générer automatiqu
|
|
|
206
205
|
🧪 Intégration CI/CD de base
|
|
207
206
|
|
|
208
207
|
🌐 Site de documentation officiel
|
|
208
|
+
|
|
209
209
|
---
|
|
210
210
|
|
|
211
211
|
##❤️ Contribuer
|
|
212
212
|
|
|
213
213
|
Tu veux améliorer NestCraft ?
|
|
214
214
|
Fork le repo, ajoute tes idées, propose une Pull Request ou ouvre une issue pour en discuter !
|
|
215
|
+
|
|
215
216
|
---
|
|
216
217
|
|
|
217
218
|
## 📜 Licence
|
package/setup.js
CHANGED
package/utils/userInput.js
CHANGED
|
@@ -61,7 +61,7 @@ import * as fs from "fs";
|
|
|
61
61
|
} */
|
|
62
62
|
|
|
63
63
|
export async function getUserInputs2() {
|
|
64
|
-
console.log("\n🔹🔹🔹 Configuration du projet
|
|
64
|
+
console.log("\n🔹🔹🔹 Configuration du projet 🔹🔹🔹\n");
|
|
65
65
|
|
|
66
66
|
const dataBases = [
|
|
67
67
|
{
|
|
@@ -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(
|