mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
removed bold sql error output, reverted changed in gulpfile
This commit is contained in:
parent
ce4674c795
commit
8fe6a72a27
@ -258,7 +258,7 @@ export class Gulpfile {
|
||||
package() {
|
||||
return [
|
||||
"clean",
|
||||
["browserCopySources", "browserCopyPlatformTools", "browserCopyMainBrowserFile"],
|
||||
["browserCopySources", "browserCopyMainBrowserFile", "browserCopyPlatformTools"],
|
||||
["packageCompile", "browserCompile", "browserCompileSystemJS"],
|
||||
["packageMoveCompiledFiles", "browserUglify"],
|
||||
[
|
||||
|
||||
@ -46,7 +46,7 @@ export class AdvancedConsoleLogger implements Logger {
|
||||
*/
|
||||
logQuerySlow(time: number, query: string, parameters?: any[], queryRunner?: QueryRunner) {
|
||||
const sql = query + (parameters && parameters.length ? " -- PARAMETERS: " + this.stringifyParams(parameters) : "");
|
||||
PlatformTools.logWarn(`query is slow:`, PlatformTools.highlightSql(sql, true));
|
||||
PlatformTools.logWarn(`query is slow:`, PlatformTools.highlightSql(sql));
|
||||
PlatformTools.logWarn(`execution time:`, time);
|
||||
}
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ export class PlatformTools {
|
||||
/**
|
||||
* Highlights sql string to be print in the console.
|
||||
*/
|
||||
static highlightSql(sql: string, bold: boolean = false) {
|
||||
static highlightSql(sql: string) {
|
||||
return sql;
|
||||
}
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ export class PlatformTools {
|
||||
/**
|
||||
* Highlights sql string to be print in the console.
|
||||
*/
|
||||
static highlightSql(sql: string, bold: boolean = false) {
|
||||
static highlightSql(sql: string) {
|
||||
const theme: Theme = {
|
||||
"keyword": chalk.blueBright,
|
||||
"literal": chalk.blueBright,
|
||||
@ -101,13 +101,7 @@ export class PlatformTools {
|
||||
"built_in": chalk.magentaBright,
|
||||
"comment": chalk.gray,
|
||||
};
|
||||
let highlighted = highlight(sql, { theme: theme, language: "sql" });
|
||||
|
||||
if (bold) {
|
||||
return chalk.bold(highlighted);
|
||||
}
|
||||
|
||||
return highlighted;
|
||||
return highlight(sql, { theme: theme, language: "sql" });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user