@ayurak/aribot-cli 1.0.4 → 1.0.5
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/dist/cli.js +11 -4
- package/package.json +1 -1
- package/src/cli.ts +11 -4
package/dist/cli.js
CHANGED
|
@@ -28,7 +28,7 @@ const program = new commander_1.Command();
|
|
|
28
28
|
program
|
|
29
29
|
.name('aribot')
|
|
30
30
|
.description('AI-powered threat modeling CLI by Ayurak')
|
|
31
|
-
.version('1.0.
|
|
31
|
+
.version('1.0.5');
|
|
32
32
|
// Helper to get auth headers
|
|
33
33
|
function getHeaders() {
|
|
34
34
|
const apiKey = config.get('apiKey');
|
|
@@ -289,10 +289,17 @@ program
|
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
291
|
try {
|
|
292
|
-
const
|
|
292
|
+
const [userData, keysData] = await Promise.all([
|
|
293
|
+
apiRequest('/v1/users/me/'),
|
|
294
|
+
apiRequest('/v1/developer/api-keys/')
|
|
295
|
+
]);
|
|
296
|
+
const company = keysData?.[0]?.company_name || userData.company || 'N/A';
|
|
293
297
|
console.log(chalk_1.default.green('Authenticated as:'));
|
|
294
|
-
console.log(` Email: ${
|
|
295
|
-
console.log(` Company: ${
|
|
298
|
+
console.log(` Email: ${userData.email}`);
|
|
299
|
+
console.log(` Company: ${company}`);
|
|
300
|
+
if (keysData?.[0]) {
|
|
301
|
+
console.log(` Plan: ${keysData[0].plan_name || 'N/A'}`);
|
|
302
|
+
}
|
|
296
303
|
}
|
|
297
304
|
catch {
|
|
298
305
|
console.log(chalk_1.default.yellow('API key stored but validation failed'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ayurak/aribot-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "AI-powered threat modeling CLI by Ayurak. Automatically analyze diagrams, generate STRIDE threats, and get security recommendations.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
package/src/cli.ts
CHANGED
|
@@ -27,7 +27,7 @@ const program = new Command();
|
|
|
27
27
|
program
|
|
28
28
|
.name('aribot')
|
|
29
29
|
.description('AI-powered threat modeling CLI by Ayurak')
|
|
30
|
-
.version('1.0.
|
|
30
|
+
.version('1.0.5');
|
|
31
31
|
|
|
32
32
|
// Helper to get auth headers
|
|
33
33
|
function getHeaders(): Record<string, string> {
|
|
@@ -332,10 +332,17 @@ program
|
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
try {
|
|
335
|
-
const
|
|
335
|
+
const [userData, keysData] = await Promise.all([
|
|
336
|
+
apiRequest('/v1/users/me/'),
|
|
337
|
+
apiRequest('/v1/developer/api-keys/')
|
|
338
|
+
]);
|
|
339
|
+
const company = keysData?.[0]?.company_name || userData.company || 'N/A';
|
|
336
340
|
console.log(chalk.green('Authenticated as:'));
|
|
337
|
-
console.log(` Email: ${
|
|
338
|
-
console.log(` Company: ${
|
|
341
|
+
console.log(` Email: ${userData.email}`);
|
|
342
|
+
console.log(` Company: ${company}`);
|
|
343
|
+
if (keysData?.[0]) {
|
|
344
|
+
console.log(` Plan: ${keysData[0].plan_name || 'N/A'}`);
|
|
345
|
+
}
|
|
339
346
|
} catch {
|
|
340
347
|
console.log(chalk.yellow('API key stored but validation failed'));
|
|
341
348
|
}
|