verybot 0.1.8 → 0.1.9

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": "verybot",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Multi-channel AI agent framework with Telegram, Discord, Slack, and WhatsApp support",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -28,7 +28,8 @@
28
28
  },
29
29
  "files": [
30
30
  "dist/",
31
- "verybot.js"
31
+ "verybot.js",
32
+ "scripts/postinstall-ui-install.mjs"
32
33
  ],
33
34
  "scripts": {
34
35
  "postinstall": "node scripts/postinstall-ui-install.mjs",
@@ -0,0 +1,31 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import { existsSync } from "node:fs";
3
+ import { resolve } from "node:path";
4
+
5
+ const UI_PACKAGE_JSON_RELATIVE_PATH = "ui/package.json";
6
+
7
+ /**
8
+ * Always install UI dependencies through npm from the repository root postinstall.
9
+ * This keeps dependency setup consistent and avoids requiring bun in install hooks.
10
+ */
11
+ function runUiInstall() {
12
+ const uiPackageJsonPath = resolve(process.cwd(), UI_PACKAGE_JSON_RELATIVE_PATH);
13
+ if (!existsSync(uiPackageJsonPath)) {
14
+ return;
15
+ }
16
+
17
+ const result = spawnSync("npm", ["--prefix", "ui", "install"], {
18
+ stdio: "inherit",
19
+ env: process.env,
20
+ });
21
+
22
+ if (result.error) {
23
+ throw result.error;
24
+ }
25
+
26
+ if (result.status !== 0) {
27
+ process.exit(result.status ?? 1);
28
+ }
29
+ }
30
+
31
+ runUiInstall();