@lorrylurui/code-intelligence-mcp 1.1.8 → 1.1.10
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/cli/index-codebase.js +0 -0
- package/dist/config/env.js +10 -0
- package/dist/index.js +0 -0
- package/package.json +1 -1
|
File without changes
|
package/dist/config/env.js
CHANGED
|
@@ -16,11 +16,21 @@ dotenv.config({
|
|
|
16
16
|
path: path.resolve(projectRoot, '.env'),
|
|
17
17
|
override: false,
|
|
18
18
|
});
|
|
19
|
+
// MCP Server 本地 .env 路径(固定指向项目根目录)
|
|
20
|
+
const MCP_SERVER_ROOT = path.resolve(__dirname, '..', '..');
|
|
21
|
+
const MCP_SERVER_ENV_PATH = path.resolve(MCP_SERVER_ROOT, '.env');
|
|
19
22
|
/**
|
|
20
23
|
* 从指定项目根目录加载 .env 到 process.env
|
|
21
24
|
* 行为:优先使用第三方显式设置的值,否则保留 MCP Server 本地配置
|
|
22
25
|
*/
|
|
23
26
|
export function loadProjectDotenv(projectRoot) {
|
|
27
|
+
// 先确保加载 MCP Server 本地的 .env(如果尚未加载)
|
|
28
|
+
if (existsSync(MCP_SERVER_ENV_PATH) && !process.env.MYSQL_ENABLED) {
|
|
29
|
+
dotenv.config({
|
|
30
|
+
path: MCP_SERVER_ENV_PATH,
|
|
31
|
+
override: false,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
24
34
|
const envPath = path.resolve(projectRoot, '.env');
|
|
25
35
|
if (!existsSync(envPath)) {
|
|
26
36
|
return;
|
package/dist/index.js
CHANGED
|
File without changes
|