oh-my-opencode-darwin-arm64 4.5.1 → 4.6.0
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/bin/oh-my-opencode.js +56 -0
- package/package.json +2 -5
- package/bin/oh-my-opencode +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
|
|
6
|
+
const wrapperPackageRoot = process.env.OMO_WRAPPER_PACKAGE_ROOT;
|
|
7
|
+
const lazyCodexInvocationNames = new Set(["lazycodex", "lazycodex-ai"]);
|
|
8
|
+
|
|
9
|
+
if (!wrapperPackageRoot) {
|
|
10
|
+
console.error("oh-my-opencode: OMO_WRAPPER_PACKAGE_ROOT is required to launch the packaged CLI.");
|
|
11
|
+
process.exit(2);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function exitFromResult(result, failureLabel) {
|
|
15
|
+
if (result.error) {
|
|
16
|
+
console.error(`oh-my-opencode: ${failureLabel}: ${result.error.message}`);
|
|
17
|
+
process.exit(2);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (result.signal) {
|
|
21
|
+
const signalCodes = { SIGINT: 2, SIGILL: 4, SIGKILL: 9, SIGTERM: 15 };
|
|
22
|
+
process.exit(128 + (signalCodes[result.signal] ?? 1));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
process.exit(result.status ?? 1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (lazyCodexInvocationNames.has(process.env.OMO_INVOCATION_NAME ?? "")) {
|
|
29
|
+
const lazyCodexInstallerPath = join(wrapperPackageRoot, "packages", "omo-codex", "scripts", "install-local.mjs");
|
|
30
|
+
|
|
31
|
+
if (!existsSync(lazyCodexInstallerPath)) {
|
|
32
|
+
console.error(`oh-my-opencode: lazycodex installer not found at ${lazyCodexInstallerPath}`);
|
|
33
|
+
process.exit(2);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const result = spawnSync(process.execPath, [lazyCodexInstallerPath, ...process.argv.slice(2)], {
|
|
37
|
+
stdio: "inherit",
|
|
38
|
+
env: process.env,
|
|
39
|
+
});
|
|
40
|
+
exitFromResult(result, "failed to execute lazycodex Node installer");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const cliPath = join(wrapperPackageRoot, "dist", "cli", "index.js");
|
|
44
|
+
|
|
45
|
+
if (!existsSync(cliPath)) {
|
|
46
|
+
console.error(`oh-my-opencode: packaged CLI not found at ${cliPath}`);
|
|
47
|
+
process.exit(2);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const bunBinary = process.env.BUN_BINARY || "bun";
|
|
51
|
+
const result = spawnSync(bunBinary, [cliPath, ...process.argv.slice(2)], {
|
|
52
|
+
stdio: "inherit",
|
|
53
|
+
env: process.env,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
exitFromResult(result, "failed to execute Bun");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-opencode-darwin-arm64",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "Platform-specific binary for oh-my-opencode (darwin-arm64)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -15,8 +15,5 @@
|
|
|
15
15
|
],
|
|
16
16
|
"files": [
|
|
17
17
|
"bin"
|
|
18
|
-
]
|
|
19
|
-
"bin": {
|
|
20
|
-
"oh-my-opencode": "./bin/oh-my-opencode"
|
|
21
|
-
}
|
|
18
|
+
]
|
|
22
19
|
}
|
package/bin/oh-my-opencode
DELETED
|
Binary file
|