workspace-v1/shared/knowledge-base/reference/erp-inmobiliaria-legacy/gamilit/backend/scripts/fix-ts2564.sh
rckrdmrd 66161b1566 feat: Workspace-v1 complete migration with NEXUS v3.4
Sistema NEXUS v3.4 migrado con:

Estructura principal:
- core/orchestration: Sistema SIMCO + CAPVED (27 directivas, 28 perfiles)
- core/catalog: Catalogo de funcionalidades reutilizables
- shared/knowledge-base: Base de conocimiento compartida
- devtools/scripts: Herramientas de desarrollo
- control-plane/registries: Control de servicios y CI/CD
- orchestration/: Configuracion de orquestacion de agentes

Proyectos incluidos (11):
- gamilit (submodule -> GitHub)
- trading-platform (OrbiquanTIA)
- erp-suite con 5 verticales:
  - erp-core, construccion, vidrio-templado
  - mecanicas-diesel, retail, clinicas
- betting-analytics
- inmobiliaria-analytics
- platform_marketing_content
- pos-micro, erp-basico

Configuracion:
- .gitignore completo para Node.js/Python/Docker
- gamilit como submodule (git@github.com:rckrdmrd/gamilit-workspace.git)
- Sistema de puertos estandarizado (3005-3199)

Generated with NEXUS v3.4 Migration System
EPIC-010: Configuracion Git y Repositorios
2026-01-04 03:37:42 -06:00

56 lines
1.8 KiB
Bash

#!/bin/bash
###############################################################################
# Fix TS2564: Property has no initializer and is not definitely assigned
#
# Adds definite assignment assertion (!) to properties that need it.
#
# Usage:
# chmod +x fix-ts2564.sh
# ./fix-ts2564.sh
###############################################################################
set -e
echo "========================================"
echo "Fixing TS2564 Errors"
echo "========================================"
echo ""
# Counter
FIXED_FILES=0
# Get list of files with TS2564 errors
FILES=$(npx tsc --noEmit 2>&1 | grep "error TS2564" | cut -d'(' -f1 | sort -u)
for file in $FILES; do
if [ -f "$file" ]; then
echo "Processing: $file"
# Backup original file
cp "$file" "$file.bak"
# Fix pattern: Add ! to properties without ?, =, or !
# Pattern matches: " propertyName: Type;" where there's no ?, =, or ! before :
sed -i -E 's/^(\s+)(@[A-Za-z]+.*\n\s+)*([a-zA-Z_][a-zA-Z0-9_]*):\s*([^?!=;]+);$/\1\2\3!: \4;/g' "$file"
# Alternative simpler approach for multi-line decorators:
# Just add ! before : if not already present and no ? or =
perl -i -pe 's/^(\s+)([a-zA-Z_][a-zA-Z0-9_]+):\s*(?!.*[?!=])(.+);$/\1\2!: \3;/' "$file"
FIXED_FILES=$((FIXED_FILES + 1))
fi
done
echo ""
echo "========================================"
echo "Fix Complete"
echo "========================================"
echo "Files processed: $FIXED_FILES"
echo ""
echo "Running TypeScript compiler to verify..."
npx tsc --noEmit 2>&1 | grep -c "error TS2564" || echo "✓ All TS2564 errors fixed!"
echo ""
echo "Backup files created with .bak extension"
echo "To restore: find src -name '*.bak' -exec bash -c 'mv \"\$0\" \"\${0%.bak}\"' {} \\;"