@sentry/junior-vercel 0.268.0 → 0.270.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.
Files changed (2) hide show
  1. package/README.md +2 -102
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,17 +1,11 @@
1
1
  # @sentry/junior-vercel
2
2
 
3
- `@sentry/junior-vercel` adds Vercel deployment and alias tools, plus CLI workflows for deployment and log investigation. Signed Vercel webhooks can also notify an existing Junior conversation when a deployment succeeds, fails, or is canceled.
4
-
5
- ## Install
3
+ Vercel deployment, alias, and log workflows and signed deployment webhooks for Junior.
6
4
 
7
5
  ```bash
8
6
  pnpm add @sentry/junior @sentry/junior-vercel
9
7
  ```
10
8
 
11
- ## Configure
12
-
13
- Add the plugin factory to the plugin set exported from `plugins.ts`:
14
-
15
9
  ```ts
16
10
  import { defineJuniorPlugins } from "@sentry/junior";
17
11
  import { vercelPlugin } from "@sentry/junior-vercel";
@@ -19,98 +13,4 @@ import { vercelPlugin } from "@sentry/junior-vercel";
19
13
  export const plugins = defineJuniorPlugins([vercelPlugin()]);
20
14
  ```
21
15
 
22
- Point `juniorNitro()` at that plugin module:
23
-
24
- ```ts
25
- juniorNitro({ plugins: "./plugins" });
26
- ```
27
-
28
- Set a Vercel token in the Junior deployment environment:
29
-
30
- ```bash
31
- JUNIOR_VERCEL_TOKEN=...
32
- ```
33
-
34
- Use a Vercel service account or token with access to the required projects and actions. The same token handles reads and writes.
35
-
36
- ## Optional deployment webhooks
37
-
38
- In **Vercel Team Settings → Webhooks**, create a project-scoped [account webhook](https://vercel.com/docs/webhooks#account-webhooks). Account webhooks are available for Pro and Enterprise teams.
39
-
40
- ```text
41
- https://<junior-host>/api/webhooks/vercel
42
- ```
43
-
44
- The endpoint must be publicly reachable. Subscribe it to `deployment.succeeded`, `deployment.error`, and `deployment.canceled`, select the projects Junior should monitor, and save the one-time secret as a sensitive `VERCEL_WEBHOOK_SECRET` value in Junior's Production environment. Redeploy Junior after adding it.
45
-
46
- Deployment watches use Vercel's project ID. Junior resolves that ID from the project name or ID and optional team slug or ID through Vercel's authenticated project API.
47
-
48
- Supported scopes (`deployment` resource type):
49
-
50
- - `<project-id>` for every deployment in the project
51
- - `<project-id>:production` for every production deployment
52
- - `<project-id>:production:<sha>` for one commit-scoped deployment
53
-
54
- Each event has the name of the Vercel webhook that it comes from:
55
-
56
- - `deployment.succeeded`: the deployment is ready.
57
- - `deployment.error`: the deployment failed. This is the same as GitHub `deployment.failed`, not GitHub `deployment.error`.
58
- - `deployment.canceled`: the deployment was canceled.
59
-
60
- All three events end a commit-scoped watch. Project and target watches stay active.
61
-
62
- Each deployment event has trusted data: `deploymentId`, `target`, and `commitSha` when the deployment came from a Git commit. Watches and event automations can filter on `target` (`preview`, `production`, or `staging`) and `commitSha`.
63
-
64
- Create the conversation watch or event automation before the terminal deployment event. A valid webhook delivery does not create a watch by itself, and unmatched deliveries are not replayed later.
65
-
66
- ## Auth model
67
-
68
- - This package uses a deployment-level Vercel token, not per-user OAuth.
69
- - Junior keeps the real `JUNIOR_VERCEL_TOKEN` host-side.
70
- - Matching Vercel API requests from the CLI and plugin tools receive a host-managed `Authorization` header.
71
- - The sandbox receives only a non-secret placeholder `VERCEL_TOKEN` so the Vercel CLI can run normally before making API requests.
72
-
73
- ## Optional channel defaults
74
-
75
- If a Slack channel usually investigates the same Vercel project or team, store that as a conversation-scoped default:
76
-
77
- ```bash
78
- jr-rpc config set vercel.project junior-prod
79
- jr-rpc config set vercel.team sentry
80
- ```
81
-
82
- These defaults are optional fallbacks. If a user names a different project, team, deployment, or URL in a request, Junior should follow the explicit request instead.
83
-
84
- ## Deployment and alias tools
85
-
86
- `vercelPlugin()` registers:
87
-
88
- - `vercel_deploymentCreate`: deploy a branch, tag, or commit from an existing
89
- project's linked GitHub repository. Preview is the default; Production is an
90
- explicit target. An optional full commit SHA pins the source while preserving
91
- branch context for Vercel integrations.
92
- - `vercel_deploymentInspect`: inspect an ID or hostname and return deployment
93
- identity, state, environment, and source when available.
94
- - `vercel_aliasAssign`: assign a hostname to an exact deployment ID and read
95
- back the alias. `matches` is false if it no longer points at that deployment.
96
- - `vercel_aliasInspect`: return the alias's deployment ID or redirect.
97
- - `vercel_deploymentDelete`: delete an exact deployment ID when requested.
98
-
99
- Tools use the host-managed token and normal Guardian review. Vercel permissions
100
- still apply.
101
-
102
- Tools return selected fields, not full deployment records that may contain
103
- secrets. Creates start a build; inspect readiness before using the deployment.
104
- Check provider state before retrying a write whose response was lost.
105
-
106
- Use the Vercel CLI for logs, local source uploads, and other operations not
107
- covered by the tools.
108
-
109
- ## Limits
110
-
111
- Alias checks are not locks. Moving an alias does not stop older workers or
112
- identify which build handled a delayed event. Builds inherit project settings
113
- and credentials and may run migrations. The plugin does not isolate databases
114
- or other state. Preview deployments do not run Vercel Cron.
115
-
116
- Full setup guide: https://junior.sentry.dev/extend/vercel-plugin/
16
+ Setup and configuration: https://junior.sentry.dev/extend/vercel-plugin/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-vercel",
3
- "version": "0.268.0",
3
+ "version": "0.270.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.5.4",
30
- "@sentry/junior-plugin-api": "0.268.0"
30
+ "@sentry/junior-plugin-api": "0.270.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@oxlint/plugins": "1.79.0",