@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 +1 -1
- package/scripts/postinstall.mjs +5 -9
package/package.json
CHANGED
package/scripts/postinstall.mjs
CHANGED
|
@@ -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
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const ndcDir = join(__dirname, "..", "node_modules", "node-datachannel");
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|