-
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
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,16 @@ | ||
| [ | ||
| { | ||
| "name": "Project", | ||
| "sourceType": "Project", | ||
| "icon": "rocket", | ||
| "singular": "Project", | ||
| "plural": "Projects" | ||
| }, | ||
| { | ||
| "name": "Domain", | ||
| "sourceType": "Domain", | ||
| "icon": "globe", | ||
| "singular": "Domain", | ||
| "plural": "Domains" | ||
| } | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| { | ||
| "name": "activity", | ||
| "displayName": "Activity", | ||
| "description": "Vercel account or team activity feed, one row per audit-style event. Backs activity and audit log tiles", | ||
| "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}}" }, | ||
| { "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,71 @@ | ||
| { | ||
| "name": "cost", | ||
| "displayName": "Cost", | ||
| "description": "Vercel usage cost and consumption from the FOCUS billing endpoint, one row per daily charge", | ||
| "tags": ["Cost", "Billing"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "v1/billing/charges", | ||
| "postRequestScript": "cost.js", | ||
| "getArgs": [ | ||
| { "key": "from", "value": "{{timeframe.start}}" }, | ||
| { "key": "to", "value": "{{timeframe.end}}" } | ||
| ], | ||
| "headers": [ | ||
| { | ||
| "key": "Accept-Encoding", | ||
| "value": "gzip" | ||
| } | ||
| ] | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { | ||
| "name": "service", | ||
| "displayName": "Service", | ||
| "shape": "string", | ||
| "role": "label" | ||
| }, | ||
| { | ||
| "name": "billedCost", | ||
| "displayName": "Billed Cost ($)", | ||
| "shape": [ | ||
| "currency", | ||
| { | ||
| "code": "usd", | ||
| "decimalPlaces": 2, | ||
| "thousandsSeparator": true | ||
| } | ||
| ], | ||
| "role": "value" | ||
| }, | ||
| { | ||
| "name": "effectiveCost", | ||
| "displayName": "Effective Cost ($)", | ||
| "shape": [ | ||
| "currency", | ||
| { | ||
| "code": "usd", | ||
| "decimalPlaces": 2, | ||
| "thousandsSeparator": true | ||
| } | ||
| ] | ||
| }, | ||
| { "name": "quantity", "displayName": "Quantity", "shape": "number" }, | ||
| { "name": "unit", "displayName": "Unit", "shape": "string" }, | ||
| { | ||
| "name": "projectName", | ||
| "displayName": "Project", | ||
| "shape": "string", | ||
| "role": "label" | ||
| }, | ||
| { | ||
| "name": "periodStart", | ||
| "displayName": "Period Start", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| } | ||
| ], | ||
| "timeframes": ["last24hours", "last7days", "last30days", "thisMonth"] | ||
|
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 cost data stream declares Extended reasoning...What the bug is
"timeframes": ["last24hours", "last7days", "last30days", "thisMonth"]— four selectable timeframes. But
And this PR's own Known limitations section in the description goes further:
The config and the documentation contradict each other. The four-entry list is what the UI will actually show in the timeframe picker; the README is what the user will read before deciding what to pick. How it manifests
Why existing code does not prevent itThere is no runtime guard in Step-by-step proof of the inconsistency
How to fixPreferred fix (matches the author's documented intent): - "timeframes": ["last24hours", "last7days", "last30days", "thisMonth"]
+ "timeframes": ["last24hours", "last7days"]Alternative: if |
||
| } | ||
| 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": [], | ||
| "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. Backs deployment health and history tiles", | ||
| "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 — whether DNS/nameservers are misconfigured, the service type, and who configured it", | ||
| "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,31 @@ | ||
| { | ||
| "name": "domains", | ||
| "displayName": "Domains", | ||
| "description": "Lists Vercel custom domains in the configured account or team. Backs the Vercel Domain import and domain inventory tiles.", | ||
| "tags": [], | ||
| "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": "sourceType", "computed": true, "valueExpression": "Vercel Domain", "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, one row per time-bucket and action type", | ||
| "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 | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.