@botmobile/botmobile-openclaw 0.0.9 → 0.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botmobile/botmobile-openclaw",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "OpenClaw BotMobile mobile bridge plugin (private test build)",
5
5
  "type": "module",
6
6
  "files": [
@@ -1,17 +1,13 @@
1
1
  import { execSync } from "node:child_process";
2
- import { createRequire } from "node:module";
3
2
  import { dirname, join } from "node:path";
4
3
  import { existsSync } from "node:fs";
4
+ import { fileURLToPath } from "node:url";
5
5
 
6
- const require = createRequire(import.meta.url);
6
+ const __dirname = dirname(fileURLToPath(import.meta.url));
7
+ const ndcDir = join(__dirname, "..", "node_modules", "node-datachannel");
7
8
 
8
- // Check if the native binary already exists
9
- let ndcDir;
10
- try {
11
- ndcDir = dirname(require.resolve("node-datachannel/package.json"));
12
- } catch {
13
- // node-datachannel not installed at all — nothing we can do here
14
- console.error("[botmobile] node-datachannel package not found in node_modules");
9
+ if (!existsSync(ndcDir)) {
10
+ console.error("[botmobile] node-datachannel not found at", ndcDir);
15
11
  process.exit(1);
16
12
  }
17
13