mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-22 08:38:08 +02:00
feat(cli): add Slack community CTA on errors, crashes, setup, and help (#277)
* feat(cli): show Slack CTA on help and unexpected errors * feat(cli): show Slack CTA after crashes * feat(setup): show Slack community note after setup * chore: refresh Python lockfile versions
This commit is contained in:
parent
6b2f7c3365
commit
66517fc320
14 changed files with 350 additions and 29 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import type { Writable } from 'node:stream';
|
||||
import {
|
||||
autocomplete,
|
||||
autocompleteMultiselect,
|
||||
|
|
@ -13,6 +12,7 @@ import {
|
|||
text,
|
||||
} from '@clack/prompts';
|
||||
import type { KtxCliIo } from './cli-runtime.js';
|
||||
import { isWritableTtyOutput } from './io/tty.js';
|
||||
import { withMenuOptionsSpacing, withTextInputNavigation } from './prompt-navigation.js';
|
||||
import { revealPassword } from './reveal-password-prompt.js';
|
||||
import { withSetupInterruptConfirmation } from './setup-interrupt.js';
|
||||
|
|
@ -211,14 +211,6 @@ export interface KtxSetupUiAdapter {
|
|||
note(message: string, title: string, io: KtxCliIo, options?: KtxSetupNoteOptions): void;
|
||||
}
|
||||
|
||||
function isWritableTtyOutput(output: KtxCliIo['stdout']): output is KtxCliIo['stdout'] & Writable {
|
||||
return (
|
||||
output.isTTY === true &&
|
||||
typeof (output as { on?: unknown }).on === 'function' &&
|
||||
typeof (output as { columns?: unknown }).columns !== 'undefined'
|
||||
);
|
||||
}
|
||||
|
||||
export function createKtxSetupUiAdapter(): KtxSetupUiAdapter {
|
||||
return {
|
||||
intro(title, io) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue