-
-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: replace colors with chalk (#2666)
* chore(deps): upgrade electron-rebuild to ^3.2.6
- Loading branch information
Showing
32 changed files
with
303 additions
and
192 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
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 |
---|---|---|
@@ -1,21 +1,25 @@ | ||
import colors from 'colors'; | ||
import chalk from 'chalk'; | ||
|
||
function redConsoleError(msg: string) { | ||
console.error(chalk.red(msg)); | ||
} | ||
|
||
process.on('unhandledRejection', (reason: string, promise: Promise<unknown>) => { | ||
console.error('\nAn unhandled rejection has occurred inside Forge:'.red); | ||
console.error(colors.red(reason.toString())); | ||
console.error('\nElectron Forge was terminated. Location:'.red); | ||
console.error(colors.red(JSON.stringify(promise))); | ||
redConsoleError('\nAn unhandled rejection has occurred inside Forge:'); | ||
redConsoleError(reason.toString()); | ||
redConsoleError('\nElectron Forge was terminated. Location:'); | ||
redConsoleError(JSON.stringify(promise)); | ||
process.exit(1); | ||
}); | ||
|
||
process.on('uncaughtException', (err) => { | ||
if (err && err.message && err.stack) { | ||
console.error('\nAn unhandled exception has occurred inside Forge:'.red); | ||
console.error(colors.red(err.message)); | ||
console.error(colors.red(err.stack)); | ||
redConsoleError('\nAn unhandled exception has occurred inside Forge:'); | ||
redConsoleError(err.message); | ||
redConsoleError(err.stack); | ||
} else { | ||
console.error('\nElectron Forge was terminated:'.red); | ||
console.error(colors.red(typeof err === 'string' ? err : JSON.stringify(err))); | ||
redConsoleError('\nElectron Forge was terminated:'); | ||
redConsoleError(typeof err === 'string' ? err : JSON.stringify(err)); | ||
} | ||
process.exit(1); | ||
}); |
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
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
Oops, something went wrong.