import { type CommandOptions } from '../../types/ace.ts'; import { BaseCommand } from '../../modules/ace/main.ts'; /** * The make middleware command to create a new middleware * class. * * @example * ``` * ace make:middleware Auth * ace make:middleware Auth --stack=server * ace make:middleware Auth --stack=named * ace make:middleware Auth --stack=router * ``` */ export default class MakeMiddleware extends BaseCommand { /** * The command name */ static commandName: string; /** * The command description */ static description: string; /** * Command options configuration */ static options: CommandOptions; /** * Name of the middleware */ name: string; /** * The stack in which to register the middleware */ stack?: 'server' | 'named' | 'router'; /** * Read the contents from this file (if the flag exists) and use * it as the raw contents */ contentsFrom: string; /** * Forcefully overwrite existing files */ force: boolean; /** * The stub to use for generating the middleware */ protected stubPath: string; run(): Promise; }