@botmobile/botmobile-openclaw 0.0.10 → 0.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.

Potentially problematic release.


This version of @botmobile/botmobile-openclaw might be problematic. Click here for more details.

package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botmobile/botmobile-openclaw",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "OpenClaw BotMobile mobile bridge plugin (private test build)",
5
5
  "type": "module",
6
6
  "files": [
@@ -1,26 +1,30 @@
1
1
  import { execSync } from "node:child_process";
2
2
  import { dirname, join } from "node:path";
3
- import { existsSync } from "node:fs";
3
+ import { existsSync, writeFileSync } from "node:fs";
4
4
  import { fileURLToPath } from "node:url";
5
5
 
6
6
  const __dirname = dirname(fileURLToPath(import.meta.url));
7
- const ndcDir = join(__dirname, "..", "node_modules", "node-datachannel");
7
+ const pluginRoot = join(__dirname, "..");
8
+
9
+ // Write marker so we can verify postinstall ran
10
+ writeFileSync(join(pluginRoot, ".postinstall-ran"), new Date().toISOString());
11
+
12
+ const ndcDir = join(pluginRoot, "node_modules", "node-datachannel");
8
13
 
9
14
  if (!existsSync(ndcDir)) {
10
- console.error("[botmobile] node-datachannel not found at", ndcDir);
15
+ console.error("[botmobile:postinstall] node-datachannel not found at", ndcDir);
11
16
  process.exit(1);
12
17
  }
13
18
 
14
19
  const binaryPath = join(ndcDir, "build", "Release", "node_datachannel.node");
15
20
 
16
21
  if (existsSync(binaryPath)) {
17
- // Binary exists, all good
22
+ console.log("[botmobile:postinstall] native binary already exists");
18
23
  process.exit(0);
19
24
  }
20
25
 
21
- console.log("[botmobile] node-datachannel native binary not found, running prebuild-install…");
26
+ console.log("[botmobile:postinstall] native binary missing, running prebuild-install…");
22
27
 
23
- // Try prebuild-install (downloads prebuilt binary from GitHub releases)
24
28
  try {
25
29
  execSync("npx prebuild-install -r napi --verbose", {
26
30
  cwd: ndcDir,
@@ -28,21 +32,13 @@ try {
28
32
  timeout: 120_000,
29
33
  });
30
34
  } catch {
31
- console.error(
32
- "[botmobile] prebuild-install failed. The native binary for node-datachannel could not be downloaded."
33
- );
34
- console.error(
35
- "[botmobile] To build from source, install build tools and run:"
36
- );
37
- console.error(` apt-get install -y build-essential cmake`);
38
- console.error(` cd ${ndcDir} && npx cmake-js compile -r napi`);
35
+ console.error("[botmobile:postinstall] prebuild-install failed");
39
36
  process.exit(1);
40
37
  }
41
38
 
42
- // Verify the binary was actually created
43
39
  if (!existsSync(binaryPath)) {
44
- console.error("[botmobile] prebuild-install completed but binary still missing at:", binaryPath);
40
+ console.error("[botmobile:postinstall] prebuild-install ran but binary still missing at:", binaryPath);
45
41
  process.exit(1);
46
42
  }
47
43
 
48
- console.log("[botmobile] node-datachannel native binary installed successfully");
44
+ console.log("[botmobile:postinstall] native binary installed successfully");