@sentry/junior-vercel 0.127.0 → 0.128.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.
@@ -30,7 +30,7 @@ function vercelWebhookSecret() {
30
30
  // src/tools/deployment-source.ts
31
31
  import {
32
32
  definePluginTool,
33
- pluginToolResultSchema,
33
+ pluginToolOutputSchema,
34
34
  subscribableResourceSchema
35
35
  } from "@sentry/junior-plugin-api";
36
36
  import { z } from "zod";
@@ -50,10 +50,7 @@ var deploymentSourceSchema = z.object({
50
50
  projectId: projectIdSchema,
51
51
  subscribable: subscribableResourceSchema.optional()
52
52
  });
53
- var outputSchema = pluginToolResultSchema.extend({
54
- data: deploymentSourceSchema,
55
- ok: z.literal(true),
56
- status: z.literal("success"),
53
+ var outputSchema = pluginToolOutputSchema.extend({
57
54
  target: z.literal("deploymentSource"),
58
55
  ...deploymentSourceSchema.shape
59
56
  });
@@ -100,12 +97,12 @@ function createVercelDeploymentSourceTool(ctx) {
100
97
  }
101
98
  const projectId = z.object({ id: projectIdSchema }).parse(parsed).id;
102
99
  const commitSha2 = input.commitSha.toLowerCase();
103
- const subscribable = vercelDeploymentSourceSubscribable({
100
+ const subscribable = ctx.resourceEvents.canSubscribe ? vercelDeploymentSourceSubscribable({
104
101
  commitSha: commitSha2,
105
102
  projectId,
106
103
  target: input.target,
107
104
  webhookSecret: vercelWebhookSecret()
108
- });
105
+ }) : void 0;
109
106
  const data = {
110
107
  commitSha: commitSha2,
111
108
  deploymentTarget: input.target,
@@ -113,9 +110,6 @@ function createVercelDeploymentSourceTool(ctx) {
113
110
  ...subscribable ? { subscribable } : {}
114
111
  };
115
112
  return {
116
- data,
117
- ok: true,
118
- status: "success",
119
113
  target: "deploymentSource",
120
114
  ...data
121
115
  };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  createVercelDeploymentSourceTool,
4
4
  createVercelWebhookRoute,
5
5
  vercelWebhookSecret
6
- } from "./chunk-LA2BZ6FC.js";
6
+ } from "./chunk-5ZQCPWW4.js";
7
7
 
8
8
  // src/index.ts
9
9
  import {
package/dist/testing.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  createVercelDeploymentSourceTool,
3
3
  createVercelWebhookRoute,
4
4
  normalizeVercelResourceEvents
5
- } from "./chunk-LA2BZ6FC.js";
5
+ } from "./chunk-5ZQCPWW4.js";
6
6
  export {
7
7
  createVercelDeploymentSourceTool,
8
8
  createVercelWebhookRoute,
@@ -10,32 +10,12 @@ export declare function createVercelDeploymentSourceTool(ctx: ToolRegistrationHo
10
10
  commitSha: string;
11
11
  deploymentTarget: "preview" | "production" | "staging";
12
12
  projectId: string;
13
- data: {
14
- commitSha: string;
15
- deploymentTarget: "preview" | "production" | "staging";
16
- projectId: string;
17
- subscribable?: {
18
- identifier: string;
19
- label: string;
20
- namespace: string;
21
- supportedEvents: string[];
22
- type: string;
23
- suggestedEvents?: string[] | undefined;
24
- } | undefined;
25
- };
26
- ok: true;
27
- status: "success";
28
13
  target: "deploymentSource";
29
14
  truncated?: boolean | undefined;
30
15
  continuation?: {
31
16
  arguments: Record<string, unknown>;
32
17
  reason?: string | undefined;
33
18
  } | undefined;
34
- error?: string | {
35
- kind: string;
36
- message: string;
37
- retryable?: boolean | undefined;
38
- } | undefined;
39
19
  subscribable?: {
40
20
  identifier: string;
41
21
  label: string;
@@ -49,32 +29,12 @@ export declare function createVercelDeploymentSourceTool(ctx: ToolRegistrationHo
49
29
  commitSha: string;
50
30
  deploymentTarget: "preview" | "production" | "staging";
51
31
  projectId: string;
52
- data: {
53
- commitSha: string;
54
- deploymentTarget: "preview" | "production" | "staging";
55
- projectId: string;
56
- subscribable?: {
57
- identifier: string;
58
- label: string;
59
- namespace: string;
60
- supportedEvents: string[];
61
- type: string;
62
- suggestedEvents?: string[] | undefined;
63
- } | undefined;
64
- };
65
- ok: true;
66
- status: "success";
67
32
  target: "deploymentSource";
68
33
  truncated?: boolean | undefined;
69
34
  continuation?: {
70
35
  arguments: Record<string, unknown>;
71
36
  reason?: string | undefined;
72
37
  } | undefined;
73
- error?: string | {
74
- kind: string;
75
- message: string;
76
- retryable?: boolean | undefined;
77
- } | undefined;
78
38
  subscribable?: {
79
39
  identifier: string;
80
40
  label: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-vercel",
3
- "version": "0.127.0",
3
+ "version": "0.128.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "zod": "^4.4.3",
30
- "@sentry/junior-plugin-api": "0.127.0"
30
+ "@sentry/junior-plugin-api": "0.128.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "^25.9.1",