doc2mcp 0.1.15 → 0.1.16
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/dist/index.js +12 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -358,28 +358,35 @@ function mergeVscodeMcp(existing, incoming) {
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
// src/installers/install.ts
|
|
361
|
+
function unwrapConfig(value) {
|
|
362
|
+
const nested = value.config;
|
|
363
|
+
if (nested && typeof nested === "object" && !Array.isArray(nested)) {
|
|
364
|
+
return nested;
|
|
365
|
+
}
|
|
366
|
+
return value;
|
|
367
|
+
}
|
|
361
368
|
async function installToClient(client, configPath, payload) {
|
|
362
369
|
if (client === "cursor") {
|
|
363
370
|
const existing = await readJsonFile(configPath);
|
|
364
|
-
const merged = mergeMcpServers(existing, payload.cursor);
|
|
371
|
+
const merged = mergeMcpServers(existing, unwrapConfig(payload.cursor));
|
|
365
372
|
await writeJsonFile(configPath, merged);
|
|
366
373
|
return;
|
|
367
374
|
}
|
|
368
375
|
if (client === "vscode") {
|
|
369
376
|
const existing = await readJsonFile(configPath);
|
|
370
|
-
const merged = mergeVscodeMcp(existing, payload.vscode);
|
|
377
|
+
const merged = mergeVscodeMcp(existing, unwrapConfig(payload.vscode));
|
|
371
378
|
await writeJsonFile(configPath, merged);
|
|
372
379
|
return;
|
|
373
380
|
}
|
|
374
381
|
if (client === "windsurf") {
|
|
375
382
|
const existing = await readJsonFile(configPath);
|
|
376
|
-
const merged = mergeMcpServers(existing, payload.windsurf);
|
|
383
|
+
const merged = mergeMcpServers(existing, unwrapConfig(payload.windsurf));
|
|
377
384
|
await writeJsonFile(configPath, merged);
|
|
378
385
|
return;
|
|
379
386
|
}
|
|
380
387
|
if (client === "claude") {
|
|
381
388
|
const existing = await readJsonFile(configPath);
|
|
382
|
-
const merged = mergeMcpServers(existing, payload.claude);
|
|
389
|
+
const merged = mergeMcpServers(existing, unwrapConfig(payload.claude));
|
|
383
390
|
await writeJsonFile(configPath, merged);
|
|
384
391
|
}
|
|
385
392
|
}
|
|
@@ -534,7 +541,7 @@ async function runList() {
|
|
|
534
541
|
|
|
535
542
|
// src/index.ts
|
|
536
543
|
var program = new Command();
|
|
537
|
-
program.name("doc2mcp").description("Generate documentation MCP servers from your terminal").version("0.1.
|
|
544
|
+
program.name("doc2mcp").description("Generate documentation MCP servers from your terminal").version("0.1.16", "-v, --version", "Print the installed CLI version");
|
|
538
545
|
program.command("login").description("Authorize the CLI via browser").action(async () => {
|
|
539
546
|
await runLogin();
|
|
540
547
|
});
|
package/package.json
CHANGED