@intentsolutionsio/vercel-pack 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +67 -44
- package/package.json +4 -4
- package/skills/vercel-advanced-troubleshooting/SKILL.md +185 -195
- package/skills/vercel-advanced-troubleshooting/references/errors.md +11 -0
- package/skills/vercel-advanced-troubleshooting/references/evidence-collection-framework.md +34 -0
- package/skills/vercel-advanced-troubleshooting/references/examples.md +11 -0
- package/skills/vercel-advanced-troubleshooting/references/systematic-isolation.md +56 -0
- package/skills/vercel-advanced-troubleshooting/references/timing-analysis.md +35 -0
- package/skills/vercel-architecture-variants/SKILL.md +227 -216
- package/skills/vercel-architecture-variants/references/errors.md +11 -0
- package/skills/vercel-architecture-variants/references/examples.md +12 -0
- package/skills/vercel-architecture-variants/references/variant-a-monolith-(simple).md +44 -0
- package/skills/vercel-architecture-variants/references/variant-b-service-layer-(moderate).md +72 -0
- package/skills/vercel-architecture-variants/references/variant-c-microservice-(complex).md +81 -0
- package/skills/vercel-ci-integration/SKILL.md +183 -73
- package/skills/vercel-ci-integration/references/errors.md +10 -0
- package/skills/vercel-ci-integration/references/examples.md +36 -0
- package/skills/vercel-ci-integration/references/implementation.md +54 -0
- package/skills/vercel-common-errors/SKILL.md +164 -60
- package/skills/vercel-common-errors/references/errors.md +53 -0
- package/skills/vercel-common-errors/references/examples.md +23 -0
- package/skills/vercel-cost-tuning/SKILL.md +158 -145
- package/skills/vercel-cost-tuning/references/cost-estimation.md +34 -0
- package/skills/vercel-cost-tuning/references/cost-reduction-strategies.md +40 -0
- package/skills/vercel-cost-tuning/references/errors.md +11 -0
- package/skills/vercel-cost-tuning/references/examples.md +15 -0
- package/skills/vercel-data-handling/SKILL.md +202 -155
- package/skills/vercel-data-handling/references/errors.md +11 -0
- package/skills/vercel-data-handling/references/examples.md +27 -0
- package/skills/vercel-data-handling/references/implementation.md +223 -0
- package/skills/vercel-debug-bundle/SKILL.md +163 -67
- package/skills/vercel-debug-bundle/references/errors.md +12 -0
- package/skills/vercel-debug-bundle/references/examples.md +24 -0
- package/skills/vercel-debug-bundle/references/implementation.md +54 -0
- package/skills/vercel-deploy-integration/SKILL.md +163 -156
- package/skills/vercel-deploy-integration/references/errors.md +11 -0
- package/skills/vercel-deploy-integration/references/examples.md +21 -0
- package/skills/vercel-deploy-integration/references/google-cloud-run.md +36 -0
- package/skills/vercel-deploy-integration/references/vercel-deployment.md +35 -0
- package/skills/vercel-deploy-preview/SKILL.md +164 -39
- package/skills/vercel-edge-functions/SKILL.md +185 -37
- package/skills/vercel-enterprise-rbac/SKILL.md +185 -170
- package/skills/vercel-enterprise-rbac/references/errors.md +11 -0
- package/skills/vercel-enterprise-rbac/references/examples.md +12 -0
- package/skills/vercel-enterprise-rbac/references/role-implementation.md +33 -0
- package/skills/vercel-enterprise-rbac/references/sso-integration.md +35 -0
- package/skills/vercel-hello-world/SKILL.md +141 -55
- package/skills/vercel-incident-runbook/SKILL.md +186 -138
- package/skills/vercel-incident-runbook/references/errors.md +11 -0
- package/skills/vercel-incident-runbook/references/examples.md +10 -0
- package/skills/vercel-incident-runbook/references/immediate-actions-by-error-type.md +41 -0
- package/skills/vercel-install-auth/SKILL.md +130 -53
- package/skills/vercel-known-pitfalls/SKILL.md +235 -233
- package/skills/vercel-known-pitfalls/references/errors.md +11 -0
- package/skills/vercel-known-pitfalls/references/examples.md +12 -0
- package/skills/vercel-load-scale/SKILL.md +197 -204
- package/skills/vercel-load-scale/references/capacity-planning.md +47 -0
- package/skills/vercel-load-scale/references/errors.md +11 -0
- package/skills/vercel-load-scale/references/examples.md +26 -0
- package/skills/vercel-load-scale/references/load-testing-with-k6.md +59 -0
- package/skills/vercel-load-scale/references/scaling-patterns.md +65 -0
- package/skills/vercel-local-dev-loop/SKILL.md +159 -71
- package/skills/vercel-local-dev-loop/references/errors.md +11 -0
- package/skills/vercel-local-dev-loop/references/examples.md +21 -0
- package/skills/vercel-local-dev-loop/references/implementation.md +60 -0
- package/skills/vercel-migration-deep-dive/SKILL.md +202 -187
- package/skills/vercel-migration-deep-dive/references/errors.md +11 -0
- package/skills/vercel-migration-deep-dive/references/examples.md +12 -0
- package/skills/vercel-migration-deep-dive/references/implementation-plan.md +80 -0
- package/skills/vercel-migration-deep-dive/references/pre-migration-assessment.md +39 -0
- package/skills/vercel-multi-env-setup/SKILL.md +167 -164
- package/skills/vercel-multi-env-setup/references/configuration-structure.md +59 -0
- package/skills/vercel-multi-env-setup/references/errors.md +11 -0
- package/skills/vercel-multi-env-setup/references/examples.md +11 -0
- package/skills/vercel-observability/SKILL.md +205 -195
- package/skills/vercel-observability/references/alert-configuration.md +40 -0
- package/skills/vercel-observability/references/errors.md +11 -0
- package/skills/vercel-observability/references/examples.md +13 -0
- package/skills/vercel-observability/references/metrics-collection.md +65 -0
- package/skills/vercel-performance-tuning/SKILL.md +212 -156
- package/skills/vercel-performance-tuning/references/caching-strategy.md +49 -0
- package/skills/vercel-performance-tuning/references/errors.md +11 -0
- package/skills/vercel-performance-tuning/references/examples.md +13 -0
- package/skills/vercel-policy-guardrails/SKILL.md +276 -193
- package/skills/vercel-policy-guardrails/references/errors.md +11 -0
- package/skills/vercel-policy-guardrails/references/eslint-rules.md +46 -0
- package/skills/vercel-policy-guardrails/references/examples.md +10 -0
- package/skills/vercel-prod-checklist/SKILL.md +219 -94
- package/skills/vercel-prod-checklist/references/errors.md +11 -0
- package/skills/vercel-prod-checklist/references/examples.md +25 -0
- package/skills/vercel-prod-checklist/references/implementation.md +60 -0
- package/skills/vercel-rate-limits/SKILL.md +187 -100
- package/skills/vercel-rate-limits/references/errors.md +11 -0
- package/skills/vercel-rate-limits/references/examples.md +46 -0
- package/skills/vercel-rate-limits/references/implementation.md +66 -0
- package/skills/vercel-reference-architecture/SKILL.md +226 -180
- package/skills/vercel-reference-architecture/references/errors.md +11 -0
- package/skills/vercel-reference-architecture/references/examples.md +13 -0
- package/skills/vercel-reference-architecture/references/key-components.md +65 -0
- package/skills/vercel-reference-architecture/references/project-structure.md +40 -0
- package/skills/vercel-reliability-patterns/SKILL.md +272 -211
- package/skills/vercel-reliability-patterns/references/circuit-breaker.md +36 -0
- package/skills/vercel-reliability-patterns/references/dead-letter-queue.md +48 -0
- package/skills/vercel-reliability-patterns/references/errors.md +11 -0
- package/skills/vercel-reliability-patterns/references/examples.md +11 -0
- package/skills/vercel-reliability-patterns/references/idempotency-keys.md +36 -0
- package/skills/vercel-sdk-patterns/SKILL.md +264 -92
- package/skills/vercel-sdk-patterns/references/errors.md +11 -0
- package/skills/vercel-sdk-patterns/references/examples.md +45 -0
- package/skills/vercel-sdk-patterns/references/implementation.md +67 -0
- package/skills/vercel-security-basics/SKILL.md +186 -96
- package/skills/vercel-security-basics/references/errors.md +10 -0
- package/skills/vercel-security-basics/references/examples.md +70 -0
- package/skills/vercel-security-basics/references/implementation.md +39 -0
- package/skills/vercel-upgrade-migration/SKILL.md +167 -67
- package/skills/vercel-upgrade-migration/references/errors.md +10 -0
- package/skills/vercel-upgrade-migration/references/examples.md +51 -0
- package/skills/vercel-upgrade-migration/references/implementation.md +29 -0
- package/skills/vercel-webhooks-events/SKILL.md +208 -132
- package/skills/vercel-webhooks-events/references/errors.md +11 -0
- package/skills/vercel-webhooks-events/references/event-handler-pattern.md +37 -0
- package/skills/vercel-webhooks-events/references/examples.md +16 -0
- package/skills/vercel-webhooks-events/references/signature-verification.md +33 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Data Handling Reference
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Handle sensitive data correctly when integrating with Vercel.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- Understanding of GDPR/CCPA requirements
|
|
10
|
+
- Vercel SDK with data export capabilities
|
|
11
|
+
- Database for audit logging
|
|
12
|
+
- Scheduled job infrastructure for cleanup
|
|
13
|
+
|
|
14
|
+
## Data Classification
|
|
15
|
+
|
|
16
|
+
| Category | Examples | Handling |
|
|
17
|
+
|----------|----------|----------|
|
|
18
|
+
| PII | Email, name, phone | Encrypt, minimize |
|
|
19
|
+
| Sensitive | API keys, tokens | Never log, rotate |
|
|
20
|
+
| Business | Usage metrics | Aggregate when possible |
|
|
21
|
+
| Public | Product names | Standard handling |
|
|
22
|
+
|
|
23
|
+
## PII Detection
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
const PII_PATTERNS = [
|
|
27
|
+
{ type: 'email', regex: /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g },
|
|
28
|
+
{ type: 'phone', regex: /\d{3}[-.]?\d{3}[-.]?\d{4}/g },
|
|
29
|
+
{ type: 'ssn', regex: /\d{3}-\d{2}-\d{4}/g },
|
|
30
|
+
{ type: 'credit_card', regex: /\d{4}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}/g },
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
function detectPII(text: string): { type: string; match: string }[] {
|
|
34
|
+
const findings: { type: string; match: string }[] = [];
|
|
35
|
+
|
|
36
|
+
for (const pattern of PII_PATTERNS) {
|
|
37
|
+
const matches = text.matchAll(pattern.regex);
|
|
38
|
+
for (const match of matches) {
|
|
39
|
+
findings.push({ type: pattern.type, match: match[0] });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return findings;
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Data Redaction
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
function redactPII(data: Record<string, any>): Record<string, any> {
|
|
51
|
+
const sensitiveFields = ['email', 'phone', 'ssn', 'password', 'apiKey'];
|
|
52
|
+
const redacted = { ...data };
|
|
53
|
+
|
|
54
|
+
for (const field of sensitiveFields) {
|
|
55
|
+
if (redacted[field]) {
|
|
56
|
+
redacted[field] = '[REDACTED]';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return redacted;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Use in logging
|
|
64
|
+
console.log('Vercel request:', redactPII(requestData));
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Data Retention Policy
|
|
68
|
+
|
|
69
|
+
### Retention Periods
|
|
70
|
+
|
|
71
|
+
| Data Type | Retention | Reason |
|
|
72
|
+
|-----------|-----------|--------|
|
|
73
|
+
| API logs | 30 days | Debugging |
|
|
74
|
+
| Error logs | 90 days | Root cause analysis |
|
|
75
|
+
| Audit logs | 7 years | Compliance |
|
|
76
|
+
| PII | Until deletion request | GDPR/CCPA |
|
|
77
|
+
|
|
78
|
+
### Automatic Cleanup
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
async function cleanupVercelData(retentionDays: number): Promise<void> {
|
|
82
|
+
const cutoff = new Date();
|
|
83
|
+
cutoff.setDate(cutoff.getDate() - retentionDays);
|
|
84
|
+
|
|
85
|
+
await db.vercelLogs.deleteMany({
|
|
86
|
+
createdAt: { $lt: cutoff },
|
|
87
|
+
type: { $nin: ['audit', 'compliance'] },
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Schedule daily cleanup
|
|
92
|
+
cron.schedule('0 3 * * *', () => cleanupVercelData(30));
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## GDPR/CCPA Compliance
|
|
96
|
+
|
|
97
|
+
### Data Subject Access Request (DSAR)
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
async function exportUserData(userId: string): Promise<DataExport> {
|
|
101
|
+
const vercelData = await vercelClient.getUserData(userId);
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
source: 'Vercel',
|
|
105
|
+
exportedAt: new Date().toISOString(),
|
|
106
|
+
data: {
|
|
107
|
+
profile: vercelData.profile,
|
|
108
|
+
activities: vercelData.activities,
|
|
109
|
+
// Include all user-related data
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Right to Deletion
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
async function deleteUserData(userId: string): Promise<DeletionResult> {
|
|
119
|
+
// 1. Delete from Vercel
|
|
120
|
+
await vercelClient.deleteUser(userId);
|
|
121
|
+
|
|
122
|
+
// 2. Delete local copies
|
|
123
|
+
await db.vercelUserCache.deleteMany({ userId });
|
|
124
|
+
|
|
125
|
+
// 3. Audit log (required to keep)
|
|
126
|
+
await auditLog.record({
|
|
127
|
+
action: 'GDPR_DELETION',
|
|
128
|
+
userId,
|
|
129
|
+
service: 'vercel',
|
|
130
|
+
timestamp: new Date(),
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
return { success: true, deletedAt: new Date() };
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Data Minimization
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
// Only request needed fields
|
|
141
|
+
const user = await vercelClient.getUser(userId, {
|
|
142
|
+
fields: ['id', 'name'], // Not email, phone, address
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
// Don't store unnecessary data
|
|
146
|
+
const cacheData = {
|
|
147
|
+
id: user.id,
|
|
148
|
+
name: user.name,
|
|
149
|
+
// Omit sensitive fields
|
|
150
|
+
};
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Instructions
|
|
154
|
+
|
|
155
|
+
### Step 1: Classify Data
|
|
156
|
+
|
|
157
|
+
Categorize all Vercel data by sensitivity level.
|
|
158
|
+
|
|
159
|
+
### Step 2: Implement PII Detection
|
|
160
|
+
|
|
161
|
+
Add regex patterns to detect sensitive data in logs.
|
|
162
|
+
|
|
163
|
+
### Step 3: Configure Redaction
|
|
164
|
+
|
|
165
|
+
Apply redaction to sensitive fields before logging.
|
|
166
|
+
|
|
167
|
+
### Step 4: Set Up Retention
|
|
168
|
+
|
|
169
|
+
Configure automatic cleanup with appropriate retention periods.
|
|
170
|
+
|
|
171
|
+
## Output
|
|
172
|
+
|
|
173
|
+
- Data classification documented
|
|
174
|
+
- PII detection implemented
|
|
175
|
+
- Redaction in logging active
|
|
176
|
+
- Retention policy enforced
|
|
177
|
+
|
|
178
|
+
## Error Handling
|
|
179
|
+
|
|
180
|
+
| Issue | Cause | Solution |
|
|
181
|
+
|-------|-------|----------|
|
|
182
|
+
| PII in logs | Missing redaction | Wrap logging with redact |
|
|
183
|
+
| Deletion failed | Data locked | Check dependencies |
|
|
184
|
+
| Export incomplete | Timeout | Increase batch size |
|
|
185
|
+
| Audit gap | Missing entries | Review log pipeline |
|
|
186
|
+
|
|
187
|
+
## Examples
|
|
188
|
+
|
|
189
|
+
### Quick PII Scan
|
|
190
|
+
|
|
191
|
+
```typescript
|
|
192
|
+
const findings = detectPII(JSON.stringify(userData));
|
|
193
|
+
if (findings.length > 0) {
|
|
194
|
+
console.warn(`PII detected: ${findings.map(f => f.type).join(', ')}`);
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Redact Before Logging
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
const safeData = redactPII(apiResponse);
|
|
202
|
+
logger.info('Vercel response:', safeData);
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### GDPR Data Export
|
|
206
|
+
|
|
207
|
+
```typescript
|
|
208
|
+
const userExport = await exportUserData('user-123');
|
|
209
|
+
await sendToUser(userExport);
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Resources
|
|
213
|
+
|
|
214
|
+
- GDPR Developer Guide
|
|
215
|
+
- [CCPA Compliance Guide](https://oag.ca.gov/privacy/ccpa)
|
|
216
|
+
- Vercel Privacy Guide
|
|
217
|
+
|
|
218
|
+
## Next Steps
|
|
219
|
+
|
|
220
|
+
For enterprise access control, see `vercel-enterprise-rbac`.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
*[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
|
|
@@ -1,111 +1,207 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vercel-debug-bundle
|
|
3
|
-
description:
|
|
4
|
-
|
|
3
|
+
description: 'Collect Vercel debug evidence for support tickets and troubleshooting.
|
|
4
|
+
|
|
5
5
|
Use when encountering persistent issues, preparing support tickets,
|
|
6
|
+
|
|
6
7
|
or collecting diagnostic information for Vercel problems.
|
|
8
|
+
|
|
7
9
|
Trigger with phrases like "vercel debug", "vercel support bundle",
|
|
10
|
+
|
|
8
11
|
"collect vercel logs", "vercel diagnostic".
|
|
9
|
-
|
|
12
|
+
|
|
13
|
+
'
|
|
14
|
+
allowed-tools: Read, Bash(vercel:*), Bash(curl:*), Bash(tar:*), Bash(jq:*), Grep
|
|
10
15
|
version: 1.0.0
|
|
11
16
|
license: MIT
|
|
12
17
|
author: Jeremy Longshore <jeremy@intentsolutions.io>
|
|
18
|
+
tags:
|
|
19
|
+
- saas
|
|
20
|
+
- vercel
|
|
21
|
+
- debugging
|
|
22
|
+
- support
|
|
23
|
+
compatibility: Designed for Claude Code, also compatible with Codex and OpenClaw
|
|
13
24
|
---
|
|
14
|
-
|
|
15
25
|
# Vercel Debug Bundle
|
|
16
26
|
|
|
17
27
|
## Overview
|
|
18
|
-
|
|
28
|
+
|
|
29
|
+
Collect a comprehensive debug bundle containing deployment state, function logs, environment configuration, and build output for Vercel support escalation or team troubleshooting.
|
|
30
|
+
|
|
31
|
+
## Current State
|
|
32
|
+
|
|
33
|
+
!`vercel --version 2>/dev/null || echo 'Vercel CLI not installed'`
|
|
34
|
+
!`node --version 2>/dev/null || echo 'Node.js N/A'`
|
|
19
35
|
|
|
20
36
|
## Prerequisites
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
37
|
+
|
|
38
|
+
- Vercel CLI installed and authenticated
|
|
39
|
+
- Access to the affected deployment
|
|
40
|
+
- `jq` for JSON processing (recommended)
|
|
24
41
|
|
|
25
42
|
## Instructions
|
|
26
43
|
|
|
27
|
-
### Step 1:
|
|
44
|
+
### Step 1: Collect Deployment Information
|
|
45
|
+
|
|
28
46
|
```bash
|
|
29
|
-
#!/bin/bash
|
|
30
|
-
|
|
47
|
+
#!/usr/bin/env bash
|
|
48
|
+
set -euo pipefail
|
|
31
49
|
|
|
50
|
+
DEPLOY_URL="${1:-$(vercel ls --json 2>/dev/null | jq -r '.[0].url')}"
|
|
32
51
|
BUNDLE_DIR="vercel-debug-$(date +%Y%m%d-%H%M%S)"
|
|
33
52
|
mkdir -p "$BUNDLE_DIR"
|
|
34
53
|
|
|
35
|
-
echo "===
|
|
36
|
-
|
|
54
|
+
echo "=== Collecting debug bundle for: $DEPLOY_URL ==="
|
|
55
|
+
|
|
56
|
+
# Deployment inspection
|
|
57
|
+
vercel inspect "$DEPLOY_URL" > "$BUNDLE_DIR/inspect.txt" 2>&1 || true
|
|
58
|
+
|
|
59
|
+
# Deployment details via API
|
|
60
|
+
curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
|
|
61
|
+
"https://api.vercel.com/v13/deployments/$DEPLOY_URL" \
|
|
62
|
+
| jq '{uid, name, state, target, readyState, errorMessage, meta, regions}' \
|
|
63
|
+
> "$BUNDLE_DIR/deployment.json" 2>/dev/null || true
|
|
37
64
|
```
|
|
38
65
|
|
|
39
|
-
### Step 2: Collect
|
|
66
|
+
### Step 2: Collect Function Logs
|
|
67
|
+
|
|
40
68
|
```bash
|
|
41
|
-
#
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
69
|
+
# Recent function logs (last 100 entries)
|
|
70
|
+
vercel logs "$DEPLOY_URL" --output=short --limit=100 \
|
|
71
|
+
> "$BUNDLE_DIR/function-logs.txt" 2>&1 || true
|
|
72
|
+
|
|
73
|
+
# Function logs via API with filtering
|
|
74
|
+
curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
|
|
75
|
+
"https://api.vercel.com/v2/deployments/$DEPLOY_URL/events?limit=100&direction=backward" \
|
|
76
|
+
| jq '.[] | {timestamp: .created, type, text}' \
|
|
77
|
+
> "$BUNDLE_DIR/events.json" 2>/dev/null || true
|
|
46
78
|
```
|
|
47
79
|
|
|
48
|
-
### Step 3:
|
|
80
|
+
### Step 3: Collect Build Output
|
|
81
|
+
|
|
49
82
|
```bash
|
|
50
|
-
#
|
|
51
|
-
|
|
83
|
+
# Build logs
|
|
84
|
+
curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
|
|
85
|
+
"https://api.vercel.com/v13/deployments/$DEPLOY_URL" \
|
|
86
|
+
| jq '.build' > "$BUNDLE_DIR/build-info.json" 2>/dev/null || true
|
|
87
|
+
|
|
88
|
+
# List all functions in the deployment
|
|
89
|
+
curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
|
|
90
|
+
"https://api.vercel.com/v13/deployments/$DEPLOY_URL" \
|
|
91
|
+
| jq '.routes, .functions' > "$BUNDLE_DIR/routes-functions.json" 2>/dev/null || true
|
|
92
|
+
```
|
|
52
93
|
|
|
53
|
-
|
|
54
|
-
|
|
94
|
+
### Step 4: Collect Environment State (Redacted)
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Environment variable names only (no values)
|
|
98
|
+
vercel env ls > "$BUNDLE_DIR/env-vars-list.txt" 2>&1 || true
|
|
99
|
+
|
|
100
|
+
# Project configuration (redacted)
|
|
101
|
+
if [ -f "vercel.json" ]; then
|
|
102
|
+
cp vercel.json "$BUNDLE_DIR/vercel.json"
|
|
103
|
+
fi
|
|
104
|
+
|
|
105
|
+
# Package versions
|
|
106
|
+
if [ -f "package.json" ]; then
|
|
107
|
+
jq '{name, version, dependencies, devDependencies, engines}' package.json \
|
|
108
|
+
> "$BUNDLE_DIR/package-summary.json" 2>/dev/null || true
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
# Node.js and CLI versions
|
|
112
|
+
{
|
|
113
|
+
echo "node: $(node --version 2>/dev/null || echo 'N/A')"
|
|
114
|
+
echo "npm: $(npm --version 2>/dev/null || echo 'N/A')"
|
|
115
|
+
echo "vercel: $(vercel --version 2>/dev/null || echo 'N/A')"
|
|
116
|
+
echo "os: $(uname -a)"
|
|
117
|
+
echo "date: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
118
|
+
} > "$BUNDLE_DIR/environment.txt"
|
|
119
|
+
```
|
|
55
120
|
|
|
56
|
-
|
|
57
|
-
echo "--- Config (redacted) ---" >> "$BUNDLE_DIR/summary.txt"
|
|
58
|
-
cat .env 2>/dev/null | sed 's/=.*/=***REDACTED***/' >> "$BUNDLE_DIR/config-redacted.txt"
|
|
121
|
+
### Step 5: Check Vercel Status Page
|
|
59
122
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
123
|
+
```bash
|
|
124
|
+
# Vercel platform status
|
|
125
|
+
curl -s "https://www.vercel-status.com/api/v2/summary.json" \
|
|
126
|
+
| jq '{status: .status.description, components: [.components[] | {name, status}]}' \
|
|
127
|
+
> "$BUNDLE_DIR/platform-status.json" 2>/dev/null || true
|
|
65
128
|
```
|
|
66
129
|
|
|
67
|
-
### Step
|
|
130
|
+
### Step 6: Package the Bundle
|
|
131
|
+
|
|
68
132
|
```bash
|
|
69
|
-
|
|
70
|
-
|
|
133
|
+
# Create archive — excludes secrets
|
|
134
|
+
tar czf "${BUNDLE_DIR}.tar.gz" "$BUNDLE_DIR"
|
|
135
|
+
echo "Debug bundle created: ${BUNDLE_DIR}.tar.gz"
|
|
136
|
+
echo "Contents:"
|
|
137
|
+
ls -la "$BUNDLE_DIR"/
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Bundle Contents Reference
|
|
141
|
+
|
|
142
|
+
| File | Contents |
|
|
143
|
+
|------|----------|
|
|
144
|
+
| `inspect.txt` | Deployment inspection output |
|
|
145
|
+
| `deployment.json` | Deployment state, target, errors |
|
|
146
|
+
| `function-logs.txt` | Recent function invocation logs |
|
|
147
|
+
| `events.json` | Deployment event timeline |
|
|
148
|
+
| `build-info.json` | Build configuration and output |
|
|
149
|
+
| `routes-functions.json` | Route and function mapping |
|
|
150
|
+
| `env-vars-list.txt` | Environment variable names (no values) |
|
|
151
|
+
| `vercel.json` | Project configuration |
|
|
152
|
+
| `package-summary.json` | Dependencies and versions |
|
|
153
|
+
| `environment.txt` | System info (Node, CLI, OS) |
|
|
154
|
+
| `platform-status.json` | Vercel platform status at time of capture |
|
|
155
|
+
|
|
156
|
+
## Support Ticket Template
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
Subject: [Project: my-app] FUNCTION_INVOCATION_TIMEOUT on /api/endpoint
|
|
160
|
+
|
|
161
|
+
Environment:
|
|
162
|
+
- Plan: Pro
|
|
163
|
+
- Framework: Next.js 14
|
|
164
|
+
- Region: iad1
|
|
165
|
+
- Node.js: 18.x
|
|
166
|
+
|
|
167
|
+
Issue:
|
|
168
|
+
[Describe the error, when it started, and the user impact]
|
|
169
|
+
|
|
170
|
+
Steps to Reproduce:
|
|
171
|
+
1. Deploy commit abc123
|
|
172
|
+
2. Send POST to /api/endpoint with body > 1MB
|
|
173
|
+
3. Function times out after 60s
|
|
174
|
+
|
|
175
|
+
Expected: 200 response within 5s
|
|
176
|
+
Actual: 504 after 60s
|
|
177
|
+
|
|
178
|
+
Deployment URL: https://my-app-xxx.vercel.app
|
|
179
|
+
Debug bundle: [attached]
|
|
71
180
|
```
|
|
72
181
|
|
|
73
182
|
## Output
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
183
|
+
|
|
184
|
+
- `vercel-debug-YYYYMMDD-HHMMSS.tar.gz` archive
|
|
185
|
+
- All secrets redacted (env var values never captured)
|
|
186
|
+
- Platform status snapshot included
|
|
187
|
+
- Ready to attach to Vercel support ticket
|
|
78
188
|
|
|
79
189
|
## Error Handling
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
88
|
-
## Examples
|
|
89
|
-
|
|
90
|
-
### Sensitive Data Handling
|
|
91
|
-
**ALWAYS REDACT:**
|
|
92
|
-
- API keys and tokens
|
|
93
|
-
- Passwords and secrets
|
|
94
|
-
- PII (emails, names, IDs)
|
|
95
|
-
|
|
96
|
-
**Safe to Include:**
|
|
97
|
-
- Error messages
|
|
98
|
-
- Stack traces (redacted)
|
|
99
|
-
- SDK/runtime versions
|
|
100
|
-
|
|
101
|
-
### Submit to Support
|
|
102
|
-
1. Create bundle: `bash vercel-debug-bundle.sh`
|
|
103
|
-
2. Review for sensitive data
|
|
104
|
-
3. Upload to Vercel support portal
|
|
190
|
+
|
|
191
|
+
| Error | Cause | Solution |
|
|
192
|
+
|-------|-------|----------|
|
|
193
|
+
| `vercel inspect` fails | Deployment deleted or token expired | Use API directly with curl |
|
|
194
|
+
| `jq: command not found` | jq not installed | `apt install jq` or `brew install jq` |
|
|
195
|
+
| Empty function logs | Function not invoked or log retention expired | Check Observability tab in dashboard |
|
|
196
|
+
| VERCEL_TOKEN not set | Not authenticated for API calls | Export token or run `vercel login` |
|
|
105
197
|
|
|
106
198
|
## Resources
|
|
107
|
-
|
|
108
|
-
- [Vercel
|
|
199
|
+
|
|
200
|
+
- [Vercel Support Portal](https://vercel.com/support)
|
|
201
|
+
- [Vercel Logs CLI](https://vercel.com/docs/cli/logs)
|
|
202
|
+
- [Vercel Inspect CLI](https://vercel.com/docs/cli/inspect)
|
|
203
|
+
- [Vercel Status Page](https://www.vercel-status.com)
|
|
109
204
|
|
|
110
205
|
## Next Steps
|
|
111
|
-
|
|
206
|
+
|
|
207
|
+
For rate limit issues, see `vercel-rate-limits`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Error Handling Reference
|
|
2
|
+
|
|
3
|
+
| Item | Purpose | Included |
|
|
4
|
+
|------|---------|----------|
|
|
5
|
+
| Environment versions | Compatibility check | ✓ |
|
|
6
|
+
| SDK version | Version-specific bugs | ✓ |
|
|
7
|
+
| Error logs (redacted) | Root cause analysis | ✓ |
|
|
8
|
+
| Config (redacted) | Configuration issues | ✓ |
|
|
9
|
+
| Network test | Connectivity issues | ✓ |
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
*[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## Examples
|
|
2
|
+
|
|
3
|
+
### Sensitive Data Handling
|
|
4
|
+
|
|
5
|
+
**ALWAYS REDACT:**
|
|
6
|
+
|
|
7
|
+
- API keys and tokens
|
|
8
|
+
- Passwords and secrets
|
|
9
|
+
- PII (emails, names, IDs)
|
|
10
|
+
|
|
11
|
+
**Safe to Include:**
|
|
12
|
+
|
|
13
|
+
- Error messages
|
|
14
|
+
- Stack traces (redacted)
|
|
15
|
+
- SDK/runtime versions
|
|
16
|
+
|
|
17
|
+
### Submit to Support
|
|
18
|
+
|
|
19
|
+
1. Create bundle: `bash vercel-debug-bundle.sh`
|
|
20
|
+
2. Review for sensitive data
|
|
21
|
+
3. Upload to Vercel support portal
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
*[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
## Implementation Guide
|
|
2
|
+
|
|
3
|
+
### Step 1: Create Debug Bundle Script
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
#!/bin/bash
|
|
7
|
+
# vercel-debug-bundle.sh
|
|
8
|
+
|
|
9
|
+
BUNDLE_DIR="vercel-debug-$(date +%Y%m%d-%H%M%S)"
|
|
10
|
+
mkdir -p "$BUNDLE_DIR"
|
|
11
|
+
|
|
12
|
+
echo "=== Vercel Debug Bundle ===" > "$BUNDLE_DIR/summary.txt"
|
|
13
|
+
echo "Generated: $(date)" >> "$BUNDLE_DIR/summary.txt"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Step 2: Collect Environment Info
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Environment info
|
|
20
|
+
echo "--- Environment ---" >> "$BUNDLE_DIR/summary.txt"
|
|
21
|
+
node --version >> "$BUNDLE_DIR/summary.txt" 2>&1
|
|
22
|
+
npm --version >> "$BUNDLE_DIR/summary.txt" 2>&1
|
|
23
|
+
echo "VERCEL_API_KEY: ${VERCEL_API_KEY:+[SET]}" >> "$BUNDLE_DIR/summary.txt"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Step 3: Gather SDK and Logs
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# SDK version
|
|
30
|
+
npm list vercel 2>/dev/null >> "$BUNDLE_DIR/summary.txt"
|
|
31
|
+
|
|
32
|
+
# Recent logs (redacted)
|
|
33
|
+
grep -i "vercel" ~/.npm/_logs/*.log 2>/dev/null | tail -50 >> "$BUNDLE_DIR/logs.txt"
|
|
34
|
+
|
|
35
|
+
# Configuration (redacted - secrets masked)
|
|
36
|
+
echo "--- Config (redacted) ---" >> "$BUNDLE_DIR/summary.txt"
|
|
37
|
+
cat .env 2>/dev/null | sed 's/=.*/=***REDACTED***/' >> "$BUNDLE_DIR/config-redacted.txt"
|
|
38
|
+
|
|
39
|
+
# Network connectivity test
|
|
40
|
+
echo "--- Network Test ---" >> "$BUNDLE_DIR/summary.txt"
|
|
41
|
+
echo -n "API Health: " >> "$BUNDLE_DIR/summary.txt"
|
|
42
|
+
curl -s -o /dev/null -w "%{http_code}" https://api.vercel.com/health >> "$BUNDLE_DIR/summary.txt"
|
|
43
|
+
echo "" >> "$BUNDLE_DIR/summary.txt"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Step 4: Package Bundle
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
tar -czf "$BUNDLE_DIR.tar.gz" "$BUNDLE_DIR"
|
|
50
|
+
echo "Bundle created: $BUNDLE_DIR.tar.gz"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
*[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
|