mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
15 lines
415 B
TypeScript
15 lines
415 B
TypeScript
|
|
import { Command } from "@oclif/core";
|
||
|
|
|
||
|
|
export abstract class BaseCommand<T extends typeof Command> extends Command {
|
||
|
|
protected async init(): Promise<void> {
|
||
|
|
await super.init();
|
||
|
|
|
||
|
|
const { setupDatabase } = await import("~drizzle/db");
|
||
|
|
const { consoleLogger } = await import("@loggers");
|
||
|
|
|
||
|
|
(async () => {
|
||
|
|
await setupDatabase(consoleLogger, false);
|
||
|
|
})();
|
||
|
|
}
|
||
|
|
}
|