@xaidenlabs/uso 1.1.65 → 1.1.67

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaidenlabs/uso",
3
- "version": "1.1.65",
3
+ "version": "1.1.67",
4
4
  "description": "Universal Solana Development Toolchain. Native or Stealth WSL Mode. Build, test, and deploy without the friction.",
5
5
  "bin": {
6
6
  "uso": "bin/index.js"
@@ -4,18 +4,30 @@ const { log } = require('../utils/logger');
4
4
  const installLinux = async (shouldInstallRust, shouldInstallSolana) => {
5
5
  log.header("🐧 Linux detected.");
6
6
 
7
- // 1. Install dependencies (Quick check, or just run update? 'update' is harmless mostly)
8
- // We can assume if Rust/Solana are missing, deps might be too.
9
- // If both are present, we might skip this? For safety, we only run if installing something.
7
+ // 1. Install dependencies
10
8
  if (shouldInstallRust || shouldInstallSolana) {
11
9
  log.info("🐧 Checking Linux dependencies (libudev, pkg-config)...");
12
- shell.exec('sudo apt-get update && sudo apt-get install -y libudev-dev pkg-config build-essential');
10
+ if (shell.which('apt-get')) {
11
+ shell.exec('sudo apt-get update && sudo apt-get install -y libudev-dev pkg-config build-essential');
12
+ } else if (shell.which('dnf')) {
13
+ shell.exec('sudo dnf install -y systemd-devel pkgconf-pkg-config @development-tools');
14
+ } else if (shell.which('yum')) {
15
+ shell.exec('sudo yum install -y systemd-devel pkgconfig @development-tools');
16
+ } else if (shell.which('pacman')) {
17
+ shell.exec('sudo pacman -Sy --noconfirm systemd pkgconf base-devel');
18
+ } else {
19
+ log.warn("⚠️ Could not detect a supported package manager (apt/dnf/yum/pacman). Ensure libudev and pkg-config are installed.");
20
+ }
13
21
  }
14
22
 
15
23
  // 2. Install Rust
16
24
  if (shouldInstallRust) {
17
25
  log.info("🦀 Installing Rust...");
18
- shell.exec('curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y');
26
+ const rustInstall = shell.exec('curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y');
27
+ if (rustInstall.code !== 0) {
28
+ log.error("❌ Failed to install Rust.");
29
+ return false;
30
+ }
19
31
  log.success("✅ Rust installed.");
20
32
  } else {
21
33
  log.info("🦀 Rust is already installed. Skipping.");
@@ -24,7 +36,11 @@ const installLinux = async (shouldInstallRust, shouldInstallSolana) => {
24
36
  // 3. Install Solana CLI
25
37
  if (shouldInstallSolana) {
26
38
  log.info("☀️ Installing Solana CLI...");
27
- shell.exec('sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"');
39
+ const solanaInstall = shell.exec('sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"');
40
+ if (solanaInstall.code !== 0) {
41
+ log.error("❌ Failed to install Solana CLI.");
42
+ return false;
43
+ }
28
44
  log.success("✅ Solana CLI installed.");
29
45
  } else {
30
46
  log.info("☀️ Solana CLI is already installed. Skipping.");
@@ -33,4 +49,4 @@ const installLinux = async (shouldInstallRust, shouldInstallSolana) => {
33
49
  return true;
34
50
  };
35
51
 
36
- module.exports = { installLinux };
52
+ module.exports = { installLinux };