@@ -137,7 +137,7 @@ export class Commander {
137137 let prefix = "" ;
138138 if ( argv . childPipelineDepth > 0 ) prefix = `[${ argv . variable . GCL_TRIGGERER } ] -> ` ;
139139
140- const namePad = name . padEnd ( jobNamePad ) ;
140+ const namePad = Utils . padEndVisual ( name , jobNamePad ) ;
141141 writeStreams . stdout ( chalk `{black.bgGreenBright PASS }${ renderDuration ( prettyDuration ) } {blueBright ${ prefix } ${ namePad } }` ) ;
142142 if ( coveragePercent ) {
143143 writeStreams . stdout ( chalk ` ${ coveragePercent } % {grey coverage}` ) ;
@@ -149,7 +149,7 @@ export class Commander {
149149 if ( preScripts . warned . length !== 0 ) {
150150 preScripts . warned . sort ( ( a , b ) => stages . indexOf ( a . stage ) - stages . indexOf ( b . stage ) ) ;
151151 for ( const { name, prettyDuration} of preScripts . warned ) {
152- const namePad = name . padEnd ( jobNamePad ) ;
152+ const namePad = Utils . padEndVisual ( name , jobNamePad ) ;
153153 const safeName = Utils . safeDockerString ( name ) ;
154154 writeStreams . stdout ( chalk `{black.bgYellowBright WARN }${ renderDuration ( prettyDuration ) } {blueBright ${ namePad } } pre_script\n` ) ;
155155 const outputLog = await fs . readFile ( `${ cwd } /${ stateDir } /output/${ safeName } .log` , "utf8" ) ;
@@ -163,15 +163,15 @@ export class Commander {
163163 if ( afterScripts . warned . length !== 0 ) {
164164 afterScripts . warned . sort ( ( a , b ) => stages . indexOf ( a . stage ) - stages . indexOf ( b . stage ) ) ;
165165 afterScripts . warned . forEach ( ( { name, prettyDuration} ) => {
166- const namePad = name . padEnd ( jobNamePad ) ;
166+ const namePad = Utils . padEndVisual ( name , jobNamePad ) ;
167167 writeStreams . stdout ( chalk `{black.bgYellowBright WARN }${ renderDuration ( prettyDuration ) } {blueBright ${ namePad } } after_script\n` ) ;
168168 } ) ;
169169 }
170170
171171 if ( preScripts . failed . length !== 0 ) {
172172 preScripts . failed . sort ( ( a , b ) => stages . indexOf ( a . stage ) - stages . indexOf ( b . stage ) ) ;
173173 for ( const { name, prettyDuration} of preScripts . failed ) {
174- const namePad = name . padEnd ( jobNamePad ) ;
174+ const namePad = Utils . padEndVisual ( name , jobNamePad ) ;
175175 const safeName = Utils . safeDockerString ( name ) ;
176176 writeStreams . stdout ( chalk `{black.bgRed FAIL }${ renderDuration ( prettyDuration ) } {blueBright ${ namePad } }\n` ) ;
177177 const outputLog = await fs . readFile ( `${ cwd } /${ stateDir } /output/${ safeName } .log` , "utf8" ) ;
@@ -214,7 +214,7 @@ export class Commander {
214214
215215 let descriptionPadEnd = 11 ;
216216 if ( hasDescriptions ) {
217- jobs . forEach ( j => descriptionPadEnd = Math . max ( j . description . length , descriptionPadEnd ) ) ;
217+ jobs . forEach ( j => descriptionPadEnd = Math . max ( Utils . visualWidth ( j . description ) , descriptionPadEnd ) ) ;
218218 }
219219
220220 const jobNamePad = parser . jobNamePad ;
@@ -224,19 +224,19 @@ export class Commander {
224224 }
225225
226226 if ( hasDescriptions ) {
227- writeStreams . stdout ( chalk `{grey ${ "name" . padEnd ( jobNamePad ) } ${ "description" . padEnd ( descriptionPadEnd ) } } ` ) ;
227+ writeStreams . stdout ( chalk `{grey ${ Utils . padEndVisual ( "name" , jobNamePad ) } ${ Utils . padEndVisual ( "description" , descriptionPadEnd ) } } ` ) ;
228228 } else {
229- writeStreams . stdout ( chalk `{grey ${ "name" . padEnd ( jobNamePad ) } } ` ) ;
229+ writeStreams . stdout ( chalk `{grey ${ Utils . padEndVisual ( "name" , jobNamePad ) } } ` ) ;
230230 }
231231 writeStreams . stdout ( chalk `{grey ${ "stage" . padEnd ( stagePadEnd ) } ${ "when" . padEnd ( whenPadEnd ) } } ` ) ;
232232 writeStreams . stdout ( chalk `{grey allow_failure needs}\n` ) ;
233233
234234 const renderLine = ( job : Job ) => {
235235 const needs = job . needs ?. filter ( n => ! n . project && ! n . pipeline ) . map ( n => n . job ) ;
236236 const allowFailure = job . allowFailure ? "true " : "false " ;
237- let jobLine = chalk `{blueBright ${ job . name . padEnd ( jobNamePad ) } } ` ;
237+ let jobLine = chalk `{blueBright ${ Utils . padEndVisual ( job . name , jobNamePad ) } } ` ;
238238 if ( hasDescriptions ) {
239- jobLine += `${ job . description . padEnd ( descriptionPadEnd ) } ` ;
239+ jobLine += `${ Utils . padEndVisual ( job . description , descriptionPadEnd ) } ` ;
240240 }
241241 jobLine += chalk `{yellow ${ job . stage . padEnd ( stagePadEnd ) } } ${ job . when . padEnd ( whenPadEnd ) } ${ allowFailure . padEnd ( 11 ) } ` ;
242242 if ( needs ) {
0 commit comments