import * as path from 'path' ; export function fixPaths ( workspacePath , packagePath , logLine ) { return logLine . replace ( /([\u001b][^m]*m|[^-/_@0-9a-zA-Z])(([-_0-9a-zA-Z.]([^\s/'"*:]*[/]){1,})([^/'"*]+)\.[0-9a-zA-Z]{1,6})/ , ( _m , before , file ) => { return before + path . relative ( workspacePath , path . resolve ( packagePath , file ) ) ; } ) ; }