@nestjs/common
Advanced tools
Comparing version 9.3.11 to 9.3.12
{ | ||
"name": "@nestjs/common", | ||
"version": "9.3.11", | ||
"version": "9.3.12", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@common)", | ||
@@ -5,0 +5,0 @@ "author": "Kamil Mysliwiec", |
@@ -70,3 +70,3 @@ import { LoggerService, LogLevel } from './logger.service'; | ||
protected formatMessage(logLevel: LogLevel, message: unknown, pidMessage: string, formattedLogLevel: string, contextMessage: string, timestampDiff: string): string; | ||
protected stringifyMessage(message: unknown, logLevel: LogLevel): string; | ||
protected stringifyMessage(message: unknown, logLevel: LogLevel): any; | ||
protected colorize(message: string, logLevel: LogLevel): string; | ||
@@ -73,0 +73,0 @@ protected printStackTrace(stack: string): void; |
@@ -138,5 +138,8 @@ "use strict"; | ||
stringifyMessage(message, logLevel) { | ||
return (0, shared_utils_1.isPlainObject)(message) || Array.isArray(message) | ||
? `${this.colorize('Object:', logLevel)}\n${JSON.stringify(message, (key, value) => typeof value === 'bigint' ? value.toString() : value, 2)}\n` | ||
: this.colorize(message, logLevel); | ||
// If the message is a function, call it and re-resolve its value. | ||
return (0, shared_utils_1.isFunction)(message) | ||
? this.stringifyMessage(message(), logLevel) | ||
: (0, shared_utils_1.isPlainObject)(message) || Array.isArray(message) | ||
? `${this.colorize('Object:', logLevel)}\n${JSON.stringify(message, (key, value) => typeof value === 'bigint' ? value.toString() : value, 2)}\n` | ||
: this.colorize(message, logLevel); | ||
} | ||
@@ -143,0 +146,0 @@ colorize(message, logLevel) { |
@@ -7,3 +7,3 @@ export declare const isUndefined: (obj: any) => obj is undefined; | ||
export declare const stripEndSlash: (path: string) => string; | ||
export declare const isFunction: (val: any) => boolean; | ||
export declare const isFunction: (val: any) => val is Function; | ||
export declare const isString: (val: any) => val is string; | ||
@@ -10,0 +10,0 @@ export declare const isNumber: (val: any) => val is number; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
423568
9690