@@ -677,7 +677,10 @@ export const log = {
677677
678678const prefix = `${ color . gray ( S_BAR ) } ` ;
679679export const stream = {
680- message : async ( iterable : Iterable < string > | AsyncIterable < string > , { symbol = color . gray ( S_BAR ) } : LogMessageOptions = { } ) => {
680+ message : async (
681+ iterable : Iterable < string > | AsyncIterable < string > ,
682+ { symbol = color . gray ( S_BAR ) } : LogMessageOptions = { }
683+ ) => {
681684 process . stdout . write ( `${ color . gray ( S_BAR ) } \n${ symbol } ` ) ;
682685 let lineWidth = 3 ;
683686 for await ( let chunk of iterable ) {
@@ -686,7 +689,7 @@ export const stream = {
686689 lineWidth = 3 + strip ( chunk . slice ( chunk . lastIndexOf ( '\n' ) ) ) . length ;
687690 }
688691 const chunkLen = strip ( chunk ) . length ;
689- if ( ( lineWidth + chunkLen ) < process . stdout . columns ) {
692+ if ( lineWidth + chunkLen < process . stdout . columns ) {
690693 lineWidth += chunkLen ;
691694 process . stdout . write ( chunk ) ;
692695 } else {
@@ -696,26 +699,26 @@ export const stream = {
696699 }
697700 process . stdout . write ( '\n' ) ;
698701 } ,
699- info : ( iterable : Iterable < string > | AsyncIterable < string > ) => {
702+ info : ( iterable : Iterable < string > | AsyncIterable < string > ) => {
700703 return stream . message ( iterable , { symbol : color . blue ( S_INFO ) } ) ;
701704 } ,
702- success : ( iterable : Iterable < string > | AsyncIterable < string > ) => {
705+ success : ( iterable : Iterable < string > | AsyncIterable < string > ) => {
703706 return stream . message ( iterable , { symbol : color . green ( S_SUCCESS ) } ) ;
704707 } ,
705- step : ( iterable : Iterable < string > | AsyncIterable < string > ) => {
708+ step : ( iterable : Iterable < string > | AsyncIterable < string > ) => {
706709 return stream . message ( iterable , { symbol : color . green ( S_STEP_SUBMIT ) } ) ;
707710 } ,
708- warn : ( iterable : Iterable < string > | AsyncIterable < string > ) => {
711+ warn : ( iterable : Iterable < string > | AsyncIterable < string > ) => {
709712 return stream . message ( iterable , { symbol : color . yellow ( S_WARN ) } ) ;
710713 } ,
711714 /** alias for `log.warn()`. */
712- warning : ( iterable : Iterable < string > | AsyncIterable < string > ) => {
715+ warning : ( iterable : Iterable < string > | AsyncIterable < string > ) => {
713716 return stream . warn ( iterable ) ;
714717 } ,
715- error : ( iterable : Iterable < string > | AsyncIterable < string > ) => {
718+ error : ( iterable : Iterable < string > | AsyncIterable < string > ) => {
716719 return stream . message ( iterable , { symbol : color . red ( S_ERROR ) } ) ;
717720 } ,
718- }
721+ } ;
719722
720723export const spinner = ( ) => {
721724 const frames = unicode ? [ '◒' , '◐' , '◓' , '◑' ] : [ '•' , 'o' , 'O' , '0' ] ;
0 commit comments