@xaidenlabs/uso 1.1.61 โ 1.1.62
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
|
@@ -20,8 +20,6 @@ const askQuestion = (query) => {
|
|
|
20
20
|
* Runs a command and attempts to elevate privileges if it fails with a permission error.
|
|
21
21
|
*/
|
|
22
22
|
const runOrElevate = (command, description) => {
|
|
23
|
-
log.info(`Running: ${description}...`);
|
|
24
|
-
|
|
25
23
|
// We run without silent:true initially to let the user see output,
|
|
26
24
|
// but detecting the error code is what matters.
|
|
27
25
|
// actually, to detect the specific string "os error 1314", we need to capture output.
|
package/src/commands/workflow.js
CHANGED
|
@@ -15,19 +15,12 @@ const runProxyCommand = async (command, args = [], binary = 'anchor') => {
|
|
|
15
15
|
const nativeAvailable = shell.which(binary);
|
|
16
16
|
if (stealth.enabled && !nativeAvailable) {
|
|
17
17
|
const fullCommand = `${binary} ${command} ${args.join(' ')}`;
|
|
18
|
-
log.header(`๐ Running: ${fullCommand}`);
|
|
19
|
-
log.info(`๐ง Routing through Uso Engine...`);
|
|
20
18
|
|
|
21
19
|
// Source cargo/solana paths inside WSL before running
|
|
22
20
|
const envSetup = 'source $HOME/.cargo/env 2>/dev/null; export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"';
|
|
23
21
|
const wslCwd = toWslPath(process.cwd());
|
|
24
22
|
const execution = runWsl(`${envSetup} && ${fullCommand}`, { distro: stealth.distro, cwd: process.cwd() });
|
|
25
23
|
|
|
26
|
-
if (execution.code === 0) {
|
|
27
|
-
log.success(`โ
'${command}' completed successfully.`);
|
|
28
|
-
} else {
|
|
29
|
-
log.error(`โ '${command}' failed.`);
|
|
30
|
-
}
|
|
31
24
|
return;
|
|
32
25
|
}
|
|
33
26
|
|
|
@@ -40,12 +33,10 @@ const runProxyCommand = async (command, args = [], binary = 'anchor') => {
|
|
|
40
33
|
}
|
|
41
34
|
|
|
42
35
|
const fullCommand = `${binary} ${command} ${args.join(' ')}`;
|
|
43
|
-
log.header(`๐ Running: ${fullCommand}`);
|
|
44
36
|
|
|
45
37
|
const execution = shell.exec(fullCommand);
|
|
46
38
|
|
|
47
39
|
if (execution.code === 0) {
|
|
48
|
-
log.success(`โ
'${command}' completed successfully.`);
|
|
49
40
|
return;
|
|
50
41
|
}
|
|
51
42
|
|
|
@@ -61,7 +52,7 @@ const runProxyCommand = async (command, args = [], binary = 'anchor') => {
|
|
|
61
52
|
} else {
|
|
62
53
|
log.warn("โ ๏ธ Windows requires Administrator privileges for this operation.");
|
|
63
54
|
}
|
|
64
|
-
|
|
55
|
+
|
|
65
56
|
|
|
66
57
|
// Clean stale blocked artifacts before elevated retry (only for cargo/anchor builds)
|
|
67
58
|
if (isAppControlBlock && binary === 'anchor') {
|
|
@@ -72,7 +63,7 @@ const runProxyCommand = async (command, args = [], binary = 'anchor') => {
|
|
|
72
63
|
|
|
73
64
|
await runElevatedWithProgress(command, args, binary);
|
|
74
65
|
} else {
|
|
75
|
-
|
|
66
|
+
// Command failed (non-elevated)
|
|
76
67
|
}
|
|
77
68
|
};
|
|
78
69
|
|
|
@@ -91,8 +82,7 @@ const runElevatedWithProgress = (command, args = [], binary = 'anchor') => {
|
|
|
91
82
|
// 1. Prepare progress file
|
|
92
83
|
try { fs.writeFileSync(progressFile, ''); } catch (e) { }
|
|
93
84
|
|
|
94
|
-
|
|
95
|
-
log.warn("๐ Output will be mirrored below. Keep the new window open!");
|
|
85
|
+
|
|
96
86
|
|
|
97
87
|
// 2. Construct Elevated Command
|
|
98
88
|
const innerCmd = `
|
|
@@ -239,8 +229,6 @@ const validator = async (args = []) => {
|
|
|
239
229
|
const cmdArgs = flags.join(' ');
|
|
240
230
|
const fullCmd = `solana-test-validator ${cmdArgs}`;
|
|
241
231
|
|
|
242
|
-
log.header(`๐ Starting Validator via Uso Engine...`);
|
|
243
|
-
log.info(`๐ง Running: ${fullCmd}`);
|
|
244
232
|
log.info("๐ Press Ctrl+C to stop it.");
|
|
245
233
|
|
|
246
234
|
const envSetup = 'source $HOME/.cargo/env 2>/dev/null; export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"';
|
|
@@ -304,7 +292,6 @@ const validator = async (args = []) => {
|
|
|
304
292
|
const cmdArgs = flags.join(' ');
|
|
305
293
|
const fullCmd = cmdArgs ? `solana-test-validator ${cmdArgs}` : 'solana-test-validator';
|
|
306
294
|
|
|
307
|
-
log.header(`๐ Starting Solana Test Validator (${fullCmd})...`);
|
|
308
295
|
log.info("๐ Press Ctrl+C to stop it.");
|
|
309
296
|
|
|
310
297
|
// Run and capture exit code
|
|
@@ -324,7 +311,7 @@ const validator = async (args = []) => {
|
|
|
324
311
|
const flagStr = flags.join(' ');
|
|
325
312
|
const targetCmd = `solana-test-validator ${flagStr}`;
|
|
326
313
|
|
|
327
|
-
|
|
314
|
+
|
|
328
315
|
log.warn("๐ A new window will appear. Keep it open to run the validator!");
|
|
329
316
|
|
|
330
317
|
// Robust Launch using EncodedCommand to avoid quoting hell and set CWD correctly
|
|
@@ -385,7 +372,7 @@ const validator = async (args = []) => {
|
|
|
385
372
|
|
|
386
373
|
const unblock = () => {
|
|
387
374
|
const cwd = process.cwd();
|
|
388
|
-
|
|
375
|
+
|
|
389
376
|
|
|
390
377
|
if (os.platform() !== 'win32') {
|
|
391
378
|
log.success("โ
Not on Windows, nothing to unblock.");
|
|
@@ -424,7 +411,7 @@ module.exports = {
|
|
|
424
411
|
|
|
425
412
|
const dev = async () => {
|
|
426
413
|
const stealth = isStealthMode();
|
|
427
|
-
|
|
414
|
+
|
|
428
415
|
|
|
429
416
|
// 1. Check if validator is running
|
|
430
417
|
const isValidatorRunning = () => {
|
|
@@ -440,7 +427,7 @@ const dev = async () => {
|
|
|
440
427
|
if (isValidatorRunning()) {
|
|
441
428
|
log.success("โ
Validator is already running.");
|
|
442
429
|
} else {
|
|
443
|
-
|
|
430
|
+
|
|
444
431
|
// Spawn validator (this will open the Admin window)
|
|
445
432
|
// We use [] args to start cleanly but persistently.
|
|
446
433
|
// If it fails, the user will see it in the new window.
|
|
@@ -463,7 +450,7 @@ const dev = async () => {
|
|
|
463
450
|
}
|
|
464
451
|
}
|
|
465
452
|
|
|
466
|
-
|
|
453
|
+
|
|
467
454
|
// Fix: Pass --skip-local-validator directly (without --) so Anchor consumes it
|
|
468
455
|
test(['--skip-local-validator']);
|
|
469
456
|
|