raqeb-cli 1.3.3 → 1.3.4

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/raqeb.js CHANGED
@@ -360,7 +360,7 @@ Installation:
360
360
  program
361
361
  .name('raqeb')
362
362
  .description('Raqeb CLI - Database PAM and Secrets Management')
363
- .version('1.3.3')
363
+ .version('1.3.4')
364
364
  .option('-i, --interactive', 'Launch interactive mode')
365
365
  .hook('preAction', async (thisCommand, actionCommand) => {
366
366
  // Handle -i flag
@@ -31,9 +31,7 @@ class InteractiveShell {
31
31
  try {
32
32
  const response = await this.client.get('/auth/me');
33
33
  this.userInfo = response.data;
34
- console.log('User info loaded:', this.userInfo); // Debug
35
34
  } catch (error) {
36
- console.error('Failed to load user info:', error.message); // Debug
37
35
  this.userInfo = {
38
36
  email: 'Not logged in',
39
37
  tenant_name: 'Unknown',
@@ -91,25 +89,29 @@ class InteractiveShell {
91
89
  showWelcome() {
92
90
  console.clear();
93
91
 
94
- // Raqeb ASCII Logo - Custom design from user
92
+ // Raqeb ASCII Logo - User's custom design with colors
95
93
  const blue = chalk.hex('#0066cc');
96
- const green = chalk.hex('#00aa80');
94
+ const green = chalk.hex('#00cc99');
97
95
  const cyan = chalk.hex('#00ccaa');
98
96
 
99
97
  console.log('');
100
- console.log(' ' + blue('●'));
101
- console.log(' ' + blue('╱'));
102
- console.log(' ' + blue('╭──○'));
103
- console.log(' ' + blue('') + ' ' + green('╱ ╲'));
104
- console.log(' ' + blue('╱') + ' ' + green('╱') + cyan(' ● ') + green('╲'));
105
- console.log(' ' + blue('') + ' ' + green('') + cyan('╱ ╲') + green(''));
106
- console.log(' ' + blue('') + ' ' + chalk.bold.white('RAQEB') + green('') + cyan(' ') + green(''));
107
- console.log(' ' + blue('│') + ' ' + green('│') + cyan(' ') + green('│'));
108
- console.log(' ' + blue('') + ' ' + green('') + cyan(' ') + green(''));
109
- console.log(' ' + blue('') + ' ' + green(' '));
110
- console.log(' ' + blue('╰──○'));
111
- console.log(' ' + blue('╲'));
112
- console.log(' ' + blue('●'));
98
+ console.log(' ' + blue('●'));
99
+ console.log(' ' + blue('╱'));
100
+ console.log(' ' + blue('╱ ╲'));
101
+ console.log(' ' + blue('╭──○') + ' ' + blue('○──╮'));
102
+ console.log(' ' + blue('╱') + ' ' + green('╱') + cyan(' ● ') + green('╲') + ' ' + blue('╲'));
103
+ console.log(' ' + blue('') + ' ' + green('') + cyan(' ╱ ╲ ') + green('') + ' ' + blue('╲'));
104
+ console.log(' ' + blue('') + ' ' + green('') + cyan(' ╱ ╲ ') + green('╲') + ' ' + blue(''));
105
+ console.log(' ' + blue('│') + ' ' + green('│') + cyan(' │ │ ') + green('│') + ' ' + blue('│'));
106
+ console.log(' ' + blue('') + ' ' + chalk.bold.white('RAQEB') + ' ' + cyan('') + ' ' + blue(''));
107
+ console.log(' ' + blue('') + ' ' + green('│') + cyan(' │ │ ') + green('│') + ' ' + blue('│'));
108
+ console.log(' ' + blue('') + ' ' + green('╲') + cyan(' ╲ ╱ ') + green('╱') + ' ' + blue('╱'));
109
+ console.log(' ' + blue('╲') + ' ' + green('╲') + cyan(' ╲ ╱ ') + green('╱') + ' ' + blue('╱'));
110
+ console.log(' ' + blue('╲') + ' ' + green('╲') + cyan(' ') + green('╱') + ' ' + blue('╱'));
111
+ console.log(' ' + blue('╰──○') + ' ' + blue('○──╯'));
112
+ console.log(' ' + blue('╲ ╱'));
113
+ console.log(' ' + blue('╲ ╱'));
114
+ console.log(' ' + blue('●'));
113
115
  console.log('');
114
116
 
115
117
  // Header box with user info
@@ -118,7 +120,7 @@ class InteractiveShell {
118
120
  const userRole = this.userInfo?.role || 'user';
119
121
 
120
122
  console.log(blue('╔════════════════════════════════════════════════════════════════════════════╗'));
121
- console.log(blue('║') + chalk.bold.white(' 🌐 Raqeb CLI - Interactive Mode v1.3.3 ') + blue('║'));
123
+ console.log(blue('║') + chalk.bold.white(' 🌐 Raqeb CLI - Interactive Mode v1.3.4 ') + blue('║'));
122
124
  console.log(blue('╠════════════════════════════════════════════════════════════════════════════╣'));
123
125
  console.log(blue('║ ') + chalk.gray('User: ') + green(userEmail.padEnd(64)) + blue(' ║'));
124
126
  console.log(blue('║ ') + chalk.gray('Tenant: ') + green(tenantName.padEnd(64)) + blue(' ║'));
@@ -175,15 +177,15 @@ class InteractiveShell {
175
177
  pageSize: 10
176
178
  }]);
177
179
 
178
- // Just show the submenu, don't execute
180
+ // Show the submenu for the selected command
179
181
  if (answer.command === '/db') {
180
- this.showDatabaseCommands();
182
+ await this.handleDatabase('/db');
181
183
  } else if (answer.command === '/secrets') {
182
- this.showSecretsCommands();
184
+ await this.handleSecrets('/secrets');
183
185
  } else if (answer.command === '/keys') {
184
- this.showKeysCommands();
186
+ await this.handleKeys('/keys');
185
187
  } else if (answer.command === '/audit') {
186
- this.showAuditCommands();
188
+ await this.handleAudit('/audit');
187
189
  } else if (answer.command === '/help') {
188
190
  this.showHelp();
189
191
  } else if (answer.command === '/clear') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "raqeb-cli",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "Raqeb CLI - Command-line tool for Database PAM and Developer Secrets Management",
5
5
  "main": "index.js",
6
6
  "bin": {