vibesdev 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/bin/vibesdev.js +19 -4
  2. package/package.json +1 -1
package/bin/vibesdev.js CHANGED
@@ -11,10 +11,24 @@ function fail(message) {
11
11
  }
12
12
 
13
13
  const packageDir = path.resolve(__dirname, '..');
14
+ const installerPath = path.join(packageDir, 'scripts', 'postinstall.js');
14
15
  const binPath = path.join(packageDir, 'bin', 'vibes');
15
16
  const exePath = path.join(packageDir, 'bin', 'vibes.exe');
16
17
  const args = process.argv.slice(2);
17
18
 
19
+ function runInstaller() {
20
+ const result = spawnSync(process.execPath, [installerPath], {
21
+ stdio: 'inherit',
22
+ windowsHide: false
23
+ });
24
+ if (result.error) {
25
+ fail(`Failed to run vibes installer: ${result.error.message}`);
26
+ }
27
+ if (result.status !== 0) {
28
+ process.exit(result.status === null ? 1 : result.status);
29
+ }
30
+ }
31
+
18
32
  let command = binPath;
19
33
  let commandArgs = args;
20
34
 
@@ -27,14 +41,15 @@ if (process.platform === 'win32') {
27
41
  }
28
42
  }
29
43
 
44
+ if (!fs.existsSync(binPath) && !fs.existsSync(exePath)) {
45
+ runInstaller();
46
+ }
47
+
30
48
  if (!fs.existsSync(binPath) && !fs.existsSync(exePath)) {
31
49
  fail([
32
50
  'Error: vibes binary is not installed.',
33
51
  '',
34
- 'The vibesdev postinstall script did not complete. To fix, re-run install:',
35
- ' npm rebuild -g vibesdev',
36
- ' or',
37
- ' bun pm trust vibesdev && bun install -g vibesdev'
52
+ 'The vibesdev installer could not place the platform binary.'
38
53
  ].join('\n'));
39
54
  }
40
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibesdev",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Short npm alias for the Vibes CLI",
5
5
  "license": "MIT",
6
6
  "repository": {