@taj-special/dravix-code 1.1.15 → 1.1.17
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/index.js +11 -5
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -136,13 +136,13 @@ async function browserAuth() {
|
|
|
136
136
|
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝`));
|
|
137
137
|
console.log(chalk.hex('#6366f1').bold(' Code') + DIM(` v${VERSION} · `) + P('AI-powered coding assistant'));
|
|
138
138
|
console.log(line + '\n');
|
|
139
|
-
console.log(' ' + colors.primary('◆') + ' ' + W.bold('Sign in
|
|
140
|
-
console.log(' ' + DIM('Use your
|
|
139
|
+
console.log(' ' + colors.primary('◆') + ' ' + W.bold('Sign in to Dravix Code'));
|
|
140
|
+
console.log(' ' + DIM('Use your Dravix account to sign in to Dravix Code.') + '\n');
|
|
141
141
|
console.log(line);
|
|
142
142
|
console.log('\n ' + DIM('Step 1 — ') + W('Open this link in your browser:') + '\n');
|
|
143
143
|
console.log(' ' + colors.primary(link(authUrl)) + '\n');
|
|
144
|
-
console.log(' ' + DIM('Step 2 — ') + W('Sign in
|
|
145
|
-
console.log(' ' + DIM('Step 3 — ') + W('Return here —
|
|
144
|
+
console.log(' ' + DIM('Step 2 — ') + W('Sign in to your Dravix account and authorize access'));
|
|
145
|
+
console.log(' ' + DIM('Step 3 — ') + W('Return here — authentication completes automatically') + '\n');
|
|
146
146
|
console.log(line + '\n');
|
|
147
147
|
let frameIdx = 0;
|
|
148
148
|
await new Promise((resolve, reject) => {
|
|
@@ -203,21 +203,26 @@ async function main() {
|
|
|
203
203
|
console.log(colors.muted('\n Signed out.\n'));
|
|
204
204
|
process.exit(0);
|
|
205
205
|
}
|
|
206
|
+
let justAuthenticated = false;
|
|
206
207
|
if (arg === '--login') {
|
|
207
208
|
if (isLoggedIn()) {
|
|
208
|
-
// Already logged in — skip login, go straight to main menu
|
|
209
209
|
banner();
|
|
210
210
|
}
|
|
211
211
|
else {
|
|
212
212
|
await browserAuth();
|
|
213
|
+
justAuthenticated = true;
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
216
|
else if (!isLoggedIn()) {
|
|
216
217
|
await browserAuth();
|
|
218
|
+
justAuthenticated = true;
|
|
217
219
|
}
|
|
218
220
|
else {
|
|
219
221
|
banner();
|
|
220
222
|
}
|
|
223
|
+
if (justAuthenticated) {
|
|
224
|
+
console.clear();
|
|
225
|
+
}
|
|
221
226
|
const { name, email } = getSavedUser();
|
|
222
227
|
const cwd = (arg && !arg.startsWith('--')) ? path.resolve(arg) : process.cwd();
|
|
223
228
|
// Fetch plan + usage in parallel
|
|
@@ -233,6 +238,7 @@ async function main() {
|
|
|
233
238
|
? chalk.hex('#fcd34d').bold('Plus')
|
|
234
239
|
: chalk.hex('#4b5563')('Free');
|
|
235
240
|
console.log(DIM(' ' + '─'.repeat(45)));
|
|
241
|
+
console.log(colors.muted(' Dravix ') + chalk.hex('#6366f1').bold('Code') + DIM(' v' + VERSION));
|
|
236
242
|
console.log(colors.muted(' User ') + W(name ?? 'Unknown') + DIM(' · ') + colors.muted(email ?? ''));
|
|
237
243
|
console.log(colors.muted(' Plan ') + planBadge);
|
|
238
244
|
if (usage) {
|