[READ-ONLY] Mirror of https://github.com/bombshell-dev/clack. Effortlessly build beautiful command-line apps bomb.sh/docs/clack/basics/getting-started/
cli command-line command-line-app node prompt prompts
5

Configure Feed

Select the types of activity you want to include in your feed.

update default password mask

Nate Moore (Feb 22, 2023, 6:13 AM -0600) cc11917a 6609d011

+7 -2
+5
.changeset/mean-pots-check.md
··· 1 + --- 2 + '@clack/prompts': patch 3 + --- 4 + 5 + Update default `password` mask
-1
examples/basic/index.ts
··· 23 23 password: () => 24 24 p.password({ 25 25 message: 'Provide a password', 26 - mask: '🧹', 27 26 validate: (value) => { 28 27 if (!value) return 'Please enter a password.'; 29 28 if (value.length < 5) return 'Password should have at least 5 characters.';
+2 -1
packages/prompts/src/index.ts
··· 31 31 const S_CHECKBOX_ACTIVE = s('◻', '[•]'); 32 32 const S_CHECKBOX_SELECTED = s('◼', '[+]'); 33 33 const S_CHECKBOX_INACTIVE = s('◻', '[ ]'); 34 + const S_PASSWORD_MASK = s('▪', '•'); 34 35 35 36 const S_BAR_H = s('─', '-'); 36 37 const S_CORNER_TOP_RIGHT = s('╮', '+'); ··· 97 98 export const password = (opts: PasswordOptions) => { 98 99 return new PasswordPrompt({ 99 100 validate: opts.validate, 100 - mask: opts.mask, 101 + mask: opts.mask ?? S_PASSWORD_MASK, 101 102 render() { 102 103 const title = `${color.gray(S_BAR)}\n${symbol(this.state)} ${opts.message}\n`; 103 104 const value = this.valueWithCursor;