UNPKG

typeorm-codebase-sync

Version:

Automatically update your codebase to add migrations, entities and subscribers to your `data-source.ts` file

32 lines (31 loc) 1.23 kB
import yargs from "yargs"; import { ResolvedFileImport } from "../codebaseHelpers/resolveClassFileAndImportGlobs.js"; export declare class AddReferencesCommand implements yargs.CommandModule<object, commandArgs> { command: string; describe: string; cwd: string; constructor(); builder(args: yargs.Argv): yargs.Argv<{ dataSource: string; } & { migrations: string[] | undefined; } & { entities: string[] | undefined; } & { subscribers: string[] | undefined; }>; handler(args: commandArgs): Promise<void>; updateProperty(dataSourceFilePath: string, propertyName: "migrations" | "entities" | "subscribers", addedImports: ResolvedFileImport[]): Promise<{ updatedFiles: string[]; addedImportedFiles: string[]; }>; addImportToProperty(dataSourceFilePath: string, propertyName: "migrations" | "entities" | "subscribers", addedImport: ResolvedFileImport): Promise<string[]>; logImportAdditions(additionName: "migration" | "entity" | "subscriber", cwd: string, filePaths: string[]): void; } declare type commandArgs = { dataSource: string; migrations?: string[]; entities?: string[]; subscribers?: string[]; }; export {};