vibesdev 1.0.0
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/README.md +35 -0
- package/bin/vibesdev.js +67 -0
- package/package.json +44 -0
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# vibesdev
|
|
2
|
+
|
|
3
|
+
Short npm alias for the Vibes CLI.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g vibesdev
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or with bun:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
bun add -g vibesdev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
For one-shot execution:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
bunx vibesdev --help
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## What This Package Does
|
|
24
|
+
|
|
25
|
+
This package depends on `@vibesdotdev/bin`, the canonical Vibes CLI binary
|
|
26
|
+
wrapper. It exposes `vibesdev` as a short npm package name and forwards command
|
|
27
|
+
execution to the `vibes` binary installed by `@vibesdotdev/bin`.
|
|
28
|
+
|
|
29
|
+
The installed command remains:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
vibes --help
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
See [https://vibes.dev](https://vibes.dev) for documentation.
|
package/bin/vibesdev.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { spawnSync } = require('child_process');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
|
|
8
|
+
function fail(message) {
|
|
9
|
+
process.stderr.write(`${message}\n`);
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function resolveCanonicalPackageDir() {
|
|
14
|
+
try {
|
|
15
|
+
return path.dirname(require.resolve('@vibesdotdev/bin/package.json', {
|
|
16
|
+
paths: [__dirname]
|
|
17
|
+
}));
|
|
18
|
+
} catch {
|
|
19
|
+
fail([
|
|
20
|
+
'Error: @vibesdotdev/bin is not installed.',
|
|
21
|
+
'',
|
|
22
|
+
'Reinstall the alias package:',
|
|
23
|
+
' npm install -g vibesdev',
|
|
24
|
+
' or',
|
|
25
|
+
' bun add -g vibesdev'
|
|
26
|
+
].join('\n'));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const packageDir = resolveCanonicalPackageDir();
|
|
31
|
+
const binPath = path.join(packageDir, 'bin', 'vibes');
|
|
32
|
+
const exePath = path.join(packageDir, 'bin', 'vibes.exe');
|
|
33
|
+
const args = process.argv.slice(2);
|
|
34
|
+
|
|
35
|
+
let command = binPath;
|
|
36
|
+
let commandArgs = args;
|
|
37
|
+
|
|
38
|
+
if (process.platform === 'win32') {
|
|
39
|
+
if (fs.existsSync(exePath)) {
|
|
40
|
+
command = exePath;
|
|
41
|
+
} else {
|
|
42
|
+
command = process.execPath;
|
|
43
|
+
commandArgs = [binPath, ...args];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!fs.existsSync(binPath) && !fs.existsSync(exePath)) {
|
|
48
|
+
fail([
|
|
49
|
+
'Error: vibes binary is not installed.',
|
|
50
|
+
'',
|
|
51
|
+
'The @vibesdotdev/bin postinstall script did not complete. To fix, re-run install:',
|
|
52
|
+
' npm rebuild -g @vibesdotdev/bin',
|
|
53
|
+
' or',
|
|
54
|
+
' bun pm trust @vibesdotdev/bin && bun install -g @vibesdotdev/bin'
|
|
55
|
+
].join('\n'));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const result = spawnSync(command, commandArgs, {
|
|
59
|
+
stdio: 'inherit',
|
|
60
|
+
windowsHide: false
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
if (result.error) {
|
|
64
|
+
fail(`Failed to start vibes: ${result.error.message}`);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
process.exit(result.status === null ? 1 : result.status);
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vibesdev",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Short npm alias for the Vibes CLI",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/vibesdotdev/monorepo.git",
|
|
9
|
+
"directory": "packages/vibesdev"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://vibes.dev",
|
|
12
|
+
"bin": {
|
|
13
|
+
"vibesdev": "bin/vibesdev.js",
|
|
14
|
+
"vibes": "bin/vibesdev.js"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"bin/vibesdev.js",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"pack:dry-run": "npm pack --dry-run --json --ignore-scripts",
|
|
22
|
+
"publish:npm": "npm publish --access public --registry=https://registry.npmjs.org",
|
|
23
|
+
"check": "node -c bin/vibesdev.js"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@vibesdotdev/bin": "1.0.0"
|
|
27
|
+
},
|
|
28
|
+
"os": [
|
|
29
|
+
"darwin",
|
|
30
|
+
"linux",
|
|
31
|
+
"win32"
|
|
32
|
+
],
|
|
33
|
+
"cpu": [
|
|
34
|
+
"x64",
|
|
35
|
+
"arm64"
|
|
36
|
+
],
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=18"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"registry": "https://registry.npmjs.org",
|
|
42
|
+
"access": "public"
|
|
43
|
+
}
|
|
44
|
+
}
|