roundfix 0.0.2
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/roundfix.js +53 -0
- package/package.json +27 -0
package/bin/roundfix.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// Transparent launcher for the Roundfix CLI. It resolves the prebuilt binary
|
|
5
|
+
// for the current platform (installed as an optional dependency) and execs it,
|
|
6
|
+
// forwarding arguments, stdio, exit code, and terminating signal unchanged so
|
|
7
|
+
// Roundfix's stable exit-code contract survives the Node wrapper.
|
|
8
|
+
|
|
9
|
+
const { spawnSync } = require("node:child_process");
|
|
10
|
+
|
|
11
|
+
// process.platform + process.arch -> { pkg, bin }
|
|
12
|
+
const TARGETS = {
|
|
13
|
+
"darwin arm64": { pkg: "@roundfix/cli-darwin-arm64", bin: "bin/roundfix" },
|
|
14
|
+
"darwin x64": { pkg: "@roundfix/cli-darwin-x64", bin: "bin/roundfix" },
|
|
15
|
+
"linux arm64": { pkg: "@roundfix/cli-linux-arm64", bin: "bin/roundfix" },
|
|
16
|
+
"linux x64": { pkg: "@roundfix/cli-linux-x64", bin: "bin/roundfix" },
|
|
17
|
+
"win32 x64": { pkg: "@roundfix/cli-win32-x64", bin: "bin/roundfix.exe" },
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
function fail(message) {
|
|
21
|
+
process.stderr.write(`roundfix: ${message}\n`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function resolveBinary() {
|
|
26
|
+
const key = `${process.platform} ${process.arch}`;
|
|
27
|
+
const target = TARGETS[key];
|
|
28
|
+
if (!target) {
|
|
29
|
+
fail(
|
|
30
|
+
`no prebuilt binary for ${key}. Supported platforms: ${Object.keys(TARGETS).join(", ")}.`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
return require.resolve(`${target.pkg}/${target.bin}`);
|
|
35
|
+
} catch (_err) {
|
|
36
|
+
fail(
|
|
37
|
+
`platform package "${target.pkg}" is not installed. Reinstall roundfix so ` +
|
|
38
|
+
`the optional dependency for ${key} is fetched.`,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const binary = resolveBinary();
|
|
45
|
+
const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
46
|
+
|
|
47
|
+
if (result.error) {
|
|
48
|
+
fail(`failed to launch ${binary}: ${result.error.message}`);
|
|
49
|
+
}
|
|
50
|
+
if (result.signal) {
|
|
51
|
+
process.kill(process.pid, result.signal);
|
|
52
|
+
}
|
|
53
|
+
process.exit(result.status === null ? 1 : result.status);
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "roundfix",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Roundfix CLI — resolve CodeRabbit PR review feedback and execute Spec Task Graphs with local coding agents.",
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"bin": {
|
|
7
|
+
"roundfix": "bin/roundfix.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/roundfix.js"
|
|
11
|
+
],
|
|
12
|
+
"optionalDependencies": {
|
|
13
|
+
"@roundfix/cli-darwin-arm64": "0.0.2",
|
|
14
|
+
"@roundfix/cli-darwin-x64": "0.0.2",
|
|
15
|
+
"@roundfix/cli-linux-arm64": "0.0.2",
|
|
16
|
+
"@roundfix/cli-linux-x64": "0.0.2",
|
|
17
|
+
"@roundfix/cli-win32-x64": "0.0.2"
|
|
18
|
+
},
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/marcioaltoe/roundfix.git"
|
|
26
|
+
}
|
|
27
|
+
}
|