@sanity/cli 5.0.0-next-major.6 → 5.0.0-next-major.20251212101828
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
|
@@ -4027,14 +4027,10 @@ Examples:
|
|
|
4027
4027
|
requireProject: !1
|
|
4028
4028
|
}), { token: token2 } = client2.config();
|
|
4029
4029
|
if (!token2) throw new Error("No API token found. Please run `sanity login`.");
|
|
4030
|
-
const {
|
|
4030
|
+
const { blueprintDoctorCore } = await import("@sanity/runtime-cli/cores/blueprints"), { success, error: error2 } = await blueprintDoctorCore({
|
|
4031
4031
|
bin: "sanity",
|
|
4032
4032
|
log: (message) => output.print(message),
|
|
4033
|
-
token: token2
|
|
4034
|
-
});
|
|
4035
|
-
if (!cmdConfig.ok) throw new Error(cmdConfig.error);
|
|
4036
|
-
const { success, error: error2 } = await blueprintDoctorCore({
|
|
4037
|
-
...cmdConfig.value,
|
|
4033
|
+
token: token2,
|
|
4038
4034
|
flags
|
|
4039
4035
|
});
|
|
4040
4036
|
if (!success) throw new Error(error2);
|
|
@@ -42056,7 +42052,7 @@ async function promptForMCPSetup(prompt2, detectedEditors, editorsWithExisting)
|
|
|
42056
42052
|
{
|
|
42057
42053
|
type: "checkbox",
|
|
42058
42054
|
name: "selectedEditors",
|
|
42059
|
-
message: "Configure Sanity MCP server",
|
|
42055
|
+
message: "Configure Sanity MCP server?",
|
|
42060
42056
|
choices: editorChoices
|
|
42061
42057
|
}
|
|
42062
42058
|
])).selectedEditors;
|
|
@@ -42123,8 +42119,8 @@ async function setupMCP(context, options2) {
|
|
|
42123
42119
|
return null;
|
|
42124
42120
|
const token2 = await createMCPToken(context.apiClient);
|
|
42125
42121
|
for (const editor2 of selected)
|
|
42126
|
-
await writeMCPConfig(editor2, token2)
|
|
42127
|
-
return selected;
|
|
42122
|
+
await writeMCPConfig(editor2, token2);
|
|
42123
|
+
return output.success(`MCP configured for ${selected.map((e) => e.name).join(", ")}`), selected;
|
|
42128
42124
|
} catch (error2) {
|
|
42129
42125
|
return output.warn(`Could not configure MCP: ${error2 instanceof Error ? error2.message : `${error2}`}`), output.warn("You can set up MCP manually later using https://mcp.sanity.io"), null;
|
|
42130
42126
|
}
|