@rivocode-cli/cli 3.0.0 → 3.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/rivo.js +32 -4
- package/package.json +10 -4
package/bin/rivo.js
CHANGED
|
@@ -1,4 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const os = require('os');
|
|
4
|
+
const { spawnSync } = require('child_process');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
const platform = os.platform();
|
|
8
|
+
const architecture = os.arch();
|
|
9
|
+
|
|
10
|
+
const platformPackage = `@rivocode-cli/cli-${platform}-${architecture}`;
|
|
11
|
+
|
|
12
|
+
let binaryPath;
|
|
13
|
+
try {
|
|
14
|
+
const packageJsonPath = require.resolve(`${platformPackage}/package.json`);
|
|
15
|
+
const packageDir = path.dirname(packageJsonPath);
|
|
16
|
+
const binaryName = platform === 'win32' ? 'rivo.exe' : 'rivo';
|
|
17
|
+
binaryPath = path.join(packageDir, 'bin', binaryName);
|
|
18
|
+
} catch (error) {
|
|
19
|
+
console.error(`Error: Unsupported platform or architecture: ${platform}-${architecture}`);
|
|
20
|
+
console.error(`Please ensure the optional dependency ${platformPackage} was installed.`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const args = process.argv.slice(2);
|
|
25
|
+
const result = spawnSync(binaryPath, args, { stdio: 'inherit' });
|
|
26
|
+
|
|
27
|
+
if (result.error) {
|
|
28
|
+
console.error(`Failed to execute binary: ${result.error.message}`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
process.exit(result.status || 0);
|
package/package.json
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivocode-cli/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "RivoCode — AI-powered terminal coding assistant",
|
|
5
5
|
"author": "Sanket Padhyal <mrsanketpadhyal@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"bin": {
|
|
9
9
|
"rivo": "bin/rivo.js",
|
|
10
|
-
"rivocode": "bin/rivo.js"
|
|
11
|
-
"cli": "bin/rivo.js"
|
|
10
|
+
"rivocode": "bin/rivo.js"
|
|
12
11
|
},
|
|
13
12
|
"files": [
|
|
14
|
-
"bin",
|
|
13
|
+
"bin/rivo.js",
|
|
15
14
|
"README.md",
|
|
16
15
|
"LICENSE"
|
|
17
16
|
],
|
|
17
|
+
"optionalDependencies": {
|
|
18
|
+
"@rivocode-cli/cli-linux-x64": "3.0.2",
|
|
19
|
+
"@rivocode-cli/cli-linux-arm64": "3.0.2",
|
|
20
|
+
"@rivocode-cli/cli-darwin-x64": "3.0.2",
|
|
21
|
+
"@rivocode-cli/cli-darwin-arm64": "3.0.2",
|
|
22
|
+
"@rivocode-cli/cli-win32-x64": "3.0.2"
|
|
23
|
+
},
|
|
18
24
|
"repository": {
|
|
19
25
|
"type": "git",
|
|
20
26
|
"url": "git+https://github.com/sanketpadhyal/RivoCode-Cli.git"
|