opencode-azure-setup 1.0.3 → 1.0.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/index.js +29 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -364,6 +364,35 @@ async function main() {
|
|
|
364
364
|
},
|
|
365
365
|
};
|
|
366
366
|
|
|
367
|
+
// Install and configure MCP Marketplace
|
|
368
|
+
console.log();
|
|
369
|
+
console.log(colors.blue + 'Setting up MCP Marketplace...' + colors.reset);
|
|
370
|
+
|
|
371
|
+
const mcpDir = path.join(os.homedir(), '.config', 'opencode', 'mcps');
|
|
372
|
+
fs.mkdirSync(mcpDir, { recursive: true });
|
|
373
|
+
|
|
374
|
+
try {
|
|
375
|
+
const { execFileSync } = await import('child_process');
|
|
376
|
+
|
|
377
|
+
// Install mcp-marketplace package globally
|
|
378
|
+
execFileSync('npm', ['install', '-g', 'opencode-mcp-marketplace'], { stdio: 'pipe' });
|
|
379
|
+
|
|
380
|
+
// Find the installed package path
|
|
381
|
+
const npmRoot = execFileSync('npm', ['root', '-g'], { encoding: 'utf-8' }).trim();
|
|
382
|
+
const mcpPath = path.join(npmRoot, 'opencode-mcp-marketplace', 'dist', 'index.js');
|
|
383
|
+
|
|
384
|
+
// Add to config
|
|
385
|
+
config.mcp = config.mcp || {};
|
|
386
|
+
config.mcp['mcp-marketplace'] = {
|
|
387
|
+
command: 'node',
|
|
388
|
+
args: [mcpPath],
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
console.log(colors.green + '✓ MCP Marketplace installed!' + colors.reset);
|
|
392
|
+
} catch (e) {
|
|
393
|
+
console.log(colors.yellow + '⚠ MCP Marketplace install skipped (npm not available or failed)' + colors.reset);
|
|
394
|
+
}
|
|
395
|
+
|
|
367
396
|
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
368
397
|
|
|
369
398
|
console.log();
|