@vainplex/shieldapi-cli 1.1.0 → 1.1.1

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": "@vainplex/shieldapi-cli",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Security intelligence from your terminal. Pay-per-request with USDC.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,7 +17,6 @@ function readStdin() {
17
17
  rl.on('line', (line) => { data = line; rl.close(); });
18
18
  rl.on('close', () => resolve(data.trim()));
19
19
  rl.on('error', reject);
20
- // Timeout after 10s
21
20
  setTimeout(() => { rl.close(); reject(new Error('Stdin timeout — no input received')); }, 10000);
22
21
  });
23
22
  }
@@ -27,6 +26,8 @@ function readStdin() {
27
26
  * Hashes locally with SHA-1, sends hash to API.
28
27
  */
29
28
  export async function passwordCommand(password, opts) {
29
+ let spinner = null;
30
+
30
31
  try {
31
32
  let hash;
32
33
 
@@ -62,7 +63,7 @@ export async function passwordCommand(password, opts) {
62
63
  }
63
64
  }
64
65
 
65
- const spinner = opts.quiet ? null : ora({ text: 'Checking password...', stream: process.stderr }).start();
66
+ spinner = opts.quiet ? null : ora({ text: 'Checking password...', stream: process.stderr }).start();
66
67
  const wallet = opts.demo ? null : resolveWallet(opts);
67
68
 
68
69
  const data = await apiRequest('check-password', { hash }, {
@@ -80,7 +81,7 @@ export async function passwordCommand(password, opts) {
80
81
 
81
82
  process.exitCode = exitCodeFromResult(data);
82
83
  } catch (err) {
83
- if (!opts.quiet) process.stderr.write(chalk.red(`✖ ${err.message}\n`));
84
+ spinner?.fail(err.message);
84
85
  process.exitCode = exitCodeFromError(err);
85
86
  }
86
87
  }
package/src/index.js CHANGED
@@ -14,7 +14,7 @@ export function run(argv) {
14
14
  program
15
15
  .name('shieldapi')
16
16
  .description('🛡️ ShieldAPI CLI — Security intelligence from your terminal. Pay-per-request with USDC.')
17
- .version('1.1.0')
17
+ .version('1.1.1')
18
18
  .option('--wallet <key>', 'Private key for x402 payments (or set SHIELDAPI_WALLET_KEY)')
19
19
  .option('--json', 'Output raw JSON instead of formatted output')
20
20
  .option('--no-color', 'Disable colors')