feat(monorepo): migrate to typescript monorepo
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "@basango/logger",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"scripts": {
|
||||
"clean": "rm -rf .turbo node_modules",
|
||||
"format": "biome format --write .",
|
||||
"lint": "biome check .",
|
||||
"lint:fix": "biome check --write .",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
"dependencies": {
|
||||
"pino": "^10.1.0",
|
||||
"pino-pretty": "^13.1.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import pino from "pino";
|
||||
|
||||
export const logger = pino({
|
||||
level: process.env.LOG_LEVEL || "debug",
|
||||
// Use pretty printing in development, structured JSON in production
|
||||
...(process.env.NODE_ENV !== "production" && {
|
||||
transport: {
|
||||
target: "pino-pretty",
|
||||
options: {
|
||||
colorize: true,
|
||||
translateTime: "HH:MM:ss",
|
||||
ignore: "pid,hostname",
|
||||
messageFormat: true,
|
||||
hideObject: false,
|
||||
},
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
export default logger;
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": "@basango/typescript-config/base.json",
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user