openspec-playwright 0.3.40 → 0.3.41
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/shared/mcp.d.ts +4 -0
- package/dist/shared/mcp.js +11 -4
- package/dist/shared/mcp.js.map +1 -1
- package/package.json +1 -1
package/dist/shared/mcp.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Check if Playwright MCP server is installed in Claude Code.
|
|
3
3
|
* Returns true if "playwright" appears in `claude mcp list` output.
|
|
4
|
+
*
|
|
5
|
+
* Note: `claude mcp list` may exit non-zero if another MCP server is
|
|
6
|
+
* pending approval or unhealthy, while still printing the list. In that
|
|
7
|
+
* case, read stdout/stderr from the thrown error before returning false.
|
|
4
8
|
*/
|
|
5
9
|
export declare function isPlaywrightMcpInstalled(): boolean;
|
|
6
10
|
/**
|
package/dist/shared/mcp.js
CHANGED
|
@@ -5,9 +5,16 @@
|
|
|
5
5
|
import { execFileSync } from "node:child_process";
|
|
6
6
|
import { TIMEOUT } from "./constants.js";
|
|
7
7
|
import { needsShell } from "./platform.js";
|
|
8
|
+
function outputIncludesPlaywright(output) {
|
|
9
|
+
return String(output ?? "").includes("playwright");
|
|
10
|
+
}
|
|
8
11
|
/**
|
|
9
12
|
* Check if Playwright MCP server is installed in Claude Code.
|
|
10
13
|
* Returns true if "playwright" appears in `claude mcp list` output.
|
|
14
|
+
*
|
|
15
|
+
* Note: `claude mcp list` may exit non-zero if another MCP server is
|
|
16
|
+
* pending approval or unhealthy, while still printing the list. In that
|
|
17
|
+
* case, read stdout/stderr from the thrown error before returning false.
|
|
11
18
|
*/
|
|
12
19
|
export function isPlaywrightMcpInstalled() {
|
|
13
20
|
try {
|
|
@@ -17,11 +24,11 @@ export function isPlaywrightMcpInstalled() {
|
|
|
17
24
|
stdio: ["pipe", "pipe", "pipe"],
|
|
18
25
|
shell: needsShell,
|
|
19
26
|
});
|
|
20
|
-
return output
|
|
27
|
+
return outputIncludesPlaywright(output);
|
|
21
28
|
}
|
|
22
|
-
catch {
|
|
23
|
-
|
|
24
|
-
return
|
|
29
|
+
catch (err) {
|
|
30
|
+
const e = err;
|
|
31
|
+
return outputIncludesPlaywright(e.stdout) || outputIncludesPlaywright(e.stderr);
|
|
25
32
|
}
|
|
26
33
|
}
|
|
27
34
|
/**
|
package/dist/shared/mcp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/shared/mcp.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C
|
|
1
|
+
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/shared/mcp.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,SAAS,wBAAwB,CAAC,MAAe;IAC/C,OAAO,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AACrD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB;IACtC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE;YACrD,QAAQ,EAAE,OAAO;YACjB,OAAO,EAAE,OAAO,CAAC,QAAQ;YACzB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;YAC/B,KAAK,EAAE,UAAU;SAClB,CAAC,CAAC;QACH,OAAO,wBAAwB,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