-
Notifications
You must be signed in to change notification settings - Fork 2
Add Vercel Plugin #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0326602
138fe02
fc8a29a
5b2e47a
c70fa6e
79b05d5
703ded5
5c4a222
85dd9d3
c3b9d55
d38b7ce
9d4343d
e590528
987c70d
5c2d51a
82e2378
8a11ba2
360104d
bd90231
9f8473e
88f9c72
04dc94c
0d45644
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "steps": [ | ||
| { | ||
| "displayName": "Authenticate", | ||
| "dataStream": { "name": "currentUser" }, | ||
| "required": true, | ||
| "error": "Could not authenticate with Vercel. Check that your API token is valid and has not expired.", | ||
| "success": "Connected to Vercel successfully." | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| [ | ||
| { | ||
| "name": "Project", | ||
| "sourceType": "Project", | ||
| "icon": "rocket", | ||
| "singular": "Project", | ||
| "plural": "Projects" | ||
| }, | ||
| { | ||
| "name": "Domain", | ||
| "sourceType": "Domain", | ||
| "icon": "globe", | ||
| "singular": "Domain", | ||
| "plural": "Domains" | ||
| }, | ||
| { | ||
| "name": "Team", | ||
| "sourceType": "Team", | ||
| "icon": "people-group", | ||
| "singular": "Team", | ||
| "plural": "Teams" | ||
| } | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| { | ||
| "name": "activity", | ||
| "displayName": "Activity", | ||
| "description": "Vercel account or team activity feed, one row per audit-style event", | ||
| "tags": ["Activity"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "v3/events", | ||
| "pathToData": "events", | ||
| "expandInnerObjects": true, | ||
| "getArgs": [ | ||
| { "key": "since", "value": "{{timeframe.start}}" }, | ||
| { "key": "until", "value": "{{timeframe.end}}" }, | ||
|
Comment on lines
+12
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 The activity stream passes Extended reasoning...What the bug isAt "getArgs": [
{ "key": "since", "value": "{{timeframe.start}}" },
{ "key": "until", "value": "{{timeframe.end}}" },
{ "key": "limit", "value": "100" }
]Per SquaredUp's build-plugin reference ( Vercel's
The Why existing code does not prevent itThe plugin validator (visible in the github-actions[bot] PR summary, ✅ Passed) checks structural/schema correctness only — it does not validate that timeframe template values match the format the upstream API expects. The mismatch between the templated ISO 8601 string and Vercel's expected ms integer slips through validation cleanly. ImpactThe activity stream's This is a visible behavioural regression on the OOB Activity dashboard, hence normal severity. How to fixTwo-line edit on "getArgs": [
- { "key": "since", "value": "{{timeframe.start}}" },
- { "key": "until", "value": "{{timeframe.end}}" },
+ { "key": "since", "value": "{{timeframe.unixStart * 1000}}" },
+ { "key": "until", "value": "{{timeframe.unixEnd * 1000}}" },
{ "key": "limit", "value": "100" }
]This matches the convention used by the other two timeframe-aware Vercel streams in this PR. Step-by-step proofConcrete example with the dashboard's
|
||
| { "key": "limit", "value": "100" } | ||
| ], | ||
| "paging": { "mode": "none" } | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { "name": "id", "displayName": "ID", "role": "id", "visible": false }, | ||
| { "name": "type", "displayName": "Type" }, | ||
| { "name": "text", "displayName": "Summary", "role": "label" }, | ||
| { | ||
| "name": "actor", | ||
| "displayName": "Actor", | ||
| "computed": true, | ||
| "valueExpression": "{{ $['user.username'] || $['user.email'] || $['userId'] }}" | ||
| }, | ||
| { "name": "user.username", "displayName": "User", "visible": false }, | ||
| { "name": "user.email", "displayName": "Email", "visible": false }, | ||
| { "name": "userId", "displayName": "User ID", "visible": false }, | ||
| { | ||
| "name": "createdAt", | ||
| "displayName": "Created", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| } | ||
| ], | ||
| "timeframes": true | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "name": "currentUser", | ||
| "displayName": "Current User", | ||
| "description": "Returns the authenticated Vercel user. Used to validate the connection", | ||
| "tags": ["User"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "v2/user", | ||
| "postRequestScript": "currentUser.js" | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { "name": "id", "displayName": "ID", "visible": false }, | ||
| { "name": "username", "displayName": "Username", "role": "label" }, | ||
| { "name": "name", "displayName": "Name" }, | ||
| { "name": "email", "displayName": "Email" } | ||
| ], | ||
| "timeframes": false, | ||
| "visibility": { "type": "hidden" } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| { | ||
| "name": "deployments", | ||
| "displayName": "Deployments", | ||
| "description": "Vercel deployments across the account or a selected project, one row per deployment", | ||
| "tags": ["Deployments"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "v7/deployments", | ||
| "postRequestScript": "deployments.js", | ||
| "getArgs": [ | ||
| { "key": "since", "value": "{{timeframe.unixStart * 1000}}" } | ||
| ], | ||
| "paging": { | ||
| "mode": "token", | ||
| "pageSize": { | ||
| "realm": "queryArg", | ||
| "path": "limit", | ||
| "value": "100" | ||
| }, | ||
| "in": { "realm": "payload", "path": "pagination.next" }, | ||
| "out": { "realm": "queryArg", "path": "until" } | ||
| } | ||
| }, | ||
| "matches": "none", | ||
| "ui": [ | ||
| { | ||
| "type": "objects", | ||
| "name": "project", | ||
| "label": "Project (optional)", | ||
| "matches": { | ||
| "sourceType": { "type": "equals", "value": "Project" } | ||
| } | ||
| } | ||
| ], | ||
| "metadata": [ | ||
| { | ||
| "name": "uid", | ||
| "displayName": "ID", | ||
| "role": "value", | ||
| "visible": false | ||
| }, | ||
| { "name": "name", "displayName": "Name", "role": "label" }, | ||
| { | ||
| "name": "state", | ||
| "displayName": "State", | ||
| "shape": [ | ||
| "state", | ||
| { | ||
| "map": { | ||
| "success": ["READY"], | ||
| "error": ["ERROR", "CANCELED"], | ||
| "warning": ["BUILDING", "QUEUED", "INITIALIZING"], | ||
| "unknown": ["DELETED"] | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| { "name": "target", "displayName": "Target" }, | ||
| { "name": "projectId", "displayName": "Project ID", "visible": false }, | ||
| { | ||
| "name": "created", | ||
| "displayName": "Created", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { "name": "url", "displayName": "URL", "shape": "url" }, | ||
| { | ||
| "name": "inspectorUrl", | ||
| "displayName": "Inspector URL", | ||
| "shape": "url" | ||
| }, | ||
| { "name": "creator", "displayName": "Creator" }, | ||
| { | ||
| "name": "ready", | ||
| "displayName": "Ready", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "buildingAt", | ||
| "displayName": "Building At", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "createdAt", | ||
| "displayName": "Created At", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { "pattern": ".*" } | ||
| ], | ||
| "timeframes": true | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "name": "domainConfig", | ||
| "displayName": "Domain Config", | ||
| "description": "Configuration health for a single Vercel domain", | ||
| "tags": ["Domain"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "v6/domains/{{object.name}}/config" | ||
| }, | ||
| "matches": { "sourceType": { "type": "equals", "value": "Domain" } }, | ||
| "metadata": [ | ||
| { | ||
| "name": "misconfigured", | ||
| "displayName": "Misconfigured", | ||
| "shape": "boolean" | ||
| }, | ||
| { | ||
| "name": "serviceType", | ||
| "displayName": "Service Type", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "configuredBy", | ||
| "displayName": "Configured By", | ||
| "shape": "string" | ||
| } | ||
| ], | ||
| "timeframes": false | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| { | ||
| "name": "domains", | ||
| "displayName": "Domains", | ||
| "description": "Lists Vercel custom domains in the configured account or team", | ||
| "tags": ["Domain"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "v5/domains", | ||
| "pathToData": "domains", | ||
| "paging": { | ||
| "mode": "token", | ||
| "pageSize": { | ||
| "realm": "queryArg", | ||
| "path": "limit", | ||
| "value": "100" | ||
| }, | ||
| "in": { "realm": "payload", "path": "pagination.next" }, | ||
| "out": { "realm": "queryArg", "path": "until" } | ||
| } | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { "name": "id", "displayName": "ID", "visible": false }, | ||
| { "name": "name", "displayName": "Domain", "role": "label" }, | ||
| { "name": "verified", "displayName": "Verified" }, | ||
| { "name": "serviceType", "displayName": "Service Type" }, | ||
| { "name": "expiresAt", "displayName": "Expires", "shape": "date" }, | ||
| { "name": "boughtAt", "displayName": "Bought", "shape": "date" }, | ||
| { "name": "renew", "displayName": "Auto-renew" }, | ||
| { "name": "createdAt", "displayName": "Created", "shape": "date" } | ||
| ], | ||
| "timeframes": false | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| { | ||
| "name": "firewallEvents", | ||
| "displayName": "Firewall Events", | ||
| "description": "Per-action firewall event counts over the timeframe for a single Vercel project", | ||
| "tags": ["Security", "Firewall"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "v1/security/firewall/events", | ||
| "getArgs": [ | ||
| { "key": "projectId", "value": "{{object.rawId}}" }, | ||
| { | ||
| "key": "startTimestamp", | ||
| "value": "{{timeframe.unixStart * 1000}}" | ||
| }, | ||
| { "key": "endTimestamp", "value": "{{timeframe.unixEnd * 1000}}" } | ||
| ], | ||
| "pathToData": "actions" | ||
| }, | ||
| "matches": { | ||
| "sourceType": { "type": "equals", "value": "Project" } | ||
| }, | ||
| "metadata": [ | ||
| { | ||
| "name": "startTime", | ||
| "displayName": "Time", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "action", | ||
| "displayName": "Action", | ||
| "shape": "string", | ||
| "role": "label" | ||
| }, | ||
| { | ||
| "name": "count", | ||
| "displayName": "Count", | ||
| "shape": "number", | ||
| "role": "value" | ||
| }, | ||
| { | ||
| "name": "host", | ||
| "displayName": "Host", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "public_ip", | ||
| "displayName": "Public IP", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "action_type", | ||
| "displayName": "Action Category", | ||
| "shape": "string", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "name": "isActive", | ||
| "displayName": "Active", | ||
| "shape": "boolean", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "pattern": ".*" | ||
| } | ||
| ], | ||
| "timeframes": true | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| { | ||
| "name": "projectInfo", | ||
| "displayName": "Project Info", | ||
| "description": "Per-project detail (framework, Node version, timestamps, git repo) for a single Vercel project", | ||
| "tags": ["Project"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "v9/projects/{{object.rawId}}", | ||
| "expandInnerObjects": true | ||
| }, | ||
| "matches": { "sourceType": { "type": "equals", "value": "Project" } }, | ||
| "metadata": [ | ||
| { | ||
| "name": "name", | ||
| "displayName": "Name", | ||
| "shape": "string", | ||
| "role": "label" | ||
| }, | ||
| { "name": "framework", "displayName": "Framework", "shape": "string" }, | ||
| { | ||
| "name": "nodeVersion", | ||
| "displayName": "Node Version", | ||
| "shape": "string" | ||
| }, | ||
| { "name": "createdAt", "displayName": "Created", "shape": "date" }, | ||
| { "name": "updatedAt", "displayName": "Updated", "shape": "date" }, | ||
| { "name": "link.repo", "displayName": "Git Repo", "shape": "string" }, | ||
| { | ||
| "name": "link.type", | ||
| "displayName": "Git Provider", | ||
| "shape": "string" | ||
| } | ||
| ], | ||
| "timeframes": false | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.