2024-05-07 09:41:02 +02:00
|
|
|
import { Command } from "@oclif/core";
|
2024-06-30 10:55:50 +02:00
|
|
|
import { searchManager } from "~/classes/search/search-manager";
|
2024-05-29 02:59:49 +02:00
|
|
|
import { setupDatabase } from "~/drizzle/db";
|
2024-05-07 09:41:02 +02:00
|
|
|
|
2024-06-13 04:26:43 +02:00
|
|
|
export abstract class BaseCommand<_T extends typeof Command> extends Command {
|
2024-05-07 09:41:02 +02:00
|
|
|
protected async init(): Promise<void> {
|
|
|
|
|
await super.init();
|
|
|
|
|
|
2024-06-27 01:11:39 +02:00
|
|
|
await setupDatabase(false);
|
2024-06-30 10:55:50 +02:00
|
|
|
await searchManager.connect(true);
|
2024-05-07 09:41:02 +02:00
|
|
|
}
|
|
|
|
|
}
|