Skip to content

Commit

Permalink
Add link to log msg
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerAldrich committed May 15, 2023
1 parent e8eb72d commit 7e35b6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/common/docker-compose/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type GenerateOptions = {
type ServiceValue = {
name: string;
display_name: string;
}
};

export type ServiceKey = {
name: string;
Expand Down
7 changes: 4 additions & 3 deletions src/common/overlay/overlay-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class OverlayServer {

server.on('error', err => console.log(err));

console.log(`Starting overlay server on port: ${port}`);
console.log(`Starting overlay server: http://localhost:${port}`);
server.listen(port);
}

Expand Down Expand Up @@ -130,12 +130,13 @@ export class OverlayServer {

/**
* Remove ansi characters from a string.
* Pulled from https://github.com/chalk/strip-ansi
* Pulled from https://github.com/chalk/strip-ansi - TODO replace with actual dependency
* if we're going to hijack logs the way we currently are.
*/
function stripAnsi(string: string) {
const pattern = [
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))'
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))',
].join('|');
return string.replace(new RegExp(pattern, 'g'), '');
}

0 comments on commit 7e35b6f

Please sign in to comment.