-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathcheck-struct.sh
More file actions
executable file
·56 lines (45 loc) · 2.45 KB
/
check-struct.sh
File metadata and controls
executable file
·56 lines (45 loc) · 2.45 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
#!/bin/bash
echo "🎯 NESTJS PROJECT ANALYSIS"
echo "=========================="
echo -e "\n📊 FILE STATISTICS:"
echo " TypeScript files: $(find . -name "*.ts" -not -path "./node_modules/*" 2>/dev/null | wc -l)"
echo " JavaScript files: $(find . -name "*.js" -not -path "./node_modules/*" 2>/dev/null | wc -l)"
echo " Test files: $(find . -name "*.spec.ts" -o -name "*.test.ts" 2>/dev/null | wc -l)"
echo " Entity files: $(find . -name "*.entity.ts" 2>/dev/null | wc -l)"
echo " DTO files: $(find . -name "*.dto.ts" 2>/dev/null | wc -l)"
echo -e "\n🏗️ ARCHITECTURE OVERVIEW:"
echo " Main Application: $(grep -l "main.ts" src/ 2>/dev/null || echo "Not found")"
echo " App Module: $(find src -name "app.module.ts" 2>/dev/null | head -1)"
echo -e "\n📁 MODULE BREAKDOWN:"
echo " Total Modules: $(find src -name "*.module.ts" 2>/dev/null | wc -l)"
echo " Microservices: $(find microservices -name "*.module.ts" 2>/dev/null | wc -l)"
echo -e "\n🔧 SERVICE TYPES:"
echo " Core Services: $(find src -name "*.service.ts" -not -path "*/test/*" 2>/dev/null | wc -l)"
echo " Microservices: $(find microservices -name "*.service.ts" 2>/dev/null | wc -l)"
echo -e "\n🎮 CONTROLLER COUNT:"
echo " Main Controllers: $(find src -name "*.controller.ts" -not -path "*/test/*" 2>/dev/null | wc -l)"
echo " Microservice Controllers: $(find microservices -name "*.controller.ts" 2>/dev/null | wc -l)"
echo -e "\n🗄️ DATABASE ENTITIES:"
find src -name "*.entity.ts" 2>/dev/null | sed 's|src/||' | sort | head -10
if [ $(find src -name "*.entity.ts" 2>/dev/null | wc -l) -gt 10 ]; then
echo " ... and $(($(find src -name "*.entity.ts" 2>/dev/null | wc -l) - 10)) more"
fi
echo -e "\n🧩 KEY MODULES (by size):"
for module in puzzle puzzles game-engine multiplayer tournaments; do
count=$(find src -path "*$module*" -name "*.ts" 2>/dev/null | wc -l)
if [ $count -gt 0 ]; then
echo " $module: $count files"
fi
done
echo -e "\n🐳 DOCKER SETUP:"
if [ -f "docker-compose.yml" ]; then
echo " Services in docker-compose:"
grep -E '^ [a-zA-Z]+:' docker-compose.yml | sed 's/://g;s/^/ /'
fi
echo -e "\n📦 BUILD CONFIG:"
if [ -f "nest-cli.json" ]; then
echo " Source root: $(jq -r '.sourceRoot // "src"' nest-cli.json 2>/dev/null || echo 'src')"
fi
echo -e "\n✅ VERIFICATION:"
echo " Main entry: $(ls -la index.ts 2>/dev/null || echo 'Not found')"
echo " Package manager: $(grep -q "pnpm-lock" package-lock.json && echo 'npm' || echo 'unknown')"