mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 09:03:02 +00:00
feat: tests
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
export * from './logger.js'
|
||||
export * from './common.js'
|
||||
export * from './smtp.js'
|
||||
export * from './transformation.js'
|
||||
export * from './transport.js'
|
||||
export * from './logger.js';
|
||||
export * from './common.js';
|
||||
export * from './smtp.js';
|
||||
export * from './transformation.js';
|
||||
export * from './transport.js';
|
||||
|
||||
export * from './transformations/add-log-level.js'
|
||||
export * from './transformations/colorize.js'
|
||||
export * from './transformations/timestamp.js'
|
||||
export * from './transformations/add-log-level.js';
|
||||
export * from './transformations/colorize.js';
|
||||
export * from './transformations/timestamp.js';
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import chalk from 'chalk';
|
||||
// eslint-disable-next-line unicorn/import-style
|
||||
import type {ChalkInstance} from 'chalk';
|
||||
import {LogLevel} from '../logger.js';
|
||||
import {Transformation} from '../transformation.js';
|
||||
|
||||
@@ -31,7 +33,8 @@ export class Colorize implements Transformation {
|
||||
* @param logLevelToColor Map from log level to color transformation to apply
|
||||
*/
|
||||
constructor(
|
||||
private readonly logLevelToColor: {[k in LogLevel]: chalk.Chalk} = {
|
||||
// not entirely sure why we can't just use the functions directly here
|
||||
private readonly logLevelToColor: {[k in LogLevel]: ChalkInstance} = {
|
||||
ERROR: chalk.bold.red,
|
||||
INFO: chalk.cyan,
|
||||
LOG: chalk.white,
|
||||
|
||||
Reference in New Issue
Block a user