mcp-probe-kit 3.0.10 → 3.0.11
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.
|
@@ -33,6 +33,16 @@ describe("gitnexus-bridge workspace preparation", () => {
|
|
|
33
33
|
expect(wrapped.args.slice(0, 3)).toEqual(["/d", "/s", "/c"]);
|
|
34
34
|
expect(String(wrapped.args[3]).toLowerCase()).toContain("npx");
|
|
35
35
|
});
|
|
36
|
+
test("Windows 下带空格路径的 cmd 可执行文件会被正确加引号", () => {
|
|
37
|
+
const root = makeTempDir("gitnexus-space-");
|
|
38
|
+
const executable = path.join(root, "Program Files", "nodejs", "npx.cmd");
|
|
39
|
+
fs.mkdirSync(path.dirname(executable), { recursive: true });
|
|
40
|
+
fs.writeFileSync(executable, "@echo off\r\n", "utf-8");
|
|
41
|
+
const wrapped = resolveSpawnCommand(executable, ["-y", "gitnexus@latest", "mcp"], "win32");
|
|
42
|
+
expect(wrapped.command.toLowerCase()).toContain("cmd");
|
|
43
|
+
expect(wrapped.args.slice(0, 3)).toEqual(["/d", "/s", "/c"]);
|
|
44
|
+
expect(wrapped.args[3]).toBe(`"${executable}"`);
|
|
45
|
+
});
|
|
36
46
|
test("Windows 下 git.exe 直接启动,不走 git.cmd 壳层", () => {
|
|
37
47
|
const resolved = resolveExecutableCommand("git", "win32").toLowerCase();
|
|
38
48
|
const spawned = resolveSpawnCommand("git", ["init", "-q"], "win32");
|
|
@@ -257,6 +257,15 @@ function shouldWrapWithCmd(rawCommand, executable, platform = process.platform)
|
|
|
257
257
|
}
|
|
258
258
|
return rawLower === "npx" || rawLower === "npm";
|
|
259
259
|
}
|
|
260
|
+
function quoteForCmd(executable) {
|
|
261
|
+
if (!executable.includes(" ")) {
|
|
262
|
+
return executable;
|
|
263
|
+
}
|
|
264
|
+
if (executable.startsWith("\"") && executable.endsWith("\"")) {
|
|
265
|
+
return executable;
|
|
266
|
+
}
|
|
267
|
+
return `"${executable}"`;
|
|
268
|
+
}
|
|
260
269
|
export function resolveSpawnCommand(command, args, platform = process.platform) {
|
|
261
270
|
const executable = resolveExecutableCommand(command, platform);
|
|
262
271
|
if (!shouldWrapWithCmd(command, executable, platform)) {
|
|
@@ -267,7 +276,7 @@ export function resolveSpawnCommand(command, args, platform = process.platform)
|
|
|
267
276
|
}
|
|
268
277
|
return {
|
|
269
278
|
command: process.env.ComSpec || "cmd.exe",
|
|
270
|
-
args: ["/d", "/s", "/c", executable, ...args],
|
|
279
|
+
args: ["/d", "/s", "/c", quoteForCmd(executable), ...args],
|
|
271
280
|
};
|
|
272
281
|
}
|
|
273
282
|
function extractText(result) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-probe-kit",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.11",
|
|
4
4
|
"description": "AI-Powered Development Toolkit - MCP Server with 22 tools covering code quality, development efficiency, project management, and UI/UX design. Features: Structured Output, Workflow Orchestration, UI/UX Pro Max, and Requirements Interview.",
|
|
5
5
|
"mcpName": "io.github.mybolide/mcp-probe-kit",
|
|
6
6
|
"type": "module",
|