@sanity/cli 3.81.1-sdk-295.35 → 3.82.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/lib/_chunks-cjs/cli.js +4 -4
- package/lib/_chunks-cjs/cli.js.map +1 -1
- package/lib/index.d.mts +10 -6
- package/lib/index.d.ts +10 -6
- package/package.json +9 -8
- package/src/actions/init-project/bootstrapLocalTemplate.ts +1 -1
- package/src/actions/init-project/createAppCliConfig.ts +3 -3
- package/src/actions/init-project/initProject.ts +1 -1
- package/src/actions/init-project/templates/appQuickstart.ts +1 -1
- package/src/types.ts +10 -6
- package/bin/xdg-open +0 -1066
- package/lib/index.esm.js +0 -391
- package/lib/index.esm.js.map +0 -1
package/lib/index.d.mts
CHANGED
@@ -10,6 +10,15 @@ import {SanityClient} from '@sanity/client'
|
|
10
10
|
import {Separator} from 'inquirer'
|
11
11
|
import {TelemetryLogger} from '@sanity/telemetry'
|
12
12
|
|
13
|
+
declare interface AppConfig {
|
14
|
+
organizationId: string
|
15
|
+
/**
|
16
|
+
* Defaults to './src/App'
|
17
|
+
*/
|
18
|
+
entry?: string
|
19
|
+
id?: string
|
20
|
+
}
|
21
|
+
|
13
22
|
export declare type CliApiClient = (options?: ClientRequirements) => SanityClient
|
14
23
|
|
15
24
|
export declare interface CliApiConfig {
|
@@ -117,13 +126,8 @@ export declare interface CliConfig {
|
|
117
126
|
/**
|
118
127
|
* Parameter used to configure other kinds of applications.
|
119
128
|
* Signals to `sanity` commands that this is not a studio.
|
120
|
-
* @internal
|
121
129
|
*/
|
122
|
-
|
123
|
-
organizationId: string
|
124
|
-
appLocation?: string
|
125
|
-
appId?: string
|
126
|
-
}
|
130
|
+
app?: AppConfig
|
127
131
|
}
|
128
132
|
|
129
133
|
declare type CliConfigResult =
|
package/lib/index.d.ts
CHANGED
@@ -10,6 +10,15 @@ import {SanityClient} from '@sanity/client'
|
|
10
10
|
import {Separator} from 'inquirer'
|
11
11
|
import {TelemetryLogger} from '@sanity/telemetry'
|
12
12
|
|
13
|
+
declare interface AppConfig {
|
14
|
+
organizationId: string
|
15
|
+
/**
|
16
|
+
* Defaults to './src/App'
|
17
|
+
*/
|
18
|
+
entry?: string
|
19
|
+
id?: string
|
20
|
+
}
|
21
|
+
|
13
22
|
export declare type CliApiClient = (options?: ClientRequirements) => SanityClient
|
14
23
|
|
15
24
|
export declare interface CliApiConfig {
|
@@ -117,13 +126,8 @@ export declare interface CliConfig {
|
|
117
126
|
/**
|
118
127
|
* Parameter used to configure other kinds of applications.
|
119
128
|
* Signals to `sanity` commands that this is not a studio.
|
120
|
-
* @internal
|
121
129
|
*/
|
122
|
-
|
123
|
-
organizationId: string
|
124
|
-
appLocation?: string
|
125
|
-
appId?: string
|
126
|
-
}
|
130
|
+
app?: AppConfig
|
127
131
|
}
|
128
132
|
|
129
133
|
declare type CliConfigResult =
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sanity/cli",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.82.0",
|
4
4
|
"description": "Sanity CLI tool for managing Sanity installations, managing plugins, schemas and datasets",
|
5
5
|
"keywords": [
|
6
6
|
"sanity",
|
@@ -23,6 +23,7 @@
|
|
23
23
|
"license": "MIT",
|
24
24
|
"author": "Sanity.io <hello@sanity.io>",
|
25
25
|
"sideEffects": false,
|
26
|
+
"type": "commonjs",
|
26
27
|
"exports": {
|
27
28
|
".": {
|
28
29
|
"source": "./src/index.ts",
|
@@ -33,7 +34,7 @@
|
|
33
34
|
"./package.json": "./package.json"
|
34
35
|
},
|
35
36
|
"main": "./lib/index.js",
|
36
|
-
"module": "./lib/index.
|
37
|
+
"module": "./lib/index.mjs",
|
37
38
|
"types": "./lib/index.d.ts",
|
38
39
|
"bin": {
|
39
40
|
"sanity": "./bin/sanity"
|
@@ -58,11 +59,11 @@
|
|
58
59
|
"dependencies": {
|
59
60
|
"@babel/traverse": "^7.23.5",
|
60
61
|
"@sanity/client": "^6.28.4",
|
61
|
-
"@sanity/codegen": "3.
|
62
|
+
"@sanity/codegen": "3.82.0",
|
62
63
|
"@sanity/runtime-cli": "^1.1.1",
|
63
64
|
"@sanity/telemetry": "^0.8.0",
|
64
65
|
"@sanity/template-validator": "^2.4.3",
|
65
|
-
"@sanity/util": "3.
|
66
|
+
"@sanity/util": "3.82.0",
|
66
67
|
"chalk": "^4.1.2",
|
67
68
|
"debug": "^4.3.4",
|
68
69
|
"decompress": "^4.2.0",
|
@@ -76,13 +77,13 @@
|
|
76
77
|
"validate-npm-package-name": "^3.0.0"
|
77
78
|
},
|
78
79
|
"devDependencies": {
|
79
|
-
"@repo/package.config": "3.
|
80
|
-
"@repo/test-config": "3.
|
80
|
+
"@repo/package.config": "3.82.0",
|
81
|
+
"@repo/test-config": "3.82.0",
|
81
82
|
"@rexxars/gitconfiglocal": "^3.0.1",
|
82
83
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
83
84
|
"@sanity/eslint-config-studio": "^4.0.0",
|
84
85
|
"@sanity/generate-help-url": "^3.0.0",
|
85
|
-
"@sanity/types": "3.
|
86
|
+
"@sanity/types": "3.82.0",
|
86
87
|
"@types/babel__traverse": "^7.20.5",
|
87
88
|
"@types/configstore": "^5.0.1",
|
88
89
|
"@types/cpx": "^1.5.2",
|
@@ -134,5 +135,5 @@
|
|
134
135
|
"engines": {
|
135
136
|
"node": ">=18"
|
136
137
|
},
|
137
|
-
"gitHead": "
|
138
|
+
"gitHead": "4e83852759628260ad60f565bcaa61f95881eedc"
|
138
139
|
}
|
@@ -143,7 +143,7 @@ export async function bootstrapLocalTemplate(
|
|
143
143
|
// ...and a CLI config (`sanity.cli.[ts|js]`)
|
144
144
|
const cliConfig = isAppTemplate
|
145
145
|
? createAppCliConfig({
|
146
|
-
|
146
|
+
entry: template.entry!,
|
147
147
|
organizationId: variables.organizationId,
|
148
148
|
})
|
149
149
|
: createCliConfig({
|
@@ -4,16 +4,16 @@ const defaultAppTemplate = `
|
|
4
4
|
import {defineCliConfig} from 'sanity/cli'
|
5
5
|
|
6
6
|
export default defineCliConfig({
|
7
|
-
|
7
|
+
app: {
|
8
8
|
organizationId: '%organizationId%',
|
9
|
-
|
9
|
+
entry: '%entry%',
|
10
10
|
},
|
11
11
|
})
|
12
12
|
`
|
13
13
|
|
14
14
|
export interface GenerateCliConfigOptions {
|
15
15
|
organizationId?: string
|
16
|
-
|
16
|
+
entry: string
|
17
17
|
}
|
18
18
|
|
19
19
|
export function createAppCliConfig(options: GenerateCliConfigOptions): string {
|
@@ -98,7 +98,7 @@ export interface ProjectTemplate {
|
|
98
98
|
importPrompt?: string
|
99
99
|
configTemplate?: string | ((variables: GenerateConfigOptions['variables']) => string)
|
100
100
|
typescriptOnly?: boolean
|
101
|
-
|
101
|
+
entry?: string
|
102
102
|
scripts?: Record<string, string>
|
103
103
|
}
|
104
104
|
|
package/src/types.ts
CHANGED
@@ -311,6 +311,15 @@ export interface ReactCompilerConfig {
|
|
311
311
|
compilationMode?: 'infer' | 'syntax' | 'annotation' | 'all'
|
312
312
|
}
|
313
313
|
|
314
|
+
interface AppConfig {
|
315
|
+
organizationId: string
|
316
|
+
/**
|
317
|
+
* Defaults to './src/App'
|
318
|
+
*/
|
319
|
+
entry?: string
|
320
|
+
id?: string
|
321
|
+
}
|
322
|
+
|
314
323
|
export interface CliConfig {
|
315
324
|
api?: CliApiConfig
|
316
325
|
|
@@ -349,13 +358,8 @@ export interface CliConfig {
|
|
349
358
|
/**
|
350
359
|
* Parameter used to configure other kinds of applications.
|
351
360
|
* Signals to `sanity` commands that this is not a studio.
|
352
|
-
* @internal
|
353
361
|
*/
|
354
|
-
|
355
|
-
organizationId: string
|
356
|
-
appLocation?: string
|
357
|
-
appId?: string
|
358
|
-
}
|
362
|
+
app?: AppConfig
|
359
363
|
}
|
360
364
|
|
361
365
|
export type UserViteConfig =
|