@liiift-studio/deploy-vercel-from-sanity 1.0.10 → 1.1.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/README.md +15 -3
- package/dist/index.d.mts +38 -5
- package/dist/index.d.ts +38 -5
- package/dist/index.js +568 -393
- package/dist/index.mjs +565 -415
- package/package.json +8 -5
- package/src/components/DeployHistory.tsx +3 -2
- package/src/components/DeployItem.tsx +21 -65
- package/src/components/DeployTargetForm.tsx +6 -5
- package/src/components/DeployTool.tsx +6 -2
- package/src/components/TokenSetup.tsx +5 -2
- package/src/icons.tsx +71 -0
- package/src/index.ts +1 -1
- package/src/schema/vercelDeploy.ts +1 -1
- package/src/ui.tsx +337 -0
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Trigger and monitor Vercel deployments directly from [Sanity Studio](https://www.sanity.io) — no context switching required.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@liiift-studio/deploy-vercel-from-sanity)
|
|
6
|
-
[](https://www.sanity.io)
|
|
7
7
|
[](./LICENSE)
|
|
8
8
|
|
|
9
9
|

|
|
@@ -198,11 +198,23 @@ If "No stderr or stdout was captured" appears, the build may have failed before
|
|
|
198
198
|
|
|
199
199
|
## Requirements
|
|
200
200
|
|
|
201
|
-
- Sanity Studio v3, v4, or
|
|
201
|
+
- Sanity Studio v3, v4, v5, or v6
|
|
202
202
|
- React 18 or 19
|
|
203
203
|
- A Vercel account with at least one project and a deploy hook configured
|
|
204
204
|
|
|
205
|
-
Zero runtime dependencies — `react` and
|
|
205
|
+
Zero runtime dependencies — `react`, `sanity`, `@sanity/ui` and `@sanity/icons` are peer dependencies provided by your Studio; the plugin ships nothing else.
|
|
206
|
+
|
|
207
|
+
### Studio compatibility
|
|
208
|
+
|
|
209
|
+
A single build supports the whole range. `@sanity/icons` v5 and `@sanity/ui` v4
|
|
210
|
+
both moved components out of their barrel files, so the plugin resolves them at
|
|
211
|
+
runtime rather than importing names that only exist on one major:
|
|
212
|
+
|
|
213
|
+
| Studio | `@sanity/icons` | `@sanity/ui` | Notes |
|
|
214
|
+
| --- | --- | --- | --- |
|
|
215
|
+
| v3 – v6.3 | 3.x | 2.x / 3.x | Fully Studio-native |
|
|
216
|
+
| v6.4 – v6.9 | 5.x | 3.x | Icons resolved via `<Icon symbol>` |
|
|
217
|
+
| v6.10+ | 5.x | 4.x | Tooltips, overflow menu, log blocks and toasts use built-in fallbacks, since `@sanity/ui` v4 serves those from subpaths that do not exist on earlier majors |
|
|
206
218
|
|
|
207
219
|
---
|
|
208
220
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as sanity from 'sanity';
|
|
2
|
+
import { ComponentType, SVGProps } from 'react';
|
|
2
3
|
|
|
3
4
|
type VercelDeployState = 'QUEUED' | 'INITIALIZING' | 'BUILDING' | 'READY' | 'ERROR' | 'CANCELED' | 'LOADING';
|
|
4
5
|
/** A vercel_deploy document stored in the Sanity dataset */
|
|
@@ -51,14 +52,46 @@ interface VercelDeployPluginConfig {
|
|
|
51
52
|
icon?: React.ComponentType;
|
|
52
53
|
}
|
|
53
54
|
|
|
55
|
+
/** Props every Sanity icon accepts — it renders a plain sized SVG. */
|
|
56
|
+
type IconProps = SVGProps<SVGSVGElement>;
|
|
57
|
+
/** An icon component, whichever shape the installed @sanity/icons exposes it in. */
|
|
58
|
+
type IconComponent = ComponentType<IconProps>;
|
|
59
|
+
|
|
54
60
|
declare const vercelDeploySchema: {
|
|
55
|
-
type: "document";
|
|
56
61
|
name: "vercel_deploy";
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
title: string;
|
|
63
|
+
type: "document";
|
|
64
|
+
icon: IconComponent;
|
|
65
|
+
fields: (({
|
|
66
|
+
name: "name";
|
|
67
|
+
title: string;
|
|
68
|
+
type: "string";
|
|
69
|
+
description: string;
|
|
70
|
+
validation: (Rule: sanity.StringRule) => sanity.StringRule;
|
|
71
|
+
} & sanity.WidenValidation) | ({
|
|
72
|
+
name: "url";
|
|
59
73
|
title: string;
|
|
60
|
-
|
|
61
|
-
|
|
74
|
+
type: "url";
|
|
75
|
+
description: string;
|
|
76
|
+
validation: (Rule: sanity.UrlRule) => sanity.UrlRule;
|
|
77
|
+
} & sanity.WidenValidation) | {
|
|
78
|
+
name: "teamId";
|
|
79
|
+
title: string;
|
|
80
|
+
type: "string";
|
|
81
|
+
description: string;
|
|
82
|
+
} | ({
|
|
83
|
+
name: "disableDeleteAction";
|
|
84
|
+
title: string;
|
|
85
|
+
type: "boolean";
|
|
86
|
+
description: string;
|
|
87
|
+
initialValue: false;
|
|
88
|
+
} & sanity.WidenInitialValue))[];
|
|
89
|
+
preview: {
|
|
90
|
+
select: {
|
|
91
|
+
title: string;
|
|
92
|
+
subtitle: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
62
95
|
};
|
|
63
96
|
|
|
64
97
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as sanity from 'sanity';
|
|
2
|
+
import { ComponentType, SVGProps } from 'react';
|
|
2
3
|
|
|
3
4
|
type VercelDeployState = 'QUEUED' | 'INITIALIZING' | 'BUILDING' | 'READY' | 'ERROR' | 'CANCELED' | 'LOADING';
|
|
4
5
|
/** A vercel_deploy document stored in the Sanity dataset */
|
|
@@ -51,14 +52,46 @@ interface VercelDeployPluginConfig {
|
|
|
51
52
|
icon?: React.ComponentType;
|
|
52
53
|
}
|
|
53
54
|
|
|
55
|
+
/** Props every Sanity icon accepts — it renders a plain sized SVG. */
|
|
56
|
+
type IconProps = SVGProps<SVGSVGElement>;
|
|
57
|
+
/** An icon component, whichever shape the installed @sanity/icons exposes it in. */
|
|
58
|
+
type IconComponent = ComponentType<IconProps>;
|
|
59
|
+
|
|
54
60
|
declare const vercelDeploySchema: {
|
|
55
|
-
type: "document";
|
|
56
61
|
name: "vercel_deploy";
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
title: string;
|
|
63
|
+
type: "document";
|
|
64
|
+
icon: IconComponent;
|
|
65
|
+
fields: (({
|
|
66
|
+
name: "name";
|
|
67
|
+
title: string;
|
|
68
|
+
type: "string";
|
|
69
|
+
description: string;
|
|
70
|
+
validation: (Rule: sanity.StringRule) => sanity.StringRule;
|
|
71
|
+
} & sanity.WidenValidation) | ({
|
|
72
|
+
name: "url";
|
|
59
73
|
title: string;
|
|
60
|
-
|
|
61
|
-
|
|
74
|
+
type: "url";
|
|
75
|
+
description: string;
|
|
76
|
+
validation: (Rule: sanity.UrlRule) => sanity.UrlRule;
|
|
77
|
+
} & sanity.WidenValidation) | {
|
|
78
|
+
name: "teamId";
|
|
79
|
+
title: string;
|
|
80
|
+
type: "string";
|
|
81
|
+
description: string;
|
|
82
|
+
} | ({
|
|
83
|
+
name: "disableDeleteAction";
|
|
84
|
+
title: string;
|
|
85
|
+
type: "boolean";
|
|
86
|
+
description: string;
|
|
87
|
+
initialValue: false;
|
|
88
|
+
} & sanity.WidenInitialValue))[];
|
|
89
|
+
preview: {
|
|
90
|
+
select: {
|
|
91
|
+
title: string;
|
|
92
|
+
subtitle: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
62
95
|
};
|
|
63
96
|
|
|
64
97
|
/**
|