UNPKG

adonis-odm

Version:

A comprehensive MongoDB ODM for AdonisJS with Lucid-style API, type-safe relationships, embedded documents, and transaction support

77 lines 1.92 kB
import { BaseCommand } from '@adonisjs/core/ace'; import { CommandOptions } from '@adonisjs/core/types/ace'; /** * Command to execute ODM database seeders * * This command provides comprehensive seeder execution capabilities including: * - Running all seeders or specific files * - Interactive seeder selection * - Connection-specific execution * - Environment-aware execution with clear feedback * - Progress indication and error reporting * * @example * ```bash * # Run all seeders * node ace odm:seed * * # Run specific seeders * node ace odm:seed --files="./database/seeders/user_seeder.ts,./database/seeders/post_seeder.ts" * * # Interactive mode * node ace odm:seed --interactive * * # Specific connection * node ace odm:seed --connection=tenant-1 * ``` */ export default class OdmSeed extends BaseCommand { static commandName: string; static description: string; static options: CommandOptions; /** * Specify seeder files to run */ files?: string[]; /** * Run in interactive mode for seeder selection */ interactive?: boolean; /** * Specify database connection to use */ connection?: string; /** * Execute the command */ run(): Promise<void>; /** * Run seeders based on provided options */ private runSeeders; /** * Run in interactive mode to select seeders */ private runInteractiveMode; /** * Display seeder execution results */ private displayResults; /** * Get display name for a seeder file */ private getSeederDisplayName; /** * Get hint text for a seeder file */ private getSeederHint; /** * Validate connection and provide helpful feedback */ private validateConnection; /** * Display help information */ static help: string[]; } //# sourceMappingURL=odm_seed.d.ts.map