diff --git a/apps/api/src/app.ts b/apps/api/src/app.ts index d7d547f19..a9e79506e 100644 --- a/apps/api/src/app.ts +++ b/apps/api/src/app.ts @@ -10,7 +10,8 @@ import { Hono } from "hono"; import { cors } from "hono/cors"; import { container } from "tsyringe"; -import { HttpLoggerService, LoggerService } from "@src/core"; +import { HttpLoggerService } from "@src/core/services/http-logger/http-logger.service"; +import { LoggerService } from "@src/core/services/logger/logger.service"; import packageJson from "../package.json"; import { chainDb, syncUserSchema, userDb } from "./db/dbConnection"; import { apiRouter } from "./routers/apiRouter"; diff --git a/apps/api/src/core/services/http-logger/http-logger.service.ts b/apps/api/src/core/services/http-logger/http-logger.service.ts index d24b5229e..f698fcd02 100644 --- a/apps/api/src/core/services/http-logger/http-logger.service.ts +++ b/apps/api/src/core/services/http-logger/http-logger.service.ts @@ -1,7 +1,7 @@ import { Context, Next } from "hono"; import { singleton } from "tsyringe"; -import { LoggerService } from "@src/core"; +import { LoggerService } from "@src/core/services/logger/logger.service"; import type { HonoInterceptor } from "@src/core/types/hono-interceptor.type"; @singleton() diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index a5ea74dcc..6f06be7fd 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -4,9 +4,12 @@ import "./open-telemetry"; import { container } from "tsyringe"; import { initApp } from "@src/app"; -import { PostgresMigratorService } from "@src/core"; +import type { PostgresMigratorService } from "@src/core"; -container - .resolve(PostgresMigratorService) - .migrate() - .then(() => initApp()); +const { BILLING_ENABLED } = process.env; + +const migrate = + // eslint-disable-next-line @typescript-eslint/no-var-requires + BILLING_ENABLED === "true" ? container.resolve(require("@src/core").PostgresMigratorService).migrate() : Promise.resolve(); + +migrate.then(() => initApp()); diff --git a/package-lock.json b/package-lock.json index defda4f2f..e2f8715af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -702,6 +702,7 @@ "apps/provider-console": { "version": "0.1.0", "dependencies": { + "@akashnetwork/ui": "*", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "lucide-react": "^0.395.0",