@atlashub/smartstack-cli 1.11.0 → 1.12.0
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/.documentation/agents.html +7 -2
- package/.documentation/apex.html +7 -2
- package/.documentation/business-analyse.html +7 -2
- package/.documentation/cli-commands.html +871 -0
- package/.documentation/commands.html +7 -2
- package/.documentation/efcore.html +7 -2
- package/.documentation/gitflow.html +7 -2
- package/.documentation/hooks.html +7 -2
- package/.documentation/index.html +7 -2
- package/.documentation/init.html +7 -2
- package/.documentation/installation.html +7 -2
- package/.documentation/ralph-loop.html +7 -2
- package/.documentation/test-web.html +7 -2
- package/dist/index.js +1932 -336
- package/dist/index.js.map +1 -1
- package/package.json +8 -2
- package/templates/agents/efcore/squash.md +67 -31
- package/templates/agents/gitflow/finish.md +68 -56
- package/templates/commands/business-analyse/0-orchestrate.md +72 -556
- package/templates/commands/business-analyse/1-init.md +23 -193
- package/templates/commands/business-analyse/2-discover.md +85 -462
- package/templates/commands/business-analyse/3-analyse.md +40 -342
- package/templates/commands/business-analyse/4-specify.md +72 -537
- package/templates/commands/business-analyse/5-validate.md +43 -237
- package/templates/commands/business-analyse/6-handoff.md +93 -682
- package/templates/commands/business-analyse/7-doc-html.md +45 -544
- package/templates/commands/business-analyse/_shared.md +176 -0
- package/templates/commands/business-analyse/bug.md +50 -257
- package/templates/commands/business-analyse/change-request.md +59 -283
- package/templates/commands/business-analyse/hotfix.md +36 -120
- package/templates/commands/business-analyse.md +55 -574
- package/templates/commands/efcore/_shared.md +206 -0
- package/templates/commands/efcore/conflicts.md +39 -201
- package/templates/commands/efcore/db-deploy.md +28 -237
- package/templates/commands/efcore/db-reset.md +41 -390
- package/templates/commands/efcore/db-seed.md +44 -323
- package/templates/commands/efcore/db-status.md +31 -210
- package/templates/commands/efcore/migration.md +45 -368
- package/templates/commands/efcore/rebase-snapshot.md +38 -241
- package/templates/commands/efcore/scan.md +35 -204
- package/templates/commands/efcore/squash.md +158 -251
- package/templates/commands/efcore.md +49 -177
- package/templates/commands/gitflow/1-init.md +94 -1318
- package/templates/commands/gitflow/10-start.md +86 -990
- package/templates/commands/gitflow/11-finish.md +264 -454
- package/templates/commands/gitflow/12-cleanup.md +40 -213
- package/templates/commands/gitflow/2-status.md +51 -386
- package/templates/commands/gitflow/3-commit.md +108 -801
- package/templates/commands/gitflow/4-plan.md +42 -13
- package/templates/commands/gitflow/5-exec.md +60 -5
- package/templates/commands/gitflow/6-abort.md +54 -277
- package/templates/commands/gitflow/7-pull-request.md +74 -717
- package/templates/commands/gitflow/8-review.md +51 -178
- package/templates/commands/gitflow/9-merge.md +74 -404
- package/templates/commands/gitflow/_shared.md +196 -0
- package/templates/commands/quickstart.md +154 -0
- package/templates/commands/ralph-loop/ralph-loop.md +104 -2
- package/templates/hooks/hooks.json +13 -0
- package/templates/hooks/ralph-mcp-logger.sh +46 -0
- package/templates/hooks/ralph-session-end.sh +69 -0
- package/templates/ralph/README.md +91 -0
- package/templates/ralph/ralph.config.yaml +113 -0
- package/templates/scripts/setup-ralph-loop.sh +173 -0
- package/templates/skills/_shared.md +117 -0
- package/templates/skills/ai-prompt/SKILL.md +87 -654
- package/templates/skills/application/SKILL.md +76 -499
- package/templates/skills/controller/SKILL.md +38 -165
- package/templates/skills/documentation/SKILL.md +2 -1
- package/templates/skills/feature-full/SKILL.md +107 -732
- package/templates/skills/notification/SKILL.md +85 -474
- package/templates/skills/ui-components/SKILL.md +62 -762
- package/templates/skills/workflow/SKILL.md +85 -489
- package/templates/commands/gitflow/rescue.md +0 -867
- package/templates/skills/business-analyse/SKILL.md +0 -191
|
@@ -6,263 +6,68 @@ model: haiku
|
|
|
6
6
|
|
|
7
7
|
# EF Core Database Deploy
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
> **Ref:** [_shared.md](_shared.md)
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## STEP 0:
|
|
14
|
-
|
|
15
|
-
> **Include:** `_env-check.md` (etapes 0.1 a 0.4)
|
|
16
|
-
|
|
17
|
-
### 0.1 Detecter les fichiers appsettings
|
|
13
|
+
## STEP 0: Vérification Environnement
|
|
18
14
|
|
|
19
15
|
```bash
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
[ -z "$API_DIR" ] && API_DIR="src/SmartStack.Api"
|
|
23
|
-
|
|
24
|
-
APPSETTINGS_FILES=$(find "$API_DIR" -maxdepth 1 -name "appsettings*.json" 2>/dev/null | sort)
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### 0.2 Selectionner l'environnement
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
# Priorite: --env flag > appsettings.Local.json > erreur
|
|
31
|
-
ENV_FLAG="${1#--env=}" # Extraire valeur si --env=Development
|
|
32
|
-
|
|
33
|
-
if [ -n "$ENV_FLAG" ] && [ "$ENV_FLAG" != "$1" ]; then
|
|
34
|
-
SELECTED_ENV="appsettings.${ENV_FLAG}.json"
|
|
35
|
-
elif [ -f "$API_DIR/appsettings.Local.json" ]; then
|
|
36
|
-
SELECTED_ENV="appsettings.Local.json"
|
|
37
|
-
else
|
|
38
|
-
echo "ERROR: Aucun fichier appsettings trouve"
|
|
39
|
-
exit 1
|
|
40
|
-
fi
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### 0.3 Extraire et afficher la connexion
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
# Extraire connection string
|
|
47
|
-
CONNECTION_STRING=$(powershell -Command "
|
|
48
|
-
\$json = Get-Content '$API_DIR/$SELECTED_ENV' | ConvertFrom-Json
|
|
49
|
-
\$json.ConnectionStrings.DefaultConnection
|
|
50
|
-
")
|
|
51
|
-
|
|
52
|
-
DATABASE_NAME=$(echo "$CONNECTION_STRING" | grep -oP 'Database=\K[^;]+')
|
|
53
|
-
SERVER_NAME=$(echo "$CONNECTION_STRING" | grep -oP 'Server=\K[^;]+')
|
|
54
|
-
CONNECTION_MASKED=$(echo "$CONNECTION_STRING" | sed 's/Password=[^;]*/Password=****/g')
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### 0.4 Afficher le resume
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
================================================================================
|
|
61
|
-
EF CORE - DATABASE DEPLOY
|
|
62
|
-
================================================================================
|
|
63
|
-
|
|
64
|
-
FICHIERS DISPONIBLES:
|
|
65
|
-
{liste des appsettings detectes}
|
|
66
|
-
|
|
67
|
-
ENVIRONNEMENT: {SELECTED_ENV}
|
|
68
|
-
|
|
69
|
-
CONNEXION CIBLE:
|
|
70
|
-
Server: {SERVER_NAME}
|
|
71
|
-
Database: {DATABASE_NAME}
|
|
72
|
-
String: {CONNECTION_MASKED}
|
|
73
|
-
|
|
74
|
-
================================================================================
|
|
16
|
+
detect_environment
|
|
17
|
+
block_production
|
|
75
18
|
```
|
|
76
19
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
# Bloquer si Production
|
|
81
|
-
if [[ "$SELECTED_ENV" == *"Production"* ]]; then
|
|
82
|
-
echo "BLOQUE: Environnement Production detecte"
|
|
83
|
-
echo " Utilisez un environnement non-production"
|
|
84
|
-
exit 1
|
|
85
|
-
fi
|
|
86
|
-
```
|
|
20
|
+
Afficher: fichiers disponibles, environnement sélectionné, connexion cible.
|
|
87
21
|
|
|
88
22
|
---
|
|
89
23
|
|
|
90
|
-
## STEP 1:
|
|
24
|
+
## STEP 1: Détecter Projet
|
|
91
25
|
|
|
92
26
|
```bash
|
|
93
|
-
|
|
94
|
-
CSPROJ=$(find . -name "*.csproj" -exec grep -l "Microsoft.EntityFrameworkCore" {} \; | head -1)
|
|
95
|
-
if [ -z "$CSPROJ" ]; then
|
|
96
|
-
echo "ERROR: No EF Core project detected"
|
|
97
|
-
exit 1
|
|
98
|
-
fi
|
|
99
|
-
|
|
100
|
-
PROJECT_DIR=$(dirname "$CSPROJ")
|
|
101
|
-
PROJECT_NAME=$(basename "$CSPROJ" .csproj)
|
|
27
|
+
detect_efcore_project
|
|
102
28
|
```
|
|
103
29
|
|
|
104
30
|
---
|
|
105
31
|
|
|
106
|
-
## STEP 2:
|
|
32
|
+
## STEP 2: Vérifier Migrations Pending
|
|
107
33
|
|
|
108
34
|
```bash
|
|
109
|
-
|
|
110
|
-
dotnet ef migrations list --json 2>/dev/null | grep -E '"applied": false'
|
|
111
|
-
PENDING_COUNT=$(dotnet ef migrations list --json 2>/dev/null | grep -c '"applied": false' || echo "0")
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
**Display status:**
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
================================================================================
|
|
118
|
-
EF CORE - DATABASE DEPLOY
|
|
119
|
-
================================================================================
|
|
120
|
-
|
|
121
|
-
PROJECT: {PROJECT_NAME}
|
|
122
|
-
CONFIG: appsettings.Local.json
|
|
123
|
-
MIGRATIONS: {PENDING_COUNT} pending
|
|
124
|
-
|
|
125
|
-
================================================================================
|
|
35
|
+
PENDING_COUNT=$(dotnet ef migrations list --json | grep -c '"applied": false')
|
|
126
36
|
```
|
|
127
37
|
|
|
128
38
|
---
|
|
129
39
|
|
|
130
|
-
## STEP 3:
|
|
40
|
+
## STEP 3: Appliquer
|
|
131
41
|
|
|
132
42
|
```bash
|
|
133
|
-
# Apply migrations with local config
|
|
134
43
|
dotnet ef database update --configuration Release --verbose
|
|
135
44
|
```
|
|
136
45
|
|
|
137
|
-
**If connection error:**
|
|
138
|
-
|
|
139
|
-
```
|
|
140
|
-
⚠️ Database connection error
|
|
141
|
-
|
|
142
|
-
CHECKS:
|
|
143
|
-
1. Is SQL Server running?
|
|
144
|
-
2. Does the database exist?
|
|
145
|
-
3. Are the credentials correct?
|
|
146
|
-
|
|
147
|
-
USEFUL COMMANDS:
|
|
148
|
-
- Check connection: sqlcmd -S {SERVER} -E
|
|
149
|
-
- Create database: /efcore:db-reset
|
|
150
|
-
```
|
|
151
|
-
|
|
152
46
|
---
|
|
153
47
|
|
|
154
|
-
##
|
|
155
|
-
|
|
156
|
-
**Afficher un resume apres le deploiement:**
|
|
48
|
+
## Résumé
|
|
157
49
|
|
|
50
|
+
**Si succès:**
|
|
158
51
|
```
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
-------------------------------------------------------------------------------
|
|
165
|
-
• Projet: {PROJECT_NAME}
|
|
166
|
-
• Environnement: {SELECTED_ENV}
|
|
167
|
-
• Serveur: {SERVER_NAME}
|
|
168
|
-
• Base: {DATABASE_NAME}
|
|
169
|
-
|
|
170
|
-
MIGRATIONS APPLIQUÉES
|
|
171
|
-
-------------------------------------------------------------------------------
|
|
172
|
-
✓ {migration_1_name}
|
|
173
|
-
✓ {migration_2_name}
|
|
174
|
-
... ({N} migrations au total)
|
|
175
|
-
|
|
176
|
-
WORKFLOW STATUT
|
|
177
|
-
-------------------------------------------------------------------------------
|
|
178
|
-
✓ Connexion établie
|
|
179
|
-
✓ {N} migration(s) appliquée(s)
|
|
180
|
-
✓ Base de données à jour
|
|
181
|
-
|
|
182
|
-
===============================================================================
|
|
183
|
-
PROCHAINES ÉTAPES
|
|
184
|
-
===============================================================================
|
|
185
|
-
|
|
186
|
-
1. Vérifier le statut de la base:
|
|
187
|
-
/efcore:db-status
|
|
188
|
-
|
|
189
|
-
2. Peupler avec des données de test (si nécessaire):
|
|
190
|
-
/efcore:db-seed
|
|
191
|
-
|
|
192
|
-
3. Lancer l'application:
|
|
193
|
-
dotnet run --project {STARTUP_PROJECT}
|
|
194
|
-
|
|
195
|
-
===============================================================================
|
|
52
|
+
DEPLOY - {DATABASE_NAME}
|
|
53
|
+
├── Environnement: {SELECTED_ENV}
|
|
54
|
+
├── Serveur: {SERVER_NAME}
|
|
55
|
+
├── Migrations appliquées: {N}
|
|
56
|
+
└── Prochains: /efcore:db-status, /efcore:db-seed
|
|
196
57
|
```
|
|
197
58
|
|
|
198
|
-
**Si aucune
|
|
199
|
-
|
|
59
|
+
**Si aucune pending:**
|
|
200
60
|
```
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
DÉTAILS
|
|
206
|
-
-------------------------------------------------------------------------------
|
|
207
|
-
• Projet: {PROJECT_NAME}
|
|
208
|
-
• Environnement: {SELECTED_ENV}
|
|
209
|
-
• Base: {DATABASE_NAME}
|
|
210
|
-
|
|
211
|
-
STATUT
|
|
212
|
-
-------------------------------------------------------------------------------
|
|
213
|
-
✓ Aucune migration en attente
|
|
214
|
-
✓ Base de données synchronisée avec le code
|
|
215
|
-
|
|
216
|
-
===============================================================================
|
|
217
|
-
PROCHAINES ÉTAPES
|
|
218
|
-
===============================================================================
|
|
219
|
-
|
|
220
|
-
1. Créer une nouvelle migration si besoin:
|
|
221
|
-
/efcore:migration
|
|
222
|
-
|
|
223
|
-
2. Vérifier le statut complet:
|
|
224
|
-
/efcore:db-status
|
|
225
|
-
|
|
226
|
-
===============================================================================
|
|
61
|
+
DEPLOY - À jour
|
|
62
|
+
├── Aucune migration en attente
|
|
63
|
+
└── Prochains: /efcore:migration, /efcore:scan
|
|
227
64
|
```
|
|
228
65
|
|
|
229
|
-
**Si erreur
|
|
230
|
-
|
|
66
|
+
**Si erreur connexion:**
|
|
231
67
|
```
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
ERREUR
|
|
237
|
-
-------------------------------------------------------------------------------
|
|
238
|
-
✗ Impossible de se connecter à la base de données
|
|
239
|
-
|
|
240
|
-
DÉTAILS CONNEXION
|
|
241
|
-
-------------------------------------------------------------------------------
|
|
242
|
-
• Serveur: {SERVER_NAME}
|
|
243
|
-
• Base: {DATABASE_NAME}
|
|
244
|
-
• Config: {SELECTED_ENV}
|
|
245
|
-
|
|
246
|
-
VÉRIFICATIONS À EFFECTUER
|
|
247
|
-
-------------------------------------------------------------------------------
|
|
248
|
-
1. SQL Server est-il démarré?
|
|
249
|
-
2. La base de données existe-t-elle?
|
|
250
|
-
3. Les credentials sont-ils corrects?
|
|
251
|
-
|
|
252
|
-
===============================================================================
|
|
253
|
-
ACTIONS SUGGÉRÉES
|
|
254
|
-
===============================================================================
|
|
255
|
-
|
|
256
|
-
1. Vérifier la connexion:
|
|
257
|
-
sqlcmd -S {SERVER_NAME} -E
|
|
258
|
-
|
|
259
|
-
2. Créer/recréer la base:
|
|
260
|
-
/efcore:db-reset
|
|
261
|
-
|
|
262
|
-
3. Vérifier la configuration:
|
|
263
|
-
Ouvrir {API_DIR}/{SELECTED_ENV}
|
|
264
|
-
|
|
265
|
-
===============================================================================
|
|
68
|
+
DEPLOY - Échec
|
|
69
|
+
├── Vérifications: SQL Server démarré?, DB existe?, Credentials OK?
|
|
70
|
+
└── Commandes: sqlcmd -S {SERVER} -E, /efcore:db-reset
|
|
266
71
|
```
|
|
267
72
|
|
|
268
73
|
---
|
|
@@ -271,20 +76,6 @@ VÉRIFICATIONS À EFFECTUER
|
|
|
271
76
|
|
|
272
77
|
| Option | Description |
|
|
273
78
|
|--------|-------------|
|
|
274
|
-
| `--env {name}` | Utiliser appsettings.{name}.json
|
|
275
|
-
| `--verbose` |
|
|
276
|
-
| `--
|
|
277
|
-
| `--context {name}` | Specify DbContext if multiple |
|
|
278
|
-
|
|
279
|
-
## Exemples
|
|
280
|
-
|
|
281
|
-
```bash
|
|
282
|
-
# Deployer sur la base locale (defaut)
|
|
283
|
-
/efcore:db-deploy
|
|
284
|
-
|
|
285
|
-
# Deployer sur l'environnement Development
|
|
286
|
-
/efcore:db-deploy --env Development
|
|
287
|
-
|
|
288
|
-
# Deployer sur Staging
|
|
289
|
-
/efcore:db-deploy --env Staging
|
|
290
|
-
```
|
|
79
|
+
| `--env {name}` | Utiliser appsettings.{name}.json |
|
|
80
|
+
| `--verbose` | Afficher SQL |
|
|
81
|
+
| `--context {name}` | Spécifier DbContext |
|