@renxqoo/renx-code 0.0.14 → 0.0.16

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/renx.cjs CHANGED
@@ -6,6 +6,15 @@ const path = require("node:path");
6
6
 
7
7
  const packageRoot = path.resolve(__dirname, "..");
8
8
  const binaryName = process.platform === "win32" ? "renx.exe" : "renx";
9
+ const packageJson = JSON.parse(
10
+ fs.readFileSync(path.join(packageRoot, "package.json"), "utf8")
11
+ );
12
+ const cliArgs = process.argv.slice(2);
13
+
14
+ if (cliArgs.includes("-v") || cliArgs.includes("--version")) {
15
+ console.log(packageJson.version || "0.0.0");
16
+ process.exit(0);
17
+ }
9
18
 
10
19
  function run(target, args, env = process.env) {
11
20
  const result = childProcess.spawnSync(target, args, {
@@ -61,7 +70,10 @@ const binaryCandidates = [
61
70
 
62
71
  for (const candidate of binaryCandidates) {
63
72
  if (fs.existsSync(candidate)) {
64
- run(candidate, process.argv.slice(2));
73
+ run(candidate, cliArgs, {
74
+ ...process.env,
75
+ RENX_VERSION: process.env.RENX_VERSION || packageJson.version || "0.0.0",
76
+ });
65
77
  }
66
78
  }
67
79
 
@@ -79,8 +91,9 @@ if (fs.existsSync(sourceEntry)) {
79
91
  const bunExecutable = resolveBunExecutable();
80
92
 
81
93
  if (bunExecutable) {
82
- run(bunExecutable, ["run", sourceEntry, ...process.argv.slice(2)], {
94
+ run(bunExecutable, ["run", sourceEntry, ...cliArgs], {
83
95
  ...process.env,
96
+ RENX_VERSION: process.env.RENX_VERSION || packageJson.version || "0.0.0",
84
97
  AGENT_WORKDIR: process.env.AGENT_WORKDIR || process.cwd(),
85
98
  ...(resolvedRepoRoot ? { AGENT_REPO_ROOT: resolvedRepoRoot } : {}),
86
99
  });
package/bin/renx.exe CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renxqoo/renx-code",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "Renx Code terminal AI coding assistant",
5
5
  "type": "commonjs",
6
6
  "private": false,