gen-jhipster
Version:
VHipster - Spring Boot + Angular/React/Vue in one handy generator
64 lines (63 loc) • 2.74 kB
TypeScript
import { type ApplicationType } from '../core/application-types.ts';
import { GENERATOR_JHIPSTER } from '../constants/jhipster.ts';
import type { JDLJSONBlueprint, JDLJSONMicrofrontend, PostProcessedJDLJSONApplication } from './core/types/exporter.ts';
import type { JSONEntity } from './core/types/json-config.ts';
import type { JDLApplicationConfig } from './core/types/parsing.ts';
type JDLApplicationConfiguration = {
applicationName?: string;
applicationType?: ApplicationType;
application?: {
[GENERATOR_JHIPSTER]: {
baseName?: string;
applicationType?: ApplicationType;
};
};
forSeveralApplications?: boolean;
};
/**
* Creates a new JDL importer from files.
* There are two ways to create an importer:
* - By providing an existing application content, if there's one
* - Deprecated: providing some application options
*/
export declare function createImporterFromFiles(files: string[], configuration?: JDLApplicationConfiguration, definition?: JDLApplicationConfig): {
/**
* Processes JDL files and converts them to JSON.
* @returns {object} the state of the process:
* - exportedDeployments: the exported deployments, or an empty list
* - exportedApplications: the exported applications, or an empty list
* - exportedEntities: the exported entities, or an empty list
*/
import: () => ImportState;
};
/**
* Creates a new JDL importer from a JDL string content.
* There are two ways to create an importer:
* - By providing an existing application content, if there's one
* - Deprecated: providing some application options
*/
export declare function createImporterFromContent(jdlString: string, configuration?: JDLApplicationConfiguration, definition?: JDLApplicationConfig): {
/**
* Processes JDL files and converts them to JSON.
* @returns {object} the state of the process:
* - exportedDeployments: the exported deployments, or an empty list
* - exportedApplications: the exported applications, or an empty list
* - exportedEntities: the exported entities, or an empty list
*/
import: () => ImportState;
};
export type ApplicationWithEntities = {
config: {
blueprints?: JDLJSONBlueprint[];
microfrontends?: JDLJSONMicrofrontend[];
} & Record<string, any>;
namespaceConfigs?: Record<string, Record<string, any>>;
entities: JSONEntity[];
};
export type ImportState = {
exportedApplications: PostProcessedJDLJSONApplication[];
exportedApplicationsWithEntities: Record<string, ApplicationWithEntities>;
exportedEntities: JSONEntity[];
exportedDeployments: any[];
};
export {};