@vibeo/cli 0.3.2 → 0.3.3

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/vibeo.mjs +18 -1
  2. package/package.json +1 -1
package/bin/vibeo.mjs CHANGED
@@ -1,2 +1,19 @@
1
- #!/usr/bin/env bun
1
+ #!/usr/bin/env node
2
+
3
+ // Vibeo requires Bun APIs (Bun.build, Bun.serve). If we're running under
4
+ // Node (e.g. because npm/bun rewrote the shebang), re-exec under bun.
5
+ if (typeof globalThis.Bun === "undefined") {
6
+ const { execFileSync } = await import("node:child_process");
7
+ try {
8
+ execFileSync("bun", ["run", ...process.argv.slice(1)], {
9
+ stdio: "inherit",
10
+ env: process.env,
11
+ });
12
+ } catch (e) {
13
+ if (e && typeof e === "object" && "status" in e) process.exit(e.status);
14
+ process.exit(1);
15
+ }
16
+ process.exit(0);
17
+ }
18
+
2
19
  import "../dist/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeo/cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",