@relay-core/cli 0.3.3 → 0.3.5

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/install.js CHANGED
@@ -74,10 +74,18 @@ async function download(url, dest) {
74
74
  const binaryName = getBinaryName();
75
75
  const binaryPath = getBinaryPath(binaryName);
76
76
 
77
- // Skip download if binary already exists (re-install)
77
+ // Re-download if binary missing or version mismatch
78
78
  if (existsSync(binaryPath)) {
79
- console.log(`${binaryName} already installed.`);
80
- return;
79
+ try {
80
+ const out = execSync(`"${binaryPath}" --version`, { encoding: "utf-8", timeout: 5000 }).trim();
81
+ if (out.includes(VERSION)) {
82
+ console.log(`${binaryName} v${VERSION} already installed.`);
83
+ return;
84
+ }
85
+ console.log(`Installed ${out}, updating to v${VERSION}...`);
86
+ } catch {
87
+ console.log("Binary exists but failed --version check, re-downloading...");
88
+ }
81
89
  }
82
90
 
83
91
  const target = getTarget();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relay-core/cli",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "RelayCore CLI — high-performance Rust traffic interception proxy with TUI",
5
5
  "license": "MIT",
6
6
  "repository": "github:relaycraft/relay-core",
Binary file
Binary file