import type { ComposeOptions, Storage } from 'yeoman-generator'; import type { GenericTask } from '../base-core/types.ts'; import BaseGenerator from '../base-simple-application/index.ts'; import type GeneratorsByNamespace from '../types.ts'; import { PRIORITY_NAMES } from './priorities.ts'; import type { TaskTypes as DefaultTasks } from './tasks.ts'; import type { Application as BaseApplication, Config as BaseApplicationConfig, Entity as BaseApplicationEntity, Features as BaseApplicationFeatures, Options as BaseApplicationOptions, Source as BaseApplicationSource } from './types.ts'; /** * This is the base class for a generator that generates entities. */ export default class BaseApplicationGenerator = BaseApplication, Config extends BaseApplicationConfig = BaseApplicationConfig, Options extends BaseApplicationOptions = BaseApplicationOptions, Source extends BaseApplicationSource = BaseApplicationSource, Features extends BaseApplicationFeatures = BaseApplicationFeatures, Tasks extends DefaultTasks = DefaultTasks> extends BaseGenerator { #private; static CONFIGURING_EACH_ENTITY: string; static LOADING_ENTITIES: string; static PREPARING_EACH_ENTITY: string; static PREPARING_EACH_ENTITY_FIELD: string; static PREPARING_EACH_ENTITY_RELATIONSHIP: string; static POST_PREPARING_EACH_ENTITY: string; static WRITING_ENTITIES: string; static POST_WRITING_ENTITIES: string; constructor(args?: string[], options?: Options, features?: Features); /** * JHipster config with default values fallback */ get jhipsterConfigWithDefaults(): Readonly; /** * @deprecated use dependsOnBootstrap('app') */ dependsOnBootstrapApplication(options?: ComposeOptions): Promise; /** * @deprecated use dependsOnBootstrap('server') */ dependsOnBootstrapApplicationServer(options?: ComposeOptions): Promise; /** * @deprecated use dependsOnBootstrap('client') */ dependsOnBootstrapApplicationClient(options?: ComposeOptions): Promise; /** * Get Entities configuration path * @returns */ getEntitiesConfigPath(...args: string[]): string; /** * Get Entity configuration path * @param entityName Entity name * @returns */ getEntityConfigPath(entityName: string): string; /** * Get all the generator configuration from the .yo-rc.json file * @param entityName - Name of the entity to load. * @param create - Create storage if doesn't exists. */ getEntityConfig(entityName: string, create?: boolean): Storage | undefined; /** * get sorted list of entity names according to changelog date (i.e. the order in which they were added) */ getExistingEntityNames(): string[]; /** * get sorted list of entities according to changelog date (i.e. the order in which they were added) */ getExistingEntities(): { name: string; definition: Entity; }[]; /** * Priority API stub for blueprints. * * Configuring each entity should configure entities. */ get configuringEachEntity(): {}; get preparingEachEntity(): {}; /** * Priority API stub for blueprints. */ get preparingEachEntityField(): {}; /** * Priority API stub for blueprints. */ get preparingEachEntityRelationship(): {}; /** * Priority API stub for blueprints. */ get postPreparingEachEntity(): {}; /** * Priority API stub for blueprints. */ get writingEntities(): {}; /** * Priority API stub for blueprints. */ get postWritingEntities(): {}; /** * Utility method to get typed objects for autocomplete. */ asConfiguringEachEntityTaskGroup>>(taskGroup: T): Record>; /** * Utility method to get typed objects for autocomplete. */ asLoadingEntitiesTaskGroup>>(taskGroup: T): Record>; /** * Utility method to get typed objects for autocomplete. */ asPreparingEachEntityTaskGroup>>(taskGroup: T): Record>; /** * Utility method to get typed objects for autocomplete. */ asPreparingEachEntityFieldTaskGroup>>(taskGroup: T): Record>; /** * Utility method to get typed objects for autocomplete. */ asPreparingEachEntityRelationshipTaskGroup>>(taskGroup: T): Record>; /** * Utility method to get typed objects for autocomplete. */ asPostPreparingEachEntityTaskGroup>>(taskGroup: T): Record>; /** * Utility method to get typed objects for autocomplete. */ asWritingEntitiesTaskGroup>>(taskGroup: T): Record>; /** * Utility method to get typed objects for autocomplete. */ asPostWritingEntitiesTaskGroup>>(taskGroup: T): Record>; /** * Reset entities fake data seed. * @param {string} seed */ resetEntitiesFakeData(seed: string | undefined): void; getArgsForPriority(priorityName: (typeof PRIORITY_NAMES)[keyof typeof PRIORITY_NAMES]): any; /** * @protected */ protected getTaskFirstArgForPriority(priorityName: string): any; }