@sanity/cli 6.3.2 → 6.4.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 +16 -10
- package/dist/actions/init/bootstrapLocalTemplate.js +16 -1
- package/dist/actions/init/bootstrapLocalTemplate.js.map +1 -1
- package/dist/actions/init/initApp.js +72 -0
- package/dist/actions/init/initApp.js.map +1 -0
- package/dist/actions/init/initHelpers.js +37 -0
- package/dist/actions/init/initHelpers.js.map +1 -0
- package/dist/actions/init/initNextJs.js +246 -0
- package/dist/actions/init/initNextJs.js.map +1 -0
- package/dist/actions/init/initStudio.js +127 -0
- package/dist/actions/init/initStudio.js.map +1 -0
- package/dist/actions/init/scaffoldTemplate.js +114 -0
- package/dist/actions/init/scaffoldTemplate.js.map +1 -0
- package/dist/actions/init/templates/appQuickstart.js +2 -1
- package/dist/actions/init/templates/appQuickstart.js.map +1 -1
- package/dist/actions/init/templates/appSanityUi.js +2 -1
- package/dist/actions/init/templates/appSanityUi.js.map +1 -1
- package/dist/actions/init/templates/shopify.js +6 -6
- package/dist/actions/init/templates/shopify.js.map +1 -1
- package/dist/actions/init/templates/shopifyOnline.js +2 -2
- package/dist/actions/init/templates/shopifyOnline.js.map +1 -1
- package/dist/actions/mcp/detectAvailableEditors.js +16 -3
- package/dist/actions/mcp/detectAvailableEditors.js.map +1 -1
- package/dist/actions/mcp/editorConfigs.js +192 -132
- package/dist/actions/mcp/editorConfigs.js.map +1 -1
- package/dist/actions/mcp/setupMCP.js +4 -1
- package/dist/actions/mcp/setupMCP.js.map +1 -1
- package/dist/actions/mcp/writeMCPConfig.js +2 -2
- package/dist/actions/mcp/writeMCPConfig.js.map +1 -1
- package/dist/actions/schema/extractSchema.js +5 -7
- package/dist/actions/schema/extractSchema.js.map +1 -1
- package/dist/commands/datasets/copy.js +14 -0
- package/dist/commands/datasets/copy.js.map +1 -1
- package/dist/commands/init.js +149 -482
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mcp/configure.js +1 -1
- package/dist/commands/mcp/configure.js.map +1 -1
- package/dist/hooks/prerun/injectEnvVariables.js +3 -5
- package/dist/hooks/prerun/injectEnvVariables.js.map +1 -1
- package/dist/services/datasets.js +2 -1
- package/dist/services/datasets.js.map +1 -1
- package/dist/telemetry/init.telemetry.js.map +1 -1
- package/dist/util/packageManager/installationInfo/detectPackages.js +13 -7
- package/dist/util/packageManager/installationInfo/detectPackages.js.map +1 -1
- package/dist/util/update/fetchUpdateInfo.js +40 -0
- package/dist/util/update/fetchUpdateInfo.js.map +1 -0
- package/dist/util/update/fetchUpdateInfo.worker.js +19 -0
- package/dist/util/update/fetchUpdateInfo.worker.js.map +1 -0
- package/dist/util/update/getRunnerUpdateCommand.js +33 -0
- package/dist/util/update/getRunnerUpdateCommand.js.map +1 -0
- package/dist/util/update/getUpdateCommand.js +6 -7
- package/dist/util/update/getUpdateCommand.js.map +1 -1
- package/dist/util/update/packageRunner.js +10 -0
- package/dist/util/update/packageRunner.js.map +1 -0
- package/dist/util/update/resolveRunnerPackage.js +45 -0
- package/dist/util/update/resolveRunnerPackage.js.map +1 -0
- package/dist/util/update/resolveUpdateTarget.js +31 -0
- package/dist/util/update/resolveUpdateTarget.js.map +1 -0
- package/dist/util/update/showNotificationUpdate.js +8 -6
- package/dist/util/update/showNotificationUpdate.js.map +1 -1
- package/dist/util/update/updateChecker.js +73 -38
- package/dist/util/update/updateChecker.js.map +1 -1
- package/oclif.manifest.json +540 -525
- package/package.json +6 -6
- package/templates/app-quickstart/src/App.tsx +2 -2
- package/templates/app-sanity-ui/src/App.tsx +2 -2
- package/templates/shopify/schemaTypes/objects/hotspot/imageWithProductHotspotsType.ts +1 -1
- package/dist/util/update/fetchLatestVersion.js +0 -21
- package/dist/util/update/fetchLatestVersion.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.4.0",
|
|
4
4
|
"description": "Sanity CLI tool for managing Sanity projects and organizations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@oclif/core": "^4.10.5",
|
|
56
|
-
"@oclif/plugin-help": "^6.2.
|
|
56
|
+
"@oclif/plugin-help": "^6.2.44",
|
|
57
57
|
"@oclif/plugin-not-found": "^3.2.80",
|
|
58
58
|
"@sanity/client": "^7.21.0",
|
|
59
59
|
"@sanity/codegen": "^6.0.2",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"@eslint/compat": "^2.0.3",
|
|
126
126
|
"@sanity/pkg-utils": "^10.4.14",
|
|
127
127
|
"@swc/cli": "^0.8.1",
|
|
128
|
-
"@swc/core": "^1.15.
|
|
128
|
+
"@swc/core": "^1.15.26",
|
|
129
129
|
"@types/debug": "^4.1.13",
|
|
130
130
|
"@types/gunzip-maybe": "^1.4.3",
|
|
131
131
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"@types/tar-fs": "^2.0.4",
|
|
140
140
|
"@types/tar-stream": "^3.1.4",
|
|
141
141
|
"@types/which": "^3.0.4",
|
|
142
|
-
"@vitest/coverage-istanbul": "^4.1.
|
|
142
|
+
"@vitest/coverage-istanbul": "^4.1.4",
|
|
143
143
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
144
144
|
"eslint": "^10.1.0",
|
|
145
145
|
"nock": "^14.0.12",
|
|
@@ -149,10 +149,10 @@
|
|
|
149
149
|
"sanity": "^5.20.0",
|
|
150
150
|
"typescript": "^5.9.3",
|
|
151
151
|
"vite-tsconfig-paths": "^6.1.1",
|
|
152
|
-
"vitest": "^4.1.
|
|
152
|
+
"vitest": "^4.1.4",
|
|
153
153
|
"@repo/package.config": "0.0.1",
|
|
154
|
-
"@repo/tsconfig": "3.70.0",
|
|
155
154
|
"@sanity/cli-test": "0.3.1",
|
|
155
|
+
"@repo/tsconfig": "3.70.0",
|
|
156
156
|
"@sanity/eslint-config-cli": "1.1.0"
|
|
157
157
|
},
|
|
158
158
|
"engines": {
|
|
@@ -38,7 +38,7 @@ export const imageWithProductHotspotsType = defineField({
|
|
|
38
38
|
return {
|
|
39
39
|
media: image,
|
|
40
40
|
subtitle:
|
|
41
|
-
showHotspots && hotspots.length > 0
|
|
41
|
+
showHotspots && hotspots && hotspots.length > 0
|
|
42
42
|
? `${pluralize('hotspot', hotspots.length, true)}`
|
|
43
43
|
: undefined,
|
|
44
44
|
title: fileName,
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { subdebug } from '@sanity/cli-core';
|
|
2
|
-
import { getLatestVersion } from 'get-latest-version';
|
|
3
|
-
import { promiseRaceWithTimeout } from '../promiseRaceWithTimeout.js';
|
|
4
|
-
const debug = subdebug('updateChecker');
|
|
5
|
-
/**
|
|
6
|
-
* Fetch the latest version from npm with a timeout
|
|
7
|
-
*/ export async function fetchLatestVersion(packageName, timeout) {
|
|
8
|
-
try {
|
|
9
|
-
const result = await promiseRaceWithTimeout(getLatestVersion(packageName), timeout);
|
|
10
|
-
if (result === null) {
|
|
11
|
-
debug(`Max time ${timeout} reached waiting for latest version info`);
|
|
12
|
-
}
|
|
13
|
-
debug('Latest remote version is %s', result);
|
|
14
|
-
return result;
|
|
15
|
-
} catch (err) {
|
|
16
|
-
debug(`Failed to fetch latest version of ${packageName} from npm:\n${err instanceof Error ? err.stack : String(err)}`);
|
|
17
|
-
throw err;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=fetchLatestVersion.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/util/update/fetchLatestVersion.ts"],"sourcesContent":["import {subdebug} from '@sanity/cli-core'\nimport {getLatestVersion} from 'get-latest-version'\n\nimport {promiseRaceWithTimeout} from '../promiseRaceWithTimeout.js'\n\nconst debug = subdebug('updateChecker')\n\n/**\n * Fetch the latest version from npm with a timeout\n */\nexport async function fetchLatestVersion(\n packageName: string,\n timeout: number,\n): Promise<string | null | undefined> {\n try {\n const result = await promiseRaceWithTimeout(getLatestVersion(packageName), timeout)\n\n if (result === null) {\n debug(`Max time ${timeout} reached waiting for latest version info`)\n }\n\n debug('Latest remote version is %s', result)\n\n return result\n } catch (err) {\n debug(\n `Failed to fetch latest version of ${packageName} from npm:\\n${err instanceof Error ? err.stack : String(err)}`,\n )\n throw err\n }\n}\n"],"names":["subdebug","getLatestVersion","promiseRaceWithTimeout","debug","fetchLatestVersion","packageName","timeout","result","err","Error","stack","String"],"mappings":"AAAA,SAAQA,QAAQ,QAAO,mBAAkB;AACzC,SAAQC,gBAAgB,QAAO,qBAAoB;AAEnD,SAAQC,sBAAsB,QAAO,+BAA8B;AAEnE,MAAMC,QAAQH,SAAS;AAEvB;;CAEC,GACD,OAAO,eAAeI,mBACpBC,WAAmB,EACnBC,OAAe;IAEf,IAAI;QACF,MAAMC,SAAS,MAAML,uBAAuBD,iBAAiBI,cAAcC;QAE3E,IAAIC,WAAW,MAAM;YACnBJ,MAAM,CAAC,SAAS,EAAEG,QAAQ,wCAAwC,CAAC;QACrE;QAEAH,MAAM,+BAA+BI;QAErC,OAAOA;IACT,EAAE,OAAOC,KAAK;QACZL,MACE,CAAC,kCAAkC,EAAEE,YAAY,YAAY,EAAEG,eAAeC,QAAQD,IAAIE,KAAK,GAAGC,OAAOH,MAAM;QAEjH,MAAMA;IACR;AACF"}
|