import type { IApp } from '../server.ts'; import Base from './Base.ts'; import type { ParseArgsOptionsConfigExtended } from './BaseCli.ts'; type TypeMap = { string: string; boolean: boolean; }; export type CommandArgumentToTypes> = { [K in keyof T as T[K] extends { required: true; } | { default: never; } ? K : never]-?: TypeMap[T[K]['type']]; } & { [K in keyof T as T[K] extends { required: true; } | { default: never; } ? never : K]?: TypeMap[T[K]['type']]; }; declare class AbstractCommand extends Base { commands: Record; args: Record; constructor(app: IApp, commands: Record, args: Record); static get description(): string; /** * If true, then this command will load models and init mongo connection */ static isShouldInitModels: boolean; /** * If true, then this command will get model paths with inheritance */ static isShouldGetModelPaths: boolean; /** * Get mongo connection name * @param {String} commandName * @param {object} args */ static getMongoConnectionName(commandName: string, args: Record): string; /** * You able to add command arguments for parsing there. * @see https://nodejs.org/api/util.html#utilparseargsconfig in config.options plus extended with description and required */ static get commandArguments(): Record; /** * Entry point to every command. This method should be overridden */ run(): Promise; static get loggerGroup(): string; } export default AbstractCommand;