@taj-special/dravix-code 1.4.2 → 1.4.3
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 -16
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -261,6 +261,17 @@ async function main() {
|
|
|
261
261
|
const planBadge = plan === 'Plus'
|
|
262
262
|
? colors.accent.bold('Plus')
|
|
263
263
|
: colors.muted('Free');
|
|
264
|
+
// ── First-time project check ──────────────────────────────
|
|
265
|
+
const pHash = projectHash(cwd);
|
|
266
|
+
const visited = getVisitedProjects();
|
|
267
|
+
if (!visited.includes(pHash)) {
|
|
268
|
+
const open = await showFirstTimeDialog(path.basename(cwd));
|
|
269
|
+
if (!open) {
|
|
270
|
+
console.log(chalk.hex('#6b7280')('\n Exited.\n'));
|
|
271
|
+
process.exit(0);
|
|
272
|
+
}
|
|
273
|
+
markProjectVisited(pHash);
|
|
274
|
+
}
|
|
264
275
|
const rows = process.stdout.rows ?? 24;
|
|
265
276
|
const cols = process.stdout.columns ?? 80;
|
|
266
277
|
// FULL-SCREEN: clear everything, set scroll region to entire terminal
|
|
@@ -297,22 +308,6 @@ async function main() {
|
|
|
297
308
|
process.on('exit', cleanup);
|
|
298
309
|
process.on('SIGINT', () => { cleanup(); process.exit(0); });
|
|
299
310
|
process.on('SIGTERM', () => { cleanup(); process.exit(0); });
|
|
300
|
-
// ── First-time project check ──────────────────────────────
|
|
301
|
-
const pHash = projectHash(cwd);
|
|
302
|
-
const visited = getVisitedProjects();
|
|
303
|
-
if (!visited.includes(pHash)) {
|
|
304
|
-
process.stdin.setRawMode(false);
|
|
305
|
-
process.stdin.pause();
|
|
306
|
-
const open = await showFirstTimeDialog(path.basename(cwd));
|
|
307
|
-
if (!open) {
|
|
308
|
-
console.log(chalk.hex('#6b7280')('\n Exited.\n'));
|
|
309
|
-
process.exit(0);
|
|
310
|
-
}
|
|
311
|
-
markProjectVisited(pHash);
|
|
312
|
-
// Restore terminal for upcoming banner + REPL
|
|
313
|
-
process.stdin.setRawMode(true);
|
|
314
|
-
process.stdin.resume();
|
|
315
|
-
}
|
|
316
311
|
await startRepl(cwd);
|
|
317
312
|
}
|
|
318
313
|
main().catch((err) => {
|