le-merge 1.0.32

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.
Files changed (2) hide show
  1. package/bin/run.js +28 -0
  2. package/package.json +17 -0
package/bin/run.js ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env node
2
+ const { spawn } = require("child_process");
3
+ const path = require("path");
4
+
5
+ const os = process.platform;
6
+ const arch = process.arch;
7
+
8
+ let pkgName = "";
9
+ if (os === "darwin" && arch === "arm64") pkgName = "@rizamkhan/le-merge-darwin-arm64";
10
+ else if (os === "darwin" && arch === "x64") pkgName = "@rizamkhan/le-merge-darwin-x64";
11
+ else if (os === "linux" && arch === "x64") pkgName = "@rizamkhan/le-merge-linux-x64";
12
+ else if (os === "win32" && arch === "x64") pkgName = "@rizamkhan/le-merge-windows-x64";
13
+
14
+ if (!pkgName) {
15
+ console.error(`Platform ${os}-${arch} is not supported by le-merge.`);
16
+ process.exit(1);
17
+ }
18
+
19
+ try {
20
+ const binaryName = os === "win32" ? "le-merge-windows-x64.exe" : pkgName.split("/")[1];
21
+ const binaryPath = require.resolve(path.join(pkgName, binaryName));
22
+
23
+ const child = spawn(binaryPath, process.argv.slice(2), { stdio: "inherit" });
24
+ child.on("close", (code) => process.exit(code));
25
+ } catch (err) {
26
+ console.error("Failed to run le-merge. Ensure the platform dependency installed correctly.", err);
27
+ process.exit(1);
28
+ }
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "le-merge",
3
+ "version": "1.0.32",
4
+ "description": "A calm TUI for resolving Git merge conflicts with an AI agent.",
5
+ "bin": {
6
+ "le-merge": "./bin/run.js"
7
+ },
8
+ "files": [
9
+ "bin"
10
+ ],
11
+ "optionalDependencies": {
12
+ "@rizamkhan/le-merge-darwin-arm64": "1.0.32",
13
+ "@rizamkhan/le-merge-darwin-x64": "1.0.32",
14
+ "@rizamkhan/le-merge-linux-x64": "1.0.32",
15
+ "@rizamkhan/le-merge-windows-x64": "1.0.32"
16
+ }
17
+ }