[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.

feat: log multiline support

Bruno Rocha (Aug 13, 2023, 11:27 AM -0300) c76c7ef9 d67c682d

+30 -5
+30 -5
packages/prompts/src/index.ts
··· 779 779 ); 780 780 }, 781 781 info: (message: string) => { 782 - log.message(message, { symbol: color.blue(S_INFO) }); 782 + process.stdout.write( 783 + formatTextWithMaxWidth(message, { 784 + initialSymbol: color.blue(S_INFO), 785 + defaultSymbol: color.blue(S_BAR), 786 + }) 787 + ); 783 788 }, 784 789 success: (message: string) => { 785 - log.message(message, { symbol: color.green(S_SUCCESS) }); 790 + process.stdout.write( 791 + formatTextWithMaxWidth(message, { 792 + initialSymbol: color.green(S_SUCCESS), 793 + defaultSymbol: color.green(S_BAR), 794 + }) 795 + ); 786 796 }, 787 797 step: (message: string) => { 788 - log.message(message, { symbol: color.green(S_STEP_SUBMIT) }); 798 + process.stdout.write( 799 + formatTextWithMaxWidth(message, { 800 + initialSymbol: color.green(S_STEP_SUBMIT), 801 + defaultSymbol: color.green(S_BAR), 802 + }) 803 + ); 789 804 }, 790 805 warn: (message: string) => { 791 - log.message(message, { symbol: color.yellow(S_WARN) }); 806 + process.stdout.write( 807 + formatTextWithMaxWidth(message, { 808 + initialSymbol: color.yellow(S_WARN), 809 + defaultSymbol: color.yellow(S_BAR), 810 + }) 811 + ); 792 812 }, 793 813 /** alias for `log.warn()`. */ 794 814 warning: (message: string) => { 795 815 log.warn(message); 796 816 }, 797 817 error: (message: string) => { 798 - log.message(message, { symbol: color.red(S_ERROR) }); 818 + process.stdout.write( 819 + formatTextWithMaxWidth(message, { 820 + initialSymbol: color.red(S_ERROR), 821 + defaultSymbol: color.red(S_BAR), 822 + }) 823 + ); 799 824 }, 800 825 }; 801 826