- Move core agent engine to packages/core/ - Add packages/types/ for shared TypeScript types - Add packages/utils/ for utility functions - Add apps/cli/ for command-line interface - Add apps/gateway/ for NestJS WebSocket gateway - Add apps/server/ for REST API server - Restructure desktop app (electron/ → src/main/, src/preload/) - Update pnpm workspace configuration - Remove legacy src/ directory Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
import { Module } from "@nestjs/common";
|
|
import { ServeStaticModule } from "@nestjs/serve-static";
|
|
import { LoggerModule } from "nestjs-pino";
|
|
import { join } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { AppController } from "./app.controller.js";
|
|
import { DatabaseModule } from "./database/database.module.js";
|
|
import { GatewayModule } from "./gateway.module.js";
|
|
import { TelegramModule } from "./telegram/telegram.module.js";
|
|
|
|
const __dirname = fileURLToPath(new URL(".", import.meta.url));
|
|
const isDev = process.env.NODE_ENV !== "production";
|
|
|
|
@Module({
|
|
imports: [
|
|
ServeStaticModule.forRoot({
|
|
rootPath: join(__dirname, "public"),
|
|
serveRoot: "/client",
|
|
}),
|
|
LoggerModule.forRoot({
|
|
pinoHttp: isDev
|
|
? {
|
|
transport: {
|
|
target: "pino-pretty",
|
|
options: {
|
|
colorize: true,
|
|
singleLine: true,
|
|
},
|
|
},
|
|
level: process.env.LOG_LEVEL ?? "debug",
|
|
}
|
|
: {
|
|
level: process.env.LOG_LEVEL ?? "info",
|
|
},
|
|
}),
|
|
DatabaseModule,
|
|
GatewayModule,
|
|
TelegramModule,
|
|
],
|
|
controllers: [AppController],
|
|
})
|
|
export class AppModule {}
|