@h-rig/cli 0.0.0-e2e-live.20260630085347
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 +9 -0
- package/bin/rig-run.js +19 -0
- package/bin/rig.js +19 -0
- package/package.json +16 -0
package/README.md
ADDED
package/bin/rig-run.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
// Launcher for the prebuilt rig-run binary (@h-rig/cli-<os>-<arch>, an optional dep).
|
|
4
|
+
const { spawnSync } = require("node:child_process");
|
|
5
|
+
const tag = process.platform + "-" + process.arch;
|
|
6
|
+
const rigExe = process.platform === "win32" ? "rig.exe" : "rig";
|
|
7
|
+
let rigBin;
|
|
8
|
+
try { rigBin = require.resolve("@h-rig/cli-" + tag + "/" + rigExe); } catch {}
|
|
9
|
+
if (!rigBin) {
|
|
10
|
+
console.error("@h-rig/cli: no prebuilt rig-run binary for " + tag + ".");
|
|
11
|
+
console.error("Supported: darwin-arm64.");
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
const env = "rig-run" === "rig-run"
|
|
15
|
+
? { ...process.env, RIG_EXEC_BASENAME: "rig-run" }
|
|
16
|
+
: process.env;
|
|
17
|
+
const res = spawnSync(rigBin, process.argv.slice(2), { stdio: "inherit", env });
|
|
18
|
+
if (res.error) { console.error(String(res.error.message || res.error)); process.exit(1); }
|
|
19
|
+
process.exit(res.status == null ? 1 : res.status);
|
package/bin/rig.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
// Launcher for the prebuilt rig binary (@h-rig/cli-<os>-<arch>, an optional dep).
|
|
4
|
+
const { spawnSync } = require("node:child_process");
|
|
5
|
+
const tag = process.platform + "-" + process.arch;
|
|
6
|
+
const rigExe = process.platform === "win32" ? "rig.exe" : "rig";
|
|
7
|
+
let rigBin;
|
|
8
|
+
try { rigBin = require.resolve("@h-rig/cli-" + tag + "/" + rigExe); } catch {}
|
|
9
|
+
if (!rigBin) {
|
|
10
|
+
console.error("@h-rig/cli: no prebuilt rig binary for " + tag + ".");
|
|
11
|
+
console.error("Supported: darwin-arm64.");
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
const env = "rig" === "rig-run"
|
|
15
|
+
? { ...process.env, RIG_EXEC_BASENAME: "rig-run" }
|
|
16
|
+
: process.env;
|
|
17
|
+
const res = spawnSync(rigBin, process.argv.slice(2), { stdio: "inherit", env });
|
|
18
|
+
if (res.error) { console.error(String(res.error.message || res.error)); process.exit(1); }
|
|
19
|
+
process.exit(res.status == null ? 1 : res.status);
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@h-rig/cli",
|
|
3
|
+
"version": "0.0.0-e2e-live.20260630085347",
|
|
4
|
+
"description": "Rig CLI — installs the prebuilt single-file rig/rig-run binaries for your platform.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"bin": {
|
|
7
|
+
"rig": "bin/rig.js",
|
|
8
|
+
"rig-run": "bin/rig-run.js"
|
|
9
|
+
},
|
|
10
|
+
"optionalDependencies": {
|
|
11
|
+
"@h-rig/cli-darwin-arm64": "0.0.0-e2e-live.20260630085347"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin"
|
|
15
|
+
]
|
|
16
|
+
}
|