@teambit/cli-mcp-server 0.0.162 → 0.0.163

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.
@@ -1,5 +1,5 @@
1
1
  ;
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.mcp_cli-mcp-server@0.0.162/dist/README.docs.mdx';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.mcp_cli-mcp-server@0.0.163/dist/README.docs.mdx';
3
3
 
4
4
  export const compositions = [];
5
5
  export const overview = [overview_0];
package/dist/setup-cmd.js CHANGED
@@ -4,14 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.McpSetupCmd = void 0;
7
- function _chalk() {
8
- const data = _interopRequireDefault(require("chalk"));
9
- _chalk = function () {
7
+ function _cli() {
8
+ const data = require("@teambit/cli");
9
+ _cli = function () {
10
10
  return data;
11
11
  };
12
12
  return data;
13
13
  }
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
14
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
16
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
17
16
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -46,12 +45,12 @@ class McpSetupCmd {
46
45
 
47
46
  // Special message for Claude Code to mention restart requirement
48
47
  if (editor.toLowerCase() === 'claude-code') {
49
- return _chalk().default.green(`✓ Successfully configured ${editorName} MCP integration (${scope})\n` + ` Configuration written to: ${_chalk().default.cyan(configPath)}\n` + ` ${_chalk().default.yellow('Note:')} Restart Claude Code to use the Bit MCP tools.`);
48
+ return [(0, _cli().formatSuccessSummary)(`configured ${editorName} MCP integration (${scope})`), ` Configuration written to: ${configPath}`, (0, _cli().formatHint)(` Restart Claude Code to use the Bit MCP tools.`)].join('\n');
50
49
  }
51
- return _chalk().default.green(`✓ Successfully configured ${editorName} MCP integration (${scope})\n` + ` Configuration written to: ${_chalk().default.cyan(configPath)}`);
50
+ return [(0, _cli().formatSuccessSummary)(`configured ${editorName} MCP integration (${scope})`), ` Configuration written to: ${configPath}`].join('\n');
52
51
  } catch (error) {
53
52
  const editorName = this.mcpServerMain.getEditorDisplayName(editor);
54
- return _chalk().default.red(`Error setting up ${editorName} integration: ${error.message}`);
53
+ return `${_cli().errorSymbol} Error setting up ${editorName} integration: ${error.message}`;
55
54
  }
56
55
  }
57
56
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","McpSetupCmd","constructor","mcpServerMain","name","description","report","editor","consumerProject","includeAdditional","global","isGlobal","setupEditor","scope","editorName","getEditorDisplayName","configPath","getEditorConfigPath","toLowerCase","chalk","green","cyan","yellow","error","red","message","exports"],"sources":["setup-cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport type { CliMcpServerMain } from './cli-mcp-server.main.runtime';\n\nexport type McpSetupCmdOptions = {\n consumerProject?: boolean;\n includeAdditional?: string;\n global?: boolean;\n};\n\nexport class McpSetupCmd implements Command {\n name = 'setup [editor]';\n description = 'Setup MCP integration with VS Code, Cursor, Windsurf, Roo Code, Cline, Claude Code, or other editors';\n extendedDescription =\n 'Creates or updates configuration files to integrate Bit MCP server with supported editors. Currently supports VS Code, Cursor, Windsurf, Roo Code, Cline, and Claude Code.';\n arguments = [\n {\n name: 'editor',\n description: 'Editor to setup (default: vscode). Available: vscode, cursor, windsurf, roo, cline, claude-code',\n },\n ];\n options = [\n ['', 'consumer-project', 'Configure for non-Bit workspaces that only consume Bit component packages'],\n [\n '',\n 'include-additional <commands>',\n 'Add specific commands to the default MCP tools set. Use comma-separated list in quotes',\n ],\n ['g', 'global', 'Setup global configuration (default: workspace-specific)'],\n ] as CommandOptions;\n\n constructor(private mcpServerMain: CliMcpServerMain) {}\n\n async report(\n [editor = 'vscode']: [string],\n { consumerProject, includeAdditional, global: isGlobal = false }: McpSetupCmdOptions\n ): Promise<string> {\n try {\n await this.mcpServerMain.setupEditor(editor, {\n consumerProject,\n includeAdditional,\n isGlobal,\n });\n\n const scope = isGlobal ? 'global' : 'workspace';\n const editorName = this.mcpServerMain.getEditorDisplayName(editor);\n\n // Get the config file path based on the editor type\n const configPath = this.mcpServerMain.getEditorConfigPath(editor, isGlobal);\n\n // Special message for Claude Code to mention restart requirement\n if (editor.toLowerCase() === 'claude-code') {\n return chalk.green(\n `✓ Successfully configured ${editorName} MCP integration (${scope})\\n` +\n ` Configuration written to: ${chalk.cyan(configPath)}\\n` +\n ` ${chalk.yellow('Note:')} Restart Claude Code to use the Bit MCP tools.`\n );\n }\n\n return chalk.green(\n `✓ Successfully configured ${editorName} MCP integration (${scope})\\n` +\n ` Configuration written to: ${chalk.cyan(configPath)}`\n );\n } catch (error) {\n const editorName = this.mcpServerMain.getEditorDisplayName(editor);\n return chalk.red(`Error setting up ${editorName} integration: ${(error as Error).message}`);\n }\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EA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AAEC,MAAM,EAAEC,QAAQ,GAAG;EAA0B,CAAC,EACnE;IACjB,IAAI;MACF,MAAM,IAAI,CAACR,aAAa,CAACS,WAAW,CAACL,MAAM,EAAE;QAC3CC,eAAe;QACfC,iBAAiB;QACjBE;MACF,CAAC,CAAC;MAEF,MAAME,KAAK,GAAGF,QAAQ,GAAG,QAAQ,GAAG,WAAW;MAC/C,MAAMG,UAAU,GAAG,IAAI,CAACX,aAAa,CAACY,oBAAoB,CAACR,MAAM,CAAC;;MAElE;MACA,MAAMS,UAAU,GAAG,IAAI,CAACb,aAAa,CAACc,mBAAmB,CAACV,MAAM,EAAEI,QAAQ,CAAC;;MAE3E;MACA,IAAIJ,MAAM,CAACW,WAAW,CAAC,CAAC,KAAK,aAAa,EAAE;QAC1C,OAAOC,gBAAK,CAACC,KAAK,CAChB,6BAA6BN,UAAU,qBAAqBD,KAAK,KAAK,GACpE,+BAA+BM,gBAAK,CAACE,IAAI,CAACL,UAAU,CAAC,IAAI,GACzD,KAAKG,gBAAK,CAACG,MAAM,CAAC,OAAO,CAAC,gDAC9B,CAAC;MACH;MAEA,OAAOH,gBAAK,CAACC,KAAK,CAChB,6BAA6BN,UAAU,qBAAqBD,KAAK,KAAK,GACpE,+BAA+BM,gBAAK,CAACE,IAAI,CAACL,UAAU,CAAC,EACzD,CAAC;IACH,CAAC,CAAC,OAAOO,KAAK,EAAE;MACd,MAAMT,UAAU,GAAG,IAAI,CAACX,aAAa,CAACY,oBAAoB,CAACR,MAAM,CAAC;MAClE,OAAOY,gBAAK,CAACK,GAAG,CAAC,oBAAoBV,UAAU,iBAAkBS,KAAK,CAAWE,OAAO,EAAE,CAAC;IAC7F;EACF;AACF;AAACC,OAAA,CAAAzB,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"names":["_cli","data","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","McpSetupCmd","constructor","mcpServerMain","name","description","report","editor","consumerProject","includeAdditional","global","isGlobal","setupEditor","scope","editorName","getEditorDisplayName","configPath","getEditorConfigPath","toLowerCase","formatSuccessSummary","formatHint","join","error","errorSymbol","message","exports"],"sources":["setup-cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport { formatSuccessSummary, formatHint, errorSymbol } from '@teambit/cli';\nimport type { CliMcpServerMain } from './cli-mcp-server.main.runtime';\n\nexport type McpSetupCmdOptions = {\n consumerProject?: boolean;\n includeAdditional?: string;\n global?: boolean;\n};\n\nexport class McpSetupCmd implements Command {\n name = 'setup [editor]';\n description = 'Setup MCP integration with VS Code, Cursor, Windsurf, Roo Code, Cline, Claude Code, or other editors';\n extendedDescription =\n 'Creates or updates configuration files to integrate Bit MCP server with supported editors. Currently supports VS Code, Cursor, Windsurf, Roo Code, Cline, and Claude Code.';\n arguments = [\n {\n name: 'editor',\n description: 'Editor to setup (default: vscode). Available: vscode, cursor, windsurf, roo, cline, claude-code',\n },\n ];\n options = [\n ['', 'consumer-project', 'Configure for non-Bit workspaces that only consume Bit component packages'],\n [\n '',\n 'include-additional <commands>',\n 'Add specific commands to the default MCP tools set. Use comma-separated list in quotes',\n ],\n ['g', 'global', 'Setup global configuration (default: workspace-specific)'],\n ] as CommandOptions;\n\n constructor(private mcpServerMain: CliMcpServerMain) {}\n\n async report(\n [editor = 'vscode']: [string],\n { consumerProject, includeAdditional, global: isGlobal = false }: McpSetupCmdOptions\n ): Promise<string> {\n try {\n await this.mcpServerMain.setupEditor(editor, {\n consumerProject,\n includeAdditional,\n isGlobal,\n });\n\n const scope = isGlobal ? 'global' : 'workspace';\n const editorName = this.mcpServerMain.getEditorDisplayName(editor);\n\n // Get the config file path based on the editor type\n const configPath = this.mcpServerMain.getEditorConfigPath(editor, isGlobal);\n\n // Special message for Claude Code to mention restart requirement\n if (editor.toLowerCase() === 'claude-code') {\n return [\n formatSuccessSummary(`configured ${editorName} MCP integration (${scope})`),\n ` Configuration written to: ${configPath}`,\n formatHint(` Restart Claude Code to use the Bit MCP tools.`),\n ].join('\\n');\n }\n\n return [\n formatSuccessSummary(`configured ${editorName} MCP integration (${scope})`),\n ` Configuration written to: ${configPath}`,\n ].join('\\n');\n } catch (error) {\n const editorName = this.mcpServerMain.getEditorDisplayName(editor);\n return `${errorSymbol} Error setting up ${editorName} integration: ${(error as Error).message}`;\n }\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6E,SAAAE,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAStE,MAAMgB,WAAW,CAAoB;EAqB1CC,WAAWA,CAASC,aAA+B,EAAE;IAAA,KAAjCA,aAA+B,GAA/BA,aAA+B;IAAArB,eAAA,eApB5C,gBAAgB;I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AI,CAAC;IACd,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAMR,UAAU,GAAG,IAAI,CAACX,aAAa,CAACY,oBAAoB,CAACR,MAAM,CAAC;MAClE,OAAO,GAAGgB,kBAAW,qBAAqBT,UAAU,iBAAkBQ,KAAK,CAAWE,OAAO,EAAE;IACjG;EACF;AACF;AAACC,OAAA,CAAAxB,WAAA,GAAAA,WAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/cli-mcp-server",
3
- "version": "0.0.162",
3
+ "version": "0.0.163",
4
4
  "homepage": "https://bit.cloud/teambit/mcp/cli-mcp-server",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.mcp",
8
8
  "name": "cli-mcp-server",
9
- "version": "0.0.162"
9
+ "version": "0.0.163"
10
10
  },
11
11
  "dependencies": {
12
12
  "comment-json": "4.2.5",
@@ -18,25 +18,25 @@
18
18
  "lodash": "4.17.21",
19
19
  "chalk": "4.1.2",
20
20
  "@teambit/harmony": "0.4.7",
21
+ "@teambit/legacy.constants": "0.0.26",
21
22
  "@teambit/mcp.mcp-config-writer": "0.0.8",
23
+ "@teambit/scope.network": "0.0.107",
22
24
  "@teambit/component-id": "1.2.4",
23
25
  "@teambit/component.modules.component-url": "0.0.187",
24
- "@teambit/cli": "0.0.1314",
25
- "@teambit/legacy.constants": "0.0.26",
26
- "@teambit/logger": "0.0.1407",
27
- "@teambit/scope.network": "0.0.107",
28
26
  "@teambit/legacy.consumer": "0.0.107",
29
27
  "@teambit/pkg.modules.component-package-name": "0.0.114",
30
- "@teambit/scope.remotes": "0.0.107"
28
+ "@teambit/scope.remotes": "0.0.107",
29
+ "@teambit/cli": "0.0.1315",
30
+ "@teambit/logger": "0.0.1408"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/fs-extra": "9.0.7",
34
34
  "@types/node-fetch": "2.5.12",
35
35
  "@types/lodash": "4.14.165",
36
- "@teambit/harmony.envs.core-aspect-env": "0.1.4",
37
36
  "@teambit/component.testing.mock-components": "0.0.376",
38
37
  "@teambit/harmony.testing.load-aspect": "0.0.371",
39
- "@teambit/workspace.testing.mock-workspace": "0.0.173"
38
+ "@teambit/workspace.testing.mock-workspace": "0.0.173",
39
+ "@teambit/harmony.envs.core-aspect-env": "0.1.4"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "chai": "5.2.1",