sanity-plugin-dashboard-widget-vercel 1.1.3 → 2.0.0-v3-studio.2
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/CHANGELOG.md +12 -4
- package/README.md +50 -36
- package/lib/cjs/index.js +1706 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/esm/index.js +1699 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/types/index.d.ts +47 -0
- package/lib/types/index.d.ts.map +1 -0
- package/package.json +76 -50
- package/sanity.json +3 -8
- package/lib/app.js +0 -168
- package/lib/client.js +0 -17
- package/lib/components/DeployButton/index.js +0 -101
- package/lib/components/Deployment/index.js +0 -107
- package/lib/components/DeploymentPlaceholder/index.js +0 -43
- package/lib/components/DeploymentTarget/index.js +0 -61
- package/lib/components/DeploymentTargets/index.js +0 -31
- package/lib/components/Deployments/index.js +0 -191
- package/lib/components/DialogForm/index.js +0 -364
- package/lib/components/FormFieldInputLabel/index.js +0 -65
- package/lib/components/FormFieldInputText/index.js +0 -43
- package/lib/components/PlaceholderAvatar/index.js +0 -28
- package/lib/components/PlaceholderText/index.js +0 -35
- package/lib/components/StateDebug/index.js +0 -52
- package/lib/components/StatusDot/index.js +0 -29
- package/lib/components/TableCell/index.js +0 -79
- package/lib/constants.js +0 -35
- package/lib/hooks/useDeployments.js +0 -96
- package/lib/index.js +0 -25
- package/lib/machines/deploy.js +0 -168
- package/lib/machines/deploymentTargetList.js +0 -144
- package/lib/machines/dialog.js +0 -55
- package/lib/machines/form.js +0 -113
- package/lib/machines/refresh.js +0 -38
- package/lib/types/index.js +0 -1
- package/lib/utils/fetcher.js +0 -96
- package/lib/utils/sanitizeFormData.js +0 -35
package/CHANGELOG.md
CHANGED
|
@@ -5,17 +5,25 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file. See
|
|
6
6
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
-
## [
|
|
8
|
+
## [2.0.0-v3-studio.2](https://github.com/sanity-io/sanity-plugin-dashboard-widget-vercel/compare/v2.0.0-v3-studio.1...v2.0.0-v3-studio.2) (2022-09-15)
|
|
9
9
|
|
|
10
10
|
### Bug Fixes
|
|
11
11
|
|
|
12
|
-
-
|
|
12
|
+
- **deps:** sanity 3.0.0-dev-preview.17 ([8d66211](https://github.com/sanity-io/sanity-plugin-dashboard-widget-vercel/commit/8d66211eb8d5b39151f88358a80dc85be1265089))
|
|
13
13
|
|
|
14
|
-
## [
|
|
14
|
+
## [2.0.0-v3-studio.1](https://github.com/sanity-io/sanity-plugin-dashboard-widget-vercel/compare/v1.1.1...v2.0.0-v3-studio.1) (2022-09-02)
|
|
15
|
+
|
|
16
|
+
### ⚠ BREAKING CHANGES
|
|
17
|
+
|
|
18
|
+
- v3 version
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
- initial V3 version ([d73b762](https://github.com/sanity-io/sanity-plugin-dashboard-widget-vercel/commit/d73b762ed8b07a696b6c422cfc977d01c28e323b))
|
|
15
23
|
|
|
16
24
|
### Bug Fixes
|
|
17
25
|
|
|
18
|
-
-
|
|
26
|
+
- v3 version ([ed8b793](https://github.com/sanity-io/sanity-plugin-dashboard-widget-vercel/commit/ed8b79337dab47316efe8620f5f109edd8381d65))
|
|
19
27
|
|
|
20
28
|
# Changelog
|
|
21
29
|
|
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
> **NOTE**
|
|
2
|
+
>
|
|
3
|
+
> This is the **Sanity Studio v3 version** of sanity-plugin-dashboard-widget-vercel.
|
|
4
|
+
>
|
|
5
|
+
> For the v2 version, please refer to the [v2 version](https://github.com/sanity-io/sanity-plugin-dashboard-widget-vercel/tree/main).
|
|
6
|
+
|
|
1
7
|
# Vercel Dashboard Widget (for Sanity)
|
|
2
8
|
|
|
3
9
|
View your recent [Vercel](https://vercel.com/) deployments and manually trigger builds directly from your [Sanity](https://www.sanity.io/) dashboard.
|
|
@@ -15,55 +21,55 @@ View your recent [Vercel](https://vercel.com/) deployments and manually trigger
|
|
|
15
21
|
|
|
16
22
|
## Install
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
```
|
|
25
|
+
npm install --save sanity-plugin-dashboard-widget-vercel@studio-v3
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
or
|
|
19
29
|
|
|
20
|
-
```
|
|
21
|
-
|
|
30
|
+
```
|
|
31
|
+
yarn add sanity-plugin-dashboard-widget-vercel@studio-v3
|
|
22
32
|
```
|
|
23
33
|
|
|
24
|
-
|
|
34
|
+
Ensure that you have followed install and usage instructions for [@sanity/dashboard](https://github.com/sanity-io/dashboard).
|
|
25
35
|
|
|
26
|
-
|
|
36
|
+
## Usage
|
|
27
37
|
|
|
28
|
-
|
|
29
|
-
sanity install @sanity/dashboard
|
|
30
|
-
```
|
|
38
|
+
Add it as a widget to @sanity/dashboard plugin in sanity.config.ts (or .js):
|
|
31
39
|
|
|
32
|
-
|
|
40
|
+
```js
|
|
41
|
+
import { dashboardTool } from "@sanity/dashboard";
|
|
42
|
+
import { vercelWidget } from "sanity-plugin-dashboard-widget-vercel";
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
"plugins": [
|
|
36
|
-
// ...
|
|
37
|
-
"dashboard-widget-vercel"
|
|
38
|
-
],
|
|
39
|
-
"parts": [
|
|
44
|
+
export default createConfig({
|
|
40
45
|
// ...
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
]
|
|
46
|
+
plugins: [
|
|
47
|
+
dashboardTool({
|
|
48
|
+
widgets: [
|
|
49
|
+
vercelWidget(),
|
|
50
|
+
],
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
]
|
|
54
|
+
})
|
|
46
55
|
```
|
|
47
56
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
}
|
|
57
|
+
### Configure
|
|
58
|
+
|
|
59
|
+
The widget size can be controlled using layout.width:
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
dashboardTool({
|
|
63
|
+
widgets: [
|
|
64
|
+
vercelWidget({ layout: { width: "full" /* default and reccomended */ } }),
|
|
65
|
+
],
|
|
66
|
+
}
|
|
67
|
+
)
|
|
62
68
|
```
|
|
63
69
|
|
|
64
70
|
### Add a deployment target
|
|
65
71
|
|
|
66
|
-
Simply visit your Sanity dashboard and click the '+' icon in the top right to add a new
|
|
72
|
+
Simply visit your Sanity dashboard and click the '+' icon in the top right to add a new deployment target.
|
|
67
73
|
|
|
68
74
|
You'll need to fill in the following:
|
|
69
75
|
|
|
@@ -79,7 +85,8 @@ This can be created in Vercel under **Account > Settings > Tokens**.
|
|
|
79
85
|
|
|
80
86
|
#### Vercel Project ID (required)
|
|
81
87
|
|
|
82
|
-
This can be retrieved via [Vercel's API](https://vercel.com/docs/api#endpoints/projects/get-projects)
|
|
88
|
+
This can be retrieved via [Vercel's API](https://vercel.com/docs/api#endpoints/projects/get-projects),
|
|
89
|
+
or via the web UI on _<project-page> -> Settings -> General -> Scroll down to Project ID_.
|
|
83
90
|
|
|
84
91
|
#### Vercel Team ID
|
|
85
92
|
|
|
@@ -127,3 +134,10 @@ Please also keep the following in mind when manually deploying:
|
|
|
127
134
|
## Contributing
|
|
128
135
|
|
|
129
136
|
Contributions, issues and feature requests are welcome!
|
|
137
|
+
|
|
138
|
+
## Release new version
|
|
139
|
+
|
|
140
|
+
Run ["CI & Release" workflow](https://github.com/sanity-io/sanity-plugin-dashboard-widget-vercel/actions/workflows/main.yml).
|
|
141
|
+
Make sure to select the main (or v3, depending) branch and check "Release new version".
|
|
142
|
+
|
|
143
|
+
Semantic release will only release on configured branches, so it is safe to run release on any branch.
|