@silvestv/migration-planificator 7.1.2 → 7.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/README.fr.md CHANGED
@@ -1,27 +1,24 @@
1
1
  # Angular Migration Planner
2
2
 
3
- > **Outil professionnel d'analyse de migrations Angular pour montées de version, refactoring Nx monorepo, et évaluation de dette technique**
4
-
5
- Planifiez vos migrations Angular (17→18, 18→19, 19→20, 20→21) avec analyse AST précise, calculez les charges de travail, et générez des dashboards HTML interactifs.
6
-
7
- [![npm version](https://img.shields.io/npm/v/@silvestv/migration-planificator.svg)](https://www.npmjs.com/package/@silvestv/migration-planificator)
3
+ > **Effectuez vos migrations Angular sans stress et avec accompagnement !**
4
+ >
5
+ > **Outil professionnel d'accompagnement de migrations Angular pour montées de version, refactoring Nx monorepo, et evaluation de dette technique**
6
+ >
7
+ > **Auto fix de migration par IA + schematics angular (expérimental)**
8
+ >
8
9
  [![npm downloads](https://img.shields.io/npm/dm/@silvestv/migration-planificator.svg)](https://www.npmjs.com/package/@silvestv/migration-planificator)
9
10
  [![Node.js](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org/)
10
11
  [![TypeScript](https://img.shields.io/badge/typescript-5.9-blue)](https://www.typescriptlang.org/)
11
12
  [![Tests](https://img.shields.io/badge/tests-748%20passing-success)](tests)
12
13
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)[![Status](https://img.shields.io/badge/statut-alpha-orange)](https://www.npmjs.com/package/@silvestv/migration-planificator)
13
14
 
14
- **[🇬🇧 English](https://github.com/silvestv/migration-planificator-documentation/blob/master/README.md) | [🇫🇷 Français](https://github.com/silvestv/migration-planificator-documentation/blob/master/README.fr.md)**
15
-
16
- ---
17
-
18
- Pour toute préoccupation de sécurité ou signaler une vulnérabilité, voir [SECURITY.md](https://github.com/silvestv/migration-planificator-documentation/blob/master/SECURITY.md)
15
+ **[🇬🇧 English](https://github.com/silvestv/migration-planificator-documentation/blob/master/README.md) | [🇫🇷 Francais](https://github.com/silvestv/migration-planificator-documentation/blob/master/README.fr.md)**
19
16
 
20
17
  ---
21
18
 
22
19
  ## 🎯 C'est Quoi ?
23
20
 
24
- Un **outil d'analyse de migrations Angular** complet pour :
21
+ Un **outil d'analyse (AST) de migrations Angular** ET **de migration assistée par IA** complet pour :
25
22
 
26
23
  - 🔄 **Migrations Angular** : Planifiez migrations 17→18, 18→19, 19→20, 20→21 avec estimations précises
27
24
  - 🏢 **Monorepo Nx** : Analysez workspaces multi-apps/libs avec détail par target
@@ -31,6 +28,8 @@ Un **outil d'analyse de migrations Angular** complet pour :
31
28
 
32
29
  Parfait pour **équipes techniques** et **tech leads** planifiant des upgrades Angular ou refactoring.
33
30
 
31
+ 📸 [Voir le résultat](#vue-générale-du-résultat-page-workload) | 🤖 [AI Auto-Fix](#-ai-auto-fix-experimental)
32
+
34
33
  ---
35
34
 
36
35
  ## 🏆 Pourquoi Choisir Cet Outil ?
@@ -45,319 +44,165 @@ Contrairement aux scanners regex simples ou audits manuels :
45
44
 
46
45
  ---
47
46
 
48
- ## Fonctionnalités
47
+ ## 🚀 Demarrage Rapide
49
48
 
50
- - **Précision AST** : Détection contextuelle via ts-morph + @angular/compiler (88% règles)
51
- - **Dashboard Interactif** : Rapport HTML avec charts, timeline Gantt, édition temps réel
52
- - **3 Modes Scan** : AST (précis), Regex (rapide), Both (comparatif avec analyse delta)
53
- - **119 Règles Migration** : Couvrant breaking changes, dépréciations, best practices (to18, to19, to20, to21)
54
- - **Analyse Cross-File** : Détection TypeScript ↔ templates HTML
55
- - **Multi-Projets** : Support Nx Monorepo et Angular Standalone
56
-
57
- ---
58
-
59
- ## 🎓 Cas d'Usage
60
-
61
- ### Migration Version Angular
62
- Upgrade Angular 17→21 avec liste complète changements et estimations :
63
49
  ```bash
64
- npx @silvestv/migration-planificator --scanner=both --rules=all --project-path=/path/to/angular-app
65
- ```
66
- **Résultat** : Tous changements requis, breakdown temps, évaluation risques, planificateur interactif
50
+ # Se placer sur son projet
51
+ cd path-to-my-project # (si install local)
67
52
 
68
- ### Refactoring Monorepo Nx
69
- Moderniser workspace Nx avec 10+ apps/libs :
70
- ```bash
71
- npx @silvestv/migration-planificator --scanner=both --project-path=/path/to/nx-workspace
72
- ```
73
- **Résultat** : Breakdown par app/lib, impact dépendances partagées, timeline Gantt
74
-
75
- ### Évaluation Dette Technique
76
- Auditer codebase pour APIs dépréciées :
77
- ```bash
78
- npx @silvestv/migration-planificator --scanner=ast --rules=[18,19,20]
79
- ```
80
- **Résultat** : Patterns dépréciés (*ngIf, @Input()), opportunités modernisation, tracking fichiers
81
-
82
- ---
83
-
84
- ## 🚀 Démarrage Rapide
85
-
86
- ### Installation
87
-
88
- #### Via npm (Recommandé)
89
- ```bash
53
+ # Installer
54
+ npm install -D @silvestv/migration-planificator
90
55
  npm install -g @silvestv/migration-planificator
91
- # ou
92
- npx @silvestv/migration-planificator --project-path=/chemin/vers/projet
93
- ```
94
56
 
95
- #### Depuis les Sources
96
- ```bash
97
- git clone <repository-url>
98
- cd @silvestv/migration-planificator
99
- npm install
100
- npm run build
101
- ```
102
-
103
- ### Générer Premier Rapport
104
- ```bash
105
- # Analyser répertoire courant
106
- npx @silvestv/migration-planificator
107
-
108
- # Analyser projet spécifique avec options
109
- npx @silvestv/migration-planificator --scanner=both --project-path=/chemin/vers/projet
110
-
111
- # Filtrer par version migration
112
- npx @silvestv/migration-planificator --rules=18 # Seulement Angular 17→18
113
- npx @silvestv/migration-planificator --rules=[18,19] # Angular 17→19
114
-
115
- # Ou avec installation globale
116
- @silvestv/migration-planificator --scanner=both --project-path=/chemin/vers/projet
117
- ```
118
-
119
- ### Ouvrir Rapport
120
- ```bash
121
- open output/index.html # macOS/Linux
122
- start output/index.html # Windows
123
- ```
124
-
125
- ---
126
-
127
- ## 💻 Utilisation
128
-
129
- ### Après installation npm
130
-
131
- ```bash
132
- # Utilisation basique
57
+ # Executer directement
133
58
  npx @silvestv/migration-planificator
134
-
135
- # Avec options
136
- npx @silvestv/migration-planificator --scanner=both --project-path=/chemin/vers/projet --rules=all
137
-
138
- # Installation globale
139
- npm install -g @silvestv/migration-planificator
140
- @silvestv/migration-planificator --scanner=ast --project-path=./mon-app-angular
59
+ npx @silvestv/migration-planificator --project-path=path-to-my-project
141
60
  ```
142
61
 
143
62
  ### Options CLI
63
+
144
64
  ```bash
145
- --scanner=<mode> ast | regex | both [défaut: ast]
146
- --project-path=<path> Chemin vers projet Angular [défaut: répertoire courant]
147
- --rules=<versions> 18 | [18,19] | all [défaut: all]
65
+ --scanner=<mode> ast | regex | both [defaut: ast]
66
+ --project-path=<path> Chemin vers projet Angular [defaut: .]
67
+ --rules=<versions> 18 | [18,19] | all [defaut: all]
148
68
  ```
149
69
 
150
70
  ### Exemples
71
+
151
72
  ```bash
152
- # Scanner répertoire courant avec AST
73
+ # Scanner repertoire courant (AST, toutes regles)
153
74
  npx @silvestv/migration-planificator
154
75
 
155
- # Scan comparatif (AST vs Regex) sur projet spécifique
76
+ # Scan comparatif sur workspace Nx
156
77
  npx @silvestv/migration-planificator --scanner=both --project-path=/workspace/mon-app
157
78
 
158
- # Vérifier uniquement règles migration Angular 17→18
79
+ # Uniquement regles Angular 17→18
159
80
  npx @silvestv/migration-planificator --rules=18
160
81
 
161
- # Plusieurs versions avec scanner regex
162
- npx @silvestv/migration-planificator --scanner=regex --rules=[18,19]
82
+ # Plusieurs versions
83
+ npx @silvestv/migration-planificator --rules=[18,19,20]
163
84
  ```
164
85
 
165
- ### Pour Développement (depuis repository cloné)
86
+ ### Ouvrir le Rapport
87
+
166
88
  ```bash
167
- # Build et exécution
168
- npm run build
169
- npm start -- --scanner=both --project-path=/chemin/vers/projet
170
-
171
- # Scripts rapports rapides
172
- npm run report # AST scan + HTML (default)
173
- npm run report -- --scanner=ast # AST mode only
174
- npm run report -- --scanner=regex # Regex mode only
175
- npm run report -- --scanner=both # Comparative AST vs Regex
89
+ open output/index.html # macOS/Linux
90
+ start output/index.html # Windows
176
91
  ```
177
92
 
178
93
  ---
179
94
 
180
- ## 📊 Contenu Rapport
181
-
182
- ### Page Overview
183
- - Résumé projet (type, version Angular, compteur apps/libs)
184
- - Statistiques globales (règles détectées, charge totale)
185
- - Cards apps/libs avec analyse individuelle
95
+ ## 📊 Contenu du Rapport
186
96
 
187
- ### Page Workload
188
- - **Charts** : Pie (migrations), Bar (top règles), Doughnut (priorités)
189
- - **Timeline Gantt** : Phases migration séquentielles
190
- - **Arbre Hiérarchique** : Monorepo → Apps/Libs → Migrations → Priorités → Règles
191
- - **Édition Temps Réel** : Cliquer estimations pour ajuster, recalcul auto
192
- - **Filtres** : Niveau risque, catégorie, type règle, recherche texte
97
+ 5 fichiers HTML generes dans `output/` :
193
98
 
194
- ### Page Delta (Mode Both)
195
- - Comparaison règle par règle (précision AST vs Regex)
196
- - Analyse divergences, stats performance, recommandations
99
+ - **Overview** Resume projet, stats globales, cards apps/libs
100
+ - **Workload** Charts (pie, bar, doughnut), timeline Gantt, arbre hierarchique, edition temps reel, filtres
101
+ - **Migration Guide** Checklist etape par etape par regle
102
+ - **Rules Overview** — Toutes les 119 regles avec statut detection
103
+ - **Delta** *(mode both)* — Comparaison AST vs Regex, analyse divergences
197
104
 
198
105
  ---
199
106
 
200
- ## 📋 Règles Migration
201
-
202
- **119 règles** sur 4 versions :
203
-
204
- | Migration | Obligatoires | Recommandées | Optionnelles | Total |
205
- |-----------|--------------|--------------|--------------|-------|
206
- | **17→18** | 8 | 17 | 0 | 25 |
207
- | **18→19** | 15 | 13 | 9 | 37 |
208
- | **19→20** | 6 | 7 | 5 | 18 |
209
- | **20→21** | 21 | 6 | 12 | 39 |
210
-
211
- ### Catégories
212
- `environment` (versions Node/TS) • `imports` (modules) • `api` (APIs Angular) • `routing` (Router) • `template` (directives) • `test` (tests) • `ssr` (SSR) • `reactive` (Signals)
107
+ ## Vue générale du résultat (page workload)
213
108
 
214
- ### Niveaux Risque
215
- 🔴 **Critical** (breaking changes) • 🟠 **High** (dépréciations majeures) • 🟡 **Medium** (améliorations) • 🟢 **Low** (optimisations)
109
+ <p align="center">
110
+ <img src="https://raw.githubusercontent.com/silvestv/migration-planificator-documentation/master/public/img/migration-page-light.jpg" alt="Workload page" width="600"/>
111
+ </p>
216
112
 
217
113
  ---
218
114
 
219
- ## 🐛 Dépannage
115
+ ## 🤖 AI Auto-Fix (Experimental)
220
116
 
221
- ### Expression Régulière Invalide
222
- Vérifier compatibilité JavaScript :
223
- ```bash
224
- # (?s) non supporté → utiliser [\s\S]*?
225
- ```
226
-
227
- ### Build Échoue
228
- ```bash
229
- rm -rf dist/
230
- npm run build
231
- ```
232
-
233
- ### Rapport Vide
234
- - Vérifier `--project-path` pointe vers racine Angular
235
- - Vérifier présence `angular.json` ou `nx.json`
236
- - Support Angular 17, 18, 19, 20, 21
117
+ Generez des prompts structures pour agents IA (Claude CLI / Gemini CLI -> pas recommandé) afin de migrer automatiquement votre code.
237
118
 
238
- ---
119
+ > **Recommande** : **Claude Code Opus 4 (CLI)** avec un **depot de petite a moyenne taille** (< 500 fichiers impactes). Experimental — relisez toutes les modifications de l'agent avant de merger.
239
120
 
240
- ## 🔒 Sécurité et Confidentialité
241
-
242
- **Ce CLI s'exécute entièrement sur votre machine locale.** Il ne **collecte, ne transmet, ni ne stocke** aucune donnée externe. Aucune requête réseau n'est effectuée pendant l'analyse.
243
-
244
- - ✅ **100% Traitement Local** - Votre code ne quitte jamais votre machine
245
- - ✅ **Aucune Télémétrie** - Zéro collecte de données ou tracking
246
- - ✅ **Aucune API Externe** - Analyse AST pure avec bibliothèques locales
247
- - ✅ **Package Signé** - Signé automatiquement par le registre npm pour vérification d'intégrité
248
- - ✅ **Auditable** - Inspectez le contenu du package publié à tout moment :
249
- ```bash
250
- npm pack @silvestv/migration-planificator
251
- tar -tzf silvestv-migration-planificator-*.tgz
252
- # Ou visualisez les fichiers directement
253
- npm view @silvestv/migration-planificator files
254
- ```
255
-
256
- Pour toute préoccupation de sécurité ou signaler une vulnérabilité, voir [SECURITY.md](https://github.com/silvestv/migration-planificator-documentation/blob/master/SECURITY.md)
257
-
258
- ---
121
+ ### Prérequis
259
122
 
260
- ## 🤝 Contribuer & Support
123
+ - Un IDE (Vscode / Webstorm)
124
+ - Un Claude Code (recommandée) OU Gemini CLI
125
+ - Attention : la migration d'une règle coûte un certain nombre de tokens !
261
126
 
262
- Ce projet est sous licence **Apache License 2.0** - libre pour usage commercial et open-source.
127
+ ### Commande
263
128
 
264
- ### 🐛 Signaler un Bug
265
-
266
- Vous avez trouvé un bug ? Signalez-le via GitHub Issues :
267
-
268
- 1. **Aller sur** : [GitHub Issues](https://github.com/silvestv/migration-planificator-documentation/issues/new/choose)
269
- 2. **Sélectionner** : Template "Bug Report"
270
- 3. **Remplir** :
271
- - Description du bug
272
- - Étapes pour reproduire
273
- - Comportement attendu vs réel
274
- - Votre environnement (OS, version Node.js, version Angular)
275
- - Commande utilisée
276
-
277
- **Lien direct** : [Signaler un Bug](https://github.com/silvestv/migration-planificator-documentation/issues/new?template=bug_report.md)
278
-
279
- ### ✨ Demander une Fonctionnalité
280
-
281
- Vous avez une idée d'amélioration ?
282
-
283
- 1. **Aller sur** : [GitHub Issues](https://github.com/silvestv/migration-planificator-documentation/issues/new/choose)
284
- 2. **Sélectionner** : Template "Feature Request"
285
- 3. **Décrire** :
286
- - Le problème que vous essayez de résoudre
287
- - Votre solution proposée
288
- - Cas d'usage et qui en bénéficie
289
- - Maquettes ou exemples éventuels
129
+ ```bash
130
+ npx @silvestv/migration-planificator fix --rule=RULE_KEY --project-path=/chemin/vers/projet
131
+ ```
290
132
 
291
- **Lien direct** : [Demander une Fonctionnalité](https://github.com/silvestv/migration-planificator-documentation/issues/new?template=feature_request.md)
133
+ | Option | Description | Defaut |
134
+ |--------|-------------|--------|
135
+ | `--rule=RULE_KEY` | Regle de migration a corriger **(requis)** | — |
136
+ | `--project-path=PATH` | Chemin vers le projet Angular | `.` |
137
+ | `--branch=BRANCH` | Branche de base | `master` |
138
+ | `-y` | Skip confirmation preconditions | `false` |
139
+ | `--skip-validation` | Skip build & tests dans le prompt | `false` |
292
140
 
293
- ### ❓ Poser une Question
141
+ ### Sortie
294
142
 
295
- Besoin d'aide ou vous avez des questions ?
143
+ 4 fichiers dans `output/ai/migration/{version}/{rule}-prompts/` :
296
144
 
297
- 1. **Aller sur** : [GitHub Issues](https://github.com/silvestv/migration-planificator-documentation/issues/new/choose)
298
- 2. **Sélectionner** : Template "Question"
299
- 3. **Vérifier d'abord** :
300
- - [FAQ](https://github.com/silvestv/migration-planificator-documentation/blob/master/FAQ.md)
301
- - [Guide de Dépannage](https://github.com/silvestv/migration-planificator-documentation/blob/master/TROUBLESHOOTING.md)
145
+ | Fichier | Role |
146
+ |---------|------|
147
+ | `constitution.md` | Regles absolues de l'agent (securite, qualite, imports) |
148
+ | `context.md` | Description regle + toutes les occurrences (fichier:ligne) |
149
+ | `ledger.json` | Suivi migration (schematic, iterations, blame) |
150
+ | `file-prompt.md` | Instructions completes en 7 phases pour l'agent |
302
151
 
303
- **Lien direct** : [Poser une Question](https://github.com/silvestv/migration-planificator-documentation/issues/new?template=question.md)
152
+ ### Utilisation
304
153
 
305
- ### 📧 Contact Direct
154
+ ```bash
155
+ cd /chemin/vers/projet && claude # ou gemini
156
+ > Execute output/ai/migration/19/signal_inputs-prompts/file-prompt.md
157
+ ```
306
158
 
307
- Pour les problèmes urgents, préoccupations de sécurité ou demandes commerciales :
159
+ L'agent va : verifier preconditions creer branche proposer plan → implementer → valider (AST + build + tests) → commit & push.
308
160
 
309
- 📧 **Email** : victor.silvestre.dev@gmail.com
161
+ ### Pipeline de l'Agent
310
162
 
311
- **Utilisateurs entreprise** : Contactez-nous pour licence commerciale, support prioritaire et fonctionnalités personnalisées.
163
+ <p align="center">
164
+ <img src="https://raw.githubusercontent.com/silvestv/migration-planificator-documentation/master/public/img/autofix-pipeline.jpg" alt="Pipeline Agent AI Auto-Fix" width="600"/>
165
+ </p>
312
166
 
313
167
  ---
314
168
 
315
- ## 📝 Licence
316
-
317
- © 2025 Victor SILVESTRE
169
+ ## 📋 Regles Migration
318
170
 
319
- Sous licence **Apache License, Version 2.0** (la "Licence").
320
- Vous ne pouvez utiliser ce fichier qu'en conformité avec la Licence.
321
- Vous pouvez obtenir une copie de la Licence à :
171
+ **119 regles** sur 4 versions :
322
172
 
323
- http://www.apache.org/licenses/LICENSE-2.0
173
+ | Migration | Obligatoires | Recommandees | Optionnelles | Total |
174
+ |-----------|--------------|--------------|--------------|-------|
175
+ | **17→18** | 8 | 17 | 0 | 25 |
176
+ | **18→19** | 15 | 13 | 9 | 37 |
177
+ | **19→20** | 6 | 7 | 5 | 18 |
178
+ | **20→21** | 21 | 6 | 12 | 39 |
324
179
 
325
- ### Conditions Principales
180
+ **Categories** : `environment` • `imports` • `api` • `routing` • `template` • `test` • `ssr` • `reactive` • `signals` • `config`
326
181
 
327
- - ✅ **Usage Commercial** - Utilisation libre pour tout usage incluant commercial
328
- - ✅ **Modification** - Modifier et distribuer vos propres versions
329
- - ✅ **Distribution** - Redistribuer les versions originales ou modifiées
330
- - ✅ **Droits de Brevets** - Inclut une concession explicite des droits de brevet des contributeurs
331
- - ✅ **Usage Privé** - Utiliser en privé sans aucune obligation
182
+ **Niveaux Risque** : 🔴 Critical 🟠 High 🟡 Medium • 🟢 Low
332
183
 
333
- ### Obligations
184
+ ---
334
185
 
335
- Lors de la distribution ou modification :
336
- - 📝 Inclure le fichier LICENSE
337
- - 📝 Inclure le fichier NOTICE (si présent)
338
- - 📝 Indiquer tout changement significatif apporté au code
186
+ ## 🔒 Securite
339
187
 
340
- ### Avertissement
188
+ **100% traitement local.** Aucune telemetrie, aucune API externe, vos donnees ne quittent jamais votre machine. Voir [SECURITY.md](https://github.com/silvestv/migration-planificator-documentation/blob/master/SECURITY.md)
341
189
 
342
- Sauf si requis par la loi applicable ou convenu par écrit, le logiciel
343
- distribué sous la Licence est distribué "TEL QUEL",
344
- SANS GARANTIES OU CONDITIONS D'AUCUNE SORTE, expresses ou implicites.
345
- Consultez la Licence pour les autorisations et limitations
346
- spécifiques régissant la Licence.
190
+ ---
347
191
 
348
- Voir [LICENSE](LICENSE) pour le texte complet de la licence.
192
+ ## 🤝 Support
349
193
 
350
- 📧 **Contact** : victor.silvestre.dev@gmail.com
194
+ - 🐛 [Signaler un Bug](https://github.com/silvestv/migration-planificator-documentation/issues/new?template=bug_report.md)
195
+ - ✨ [Demander une Fonctionnalite](https://github.com/silvestv/migration-planificator-documentation/issues/new?template=feature_request.md)
196
+ - ❓ [Poser une Question](https://github.com/silvestv/migration-planificator-documentation/issues/new?template=question.md)
197
+ - 📧 victor.silvestre.dev@gmail.com
351
198
 
352
199
  ---
353
200
 
354
- ## 🙏 Remerciements
355
-
356
- Construit avec **ts-morph** (AST TypeScript), **@angular/compiler** (parsing HTML), **TailwindCSS** (design), **Chart.js** (visualisation)
201
+ ## 📝 Licence
357
202
 
358
- ---
203
+ © 2025 Victor SILVESTRE — [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0). Libre pour usage commercial. Voir [LICENSE](LICENSE).
359
204
 
360
- **🚀 Commencez à planifier votre migration Angular dès aujourd'hui !**
205
+ Construit avec **ts-morph**, **@angular/compiler**, **TailwindCSS**, **Chart.js**
361
206
 
362
207
  ---
363
208