ai-warden 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.js +7 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-warden",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "AI security scanner - Detect prompt injection attacks and PII with user settings",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -452,11 +452,13 @@ async function loginCommand() {
452
452
  `);
453
453
 
454
454
  // Close server and show success
455
- server.close();
456
- console.log(`\n✅ ${keyType} API key saved successfully!`);
457
- console.log(`Config: ${config.getConfigPath()}`);
458
- console.log('\nYou can now use: aiwarden validate "text"');
459
- resolve();
455
+ server.close(() => {
456
+ console.log(`\n✅ ${keyType} API key saved successfully!`);
457
+ console.log(`Config: ${config.getConfigPath()}`);
458
+ console.log('\nYou can now use: aiwarden validate "text"');
459
+ resolve();
460
+ process.exit(0);
461
+ });
460
462
  } else {
461
463
  // No key provided
462
464
  res.writeHead(400, { 'Content-Type': 'text/html' });