@sanity/cli 5.2.1-next.2 → 5.3.0-next.4
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
CHANGED
|
@@ -39774,7 +39774,7 @@ function readPackageJson(filePath) {
|
|
|
39774
39774
|
return;
|
|
39775
39775
|
}
|
|
39776
39776
|
}
|
|
39777
|
-
const MCP_SERVER_URL = "https://mcp.sanity.io"
|
|
39777
|
+
const MCP_SERVER_URL = "https://mcp.sanity.io", NO_EDITORS_DETECTED_MESSAGE = `Couldn't auto-configure Sanity MCP server for your editor. Visit ${MCP_SERVER_URL} for setup instructions.`;
|
|
39778
39778
|
async function detectAvailableEditors() {
|
|
39779
39779
|
const editors = [], homeDir = os__default.default.homedir(), cursorDir = path__default.default.join(homeDir, ".cursor");
|
|
39780
39780
|
fs$1.existsSync(cursorDir) && editors.push({
|
|
@@ -39885,7 +39885,7 @@ async function setupMCP(context, options2) {
|
|
|
39885
39885
|
};
|
|
39886
39886
|
const detected = await detectAvailableEditors(), detectedEditors = detected.map((e) => e.name);
|
|
39887
39887
|
if (detected.length === 0)
|
|
39888
|
-
return output.warn(
|
|
39888
|
+
return output.warn(NO_EDITORS_DETECTED_MESSAGE), {
|
|
39889
39889
|
detectedEditors,
|
|
39890
39890
|
configuredEditors: [],
|
|
39891
39891
|
skipped: !0
|
|
@@ -41437,7 +41437,7 @@ Examples
|
|
|
41437
41437
|
async action(args, context) {
|
|
41438
41438
|
const { output, telemetry: telemetry2 } = context, trace = telemetry2.trace(MCPConfigureTrace);
|
|
41439
41439
|
if ((await detectAvailableEditors()).length === 0) {
|
|
41440
|
-
output.print(
|
|
41440
|
+
output.print(NO_EDITORS_DETECTED_MESSAGE), trace.log({
|
|
41441
41441
|
detectedEditors: [],
|
|
41442
41442
|
configuredEditors: []
|
|
41443
41443
|
}), trace.complete();
|