Skip to content

Commit aa99c45

Browse files
committed
Thanks carter, fixed build.
Co-authored-by: Carter <carterondisco@gmail.com>
1 parent df64b97 commit aa99c45

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/base/types/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type ChalkColors = "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "blackBright" | "gray" | "grey" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright"

src/libs/logger.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import chalk from "chalk";
2+
import { ChalkColors } from "../base/types/types.js";
23

34
const timestamp = () => chalk.dim(`${new Date().toISOString()}`);
45

@@ -36,5 +37,8 @@ export const logger = {
3637
},
3738
success: (message: string, ...args: any[]) => {
3839
console.log(`${timestamp()} ${chalk.green("✓")} ${message}`, ...args);
39-
}
40+
} ,
41+
custom: (message: string, title: string, color: ChalkColors = "green", ...args: any[]) => {
42+
console.log(`${timestamp()} ${chalk[color](title.toUpperCase())} ${message}`, ...args)
43+
}
4044
};

0 commit comments

Comments
 (0)