vibedeckx 0.1.10

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/vibedeckx.mjs +45 -0
  2. package/package.json +20 -0
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawn } from "child_process";
4
+ import { createRequire } from "module";
5
+ import { resolve, dirname } from "path";
6
+
7
+ const platform = process.platform;
8
+ const arch = process.arch;
9
+ const packageName = `@vibedeckx/${platform}-${arch}`;
10
+
11
+ let binPath;
12
+ try {
13
+ const require = createRequire(import.meta.url);
14
+ const packageJsonPath = require.resolve(`${packageName}/package.json`);
15
+ binPath = resolve(dirname(packageJsonPath), "dist", "bin.js");
16
+ } catch {
17
+ console.error(
18
+ `Error: No prebuilt package found for ${platform}-${arch}.\n` +
19
+ `Expected npm package: ${packageName}\n\n` +
20
+ `Supported platforms:\n` +
21
+ ` - linux-x64\n` +
22
+ ` - darwin-arm64\n` +
23
+ ` - win32-x64\n\n` +
24
+ `You can also download a standalone archive from the GitHub Releases page.`
25
+ );
26
+ process.exit(1);
27
+ }
28
+
29
+ const child = spawn(process.execPath, [binPath, ...process.argv.slice(2)], {
30
+ stdio: "inherit",
31
+ env: process.env,
32
+ });
33
+
34
+ // Forward signals to the child process
35
+ for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) {
36
+ process.on(signal, () => child.kill(signal));
37
+ }
38
+
39
+ child.on("exit", (code, signal) => {
40
+ if (signal) {
41
+ process.kill(process.pid, signal);
42
+ } else {
43
+ process.exit(code ?? 1);
44
+ }
45
+ });
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "vibedeckx",
3
+ "version": "0.1.10",
4
+ "type": "module",
5
+ "description": "AI-powered app generator with project management",
6
+ "bin": {
7
+ "vibedeckx": "./bin/vibedeckx.mjs"
8
+ },
9
+ "files": [
10
+ "./bin/*"
11
+ ],
12
+ "engines": {
13
+ "node": ">=20"
14
+ },
15
+ "optionalDependencies": {
16
+ "@vibedeckx/linux-x64": "0.1.10",
17
+ "@vibedeckx/darwin-arm64": "0.1.10",
18
+ "@vibedeckx/win32-x64": "0.1.10"
19
+ }
20
+ }