removed bold sql error output, reverted changed in gulpfile

This commit is contained in:
Daniel Lang 2017-09-08 09:15:15 +02:00
parent ce4674c795
commit 8fe6a72a27
4 changed files with 5 additions and 11 deletions

View File

@ -258,7 +258,7 @@ export class Gulpfile {
package() {
return [
"clean",
["browserCopySources", "browserCopyPlatformTools", "browserCopyMainBrowserFile"],
["browserCopySources", "browserCopyMainBrowserFile", "browserCopyPlatformTools"],
["packageCompile", "browserCompile", "browserCompileSystemJS"],
["packageMoveCompiledFiles", "browserUglify"],
[

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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" });
}
/**