@sanity/cli 3.36.4 → 3.36.5-canary.34

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 (116) hide show
  1. package/lib/_chunks-cjs/cli.js +1779 -1317
  2. package/lib/_chunks-cjs/cli.js.map +1 -1
  3. package/lib/_chunks-cjs/journeyConfig.js +11 -11
  4. package/lib/_chunks-cjs/journeyConfig.js.map +1 -1
  5. package/lib/_chunks-cjs/loadEnv.js +105 -2719
  6. package/lib/_chunks-cjs/loadEnv.js.map +1 -1
  7. package/lib/cli.d.ts +10 -0
  8. package/lib/index.d.ts +448 -0
  9. package/lib/index.esm.js +449 -5
  10. package/lib/index.esm.js.map +1 -1
  11. package/lib/index.js +3 -3
  12. package/lib/index.js.map +1 -1
  13. package/lib/index.mjs +452 -0
  14. package/lib/index.mjs.map +1 -0
  15. package/lib/run.d.ts +1 -0
  16. package/lib/workers/getAndWriteJourneySchema.d.ts +1 -0
  17. package/lib/workers/getCliConfig.d.ts +1 -0
  18. package/lib/workers/typegenGenerate.d.ts +37 -0
  19. package/lib/workers/typegenGenerate.js +6 -2
  20. package/lib/workers/typegenGenerate.js.map +1 -1
  21. package/package.json +18 -21
  22. package/src/actions/init-project/templates/shopify.ts +7 -0
  23. package/src/util/journeyConfig.ts +5 -5
  24. package/templates/ecommerce/plugins/barcode-input/BarcodeInput.js +1 -1
  25. package/templates/get-started/plugins/sanity-plugin-tutorial/GetStartedTutorial.tsx +1 -1
  26. package/templates/shared/tsconfig.json +2 -4
  27. package/templates/shopify/README.md +3 -3
  28. package/templates/shopify/components/hotspots/ProductTooltip.tsx +1 -1
  29. package/templates/shopify/components/icons/Shopify.tsx +1 -1
  30. package/templates/shopify/components/inputs/CollectionHidden.tsx +1 -1
  31. package/templates/shopify/components/media/ColorTheme.tsx +1 -1
  32. package/templates/shopify/components/studio/Navbar.tsx +29 -0
  33. package/templates/shopify/constants.ts +31 -1
  34. package/templates/shopify/docs/features.md +6 -7
  35. package/templates/shopify/schemaTypes/documents/collection.tsx +11 -47
  36. package/templates/shopify/schemaTypes/documents/colorTheme.tsx +2 -17
  37. package/templates/shopify/schemaTypes/documents/page.ts +10 -37
  38. package/templates/shopify/schemaTypes/documents/product.tsx +4 -27
  39. package/templates/shopify/schemaTypes/documents/productVariant.tsx +4 -13
  40. package/templates/shopify/schemaTypes/index.ts +97 -126
  41. package/templates/shopify/schemaTypes/objects/collection/{group.ts → collectionGroupType.ts} +7 -10
  42. package/templates/shopify/schemaTypes/objects/collection/{links.ts → collectionLinksType.ts} +4 -4
  43. package/templates/shopify/schemaTypes/objects/customProductOption/{colorObject.tsx → customProductOptionColorObjectType.tsx} +3 -6
  44. package/templates/shopify/schemaTypes/objects/customProductOption/{color.tsx → customProductOptionColorType.tsx} +2 -10
  45. package/templates/shopify/schemaTypes/objects/customProductOption/{sizeObject.ts → customProductOptionSizeObjectType.ts} +3 -7
  46. package/templates/shopify/schemaTypes/objects/customProductOption/{size.ts → customProductOptionSizeType.ts} +3 -12
  47. package/templates/shopify/schemaTypes/objects/global/footerType.ts +22 -0
  48. package/templates/shopify/schemaTypes/objects/global/menuLinksType.ts +21 -0
  49. package/templates/shopify/schemaTypes/objects/global/{menu.ts → menuType.ts} +2 -4
  50. package/templates/shopify/schemaTypes/objects/global/{notFoundPage.ts → notFoundPageType.ts} +1 -6
  51. package/templates/shopify/schemaTypes/objects/hotspot/{imageWithProductHotspots.ts → imageWithProductHotspotsType.ts} +4 -6
  52. package/templates/shopify/schemaTypes/objects/hotspot/{productHotspots.tsx → productHotspotsType.tsx} +3 -5
  53. package/templates/shopify/schemaTypes/objects/hotspot/{spot.tsx → spotType.tsx} +1 -3
  54. package/templates/shopify/schemaTypes/{annotations/linkEmail.tsx → objects/link/linkEmailType.tsx} +5 -13
  55. package/templates/shopify/schemaTypes/{annotations/linkExternal.tsx → objects/link/linkExternalType.tsx} +6 -13
  56. package/templates/shopify/schemaTypes/{annotations/linkInternal.tsx → objects/link/linkInternalType.tsx} +5 -12
  57. package/templates/shopify/schemaTypes/{annotations/product.tsx → objects/link/linkProductType.tsx} +4 -16
  58. package/templates/shopify/schemaTypes/objects/module/{accordionGroup.ts → accordionGroupType.ts} +6 -9
  59. package/templates/shopify/schemaTypes/objects/module/{accordion.ts → accordionType.ts} +4 -11
  60. package/templates/shopify/schemaTypes/objects/module/{callToAction.tsx → callToActionType.tsx} +10 -23
  61. package/templates/shopify/schemaTypes/objects/module/{callout.ts → calloutType.ts} +4 -10
  62. package/templates/shopify/schemaTypes/objects/module/{collection.tsx → collectionReferenceType.tsx} +4 -9
  63. package/templates/shopify/schemaTypes/objects/module/gridItemType.ts +41 -0
  64. package/templates/shopify/schemaTypes/objects/module/{grid.ts → gridType.ts} +7 -15
  65. package/templates/shopify/schemaTypes/objects/{hero/home.tsx → module/heroType.tsx} +14 -17
  66. package/templates/shopify/schemaTypes/objects/module/{imageCallToAction.tsx → imageCallToActionType.tsx} +6 -10
  67. package/templates/shopify/schemaTypes/objects/module/{image.ts → imageFeatureType.ts} +6 -18
  68. package/templates/shopify/schemaTypes/objects/module/{images.tsx → imageFeaturesType.tsx} +7 -25
  69. package/templates/shopify/schemaTypes/objects/module/{instagram.ts → instagramType.ts} +2 -2
  70. package/templates/shopify/schemaTypes/objects/module/{products.tsx → productFeaturesType.tsx} +6 -11
  71. package/templates/shopify/schemaTypes/objects/module/{product.tsx → productReferenceType.tsx} +6 -8
  72. package/templates/shopify/schemaTypes/objects/{seo/seo.ts → seoType.ts} +7 -6
  73. package/templates/shopify/schemaTypes/objects/shopify/{shopifyCollectionRule.tsx → collectionRuleType.tsx} +2 -10
  74. package/templates/shopify/schemaTypes/objects/shopify/{inventory.ts → inventoryType.ts} +7 -12
  75. package/templates/shopify/schemaTypes/objects/shopify/{option.tsx → optionType.tsx} +6 -12
  76. package/templates/shopify/schemaTypes/objects/shopify/{placeholderString.ts → placeholderStringType.ts} +3 -1
  77. package/templates/shopify/schemaTypes/objects/shopify/{priceRange.ts → priceRangeType.ts} +5 -7
  78. package/templates/shopify/schemaTypes/objects/shopify/{productWithVariant.tsx → productWithVariantType.tsx} +2 -2
  79. package/templates/shopify/schemaTypes/objects/shopify/{proxyString.ts → proxyStringType.ts} +1 -1
  80. package/templates/shopify/schemaTypes/objects/shopify/{shopifyCollection.ts → shopifyCollectionType.ts} +4 -25
  81. package/templates/shopify/schemaTypes/objects/shopify/{shopifyProduct.ts → shopifyProductType.ts} +5 -35
  82. package/templates/shopify/schemaTypes/objects/shopify/{shopifyProductVariant.ts → shopifyProductVariantType.ts} +1 -27
  83. package/templates/shopify/schemaTypes/portableText/portableTextSimpleType.tsx +45 -0
  84. package/templates/shopify/schemaTypes/portableText/portableTextType.tsx +52 -0
  85. package/templates/shopify/schemaTypes/singletons/homeType.ts +49 -0
  86. package/templates/shopify/schemaTypes/singletons/{settings.ts → settingsType.ts} +7 -9
  87. package/templates/shopify/utils/shopifyUrls.ts +3 -3
  88. package/templates/shopify/utils/validateSlug.ts +3 -7
  89. package/lib/_chunks-cjs/index.js +0 -547
  90. package/lib/_chunks-cjs/index.js.map +0 -1
  91. package/lib/_chunks-cjs/node.js +0 -213
  92. package/lib/_chunks-cjs/node.js.map +0 -1
  93. package/lib/_chunks-cjs/stegaEncodeSourceMap.js +0 -357
  94. package/lib/_chunks-cjs/stegaEncodeSourceMap.js.map +0 -1
  95. package/lib/_chunks-es/index.js +0 -3336
  96. package/lib/_chunks-es/index.js.map +0 -1
  97. package/lib/_chunks-es/node.js +0 -216
  98. package/lib/_chunks-es/node.js.map +0 -1
  99. package/lib/_chunks-es/stegaEncodeSourceMap.js +0 -358
  100. package/lib/_chunks-es/stegaEncodeSourceMap.js.map +0 -1
  101. package/lib/index.cjs.mjs +0 -7
  102. package/templates/shopify/schemaTypes/blocks/body.tsx +0 -70
  103. package/templates/shopify/schemaTypes/objects/global/footer.ts +0 -57
  104. package/templates/shopify/schemaTypes/objects/global/linkExternal.ts +0 -52
  105. package/templates/shopify/schemaTypes/objects/global/linkInternal.ts +0 -65
  106. package/templates/shopify/schemaTypes/objects/global/links.ts +0 -16
  107. package/templates/shopify/schemaTypes/objects/hero/collection.tsx +0 -42
  108. package/templates/shopify/schemaTypes/objects/hero/page.tsx +0 -35
  109. package/templates/shopify/schemaTypes/objects/module/accordionBody.ts +0 -45
  110. package/templates/shopify/schemaTypes/objects/module/gridItem.ts +0 -91
  111. package/templates/shopify/schemaTypes/objects/seo/description.tsx +0 -10
  112. package/templates/shopify/schemaTypes/objects/seo/home.tsx +0 -31
  113. package/templates/shopify/schemaTypes/objects/seo/page.tsx +0 -37
  114. package/templates/shopify/schemaTypes/objects/seo/shopify.tsx +0 -40
  115. package/templates/shopify/schemaTypes/singletons/home.ts +0 -62
  116. /package/lib/{dts/src/index.d.ts → index.d.mts} +0 -0
package/lib/cli.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ export declare function runCli(
2
+ cliRoot: string,
3
+ {
4
+ cliVersion,
5
+ }: {
6
+ cliVersion: string
7
+ },
8
+ ): Promise<void>
9
+
10
+ export {}
package/lib/index.d.ts ADDED
@@ -0,0 +1,448 @@
1
+ /// <reference types="node" />
2
+
3
+ import {Answers} from 'inquirer'
4
+ import type chalk from 'chalk'
5
+ import {ChoiceCollection} from 'inquirer'
6
+ import {ConfigEnv} from 'vite'
7
+ import {DistinctQuestion} from 'inquirer'
8
+ import {InlineConfig} from 'vite'
9
+ import {Options} from 'ora'
10
+ import {Ora} from 'ora'
11
+ import {SanityClient} from '@sanity/client'
12
+ import {Separator} from 'inquirer'
13
+ import {TelemetryLogger} from '@sanity/telemetry'
14
+
15
+ export declare type CliApiClient = (options?: ClientRequirements) => SanityClient
16
+
17
+ export declare interface CliApiConfig {
18
+ projectId?: string
19
+ dataset?: string
20
+ }
21
+
22
+ export declare interface CliBaseCommandContext {
23
+ output: CliOutputter
24
+ prompt: CliPrompter
25
+ apiClient: CliApiClient
26
+ yarn: CliStubbedYarn
27
+ sanityMajorVersion: 2 | 3
28
+ cliConfigPath?: string
29
+ cliRoot: string
30
+ workDir: string
31
+ corePath?: string
32
+ chalk: typeof chalk
33
+ commandRunner: CliCommandRunner
34
+ fromInitCommand?: boolean
35
+ }
36
+
37
+ export declare interface CliClientOptions {
38
+ cwd?: string
39
+ projectId?: string
40
+ dataset?: string
41
+ useCdn?: boolean
42
+ token?: string
43
+ apiVersion?: string
44
+ }
45
+
46
+ export declare type CliCommandAction<F = Record<string, unknown>> = (
47
+ args: CliCommandArguments<F>,
48
+ context: CliCommandContext,
49
+ ) => Promise<unknown>
50
+
51
+ export declare interface CliCommandArguments<F = Record<string, unknown>> {
52
+ groupOrCommand: string
53
+ argv: string[]
54
+ extOptions: F
55
+ argsWithoutOptions: string[]
56
+ extraArguments: string[]
57
+ }
58
+
59
+ export declare type CliCommandContext = CliV2CommandContext | CliV3CommandContext
60
+
61
+ export declare interface CliCommandDefinition<F = Record<string, unknown>> {
62
+ name: string
63
+ group?: string
64
+ signature: string
65
+ description: string
66
+ helpText: string
67
+ action: CliCommandAction<F>
68
+ hideFromHelp?: boolean
69
+ }
70
+
71
+ export declare interface CliCommandGroupDefinition {
72
+ name: string
73
+ signature: string
74
+ isGroupRoot: boolean
75
+ description: string
76
+ hideFromHelp?: boolean
77
+ }
78
+
79
+ export declare interface CliCommandRunner {
80
+ commands: Readonly<(CliCommandDefinition | CliCommandGroupDefinition)[]>
81
+ commandGroups: Readonly<Record<string, (CliCommandDefinition | CliCommandGroupDefinition)[]>>
82
+ runCommand(
83
+ commandOrGroup: string,
84
+ args: CliCommandArguments,
85
+ options: CommandRunnerOptions,
86
+ ): Promise<unknown>
87
+ resolveSubcommand(
88
+ group: (CliCommandDefinition | CliCommandGroupDefinition)[],
89
+ subCommandName: string,
90
+ parentGroupName: string,
91
+ ): ResolvedCliCommand | null
92
+ }
93
+
94
+ export declare interface CliConfig {
95
+ api?: CliApiConfig
96
+ project?: {
97
+ basePath?: string
98
+ }
99
+ /**
100
+ * Wraps the Studio in `<React.StrictMode>` root to aid flagging potential problems related to concurrent features (`startTransition`, `useTransition`, `useDeferredValue`, `Suspense`)
101
+ * Can also be enabled by setting `SANITY_STUDIO_REACT_STRICT_MODE="true"|"false"`.
102
+ * It only applies to `sanity dev` in dev mode, it's ignored in `sanity build` and in production.
103
+ * Defaults to `false`
104
+ */
105
+ reactStrictMode?: boolean
106
+ server?: {
107
+ hostname?: string
108
+ port?: number
109
+ }
110
+ graphql?: GraphQLAPIConfig[]
111
+ vite?: UserViteConfig
112
+ }
113
+
114
+ declare type CliConfigResult =
115
+ | {
116
+ config: SanityJson
117
+ path: string
118
+ version: 2
119
+ }
120
+ | {
121
+ config: CliConfig
122
+ path: string
123
+ version: 3
124
+ }
125
+ | {
126
+ config: null
127
+ path: string
128
+ version: CliMajorVersion
129
+ }
130
+
131
+ declare interface ClientRequirements {
132
+ requireUser?: boolean
133
+ requireProject?: boolean
134
+ api?: {
135
+ projectId?: string
136
+ dataset?: string
137
+ apiHost?: string
138
+ apiVersion?: string
139
+ requestTagPrefix?: string
140
+ }
141
+ }
142
+
143
+ declare type CliMajorVersion = 2 | 3
144
+
145
+ export declare interface CliOutputter {
146
+ print: (...args: unknown[]) => void
147
+ warn: (...args: unknown[]) => void
148
+ error: (...args: unknown[]) => void
149
+ clear: () => void
150
+ spinner(options: Options | string): Ora
151
+ }
152
+
153
+ /**
154
+ * @internal
155
+ */
156
+ declare type CliPackageManager = typeof cliPackageManager
157
+
158
+ /**
159
+ * @internal
160
+ */
161
+ declare const cliPackageManager: {
162
+ getInstallCommand: typeof getInstallCommand
163
+ getPackageManagerChoice: typeof getPackageManagerChoice
164
+ installNewPackages: typeof installNewPackages
165
+ }
166
+
167
+ export declare type CliPrompter = (<T extends Answers = Answers>(
168
+ questions: DistinctQuestion<T>[],
169
+ ) => Promise<T>) & {
170
+ Separator: typeof Separator
171
+ single: <T = string>(question: SinglePrompt) => Promise<T>
172
+ }
173
+
174
+ export declare type CliStubbedYarn = (args: string[], options?: CliYarnOptions) => Promise<void>
175
+
176
+ export declare interface CliUserConfig {
177
+ cliLastUpdateCheck?: number
178
+ cliLastUpdateNag?: number
179
+ authToken?: string
180
+ authType?: string
181
+ }
182
+
183
+ export declare interface CliV2CommandContext extends CliBaseCommandContext {
184
+ sanityMajorVersion: 2
185
+ cliConfig?: SanityJson
186
+ cliPackageManager?: CliPackageManager
187
+ telemetry: TelemetryLogger<TelemetryUserProperties>
188
+ }
189
+
190
+ export declare interface CliV3CommandContext extends CliBaseCommandContext {
191
+ sanityMajorVersion: 3
192
+ cliConfig?: CliConfig
193
+ cliPackageManager: CliPackageManager
194
+ telemetry: TelemetryLogger<TelemetryUserProperties>
195
+ }
196
+
197
+ export declare interface CliYarnOptions {
198
+ print?: CliOutputter['print']
199
+ error?: CliOutputter['error']
200
+ rootDir?: string
201
+ }
202
+
203
+ export declare interface CommandRunnerOptions {
204
+ cliConfig: CliConfigResult | null
205
+ cliRoot: string
206
+ workDir: string
207
+ corePath: string | undefined
208
+ telemetry: TelemetryLogger<TelemetryUserProperties>
209
+ }
210
+
211
+ /**
212
+ * @deprecated Use `defineCliConfig` instead
213
+ * @beta
214
+ */
215
+ export declare function createCliConfig(config: CliConfig): CliConfig
216
+
217
+ /** @beta */
218
+ export declare function defineCliConfig(config: CliConfig): CliConfig
219
+
220
+ export declare function getCliClient(options?: CliClientOptions): SanityClient
221
+
222
+ export declare namespace getCliClient {
223
+ var __internal__getToken: () => string | undefined
224
+ }
225
+
226
+ declare function getInstallCommand(options: {
227
+ workDir: string
228
+ pkgNames?: string[]
229
+ depType?: 'dev' | 'prod' | 'peer'
230
+ }): Promise<string>
231
+
232
+ /**
233
+ * Attempts to resolve the most optimal package manager to use to install/upgrade
234
+ * packages/dependencies at a given path. It does so by looking for package manager
235
+ * specific lockfiles. If it finds a lockfile belonging to a certain package manager,
236
+ * it prioritizes this one. However, if that package manager is not installed, it will
237
+ * prompt the user for which one they want to use and hint at the most optimal one
238
+ * not being installed.
239
+ *
240
+ * Note that this function also takes local npm binary paths into account - for instance,
241
+ * `yarn` can be installed as a dependency of the project instead of globally, and it
242
+ * will use that is available.
243
+ *
244
+ * The user can also select 'manual' to skip the process and run their preferred package
245
+ * manager manually. Commands using this function must take this `manual` choice into
246
+ * account and act accordingly if chosen.
247
+ *
248
+ * @param workDir - The working directory where a lockfile is most likely to be present
249
+ * @param options - Pass `interactive: false` to fall back to npm if most optimal is
250
+ * not available, instead of prompting
251
+ * @returns Object of `chosen` and, if a lockfile is found, the `mostOptimal` choice
252
+ */
253
+ declare function getPackageManagerChoice(
254
+ workDir: string,
255
+ options:
256
+ | {
257
+ interactive: false
258
+ }
259
+ | {
260
+ interactive?: true
261
+ prompt: CliPrompter
262
+ },
263
+ ): Promise<{
264
+ chosen: PackageManager
265
+ mostOptimal?: PackageManager
266
+ }>
267
+
268
+ export declare interface GraphQLAPIConfig {
269
+ /**
270
+ * ID of GraphQL API. Only (currently) required when using the `--api` flag
271
+ * for `sanity graphql deploy`, in order to only deploy a specific API.
272
+ */
273
+ id?: string
274
+ /**
275
+ * Name of workspace containing the schema to deploy
276
+ *
277
+ * Optional, defaults to `default` (eg the one used if no `name` is defined)
278
+ */
279
+ workspace?: string
280
+ /**
281
+ * Name of source containing the schema to deploy, within the configured workspace
282
+ *
283
+ * Optional, defaults to `default` (eg the one used if no `name` is defined)
284
+ */
285
+ source?: string
286
+ /**
287
+ * API tag for this API - allows deploying multiple different APIs to a single dataset
288
+ *
289
+ * Optional, defaults to `default`
290
+ */
291
+ tag?: string
292
+ /**
293
+ * Whether or not to deploy a "GraphQL Playground" to the API url - an HTML interface that allows
294
+ * running queries and introspecting the schema from the browser. Note that this interface is not
295
+ * secured in any way, but as the schema definition and API route is generally open, this does not
296
+ * expose any more information than is otherwise available - it only makes it more discoverable.
297
+ *
298
+ * Optional, defaults to `true`
299
+ */
300
+ playground?: boolean
301
+ /**
302
+ * Generation of API to auto-generate from schema. New APIs should use the latest (`gen3`).
303
+ *
304
+ * Optional, defaults to `gen3`
305
+ */
306
+ generation?: 'gen3' | 'gen2' | 'gen1'
307
+ /**
308
+ * Define document interface fields (`_id`, `_type` etc) as non-nullable.
309
+ * If you never use a document type as an object (within other documents) in your schema types,
310
+ * you can (and probably should) set this to `true`. Because a document type _could_ be used
311
+ * inside other documents, it is by default set to `false`, as in these cases these fields
312
+ * _can_ be null.
313
+ *
314
+ * Optional, defaults to `false`
315
+ */
316
+ nonNullDocumentFields?: boolean
317
+ /**
318
+ * Suffix to use for generated filter types.
319
+ *
320
+ * Optional, Defaults to `Filter`.
321
+ *
322
+ */
323
+ filterSuffix?: string
324
+ }
325
+
326
+ declare function installNewPackages(
327
+ options: InstallOptions,
328
+ context: Pick<CliCommandContext, 'output' | 'workDir'>,
329
+ ): Promise<void>
330
+
331
+ declare interface InstallOptions {
332
+ packageManager: PackageManager
333
+ packages: string[]
334
+ }
335
+
336
+ /**
337
+ * This is an "inlined" version of Vite's `loadEnv` function,
338
+ * simplified somewhat to only support our use case.
339
+ *
340
+ * Ideally we'd just use `loadEnv` from Vite, but importing it
341
+ * causes bundling issues due to node APIs and downstream dependencies.
342
+ *
343
+ * Vite is MIT licensed, copyright (c) Yuxi (Evan) You and Vite contributors.
344
+ */
345
+ export declare function loadEnv(
346
+ mode: string,
347
+ envDir: string,
348
+ prefixes?: string[],
349
+ ): Record<string, string>
350
+
351
+ export declare interface PackageJson {
352
+ name: string
353
+ version: string
354
+ description?: string
355
+ author?: string
356
+ license?: string
357
+ private?: boolean
358
+ dependencies?: Record<string, string>
359
+ devDependencies?: Record<string, string>
360
+ peerDependencies?: Record<string, string>
361
+ repository?: {
362
+ type: string
363
+ url: string
364
+ }
365
+ }
366
+
367
+ declare type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' | 'manual'
368
+
369
+ export declare interface ResolvedCliCommand {
370
+ command: CliCommandDefinition | CliCommandGroupDefinition
371
+ commandName: string
372
+ parentName?: string
373
+ isGroup: boolean
374
+ isCommand: boolean
375
+ }
376
+
377
+ export {SanityClient}
378
+
379
+ export declare interface SanityCore {
380
+ requiredCliVersionRange: string
381
+ commands: (CliCommandDefinition | CliCommandGroupDefinition)[]
382
+ }
383
+
384
+ export declare interface SanityJson {
385
+ root?: boolean
386
+ project?: {
387
+ name?: string
388
+ basePath?: string
389
+ }
390
+ api?: CliApiConfig
391
+ __experimental_spaces?: {
392
+ name: string
393
+ title: string
394
+ default?: true
395
+ api: {
396
+ projectId?: string
397
+ dataset?: string
398
+ }
399
+ }[]
400
+ plugins?: string[]
401
+ parts?: {
402
+ name?: string
403
+ path?: string
404
+ implements?: string
405
+ description?: string
406
+ }[]
407
+ env?: {
408
+ production?: SanityJson
409
+ staging?: SanityJson
410
+ development?: SanityJson
411
+ }
412
+ }
413
+
414
+ export declare interface SanityModuleInternal {
415
+ cliProjectCommands: {
416
+ requiredCliVersionRange: string
417
+ commands: (CliCommandDefinition | CliCommandGroupDefinition)[]
418
+ }
419
+ }
420
+
421
+ export declare type SinglePrompt =
422
+ | (Omit<DistinctQuestion, 'name'> & {
423
+ type: 'list'
424
+ choices: ChoiceCollection
425
+ })
426
+ | (Omit<DistinctQuestion, 'name'> & {
427
+ type: 'confirm'
428
+ })
429
+ | (Omit<DistinctQuestion, 'name'> & {
430
+ type: 'input'
431
+ })
432
+
433
+ export declare interface TelemetryUserProperties {
434
+ deviceId: string
435
+ runtime: string
436
+ runtimeVersion: string
437
+ cliVersion: string
438
+ platform: string
439
+ cpuArchitecture: string
440
+ projectId?: string
441
+ dataset?: string
442
+ }
443
+
444
+ export declare type UserViteConfig =
445
+ | InlineConfig
446
+ | ((config: InlineConfig, env: ConfigEnv) => InlineConfig | Promise<InlineConfig>)
447
+
448
+ export {}