@rishibhushan/jenkins-mcp-server 1.1.13 → 1.1.14
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/bin/jenkins-mcp.js +9 -10
- package/package.json +1 -1
package/bin/jenkins-mcp.js
CHANGED
|
@@ -9,6 +9,7 @@ import { fileURLToPath } from "url";
|
|
|
9
9
|
* Resolve paths relative to the *installed package*,
|
|
10
10
|
* NOT the caller's current working directory.
|
|
11
11
|
*/
|
|
12
|
+
const IS_WINDOWS = process.platform === "win32";
|
|
12
13
|
const __filename = fileURLToPath(import.meta.url);
|
|
13
14
|
const __dirname = path.dirname(__filename);
|
|
14
15
|
const PACKAGE_ROOT = path.resolve(__dirname, "..");
|
|
@@ -21,12 +22,9 @@ console.error("[jenkins-mcp] package root:", PACKAGE_ROOT);
|
|
|
21
22
|
/**
|
|
22
23
|
* Resolve Python executable inside packaged venv
|
|
23
24
|
*/
|
|
24
|
-
const pythonPath =
|
|
25
|
-
PACKAGE_ROOT,
|
|
26
|
-
".venv",
|
|
27
|
-
"bin",
|
|
28
|
-
"python"
|
|
29
|
-
);
|
|
25
|
+
const pythonPath = IS_WINDOWS
|
|
26
|
+
? path.join(PACKAGE_ROOT, ".venv", "Scripts", "python.exe")
|
|
27
|
+
: path.join(PACKAGE_ROOT, ".venv", "bin", "python");
|
|
30
28
|
|
|
31
29
|
function run(cmd, args, cwd) {
|
|
32
30
|
return new Promise((resolve, reject) => {
|
|
@@ -57,10 +55,11 @@ async function ensureVenv() {
|
|
|
57
55
|
console.error("[jenkins-mcp] Python venv exists, ensuring dependencies...");
|
|
58
56
|
}
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
await run(
|
|
59
|
+
pythonPath,
|
|
60
|
+
["-m", "pip", "install", "-r", "requirements.txt"],
|
|
61
|
+
PACKAGE_ROOT
|
|
62
|
+
);
|
|
64
63
|
|
|
65
64
|
console.error("[jenkins-mcp] Python environment ready");
|
|
66
65
|
}
|