ispbills-icli 8.5.0 → 8.5.2
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/icli.js +10 -15
- package/package.json +1 -1
package/bin/icli.js
CHANGED
|
@@ -311,22 +311,17 @@ async function main() {
|
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
//
|
|
315
|
-
//
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
selfUpdate();
|
|
325
|
-
}
|
|
326
|
-
return;
|
|
314
|
+
// Always use the Ink TUI — Ink handles non-TTY environments gracefully.
|
|
315
|
+
// The old readline REPL fallback is kept only for explicit pipe/script usage.
|
|
316
|
+
const { runTui } = await import('../src/tui/run.js');
|
|
317
|
+
const action = await runTui(cfg, { display });
|
|
318
|
+
if (action === 'logout') {
|
|
319
|
+
const cleared = clearConfig();
|
|
320
|
+
console.log(`\n ${cleared ? GREEN + glyphs.check + RESET + ' Logged out — credentials cleared.' : YELLOW + 'Already logged out.' + RESET}`);
|
|
321
|
+
console.log(` ${DIM}Run ${RESET}${ACCENT}icli login${RESET}${DIM} to sign in again.${RESET}\n`);
|
|
322
|
+
} else if (action === 'update') {
|
|
323
|
+
selfUpdate();
|
|
327
324
|
}
|
|
328
|
-
|
|
329
|
-
await interactiveRepl(cfg);
|
|
330
325
|
}
|
|
331
326
|
|
|
332
327
|
main().catch((e) => {
|