rush-ai 0.16.0 → 0.16.2

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 CHANGED
@@ -4649,6 +4649,11 @@ var ClaudeCodeInstaller = class {
4649
4649
  plugin.manifest,
4650
4650
  this.rushBinaryResolver
4651
4651
  );
4652
+ if (normalizedMcp && Object.keys(normalizedMcp).length > 0) {
4653
+ const mcpJsonPath = resolve11(pluginVersionDir, ".mcp.json");
4654
+ await writeJsonFile(mcpJsonPath, { mcpServers: normalizedMcp });
4655
+ writtenFiles.push(mcpJsonPath);
4656
+ }
4652
4657
  const pluginJsonContent = buildPluginJson(plugin, normalizedMcp);
4653
4658
  await writeJsonFile(manifestPath, pluginJsonContent);
4654
4659
  writtenFiles.push(manifestPath);
@@ -4927,6 +4932,14 @@ var ClaudeCodeInstaller = class {
4927
4932
  dryFiles.push(...plannedFiles);
4928
4933
  }
4929
4934
  dryFiles.push(this.paths.pluginManifestPath(ref, version));
4935
+ const normalizedMcpDry = normalizeClaudeMcpServers(
4936
+ ref,
4937
+ plugin.manifest,
4938
+ this.rushBinaryResolver
4939
+ );
4940
+ if (normalizedMcpDry && Object.keys(normalizedMcpDry).length > 0) {
4941
+ dryFiles.push(resolve11(pluginVersionDir, ".mcp.json"));
4942
+ }
4930
4943
  if (this.marketplaceSource) {
4931
4944
  const mktInstallDir = this.paths.marketplaceInstallDir(ref.marketplace);
4932
4945
  if (await inodeKind(mktInstallDir) === "missing") {
@@ -5374,6 +5387,19 @@ var ClaudeCodeInstaller = class {
5374
5387
  () => ({})
5375
5388
  );
5376
5389
  const servers = data.mcpServers;
5390
+ if (typeof servers === "string") {
5391
+ const mcpJsonPath = resolve11(dirname4(manifestPath), "..", servers);
5392
+ if (!await pathExists(mcpJsonPath)) return [];
5393
+ const { data: mcpData } = await readJsonFile(
5394
+ mcpJsonPath,
5395
+ () => ({})
5396
+ );
5397
+ const mcpServers = mcpData.mcpServers;
5398
+ if (!mcpServers || typeof mcpServers !== "object" || Array.isArray(mcpServers)) {
5399
+ return [];
5400
+ }
5401
+ return Object.keys(mcpServers);
5402
+ }
5377
5403
  if (!servers || typeof servers !== "object" || Array.isArray(servers)) {
5378
5404
  return [];
5379
5405
  }
@@ -5417,7 +5443,7 @@ function buildPluginJson(plugin, mcpServers) {
5417
5443
  } = manifest;
5418
5444
  const out = { ...rest };
5419
5445
  if (mcpServers && Object.keys(mcpServers).length > 0) {
5420
- out.mcpServers = mcpServers;
5446
+ out.mcpServers = "./.mcp.json";
5421
5447
  }
5422
5448
  return out;
5423
5449
  }