fix(cli): clean up connection commands (#62)

* fix(cli): clean up connection commands

* test(cli): update connection smoke coverage

* Fix setup output formatting

* fix notion setup picker exit
This commit is contained in:
Andrey Avtomonov 2026-05-13 15:04:50 +02:00 committed by GitHub
parent 4973ca562f
commit e1e9c4af91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 1096 additions and 5342 deletions

View file

@ -23,6 +23,10 @@ interface SetupInterruptOptions {
const NON_INTERACTIVE_SETUP_MESSAGE =
'Interactive setup requires a terminal. Re-run this command in a TTY, or pass --no-input with the required options.';
function refSetupInput(input: NodeJS.ReadStream = stdin): void {
input.ref?.();
}
function createSetupInterruptTracker(input: NodeJS.ReadStream = stdin): SetupInterruptTracker {
let ctrlCPressed = false;
const onKeypress = (char: string | undefined, key: Key) => {
@ -73,6 +77,9 @@ export async function withSetupInterruptConfirmation<T>(
const confirmExit = options.confirmExit ?? defaultConfirmExit;
while (true) {
if (!options.tracker) {
refSetupInput();
}
const value = await tracker.track(prompt);
if (!isCancel(value)) {
return value;