vibe-remote 0.0.1
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/cli.js +76 -0
- package/package.json +28 -0
- package/vibe-remote-darwin-amd64 +0 -0
- package/vibe-remote-darwin-arm64 +0 -0
- package/vibe-remote-linux-amd64 +0 -0
- package/vibe-remote-linux-arm64 +0 -0
- package/vibe-remote-windows-amd64.exe +0 -0
package/cli.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execFileSync } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const os = require("os");
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
|
|
8
|
+
function getBinaryName() {
|
|
9
|
+
const platform = os.platform();
|
|
10
|
+
const arch = os.arch();
|
|
11
|
+
|
|
12
|
+
let osName;
|
|
13
|
+
switch (platform) {
|
|
14
|
+
case "darwin":
|
|
15
|
+
osName = "darwin";
|
|
16
|
+
break;
|
|
17
|
+
case "linux":
|
|
18
|
+
osName = "linux";
|
|
19
|
+
break;
|
|
20
|
+
case "win32":
|
|
21
|
+
osName = "windows";
|
|
22
|
+
break;
|
|
23
|
+
default:
|
|
24
|
+
console.error(`Unsupported platform: ${platform}`);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let archName;
|
|
29
|
+
switch (arch) {
|
|
30
|
+
case "x64":
|
|
31
|
+
archName = "amd64";
|
|
32
|
+
break;
|
|
33
|
+
case "arm64":
|
|
34
|
+
archName = "arm64";
|
|
35
|
+
break;
|
|
36
|
+
default:
|
|
37
|
+
console.error(`Unsupported architecture: ${arch}`);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const ext = platform === "win32" ? ".exe" : "";
|
|
42
|
+
return `vibe-remote-${osName}-${archName}${ext}`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const binaryName = getBinaryName();
|
|
46
|
+
const binaryPath = path.join(__dirname, binaryName);
|
|
47
|
+
|
|
48
|
+
if (!fs.existsSync(binaryPath)) {
|
|
49
|
+
console.error(`Binary not found: ${binaryName}`);
|
|
50
|
+
console.error("This platform/architecture combination may not be supported.");
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Make binary executable on Unix
|
|
55
|
+
if (os.platform() !== "win32") {
|
|
56
|
+
try {
|
|
57
|
+
fs.chmodSync(binaryPath, 0o755);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
// Ignore chmod errors
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Forward all arguments to the Go binary
|
|
64
|
+
const args = process.argv.slice(2);
|
|
65
|
+
|
|
66
|
+
try {
|
|
67
|
+
execFileSync(binaryPath, args, {
|
|
68
|
+
stdio: "inherit",
|
|
69
|
+
env: process.env,
|
|
70
|
+
});
|
|
71
|
+
} catch (error) {
|
|
72
|
+
if (error.status !== null) {
|
|
73
|
+
process.exit(error.status);
|
|
74
|
+
}
|
|
75
|
+
process.exit(1);
|
|
76
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vibe-remote",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A full-stack Go + htmx + Alpine.js remote server with password protection",
|
|
5
|
+
"bin": {
|
|
6
|
+
"vibe-remote": "./cli.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"cli.js",
|
|
10
|
+
"vibe-remote-darwin-amd64",
|
|
11
|
+
"vibe-remote-darwin-arm64",
|
|
12
|
+
"vibe-remote-linux-amd64",
|
|
13
|
+
"vibe-remote-linux-arm64",
|
|
14
|
+
"vibe-remote-windows-amd64.exe"
|
|
15
|
+
],
|
|
16
|
+
"keywords": [
|
|
17
|
+
"vibe",
|
|
18
|
+
"remote",
|
|
19
|
+
"htmx",
|
|
20
|
+
"go",
|
|
21
|
+
"server"
|
|
22
|
+
],
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/ymzuiku/vibe-remote.git"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|