@onion-harness/cli 0.1.0-beta.20261022014039 → 0.1.0-beta.20261028175048

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,5 +1,5 @@
1
- # Onion CLI
2
-
3
- Installs the `onion` command and delegates to the native binary for the current platform.
4
-
5
- Installation must not install or start the daemon, write MCP configs, prompt for login, or touch project files. Run explicit commands such as `onion init`, `onion login`, `onion daemon install --user`, and `onion mcp install` after installation.
1
+ # Onion CLI
2
+
3
+ Installs the `onion` command and delegates to the native binary for the current platform.
4
+
5
+ Installation must not install or start the daemon, write MCP configs, prompt for login, or touch project files. Run explicit commands such as `onion init`, `onion login`, `onion daemon install --user`, and `onion mcp install` after installation.
Binary file
package/bin/onion.js CHANGED
@@ -1,68 +1,68 @@
1
- #!/usr/bin/env node
2
-
3
- const { spawn } = require("node:child_process");
4
- const fs = require("node:fs");
5
- const path = require("node:path");
6
- const { packageForPlatform } = require("./platform-package.cjs");
7
-
8
- const key = `${process.platform}/${process.arch}`;
9
- const packageName = packageForPlatform(process.platform, process.arch);
10
- const executableName = process.platform === "win32" ? "onion.exe" : "onion";
11
-
12
- function resolveOptionalPackageBinary() {
13
- if (!packageName) {
14
- return null;
15
- }
16
- try {
17
- const packageJson = require.resolve(`${packageName}/package.json`);
18
- return path.join(path.dirname(packageJson), "bin", executableName);
19
- } catch {
20
- return null;
21
- }
22
- }
23
-
24
- function resolveBundledBinary() {
25
- const candidate = path.join(__dirname, "native", executableName);
26
- return fs.existsSync(candidate) ? candidate : null;
27
- }
28
-
29
- const binary = resolveOptionalPackageBinary() || resolveBundledBinary();
30
-
31
- if (!packageName) {
32
- console.error(`Onion native binary for ${key} is not supported.`);
33
- console.error("");
34
- console.error("Install a release binary manually for this platform.");
35
- process.exit(1);
36
- }
37
-
38
- if (!binary || !fs.existsSync(binary)) {
39
- console.error(`Onion native binary for ${key} was not found.`);
40
- console.error("");
41
- console.error("Try:");
42
- console.error(" npm install -g @onion-harness/cli --force");
43
- console.error("");
44
- console.error("If your platform is unsupported, install a release binary manually.");
45
- process.exit(1);
46
- }
47
-
48
- const child = spawn(binary, process.argv.slice(2), {
49
- stdio: "inherit",
50
- env: {
51
- ...process.env,
52
- ONION_INSTALLER: "npm",
53
- ONION_NPM_PACKAGE: packageName
54
- }
55
- });
56
-
57
- child.on("exit", (code, signal) => {
58
- if (signal) {
59
- process.kill(process.pid, signal);
60
- return;
61
- }
62
- process.exit(code ?? 1);
63
- });
64
-
65
- child.on("error", (error) => {
66
- console.error(error.message);
67
- process.exit(1);
68
- });
1
+ #!/usr/bin/env node
2
+
3
+ const { spawn } = require("node:child_process");
4
+ const fs = require("node:fs");
5
+ const path = require("node:path");
6
+ const { packageForPlatform } = require("./platform-package.cjs");
7
+
8
+ const key = `${process.platform}/${process.arch}`;
9
+ const packageName = packageForPlatform(process.platform, process.arch);
10
+ const executableName = process.platform === "win32" ? "onion.exe" : "onion";
11
+
12
+ function resolveOptionalPackageBinary() {
13
+ if (!packageName) {
14
+ return null;
15
+ }
16
+ try {
17
+ const packageJson = require.resolve(`${packageName}/package.json`);
18
+ return path.join(path.dirname(packageJson), "bin", executableName);
19
+ } catch {
20
+ return null;
21
+ }
22
+ }
23
+
24
+ function resolveBundledBinary() {
25
+ const candidate = path.join(__dirname, "native", executableName);
26
+ return fs.existsSync(candidate) ? candidate : null;
27
+ }
28
+
29
+ const binary = resolveOptionalPackageBinary() || resolveBundledBinary();
30
+
31
+ if (!packageName) {
32
+ console.error(`Onion native binary for ${key} is not supported.`);
33
+ console.error("");
34
+ console.error("Install a release binary manually for this platform.");
35
+ process.exit(1);
36
+ }
37
+
38
+ if (!binary || !fs.existsSync(binary)) {
39
+ console.error(`Onion native binary for ${key} was not found.`);
40
+ console.error("");
41
+ console.error("Try:");
42
+ console.error(" npm install -g @onion-harness/cli --force");
43
+ console.error("");
44
+ console.error("If your platform is unsupported, install a release binary manually.");
45
+ process.exit(1);
46
+ }
47
+
48
+ const child = spawn(binary, process.argv.slice(2), {
49
+ stdio: "inherit",
50
+ env: {
51
+ ...process.env,
52
+ ONION_INSTALLER: "npm",
53
+ ONION_NPM_PACKAGE: packageName
54
+ }
55
+ });
56
+
57
+ child.on("exit", (code, signal) => {
58
+ if (signal) {
59
+ process.kill(process.pid, signal);
60
+ return;
61
+ }
62
+ process.exit(code ?? 1);
63
+ });
64
+
65
+ child.on("error", (error) => {
66
+ console.error(error.message);
67
+ process.exit(1);
68
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onion-harness/cli",
3
- "version": "0.1.0-beta.20261022014039",
3
+ "version": "0.1.0-beta.20261028175048",
4
4
  "description": "Onion desktop CLI, daemon, and MCP command.",
5
5
  "bin": {
6
6
  "onion": "bin/onion.js"
@@ -10,12 +10,12 @@
10
10
  "README.md"
11
11
  ],
12
12
  "optionalDependencies": {
13
- "@onion-harness/darwin-arm64": "0.1.0-beta.20261022014039",
14
- "@onion-harness/darwin-x64": "0.1.0-beta.20261022014039",
15
- "@onion-harness/linux-arm64": "0.1.0-beta.20261022014039",
16
- "@onion-harness/linux-x64": "0.1.0-beta.20261022014039",
17
- "@onion-harness/windows-arm64": "0.1.0-beta.20261022014039",
18
- "@onion-harness/windows-x64": "0.1.0-beta.20261022014039"
13
+ "@onion-harness/darwin-arm64": "0.1.0-beta.20261028175048",
14
+ "@onion-harness/darwin-x64": "0.1.0-beta.20261028175048",
15
+ "@onion-harness/linux-arm64": "0.1.0-beta.20261028175048",
16
+ "@onion-harness/linux-x64": "0.1.0-beta.20261028175048",
17
+ "@onion-harness/windows-arm64": "0.1.0-beta.20261028175048",
18
+ "@onion-harness/windows-x64": "0.1.0-beta.20261028175048"
19
19
  },
20
20
  "engines": {
21
21
  "node": ">=18"
@@ -25,8 +25,8 @@
25
25
  "access": "public"
26
26
  },
27
27
  "onionBuild": {
28
- "sourceFingerprint": "d61a7986d5916424c2aa3d98d9f3c30e186d512808b0db605a8cbfab89789530",
29
- "commit": "5e3bd2b242aef3c91a0483250918bd5dd10078fd",
28
+ "sourceFingerprint": "e27148f035cbacaf9068a5a65b004290873ad5f227b7cf4ff7b3ac71b5f692bb",
29
+ "commit": "593be1cd0a1419979f1829abfb4a964bab47d45b",
30
30
  "apiBaseUrl": "https://app.onion-harness.com"
31
31
  }
32
32
  }