@liiift-studio/deploy-vercel-from-sanity 1.0.8 → 1.0.9

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Liiift Studio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![Sanity v3/v4/v5](https://img.shields.io/badge/sanity-v3%20%7C%20v4%20%7C%20v5-f03e2f)](https://www.sanity.io)
7
7
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)
8
8
 
9
- ![Deploy with Vercel — Production and Preview targets with live status](./docs/screenshot.png)
9
+ ![The Deploy tool inside Sanity Studio — Production and Preview targets each showing a live status badge, branch, commit SHA, deploy author, and a one-click Deploy button](https://raw.githubusercontent.com/Liiift-Studio/Deploy-Vercel-from-Sanity/main/docs/screenshot.png?v=1)
10
10
 
11
11
  ---
12
12
 
@@ -119,6 +119,28 @@ tools: (prev, { currentUser }) => {
119
119
 
120
120
  ## How it works
121
121
 
122
+ ```mermaid
123
+ flowchart LR
124
+ subgraph studio["Sanity Studio"]
125
+ tool["Deploy tool"]
126
+ end
127
+ subgraph dataset["Sanity dataset"]
128
+ targets["vercel_deploy docs<br/>(deploy targets)"]
129
+ cfg["config.vercelDeploy doc<br/>(API token)"]
130
+ end
131
+ subgraph vercel["Vercel"]
132
+ hook["Deploy hook<br/>POST /v1/integrations/deploy/…"]
133
+ api["REST API<br/>/v6/deployments · /v2/.../events"]
134
+ end
135
+
136
+ tool -- "reads targets + token" --> targets
137
+ tool -- "reads token" --> cfg
138
+ tool -- "1 - click Deploy" --> hook
139
+ hook -- "queues a build" --> api
140
+ api -- "poll every 5s while active" --> tool
141
+ tool -. "toast on Ready / Error / Canceled" .-> tool
142
+ ```
143
+
122
144
  1. Deploy targets are stored as `vercel_deploy` documents in your Sanity dataset.
123
145
  2. The plugin fetches the last 10 deployments for each target from the Vercel API, filtered to those triggered by that hook.
124
146
  3. While a deployment is active (Queued / Initializing / Building), it polls every 5 seconds.
@@ -164,7 +186,7 @@ If "No stderr or stdout was captured" appears, the build may have failed before
164
186
 
165
187
  ## Security
166
188
 
167
- **API token storage** — The Vercel API token is stored in a `config.vercelDeploy` Sanity document, readable by all authenticated studio users. Audit who has access to your Sanity project at sanity.io → Project → Members. If your studio includes untrusted editors, consider a server-side proxy that holds the token and exposes only a scoped deploy endpoint.
189
+ **API token storage** — The Vercel API token is stored in a `config.vercelDeploy` Sanity document, readable by all authenticated studio users. Note that a **Full Account** scoped token can read and write your entire Vercel account, so anyone with studio access can read a credential that grants broad Vercel access — treat the token accordingly. Audit who has access to your Sanity project at sanity.io → Project → Members. If your studio includes untrusted editors, consider a server-side proxy that holds the token and exposes only a scoped deploy endpoint.
168
190
 
169
191
  **Deploy hook URL validation** — `triggerDeploy` validates that the hook URL matches `api.vercel.com/v1/integrations/deploy/` before making the request, preventing SSRF from a tampered document.
170
192
 
@@ -180,12 +202,16 @@ If "No stderr or stdout was captured" appears, the build may have failed before
180
202
  - React 18 or 19
181
203
  - A Vercel account with at least one project and a deploy hook configured
182
204
 
205
+ Zero runtime dependencies — `react` and `sanity` are peer dependencies provided by your Studio; the plugin ships nothing else.
206
+
183
207
  ---
184
208
 
185
209
  ## Contributing
186
210
 
187
211
  Issues and pull requests welcome at [github.com/Liiift-Studio/Deploy-Vercel-from-Sanity](https://github.com/Liiift-Studio/Deploy-Vercel-from-Sanity).
188
212
 
213
+ Local development, `npm link`, and publishing steps are documented in [SETUP.md](./SETUP.md).
214
+
189
215
  ---
190
216
 
191
217
  ## License
package/dist/index.d.mts CHANGED
@@ -66,7 +66,7 @@ declare const vercelDeploySchema: {
66
66
  *
67
67
  * @example
68
68
  * // sanity.config.ts
69
- * import { vercelDeploy } from 'deploy-vercel-from-sanity'
69
+ * import { vercelDeploy } from '@liiift-studio/deploy-vercel-from-sanity'
70
70
  *
71
71
  * export default defineConfig({
72
72
  * plugins: [
package/dist/index.d.ts CHANGED
@@ -66,7 +66,7 @@ declare const vercelDeploySchema: {
66
66
  *
67
67
  * @example
68
68
  * // sanity.config.ts
69
- * import { vercelDeploy } from 'deploy-vercel-from-sanity'
69
+ * import { vercelDeploy } from '@liiift-studio/deploy-vercel-from-sanity'
70
70
  *
71
71
  * export default defineConfig({
72
72
  * plugins: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liiift-studio/deploy-vercel-from-sanity",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Sanity Studio plugin — trigger and monitor Vercel deployments with full status, history, and build logs. Supports v3, v4, and v5.",
5
5
  "license": "MIT",
6
6
  "author": "Liiift Studio",
package/src/index.ts CHANGED
@@ -13,7 +13,7 @@ export type { VercelDeployPluginConfig, DeployTarget, VercelDeployment, VercelDe
13
13
  *
14
14
  * @example
15
15
  * // sanity.config.ts
16
- * import { vercelDeploy } from 'deploy-vercel-from-sanity'
16
+ * import { vercelDeploy } from '@liiift-studio/deploy-vercel-from-sanity'
17
17
  *
18
18
  * export default defineConfig({
19
19
  * plugins: [