bloby-bot 0.21.10 → 0.21.12

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/bin/cli.js CHANGED
@@ -17,6 +17,16 @@ const CONFIG_PATH = path.join(DATA_DIR, 'config.json');
17
17
  const BIN_DIR = path.join(DATA_DIR, 'bin');
18
18
  const CF_PATH = path.join(BIN_DIR, 'cloudflared');
19
19
 
20
+ // ── Ensure dependencies exist (self-heal if postinstall npm install failed) ──
21
+ if (!IS_DEV && !fs.existsSync(path.join(ROOT, 'node_modules', 'viem'))) {
22
+ try {
23
+ execSync('npm install --omit=dev', { cwd: ROOT, stdio: 'inherit' });
24
+ } catch {
25
+ console.error('\n ✗ Failed to install dependencies. Run manually:\n cd ~/.bloby && npm install\n');
26
+ process.exit(1);
27
+ }
28
+ }
29
+
20
30
  const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf-8'));
21
31
  const args = process.argv.slice(2);
22
32
  const command = args[0];