UNPKG

@megaorm/cli

Version:

This package allows you to communicate with MegaORM via commands directly from the command line interface (CLI).

25 lines (24 loc) 841 B
import { MegaCommand } from '../MegaCommand'; /** * Represents a command to add a model file to a specific folder in the project * based on MegaORM configuration. * * @extends MegaCommand */ export declare class AddModelCommand extends MegaCommand { protected static syntax: string; /** * Resolves the appropriate path for adding a model file based on the configuration. * * @param config The MegaORM configuration object. * @returns The resolved path for the model file. * @throws `MegaCommandError` if `paths.models` is absolute and TypeScript is enabled. */ private static path; /** * Executes the command to add a model. * * @returns A promise that resolves when the model has been added successfully or rejects with an error. */ static exec(): Promise<void>; }