@sanity/cli 6.1.1 → 6.1.3
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 +78 -78
- package/dist/actions/init/processTemplate.js +27 -49
- package/dist/actions/init/processTemplate.js.map +1 -1
- package/dist/actions/init/sdkAppDependencies.js +3 -3
- package/dist/actions/init/sdkAppDependencies.js.map +1 -1
- package/dist/actions/init/studioDependencies.js +3 -3
- package/dist/actions/init/studioDependencies.js.map +1 -1
- package/dist/actions/manifest/__tests__/resolveSchemaIcon.test.js +157 -0
- package/dist/actions/manifest/__tests__/resolveSchemaIcon.test.js.map +1 -0
- package/dist/actions/manifest/extractWorkspaceManifest.js.map +1 -1
- package/dist/actions/manifest/iconResolver.js +13 -6
- package/dist/actions/manifest/iconResolver.js.map +1 -1
- package/dist/actions/manifest/resolveSchemaIcon.js +43 -0
- package/dist/actions/manifest/resolveSchemaIcon.js.map +1 -0
- package/dist/commands/init.js +23 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/hooks/prerun/injectEnvVariables.js +2 -1
- package/dist/hooks/prerun/injectEnvVariables.js.map +1 -1
- package/oclif.config.js +1 -1
- package/oclif.manifest.json +79 -79
- package/package.json +7 -10
- package/dist/actions/manifest/SchemaIcon.js +0 -23
- package/dist/actions/manifest/SchemaIcon.js.map +0 -1
package/oclif.manifest.json
CHANGED
|
@@ -3628,84 +3628,6 @@
|
|
|
3628
3628
|
"list.js"
|
|
3629
3629
|
]
|
|
3630
3630
|
},
|
|
3631
|
-
"telemetry:disable": {
|
|
3632
|
-
"aliases": [],
|
|
3633
|
-
"args": {},
|
|
3634
|
-
"description": "Disable telemetry for your logged in user",
|
|
3635
|
-
"examples": [
|
|
3636
|
-
{
|
|
3637
|
-
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
3638
|
-
"description": "Disable telemetry for your logged in user"
|
|
3639
|
-
}
|
|
3640
|
-
],
|
|
3641
|
-
"flags": {},
|
|
3642
|
-
"hasDynamicHelp": false,
|
|
3643
|
-
"hiddenAliases": [],
|
|
3644
|
-
"id": "telemetry:disable",
|
|
3645
|
-
"pluginAlias": "@sanity/cli",
|
|
3646
|
-
"pluginName": "@sanity/cli",
|
|
3647
|
-
"pluginType": "core",
|
|
3648
|
-
"strict": true,
|
|
3649
|
-
"isESM": true,
|
|
3650
|
-
"relativePath": [
|
|
3651
|
-
"dist",
|
|
3652
|
-
"commands",
|
|
3653
|
-
"telemetry",
|
|
3654
|
-
"disable.js"
|
|
3655
|
-
]
|
|
3656
|
-
},
|
|
3657
|
-
"telemetry:enable": {
|
|
3658
|
-
"aliases": [],
|
|
3659
|
-
"args": {},
|
|
3660
|
-
"description": "Enable telemetry for your logged in user",
|
|
3661
|
-
"examples": [
|
|
3662
|
-
{
|
|
3663
|
-
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
3664
|
-
"description": "Enable telemetry for your logged in user"
|
|
3665
|
-
}
|
|
3666
|
-
],
|
|
3667
|
-
"flags": {},
|
|
3668
|
-
"hasDynamicHelp": false,
|
|
3669
|
-
"hiddenAliases": [],
|
|
3670
|
-
"id": "telemetry:enable",
|
|
3671
|
-
"pluginAlias": "@sanity/cli",
|
|
3672
|
-
"pluginName": "@sanity/cli",
|
|
3673
|
-
"pluginType": "core",
|
|
3674
|
-
"strict": true,
|
|
3675
|
-
"isESM": true,
|
|
3676
|
-
"relativePath": [
|
|
3677
|
-
"dist",
|
|
3678
|
-
"commands",
|
|
3679
|
-
"telemetry",
|
|
3680
|
-
"enable.js"
|
|
3681
|
-
]
|
|
3682
|
-
},
|
|
3683
|
-
"telemetry:status": {
|
|
3684
|
-
"aliases": [],
|
|
3685
|
-
"args": {},
|
|
3686
|
-
"description": "Check telemetry consent status for your logged in user",
|
|
3687
|
-
"examples": [
|
|
3688
|
-
{
|
|
3689
|
-
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
3690
|
-
"description": "Check telemetry consent status for your logged in user"
|
|
3691
|
-
}
|
|
3692
|
-
],
|
|
3693
|
-
"flags": {},
|
|
3694
|
-
"hasDynamicHelp": false,
|
|
3695
|
-
"hiddenAliases": [],
|
|
3696
|
-
"id": "telemetry:status",
|
|
3697
|
-
"pluginAlias": "@sanity/cli",
|
|
3698
|
-
"pluginName": "@sanity/cli",
|
|
3699
|
-
"pluginType": "core",
|
|
3700
|
-
"strict": true,
|
|
3701
|
-
"isESM": true,
|
|
3702
|
-
"relativePath": [
|
|
3703
|
-
"dist",
|
|
3704
|
-
"commands",
|
|
3705
|
-
"telemetry",
|
|
3706
|
-
"status.js"
|
|
3707
|
-
]
|
|
3708
|
-
},
|
|
3709
3631
|
"schema:delete": {
|
|
3710
3632
|
"aliases": [],
|
|
3711
3633
|
"args": {},
|
|
@@ -4082,6 +4004,84 @@
|
|
|
4082
4004
|
"validate.js"
|
|
4083
4005
|
]
|
|
4084
4006
|
},
|
|
4007
|
+
"telemetry:disable": {
|
|
4008
|
+
"aliases": [],
|
|
4009
|
+
"args": {},
|
|
4010
|
+
"description": "Disable telemetry for your logged in user",
|
|
4011
|
+
"examples": [
|
|
4012
|
+
{
|
|
4013
|
+
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
4014
|
+
"description": "Disable telemetry for your logged in user"
|
|
4015
|
+
}
|
|
4016
|
+
],
|
|
4017
|
+
"flags": {},
|
|
4018
|
+
"hasDynamicHelp": false,
|
|
4019
|
+
"hiddenAliases": [],
|
|
4020
|
+
"id": "telemetry:disable",
|
|
4021
|
+
"pluginAlias": "@sanity/cli",
|
|
4022
|
+
"pluginName": "@sanity/cli",
|
|
4023
|
+
"pluginType": "core",
|
|
4024
|
+
"strict": true,
|
|
4025
|
+
"isESM": true,
|
|
4026
|
+
"relativePath": [
|
|
4027
|
+
"dist",
|
|
4028
|
+
"commands",
|
|
4029
|
+
"telemetry",
|
|
4030
|
+
"disable.js"
|
|
4031
|
+
]
|
|
4032
|
+
},
|
|
4033
|
+
"telemetry:enable": {
|
|
4034
|
+
"aliases": [],
|
|
4035
|
+
"args": {},
|
|
4036
|
+
"description": "Enable telemetry for your logged in user",
|
|
4037
|
+
"examples": [
|
|
4038
|
+
{
|
|
4039
|
+
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
4040
|
+
"description": "Enable telemetry for your logged in user"
|
|
4041
|
+
}
|
|
4042
|
+
],
|
|
4043
|
+
"flags": {},
|
|
4044
|
+
"hasDynamicHelp": false,
|
|
4045
|
+
"hiddenAliases": [],
|
|
4046
|
+
"id": "telemetry:enable",
|
|
4047
|
+
"pluginAlias": "@sanity/cli",
|
|
4048
|
+
"pluginName": "@sanity/cli",
|
|
4049
|
+
"pluginType": "core",
|
|
4050
|
+
"strict": true,
|
|
4051
|
+
"isESM": true,
|
|
4052
|
+
"relativePath": [
|
|
4053
|
+
"dist",
|
|
4054
|
+
"commands",
|
|
4055
|
+
"telemetry",
|
|
4056
|
+
"enable.js"
|
|
4057
|
+
]
|
|
4058
|
+
},
|
|
4059
|
+
"telemetry:status": {
|
|
4060
|
+
"aliases": [],
|
|
4061
|
+
"args": {},
|
|
4062
|
+
"description": "Check telemetry consent status for your logged in user",
|
|
4063
|
+
"examples": [
|
|
4064
|
+
{
|
|
4065
|
+
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
4066
|
+
"description": "Check telemetry consent status for your logged in user"
|
|
4067
|
+
}
|
|
4068
|
+
],
|
|
4069
|
+
"flags": {},
|
|
4070
|
+
"hasDynamicHelp": false,
|
|
4071
|
+
"hiddenAliases": [],
|
|
4072
|
+
"id": "telemetry:status",
|
|
4073
|
+
"pluginAlias": "@sanity/cli",
|
|
4074
|
+
"pluginName": "@sanity/cli",
|
|
4075
|
+
"pluginType": "core",
|
|
4076
|
+
"strict": true,
|
|
4077
|
+
"isESM": true,
|
|
4078
|
+
"relativePath": [
|
|
4079
|
+
"dist",
|
|
4080
|
+
"commands",
|
|
4081
|
+
"telemetry",
|
|
4082
|
+
"status.js"
|
|
4083
|
+
]
|
|
4084
|
+
},
|
|
4085
4085
|
"tokens:add": {
|
|
4086
4086
|
"aliases": [],
|
|
4087
4087
|
"args": {
|
|
@@ -4943,5 +4943,5 @@
|
|
|
4943
4943
|
]
|
|
4944
4944
|
}
|
|
4945
4945
|
},
|
|
4946
|
-
"version": "6.1.
|
|
4946
|
+
"version": "6.1.3"
|
|
4947
4947
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/cli",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.3",
|
|
4
4
|
"description": "Sanity CLI tool for managing Sanity projects and organizations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@babel/traverse": "^7.29.0",
|
|
55
54
|
"@oclif/core": "^4.8.3",
|
|
56
55
|
"@oclif/plugin-help": "^6.2.37",
|
|
57
56
|
"@oclif/plugin-not-found": "^3.2.74",
|
|
@@ -64,10 +63,10 @@
|
|
|
64
63
|
"@sanity/import": "^5.0.1",
|
|
65
64
|
"@sanity/migrate": "^6.0.0",
|
|
66
65
|
"@sanity/runtime-cli": "^14.5.0",
|
|
67
|
-
"@sanity/schema": "^5.
|
|
66
|
+
"@sanity/schema": "^5.15.0",
|
|
68
67
|
"@sanity/telemetry": "^0.8.1",
|
|
69
68
|
"@sanity/template-validator": "^3.0.0",
|
|
70
|
-
"@sanity/types": "^5.
|
|
69
|
+
"@sanity/types": "^5.15.0",
|
|
71
70
|
"@sanity/ui": "^3.1.13",
|
|
72
71
|
"@sanity/worker-channels": "^2.0.0",
|
|
73
72
|
"@vercel/frameworks": "3.8.4",
|
|
@@ -105,7 +104,6 @@
|
|
|
105
104
|
"react-dom": "^19.2.4",
|
|
106
105
|
"react-is": "^19.2.4",
|
|
107
106
|
"read-package-up": "^12.0.0",
|
|
108
|
-
"recast": "^0.23.11",
|
|
109
107
|
"rimraf": "^6.0.1",
|
|
110
108
|
"rxjs": "^7.8.2",
|
|
111
109
|
"semver": "^7.7.4",
|
|
@@ -120,14 +118,13 @@
|
|
|
120
118
|
"which": "^6.0.1",
|
|
121
119
|
"yaml": "^2.8.2",
|
|
122
120
|
"zod": "^4.3.6",
|
|
123
|
-
"@sanity/cli-core": "1.1.
|
|
121
|
+
"@sanity/cli-core": "1.1.1"
|
|
124
122
|
},
|
|
125
123
|
"devDependencies": {
|
|
126
124
|
"@eslint/compat": "^2.0.3",
|
|
127
125
|
"@sanity/pkg-utils": "^10.4.8",
|
|
128
126
|
"@swc/cli": "^0.8.0",
|
|
129
127
|
"@swc/core": "^1.15.18",
|
|
130
|
-
"@types/babel__traverse": "^7.28.0",
|
|
131
128
|
"@types/debug": "^4.1.12",
|
|
132
129
|
"@types/gunzip-maybe": "^1.4.3",
|
|
133
130
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -148,13 +145,13 @@
|
|
|
148
145
|
"oclif": "^4.22.85",
|
|
149
146
|
"publint": "^0.3.18",
|
|
150
147
|
"rimraf": "^6.0.1",
|
|
151
|
-
"sanity": "^5.
|
|
148
|
+
"sanity": "^5.15.0",
|
|
152
149
|
"typescript": "^5.9.3",
|
|
153
150
|
"vite-tsconfig-paths": "^6.1.1",
|
|
154
151
|
"vitest": "^4.0.18",
|
|
155
|
-
"@repo/tsconfig": "3.70.0",
|
|
156
|
-
"@sanity/cli-test": "0.2.2",
|
|
157
152
|
"@repo/package.config": "0.0.1",
|
|
153
|
+
"@repo/tsconfig": "3.70.0",
|
|
154
|
+
"@sanity/cli-test": "0.2.3",
|
|
158
155
|
"@sanity/eslint-config-cli": "1.0.0"
|
|
159
156
|
},
|
|
160
157
|
"engines": {
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { resolveLocalPackage } from '@sanity/cli-core';
|
|
3
|
-
import { ThemeProvider } from '@sanity/ui';
|
|
4
|
-
import { buildTheme } from '@sanity/ui/theme';
|
|
5
|
-
import { isValidElement } from 'react';
|
|
6
|
-
import { isValidElementType } from 'react-is';
|
|
7
|
-
const theme = buildTheme();
|
|
8
|
-
const SchemaIcon = async ({ icon, subtitle, title, workDir })=>{
|
|
9
|
-
const normalizedIcon = await normalizeIcon(icon, title, subtitle, workDir);
|
|
10
|
-
return /*#__PURE__*/ _jsx(ThemeProvider, {
|
|
11
|
-
theme: theme,
|
|
12
|
-
children: normalizedIcon
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
async function normalizeIcon(Icon, title, subtitle = '', workDir) {
|
|
16
|
-
if (isValidElementType(Icon)) return /*#__PURE__*/ _jsx(Icon, {});
|
|
17
|
-
if (/*#__PURE__*/ isValidElement(Icon)) return Icon;
|
|
18
|
-
const { createDefaultIcon } = await resolveLocalPackage('sanity', workDir);
|
|
19
|
-
return createDefaultIcon(title, subtitle);
|
|
20
|
-
}
|
|
21
|
-
export { SchemaIcon };
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=SchemaIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/manifest/SchemaIcon.tsx"],"sourcesContent":["import {resolveLocalPackage} from '@sanity/cli-core'\nimport {ThemeProvider} from '@sanity/ui'\nimport {buildTheme} from '@sanity/ui/theme'\nimport {type ComponentType, isValidElement, type ReactNode} from 'react'\nimport {isValidElementType} from 'react-is'\n\nconst theme = buildTheme()\n\ninterface SchemaIconProps {\n title: string\n workDir: string\n\n icon?: ComponentType | ReactNode\n subtitle?: string\n}\n\nconst SchemaIcon = async ({\n icon,\n subtitle,\n title,\n workDir,\n}: SchemaIconProps): Promise<React.JSX.Element> => {\n const normalizedIcon = await normalizeIcon(icon, title, subtitle, workDir)\n\n return <ThemeProvider theme={theme}>{normalizedIcon}</ThemeProvider>\n}\n\nasync function normalizeIcon(\n Icon: ComponentType | ReactNode | undefined,\n title: string,\n subtitle = '',\n workDir: string,\n): Promise<React.JSX.Element> {\n if (isValidElementType(Icon)) return <Icon />\n if (isValidElement(Icon)) return Icon\n\n const {createDefaultIcon} = await resolveLocalPackage<typeof import('sanity')>('sanity', workDir)\n\n return createDefaultIcon(title, subtitle)\n}\n\nexport {SchemaIcon}\nexport type {SchemaIconProps}\n"],"names":["resolveLocalPackage","ThemeProvider","buildTheme","isValidElement","isValidElementType","theme","SchemaIcon","icon","subtitle","title","workDir","normalizedIcon","normalizeIcon","Icon","createDefaultIcon"],"mappings":";AAAA,SAAQA,mBAAmB,QAAO,mBAAkB;AACpD,SAAQC,aAAa,QAAO,aAAY;AACxC,SAAQC,UAAU,QAAO,mBAAkB;AAC3C,SAA4BC,cAAc,QAAuB,QAAO;AACxE,SAAQC,kBAAkB,QAAO,WAAU;AAE3C,MAAMC,QAAQH;AAUd,MAAMI,aAAa,OAAO,EACxBC,IAAI,EACJC,QAAQ,EACRC,KAAK,EACLC,OAAO,EACS;IAChB,MAAMC,iBAAiB,MAAMC,cAAcL,MAAME,OAAOD,UAAUE;IAElE,qBAAO,KAACT;QAAcI,OAAOA;kBAAQM;;AACvC;AAEA,eAAeC,cACbC,IAA2C,EAC3CJ,KAAa,EACbD,WAAW,EAAE,EACbE,OAAe;IAEf,IAAIN,mBAAmBS,OAAO,qBAAO,KAACA;IACtC,kBAAIV,eAAeU,OAAO,OAAOA;IAEjC,MAAM,EAACC,iBAAiB,EAAC,GAAG,MAAMd,oBAA6C,UAAUU;IAEzF,OAAOI,kBAAkBL,OAAOD;AAClC;AAEA,SAAQF,UAAU,GAAC"}
|