nestcraftx 0.2.3 → 0.2.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/.gitattributes +6 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- package/.github/ISSUE_TEMPLATE/pull_request_template.md +24 -0
- package/CHANGELOG.fr.md +97 -97
- package/CHANGELOG.md +98 -98
- package/DEMO.fr.md +292 -292
- package/DEMO.md +294 -294
- package/LICENSE +1 -1
- package/MIGRATION_GUIDE.fr.md +127 -127
- package/MIGRATION_GUIDE.md +124 -124
- package/QUICK_START.fr.md +152 -152
- package/QUICK_START.md +169 -169
- package/README.fr.md +653 -630
- package/SECURITY.md +10 -0
- package/bin/nestcraft.js +2 -1
- package/commands/demo.js +36 -29
- package/commands/help.js +78 -155
- package/commands/new.js +9 -9
- package/package.json +41 -41
- package/readme.md +638 -613
- package/utils/configs/setupCleanArchitecture.js +561 -561
- package/utils/configs/setupLightArchitecture.js +695 -709
- package/utils/envGenerator.js +122 -122
- package/utils/file-utils/packageJsonUtils.js +49 -49
- package/utils/lightModeInput.js +460 -460
- package/utils/setups/orms/typeOrmSetup.js +2 -10
- package/utils/setups/projectSetup.js +46 -46
- package/utils/setups/setupAuth.js +960 -840
- package/utils/setups/setupLogger.js +69 -53
- package/utils/setups/setupMongoose.js +377 -417
- package/utils/setups/setupPrisma.js +9 -10
- package/utils/setups/setupSwagger.js +97 -88
- package/utils/systemCheck.js +48 -38
- package/utils/utils.js +2197 -1834
package/.gitattributes
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "🐛 Bug Report"
|
|
3
|
+
about: Create a report to help us improve NestCraftX
|
|
4
|
+
title: "[BUG] "
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Describe the bug**
|
|
10
|
+
A clear and concise description of what the bug is.
|
|
11
|
+
|
|
12
|
+
**CLI Command used**
|
|
13
|
+
Example: `nestcraftx demo --full` or `nestcraftx generate user --orm mongoose`
|
|
14
|
+
|
|
15
|
+
**Environment Details:**
|
|
16
|
+
|
|
17
|
+
- OS: [e.g. Windows 11, MacOS, Ubuntu]
|
|
18
|
+
- Node Version: [e.g. 20.x]
|
|
19
|
+
- NestCraftX Version: [e.g. 0.2.5]
|
|
20
|
+
- Selected ORM: [Prisma / TypeORM / Mongoose]
|
|
21
|
+
|
|
22
|
+
**To Reproduce**
|
|
23
|
+
Steps to reproduce the behavior:
|
|
24
|
+
|
|
25
|
+
1. Run command '...'
|
|
26
|
+
2. Select option '...'
|
|
27
|
+
3. See error
|
|
28
|
+
|
|
29
|
+
**Expected behavior**
|
|
30
|
+
A clear and concise description of what you expected to happen.
|
|
31
|
+
|
|
32
|
+
**Screenshots/Logs**
|
|
33
|
+
If applicable, add screenshots or paste the terminal error log here.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "🚀 Feature Request"
|
|
3
|
+
about: Suggest an idea for NestCraftX
|
|
4
|
+
title: "[FEATURE] "
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Is your feature request related to a problem? Please describe.**
|
|
10
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
11
|
+
|
|
12
|
+
**Describe the solution you'd like**
|
|
13
|
+
A clear and concise description of what you want to happen.
|
|
14
|
+
|
|
15
|
+
**Describe alternatives you've considered**
|
|
16
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
17
|
+
|
|
18
|
+
**Additional context**
|
|
19
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
Describe the changes you've made. What problem does this PR solve?
|
|
4
|
+
|
|
5
|
+
## Type of Change
|
|
6
|
+
|
|
7
|
+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
|
|
8
|
+
- [ ] 🚀 New feature (non-breaking change which adds functionality)
|
|
9
|
+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to change)
|
|
10
|
+
- [ ] 📝 Documentation update
|
|
11
|
+
|
|
12
|
+
## ORM Impacted
|
|
13
|
+
|
|
14
|
+
- [ ] Prisma
|
|
15
|
+
- [ ] TypeORM
|
|
16
|
+
- [ ] Mongoose
|
|
17
|
+
- [ ] None (Core logic)
|
|
18
|
+
|
|
19
|
+
## Checklist
|
|
20
|
+
|
|
21
|
+
- [ ] My code follows the style guidelines of this project
|
|
22
|
+
- [ ] I have performed a self-review of my own code
|
|
23
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
24
|
+
- [ ] My changes generate no new warnings
|
package/CHANGELOG.fr.md
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
# Journal des modifications (Changelog)
|
|
2
|
-
|
|
3
|
-
Toutes les modifications notables apportées à NestCraftX seront documentées dans ce fichier.
|
|
4
|
-
|
|
5
|
-
## [0.2.
|
|
6
|
-
|
|
7
|
-
### Ajouté
|
|
8
|
-
|
|
9
|
-
- **Nouveau système interactif (Inquirer.js)** : Remplacement de `readline-sync` par `Inquirer` pour une navigation professionnelle au clavier (touches fléchées).
|
|
10
|
-
- **Support des gestionnaires de paquets** : Choix entre `npm`, `yarn` et `pnpm` (via le flag `--pm` ou sélection interactive).
|
|
11
|
-
- **Détection intelligente de DB** : Sélection automatique du type de base de données (PostgreSQL ou MongoDB) en fonction de l'ORM choisi.
|
|
12
|
-
- **Fusion avancée des flags** : Intégration fluide entre les flags CLI et les invites interactives pour les options manquantes.
|
|
13
|
-
- **Badges de statut visuels** : Ajout de badges dans le README pour la Version, la Licence et les ORM supportés.
|
|
14
|
-
|
|
15
|
-
### Changé
|
|
16
|
-
|
|
17
|
-
- **Refonte TOTALE de l'architecture** : Déplacement des services vers `application/services` pour respecter strictement les patterns de la Clean Architecture.
|
|
18
|
-
- **Refactorisation de l'Auth** : `AuthService` interagit désormais exclusivement avec `UserService` (suppression de l'accès direct au repository).
|
|
19
|
-
- **Commande Demo améliorée** : La commande `demo` génère maintenant un projet de blog complet avec 3 entités liées (User, Post, Comment) et des relations 1-N.
|
|
20
|
-
- **Sécurité renforcée** : Les secrets JWT sont désormais générés via `crypto.randomBytes(32)` (chaînes hexadécimales de 64 caractères).
|
|
21
|
-
- **Docker par défaut** : Les fichiers Docker sont maintenant générés par défaut dans les deux modes, sauf si `--docker=false` est spécifié.
|
|
22
|
-
|
|
23
|
-
### Corrigé
|
|
24
|
-
|
|
25
|
-
- **Compatibilité des modules** : Résolution des conflits CommonJS vs ES6 dans les templates de projet générés.
|
|
26
|
-
- **Validation des flags** : Correction de bugs où certains flags CLI étaient ignorés durant le flux interactif.
|
|
27
|
-
- **Dépendances circulaires** : Nettoyage des imports dans le module Auth pour prévenir d'éventuels problèmes au runtime.
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## [0.2.2] - 07-11-2025
|
|
32
|
-
|
|
33
|
-
### Ajouté
|
|
34
|
-
|
|
35
|
-
- **Templates professionnels** : Auto-génération d'un `.gitignore` spécifique à NestJS et d'un `README.md` personnalisé pour chaque nouveau projet.
|
|
36
|
-
- **Auto-init Git** : Initialisation automatique du dépôt Git et premier commit après la génération du projet.
|
|
37
|
-
- **Support Mongoose (Beta)** : Première implémentation de l'architecture MongoDB avec Mongoose.
|
|
38
|
-
|
|
39
|
-
### Changé
|
|
40
|
-
|
|
41
|
-
- **Nettoyage du code** : Suppression des fichiers de configuration obsolètes (`start.js`, `fullModeInput.js`, `lightModeInput.js`).
|
|
42
|
-
- **Standardisation des logs** : Unification des messages console via un système de codes couleurs cohérent (Info, Succès, Avertissement).
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## [0.2.0] - 27-10-2025
|
|
47
|
-
|
|
48
|
-
### Ajouté
|
|
49
|
-
|
|
50
|
-
- **Modes d'architecture doubles** :
|
|
51
|
-
- **Mode FULL** : Clean Architecture complète + DDD (Use-cases, Mappers, Adapters).
|
|
52
|
-
- **Mode LIGHT** : Architecture MVP simplifiée (Controllers → Services → Repositories).
|
|
53
|
-
|
|
54
|
-
- **Parseur CLI moderne** : Support des syntaxes `--key=value` et `--key value` avec validation.
|
|
55
|
-
- **Amélioration de l'UX** : Intégration de spinners animés et d'un résumé complet de la configuration post-génération.
|
|
56
|
-
|
|
57
|
-
### Sécurité
|
|
58
|
-
|
|
59
|
-
- **Environnement sécurisé** : Génération automatique de `JWT_SECRET` et `JWT_REFRESH_SECRET` dans le fichier `.env`.
|
|
60
|
-
- **Exemples assainis** : Création d'un fichier `.env.example` sécurisé sans données sensibles.
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## [0.1.0] - Version précédente
|
|
65
|
-
|
|
66
|
-
### Fonctionnalités initiales
|
|
67
|
-
|
|
68
|
-
- Génération de projet NestJS de base.
|
|
69
|
-
- Support de Prisma et TypeORM.
|
|
70
|
-
- Configuration de base Docker et Swagger.
|
|
71
|
-
- Authentification JWT standard.
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## Notes de migration
|
|
76
|
-
|
|
77
|
-
### De 0.1.x à 0.2.
|
|
78
|
-
|
|
79
|
-
**Changements non-bloquants** : La version 0.2.x est rétrocompatible.
|
|
80
|
-
|
|
81
|
-
**Nouvelles commandes recommandées :**
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
# Mode LIGHT (Plus rapide pour les MVP)
|
|
85
|
-
nestcraftx new my-api --light --orm=prisma --auth
|
|
86
|
-
|
|
87
|
-
# Mode FULL (Standard pour les applications d'entreprise)
|
|
88
|
-
nestcraftx new my-app --full --orm=typeorm --auth --swagger
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Avantages de la mise à jour :
|
|
93
|
-
|
|
94
|
-
- Secrets JWT automatisés et sécurisés.
|
|
95
|
-
- Choix du gestionnaire de paquets (npm/yarn/pnpm).
|
|
96
|
-
- Meilleure séparation des responsabilités dans les modules Auth/User.
|
|
97
|
-
- Meilleure expérience développeur (DX) avec les menus interactifs.
|
|
1
|
+
# Journal des modifications (Changelog)
|
|
2
|
+
|
|
3
|
+
Toutes les modifications notables apportées à NestCraftX seront documentées dans ce fichier.
|
|
4
|
+
|
|
5
|
+
## [0.2.5] - 10-01-2026
|
|
6
|
+
|
|
7
|
+
### Ajouté
|
|
8
|
+
|
|
9
|
+
- **Nouveau système interactif (Inquirer.js)** : Remplacement de `readline-sync` par `Inquirer` pour une navigation professionnelle au clavier (touches fléchées).
|
|
10
|
+
- **Support des gestionnaires de paquets** : Choix entre `npm`, `yarn` et `pnpm` (via le flag `--pm` ou sélection interactive).
|
|
11
|
+
- **Détection intelligente de DB** : Sélection automatique du type de base de données (PostgreSQL ou MongoDB) en fonction de l'ORM choisi.
|
|
12
|
+
- **Fusion avancée des flags** : Intégration fluide entre les flags CLI et les invites interactives pour les options manquantes.
|
|
13
|
+
- **Badges de statut visuels** : Ajout de badges dans le README pour la Version, la Licence et les ORM supportés.
|
|
14
|
+
|
|
15
|
+
### Changé
|
|
16
|
+
|
|
17
|
+
- **Refonte TOTALE de l'architecture** : Déplacement des services vers `application/services` pour respecter strictement les patterns de la Clean Architecture.
|
|
18
|
+
- **Refactorisation de l'Auth** : `AuthService` interagit désormais exclusivement avec `UserService` (suppression de l'accès direct au repository).
|
|
19
|
+
- **Commande Demo améliorée** : La commande `demo` génère maintenant un projet de blog complet avec 3 entités liées (User, Post, Comment) et des relations 1-N.
|
|
20
|
+
- **Sécurité renforcée** : Les secrets JWT sont désormais générés via `crypto.randomBytes(32)` (chaînes hexadécimales de 64 caractères).
|
|
21
|
+
- **Docker par défaut** : Les fichiers Docker sont maintenant générés par défaut dans les deux modes, sauf si `--docker=false` est spécifié.
|
|
22
|
+
|
|
23
|
+
### Corrigé
|
|
24
|
+
|
|
25
|
+
- **Compatibilité des modules** : Résolution des conflits CommonJS vs ES6 dans les templates de projet générés.
|
|
26
|
+
- **Validation des flags** : Correction de bugs où certains flags CLI étaient ignorés durant le flux interactif.
|
|
27
|
+
- **Dépendances circulaires** : Nettoyage des imports dans le module Auth pour prévenir d'éventuels problèmes au runtime.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## [0.2.2] - 07-11-2025
|
|
32
|
+
|
|
33
|
+
### Ajouté
|
|
34
|
+
|
|
35
|
+
- **Templates professionnels** : Auto-génération d'un `.gitignore` spécifique à NestJS et d'un `README.md` personnalisé pour chaque nouveau projet.
|
|
36
|
+
- **Auto-init Git** : Initialisation automatique du dépôt Git et premier commit après la génération du projet.
|
|
37
|
+
- **Support Mongoose (Beta)** : Première implémentation de l'architecture MongoDB avec Mongoose.
|
|
38
|
+
|
|
39
|
+
### Changé
|
|
40
|
+
|
|
41
|
+
- **Nettoyage du code** : Suppression des fichiers de configuration obsolètes (`start.js`, `fullModeInput.js`, `lightModeInput.js`).
|
|
42
|
+
- **Standardisation des logs** : Unification des messages console via un système de codes couleurs cohérent (Info, Succès, Avertissement).
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## [0.2.0] - 27-10-2025
|
|
47
|
+
|
|
48
|
+
### Ajouté
|
|
49
|
+
|
|
50
|
+
- **Modes d'architecture doubles** :
|
|
51
|
+
- **Mode FULL** : Clean Architecture complète + DDD (Use-cases, Mappers, Adapters).
|
|
52
|
+
- **Mode LIGHT** : Architecture MVP simplifiée (Controllers → Services → Repositories).
|
|
53
|
+
|
|
54
|
+
- **Parseur CLI moderne** : Support des syntaxes `--key=value` et `--key value` avec validation.
|
|
55
|
+
- **Amélioration de l'UX** : Intégration de spinners animés et d'un résumé complet de la configuration post-génération.
|
|
56
|
+
|
|
57
|
+
### Sécurité
|
|
58
|
+
|
|
59
|
+
- **Environnement sécurisé** : Génération automatique de `JWT_SECRET` et `JWT_REFRESH_SECRET` dans le fichier `.env`.
|
|
60
|
+
- **Exemples assainis** : Création d'un fichier `.env.example` sécurisé sans données sensibles.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## [0.1.0] - Version précédente
|
|
65
|
+
|
|
66
|
+
### Fonctionnalités initiales
|
|
67
|
+
|
|
68
|
+
- Génération de projet NestJS de base.
|
|
69
|
+
- Support de Prisma et TypeORM.
|
|
70
|
+
- Configuration de base Docker et Swagger.
|
|
71
|
+
- Authentification JWT standard.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Notes de migration
|
|
76
|
+
|
|
77
|
+
### De 0.1.x à 0.2.5
|
|
78
|
+
|
|
79
|
+
**Changements non-bloquants** : La version 0.2.x est rétrocompatible.
|
|
80
|
+
|
|
81
|
+
**Nouvelles commandes recommandées :**
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Mode LIGHT (Plus rapide pour les MVP)
|
|
85
|
+
nestcraftx new my-api --light --orm=prisma --auth
|
|
86
|
+
|
|
87
|
+
# Mode FULL (Standard pour les applications d'entreprise)
|
|
88
|
+
nestcraftx new my-app --full --orm=typeorm --auth --swagger
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Avantages de la mise à jour :
|
|
93
|
+
|
|
94
|
+
- Secrets JWT automatisés et sécurisés.
|
|
95
|
+
- Choix du gestionnaire de paquets (npm/yarn/pnpm).
|
|
96
|
+
- Meilleure séparation des responsabilités dans les modules Auth/User.
|
|
97
|
+
- Meilleure expérience développeur (DX) avec les menus interactifs.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to NestCraftX will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## [0.2.
|
|
6
|
-
|
|
7
|
-
### Added
|
|
8
|
-
|
|
9
|
-
- **New Interactive System (Inquirer.js)**: Replaced `readline-sync` with `Inquirer` for professional arrow-key navigation.
|
|
10
|
-
- **Package Manager Support**: Choice between `npm`, `yarn`, and `pnpm` (via `--pm` flag or interactive selection).
|
|
11
|
-
- **Smart DB Detection**: Automatic database type selection (PostgreSQL or MongoDB) based on the chosen ORM.
|
|
12
|
-
- **Advanced Flag Merging**: Seamless integration between CLI flags and interactive prompts for missing options.
|
|
13
|
-
- **Visual Status Badges**: Added README badges for Version, License, and Supported ORMs.
|
|
14
|
-
|
|
15
|
-
### Changed
|
|
16
|
-
|
|
17
|
-
- **FULL Architecture Refactor**: Services moved to `application/services` to strictly follow Clean Architecture patterns.
|
|
18
|
-
- **Auth Refactoring**: `AuthService` now interacts exclusively with `UserService` (removed direct repository access).
|
|
19
|
-
- **Enhanced Demo Command**: The `demo` command now generates a full blog project with 3 related entities (User, Post, Comment) and 1-N relationships.
|
|
20
|
-
- **Improved Security**: JWT secrets now generated via `crypto.randomBytes(32)` (64-character hex strings).
|
|
21
|
-
- **Docker by Default**: Docker files are now generated by default in both modes unless `--docker=false` is specified.
|
|
22
|
-
|
|
23
|
-
### Fixed
|
|
24
|
-
|
|
25
|
-
- **Module Compatibility**: Resolved CommonJS vs ES6 conflicts in generated project templates.
|
|
26
|
-
- **Flag Validation**: Fixed bugs where certain CLI flags were ignored during the interactive flow.
|
|
27
|
-
- **Circular Dependencies**: Cleaned up imports in the Auth module to prevent potential runtime issues.
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## [0.2.2] - 2025-11-07
|
|
32
|
-
|
|
33
|
-
### Added
|
|
34
|
-
|
|
35
|
-
- **Professional Templates**: Auto-generation of NestJS-specific `.gitignore` and customized `README.md` for every new project.
|
|
36
|
-
- **Git Auto-init**: Automatic Git repository initialization and first commit after project generation.
|
|
37
|
-
- **Mongoose Support (Beta)**: Initial implementation of MongoDB architecture with Mongoose.
|
|
38
|
-
|
|
39
|
-
### Changed
|
|
40
|
-
|
|
41
|
-
- **Code Cleanup**: Removed obsolete configuration files (`start.js`, `fullModeInput.js`, `lightModeInput.js`).
|
|
42
|
-
- **Log Standardization**: Unified console messaging using a consistent color-coded system (Info, Success, Warning).
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## [0.2.0] - 2025-10-27
|
|
47
|
-
|
|
48
|
-
### Added
|
|
49
|
-
|
|
50
|
-
- **Dual Architecture Modes**:
|
|
51
|
-
- **Mode FULL**: Complete Clean Architecture + DDD (Use-cases, Mappers, Adapters).
|
|
52
|
-
- **Mode LIGHT**: Simplified MVP Architecture (Controllers → Services → Repositories).
|
|
53
|
-
- **Modern CLI Parser**: Support for `--key=value` and `--key value` syntax with validation.
|
|
54
|
-
- **Improved UX**: Integrated animated spinners and a full post-generation configuration summary.
|
|
55
|
-
|
|
56
|
-
### Security
|
|
57
|
-
|
|
58
|
-
- **Secure Environment**: Automatic generation of `JWT_SECRET` and `JWT_REFRESH_SECRET` in `.env`.
|
|
59
|
-
- **Sanitized Examples**: Creation of a safe `.env.example` file without sensitive data.
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## [0.1.0] - Previous Version
|
|
64
|
-
|
|
65
|
-
### Initial Features
|
|
66
|
-
|
|
67
|
-
- Basic NestJS project generation.
|
|
68
|
-
- Support for Prisma and TypeORM.
|
|
69
|
-
- Basic Docker and Swagger configuration.
|
|
70
|
-
- Standard JWT Authentication.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Migration Notes
|
|
75
|
-
|
|
76
|
-
### From 0.1.x to 0.2.
|
|
77
|
-
|
|
78
|
-
**Non-breaking changes**: Version 0.2.x is backward compatible.
|
|
79
|
-
|
|
80
|
-
**New Recommended Commands:**
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
# LIGHT Mode (Fastest for MVPs)
|
|
84
|
-
nestcraftx new my-api --light --orm=prisma --auth
|
|
85
|
-
|
|
86
|
-
# FULL Mode (Standard for enterprise-grade apps)
|
|
87
|
-
nestcraftx new my-app --full --orm=typeorm --auth --swagger
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Benefits of updating:
|
|
91
|
-
|
|
92
|
-
- Automated secure JWT secrets.
|
|
93
|
-
|
|
94
|
-
- Choice of Package Manager (npm/yarn/pnpm).
|
|
95
|
-
|
|
96
|
-
- Cleaner separation of concerns in Auth/User modules.
|
|
97
|
-
|
|
98
|
-
- Better DX with arrow-key menus.
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to NestCraftX will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.2.5] - 2026-01-10
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **New Interactive System (Inquirer.js)**: Replaced `readline-sync` with `Inquirer` for professional arrow-key navigation.
|
|
10
|
+
- **Package Manager Support**: Choice between `npm`, `yarn`, and `pnpm` (via `--pm` flag or interactive selection).
|
|
11
|
+
- **Smart DB Detection**: Automatic database type selection (PostgreSQL or MongoDB) based on the chosen ORM.
|
|
12
|
+
- **Advanced Flag Merging**: Seamless integration between CLI flags and interactive prompts for missing options.
|
|
13
|
+
- **Visual Status Badges**: Added README badges for Version, License, and Supported ORMs.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **FULL Architecture Refactor**: Services moved to `application/services` to strictly follow Clean Architecture patterns.
|
|
18
|
+
- **Auth Refactoring**: `AuthService` now interacts exclusively with `UserService` (removed direct repository access).
|
|
19
|
+
- **Enhanced Demo Command**: The `demo` command now generates a full blog project with 3 related entities (User, Post, Comment) and 1-N relationships.
|
|
20
|
+
- **Improved Security**: JWT secrets now generated via `crypto.randomBytes(32)` (64-character hex strings).
|
|
21
|
+
- **Docker by Default**: Docker files are now generated by default in both modes unless `--docker=false` is specified.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- **Module Compatibility**: Resolved CommonJS vs ES6 conflicts in generated project templates.
|
|
26
|
+
- **Flag Validation**: Fixed bugs where certain CLI flags were ignored during the interactive flow.
|
|
27
|
+
- **Circular Dependencies**: Cleaned up imports in the Auth module to prevent potential runtime issues.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## [0.2.2] - 2025-11-07
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- **Professional Templates**: Auto-generation of NestJS-specific `.gitignore` and customized `README.md` for every new project.
|
|
36
|
+
- **Git Auto-init**: Automatic Git repository initialization and first commit after project generation.
|
|
37
|
+
- **Mongoose Support (Beta)**: Initial implementation of MongoDB architecture with Mongoose.
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- **Code Cleanup**: Removed obsolete configuration files (`start.js`, `fullModeInput.js`, `lightModeInput.js`).
|
|
42
|
+
- **Log Standardization**: Unified console messaging using a consistent color-coded system (Info, Success, Warning).
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## [0.2.0] - 2025-10-27
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- **Dual Architecture Modes**:
|
|
51
|
+
- **Mode FULL**: Complete Clean Architecture + DDD (Use-cases, Mappers, Adapters).
|
|
52
|
+
- **Mode LIGHT**: Simplified MVP Architecture (Controllers → Services → Repositories).
|
|
53
|
+
- **Modern CLI Parser**: Support for `--key=value` and `--key value` syntax with validation.
|
|
54
|
+
- **Improved UX**: Integrated animated spinners and a full post-generation configuration summary.
|
|
55
|
+
|
|
56
|
+
### Security
|
|
57
|
+
|
|
58
|
+
- **Secure Environment**: Automatic generation of `JWT_SECRET` and `JWT_REFRESH_SECRET` in `.env`.
|
|
59
|
+
- **Sanitized Examples**: Creation of a safe `.env.example` file without sensitive data.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## [0.1.0] - Previous Version
|
|
64
|
+
|
|
65
|
+
### Initial Features
|
|
66
|
+
|
|
67
|
+
- Basic NestJS project generation.
|
|
68
|
+
- Support for Prisma and TypeORM.
|
|
69
|
+
- Basic Docker and Swagger configuration.
|
|
70
|
+
- Standard JWT Authentication.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Migration Notes
|
|
75
|
+
|
|
76
|
+
### From 0.1.x to 0.2.5
|
|
77
|
+
|
|
78
|
+
**Non-breaking changes**: Version 0.2.x is backward compatible.
|
|
79
|
+
|
|
80
|
+
**New Recommended Commands:**
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# LIGHT Mode (Fastest for MVPs)
|
|
84
|
+
nestcraftx new my-api --light --orm=prisma --auth
|
|
85
|
+
|
|
86
|
+
# FULL Mode (Standard for enterprise-grade apps)
|
|
87
|
+
nestcraftx new my-app --full --orm=typeorm --auth --swagger
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Benefits of updating:
|
|
91
|
+
|
|
92
|
+
- Automated secure JWT secrets.
|
|
93
|
+
|
|
94
|
+
- Choice of Package Manager (npm/yarn/pnpm).
|
|
95
|
+
|
|
96
|
+
- Cleaner separation of concerns in Auth/User modules.
|
|
97
|
+
|
|
98
|
+
- Better DX with arrow-key menus.
|