Structure: - control-plane/: Registries, SIMCO directives, CI/CD templates - projects/: Gamilit, ERP-Suite, Trading-Platform, Betting-Analytics - shared/: Libs catalog, knowledge-base Key features: - Centralized port, domain, database, and service registries - 23 SIMCO directives + 6 fundamental principles - NEXUS agent profiles with delegation rules - Validation scripts for workspace integrity - Dockerfiles for all services - Path aliases for quick reference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
58 lines
1.4 KiB
Bash
Executable File
58 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "🧹 Limpiando referencias incorrectas en Frontend..."
|
|
echo ""
|
|
|
|
# Contador de archivos modificados
|
|
COUNT=0
|
|
|
|
# Backup antes de modificar
|
|
echo "📦 Creando backup..."
|
|
BACKUP_DIR="backups/$(date +%Y%m%d_%H%M%S)"
|
|
mkdir -p "$BACKUP_DIR"
|
|
|
|
# Encontrar archivos con violaciones
|
|
FILES_WITH_VIOLATIONS=$(grep -r "@see.*docs/" src/ --include="*.ts" --include="*.tsx" -l 2>/dev/null || true)
|
|
|
|
if [ -z "$FILES_WITH_VIOLATIONS" ]; then
|
|
echo "✅ No se encontraron referencias incorrectas"
|
|
exit 0
|
|
fi
|
|
|
|
echo "Archivos a limpiar:"
|
|
echo "$FILES_WITH_VIOLATIONS"
|
|
echo ""
|
|
|
|
# Procesar cada archivo
|
|
for FILE in $FILES_WITH_VIOLATIONS; do
|
|
echo " 🔧 Limpiando: $FILE"
|
|
|
|
# Hacer backup
|
|
cp "$FILE" "$BACKUP_DIR/"
|
|
|
|
# Eliminar líneas con @see docs/
|
|
sed -i '/@see.*docs\//d' "$FILE"
|
|
sed -i '/@see Docs:/d' "$FILE"
|
|
sed -i '/@see ADR:/d' "$FILE"
|
|
|
|
# Limpiar líneas vacías consecutivas
|
|
sed -i '/^$/N;/^\n$/D' "$FILE"
|
|
|
|
COUNT=$((COUNT + 1))
|
|
done
|
|
|
|
echo ""
|
|
echo "✅ Limpieza completada"
|
|
echo "📊 Archivos modificados: $COUNT"
|
|
echo "💾 Backup guardado en: $BACKUP_DIR"
|
|
echo ""
|
|
echo "🔍 Verificando limpieza..."
|
|
REMAINING=$(grep -r "@see.*docs/" src/ --include="*.ts" --include="*.tsx" 2>/dev/null | wc -l)
|
|
|
|
if [ "$REMAINING" -eq 0 ]; then
|
|
echo "✅ ¡Código limpio! (0 referencias a docs)"
|
|
else
|
|
echo "⚠️ Aún quedan $REMAINING referencias"
|
|
grep -r "@see.*docs/" src/ --include="*.ts" --include="*.tsx"
|
|
fi
|