@sanity/cli 6.2.0 → 6.3.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 +299 -303
- package/dist/SanityHelp.js +38 -0
- package/dist/SanityHelp.js.map +1 -1
- package/dist/actions/auth/login/getProvider.js +9 -4
- package/dist/actions/auth/login/getProvider.js.map +1 -1
- package/dist/actions/auth/login/getSSOProvider.js +21 -2
- package/dist/actions/auth/login/getSSOProvider.js.map +1 -1
- package/dist/actions/auth/login/login.js +5 -4
- package/dist/actions/auth/login/login.js.map +1 -1
- package/dist/actions/build/buildApp.js +1 -0
- package/dist/actions/build/buildApp.js.map +1 -1
- package/dist/actions/build/buildStaticFiles.js +2 -1
- package/dist/actions/build/buildStaticFiles.js.map +1 -1
- package/dist/actions/build/renderDocument.js.map +1 -1
- package/dist/actions/build/renderDocumentWorker/components/BasicDocument.js +2 -2
- package/dist/actions/build/renderDocumentWorker/components/BasicDocument.js.map +1 -1
- package/dist/actions/build/renderDocumentWorker/types.js.map +1 -1
- package/dist/actions/build/writeSanityRuntime.js +3 -2
- package/dist/actions/build/writeSanityRuntime.js.map +1 -1
- package/dist/actions/deploy/deployStudio.js +53 -3
- package/dist/actions/deploy/deployStudio.js.map +1 -1
- package/dist/actions/deploy/findUserApplicationForStudio.js +10 -4
- package/dist/actions/deploy/findUserApplicationForStudio.js.map +1 -1
- package/dist/actions/dev/startAppDevServer.js +2 -0
- package/dist/actions/dev/startAppDevServer.js.map +1 -1
- package/dist/actions/init/git.js +5 -2
- package/dist/actions/init/git.js.map +1 -1
- package/dist/actions/init/remoteTemplate.js +3 -1
- package/dist/actions/init/remoteTemplate.js.map +1 -1
- package/dist/actions/init/templates/nextjs/index.js +1 -1
- package/dist/actions/init/templates/nextjs/index.js.map +1 -1
- package/dist/actions/manifest/extractAppManifest.js +3 -1
- package/dist/actions/manifest/extractAppManifest.js.map +1 -1
- package/dist/actions/manifest/schemaTypeTransformer.js +2 -1
- package/dist/actions/manifest/schemaTypeTransformer.js.map +1 -1
- package/dist/actions/telemetry/setConsent.js +6 -2
- package/dist/actions/telemetry/setConsent.js.map +1 -1
- package/dist/commands/datasets/alias/create.js +0 -4
- package/dist/commands/datasets/alias/create.js.map +1 -1
- package/dist/commands/datasets/alias/delete.js +1 -5
- package/dist/commands/datasets/alias/delete.js.map +1 -1
- package/dist/commands/datasets/alias/link.js +0 -4
- package/dist/commands/datasets/alias/link.js.map +1 -1
- package/dist/commands/datasets/alias/unlink.js +0 -4
- package/dist/commands/datasets/alias/unlink.js.map +1 -1
- package/dist/commands/datasets/copy.js +1 -1
- package/dist/commands/datasets/copy.js.map +1 -1
- package/dist/commands/datasets/import.js +45 -15
- package/dist/commands/datasets/import.js.map +1 -1
- package/dist/commands/deploy.js +3 -0
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/init.js +10 -9
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.js +14 -2
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.js +6 -8
- package/dist/commands/logout.js.map +1 -1
- package/dist/hooks/prerun/setupTelemetry.js +1 -1
- package/dist/hooks/prerun/setupTelemetry.js.map +1 -1
- package/dist/server/devServer.js +2 -1
- package/dist/server/devServer.js.map +1 -1
- package/dist/services/telemetry.js +23 -2
- package/dist/services/telemetry.js.map +1 -1
- package/dist/util/compareDependencyVersions.js +3 -1
- package/dist/util/compareDependencyVersions.js.map +1 -1
- package/dist/util/createExpiringConfig.js +0 -3
- package/dist/util/createExpiringConfig.js.map +1 -1
- package/dist/util/getCliVersion.js +3 -1
- package/dist/util/getCliVersion.js.map +1 -1
- package/dist/util/packageManager/packageManagerChoice.js +1 -2
- package/dist/util/packageManager/packageManagerChoice.js.map +1 -1
- package/dist/util/telemetry/logger.js +13 -0
- package/dist/util/telemetry/logger.js.map +1 -1
- package/oclif.manifest.json +282 -272
- package/package.json +27 -27
- package/dist/actions/graphql/__tests__/fixtures/many-self-refs.js +0 -540
- package/dist/actions/graphql/__tests__/fixtures/many-self-refs.js.map +0 -1
- package/dist/actions/graphql/__tests__/fixtures/test-studio.js +0 -1143
- package/dist/actions/graphql/__tests__/fixtures/test-studio.js.map +0 -1
- package/dist/actions/graphql/__tests__/fixtures/union-refs.js +0 -591
- package/dist/actions/graphql/__tests__/fixtures/union-refs.js.map +0 -1
- package/dist/actions/graphql/__tests__/helpers.js +0 -23
- package/dist/actions/graphql/__tests__/helpers.js.map +0 -1
- package/dist/actions/manifest/__tests__/resolveSchemaIcon.test.js +0 -157
- package/dist/actions/manifest/__tests__/resolveSchemaIcon.test.js.map +0 -1
- package/dist/actions/media/__tests__/createMockClient.js +0 -32
- package/dist/actions/media/__tests__/createMockClient.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/cli",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Sanity CLI tool for managing Sanity projects and organizations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"./bin",
|
|
28
28
|
"./codemods",
|
|
29
29
|
"./dist",
|
|
30
|
+
"!./dist/**/__tests__",
|
|
30
31
|
"./oclif.config.js",
|
|
31
32
|
"./oclif.manifest.json",
|
|
32
33
|
"./static",
|
|
@@ -51,22 +52,22 @@
|
|
|
51
52
|
"access": "public"
|
|
52
53
|
},
|
|
53
54
|
"dependencies": {
|
|
54
|
-
"@oclif/core": "^4.
|
|
55
|
-
"@oclif/plugin-help": "^6.2.
|
|
56
|
-
"@oclif/plugin-not-found": "^3.2.
|
|
57
|
-
"@sanity/client": "^7.
|
|
55
|
+
"@oclif/core": "^4.10.2",
|
|
56
|
+
"@oclif/plugin-help": "^6.2.40",
|
|
57
|
+
"@oclif/plugin-not-found": "^3.2.77",
|
|
58
|
+
"@sanity/client": "^7.20.0",
|
|
58
59
|
"@sanity/codegen": "^6.0.1",
|
|
59
60
|
"@sanity/descriptors": "^1.3.0",
|
|
60
61
|
"@sanity/export": "^6.1.0",
|
|
61
62
|
"@sanity/generate-help-url": "^4.0.0",
|
|
62
63
|
"@sanity/id-utils": "^1.0.0",
|
|
63
|
-
"@sanity/import": "^
|
|
64
|
-
"@sanity/migrate": "^6.
|
|
65
|
-
"@sanity/runtime-cli": "^14.
|
|
66
|
-
"@sanity/schema": "^5.
|
|
67
|
-
"@sanity/telemetry": "^0.
|
|
68
|
-
"@sanity/template-validator": "^3.0
|
|
69
|
-
"@sanity/types": "^5.
|
|
64
|
+
"@sanity/import": "^6.0.1",
|
|
65
|
+
"@sanity/migrate": "^6.1.0",
|
|
66
|
+
"@sanity/runtime-cli": "^14.7.2",
|
|
67
|
+
"@sanity/schema": "^5.18.0",
|
|
68
|
+
"@sanity/telemetry": "^0.9.0",
|
|
69
|
+
"@sanity/template-validator": "^3.1.0",
|
|
70
|
+
"@sanity/types": "^5.18.0",
|
|
70
71
|
"@sanity/ui": "^3.1.14",
|
|
71
72
|
"@sanity/worker-channels": "^2.0.0",
|
|
72
73
|
"@vercel/frameworks": "3.21.1",
|
|
@@ -97,14 +98,13 @@
|
|
|
97
98
|
"peek-stream": "^1.1.3",
|
|
98
99
|
"picomatch": "^4.0.3",
|
|
99
100
|
"pluralize-esm": "^9.0.5",
|
|
100
|
-
"preferred-pm": "^
|
|
101
|
+
"preferred-pm": "^5.0.0",
|
|
101
102
|
"pretty-ms": "^9.3.0",
|
|
102
103
|
"promise-props-recursive": "^2.0.2",
|
|
103
104
|
"react": "^19.2.4",
|
|
104
105
|
"react-dom": "^19.2.4",
|
|
105
106
|
"react-is": "^19.2.4",
|
|
106
107
|
"read-package-up": "^12.0.0",
|
|
107
|
-
"rimraf": "^6.0.1",
|
|
108
108
|
"rxjs": "^7.8.2",
|
|
109
109
|
"semver": "^7.7.4",
|
|
110
110
|
"smol-toml": "^1.6.0",
|
|
@@ -116,16 +116,16 @@
|
|
|
116
116
|
"typeid-js": "^1.2.0",
|
|
117
117
|
"vite": "^7.3.1",
|
|
118
118
|
"which": "^6.0.1",
|
|
119
|
-
"yaml": "^2.8.
|
|
119
|
+
"yaml": "^2.8.3",
|
|
120
120
|
"zod": "^4.3.6",
|
|
121
|
-
"@sanity/cli-core": "1.
|
|
121
|
+
"@sanity/cli-core": "1.3.0"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@eslint/compat": "^2.0.3",
|
|
125
|
-
"@sanity/pkg-utils": "^10.4.
|
|
125
|
+
"@sanity/pkg-utils": "^10.4.13",
|
|
126
126
|
"@swc/cli": "^0.8.0",
|
|
127
|
-
"@swc/core": "^1.15.
|
|
128
|
-
"@types/debug": "^4.1.
|
|
127
|
+
"@swc/core": "^1.15.21",
|
|
128
|
+
"@types/debug": "^4.1.13",
|
|
129
129
|
"@types/gunzip-maybe": "^1.4.3",
|
|
130
130
|
"@types/lodash-es": "^4.17.12",
|
|
131
131
|
"@types/minimist": "^1.2.5",
|
|
@@ -138,27 +138,27 @@
|
|
|
138
138
|
"@types/tar-fs": "^2.0.4",
|
|
139
139
|
"@types/tar-stream": "^3.1.4",
|
|
140
140
|
"@types/which": "^3.0.4",
|
|
141
|
-
"@vitest/coverage-istanbul": "^4.1.
|
|
141
|
+
"@vitest/coverage-istanbul": "^4.1.2",
|
|
142
142
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
143
|
-
"eslint": "^
|
|
143
|
+
"eslint": "^10.1.0",
|
|
144
144
|
"nock": "^14.0.11",
|
|
145
|
-
"oclif": "^4.22.
|
|
145
|
+
"oclif": "^4.22.96",
|
|
146
146
|
"publint": "^0.3.18",
|
|
147
147
|
"rimraf": "^6.0.1",
|
|
148
|
-
"sanity": "^5.
|
|
148
|
+
"sanity": "^5.18.0",
|
|
149
149
|
"typescript": "^5.9.3",
|
|
150
150
|
"vite-tsconfig-paths": "^6.1.1",
|
|
151
|
-
"vitest": "^4.1.
|
|
151
|
+
"vitest": "^4.1.2",
|
|
152
152
|
"@repo/package.config": "0.0.1",
|
|
153
|
+
"@sanity/cli-test": "0.3.0",
|
|
153
154
|
"@repo/tsconfig": "3.70.0",
|
|
154
|
-
"@sanity/cli
|
|
155
|
-
"@sanity/eslint-config-cli": "1.0.1"
|
|
155
|
+
"@sanity/eslint-config-cli": "1.1.0"
|
|
156
156
|
},
|
|
157
157
|
"engines": {
|
|
158
158
|
"node": ">=20.19.1 <22 || >=22.12"
|
|
159
159
|
},
|
|
160
160
|
"scripts": {
|
|
161
|
-
"build": "swc --delete-dir-on-start --strip-leading-paths --out-dir dist/ src --ignore '**/*.test.ts'",
|
|
161
|
+
"build": "swc --delete-dir-on-start --strip-leading-paths --out-dir dist/ src --ignore '**/*.test.ts' --ignore '**/__tests__/**'",
|
|
162
162
|
"postbuild": "pnpm run manifest:generate && pnpm run check:topic-aliases",
|
|
163
163
|
"build:types": "pkg-utils build --emitDeclarationOnly",
|
|
164
164
|
"check:topic-aliases": "tsx scripts/check-topic-aliases.ts",
|
|
@@ -1,540 +0,0 @@
|
|
|
1
|
-
import { Schema } from '@sanity/schema';
|
|
2
|
-
const repeat = (times, callback)=>Array.from({
|
|
3
|
-
length: times
|
|
4
|
-
}, (_, index)=>callback(index));
|
|
5
|
-
const allSchemaTypeNames = repeat(40, (index)=>`schemaType${index}`);
|
|
6
|
-
const numReferenceFields = 2;
|
|
7
|
-
const schemaTypes = allSchemaTypeNames.map((name, index)=>({
|
|
8
|
-
fields: repeat(numReferenceFields, (fieldIndex)=>({
|
|
9
|
-
name: `reference${fieldIndex}`,
|
|
10
|
-
title: `Reference ${fieldIndex}`,
|
|
11
|
-
to: allSchemaTypeNames.map((schemaTypeName)=>({
|
|
12
|
-
type: schemaTypeName
|
|
13
|
-
})),
|
|
14
|
-
type: 'reference'
|
|
15
|
-
})),
|
|
16
|
-
name,
|
|
17
|
-
title: `Schema type ${index}`,
|
|
18
|
-
type: 'document'
|
|
19
|
-
}));
|
|
20
|
-
export default Schema.compile({
|
|
21
|
-
types: [
|
|
22
|
-
{
|
|
23
|
-
fields: [
|
|
24
|
-
{
|
|
25
|
-
name: 'lat',
|
|
26
|
-
title: 'Latitude',
|
|
27
|
-
type: 'number'
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'lng',
|
|
31
|
-
title: 'Longitude',
|
|
32
|
-
type: 'number'
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'alt',
|
|
36
|
-
title: 'Altitude',
|
|
37
|
-
type: 'number'
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
name: 'geopoint',
|
|
41
|
-
title: 'Geographical Point',
|
|
42
|
-
type: 'object'
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
fields: [
|
|
46
|
-
{
|
|
47
|
-
name: 'originalFilename',
|
|
48
|
-
readOnly: true,
|
|
49
|
-
title: 'Original file name',
|
|
50
|
-
type: 'string'
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: 'label',
|
|
54
|
-
title: 'Label',
|
|
55
|
-
type: 'string'
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: 'title',
|
|
59
|
-
title: 'Title',
|
|
60
|
-
type: 'string'
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
name: 'description',
|
|
64
|
-
title: 'Description',
|
|
65
|
-
type: 'string'
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: 'altText',
|
|
69
|
-
title: 'Alternative text',
|
|
70
|
-
type: 'string'
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
fieldset: 'system',
|
|
74
|
-
name: 'sha1hash',
|
|
75
|
-
readOnly: true,
|
|
76
|
-
title: 'SHA1 hash',
|
|
77
|
-
type: 'string'
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
fieldset: 'system',
|
|
81
|
-
name: 'extension',
|
|
82
|
-
readOnly: true,
|
|
83
|
-
title: 'File extension',
|
|
84
|
-
type: 'string'
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
fieldset: 'system',
|
|
88
|
-
name: 'mimeType',
|
|
89
|
-
readOnly: true,
|
|
90
|
-
title: 'Mime type',
|
|
91
|
-
type: 'string'
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
fieldset: 'system',
|
|
95
|
-
name: 'size',
|
|
96
|
-
readOnly: true,
|
|
97
|
-
title: 'File size in bytes',
|
|
98
|
-
type: 'number'
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
fieldset: 'system',
|
|
102
|
-
name: 'assetId',
|
|
103
|
-
readOnly: true,
|
|
104
|
-
title: 'Asset ID',
|
|
105
|
-
type: 'string'
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
fieldset: 'system',
|
|
109
|
-
name: 'path',
|
|
110
|
-
readOnly: true,
|
|
111
|
-
title: 'Path',
|
|
112
|
-
type: 'string'
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
fieldset: 'system',
|
|
116
|
-
name: 'url',
|
|
117
|
-
readOnly: true,
|
|
118
|
-
title: 'Url',
|
|
119
|
-
type: 'string'
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
fieldset: 'system',
|
|
123
|
-
name: 'source',
|
|
124
|
-
readOnly: true,
|
|
125
|
-
title: 'Source',
|
|
126
|
-
type: 'sanity.assetSourceData'
|
|
127
|
-
}
|
|
128
|
-
],
|
|
129
|
-
fieldsets: [
|
|
130
|
-
{
|
|
131
|
-
description: 'These fields are managed by the system and not editable',
|
|
132
|
-
name: 'system',
|
|
133
|
-
title: 'System fields'
|
|
134
|
-
}
|
|
135
|
-
],
|
|
136
|
-
name: 'sanity.fileAsset',
|
|
137
|
-
orderings: [
|
|
138
|
-
{
|
|
139
|
-
by: [
|
|
140
|
-
{
|
|
141
|
-
direction: 'desc',
|
|
142
|
-
field: 'size'
|
|
143
|
-
}
|
|
144
|
-
],
|
|
145
|
-
name: 'fileSizeDesc',
|
|
146
|
-
title: 'File size'
|
|
147
|
-
}
|
|
148
|
-
],
|
|
149
|
-
preview: {
|
|
150
|
-
prepare (doc) {
|
|
151
|
-
return {
|
|
152
|
-
subtitle: `${doc.mimeType} (${(doc.size / 1024 / 1024).toFixed(2)} MB)`,
|
|
153
|
-
title: doc.title || (doc.path ?? '').split('/').at(-1)
|
|
154
|
-
};
|
|
155
|
-
},
|
|
156
|
-
select: {
|
|
157
|
-
mimeType: 'mimeType',
|
|
158
|
-
path: 'path',
|
|
159
|
-
size: 'size',
|
|
160
|
-
title: 'originalFilename'
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
title: 'File',
|
|
164
|
-
type: 'document'
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
fields: [
|
|
168
|
-
{
|
|
169
|
-
name: 'x',
|
|
170
|
-
type: 'number'
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
name: 'y',
|
|
174
|
-
type: 'number'
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
name: 'height',
|
|
178
|
-
type: 'number'
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
name: 'width',
|
|
182
|
-
type: 'number'
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
|
-
name: 'sanity.imageHotspot',
|
|
186
|
-
title: 'Image hotspot',
|
|
187
|
-
type: 'object'
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
fields: [
|
|
191
|
-
{
|
|
192
|
-
name: 'location',
|
|
193
|
-
type: 'geopoint'
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
fieldset: 'extra',
|
|
197
|
-
name: 'dimensions',
|
|
198
|
-
title: 'Dimensions',
|
|
199
|
-
type: 'sanity.imageDimensions'
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
fieldset: 'extra',
|
|
203
|
-
name: 'palette',
|
|
204
|
-
title: 'Palette',
|
|
205
|
-
type: 'sanity.imagePalette'
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
name: 'lqip',
|
|
209
|
-
readOnly: true,
|
|
210
|
-
title: 'LQIP (Low-Quality Image Placeholder)',
|
|
211
|
-
type: 'string'
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
name: 'blurHash',
|
|
215
|
-
readOnly: true,
|
|
216
|
-
title: 'BlurHash',
|
|
217
|
-
type: 'string'
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
name: 'thumbHash',
|
|
221
|
-
readOnly: true,
|
|
222
|
-
title: 'ThumbHash',
|
|
223
|
-
type: 'string'
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
name: 'hasAlpha',
|
|
227
|
-
readOnly: true,
|
|
228
|
-
title: 'Has alpha channel',
|
|
229
|
-
type: 'boolean'
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
name: 'isOpaque',
|
|
233
|
-
readOnly: true,
|
|
234
|
-
title: 'Is opaque',
|
|
235
|
-
type: 'boolean'
|
|
236
|
-
}
|
|
237
|
-
],
|
|
238
|
-
fieldsets: [
|
|
239
|
-
{
|
|
240
|
-
name: 'extra',
|
|
241
|
-
options: {
|
|
242
|
-
collapsable: true
|
|
243
|
-
},
|
|
244
|
-
title: 'Extra metadata…'
|
|
245
|
-
}
|
|
246
|
-
],
|
|
247
|
-
name: 'sanity.imageMetadata',
|
|
248
|
-
title: 'Image metadata',
|
|
249
|
-
type: 'object'
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
fields: [
|
|
253
|
-
{
|
|
254
|
-
description: 'A canonical name for the source this asset is originating from',
|
|
255
|
-
name: 'name',
|
|
256
|
-
title: 'Source name',
|
|
257
|
-
type: 'string'
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
description: 'The unique ID for the asset within the originating source so you can programatically find back to it',
|
|
261
|
-
name: 'id',
|
|
262
|
-
title: 'Asset Source ID',
|
|
263
|
-
type: 'string'
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
description: 'A URL to find more information about this asset in the originating source',
|
|
267
|
-
name: 'url',
|
|
268
|
-
title: 'Asset information URL',
|
|
269
|
-
type: 'string'
|
|
270
|
-
}
|
|
271
|
-
],
|
|
272
|
-
name: 'sanity.assetSourceData',
|
|
273
|
-
title: 'Asset Source Data',
|
|
274
|
-
type: 'object'
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
fields: [
|
|
278
|
-
{
|
|
279
|
-
name: 'top',
|
|
280
|
-
type: 'number'
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
name: 'bottom',
|
|
284
|
-
type: 'number'
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
name: 'left',
|
|
288
|
-
type: 'number'
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
name: 'right',
|
|
292
|
-
type: 'number'
|
|
293
|
-
}
|
|
294
|
-
],
|
|
295
|
-
name: 'sanity.imageCrop',
|
|
296
|
-
title: 'Image crop',
|
|
297
|
-
type: 'object'
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
fields: [
|
|
301
|
-
{
|
|
302
|
-
name: 'height',
|
|
303
|
-
readOnly: true,
|
|
304
|
-
title: 'Height',
|
|
305
|
-
type: 'number'
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
name: 'width',
|
|
309
|
-
readOnly: true,
|
|
310
|
-
title: 'Width',
|
|
311
|
-
type: 'number'
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
name: 'aspectRatio',
|
|
315
|
-
readOnly: true,
|
|
316
|
-
title: 'Aspect ratio',
|
|
317
|
-
type: 'number'
|
|
318
|
-
}
|
|
319
|
-
],
|
|
320
|
-
name: 'sanity.imageDimensions',
|
|
321
|
-
title: 'Image dimensions',
|
|
322
|
-
type: 'object'
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
fields: [
|
|
326
|
-
{
|
|
327
|
-
name: 'darkMuted',
|
|
328
|
-
title: 'Dark Muted',
|
|
329
|
-
type: 'sanity.imagePaletteSwatch'
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
name: 'lightVibrant',
|
|
333
|
-
title: 'Light Vibrant',
|
|
334
|
-
type: 'sanity.imagePaletteSwatch'
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
name: 'darkVibrant',
|
|
338
|
-
title: 'Dark Vibrant',
|
|
339
|
-
type: 'sanity.imagePaletteSwatch'
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
name: 'vibrant',
|
|
343
|
-
title: 'Vibrant',
|
|
344
|
-
type: 'sanity.imagePaletteSwatch'
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
name: 'dominant',
|
|
348
|
-
title: 'Dominant',
|
|
349
|
-
type: 'sanity.imagePaletteSwatch'
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
name: 'lightMuted',
|
|
353
|
-
title: 'Light Muted',
|
|
354
|
-
type: 'sanity.imagePaletteSwatch'
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
name: 'muted',
|
|
358
|
-
title: 'Muted',
|
|
359
|
-
type: 'sanity.imagePaletteSwatch'
|
|
360
|
-
}
|
|
361
|
-
],
|
|
362
|
-
name: 'sanity.imagePalette',
|
|
363
|
-
title: 'Image palette',
|
|
364
|
-
type: 'object'
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
fields: [
|
|
368
|
-
{
|
|
369
|
-
name: 'background',
|
|
370
|
-
readOnly: true,
|
|
371
|
-
title: 'Background',
|
|
372
|
-
type: 'string'
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
name: 'foreground',
|
|
376
|
-
readOnly: true,
|
|
377
|
-
title: 'Foreground',
|
|
378
|
-
type: 'string'
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
name: 'population',
|
|
382
|
-
readOnly: true,
|
|
383
|
-
title: 'Population',
|
|
384
|
-
type: 'number'
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
name: 'title',
|
|
388
|
-
readOnly: true,
|
|
389
|
-
title: 'String',
|
|
390
|
-
type: 'string'
|
|
391
|
-
}
|
|
392
|
-
],
|
|
393
|
-
name: 'sanity.imagePaletteSwatch',
|
|
394
|
-
title: 'Image palette swatch',
|
|
395
|
-
type: 'object'
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
fields: [
|
|
399
|
-
{
|
|
400
|
-
name: 'originalFilename',
|
|
401
|
-
readOnly: true,
|
|
402
|
-
title: 'Original file name',
|
|
403
|
-
type: 'string'
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
name: 'label',
|
|
407
|
-
title: 'Label',
|
|
408
|
-
type: 'string'
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
name: 'title',
|
|
412
|
-
title: 'Title',
|
|
413
|
-
type: 'string'
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
name: 'description',
|
|
417
|
-
title: 'Description',
|
|
418
|
-
type: 'string'
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
name: 'altText',
|
|
422
|
-
title: 'Alternative text',
|
|
423
|
-
type: 'string'
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
fieldset: 'system',
|
|
427
|
-
name: 'sha1hash',
|
|
428
|
-
readOnly: true,
|
|
429
|
-
title: 'SHA1 hash',
|
|
430
|
-
type: 'string'
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
fieldset: 'system',
|
|
434
|
-
name: 'extension',
|
|
435
|
-
readOnly: true,
|
|
436
|
-
title: 'File extension',
|
|
437
|
-
type: 'string'
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
fieldset: 'system',
|
|
441
|
-
name: 'mimeType',
|
|
442
|
-
readOnly: true,
|
|
443
|
-
title: 'Mime type',
|
|
444
|
-
type: 'string'
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
fieldset: 'system',
|
|
448
|
-
name: 'size',
|
|
449
|
-
readOnly: true,
|
|
450
|
-
title: 'File size in bytes',
|
|
451
|
-
type: 'number'
|
|
452
|
-
},
|
|
453
|
-
{
|
|
454
|
-
fieldset: 'system',
|
|
455
|
-
name: 'assetId',
|
|
456
|
-
readOnly: true,
|
|
457
|
-
title: 'Asset ID',
|
|
458
|
-
type: 'string'
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
fieldset: 'system',
|
|
462
|
-
hidden: true,
|
|
463
|
-
name: 'uploadId',
|
|
464
|
-
readOnly: true,
|
|
465
|
-
type: 'string'
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
fieldset: 'system',
|
|
469
|
-
name: 'path',
|
|
470
|
-
readOnly: true,
|
|
471
|
-
title: 'Path',
|
|
472
|
-
type: 'string'
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
fieldset: 'system',
|
|
476
|
-
name: 'url',
|
|
477
|
-
readOnly: true,
|
|
478
|
-
title: 'Url',
|
|
479
|
-
type: 'string'
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
name: 'metadata',
|
|
483
|
-
title: 'Metadata',
|
|
484
|
-
type: 'sanity.imageMetadata'
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
fieldset: 'system',
|
|
488
|
-
name: 'source',
|
|
489
|
-
readOnly: true,
|
|
490
|
-
title: 'Source',
|
|
491
|
-
type: 'sanity.assetSourceData'
|
|
492
|
-
}
|
|
493
|
-
],
|
|
494
|
-
fieldsets: [
|
|
495
|
-
{
|
|
496
|
-
description: 'These fields are managed by the system and not editable',
|
|
497
|
-
name: 'system',
|
|
498
|
-
title: 'System fields'
|
|
499
|
-
}
|
|
500
|
-
],
|
|
501
|
-
name: 'sanity.imageAsset',
|
|
502
|
-
orderings: [
|
|
503
|
-
{
|
|
504
|
-
by: [
|
|
505
|
-
{
|
|
506
|
-
direction: 'desc',
|
|
507
|
-
field: 'size'
|
|
508
|
-
}
|
|
509
|
-
],
|
|
510
|
-
name: 'fileSizeDesc',
|
|
511
|
-
title: 'File size'
|
|
512
|
-
}
|
|
513
|
-
],
|
|
514
|
-
preview: {
|
|
515
|
-
prepare (doc) {
|
|
516
|
-
return {
|
|
517
|
-
media: {
|
|
518
|
-
asset: {
|
|
519
|
-
_ref: doc.id
|
|
520
|
-
}
|
|
521
|
-
},
|
|
522
|
-
subtitle: `${doc.mimeType} (${(doc.size / 1024 / 1024).toFixed(2)} MB)`,
|
|
523
|
-
title: doc.title || (doc.path ?? '').split('/').at(-1)
|
|
524
|
-
};
|
|
525
|
-
},
|
|
526
|
-
select: {
|
|
527
|
-
id: '_id',
|
|
528
|
-
mimeType: 'mimeType',
|
|
529
|
-
size: 'size',
|
|
530
|
-
title: 'originalFilename'
|
|
531
|
-
}
|
|
532
|
-
},
|
|
533
|
-
title: 'Image',
|
|
534
|
-
type: 'document'
|
|
535
|
-
},
|
|
536
|
-
...schemaTypes
|
|
537
|
-
]
|
|
538
|
-
});
|
|
539
|
-
|
|
540
|
-
//# sourceMappingURL=many-self-refs.js.map
|