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

fix: line breaks

Bruno Rocha (Aug 14, 2023, 6:41 PM -0300) 55e2f5da d26f70c1

+23 -28
+23 -28
packages/prompts/src/index.ts
··· 750 750 )}`, 751 751 color.gray(S_BAR + ' '.repeat(len) + S_BAR), 752 752 lines 753 - .map((line) => line + ' '.repeat(Math.max(len + 2 - strLength(line), 0)) + color.gray(S_BAR)) 753 + .map( 754 + (line) => 755 + line + 756 + ' '.repeat(Math.max(len + (unicode ? 2 : 1) - strLength(line), 0)) + 757 + color.gray(S_BAR) 758 + ) 754 759 .join('\n'), 755 760 color.gray(S_BAR + ' '.repeat(len) + S_BAR), 756 761 color.gray(S_CONNECT_LEFT + S_BAR_H.repeat(len) + S_CORNER_BOTTOM_RIGHT), ··· 772 777 process.stdout.write( 773 778 formatTextWithMaxWidth(title, { 774 779 initialSymbol: color.gray(S_BAR_START), 775 - }) 780 + }) + '\n' 776 781 ); 777 782 }; 778 783 ··· 797 802 process.stdout.write( 798 803 formatTextWithMaxWidth(message, { 799 804 initialSymbol: symbol, 800 - }) 805 + }) + '\n' 801 806 ); 802 807 }, 803 808 info: (message: string) => { 804 - process.stdout.write( 805 - formatTextWithMaxWidth(message, { 806 - initialSymbol: color.blue(S_INFO), 807 - }) 808 - ); 809 + log.message(message, { 810 + symbol: color.blue(S_INFO), 811 + }); 809 812 }, 810 813 success: (message: string) => { 811 - process.stdout.write( 812 - formatTextWithMaxWidth(message, { 813 - initialSymbol: color.green(S_SUCCESS), 814 - }) 815 - ); 814 + log.message(message, { 815 + symbol: color.green(S_SUCCESS), 816 + }); 816 817 }, 817 818 step: (message: string) => { 818 - process.stdout.write( 819 - formatTextWithMaxWidth(message, { 820 - initialSymbol: color.green(S_STEP_SUBMIT), 821 - }) 822 - ); 819 + log.message(message, { 820 + symbol: color.green(S_STEP_SUBMIT), 821 + }); 823 822 }, 824 823 warn: (message: string) => { 825 - process.stdout.write( 826 - formatTextWithMaxWidth(message, { 827 - initialSymbol: color.yellow(S_WARN), 828 - }) 829 - ); 824 + log.message(message, { 825 + symbol: color.yellow(S_WARN), 826 + }); 830 827 }, 831 828 /** alias for `log.warn()`. */ 832 829 warning: (message: string) => { 833 830 log.warn(message); 834 831 }, 835 832 error: (message: string) => { 836 - process.stdout.write( 837 - formatTextWithMaxWidth(message, { 838 - initialSymbol: color.red(S_ERROR), 839 - }) 840 - ); 833 + log.message(message, { 834 + symbol: color.red(S_ERROR), 835 + }); 841 836 }, 842 837 }; 843 838