@rivocode-cli/cli 3.0.2 → 3.0.4
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/postinstall.cjs +64 -0
- package/package.json +11 -9
- /package/bin/{rivo.js → rivo.cjs} +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const os = require('os');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const platform = os.platform();
|
|
7
|
+
const arch = os.arch();
|
|
8
|
+
|
|
9
|
+
const platformNames = {
|
|
10
|
+
darwin: 'macOS',
|
|
11
|
+
linux: 'Linux',
|
|
12
|
+
win32: 'Windows',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const archNames = {
|
|
16
|
+
x64: 'x86_64',
|
|
17
|
+
arm64: 'ARM64',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const platformEmoji = {
|
|
21
|
+
darwin: '🍎',
|
|
22
|
+
linux: '🐧',
|
|
23
|
+
win32: '🪟',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const osName = platformNames[platform] || platform;
|
|
27
|
+
const archName = archNames[arch] || arch;
|
|
28
|
+
const emoji = platformEmoji[platform] || '💻';
|
|
29
|
+
|
|
30
|
+
const packageName = `@rivocode-cli/cli-${platform}-${arch}`;
|
|
31
|
+
|
|
32
|
+
let binaryFound = false;
|
|
33
|
+
try {
|
|
34
|
+
require.resolve(`${packageName}/package.json`);
|
|
35
|
+
binaryFound = true;
|
|
36
|
+
} catch {}
|
|
37
|
+
|
|
38
|
+
const RESET = '\x1b[0m';
|
|
39
|
+
const BOLD = '\x1b[1m';
|
|
40
|
+
const GREEN = '\x1b[32m';
|
|
41
|
+
const CYAN = '\x1b[36m';
|
|
42
|
+
const YELLOW = '\x1b[33m';
|
|
43
|
+
const DIM = '\x1b[2m';
|
|
44
|
+
|
|
45
|
+
console.log('');
|
|
46
|
+
console.log(`${BOLD}${GREEN} ╔══════════════════════════════════════════╗${RESET}`);
|
|
47
|
+
console.log(`${BOLD}${GREEN} ║ RivoCode CLI installed! ║${RESET}`);
|
|
48
|
+
console.log(`${BOLD}${GREEN} ╚══════════════════════════════════════════╝${RESET}`);
|
|
49
|
+
console.log('');
|
|
50
|
+
console.log(` ${emoji} ${BOLD}Platform:${RESET} ${osName} (${archName})`);
|
|
51
|
+
console.log(` 📦 ${BOLD}Binary:${RESET} ${binaryFound ? `${GREEN}✔ ${packageName}${RESET}` : `${YELLOW}✘ Not found${RESET}`}`);
|
|
52
|
+
console.log(` 📍 ${BOLD}Node:${RESET} ${process.version}`);
|
|
53
|
+
console.log('');
|
|
54
|
+
|
|
55
|
+
if (binaryFound) {
|
|
56
|
+
console.log(` ${DIM}Get started by running:${RESET}`);
|
|
57
|
+
console.log('');
|
|
58
|
+
console.log(` ${BOLD}${CYAN}$ rivo${RESET}`);
|
|
59
|
+
console.log('');
|
|
60
|
+
} else {
|
|
61
|
+
console.log(` ${YELLOW}⚠ No binary found for ${platform}-${arch}.${RESET}`);
|
|
62
|
+
console.log(` ${YELLOW} Your platform may not be supported.${RESET}`);
|
|
63
|
+
console.log('');
|
|
64
|
+
}
|
package/package.json
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivocode-cli/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
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
|
-
"rivo": "bin/rivo.
|
|
10
|
-
"rivocode": "bin/rivo.
|
|
9
|
+
"rivo": "bin/rivo.cjs",
|
|
10
|
+
"rivocode": "bin/rivo.cjs"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
|
-
"bin/rivo.
|
|
13
|
+
"bin/rivo.cjs",
|
|
14
|
+
"bin/postinstall.cjs",
|
|
14
15
|
"README.md",
|
|
15
16
|
"LICENSE"
|
|
16
17
|
],
|
|
17
18
|
"optionalDependencies": {
|
|
18
|
-
"@rivocode-cli/cli-linux-x64": "3.0.
|
|
19
|
-
"@rivocode-cli/cli-linux-arm64": "3.0.
|
|
20
|
-
"@rivocode-cli/cli-darwin-x64": "3.0.
|
|
21
|
-
"@rivocode-cli/cli-darwin-arm64": "3.0.
|
|
22
|
-
"@rivocode-cli/cli-win32-x64": "3.0.
|
|
19
|
+
"@rivocode-cli/cli-linux-x64": "3.0.4",
|
|
20
|
+
"@rivocode-cli/cli-linux-arm64": "3.0.4",
|
|
21
|
+
"@rivocode-cli/cli-darwin-x64": "3.0.4",
|
|
22
|
+
"@rivocode-cli/cli-darwin-arm64": "3.0.4",
|
|
23
|
+
"@rivocode-cli/cli-win32-x64": "3.0.4"
|
|
23
24
|
},
|
|
24
25
|
"repository": {
|
|
25
26
|
"type": "git",
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
"sdk"
|
|
43
44
|
],
|
|
44
45
|
"scripts": {
|
|
46
|
+
"postinstall": "node bin/postinstall.cjs",
|
|
45
47
|
"rivo": "bun --cwd cli dev",
|
|
46
48
|
"start": "bun run rivo",
|
|
47
49
|
"start-cli": "bun run rivo",
|
|
File without changes
|