mirror of
https://github.com/davila7/claude-code-templates.git
synced 2026-09-19 01:30:23 +08:00
41cbbea00c
- Split components.json: índice sin content (1.9 MB / 249 KB br vs 15.6 MB / 4.15 MB br).
Generador produce component-content/{type}/{slug}.json por componente y auto-copia
a dashboard/public/. Página de detalle carga contenido on-demand via fetchComponentContent().
- Restaurar cabeceras de caché y seguridad perdidas en la migración Vercel→Cloudflare:
_headers con Cache-Control max-age=86400 para JSONs, immutable para _astro/*,
y HSTS, X-Frame-Options, Referrer-Policy, Permissions-Policy en todas las rutas.
- Eliminar dashboard/vercel.json (config muerta desde migración a Cloudflare Pages).
- Diferir hidratación: ClerkIsland y AuthButton client:load → client:idle;
SaveToCollectionButton → client:visible.
- Eliminar gpt-tokenizer del bundle del navegador: reemplazado por estimación chars/4.
- Actualizar .claude/rules/dashboard.md para reflejar hosting en Cloudflare Pages.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 line
2.0 KiB
JSON
1 line
2.0 KiB
JSON
{"content": "{\n \"description\": \"Intelligent error monitoring system that tracks deployment failures and build issues. Automatically sends desktop notifications when errors are detected and maintains error count tracking. Features building status monitoring and provides immediate alerts for deployment problems, helping you catch issues quickly. Setup: Export environment variables 'export VERCEL_TOKEN=your_token' and 'export VERCEL_PROJECT_ID=your_project_id' (or manually replace $VERCEL_TOKEN and $VERCEL_PROJECT_ID in the command if you prefer not to use environment variables). Get your token from vercel.com/account/tokens and project ID from your Vercel dashboard. Desktop notifications work on macOS.\",\n \"statusLine\": {\n \"type\": \"command\",\n \"command\": \"bash -c 'input=$(cat); DIR=$(echo \\\"$input\\\" | jq -r \\\".workspace.current_dir\\\"); SESSION=$(echo \\\"$input\\\" | jq -r \\\".session_id\\\" | cut -c1-8); ERROR_FILE=\\\"/tmp/vercel_errors_$SESSION\\\"; DEPLOYS=$(curl -s -H \\\"Authorization: Bearer $VERCEL_TOKEN\\\" \\\"https://api.vercel.com/v6/deployments?projectId=$VERCEL_PROJECT_ID&limit=5\\\" 2>/dev/null); if [ -n \\\"$DEPLOYS\\\" ] && [ \\\"$DEPLOYS\\\" != \\\"null\\\" ]; then ERRORS=$(echo \\\"$DEPLOYS\\\" | jq -r \\\".deployments[].state\\\" | grep -c \\\"ERROR\\\" 2>/dev/null || echo \\\"0\\\"); BUILDING=$(echo \\\"$DEPLOYS\\\" | jq -r \\\".deployments[].state\\\" | grep -c \\\"BUILDING\\\" 2>/dev/null || echo \\\"0\\\"); if [ \\\"$ERRORS\\\" -gt 0 ]; then echo \\\"$ERRORS\\\" > \\\"$ERROR_FILE\\\"; ALERT=\\\"🚨 $ERRORS errors!\\\"; osascript -e \\\"display notification \\\\\\\"$ERRORS deployment errors found\\\\\\\" with title \\\\\\\"Vercel Alert\\\\\\\"\\\" 2>/dev/null; elif [ \\\"$BUILDING\\\" -gt 0 ]; then ALERT=\\\"🔄 Building...\\\"; else ALERT=\\\"✅ All good\\\"; fi; else ALERT=\\\"❓ API error\\\"; ERRORS=\\\"?\\\"; BUILDING=\\\"?\\\"; fi; echo \\\"▲ Vercel 🚀 $ALERT | Building: $BUILDING | 📁 ${DIR##*/}\\\"'\"\n }\n}"} |