gen-jhipster
Version:
VHipster - Spring Boot + Angular/React/Vue in one handy generator
136 lines (135 loc) • 6.87 kB
TypeScript
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<Entity extends BaseApplicationEntity = BaseApplicationEntity, Application extends BaseApplication<Entity> = BaseApplication<Entity>, Config extends BaseApplicationConfig = BaseApplicationConfig, Options extends BaseApplicationOptions = BaseApplicationOptions, Source extends BaseApplicationSource = BaseApplicationSource, Features extends BaseApplicationFeatures = BaseApplicationFeatures, Tasks extends DefaultTasks<Entity, Application, Source> = DefaultTasks<Entity, Application, Source>> extends BaseGenerator<Application, Config, Options, Source, Features, Tasks> {
#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<Config>;
/**
* @deprecated use dependsOnBootstrap('app')
*/
dependsOnBootstrapApplication(options?: ComposeOptions<GeneratorsByNamespace['jhipster:base-application:bootstrap']>): Promise<GeneratorsByNamespace['jhipster:base-application:bootstrap']>;
/**
* @deprecated use dependsOnBootstrap('server')
*/
dependsOnBootstrapApplicationServer(options?: ComposeOptions<GeneratorsByNamespace['jhipster:server:bootstrap']>): Promise<GeneratorsByNamespace['jhipster:server:bootstrap']>;
/**
* @deprecated use dependsOnBootstrap('client')
*/
dependsOnBootstrapApplicationClient(options?: ComposeOptions<GeneratorsByNamespace['jhipster:client:bootstrap']>): Promise<GeneratorsByNamespace['jhipster:client:bootstrap']>;
/**
* 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<T extends Record<string, GenericTask<this, Tasks['ConfiguringEachEntityTaskParam']>>>(taskGroup: T): Record<keyof T, GenericTask<any, Tasks['ConfiguringEachEntityTaskParam']>>;
/**
* Utility method to get typed objects for autocomplete.
*/
asLoadingEntitiesTaskGroup<T extends Record<string, GenericTask<this, Tasks['LoadingEntitiesTaskParam']>>>(taskGroup: T): Record<keyof T, GenericTask<any, Tasks['LoadingEntitiesTaskParam']>>;
/**
* Utility method to get typed objects for autocomplete.
*/
asPreparingEachEntityTaskGroup<T extends Record<string, GenericTask<this, Tasks['PreparingEachEntityTaskParam']>>>(taskGroup: T): Record<keyof T, GenericTask<any, Tasks['PreparingEachEntityTaskParam']>>;
/**
* Utility method to get typed objects for autocomplete.
*/
asPreparingEachEntityFieldTaskGroup<T extends Record<string, GenericTask<this, Tasks['PreparingEachEntityFieldTaskParam']>>>(taskGroup: T): Record<keyof T, GenericTask<any, Tasks['PreparingEachEntityFieldTaskParam']>>;
/**
* Utility method to get typed objects for autocomplete.
*/
asPreparingEachEntityRelationshipTaskGroup<T extends Record<string, GenericTask<this, Tasks['PreparingEachEntityRelationshipTaskParam']>>>(taskGroup: T): Record<keyof T, GenericTask<any, Tasks['PreparingEachEntityRelationshipTaskParam']>>;
/**
* Utility method to get typed objects for autocomplete.
*/
asPostPreparingEachEntityTaskGroup<T extends Record<string, GenericTask<this, Tasks['PostPreparingEachEntityTaskParam']>>>(taskGroup: T): Record<keyof T, GenericTask<any, Tasks['PostPreparingEachEntityTaskParam']>>;
/**
* Utility method to get typed objects for autocomplete.
*/
asWritingEntitiesTaskGroup<T extends Record<string, GenericTask<this, Tasks['WritingEntitiesTaskParam']>>>(taskGroup: T): Record<keyof T, GenericTask<any, Tasks['WritingEntitiesTaskParam']>>;
/**
* Utility method to get typed objects for autocomplete.
*/
asPostWritingEntitiesTaskGroup<T extends Record<string, GenericTask<this, Tasks['PostWritingEntitiesTaskParam']>>>(taskGroup: T): Record<keyof T, GenericTask<any, Tasks['PostWritingEntitiesTaskParam']>>;
/**
* 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;
}