@liiift-studio/deploy-vercel-from-sanity 1.0.7 → 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 +21 -0
- package/README.md +28 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -2
- package/dist/index.mjs +1 -2
- package/package.json +1 -1
- package/src/components/DeployItem.tsx +0 -1
- package/src/index.ts +1 -1
- package/src/version.ts +1 -1
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
|
[](https://www.sanity.io)
|
|
7
7
|
[](./LICENSE)
|
|
8
8
|
|
|
9
|
-

|
|
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/dist/index.js
CHANGED
|
@@ -696,7 +696,6 @@ function DeployItem({ target, token, onDelete, onEdit }) {
|
|
|
696
696
|
{
|
|
697
697
|
text: "Deploy",
|
|
698
698
|
tone: "primary",
|
|
699
|
-
loading: triggering,
|
|
700
699
|
disabled: isActive,
|
|
701
700
|
onClick: deploy,
|
|
702
701
|
style: {
|
|
@@ -937,7 +936,7 @@ function DeployTargetForm({ initial, onSaved, onClose }) {
|
|
|
937
936
|
}
|
|
938
937
|
|
|
939
938
|
// src/version.ts
|
|
940
|
-
var VERSION = "1.0.
|
|
939
|
+
var VERSION = "1.0.8";
|
|
941
940
|
|
|
942
941
|
// src/components/DeployTool.tsx
|
|
943
942
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
package/dist/index.mjs
CHANGED
|
@@ -718,7 +718,6 @@ function DeployItem({ target, token, onDelete, onEdit }) {
|
|
|
718
718
|
{
|
|
719
719
|
text: "Deploy",
|
|
720
720
|
tone: "primary",
|
|
721
|
-
loading: triggering,
|
|
722
721
|
disabled: isActive,
|
|
723
722
|
onClick: deploy,
|
|
724
723
|
style: {
|
|
@@ -970,7 +969,7 @@ function DeployTargetForm({ initial, onSaved, onClose }) {
|
|
|
970
969
|
}
|
|
971
970
|
|
|
972
971
|
// src/version.ts
|
|
973
|
-
var VERSION = "1.0.
|
|
972
|
+
var VERSION = "1.0.8";
|
|
974
973
|
|
|
975
974
|
// src/components/DeployTool.tsx
|
|
976
975
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liiift-studio/deploy-vercel-from-sanity",
|
|
3
|
-
"version": "1.0.
|
|
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: [
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Package version — keep in sync with package.json
|
|
2
|
-
export const VERSION = '1.0.
|
|
2
|
+
export const VERSION = '1.0.8'
|