import Environment from 'yeoman-environment'; import { type Blueprint } from '../generators/base/internal/index.ts'; import type { CliCommand } from './types.d.ts'; export declare const generatorsLookup: string[]; export declare const jhipsterGeneratorsLookup: string[]; type EnvironmentOptions = ConstructorParameters[0]; export default class EnvironmentBuilder { env: Environment; devBlueprintPath?: string; localBlueprintPath?: string; localBlueprintExists?: boolean; _blueprintsWithVersion: Record; /** * Creates a new EnvironmentBuilder with a new Environment. */ static create(options?: EnvironmentOptions): EnvironmentBuilder; /** * Creates a new Environment with blueprints. * * Can be used to create a new test environment (requires yeoman-test >= 2.6.0): * @example * const promise = require('yeoman-test').create('jhipster:app', {}, {createEnv: EnvironmentBuilder.createEnv}).run(); */ static createEnv(...args: Parameters): Promise; /** * Creates a new EnvironmentBuilder with a new Environment and load jhipster, blueprints and sharedOptions. */ static createDefaultBuilder(...args: Parameters): Promise; static run(args: Parameters[0], generatorOptions?: Parameters[1] & Record, envOptions?: Parameters[0]): Promise; /** * Class to manipulate yeoman environment for jhipster needs. * - Registers jhipster generators. * - Loads blueprints from argv and .yo-rc.json. * - Installs blueprints if not found. * - Loads sharedOptions. */ constructor(env: Environment); prepare({ blueprints, lookups, devBlueprintPath, }?: { blueprints?: Record; lookups?: Parameters[0][]; devBlueprintPath?: string; }): Promise; getBlueprintsNamespaces(): string[]; /** * Construct blueprint option value. * * @return {String} */ getBlueprintsOption(): string; updateJHipsterGenerators(): Promise; /** * @private * Lookup current jhipster generators. */ _lookupJHipster(): Promise; _lookupLocalBlueprint(): Promise; _lookupDevBlueprint(): Promise; _lookups(lookups?: Parameters[0][]): Promise; /** * @private * Load blueprints from argv, .yo-rc.json. */ _loadBlueprints(blueprints: Record | undefined): this; /** * @private * Lookup current loaded blueprints. */ _lookupBlueprints(options?: Parameters[0]): Promise; /** * Lookup for generators. */ lookupGenerators(generators: string[], options?: Parameters[0]): Promise; /** * @private * Load sharedOptions from jhipster and blueprints. */ _loadSharedOptions(): Promise; /** * Get blueprints commands. */ getBlueprintCommands(): Promise | undefined>; /** * Get the environment. */ getEnvironment(): Environment; /** * Load blueprints from argv. * At this point, commander has not parsed yet because we are building it. */ private _getBlueprintsFromArgv; /** * Load blueprints from .yo-rc.json. */ _getBlueprintsFromYoRc(): Blueprint[]; /** * @private * Creates a 'blueprintName: blueprintVersion' object from argv and .yo-rc.json blueprints. */ _getAllBlueprintsWithVersion(): Record; /** * @private * Get packagePaths from current loaded blueprints. */ _getBlueprintPackagePaths(): Promise<[string, string | undefined][] | undefined>; /** * @private * Get blueprints commands. */ _getBlueprintCommands(blueprintPackagePaths: [string, string | undefined][] | undefined): Promise | undefined>; /** * @private * Get blueprints sharedOptions. */ _getSharedOptions(blueprintPackagePaths: [string, string | undefined][] | undefined): Promise; } export {};