@xaidenlabs/uso 1.1.60 โ†’ 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/bin/index.js CHANGED
@@ -4,7 +4,7 @@ const { init } = require('../src/commands/init');
4
4
  const { doctor } = require('../src/commands/doctor');
5
5
  const { verify } = require('../src/commands/verify');
6
6
  const { create } = require('../src/commands/create');
7
- const { build, test, deploy, clean, unblock, airdrop, validator, dev } = require('../src/commands/workflow');
7
+ const { build, test, deploy, clean, unblock, airdrop, address, balance, validator, dev } = require('../src/commands/workflow');
8
8
  const { uninstall } = require('../src/commands/uninstall');
9
9
 
10
10
  program
@@ -57,6 +57,16 @@ program
57
57
  .description('Airdrop SOL to a wallet (wraps "solana airdrop")')
58
58
  .action(airdrop);
59
59
 
60
+ program
61
+ .command('address')
62
+ .description('Show your wallet address (wraps "solana address")')
63
+ .action(address);
64
+
65
+ program
66
+ .command('balance [address]')
67
+ .description('Show SOL balance (wraps "solana balance")')
68
+ .action(balance);
69
+
60
70
  program
61
71
  .command('validator [args...]')
62
72
  .alias('val')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaidenlabs/uso",
3
- "version": "1.1.60",
3
+ "version": "1.1.62",
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"
@@ -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.
@@ -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
- log.info("๐Ÿ”‘ Requesting elevated access (command will run in background)...\n");
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
- log.error(`โŒ '${command}' failed.`);
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
- log.info("๐Ÿš€ Spawning visible Administrator terminal...");
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 = `
@@ -212,6 +202,11 @@ const test = async (args = []) => {
212
202
 
213
203
  return runProxyCommand('test', userArgs, 'anchor');
214
204
  };
205
+ const address = () => runProxyCommand('address', [], 'solana');
206
+ const balance = (addrArg) => {
207
+ const args = addrArg ? [addrArg] : [];
208
+ return runProxyCommand('balance', args, 'solana');
209
+ };
215
210
  const airdrop = (amount, recipient) => {
216
211
  const args = [amount];
217
212
  if (recipient) args.push(recipient);
@@ -234,8 +229,6 @@ const validator = async (args = []) => {
234
229
  const cmdArgs = flags.join(' ');
235
230
  const fullCmd = `solana-test-validator ${cmdArgs}`;
236
231
 
237
- log.header(`๐Ÿš€ Starting Validator via Uso Engine...`);
238
- log.info(`๐Ÿง Running: ${fullCmd}`);
239
232
  log.info("๐Ÿ‘‰ Press Ctrl+C to stop it.");
240
233
 
241
234
  const envSetup = 'source $HOME/.cargo/env 2>/dev/null; export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"';
@@ -299,7 +292,6 @@ const validator = async (args = []) => {
299
292
  const cmdArgs = flags.join(' ');
300
293
  const fullCmd = cmdArgs ? `solana-test-validator ${cmdArgs}` : 'solana-test-validator';
301
294
 
302
- log.header(`๐Ÿš€ Starting Solana Test Validator (${fullCmd})...`);
303
295
  log.info("๐Ÿ‘‰ Press Ctrl+C to stop it.");
304
296
 
305
297
  // Run and capture exit code
@@ -319,7 +311,7 @@ const validator = async (args = []) => {
319
311
  const flagStr = flags.join(' ');
320
312
  const targetCmd = `solana-test-validator ${flagStr}`;
321
313
 
322
- log.info(`๐Ÿš€ Spawning visible Administrator terminal for '${targetCmd}'...`);
314
+
323
315
  log.warn("๐Ÿ‘‰ A new window will appear. Keep it open to run the validator!");
324
316
 
325
317
  // Robust Launch using EncodedCommand to avoid quoting hell and set CWD correctly
@@ -380,7 +372,7 @@ const validator = async (args = []) => {
380
372
 
381
373
  const unblock = () => {
382
374
  const cwd = process.cwd();
383
- log.info(`๐Ÿ”“ Unblocking files in ${cwd}...`);
375
+
384
376
 
385
377
  if (os.platform() !== 'win32') {
386
378
  log.success("โœ… Not on Windows, nothing to unblock.");
@@ -419,7 +411,7 @@ module.exports = {
419
411
 
420
412
  const dev = async () => {
421
413
  const stealth = isStealthMode();
422
- log.header("๐Ÿš€ Starting Development Environment...");
414
+
423
415
 
424
416
  // 1. Check if validator is running
425
417
  const isValidatorRunning = () => {
@@ -435,7 +427,7 @@ const dev = async () => {
435
427
  if (isValidatorRunning()) {
436
428
  log.success("โœ… Validator is already running.");
437
429
  } else {
438
- log.info("โณ Spawning Validator...");
430
+
439
431
  // Spawn validator (this will open the Admin window)
440
432
  // We use [] args to start cleanly but persistently.
441
433
  // If it fails, the user will see it in the new window.
@@ -458,7 +450,7 @@ const dev = async () => {
458
450
  }
459
451
  }
460
452
 
461
- log.info("๐Ÿงช Running initial tests...");
453
+
462
454
  // Fix: Pass --skip-local-validator directly (without --) so Anchor consumes it
463
455
  test(['--skip-local-validator']);
464
456
 
@@ -502,6 +494,8 @@ module.exports = {
502
494
  clean,
503
495
  unblock,
504
496
  airdrop,
497
+ address,
498
+ balance,
505
499
  validator,
506
500
  dev
507
501
  };