@h-rig/cli 0.0.6-alpha.157 → 0.0.6-alpha.159

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 CHANGED
@@ -1,8 +1,9 @@
1
1
  # @h-rig/cli
2
2
 
3
- Installs the prebuilt, self-contained `rig` binary for your platform via an os/cpu-gated optional dependency, then launches it.
3
+ Installs the prebuilt, self-contained `rig` and `rig-run` binaries for your platform via an os/cpu-gated optional dependency, then launches them.
4
4
 
5
5
  ```
6
6
  bun add -g @h-rig/cli # or: npm i -g @h-rig/cli
7
7
  rig --help
8
+ rig-run --version
8
9
  ```
package/bin/rig-run.js ADDED
@@ -0,0 +1,16 @@
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 exe = process.platform === "win32" ? "rig-run.exe" : "rig-run";
7
+ let bin;
8
+ try { bin = require.resolve("@h-rig/cli-" + tag + "/" + exe); } catch {}
9
+ if (!bin) {
10
+ console.error("@h-rig/cli: no prebuilt rig-run binary for " + tag + ".");
11
+ console.error("Supported: darwin-arm64, darwin-x64, linux-x64, linux-arm64, win32-x64.");
12
+ process.exit(1);
13
+ }
14
+ const res = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
15
+ if (res.error) { console.error(String(res.error.message || res.error)); process.exit(1); }
16
+ process.exit(res.status == null ? 1 : res.status);
package/bin/rig.js CHANGED
@@ -5,7 +5,7 @@ const { spawnSync } = require("node:child_process");
5
5
  const tag = process.platform + "-" + process.arch;
6
6
  const exe = process.platform === "win32" ? "rig.exe" : "rig";
7
7
  let bin;
8
- try { bin = require.resolve("@h-rig/cli-" + tag + "/" + exe); } catch (_) {}
8
+ try { bin = require.resolve("@h-rig/cli-" + tag + "/" + exe); } catch {}
9
9
  if (!bin) {
10
10
  console.error("@h-rig/cli: no prebuilt rig binary for " + tag + ".");
11
11
  console.error("Supported: darwin-arm64, darwin-x64, linux-x64, linux-arm64, win32-x64.");
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "@h-rig/cli",
3
- "version": "0.0.6-alpha.157",
4
- "description": "Rig CLI — installs the prebuilt single-file rig binary for your platform.",
3
+ "version": "0.0.6-alpha.159",
4
+ "description": "Rig CLI — installs the prebuilt single-file rig/rig-run binaries for your platform.",
5
5
  "license": "MIT",
6
6
  "bin": {
7
- "rig": "bin/rig.js"
7
+ "rig": "bin/rig.js",
8
+ "rig-run": "bin/rig-run.js"
8
9
  },
9
10
  "optionalDependencies": {
10
- "@h-rig/cli-darwin-arm64": "0.0.6-alpha.157",
11
- "@h-rig/cli-darwin-x64": "0.0.6-alpha.157",
12
- "@h-rig/cli-linux-x64": "0.0.6-alpha.157",
13
- "@h-rig/cli-linux-arm64": "0.0.6-alpha.157",
14
- "@h-rig/cli-win32-x64": "0.0.6-alpha.157"
11
+ "@h-rig/cli-darwin-arm64": "0.0.6-alpha.159",
12
+ "@h-rig/cli-darwin-x64": "0.0.6-alpha.159",
13
+ "@h-rig/cli-linux-x64": "0.0.6-alpha.159",
14
+ "@h-rig/cli-linux-arm64": "0.0.6-alpha.159",
15
+ "@h-rig/cli-win32-x64": "0.0.6-alpha.159"
15
16
  },
16
17
  "files": [
17
18
  "bin"