Update cli.ts

This commit is contained in:
syuilo 2025-04-23 17:13:09 +09:00
parent 99fb6e864e
commit 31186262fa
1 changed files with 0 additions and 20 deletions

View File

@ -6,35 +6,15 @@
import 'reflect-metadata';
import { EventEmitter } from 'node:events';
import { NestFactory } from '@nestjs/core';
import Logger from '@/logger.js';
import { CommandModule } from '@/cli/CommandModule.js';
import { NestLogger } from '@/NestLogger.js';
import { CommandService } from '@/cli/CommandService.js';
import { envOption } from '../env.js';
process.title = 'Misskey Cli';
Error.stackTraceLimit = Infinity;
EventEmitter.defaultMaxListeners = 128;
const logger = new Logger('core', 'cyan');
//#region Events
// Display detail of unhandled promise rejection
if (!envOption.quiet) {
process.on('unhandledRejection', console.dir);
}
// Display detail of uncaught exception
process.on('uncaughtException', err => {
try {
logger.error(err);
console.trace(err);
} catch { }
});
//#endregion
const app = await NestFactory.createApplicationContext(CommandModule, {
logger: new NestLogger(),
});