@sanity/debug-preview-url-secret-plugin 2.0.11 → 2.0.13
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/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -6
- package/CHANGELOG.md +0 -97
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";cAyDa,YAAA,EAAc,MAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CheckmarkCircleIcon } from "@sanity/icons/CheckmarkCircle";
|
|
2
|
+
import { CloseCircleIcon } from "@sanity/icons/CloseCircle";
|
|
3
|
+
import { LockIcon } from "@sanity/icons/Lock";
|
|
2
4
|
import { schemaType, SECRET_TTL } from "@sanity/preview-url-secret/constants";
|
|
3
5
|
import { defineType, definePlugin } from "sanity";
|
|
4
6
|
const schema = defineType({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import {CheckmarkCircleIcon
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import {CheckmarkCircleIcon} from '@sanity/icons/CheckmarkCircle'\nimport {CloseCircleIcon} from '@sanity/icons/CloseCircle'\nimport {LockIcon} from '@sanity/icons/Lock'\nimport {schemaType, SECRET_TTL} from '@sanity/preview-url-secret/constants'\nimport {definePlugin, defineType, type Plugin} from 'sanity'\n\nconst schema = defineType({\n type: 'document',\n icon: LockIcon,\n name: schemaType,\n title: '@sanity/preview-url-secret',\n readOnly: true,\n fields: [\n {\n type: 'string',\n name: 'secret',\n title: 'Secret',\n },\n {\n type: 'string',\n name: 'source',\n title: 'Source Tool',\n },\n {\n type: 'string',\n name: 'studioUrl',\n title: 'Studio URL',\n },\n {\n type: 'string',\n name: 'userId',\n title: 'Sanity User ID',\n },\n ],\n preview: {\n select: {\n source: 'source',\n studioUrl: 'studioUrl',\n updatedAt: '_updatedAt',\n },\n prepare(data) {\n const url = data.studioUrl ? new URL(data.studioUrl, location.origin) : undefined\n const updatedAt = new Date(data.updatedAt).getTime()\n const expiresAt = new Date(updatedAt + 1000 * SECRET_TTL)\n const expired = expiresAt < new Date()\n const icon = expired ? CloseCircleIcon : CheckmarkCircleIcon\n return {\n title: url ? `${url.host}${url.pathname}` : data.source,\n subtitle: expired\n ? 'Expired'\n : `Expires in ${Math.round((expiresAt.getTime() - Date.now()) / (1000 * 60))} minutes`,\n media: icon,\n }\n },\n },\n})\n\nexport const debugSecrets: Plugin = definePlugin(() => {\n return {\n name: 'sanity-plugin-debug-secrets',\n schema: {types: [schema]},\n document: {\n actions: (prev, context) => {\n if (context.schemaType !== schemaType) {\n return prev\n }\n return prev.filter(({action}) => action === 'delete')\n },\n inspectors: (prev, context) => {\n if (context.documentType !== schemaType) {\n return prev\n }\n return []\n },\n unstable_fieldActions: (prev, context) => {\n if (context.schemaType.name !== schemaType) {\n return prev\n }\n return []\n },\n },\n }\n})\n"],"names":[],"mappings":";;;;;AAMA,MAAM,SAAS,WAAW;AAAA,EACxB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,IACN;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,IAET;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,IAET;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,IAET;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OA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18,7 +18,6 @@
|
|
|
18
18
|
"directory": "plugins/@sanity/debug-preview-url-secret-plugin"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
|
-
"CHANGELOG.md",
|
|
22
21
|
"dist"
|
|
23
22
|
],
|
|
24
23
|
"type": "module",
|
|
@@ -28,14 +27,14 @@
|
|
|
28
27
|
"./package.json": "./package.json"
|
|
29
28
|
},
|
|
30
29
|
"dependencies": {
|
|
31
|
-
"@sanity/icons": "^
|
|
30
|
+
"@sanity/icons": "^4.1.0",
|
|
32
31
|
"@sanity/preview-url-secret": "^4.0.7"
|
|
33
32
|
},
|
|
34
33
|
"devDependencies": {
|
|
35
|
-
"@sanity/pkg-utils": "^10.
|
|
34
|
+
"@sanity/pkg-utils": "^10.8.2",
|
|
36
35
|
"@types/node": "^24.13.2",
|
|
37
|
-
"sanity": "^6.
|
|
38
|
-
"styled-components": "^6.4.
|
|
36
|
+
"sanity": "^6.3.0",
|
|
37
|
+
"styled-components": "^6.4.3",
|
|
39
38
|
"@repo/package.config": "0.0.0",
|
|
40
39
|
"@repo/tsconfig": "0.0.0"
|
|
41
40
|
},
|
package/CHANGELOG.md
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
# @sanity/debug-preview-url-secret-plugin
|
|
2
|
-
|
|
3
|
-
## 2.0.11
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- [#994](https://github.com/sanity-io/plugins/pull/994) [`3694754`](https://github.com/sanity-io/plugins/commit/3694754a3abc1b435356a87e03c322efd3125266) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): Update dependency @sanity/preview-url-secret to ^4.0.7
|
|
8
|
-
|
|
9
|
-
## 2.0.10
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- [#980](https://github.com/sanity-io/plugins/pull/980) [`98d148e`](https://github.com/sanity-io/plugins/commit/98d148e00ef679b422e1effe7fc53dfce9cb046c) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Update `@sanity/pkg-utils` to pick up a DTS generation bug fix.
|
|
14
|
-
|
|
15
|
-
## 2.0.9
|
|
16
|
-
|
|
17
|
-
### Patch Changes
|
|
18
|
-
|
|
19
|
-
- [#903](https://github.com/sanity-io/plugins/pull/903) [`2f03c8d`](https://github.com/sanity-io/plugins/commit/2f03c8d98039c29b9d4fd9bc6cd7c09c909c8cc4) Thanks [@bjoerge](https://github.com/bjoerge)! - Widen `sanity` peer-dependency range to `^5 || ^6.0.0-0` to support Sanity Studio v6 (including v6 pre-releases).
|
|
20
|
-
|
|
21
|
-
## 2.0.8
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- [`377a170`](https://github.com/sanity-io/plugins/commit/377a1703a3cfd9d370e647b1a1030e98881f03af) Thanks [@stipsan](https://github.com/stipsan)! - Upgrade `@sanity/preview-url-secret` to ^4.0.4
|
|
26
|
-
|
|
27
|
-
## 2.0.7
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
- [#677](https://github.com/sanity-io/plugins/pull/677) [`1f8fe29`](https://github.com/sanity-io/plugins/commit/1f8fe2964767506dc85a1e44baf7eedbe6023ab2) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Remove redundant devDependencies: `@types/react` and `react` are already provided via peerDependencies.
|
|
32
|
-
|
|
33
|
-
## 2.0.6
|
|
34
|
-
|
|
35
|
-
### Patch Changes
|
|
36
|
-
|
|
37
|
-
- [#532](https://github.com/sanity-io/plugins/pull/532) [`7529052`](https://github.com/sanity-io/plugins/commit/752905298f2fb3d2b42898bbefa57bd2058c084e) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): Update dependency @sanity/preview-url-secret to ^4.0.3
|
|
38
|
-
|
|
39
|
-
## 2.0.5
|
|
40
|
-
|
|
41
|
-
### Patch Changes
|
|
42
|
-
|
|
43
|
-
- [`6397826`](https://github.com/sanity-io/plugins/commit/63978265fe5b46ea88b524a945d16fbf39d7c199) Thanks [@stipsan](https://github.com/stipsan)! - Improve build output and dts gen
|
|
44
|
-
|
|
45
|
-
## 2.0.4
|
|
46
|
-
|
|
47
|
-
### Patch Changes
|
|
48
|
-
|
|
49
|
-
- [`d3978bc`](https://github.com/sanity-io/plugins/commit/d3978bc676286c86396d29e02b744474b3340bee) Thanks [@stipsan](https://github.com/stipsan)! - Update LICENSE year
|
|
50
|
-
|
|
51
|
-
## 2.0.3
|
|
52
|
-
|
|
53
|
-
### Patch Changes
|
|
54
|
-
|
|
55
|
-
- [#351](https://github.com/sanity-io/plugins/pull/351) [`e251678`](https://github.com/sanity-io/plugins/commit/e251678e062788842ba2c55f805874bd5ca91e5f) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): Update dependency @sanity/preview-url-secret to v4.0.2
|
|
56
|
-
|
|
57
|
-
## 2.0.2
|
|
58
|
-
|
|
59
|
-
### Patch Changes
|
|
60
|
-
|
|
61
|
-
- [`61bd460`](https://github.com/sanity-io/plugins/commit/61bd46026d73147b9f8a51a82fba186927327c4e) Thanks [@stipsan](https://github.com/stipsan)! - Improve dts output
|
|
62
|
-
|
|
63
|
-
## 2.0.1
|
|
64
|
-
|
|
65
|
-
### Patch Changes
|
|
66
|
-
|
|
67
|
-
- [#291](https://github.com/sanity-io/plugins/pull/291) [`0976b5b`](https://github.com/sanity-io/plugins/commit/0976b5b8bfe72a6e19068edfd52f2b9d081ab9ea) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): Update dependency @sanity/preview-url-secret to v4
|
|
68
|
-
|
|
69
|
-
## 2.0.0
|
|
70
|
-
|
|
71
|
-
### Major Changes
|
|
72
|
-
|
|
73
|
-
- [`20c43ac`](https://github.com/sanity-io/plugins/commit/20c43ac07e632ce5d75fd8bd9a47938e377b476b) Thanks [@stipsan](https://github.com/stipsan)! - Require Sanity Studio V5
|
|
74
|
-
|
|
75
|
-
## 1.0.3
|
|
76
|
-
|
|
77
|
-
### Patch Changes
|
|
78
|
-
|
|
79
|
-
- [`7074855`](https://github.com/sanity-io/plugins/commit/7074855ecf139da7d7952963a12589a8f464bd0f) Thanks [@stipsan](https://github.com/stipsan)! - Fix linter issues
|
|
80
|
-
|
|
81
|
-
## 1.0.2
|
|
82
|
-
|
|
83
|
-
### Patch Changes
|
|
84
|
-
|
|
85
|
-
- [`69a8d2f`](https://github.com/sanity-io/plugins/commit/69a8d2f8ce1e8f5b342e7066dbc79a20b6687abe) Thanks [@stipsan](https://github.com/stipsan)! - Declare support for Studio v5
|
|
86
|
-
|
|
87
|
-
## 1.0.1
|
|
88
|
-
|
|
89
|
-
### Patch Changes
|
|
90
|
-
|
|
91
|
-
- [#130](https://github.com/sanity-io/plugins/pull/130) [`4399a30`](https://github.com/sanity-io/plugins/commit/4399a3093607d330942791e2f23981906cb8b56d) Thanks [@stipsan](https://github.com/stipsan)! - Improve quality of generated dts
|
|
92
|
-
|
|
93
|
-
## 1.0.0
|
|
94
|
-
|
|
95
|
-
### Major Changes
|
|
96
|
-
|
|
97
|
-
- [#37](https://github.com/sanity-io/plugins/pull/37) [`004bf6a`](https://github.com/sanity-io/plugins/commit/004bf6a7edf74cd45fd1dc499ff9f48b64c19712) Thanks [@stipsan](https://github.com/stipsan)! - Initial release of `@sanity/debug-preview-url-secret-plugin`, which replaces `@sanity/preview-url-secret/sanity-plugin-debug-secrets`.
|