-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP - non-fancy log output * Split UI from HTTP * Move more UI things out of /http * Lint fixes * trim unused UI code * lint * Only switch to alternate buffer for fancy ui * Rerender terminal UI when SSR completes * Make progress work * Initialise UI earlier * Fix lint and extract fatal error formatter helper
- Loading branch information
1 parent
5134829
commit cae451d
Showing
8 changed files
with
267 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
var ansi = require('ansi-escape-sequences') | ||
var dedent = require('dedent') | ||
|
||
function clr (text, color) { | ||
return process.stdout.isTTY ? ansi.format(text, color) : text | ||
} | ||
|
||
module.exports = function fatalError (err) { | ||
return dedent` | ||
A critical error occured, forcing Bankai to abort: | ||
${clr(err.stack, 'red')} | ||
If you think this might be a bug in Bankai, please consider helping | ||
improve Bankai's stability by submitting an error to: | ||
${clr('https://github.com/choojs/bankai/issues/new', 'underline')} | ||
Please include the steps to reproduce this error, the stack trace | ||
printed above, your version of Node, and your version of npm. Thanks! | ||
${clr('— Team Choo', 'italic')} | ||
` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.