@vibe-assurance/cli 1.7.5 → 1.7.7
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 +1 -1
- package/src/commands/login.js +14 -4
- package/nul +0 -1
package/package.json
CHANGED
package/src/commands/login.js
CHANGED
|
@@ -71,13 +71,23 @@ async function login() {
|
|
|
71
71
|
const refreshToken = url.searchParams.get('refresh_token');
|
|
72
72
|
const expiresIn = url.searchParams.get('expires_in');
|
|
73
73
|
const error = url.searchParams.get('error');
|
|
74
|
+
const errorDescription = url.searchParams.get('error_description');
|
|
74
75
|
|
|
75
76
|
if (error) {
|
|
76
|
-
// Authentication failed
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
// Authentication failed - use description if available
|
|
78
|
+
const errorMessage = errorDescription || error;
|
|
79
|
+
|
|
80
|
+
// For license errors, redirect to pricing page instead of showing error HTML
|
|
81
|
+
if (error === 'cli_access_denied') {
|
|
82
|
+
res.writeHead(302, { 'Location': 'https://vibeassurance.app/pricing' });
|
|
83
|
+
res.end();
|
|
84
|
+
} else {
|
|
85
|
+
res.writeHead(400, { 'Content-Type': 'text/html' });
|
|
86
|
+
res.end(getErrorHtml(errorMessage));
|
|
87
|
+
}
|
|
88
|
+
|
|
79
89
|
server.close();
|
|
80
|
-
reject(new Error(
|
|
90
|
+
reject(new Error(errorMessage));
|
|
81
91
|
return;
|
|
82
92
|
}
|
|
83
93
|
|
package/nul
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/usr/bin/bash: line 1: del: command not found
|