@lorrylurui/code-intelligence-mcp 1.1.12 → 1.1.13

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.
@@ -19,6 +19,10 @@ for (const arg of process.argv) {
19
19
  // MCP Server 本地 .env 路径(固定指向项目根目录)
20
20
  const MCP_SERVER_ROOT = path.resolve(__dirname, '..', '..'); // MCP Server 根目录
21
21
  const MCP_SERVER_ENV_PATH = path.resolve(MCP_SERVER_ROOT, '.env');
22
+ dotenv.config({
23
+ path: MCP_SERVER_ENV_PATH,
24
+ override: false, // 不覆盖已存在的变量
25
+ });
22
26
  /**
23
27
  * 从指定项目根目录加载 .env 到 process.env
24
28
  * 行为:优先使用第三方显式设置的值,否则保留 MCP Server 本地配置
@@ -26,10 +30,6 @@ const MCP_SERVER_ENV_PATH = path.resolve(MCP_SERVER_ROOT, '.env');
26
30
  export function loadProjectDotenv(projectRoot) {
27
31
  // 始终确保 MCP Server 本地的 .env 被加载(补充加载,确保有默认值)
28
32
  // if (existsSync(MCP_SERVER_ENV_PATH)) {
29
- dotenv.config({
30
- path: MCP_SERVER_ENV_PATH,
31
- override: false, // 不覆盖已存在的变量
32
- });
33
33
  // }
34
34
  const envPath = path.resolve(projectRoot, '.env');
35
35
  if (!existsSync(envPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lorrylurui/code-intelligence-mcp",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "private": false,
5
5
  "description": "MCP server 提供仓库内可复用代码块(ts/tsx/js/jsx/css/less)的索引和查询能力,支持基于代码上下文的智能推荐。",
6
6
  "type": "module",