chore: pr feedbacks
This commit is contained in:
parent
e5a04932bb
commit
525dcd8d9f
2 changed files with 12 additions and 10 deletions
|
|
@ -1,14 +1,15 @@
|
||||||
import { createHonoServer } from "react-router-hono-server/bun";
|
import { createHonoServer } from "react-router-hono-server/bun";
|
||||||
import { runDbMigrations } from "./db/db";
|
|
||||||
import { startup } from "./modules/lifecycle/startup";
|
|
||||||
import { retagSnapshots } from "./modules/lifecycle/migration";
|
|
||||||
import { logger } from "./utils/logger";
|
|
||||||
import { shutdown } from "./modules/lifecycle/shutdown";
|
|
||||||
import { REQUIRED_MIGRATIONS } from "./core/constants";
|
|
||||||
import { validateRequiredMigrations } from "./modules/lifecycle/checkpoint";
|
|
||||||
import { createApp } from "./app";
|
import { createApp } from "./app";
|
||||||
import { config } from "./core/config";
|
|
||||||
import { runCLI } from "./cli";
|
import { runCLI } from "./cli";
|
||||||
|
import { config } from "./core/config";
|
||||||
|
import { REQUIRED_MIGRATIONS } from "./core/constants";
|
||||||
|
import { runDbMigrations } from "./db/db";
|
||||||
|
import { validateRequiredMigrations } from "./modules/lifecycle/checkpoint";
|
||||||
|
import { retagSnapshots } from "./modules/lifecycle/migration";
|
||||||
|
import { shutdown } from "./modules/lifecycle/shutdown";
|
||||||
|
import { startup } from "./modules/lifecycle/startup";
|
||||||
|
import { logger } from "./utils/logger";
|
||||||
|
|
||||||
const cliRun = await runCLI(Bun.argv);
|
const cliRun = await runCLI(Bun.argv);
|
||||||
if (cliRun) {
|
if (cliRun) {
|
||||||
|
|
@ -22,7 +23,7 @@ runDbMigrations();
|
||||||
await retagSnapshots();
|
await retagSnapshots();
|
||||||
await validateRequiredMigrations(REQUIRED_MIGRATIONS);
|
await validateRequiredMigrations(REQUIRED_MIGRATIONS);
|
||||||
|
|
||||||
void startup();
|
await startup();
|
||||||
|
|
||||||
logger.info(`Server is running at http://localhost:${config.port}`);
|
logger.info(`Server is running at http://localhost:${config.port}`);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { createLogger, format, transports } from "winston";
|
import { createLogger, format, transports } from "winston";
|
||||||
|
|
||||||
import { sanitizeSensitiveData } from "./sanitize";
|
import { sanitizeSensitiveData } from "./sanitize";
|
||||||
|
|
||||||
const { printf, combine, colorize } = format;
|
const { printf, combine, colorize } = format;
|
||||||
|
|
@ -27,7 +28,7 @@ const log = (level: "info" | "warn" | "error" | "debug", messages: unknown[]) =>
|
||||||
return sanitizeSensitiveData(JSON.stringify(m, null, 2));
|
return sanitizeSensitiveData(JSON.stringify(m, null, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
return sanitizeSensitiveData(String(JSON.stringify(m)));
|
return sanitizeSensitiveData(JSON.stringify(m));
|
||||||
});
|
});
|
||||||
|
|
||||||
winstonLogger.log(level, stringMessages.join(" "));
|
winstonLogger.log(level, stringMessages.join(" "));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue