1010import Debug from 'debug'
1111import { END_TAG } from './constants'
1212
13- const debug = Debug ( `cypress:stderr-filtering:LineDecoder:${ process . pid } ` )
13+ const debugVerbose = Debug ( `cypress-verbose :stderr-filtering:LineDecoder:${ process . pid } ` )
1414
1515export class LineDecoder {
1616 private buffer : string = ''
@@ -23,7 +23,7 @@ export class LineDecoder {
2323 * @param chunk The string chunk to add to the buffer
2424 */
2525 public write ( chunk : string ) {
26- debug ( 'writing chunk to line decoder' , { chunk } )
26+ debugVerbose ( 'writing chunk to line decoder' , { chunk } )
2727 this . buffer += chunk
2828 }
2929
@@ -37,16 +37,16 @@ export class LineDecoder {
3737 * @yields Complete lines with newline characters preserved
3838 */
3939 * [ Symbol . iterator ] ( ) : Generator < string > {
40- debug ( 'iterating over lines in line decoder' )
40+ debugVerbose ( 'iterating over lines in line decoder' )
4141
4242 let nextLine : string | undefined = undefined
4343
4444 do {
4545 nextLine = this . nextLine ( )
4646
4747 if ( nextLine ) {
48- debug ( 'yielding line:' , nextLine )
49- debug ( 'buffer size:' , this . buffer . length )
48+ debugVerbose ( 'yielding line:' , nextLine )
49+ debugVerbose ( 'buffer size:' , this . buffer . length )
5050 yield nextLine
5151 }
5252 } while ( nextLine )
@@ -79,7 +79,7 @@ export class LineDecoder {
7979 const endsWithOverrideToken = newlineIndex < 0 ? this . buffer . endsWith ( this . overrideToken ) : false
8080
8181 if ( endsWithOverrideToken ) {
82- debug ( 'ends with override token' )
82+ debugVerbose ( 'ends with override token' )
8383 const line = this . buffer
8484
8585 this . buffer = ''
@@ -88,7 +88,7 @@ export class LineDecoder {
8888 }
8989
9090 if ( newlineIndex >= 0 ) {
91- debug ( 'contains a newline' )
91+ debugVerbose ( 'contains a newline' )
9292 const line = this . buffer . slice ( 0 , newlineIndex + length )
9393
9494 this . buffer = this . buffer . slice ( newlineIndex + length )
0 commit comments