-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-structure.sh
More file actions
executable file
·108 lines (96 loc) · 3.26 KB
/
Copy pathcheck-structure.sh
File metadata and controls
executable file
·108 lines (96 loc) · 3.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/bash
# Script de vérification de la structure DreamQuest
echo "🔍 Vérification de la structure du projet..."
echo ""
# Couleurs
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# Compteurs
errors=0
# 1. Vérifier que src/ existe dans frontend
echo "1️⃣ Vérification structure frontend/src/..."
if [ -d "frontend/src" ]; then
echo -e "${GREEN}✓${NC} frontend/src/ existe"
else
echo -e "${RED}✗${NC} frontend/src/ manquant"
errors=$((errors+1))
fi
# 2. Vérifier les dossiers principaux
echo ""
echo "2️⃣ Vérification dossiers principaux..."
for dir in frontend api workers unity infra docs; do
if [ -d "$dir" ]; then
echo -e "${GREEN}✓${NC} $dir/"
else
echo -e "${RED}✗${NC} $dir/ manquant"
errors=$((errors+1))
fi
done
# 3. Vérifier absence de doublons Vite
echo ""
echo "3️⃣ Vérification absence fichiers Vite à la racine..."
vite_files=("index.html" "vite.config.ts" "tsconfig.app.json" "tsconfig.node.json")
for file in "${vite_files[@]}"; do
if [ -f "$file" ]; then
echo -e "${RED}✗${NC} Fichier obsolète trouvé: $file"
errors=$((errors+1))
else
echo -e "${GREEN}✓${NC} Pas de $file"
fi
done
# 4. Compter les fichiers sources
echo ""
echo "4️⃣ Comptage fichiers sources..."
tsx_count=$(find . -name "*.tsx" ! -path "*/node_modules/*" ! -path "*/.next/*" | wc -l | tr -d ' ')
ts_count=$(find . -name "*.ts" ! -path "*/node_modules/*" ! -path "*/.next/*" ! -name "*.tsx" | wc -l | tr -d ' ')
py_count=$(find . -name "*.py" ! -path "*/node_modules/*" | wc -l | tr -d ' ')
cs_count=$(find . -name "*.cs" | wc -l | tr -d ' ')
echo " - Fichiers .tsx: $tsx_count"
echo " - Fichiers .ts: $ts_count"
echo " - Fichiers .py: $py_count"
echo " - Fichiers .cs: $cs_count"
# 5. Vérifier les fichiers clés
echo ""
echo "5️⃣ Vérification fichiers clés..."
key_files=(
"frontend/package.json"
"frontend/src/app/page.tsx"
"frontend/src/components/DreamForm.tsx"
"api/main.py"
"api/schemas.py"
"workers/orchestrator.py"
"unity/Assets/Scripts/BlueprintLoader.cs"
)
for file in "${key_files[@]}"; do
if [ -f "$file" ]; then
echo -e "${GREEN}✓${NC} $file"
else
echo -e "${RED}✗${NC} $file manquant"
errors=$((errors+1))
fi
done
# 6. Vérifier node_modules
echo ""
echo "6️⃣ Vérification dépendances..."
if [ -d "node_modules" ] && [ -d "frontend/node_modules" ]; then
echo -e "${GREEN}✓${NC} Dépendances installées (racine + frontend)"
elif [ -d "node_modules" ]; then
echo -e "${GREEN}✓${NC} Dépendances racine installées"
else
echo -e "${RED}✗${NC} Dépendances non installées"
errors=$((errors+1))
fi
# Résultat final
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
if [ $errors -eq 0 ]; then
echo -e "${GREEN}✅ Structure validée ! Aucune erreur.${NC}"
echo ""
echo "🚀 Prêt à lancer: npm run dev:frontend"
else
echo -e "${RED}❌ $errors erreur(s) détectée(s)${NC}"
echo ""
echo "Consultez STRUCTURE.md pour la structure attendue"
fi
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"