gen-jhipster
Version:
VHipster - Spring Boot + Angular/React/Vue in one handy generator
64 lines (63 loc) • 4.81 kB
TypeScript
/**
* Copyright 2013-2026 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import BaseApplicationGenerator from '../base-application/index.ts';
import type { Language } from './support/languages.ts';
import type { Application as LanguagesApplication, Config as LanguagesConfig, Entity as LanguagesEntity, Options as LanguagesOptions, Source as LanguagesSource } from './types.ts';
/**
* This is the base class for a generator that generates entities.
*/
export default class LanguagesGenerator extends BaseApplicationGenerator<LanguagesEntity, LanguagesApplication<LanguagesEntity>, LanguagesConfig, LanguagesOptions, LanguagesSource> {
[BaseApplicationGenerator.INITIALIZING]: Record<"validate" | "initializing" | "languagesToApply" | "validateSupportedLanguages", import("../base-core/types.js").GenericTask<any, import("../base/tasks.js").TaskParamWithControl>>;
[BaseApplicationGenerator.PROMPTING]: Record<"askI18n" | "askForLanguages" | "checkPrompts", import("../base-core/types.js").GenericTask<any, import("../base/tasks.js").TaskParamWithControl>>;
[BaseApplicationGenerator.CONFIGURING]: Record<"defaults", import("../base-core/types.js").GenericTask<any, import("../base/tasks.js").TaskParamWithControl>>;
[BaseApplicationGenerator.COMPOSING]: Record<"bootstrap", import("../base-core/types.js").GenericTask<any, import("../base/tasks.js").TaskParamWithControl>>;
[BaseApplicationGenerator.LOADING]: Record<"prepareForTemplates", import("../base-core/types.js").GenericTask<any, import("../base/tasks.js").TaskParamWithControl & {
application: LanguagesApplication<LanguagesEntity<import("./types.ts").Field, import("./entity.ts").Relationship>>;
} & import("../base-simple-application/tasks.js").ApplicationDefaultsTaskParam<LanguagesApplication<LanguagesEntity<import("./types.ts").Field, import("./entity.ts").Relationship>>>>>;
[BaseApplicationGenerator.POST_WRITING]: Record<"updateLanguages", import("../base-core/types.js").GenericTask<any, import("../base/tasks.js").TaskParamWithControl & {
source: import("../base/types.js").Source;
} & {
application: LanguagesApplication<LanguagesEntity<import("./types.ts").Field, import("./entity.ts").Relationship>>;
}>>;
askForMoreLanguages: boolean;
askForNativeLanguage: boolean;
languages?: string[];
/**
* Languages to be generated.
* Can be incremental or every language.
*/
languagesToApply: string[];
languageCommand: boolean;
writeJavaLanguageFiles: boolean;
regenerateLanguages: boolean;
beforeQueue(): Promise<void>;
get supportedLanguages(): Map<string, Language>;
get initializing(): Record<"validate" | "initializing" | "languagesToApply" | "validateSupportedLanguages", import("../base-core/types.js").GenericTask<any, import("../base/tasks.js").TaskParamWithControl>>;
get prompting(): Record<"askI18n" | "askForLanguages" | "checkPrompts", import("../base-core/types.js").GenericTask<any, import("../base/tasks.js").TaskParamWithControl>>;
get configuring(): Record<"defaults", import("../base-core/types.js").GenericTask<any, import("../base/tasks.js").TaskParamWithControl>>;
get composing(): Record<"bootstrap", import("../base-core/types.js").GenericTask<any, import("../base/tasks.js").TaskParamWithControl>>;
get loading(): Record<"prepareForTemplates", import("../base-core/types.js").GenericTask<any, import("../base/tasks.js").TaskParamWithControl & {
application: LanguagesApplication<LanguagesEntity<import("./types.ts").Field, import("./entity.ts").Relationship>>;
} & import("../base-simple-application/tasks.js").ApplicationDefaultsTaskParam<LanguagesApplication<LanguagesEntity<import("./types.ts").Field, import("./entity.ts").Relationship>>>>>;
get postWriting(): Record<"updateLanguages", import("../base-core/types.js").GenericTask<any, import("../base/tasks.js").TaskParamWithControl & {
source: import("../base/types.js").Source;
} & {
application: LanguagesApplication<LanguagesEntity<import("./types.ts").Field, import("./entity.ts").Relationship>>;
}>>;
}