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.
Files changed (37) hide show
  1. package/CHANGELOG.md +12 -4
  2. package/README.md +50 -36
  3. package/lib/cjs/index.js +1706 -0
  4. package/lib/cjs/index.js.map +1 -0
  5. package/lib/esm/index.js +1699 -0
  6. package/lib/esm/index.js.map +1 -0
  7. package/lib/types/index.d.ts +47 -0
  8. package/lib/types/index.d.ts.map +1 -0
  9. package/package.json +76 -50
  10. package/sanity.json +3 -8
  11. package/lib/app.js +0 -168
  12. package/lib/client.js +0 -17
  13. package/lib/components/DeployButton/index.js +0 -101
  14. package/lib/components/Deployment/index.js +0 -107
  15. package/lib/components/DeploymentPlaceholder/index.js +0 -43
  16. package/lib/components/DeploymentTarget/index.js +0 -61
  17. package/lib/components/DeploymentTargets/index.js +0 -31
  18. package/lib/components/Deployments/index.js +0 -191
  19. package/lib/components/DialogForm/index.js +0 -364
  20. package/lib/components/FormFieldInputLabel/index.js +0 -65
  21. package/lib/components/FormFieldInputText/index.js +0 -43
  22. package/lib/components/PlaceholderAvatar/index.js +0 -28
  23. package/lib/components/PlaceholderText/index.js +0 -35
  24. package/lib/components/StateDebug/index.js +0 -52
  25. package/lib/components/StatusDot/index.js +0 -29
  26. package/lib/components/TableCell/index.js +0 -79
  27. package/lib/constants.js +0 -35
  28. package/lib/hooks/useDeployments.js +0 -96
  29. package/lib/index.js +0 -25
  30. package/lib/machines/deploy.js +0 -168
  31. package/lib/machines/deploymentTargetList.js +0 -144
  32. package/lib/machines/dialog.js +0 -55
  33. package/lib/machines/form.js +0 -113
  34. package/lib/machines/refresh.js +0 -38
  35. package/lib/types/index.js +0 -1
  36. package/lib/utils/fetcher.js +0 -96
  37. 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
- ## [1.1.3](https://github.com/robinpyon/sanity-plugin-dashboard-widget-vercel/compare/v1.1.2...v1.1.3) (2022-09-02)
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
- - removed incorrect icon attribute ([23af224](https://github.com/robinpyon/sanity-plugin-dashboard-widget-vercel/commit/23af224737b7405d6c936b04af8b441b47566317))
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
- ## [1.1.2](https://github.com/robinpyon/sanity-plugin-dashboard-widget-vercel/compare/v1.1.1...v1.1.2) (2022-09-02)
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
- - **deps and ci:** semver workflow ([#7](https://github.com/robinpyon/sanity-plugin-dashboard-widget-vercel/issues/7)) ([05fb9ef](https://github.com/robinpyon/sanity-plugin-dashboard-widget-vercel/commit/05fb9ef1c5bcd4ede17f8b5923a35287a88cfae1))
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
- In your Sanity project folder:
24
+ ```
25
+ npm install --save sanity-plugin-dashboard-widget-vercel@studio-v3
26
+ ```
27
+
28
+ or
19
29
 
20
- ```sh
21
- sanity install dashboard-widget-vercel
30
+ ```
31
+ yarn add sanity-plugin-dashboard-widget-vercel@studio-v3
22
32
  ```
23
33
 
24
- ### Configure your dashboard
34
+ Ensure that you have followed install and usage instructions for [@sanity/dashboard](https://github.com/sanity-io/dashboard).
25
35
 
26
- If you haven't configured a [dashboard](https://www.sanity.io/docs/dashboard) yet:
36
+ ## Usage
27
37
 
28
- ```sh
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
- In your studio's `sanity.json` append the following to `plugins` and `parts`:
40
+ ```js
41
+ import { dashboardTool } from "@sanity/dashboard";
42
+ import { vercelWidget } from "sanity-plugin-dashboard-widget-vercel";
33
43
 
34
- ```javascript
35
- "plugins": [
36
- // ...
37
- "dashboard-widget-vercel"
38
- ],
39
- "parts": [
44
+ export default createConfig({
40
45
  // ...
41
- {
42
- "implements": "part:@sanity/dashboard/config",
43
- "path": "dashboardConfig.js"
44
- }
45
- ]
46
+ plugins: [
47
+ dashboardTool({
48
+ widgets: [
49
+ vercelWidget(),
50
+ ],
51
+ }
52
+ ),
53
+ ]
54
+ })
46
55
  ```
47
56
 
48
- In `dashboardConfig.js`, ensure that `widgets` includes the following:
49
-
50
- ```javascript
51
- export default {
52
- widgets: [
53
- // ...
54
- {
55
- name: 'vercel',
56
- layout: {
57
- width: 'full', // full width is recommended!
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 deploment target.
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.