import { BaseCommand } from '../../modules/ace/main.ts'; import { type CommandOptions } from '../../types/ace.ts'; /** * The make controller command to create an HTTP controller * * @example * ``` * ace make:controller User * ace make:controller User store update * ace make:controller User --resource * ace make:controller User --api * ace make:controller User --singular * ``` */ export default class MakeController extends BaseCommand { /** * The command name */ static commandName: string; /** * The command description */ static description: string; /** * Command options configuration */ static options: CommandOptions; /** * The name of the controller */ name: string; /** * Create controller with custom method names */ actions?: string[]; /** * Generate controller in singular form */ singular: boolean; /** * Generate resourceful controller with methods to perform CRUD actions on a resource */ resource: boolean; /** * Generate resourceful controller without the "edit" and the "create" methods */ api: boolean; /** * 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 controller */ protected stubPath: string; /** * Preparing the command state */ prepare(): Promise; run(): Promise; }