@sentry/junior-vercel 0.302.0 → 0.303.0

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/dist/index.js CHANGED
@@ -1,363 +1,292 @@
1
- import {
2
- VERCEL_DEPLOYMENT_EVENTS,
3
- VERCEL_DEPLOYMENT_MATCH_FIELDS,
4
- VERCEL_DEPLOYMENT_SUGGESTED_EVENTS,
5
- createVercelWebhookRoute,
6
- vercelDeploymentTool
7
- } from "./chunk-JY7QEZ73.js";
8
-
9
- // src/index.ts
10
- import {
11
- defineJuniorPlugin
12
- } from "@sentry/junior-plugin-api";
13
-
14
- // src/tools/actions.ts
15
- import {
16
- definePluginTool,
17
- PluginToolInputError,
18
- pluginToolOutputSchema
19
- } from "@sentry/junior-plugin-api";
1
+ import { a as VERCEL_DEPLOYMENT_MATCH_FIELDS, i as VERCEL_DEPLOYMENT_EVENTS, o as VERCEL_DEPLOYMENT_SUGGESTED_EVENTS, r as vercelDeploymentTool, t as createVercelWebhookRoute } from "./handler-yrda69iT.js";
2
+ import { PluginToolInputError, defineJuniorPlugin, definePluginTool, pluginToolOutputSchema } from "@sentry/junior-plugin-api";
20
3
  import * as z from "zod";
21
- var text = z.string().trim().min(1);
22
- var team = text.describe(
23
- "Vercel team slug or team_ ID. Omit for the token's default account."
24
- ).optional();
25
- var deploymentIdSchema = z.string().regex(/^dpl_[a-zA-Z0-9]+$/).describe("Exact Vercel deployment ID, not an alias.");
26
- var aliasName = z.string().regex(/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?\.[a-z]{2,}$/).describe("Alias hostname without a scheme or path.");
27
- var deploymentSchema = z.object({
28
- id: text,
29
- url: text,
30
- readyState: text,
31
- target: z.string().nullable().optional(),
32
- projectId: text.optional(),
33
- gitSource: z.object({ sha: text.optional(), ref: text.optional() }).nullable().optional()
4
+ // src/tools/actions.ts
5
+ const text = z.string().trim().min(1);
6
+ const team = text.describe("Vercel team slug or team_ ID. Omit for the token's default account.").optional();
7
+ const deploymentIdSchema = z.string().regex(/^dpl_[a-zA-Z0-9]+$/).describe("Exact Vercel deployment ID, not an alias.");
8
+ const aliasName = z.string().regex(/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?\.[a-z]{2,}$/).describe("Alias hostname without a scheme or path.");
9
+ const deploymentSchema = z.object({
10
+ id: text,
11
+ url: text,
12
+ readyState: text,
13
+ target: z.string().nullable().optional(),
14
+ projectId: text.optional(),
15
+ gitSource: z.object({
16
+ sha: text.optional(),
17
+ ref: text.optional()
18
+ }).nullable().optional()
34
19
  });
35
- var deploymentOutput = pluginToolOutputSchema.extend({
36
- target: z.literal("deployment"),
37
- deployment_id: text,
38
- url: text,
39
- state: text,
40
- deployment_target: z.string().nullable(),
41
- project_id: text.nullable(),
42
- commit_sha: text.nullable(),
43
- ref: text.nullable()
20
+ const deploymentOutput = pluginToolOutputSchema.extend({
21
+ target: z.literal("deployment"),
22
+ deployment_id: text,
23
+ url: text,
24
+ state: text,
25
+ deployment_target: z.string().nullable(),
26
+ project_id: text.nullable(),
27
+ commit_sha: text.nullable(),
28
+ ref: text.nullable()
44
29
  });
45
- var aliasSchema = z.object({
46
- alias: text,
47
- deploymentId: text.nullable(),
48
- redirect: text.nullable().optional()
30
+ const aliasSchema = z.object({
31
+ alias: text,
32
+ deploymentId: text.nullable(),
33
+ redirect: text.nullable().optional()
49
34
  });
50
- var aliasOutput = pluginToolOutputSchema.extend({
51
- target: z.literal("alias"),
52
- alias: text,
53
- deployment_id: text.nullable(),
54
- redirect: text.nullable()
35
+ const aliasOutput = pluginToolOutputSchema.extend({
36
+ target: z.literal("alias"),
37
+ alias: text,
38
+ deployment_id: text.nullable(),
39
+ redirect: text.nullable()
55
40
  });
56
41
  function deploymentResult(data) {
57
- const value = deploymentSchema.parse(data);
58
- return {
59
- target: "deployment",
60
- deployment_id: value.id,
61
- url: `https://${value.url}`,
62
- state: value.readyState,
63
- deployment_target: value.target ?? null,
64
- project_id: value.projectId ?? null,
65
- commit_sha: value.gitSource?.sha ?? null,
66
- ref: value.gitSource?.ref ?? null,
67
- objectAnnotations: [
68
- {
69
- kind: "object",
70
- objectType: "deployment",
71
- displayType: "Deployment",
72
- key: value.id,
73
- label: value.id,
74
- title: value.url.slice(0, 512),
75
- url: `https://${value.url}`,
76
- status: value.readyState,
77
- facts: {
78
- type: "deployment",
79
- project: value.projectId?.slice(0, 64),
80
- environment: value.target?.slice(0, 64) ?? void 0,
81
- revision: value.gitSource?.sha?.slice(0, 64),
82
- branch: value.gitSource?.ref?.slice(0, 64)
83
- }
84
- }
85
- ]
86
- };
42
+ const value = deploymentSchema.parse(data);
43
+ return {
44
+ target: "deployment",
45
+ deployment_id: value.id,
46
+ url: `https://${value.url}`,
47
+ state: value.readyState,
48
+ deployment_target: value.target ?? null,
49
+ project_id: value.projectId ?? null,
50
+ commit_sha: value.gitSource?.sha ?? null,
51
+ ref: value.gitSource?.ref ?? null,
52
+ objectAnnotations: [{
53
+ kind: "object",
54
+ objectType: "deployment",
55
+ displayType: "Deployment",
56
+ key: value.id,
57
+ label: value.id,
58
+ title: value.url.slice(0, 512),
59
+ url: `https://${value.url}`,
60
+ status: value.readyState,
61
+ facts: {
62
+ type: "deployment",
63
+ project: value.projectId?.slice(0, 64),
64
+ environment: value.target?.slice(0, 64) ?? void 0,
65
+ revision: value.gitSource?.sha?.slice(0, 64),
66
+ branch: value.gitSource?.ref?.slice(0, 64)
67
+ }
68
+ }]
69
+ };
87
70
  }
88
71
  async function request(egress, operation, path, scope, method = "GET", body) {
89
- const url = new URL(path, "https://api.vercel.com");
90
- if (scope)
91
- url.searchParams.set(scope.startsWith("team_") ? "teamId" : "slug", scope);
92
- const init = {
93
- method,
94
- redirect: "error",
95
- signal: AbortSignal.timeout(3e4)
96
- };
97
- if (body !== void 0) {
98
- init.headers = { "Content-Type": "application/json" };
99
- init.body = JSON.stringify(body);
100
- }
101
- const response = await egress.fetch({
102
- provider: "vercel",
103
- operation,
104
- request: new Request(url, init)
105
- });
106
- if (!response.ok) {
107
- const message = `${operation} failed with HTTP ${response.status}`;
108
- if (response.status === 400 || response.status === 404)
109
- throw new PluginToolInputError(message);
110
- throw new Error(message);
111
- }
112
- if (response.status === 204) return void 0;
113
- return response.json();
72
+ const url = new URL(path, "https://api.vercel.com");
73
+ if (scope) url.searchParams.set(scope.startsWith("team_") ? "teamId" : "slug", scope);
74
+ const init = {
75
+ method,
76
+ redirect: "error",
77
+ signal: AbortSignal.timeout(3e4)
78
+ };
79
+ if (body !== void 0) {
80
+ init.headers = { "Content-Type": "application/json" };
81
+ init.body = JSON.stringify(body);
82
+ }
83
+ const response = await egress.fetch({
84
+ provider: "vercel",
85
+ operation,
86
+ request: new Request(url, init)
87
+ });
88
+ if (!response.ok) {
89
+ const message = `${operation} failed with HTTP ${response.status}`;
90
+ if (response.status === 400 || response.status === 404) throw new PluginToolInputError(message);
91
+ throw new Error(message);
92
+ }
93
+ if (response.status === 204) return void 0;
94
+ return response.json();
114
95
  }
115
96
  async function inspectAlias(egress, alias, scope) {
116
- const result = aliasSchema.parse(
117
- await request(
118
- egress,
119
- "vercel.alias.get",
120
- `/v4/aliases/${encodeURIComponent(alias)}`,
121
- scope
122
- )
123
- );
124
- return {
125
- target: "alias",
126
- alias: result.alias,
127
- deployment_id: result.deploymentId,
128
- redirect: result.redirect ?? null
129
- };
97
+ const result = aliasSchema.parse(await request(egress, "vercel.alias.get", `/v4/aliases/${encodeURIComponent(alias)}`, scope));
98
+ return {
99
+ target: "alias",
100
+ alias: result.alias,
101
+ deployment_id: result.deploymentId,
102
+ redirect: result.redirect ?? null
103
+ };
130
104
  }
131
- var vercelActionTools = {
132
- deploymentCreate: definePluginTool({
133
- annotations: {
134
- destructiveHint: true,
135
- idempotentHint: false,
136
- openWorldHint: true,
137
- readOnlyHint: false
138
- },
139
- description: "Start a deployment from a Vercel project's linked GitHub repository. Uses project build settings and environment credentials, so builds may run migrations. Returns the new deployment; inspect it to check readiness.",
140
- inputSchema: z.object({
141
- project: text.describe("Existing Vercel project name or ID."),
142
- team,
143
- ref: text.describe(
144
- "Git branch, tag, or full commit SHA in the project's linked repository."
145
- ),
146
- commit_sha: z.string().regex(/^[a-f0-9]{40}$/i).describe(
147
- "Full commit SHA to pin the source while retaining branch context in ref."
148
- ).optional(),
149
- target: z.enum(["preview", "production"]).describe("Deployment environment; defaults to preview.").optional()
150
- }).strict(),
151
- outputSchema: deploymentOutput,
152
- async execute(input, _options, ctx) {
153
- const project = z.object({
154
- id: text,
155
- name: text,
156
- link: z.object({
157
- type: text,
158
- repoId: z.union([text, z.number()]).optional()
159
- }).nullable().optional()
160
- }).parse(
161
- await request(
162
- ctx.egress,
163
- "vercel.project.get",
164
- `/v9/projects/${encodeURIComponent(input.project)}`,
165
- input.team
166
- )
167
- );
168
- if (project.link?.type !== "github" || !project.link.repoId)
169
- throw new PluginToolInputError(
170
- "This deployment tool requires a project linked to GitHub. Use the Vercel CLI for other source types."
171
- );
172
- const gitSource = {
173
- type: "github",
174
- repoId: project.link.repoId,
175
- ref: input.ref,
176
- sha: input.commit_sha?.toLowerCase()
177
- };
178
- return deploymentResult(
179
- await request(
180
- ctx.egress,
181
- "vercel.deployment.create",
182
- "/v13/deployments",
183
- input.team,
184
- "POST",
185
- {
186
- name: project.name,
187
- project: project.id,
188
- // Vercel uses an omitted target for Preview, not "preview".
189
- target: input.target === "production" ? "production" : void 0,
190
- gitSource
191
- }
192
- )
193
- );
194
- }
195
- }),
196
- deploymentInspect: definePluginTool({
197
- annotations: {
198
- destructiveHint: false,
199
- idempotentHint: true,
200
- openWorldHint: true,
201
- readOnlyHint: true
202
- },
203
- description: "Inspect a Vercel deployment by ID or hostname. Returns its ID, state, environment, and Git source when available. Use the CLI for logs.",
204
- inputSchema: z.object({
205
- deployment: text.describe(
206
- "Deployment ID or hostname, without a scheme or path."
207
- ),
208
- team
209
- }).strict(),
210
- outputSchema: deploymentOutput,
211
- async execute(input, _options, ctx) {
212
- return deploymentResult(
213
- await request(
214
- ctx.egress,
215
- "vercel.deployment.get",
216
- `/v13/deployments/${encodeURIComponent(input.deployment)}?withGitRepoInfo=true`,
217
- input.team
218
- )
219
- );
220
- }
221
- }),
222
- aliasAssign: definePluginTool({
223
- annotations: {
224
- destructiveHint: true,
225
- idempotentHint: true,
226
- openWorldHint: true,
227
- readOnlyHint: false
228
- },
229
- description: "Assign an alias hostname to a deployment ID. This can replace live traffic. Reads the alias back and returns matches=false if its target changed or it redirects.",
230
- inputSchema: z.object({ deployment_id: deploymentIdSchema, alias: aliasName, team }).strict(),
231
- outputSchema: aliasOutput.extend({ matches: z.boolean() }),
232
- async execute(input, _options, ctx) {
233
- await request(
234
- ctx.egress,
235
- "vercel.alias.assign",
236
- `/v2/deployments/${encodeURIComponent(input.deployment_id)}/aliases`,
237
- input.team,
238
- "POST",
239
- { alias: input.alias }
240
- );
241
- const result = await inspectAlias(ctx.egress, input.alias, input.team);
242
- return {
243
- ...result,
244
- matches: result.deployment_id === input.deployment_id && !result.redirect
245
- };
246
- }
247
- }),
248
- aliasInspect: definePluginTool({
249
- annotations: {
250
- destructiveHint: false,
251
- idempotentHint: true,
252
- openWorldHint: true,
253
- readOnlyHint: true
254
- },
255
- description: "Read a Vercel alias's current deployment ID or redirect.",
256
- inputSchema: z.object({ alias: aliasName, team }).strict(),
257
- outputSchema: aliasOutput,
258
- async execute(input, _options, ctx) {
259
- return inspectAlias(ctx.egress, input.alias, input.team);
260
- }
261
- }),
262
- deploymentDelete: definePluginTool({
263
- annotations: {
264
- destructiveHint: true,
265
- idempotentHint: true,
266
- openWorldHint: true,
267
- readOnlyHint: false
268
- },
269
- description: "Delete a Vercel deployment by ID. This can remove a live deployment. Does not delete its database or other external state.",
270
- inputSchema: z.object({ deployment_id: deploymentIdSchema, team }).strict(),
271
- outputSchema: pluginToolOutputSchema.extend({
272
- target: z.literal("deployment"),
273
- deployment_id: text,
274
- deleted: z.literal(true)
275
- }),
276
- async execute(input, _options, ctx) {
277
- await request(
278
- ctx.egress,
279
- "vercel.deployment.delete",
280
- `/v13/deployments/${encodeURIComponent(input.deployment_id)}`,
281
- input.team,
282
- "DELETE"
283
- );
284
- return {
285
- target: "deployment",
286
- deployment_id: input.deployment_id,
287
- deleted: true
288
- };
289
- }
290
- })
105
+ /** Vercel deployment and alias operations. */
106
+ const vercelActionTools = {
107
+ deploymentCreate: definePluginTool({
108
+ annotations: {
109
+ destructiveHint: true,
110
+ idempotentHint: false,
111
+ openWorldHint: true,
112
+ readOnlyHint: false
113
+ },
114
+ description: "Start a deployment from a Vercel project's linked GitHub repository. Uses project build settings and environment credentials, so builds may run migrations. Returns the new deployment; inspect it to check readiness.",
115
+ inputSchema: z.object({
116
+ project: text.describe("Existing Vercel project name or ID."),
117
+ team,
118
+ ref: text.describe("Git branch, tag, or full commit SHA in the project's linked repository."),
119
+ commit_sha: z.string().regex(/^[a-f0-9]{40}$/i).describe("Full commit SHA to pin the source while retaining branch context in ref.").optional(),
120
+ target: z.enum(["preview", "production"]).describe("Deployment environment; defaults to preview.").optional()
121
+ }).strict(),
122
+ outputSchema: deploymentOutput,
123
+ async execute(input, _options, ctx) {
124
+ const project = z.object({
125
+ id: text,
126
+ name: text,
127
+ link: z.object({
128
+ type: text,
129
+ repoId: z.union([text, z.number()]).optional()
130
+ }).nullable().optional()
131
+ }).parse(await request(ctx.egress, "vercel.project.get", `/v9/projects/${encodeURIComponent(input.project)}`, input.team));
132
+ if (project.link?.type !== "github" || !project.link.repoId) throw new PluginToolInputError("This deployment tool requires a project linked to GitHub. Use the Vercel CLI for other source types.");
133
+ const gitSource = {
134
+ type: "github",
135
+ repoId: project.link.repoId,
136
+ ref: input.ref,
137
+ sha: input.commit_sha?.toLowerCase()
138
+ };
139
+ return deploymentResult(await request(ctx.egress, "vercel.deployment.create", "/v13/deployments", input.team, "POST", {
140
+ name: project.name,
141
+ project: project.id,
142
+ target: input.target === "production" ? "production" : void 0,
143
+ gitSource
144
+ }));
145
+ }
146
+ }),
147
+ deploymentInspect: definePluginTool({
148
+ annotations: {
149
+ destructiveHint: false,
150
+ idempotentHint: true,
151
+ openWorldHint: true,
152
+ readOnlyHint: true
153
+ },
154
+ description: "Inspect a Vercel deployment by ID or hostname. Returns its ID, state, environment, and Git source when available. Use the CLI for logs.",
155
+ inputSchema: z.object({
156
+ deployment: text.describe("Deployment ID or hostname, without a scheme or path."),
157
+ team
158
+ }).strict(),
159
+ outputSchema: deploymentOutput,
160
+ async execute(input, _options, ctx) {
161
+ return deploymentResult(await request(ctx.egress, "vercel.deployment.get", `/v13/deployments/${encodeURIComponent(input.deployment)}?withGitRepoInfo=true`, input.team));
162
+ }
163
+ }),
164
+ aliasAssign: definePluginTool({
165
+ annotations: {
166
+ destructiveHint: true,
167
+ idempotentHint: true,
168
+ openWorldHint: true,
169
+ readOnlyHint: false
170
+ },
171
+ description: "Assign an alias hostname to a deployment ID. This can replace live traffic. Reads the alias back and returns matches=false if its target changed or it redirects.",
172
+ inputSchema: z.object({
173
+ deployment_id: deploymentIdSchema,
174
+ alias: aliasName,
175
+ team
176
+ }).strict(),
177
+ outputSchema: aliasOutput.extend({ matches: z.boolean() }),
178
+ async execute(input, _options, ctx) {
179
+ await request(ctx.egress, "vercel.alias.assign", `/v2/deployments/${encodeURIComponent(input.deployment_id)}/aliases`, input.team, "POST", { alias: input.alias });
180
+ const result = await inspectAlias(ctx.egress, input.alias, input.team);
181
+ return {
182
+ ...result,
183
+ matches: result.deployment_id === input.deployment_id && !result.redirect
184
+ };
185
+ }
186
+ }),
187
+ aliasInspect: definePluginTool({
188
+ annotations: {
189
+ destructiveHint: false,
190
+ idempotentHint: true,
191
+ openWorldHint: true,
192
+ readOnlyHint: true
193
+ },
194
+ description: "Read a Vercel alias's current deployment ID or redirect.",
195
+ inputSchema: z.object({
196
+ alias: aliasName,
197
+ team
198
+ }).strict(),
199
+ outputSchema: aliasOutput,
200
+ async execute(input, _options, ctx) {
201
+ return inspectAlias(ctx.egress, input.alias, input.team);
202
+ }
203
+ }),
204
+ deploymentDelete: definePluginTool({
205
+ annotations: {
206
+ destructiveHint: true,
207
+ idempotentHint: true,
208
+ openWorldHint: true,
209
+ readOnlyHint: false
210
+ },
211
+ description: "Delete a Vercel deployment by ID. This can remove a live deployment. Does not delete its database or other external state.",
212
+ inputSchema: z.object({
213
+ deployment_id: deploymentIdSchema,
214
+ team
215
+ }).strict(),
216
+ outputSchema: pluginToolOutputSchema.extend({
217
+ target: z.literal("deployment"),
218
+ deployment_id: text,
219
+ deleted: z.literal(true)
220
+ }),
221
+ async execute(input, _options, ctx) {
222
+ await request(ctx.egress, "vercel.deployment.delete", `/v13/deployments/${encodeURIComponent(input.deployment_id)}`, input.team, "DELETE");
223
+ return {
224
+ target: "deployment",
225
+ deployment_id: input.deployment_id,
226
+ deleted: true
227
+ };
228
+ }
229
+ })
291
230
  };
292
-
293
231
  // src/webhooks/secret.ts
232
+ /** Read the normalized secret shared by plugin enablement and webhook ingress. */
294
233
  function vercelWebhookSecret() {
295
- return process.env.VERCEL_WEBHOOK_SECRET?.trim() || void 0;
234
+ return process.env["VERCEL_WEBHOOK_SECRET"]?.trim() || void 0;
296
235
  }
297
-
298
236
  // src/index.ts
237
+ /**
238
+ * Vercel plugin runtime boundary.
239
+ *
240
+ * This package owns Vercel CLI setup, host-managed API authentication, signed
241
+ * webhook normalization, and deployment tools. Junior core owns the resulting
242
+ * conversation subscriptions and event delivery.
243
+ */
244
+ /** Register Vercel runtime metadata, tools, and signed webhook ingress. */
299
245
  function vercelPlugin() {
300
- return defineJuniorPlugin({
301
- packageName: "@sentry/junior-vercel",
302
- events: {
303
- resourceTypes: [
304
- {
305
- type: "deployment",
306
- supportedEvents: [...VERCEL_DEPLOYMENT_EVENTS],
307
- suggestedEvents: [...VERCEL_DEPLOYMENT_SUGGESTED_EVENTS],
308
- matchFields: VERCEL_DEPLOYMENT_MATCH_FIELDS
309
- }
310
- ],
311
- // Deployment events carry status facts, and Junior adds nothing to
312
- // Vercel, so they can run for every project. Use the `projectId`
313
- // filter to narrow them.
314
- events: Object.fromEntries(
315
- VERCEL_DEPLOYMENT_EVENTS.map((eventType) => [
316
- eventType,
317
- { reach: "all" }
318
- ])
319
- ),
320
- isEnabled: () => Boolean(vercelWebhookSecret())
321
- },
322
- manifest: {
323
- apiHeaders: {
324
- Authorization: "Bearer ${JUNIOR_VERCEL_TOKEN}"
325
- },
326
- commandEnv: {
327
- VERCEL_TOKEN: "host_managed_credential"
328
- },
329
- configKeys: ["project", "team"],
330
- description: "Deploy and inspect Vercel projects, manage aliases, query logs, and monitor outcomes",
331
- displayName: "Vercel",
332
- domains: ["api.vercel.com"],
333
- envVars: {
334
- JUNIOR_VERCEL_TOKEN: {},
335
- VERCEL_WEBHOOK_SECRET: {}
336
- },
337
- name: "vercel",
338
- runtimeDependencies: [
339
- {
340
- package: "vercel",
341
- type: "npm",
342
- version: "latest"
343
- }
344
- ]
345
- },
346
- hooks: {
347
- routes(ctx) {
348
- return [
349
- createVercelWebhookRoute({
350
- events: ctx.events,
351
- webhookSecret: vercelWebhookSecret
352
- })
353
- ];
354
- },
355
- tools() {
356
- return { deployment: vercelDeploymentTool, ...vercelActionTools };
357
- }
358
- }
359
- });
246
+ return defineJuniorPlugin({
247
+ packageName: "@sentry/junior-vercel",
248
+ events: {
249
+ resourceTypes: [{
250
+ type: "deployment",
251
+ supportedEvents: [...VERCEL_DEPLOYMENT_EVENTS],
252
+ suggestedEvents: [...VERCEL_DEPLOYMENT_SUGGESTED_EVENTS],
253
+ matchFields: VERCEL_DEPLOYMENT_MATCH_FIELDS
254
+ }],
255
+ events: Object.fromEntries(VERCEL_DEPLOYMENT_EVENTS.map((eventType) => [eventType, { reach: "all" }])),
256
+ isEnabled: () => Boolean(vercelWebhookSecret())
257
+ },
258
+ manifest: {
259
+ apiHeaders: { Authorization: "Bearer ${JUNIOR_VERCEL_TOKEN}" },
260
+ commandEnv: { VERCEL_TOKEN: "host_managed_credential" },
261
+ configKeys: ["project", "team"],
262
+ description: "Deploy and inspect Vercel projects, manage aliases, query logs, and monitor outcomes",
263
+ displayName: "Vercel",
264
+ domains: ["api.vercel.com"],
265
+ envVars: {
266
+ JUNIOR_VERCEL_TOKEN: {},
267
+ VERCEL_WEBHOOK_SECRET: {}
268
+ },
269
+ name: "vercel",
270
+ runtimeDependencies: [{
271
+ package: "vercel",
272
+ type: "npm",
273
+ version: "latest"
274
+ }]
275
+ },
276
+ hooks: {
277
+ routes(ctx) {
278
+ return [createVercelWebhookRoute({
279
+ events: ctx.events,
280
+ webhookSecret: vercelWebhookSecret
281
+ })];
282
+ },
283
+ tools() {
284
+ return {
285
+ deployment: vercelDeploymentTool,
286
+ ...vercelActionTools
287
+ };
288
+ }
289
+ }
290
+ });
360
291
  }
361
- export {
362
- vercelPlugin
363
- };
292
+ export { vercelPlugin };