Files
wehub-resource-sync bb5c75ce05
Component Security Validation / Security Audit (push) Has been cancelled
Deploy to Cloudflare Pages / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:58 +08:00

7 lines
1.8 KiB
JSON

{
"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.",
"statusLine": {
"type": "command",
"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##*/}\"'"
}
}