ohos-playwright-mcp 0.2.0 → 0.2.1
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/package.json +1 -1
- package/server.mjs +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ohos-playwright-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "MCP server for HarmonyOS / OpenHarmony ArkWeb — playwright-core over CDP. 61 tools: navigation, input, network, cookies, storage, snapshot, tracing. The ohos counterpart of @playwright/mcp.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/server.mjs
CHANGED
|
@@ -33,7 +33,9 @@ const INFO_PATH = process.env.OHOS_PW_INFO_PATH ?? `${tmpdir()}/ohos-playwri
|
|
|
33
33
|
let cdpEndpoint = null
|
|
34
34
|
|
|
35
35
|
await import(REGISTER_PATH)
|
|
36
|
-
const
|
|
36
|
+
const pwModule = await import(PW_CORE_PATH)
|
|
37
|
+
const chromium = pwModule.chromium ?? pwModule.default?.chromium
|
|
38
|
+
if (!chromium) throw new Error(`playwright-core loaded but no chromium export (keys: ${Object.keys(pwModule).join(',')})`)
|
|
37
39
|
|
|
38
40
|
const log = (...a) => console.error('[arkweb-cdp-mcp]', ...a)
|
|
39
41
|
|