@sanity/cli-test 0.0.2-alpha.14 ā 0.0.2-alpha.16
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/fixtures/basic-app/package.json +2 -2
- package/fixtures/basic-studio/package.json +2 -2
- package/fixtures/multi-workspace-studio/package.json +2 -2
- package/fixtures/prebuilt-app/package.json +2 -2
- package/fixtures/prebuilt-studio/package.json +1 -1
- package/fixtures/worst-case-studio/.env +1 -0
- package/fixtures/worst-case-studio/fieldComponentsTest.tsx +80 -0
- package/fixtures/worst-case-studio/package.json +3 -2
- package/fixtures/worst-case-studio/sanity.config.tsx +5 -2
- package/package.json +9 -9
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"@sanity/sdk-react": "^2.6.0",
|
|
17
17
|
"react": "^19.2.3",
|
|
18
18
|
"react-dom": "^19.2.3",
|
|
19
|
-
"sanity": "^5.
|
|
19
|
+
"sanity": "^5.12.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/react": "^19.2.9",
|
|
23
|
-
"sanity": "^5.
|
|
23
|
+
"sanity": "^5.12.0",
|
|
24
24
|
"typescript": "^5.9.3"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"start": "sanity start"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@sanity/vision": "^5.
|
|
18
|
+
"@sanity/vision": "^5.12.0",
|
|
19
19
|
"react": "^19.2.3",
|
|
20
20
|
"react-dom": "^19.2.3",
|
|
21
|
-
"sanity": "^5.
|
|
21
|
+
"sanity": "^5.12.0",
|
|
22
22
|
"styled-components": "^6.3.8"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"start": "sanity start"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@sanity/vision": "^5.
|
|
18
|
+
"@sanity/vision": "^5.12.0",
|
|
19
19
|
"react": "^19.2.3",
|
|
20
20
|
"react-dom": "^19.2.3",
|
|
21
|
-
"sanity": "^5.
|
|
21
|
+
"sanity": "^5.12.0",
|
|
22
22
|
"styled-components": "^6.3.8"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"@sanity/sdk-react": "^2.6.0",
|
|
17
17
|
"react": "^19.2.3",
|
|
18
18
|
"react-dom": "^19.2.3",
|
|
19
|
-
"sanity": "^5.
|
|
19
|
+
"sanity": "^5.12.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/react": "^19.2.9",
|
|
23
|
-
"sanity": "^5.
|
|
23
|
+
"sanity": "^5.12.0",
|
|
24
24
|
"typescript": "^5.9.3"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
SANITY_STUDIO_PREFIXED_VAR=yes-this-is-prefixed
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {styled} from 'styled-components'
|
|
2
|
+
|
|
3
|
+
const CustomBox = styled.div`
|
|
4
|
+
animation: 3s linear 0s infinite normal none spin;
|
|
5
|
+
background: white;
|
|
6
|
+
border: 1px solid black;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
height: 40px;
|
|
9
|
+
width: 40px;
|
|
10
|
+
&:hover {
|
|
11
|
+
background: red;
|
|
12
|
+
}
|
|
13
|
+
@keyframes spin {
|
|
14
|
+
from {
|
|
15
|
+
transform: rotate(0);
|
|
16
|
+
}
|
|
17
|
+
to {
|
|
18
|
+
transform: rotate(180deg);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
fields: [
|
|
25
|
+
{
|
|
26
|
+
description: <span style={{textDecoration: 'line-through'}}>Title description</span>,
|
|
27
|
+
name: 'title',
|
|
28
|
+
title: <em style={{textDecoration: 'underline'}}>Title</em>,
|
|
29
|
+
type: 'string',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
description: (
|
|
33
|
+
<div>
|
|
34
|
+
<div>Image description š·</div>
|
|
35
|
+
<div style={{display: 'inline-block', padding: '2em'}}>
|
|
36
|
+
<a href="https://www.sanity.io" rel="noopener noreferrer" target="_blank">
|
|
37
|
+
<CustomBox />
|
|
38
|
+
</a>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
),
|
|
42
|
+
name: 'image',
|
|
43
|
+
title: <span>Image š¼ļø</span>,
|
|
44
|
+
type: 'image',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
description: (
|
|
48
|
+
<span>
|
|
49
|
+
Subtitle description <span style={{color: 'red'}}>x ā x - (JįµJ + Ī»Iāą¼ā)ā»Ā¹ Jįµr</span>
|
|
50
|
+
<script>window.alert('š»')</script>
|
|
51
|
+
</span>
|
|
52
|
+
),
|
|
53
|
+
name: 'subtitle',
|
|
54
|
+
title: (
|
|
55
|
+
<div>
|
|
56
|
+
<h1 style={{fontWeight: 'bold'}}>Subtitle (h1)</h1>
|
|
57
|
+
<h2>Subtitle (h2)</h2>
|
|
58
|
+
<h3>Subtitle (h3)</h3>
|
|
59
|
+
</div>
|
|
60
|
+
),
|
|
61
|
+
type: 'string',
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
name: 'fieldComponentsTest',
|
|
65
|
+
preview: {
|
|
66
|
+
prepare({media, title}: any) {
|
|
67
|
+
return {
|
|
68
|
+
media,
|
|
69
|
+
subtitle: 'example subtitle',
|
|
70
|
+
title: title,
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
select: {
|
|
74
|
+
media: 'image',
|
|
75
|
+
title: 'title',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
title: 'Fields with React components',
|
|
79
|
+
type: 'document',
|
|
80
|
+
}
|
|
@@ -16,10 +16,11 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@sanity/code-input": "^7.0.6",
|
|
19
|
-
"@sanity/vision": "^5.
|
|
19
|
+
"@sanity/vision": "^5.12.0",
|
|
20
20
|
"react": "^19.2.3",
|
|
21
21
|
"react-dom": "^19.2.3",
|
|
22
|
-
"sanity": "^5.
|
|
22
|
+
"sanity": "^5.12.0",
|
|
23
|
+
"sanity-plugin-media": "^4.1.1",
|
|
23
24
|
"styled-components": "^6.3.8",
|
|
24
25
|
"vite-tsconfig-paths": "^6.0.5"
|
|
25
26
|
},
|
|
@@ -3,11 +3,14 @@ import {visionTool} from '@sanity/vision'
|
|
|
3
3
|
// eslint-disable-next-line import/no-unresolved
|
|
4
4
|
import {theme} from 'https://themer.sanity.build/api/hues?preset=dew'
|
|
5
5
|
import {defineConfig, defineField, defineType} from 'sanity'
|
|
6
|
+
import {media} from 'sanity-plugin-media'
|
|
6
7
|
import {structureTool} from 'sanity/structure'
|
|
7
8
|
|
|
8
9
|
import DescriptionInput from '@/descriptionInput'
|
|
9
10
|
import {schemaTypes} from '@/schemaTypes'
|
|
10
11
|
|
|
12
|
+
import fieldComponentsTest from './fieldComponentsTest.jsx'
|
|
13
|
+
|
|
11
14
|
// Look ma, dynamic imports in the config š
|
|
12
15
|
// Look ma, top level await in the config š
|
|
13
16
|
const arbitraryImport = await import('@/defines')
|
|
@@ -22,12 +25,12 @@ export default defineConfig({
|
|
|
22
25
|
// @ts-expect-error - defined through vite's `define` option in CLI config
|
|
23
26
|
projectId: PROJECT_ID,
|
|
24
27
|
|
|
25
|
-
plugins: [structureTool(), visionTool(), codeInput()],
|
|
28
|
+
plugins: [structureTool(), visionTool(), codeInput(), media()],
|
|
26
29
|
|
|
27
30
|
schema: {
|
|
28
31
|
types: [
|
|
29
32
|
...schemaTypes,
|
|
30
|
-
|
|
33
|
+
fieldComponentsTest,
|
|
31
34
|
defineType({
|
|
32
35
|
fields: [
|
|
33
36
|
defineField({name: 'title', type: 'string'}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/cli-test",
|
|
3
|
-
"version": "0.0.2-alpha.
|
|
3
|
+
"version": "0.0.2-alpha.16",
|
|
4
4
|
"description": "Sanity CLI test helpers and utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"./fixtures"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@swc/core": "^1.15.
|
|
43
|
+
"@swc/core": "^1.15.13",
|
|
44
44
|
"ansis": "^4.2.0",
|
|
45
45
|
"esbuild": "^0.27.2",
|
|
46
46
|
"nock": "^14.0.11",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@eslint/compat": "^2.0.2",
|
|
52
|
-
"@oclif/core": "^4.8.
|
|
53
|
-
"@sanity/client": "^7.
|
|
52
|
+
"@oclif/core": "^4.8.1",
|
|
53
|
+
"@sanity/client": "^7.16.0",
|
|
54
54
|
"@sanity/pkg-utils": "^10.4.4",
|
|
55
55
|
"@swc/cli": "^0.8.0",
|
|
56
|
-
"@types/node": "^20.19.
|
|
57
|
-
"eslint": "^9.39.
|
|
56
|
+
"@types/node": "^20.19.35",
|
|
57
|
+
"eslint": "^9.39.3",
|
|
58
58
|
"publint": "^0.3.17",
|
|
59
59
|
"rimraf": "^6.0.1",
|
|
60
60
|
"tsx": "^4.21.0",
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
"yaml": "^2.8.2",
|
|
64
64
|
"@repo/package.config": "0.0.1",
|
|
65
65
|
"@repo/tsconfig": "3.70.0",
|
|
66
|
-
"@sanity/cli-core": "0.1.0-alpha.
|
|
67
|
-
"@sanity/eslint-config-cli": "0.0.0-alpha.
|
|
66
|
+
"@sanity/cli-core": "0.1.0-alpha.17",
|
|
67
|
+
"@sanity/eslint-config-cli": "0.0.0-alpha.3"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@oclif/core": "^4.0.0",
|
|
71
71
|
"@sanity/client": "^7.0.0",
|
|
72
72
|
"vitest": ">=3.0.0 <5.0.0",
|
|
73
|
-
"@sanity/cli-core": "0.1.0-alpha.
|
|
73
|
+
"@sanity/cli-core": "0.1.0-alpha.17"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|
|
76
76
|
"node": ">=20.19.1 <22 || >=22.12"
|