@nevaberry/opencodecommit 0.8.3 → 1.0.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/occ ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ const { execFileSync } = require("child_process");
3
+ const { getBinaryPath } = require("../index.js");
4
+ try {
5
+ execFileSync(getBinaryPath(), process.argv.slice(2), { stdio: "inherit" });
6
+ } catch (err) {
7
+ if (err.status) process.exit(err.status);
8
+ console.error(err.message);
9
+ process.exit(1);
10
+ }
package/index.js CHANGED
@@ -13,7 +13,7 @@ function getBinaryPath() {
13
13
  }
14
14
 
15
15
  const ext = process.platform === "win32" ? ".exe" : ""
16
- return path.join(__dirname, "platforms", platform, `opencodecommit${ext}`)
16
+ return path.join(__dirname, "platforms", platform, `occ${ext}`)
17
17
  }
18
18
 
19
19
  module.exports = { getBinaryPath, SUPPORTED }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nevaberry/opencodecommit",
3
- "version": "0.8.3",
3
+ "version": "1.0.0",
4
4
  "description": "AI-powered git commit message generator that delegates to terminal AI agents",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -8,7 +8,8 @@
8
8
  "url": "https://github.com/Nevaberry/opencodecommit"
9
9
  },
10
10
  "bin": {
11
- "opencodecommit": "bin/opencodecommit"
11
+ "occ": "bin/occ",
12
+ "opencodecommit": "bin/occ"
12
13
  },
13
14
  "files": [
14
15
  "bin",
@@ -16,8 +16,8 @@ if (!SUPPORTED.includes(platform)) {
16
16
 
17
17
  try {
18
18
  const ext = process.platform === "win32" ? ".exe" : ""
19
- const binaryPath = path.join(__dirname, "..", "platforms", platform, `opencodecommit${ext}`)
20
- const binTarget = path.join(__dirname, "..", "bin", `opencodecommit${ext}`)
19
+ const binaryPath = path.join(__dirname, "..", "platforms", platform, `occ${ext}`)
20
+ const binTarget = path.join(__dirname, "..", "bin", `occ${ext}`)
21
21
 
22
22
  if (!fs.existsSync(binaryPath)) {
23
23
  console.error(`opencodecommit: binary not found at ${binaryPath}`)
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
- const os = require("os");
3
- const platform = os.platform();
4
- const arch = os.arch();
5
- console.error(
6
- `opencodecommit: pre-built binary not yet available for ${platform}-${arch}.\n` +
7
- `Install from source: cargo install opencodecommit\n` +
8
- `Track progress: https://github.com/Nevaberry/opencodecommit`
9
- );
10
- process.exit(1);