Files
html/api/wevia-pipeline.sh
2026-04-12 22:57:03 +02:00

52 lines
2.3 KiB
Bash
Executable File

#!/bin/bash
# WEVIA AUTONOMOUS PIPELINE — scan + debug + fix + test + verify
echo "╔══════════════════════════════════════════════════════════╗"
echo "║ WEVIA PIPELINE AUTONOME — $(date '+%H:%M')"
echo "╠══════════════════════════════════════════════════════════╣"
FIXES=0
# === PHASE 1: SCAN ALL PAGES FOR JS ERRORS ===
echo "║ PHASE 1: SCAN JS ERRORS"
for P in l99-brain wevia-master sovereign-claude claw-chat openclaw wevcode l99-saas enterprise-model wevia-meeting-rooms wevia-console wevia-cortex ai-benchmark; do
E=$(timeout 12 python3 -c "
from playwright.sync_api import sync_playwright
p=sync_playwright().start()
b=p.chromium.launch(headless=True)
pg=b.new_page()
errs=[]
pg.on('pageerror',lambda e:errs.append(str(e)[:60]))
pg.goto('https://weval-consulting.com/${P}.html',wait_until='domcontentloaded',timeout=8000)
import time;time.sleep(1)
print(len(errs))
if errs: print(errs[0])
b.close();p.stop()
" 2>/dev/null)
NERR=$(echo "$E" | head -1)
if [ "$NERR" = "0" ]; then
echo "║ ✅ $P"
else
ERR=$(echo "$E" | tail -1)
echo "║ ❌ $P: $ERR"
fi
done
# === PHASE 2: INFRA CHECK ===
echo "║ PHASE 2: INFRA"
bash /var/www/html/api/infra-check.sh | while read l; do echo "$l"; done
# === PHASE 3: SSO ===
echo "║ PHASE 3: SSO"
bash /var/www/html/api/sso-guardian.sh | while read l; do echo "$l"; done
# === PHASE 4: AUTO-FIX ===
echo "║ PHASE 4: AUTO-FIX"
bash /var/www/html/api/auto-fix.sh 2>&1 | grep -E 'FIXED|OK' | while read l; do echo "$l"; done
# === PHASE 5: NONREG ===
echo "║ PHASE 5: NONREG"
echo "$(bash /var/www/html/api/nonreg-check.sh)"
echo "╠══════════════════════════════════════════════════════════╣"
echo "║ PIPELINE COMPLETE"
echo "╚══════════════════════════════════════════════════════════╝"