import { BaseCommand } from '../../modules/ace/main.ts'; import { type CommandOptions } from '../../types/ace.ts'; /** * Command to create a new transformer class. * Transformers are used to serialize data objects (like models) into specific * formats for API responses, allowing you to control which fields are exposed * and how data is structured for clients. * * @example * ``` * ace make:transformer User * ace make:transformer Post * ace make:transformer ProductTransformer * ``` */ export default class MakeTransformer extends BaseCommand { /** * The command name */ static commandName: string; /** * The command description */ static description: string; /** * Command options configuration. * Allows unknown flags to be passed through. */ static options: CommandOptions; /** * Name of the entity for which to generate the transformer */ name: string; /** * 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 template file to use for generating the transformer class */ protected stubPath: string; /** * Execute the command to create a new transformer class. * Generates the transformer file with proper data serialization structure. */ run(): Promise; }