@xaidenlabs/uso 1.1.43 → 1.1.45
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/index.js +6 -0
- package/package.json +1 -1
- package/src/platforms/wsl.js +6 -5
package/bin/index.js
CHANGED
|
@@ -19,6 +19,12 @@ program
|
|
|
19
19
|
.option('--wsl', 'Install in Stealth WSL Mode (Windows Only)')
|
|
20
20
|
.action(init);
|
|
21
21
|
|
|
22
|
+
program
|
|
23
|
+
.command('setup [component]')
|
|
24
|
+
.description('Alias for init (Install components)')
|
|
25
|
+
.option('--wsl', 'Install in Stealth WSL Mode (Windows Only)')
|
|
26
|
+
.action(init);
|
|
27
|
+
|
|
22
28
|
program
|
|
23
29
|
.command('doctor')
|
|
24
30
|
.description('Check if the environment is ready for Solana development')
|
package/package.json
CHANGED
package/src/platforms/wsl.js
CHANGED
|
@@ -4,6 +4,7 @@ const { isWslInstalled, runWsl, toWslPath } = require('../utils/wsl-bridge');
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const fs = require('fs');
|
|
6
6
|
const os = require('os');
|
|
7
|
+
const { spawnSync } = require('child_process');
|
|
7
8
|
|
|
8
9
|
const installWsl = async () => {
|
|
9
10
|
log.header("🐧 Configuring Stealth WSL Environment...");
|
|
@@ -20,13 +21,13 @@ const installWsl = async () => {
|
|
|
20
21
|
// We target 'Ubuntu' as the standard distro.
|
|
21
22
|
const checkDistro = shell.exec('wsl -l -v', { silent: true });
|
|
22
23
|
if (!checkDistro.stdout.includes('Ubuntu')) {
|
|
23
|
-
log.info("📦 Installing Ubuntu (
|
|
24
|
+
log.info("📦 Installing Ubuntu (Please approve UAC prompt if asked)...");
|
|
25
|
+
log.warn("⏳ This may take a few minutes (Downloading ~500MB)...");
|
|
24
26
|
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
const install = shell.exec('wsl --install -d Ubuntu');
|
|
27
|
+
// Use spawnSync with inherit to let the user see the WSL download progress bar
|
|
28
|
+
const installCursor = spawnSync('wsl', ['--install', '-d', 'Ubuntu'], { stdio: 'inherit', shell: true });
|
|
28
29
|
|
|
29
|
-
if (
|
|
30
|
+
if (installCursor.status !== 0) {
|
|
30
31
|
log.error("❌ Failed to install Ubuntu.");
|
|
31
32
|
log.warn("👉 Try running manually: wsl --install -d Ubuntu");
|
|
32
33
|
return false;
|