@xaidenlabs/uso 1.1.73 → 1.1.75

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.73",
3
+ "version": "1.1.75",
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"
@@ -6,6 +6,8 @@ const readline = require('readline');
6
6
  const { log, spinner } = require('../utils/logger');
7
7
  const { ensureWalletInteractive, resolveSolanaKeygen } = require('../utils/wallet');
8
8
  const { getCargoBinPath } = require('../utils/paths');
9
+ const { isStealthMode } = require('../utils/stealth');
10
+ const { runWsl, toWslPath } = require('../utils/wsl-bridge');
9
11
 
10
12
  const getSolanaBin = () => {
11
13
  if (shell.which('solana')) return 'solana';
@@ -113,6 +115,7 @@ const verify = async () => {
113
115
 
114
116
  const templateDir = path.resolve(__dirname, '../../anchor_project');
115
117
  const tempDir = path.join(os.tmpdir(), 'uso-verification-' + Date.now());
118
+ const stealth = isStealthMode();
116
119
 
117
120
  try {
118
121
  shell.cp('-R', templateDir, tempDir);
@@ -128,10 +131,24 @@ const verify = async () => {
128
131
  log.warn(`⚠️ Retrying build (Attempt ${attempts}/${maxAttempts})...`);
129
132
  }
130
133
 
131
- const buildResult = shell.exec(`cd "${tempDir}" && ${anchorCmd} build`, {
132
- silent: false,
133
- env: process.env
134
- });
134
+ let buildResult;
135
+
136
+ if (stealth.enabled) {
137
+ // Convert Windows path to WSL path
138
+ const wslProjectPath = toWslPath(tempDir);
139
+
140
+ // Run anchor build in WSL
141
+ const buildCmd = `source $HOME/.cargo/env 2>/dev/null && cd "${wslProjectPath}" && anchor build`;
142
+ buildResult = runWsl(buildCmd, {
143
+ distro: stealth.distro,
144
+ execOpts: { silent: false }
145
+ });
146
+ } else {
147
+ buildResult = shell.exec(`cd "${tempDir}" && ${anchorCmd} build`, {
148
+ silent: false,
149
+ env: process.env
150
+ });
151
+ }
135
152
 
136
153
  success = buildResult.code === 0;
137
154
  let stderr = buildResult.stderr + buildResult.stdout;
@@ -144,7 +161,7 @@ const verify = async () => {
144
161
  continue;
145
162
  }
146
163
 
147
- if (os.platform() === 'win32' && stderr.includes('os error 1314')) {
164
+ if (!stealth.enabled && os.platform() === 'win32' && stderr.includes('os error 1314')) {
148
165
  log.warn("⚠️ Privilege error detected (os error 1314).");
149
166
  log.info("ℹ️ First-time Solana build requires Administrator privileges to install tools.");
150
167
  log.info("🛡️ Retrying with Elevated Permissions (Please accept UAC prompt)...");