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 +1 -1
- package/lib/interactive.js +25 -23
- package/package.json +1 -1
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.
|
|
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
|
package/lib/interactive.js
CHANGED
|
@@ -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 -
|
|
92
|
+
// Raqeb ASCII Logo - User's custom design with colors
|
|
95
93
|
const blue = chalk.hex('#0066cc');
|
|
96
|
-
const green = chalk.hex('#
|
|
94
|
+
const green = chalk.hex('#00cc99');
|
|
97
95
|
const cyan = chalk.hex('#00ccaa');
|
|
98
96
|
|
|
99
97
|
console.log('');
|
|
100
|
-
console.log('
|
|
101
|
-
console.log('
|
|
102
|
-
console.log('
|
|
103
|
-
console.log('
|
|
104
|
-
console.log('
|
|
105
|
-
console.log('
|
|
106
|
-
console.log('
|
|
107
|
-
console.log('
|
|
108
|
-
console.log('
|
|
109
|
-
console.log('
|
|
110
|
-
console.log('
|
|
111
|
-
console.log('
|
|
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.
|
|
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
|
-
//
|
|
180
|
+
// Show the submenu for the selected command
|
|
179
181
|
if (answer.command === '/db') {
|
|
180
|
-
this.
|
|
182
|
+
await this.handleDatabase('/db');
|
|
181
183
|
} else if (answer.command === '/secrets') {
|
|
182
|
-
this.
|
|
184
|
+
await this.handleSecrets('/secrets');
|
|
183
185
|
} else if (answer.command === '/keys') {
|
|
184
|
-
this.
|
|
186
|
+
await this.handleKeys('/keys');
|
|
185
187
|
} else if (answer.command === '/audit') {
|
|
186
|
-
this.
|
|
188
|
+
await this.handleAudit('/audit');
|
|
187
189
|
} else if (answer.command === '/help') {
|
|
188
190
|
this.showHelp();
|
|
189
191
|
} else if (answer.command === '/clear') {
|